@doist/todoist-api-typescript 7.5.0 → 7.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/cjs/authentication.js +46 -2
  2. package/dist/cjs/consts/endpoints.js +54 -2
  3. package/dist/cjs/todoist-api.js +524 -6
  4. package/dist/cjs/types/activity/index.js +18 -0
  5. package/dist/cjs/types/activity/requests.js +2 -0
  6. package/dist/cjs/types/activity/types.js +28 -0
  7. package/dist/cjs/types/backups/index.js +18 -0
  8. package/dist/cjs/types/backups/requests.js +2 -0
  9. package/dist/cjs/types/backups/types.js +8 -0
  10. package/dist/cjs/types/comments/index.js +18 -0
  11. package/dist/cjs/types/comments/requests.js +2 -0
  12. package/dist/cjs/types/comments/types.js +60 -0
  13. package/dist/cjs/types/common.js +2 -0
  14. package/dist/cjs/types/emails/index.js +17 -0
  15. package/dist/cjs/types/emails/requests.js +5 -0
  16. package/dist/cjs/types/id-mappings/index.js +18 -0
  17. package/dist/cjs/types/id-mappings/requests.js +20 -0
  18. package/dist/cjs/types/id-mappings/types.js +12 -0
  19. package/dist/cjs/types/index.js +16 -2
  20. package/dist/cjs/types/insights/index.js +18 -0
  21. package/dist/cjs/types/insights/requests.js +2 -0
  22. package/dist/cjs/types/insights/types.js +84 -0
  23. package/dist/cjs/types/labels/index.js +18 -0
  24. package/dist/cjs/types/labels/requests.js +2 -0
  25. package/dist/cjs/types/labels/types.js +11 -0
  26. package/dist/cjs/types/productivity/index.js +17 -0
  27. package/dist/cjs/types/productivity/types.js +67 -0
  28. package/dist/cjs/types/projects/index.js +18 -0
  29. package/dist/cjs/types/projects/requests.js +2 -0
  30. package/dist/cjs/types/projects/types.js +56 -0
  31. package/dist/cjs/types/reminders/index.js +17 -0
  32. package/dist/cjs/types/sections/index.js +18 -0
  33. package/dist/cjs/types/sections/requests.js +2 -0
  34. package/dist/cjs/types/sections/types.js +22 -0
  35. package/dist/cjs/types/sync/commands/shared.js +2 -2
  36. package/dist/cjs/types/sync/resources/collaborators.js +2 -2
  37. package/dist/cjs/types/sync/resources/notes.js +2 -2
  38. package/dist/cjs/types/sync/resources/reminders.js +3 -3
  39. package/dist/cjs/types/sync/resources/user.js +2 -2
  40. package/dist/cjs/types/sync/resources/workspaces.js +5 -5
  41. package/dist/cjs/types/tasks/index.js +18 -0
  42. package/dist/cjs/types/tasks/requests.js +2 -0
  43. package/dist/cjs/types/tasks/types.js +59 -0
  44. package/dist/cjs/types/templates/index.js +17 -0
  45. package/dist/cjs/types/templates/requests.js +2 -0
  46. package/dist/cjs/types/uploads/index.js +17 -0
  47. package/dist/cjs/types/uploads/requests.js +2 -0
  48. package/dist/cjs/types/users/index.js +17 -0
  49. package/dist/cjs/types/users/types.js +51 -0
  50. package/dist/cjs/types/workspaces/index.js +18 -0
  51. package/dist/cjs/types/workspaces/requests.js +2 -0
  52. package/dist/cjs/types/workspaces/types.js +137 -0
  53. package/dist/cjs/utils/validators.js +47 -19
  54. package/dist/esm/authentication.js +46 -3
  55. package/dist/esm/consts/endpoints.js +43 -0
  56. package/dist/esm/todoist-api.js +522 -4
  57. package/dist/esm/types/activity/index.js +2 -0
  58. package/dist/esm/types/activity/requests.js +1 -0
  59. package/dist/esm/types/activity/types.js +25 -0
  60. package/dist/esm/types/backups/index.js +2 -0
  61. package/dist/esm/types/backups/requests.js +1 -0
  62. package/dist/esm/types/backups/types.js +5 -0
  63. package/dist/esm/types/comments/index.js +2 -0
  64. package/dist/esm/types/comments/requests.js +1 -0
  65. package/dist/esm/types/comments/types.js +57 -0
  66. package/dist/esm/types/common.js +1 -0
  67. package/dist/esm/types/emails/index.js +1 -0
  68. package/dist/esm/types/emails/requests.js +2 -0
  69. package/dist/esm/types/id-mappings/index.js +2 -0
  70. package/dist/esm/types/id-mappings/requests.js +17 -0
  71. package/dist/esm/types/id-mappings/types.js +9 -0
  72. package/dist/esm/types/index.js +16 -2
  73. package/dist/esm/types/insights/index.js +2 -0
  74. package/dist/esm/types/insights/requests.js +1 -0
  75. package/dist/esm/types/insights/types.js +81 -0
  76. package/dist/esm/types/labels/index.js +2 -0
  77. package/dist/esm/types/labels/requests.js +1 -0
  78. package/dist/esm/types/labels/types.js +8 -0
  79. package/dist/esm/types/productivity/index.js +1 -0
  80. package/dist/esm/types/productivity/types.js +64 -0
  81. package/dist/esm/types/projects/index.js +2 -0
  82. package/dist/esm/types/projects/requests.js +1 -0
  83. package/dist/esm/types/projects/types.js +53 -0
  84. package/dist/esm/types/reminders/index.js +1 -0
  85. package/dist/esm/types/sections/index.js +2 -0
  86. package/dist/esm/types/sections/requests.js +1 -0
  87. package/dist/esm/types/sections/types.js +19 -0
  88. package/dist/esm/types/sync/commands/shared.js +1 -1
  89. package/dist/esm/types/sync/resources/collaborators.js +1 -1
  90. package/dist/esm/types/sync/resources/notes.js +1 -1
  91. package/dist/esm/types/sync/resources/reminders.js +1 -1
  92. package/dist/esm/types/sync/resources/user.js +1 -1
  93. package/dist/esm/types/sync/resources/workspaces.js +1 -1
  94. package/dist/esm/types/tasks/index.js +2 -0
  95. package/dist/esm/types/tasks/requests.js +1 -0
  96. package/dist/esm/types/tasks/types.js +56 -0
  97. package/dist/esm/types/templates/index.js +1 -0
  98. package/dist/esm/types/templates/requests.js +1 -0
  99. package/dist/esm/types/uploads/index.js +1 -0
  100. package/dist/esm/types/uploads/requests.js +1 -0
  101. package/dist/esm/types/users/index.js +1 -0
  102. package/dist/esm/types/users/types.js +48 -0
  103. package/dist/esm/types/workspaces/index.js +2 -0
  104. package/dist/esm/types/workspaces/requests.js +1 -0
  105. package/dist/esm/types/workspaces/types.js +134 -0
  106. package/dist/esm/utils/validators.js +30 -2
  107. package/dist/types/authentication.d.ts +51 -6
  108. package/dist/types/consts/endpoints.d.ts +22 -0
  109. package/dist/types/test-utils/test-defaults.d.ts +5 -5
  110. package/dist/types/todoist-api.d.ts +209 -4
  111. package/dist/types/types/activity/index.d.ts +2 -0
  112. package/dist/types/types/activity/requests.d.ts +85 -0
  113. package/dist/types/types/activity/types.d.ts +49 -0
  114. package/dist/types/types/backups/index.d.ts +2 -0
  115. package/dist/types/types/backups/requests.d.ts +16 -0
  116. package/dist/types/types/backups/types.d.ts +7 -0
  117. package/dist/types/types/comments/index.d.ts +2 -0
  118. package/dist/types/types/comments/requests.d.ts +63 -0
  119. package/dist/types/types/comments/types.d.ts +141 -0
  120. package/dist/types/types/common.d.ts +6 -0
  121. package/dist/types/types/emails/index.d.ts +1 -0
  122. package/dist/types/types/emails/requests.d.ts +30 -0
  123. package/dist/types/types/id-mappings/index.d.ts +2 -0
  124. package/dist/types/types/id-mappings/requests.d.ts +28 -0
  125. package/dist/types/types/id-mappings/types.d.ts +13 -0
  126. package/dist/types/types/index.d.ts +16 -2
  127. package/dist/types/types/insights/index.d.ts +2 -0
  128. package/dist/types/types/insights/requests.d.ts +26 -0
  129. package/dist/types/types/insights/types.d.ts +186 -0
  130. package/dist/types/types/labels/index.d.ts +2 -0
  131. package/dist/types/types/labels/requests.d.ts +75 -0
  132. package/dist/types/types/labels/types.d.ts +13 -0
  133. package/dist/types/types/productivity/index.d.ts +1 -0
  134. package/dist/types/types/productivity/types.d.ts +115 -0
  135. package/dist/types/types/projects/index.d.ts +2 -0
  136. package/dist/types/types/projects/requests.d.ts +169 -0
  137. package/dist/types/types/projects/types.d.ts +201 -0
  138. package/dist/types/types/reminders/index.d.ts +1 -0
  139. package/dist/types/types/reminders/requests.d.ts +91 -0
  140. package/dist/types/types/sections/index.d.ts +2 -0
  141. package/dist/types/types/sections/requests.d.ts +41 -0
  142. package/dist/types/types/sections/types.d.ts +44 -0
  143. package/dist/types/types/sync/commands/projects.d.ts +2 -1
  144. package/dist/types/types/sync/commands/shared.d.ts +2 -2
  145. package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
  146. package/dist/types/types/sync/resources/notes.d.ts +1 -1
  147. package/dist/types/types/sync/resources/user.d.ts +2 -2
  148. package/dist/types/types/sync/resources/view-options.d.ts +5 -5
  149. package/dist/types/types/sync/response.d.ts +5 -1
  150. package/dist/types/types/sync/user-preferences.d.ts +1 -1
  151. package/dist/types/types/tasks/index.d.ts +2 -0
  152. package/dist/types/types/tasks/requests.d.ts +197 -0
  153. package/dist/types/types/tasks/types.d.ts +162 -0
  154. package/dist/types/types/templates/index.d.ts +1 -0
  155. package/dist/types/types/templates/requests.d.ts +92 -0
  156. package/dist/types/types/uploads/index.d.ts +1 -0
  157. package/dist/types/types/uploads/requests.d.ts +32 -0
  158. package/dist/types/types/users/index.d.ts +1 -0
  159. package/dist/types/types/users/types.d.ts +66 -0
  160. package/dist/types/types/workspaces/index.d.ts +2 -0
  161. package/dist/types/types/workspaces/requests.d.ts +260 -0
  162. package/dist/types/types/workspaces/types.d.ts +225 -0
  163. package/dist/types/utils/colors.d.ts +1 -1
  164. package/dist/types/utils/validators.d.ts +205 -12
  165. package/package.json +1 -1
  166. package/dist/cjs/types/entities.js +0 -437
  167. package/dist/esm/types/entities.js +0 -434
  168. package/dist/types/types/entities.d.ts +0 -971
  169. package/dist/types/types/requests.d.ts +0 -856
  170. /package/dist/cjs/types/{requests.js → reminders/requests.js} +0 -0
  171. /package/dist/esm/types/{requests.js → reminders/requests.js} +0 -0
