All Classes Namespaces Files Functions Variables Groups
Notes.idl
Go to the documentation of this file.
1 /**
2  * @file Notes.idl
3  * @brief %Notes management
4  *
5  * @author Frantisek Boranek
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <Structures.idl>
11 
12 module kerio {
13 module jsonapi {
14 module webmail {
15 module notes {
16 
17 /**
18  * Color of note
19  */
20 enum NoteColor {
21  White,
22  Yellow,
23  Pink,
24  Green,
25  Blue
26 };
27 
28 /**
29  * Position of note
30  */
31 struct NotePosition {
32  unsignedlong xOffset;
33  unsignedlong yOffset;
34  unsignedlong xSize;
35  unsignedlong ySize;
36 };
37 
38 /**
39  * Note details
40  */
41 struct Note {
42  kerio::web::KId id; ///< [READ-ONLY] global identification
43  kerio::web::KId folderId; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the note defined
44  Watermark watermark;
45  NoteColor color; ///< COLOR:BLUE
46  string text; ///< TEXT:****
47  NotePosition position; ///< POSITION:354 206 623 326
48  UtcDateTime createDate; ///< [READ-ONLY]
49  UtcDateTime modifyDate; ///< [READ-ONLY]
50 };
51 
52 /**
53  * List of notes
54  */
55 typedef sequence<Note> NoteList;
56 
57 /** Constants for composing kerio::web::SearchQuery */
58 module searchFields {
59  const string text = "text"; ///< [SEARCHABLE][SORTABLE] string
60  const string color = "color"; ///< [SORTABLE]
61  const string createDate = "createDate"; ///< [SORTABLE]
62  const string modifyDate = "modifyDate"; ///< [SORTABLE]
63 };
64 
65 /**
66  * Notes management.
67  */
68 interface Notes {
69 
70  /**
71  * Get a list of notes.
72  *
73  * @param list - all found notes
74  * @param totalItems - number of notes found if there is no limit
75  * @param folderIds - list of global identifiers of folders to be listed.
76  * @param query - query attributes and limits
77  */
78  void get(out NoteList list, out long totalItems, in kerio::web::KIdList folderIds, in kerio::web::SearchQuery query);
79 
80  /**
81  * Get an note.
82  *
83  * @param errors - list of errors
84  * @param result - found notes
85  * @param ids - global identifiers of requested notes
86  */
87  void getById(out kerio::web::ErrorList errors, out NoteList result, in kerio::web::KIdList ids);
88 
89  /**
90  * Remove a list of notes.
91  *
92  * @param errors - list of notes that failed to remove
93  * @param ids - list of global identifiers of notes to be removed
94  */
95  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList ids);
96 
97  /**
98  * Copy existing notes to folder
99  *
100  * @param errors - error message list
101  * @param ids - list of global identifiers of notes to be copied
102  * @param folder - target folder
103  */
104  void copy(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
105 
106  /**
107  * Create notes.
108  *
109  * @param errors - list of notes that failed on creation
110  * @param result - particular results for all items
111  * @param notes - list of notes to be created
112  */
113  void create(out kerio::web::ErrorList errors, out CreateResultList result, in NoteList notes);
114 
115  /**
116  * Set notes.
117  *
118  * @param errors - error message list
119  * @param events - modifications of notes.
120  */
121  void set(out kerio::web::ErrorList errors, out SetResultList result, in NoteList notes);
122 
123  /**
124  * Move existing notes to folder
125  *
126  * @param errors - error message list
127  * @param ids - list of global identifiers of notes to be moved
128  * @param folder - target folder
129  */
130  void move(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
131 };
132 
133 }; }; }; }; // end of namespace
134 
135 /**
136  * @}
137  */