@doist/todoist-sdk 8.5.0-next.1 → 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 (82) hide show
  1. package/dist/cjs/consts/endpoints.js +1 -6
  2. package/dist/cjs/test-utils/test-defaults.js +15 -12
  3. package/dist/cjs/todoist-api.js +0 -128
  4. package/dist/cjs/types/activity/types.js +1 -1
  5. package/dist/cjs/types/comments/types.js +1 -1
  6. package/dist/cjs/types/index.js +0 -1
  7. package/dist/cjs/types/insights/types.js +6 -4
  8. package/dist/cjs/types/projects/types.js +2 -2
  9. package/dist/cjs/types/sections/types.js +3 -3
  10. package/dist/cjs/types/sync/commands/index.js +0 -1
  11. package/dist/cjs/types/sync/resource-types.js +0 -1
  12. package/dist/cjs/types/sync/resources/live-notifications.js +1 -1
  13. package/dist/cjs/types/sync/resources/notes.js +1 -1
  14. package/dist/cjs/types/sync/resources/user.js +4 -4
  15. package/dist/cjs/types/sync/resources/workspace-filters.js +2 -2
  16. package/dist/cjs/types/sync/resources/workspace-goals.js +2 -2
  17. package/dist/cjs/types/sync/resources/workspaces.js +3 -3
  18. package/dist/cjs/types/sync/response.js +10 -12
  19. package/dist/cjs/types/tasks/types.js +3 -3
  20. package/dist/cjs/types/workspaces/types.js +3 -3
  21. package/dist/cjs/utils/validators.js +46 -48
  22. package/dist/esm/consts/endpoints.js +0 -5
  23. package/dist/esm/test-utils/test-defaults.js +15 -12
  24. package/dist/esm/todoist-api.js +2 -130
  25. package/dist/esm/types/activity/types.js +1 -1
  26. package/dist/esm/types/comments/types.js +1 -1
  27. package/dist/esm/types/index.js +0 -1
  28. package/dist/esm/types/insights/types.js +6 -4
  29. package/dist/esm/types/projects/types.js +2 -2
  30. package/dist/esm/types/sections/types.js +3 -3
  31. package/dist/esm/types/sync/commands/index.js +0 -1
  32. package/dist/esm/types/sync/resource-types.js +0 -1
  33. package/dist/esm/types/sync/resources/live-notifications.js +1 -1
  34. package/dist/esm/types/sync/resources/notes.js +1 -1
  35. package/dist/esm/types/sync/resources/user.js +4 -4
  36. package/dist/esm/types/sync/resources/workspace-filters.js +2 -2
  37. package/dist/esm/types/sync/resources/workspace-goals.js +2 -2
  38. package/dist/esm/types/sync/resources/workspaces.js +3 -3
  39. package/dist/esm/types/sync/response.js +0 -2
  40. package/dist/esm/types/tasks/types.js +3 -3
  41. package/dist/esm/types/workspaces/types.js +3 -3
  42. package/dist/esm/utils/validators.js +0 -2
  43. package/dist/types/consts/endpoints.d.ts +2 -7
  44. package/dist/types/test-utils/test-defaults.d.ts +13 -13
  45. package/dist/types/todoist-api.d.ts +1 -12
  46. package/dist/types/types/activity/types.d.ts +1 -1
  47. package/dist/types/types/comments/types.d.ts +4 -4
  48. package/dist/types/types/folders/requests.d.ts +2 -2
  49. package/dist/types/types/index.d.ts +0 -1
  50. package/dist/types/types/insights/types.d.ts +9 -9
  51. package/dist/types/types/projects/requests.d.ts +1 -1
  52. package/dist/types/types/projects/types.d.ts +18 -18
  53. package/dist/types/types/sections/types.d.ts +9 -9
  54. package/dist/types/types/sync/commands/index.d.ts +0 -9
  55. package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
  56. package/dist/types/types/sync/resource-types.d.ts +1 -1
  57. package/dist/types/types/sync/resources/live-notifications.d.ts +1 -1
  58. package/dist/types/types/sync/resources/notes.d.ts +1 -1
  59. package/dist/types/types/sync/resources/user.d.ts +4 -4
  60. package/dist/types/types/sync/resources/view-options.d.ts +6 -6
  61. package/dist/types/types/sync/resources/workspace-filters.d.ts +2 -2
  62. package/dist/types/types/sync/resources/workspace-goals.d.ts +2 -2
  63. package/dist/types/types/sync/resources/workspaces.d.ts +8 -8
  64. package/dist/types/types/sync/response.d.ts +45 -70
  65. package/dist/types/types/tasks/requests.d.ts +0 -1
  66. package/dist/types/types/tasks/types.d.ts +9 -9
  67. package/dist/types/types/workspaces/requests.d.ts +7 -7
  68. package/dist/types/types/workspaces/types.d.ts +6 -6
  69. package/dist/types/utils/validators.d.ts +64 -111
  70. package/package.json +1 -1
  71. package/dist/cjs/types/goals/index.js +0 -18
  72. package/dist/cjs/types/goals/requests.js +0 -2
  73. package/dist/cjs/types/goals/types.js +0 -29
  74. package/dist/cjs/types/sync/commands/goals.js +0 -2
  75. package/dist/esm/types/goals/index.js +0 -2
  76. package/dist/esm/types/goals/requests.js +0 -1
  77. package/dist/esm/types/goals/types.js +0 -26
  78. package/dist/esm/types/sync/commands/goals.js +0 -1
  79. package/dist/types/types/goals/index.d.ts +0 -2
  80. package/dist/types/types/goals/requests.d.ts +0 -33
  81. package/dist/types/types/goals/types.d.ts +0 -41
  82. package/dist/types/types/sync/commands/goals.d.ts +0 -33
