@doist/todoist-api-typescript 5.1.2 → 5.2.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.
- package/dist/TodoistApi.d.ts +16 -0
- package/dist/TodoistApi.js +59 -15
- package/dist/authentication.js +7 -8
- package/dist/consts/endpoints.d.ts +2 -0
- package/dist/consts/endpoints.js +5 -3
- package/dist/restClient.js +5 -6
- package/dist/testUtils/asserts.js +1 -2
- package/dist/testUtils/mocks.d.ts +0 -1
- package/dist/testUtils/mocks.js +18 -9
- package/dist/testUtils/testDefaults.d.ts +26 -25
- package/dist/testUtils/testDefaults.js +2 -0
- package/dist/types/entities.d.ts +134 -698
- package/dist/types/entities.js +5 -1
- package/dist/types/errors.d.ts +2 -2
- package/dist/utils/colors.d.ts +141 -1
- package/dist/utils/colors.js +4 -4
- package/dist/utils/processing-helpers.js +1 -2
- package/dist/utils/sanitization.js +2 -3
- package/dist/utils/urlHelpers.d.ts +8 -0
- package/dist/utils/urlHelpers.js +15 -3
- package/dist/utils/validators.js +14 -15
- package/package.json +15 -15
package/dist/types/entities.d.ts
CHANGED
|
@@ -1,65 +1,38 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const DueDateSchema: z.ZodObject<
|
|
2
|
+
export declare const DueDateSchema: z.ZodObject<{
|
|
3
3
|
isRecurring: z.ZodBoolean;
|
|
4
4
|
string: z.ZodString;
|
|
5
5
|
date: z.ZodString;
|
|
6
|
-
}, {
|
|
7
6
|
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
7
|
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
8
|
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
-
}
|
|
11
|
-
string: string;
|
|
12
|
-
isRecurring: boolean;
|
|
13
|
-
date: string;
|
|
14
|
-
datetime?: string | null | undefined;
|
|
15
|
-
timezone?: string | null | undefined;
|
|
16
|
-
lang?: string | null | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
string: string;
|
|
19
|
-
isRecurring: boolean;
|
|
20
|
-
date: string;
|
|
21
|
-
datetime?: string | null | undefined;
|
|
22
|
-
timezone?: string | null | undefined;
|
|
23
|
-
lang?: string | null | undefined;
|
|
24
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
25
10
|
/**
|
|
26
11
|
* Represents a due date for a task.
|
|
27
12
|
* @see https://todoist.com/api/v1/docs#tag/Tasks/operation/get_tasks_api_v1_tasks_get
|
|
28
13
|
*/
|
|
29
|
-
export
|
|
30
|
-
}
|
|
14
|
+
export type DueDate = z.infer<typeof DueDateSchema>;
|
|
31
15
|
export declare const DurationSchema: z.ZodObject<{
|
|
32
16
|
amount: z.ZodNumber;
|
|
33
|
-
unit: z.ZodEnum<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
amount: number;
|
|
39
|
-
unit: "minute" | "day";
|
|
40
|
-
}>;
|
|
17
|
+
unit: z.ZodEnum<{
|
|
18
|
+
minute: "minute";
|
|
19
|
+
day: "day";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strip>;
|
|
41
22
|
/**
|
|
42
23
|
* Represents a duration for a task deadline.
|
|
43
24
|
* @see https://todoist.com/api/v1/docs#tag/Tasks
|
|
44
25
|
*/
|
|
45
|
-
export
|
|
46
|
-
}
|
|
26
|
+
export type Duration = z.infer<typeof DurationSchema>;
|
|
47
27
|
export declare const DeadlineSchema: z.ZodObject<{
|
|
48
28
|
date: z.ZodString;
|
|
49
29
|
lang: z.ZodString;
|
|
50
|
-
},
|
|
51
|
-
date: string;
|
|
52
|
-
lang: string;
|
|
53
|
-
}, {
|
|
54
|
-
date: string;
|
|
55
|
-
lang: string;
|
|
56
|
-
}>;
|
|
30
|
+
}, z.core.$strip>;
|
|
57
31
|
/**
|
|
58
32
|
* Represents a task deadline.
|
|
59
33
|
*/
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
34
|
+
export type Deadline = z.infer<typeof DeadlineSchema>;
|
|
35
|
+
export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
|
|
63
36
|
id: z.ZodString;
|
|
64
37
|
userId: z.ZodString;
|
|
65
38
|
projectId: z.ZodString;
|
|
@@ -68,55 +41,31 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
68
41
|
addedByUid: z.ZodNullable<z.ZodString>;
|
|
69
42
|
assignedByUid: z.ZodNullable<z.ZodString>;
|
|
70
43
|
responsibleUid: z.ZodNullable<z.ZodString>;
|
|
71
|
-
labels: z.ZodArray<z.ZodString
|
|
44
|
+
labels: z.ZodArray<z.ZodString>;
|
|
72
45
|
deadline: z.ZodNullable<z.ZodObject<{
|
|
73
46
|
date: z.ZodString;
|
|
74
47
|
lang: z.ZodString;
|
|
75
|
-
},
|
|
76
|
-
date: string;
|
|
77
|
-
lang: string;
|
|
78
|
-
}, {
|
|
79
|
-
date: string;
|
|
80
|
-
lang: string;
|
|
81
|
-
}>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
82
49
|
duration: z.ZodNullable<z.ZodObject<{
|
|
83
50
|
amount: z.ZodNumber;
|
|
84
|
-
unit: z.ZodEnum<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
amount: number;
|
|
90
|
-
unit: "minute" | "day";
|
|
91
|
-
}>>;
|
|
51
|
+
unit: z.ZodEnum<{
|
|
52
|
+
minute: "minute";
|
|
53
|
+
day: "day";
|
|
54
|
+
}>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
92
56
|
checked: z.ZodBoolean;
|
|
93
57
|
isDeleted: z.ZodBoolean;
|
|
94
58
|
addedAt: z.ZodNullable<z.ZodString>;
|
|
95
59
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
96
60
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
97
|
-
due: z.ZodNullable<z.ZodObject<
|
|
61
|
+
due: z.ZodNullable<z.ZodObject<{
|
|
98
62
|
isRecurring: z.ZodBoolean;
|
|
99
63
|
string: z.ZodString;
|
|
100
64
|
date: z.ZodString;
|
|
101
|
-
}, {
|
|
102
65
|
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
66
|
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
67
|
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
-
}
|
|
106
|
-
string: string;
|
|
107
|
-
isRecurring: boolean;
|
|
108
|
-
date: string;
|
|
109
|
-
datetime?: string | null | undefined;
|
|
110
|
-
timezone?: string | null | undefined;
|
|
111
|
-
lang?: string | null | undefined;
|
|
112
|
-
}, {
|
|
113
|
-
string: string;
|
|
114
|
-
isRecurring: boolean;
|
|
115
|
-
date: string;
|
|
116
|
-
datetime?: string | null | undefined;
|
|
117
|
-
timezone?: string | null | undefined;
|
|
118
|
-
lang?: string | null | undefined;
|
|
119
|
-
}>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
120
69
|
priority: z.ZodNumber;
|
|
121
70
|
childOrder: z.ZodNumber;
|
|
122
71
|
content: z.ZodString;
|
|
@@ -124,8 +73,8 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
124
73
|
noteCount: z.ZodNumber;
|
|
125
74
|
dayOrder: z.ZodNumber;
|
|
126
75
|
isCollapsed: z.ZodBoolean;
|
|
127
|
-
},
|
|
128
|
-
|
|
76
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
77
|
+
url: string;
|
|
129
78
|
id: string;
|
|
130
79
|
userId: string;
|
|
131
80
|
projectId: string;
|
|
@@ -134,44 +83,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
134
83
|
addedByUid: string | null;
|
|
135
84
|
assignedByUid: string | null;
|
|
136
85
|
responsibleUid: string | null;
|
|
137
|
-
deadline: {
|
|
138
|
-
date: string;
|
|
139
|
-
lang: string;
|
|
140
|
-
} | null;
|
|
141
|
-
duration: {
|
|
142
|
-
amount: number;
|
|
143
|
-
unit: "minute" | "day";
|
|
144
|
-
} | null;
|
|
145
|
-
checked: boolean;
|
|
146
|
-
isDeleted: boolean;
|
|
147
|
-
addedAt: string | null;
|
|
148
|
-
completedAt: string | null;
|
|
149
|
-
updatedAt: string | null;
|
|
150
|
-
due: {
|
|
151
|
-
string: string;
|
|
152
|
-
isRecurring: boolean;
|
|
153
|
-
date: string;
|
|
154
|
-
datetime?: string | null | undefined;
|
|
155
|
-
timezone?: string | null | undefined;
|
|
156
|
-
lang?: string | null | undefined;
|
|
157
|
-
} | null;
|
|
158
|
-
priority: number;
|
|
159
|
-
childOrder: number;
|
|
160
|
-
content: string;
|
|
161
|
-
description: string;
|
|
162
|
-
noteCount: number;
|
|
163
|
-
dayOrder: number;
|
|
164
|
-
isCollapsed: boolean;
|
|
165
|
-
}, {
|
|
166
86
|
labels: string[];
|
|
167
|
-
id: string;
|
|
168
|
-
userId: string;
|
|
169
|
-
projectId: string;
|
|
170
|
-
sectionId: string | null;
|
|
171
|
-
parentId: string | null;
|
|
172
|
-
addedByUid: string | null;
|
|
173
|
-
assignedByUid: string | null;
|
|
174
|
-
responsibleUid: string | null;
|
|
175
87
|
deadline: {
|
|
176
88
|
date: string;
|
|
177
89
|
lang: string;
|
|
@@ -186,47 +98,8 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
186
98
|
completedAt: string | null;
|
|
187
99
|
updatedAt: string | null;
|
|
188
100
|
due: {
|
|
189
|
-
string: string;
|
|
190
101
|
isRecurring: boolean;
|
|
191
|
-
date: string;
|
|
192
|
-
datetime?: string | null | undefined;
|
|
193
|
-
timezone?: string | null | undefined;
|
|
194
|
-
lang?: string | null | undefined;
|
|
195
|
-
} | null;
|
|
196
|
-
priority: number;
|
|
197
|
-
childOrder: number;
|
|
198
|
-
content: string;
|
|
199
|
-
description: string;
|
|
200
|
-
noteCount: number;
|
|
201
|
-
dayOrder: number;
|
|
202
|
-
isCollapsed: boolean;
|
|
203
|
-
}>, {
|
|
204
|
-
url: string;
|
|
205
|
-
labels: string[];
|
|
206
|
-
id: string;
|
|
207
|
-
userId: string;
|
|
208
|
-
projectId: string;
|
|
209
|
-
sectionId: string | null;
|
|
210
|
-
parentId: string | null;
|
|
211
|
-
addedByUid: string | null;
|
|
212
|
-
assignedByUid: string | null;
|
|
213
|
-
responsibleUid: string | null;
|
|
214
|
-
deadline: {
|
|
215
|
-
date: string;
|
|
216
|
-
lang: string;
|
|
217
|
-
} | null;
|
|
218
|
-
duration: {
|
|
219
|
-
amount: number;
|
|
220
|
-
unit: "minute" | "day";
|
|
221
|
-
} | null;
|
|
222
|
-
checked: boolean;
|
|
223
|
-
isDeleted: boolean;
|
|
224
|
-
addedAt: string | null;
|
|
225
|
-
completedAt: string | null;
|
|
226
|
-
updatedAt: string | null;
|
|
227
|
-
due: {
|
|
228
102
|
string: string;
|
|
229
|
-
isRecurring: boolean;
|
|
230
103
|
date: string;
|
|
231
104
|
datetime?: string | null | undefined;
|
|
232
105
|
timezone?: string | null | undefined;
|
|
@@ -240,7 +113,6 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
240
113
|
dayOrder: number;
|
|
241
114
|
isCollapsed: boolean;
|
|
242
115
|
}, {
|
|
243
|
-
labels: string[];
|
|
244
116
|
id: string;
|
|
245
117
|
userId: string;
|
|
246
118
|
projectId: string;
|
|
@@ -249,6 +121,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
249
121
|
addedByUid: string | null;
|
|
250
122
|
assignedByUid: string | null;
|
|
251
123
|
responsibleUid: string | null;
|
|
124
|
+
labels: string[];
|
|
252
125
|
deadline: {
|
|
253
126
|
date: string;
|
|
254
127
|
lang: string;
|
|
@@ -263,8 +136,8 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
263
136
|
completedAt: string | null;
|
|
264
137
|
updatedAt: string | null;
|
|
265
138
|
due: {
|
|
266
|
-
string: string;
|
|
267
139
|
isRecurring: boolean;
|
|
140
|
+
string: string;
|
|
268
141
|
date: string;
|
|
269
142
|
datetime?: string | null | undefined;
|
|
270
143
|
timezone?: string | null | undefined;
|
|
@@ -277,13 +150,12 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
277
150
|
noteCount: number;
|
|
278
151
|
dayOrder: number;
|
|
279
152
|
isCollapsed: boolean;
|
|
280
|
-
}
|
|
153
|
+
}>>;
|
|
281
154
|
/**
|
|
282
155
|
* Represents a task in Todoist.
|
|
283
156
|
* @see https://todoist.com/api/v1/docs#tag/Tasks
|
|
284
157
|
*/
|
|
285
|
-
export
|
|
286
|
-
}
|
|
158
|
+
export type Task = z.infer<typeof TaskSchema>;
|
|
287
159
|
/**
|
|
288
160
|
* Base schema for all project types in Todoist.
|
|
289
161
|
* Contains common fields shared between personal and workspace projects.
|
|
@@ -305,45 +177,11 @@ export declare const BaseProjectSchema: z.ZodObject<{
|
|
|
305
177
|
description: z.ZodString;
|
|
306
178
|
isCollapsed: z.ZodBoolean;
|
|
307
179
|
isShared: z.ZodBoolean;
|
|
308
|
-
},
|
|
309
|
-
id: string;
|
|
310
|
-
isDeleted: boolean;
|
|
311
|
-
updatedAt: string | null;
|
|
312
|
-
childOrder: number;
|
|
313
|
-
description: string;
|
|
314
|
-
isCollapsed: boolean;
|
|
315
|
-
canAssignTasks: boolean;
|
|
316
|
-
color: string;
|
|
317
|
-
createdAt: string | null;
|
|
318
|
-
isArchived: boolean;
|
|
319
|
-
isFavorite: boolean;
|
|
320
|
-
isFrozen: boolean;
|
|
321
|
-
name: string;
|
|
322
|
-
viewStyle: string;
|
|
323
|
-
defaultOrder: number;
|
|
324
|
-
isShared: boolean;
|
|
325
|
-
}, {
|
|
326
|
-
id: string;
|
|
327
|
-
isDeleted: boolean;
|
|
328
|
-
updatedAt: string | null;
|
|
329
|
-
childOrder: number;
|
|
330
|
-
description: string;
|
|
331
|
-
isCollapsed: boolean;
|
|
332
|
-
canAssignTasks: boolean;
|
|
333
|
-
color: string;
|
|
334
|
-
createdAt: string | null;
|
|
335
|
-
isArchived: boolean;
|
|
336
|
-
isFavorite: boolean;
|
|
337
|
-
isFrozen: boolean;
|
|
338
|
-
name: string;
|
|
339
|
-
viewStyle: string;
|
|
340
|
-
defaultOrder: number;
|
|
341
|
-
isShared: boolean;
|
|
342
|
-
}>;
|
|
180
|
+
}, z.core.$strip>;
|
|
343
181
|
/**
|
|
344
182
|
* Schema for personal projects in Todoist.
|
|
345
183
|
*/
|
|
346
|
-
export declare const PersonalProjectSchema: z.
|
|
184
|
+
export declare const PersonalProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
347
185
|
id: z.ZodString;
|
|
348
186
|
canAssignTasks: z.ZodBoolean;
|
|
349
187
|
childOrder: z.ZodNumber;
|
|
@@ -360,91 +198,52 @@ export declare const PersonalProjectSchema: z.ZodEffects<z.ZodObject<z.objectUti
|
|
|
360
198
|
description: z.ZodString;
|
|
361
199
|
isCollapsed: z.ZodBoolean;
|
|
362
200
|
isShared: z.ZodBoolean;
|
|
363
|
-
}, {
|
|
364
201
|
parentId: z.ZodNullable<z.ZodString>;
|
|
365
202
|
inboxProject: z.ZodBoolean;
|
|
366
|
-
}
|
|
203
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
204
|
+
url: string;
|
|
367
205
|
id: string;
|
|
368
|
-
parentId: string | null;
|
|
369
|
-
isDeleted: boolean;
|
|
370
|
-
updatedAt: string | null;
|
|
371
|
-
childOrder: number;
|
|
372
|
-
description: string;
|
|
373
|
-
isCollapsed: boolean;
|
|
374
206
|
canAssignTasks: boolean;
|
|
375
|
-
color: string;
|
|
376
|
-
createdAt: string | null;
|
|
377
|
-
isArchived: boolean;
|
|
378
|
-
isFavorite: boolean;
|
|
379
|
-
isFrozen: boolean;
|
|
380
|
-
name: string;
|
|
381
|
-
viewStyle: string;
|
|
382
|
-
defaultOrder: number;
|
|
383
|
-
isShared: boolean;
|
|
384
|
-
inboxProject: boolean;
|
|
385
|
-
}, {
|
|
386
|
-
id: string;
|
|
387
|
-
parentId: string | null;
|
|
388
|
-
isDeleted: boolean;
|
|
389
|
-
updatedAt: string | null;
|
|
390
207
|
childOrder: number;
|
|
391
|
-
description: string;
|
|
392
|
-
isCollapsed: boolean;
|
|
393
|
-
canAssignTasks: boolean;
|
|
394
208
|
color: string;
|
|
395
209
|
createdAt: string | null;
|
|
396
210
|
isArchived: boolean;
|
|
211
|
+
isDeleted: boolean;
|
|
397
212
|
isFavorite: boolean;
|
|
398
213
|
isFrozen: boolean;
|
|
399
214
|
name: string;
|
|
215
|
+
updatedAt: string | null;
|
|
400
216
|
viewStyle: string;
|
|
401
217
|
defaultOrder: number;
|
|
402
|
-
isShared: boolean;
|
|
403
|
-
inboxProject: boolean;
|
|
404
|
-
}>, {
|
|
405
|
-
url: string;
|
|
406
|
-
id: string;
|
|
407
|
-
parentId: string | null;
|
|
408
|
-
isDeleted: boolean;
|
|
409
|
-
updatedAt: string | null;
|
|
410
|
-
childOrder: number;
|
|
411
218
|
description: string;
|
|
412
219
|
isCollapsed: boolean;
|
|
413
|
-
canAssignTasks: boolean;
|
|
414
|
-
color: string;
|
|
415
|
-
createdAt: string | null;
|
|
416
|
-
isArchived: boolean;
|
|
417
|
-
isFavorite: boolean;
|
|
418
|
-
isFrozen: boolean;
|
|
419
|
-
name: string;
|
|
420
|
-
viewStyle: string;
|
|
421
|
-
defaultOrder: number;
|
|
422
220
|
isShared: boolean;
|
|
221
|
+
parentId: string | null;
|
|
423
222
|
inboxProject: boolean;
|
|
424
223
|
}, {
|
|
425
224
|
id: string;
|
|
426
|
-
parentId: string | null;
|
|
427
|
-
isDeleted: boolean;
|
|
428
|
-
updatedAt: string | null;
|
|
429
|
-
childOrder: number;
|
|
430
|
-
description: string;
|
|
431
|
-
isCollapsed: boolean;
|
|
432
225
|
canAssignTasks: boolean;
|
|
226
|
+
childOrder: number;
|
|
433
227
|
color: string;
|
|
434
228
|
createdAt: string | null;
|
|
435
229
|
isArchived: boolean;
|
|
230
|
+
isDeleted: boolean;
|
|
436
231
|
isFavorite: boolean;
|
|
437
232
|
isFrozen: boolean;
|
|
438
233
|
name: string;
|
|
234
|
+
updatedAt: string | null;
|
|
439
235
|
viewStyle: string;
|
|
440
236
|
defaultOrder: number;
|
|
237
|
+
description: string;
|
|
238
|
+
isCollapsed: boolean;
|
|
441
239
|
isShared: boolean;
|
|
240
|
+
parentId: string | null;
|
|
442
241
|
inboxProject: boolean;
|
|
443
|
-
}
|
|
242
|
+
}>>;
|
|
444
243
|
/**
|
|
445
244
|
* Schema for workspace projects in Todoist.
|
|
446
245
|
*/
|
|
447
|
-
export declare const WorkspaceProjectSchema: z.
|
|
246
|
+
export declare const WorkspaceProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
448
247
|
id: z.ZodString;
|
|
449
248
|
canAssignTasks: z.ZodBoolean;
|
|
450
249
|
childOrder: z.ZodNumber;
|
|
@@ -461,7 +260,6 @@ export declare const WorkspaceProjectSchema: z.ZodEffects<z.ZodObject<z.objectUt
|
|
|
461
260
|
description: z.ZodString;
|
|
462
261
|
isCollapsed: z.ZodBoolean;
|
|
463
262
|
isShared: z.ZodBoolean;
|
|
464
|
-
}, {
|
|
465
263
|
collaboratorRoleDefault: z.ZodString;
|
|
466
264
|
folderId: z.ZodNullable<z.ZodString>;
|
|
467
265
|
isInviteOnly: z.ZodNullable<z.ZodBoolean>;
|
|
@@ -469,448 +267,214 @@ export declare const WorkspaceProjectSchema: z.ZodEffects<z.ZodObject<z.objectUt
|
|
|
469
267
|
role: z.ZodNullable<z.ZodString>;
|
|
470
268
|
status: z.ZodString;
|
|
471
269
|
workspaceId: z.ZodString;
|
|
472
|
-
}
|
|
473
|
-
|
|
270
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
271
|
+
url: string;
|
|
474
272
|
id: string;
|
|
475
|
-
isDeleted: boolean;
|
|
476
|
-
updatedAt: string | null;
|
|
477
|
-
childOrder: number;
|
|
478
|
-
description: string;
|
|
479
|
-
isCollapsed: boolean;
|
|
480
273
|
canAssignTasks: boolean;
|
|
274
|
+
childOrder: number;
|
|
481
275
|
color: string;
|
|
482
276
|
createdAt: string | null;
|
|
483
277
|
isArchived: boolean;
|
|
278
|
+
isDeleted: boolean;
|
|
484
279
|
isFavorite: boolean;
|
|
485
280
|
isFrozen: boolean;
|
|
486
281
|
name: string;
|
|
282
|
+
updatedAt: string | null;
|
|
487
283
|
viewStyle: string;
|
|
488
284
|
defaultOrder: number;
|
|
285
|
+
description: string;
|
|
286
|
+
isCollapsed: boolean;
|
|
489
287
|
isShared: boolean;
|
|
490
288
|
collaboratorRoleDefault: string;
|
|
491
289
|
folderId: string | null;
|
|
492
290
|
isInviteOnly: boolean | null;
|
|
493
291
|
isLinkSharingEnabled: boolean;
|
|
494
292
|
role: string | null;
|
|
293
|
+
status: string;
|
|
495
294
|
workspaceId: string;
|
|
496
295
|
}, {
|
|
497
|
-
status: string;
|
|
498
296
|
id: string;
|
|
499
|
-
isDeleted: boolean;
|
|
500
|
-
updatedAt: string | null;
|
|
501
|
-
childOrder: number;
|
|
502
|
-
description: string;
|
|
503
|
-
isCollapsed: boolean;
|
|
504
297
|
canAssignTasks: boolean;
|
|
298
|
+
childOrder: number;
|
|
505
299
|
color: string;
|
|
506
300
|
createdAt: string | null;
|
|
507
301
|
isArchived: boolean;
|
|
302
|
+
isDeleted: boolean;
|
|
508
303
|
isFavorite: boolean;
|
|
509
304
|
isFrozen: boolean;
|
|
510
305
|
name: string;
|
|
306
|
+
updatedAt: string | null;
|
|
511
307
|
viewStyle: string;
|
|
512
308
|
defaultOrder: number;
|
|
309
|
+
description: string;
|
|
310
|
+
isCollapsed: boolean;
|
|
513
311
|
isShared: boolean;
|
|
514
312
|
collaboratorRoleDefault: string;
|
|
515
313
|
folderId: string | null;
|
|
516
314
|
isInviteOnly: boolean | null;
|
|
517
315
|
isLinkSharingEnabled: boolean;
|
|
518
316
|
role: string | null;
|
|
317
|
+
status: string;
|
|
519
318
|
workspaceId: string;
|
|
520
|
-
}
|
|
319
|
+
}>>;
|
|
320
|
+
/**
|
|
321
|
+
* Represents a personal project in Todoist.
|
|
322
|
+
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
323
|
+
*/
|
|
324
|
+
export type PersonalProject = z.infer<typeof PersonalProjectSchema>;
|
|
325
|
+
/**
|
|
326
|
+
* Represents a workspace project in Todoist.
|
|
327
|
+
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
328
|
+
*/
|
|
329
|
+
export type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
330
|
+
/**
|
|
331
|
+
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
332
|
+
*/
|
|
333
|
+
export type ProjectViewStyle = 'list' | 'board' | 'calendar';
|
|
334
|
+
export declare const SectionSchema: z.ZodPipe<z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
userId: z.ZodString;
|
|
337
|
+
projectId: z.ZodString;
|
|
338
|
+
addedAt: z.ZodString;
|
|
339
|
+
updatedAt: z.ZodString;
|
|
340
|
+
archivedAt: z.ZodNullable<z.ZodString>;
|
|
341
|
+
name: z.ZodString;
|
|
342
|
+
sectionOrder: z.ZodNumber;
|
|
343
|
+
isArchived: z.ZodBoolean;
|
|
344
|
+
isDeleted: z.ZodBoolean;
|
|
345
|
+
isCollapsed: z.ZodBoolean;
|
|
346
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
521
347
|
url: string;
|
|
522
|
-
status: string;
|
|
523
348
|
id: string;
|
|
349
|
+
userId: string;
|
|
350
|
+
projectId: string;
|
|
351
|
+
addedAt: string;
|
|
352
|
+
updatedAt: string;
|
|
353
|
+
archivedAt: string | null;
|
|
354
|
+
name: string;
|
|
355
|
+
sectionOrder: number;
|
|
356
|
+
isArchived: boolean;
|
|
524
357
|
isDeleted: boolean;
|
|
525
|
-
updatedAt: string | null;
|
|
526
|
-
childOrder: number;
|
|
527
|
-
description: string;
|
|
528
358
|
isCollapsed: boolean;
|
|
529
|
-
canAssignTasks: boolean;
|
|
530
|
-
color: string;
|
|
531
|
-
createdAt: string | null;
|
|
532
|
-
isArchived: boolean;
|
|
533
|
-
isFavorite: boolean;
|
|
534
|
-
isFrozen: boolean;
|
|
535
|
-
name: string;
|
|
536
|
-
viewStyle: string;
|
|
537
|
-
defaultOrder: number;
|
|
538
|
-
isShared: boolean;
|
|
539
|
-
collaboratorRoleDefault: string;
|
|
540
|
-
folderId: string | null;
|
|
541
|
-
isInviteOnly: boolean | null;
|
|
542
|
-
isLinkSharingEnabled: boolean;
|
|
543
|
-
role: string | null;
|
|
544
|
-
workspaceId: string;
|
|
545
359
|
}, {
|
|
546
|
-
status: string;
|
|
547
|
-
id: string;
|
|
548
|
-
isDeleted: boolean;
|
|
549
|
-
updatedAt: string | null;
|
|
550
|
-
childOrder: number;
|
|
551
|
-
description: string;
|
|
552
|
-
isCollapsed: boolean;
|
|
553
|
-
canAssignTasks: boolean;
|
|
554
|
-
color: string;
|
|
555
|
-
createdAt: string | null;
|
|
556
|
-
isArchived: boolean;
|
|
557
|
-
isFavorite: boolean;
|
|
558
|
-
isFrozen: boolean;
|
|
559
|
-
name: string;
|
|
560
|
-
viewStyle: string;
|
|
561
|
-
defaultOrder: number;
|
|
562
|
-
isShared: boolean;
|
|
563
|
-
collaboratorRoleDefault: string;
|
|
564
|
-
folderId: string | null;
|
|
565
|
-
isInviteOnly: boolean | null;
|
|
566
|
-
isLinkSharingEnabled: boolean;
|
|
567
|
-
role: string | null;
|
|
568
|
-
workspaceId: string;
|
|
569
|
-
}>;
|
|
570
|
-
/**
|
|
571
|
-
* Represents a personal project in Todoist.
|
|
572
|
-
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
573
|
-
*/
|
|
574
|
-
export interface PersonalProject extends z.infer<typeof PersonalProjectSchema> {
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* Represents a workspace project in Todoist.
|
|
578
|
-
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
579
|
-
*/
|
|
580
|
-
export interface WorkspaceProject extends z.infer<typeof WorkspaceProjectSchema> {
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* @see https://todoist.com/api/v1/docs#tag/Projects
|
|
584
|
-
*/
|
|
585
|
-
export type ProjectViewStyle = 'list' | 'board' | 'calendar';
|
|
586
|
-
export declare const SectionSchema: z.ZodObject<{
|
|
587
|
-
id: z.ZodString;
|
|
588
|
-
userId: z.ZodString;
|
|
589
|
-
projectId: z.ZodString;
|
|
590
|
-
addedAt: z.ZodString;
|
|
591
|
-
updatedAt: z.ZodString;
|
|
592
|
-
archivedAt: z.ZodNullable<z.ZodString>;
|
|
593
|
-
name: z.ZodString;
|
|
594
|
-
sectionOrder: z.ZodNumber;
|
|
595
|
-
isArchived: z.ZodBoolean;
|
|
596
|
-
isDeleted: z.ZodBoolean;
|
|
597
|
-
isCollapsed: z.ZodBoolean;
|
|
598
|
-
}, "strip", z.ZodTypeAny, {
|
|
599
360
|
id: string;
|
|
600
361
|
userId: string;
|
|
601
362
|
projectId: string;
|
|
602
|
-
isDeleted: boolean;
|
|
603
363
|
addedAt: string;
|
|
604
364
|
updatedAt: string;
|
|
605
|
-
isCollapsed: boolean;
|
|
606
|
-
isArchived: boolean;
|
|
607
|
-
name: string;
|
|
608
365
|
archivedAt: string | null;
|
|
366
|
+
name: string;
|
|
609
367
|
sectionOrder: number;
|
|
610
|
-
|
|
611
|
-
id: string;
|
|
612
|
-
userId: string;
|
|
613
|
-
projectId: string;
|
|
368
|
+
isArchived: boolean;
|
|
614
369
|
isDeleted: boolean;
|
|
615
|
-
addedAt: string;
|
|
616
|
-
updatedAt: string;
|
|
617
370
|
isCollapsed: boolean;
|
|
618
|
-
|
|
619
|
-
name: string;
|
|
620
|
-
archivedAt: string | null;
|
|
621
|
-
sectionOrder: number;
|
|
622
|
-
}>;
|
|
371
|
+
}>>;
|
|
623
372
|
/**
|
|
624
373
|
* Represents a section in a Todoist project.
|
|
625
374
|
* @see https://todoist.com/api/v1/docs#tag/Sections
|
|
626
375
|
*/
|
|
627
|
-
export
|
|
628
|
-
}
|
|
376
|
+
export type Section = z.infer<typeof SectionSchema>;
|
|
629
377
|
export declare const LabelSchema: z.ZodObject<{
|
|
630
378
|
id: z.ZodString;
|
|
631
379
|
order: z.ZodNullable<z.ZodNumber>;
|
|
632
380
|
name: z.ZodString;
|
|
633
381
|
color: z.ZodString;
|
|
634
382
|
isFavorite: z.ZodBoolean;
|
|
635
|
-
},
|
|
636
|
-
id: string;
|
|
637
|
-
color: string;
|
|
638
|
-
isFavorite: boolean;
|
|
639
|
-
name: string;
|
|
640
|
-
order: number | null;
|
|
641
|
-
}, {
|
|
642
|
-
id: string;
|
|
643
|
-
color: string;
|
|
644
|
-
isFavorite: boolean;
|
|
645
|
-
name: string;
|
|
646
|
-
order: number | null;
|
|
647
|
-
}>;
|
|
383
|
+
}, z.core.$strip>;
|
|
648
384
|
/**
|
|
649
385
|
* Represents a label in Todoist.
|
|
650
386
|
* @see https://todoist.com/api/v1/docs#tag/Labels
|
|
651
387
|
*/
|
|
652
|
-
export
|
|
653
|
-
|
|
654
|
-
export declare const AttachmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
388
|
+
export type Label = z.infer<typeof LabelSchema>;
|
|
389
|
+
export declare const AttachmentSchema: z.ZodObject<{
|
|
655
390
|
resourceType: z.ZodString;
|
|
656
|
-
}, {
|
|
657
391
|
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
658
392
|
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
659
393
|
fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
660
394
|
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
661
395
|
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
662
|
-
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<
|
|
396
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
397
|
+
pending: "pending";
|
|
398
|
+
completed: "completed";
|
|
399
|
+
}>>>;
|
|
663
400
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
664
401
|
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
665
402
|
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
666
403
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
667
404
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
668
|
-
}
|
|
669
|
-
resourceType: string;
|
|
670
|
-
url?: string | null | undefined;
|
|
671
|
-
fileName?: string | null | undefined;
|
|
672
|
-
fileSize?: number | null | undefined;
|
|
673
|
-
fileType?: string | null | undefined;
|
|
674
|
-
fileUrl?: string | null | undefined;
|
|
675
|
-
fileDuration?: number | null | undefined;
|
|
676
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
677
|
-
image?: string | null | undefined;
|
|
678
|
-
imageWidth?: number | null | undefined;
|
|
679
|
-
imageHeight?: number | null | undefined;
|
|
680
|
-
title?: string | null | undefined;
|
|
681
|
-
}, {
|
|
682
|
-
resourceType: string;
|
|
683
|
-
url?: string | null | undefined;
|
|
684
|
-
fileName?: string | null | undefined;
|
|
685
|
-
fileSize?: number | null | undefined;
|
|
686
|
-
fileType?: string | null | undefined;
|
|
687
|
-
fileUrl?: string | null | undefined;
|
|
688
|
-
fileDuration?: number | null | undefined;
|
|
689
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
690
|
-
image?: string | null | undefined;
|
|
691
|
-
imageWidth?: number | null | undefined;
|
|
692
|
-
imageHeight?: number | null | undefined;
|
|
693
|
-
title?: string | null | undefined;
|
|
694
|
-
}>;
|
|
405
|
+
}, z.core.$strip>;
|
|
695
406
|
/**
|
|
696
407
|
* Represents a file attachment in a comment.
|
|
697
408
|
* @see https://todoist.com/api/v1/docs#tag/Sync/Comments/File-Attachments
|
|
698
409
|
*/
|
|
699
|
-
export
|
|
700
|
-
|
|
701
|
-
export declare const RawCommentSchema: z.ZodEffects<z.ZodObject<{
|
|
410
|
+
export type Attachment = z.infer<typeof AttachmentSchema>;
|
|
411
|
+
export declare const RawCommentSchema: z.ZodObject<{
|
|
702
412
|
id: z.ZodString;
|
|
703
413
|
itemId: z.ZodOptional<z.ZodString>;
|
|
704
414
|
projectId: z.ZodOptional<z.ZodString>;
|
|
705
415
|
content: z.ZodString;
|
|
706
416
|
postedAt: z.ZodString;
|
|
707
|
-
fileAttachment: z.ZodNullable<z.ZodObject<
|
|
417
|
+
fileAttachment: z.ZodNullable<z.ZodObject<{
|
|
708
418
|
resourceType: z.ZodString;
|
|
709
|
-
}, {
|
|
710
419
|
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
711
420
|
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
712
421
|
fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
422
|
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
714
423
|
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
715
|
-
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<
|
|
424
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
425
|
+
pending: "pending";
|
|
426
|
+
completed: "completed";
|
|
427
|
+
}>>>;
|
|
716
428
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
717
429
|
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
718
430
|
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
719
431
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
720
432
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
721
|
-
}
|
|
722
|
-
resourceType: string;
|
|
723
|
-
url?: string | null | undefined;
|
|
724
|
-
fileName?: string | null | undefined;
|
|
725
|
-
fileSize?: number | null | undefined;
|
|
726
|
-
fileType?: string | null | undefined;
|
|
727
|
-
fileUrl?: string | null | undefined;
|
|
728
|
-
fileDuration?: number | null | undefined;
|
|
729
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
730
|
-
image?: string | null | undefined;
|
|
731
|
-
imageWidth?: number | null | undefined;
|
|
732
|
-
imageHeight?: number | null | undefined;
|
|
733
|
-
title?: string | null | undefined;
|
|
734
|
-
}, {
|
|
735
|
-
resourceType: string;
|
|
736
|
-
url?: string | null | undefined;
|
|
737
|
-
fileName?: string | null | undefined;
|
|
738
|
-
fileSize?: number | null | undefined;
|
|
739
|
-
fileType?: string | null | undefined;
|
|
740
|
-
fileUrl?: string | null | undefined;
|
|
741
|
-
fileDuration?: number | null | undefined;
|
|
742
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
743
|
-
image?: string | null | undefined;
|
|
744
|
-
imageWidth?: number | null | undefined;
|
|
745
|
-
imageHeight?: number | null | undefined;
|
|
746
|
-
title?: string | null | undefined;
|
|
747
|
-
}>>;
|
|
433
|
+
}, z.core.$strip>>;
|
|
748
434
|
postedUid: z.ZodString;
|
|
749
|
-
uidsToNotify: z.ZodNullable<z.ZodArray<z.ZodString
|
|
750
|
-
reactions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
435
|
+
uidsToNotify: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
436
|
+
reactions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
751
437
|
isDeleted: z.ZodBoolean;
|
|
752
|
-
},
|
|
753
|
-
id: string;
|
|
754
|
-
isDeleted: boolean;
|
|
755
|
-
content: string;
|
|
756
|
-
postedAt: string;
|
|
757
|
-
fileAttachment: {
|
|
758
|
-
resourceType: string;
|
|
759
|
-
url?: string | null | undefined;
|
|
760
|
-
fileName?: string | null | undefined;
|
|
761
|
-
fileSize?: number | null | undefined;
|
|
762
|
-
fileType?: string | null | undefined;
|
|
763
|
-
fileUrl?: string | null | undefined;
|
|
764
|
-
fileDuration?: number | null | undefined;
|
|
765
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
766
|
-
image?: string | null | undefined;
|
|
767
|
-
imageWidth?: number | null | undefined;
|
|
768
|
-
imageHeight?: number | null | undefined;
|
|
769
|
-
title?: string | null | undefined;
|
|
770
|
-
} | null;
|
|
771
|
-
postedUid: string;
|
|
772
|
-
uidsToNotify: string[] | null;
|
|
773
|
-
reactions: Record<string, string[]> | null;
|
|
774
|
-
projectId?: string | undefined;
|
|
775
|
-
itemId?: string | undefined;
|
|
776
|
-
}, {
|
|
777
|
-
id: string;
|
|
778
|
-
isDeleted: boolean;
|
|
779
|
-
content: string;
|
|
780
|
-
postedAt: string;
|
|
781
|
-
fileAttachment: {
|
|
782
|
-
resourceType: string;
|
|
783
|
-
url?: string | null | undefined;
|
|
784
|
-
fileName?: string | null | undefined;
|
|
785
|
-
fileSize?: number | null | undefined;
|
|
786
|
-
fileType?: string | null | undefined;
|
|
787
|
-
fileUrl?: string | null | undefined;
|
|
788
|
-
fileDuration?: number | null | undefined;
|
|
789
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
790
|
-
image?: string | null | undefined;
|
|
791
|
-
imageWidth?: number | null | undefined;
|
|
792
|
-
imageHeight?: number | null | undefined;
|
|
793
|
-
title?: string | null | undefined;
|
|
794
|
-
} | null;
|
|
795
|
-
postedUid: string;
|
|
796
|
-
uidsToNotify: string[] | null;
|
|
797
|
-
reactions: Record<string, string[]> | null;
|
|
798
|
-
projectId?: string | undefined;
|
|
799
|
-
itemId?: string | undefined;
|
|
800
|
-
}>, {
|
|
801
|
-
id: string;
|
|
802
|
-
isDeleted: boolean;
|
|
803
|
-
content: string;
|
|
804
|
-
postedAt: string;
|
|
805
|
-
fileAttachment: {
|
|
806
|
-
resourceType: string;
|
|
807
|
-
url?: string | null | undefined;
|
|
808
|
-
fileName?: string | null | undefined;
|
|
809
|
-
fileSize?: number | null | undefined;
|
|
810
|
-
fileType?: string | null | undefined;
|
|
811
|
-
fileUrl?: string | null | undefined;
|
|
812
|
-
fileDuration?: number | null | undefined;
|
|
813
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
814
|
-
image?: string | null | undefined;
|
|
815
|
-
imageWidth?: number | null | undefined;
|
|
816
|
-
imageHeight?: number | null | undefined;
|
|
817
|
-
title?: string | null | undefined;
|
|
818
|
-
} | null;
|
|
819
|
-
postedUid: string;
|
|
820
|
-
uidsToNotify: string[] | null;
|
|
821
|
-
reactions: Record<string, string[]> | null;
|
|
822
|
-
projectId?: string | undefined;
|
|
823
|
-
itemId?: string | undefined;
|
|
824
|
-
}, {
|
|
825
|
-
id: string;
|
|
826
|
-
isDeleted: boolean;
|
|
827
|
-
content: string;
|
|
828
|
-
postedAt: string;
|
|
829
|
-
fileAttachment: {
|
|
830
|
-
resourceType: string;
|
|
831
|
-
url?: string | null | undefined;
|
|
832
|
-
fileName?: string | null | undefined;
|
|
833
|
-
fileSize?: number | null | undefined;
|
|
834
|
-
fileType?: string | null | undefined;
|
|
835
|
-
fileUrl?: string | null | undefined;
|
|
836
|
-
fileDuration?: number | null | undefined;
|
|
837
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
838
|
-
image?: string | null | undefined;
|
|
839
|
-
imageWidth?: number | null | undefined;
|
|
840
|
-
imageHeight?: number | null | undefined;
|
|
841
|
-
title?: string | null | undefined;
|
|
842
|
-
} | null;
|
|
843
|
-
postedUid: string;
|
|
844
|
-
uidsToNotify: string[] | null;
|
|
845
|
-
reactions: Record<string, string[]> | null;
|
|
846
|
-
projectId?: string | undefined;
|
|
847
|
-
itemId?: string | undefined;
|
|
848
|
-
}>;
|
|
438
|
+
}, z.core.$strip>;
|
|
849
439
|
/**
|
|
850
440
|
* Represents a raw comment response from the API.
|
|
851
441
|
* @see https://todoist.com/api/v1/docs#tag/Comments
|
|
852
442
|
*/
|
|
853
|
-
export
|
|
854
|
-
|
|
855
|
-
export declare const CommentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
443
|
+
export type RawComment = z.infer<typeof RawCommentSchema>;
|
|
444
|
+
export declare const CommentSchema: z.ZodPipe<z.ZodObject<{
|
|
856
445
|
id: z.ZodString;
|
|
857
446
|
itemId: z.ZodOptional<z.ZodString>;
|
|
858
447
|
projectId: z.ZodOptional<z.ZodString>;
|
|
859
448
|
content: z.ZodString;
|
|
860
449
|
postedAt: z.ZodString;
|
|
861
|
-
fileAttachment: z.ZodNullable<z.ZodObject<
|
|
450
|
+
fileAttachment: z.ZodNullable<z.ZodObject<{
|
|
862
451
|
resourceType: z.ZodString;
|
|
863
|
-
}, {
|
|
864
452
|
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
865
453
|
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
866
454
|
fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
867
455
|
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
868
456
|
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
869
|
-
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<
|
|
457
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
458
|
+
pending: "pending";
|
|
459
|
+
completed: "completed";
|
|
460
|
+
}>>>;
|
|
870
461
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
871
462
|
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
872
463
|
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
873
464
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
874
465
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
875
|
-
}
|
|
876
|
-
resourceType: string;
|
|
877
|
-
url?: string | null | undefined;
|
|
878
|
-
fileName?: string | null | undefined;
|
|
879
|
-
fileSize?: number | null | undefined;
|
|
880
|
-
fileType?: string | null | undefined;
|
|
881
|
-
fileUrl?: string | null | undefined;
|
|
882
|
-
fileDuration?: number | null | undefined;
|
|
883
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
884
|
-
image?: string | null | undefined;
|
|
885
|
-
imageWidth?: number | null | undefined;
|
|
886
|
-
imageHeight?: number | null | undefined;
|
|
887
|
-
title?: string | null | undefined;
|
|
888
|
-
}, {
|
|
889
|
-
resourceType: string;
|
|
890
|
-
url?: string | null | undefined;
|
|
891
|
-
fileName?: string | null | undefined;
|
|
892
|
-
fileSize?: number | null | undefined;
|
|
893
|
-
fileType?: string | null | undefined;
|
|
894
|
-
fileUrl?: string | null | undefined;
|
|
895
|
-
fileDuration?: number | null | undefined;
|
|
896
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
897
|
-
image?: string | null | undefined;
|
|
898
|
-
imageWidth?: number | null | undefined;
|
|
899
|
-
imageHeight?: number | null | undefined;
|
|
900
|
-
title?: string | null | undefined;
|
|
901
|
-
}>>;
|
|
466
|
+
}, z.core.$strip>>;
|
|
902
467
|
postedUid: z.ZodString;
|
|
903
|
-
uidsToNotify: z.ZodNullable<z.ZodArray<z.ZodString
|
|
904
|
-
reactions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
468
|
+
uidsToNotify: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
469
|
+
reactions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
905
470
|
isDeleted: z.ZodBoolean;
|
|
906
|
-
},
|
|
471
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
472
|
+
taskId: string | undefined;
|
|
907
473
|
id: string;
|
|
908
|
-
isDeleted: boolean;
|
|
909
474
|
content: string;
|
|
910
475
|
postedAt: string;
|
|
911
476
|
fileAttachment: {
|
|
912
477
|
resourceType: string;
|
|
913
|
-
url?: string | null | undefined;
|
|
914
478
|
fileName?: string | null | undefined;
|
|
915
479
|
fileSize?: number | null | undefined;
|
|
916
480
|
fileType?: string | null | undefined;
|
|
@@ -920,69 +484,20 @@ export declare const CommentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
920
484
|
image?: string | null | undefined;
|
|
921
485
|
imageWidth?: number | null | undefined;
|
|
922
486
|
imageHeight?: number | null | undefined;
|
|
923
|
-
title?: string | null | undefined;
|
|
924
|
-
} | null;
|
|
925
|
-
postedUid: string;
|
|
926
|
-
uidsToNotify: string[] | null;
|
|
927
|
-
reactions: Record<string, string[]> | null;
|
|
928
|
-
projectId?: string | undefined;
|
|
929
|
-
itemId?: string | undefined;
|
|
930
|
-
}, {
|
|
931
|
-
id: string;
|
|
932
|
-
isDeleted: boolean;
|
|
933
|
-
content: string;
|
|
934
|
-
postedAt: string;
|
|
935
|
-
fileAttachment: {
|
|
936
|
-
resourceType: string;
|
|
937
487
|
url?: string | null | undefined;
|
|
938
|
-
fileName?: string | null | undefined;
|
|
939
|
-
fileSize?: number | null | undefined;
|
|
940
|
-
fileType?: string | null | undefined;
|
|
941
|
-
fileUrl?: string | null | undefined;
|
|
942
|
-
fileDuration?: number | null | undefined;
|
|
943
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
944
|
-
image?: string | null | undefined;
|
|
945
|
-
imageWidth?: number | null | undefined;
|
|
946
|
-
imageHeight?: number | null | undefined;
|
|
947
488
|
title?: string | null | undefined;
|
|
948
489
|
} | null;
|
|
949
490
|
postedUid: string;
|
|
950
491
|
uidsToNotify: string[] | null;
|
|
951
492
|
reactions: Record<string, string[]> | null;
|
|
952
|
-
projectId?: string | undefined;
|
|
953
|
-
itemId?: string | undefined;
|
|
954
|
-
}>, {
|
|
955
|
-
id: string;
|
|
956
493
|
isDeleted: boolean;
|
|
957
|
-
content: string;
|
|
958
|
-
postedAt: string;
|
|
959
|
-
fileAttachment: {
|
|
960
|
-
resourceType: string;
|
|
961
|
-
url?: string | null | undefined;
|
|
962
|
-
fileName?: string | null | undefined;
|
|
963
|
-
fileSize?: number | null | undefined;
|
|
964
|
-
fileType?: string | null | undefined;
|
|
965
|
-
fileUrl?: string | null | undefined;
|
|
966
|
-
fileDuration?: number | null | undefined;
|
|
967
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
968
|
-
image?: string | null | undefined;
|
|
969
|
-
imageWidth?: number | null | undefined;
|
|
970
|
-
imageHeight?: number | null | undefined;
|
|
971
|
-
title?: string | null | undefined;
|
|
972
|
-
} | null;
|
|
973
|
-
postedUid: string;
|
|
974
|
-
uidsToNotify: string[] | null;
|
|
975
|
-
reactions: Record<string, string[]> | null;
|
|
976
494
|
projectId?: string | undefined;
|
|
977
|
-
itemId?: string | undefined;
|
|
978
495
|
}, {
|
|
979
496
|
id: string;
|
|
980
|
-
isDeleted: boolean;
|
|
981
497
|
content: string;
|
|
982
498
|
postedAt: string;
|
|
983
499
|
fileAttachment: {
|
|
984
500
|
resourceType: string;
|
|
985
|
-
url?: string | null | undefined;
|
|
986
501
|
fileName?: string | null | undefined;
|
|
987
502
|
fileSize?: number | null | undefined;
|
|
988
503
|
fileType?: string | null | undefined;
|
|
@@ -992,120 +507,41 @@ export declare const CommentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
992
507
|
image?: string | null | undefined;
|
|
993
508
|
imageWidth?: number | null | undefined;
|
|
994
509
|
imageHeight?: number | null | undefined;
|
|
995
|
-
title?: string | null | undefined;
|
|
996
|
-
} | null;
|
|
997
|
-
postedUid: string;
|
|
998
|
-
uidsToNotify: string[] | null;
|
|
999
|
-
reactions: Record<string, string[]> | null;
|
|
1000
|
-
projectId?: string | undefined;
|
|
1001
|
-
itemId?: string | undefined;
|
|
1002
|
-
}>, {
|
|
1003
|
-
taskId: string | undefined;
|
|
1004
|
-
id: string;
|
|
1005
|
-
isDeleted: boolean;
|
|
1006
|
-
content: string;
|
|
1007
|
-
postedAt: string;
|
|
1008
|
-
fileAttachment: {
|
|
1009
|
-
resourceType: string;
|
|
1010
510
|
url?: string | null | undefined;
|
|
1011
|
-
fileName?: string | null | undefined;
|
|
1012
|
-
fileSize?: number | null | undefined;
|
|
1013
|
-
fileType?: string | null | undefined;
|
|
1014
|
-
fileUrl?: string | null | undefined;
|
|
1015
|
-
fileDuration?: number | null | undefined;
|
|
1016
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
1017
|
-
image?: string | null | undefined;
|
|
1018
|
-
imageWidth?: number | null | undefined;
|
|
1019
|
-
imageHeight?: number | null | undefined;
|
|
1020
511
|
title?: string | null | undefined;
|
|
1021
512
|
} | null;
|
|
1022
513
|
postedUid: string;
|
|
1023
514
|
uidsToNotify: string[] | null;
|
|
1024
515
|
reactions: Record<string, string[]> | null;
|
|
1025
|
-
projectId?: string | undefined;
|
|
1026
|
-
}, {
|
|
1027
|
-
id: string;
|
|
1028
516
|
isDeleted: boolean;
|
|
1029
|
-
content: string;
|
|
1030
|
-
postedAt: string;
|
|
1031
|
-
fileAttachment: {
|
|
1032
|
-
resourceType: string;
|
|
1033
|
-
url?: string | null | undefined;
|
|
1034
|
-
fileName?: string | null | undefined;
|
|
1035
|
-
fileSize?: number | null | undefined;
|
|
1036
|
-
fileType?: string | null | undefined;
|
|
1037
|
-
fileUrl?: string | null | undefined;
|
|
1038
|
-
fileDuration?: number | null | undefined;
|
|
1039
|
-
uploadState?: "pending" | "completed" | null | undefined;
|
|
1040
|
-
image?: string | null | undefined;
|
|
1041
|
-
imageWidth?: number | null | undefined;
|
|
1042
|
-
imageHeight?: number | null | undefined;
|
|
1043
|
-
title?: string | null | undefined;
|
|
1044
|
-
} | null;
|
|
1045
|
-
postedUid: string;
|
|
1046
|
-
uidsToNotify: string[] | null;
|
|
1047
|
-
reactions: Record<string, string[]> | null;
|
|
1048
|
-
projectId?: string | undefined;
|
|
1049
517
|
itemId?: string | undefined;
|
|
1050
|
-
|
|
518
|
+
projectId?: string | undefined;
|
|
519
|
+
}>>;
|
|
1051
520
|
/**
|
|
1052
521
|
* Represents a comment in Todoist.
|
|
1053
522
|
* @see https://todoist.com/api/v1/docs#tag/Comments
|
|
1054
523
|
*/
|
|
1055
|
-
export
|
|
1056
|
-
}
|
|
524
|
+
export type Comment = z.infer<typeof CommentSchema>;
|
|
1057
525
|
export declare const UserSchema: z.ZodObject<{
|
|
1058
526
|
id: z.ZodString;
|
|
1059
527
|
name: z.ZodString;
|
|
1060
528
|
email: z.ZodString;
|
|
1061
|
-
},
|
|
1062
|
-
id: string;
|
|
1063
|
-
name: string;
|
|
1064
|
-
email: string;
|
|
1065
|
-
}, {
|
|
1066
|
-
id: string;
|
|
1067
|
-
name: string;
|
|
1068
|
-
email: string;
|
|
1069
|
-
}>;
|
|
529
|
+
}, z.core.$strip>;
|
|
1070
530
|
/**
|
|
1071
531
|
* Represents a user in Todoist.
|
|
1072
532
|
* @see https://todoist.com/api/v1/docs#tag/User
|
|
1073
533
|
*/
|
|
1074
|
-
export
|
|
1075
|
-
}
|
|
534
|
+
export type User = z.infer<typeof UserSchema>;
|
|
1076
535
|
export declare const ColorSchema: z.ZodObject<{
|
|
1077
|
-
/** @deprecated No longer used */
|
|
1078
536
|
id: z.ZodNumber;
|
|
1079
|
-
/** The key of the color (i.e. 'berry_red') */
|
|
1080
537
|
key: z.ZodString;
|
|
1081
|
-
/** The display name of the color (i.e. 'Berry Red') */
|
|
1082
538
|
displayName: z.ZodString;
|
|
1083
|
-
/** @deprecated Use {@link Color.displayName} instead */
|
|
1084
539
|
name: z.ZodString;
|
|
1085
|
-
/** The hex value of the color (i.e. '#b8255f') */
|
|
1086
540
|
hexValue: z.ZodString;
|
|
1087
|
-
/**
|
|
1088
|
-
* @deprecated Use {@link Color.hexValue} instead
|
|
1089
|
-
*/
|
|
1090
541
|
value: z.ZodString;
|
|
1091
|
-
},
|
|
1092
|
-
value: string;
|
|
1093
|
-
id: number;
|
|
1094
|
-
name: string;
|
|
1095
|
-
key: string;
|
|
1096
|
-
displayName: string;
|
|
1097
|
-
hexValue: string;
|
|
1098
|
-
}, {
|
|
1099
|
-
value: string;
|
|
1100
|
-
id: number;
|
|
1101
|
-
name: string;
|
|
1102
|
-
key: string;
|
|
1103
|
-
displayName: string;
|
|
1104
|
-
hexValue: string;
|
|
1105
|
-
}>;
|
|
542
|
+
}, z.core.$strip>;
|
|
1106
543
|
/**
|
|
1107
544
|
* Represents a color in Todoist.
|
|
1108
545
|
* @see https://todoist.com/api/v1/docs#tag/Colors
|
|
1109
546
|
*/
|
|
1110
|
-
export
|
|
1111
|
-
}
|
|
547
|
+
export type Color = z.infer<typeof ColorSchema>;
|