@@ -1,856 +0,0 @@
1
- import type { RequireAllOrNone, RequireOneOrNone, RequireExactlyOne } from 'type-fest';
2
- import type { ColorKey } from '../utils/colors.js';
3
- import type { ActivityEvent, ActivityObjectEventType, CollaboratorRole, Comment, DueDate, Duration, Label, PersonalProject, ProjectViewStyle, ProjectVisibility, Section, Task, User, WorkspaceProject, WorkspaceRole } from './entities.js';
4
- import type { LocationTrigger } from './sync/resources/reminders.js';
5
- /**
6
- * Arguments for creating a new task.
7
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/create_task_api_v1_tasks_post
8
- */
9
- export type AddTaskArgs = {
10
- content: string;
11
- description?: string;
12
- projectId?: string;
13
- sectionId?: string;
14
- parentId?: string;
15
- order?: number;
16
- labels?: string[];
17
- priority?: number;
18
- assigneeId?: string;
19
- dueString?: string;
20
- dueLang?: string;
21
- deadlineLang?: string;
22
- deadlineDate?: string;
23
- isUncompletable?: boolean;
24
- } & RequireOneOrNone<{
25
- dueDate?: string;
26
- dueDatetime?: string;
27
- }> & RequireAllOrNone<{
28
- duration?: Duration['amount'];
29
- durationUnit?: Duration['unit'];
30
- }>;
31
- /**
32
- * Arguments for retrieving tasks.
33
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/get_tasks_api_v1_tasks_get
34
- */
35
- export type GetTasksArgs = {
36
- projectId?: string;
37
- sectionId?: string;
38
- parentId?: string;
39
- label?: string;
40
- ids?: string[];
41
- cursor?: string | null;
42
- limit?: number;
43
- };
44
- /**
45
- * Arguments for retrieving tasks by filter.
46
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/get_tasks_by_filter_api_v1_tasks_filter_get
47
- */
48
- export type GetTasksByFilterArgs = {
49
- query: string;
50
- lang?: string;
51
- cursor?: string | null;
52
- limit?: number;
53
- };
54
- /**
55
- * Arguments for retrieving completed tasks by completion date.
56
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/tasks_completed_by_completion_date_api_v1_tasks_completed_by_completion_date_get
57
- */
58
- export type GetCompletedTasksByCompletionDateArgs = {
59
- since: string;
60
- until: string;
61
- workspaceId?: string | null;
62
- projectId?: string | null;
63
- sectionId?: string | null;
64
- parentId?: string | null;
65
- filterQuery?: string | null;
66
- filterLang?: string | null;
67
- cursor?: string | null;
68
- limit?: number;
69
- publicKey?: string | null;
70
- };
71
- /**
72
- * Arguments for retrieving completed tasks by due date.
73
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/tasks_completed_by_due_date_api_v1_tasks_completed_by_due_date_get
74
- */
75
- export type GetCompletedTasksByDueDateArgs = {
76
- since: string;
77
- until: string;
78
- workspaceId?: string | null;
79
- projectId?: string | null;
80
- sectionId?: string | null;
81
- parentId?: string | null;
82
- filterQuery?: string | null;
83
- filterLang?: string | null;
84
- cursor?: string | null;
85
- limit?: number;
86
- };
87
- /**
88
- * Arguments for searching completed tasks.
89
- */
90
- export type SearchCompletedTasksArgs = {
91
- query: string;
92
- cursor?: string | null;
93
- limit?: number;
94
- };
95
- /**
96
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/get_tasks_api_v1_tasks_get
97
- */
98
- export type GetTasksResponse = {
99
- results: Task[];
100
- nextCursor: string | null;
101
- };
102
- /**
103
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/tasks_completed_by_due_date_api_v1_tasks_completed_by_due_date_get
104
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/tasks_completed_by_completion_date_api_v1_tasks_completed_by_completion_date_get
105
- */
106
- export type GetCompletedTasksResponse = {
107
- items: Task[];
108
- nextCursor: string | null;
109
- };
110
- /**
111
- * Arguments for updating a task.
112
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/update_task_api_v1_tasks__task_id__post
113
- */
114
- export type UpdateTaskArgs = {
115
- content?: string;
116
- description?: string;
117
- labels?: string[];
118
- priority?: number;
119
- /**
120
- * Sort order of the task within its parent/project.
121
- * Internally mapped to `child_order` in the API payload.
122
- */
123
- order?: number;
124
- /**
125
- * Natural language due date.
126
- * Use `"no date"` to clear a due date, or `null` as an SDK alias for the same behavior.
127
- */
128
- dueString?: (string & {}) | 'no date' | null;
129
- dueLang?: string | null;
130
- assigneeId?: string | null;
131
- /**
132
- * Deadline date in `YYYY-MM-DD` format.
133
- * Use `null` to clear a task deadline.
134
- */
135
- deadlineDate?: string | null;
136
- deadlineLang?: string | null;
137
- isUncompletable?: boolean;
138
- } & RequireOneOrNone<{
139
- dueDate?: string;
140
- dueDatetime?: string;
141
- }> & RequireAllOrNone<{
142
- duration?: Duration['amount'];
143
- durationUnit?: Duration['unit'];
144
- }>;
145
- /**
146
- * Arguments for quick adding a task.
147
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/quick_add_api_v1_tasks_quick_post
148
- */
149
- export type QuickAddTaskArgs = {
150
- text: string;
151
- note?: string;
152
- reminder?: string;
153
- autoReminder?: boolean;
154
- meta?: boolean;
155
- isUncompletable?: boolean;
156
- };
157
- /**
158
- * Response from quick adding a task.
159
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/quick_add_api_v1_tasks_quick_post
160
- */
161
- /**
162
- * Arguments for moving a task.
163
- * @see https://todoist.com/api/v1/docs#tag/Tasks/operation/move_task_api_v1_tasks__task_id__move_post
164
- */
165
- export type MoveTaskArgs = RequireExactlyOne<{
166
- projectId?: string;
167
- sectionId?: string;
168
- parentId?: string;
169
- }>;
170
- /**
171
- * Arguments for retrieving projects.
172
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_projects_api_v1_projects_get
173
- */
174
- export type GetProjectsArgs = {
175
- cursor?: string | null;
176
- limit?: number;
177
- };
178
- /**
179
- * Arguments for searching projects.
180
- */
181
- type SearchArgs = {
182
- query: string;
183
- cursor?: string | null;
184
- limit?: number;
185
- };
186
- export type SearchProjectsArgs = SearchArgs;
187
- /**
188
- * Response from retrieving projects.
189
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_projects_api_v1_projects_get
190
- */
191
- export type GetProjectsResponse = {
192
- results: (PersonalProject | WorkspaceProject)[];
193
- nextCursor: string | null;
194
- };
195
- /**
196
- * Arguments for retrieving archived projects.
197
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_archived_projects_api_v1_projects_archived_get
198
- */
199
- export type GetArchivedProjectsArgs = {
200
- cursor?: string | null;
201
- limit?: number;
202
- };
203
- /**
204
- * Response from retrieving archived projects.
205
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_archived_projects_api_v1_projects_archived_get
206
- */
207
- export type GetArchivedProjectsResponse = {
208
- results: (PersonalProject | WorkspaceProject)[];
209
- nextCursor: string | null;
210
- };
211
- /**
212
- * Arguments for creating a new project.
213
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/create_project_api_v1_projects_post
214
- */
215
- export type AddProjectArgs = {
216
- name: string;
217
- parentId?: string;
218
- color?: ColorKey;
219
- isFavorite?: boolean;
220
- viewStyle?: ProjectViewStyle;
221
- workspaceId?: string;
222
- };
223
- /**
224
- * Arguments for updating a project.
225
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/update_project_api_v1_projects__project_id__post
226
- */
227
- export type UpdateProjectArgs = {
228
- name?: string;
229
- color?: ColorKey;
230
- isFavorite?: boolean;
231
- viewStyle?: ProjectViewStyle;
232
- };
233
- /**
234
- * Arguments for retrieving project collaborators.
235
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_project_collaborators_api_v1_projects__project_id__collaborators_get
236
- */
237
- export type GetProjectCollaboratorsArgs = {
238
- cursor?: string | null;
239
- limit?: number;
240
- };
241
- /**
242
- * Response from retrieving project collaborators.
243
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/get_project_collaborators_api_v1_projects__project_id__collaborators_get
244
- */
245
- export type GetProjectCollaboratorsResponse = {
246
- results: User[];
247
- nextCursor: string | null;
248
- };
249
- /**
250
- * Arguments for retrieving sections.
251
- * @see https://todoist.com/api/v1/docs#tag/Sections/operation/get_sections_api_v1_sections_get
252
- */
253
- export type GetSectionsArgs = {
254
- projectId?: string | null;
255
- cursor?: string | null;
256
- limit?: number;
257
- };
258
- /**
259
- * Arguments for searching sections.
260
- */
261
- export type SearchSectionsArgs = SearchArgs & {
262
- projectId?: string | null;
263
- };
264
- /**
265
- * Response from retrieving sections.
266
- * @see https://todoist.com/api/v1/docs#tag/Sections/operation/get_sections_api_v1_sections_get
267
- */
268
- export type GetSectionsResponse = {
269
- results: Section[];
270
- nextCursor: string | null;
271
- };
272
- /**
273
- * Arguments for creating a new section.
274
- * @see https://todoist.com/api/v1/docs#tag/Sections/operation/create_section_api_v1_sections_post
275
- */
276
- export type AddSectionArgs = {
277
- name: string;
278
- projectId: string;
279
- order?: number | null;
280
- };
281
- /**
282
- * Arguments for updating a section.
283
- * @see https://todoist.com/api/v1/docs#tag/Sections/operation/update_section_api_v1_sections__section_id__post
284
- */
285
- export type UpdateSectionArgs = {
286
- name: string;
287
- };
288
- /**
289
- * Arguments for retrieving labels.
290
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/get_labels_api_v1_labels_get
291
- */
292
- export type GetLabelsArgs = {
293
- cursor?: string | null;
294
- limit?: number;
295
- };
296
- /**
297
- * Arguments for searching labels.
298
- */
299
- export type SearchLabelsArgs = SearchArgs;
300
- /**
301
- * Response from retrieving labels.
302
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/get_labels_api_v1_labels_get
303
- */
304
- export type GetLabelsResponse = {
305
- results: Label[];
306
- nextCursor: string | null;
307
- };
308
- /**
309
- * Arguments for creating a new label.
310
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/create_label_api_v1_labels_post
311
- */
312
- export type AddLabelArgs = {
313
- name: string;
314
- order?: number | null;
315
- color?: ColorKey;
316
- isFavorite?: boolean;
317
- };
318
- /**
319
- * Arguments for updating a label.
320
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/update_label_api_v1_labels__label_id__post
321
- */
322
- export type UpdateLabelArgs = {
323
- name?: string;
324
- order?: number | null;
325
- color?: ColorKey;
326
- isFavorite?: boolean;
327
- };
328
- /**
329
- * Arguments for retrieving shared labels.
330
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
331
- */
332
- export type GetSharedLabelsArgs = {
333
- omitPersonal?: boolean;
334
- cursor?: string | null;
335
- limit?: number;
336
- };
337
- /**
338
- * Response from retrieving shared labels.
339
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
340
- */
341
- export type GetSharedLabelsResponse = {
342
- results: string[];
343
- nextCursor: string | null;
344
- };
345
- /**
346
- * Arguments for renaming a shared label.
347
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/shared_labels_rename_api_v1_labels_shared_rename_post
348
- */
349
- export type RenameSharedLabelArgs = {
350
- name: string;
351
- newName: string;
352
- };
353
- /**
354
- * Arguments for removing a shared label.
355
- * @see https://todoist.com/api/v1/docs#tag/Labels/operation/shared_labels_remove_api_v1_labels_shared_remove_post
356
- */
357
- export type RemoveSharedLabelArgs = {
358
- name: string;
359
- };
360
- /**
361
- * Arguments for retrieving comments.
362
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/get_comments_api_v1_comments_get
363
- */
364
- export type GetCommentsArgs = {
365
- taskId: string;
366
- projectId?: never;
367
- cursor?: string | null;
368
- limit?: number;
369
- };
370
- /**
371
- * Arguments for retrieving task comments.
372
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/get_comments_api_v1_comments_get
373
- */
374
- export type GetTaskCommentsArgs = {
375
- taskId: string;
376
- projectId?: never;
377
- cursor?: string | null;
378
- limit?: number;
379
- };
380
- /**
381
- * Arguments for retrieving project comments.
382
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/get_comments_api_v1_comments_get
383
- */
384
- export type GetProjectCommentsArgs = {
385
- projectId: string;
386
- taskId?: never;
387
- cursor?: string | null;
388
- limit?: number;
389
- };
390
- /**
391
- * Response from retrieving comments.
392
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/get_comments_api_v1_comments_get
393
- */
394
- export type GetCommentsResponse = {
395
- results: Comment[];
396
- nextCursor: string | null;
397
- };
398
- /**
399
- * Arguments for creating a new comment.
400
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/create_comment_api_v1_comments_post
401
- */
402
- export type AddCommentArgs = {
403
- content: string;
404
- attachment?: {
405
- fileName?: string;
406
- fileUrl: string;
407
- fileType?: string;
408
- resourceType?: string;
409
- } | null;
410
- } & RequireExactlyOne<{
411
- taskId?: string;
412
- projectId?: string;
413
- }>;
414
- /**
415
- * Arguments for updating a comment.
416
- * @see https://todoist.com/api/v1/docs#tag/Comments/operation/update_comment_api_v1_comments__comment_id__post
417
- */
418
- export type UpdateCommentArgs = {
419
- content: string;
420
- };
421
- /** Available reminder delivery services. */
422
- export declare const REMINDER_DELIVERY_SERVICES: readonly ["email", "push"];
423
- /** Delivery service for a reminder notification. */
424
- export type ReminderDeliveryService = (typeof REMINDER_DELIVERY_SERVICES)[number];
425
- export type ReminderDueDate = Partial<Pick<DueDate, 'date' | 'string' | 'timezone' | 'lang' | 'isRecurring'>>;
426
- type ReminderTaskArgs = {
427
- taskId: string;
428
- };
429
- type TimeBasedReminderArgs = {
430
- service?: ReminderDeliveryService;
431
- notifyUid?: string;
432
- isUrgent?: boolean;
433
- };
434
- type AddLocationReminderFields = {
435
- notifyUid?: string;
436
- name: string;
437
- locLat: string;
438
- locLong: string;
439
- locTrigger: LocationTrigger;
440
- radius?: number;
441
- };
442
- export type AddRelativeReminderArgs = ReminderTaskArgs & {
443
- reminderType?: 'relative';
444
- minuteOffset: number;
445
- } & TimeBasedReminderArgs;
446
- export type AddAbsoluteReminderArgs = ReminderTaskArgs & {
447
- reminderType: 'absolute';
448
- due: ReminderDueDate;
449
- } & TimeBasedReminderArgs;
450
- export type AddLocationReminderArgs = ReminderTaskArgs & AddLocationReminderFields;
451
- /**
452
- * Arguments for creating a new reminder.
453
- * @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/create_reminder_api_v1_reminders_post
454
- */
455
- export type AddReminderArgs = AddRelativeReminderArgs | AddAbsoluteReminderArgs;
456
- export type UpdateRelativeReminderArgs = {
457
- reminderType: 'relative';
458
- } & Partial<Omit<AddRelativeReminderArgs, 'taskId' | 'reminderType'>>;
459
- export type UpdateAbsoluteReminderArgs = {
460
- reminderType: 'absolute';
461
- } & Partial<Omit<AddAbsoluteReminderArgs, 'taskId' | 'reminderType'>>;
462
- /**
463
- * Arguments for updating an existing reminder.
464
- * @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/update_reminder_api_v1_reminders__reminder_id__post
465
- */
466
- export type UpdateReminderArgs = UpdateRelativeReminderArgs | UpdateAbsoluteReminderArgs;
467
- /**
468
- * Arguments for updating an existing location reminder.
469
- */
470
- export type UpdateLocationReminderArgs = Partial<Omit<AddLocationReminderArgs, 'taskId'>>;
471
- /**
472
- * Common arguments for retrieving activity logs (excluding filter-type params).
473
- */
474
- type GetActivityLogsArgsCommon = {
475
- /**
476
- * Filter by the ID of a specific object.
477
- */
478
- objectId?: string;
479
- /**
480
- * Filter events by parent project ID.
481
- */
482
- parentProjectId?: string;
483
- /**
484
- * Filter events by parent task ID.
485
- */
486
- parentItemId?: string;
487
- /**
488
- * When true, includes the parent object data in the response.
489
- */
490
- includeParentObject?: boolean;
491
- /**
492
- * When true, includes child object data in the response.
493
- */
494
- includeChildObjects?: boolean;
495
- /**
496
- * Filter by the user ID who initiated the event.
497
- */
498
- initiatorId?: string;
499
- /**
500
- * When true, filters for events with no initiator (system-generated events).
501
- * When false, filters for events with an initiator.
502
- * When null or undefined, no filtering on initiator is applied.
503
- */
504
- initiatorIdNull?: boolean | null;
505
- /**
506
- * When true, ensures the last state of objects is included in the response.
507
- */
508
- ensureLastState?: boolean;
509
- /**
510
- * When true, includes comment annotations in the response.
511
- */
512
- annotateNotes?: boolean;
513
- /**
514
- * When true, includes parent object annotations in the response.
515
- */
516
- annotateParents?: boolean;
517
- /**
518
- * Pagination cursor for retrieving the next page of results.
519
- */
520
- cursor?: string | null;
521
- /**
522
- * Maximum number of results to return per page.
523
- */
524
- limit?: number;
525
- /**
526
- * Start date for filtering events (inclusive). Replaces deprecated `since`.
527
- * Accepts a Date object or YYYY-MM-DD string.
528
- */
529
- dateFrom?: Date | string;
530
- /**
531
- * End date for filtering events (inclusive). Replaces deprecated `until`.
532
- * Accepts a Date object or YYYY-MM-DD string.
533
- */
534
- dateTo?: Date | string;
535
- };
536
- export type GetActivityLogsArgs = GetActivityLogsArgsCommon & {
537
- objectEventTypes?: ActivityObjectEventType | ActivityObjectEventType[];
538
- /** @removed Use `objectEventTypes` instead. */
539
- objectType?: never;
540
- /** @removed Use `objectEventTypes` instead. */
541
- eventType?: never;
542
- /** @removed Use `dateFrom` instead. */
543
- since?: never;
544
- /** @removed Use `dateTo` instead. */
545
- until?: never;
546
- };
547
- /**
548
- * Response from retrieving activity logs.
549
- */
550
- export type GetActivityLogsResponse = {
551
- results: ActivityEvent[];
552
- nextCursor: string | null;
553
- };
554
- /**
555
- * Arguments for uploading a file.
556
- * @see https://todoist.com/api/v1/docs#tag/Uploads/operation/upload_file_api_v1_uploads_post
557
- */
558
- export type UploadFileArgs = {
559
- /**
560
- * The file content to upload. Can be:
561
- * - Buffer: File content as a Buffer (requires fileName)
562
- * - ReadableStream: File content as a stream (requires fileName)
563
- * - string: Path to a file on the filesystem (fileName is optional, will be inferred from path)
564
- */
565
- file: Buffer | NodeJS.ReadableStream | string | Blob;
566
- /**
567
- * The name of the file. Required for Buffer and Stream inputs.
568
- * Optional for file path strings and File objects (will be inferred if not provided).
569
- */
570
- fileName?: string;
571
- /**
572
- * The project ID to associate the upload with.
573
- */
574
- projectId?: string | null;
575
- };
576
- /**
577
- * Arguments for deleting an uploaded file.
578
- * @see https://todoist.com/api/v1/docs#tag/Uploads/operation/delete_upload_api_v1_uploads_delete
579
- */
580
- export type DeleteUploadArgs = {
581
- /**
582
- * The URL of the file to delete.
583
- */
584
- fileUrl: string;
585
- };
586
- /**
587
- * Arguments for moving a project to a workspace.
588
- */
589
- export type MoveProjectToWorkspaceArgs = {
590
- /** The ID of the project to move. */
591
- projectId: string;
592
- /** The target workspace ID. */
593
- workspaceId: string;
594
- /** Optional target folder ID within the workspace. */
595
- folderId?: string | null;
596
- /** Optional access settings for the project in the workspace. */
597
- access?: {
598
- visibility: ProjectVisibility;
599
- };
600
- };
601
- /**
602
- * Arguments for moving a project to personal.
603
- */
604
- export type MoveProjectToPersonalArgs = {
605
- /** The ID of the project to move. */
606
- projectId: string;
607
- };
608
- /**
609
- * Arguments for counting archived projects.
610
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/count_projects_archived_api_v1_projects_archived_count_get
611
- */
612
- export type GetArchivedProjectsCountArgs = {
613
- workspaceId?: number | null;
614
- joined?: boolean | null;
615
- };
616
- /**
617
- * Response from counting archived projects.
618
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/count_projects_archived_api_v1_projects_archived_count_get
619
- */
620
- export type GetArchivedProjectsCountResponse = {
621
- count: number;
622
- };
623
- /**
624
- * An action permitted for a role.
625
- */
626
- export type ActionView = {
627
- name: string;
628
- };
629
- /**
630
- * A project collaborator role with its permitted actions.
631
- */
632
- export type ProjectRoleView = {
633
- name: CollaboratorRole;
634
- actions: ActionView[];
635
- };
636
- /**
637
- * A workspace role with its permitted actions.
638
- */
639
- export type WorkspaceRoleView = {
640
- name: WorkspaceRole;
641
- actions: ActionView[];
642
- };
643
- /**
644
- * Response from getting project permissions (role-to-action mappings).
645
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/permissions_api_v1_projects_permissions_get
646
- */
647
- export type GetProjectPermissionsResponse = {
648
- projectCollaboratorActions: ProjectRoleView[];
649
- workspaceCollaboratorActions: WorkspaceRoleView[];
650
- };
651
- /**
652
- * Arguments for getting full project data.
653
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/projects_full_data_api_v1_projects__project_id__full_get
654
- */
655
- export type GetFullProjectArgs = {
656
- /**
657
- * Required to access the public project without authentication.
658
- */
659
- publicKey?: string | null;
660
- };
661
- /**
662
- * Response from getting full project data.
663
- * @see https://todoist.com/api/v1/docs#tag/Projects/operation/projects_full_data_api_v1_projects__project_id__full_get
664
- */
665
- export type GetFullProjectResponse = {
666
- project: (PersonalProject | WorkspaceProject) | null;
667
- commentsCount: number;
668
- tasks: Task[];
669
- sections: Section[];
670
- collaborators: User[];
671
- notes: Comment[];
672
- };
673
- /**
674
- * Arguments for creating a new workspace.
675
- * @see https://todoist.com/api/v1/docs#tag/Workspace/operation/create_workspace_api_v1_workspaces_post
676
- */
677
- export type AddWorkspaceArgs = {
678
- /** Name of the workspace. */
679
- name: string;
680
- /** Description of the workspace. */
681
- description?: string | null;
682
- /** Whether link sharing is enabled for the workspace. */
683
- isLinkSharingEnabled?: boolean;
684
- /** Whether guests are allowed in the workspace. */
685
- isGuestAllowed?: boolean;
686
- /** Workspace email domain. */
687
- domainName?: string | null;
688
- /** Whether users with matching email domains can discover this workspace. */
689
- domainDiscovery?: boolean;
690
- /** Whether workspace invites are restricted to workspace domain. */
691
- restrictEmailDomains?: boolean;
692
- /** Workspace properties. */
693
- properties?: Record<string, unknown> | null;
694
- };
695
- /**
696
- * Arguments for updating an existing workspace.
697
- * @see https://todoist.com/api/v1/docs#tag/Workspace/operation/update_workspace_api_v1_workspaces__workspace_id__post
698
- */
699
- export type UpdateWorkspaceArgs = {
700
- /** Updated workspace name. */
701
- name?: string;
702
- /** Updated workspace description. */
703
- description?: string | null;
704
- /** Updated link sharing status. */
705
- isLinkSharingEnabled?: boolean;
706
- /** Updated guest access status. */
707
- isGuestAllowed?: boolean | null;
708
- /** Updated workspace email domain. */
709
- domainName?: string | null;
710
- /** Updated domain discovery setting. */
711
- domainDiscovery?: boolean;
712
- /** Updated email domain restriction setting. */
713
- restrictEmailDomains?: boolean;
714
- /** Updated workspace properties. */
715
- properties?: Record<string, unknown> | null;
716
- /** Updated collapse state for current user. */
717
- isCollapsed?: boolean;
718
- };
719
- /**
720
- * Arguments for getting workspace invitations.
721
- */
722
- export type GetWorkspaceInvitationsArgs = {
723
- /**
724
- * The workspace ID to get invitations for.
725
- */
726
- workspaceId: number;
727
- };
728
- /**
729
- * Arguments for deleting a workspace invitation.
730
- */
731
- export type DeleteWorkspaceInvitationArgs = {
732
- /**
733
- * The workspace ID.
734
- */
735
- workspaceId: number;
736
- /**
737
- * The email address of the invitation to delete.
738
- */
739
- userEmail: string;
740
- };
741
- /**
742
- * Arguments for accepting/rejecting a workspace invitation.
743
- */
744
- export type WorkspaceInvitationActionArgs = {
745
- /**
746
- * The invitation code from the email.
747
- */
748
- inviteCode: string;
749
- };
750
- /**
751
- * Arguments for joining a workspace.
752
- */
753
- export type JoinWorkspaceArgs = {
754
- /**
755
- * Optional invitation code/link to join via.
756
- */
757
- inviteCode?: string | null;
758
- /**
759
- * Optional workspace ID to join via domain auto-join.
760
- */
761
- workspaceId?: number | null;
762
- };
763
- /**
764
- * Arguments for uploading/updating workspace logo.
765
- */
766
- export type WorkspaceLogoArgs = {
767
- /**
768
- * The workspace ID.
769
- */
770
- workspaceId: number;
771
- /**
772
- * The image file to upload (Buffer, Stream, or file path).
773
- */
774
- file?: Buffer | NodeJS.ReadableStream | string | Blob;
775
- /**
776
- * The file name (required for Buffer/Stream uploads).
777
- */
778
- fileName?: string;
779
- /**
780
- * Whether to delete the logo instead of updating it.
781
- */
782
- delete?: boolean;
783
- };
784
- /**
785
- * Arguments for getting workspace plan details.
786
- */
787
- export type GetWorkspacePlanDetailsArgs = {
788
- /**
789
- * The workspace ID.
790
- */
791
- workspaceId: number;
792
- };
793
- /**
794
- * Arguments for getting workspace users (paginated).
795
- */
796
- export type GetWorkspaceUsersArgs = {
797
- /**
798
- * Optional workspace ID. If not provided, returns users for all workspaces.
799
- */
800
- workspaceId?: number | null;
801
- /**
802
- * Cursor for pagination.
803
- */
804
- cursor?: string | null;
805
- /**
806
- * Maximum number of users to return (default: 100).
807
- */
808
- limit?: number;
809
- };
810
- /**
811
- * Arguments for getting workspace projects (paginated).
812
- */
813
- export type GetWorkspaceProjectsArgs = {
814
- /**
815
- * The workspace ID.
816
- */
817
- workspaceId: number;
818
- /**
819
- * Cursor for pagination.
820
- */
821
- cursor?: string | null;
822
- /**
823
- * Maximum number of projects to return (default: 100).
824
- */
825
- limit?: number;
826
- };
827
- /**
828
- * Paginated response for workspace users.
829
- */
830
- export type GetWorkspaceUsersResponse = {
831
- /**
832
- * Whether there are more users available.
833
- */
834
- hasMore: boolean;
835
- /**
836
- * Cursor for the next page of results.
837
- */
838
- nextCursor?: string;
839
- /**
840
- * Array of workspace users.
841
- */
842
- workspaceUsers: import('./entities.js').WorkspaceUser[];
843
- };
844
- /**
845
- * Response type for workspace invitations endpoint (simple email list).
846
- */
847
- export type WorkspaceInvitationsResponse = string[];
848
- /**
849
- * Response type for all workspace invitations endpoint (detailed objects).
850
- */
851
- export type AllWorkspaceInvitationsResponse = import('./entities.js').WorkspaceInvitation[];
852
- /**
853
- * Response type for workspace logo upload.
854
- */
855
- export type WorkspaceLogoResponse = Record<string, unknown> | null;
856
- export {};