@doist/todoist-sdk 8.4.0 → 9.0.0

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 (55) hide show
  1. package/dist/cjs/test-utils/test-defaults.js +15 -12
  2. package/dist/cjs/types/activity/types.js +1 -1
  3. package/dist/cjs/types/comments/types.js +1 -1
  4. package/dist/cjs/types/insights/types.js +6 -4
  5. package/dist/cjs/types/projects/types.js +13 -3
  6. package/dist/cjs/types/sections/types.js +3 -3
  7. package/dist/cjs/types/sync/resources/live-notifications.js +1 -1
  8. package/dist/cjs/types/sync/resources/notes.js +1 -1
  9. package/dist/cjs/types/sync/resources/user.js +4 -4
  10. package/dist/cjs/types/sync/resources/workspace-filters.js +2 -2
  11. package/dist/cjs/types/sync/resources/workspace-goals.js +2 -2
  12. package/dist/cjs/types/sync/resources/workspaces.js +3 -3
  13. package/dist/cjs/types/sync/response.js +53 -0
  14. package/dist/cjs/types/tasks/types.js +3 -3
  15. package/dist/cjs/types/workspaces/types.js +3 -3
  16. package/dist/cjs/utils/validators.js +56 -133
  17. package/dist/esm/test-utils/test-defaults.js +15 -12
  18. package/dist/esm/types/activity/types.js +1 -1
  19. package/dist/esm/types/comments/types.js +1 -1
  20. package/dist/esm/types/insights/types.js +6 -4
  21. package/dist/esm/types/projects/types.js +12 -2
  22. package/dist/esm/types/sections/types.js +3 -3
  23. package/dist/esm/types/sync/resources/live-notifications.js +1 -1
  24. package/dist/esm/types/sync/resources/notes.js +1 -1
  25. package/dist/esm/types/sync/resources/user.js +4 -4
  26. package/dist/esm/types/sync/resources/workspace-filters.js +2 -2
  27. package/dist/esm/types/sync/resources/workspace-goals.js +2 -2
  28. package/dist/esm/types/sync/resources/workspaces.js +3 -3
  29. package/dist/esm/types/sync/response.js +52 -1
  30. package/dist/esm/types/tasks/types.js +3 -3
  31. package/dist/esm/types/workspaces/types.js +3 -3
  32. package/dist/esm/utils/validators.js +54 -129
  33. package/dist/types/consts/endpoints.d.ts +2 -2
  34. package/dist/types/test-utils/test-defaults.d.ts +13 -13
  35. package/dist/types/todoist-api.d.ts +1 -1
  36. package/dist/types/types/activity/types.d.ts +1 -1
  37. package/dist/types/types/comments/types.d.ts +4 -4
  38. package/dist/types/types/folders/requests.d.ts +2 -2
  39. package/dist/types/types/insights/types.d.ts +9 -9
  40. package/dist/types/types/projects/requests.d.ts +1 -1
  41. package/dist/types/types/projects/types.d.ts +69 -14
  42. package/dist/types/types/sections/types.d.ts +9 -9
  43. package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
  44. package/dist/types/types/sync/resources/live-notifications.d.ts +1 -1
  45. package/dist/types/types/sync/resources/notes.d.ts +1 -1
  46. package/dist/types/types/sync/resources/user.d.ts +4 -4
  47. package/dist/types/types/sync/resources/workspace-filters.d.ts +2 -2
  48. package/dist/types/types/sync/resources/workspace-goals.d.ts +2 -2
  49. package/dist/types/types/sync/resources/workspaces.d.ts +8 -8
  50. package/dist/types/types/sync/response.d.ts +917 -51
  51. package/dist/types/types/tasks/types.d.ts +9 -9
  52. package/dist/types/types/workspaces/requests.d.ts +7 -7
  53. package/dist/types/types/workspaces/types.d.ts +6 -6
  54. package/dist/types/utils/validators.d.ts +187 -117
  55. package/package.json +1 -1
@@ -59,9 +59,9 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
59
59
  }, z.core.$strip>>;
60
60
  checked: z.ZodBoolean;
61
61
  isDeleted: z.ZodBoolean;
62
- addedAt: z.ZodNullable<z.ZodString>;
63
- completedAt: z.ZodNullable<z.ZodString>;
64
- updatedAt: z.ZodNullable<z.ZodString>;
62
+ addedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
63
+ completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
64
+ updatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
65
65
  due: z.ZodNullable<z.ZodObject<{
66
66
  isRecurring: z.ZodBoolean;
67
67
  string: z.ZodString;
@@ -99,9 +99,9 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
99
99
  } | null;
100
100
  checked: boolean;
101
101
  isDeleted: boolean;
