All Classes Namespaces Files Functions Variables Groups
Tasks.idl
Go to the documentation of this file.
1 /**
2  * @file Tasks.idl
3  * @brief %Tasks management
4  *
5  * @author Dusan Juhas, Frantisek Boranek
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <Calendars.idl>
11 
12 module kerio {
13 module jsonapi {
14 module webmail {
15 module tasks {
16 
17 enum TaskStatus {
18  tsNotStarted,
19  tsCompleted,
20  tsInProgress,
21  tsWaiting,
22  tsDeferred
23 };
24 
25 
26 /**
27  * Task details
28  */
29 struct Task {
30  kerio::web::KId id; ///< [READ-ONLY] global identification
31  kerio::web::KId folderId; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
32  Watermark watermark;
33  kerio::jsonapi::webmail::calendars::EventAccess access; ///< [READ-ONLY] scope of access of user to this event
34  string summary;
35  string location;
36  string description;
37  TaskStatus status;
38  UtcDateTime start;
39  UtcDateTime due; ///< Deadline
40  UtcDateTime end; ///< [READ-ONLY] Date when task was completed. Valid only if the status is 'tsCompleted'.
41  long done; ///< Percent completed. If the status is set to 'tsCompleted' this value is always set to 100%.
42  PriorityType priority;
44  kerio::jsonapi::webmail::calendars::AttendeeList attendees;
46  long sortOrder; ///< [0-7FFFFFFF] Zero means a newest tasks.
47  boolean isPrivate;
48  boolean isCancelled; ///< [READ-ONLY] is canceled by organizer
49 };
50 
51 /**
52  * List of resources
53  */
54 typedef sequence<Task> TaskList;
55 
56 /** Constants for composing kerio::web::SearchQuery */
57 module searchFields {
58  const string messageId = "messageId"; ///< [SEARCHABLE] string
59  const string summary = "summary"; ///< [SEARCHABLE][SORTABLE] string
60  const string location = "location"; ///< [SEARCHABLE][SORTABLE] string
61  const string due = "due"; ///< [SEARCHABLE][SORTABLE] UtcDateTime
62  const string start = "start"; ///< [SEARCHABLE][SORTABLE] UtcDateTime
63  const string end = "end"; ///< [SEARCHABLE][SORTABLE] UtcDateTime
64  const string reminder = "reminder"; ///< [SEARCHABLE] UtcDateTime
65  const string status = "status"; ///< [SEARCHABLE][SORTABLE] TaskStatus
66  const string rule = "rule"; ///< [SEARCHABLE][SORTABLE] boolean
67  const string attendees = "attendees"; ///< [SEARCHABLE] string
68  const string done = "done"; ///< [SORTABLE]
69  const string priority = "priority"; ///< [SORTABLE]
70  const string receiveDate = "receiveDate"; ///< [SORTABLE]
71  const string modifiedDate = "modifiedDate"; ///< [SORTABLE]
72 };
73 
74 /**
75  * Tasks management.
76  */
77 interface Tasks {
78 
79  /**
80  * Get a list of tasks.
81  *
82  * @param list - all found tasks
83  * @param totalItems - number of tasks found if there is no limit
84  * @param folderIds - list of global identifiers of folders to be listed.
85  * @param query - query attributes and limits
86  */
87  void get(out TaskList list, out long totalItems, in kerio::web::KIdList folderIds, in kerio::web::SearchQuery query);
88 
89  /**
90  * Get an tasks.
91  *
92  * @param errors - list of tasks that failed to obtain
93  * @param result - found tasks
94  * @param ids - global identifiers of requested tasks
95  */
96  void getById(out kerio::web::ErrorList errors, out TaskList result, in kerio::web::KIdList ids);
97 
98  /**
99  * Remove a list of tasks.
100  *
101  * @param errors - list of tasks that failed to remove
102  * @param ids - list of global identifiers of tasks to be removed
103  */
104  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList ids);
105 
106  /**
107  * Copy existing tasks to folder
108  *
109  * @param errors - error message list
110  * @param ids - list of global identifiers of tasks to be copied
111  * @param folder - target folder
112  */
113  void copy(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
114 
115  /**
116  * Create tasks.
117  *
118  * @param errors - list of tasks that failed on creation
119  * @param result - particular results for all items
120  * @param events - list of tasks to be created
121  */
122  void create(out kerio::web::ErrorList errors, out CreateResultList result, in TaskList tasks);
123 
124  /**
125  * Set tasks.
126  *
127  * @param errors - error message list
128  * @param events - modifications of tasks.
129  */
130  void set(out kerio::web::ErrorList errors, out SetResultList result, in TaskList tasks);
131 
132  /**
133  * Move existing tasks to folder
134  *
135  * @param errors - error message list
136  * @param ids - list of global identifiers of tasks to be moved
137  * @param folder - target folder
138  */
139  void move(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
140 };
141 
142 }; }; }; }; // end of namespace
143 
144 /**
145  * @}
146  */