@doist/todoist-sdk 15.0.0 → 15.0.2
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/esm/types/sync/resources/index.js +1 -0
- package/dist/esm/types/sync/resources/labels.js +7 -0
- package/dist/esm/types/sync/resources/reminders.js +11 -0
- package/dist/esm/types/sync/resources/user.js +1 -1
- package/dist/esm/types/sync/response.js +3 -4
- package/dist/esm/types/users/types.js +1 -0
- package/dist/types/types/sync/resources/index.d.ts +1 -0
- package/dist/types/types/sync/resources/labels.d.ts +12 -0
- package/dist/types/types/sync/resources/reminders.d.ts +87 -0
- package/dist/types/types/sync/resources/user.d.ts +2 -2
- package/dist/types/types/sync/response.d.ts +9 -8
- package/dist/types/types/users/types.d.ts +1 -0
- package/dist/types/utils/validators.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LabelSchema } from '../../labels/types.js';
|
|
3
|
+
/** A label returned by the Sync API. */
|
|
4
|
+
export const SyncLabelSchema = LabelSchema.extend({
|
|
5
|
+
order: z.number().int().nullable().optional(),
|
|
6
|
+
isDeleted: z.boolean().optional(),
|
|
7
|
+
});
|
|
@@ -45,3 +45,14 @@ export const ReminderSchema = z.discriminatedUnion('type', [
|
|
|
45
45
|
AbsoluteReminderSchema,
|
|
46
46
|
RelativeReminderSchema,
|
|
47
47
|
]);
|
|
48
|
+
export const SyncAbsoluteReminderSchema = AbsoluteReminderSchema.extend({
|
|
49
|
+
due: DueDateSchema.nullable(),
|
|
50
|
+
});
|
|
51
|
+
export const SyncRelativeReminderSchema = RelativeReminderSchema.extend({
|
|
52
|
+
due: DueDateSchema.nullable().optional(),
|
|
53
|
+
});
|
|
54
|
+
export const SyncReminderSchema = z.discriminatedUnion('type', [
|
|
55
|
+
LocationReminderSchema,
|
|
56
|
+
SyncAbsoluteReminderSchema,
|
|
57
|
+
SyncRelativeReminderSchema,
|
|
58
|
+
]);
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { PREMIUM_STATUSES } from '../../users/types.js';
|
|
3
3
|
import { BooleanFromZeroOneSchema, DateFormatSchema, DayOfWeekSchema, TimeFormatSchema, } from '../user-preferences.js';
|
|
4
4
|
export const FeaturesSchema = z.looseObject({
|
|
5
|
-
karmaDisabled: z.boolean(),
|
|
5
|
+
karmaDisabled: z.union([z.boolean(), BooleanFromZeroOneSchema]),
|
|
6
6
|
restriction: z.number().int(),
|
|
7
7
|
karmaVacation: z.boolean(),
|
|
8
8
|
dateistLang: z.any(),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { LabelSchema } from '../labels/types.js';
|
|
3
2
|
import { ProjectSchema } from '../projects/types.js';
|
|
4
3
|
import { SectionSchema } from '../sections/types.js';
|
|
5
4
|
import { TaskSchema } from '../tasks/types.js';
|
|
6
5
|
import { WorkspaceUserSchema } from '../workspaces/types.js';
|
|
7
|
-
import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, CalendarSchema, CalendarAccountSchema,
|
|
6
|
+
import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, CalendarSchema, CalendarAccountSchema, SyncLabelSchema, SyncReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from './resources/index.js';
|
|
8
7
|
export const SyncErrorSchema = z.object({
|
|
9
8
|
error: z.string(),
|
|
10
9
|
errorCode: z.number(),
|
|
@@ -20,11 +19,11 @@ export const SyncResponseSchema = z.looseObject({
|
|
|
20
19
|
items: z.array(TaskSchema).optional(),
|
|
21
20
|
projects: z.array(ProjectSchema).optional(),
|
|
22
21
|
sections: z.array(SectionSchema).optional(),
|
|
23
|
-
labels: z.array(
|
|
22
|
+
labels: z.array(SyncLabelSchema).optional(),
|
|
24
23
|
notes: z.array(NoteSchema).optional(),
|
|
25
24
|
projectNotes: z.array(NoteSchema).optional(),
|
|
26
25
|
filters: z.array(FilterSchema).optional(),
|
|
27
|
-
reminders: z.array(
|
|
26
|
+
reminders: z.array(SyncReminderSchema).optional(),
|
|
28
27
|
remindersLocation: z.array(LocationReminderSchema).optional(),
|
|
29
28
|
locations: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
30
29
|
user: SyncUserSchema.optional(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A label returned by the Sync API. */
|
|
3
|
+
export declare const SyncLabelSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
color: z.ZodString;
|
|
7
|
+
isFavorite: z.ZodBoolean;
|
|
8
|
+
order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
9
|
+
isDeleted: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
/** Represents a label returned by the Sync API. */
|
|
12
|
+
export type SyncLabel = z.infer<typeof SyncLabelSchema>;
|
|
@@ -124,3 +124,90 @@ export declare const ReminderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
124
124
|
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
125
125
|
}, z.core.$loose>], "type">;
|
|
126
126
|
export type Reminder = z.infer<typeof ReminderSchema>;
|
|
127
|
+
export declare const SyncAbsoluteReminderSchema: z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
notifyUid: z.ZodString;
|
|
130
|
+
itemId: z.ZodString;
|
|
131
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
isDeleted: z.ZodBoolean;
|
|
133
|
+
type: z.ZodLiteral<"absolute">;
|
|
134
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
due: z.ZodNullable<z.ZodObject<{
|
|
136
|
+
isRecurring: z.ZodBoolean;
|
|
137
|
+
string: z.ZodString;
|
|
138
|
+
date: z.ZodString;
|
|
139
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
}, z.core.$loose>;
|
|
144
|
+
export type SyncAbsoluteReminder = z.infer<typeof SyncAbsoluteReminderSchema>;
|
|
145
|
+
export declare const SyncRelativeReminderSchema: z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
notifyUid: z.ZodString;
|
|
148
|
+
itemId: z.ZodString;
|
|
149
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
isDeleted: z.ZodBoolean;
|
|
151
|
+
type: z.ZodLiteral<"relative">;
|
|
152
|
+
minuteOffset: z.ZodNumber;
|
|
153
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
+
due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
155
|
+
isRecurring: z.ZodBoolean;
|
|
156
|
+
string: z.ZodString;
|
|
157
|
+
date: z.ZodString;
|
|
158
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
+
}, z.core.$strip>>>;
|
|
162
|
+
}, z.core.$loose>;
|
|
163
|
+
export type SyncRelativeReminder = z.infer<typeof SyncRelativeReminderSchema>;
|
|
164
|
+
export declare const SyncReminderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
165
|
+
id: z.ZodString;
|
|
166
|
+
notifyUid: z.ZodString;
|
|
167
|
+
itemId: z.ZodString;
|
|
168
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
isDeleted: z.ZodBoolean;
|
|
170
|
+
type: z.ZodLiteral<"location">;
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
locLat: z.ZodString;
|
|
173
|
+
locLong: z.ZodString;
|
|
174
|
+
locTrigger: z.ZodEnum<{
|
|
175
|
+
on_enter: "on_enter";
|
|
176
|
+
on_leave: "on_leave";
|
|
177
|
+
}>;
|
|
178
|
+
radius: z.ZodNumber;
|
|
179
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
180
|
+
id: z.ZodString;
|
|
181
|
+
notifyUid: z.ZodString;
|
|
182
|
+
itemId: z.ZodString;
|
|
183
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
isDeleted: z.ZodBoolean;
|
|
185
|
+
type: z.ZodLiteral<"absolute">;
|
|
186
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
due: z.ZodNullable<z.ZodObject<{
|
|
188
|
+
isRecurring: z.ZodBoolean;
|
|
189
|
+
string: z.ZodString;
|
|
190
|
+
date: z.ZodString;
|
|
191
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
notifyUid: z.ZodString;
|
|
198
|
+
itemId: z.ZodString;
|
|
199
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
200
|
+
isDeleted: z.ZodBoolean;
|
|
201
|
+
type: z.ZodLiteral<"relative">;
|
|
202
|
+
minuteOffset: z.ZodNumber;
|
|
203
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
205
|
+
isRecurring: z.ZodBoolean;
|
|
206
|
+
string: z.ZodString;
|
|
207
|
+
date: z.ZodString;
|
|
208
|
+
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
|
+
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
|
+
}, z.core.$strip>>>;
|
|
212
|
+
}, z.core.$loose>], "type">;
|
|
213
|
+
export type SyncReminder = z.infer<typeof SyncReminderSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FeaturesSchema: z.ZodObject<{
|
|
3
|
-
karmaDisabled: z.ZodBoolean
|
|
3
|
+
karmaDisabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>]>;
|
|
4
4
|
restriction: z.ZodNumber;
|
|
5
5
|
karmaVacation: z.ZodBoolean;
|
|
6
6
|
dateistLang: z.ZodAny;
|
|
@@ -52,7 +52,7 @@ export declare const SyncUserSchema: z.ZodObject<{
|
|
|
52
52
|
daysOff: z.ZodArray<z.ZodNumber>;
|
|
53
53
|
featureIdentifier: z.ZodString;
|
|
54
54
|
features: z.ZodObject<{
|
|
55
|
-
karmaDisabled: z.ZodBoolean
|
|
55
|
+
karmaDisabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>]>;
|
|
56
56
|
restriction: z.ZodNumber;
|
|
57
57
|
karmaVacation: z.ZodBoolean;
|
|
58
58
|
dateistLang: z.ZodAny;
|
|
@@ -229,10 +229,11 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
229
229
|
}>>>>;
|
|
230
230
|
labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
231
231
|
id: z.ZodString;
|
|
232
|
-
order: z.ZodNullable<z.ZodNumber>;
|
|
233
232
|
name: z.ZodString;
|
|
234
233
|
color: z.ZodString;
|
|
235
234
|
isFavorite: z.ZodBoolean;
|
|
235
|
+
order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
236
|
+
isDeleted: z.ZodOptional<z.ZodBoolean>;
|
|
236
237
|
}, z.core.$strip>>>;
|
|
237
238
|
notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
238
239
|
id: z.ZodString;
|
|
@@ -322,15 +323,15 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
322
323
|
projectId: z.ZodOptional<z.ZodString>;
|
|
323
324
|
isDeleted: z.ZodBoolean;
|
|
324
325
|
type: z.ZodLiteral<"absolute">;
|
|
325
|
-
|
|
326
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
due: z.ZodNullable<z.ZodObject<{
|
|
326
328
|
isRecurring: z.ZodBoolean;
|
|
327
329
|
string: z.ZodString;
|
|
328
330
|
date: z.ZodString;
|
|
329
331
|
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
330
332
|
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
333
|
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
|
-
}, z.core.$strip
|
|
333
|
-
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
+
}, z.core.$strip>>;
|
|
334
335
|
}, z.core.$loose>, z.ZodObject<{
|
|
335
336
|
id: z.ZodString;
|
|
336
337
|
notifyUid: z.ZodString;
|
|
@@ -339,15 +340,15 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
339
340
|
isDeleted: z.ZodBoolean;
|
|
340
341
|
type: z.ZodLiteral<"relative">;
|
|
341
342
|
minuteOffset: z.ZodNumber;
|
|
342
|
-
|
|
343
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
343
345
|
isRecurring: z.ZodBoolean;
|
|
344
346
|
string: z.ZodString;
|
|
345
347
|
date: z.ZodString;
|
|
346
348
|
datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
349
|
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
350
|
lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
349
|
-
}, z.core.$strip
|
|
350
|
-
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
}, z.core.$strip>>>;
|
|
351
352
|
}, z.core.$loose>], "type">>>;
|
|
352
353
|
remindersLocation: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
353
354
|
id: z.ZodString;
|
|
@@ -383,7 +384,7 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
383
384
|
daysOff: z.ZodArray<z.ZodNumber>;
|
|
384
385
|
featureIdentifier: z.ZodString;
|
|
385
386
|
features: z.ZodObject<{
|
|
386
|
-
karmaDisabled: z.ZodBoolean
|
|
387
|
+
karmaDisabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>]>;
|
|
387
388
|
restriction: z.ZodNumber;
|
|
388
389
|
karmaVacation: z.ZodBoolean;
|
|
389
390
|
dateistLang: z.ZodAny;
|
|
@@ -58,6 +58,7 @@ export declare const CurrentUserSchema: z.ZodObject<{
|
|
|
58
58
|
inboxProjectId: z.ZodString;
|
|
59
59
|
daysOff: z.ZodArray<z.ZodNumber>;
|
|
60
60
|
weekendStartDay: z.ZodNumber;
|
|
61
|
+
websocketUrl: z.ZodOptional<z.ZodString>;
|
|
61
62
|
}, z.core.$strip>;
|
|
62
63
|
/**
|
|
63
64
|
* Represents the current authenticated user with detailed information.
|
|
@@ -447,6 +447,7 @@ export declare const validateCurrentUser: (input: unknown) => {
|
|
|
447
447
|
avatarMedium?: string | null | undefined;
|
|
448
448
|
avatarS640?: string | null | undefined;
|
|
449
449
|
avatarSmall?: string | null | undefined;
|
|
450
|
+
websocketUrl?: string | undefined;
|
|
450
451
|
};
|
|
451
452
|
export declare const validateActivityEvent: (input: unknown) => {
|
|
452
453
|
[x: string]: any;
|
package/package.json
CHANGED