@todoist/sdk 0.0.0-stage → 18.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.
- package/LICENSE +21 -0
- package/README.md +308 -2
- package/dist/esm/authentication.js +307 -0
- package/dist/esm/clients/activity-client.js +60 -0
- package/dist/esm/clients/app-client.js +366 -0
- package/dist/esm/clients/backup-client.js +47 -0
- package/dist/esm/clients/base-client.js +29 -0
- package/dist/esm/clients/billing-client.js +160 -0
- package/dist/esm/clients/comment-client.js +92 -0
- package/dist/esm/clients/email-client.js +41 -0
- package/dist/esm/clients/filter-client.js +26 -0
- package/dist/esm/clients/folder-client.js +80 -0
- package/dist/esm/clients/id-mapping-client.js +37 -0
- package/dist/esm/clients/insights-client.js +89 -0
- package/dist/esm/clients/label-client.js +131 -0
- package/dist/esm/clients/productivity-client.js +24 -0
- package/dist/esm/clients/project-client.js +284 -0
- package/dist/esm/clients/reminder-client.js +204 -0
- package/dist/esm/clients/section-client.js +121 -0
- package/dist/esm/clients/task-client.js +264 -0
- package/dist/esm/clients/template-client.js +89 -0
- package/dist/esm/clients/ui-extension-client.js +110 -0
- package/dist/esm/clients/upload-client.js +153 -0
- package/dist/esm/clients/view-options-client.js +21 -0
- package/dist/esm/clients/workspace-client.js +384 -0
- package/dist/esm/consts/endpoints.js +193 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/test-utils/asserts.js +8 -0
- package/dist/esm/test-utils/msw-setup.js +88 -0
- package/dist/esm/test-utils/obsidian-fetch-adapter.js +51 -0
- package/dist/esm/test-utils/test-defaults.js +367 -0
- package/dist/esm/test-utils/transport-seam.js +15 -0
- package/dist/esm/test-utils/webhook-fixtures.js +26 -0
- package/dist/esm/todoist-api.js +1757 -0
- package/dist/esm/transport/fetch-with-retry.js +216 -0
- package/dist/esm/transport/http-client.js +140 -0
- package/dist/esm/transport/http-dispatcher.js +158 -0
- package/dist/esm/transport/sync-request.js +106 -0
- package/dist/esm/types/activity/index.js +2 -0
- package/dist/esm/types/activity/requests.js +1 -0
- package/dist/esm/types/activity/types.js +45 -0
- package/dist/esm/types/apps/index.js +2 -0
- package/dist/esm/types/apps/requests.js +1 -0
- package/dist/esm/types/apps/types.js +249 -0
- package/dist/esm/types/backups/index.js +2 -0
- package/dist/esm/types/backups/requests.js +1 -0
- package/dist/esm/types/backups/types.js +5 -0
- package/dist/esm/types/billing/index.js +2 -0
- package/dist/esm/types/billing/requests.js +1 -0
- package/dist/esm/types/billing/types.js +89 -0
- package/dist/esm/types/comments/index.js +2 -0
- package/dist/esm/types/comments/requests.js +1 -0
- package/dist/esm/types/comments/types.js +57 -0
- package/dist/esm/types/common.js +7 -0
- package/dist/esm/types/emails/index.js +1 -0
- package/dist/esm/types/emails/requests.js +2 -0
- package/dist/esm/types/errors.js +41 -0
- package/dist/esm/types/folders/index.js +1 -0
- package/dist/esm/types/folders/requests.js +1 -0
- package/dist/esm/types/http.js +20 -0
- package/dist/esm/types/id-mappings/index.js +2 -0
- package/dist/esm/types/id-mappings/requests.js +17 -0
- package/dist/esm/types/id-mappings/types.js +9 -0
- package/dist/esm/types/index.js +24 -0
- package/dist/esm/types/insights/index.js +2 -0
- package/dist/esm/types/insights/requests.js +1 -0
- package/dist/esm/types/insights/types.js +77 -0
- package/dist/esm/types/labels/index.js +2 -0
- package/dist/esm/types/labels/requests.js +1 -0
- package/dist/esm/types/labels/types.js +8 -0
- package/dist/esm/types/productivity/index.js +1 -0
- package/dist/esm/types/productivity/types.js +65 -0
- package/dist/esm/types/projects/index.js +2 -0
- package/dist/esm/types/projects/requests.js +1 -0
- package/dist/esm/types/projects/types.js +65 -0
- package/dist/esm/types/reminders/index.js +1 -0
- package/dist/esm/types/reminders/requests.js +92 -0
- package/dist/esm/types/sections/index.js +2 -0
- package/dist/esm/types/sections/requests.js +1 -0
- package/dist/esm/types/sections/types.js +23 -0
- package/dist/esm/types/sync/commands/calendars.js +1 -0
- package/dist/esm/types/sync/commands/filters.js +1 -0
- package/dist/esm/types/sync/commands/folders.js +1 -0
- package/dist/esm/types/sync/commands/index.js +18 -0
- package/dist/esm/types/sync/commands/labels.js +2 -0
- package/dist/esm/types/sync/commands/notes.js +1 -0
- package/dist/esm/types/sync/commands/notifications.js +1 -0
- package/dist/esm/types/sync/commands/others.js +1 -0
- package/dist/esm/types/sync/commands/project-view-options.js +1 -0
- package/dist/esm/types/sync/commands/projects.js +1 -0
- package/dist/esm/types/sync/commands/reminders.js +1 -0
- package/dist/esm/types/sync/commands/sections.js +1 -0
- package/dist/esm/types/sync/commands/shared.js +16 -0
- package/dist/esm/types/sync/commands/sharing.js +1 -0
- package/dist/esm/types/sync/commands/tasks.js +1 -0
- package/dist/esm/types/sync/commands/view-options.js +1 -0
- package/dist/esm/types/sync/commands/workspace-filters.js +1 -0
- package/dist/esm/types/sync/commands/workspaces.js +1 -0
- package/dist/esm/types/sync/index.js +6 -0
- package/dist/esm/types/sync/request.js +1 -0
- package/dist/esm/types/sync/resource-types.js +36 -0
- package/dist/esm/types/sync/resources/calendars.js +24 -0
- package/dist/esm/types/sync/resources/collaborators.js +21 -0
- package/dist/esm/types/sync/resources/completed-info.js +21 -0
- package/dist/esm/types/sync/resources/filters.js +12 -0
- package/dist/esm/types/sync/resources/folders.js +10 -0
- package/dist/esm/types/sync/resources/index.js +18 -0
- package/dist/esm/types/sync/resources/labels.js +7 -0
- package/dist/esm/types/sync/resources/live-notifications.js +35 -0
- package/dist/esm/types/sync/resources/notes.js +18 -0
- package/dist/esm/types/sync/resources/reminders.js +58 -0
- package/dist/esm/types/sync/resources/suggestions.js +33 -0
- package/dist/esm/types/sync/resources/tooltips.js +5 -0
- package/dist/esm/types/sync/resources/user-plan-limits.js +21 -0
- package/dist/esm/types/sync/resources/user-settings.js +41 -0
- package/dist/esm/types/sync/resources/user-status.js +22 -0
- package/dist/esm/types/sync/resources/user.js +109 -0
- package/dist/esm/types/sync/resources/view-options.js +128 -0
- package/dist/esm/types/sync/resources/workspace-filters.js +17 -0
- package/dist/esm/types/sync/resources/workspaces.js +69 -0
- package/dist/esm/types/sync/response.js +57 -0
- package/dist/esm/types/sync/user-preferences.js +68 -0
- package/dist/esm/types/tasks/index.js +2 -0
- package/dist/esm/types/tasks/requests.js +1 -0
- package/dist/esm/types/tasks/types.js +56 -0
- package/dist/esm/types/templates/index.js +1 -0
- package/dist/esm/types/templates/requests.js +1 -0
- package/dist/esm/types/ui-extensions/index.js +2 -0
- package/dist/esm/types/ui-extensions/requests.js +1 -0
- package/dist/esm/types/ui-extensions/types.js +74 -0
- package/dist/esm/types/uploads/index.js +1 -0
- package/dist/esm/types/uploads/requests.js +1 -0
- package/dist/esm/types/users/index.js +1 -0
- package/dist/esm/types/users/types.js +49 -0
- package/dist/esm/types/webhooks/comments.js +93 -0
- package/dist/esm/types/webhooks/envelope.js +23 -0
- package/dist/esm/types/webhooks/filters.js +27 -0
- package/dist/esm/types/webhooks/index.js +9 -0
- package/dist/esm/types/webhooks/labels.js +51 -0
- package/dist/esm/types/webhooks/projects.js +33 -0
- package/dist/esm/types/webhooks/reminders.js +32 -0
- package/dist/esm/types/webhooks/sections.js +50 -0
- package/dist/esm/types/webhooks/tasks.js +65 -0
- package/dist/esm/types/webhooks/types.js +52 -0
- package/dist/esm/types/workspaces/index.js +2 -0
- package/dist/esm/types/workspaces/requests.js +1 -0
- package/dist/esm/types/workspaces/types.js +151 -0
- package/dist/esm/utils/activity-helpers.js +53 -0
- package/dist/esm/utils/case-conversion.js +84 -0
- package/dist/esm/utils/colors.js +145 -0
- package/dist/esm/utils/file-response.js +29 -0
- package/dist/esm/utils/filter-queries.js +231 -0
- package/dist/esm/utils/filter-query-definitions.js +2789 -0
- package/dist/esm/utils/headers.js +42 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/multipart-upload.js +267 -0
- package/dist/esm/utils/person-names.js +61 -0
- package/dist/esm/utils/processing-helpers.js +12 -0
- package/dist/esm/utils/project-helpers.js +29 -0
- package/dist/esm/utils/request-helpers.js +43 -0
- package/dist/esm/utils/sanitization.js +131 -0
- package/dist/esm/utils/sync-helpers.js +19 -0
- package/dist/esm/utils/task-sorting.js +280 -0
- package/dist/esm/utils/uncompletable-helpers.js +54 -0
- package/dist/esm/utils/url-helpers.js +196 -0
- package/dist/esm/utils/validators.js +102 -0
- package/dist/esm/utils/view-options.js +15 -0
- package/dist/esm/utils/webhook-parser.js +56 -0
- package/dist/types/authentication.d.ts +262 -0
- package/dist/types/clients/activity-client.d.ts +12 -0
- package/dist/types/clients/app-client.d.ts +37 -0
- package/dist/types/clients/backup-client.d.ts +14 -0
- package/dist/types/clients/base-client.d.ts +23 -0
- package/dist/types/clients/billing-client.d.ts +22 -0
- package/dist/types/clients/comment-client.d.ts +15 -0
- package/dist/types/clients/email-client.d.ts +13 -0
- package/dist/types/clients/filter-client.d.ts +10 -0
- package/dist/types/clients/folder-client.d.ts +16 -0
- package/dist/types/clients/id-mapping-client.d.ts +13 -0
- package/dist/types/clients/insights-client.d.ts +18 -0
- package/dist/types/clients/label-client.d.ts +19 -0
- package/dist/types/clients/productivity-client.d.ts +12 -0
- package/dist/types/clients/project-client.d.ts +22 -0
- package/dist/types/clients/reminder-client.d.ts +25 -0
- package/dist/types/clients/section-client.d.ts +18 -0
- package/dist/types/clients/task-client.d.ts +25 -0
- package/dist/types/clients/template-client.d.ts +17 -0
- package/dist/types/clients/ui-extension-client.d.ts +18 -0
- package/dist/types/clients/upload-client.d.ts +17 -0
- package/dist/types/clients/view-options-client.d.ts +8 -0
- package/dist/types/clients/workspace-client.d.ts +43 -0
- package/dist/types/consts/endpoints.d.ts +120 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/test-utils/asserts.d.ts +1 -0
- package/dist/types/test-utils/msw-setup.d.ts +33 -0
- package/dist/types/test-utils/obsidian-fetch-adapter.d.ts +29 -0
- package/dist/types/test-utils/test-defaults.d.ts +286 -0
- package/dist/types/test-utils/transport-seam.d.ts +1 -0
- package/dist/types/test-utils/webhook-fixtures.d.ts +13 -0
- package/dist/types/todoist-api.d.ts +1437 -0
- package/dist/types/transport/fetch-with-retry.d.ts +12 -0
- package/dist/types/transport/http-client.d.ts +25 -0
- package/dist/types/transport/http-dispatcher.d.ts +65 -0
- package/dist/types/transport/sync-request.d.ts +31 -0
- package/dist/types/types/activity/index.d.ts +2 -0
- package/dist/types/types/activity/requests.d.ts +85 -0
- package/dist/types/types/activity/types.d.ts +56 -0
- package/dist/types/types/apps/index.d.ts +2 -0
- package/dist/types/types/apps/requests.d.ts +89 -0
- package/dist/types/types/apps/types.d.ts +418 -0
- package/dist/types/types/backups/index.d.ts +2 -0
- package/dist/types/types/backups/requests.d.ts +16 -0
- package/dist/types/types/backups/types.d.ts +7 -0
- package/dist/types/types/billing/index.d.ts +2 -0
- package/dist/types/types/billing/requests.d.ts +62 -0
- package/dist/types/types/billing/types.d.ts +207 -0
- package/dist/types/types/comments/index.d.ts +2 -0
- package/dist/types/types/comments/requests.d.ts +64 -0
- package/dist/types/types/comments/types.d.ts +141 -0
- package/dist/types/types/common.d.ts +13 -0
- package/dist/types/types/emails/index.d.ts +1 -0
- package/dist/types/types/emails/requests.d.ts +30 -0
- package/dist/types/types/errors.d.ts +29 -0
- package/dist/types/types/folders/index.d.ts +1 -0
- package/dist/types/types/folders/requests.d.ts +20 -0
- package/dist/types/types/http.d.ts +104 -0
- package/dist/types/types/id-mappings/index.d.ts +2 -0
- package/dist/types/types/id-mappings/requests.d.ts +28 -0
- package/dist/types/types/id-mappings/types.d.ts +13 -0
- package/dist/types/types/index.d.ts +24 -0
- package/dist/types/types/insights/index.d.ts +2 -0
- package/dist/types/types/insights/requests.d.ts +26 -0
- package/dist/types/types/insights/types.d.ts +167 -0
- package/dist/types/types/labels/index.d.ts +2 -0
- package/dist/types/types/labels/requests.d.ts +75 -0
- package/dist/types/types/labels/types.d.ts +13 -0
- package/dist/types/types/productivity/index.d.ts +1 -0
- package/dist/types/types/productivity/types.d.ts +115 -0
- package/dist/types/types/projects/index.d.ts +2 -0
- package/dist/types/types/projects/requests.d.ts +206 -0
- package/dist/types/types/projects/types.d.ts +286 -0
- package/dist/types/types/reminders/index.d.ts +1 -0
- package/dist/types/types/reminders/requests.d.ts +205 -0
- package/dist/types/types/sections/index.d.ts +2 -0
- package/dist/types/types/sections/requests.d.ts +49 -0
- package/dist/types/types/sections/types.d.ts +70 -0
- package/dist/types/types/sync/commands/calendars.d.ts +14 -0
- package/dist/types/types/sync/commands/filters.d.ts +24 -0
- package/dist/types/types/sync/commands/folders.d.ts +20 -0
- package/dist/types/types/sync/commands/index.d.ts +167 -0
- package/dist/types/types/sync/commands/labels.d.ts +32 -0
- package/dist/types/types/sync/commands/notes.d.ts +27 -0
- package/dist/types/types/sync/commands/notifications.d.ts +10 -0
- package/dist/types/types/sync/commands/others.d.ts +61 -0
- package/dist/types/types/sync/commands/project-view-options.d.ts +13 -0
- package/dist/types/types/sync/commands/projects.d.ts +96 -0
- package/dist/types/types/sync/commands/reminders.d.ts +51 -0
- package/dist/types/types/sync/commands/sections.d.ts +36 -0
- package/dist/types/types/sync/commands/shared.d.ts +51 -0
- package/dist/types/types/sync/commands/sharing.d.ts +16 -0
- package/dist/types/types/sync/commands/tasks.d.ts +78 -0
- package/dist/types/types/sync/commands/view-options.d.ts +18 -0
- package/dist/types/types/sync/commands/workspace-filters.d.ts +25 -0
- package/dist/types/types/sync/commands/workspaces.d.ts +82 -0
- package/dist/types/types/sync/index.d.ts +6 -0
- package/dist/types/types/sync/request.d.ts +7 -0
- package/dist/types/types/sync/resource-types.d.ts +5 -0
- package/dist/types/types/sync/resources/calendars.d.ts +38 -0
- package/dist/types/types/sync/resources/collaborators.d.ts +45 -0
- package/dist/types/types/sync/resources/completed-info.d.ts +33 -0
- package/dist/types/types/sync/resources/filters.d.ts +13 -0
- package/dist/types/types/sync/resources/folders.d.ts +11 -0
- package/dist/types/types/sync/resources/index.d.ts +18 -0
- package/dist/types/types/sync/resources/labels.d.ts +12 -0
- package/dist/types/types/sync/resources/live-notifications.d.ts +32 -0
- package/dist/types/types/sync/resources/notes.d.ts +34 -0
- package/dist/types/types/sync/resources/reminders.d.ts +213 -0
- package/dist/types/types/sync/resources/suggestions.d.ts +96 -0
- package/dist/types/types/sync/resources/tooltips.d.ts +6 -0
- package/dist/types/types/sync/resources/user-plan-limits.d.ts +47 -0
- package/dist/types/types/sync/resources/user-settings.d.ts +40 -0
- package/dist/types/types/sync/resources/user-status.d.ts +46 -0
- package/dist/types/types/sync/resources/user.d.ts +151 -0
- package/dist/types/types/sync/resources/view-options.d.ts +157 -0
- package/dist/types/types/sync/resources/workspace-filters.d.ts +18 -0
- package/dist/types/types/sync/resources/workspaces.d.ts +142 -0
- package/dist/types/types/sync/response.d.ts +930 -0
- package/dist/types/types/sync/user-preferences.d.ts +39 -0
- package/dist/types/types/tasks/index.d.ts +2 -0
- package/dist/types/types/tasks/requests.d.ts +197 -0
- package/dist/types/types/tasks/types.d.ts +162 -0
- package/dist/types/types/templates/index.d.ts +1 -0
- package/dist/types/types/templates/requests.d.ts +92 -0
- package/dist/types/types/ui-extensions/index.d.ts +2 -0
- package/dist/types/types/ui-extensions/requests.d.ts +108 -0
- package/dist/types/types/ui-extensions/types.d.ts +185 -0
- package/dist/types/types/uploads/index.d.ts +1 -0
- package/dist/types/types/uploads/requests.d.ts +32 -0
- package/dist/types/types/users/index.d.ts +1 -0
- package/dist/types/types/users/types.d.ts +67 -0
- package/dist/types/types/webhooks/comments.d.ts +1600 -0
- package/dist/types/types/webhooks/envelope.d.ts +34 -0
- package/dist/types/types/webhooks/filters.d.ts +99 -0
- package/dist/types/types/webhooks/index.d.ts +9 -0
- package/dist/types/types/webhooks/labels.d.ts +160 -0
- package/dist/types/types/webhooks/projects.d.ts +365 -0
- package/dist/types/types/webhooks/reminders.d.ts +82 -0
- package/dist/types/types/webhooks/sections.d.ts +372 -0
- package/dist/types/types/webhooks/tasks.d.ts +981 -0
- package/dist/types/types/webhooks/types.d.ts +2606 -0
- package/dist/types/types/workspaces/index.d.ts +2 -0
- package/dist/types/types/workspaces/requests.d.ts +260 -0
- package/dist/types/types/workspaces/types.d.ts +266 -0
- package/dist/types/utils/activity-helpers.d.ts +28 -0
- package/dist/types/utils/case-conversion.d.ts +20 -0
- package/dist/types/utils/colors.d.ts +201 -0
- package/dist/types/utils/file-response.d.ts +15 -0
- package/dist/types/utils/filter-queries.d.ts +42 -0
- package/dist/types/utils/filter-query-definitions.d.ts +27 -0
- package/dist/types/utils/headers.d.ts +20 -0
- package/dist/types/utils/index.d.ts +15 -0
- package/dist/types/utils/multipart-upload.d.ts +58 -0
- package/dist/types/utils/person-names.d.ts +52 -0
- package/dist/types/utils/processing-helpers.d.ts +1 -0
- package/dist/types/utils/project-helpers.d.ts +21 -0
- package/dist/types/utils/request-helpers.d.ts +33 -0
- package/dist/types/utils/sanitization.d.ts +52 -0
- package/dist/types/utils/sync-helpers.d.ts +17 -0
- package/dist/types/utils/task-sorting.d.ts +46 -0
- package/dist/types/utils/uncompletable-helpers.d.ts +30 -0
- package/dist/types/utils/url-helpers.d.ts +120 -0
- package/dist/types/utils/validators.d.ts +1917 -0
- package/dist/types/utils/view-options.d.ts +11 -0
- package/dist/types/utils/webhook-parser.d.ts +48 -0
- package/package.json +88 -5
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Base schema for all project types in Todoist.
|
|
4
|
+
* Contains common fields shared between personal and workspace projects.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BaseProjectSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
canAssignTasks: z.ZodBoolean;
|
|
9
|
+
childOrder: z.ZodNumber;
|
|
10
|
+
orderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
color: z.ZodString;
|
|
12
|
+
createdAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
13
|
+
isArchived: z.ZodBoolean;
|
|
14
|
+
isDeleted: z.ZodBoolean;
|
|
15
|
+
isFavorite: z.ZodBoolean;
|
|
16
|
+
isFrozen: z.ZodBoolean;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
updatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
19
|
+
viewStyle: z.ZodString;
|
|
20
|
+
defaultOrder: z.ZodNumber;
|
|
21
|
+
defaultOrderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
description: z.ZodString;
|
|
23
|
+
isCollapsed: z.ZodBoolean;
|
|
24
|
+
isShared: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
/**
|
|
27
|
+
* Schema for personal projects in Todoist.
|
|
28
|
+
*/
|
|
29
|
+
export declare const PersonalProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
canAssignTasks: z.ZodBoolean;
|
|
32
|
+
childOrder: z.ZodNumber;
|
|
33
|
+
orderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
color: z.ZodString;
|
|
35
|
+
createdAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
36
|
+
isArchived: z.ZodBoolean;
|
|
37
|
+
isDeleted: z.ZodBoolean;
|
|
38
|
+
isFavorite: z.ZodBoolean;
|
|
39
|
+
isFrozen: z.ZodBoolean;
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
updatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
42
|
+
viewStyle: z.ZodString;
|
|
43
|
+
defaultOrder: z.ZodNumber;
|
|
44
|
+
defaultOrderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
description: z.ZodString;
|
|
46
|
+
isCollapsed: z.ZodBoolean;
|
|
47
|
+
isShared: z.ZodBoolean;
|
|
48
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
49
|
+
inboxProject: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
50
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
51
|
+
url: string;
|
|
52
|
+
id: string;
|
|
53
|
+
canAssignTasks: boolean;
|
|
54
|
+
childOrder: number;
|
|
55
|
+
color: string;
|
|
56
|
+
createdAt: Date | null;
|
|
57
|
+
isArchived: boolean;
|
|
58
|
+
isDeleted: boolean;
|
|
59
|
+
isFavorite: boolean;
|
|
60
|
+
isFrozen: boolean;
|
|
61
|
+
name: string;
|
|
62
|
+
updatedAt: Date | null;
|
|
63
|
+
viewStyle: string;
|
|
64
|
+
defaultOrder: number;
|
|
65
|
+
description: string;
|
|
66
|
+
isCollapsed: boolean;
|
|
67
|
+
isShared: boolean;
|
|
68
|
+
parentId: string | null;
|
|
69
|
+
inboxProject: boolean;
|
|
70
|
+
orderKey?: string | null | undefined;
|
|
71
|
+
defaultOrderKey?: string | null | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
id: string;
|
|
74
|
+
canAssignTasks: boolean;
|
|
75
|
+
childOrder: number;
|
|
76
|
+
color: string;
|
|
77
|
+
createdAt: Date | null;
|
|
78
|
+
isArchived: boolean;
|
|
79
|
+
isDeleted: boolean;
|
|
80
|
+
isFavorite: boolean;
|
|
81
|
+
isFrozen: boolean;
|
|
82
|
+
name: string;
|
|
83
|
+
updatedAt: Date | null;
|
|
84
|
+
viewStyle: string;
|
|
85
|
+
defaultOrder: number;
|
|
86
|
+
description: string;
|
|
87
|
+
isCollapsed: boolean;
|
|
88
|
+
isShared: boolean;
|
|
89
|
+
parentId: string | null;
|
|
90
|
+
inboxProject: boolean;
|
|
91
|
+
orderKey?: string | null | undefined;
|
|
92
|
+
defaultOrderKey?: string | null | undefined;
|
|
93
|
+
}>>;
|
|
94
|
+
/** Available project visibility levels. */
|
|
95
|
+
export declare const PROJECT_VISIBILITIES: readonly ["restricted", "team", "public"];
|
|
96
|
+
/** Visibility level of a workspace project. */
|
|
97
|
+
export type ProjectVisibility = (typeof PROJECT_VISIBILITIES)[number];
|
|
98
|
+
export declare const ProjectVisibilitySchema: z.ZodEnum<{
|
|
99
|
+
restricted: "restricted";
|
|
100
|
+
team: "team";
|
|
101
|
+
public: "public";
|
|
102
|
+
}>;
|
|
103
|
+
/**
|
|
104
|
+
* Schema for workspace projects in Todoist.
|
|
105
|
+
*/
|
|
106
|
+
export declare const WorkspaceProjectSchema: z.ZodPipe<z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
canAssignTasks: z.ZodBoolean;
|
|
109
|
+
childOrder: z.ZodNumber;
|
|
110
|
+
orderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
color: z.ZodString;
|
|
112
|
+
createdAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
113
|
+
isArchived: z.ZodBoolean;
|
|
114
|
+
isDeleted: z.ZodBoolean;
|
|
115
|
+
isFavorite: z.ZodBoolean;
|
|
116
|
+
isFrozen: z.ZodBoolean;
|
|
117
|
+
name: z.ZodString;
|
|
118
|
+
updatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
119
|
+
viewStyle: z.ZodString;
|
|
120
|
+
defaultOrder: z.ZodNumber;
|
|
121
|
+
defaultOrderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
description: z.ZodString;
|
|
123
|
+
isCollapsed: z.ZodBoolean;
|
|
124
|
+
isShared: z.ZodBoolean;
|
|
125
|
+
access: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
visibility: z.ZodEnum<{
|
|
127
|
+
restricted: "restricted";
|
|
128
|
+
team: "team";
|
|
129
|
+
public: "public";
|
|
130
|
+
}>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
collaboratorRoleDefault: z.ZodString;
|
|
133
|
+
folderId: z.ZodNullable<z.ZodString>;
|
|
134
|
+
isInviteOnly: z.ZodNullable<z.ZodBoolean>;
|
|
135
|
+
isLinkSharingEnabled: z.ZodBoolean;
|
|
136
|
+
role: z.ZodNullable<z.ZodString>;
|
|
137
|
+
status: z.ZodString;
|
|
138
|
+
workspaceId: z.ZodString;
|
|
139
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
140
|
+
url: string;
|
|
141
|
+
id: string;
|
|
142
|
+
canAssignTasks: boolean;
|
|
143
|
+
childOrder: number;
|
|
144
|
+
color: string;
|
|
145
|
+
createdAt: Date | null;
|
|
146
|
+
isArchived: boolean;
|
|
147
|
+
isDeleted: boolean;
|
|
148
|
+
isFavorite: boolean;
|
|
149
|
+
isFrozen: boolean;
|
|
150
|
+
name: string;
|
|
151
|
+
updatedAt: Date | null;
|
|
152
|
+
viewStyle: string;
|
|
153
|
+
defaultOrder: number;
|
|
154
|
+
description: string;
|
|
155
|
+
isCollapsed: boolean;
|
|
156
|
+
isShared: boolean;
|
|
157
|
+
collaboratorRoleDefault: string;
|
|
158
|
+
folderId: string | null;
|
|
159
|
+
isInviteOnly: boolean | null;
|
|
160
|
+
isLinkSharingEnabled: boolean;
|
|
161
|
+
role: string | null;
|
|
162
|
+
status: string;
|
|
163
|
+
workspaceId: string;
|
|
164
|
+
orderKey?: string | null | undefined;
|
|
165
|
+
defaultOrderKey?: string | null | undefined;
|
|
166
|
+
access?: {
|
|
167
|
+
visibility: "restricted" | "team" | "public";
|
|
168
|
+
} | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
id: string;
|
|
171
|
+
canAssignTasks: boolean;
|
|
172
|
+
childOrder: number;
|
|
173
|
+
color: string;
|
|
174
|
+
createdAt: Date | null;
|
|
175
|
+
isArchived: boolean;
|
|
176
|
+
isDeleted: boolean;
|
|
177
|
+
isFavorite: boolean;
|
|
178
|
+
isFrozen: boolean;
|
|
179
|
+
name: string;
|
|
180
|
+
updatedAt: Date | null;
|
|
181
|
+
viewStyle: string;
|
|
182
|
+
defaultOrder: number;
|
|
183
|
+
description: string;
|
|
184
|
+
isCollapsed: boolean;
|
|
185
|
+
isShared: boolean;
|
|
186
|
+
collaboratorRoleDefault: string;
|
|
187
|
+
folderId: string | null;
|
|
188
|
+
isInviteOnly: boolean | null;
|
|
189
|
+
isLinkSharingEnabled: boolean;
|
|
190
|
+
role: string | null;
|
|
191
|
+
status: string;
|
|
192
|
+
workspaceId: string;
|
|
193
|
+
orderKey?: string | null | undefined;
|
|
194
|
+
defaultOrderKey?: string | null | undefined;
|
|
195
|
+
access?: {
|
|
196
|
+
visibility: "restricted" | "team" | "public";
|
|
197
|
+
} | undefined;
|
|
198
|
+
}>>;
|
|
199
|
+
/**
|
|
200
|
+
* How many active personal projects the user's plan allows, and how many they have.
|
|
201
|
+
* Returned by `TodoistApi.getPersonalProjectCapacity`.
|
|
202
|
+
*/
|
|
203
|
+
export type PersonalProjectCapacity = {
|
|
204
|
+
/** The current plan's limit on active personal projects. */
|
|
205
|
+
maxProjects: number;
|
|
206
|
+
/** Active personal projects that count towards the limit. */
|
|
207
|
+
activeCount: number;
|
|
208
|
+
/** How many more active personal projects the user can add; never negative. */
|
|
209
|
+
remaining: number;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Represents a personal project in Todoist.
|
|
213
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
214
|
+
*/
|
|
215
|
+
export type PersonalProject = z.infer<typeof PersonalProjectSchema>;
|
|
216
|
+
/**
|
|
217
|
+
* Represents a workspace project in Todoist.
|
|
218
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
219
|
+
*/
|
|
220
|
+
export type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
221
|
+
/**
|
|
222
|
+
* Schema for any project type in Todoist (personal or workspace).
|
|
223
|
+
* Dispatches to WorkspaceProjectSchema when workspaceId is present, PersonalProjectSchema otherwise.
|
|
224
|
+
*/
|
|
225
|
+
export declare const ProjectSchema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
|
|
226
|
+
url: string;
|
|
227
|
+
id: string;
|
|
228
|
+
canAssignTasks: boolean;
|
|
229
|
+
childOrder: number;
|
|
230
|
+
color: string;
|
|
231
|
+
createdAt: Date | null;
|
|
232
|
+
isArchived: boolean;
|
|
233
|
+
isDeleted: boolean;
|
|
234
|
+
isFavorite: boolean;
|
|
235
|
+
isFrozen: boolean;
|
|
236
|
+
name: string;
|
|
237
|
+
updatedAt: Date | null;
|
|
238
|
+
viewStyle: string;
|
|
239
|
+
defaultOrder: number;
|
|
240
|
+
description: string;
|
|
241
|
+
isCollapsed: boolean;
|
|
242
|
+
isShared: boolean;
|
|
243
|
+
parentId: string | null;
|
|
244
|
+
inboxProject: boolean;
|
|
245
|
+
orderKey?: string | null | undefined;
|
|
246
|
+
defaultOrderKey?: string | null | undefined;
|
|
247
|
+
} | {
|
|
248
|
+
url: string;
|
|
249
|
+
id: string;
|
|
250
|
+
canAssignTasks: boolean;
|
|
251
|
+
childOrder: number;
|
|
252
|
+
color: string;
|
|
253
|
+
createdAt: Date | null;
|
|
254
|
+
isArchived: boolean;
|
|
255
|
+
isDeleted: boolean;
|
|
256
|
+
isFavorite: boolean;
|
|
257
|
+
isFrozen: boolean;
|
|
258
|
+
name: string;
|
|
259
|
+
updatedAt: Date | null;
|
|
260
|
+
viewStyle: string;
|
|
261
|
+
defaultOrder: number;
|
|
262
|
+
description: string;
|
|
263
|
+
isCollapsed: boolean;
|
|
264
|
+
isShared: boolean;
|
|
265
|
+
collaboratorRoleDefault: string;
|
|
266
|
+
folderId: string | null;
|
|
267
|
+
isInviteOnly: boolean | null;
|
|
268
|
+
isLinkSharingEnabled: boolean;
|
|
269
|
+
role: string | null;
|
|
270
|
+
status: string;
|
|
271
|
+
workspaceId: string;
|
|
272
|
+
orderKey?: string | null | undefined;
|
|
273
|
+
defaultOrderKey?: string | null | undefined;
|
|
274
|
+
access?: {
|
|
275
|
+
visibility: "restricted" | "team" | "public";
|
|
276
|
+
} | undefined;
|
|
277
|
+
}, unknown>>;
|
|
278
|
+
/** A project in Todoist — either a {@link PersonalProject} or a {@link WorkspaceProject}. */
|
|
279
|
+
export type Project = z.infer<typeof ProjectSchema>;
|
|
280
|
+
/** Available project view styles. */
|
|
281
|
+
export declare const PROJECT_VIEW_STYLES: readonly ["list", "board", "calendar", "table"];
|
|
282
|
+
/**
|
|
283
|
+
* View style for a project.
|
|
284
|
+
* @see https://developer.todoist.com/api/v1/#tag/Projects
|
|
285
|
+
*/
|
|
286
|
+
export type ProjectViewStyle = (typeof PROJECT_VIEW_STYLES)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './requests.js';
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Reminder, LocationReminder } from '../sync/resources/reminders.js';
|
|
3
|
+
/** Available reminder delivery services. */
|
|
4
|
+
export declare const REMINDER_DELIVERY_SERVICES: readonly ["email", "push"];
|
|
5
|
+
/** Delivery service for a reminder notification. */
|
|
6
|
+
export type ReminderDeliveryService = (typeof REMINDER_DELIVERY_SERVICES)[number];
|
|
7
|
+
export declare const ReminderDeliveryServiceSchema: z.ZodEnum<{
|
|
8
|
+
email: "email";
|
|
9
|
+
push: "push";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ReminderIdSchema: z.ZodString;
|
|
12
|
+
export declare const ReminderDueDateSchema: z.ZodObject<{
|
|
13
|
+
string: z.ZodOptional<z.ZodString>;
|
|
14
|
+
isRecurring: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
date: z.ZodOptional<z.ZodString>;
|
|
16
|
+
timezone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
17
|
+
lang: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type ReminderDueDate = z.infer<typeof ReminderDueDateSchema>;
|
|
20
|
+
export declare const AddRelativeReminderArgsSchema: z.ZodObject<{
|
|
21
|
+
taskId: z.ZodString;
|
|
22
|
+
reminderType: z.ZodOptional<z.ZodLiteral<"relative">>;
|
|
23
|
+
minuteOffset: z.ZodNumber;
|
|
24
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
email: "email";
|
|
26
|
+
push: "push";
|
|
27
|
+
}>>;
|
|
28
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
29
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type AddRelativeReminderArgs = z.infer<typeof AddRelativeReminderArgsSchema>;
|
|
32
|
+
export declare const AddAbsoluteReminderArgsSchema: z.ZodObject<{
|
|
33
|
+
taskId: z.ZodString;
|
|
34
|
+
reminderType: z.ZodLiteral<"absolute">;
|
|
35
|
+
due: z.ZodObject<{
|
|
36
|
+
string: z.ZodOptional<z.ZodString>;
|
|
37
|
+
isRecurring: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
date: z.ZodOptional<z.ZodString>;
|
|
39
|
+
timezone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
40
|
+
lang: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
email: "email";
|
|
44
|
+
push: "push";
|
|
45
|
+
}>>;
|
|
46
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
47
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export type AddAbsoluteReminderArgs = z.infer<typeof AddAbsoluteReminderArgsSchema>;
|
|
50
|
+
export declare const AddReminderArgsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
51
|
+
taskId: z.ZodString;
|
|
52
|
+
reminderType: z.ZodOptional<z.ZodLiteral<"relative">>;
|
|
53
|
+
minuteOffset: z.ZodNumber;
|
|
54
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
email: "email";
|
|
56
|
+
push: "push";
|
|
57
|
+
}>>;
|
|
58
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
59
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
taskId: z.ZodString;
|
|
62
|
+
reminderType: z.ZodLiteral<"absolute">;
|
|
63
|
+
due: z.ZodObject<{
|
|
64
|
+
string: z.ZodOptional<z.ZodString>;
|
|
65
|
+
isRecurring: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
date: z.ZodOptional<z.ZodString>;
|
|
67
|
+
timezone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
68
|
+
lang: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
email: "email";
|
|
72
|
+
push: "push";
|
|
73
|
+
}>>;
|
|
74
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
75
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
}, z.core.$strict>]>;
|
|
77
|
+
/**
|
|
78
|
+
* Arguments for creating a new reminder.
|
|
79
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/create_reminder_api_v1_reminders_post
|
|
80
|
+
*/
|
|
81
|
+
export type AddReminderArgs = AddRelativeReminderArgs | AddAbsoluteReminderArgs;
|
|
82
|
+
export declare const AddLocationReminderArgsSchema: z.ZodObject<{
|
|
83
|
+
taskId: z.ZodString;
|
|
84
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
locLat: z.ZodString;
|
|
87
|
+
locLong: z.ZodString;
|
|
88
|
+
locTrigger: z.ZodEnum<{
|
|
89
|
+
on_enter: "on_enter";
|
|
90
|
+
on_leave: "on_leave";
|
|
91
|
+
}>;
|
|
92
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
export type AddLocationReminderArgs = z.infer<typeof AddLocationReminderArgsSchema>;
|
|
95
|
+
export declare const UpdateRelativeReminderArgsSchema: z.ZodObject<{
|
|
96
|
+
reminderType: z.ZodLiteral<"relative">;
|
|
97
|
+
minuteOffset: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
99
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
email: "email";
|
|
101
|
+
push: "push";
|
|
102
|
+
}>>;
|
|
103
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export type UpdateRelativeReminderArgs = z.infer<typeof UpdateRelativeReminderArgsSchema>;
|
|
106
|
+
export declare const UpdateAbsoluteReminderArgsSchema: z.ZodObject<{
|
|
107
|
+
reminderType: z.ZodLiteral<"absolute">;
|
|
108
|
+
due: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
string: z.ZodOptional<z.ZodString>;
|
|
110
|
+
isRecurring: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
date: z.ZodOptional<z.ZodString>;
|
|
112
|
+
timezone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
113
|
+
lang: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
116
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
email: "email";
|
|
118
|
+
push: "push";
|
|
119
|
+
}>>;
|
|
120
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
export type UpdateAbsoluteReminderArgs = z.infer<typeof UpdateAbsoluteReminderArgsSchema>;
|
|
123
|
+
export declare const UpdateReminderArgsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
+
reminderType: z.ZodLiteral<"relative">;
|
|
125
|
+
minuteOffset: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
127
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
email: "email";
|
|
129
|
+
push: "push";
|
|
130
|
+
}>>;
|
|
131
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
reminderType: z.ZodLiteral<"absolute">;
|
|
134
|
+
due: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
string: z.ZodOptional<z.ZodString>;
|
|
136
|
+
isRecurring: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
date: z.ZodOptional<z.ZodString>;
|
|
138
|
+
timezone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
139
|
+
lang: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
142
|
+
service: z.ZodOptional<z.ZodEnum<{
|
|
143
|
+
email: "email";
|
|
144
|
+
push: "push";
|
|
145
|
+
}>>;
|
|
146
|
+
isUrgent: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
}, z.core.$strict>], "reminderType">;
|
|
148
|
+
/**
|
|
149
|
+
* Arguments for updating an existing reminder.
|
|
150
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/update_reminder_api_v1_reminders__reminder_id__post
|
|
151
|
+
*/
|
|
152
|
+
export type UpdateReminderArgs = UpdateRelativeReminderArgs | UpdateAbsoluteReminderArgs;
|
|
153
|
+
export declare const UpdateLocationReminderArgsSchema: z.ZodObject<{
|
|
154
|
+
notifyUid: z.ZodOptional<z.ZodString>;
|
|
155
|
+
name: z.ZodOptional<z.ZodString>;
|
|
156
|
+
locLat: z.ZodOptional<z.ZodString>;
|
|
157
|
+
locLong: z.ZodOptional<z.ZodString>;
|
|
158
|
+
locTrigger: z.ZodOptional<z.ZodEnum<{
|
|
159
|
+
on_enter: "on_enter";
|
|
160
|
+
on_leave: "on_leave";
|
|
161
|
+
}>>;
|
|
162
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
/**
|
|
165
|
+
* Arguments for updating an existing location reminder.
|
|
166
|
+
*/
|
|
167
|
+
export type UpdateLocationReminderArgs = z.infer<typeof UpdateLocationReminderArgsSchema>;
|
|
168
|
+
/**
|
|
169
|
+
* Arguments for listing reminders.
|
|
170
|
+
* @see https://developer.todoist.com/api/v1/#tag/Reminders/operation/get_reminders_api_v1_reminders_get
|
|
171
|
+
*/
|
|
172
|
+
export type GetRemindersArgs = {
|
|
173
|
+
/** Filter by task ID. */
|
|
174
|
+
taskId?: string | null;
|
|
175
|
+
/** Cursor for pagination. */
|
|
176
|
+
cursor?: string | null;
|
|
177
|
+
/** Number of results per page (max 200, default 50). */
|
|
178
|
+
limit?: number;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Paginated response for reminders.
|
|
182
|
+
*/
|
|
183
|
+
export type GetRemindersResponse = {
|
|
184
|
+
results: Reminder[];
|
|
185
|
+
nextCursor: string | null;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Arguments for listing location reminders.
|
|
189
|
+
* @see https://developer.todoist.com/api/v1/#tag/Location-reminders/operation/get_location_reminders_api_v1_location_reminders_get
|
|
190
|
+
*/
|
|
191
|
+
export type GetLocationRemindersArgs = {
|
|
192
|
+
/** Filter by task ID. */
|
|
193
|
+
taskId?: string | null;
|
|
194
|
+
/** Cursor for pagination. */
|
|
195
|
+
cursor?: string | null;
|
|
196
|
+
/** Number of results per page (max 200, default 50). */
|
|
197
|
+
limit?: number;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Paginated response for location reminders.
|
|
201
|
+
*/
|
|
202
|
+
export type GetLocationRemindersResponse = {
|
|
203
|
+
results: LocationReminder[];
|
|
204
|
+
nextCursor: string | null;
|
|
205
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { RequireAtLeastOne } from 'type-fest';
|
|
2
|
+
import type { SearchArgs } from '../common.js';
|
|
3
|
+
import type { Section } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for retrieving sections.
|
|
6
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/get_sections_api_v1_sections_get
|
|
7
|
+
*/
|
|
8
|
+
export type GetSectionsArgs = {
|
|
9
|
+
projectId?: string | null;
|
|
10
|
+
cursor?: string | null;
|
|
11
|
+
limit?: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Arguments for searching sections.
|
|
15
|
+
*/
|
|
16
|
+
export type SearchSectionsArgs = SearchArgs & {
|
|
17
|
+
projectId?: string | null;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Response from retrieving sections.
|
|
21
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/get_sections_api_v1_sections_get
|
|
22
|
+
*/
|
|
23
|
+
export type GetSectionsResponse = {
|
|
24
|
+
results: Section[];
|
|
25
|
+
nextCursor: string | null;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Arguments for creating a new section.
|
|
29
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/create_section_api_v1_sections_post
|
|
30
|
+
*/
|
|
31
|
+
export type AddSectionArgs = {
|
|
32
|
+
name: string;
|
|
33
|
+
projectId: string;
|
|
34
|
+
order?: number | null;
|
|
35
|
+
/** Optional description for the section (Markdown). */
|
|
36
|
+
description?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Arguments for updating a section. At least one field must be provided.
|
|
40
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections/operation/update_section_api_v1_sections__section_id__post
|
|
41
|
+
*/
|
|
42
|
+
export type UpdateSectionArgs = RequireAtLeastOne<{
|
|
43
|
+
name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Updated section description (Markdown). Pass `null` to clear it. Omit the
|
|
46
|
+
* field to keep it unchanged.
|
|
47
|
+
*/
|
|
48
|
+
description: string | null;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Raw section fields (the persisted shape). Exposed so schemas that extend
|
|
4
|
+
* or override a field — notably the webhook variant — can reuse the base
|
|
5
|
+
* without duplicating every field.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SectionBaseSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
userId: z.ZodString;
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
addedAt: z.ZodCoercedDate<unknown>;
|
|
12
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
13
|
+
archivedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
description: z.ZodNullable<z.ZodString>;
|
|
16
|
+
sectionOrder: z.ZodNumber;
|
|
17
|
+
orderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
isArchived: z.ZodBoolean;
|
|
19
|
+
isDeleted: z.ZodBoolean;
|
|
20
|
+
isCollapsed: z.ZodBoolean;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const SectionSchema: z.ZodPipe<z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
userId: z.ZodString;
|
|
25
|
+
projectId: z.ZodString;
|
|
26
|
+
addedAt: z.ZodCoercedDate<unknown>;
|
|
27
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
28
|
+
archivedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
description: z.ZodNullable<z.ZodString>;
|
|
31
|
+
sectionOrder: z.ZodNumber;
|
|
32
|
+
orderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
isArchived: z.ZodBoolean;
|
|
34
|
+
isDeleted: z.ZodBoolean;
|
|
35
|
+
isCollapsed: z.ZodBoolean;
|
|
36
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
37
|
+
url: string;
|
|
38
|
+
id: string;
|
|
39
|
+
userId: string;
|
|
40
|
+
projectId: string;
|
|
41
|
+
addedAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
archivedAt: Date | null;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string | null;
|
|
46
|
+
sectionOrder: number;
|
|
47
|
+
isArchived: boolean;
|
|
48
|
+
isDeleted: boolean;
|
|
49
|
+
isCollapsed: boolean;
|
|
50
|
+
orderKey?: string | null | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
id: string;
|
|
53
|
+
userId: string;
|
|
54
|
+
projectId: string;
|
|
55
|
+
addedAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
archivedAt: Date | null;
|
|
58
|
+
name: string;
|
|
59
|
+
description: string | null;
|
|
60
|
+
sectionOrder: number;
|
|
61
|
+
isArchived: boolean;
|
|
62
|
+
isDeleted: boolean;
|
|
63
|
+
isCollapsed: boolean;
|
|
64
|
+
orderKey?: string | null | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
/**
|
|
67
|
+
* Represents a section in a Todoist project.
|
|
68
|
+
* @see https://developer.todoist.com/api/v1/#tag/Sections
|
|
69
|
+
*/
|
|
70
|
+
export type Section = z.infer<typeof SectionSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CalendarUpdateArgs = {
|
|
2
|
+
id: string;
|
|
3
|
+
isVisible: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type CalendarAccountUpdateArgs = {
|
|
6
|
+
id: string;
|
|
7
|
+
isEventsEnabled?: boolean;
|
|
8
|
+
isTasksEnabled?: boolean;
|
|
9
|
+
isAllDayTasksEnabled?: boolean;
|
|
10
|
+
pendingOperationUntil?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export type CalendarAccountRestoreTaskCalendarArgs = {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ColorKey } from '../../../utils/colors.js';
|
|
2
|
+
export type FilterAddArgs = {
|
|
3
|
+
name: string;
|
|
4
|
+
query: string;
|
|
5
|
+
description?: string | null;
|
|
6
|
+
color?: ColorKey;
|
|
7
|
+
itemOrder?: number;
|
|
8
|
+
isFavorite?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type FilterUpdateArgs = {
|
|
11
|
+
id: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
query?: string;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
color?: ColorKey;
|
|
16
|
+
itemOrder?: number;
|
|
17
|
+
isFavorite?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type FilterUpdateOrdersArgs = {
|
|
20
|
+
idOrderMapping: Record<string, number>;
|
|
21
|
+
};
|
|
22
|
+
export type FilterDeleteArgs = {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type FolderAddArgs = {
|
|
2
|
+
name: string;
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
childOrder?: number;
|
|
5
|
+
defaultOrder?: number;
|
|
6
|
+
defaultOrderKey?: string;
|
|
7
|
+
addProjectIds?: string[];
|
|
8
|
+
};
|
|
9
|
+
export type FolderUpdateArgs = {
|
|
10
|
+
id: string;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
defaultOrderKey?: string;
|
|
14
|
+
addProjectIds?: string[];
|
|
15
|
+
removeProjectIds?: string[];
|
|
16
|
+
};
|
|
17
|
+
export type FolderDeleteArgs = {
|
|
18
|
+
id: string;
|
|
19
|
+
workspaceId: string;
|
|
20
|
+
};
|