@doist/todoist-sdk 14.2.0 → 15.0.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.
Files changed (174) hide show
  1. package/dist/esm/types/sync/resources/index.js +1 -0
  2. package/dist/esm/types/sync/resources/labels.js +7 -0
  3. package/dist/esm/types/sync/resources/reminders.js +11 -0
  4. package/dist/esm/types/sync/response.js +3 -4
  5. package/dist/esm/utils/index.js +1 -1
  6. package/dist/esm/utils/url-helpers.js +151 -23
  7. package/dist/types/types/sync/resources/index.d.ts +1 -0
  8. package/dist/types/types/sync/resources/labels.d.ts +12 -0
  9. package/dist/types/types/sync/resources/reminders.d.ts +87 -0
  10. package/dist/types/types/sync/response.d.ts +8 -7
  11. package/dist/types/utils/index.d.ts +2 -1
  12. package/dist/types/utils/url-helpers.d.ts +88 -0
  13. package/package.json +5 -10
  14. package/dist/cjs/authentication.js +0 -317
  15. package/dist/cjs/clients/activity-client.js +0 -63
  16. package/dist/cjs/clients/app-client.js +0 -345
  17. package/dist/cjs/clients/backup-client.js +0 -47
  18. package/dist/cjs/clients/base-client.js +0 -31
  19. package/dist/cjs/clients/billing-client.js +0 -152
  20. package/dist/cjs/clients/comment-client.js +0 -91
  21. package/dist/cjs/clients/email-client.js +0 -43
  22. package/dist/cjs/clients/folder-client.js +0 -79
  23. package/dist/cjs/clients/id-mapping-client.js +0 -39
  24. package/dist/cjs/clients/insights-client.js +0 -87
  25. package/dist/cjs/clients/label-client.js +0 -126
  26. package/dist/cjs/clients/productivity-client.js +0 -27
  27. package/dist/cjs/clients/project-client.js +0 -235
  28. package/dist/cjs/clients/reminder-client.js +0 -198
  29. package/dist/cjs/clients/section-client.js +0 -117
  30. package/dist/cjs/clients/task-client.js +0 -254
  31. package/dist/cjs/clients/template-client.js +0 -88
  32. package/dist/cjs/clients/ui-extension-client.js +0 -107
  33. package/dist/cjs/clients/upload-client.js +0 -155
  34. package/dist/cjs/clients/view-options-client.js +0 -25
  35. package/dist/cjs/clients/workspace-client.js +0 -366
  36. package/dist/cjs/consts/endpoints.js +0 -224
  37. package/dist/cjs/index.js +0 -24
  38. package/dist/cjs/package.json +0 -1
  39. package/dist/cjs/test-utils/asserts.js +0 -11
  40. package/dist/cjs/test-utils/msw-setup.js +0 -97
  41. package/dist/cjs/test-utils/obsidian-fetch-adapter.js +0 -54
  42. package/dist/cjs/test-utils/test-defaults.js +0 -371
  43. package/dist/cjs/test-utils/transport-seam.js +0 -17
  44. package/dist/cjs/test-utils/webhook-fixtures.js +0 -32
  45. package/dist/cjs/todoist-api.js +0 -1711
  46. package/dist/cjs/transport/fetch-with-retry.js +0 -219
  47. package/dist/cjs/transport/http-client.js +0 -134
  48. package/dist/cjs/transport/http-dispatcher.js +0 -198
  49. package/dist/cjs/transport/sync-request.js +0 -83
  50. package/dist/cjs/types/activity/index.js +0 -18
  51. package/dist/cjs/types/activity/requests.js +0 -2
  52. package/dist/cjs/types/activity/types.js +0 -28
  53. package/dist/cjs/types/apps/index.js +0 -18
  54. package/dist/cjs/types/apps/requests.js +0 -2
  55. package/dist/cjs/types/apps/types.js +0 -254
  56. package/dist/cjs/types/backups/index.js +0 -18
  57. package/dist/cjs/types/backups/requests.js +0 -2
  58. package/dist/cjs/types/backups/types.js +0 -8
  59. package/dist/cjs/types/billing/index.js +0 -18
  60. package/dist/cjs/types/billing/requests.js +0 -2
  61. package/dist/cjs/types/billing/types.js +0 -92
  62. package/dist/cjs/types/comments/index.js +0 -18
  63. package/dist/cjs/types/comments/requests.js +0 -2
  64. package/dist/cjs/types/comments/types.js +0 -60
  65. package/dist/cjs/types/common.js +0 -10
  66. package/dist/cjs/types/emails/index.js +0 -17
  67. package/dist/cjs/types/emails/requests.js +0 -5
  68. package/dist/cjs/types/errors.js +0 -29
  69. package/dist/cjs/types/folders/index.js +0 -17
  70. package/dist/cjs/types/folders/requests.js +0 -2
  71. package/dist/cjs/types/http.js +0 -24
  72. package/dist/cjs/types/id-mappings/index.js +0 -18
  73. package/dist/cjs/types/id-mappings/requests.js +0 -20
  74. package/dist/cjs/types/id-mappings/types.js +0 -12
  75. package/dist/cjs/types/index.js +0 -40
  76. package/dist/cjs/types/insights/index.js +0 -18
  77. package/dist/cjs/types/insights/requests.js +0 -2
  78. package/dist/cjs/types/insights/types.js +0 -80
  79. package/dist/cjs/types/labels/index.js +0 -18
  80. package/dist/cjs/types/labels/requests.js +0 -2
  81. package/dist/cjs/types/labels/types.js +0 -11
  82. package/dist/cjs/types/productivity/index.js +0 -17
  83. package/dist/cjs/types/productivity/types.js +0 -68
  84. package/dist/cjs/types/projects/index.js +0 -18
  85. package/dist/cjs/types/projects/requests.js +0 -2
  86. package/dist/cjs/types/projects/types.js +0 -66
  87. package/dist/cjs/types/reminders/index.js +0 -17
  88. package/dist/cjs/types/reminders/requests.js +0 -95
  89. package/dist/cjs/types/sections/index.js +0 -18
  90. package/dist/cjs/types/sections/requests.js +0 -2
  91. package/dist/cjs/types/sections/types.js +0 -25
  92. package/dist/cjs/types/sync/commands/calendars.js +0 -2
  93. package/dist/cjs/types/sync/commands/filters.js +0 -2
  94. package/dist/cjs/types/sync/commands/folders.js +0 -2
  95. package/dist/cjs/types/sync/commands/index.js +0 -34
  96. package/dist/cjs/types/sync/commands/labels.js +0 -5
  97. package/dist/cjs/types/sync/commands/notes.js +0 -2
  98. package/dist/cjs/types/sync/commands/notifications.js +0 -2
  99. package/dist/cjs/types/sync/commands/others.js +0 -2
  100. package/dist/cjs/types/sync/commands/project-view-options.js +0 -2
  101. package/dist/cjs/types/sync/commands/projects.js +0 -2
  102. package/dist/cjs/types/sync/commands/reminders.js +0 -2
  103. package/dist/cjs/types/sync/commands/sections.js +0 -2
  104. package/dist/cjs/types/sync/commands/shared.js +0 -20
  105. package/dist/cjs/types/sync/commands/sharing.js +0 -2
  106. package/dist/cjs/types/sync/commands/tasks.js +0 -2
  107. package/dist/cjs/types/sync/commands/view-options.js +0 -2
  108. package/dist/cjs/types/sync/commands/workspace-filters.js +0 -2
  109. package/dist/cjs/types/sync/commands/workspaces.js +0 -2
  110. package/dist/cjs/types/sync/index.js +0 -22
  111. package/dist/cjs/types/sync/request.js +0 -2
  112. package/dist/cjs/types/sync/resource-types.js +0 -39
  113. package/dist/cjs/types/sync/resources/calendars.js +0 -27
  114. package/dist/cjs/types/sync/resources/collaborators.js +0 -21
  115. package/dist/cjs/types/sync/resources/completed-info.js +0 -24
  116. package/dist/cjs/types/sync/resources/filters.js +0 -14
  117. package/dist/cjs/types/sync/resources/folders.js +0 -12
  118. package/dist/cjs/types/sync/resources/index.js +0 -32
  119. package/dist/cjs/types/sync/resources/live-notifications.js +0 -38
  120. package/dist/cjs/types/sync/resources/notes.js +0 -21
  121. package/dist/cjs/types/sync/resources/reminders.js +0 -50
  122. package/dist/cjs/types/sync/resources/suggestions.js +0 -36
  123. package/dist/cjs/types/sync/resources/tooltips.js +0 -8
  124. package/dist/cjs/types/sync/resources/user-plan-limits.js +0 -20
  125. package/dist/cjs/types/sync/resources/user-settings.js +0 -40
  126. package/dist/cjs/types/sync/resources/user.js +0 -110
  127. package/dist/cjs/types/sync/resources/view-options.js +0 -86
  128. package/dist/cjs/types/sync/resources/workspace-filters.js +0 -19
  129. package/dist/cjs/types/sync/resources/workspaces.js +0 -72
  130. package/dist/cjs/types/sync/response.js +0 -54
  131. package/dist/cjs/types/sync/user-preferences.js +0 -71
  132. package/dist/cjs/types/tasks/index.js +0 -18
  133. package/dist/cjs/types/tasks/requests.js +0 -2
  134. package/dist/cjs/types/tasks/types.js +0 -59
  135. package/dist/cjs/types/templates/index.js +0 -17
  136. package/dist/cjs/types/templates/requests.js +0 -2
  137. package/dist/cjs/types/ui-extensions/index.js +0 -18
  138. package/dist/cjs/types/ui-extensions/requests.js +0 -2
  139. package/dist/cjs/types/ui-extensions/types.js +0 -77
  140. package/dist/cjs/types/uploads/index.js +0 -17
  141. package/dist/cjs/types/uploads/requests.js +0 -2
  142. package/dist/cjs/types/users/index.js +0 -17
  143. package/dist/cjs/types/users/types.js +0 -51
  144. package/dist/cjs/types/webhooks/comments.js +0 -96
  145. package/dist/cjs/types/webhooks/envelope.js +0 -26
  146. package/dist/cjs/types/webhooks/filters.js +0 -30
  147. package/dist/cjs/types/webhooks/index.js +0 -25
  148. package/dist/cjs/types/webhooks/labels.js +0 -54
  149. package/dist/cjs/types/webhooks/projects.js +0 -36
  150. package/dist/cjs/types/webhooks/reminders.js +0 -35
  151. package/dist/cjs/types/webhooks/sections.js +0 -53
  152. package/dist/cjs/types/webhooks/tasks.js +0 -68
  153. package/dist/cjs/types/webhooks/types.js +0 -55
  154. package/dist/cjs/types/workspaces/index.js +0 -18
  155. package/dist/cjs/types/workspaces/requests.js +0 -2
  156. package/dist/cjs/types/workspaces/types.js +0 -154
  157. package/dist/cjs/utils/activity-helpers.js +0 -58
  158. package/dist/cjs/utils/case-conversion.js +0 -69
  159. package/dist/cjs/utils/colors.js +0 -143
  160. package/dist/cjs/utils/file-response.js +0 -32
  161. package/dist/cjs/utils/headers.js +0 -16
  162. package/dist/cjs/utils/index.js +0 -31
  163. package/dist/cjs/utils/multipart-upload.js +0 -293
  164. package/dist/cjs/utils/processing-helpers.js +0 -18
  165. package/dist/cjs/utils/project-helpers.js +0 -20
  166. package/dist/cjs/utils/request-helpers.js +0 -21
  167. package/dist/cjs/utils/sanitization.js +0 -116
  168. package/dist/cjs/utils/sync-helpers.js +0 -22
  169. package/dist/cjs/utils/task-sorting.js +0 -281
  170. package/dist/cjs/utils/uncompletable-helpers.js +0 -60
  171. package/dist/cjs/utils/url-helpers.js +0 -74
  172. package/dist/cjs/utils/validators.js +0 -108
  173. package/dist/cjs/utils/view-options.js +0 -19
  174. package/dist/cjs/utils/webhook-parser.js +0 -60
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /**
3
- * Shared types used across multiple Sync API command argument types.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WORKSPACE_PROJECT_SORT_ORDERS = exports.REMINDER_SERVICES = exports.COLLABORATOR_ROLES = exports.PROJECT_STATUSES = void 0;
7
- /** Available project workflow statuses. */
8
- exports.PROJECT_STATUSES = [
9
- 'PLANNED',
10
- 'IN_PROGRESS',
11
- 'PAUSED',
12
- 'COMPLETED',
13
- 'CANCELED',
14
- ];
15
- var types_1 = require("../../workspaces/types");
16
- Object.defineProperty(exports, "COLLABORATOR_ROLES", { enumerable: true, get: function () { return types_1.COLLABORATOR_ROLES; } });
17
- /** Available reminder notification services. */
18
- exports.REMINDER_SERVICES = ['default', 'email', 'mobile', 'push', 'no_default'];
19
- /** Available workspace project sort orders. */
20
- exports.WORKSPACE_PROJECT_SORT_ORDERS = ['MANUAL', 'A_TO_Z', 'Z_TO_A'];
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,22 +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("./commands"), exports);
18
- __exportStar(require("./resources"), exports);
19
- __exportStar(require("./resource-types"), exports);
20
- __exportStar(require("./request"), exports);
21
- __exportStar(require("./response"), exports);
22
- __exportStar(require("./user-preferences"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SYNC_RESOURCE_TYPES = void 0;
4
- /**
5
- * All available Sync API resource types.
6
- */
7
- exports.SYNC_RESOURCE_TYPES = [
8
- 'labels',
9
- 'projects',
10
- 'items',
11
- 'notes',
12
- 'project_notes',
13
- 'sections',
14
- 'filters',
15
- 'reminders',
16
- 'reminders_location',
17
- 'locations',
18
- 'user',
19
- 'live_notifications',
20
- 'collaborators',
21
- 'collaborator_states',
22
- 'user_settings',
23
- 'notification_settings',
24
- 'user_plan_limits',
25
- 'completed_info',
26
- 'stats',
27
- 'workspaces',
28
- 'workspace_users',
29
- 'workspace_filters',
30
- 'view_options',
31
- 'project_view_options_defaults',
32
- 'role_actions',
33
- 'folders',
34
- 'day_orders',
35
- 'calendars',
36
- 'calendar_accounts',
37
- 'suggestions',
38
- 'tooltips',
39
- ];
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CalendarAccountSchema = exports.CALENDAR_SYNC_STATES = exports.CALENDAR_ACCOUNT_TYPES = exports.CalendarSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.CalendarSchema = zod_1.z.looseObject({
6
- id: zod_1.z.string(),
7
- summary: zod_1.z.string(),
8
- color: zod_1.z.string().nullable(),
9
- accountId: zod_1.z.string(),
10
- isVisible: zod_1.z.boolean(),
11
- isTaskCalendar: zod_1.z.boolean().optional(),
12
- });
13
- /** Available calendar account provider types. */
14
- exports.CALENDAR_ACCOUNT_TYPES = ['google', 'microsoft', 'apple'];
15
- /** Available calendar sync states. */
16
- exports.CALENDAR_SYNC_STATES = ['synced', 'syncing', 'error'];
17
- exports.CalendarAccountSchema = zod_1.z.looseObject({
18
- id: zod_1.z.string(),
19
- name: zod_1.z.string(),
20
- type: zod_1.z.enum(exports.CALENDAR_ACCOUNT_TYPES),
21
- isDeleted: zod_1.z.boolean().optional(),
22
- isEventsEnabled: zod_1.z.boolean().optional(),
23
- isTasksEnabled: zod_1.z.boolean().optional(),
24
- isAllDayTasksEnabled: zod_1.z.boolean().optional(),
25
- pendingOperationUntil: zod_1.z.string().nullable().optional(),
26
- calendarsSyncState: zod_1.z.enum(exports.CALENDAR_SYNC_STATES).optional(),
27
- });
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CollaboratorStateSchema = exports.COLLABORATOR_STATUSES = exports.CollaboratorSchema = void 0;
4
- const zod_1 = require("zod");
5
- const types_1 = require("../../workspaces/types");
6
- exports.CollaboratorSchema = zod_1.z.looseObject({
7
- id: zod_1.z.string(),
8
- email: zod_1.z.string(),
9
- fullName: zod_1.z.string(),
10
- timezone: zod_1.z.string(),
11
- imageId: zod_1.z.string().nullable(),
12
- });
13
- /** Available collaborator statuses. */
14
- exports.COLLABORATOR_STATUSES = ['active', 'invited'];
15
- exports.CollaboratorStateSchema = zod_1.z.looseObject({
16
- userId: zod_1.z.string(),
17
- projectId: zod_1.z.string(),
18
- state: zod_1.z.enum(exports.COLLABORATOR_STATUSES),
19
- isDeleted: zod_1.z.boolean(),
20
- workspaceRole: types_1.WorkspaceRoleSchema.optional(),
21
- });
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompletedInfoSchema = exports.CompletedTaskMetadataSchema = exports.CompletedSectionMetadataSchema = exports.CompletedProjectMetadataSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.CompletedProjectMetadataSchema = zod_1.z.looseObject({
6
- projectId: zod_1.z.string(),
7
- archivedSections: zod_1.z.number().int(),
8
- completedItems: zod_1.z.number().int(),
9
- });
10
- exports.CompletedSectionMetadataSchema = zod_1.z.looseObject({
11
- sectionId: zod_1.z.string(),
12
- id: zod_1.z.string(),
13
- completedItems: zod_1.z.number().int(),
14
- });
15
- exports.CompletedTaskMetadataSchema = zod_1.z.looseObject({
16
- itemId: zod_1.z.string(),
17
- id: zod_1.z.string().optional(),
18
- completedItems: zod_1.z.number().int(),
19
- });
20
- exports.CompletedInfoSchema = zod_1.z.union([
21
- exports.CompletedProjectMetadataSchema,
22
- exports.CompletedSectionMetadataSchema,
23
- exports.CompletedTaskMetadataSchema,
24
- ]);
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilterSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.FilterSchema = zod_1.z.looseObject({
6
- id: zod_1.z.string(),
7
- name: zod_1.z.string(),
8
- query: zod_1.z.string(),
9
- color: zod_1.z.string(),
10
- isDeleted: zod_1.z.boolean(),
11
- isFavorite: zod_1.z.boolean(),
12
- isFrozen: zod_1.z.boolean(),
13
- itemOrder: zod_1.z.number().int(),
14
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FolderSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.FolderSchema = zod_1.z.looseObject({
6
- id: zod_1.z.string(),
7
- name: zod_1.z.string(),
8
- workspaceId: zod_1.z.string(),
9
- isDeleted: zod_1.z.boolean(),
10
- defaultOrder: zod_1.z.number().int(),
11
- childOrder: zod_1.z.number().int(),
12
- });
@@ -1,32 +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("./filters"), exports);
18
- __exportStar(require("./collaborators"), exports);
19
- __exportStar(require("./folders"), exports);
20
- __exportStar(require("./tooltips"), exports);
21
- __exportStar(require("./notes"), exports);
22
- __exportStar(require("./workspace-filters"), exports);
23
- __exportStar(require("./calendars"), exports);
24
- __exportStar(require("./reminders"), exports);
25
- __exportStar(require("./completed-info"), exports);
26
- __exportStar(require("./view-options"), exports);
27
- __exportStar(require("./user-plan-limits"), exports);
28
- __exportStar(require("./live-notifications"), exports);
29
- __exportStar(require("./workspaces"), exports);
30
- __exportStar(require("./user"), exports);
31
- __exportStar(require("./user-settings"), exports);
32
- __exportStar(require("./suggestions"), exports);
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LiveNotificationSchema = void 0;
4
- const zod_1 = require("zod");
5
- const common_1 = require("../../common");
6
- /**
7
- * Live notification resource from the Sync API.
8
- *
9
- * Uses a loose object schema with commonly-present fields for forward
10
- * compatibility. The Sync API returns 20+ notification variants; fully typing
11
- * each is too fragile for a library, so we validate the common shape and
12
- * preserve all extra fields.
13
- */
14
- exports.LiveNotificationSchema = zod_1.z.looseObject({
15
- id: zod_1.z.string(),
16
- createdAt: zod_1.z.coerce.date(),
17
- fromUid: zod_1.z.string().optional(),
18
- notificationType: zod_1.z.string(),
19
- isUnread: zod_1.z.boolean(),
20
- // Commonly present optional fields
21
- projectId: zod_1.z.string().optional(),
22
- invitationId: zod_1.z.string().optional(),
23
- itemId: zod_1.z.string().optional(),
24
- itemContent: zod_1.z.string().optional(),
25
- responsibleUid: zod_1.z.string().nullable().optional(),
26
- assignedByUid: zod_1.z.string().nullable().optional(),
27
- fromUser: zod_1.z
28
- .object({
29
- email: zod_1.z.string(),
30
- fullName: zod_1.z.string(),
31
- id: common_1.StringOrNumberSchema,
32
- imageId: zod_1.z.string().nullable(),
33
- })
34
- .optional(),
35
- projectName: zod_1.z.string().optional(),
36
- isDeleted: zod_1.z.boolean().optional(),
37
- invitationSecret: zod_1.z.string().optional(),
38
- });
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NoteSchema = void 0;
4
- const zod_1 = require("zod");
5
- const types_1 = require("../../comments/types");
6
- /**
7
- * Sync API note (comment) resource.
8
- * Separate from the REST `CommentSchema` which transforms `itemId` to `taskId`.
9
- */
10
- exports.NoteSchema = zod_1.z.looseObject({
11
- id: zod_1.z.string(),
12
- itemId: zod_1.z.string().optional(),
13
- projectId: zod_1.z.string().optional(),
14
- content: zod_1.z.string(),
15
- postedAt: zod_1.z.coerce.date(),
16
- fileAttachment: types_1.AttachmentSchema.nullable(),
17
- postedUid: zod_1.z.string(),
18
- uidsToNotify: zod_1.z.array(zod_1.z.string()).nullable(),
19
- reactions: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())).nullable(),
20
- isDeleted: zod_1.z.boolean(),
21
- });
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReminderSchema = exports.RelativeReminderSchema = exports.AbsoluteReminderSchema = exports.LocationReminderSchema = exports.LOCATION_TRIGGERS = exports.REMINDER_TYPES = exports.ReminderTypeEnum = exports.ReminderBaseSchema = void 0;
4
- const zod_1 = require("zod");
5
- const types_1 = require("../../tasks/types");
6
- exports.ReminderBaseSchema = zod_1.z.looseObject({
7
- id: zod_1.z.string(),
8
- notifyUid: zod_1.z.string(),
9
- itemId: zod_1.z.string(),
10
- projectId: zod_1.z.string().optional(),
11
- isDeleted: zod_1.z.boolean(),
12
- });
13
- /** Enum-like object of reminder type values. */
14
- exports.ReminderTypeEnum = {
15
- Relative: 'relative',
16
- Absolute: 'absolute',
17
- Location: 'location',
18
- };
19
- /** Available reminder types. */
20
- exports.REMINDER_TYPES = [
21
- exports.ReminderTypeEnum.Relative,
22
- exports.ReminderTypeEnum.Absolute,
23
- exports.ReminderTypeEnum.Location,
24
- ];
25
- /** Available location reminder triggers. */
26
- exports.LOCATION_TRIGGERS = ['on_enter', 'on_leave'];
27
- exports.LocationReminderSchema = exports.ReminderBaseSchema.extend({
28
- type: zod_1.z.literal(exports.ReminderTypeEnum.Location),
29
- name: zod_1.z.string(),
30
- locLat: zod_1.z.string(),
31
- locLong: zod_1.z.string(),
32
- locTrigger: zod_1.z.enum(exports.LOCATION_TRIGGERS),
33
- radius: zod_1.z.number().int(),
34
- });
35
- exports.AbsoluteReminderSchema = exports.ReminderBaseSchema.extend({
36
- type: zod_1.z.literal(exports.ReminderTypeEnum.Absolute),
37
- due: types_1.DueDateSchema,
38
- isUrgent: zod_1.z.boolean().optional(),
39
- });
40
- exports.RelativeReminderSchema = exports.ReminderBaseSchema.extend({
41
- type: zod_1.z.literal(exports.ReminderTypeEnum.Relative),
42
- minuteOffset: zod_1.z.number().int(),
43
- due: types_1.DueDateSchema.optional(),
44
- isUrgent: zod_1.z.boolean().optional(),
45
- });
46
- exports.ReminderSchema = zod_1.z.discriminatedUnion('type', [
47
- exports.LocationReminderSchema,
48
- exports.AbsoluteReminderSchema,
49
- exports.RelativeReminderSchema,
50
- ]);
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuggestionSchema = exports.SyncWorkspaceTemplateSuggestionsSchema = exports.SyncTemplateSuggestionsSchema = exports.SUGGESTION_SECTION_TYPES = exports.WorkspaceTemplateSuggestionSchema = exports.TemplateSuggestionSchema = exports.TEMPLATE_TYPES = void 0;
4
- const zod_1 = require("zod");
5
- /** Available template types. */
6
- exports.TEMPLATE_TYPES = ['project', 'setup'];
7
- exports.TemplateSuggestionSchema = zod_1.z.looseObject({
8
- id: zod_1.z.string(),
9
- name: zod_1.z.string(),
10
- templateType: zod_1.z.enum(exports.TEMPLATE_TYPES),
11
- });
12
- exports.WorkspaceTemplateSuggestionSchema = exports.TemplateSuggestionSchema.extend({
13
- workspaceId: zod_1.z.string().nullable(),
14
- });
15
- /** Available suggestion section types. */
16
- exports.SUGGESTION_SECTION_TYPES = ['templates', 'most_used_user_templates'];
17
- exports.SyncTemplateSuggestionsSchema = zod_1.z.looseObject({
18
- type: zod_1.z.enum(exports.SUGGESTION_SECTION_TYPES),
19
- content: zod_1.z.object({
20
- templates: zod_1.z.array(exports.TemplateSuggestionSchema),
21
- locale: zod_1.z.string(),
22
- }),
23
- isDeleted: zod_1.z.boolean(),
24
- });
25
- exports.SyncWorkspaceTemplateSuggestionsSchema = zod_1.z.looseObject({
26
- type: zod_1.z.literal('most_used_workspace_templates'),
27
- content: zod_1.z.object({
28
- templates: zod_1.z.array(exports.WorkspaceTemplateSuggestionSchema),
29
- locale: zod_1.z.string(),
30
- }),
31
- isDeleted: zod_1.z.boolean(),
32
- });
33
- exports.SuggestionSchema = zod_1.z.union([
34
- exports.SyncWorkspaceTemplateSuggestionsSchema,
35
- exports.SyncTemplateSuggestionsSchema,
36
- ]);
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TooltipsSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.TooltipsSchema = zod_1.z.looseObject({
6
- seen: zod_1.z.array(zod_1.z.string()).optional(),
7
- scheduled: zod_1.z.array(zod_1.z.string()).optional(),
8
- });
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserPlanLimitsSchema = exports.PlanLimitsSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.PlanLimitsSchema = zod_1.z.looseObject({
6
- activeProjects: zod_1.z.number().int().optional(),
7
- activityLog: zod_1.z.number().int().optional(),
8
- collaboratorsPerProject: zod_1.z.number().int().optional(),
9
- commentsPerTask: zod_1.z.number().int().optional(),
10
- fileUploadsPerComment: zod_1.z.number().int().optional(),
11
- filtersPerUser: zod_1.z.number().int().optional(),
12
- labelsPerTask: zod_1.z.number().int().optional(),
13
- remindersPerUser: zod_1.z.number().int().optional(),
14
- sectionsPerProject: zod_1.z.number().int().optional(),
15
- tasksPerProject: zod_1.z.number().int().optional(),
16
- });
17
- exports.UserPlanLimitsSchema = zod_1.z.looseObject({
18
- current: exports.PlanLimitsSchema,
19
- next: exports.PlanLimitsSchema.nullable(),
20
- });
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSettingsSchema = exports.QuickAddFeatureSchema = exports.NavigationFeatureSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.NavigationFeatureSchema = zod_1.z.object({
6
- name: zod_1.z.string(),
7
- shown: zod_1.z.boolean(),
8
- });
9
- exports.QuickAddFeatureSchema = zod_1.z.object({
10
- name: zod_1.z.string(),
11
- shown: zod_1.z.boolean(),
12
- });
13
- /**
14
- * Sync API user settings resource.
15
- */
16
- exports.UserSettingsSchema = zod_1.z.looseObject({
17
- completedSoundDesktop: zod_1.z.boolean(),
18
- completedSoundMobile: zod_1.z.boolean(),
19
- debugLogSendingEnabledUntil: zod_1.z.string().nullish(),
20
- legacyPricing: zod_1.z.union([zod_1.z.boolean(), zod_1.z.literal(0), zod_1.z.literal(1)]).transform(Boolean),
21
- navigation: zod_1.z
22
- .object({
23
- countsShown: zod_1.z.boolean(),
24
- features: zod_1.z.array(exports.NavigationFeatureSchema),
25
- })
26
- .loose(),
27
- reminderDesktop: zod_1.z.boolean(),
28
- reminderEmail: zod_1.z.boolean(),
29
- reminderPush: zod_1.z.boolean(),
30
- resetRecurringSubtasks: zod_1.z.boolean(),
31
- aiEmailAssist: zod_1.z.boolean(),
32
- theme: zod_1.z.string().nullable().optional(),
33
- syncTheme: zod_1.z.boolean().optional(),
34
- quickAdd: zod_1.z
35
- .object({
36
- labelsShown: zod_1.z.boolean(),
37
- features: zod_1.z.array(exports.QuickAddFeatureSchema),
38
- })
39
- .loose(),
40
- });
@@ -1,110 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SyncUserSchema = exports.GettingStartedGuideProjectSchema = exports.JoinableWorkspaceSchema = exports.TzInfoSchema = exports.FeaturesSchema = void 0;
4
- const zod_1 = require("zod");
5
- const types_1 = require("../../users/types");
6
- const user_preferences_1 = require("../user-preferences");
7
- exports.FeaturesSchema = zod_1.z.looseObject({
8
- karmaDisabled: zod_1.z.boolean(),
9
- restriction: zod_1.z.number().int(),
10
- karmaVacation: zod_1.z.boolean(),
11
- dateistLang: zod_1.z.any(),
12
- beta: user_preferences_1.BooleanFromZeroOneSchema,
13
- hasPushReminders: zod_1.z.boolean(),
14
- dateistInlineDisabled: zod_1.z.boolean(),
15
- autoInviteDisabled: zod_1.z.boolean().optional(),
16
- goldTheme: zod_1.z.boolean().optional(),
17
- migratedFromTdb: zod_1.z.boolean().optional(),
18
- });
19
- exports.TzInfoSchema = zod_1.z.looseObject({
20
- timezone: zod_1.z.string(),
21
- hours: zod_1.z.number().int(),
22
- minutes: zod_1.z.number().int(),
23
- isDst: user_preferences_1.BooleanFromZeroOneSchema,
24
- gmtString: zod_1.z.string(),
25
- });
26
- exports.JoinableWorkspaceSchema = zod_1.z.looseObject({
27
- workspaceId: zod_1.z.string(),
28
- workspaceName: zod_1.z.string(),
29
- memberCount: zod_1.z.number().int(),
30
- });
31
- exports.GettingStartedGuideProjectSchema = zod_1.z.looseObject({
32
- onboardingUseCase: zod_1.z.string(),
33
- projectId: zod_1.z.string(),
34
- completed: zod_1.z.boolean(),
35
- closed: zod_1.z.boolean(),
36
- });
37
- /**
38
- * Sync API user resource.
39
- *
40
- * This is a superset of the REST `CurrentUserSchema` — the Sync API returns
41
- * many additional fields for features, onboarding state, and account details.
42
- */
43
- exports.SyncUserSchema = zod_1.z.looseObject({
44
- id: zod_1.z.string(),
45
- email: zod_1.z.string(),
46
- fullName: zod_1.z.string(),
47
- activatedUser: zod_1.z.boolean(),
48
- autoReminder: zod_1.z.number().int(),
49
- avatarBig: zod_1.z.string().optional(),
50
- avatarMedium: zod_1.z.string().optional(),
51
- avatarS640: zod_1.z.string().optional(),
52
- avatarSmall: zod_1.z.string().optional(),
53
- businessAccountId: zod_1.z.string().nullable(),
54
- dailyGoal: zod_1.z.number().int(),
55
- dateFormat: user_preferences_1.DateFormatSchema,
56
- dateistLang: zod_1.z.string().nullish(),
57
- daysOff: zod_1.z.array(zod_1.z.number().int()),
58
- featureIdentifier: zod_1.z.string(),
59
- features: exports.FeaturesSchema,
60
- freeTrailExpires: zod_1.z.coerce.date().optional(),
61
- hasMagicNumber: zod_1.z.boolean(),
62
- hasPassword: zod_1.z.boolean(),
63
- hasStartedATrial: zod_1.z.boolean().optional(),
64
- imageId: zod_1.z.string().nullable(),
65
- inboxProjectId: zod_1.z.string(),
66
- isCelebrationsEnabled: zod_1.z.boolean(),
67
- isPremium: zod_1.z.boolean(),
68
- joinableWorkspace: exports.JoinableWorkspaceSchema.nullable(),
69
- joinedAt: zod_1.z.coerce.date(),
70
- gettingStartedGuideProjects: zod_1.z.array(exports.GettingStartedGuideProjectSchema).nullable(),
71
- karma: zod_1.z.number(),
72
- karmaTrend: zod_1.z.string(),
73
- lang: zod_1.z.string(),
74
- mfaEnabled: zod_1.z.boolean().optional(),
75
- mobileHost: zod_1.z.string().nullish(),
76
- mobileNumber: zod_1.z.string().nullish(),
77
- nextWeek: user_preferences_1.DayOfWeekSchema,
78
- onboardingLevel: zod_1.z.string().nullable().optional(),
79
- onboardingRole: zod_1.z.string().nullable().optional(),
80
- onboardingPersona: zod_1.z.string().nullable().optional(),
81
- onboardingInitiated: zod_1.z.boolean().nullable().optional(),
82
- onboardingCompleted: zod_1.z.boolean().nullable().optional(),
83
- onboardingSkipped: zod_1.z.boolean().optional(),
84
- onboardingTeamMode: zod_1.z.boolean().nullable().optional(),
85
- onboardingUseCases: zod_1.z.array(zod_1.z.string()).nullable().optional(),
86
- premiumStatus: zod_1.z.enum(types_1.PREMIUM_STATUSES),
87
- premiumUntil: zod_1.z.coerce.date().nullable(),
88
- rambleSessionsUsage: zod_1.z
89
- .object({
90
- currentCount: zod_1.z.number().int(),
91
- limit: zod_1.z.number().int(),
92
- remaining: zod_1.z.number().int(),
93
- resetDate: zod_1.z.coerce.date(),
94
- })
95
- .nullable()
96
- .optional(),
97
- shareLimit: zod_1.z.number().int(),
98
- sortOrder: zod_1.z.number().int(),
99
- startDay: user_preferences_1.DayOfWeekSchema,
100
- startPage: zod_1.z.string(),
101
- themeId: zod_1.z.string(),
102
- timeFormat: user_preferences_1.TimeFormatSchema,
103
- token: zod_1.z.string().optional(),
104
- tzInfo: exports.TzInfoSchema,
105
- uniquePrefix: zod_1.z.number().int(),
106
- verificationStatus: zod_1.z.string(),
107
- websocketUrl: zod_1.z.string(),
108
- weekendStartDay: zod_1.z.number().int(),
109
- weeklyGoal: zod_1.z.number().int(),
110
- });