@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,167 @@
|
|
|
1
|
+
import type { CalendarUpdateArgs, CalendarAccountUpdateArgs, CalendarAccountRestoreTaskCalendarArgs } from './calendars.js';
|
|
2
|
+
import type { FilterAddArgs, FilterUpdateArgs, FilterUpdateOrdersArgs, FilterDeleteArgs } from './filters.js';
|
|
3
|
+
import type { FolderAddArgs, FolderUpdateArgs, FolderDeleteArgs } from './folders.js';
|
|
4
|
+
import type { LabelAddArgs, LabelRenameArgs, LabelUpdateArgs, LabelUpdateOrdersArgs, LabelDeleteArgs, LabelDeleteOccurrencesArgs } from './labels.js';
|
|
5
|
+
import type { NoteAddArgs, NoteUpdateArgs, NoteDeleteArgs, NoteReactionAddArgs, NoteReactionRemoveArgs } from './notes.js';
|
|
6
|
+
import type { LiveNotificationsMarkUnreadArgs, LiveNotificationsMarkReadArgs, LiveNotificationsMarkReadAllArgs, LiveNotificationsSetLastReadArgs } from './notifications.js';
|
|
7
|
+
import type { UserUpdateArgs, DeleteCollaboratorArgs, IdMappingArgs, SuggestionDeleteArgs, UserSettingsUpdateArgs, UpdateGoalsArgs } from './others.js';
|
|
8
|
+
import type { ProjectViewOptionsDefaultsSetArgs } from './project-view-options.js';
|
|
9
|
+
import type { ProjectAddArgs, ProjectUpdateArgs, ProjectMoveArgs, ProjectReorderArgs, ShareProjectArgs, ProjectLeaveArgs, ProjectArchiveArgs, ProjectUnarchiveArgs, ProjectDeleteArgs, ProjectMoveToWorkspaceArgs, ProjectMoveToPersonalArgs } from './projects.js';
|
|
10
|
+
import type { ReminderAddArgs, ReminderUpdateArgs, ReminderDeleteArgs } from './reminders.js';
|
|
11
|
+
import type { SectionAddArgs, SectionUpdateArgs, SectionMoveArgs, SectionReorderArgs, SectionArchiveArgs, SectionUnarchiveArgs, SectionDeleteArgs } from './sections.js';
|
|
12
|
+
import type { AcceptInvitationArgs, RejectInvitationArgs, BizAcceptInvitationArgs, BizRejectInvitationArgs } from './sharing.js';
|
|
13
|
+
import type { TaskAddArgs, TaskUpdateArgs, TaskCompleteArgs, TaskCompleteUndoArgs, TaskMoveArgs, TaskReorderArgs, TaskUncompleteArgs, TaskUpdateDateCompleteArgs, TaskDeleteArgs, TaskUpdateDayOrderArgs } from './tasks.js';
|
|
14
|
+
import type { ViewOptionsSetArgs, ViewOptionsDeleteArgs } from './view-options.js';
|
|
15
|
+
import type { WorkspaceFilterAddArgs, WorkspaceFilterUpdateArgs, WorkspaceFilterUpdateOrdersArgs, WorkspaceFilterDeleteArgs } from './workspace-filters.js';
|
|
16
|
+
import type { WorkspaceAddArgs, WorkspaceUpdateArgs, WorkspaceDeleteArgs, WorkspaceUpdateUserArgs, WorkspaceDeleteUserArgs, WorkspaceLeaveArgs, WorkspaceInviteArgs, WorkspaceSetDefaultOrderArgs, WorkspaceUpdateUserProjectSortPreferenceArgs } from './workspaces.js';
|
|
17
|
+
/**
|
|
18
|
+
* Maps each Sync API command type string to its corresponding argument type.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // TypeScript will enforce the correct args shape:
|
|
23
|
+
* const command: SyncCommand<'item_add'> = {
|
|
24
|
+
* type: 'item_add',
|
|
25
|
+
* uuid: '...',
|
|
26
|
+
* args: { content: 'Buy milk' } // Must satisfy TaskAddArgs
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export type SyncCommandsMap = {
|
|
31
|
+
item_add: TaskAddArgs;
|
|
32
|
+
item_update: TaskUpdateArgs;
|
|
33
|
+
item_complete: TaskCompleteArgs;
|
|
34
|
+
item_complete_undo: TaskCompleteUndoArgs;
|
|
35
|
+
item_move: TaskMoveArgs;
|
|
36
|
+
item_reorder: TaskReorderArgs;
|
|
37
|
+
item_uncomplete: TaskUncompleteArgs;
|
|
38
|
+
item_update_date_complete: TaskUpdateDateCompleteArgs;
|
|
39
|
+
item_delete: TaskDeleteArgs;
|
|
40
|
+
item_update_day_orders: TaskUpdateDayOrderArgs;
|
|
41
|
+
project_add: ProjectAddArgs;
|
|
42
|
+
project_update: ProjectUpdateArgs;
|
|
43
|
+
project_move: ProjectMoveArgs;
|
|
44
|
+
/** @deprecated Set `orderKey` via `project_update` instead. */
|
|
45
|
+
project_reorder: ProjectReorderArgs;
|
|
46
|
+
share_project: ShareProjectArgs;
|
|
47
|
+
project_leave: ProjectLeaveArgs;
|
|
48
|
+
project_archive: ProjectArchiveArgs;
|
|
49
|
+
project_unarchive: ProjectUnarchiveArgs;
|
|
50
|
+
project_delete: ProjectDeleteArgs;
|
|
51
|
+
project_move_to_workspace: ProjectMoveToWorkspaceArgs;
|
|
52
|
+
project_move_to_personal: ProjectMoveToPersonalArgs;
|
|
53
|
+
section_add: SectionAddArgs;
|
|
54
|
+
section_update: SectionUpdateArgs;
|
|
55
|
+
section_move: SectionMoveArgs;
|
|
56
|
+
/** @deprecated Set `orderKey` via `section_update` instead. */
|
|
57
|
+
section_reorder: SectionReorderArgs;
|
|
58
|
+
section_archive: SectionArchiveArgs;
|
|
59
|
+
section_unarchive: SectionUnarchiveArgs;
|
|
60
|
+
section_delete: SectionDeleteArgs;
|
|
61
|
+
label_add: LabelAddArgs;
|
|
62
|
+
label_rename: LabelRenameArgs;
|
|
63
|
+
label_update: LabelUpdateArgs;
|
|
64
|
+
label_update_orders: LabelUpdateOrdersArgs;
|
|
65
|
+
label_delete: LabelDeleteArgs;
|
|
66
|
+
label_delete_occurrences: LabelDeleteOccurrencesArgs;
|
|
67
|
+
filter_add: FilterAddArgs;
|
|
68
|
+
filter_update: FilterUpdateArgs;
|
|
69
|
+
filter_update_orders: FilterUpdateOrdersArgs;
|
|
70
|
+
filter_delete: FilterDeleteArgs;
|
|
71
|
+
note_add: NoteAddArgs;
|
|
72
|
+
note_update: NoteUpdateArgs;
|
|
73
|
+
note_delete: NoteDeleteArgs;
|
|
74
|
+
note_reaction_add: NoteReactionAddArgs;
|
|
75
|
+
note_reaction_remove: NoteReactionRemoveArgs;
|
|
76
|
+
reminder_add: ReminderAddArgs;
|
|
77
|
+
reminder_update: ReminderUpdateArgs;
|
|
78
|
+
reminder_delete: ReminderDeleteArgs;
|
|
79
|
+
workspace_add: WorkspaceAddArgs;
|
|
80
|
+
workspace_update: WorkspaceUpdateArgs;
|
|
81
|
+
workspace_delete: WorkspaceDeleteArgs;
|
|
82
|
+
workspace_update_user: WorkspaceUpdateUserArgs;
|
|
83
|
+
workspace_delete_user: WorkspaceDeleteUserArgs;
|
|
84
|
+
workspace_leave: WorkspaceLeaveArgs;
|
|
85
|
+
workspace_invite: WorkspaceInviteArgs;
|
|
86
|
+
/** @deprecated Set `defaultOrderKey` via `project_update` and `folder_update` instead. */
|
|
87
|
+
workspace_set_default_project_ordering: WorkspaceSetDefaultOrderArgs;
|
|
88
|
+
workspace_update_user_project_sort_preference: WorkspaceUpdateUserProjectSortPreferenceArgs;
|
|
89
|
+
folder_add: FolderAddArgs;
|
|
90
|
+
folder_update: FolderUpdateArgs;
|
|
91
|
+
folder_delete: FolderDeleteArgs;
|
|
92
|
+
workspace_filter_add: WorkspaceFilterAddArgs;
|
|
93
|
+
workspace_filter_update: WorkspaceFilterUpdateArgs;
|
|
94
|
+
workspace_filter_update_orders: WorkspaceFilterUpdateOrdersArgs;
|
|
95
|
+
workspace_filter_delete: WorkspaceFilterDeleteArgs;
|
|
96
|
+
live_notifications_mark_unread: LiveNotificationsMarkUnreadArgs;
|
|
97
|
+
live_notifications_mark_read: LiveNotificationsMarkReadArgs;
|
|
98
|
+
live_notifications_mark_read_all: LiveNotificationsMarkReadAllArgs;
|
|
99
|
+
live_notifications_set_last_read: LiveNotificationsSetLastReadArgs;
|
|
100
|
+
accept_invitation: AcceptInvitationArgs;
|
|
101
|
+
reject_invitation: RejectInvitationArgs;
|
|
102
|
+
biz_accept_invitation: BizAcceptInvitationArgs;
|
|
103
|
+
biz_reject_invitation: BizRejectInvitationArgs;
|
|
104
|
+
view_options_set: ViewOptionsSetArgs;
|
|
105
|
+
view_options_delete: ViewOptionsDeleteArgs;
|
|
106
|
+
project_view_options_defaults_set: ProjectViewOptionsDefaultsSetArgs;
|
|
107
|
+
calendar_update: CalendarUpdateArgs;
|
|
108
|
+
calendar_account_update: CalendarAccountUpdateArgs;
|
|
109
|
+
calendar_account_restore_task_calendar: CalendarAccountRestoreTaskCalendarArgs;
|
|
110
|
+
user_update: UserUpdateArgs;
|
|
111
|
+
user_settings_update: UserSettingsUpdateArgs;
|
|
112
|
+
update_goals: UpdateGoalsArgs;
|
|
113
|
+
delete_collaborator: DeleteCollaboratorArgs;
|
|
114
|
+
id_mapping: IdMappingArgs;
|
|
115
|
+
suggestion_delete: SuggestionDeleteArgs;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* All known Sync API command type strings.
|
|
119
|
+
*/
|
|
120
|
+
export type SyncCommandType = keyof SyncCommandsMap;
|
|
121
|
+
/**
|
|
122
|
+
* A strongly-typed Sync API command.
|
|
123
|
+
*
|
|
124
|
+
* When `Type` is a known command type (e.g. `'item_add'`), `args` is constrained
|
|
125
|
+
* to the corresponding argument type. For unknown command types, `args` falls back
|
|
126
|
+
* to `Record<string, unknown>`.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* // Strongly typed:
|
|
131
|
+
* const cmd: SyncCommand<'item_add'> = {
|
|
132
|
+
* type: 'item_add',
|
|
133
|
+
* uuid: 'abc-123',
|
|
134
|
+
* args: { content: 'Buy milk' },
|
|
135
|
+
* }
|
|
136
|
+
*
|
|
137
|
+
* // Untyped (backwards compatible):
|
|
138
|
+
* const cmd2: SyncCommand = {
|
|
139
|
+
* type: 'custom_command',
|
|
140
|
+
* uuid: 'def-456',
|
|
141
|
+
* args: { foo: 'bar' },
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
export type SyncCommand<Type extends SyncCommandType | string = string> = {
|
|
146
|
+
type: Type;
|
|
147
|
+
uuid: string;
|
|
148
|
+
args: Type extends SyncCommandType ? SyncCommandsMap[Type] : Record<string, unknown>;
|
|
149
|
+
tempId?: string;
|
|
150
|
+
};
|
|
151
|
+
export * from './shared.js';
|
|
152
|
+
export * from './tasks.js';
|
|
153
|
+
export * from './projects.js';
|
|
154
|
+
export * from './sections.js';
|
|
155
|
+
export * from './labels.js';
|
|
156
|
+
export * from './filters.js';
|
|
157
|
+
export * from './notes.js';
|
|
158
|
+
export * from './reminders.js';
|
|
159
|
+
export * from './workspaces.js';
|
|
160
|
+
export * from './folders.js';
|
|
161
|
+
export * from './workspace-filters.js';
|
|
162
|
+
export * from './notifications.js';
|
|
163
|
+
export * from './sharing.js';
|
|
164
|
+
export * from './view-options.js';
|
|
165
|
+
export * from './project-view-options.js';
|
|
166
|
+
export * from './calendars.js';
|
|
167
|
+
export * from './others.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ColorKey } from '../../../utils/colors.js';
|
|
2
|
+
export type LabelAddArgs = {
|
|
3
|
+
name: string;
|
|
4
|
+
color?: ColorKey;
|
|
5
|
+
itemOrder?: number;
|
|
6
|
+
isFavorite?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type LabelRenameArgs = {
|
|
9
|
+
nameOld: string;
|
|
10
|
+
nameNew: string;
|
|
11
|
+
};
|
|
12
|
+
export type LabelUpdateArgs = {
|
|
13
|
+
id: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
color?: ColorKey;
|
|
16
|
+
itemOrder?: number;
|
|
17
|
+
isFavorite?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type LabelUpdateOrdersArgs = {
|
|
20
|
+
idOrderMapping: Record<string, number>;
|
|
21
|
+
};
|
|
22
|
+
/** Available label delete cascade modes. */
|
|
23
|
+
export declare const LABEL_DELETE_CASCADE_MODES: readonly ["none", "all"];
|
|
24
|
+
/** Cascade mode when deleting a label. */
|
|
25
|
+
export type LabelDeleteCascadeMode = (typeof LABEL_DELETE_CASCADE_MODES)[number];
|
|
26
|
+
export type LabelDeleteArgs = {
|
|
27
|
+
id: string;
|
|
28
|
+
cascade?: LabelDeleteCascadeMode;
|
|
29
|
+
};
|
|
30
|
+
export type LabelDeleteOccurrencesArgs = {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type NoteAddArgs = {
|
|
2
|
+
itemId?: string;
|
|
3
|
+
projectId?: string;
|
|
4
|
+
content?: string;
|
|
5
|
+
fileAttachment?: unknown;
|
|
6
|
+
uidsToNotify?: string[];
|
|
7
|
+
postedAt: string;
|
|
8
|
+
};
|
|
9
|
+
export type NoteUpdateArgs = {
|
|
10
|
+
id: string;
|
|
11
|
+
itemId?: string;
|
|
12
|
+
projectId?: string;
|
|
13
|
+
content?: string;
|
|
14
|
+
fileAttachment?: unknown;
|
|
15
|
+
uidsToNotify?: string[];
|
|
16
|
+
};
|
|
17
|
+
export type NoteDeleteArgs = {
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
20
|
+
export type NoteReactionAddArgs = {
|
|
21
|
+
id: string;
|
|
22
|
+
reaction: string;
|
|
23
|
+
};
|
|
24
|
+
export type NoteReactionRemoveArgs = {
|
|
25
|
+
id: string;
|
|
26
|
+
reaction: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type LiveNotificationsMarkUnreadArgs = {
|
|
2
|
+
ids: string[];
|
|
3
|
+
};
|
|
4
|
+
export type LiveNotificationsMarkReadArgs = {
|
|
5
|
+
ids: string[];
|
|
6
|
+
};
|
|
7
|
+
export type LiveNotificationsMarkReadAllArgs = Record<never, never>;
|
|
8
|
+
export type LiveNotificationsSetLastReadArgs = {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { DateFormat, DayOfWeek, TimeFormat } from '../user-preferences.js';
|
|
2
|
+
export type UserStatusEffectArgs = {
|
|
3
|
+
scope?: {
|
|
4
|
+
mode?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/** Only supplied fields change. Null removes optional fields and effects. */
|
|
8
|
+
export type UserStatusArgs = {
|
|
9
|
+
/** Required when creating a status; omit to preserve the existing message. */
|
|
10
|
+
message?: string;
|
|
11
|
+
emoji?: string | null;
|
|
12
|
+
/** Must be in the future; null removes expiry, omission preserves it. Dates are sent as ISO strings. */
|
|
13
|
+
activeUntil?: Date | string | null;
|
|
14
|
+
/** Supplied effects are merged; null clears all effects, omission or {} preserves them. */
|
|
15
|
+
effects?: {
|
|
16
|
+
/** Null removes the effect; {} preserves its configuration or enables it with defaults. */
|
|
17
|
+
pauseNotifications?: UserStatusEffectArgs | null;
|
|
18
|
+
/** Null removes the effect; {} preserves its configuration or enables it with defaults. */
|
|
19
|
+
pauseActivity?: UserStatusEffectArgs | null;
|
|
20
|
+
} | null;
|
|
21
|
+
};
|
|
22
|
+
export type UserUpdateArgs = {
|
|
23
|
+
fullName?: string;
|
|
24
|
+
autoReminder?: number;
|
|
25
|
+
dateFormat?: DateFormat;
|
|
26
|
+
nextWeek?: DayOfWeek;
|
|
27
|
+
startDay?: DayOfWeek;
|
|
28
|
+
startPage?: string;
|
|
29
|
+
themeId?: string;
|
|
30
|
+
timeFormat?: TimeFormat;
|
|
31
|
+
timezone?: string;
|
|
32
|
+
/** `null` clears the status; omitting it leaves the current status unchanged. */
|
|
33
|
+
status?: UserStatusArgs | null;
|
|
34
|
+
};
|
|
35
|
+
export type DeleteCollaboratorArgs = {
|
|
36
|
+
projectId: string;
|
|
37
|
+
email: string;
|
|
38
|
+
};
|
|
39
|
+
export type IdMappingArgs = {
|
|
40
|
+
items?: Record<string, string>;
|
|
41
|
+
sections?: Record<string, string>;
|
|
42
|
+
notes?: Record<string, string>;
|
|
43
|
+
reminders?: Record<string, string>;
|
|
44
|
+
};
|
|
45
|
+
export type SuggestionDeleteArgs = {
|
|
46
|
+
type: 'templates';
|
|
47
|
+
};
|
|
48
|
+
export type UserSettingsUpdateArgs = {
|
|
49
|
+
reminderPush?: boolean;
|
|
50
|
+
reminderDesktop?: boolean;
|
|
51
|
+
reminderEmail?: boolean;
|
|
52
|
+
completedSoundDesktop?: boolean;
|
|
53
|
+
completedSoundMobile?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type UpdateGoalsArgs = {
|
|
56
|
+
dailyGoal?: number;
|
|
57
|
+
weeklyGoal?: number;
|
|
58
|
+
ignoreDays?: DayOfWeek[];
|
|
59
|
+
vacationMode?: boolean;
|
|
60
|
+
karmaDisabled?: boolean;
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CalendarSettingsArgs, ViewMode, GroupedBy, SortedBy, SortOrder, PropertySettingsPatch } from '../resources/view-options.js';
|
|
2
|
+
export type ProjectViewOptionsDefaultsSetArgs = {
|
|
3
|
+
projectId: string;
|
|
4
|
+
viewMode?: ViewMode | null;
|
|
5
|
+
groupedBy?: GroupedBy | null;
|
|
6
|
+
sortedBy?: SortedBy | null;
|
|
7
|
+
sortOrder?: SortOrder | null;
|
|
8
|
+
showCompletedTasks?: boolean;
|
|
9
|
+
filteredBy?: string | null;
|
|
10
|
+
calendarSettings?: CalendarSettingsArgs | null;
|
|
11
|
+
/** Merged into the saved property settings; `null` clears them all. */
|
|
12
|
+
propertySettings?: PropertySettingsPatch | null;
|
|
13
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ColorKey } from '../../../utils/colors.js';
|
|
2
|
+
import type { ProjectViewStyle, ProjectVisibility } from '../../projects/types.js';
|
|
3
|
+
import type { WorkspaceRole, CollaboratorRole } from '../../workspaces/types.js';
|
|
4
|
+
import type { ProjectStatus } from './shared.js';
|
|
5
|
+
export type ProjectAccessConfig = {
|
|
6
|
+
visibility: ProjectVisibility;
|
|
7
|
+
configuration?: {
|
|
8
|
+
hideCollaboratorDetails?: boolean;
|
|
9
|
+
disableDuplication?: boolean;
|
|
10
|
+
} | null;
|
|
11
|
+
};
|
|
12
|
+
export type ProjectAddArgs = {
|
|
13
|
+
name: string;
|
|
14
|
+
parentId?: string | null;
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
folderId?: string | null;
|
|
17
|
+
childOrder?: number;
|
|
18
|
+
orderKey?: string;
|
|
19
|
+
defaultOrder?: number;
|
|
20
|
+
color?: ColorKey;
|
|
21
|
+
description?: string;
|
|
22
|
+
isFavorite?: boolean;
|
|
23
|
+
isInviteOnly?: boolean;
|
|
24
|
+
isLinkSharingEnabled?: boolean;
|
|
25
|
+
viewStyle?: ProjectViewStyle;
|
|
26
|
+
status?: ProjectStatus;
|
|
27
|
+
collaboratorRoleDefault?: CollaboratorRole;
|
|
28
|
+
access?: ProjectAccessConfig;
|
|
29
|
+
};
|
|
30
|
+
export type ProjectUpdateArgs = {
|
|
31
|
+
id: string;
|
|
32
|
+
folderId?: string | null;
|
|
33
|
+
orderKey?: string;
|
|
34
|
+
defaultOrderKey?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
color?: ColorKey;
|
|
37
|
+
description?: string;
|
|
38
|
+
isFavorite?: boolean;
|
|
39
|
+
isCollapsed?: boolean;
|
|
40
|
+
isInviteOnly?: boolean;
|
|
41
|
+
isLinkSharingEnabled?: boolean;
|
|
42
|
+
isProjectInsightsEnabled?: boolean;
|
|
43
|
+
viewStyle?: ProjectViewStyle;
|
|
44
|
+
status?: ProjectStatus;
|
|
45
|
+
collaboratorRoleDefault?: CollaboratorRole;
|
|
46
|
+
access?: ProjectAccessConfig;
|
|
47
|
+
};
|
|
48
|
+
export type ProjectMoveArgs = {
|
|
49
|
+
id: string;
|
|
50
|
+
parentId?: string | null;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Set `orderKey` via `project_update` instead.
|
|
54
|
+
*/
|
|
55
|
+
export type ProjectReorderArgs = {
|
|
56
|
+
projects: Array<{
|
|
57
|
+
id: string;
|
|
58
|
+
childOrder: number;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
export type ShareProjectArgs = {
|
|
62
|
+
projectId: string;
|
|
63
|
+
email: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
workspaceRole?: WorkspaceRole;
|
|
66
|
+
} | {
|
|
67
|
+
projectId: string;
|
|
68
|
+
groupId: string;
|
|
69
|
+
message?: string;
|
|
70
|
+
workspaceRole?: WorkspaceRole;
|
|
71
|
+
};
|
|
72
|
+
export type ProjectLeaveArgs = {
|
|
73
|
+
projectId: string;
|
|
74
|
+
};
|
|
75
|
+
export type ProjectArchiveArgs = {
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
export type ProjectUnarchiveArgs = {
|
|
79
|
+
id: string;
|
|
80
|
+
};
|
|
81
|
+
export type ProjectDeleteArgs = {
|
|
82
|
+
id: string;
|
|
83
|
+
};
|
|
84
|
+
export type ProjectMoveToWorkspaceArgs = {
|
|
85
|
+
projectId: string;
|
|
86
|
+
workspaceId: string;
|
|
87
|
+
isInviteOnly?: boolean;
|
|
88
|
+
publicAccess?: boolean;
|
|
89
|
+
access?: ProjectAccessConfig;
|
|
90
|
+
folderId?: string | null;
|
|
91
|
+
useLro?: boolean;
|
|
92
|
+
};
|
|
93
|
+
export type ProjectMoveToPersonalArgs = {
|
|
94
|
+
projectId: string;
|
|
95
|
+
useLro?: boolean;
|
|
96
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { LocationTrigger, ReminderType } from '../resources/reminders.js';
|
|
2
|
+
import type { SyncDueDate, ReminderService } from './shared.js';
|
|
3
|
+
export type ReminderAddArgs = {
|
|
4
|
+
type: Extract<ReminderType, 'absolute'>;
|
|
5
|
+
itemId: string;
|
|
6
|
+
service?: ReminderService;
|
|
7
|
+
notifyUid?: string;
|
|
8
|
+
due?: SyncDueDate;
|
|
9
|
+
} | {
|
|
10
|
+
type: Extract<ReminderType, 'relative'>;
|
|
11
|
+
itemId: string;
|
|
12
|
+
service?: ReminderService;
|
|
13
|
+
notifyUid?: string;
|
|
14
|
+
minuteOffset?: number;
|
|
15
|
+
due?: SyncDueDate;
|
|
16
|
+
} | {
|
|
17
|
+
type: Extract<ReminderType, 'location'>;
|
|
18
|
+
itemId: string;
|
|
19
|
+
name: string;
|
|
20
|
+
locLat: string;
|
|
21
|
+
locLong: string;
|
|
22
|
+
radius?: number;
|
|
23
|
+
locTrigger?: LocationTrigger;
|
|
24
|
+
notifyUid?: string;
|
|
25
|
+
};
|
|
26
|
+
export type ReminderUpdateArgs = {
|
|
27
|
+
id: string;
|
|
28
|
+
type: Extract<ReminderType, 'absolute'>;
|
|
29
|
+
service?: ReminderService;
|
|
30
|
+
notifyUid?: string;
|
|
31
|
+
due?: SyncDueDate;
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
type: Extract<ReminderType, 'relative'>;
|
|
35
|
+
service?: ReminderService;
|
|
36
|
+
notifyUid?: string;
|
|
37
|
+
minuteOffset?: number;
|
|
38
|
+
due?: SyncDueDate;
|
|
39
|
+
} | {
|
|
40
|
+
id: string;
|
|
41
|
+
type: Extract<ReminderType, 'location'>;
|
|
42
|
+
name?: string;
|
|
43
|
+
locLat?: string;
|
|
44
|
+
locLong?: string;
|
|
45
|
+
radius?: number;
|
|
46
|
+
locTrigger?: LocationTrigger;
|
|
47
|
+
notifyUid?: string;
|
|
48
|
+
};
|
|
49
|
+
export type ReminderDeleteArgs = {
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type SectionAddArgs = {
|
|
2
|
+
projectId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
sectionOrder?: number;
|
|
5
|
+
orderKey?: string;
|
|
6
|
+
addedAt?: string;
|
|
7
|
+
};
|
|
8
|
+
export type SectionUpdateArgs = {
|
|
9
|
+
id: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
isCollapsed?: boolean;
|
|
12
|
+
orderKey?: string;
|
|
13
|
+
};
|
|
14
|
+
export type SectionMoveArgs = {
|
|
15
|
+
id: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Set `orderKey` via `section_update` instead.
|
|
20
|
+
*/
|
|
21
|
+
export type SectionReorderArgs = {
|
|
22
|
+
sections: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
sectionOrder: number;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
export type SectionArchiveArgs = {
|
|
28
|
+
id: string;
|
|
29
|
+
archivedAt?: string;
|
|
30
|
+
};
|
|
31
|
+
export type SectionUnarchiveArgs = {
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
export type SectionDeleteArgs = {
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types used across multiple Sync API command argument types.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Due date for Sync API create/update operations.
|
|
6
|
+
* Unlike the REST API `DueDate` (which has required fields on responses),
|
|
7
|
+
* this type represents the input shape where all fields are optional.
|
|
8
|
+
*/
|
|
9
|
+
export type SyncDueDate = {
|
|
10
|
+
date?: string;
|
|
11
|
+
string?: string;
|
|
12
|
+
timezone?: string | null;
|
|
13
|
+
lang?: string;
|
|
14
|
+
isRecurring?: boolean;
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* Deadline for Sync API create/update operations.
|
|
18
|
+
* Unlike the REST API `Deadline` (which requires `lang`),
|
|
19
|
+
* this type makes `lang` optional for input.
|
|
20
|
+
*/
|
|
21
|
+
export type SyncDeadline = {
|
|
22
|
+
date: string;
|
|
23
|
+
lang?: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* Duration for Sync API create/update operations.
|
|
27
|
+
*/
|
|
28
|
+
export type SyncDuration = {
|
|
29
|
+
amount: number;
|
|
30
|
+
unit: string;
|
|
31
|
+
} | null;
|
|
32
|
+
/** Task priority: 1 = normal, 2 = medium, 3 = high, 4 = urgent. */
|
|
33
|
+
export type TaskPriority = 1 | 2 | 3 | 4;
|
|
34
|
+
/** Available project workflow statuses. */
|
|
35
|
+
export declare const PROJECT_STATUSES: readonly ["PLANNED", "IN_PROGRESS", "PAUSED", "COMPLETED", "CANCELED"];
|
|
36
|
+
/** Project workflow status. */
|
|
37
|
+
export type ProjectStatus = (typeof PROJECT_STATUSES)[number];
|
|
38
|
+
export { COLLABORATOR_ROLES, type CollaboratorRole } from '../../workspaces/types.js';
|
|
39
|
+
/** Available reminder notification services. */
|
|
40
|
+
export declare const REMINDER_SERVICES: readonly ["default", "email", "mobile", "push", "no_default"];
|
|
41
|
+
/** Reminder notification service. */
|
|
42
|
+
export type ReminderService = (typeof REMINDER_SERVICES)[number];
|
|
43
|
+
/**
|
|
44
|
+
* Default access level for workspaces.
|
|
45
|
+
* Same values as {@link ProjectVisibility} from entities.
|
|
46
|
+
*/
|
|
47
|
+
export { type ProjectVisibility as DefaultAccessLevel } from '../../projects/types.js';
|
|
48
|
+
/** Available workspace project sort orders. */
|
|
49
|
+
export declare const WORKSPACE_PROJECT_SORT_ORDERS: readonly ["MANUAL", "A_TO_Z", "Z_TO_A"];
|
|
50
|
+
/** Workspace project sort order preference. */
|
|
51
|
+
export type WorkspaceProjectSortOrder = (typeof WORKSPACE_PROJECT_SORT_ORDERS)[number];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type AcceptInvitationArgs = {
|
|
2
|
+
invitationId: string;
|
|
3
|
+
invitationSecret: string;
|
|
4
|
+
};
|
|
5
|
+
export type RejectInvitationArgs = {
|
|
6
|
+
invitationId: string;
|
|
7
|
+
invitationSecret: string;
|
|
8
|
+
};
|
|
9
|
+
export type BizAcceptInvitationArgs = {
|
|
10
|
+
invitationId: string;
|
|
11
|
+
invitationSecret: string;
|
|
12
|
+
};
|
|
13
|
+
export type BizRejectInvitationArgs = {
|
|
14
|
+
invitationId: string;
|
|
15
|
+
invitationSecret: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { SyncDueDate, SyncDeadline, SyncDuration, TaskPriority } from './shared.js';
|
|
2
|
+
export type TaskAddArgs = {
|
|
3
|
+
content: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
projectId?: string;
|
|
6
|
+
due?: SyncDueDate;
|
|
7
|
+
deadline?: SyncDeadline;
|
|
8
|
+
duration?: SyncDuration;
|
|
9
|
+
priority?: TaskPriority;
|
|
10
|
+
parentId?: string | null;
|
|
11
|
+
childOrder?: number;
|
|
12
|
+
sectionId?: string | null;
|
|
13
|
+
dayOrder?: number;
|
|
14
|
+
isCollapsed?: boolean;
|
|
15
|
+
labels?: string[];
|
|
16
|
+
assignedByUid?: string | null;
|
|
17
|
+
responsibleUid?: string | null;
|
|
18
|
+
autoReminder?: boolean;
|
|
19
|
+
autoParseLabels?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type TaskUpdateArgs = {
|
|
22
|
+
id: string;
|
|
23
|
+
content?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
due?: SyncDueDate;
|
|
26
|
+
deadline?: SyncDeadline;
|
|
27
|
+
duration?: SyncDuration;
|
|
28
|
+
priority?: TaskPriority;
|
|
29
|
+
isCollapsed?: boolean;
|
|
30
|
+
labels?: string[];
|
|
31
|
+
assignedByUid?: string | null;
|
|
32
|
+
responsibleUid?: string | null;
|
|
33
|
+
dayOrder?: number;
|
|
34
|
+
};
|
|
35
|
+
export type TaskCompleteArgs = {
|
|
36
|
+
id: string;
|
|
37
|
+
completedAt: string;
|
|
38
|
+
forceHistory?: boolean;
|
|
39
|
+
fromUndo?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type TaskCompleteUndoArgs = {
|
|
42
|
+
id: string;
|
|
43
|
+
descendants: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
checked?: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
export type TaskMoveArgs = {
|
|
49
|
+
id: string;
|
|
50
|
+
parentId: string | null;
|
|
51
|
+
} | {
|
|
52
|
+
id: string;
|
|
53
|
+
sectionId: string | null;
|
|
54
|
+
} | {
|
|
55
|
+
id: string;
|
|
56
|
+
projectId: string;
|
|
57
|
+
};
|
|
58
|
+
export type TaskReorderArgs = {
|
|
59
|
+
items: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
childOrder: number;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
export type TaskUncompleteArgs = {
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
67
|
+
export type TaskUpdateDateCompleteArgs = {
|
|
68
|
+
id: string;
|
|
69
|
+
due: SyncDueDate;
|
|
70
|
+
isForward: boolean;
|
|
71
|
+
resetSubtasks?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export type TaskDeleteArgs = {
|
|
74
|
+
id: string;
|
|
75
|
+
};
|
|
76
|
+
export type TaskUpdateDayOrderArgs = {
|
|
77
|
+
idsToOrders: Record<string, number | undefined>;
|
|
78
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarSettingsArgs, GroupedBy, SortedBy, SortOrder, ViewMode, ViewType, PropertySettingsPatch } from '../resources/view-options.js';
|
|
2
|
+
export type ViewOptionsSetArgs = {
|
|
3
|
+
viewType: ViewType;
|
|
4
|
+
objectId?: string;
|
|
5
|
+
groupedBy?: GroupedBy | null;
|
|
6
|
+
filteredBy?: string | null;
|
|
7
|
+
viewMode?: ViewMode;
|
|
8
|
+
showCompletedTasks?: boolean;
|
|
9
|
+
sortedBy?: SortedBy | null;
|
|
10
|
+
sortOrder?: SortOrder | null;
|
|
11
|
+
calendarSettings?: CalendarSettingsArgs | null;
|
|
12
|
+
/** Merged into the saved property settings; `null` clears them all. */
|
|
13
|
+
propertySettings?: PropertySettingsPatch | null;
|
|
14
|
+
};
|
|
15
|
+
export type ViewOptionsDeleteArgs = {
|
|
16
|
+
viewType: ViewType;
|
|
17
|
+
objectId?: string;
|
|
18
|
+
};
|