@@ -21,9 +21,9 @@ export declare const validateTask: (input: unknown) => {
21
21
  } | null;
22
22
  checked: boolean;
23
23
  isDeleted: boolean;
24
- addedAt: string | null;
25
- completedAt: string | null;
26
- updatedAt: string | null;
24
+ addedAt: Date | null;
25
+ completedAt: Date | null;
26
+ updatedAt: Date | null;
27
27
  due: {
28
28
  isRecurring: boolean;
29
29
  string: string;
@@ -60,9 +60,9 @@ export declare const validateTask: (input: unknown) => {
60
60
  } | null;
61
61
  checked: boolean;
62
62
  isDeleted: boolean;
63
- addedAt: string | null;
64
- completedAt: string | null;
65
- updatedAt: string | null;
63
+ addedAt: Date | null;
64
+ completedAt: Date | null;
65
+ updatedAt: Date | null;
66
66
  due: {
67
67
  isRecurring: boolean;
68
68
  string: string;
@@ -89,13 +89,13 @@ export declare const validateProject: (input: unknown) => {
89
89
  canAssignTasks: boolean;
90
90
  childOrder: number;
91
91
  color: string;
92
- createdAt: string | null;
92
+ createdAt: Date | null;
93
93
  isArchived: boolean;
94
94
  isDeleted: boolean;
95
95
  isFavorite: boolean;
96
96
  isFrozen: boolean;
97
97
  name: string;
98
- updatedAt: string | null;
98
+ updatedAt: Date | null;
99
99
  viewStyle: string;
100
100
  defaultOrder: number;
101
101
  description: string;
@@ -109,13 +109,13 @@ export declare const validateProject: (input: unknown) => {
109
109
  canAssignTasks: boolean;
110
110
  childOrder: number;
111
111
  color: string;
112
- createdAt: string | null;
112
+ createdAt: Date | null;
113
113
  isArchived: boolean;
114
114
  isDeleted: boolean;
115
115
  isFavorite: boolean;
116
116
  isFrozen: boolean;
117
117
  name: string;
118
- updatedAt: string | null;
118
+ updatedAt: Date | null;
119
119
  viewStyle: string;
120
120
  defaultOrder: number;
121
121
  description: string;
@@ -137,13 +137,13 @@ export declare const validateProject: (input: unknown) => {
137
137
  canAssignTasks: boolean;
138
138
  childOrder: number;
139
139
  color: string;
140
- createdAt: string | null;
140
+ createdAt: Date | null;
141
141
  isArchived: boolean;
142
142
  isDeleted: boolean;
143
143
  isFavorite: boolean;
144
144
  isFrozen: boolean;
145
145
  name: string;
146
- updatedAt: string | null;
146
+ updatedAt: Date | null;
147
147
  viewStyle: string;
148
148
  defaultOrder: number;
149
149
  description: string;
@@ -157,13 +157,13 @@ export declare const validateProject: (input: unknown) => {
157
157
  canAssignTasks: boolean;
158
158
  childOrder: number;
159
159
  color: string;
160
- createdAt: string | null;
160
+ createdAt: Date | null;
161
161
  isArchived: boolean;
162
162
  isDeleted: boolean;
163
163
  isFavorite: boolean;
164
164
  isFrozen: boolean;
165
165
  name: string;
166
- updatedAt: string | null;
166
+ updatedAt: Date | null;
167
167
  viewStyle: string;
168
168
  defaultOrder: number;
169
169
  description: string;
@@ -186,13 +186,13 @@ export declare const validateWorkspaceProject: (input: unknown) => {
186
186
  canAssignTasks: boolean;
187
187
  childOrder: number;
188
188
  color: string;
189
- createdAt: string | null;
189
+ createdAt: Date | null;
190
190
  isArchived: boolean;
191
191
  isDeleted: boolean;
192
192
  isFavorite: boolean;
193
193
  isFrozen: boolean;
194
194
  name: string;
195
- updatedAt: string | null;
195
+ updatedAt: Date | null;
196
196
  viewStyle: string;
197
197
  defaultOrder: number;
198
198
  description: string;
@@ -214,13 +214,13 @@ export declare const validateWorkspaceProject: (input: unknown) => {
214
214
  canAssignTasks: boolean;
215
215
  childOrder: number;
216
216
  color: string;
217
- createdAt: string | null;
217
+ createdAt: Date | null;
218
218
  isArchived: boolean;
219
219
  isDeleted: boolean;
220
220
  isFavorite: boolean;
221
221
  isFrozen: boolean;
222
222
  name: string;
223
- updatedAt: string | null;
223
+ updatedAt: Date | null;
224
224
  viewStyle: string;
225
225
  defaultOrder: number;
226
226
  description: string;
@@ -242,9 +242,9 @@ export declare const validateSection: (input: unknown) => {
242
242
  id: string;
243
243
  userId: string;
244
244
  projectId: string;
245
- addedAt: string;
246
- updatedAt: string;
247
- archivedAt: string | null;
245
+ addedAt: Date;
246
+ updatedAt: Date;
247
+ archivedAt: Date | null;
248
248
  name: string;
249
249
  sectionOrder: number;
250
250
  isArchived: boolean;
@@ -255,9 +255,9 @@ export declare const validateSection: (input: unknown) => {
255
255
  id: string;
256
256
  userId: string;
257
257
  projectId: string;
258
- addedAt: string;
259
- updatedAt: string;
260
- archivedAt: string | null;
258
+ addedAt: Date;
259
+ updatedAt: Date;
260
+ archivedAt: Date | null;
261
261
  name: string;
262
262
  sectionOrder: number;
263
263
  isArchived: boolean;
@@ -281,7 +281,7 @@ export declare const validateComment: (input: unknown) => {
281
281
  taskId: string | undefined;
282
282
  id: string;
283
283
  content: string;
284
- postedAt: string;
284
+ postedAt: Date;
285
285
  fileAttachment: {
286
286
  resourceType: string;
287
287
  fileName?: string | null | undefined;
@@ -305,7 +305,7 @@ export declare const validateComment: (input: unknown) => {
305
305
  taskId: string | undefined;
306
306
  id: string;
307
307
  content: string;
308
- postedAt: string;
308
+ postedAt: Date;
309
309
  fileAttachment: {
310
310
  resourceType: string;
311
311
  fileName?: string | null | undefined;
@@ -449,7 +449,7 @@ export declare const validateActivityEvent: (input: unknown) => {
449
449
  objectType: string;
450
450
  objectId: string;
451
451
  eventType: string;
452
- eventDate: string;
452
+ eventDate: Date;
453
453
  id: string | null;
454
454
  parentProjectId: string | null;
455
455
  parentItemId: string | null;
@@ -460,7 +460,7 @@ export declare const validateActivityEvent: (input: unknown) => {
460
460
  objectType: string;
461
461
  objectId: string;
462
462
  eventType: string;
463
- eventDate: string;
463
+ eventDate: Date;
464
464
  id: string | null;
465
465
  parentProjectId: string | null;
466
466
  parentItemId: string | null;
@@ -528,7 +528,7 @@ export declare const validateWorkspacePlanDetails: (input: unknown) => {
528
528
  interval?: string | undefined;
529
529
  formatted?: string | undefined;
530
530
  }[];
531
- workspaceId: number;
531
+ workspaceId: string;
532
532
  isTrialing: boolean;
533
533
  trialEndsAt: string | null;
534
534
  cancelAtPeriodEnd: boolean;
@@ -549,7 +549,7 @@ export declare const validateJoinWorkspaceResult: (input: unknown) => {
549
549
  workspaceId: string;
550
550
  };
551
551
  export declare const validateWorkspace: (input: unknown) => {
552
- createdAt: string | undefined;
552
+ createdAt: Date | undefined;
553
553
  id: string;
554
554
  name: string;
555
555
  plan: "STARTER" | "BUSINESS";
@@ -569,7 +569,7 @@ export declare const validateWorkspace: (input: unknown) => {
569
569
  logoSmall?: string | null | undefined;
570
570
  logoS640?: string | null | undefined;
571
571
  }, validateWorkspaceArray: (input: unknown) => {
572
- createdAt: string | undefined;
572
+ createdAt: Date | undefined;
573
573
  id: string;
574
574
  name: string;
575
575
  plan: "STARTER" | "BUSINESS";
@@ -667,7 +667,7 @@ export declare const validateProjectHealth: (input: unknown) => {
667
667
  recommendation: string;
668
668
  }[] | null | undefined;
669
669
  projectId?: string | null | undefined;
670
- updatedAt?: string | null | undefined;
670
+ updatedAt?: Date | null | undefined;
671
671
  };
672
672
  export declare const validateProjectHealthContext: (input: unknown) => {
673
673
  projectId: string;
@@ -686,9 +686,9 @@ export declare const validateProjectHealthContext: (input: unknown) => {
686
686
  content: string;
687
687
  priority: string;
688
688
  isCompleted: boolean;
689
- createdAt: string;
690
- updatedAt: string;
691
- completedAt: string | null;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ completedAt: Date | null;
692
692
  completedByUid: string | null;
693
693
  labels: string[];
694
694
  due?: string | null | undefined;
@@ -717,7 +717,7 @@ export declare const validateWorkspaceInsights: (input: unknown) => {
717
717
  recommendation: string;
718
718
  }[] | null | undefined;
719
719
  projectId?: string | null | undefined;
720
- updatedAt?: string | null | undefined;
720
+ updatedAt?: Date | null | undefined;
721
721
  } | null;
722
722
  progress: {
723
723
  projectId: string;
@@ -816,58 +816,11 @@ export declare const validateFolder: (input: unknown) => {
816
816
  defaultOrder: number;
817
817
  childOrder: number;
818
818
  }[];
819
- export declare const validateGoal: (input: unknown) => {
820
- [x: string]: unknown;
821
- id: string;
822
- ownerType: "USER" | "WORKSPACE";
823
- ownerId: string;
824
- name: string;
825
- description: string | null;
826
- deadline: string | null;
827
- parentGoalId: string | null;
828
- childOrder: number;
829
- isCompleted: boolean;
830
- completedAt: Date | null;
831
- responsibleUid: string | null;
832
- isDeleted: boolean;
833
- creatorUid: string;
834
- createdAt: Date;
835
- updatedAt: Date;
836
- progress?: {
837
- [x: string]: unknown;
838
- totalTaskCount: number;
839
- completedTaskCount: number;
840
- percentage: number;
841
- } | undefined;
842
- }, validateGoalArray: (input: unknown) => {
843
- [x: string]: unknown;
844
- id: string;
845
- ownerType: "USER" | "WORKSPACE";
846
- ownerId: string;
847
- name: string;
848
- description: string | null;
849
- deadline: string | null;
850
- parentGoalId: string | null;
851
- childOrder: number;
852
- isCompleted: boolean;
853
- completedAt: Date | null;
854
- responsibleUid: string | null;
855
- isDeleted: boolean;
856
- creatorUid: string;
857
- createdAt: Date;
858
- updatedAt: Date;
859
- progress?: {
860
- [x: string]: unknown;
861
- totalTaskCount: number;
862
- completedTaskCount: number;
863
- percentage: number;
864
- } | undefined;
865
- }[];
866
819
  export declare const validateNote: (input: unknown) => {
867
820
  [x: string]: unknown;
868
821
  id: string;
869
822
  content: string;
870
- postedAt: string;
823
+ postedAt: Date;
871
824
  fileAttachment: {
872
825
  resourceType: string;
873
826
  fileName?: string | null | undefined;
@@ -892,7 +845,7 @@ export declare const validateNote: (input: unknown) => {
892
845
  [x: string]: unknown;
893
846
  id: string;
894
847
  content: string;
895
- postedAt: string;
848
+ postedAt: Date;
896
849
  fileAttachment: {
897
850
  resourceType: string;
898
851
  fileName?: string | null | undefined;
@@ -932,8 +885,8 @@ export declare const validateWorkspaceFilter: (input: unknown) => {
932
885
  isFrozen: boolean;
933
886
  creatorUid: string;
934
887
  updaterUid: string;
935
- createdAt: string;
936
- updatedAt: string;
888
+ createdAt: Date;
889
+ updatedAt: Date;
937
890
  }, validateWorkspaceFilterArray: (input: unknown) => {
938
891
  [x: string]: unknown;
939
892
  id: string;
@@ -947,8 +900,8 @@ export declare const validateWorkspaceFilter: (input: unknown) => {
947
900
  isFrozen: boolean;
948
901
  creatorUid: string;
949
902
  updaterUid: string;
950
- createdAt: string;
951
- updatedAt: string;
903
+ createdAt: Date;
904
+ updatedAt: Date;
952
905
  }[];
953
906
  export declare const validateWorkspaceGoal: (input: unknown) => {
954
907
  [x: string]: unknown;
@@ -965,8 +918,8 @@ export declare const validateWorkspaceGoal: (input: unknown) => {
965
918
  totalItems: number;
966
919
  } | null;
967
920
  creatorUid: string;
968
- createdAt: string;
969
- updatedAt: string;
921
+ createdAt: Date;
922
+ updatedAt: Date;
970
923
  }, validateWorkspaceGoalArray: (input: unknown) => {
971
924
  [x: string]: unknown;
972
925
  id: string;
@@ -982,8 +935,8 @@ export declare const validateWorkspaceGoal: (input: unknown) => {
982
935
  totalItems: number;
983
936
  } | null;
984
937
  creatorUid: string;
985
- createdAt: string;
986
- updatedAt: string;
938
+ createdAt: Date;
939
+ updatedAt: Date;
987
940
  }[];
988
941
  export declare const validateCalendar: (input: unknown) => {
989
942
  [x: string]: unknown;
@@ -1184,29 +1137,29 @@ export declare const validateViewOptions: (input: unknown) => {
1184
1137
  [x: string]: unknown;
1185
1138
  viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
1186
1139
  objectId?: string | undefined;
1187
- groupedBy?: "WORKSPACE" | "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1140
+ groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1188
1141
  filteredBy?: string | null | undefined;
1189
1142
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
1190
1143
  showCompletedTasks?: boolean | undefined;
1191
- sortedBy?: "WORKSPACE" | "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1144
+ sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1192
1145
  sortOrder?: "ASC" | "DESC" | null | undefined;
1193
1146
  }, validateViewOptionsArray: (input: unknown) => {
1194
1147
  [x: string]: unknown;
1195
1148
  viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
1196
1149
  objectId?: string | undefined;
1197
- groupedBy?: "WORKSPACE" | "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1150
+ groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1198
1151
  filteredBy?: string | null | undefined;
1199
1152
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
1200
1153
  showCompletedTasks?: boolean | undefined;
1201
- sortedBy?: "WORKSPACE" | "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1154
+ sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1202
1155
  sortOrder?: "ASC" | "DESC" | null | undefined;
1203
1156
  }[];
1204
1157
  export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
1205
1158
  [x: string]: unknown;
1206
1159
  projectId: string;
1207
1160
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
1208
- groupedBy?: "WORKSPACE" | "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1209
- sortedBy?: "WORKSPACE" | "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1161
+ groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1162
+ sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1210
1163
  sortOrder?: "ASC" | "DESC" | null | undefined;
1211
1164
  showCompletedTasks?: boolean | undefined;
1212
1165
  filteredBy?: string | null | undefined;
@@ -1218,8 +1171,8 @@ export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
1218
1171
  [x: string]: unknown;
1219
1172
  projectId: string;
1220
1173
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
1221
- groupedBy?: "WORKSPACE" | "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1222
- sortedBy?: "WORKSPACE" | "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1174
+ groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1175
+ sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1223
1176
  sortOrder?: "ASC" | "DESC" | null | undefined;
1224
1177
  showCompletedTasks?: boolean | undefined;
1225
1178
  filteredBy?: string | null | undefined;
@@ -1260,7 +1213,7 @@ export declare const validateUserPlanLimits: (input: unknown) => {
1260
1213
  export declare const validateLiveNotification: (input: unknown) => {
1261
1214
  [x: string]: unknown;
1262
1215
  id: string;
1263
- createdAt: string;
1216
+ createdAt: Date;
1264
1217
  fromUid: string;
1265
1218
  notificationType: string;
1266
1219
  isUnread: boolean;
@@ -1282,7 +1235,7 @@ export declare const validateLiveNotification: (input: unknown) => {
1282
1235
  }, validateLiveNotificationArray: (input: unknown) => {
1283
1236
  [x: string]: unknown;
1284
1237
  id: string;
1285
- createdAt: string;
1238
+ createdAt: Date;
1286
1239
  fromUid: string;
1287
1240
  notificationType: string;
1288
1241
  isUnread: boolean;
@@ -1303,7 +1256,7 @@ export declare const validateLiveNotification: (input: unknown) => {
1303
1256
  invitationSecret?: string | undefined;
1304
1257
  }[];
1305
1258
  export declare const validateSyncWorkspace: (input: unknown) => {
1306
- createdAt: string | undefined;
1259
+ createdAt: Date | undefined;
1307
1260
  id: string;
1308
1261
  name: string;
1309
1262
  description: string;
@@ -1340,11 +1293,11 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1340
1293
  projectSortPreference?: string | undefined;
1341
1294
  defaultCollaborators?: {
1342
1295
  predefinedGroupIds: string[];
1343
- userIds: number[];
1296
+ userIds: string[];
1344
1297
  } | undefined;
1345
1298
  properties?: Record<string, unknown> | undefined;
1346
1299
  }, validateSyncWorkspaceArray: (input: unknown) => {
1347
- createdAt: string | undefined;
1300
+ createdAt: Date | undefined;
1348
1301
  id: string;
1349
1302
  name: string;
1350
1303
  description: string;
@@ -1381,7 +1334,7 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1381
1334
  projectSortPreference?: string | undefined;
1382
1335
  defaultCollaborators?: {
1383
1336
  predefinedGroupIds: string[];
1384
- userIds: number[];
1337
+ userIds: string[];
1385
1338
  } | undefined;
1386
1339
  properties?: Record<string, unknown> | undefined;
1387
1340
  }[];
@@ -1423,7 +1376,7 @@ export declare const validateSyncUser: (input: unknown) => {
1423
1376
  workspaceName: string;
1424
1377
  memberCount: number;
1425
1378
  } | null;
1426
- joinedAt: string;
1379
+ joinedAt: Date;
1427
1380
  gettingStartedGuideProjects: {
1428
1381
  [x: string]: unknown;
1429
1382
  onboardingUseCase: string;
@@ -1438,7 +1391,7 @@ export declare const validateSyncUser: (input: unknown) => {
1438
1391
  mobileNumber: string | null;
1439
1392
  nextWeek: "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday";
1440
1393
  premiumStatus: "not_premium" | "current_personal_plan" | "legacy_personal_plan" | "teams_business_member";
1441
- premiumUntil: string | null;
1394
+ premiumUntil: Date | null;
1442
1395
  shareLimit: number;
1443
1396
  sortOrder: number;
1444
1397
  startDay: "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday";
@@ -1463,7 +1416,7 @@ export declare const validateSyncUser: (input: unknown) => {
1463
1416
  avatarMedium?: string | undefined;
1464
1417
  avatarS640?: string | undefined;
1465
1418
  avatarSmall?: string | undefined;
1466
- freeTrailExpires?: string | undefined;
1419
+ freeTrailExpires?: Date | undefined;
1467
1420
  hasStartedATrial?: boolean | undefined;
1468
1421
  mfaEnabled?: boolean | undefined;
1469
1422
  onboardingLevel?: string | null | undefined;
@@ -1478,7 +1431,7 @@ export declare const validateSyncUser: (input: unknown) => {
1478
1431
  currentCount: number;
1479
1432
  limit: number;
1480
1433
  remaining: number;
1481
- resetDate: string;
1434
+ resetDate: Date;
1482
1435
  } | null | undefined;
1483
1436
  };
1484
1437
  export declare const validateUserSettings: (input: unknown) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-sdk",
3
- "version": "8.5.0-next.1",
3
+ "version": "9.0.0",
4
4
  "description": "The official TypeScript SDK for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "https://github.com/Doist/todoist-sdk-typescript",
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- __exportStar(require("./requests"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GoalSchema = exports.GoalProgressSchema = exports.GOAL_OWNER_TYPES = void 0;
4
- const zod_1 = require("zod");
5
- /** Available goal owner types. */
6
- exports.GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
7
- exports.GoalProgressSchema = zod_1.z.looseObject({
8
- totalTaskCount: zod_1.z.number().int(),
9
- completedTaskCount: zod_1.z.number().int(),
10
- percentage: zod_1.z.number(),
11
- });
12
- exports.GoalSchema = zod_1.z.looseObject({
13
- id: zod_1.z.string(),
14
- ownerType: zod_1.z.enum(exports.GOAL_OWNER_TYPES),
15
- ownerId: zod_1.z.string(),
16
- name: zod_1.z.string(),
17
- description: zod_1.z.string().nullable(),
18
- deadline: zod_1.z.string().nullable(),
19
- parentGoalId: zod_1.z.string().nullable(),
20
- childOrder: zod_1.z.number().int(),
21
- isCompleted: zod_1.z.boolean(),
22
- completedAt: zod_1.z.coerce.date().nullable(),
23
- responsibleUid: zod_1.z.string().nullable(),
24
- isDeleted: zod_1.z.boolean(),
25
- progress: exports.GoalProgressSchema.optional(),
26
- creatorUid: zod_1.z.string(),
27
- createdAt: zod_1.z.coerce.date(),
28
- updatedAt: zod_1.z.coerce.date(),
29
- });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from './types.js';
2
- export * from './requests.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- import { z } from 'zod';
2
- /** Available goal owner types. */
3
- export const GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
4
- export const GoalProgressSchema = z.looseObject({
5
- totalTaskCount: z.number().int(),
6
- completedTaskCount: z.number().int(),
7
- percentage: z.number(),
8
- });
9
- export const GoalSchema = z.looseObject({
10
- id: z.string(),
11
- ownerType: z.enum(GOAL_OWNER_TYPES),
12
- ownerId: z.string(),
13
- name: z.string(),
14
- description: z.string().nullable(),
15
- deadline: z.string().nullable(),
16
- parentGoalId: z.string().nullable(),
17
- childOrder: z.number().int(),
18
- isCompleted: z.boolean(),
19
- completedAt: z.coerce.date().nullable(),
20
- responsibleUid: z.string().nullable(),
21
- isDeleted: z.boolean(),
22
- progress: GoalProgressSchema.optional(),
23
- creatorUid: z.string(),
24
- createdAt: z.coerce.date(),
25
- updatedAt: z.coerce.date(),
26
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './types.js';
2
- export * from './requests.js';
@@ -1,33 +0,0 @@
1
- import type { SearchArgs } from '../common.js';
2
- import type { Workspace } from '../workspaces/index.js';
3
- import type { Goal, GoalOwnerType } from './types.js';
4
- export type GetGoalsArgs = {
5
- ownerType?: GoalOwnerType;
6
- workspaceId?: Workspace['id'];
7
- cursor?: string | null;
8
- limit?: number;
9
- };
10
- export type SearchGoalsArgs = SearchArgs & {
11
- ownerType?: GoalOwnerType;
12
- };
13
- export type GetGoalsResponse = {
14
- results: Goal[];
15
- nextCursor: string | null;
16
- };
17
- export type AddGoalArgs = {
18
- name: string;
19
- workspaceId?: string;
20
- description?: string | null;
21
- deadline?: string | null;
22
- responsibleUid?: string | null;
23
- };
24
- export type UpdateGoalArgs = {
25
- name?: string;
26
- description?: string | null;
27
- deadline?: string | null;
28
- responsibleUid?: string | null;
29
- };
30
- export type TaskLinkingArgs = {
31
- goalId: string;
32
- taskId: string;
33
- };
@@ -1,41 +0,0 @@
1
- import { z } from 'zod';
2
- /** Available goal owner types. */
3
- export declare const GOAL_OWNER_TYPES: readonly ["USER", "WORKSPACE"];
4
- /** Goal owner type. */
5
- export type GoalOwnerType = (typeof GOAL_OWNER_TYPES)[number];
6
- export declare const GoalProgressSchema: z.ZodObject<{
7
- totalTaskCount: z.ZodNumber;
8
- completedTaskCount: z.ZodNumber;
9
- percentage: z.ZodNumber;
10
- }, z.core.$loose>;
11
- export type GoalProgress = z.infer<typeof GoalProgressSchema>;
12
- export declare const GoalSchema: z.ZodObject<{
13
- id: z.ZodString;
14
- ownerType: z.ZodEnum<{
15
- USER: "USER";
16
- WORKSPACE: "WORKSPACE";
17
- }>;
18
- ownerId: z.ZodString;
19
- name: z.ZodString;
20
- description: z.ZodNullable<z.ZodString>;
21
- deadline: z.ZodNullable<z.ZodString>;
22
- parentGoalId: z.ZodNullable<z.ZodString>;
23
- childOrder: z.ZodNumber;
24
- isCompleted: z.ZodBoolean;
25
- completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
26
- responsibleUid: z.ZodNullable<z.ZodString>;
27
- isDeleted: z.ZodBoolean;
28
- progress: z.ZodOptional<z.ZodObject<{
29
- totalTaskCount: z.ZodNumber;
30
- completedTaskCount: z.ZodNumber;
31
- percentage: z.ZodNumber;
32
- }, z.core.$loose>>;
33
- creatorUid: z.ZodString;
34
- createdAt: z.ZodCoercedDate<unknown>;
35
- updatedAt: z.ZodCoercedDate<unknown>;
36
- }, z.core.$loose>;
37
- /**
38
- * Represents a goal in Todoist.
39
- * Goals support dual ownership: personal (ownerType=USER) and workspace (ownerType=WORKSPACE).
40
- */
41
- export type Goal = z.infer<typeof GoalSchema>;