@doist/todoist-api-typescript 4.0.0-alpha.1 → 4.0.0-alpha.3
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 +253 -37
- package/dist/TodoistApi.js +319 -25
- package/dist/authentication.d.ts +78 -4
- package/dist/authentication.js +58 -0
- package/dist/consts/endpoints.d.ts +2 -1
- package/dist/consts/endpoints.js +2 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/restClient.d.ts +1 -1
- package/dist/restClient.js +2 -2
- package/dist/testUtils/asserts.d.ts +0 -1
- package/dist/testUtils/asserts.js +1 -65
- package/dist/testUtils/testDefaults.d.ts +2 -2
- package/dist/types/entities.d.ts +477 -178
- package/dist/types/entities.js +107 -88
- package/dist/types/requests.d.ts +170 -24
- package/dist/types/sync.d.ts +21 -0
- package/dist/types/sync.js +2 -0
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/colors.js +14 -0
- package/dist/utils/sanitization.d.ts +29 -0
- package/dist/utils/sanitization.js +29 -0
- package/dist/utils/taskConverters.js +1 -1
- package/dist/utils/validators.d.ts +1 -1
- package/dist/utils/validators.js +7 -7
- package/package.json +10 -10
package/dist/types/entities.d.ts
CHANGED
|
@@ -1,188 +1,487 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DueDateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
isRecurring: z.ZodBoolean;
|
|
4
|
+
string: z.ZodString;
|
|
5
|
+
date: z.ZodString;
|
|
6
|
+
}, {
|
|
7
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
}>, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Represents a due date for a task.
|
|
27
|
+
* @see https://developer.todoist.com/sync/v9/#due-dates
|
|
28
|
+
*/
|
|
29
|
+
export interface DueDate extends z.infer<typeof DueDateSchema> {
|
|
30
|
+
}
|
|
31
|
+
export declare const DurationSchema: z.ZodObject<{
|
|
32
|
+
amount: z.ZodNumber;
|
|
33
|
+
unit: z.ZodEnum<["minute", "day"]>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
amount: number;
|
|
36
|
+
unit: "minute" | "day";
|
|
37
|
+
}, {
|
|
38
|
+
amount: number;
|
|
39
|
+
unit: "minute" | "day";
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Represents the duration of a task.
|
|
43
|
+
* @see https://developer.todoist.com/sync/v9/#deadlines
|
|
44
|
+
*/
|
|
45
|
+
export interface Duration extends z.infer<typeof DurationSchema> {
|
|
46
|
+
}
|
|
47
|
+
export declare const DeadlineSchema: z.ZodObject<{
|
|
48
|
+
date: z.ZodString;
|
|
49
|
+
lang: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
date: string;
|
|
52
|
+
lang: string;
|
|
53
|
+
}, {
|
|
54
|
+
date: string;
|
|
55
|
+
lang: string;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Represents a task deadline.
|
|
59
|
+
*/
|
|
60
|
+
export interface Deadline extends z.infer<typeof DeadlineSchema> {
|
|
61
|
+
}
|
|
62
|
+
export declare const TaskSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
assignerId: z.ZodNullable<z.ZodString>;
|
|
65
|
+
assigneeId: z.ZodNullable<z.ZodString>;
|
|
66
|
+
projectId: z.ZodString;
|
|
67
|
+
sectionId: z.ZodNullable<z.ZodString>;
|
|
68
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
69
|
+
order: z.ZodNumber;
|
|
70
|
+
content: z.ZodString;
|
|
71
|
+
description: z.ZodString;
|
|
72
|
+
isCompleted: z.ZodBoolean;
|
|
73
|
+
labels: z.ZodArray<z.ZodString, "many">;
|
|
74
|
+
priority: z.ZodNumber;
|
|
75
|
+
commentCount: z.ZodNumber;
|
|
76
|
+
creatorId: z.ZodString;
|
|
77
|
+
createdAt: z.ZodString;
|
|
78
|
+
due: z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
|
79
|
+
isRecurring: z.ZodBoolean;
|
|
80
|
+
string: z.ZodString;
|
|
81
|
+
date: z.ZodString;
|
|
82
|
+
}, {
|
|
83
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
}>, "strip", z.ZodTypeAny, {
|
|
87
|
+
string: string;
|
|
88
|
+
isRecurring: boolean;
|
|
89
|
+
date: string;
|
|
90
|
+
datetime?: string | null | undefined;
|
|
91
|
+
timezone?: string | null | undefined;
|
|
92
|
+
lang?: string | null | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
string: string;
|
|
95
|
+
isRecurring: boolean;
|
|
96
|
+
date: string;
|
|
97
|
+
datetime?: string | null | undefined;
|
|
98
|
+
timezone?: string | null | undefined;
|
|
99
|
+
lang?: string | null | undefined;
|
|
100
|
+
}>>;
|
|
101
|
+
url: z.ZodString;
|
|
102
|
+
duration: z.ZodNullable<z.ZodObject<{
|
|
103
|
+
amount: z.ZodNumber;
|
|
104
|
+
unit: z.ZodEnum<["minute", "day"]>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
amount: number;
|
|
107
|
+
unit: "minute" | "day";
|
|
108
|
+
}, {
|
|
109
|
+
amount: number;
|
|
110
|
+
unit: "minute" | "day";
|
|
111
|
+
}>>;
|
|
112
|
+
deadline: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
date: z.ZodString;
|
|
114
|
+
lang: z.ZodString;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
date: string;
|
|
117
|
+
lang: string;
|
|
118
|
+
}, {
|
|
119
|
+
date: string;
|
|
120
|
+
lang: string;
|
|
121
|
+
}>>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
4
123
|
id: string;
|
|
5
|
-
|
|
6
|
-
|
|
124
|
+
assignerId: string | null;
|
|
125
|
+
assigneeId: string | null;
|
|
126
|
+
projectId: string;
|
|
127
|
+
sectionId: string | null;
|
|
128
|
+
parentId: string | null;
|
|
129
|
+
order: number;
|
|
130
|
+
content: string;
|
|
131
|
+
description: string;
|
|
132
|
+
isCompleted: boolean;
|
|
133
|
+
labels: string[];
|
|
134
|
+
priority: number;
|
|
135
|
+
commentCount: number;
|
|
136
|
+
creatorId: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
due: {
|
|
139
|
+
string: string;
|
|
140
|
+
isRecurring: boolean;
|
|
141
|
+
date: string;
|
|
142
|
+
datetime?: string | null | undefined;
|
|
143
|
+
timezone?: string | null | undefined;
|
|
144
|
+
lang?: string | null | undefined;
|
|
145
|
+
} | null;
|
|
146
|
+
url: string;
|
|
147
|
+
duration: {
|
|
148
|
+
amount: number;
|
|
149
|
+
unit: "minute" | "day";
|
|
150
|
+
} | null;
|
|
151
|
+
deadline: {
|
|
152
|
+
date: string;
|
|
153
|
+
lang: string;
|
|
154
|
+
} | null;
|
|
155
|
+
}, {
|
|
156
|
+
id: string;
|
|
157
|
+
assignerId: string | null;
|
|
158
|
+
assigneeId: string | null;
|
|
159
|
+
projectId: string;
|
|
160
|
+
sectionId: string | null;
|
|
161
|
+
parentId: string | null;
|
|
7
162
|
order: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
color:
|
|
73
|
-
name:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
163
|
+
content: string;
|
|
164
|
+
description: string;
|
|
165
|
+
isCompleted: boolean;
|
|
166
|
+
labels: string[];
|
|
167
|
+
priority: number;
|
|
168
|
+
commentCount: number;
|
|
169
|
+
creatorId: string;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
due: {
|
|
172
|
+
string: string;
|
|
173
|
+
isRecurring: boolean;
|
|
174
|
+
date: string;
|
|
175
|
+
datetime?: string | null | undefined;
|
|
176
|
+
timezone?: string | null | undefined;
|
|
177
|
+
lang?: string | null | undefined;
|
|
178
|
+
} | null;
|
|
179
|
+
url: string;
|
|
180
|
+
duration: {
|
|
181
|
+
amount: number;
|
|
182
|
+
unit: "minute" | "day";
|
|
183
|
+
} | null;
|
|
184
|
+
deadline: {
|
|
185
|
+
date: string;
|
|
186
|
+
lang: string;
|
|
187
|
+
} | null;
|
|
188
|
+
}>;
|
|
189
|
+
/**
|
|
190
|
+
* A task is a unit of work. It can be a simple to-do item or a more complex task with subtasks, comments, and attachments.
|
|
191
|
+
* @see https://developer.todoist.com/sync/v9/#items
|
|
192
|
+
*/
|
|
193
|
+
export interface Task extends z.infer<typeof TaskSchema> {
|
|
194
|
+
}
|
|
195
|
+
export declare const ProjectSchema: z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
198
|
+
order: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
color: z.ZodString;
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
commentCount: z.ZodNumber;
|
|
202
|
+
isShared: z.ZodBoolean;
|
|
203
|
+
isFavorite: z.ZodBoolean;
|
|
204
|
+
isInboxProject: z.ZodBoolean;
|
|
205
|
+
isTeamInbox: z.ZodBoolean;
|
|
206
|
+
url: z.ZodString;
|
|
207
|
+
viewStyle: z.ZodString;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
id: string;
|
|
210
|
+
parentId: string | null;
|
|
211
|
+
order: number | null;
|
|
212
|
+
commentCount: number;
|
|
213
|
+
url: string;
|
|
214
|
+
color: string;
|
|
215
|
+
name: string;
|
|
216
|
+
isShared: boolean;
|
|
217
|
+
isFavorite: boolean;
|
|
218
|
+
isInboxProject: boolean;
|
|
219
|
+
isTeamInbox: boolean;
|
|
220
|
+
viewStyle: string;
|
|
221
|
+
}, {
|
|
222
|
+
id: string;
|
|
223
|
+
parentId: string | null;
|
|
224
|
+
order: number | null;
|
|
225
|
+
commentCount: number;
|
|
226
|
+
url: string;
|
|
227
|
+
color: string;
|
|
228
|
+
name: string;
|
|
229
|
+
isShared: boolean;
|
|
230
|
+
isFavorite: boolean;
|
|
231
|
+
isInboxProject: boolean;
|
|
232
|
+
isTeamInbox: boolean;
|
|
233
|
+
viewStyle: string;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
236
|
+
* Represents a project in Todoist, which can contain multiple tasks.
|
|
237
|
+
* @see https://developer.todoist.com/sync/v9/#projects
|
|
238
|
+
*/
|
|
239
|
+
export interface Project extends z.infer<typeof ProjectSchema> {
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @see https://developer.todoist.com/sync/v9/#projects
|
|
243
|
+
*/
|
|
83
244
|
export type ProjectViewStyle = 'list' | 'board' | 'calendar';
|
|
84
|
-
export declare const
|
|
85
|
-
id:
|
|
86
|
-
order:
|
|
87
|
-
name:
|
|
88
|
-
projectId:
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
245
|
+
export declare const SectionSchema: z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
order: z.ZodNumber;
|
|
248
|
+
name: z.ZodString;
|
|
249
|
+
projectId: z.ZodString;
|
|
250
|
+
}, "strip", z.ZodTypeAny, {
|
|
251
|
+
id: string;
|
|
252
|
+
projectId: string;
|
|
253
|
+
order: number;
|
|
254
|
+
name: string;
|
|
255
|
+
}, {
|
|
256
|
+
id: string;
|
|
257
|
+
projectId: string;
|
|
258
|
+
order: number;
|
|
259
|
+
name: string;
|
|
260
|
+
}>;
|
|
261
|
+
/**
|
|
262
|
+
* Represents a section within a project, used to group tasks.
|
|
263
|
+
* @see https://developer.todoist.com/sync/v9/#sections
|
|
264
|
+
*/
|
|
265
|
+
export interface Section extends z.infer<typeof SectionSchema> {
|
|
266
|
+
}
|
|
267
|
+
export declare const LabelSchema: z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
order: z.ZodNullable<z.ZodNumber>;
|
|
270
|
+
name: z.ZodString;
|
|
271
|
+
color: z.ZodString;
|
|
272
|
+
isFavorite: z.ZodBoolean;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
id: string;
|
|
275
|
+
order: number | null;
|
|
276
|
+
color: string;
|
|
277
|
+
name: string;
|
|
278
|
+
isFavorite: boolean;
|
|
279
|
+
}, {
|
|
280
|
+
id: string;
|
|
281
|
+
order: number | null;
|
|
282
|
+
color: string;
|
|
283
|
+
name: string;
|
|
284
|
+
isFavorite: boolean;
|
|
285
|
+
}>;
|
|
286
|
+
/**
|
|
287
|
+
* Represents a label in Todoist, which is used to categorize tasks.
|
|
288
|
+
* @see https://developer.todoist.com/sync/v9/#labels
|
|
289
|
+
*/
|
|
290
|
+
export interface Label extends z.infer<typeof LabelSchema> {
|
|
291
|
+
}
|
|
292
|
+
export declare const AttachmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
293
|
+
resourceType: z.ZodString;
|
|
294
|
+
}, {
|
|
295
|
+
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
|
+
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
297
|
+
fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
300
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<["pending", "completed"]>>>;
|
|
301
|
+
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
|
+
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
303
|
+
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
304
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
305
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
|
+
}>, "strip", z.ZodTypeAny, {
|
|
307
|
+
resourceType: string;
|
|
308
|
+
url?: string | null | undefined;
|
|
309
|
+
fileName?: string | null | undefined;
|
|
310
|
+
fileSize?: number | null | undefined;
|
|
311
|
+
fileType?: string | null | undefined;
|
|
312
|
+
fileUrl?: string | null | undefined;
|
|
313
|
+
fileDuration?: number | null | undefined;
|
|
314
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
315
|
+
image?: string | null | undefined;
|
|
316
|
+
imageWidth?: number | null | undefined;
|
|
317
|
+
imageHeight?: number | null | undefined;
|
|
318
|
+
title?: string | null | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
resourceType: string;
|
|
321
|
+
url?: string | null | undefined;
|
|
322
|
+
fileName?: string | null | undefined;
|
|
323
|
+
fileSize?: number | null | undefined;
|
|
324
|
+
fileType?: string | null | undefined;
|
|
325
|
+
fileUrl?: string | null | undefined;
|
|
326
|
+
fileDuration?: number | null | undefined;
|
|
327
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
328
|
+
image?: string | null | undefined;
|
|
329
|
+
imageWidth?: number | null | undefined;
|
|
330
|
+
imageHeight?: number | null | undefined;
|
|
331
|
+
title?: string | null | undefined;
|
|
332
|
+
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Represents an attachment associated with a comment in Todoist.
|
|
335
|
+
* @see https://developer.todoist.com/sync/v9/#file-attachments
|
|
336
|
+
*/
|
|
337
|
+
export interface Attachment extends z.infer<typeof AttachmentSchema> {
|
|
338
|
+
}
|
|
339
|
+
export declare const CommentSchema: z.ZodObject<{
|
|
340
|
+
id: z.ZodString;
|
|
341
|
+
taskId: z.ZodNullable<z.ZodString>;
|
|
342
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
343
|
+
content: z.ZodString;
|
|
344
|
+
postedAt: z.ZodString;
|
|
345
|
+
attachment: z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
|
346
|
+
resourceType: z.ZodString;
|
|
347
|
+
}, {
|
|
348
|
+
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
349
|
+
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
350
|
+
fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
351
|
+
fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
353
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<["pending", "completed"]>>>;
|
|
354
|
+
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
356
|
+
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
357
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
}>, "strip", z.ZodTypeAny, {
|
|
360
|
+
resourceType: string;
|
|
361
|
+
url?: string | null | undefined;
|
|
362
|
+
fileName?: string | null | undefined;
|
|
363
|
+
fileSize?: number | null | undefined;
|
|
364
|
+
fileType?: string | null | undefined;
|
|
365
|
+
fileUrl?: string | null | undefined;
|
|
366
|
+
fileDuration?: number | null | undefined;
|
|
367
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
368
|
+
image?: string | null | undefined;
|
|
369
|
+
imageWidth?: number | null | undefined;
|
|
370
|
+
imageHeight?: number | null | undefined;
|
|
371
|
+
title?: string | null | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
resourceType: string;
|
|
374
|
+
url?: string | null | undefined;
|
|
375
|
+
fileName?: string | null | undefined;
|
|
376
|
+
fileSize?: number | null | undefined;
|
|
377
|
+
fileType?: string | null | undefined;
|
|
378
|
+
fileUrl?: string | null | undefined;
|
|
379
|
+
fileDuration?: number | null | undefined;
|
|
380
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
381
|
+
image?: string | null | undefined;
|
|
382
|
+
imageWidth?: number | null | undefined;
|
|
383
|
+
imageHeight?: number | null | undefined;
|
|
384
|
+
title?: string | null | undefined;
|
|
385
|
+
}>>;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
id: string;
|
|
388
|
+
projectId: string | null;
|
|
389
|
+
content: string;
|
|
390
|
+
taskId: string | null;
|
|
391
|
+
postedAt: string;
|
|
392
|
+
attachment: {
|
|
393
|
+
resourceType: string;
|
|
394
|
+
url?: string | null | undefined;
|
|
395
|
+
fileName?: string | null | undefined;
|
|
396
|
+
fileSize?: number | null | undefined;
|
|
397
|
+
fileType?: string | null | undefined;
|
|
398
|
+
fileUrl?: string | null | undefined;
|
|
399
|
+
fileDuration?: number | null | undefined;
|
|
400
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
401
|
+
image?: string | null | undefined;
|
|
402
|
+
imageWidth?: number | null | undefined;
|
|
403
|
+
imageHeight?: number | null | undefined;
|
|
404
|
+
title?: string | null | undefined;
|
|
405
|
+
} | null;
|
|
406
|
+
}, {
|
|
407
|
+
id: string;
|
|
408
|
+
projectId: string | null;
|
|
409
|
+
content: string;
|
|
410
|
+
taskId: string | null;
|
|
411
|
+
postedAt: string;
|
|
412
|
+
attachment: {
|
|
413
|
+
resourceType: string;
|
|
414
|
+
url?: string | null | undefined;
|
|
415
|
+
fileName?: string | null | undefined;
|
|
416
|
+
fileSize?: number | null | undefined;
|
|
417
|
+
fileType?: string | null | undefined;
|
|
418
|
+
fileUrl?: string | null | undefined;
|
|
419
|
+
fileDuration?: number | null | undefined;
|
|
420
|
+
uploadState?: "pending" | "completed" | null | undefined;
|
|
421
|
+
image?: string | null | undefined;
|
|
422
|
+
imageWidth?: number | null | undefined;
|
|
423
|
+
imageHeight?: number | null | undefined;
|
|
424
|
+
title?: string | null | undefined;
|
|
425
|
+
} | null;
|
|
426
|
+
}>;
|
|
427
|
+
/**
|
|
428
|
+
* Represents a comment on a task or project in Todoist.
|
|
429
|
+
* @see https://developer.todoist.com/sync/v9/#notes
|
|
430
|
+
*/
|
|
431
|
+
export interface Comment extends z.infer<typeof CommentSchema> {
|
|
432
|
+
}
|
|
433
|
+
export declare const UserSchema: z.ZodObject<{
|
|
434
|
+
id: z.ZodString;
|
|
435
|
+
name: z.ZodString;
|
|
436
|
+
email: z.ZodString;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
id: string;
|
|
439
|
+
name: string;
|
|
440
|
+
email: string;
|
|
441
|
+
}, {
|
|
442
|
+
id: string;
|
|
443
|
+
name: string;
|
|
444
|
+
email: string;
|
|
445
|
+
}>;
|
|
446
|
+
/**
|
|
447
|
+
* Represents a user in Todoist.
|
|
448
|
+
* @see https://developer.todoist.com/sync/v9/#user
|
|
449
|
+
*/
|
|
450
|
+
export interface User extends z.infer<typeof UserSchema> {
|
|
451
|
+
}
|
|
452
|
+
export declare const ColorSchema: z.ZodObject<{
|
|
453
|
+
/** @deprecated No longer used */
|
|
454
|
+
id: z.ZodNumber;
|
|
455
|
+
/** The key of the color (i.e. 'berry_red') */
|
|
456
|
+
key: z.ZodString;
|
|
457
|
+
/** The display name of the color (i.e. 'Berry Red') */
|
|
458
|
+
displayName: z.ZodString;
|
|
459
|
+
/** @deprecated Use {@link Color.displayName} instead */
|
|
460
|
+
name: z.ZodString;
|
|
461
|
+
/** The hex value of the color (i.e. '#b8255f') */
|
|
462
|
+
hexValue: z.ZodString;
|
|
145
463
|
/**
|
|
146
|
-
* @deprecated
|
|
464
|
+
* @deprecated Use {@link Color.hexValue} instead
|
|
147
465
|
*/
|
|
466
|
+
value: z.ZodString;
|
|
467
|
+
}, "strip", z.ZodTypeAny, {
|
|
468
|
+
value: string;
|
|
148
469
|
id: number;
|
|
149
|
-
|
|
150
|
-
* The key of the color (i.e. 'berry_red')
|
|
151
|
-
*/
|
|
470
|
+
name: string;
|
|
152
471
|
key: string;
|
|
153
|
-
/**
|
|
154
|
-
* The display name of the color (i.e. 'Berry Red')
|
|
155
|
-
*/
|
|
156
472
|
displayName: string;
|
|
157
|
-
/**
|
|
158
|
-
* @deprecated Use {@link Color.displayName} instead
|
|
159
|
-
*/
|
|
160
|
-
name: string;
|
|
161
|
-
/**
|
|
162
|
-
* The hex value of the color (i.e. '#b8255f')
|
|
163
|
-
*/
|
|
164
473
|
hexValue: string;
|
|
165
|
-
|
|
166
|
-
* @deprecated Use {@link Color.hexValue} instead
|
|
167
|
-
*/
|
|
474
|
+
}, {
|
|
168
475
|
value: string;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
responsibleUid: string | null;
|
|
182
|
-
checked: boolean;
|
|
183
|
-
addedAt: string;
|
|
184
|
-
addedByUid: string | null;
|
|
185
|
-
duration: Duration | null;
|
|
186
|
-
due: DueDate | null;
|
|
187
|
-
deadline: Deadline | null;
|
|
188
|
-
};
|
|
476
|
+
id: number;
|
|
477
|
+
name: string;
|
|
478
|
+
key: string;
|
|
479
|
+
displayName: string;
|
|
480
|
+
hexValue: string;
|
|
481
|
+
}>;
|
|
482
|
+
/**
|
|
483
|
+
* Represents a color in Todoist, used for projects, labels, or other visual elements.
|
|
484
|
+
* @see https://developer.todoist.com/guides/#colors
|
|
485
|
+
*/
|
|
486
|
+
export interface Color extends z.infer<typeof ColorSchema> {
|
|
487
|
+
}
|