102
- addedAt: string | null;
103
- completedAt: string | null;
104
- updatedAt: string | null;
102
+ addedAt: Date | null;
103
+ completedAt: Date | null;
104
+ updatedAt: Date | null;
105
105
  due: {
106
106
  isRecurring: boolean;
107
107
  string: string;
@@ -136,9 +136,9 @@ export declare const TaskSchema: z.ZodPipe<z.ZodObject<{
136
136
  } | null;
137
137
  checked: boolean;
138
138
  isDeleted: boolean;
139
- addedAt: string | null;
140
- completedAt: string | null;
141
- updatedAt: string | null;
139
+ addedAt: Date | null;
140
+ completedAt: Date | null;
141
+ updatedAt: Date | null;
142
142
  due: {
143
143
  isRecurring: boolean;
144
144
  string: string;
@@ -128,7 +128,7 @@ export type GetWorkspaceInvitationsArgs = {
128
128
  /**
129
129
  * The workspace ID to get invitations for.
130
130
  */
131
- workspaceId: number;
131
+ workspaceId: string;
132
132
  };
133
133
  /**
134
134
  * Arguments for deleting a workspace invitation.
@@ -137,7 +137,7 @@ export type DeleteWorkspaceInvitationArgs = {
137
137
  /**
138
138
  * The workspace ID.
139
139
  */
140
- workspaceId: number;
140
+ workspaceId: string;
141
141
  /**
142
142
  * The email address of the invitation to delete.
143
143
  */
@@ -163,7 +163,7 @@ export type JoinWorkspaceArgs = {
163
163
  /**
164
164
  * Optional workspace ID to join via domain auto-join.
165
165
  */
166
- workspaceId?: number | null;
166
+ workspaceId?: string | null;
167
167
  };
168
168
  /**
169
169
  * Arguments for uploading/updating workspace logo.
@@ -172,7 +172,7 @@ export type WorkspaceLogoArgs = {
172
172
  /**
173
173
  * The workspace ID.
174
174
  */
175
- workspaceId: number;
175
+ workspaceId: string;
176
176
  /**
177
177
  * The image file to upload (Buffer, Stream, or file path).
178
178
  */
@@ -193,7 +193,7 @@ export type GetWorkspacePlanDetailsArgs = {
193
193
  /**
194
194
  * The workspace ID.
195
195
  */
196
- workspaceId: number;
196
+ workspaceId: string;
197
197
  };
198
198
  /**
199
199
  * Arguments for getting workspace users (paginated).
@@ -202,7 +202,7 @@ export type GetWorkspaceUsersArgs = {
202
202
  /**
203
203
  * Optional workspace ID. If not provided, returns users for all workspaces.
204
204
  */
205
- workspaceId?: number | null;
205
+ workspaceId?: string | null;
206
206
  /**
207
207
  * Cursor for pagination.
208
208
  */
@@ -219,7 +219,7 @@ export type GetWorkspaceProjectsArgs = {
219
219
  /**
220
220
  * The workspace ID.
221
221
  */
222
- workspaceId: number;
222
+ workspaceId: string;
223
223
  /**
224
224
  * Cursor for pagination.
225
225
  */
@@ -98,7 +98,7 @@ export declare const WorkspacePlanDetailsSchema: z.ZodObject<{
98
98
  interval: z.ZodOptional<z.ZodString>;
99
99
  formatted: z.ZodOptional<z.ZodString>;
100
100
  }, z.core.$strip>>;
101
- workspaceId: z.ZodNumber;
101
+ workspaceId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
102
102
  isTrialing: z.ZodBoolean;
103
103
  trialEndsAt: z.ZodNullable<z.ZodString>;
104
104
  cancelAtPeriodEnd: z.ZodBoolean;
@@ -181,12 +181,12 @@ export declare const WorkspaceSchema: z.ZodPipe<z.ZodObject<{
181
181
  logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
182
  logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
183
  logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
- createdAt: z.ZodOptional<z.ZodString>;
185
- dateCreated: z.ZodOptional<z.ZodString>;
184
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
185
+ dateCreated: z.ZodOptional<z.ZodCoercedDate<unknown>>;
186
186
  creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
187
187
  properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
188
188
  }, z.core.$strip>, z.ZodTransform<{
189
- createdAt: string | undefined;
189
+ createdAt: Date | undefined;
190
190
  id: string;
191
191
  name: string;
192
192
  plan: "STARTER" | "BUSINESS";
@@ -224,8 +224,8 @@ export declare const WorkspaceSchema: z.ZodPipe<z.ZodObject<{
224
224
  logoMedium?: string | null | undefined;
225
225
  logoSmall?: string | null | undefined;
226
226
  logoS640?: string | null | undefined;
227
- createdAt?: string | undefined;
228
- dateCreated?: string | undefined;
227
+ createdAt?: Date | undefined;
228
+ dateCreated?: Date | undefined;
229
229
  }>>;
230
230
  export type Workspace = z.infer<typeof WorkspaceSchema>;
231
231
  export declare const MemberActivityInfoSchema: z.ZodObject<{