@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,1437 @@
|
|
|
1
|
+
import type { Reminder } from './types/index.js';
|
|
2
|
+
import { GetActivityLogsArgs, GetActivityLogsResponse } from './types/activity/index.js';
|
|
3
|
+
import type { AddAppArgs, App, AppByDistributionToken, AppDistributionToken, AppInstallation, AppSecrets, AppTestToken, AppVerificationToken, AppWebhook, AppWithUserCount, InstallAppArgs, RevokeUserAuthorizationArgs, UpdateAppArgs, UpdateAppInstallationArgs, UpdateAppWebhookArgs, UploadAppIconArgs, UserAuthorization } from './types/apps/index.js';
|
|
4
|
+
import { Backup, GetBackupsArgs, DownloadBackupArgs } from './types/backups/index.js';
|
|
5
|
+
import type { BillingPortalUrlResponse, CancelPlanArgs, CheckoutSessionResponse, GetPricingArgs, PricesResponse, PricingResponse, ProBillingPortalArgs, ProPlanDetails, StartProTrialArgs, StartWorkspaceTrialArgs, SubscriptionInfo, UpgradeToProArgs, UpgradeWorkspaceArgs, WorkspaceBillingPortalArgs } from './types/billing/index.js';
|
|
6
|
+
import { Attachment, Comment, AddCommentArgs, UpdateCommentArgs, GetProjectCommentsArgs, GetTaskCommentsArgs, GetCommentsResponse } from './types/comments/index.js';
|
|
7
|
+
import { GetOrCreateEmailArgs, GetOrCreateEmailResponse, DisableEmailArgs } from './types/emails/index.js';
|
|
8
|
+
import { GetFoldersArgs, GetFoldersResponse, AddFolderArgs, UpdateFolderArgs } from './types/folders/index.js';
|
|
9
|
+
import { CustomFetch, CustomHeaders, FileResponse } from './types/http.js';
|
|
10
|
+
import { IdMapping, MovedId, GetIdMappingsArgs, GetMovedIdsArgs } from './types/id-mappings/index.js';
|
|
11
|
+
import { ProjectActivityStats, ProjectHealth, ProjectHealthContext, ProjectProgress, WorkspaceInsights, GetProjectActivityStatsArgs, GetWorkspaceInsightsArgs } from './types/insights/index.js';
|
|
12
|
+
import { Label, AddLabelArgs, UpdateLabelArgs, GetLabelsArgs, SearchLabelsArgs, GetLabelsResponse, GetSharedLabelsArgs, GetSharedLabelsResponse, RenameSharedLabelArgs, RemoveSharedLabelArgs } from './types/labels/index.js';
|
|
13
|
+
import { ProductivityStats } from './types/productivity/index.js';
|
|
14
|
+
import { PersonalProject, WorkspaceProject, AddProjectArgs, UpdateProjectArgs, GetProjectsArgs, SearchProjectsArgs, GetProjectCollaboratorsArgs, GetProjectsResponse, GetProjectCollaboratorsResponse, GetArchivedProjectsArgs, GetArchivedProjectsResponse, MoveProjectToWorkspaceArgs, MoveProjectToPersonalArgs, GetArchivedProjectsCountArgs, GetArchivedProjectsCountResponse, GetProjectPermissionsResponse, GetFullProjectArgs, GetFullProjectResponse, JoinProjectResponse, PersonalProjectCapacity } from './types/projects/index.js';
|
|
15
|
+
import { AddReminderArgs, UpdateReminderArgs, AddLocationReminderArgs, UpdateLocationReminderArgs, GetRemindersArgs, GetRemindersResponse, GetLocationRemindersArgs, GetLocationRemindersResponse } from './types/reminders/index.js';
|
|
16
|
+
import { Section, AddSectionArgs, UpdateSectionArgs, GetSectionsArgs, SearchSectionsArgs, GetSectionsResponse } from './types/sections/index.js';
|
|
17
|
+
import type { SyncRequest, SyncResponse, ViewOptions, ViewOptionsDeleteArgs, ViewOptionsSetArgs } from './types/sync/index.js';
|
|
18
|
+
import type { Folder } from './types/sync/resources/folders.js';
|
|
19
|
+
import { Task, AddTaskArgs, GetTasksArgs, GetTasksByFilterArgs, UpdateTaskArgs, QuickAddTaskArgs, type MoveTaskArgs, GetCompletedTasksByCompletionDateArgs, GetCompletedTasksByDueDateArgs, GetCompletedTasksResponse, SearchCompletedTasksArgs, GetTasksResponse, GetAllCompletedTasksArgs, GetAllCompletedTasksResponse } from './types/tasks/index.js';
|
|
20
|
+
import { ExportTemplateFileArgs, ExportTemplateUrlArgs, ExportTemplateUrlResponse, CreateProjectFromTemplateArgs, CreateProjectFromTemplateResponse, ImportTemplateIntoProjectArgs, ImportTemplateFromIdArgs, ImportTemplateResponse } from './types/templates/index.js';
|
|
21
|
+
import type { AddUiExtensionArgs, UiExtension, UpdateUiExtensionArgs, UploadUiExtensionIconArgs } from './types/ui-extensions/index.js';
|
|
22
|
+
import { UploadFileArgs, DeleteUploadArgs } from './types/uploads/index.js';
|
|
23
|
+
import { CurrentUser } from './types/users/index.js';
|
|
24
|
+
import { WorkspaceInvitation, WorkspacePlanDetails, JoinWorkspaceResult, Workspace, AddWorkspaceArgs, UpdateWorkspaceArgs, GetWorkspaceMembersActivityArgs, GetWorkspaceMembersActivityResponse, GetWorkspaceUserTasksArgs, GetWorkspaceUserTasksResponse, InviteWorkspaceUsersArgs, InviteWorkspaceUsersResponse, UpdateWorkspaceUserArgs, RemoveWorkspaceUserArgs, GetWorkspaceInvitationsArgs, DeleteWorkspaceInvitationArgs, WorkspaceInvitationActionArgs, JoinWorkspaceArgs, WorkspaceLogoArgs, GetWorkspacePlanDetailsArgs, GetWorkspaceUsersArgs, GetWorkspaceUsersResponse, GetWorkspaceProjectsArgs, WorkspaceInvitationsResponse, AllWorkspaceInvitationsResponse, WorkspaceLogoResponse } from './types/workspaces/index.js';
|
|
25
|
+
/**
|
|
26
|
+
* A client for interacting with the Todoist API v1.
|
|
27
|
+
* This class provides methods to manage tasks, projects, sections, labels, and comments in Todoist.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const api = new TodoistApi('your-api-token');
|
|
32
|
+
*
|
|
33
|
+
* // Get all tasks
|
|
34
|
+
* const tasks = await api.getTasks();
|
|
35
|
+
*
|
|
36
|
+
* // Create a new task
|
|
37
|
+
* const newTask = await api.addTask({
|
|
38
|
+
* content: 'My new task',
|
|
39
|
+
* projectId: '12345'
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* For more information about the Todoist API v1, see the [official documentation](https://todoist.com/api/v1).
|
|
44
|
+
* If you're migrating from v9, please refer to the [migration guide](https://todoist.com/api/v1/docs#tag/Migrating-from-v9).
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Configuration options for the TodoistApi constructor
|
|
48
|
+
*/
|
|
49
|
+
export type TodoistApiOptions = {
|
|
50
|
+
/**
|
|
51
|
+
* Optional custom API base URL. If not provided, defaults to Todoist's standard API endpoint
|
|
52
|
+
*/
|
|
53
|
+
baseUrl?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Optional custom fetch function for alternative HTTP clients (e.g., Obsidian's requestUrl, React Native fetch)
|
|
56
|
+
*/
|
|
57
|
+
customFetch?: CustomFetch;
|
|
58
|
+
/**
|
|
59
|
+
* Optional headers sent with every API request, e.g. `{ 'Doist-Platform': 'cli' }` for client
|
|
60
|
+
* attribution. Pass a function instead to compute them per request, e.g. a fresh request ID;
|
|
61
|
+
* it is called once per request and retries reuse its result. Cannot replace `Authorization`
|
|
62
|
+
* or `X-Request-Id`. Not sent on attachment downloads, which redirect to a third-party CDN.
|
|
63
|
+
*/
|
|
64
|
+
headers?: CustomHeaders;
|
|
65
|
+
};
|
|
66
|
+
export declare class TodoistApi {
|
|
67
|
+
private authToken;
|
|
68
|
+
private syncApiBase;
|
|
69
|
+
private customFetch?;
|
|
70
|
+
private customHeaders?;
|
|
71
|
+
private readonly taskClient;
|
|
72
|
+
private readonly projectClient;
|
|
73
|
+
private readonly sectionClient;
|
|
74
|
+
private readonly labelClient;
|
|
75
|
+
private readonly commentClient;
|
|
76
|
+
private readonly reminderClient;
|
|
77
|
+
private readonly insightsClient;
|
|
78
|
+
private readonly folderClient;
|
|
79
|
+
private readonly filterClient;
|
|
80
|
+
private readonly templateClient;
|
|
81
|
+
private readonly uploadClient;
|
|
82
|
+
private readonly backupClient;
|
|
83
|
+
private readonly emailClient;
|
|
84
|
+
private readonly idMappingClient;
|
|
85
|
+
private readonly activityClient;
|
|
86
|
+
private readonly productivityClient;
|
|
87
|
+
private readonly workspaceClient;
|
|
88
|
+
private readonly billingClient;
|
|
89
|
+
private readonly appClient;
|
|
90
|
+
private readonly uiExtensionClient;
|
|
91
|
+
private readonly viewOptionsClient;
|
|
92
|
+
constructor(
|
|
93
|
+
/**
|
|
94
|
+
* Your Todoist API token.
|
|
95
|
+
*/
|
|
96
|
+
authToken: string,
|
|
97
|
+
/**
|
|
98
|
+
* Optional configuration options
|
|
99
|
+
*/
|
|
100
|
+
options?: TodoistApiOptions);
|
|
101
|
+
/**
|
|
102
|
+
* Executes a raw Sync API request.
|
|
103
|
+
*
|
|
104
|
+
* This method provides direct access to the Sync API, allowing you to send
|
|
105
|
+
* strongly-typed commands and request specific resource types.
|
|
106
|
+
*
|
|
107
|
+
* @param request - The sync request payload containing commands and/or resource types.
|
|
108
|
+
* @param requestId - Optional custom identifier for the request.
|
|
109
|
+
* @returns A promise that resolves to the sync response.
|
|
110
|
+
* @throws TodoistSyncError if any command failed. The Sync API applies commands
|
|
111
|
+
* independently, so the error's `syncStatus` (keyed by command `uuid`) and
|
|
112
|
+
* `tempIdMapping` (keyed by command `tempId`) report the commands that were
|
|
113
|
+
* applied regardless.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* import { createCommand } from '@todoist/sdk'
|
|
118
|
+
*
|
|
119
|
+
* const response = await api.sync({
|
|
120
|
+
* commands: [
|
|
121
|
+
* createCommand('item_add', { content: 'Buy milk' }),
|
|
122
|
+
* ],
|
|
123
|
+
* resourceTypes: ['items'],
|
|
124
|
+
* syncToken: '*',
|
|
125
|
+
* })
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
sync(syncRequest: SyncRequest, requestId?: string): Promise<SyncResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves the authenticated user's active saved view options.
|
|
131
|
+
*
|
|
132
|
+
* @returns A promise that resolves to the active saved view options.
|
|
133
|
+
*/
|
|
134
|
+
getViewOptions(): Promise<ViewOptions[]>;
|
|
135
|
+
/**
|
|
136
|
+
* Sets saved options for a view.
|
|
137
|
+
*
|
|
138
|
+
* @param args - The saved view options to set.
|
|
139
|
+
* @param requestId - Optional custom identifier for the request.
|
|
140
|
+
* @returns A promise that resolves when the view options are saved.
|
|
141
|
+
*/
|
|
142
|
+
setViewOptions(args: ViewOptionsSetArgs, requestId?: string): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Deletes the saved options for a view.
|
|
145
|
+
*
|
|
146
|
+
* @param args - The view whose saved options to delete.
|
|
147
|
+
* @param requestId - Optional custom identifier for the request.
|
|
148
|
+
* @returns A promise that resolves when the view options are deleted.
|
|
149
|
+
*/
|
|
150
|
+
deleteViewOptions(args: ViewOptionsDeleteArgs, requestId?: string): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Retrieves information about the authenticated user.
|
|
153
|
+
*
|
|
154
|
+
* @returns A promise that resolves to the current user's information.
|
|
155
|
+
*/
|
|
156
|
+
getUser(): Promise<CurrentUser>;
|
|
157
|
+
/**
|
|
158
|
+
* Retrieves a single active (non-completed) task by its ID.
|
|
159
|
+
*
|
|
160
|
+
* @param id - The unique identifier of the task.
|
|
161
|
+
* @returns A promise that resolves to the requested task.
|
|
162
|
+
*/
|
|
163
|
+
getTask(id: string): Promise<Task>;
|
|
164
|
+
/**
|
|
165
|
+
* Retrieves a list of active tasks filtered by specific parameters.
|
|
166
|
+
*
|
|
167
|
+
* @param args - Filter parameters such as project ID, label ID, or due date.
|
|
168
|
+
* @returns A promise that resolves to an array of tasks.
|
|
169
|
+
*/
|
|
170
|
+
getTasks(args?: GetTasksArgs): Promise<GetTasksResponse>;
|
|
171
|
+
/**
|
|
172
|
+
* Retrieves tasks filtered by a filter string.
|
|
173
|
+
*
|
|
174
|
+
* @param args - Parameters for filtering tasks, including the query string and optional language.
|
|
175
|
+
* @returns A promise that resolves to a paginated response of tasks.
|
|
176
|
+
*/
|
|
177
|
+
getTasksByFilter(args: GetTasksByFilterArgs): Promise<GetTasksResponse>;
|
|
178
|
+
/**
|
|
179
|
+
* Retrieves completed tasks by completion date.
|
|
180
|
+
*
|
|
181
|
+
* @param args - Parameters for filtering, including required since, until.
|
|
182
|
+
* @returns A promise that resolves to a paginated response of completed tasks.
|
|
183
|
+
*/
|
|
184
|
+
getCompletedTasksByCompletionDate(args: GetCompletedTasksByCompletionDateArgs): Promise<GetCompletedTasksResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Retrieves completed tasks by due date.
|
|
187
|
+
*
|
|
188
|
+
* @param args - Parameters for filtering, including required since, until.
|
|
189
|
+
* @returns A promise that resolves to a paginated response of completed tasks.
|
|
190
|
+
*/
|
|
191
|
+
getCompletedTasksByDueDate(args: GetCompletedTasksByDueDateArgs): Promise<GetCompletedTasksResponse>;
|
|
192
|
+
/**
|
|
193
|
+
* Searches completed tasks by query string.
|
|
194
|
+
*
|
|
195
|
+
* @param args - Parameters for searching, including the query string.
|
|
196
|
+
* @returns A promise that resolves to a paginated response of completed tasks.
|
|
197
|
+
*/
|
|
198
|
+
searchCompletedTasks(args: SearchCompletedTasksArgs): Promise<GetCompletedTasksResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* Retrieves all completed tasks with optional filters.
|
|
201
|
+
*
|
|
202
|
+
* Uses offset-based pagination rather than cursor-based.
|
|
203
|
+
*
|
|
204
|
+
* @param args - Optional parameters including project ID, label, date range, and pagination.
|
|
205
|
+
* @returns A promise that resolves to completed tasks with associated project and section data.
|
|
206
|
+
*/
|
|
207
|
+
getAllCompletedTasks(args?: GetAllCompletedTasksArgs): Promise<GetAllCompletedTasksResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* Creates a new task with the provided parameters.
|
|
210
|
+
*
|
|
211
|
+
* @param args - Task creation parameters such as content, due date, or priority.
|
|
212
|
+
* @param requestId - Optional custom identifier for the request.
|
|
213
|
+
* @returns A promise that resolves to the created task.
|
|
214
|
+
*/
|
|
215
|
+
addTask(args: AddTaskArgs, requestId?: string): Promise<Task>;
|
|
216
|
+
/**
|
|
217
|
+
* Quickly adds a task using natural language processing for due dates.
|
|
218
|
+
*
|
|
219
|
+
* @param args - Quick add task parameters, including content and due date.
|
|
220
|
+
* @returns A promise that resolves to the created task.
|
|
221
|
+
*/
|
|
222
|
+
quickAddTask(args: QuickAddTaskArgs): Promise<Task>;
|
|
223
|
+
/**
|
|
224
|
+
* Updates an existing task by its ID with the provided parameters.
|
|
225
|
+
*
|
|
226
|
+
* @param id - The unique identifier of the task to update.
|
|
227
|
+
* @param args - Update parameters such as content, priority, or due date. Pass
|
|
228
|
+
* `dueString: null` (or `"no date"`) to clear the due date.
|
|
229
|
+
* @param requestId - Optional custom identifier for the request.
|
|
230
|
+
* @returns A promise that resolves to the updated task.
|
|
231
|
+
*/
|
|
232
|
+
updateTask(id: string, args: UpdateTaskArgs, requestId?: string): Promise<Task>;
|
|
233
|
+
/**
|
|
234
|
+
* Moves existing tasks by their ID to either a different parent/section/project.
|
|
235
|
+
*
|
|
236
|
+
* @param ids - The unique identifier of the tasks to be moved.
|
|
237
|
+
* @param args - The paramets that should contain only one of projectId, sectionId, or parentId
|
|
238
|
+
* @param requestId - Optional custom identifier for the request.
|
|
239
|
+
* @returns - A promise that resolves to an array of the updated tasks.
|
|
240
|
+
*/
|
|
241
|
+
moveTasks(ids: string[], args: MoveTaskArgs, requestId?: string): Promise<Task[]>;
|
|
242
|
+
/**
|
|
243
|
+
* Moves a task by its ID to either a different parent/section/project.
|
|
244
|
+
*
|
|
245
|
+
* @param id - The unique identifier of the task to be moved.
|
|
246
|
+
* @param args - The parameters that should contain exactly one of projectId, sectionId, or parentId
|
|
247
|
+
* @param requestId - Optional custom identifier for the request.
|
|
248
|
+
* @returns A promise that resolves to the updated task.
|
|
249
|
+
*/
|
|
250
|
+
moveTask(id: string, args: MoveTaskArgs, requestId?: string): Promise<Task>;
|
|
251
|
+
/**
|
|
252
|
+
* Closes (completes) a task by its ID.
|
|
253
|
+
*
|
|
254
|
+
* @param id - The unique identifier of the task to close.
|
|
255
|
+
* @param requestId - Optional custom identifier for the request.
|
|
256
|
+
* @returns A promise that resolves to `true` if successful.
|
|
257
|
+
*/
|
|
258
|
+
closeTask(id: string, requestId?: string): Promise<boolean>;
|
|
259
|
+
/**
|
|
260
|
+
* Reopens a previously closed (completed) task by its ID.
|
|
261
|
+
*
|
|
262
|
+
* @param id - The unique identifier of the task to reopen.
|
|
263
|
+
* @param requestId - Optional custom identifier for the request.
|
|
264
|
+
* @returns A promise that resolves to `true` if successful.
|
|
265
|
+
*/
|
|
266
|
+
reopenTask(id: string, requestId?: string): Promise<boolean>;
|
|
267
|
+
/**
|
|
268
|
+
* Deletes a task by its ID.
|
|
269
|
+
*
|
|
270
|
+
* @param id - The unique identifier of the task to delete.
|
|
271
|
+
* @param requestId - Optional custom identifier for the request.
|
|
272
|
+
* @returns A promise that resolves to `true` if successful.
|
|
273
|
+
*/
|
|
274
|
+
deleteTask(id: string, requestId?: string): Promise<boolean>;
|
|
275
|
+
/**
|
|
276
|
+
* Retrieves a project by its ID.
|
|
277
|
+
*
|
|
278
|
+
* @param id - The unique identifier of the project.
|
|
279
|
+
* @returns A promise that resolves to the requested project.
|
|
280
|
+
*/
|
|
281
|
+
getProject(id: string): Promise<PersonalProject | WorkspaceProject>;
|
|
282
|
+
/**
|
|
283
|
+
* Retrieves all projects with optional filters.
|
|
284
|
+
*
|
|
285
|
+
* @param args - Optional filters for retrieving projects.
|
|
286
|
+
* @returns A promise that resolves to an array of projects.
|
|
287
|
+
*/
|
|
288
|
+
getProjects(args?: GetProjectsArgs): Promise<GetProjectsResponse>;
|
|
289
|
+
/**
|
|
290
|
+
* Searches projects by name.
|
|
291
|
+
*
|
|
292
|
+
* @param args - Search parameters including the query string.
|
|
293
|
+
* @returns A promise that resolves to a paginated response of projects.
|
|
294
|
+
*/
|
|
295
|
+
searchProjects(args: SearchProjectsArgs): Promise<GetProjectsResponse>;
|
|
296
|
+
/**
|
|
297
|
+
* Retrieves all archived projects with optional filters.
|
|
298
|
+
*
|
|
299
|
+
* @param args - Optional filters for retrieving archived projects.
|
|
300
|
+
* @returns A promise that resolves to an array of archived projects.
|
|
301
|
+
*/
|
|
302
|
+
getArchivedProjects(args?: GetArchivedProjectsArgs): Promise<GetArchivedProjectsResponse>;
|
|
303
|
+
/**
|
|
304
|
+
* Creates a new project with the provided parameters.
|
|
305
|
+
*
|
|
306
|
+
* @param args - Project creation parameters such as name or color.
|
|
307
|
+
* @param requestId - Optional custom identifier for the request.
|
|
308
|
+
* @returns A promise that resolves to the created project.
|
|
309
|
+
*/
|
|
310
|
+
addProject(args: AddProjectArgs, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
311
|
+
/**
|
|
312
|
+
* Updates an existing project by its ID with the provided parameters.
|
|
313
|
+
*
|
|
314
|
+
* @param id - The unique identifier of the project to update.
|
|
315
|
+
* @param args - Update parameters such as name or color.
|
|
316
|
+
* @param requestId - Optional custom identifier for the request.
|
|
317
|
+
* @returns A promise that resolves to the updated project.
|
|
318
|
+
*/
|
|
319
|
+
updateProject(id: string, args: UpdateProjectArgs, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
320
|
+
/**
|
|
321
|
+
* Deletes a project by its ID.
|
|
322
|
+
*
|
|
323
|
+
* If the project is a workspace project, it must have been
|
|
324
|
+
* archived first before it can be deleted, otherwise calling
|
|
325
|
+
* this function will result in an error. Personal projects can
|
|
326
|
+
* be deleted regardless of their archived status.
|
|
327
|
+
*
|
|
328
|
+
* @param id - The unique identifier of the project to delete.
|
|
329
|
+
* @param requestId - Optional custom identifier for the request.
|
|
330
|
+
* @returns A promise that resolves to `true` if successful.
|
|
331
|
+
*/
|
|
332
|
+
deleteProject(id: string, requestId?: string): Promise<boolean>;
|
|
333
|
+
/**
|
|
334
|
+
* Archives a project by its ID.
|
|
335
|
+
*
|
|
336
|
+
* @param id - The unique identifier of the project to archive.
|
|
337
|
+
* @param requestId - Optional custom identifier for the request.
|
|
338
|
+
* @returns A promise that resolves to the updated project.
|
|
339
|
+
*/
|
|
340
|
+
archiveProject(id: string, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
341
|
+
/**
|
|
342
|
+
* Unarchives a project by its ID.
|
|
343
|
+
*
|
|
344
|
+
* @param id - The unique identifier of the project to unarchive.
|
|
345
|
+
* @param requestId - Optional custom identifier for the request.
|
|
346
|
+
* @returns A promise that resolves to the updated project.
|
|
347
|
+
*/
|
|
348
|
+
unarchiveProject(id: string, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
349
|
+
/**
|
|
350
|
+
* Moves a project to a workspace.
|
|
351
|
+
*
|
|
352
|
+
* @param args - The arguments for moving the project.
|
|
353
|
+
* @param requestId - Optional custom identifier for the request.
|
|
354
|
+
* @returns A promise that resolves to the moved project.
|
|
355
|
+
*/
|
|
356
|
+
moveProjectToWorkspace(args: MoveProjectToWorkspaceArgs, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
357
|
+
/**
|
|
358
|
+
* Moves a project to personal.
|
|
359
|
+
*
|
|
360
|
+
* @param args - The arguments for moving the project.
|
|
361
|
+
* @param requestId - Optional custom identifier for the request.
|
|
362
|
+
* @returns A promise that resolves to the moved project.
|
|
363
|
+
*/
|
|
364
|
+
moveProjectToPersonal(args: MoveProjectToPersonalArgs, requestId?: string): Promise<PersonalProject | WorkspaceProject>;
|
|
365
|
+
/**
|
|
366
|
+
* Reads how many active personal projects the user's plan allows and how many
|
|
367
|
+
* they have.
|
|
368
|
+
*
|
|
369
|
+
* The API accepts a couple of projects beyond the plan limit, so offline clients
|
|
370
|
+
* can sync at the boundary. It therefore does not reject an `addProject`,
|
|
371
|
+
* `unarchiveProject` or `moveProjectToPersonal` that the Todoist apps would
|
|
372
|
+
* refuse. Check `remaining` before any of those to enforce the same limit as the
|
|
373
|
+
* apps. The count can change between this call and the write, so treat it as a
|
|
374
|
+
* guard rather than a guarantee.
|
|
375
|
+
*
|
|
376
|
+
* Every active personal project except the Inbox counts, including shared
|
|
377
|
+
* projects and sub-projects (see `countsTowardsPersonalProjectLimit`).
|
|
378
|
+
*
|
|
379
|
+
* @returns A promise that resolves to the limit, the number of projects counting
|
|
380
|
+
* towards it, and how many more can be added.
|
|
381
|
+
* @throws TodoistRequestError if the plan limits do not include a project limit.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* ```typescript
|
|
385
|
+
* const { remaining, maxProjects } = await api.getPersonalProjectCapacity()
|
|
386
|
+
* if (remaining === 0) {
|
|
387
|
+
* throw new Error(`You have reached your limit of ${maxProjects} projects`)
|
|
388
|
+
* }
|
|
389
|
+
* await api.addProject({ name: 'Groceries' })
|
|
390
|
+
* ```
|
|
391
|
+
*/
|
|
392
|
+
getPersonalProjectCapacity(): Promise<PersonalProjectCapacity>;
|
|
393
|
+
/**
|
|
394
|
+
* Counts the number of archived projects.
|
|
395
|
+
*
|
|
396
|
+
* @param args - Optional parameters to filter the count.
|
|
397
|
+
* @returns A promise that resolves to the count of archived projects.
|
|
398
|
+
*/
|
|
399
|
+
getArchivedProjectsCount(args?: GetArchivedProjectsCountArgs): Promise<GetArchivedProjectsCountResponse>;
|
|
400
|
+
/**
|
|
401
|
+
* Retrieves the role-to-action permission mappings for projects.
|
|
402
|
+
*
|
|
403
|
+
* @returns A promise that resolves to the permission mappings.
|
|
404
|
+
*/
|
|
405
|
+
getProjectPermissions(): Promise<GetProjectPermissionsResponse>;
|
|
406
|
+
/**
|
|
407
|
+
* Retrieves full project data including tasks, sections, collaborators, and notes.
|
|
408
|
+
*
|
|
409
|
+
* @param id - The unique identifier of the project.
|
|
410
|
+
* @param args - Optional parameters.
|
|
411
|
+
* @returns A promise that resolves to the full project data.
|
|
412
|
+
*/
|
|
413
|
+
getFullProject(id: string, args?: GetFullProjectArgs): Promise<GetFullProjectResponse>;
|
|
414
|
+
/**
|
|
415
|
+
* Joins a workspace project.
|
|
416
|
+
*
|
|
417
|
+
* Only used for workspaces — this endpoint is used to join a workspace project
|
|
418
|
+
* by a workspace user.
|
|
419
|
+
*
|
|
420
|
+
* @param id - The unique identifier of the workspace project to join.
|
|
421
|
+
* @param requestId - Optional custom identifier for the request.
|
|
422
|
+
* @returns A promise that resolves to the full project data after joining.
|
|
423
|
+
*/
|
|
424
|
+
joinProject(id: string, requestId?: string): Promise<JoinProjectResponse>;
|
|
425
|
+
/**
|
|
426
|
+
* Retrieves a list of collaborators for a specific project.
|
|
427
|
+
*
|
|
428
|
+
* @param projectId - The unique identifier of the project.
|
|
429
|
+
* @param args - Optional parameters to filter collaborators.
|
|
430
|
+
* @returns A promise that resolves to an array of collaborators for the project.
|
|
431
|
+
*/
|
|
432
|
+
getProjectCollaborators(projectId: string, args?: GetProjectCollaboratorsArgs): Promise<GetProjectCollaboratorsResponse>;
|
|
433
|
+
/**
|
|
434
|
+
* Retrieves activity statistics for a project.
|
|
435
|
+
*
|
|
436
|
+
* @param projectId - The unique identifier of the project.
|
|
437
|
+
* @param args - Optional parameters including weeks and weekly counts flag.
|
|
438
|
+
* @returns A promise that resolves to the project activity stats.
|
|
439
|
+
*/
|
|
440
|
+
getProjectActivityStats(projectId: string, args?: GetProjectActivityStatsArgs): Promise<ProjectActivityStats>;
|
|
441
|
+
/**
|
|
442
|
+
* Retrieves the health status of a project.
|
|
443
|
+
*
|
|
444
|
+
* @param projectId - The unique identifier of the project.
|
|
445
|
+
* @returns A promise that resolves to the project health data.
|
|
446
|
+
*/
|
|
447
|
+
getProjectHealth(projectId: string): Promise<ProjectHealth>;
|
|
448
|
+
/**
|
|
449
|
+
* Retrieves the health context for a project, including metrics and task details.
|
|
450
|
+
*
|
|
451
|
+
* @param projectId - The unique identifier of the project.
|
|
452
|
+
* @returns A promise that resolves to the project health context.
|
|
453
|
+
*/
|
|
454
|
+
getProjectHealthContext(projectId: string): Promise<ProjectHealthContext>;
|
|
455
|
+
/**
|
|
456
|
+
* Retrieves progress information for a project.
|
|
457
|
+
*
|
|
458
|
+
* @param projectId - The unique identifier of the project.
|
|
459
|
+
* @returns A promise that resolves to the project progress data.
|
|
460
|
+
*/
|
|
461
|
+
getProjectProgress(projectId: string): Promise<ProjectProgress>;
|
|
462
|
+
/**
|
|
463
|
+
* Retrieves insights for all projects in a workspace.
|
|
464
|
+
*
|
|
465
|
+
* @param workspaceId - The unique identifier of the workspace.
|
|
466
|
+
* @param args - Optional parameters including project IDs filter.
|
|
467
|
+
* @returns A promise that resolves to workspace insights data.
|
|
468
|
+
*/
|
|
469
|
+
getWorkspaceInsights(workspaceId: string, args?: GetWorkspaceInsightsArgs): Promise<WorkspaceInsights>;
|
|
470
|
+
/**
|
|
471
|
+
* Triggers a health analysis for a project.
|
|
472
|
+
*
|
|
473
|
+
* @param projectId - The unique identifier of the project.
|
|
474
|
+
* @param requestId - Optional custom identifier for the request.
|
|
475
|
+
* @returns A promise that resolves to the updated project health data.
|
|
476
|
+
*/
|
|
477
|
+
analyzeProjectHealth(projectId: string, requestId?: string): Promise<ProjectHealth>;
|
|
478
|
+
/**
|
|
479
|
+
* Retrieves all sections within a specific project or matching criteria.
|
|
480
|
+
*
|
|
481
|
+
* @param args - Filter parameters such as project ID. If no projectId is provided,
|
|
482
|
+
* all sections are returned.
|
|
483
|
+
* @returns A promise that resolves to an array of sections.
|
|
484
|
+
*/
|
|
485
|
+
getSections(args?: GetSectionsArgs): Promise<GetSectionsResponse>;
|
|
486
|
+
/**
|
|
487
|
+
* Searches sections by name.
|
|
488
|
+
*
|
|
489
|
+
* @param args - Search parameters including the query string.
|
|
490
|
+
* @returns A promise that resolves to a paginated response of sections.
|
|
491
|
+
*/
|
|
492
|
+
searchSections(args: SearchSectionsArgs): Promise<GetSectionsResponse>;
|
|
493
|
+
/**
|
|
494
|
+
* Retrieves a single section by its ID.
|
|
495
|
+
*
|
|
496
|
+
* @param id - The unique identifier of the section.
|
|
497
|
+
* @returns A promise that resolves to the requested section.
|
|
498
|
+
*/
|
|
499
|
+
getSection(id: string): Promise<Section>;
|
|
500
|
+
/**
|
|
501
|
+
* Creates a new section within a project.
|
|
502
|
+
*
|
|
503
|
+
* @param args - Section creation parameters such as name or project ID.
|
|
504
|
+
* @param requestId - Optional custom identifier for the request.
|
|
505
|
+
* @returns A promise that resolves to the created section.
|
|
506
|
+
*/
|
|
507
|
+
addSection(args: AddSectionArgs, requestId?: string): Promise<Section>;
|
|
508
|
+
/**
|
|
509
|
+
* Updates a section by its ID with the provided parameters.
|
|
510
|
+
*
|
|
511
|
+
* @param id - The unique identifier of the section to update.
|
|
512
|
+
* @param args - Update parameters such as name or project ID.
|
|
513
|
+
* @param requestId - Optional custom identifier for the request.
|
|
514
|
+
* @returns A promise that resolves to the updated section.
|
|
515
|
+
*/
|
|
516
|
+
updateSection(id: string, args: UpdateSectionArgs, requestId?: string): Promise<Section>;
|
|
517
|
+
/**
|
|
518
|
+
* Deletes a section by its ID.
|
|
519
|
+
*
|
|
520
|
+
* @param id - The unique identifier of the section to delete.
|
|
521
|
+
* @param requestId - Optional custom identifier for the request.
|
|
522
|
+
* @returns A promise that resolves to `true` if successful.
|
|
523
|
+
*/
|
|
524
|
+
deleteSection(id: string, requestId?: string): Promise<boolean>;
|
|
525
|
+
/**
|
|
526
|
+
* Archives a section by its ID.
|
|
527
|
+
*
|
|
528
|
+
* @param id - The unique identifier of the section to archive.
|
|
529
|
+
* @param requestId - Optional custom identifier for the request.
|
|
530
|
+
* @returns A promise that resolves to the updated section.
|
|
531
|
+
*/
|
|
532
|
+
archiveSection(id: string, requestId?: string): Promise<Section>;
|
|
533
|
+
/**
|
|
534
|
+
* Unarchives a section by its ID.
|
|
535
|
+
*
|
|
536
|
+
* @param id - The unique identifier of the section to unarchive.
|
|
537
|
+
* @param requestId - Optional custom identifier for the request.
|
|
538
|
+
* @returns A promise that resolves to the updated section.
|
|
539
|
+
*/
|
|
540
|
+
unarchiveSection(id: string, requestId?: string): Promise<Section>;
|
|
541
|
+
/**
|
|
542
|
+
* Retrieves a label by its ID.
|
|
543
|
+
*
|
|
544
|
+
* @param id - The unique identifier of the label.
|
|
545
|
+
* @returns A promise that resolves to the requested label.
|
|
546
|
+
*/
|
|
547
|
+
getLabel(id: string): Promise<Label>;
|
|
548
|
+
/**
|
|
549
|
+
* Retrieves all labels.
|
|
550
|
+
*
|
|
551
|
+
* @param args - Optional filter parameters.
|
|
552
|
+
* @returns A promise that resolves to an array of labels.
|
|
553
|
+
*/
|
|
554
|
+
getLabels(args?: GetLabelsArgs): Promise<GetLabelsResponse>;
|
|
555
|
+
/**
|
|
556
|
+
* Searches labels by name.
|
|
557
|
+
*
|
|
558
|
+
* @param args - Search parameters including the query string.
|
|
559
|
+
* @returns A promise that resolves to a paginated response of labels.
|
|
560
|
+
*/
|
|
561
|
+
searchLabels(args: SearchLabelsArgs): Promise<GetLabelsResponse>;
|
|
562
|
+
/**
|
|
563
|
+
* Adds a new label.
|
|
564
|
+
*
|
|
565
|
+
* @param args - Label creation parameters such as name.
|
|
566
|
+
* @param requestId - Optional custom identifier for the request.
|
|
567
|
+
* @returns A promise that resolves to the created label.
|
|
568
|
+
*/
|
|
569
|
+
addLabel(args: AddLabelArgs, requestId?: string): Promise<Label>;
|
|
570
|
+
/**
|
|
571
|
+
* Updates an existing label by its ID.
|
|
572
|
+
*
|
|
573
|
+
* @param id - The unique identifier of the label to update.
|
|
574
|
+
* @param args - Update parameters such as name or color.
|
|
575
|
+
* @param requestId - Optional custom identifier for the request.
|
|
576
|
+
* @returns A promise that resolves to the updated label.
|
|
577
|
+
*/
|
|
578
|
+
updateLabel(id: string, args: UpdateLabelArgs, requestId?: string): Promise<Label>;
|
|
579
|
+
/**
|
|
580
|
+
* Deletes a label by its ID.
|
|
581
|
+
*
|
|
582
|
+
* @param id - The unique identifier of the label to delete.
|
|
583
|
+
* @param requestId - Optional custom identifier for the request.
|
|
584
|
+
* @returns A promise that resolves to `true` if successful.
|
|
585
|
+
*/
|
|
586
|
+
deleteLabel(id: string, requestId?: string): Promise<boolean>;
|
|
587
|
+
/**
|
|
588
|
+
* Retrieves a list of shared labels.
|
|
589
|
+
*
|
|
590
|
+
* @param args - Optional parameters to filter shared labels.
|
|
591
|
+
* @returns A promise that resolves to an array of shared labels.
|
|
592
|
+
*/
|
|
593
|
+
getSharedLabels(args?: GetSharedLabelsArgs): Promise<GetSharedLabelsResponse>;
|
|
594
|
+
/**
|
|
595
|
+
* Renames an existing shared label.
|
|
596
|
+
*
|
|
597
|
+
* @param args - Parameters for renaming the shared label, including the current and new name.
|
|
598
|
+
* @returns A promise that resolves to `true` if successful.
|
|
599
|
+
*/
|
|
600
|
+
renameSharedLabel(args: RenameSharedLabelArgs): Promise<boolean>;
|
|
601
|
+
/**
|
|
602
|
+
* Removes a shared label.
|
|
603
|
+
*
|
|
604
|
+
* @param args - Parameters for removing the shared label.
|
|
605
|
+
* @returns A promise that resolves to `true` if successful.
|
|
606
|
+
*/
|
|
607
|
+
removeSharedLabel(args: RemoveSharedLabelArgs): Promise<boolean>;
|
|
608
|
+
/**
|
|
609
|
+
* Retrieves all comments associated with a task or project.
|
|
610
|
+
*
|
|
611
|
+
* @param args - Parameters for retrieving comments, such as task ID or project ID.
|
|
612
|
+
* @returns A promise that resolves to an array of comments.
|
|
613
|
+
*/
|
|
614
|
+
getComments(args: GetTaskCommentsArgs | GetProjectCommentsArgs): Promise<GetCommentsResponse>;
|
|
615
|
+
/**
|
|
616
|
+
* Retrieves a specific comment by its ID.
|
|
617
|
+
*
|
|
618
|
+
* @param id - The unique identifier of the comment to retrieve.
|
|
619
|
+
* @returns A promise that resolves to the requested comment.
|
|
620
|
+
*/
|
|
621
|
+
getComment(id: string): Promise<Comment>;
|
|
622
|
+
/**
|
|
623
|
+
* Adds a comment to a task or project.
|
|
624
|
+
*
|
|
625
|
+
* @param args - Parameters for creating the comment, such as content and the target task or project ID.
|
|
626
|
+
* @param requestId - Optional custom identifier for the request.
|
|
627
|
+
* @returns A promise that resolves to the created comment.
|
|
628
|
+
*/
|
|
629
|
+
addComment(args: AddCommentArgs, requestId?: string): Promise<Comment>;
|
|
630
|
+
/**
|
|
631
|
+
* Updates an existing comment by its ID.
|
|
632
|
+
*
|
|
633
|
+
* @param id - The unique identifier of the comment to update.
|
|
634
|
+
* @param args - Update parameters such as new content.
|
|
635
|
+
* @param requestId - Optional custom identifier for the request.
|
|
636
|
+
* @returns A promise that resolves to the updated comment.
|
|
637
|
+
*/
|
|
638
|
+
updateComment(id: string, args: UpdateCommentArgs, requestId?: string): Promise<Comment>;
|
|
639
|
+
/**
|
|
640
|
+
* Deletes a comment by its ID.
|
|
641
|
+
*
|
|
642
|
+
* @param id - The unique identifier of the comment to delete.
|
|
643
|
+
* @param requestId - Optional custom identifier for the request.
|
|
644
|
+
* @returns A promise that resolves to `true` if successful.
|
|
645
|
+
*/
|
|
646
|
+
deleteComment(id: string, requestId?: string): Promise<boolean>;
|
|
647
|
+
/**
|
|
648
|
+
* Retrieves a paginated list of time-based reminders.
|
|
649
|
+
*
|
|
650
|
+
* @param args - Optional parameters including task ID filter and pagination.
|
|
651
|
+
* @returns A promise that resolves to a paginated list of reminders.
|
|
652
|
+
*/
|
|
653
|
+
getReminders(args?: GetRemindersArgs): Promise<GetRemindersResponse>;
|
|
654
|
+
/**
|
|
655
|
+
* Retrieves a paginated list of location-based reminders.
|
|
656
|
+
*
|
|
657
|
+
* @param args - Optional parameters including task ID filter and pagination.
|
|
658
|
+
* @returns A promise that resolves to a paginated list of location reminders.
|
|
659
|
+
*/
|
|
660
|
+
getLocationReminders(args?: GetLocationRemindersArgs): Promise<GetLocationRemindersResponse>;
|
|
661
|
+
/**
|
|
662
|
+
* Retrieves a time-based reminder by its ID.
|
|
663
|
+
*
|
|
664
|
+
* @param id - The unique identifier of the reminder to retrieve.
|
|
665
|
+
* @returns A promise that resolves to the requested reminder.
|
|
666
|
+
*/
|
|
667
|
+
getReminder(id: string): Promise<Reminder>;
|
|
668
|
+
/**
|
|
669
|
+
* Retrieves a location reminder by its ID.
|
|
670
|
+
*
|
|
671
|
+
* @param id - The unique identifier of the location reminder to retrieve.
|
|
672
|
+
* @returns A promise that resolves to the requested reminder.
|
|
673
|
+
*/
|
|
674
|
+
getLocationReminder(id: string): Promise<Reminder>;
|
|
675
|
+
/**
|
|
676
|
+
* Creates a time-based reminder for a task.
|
|
677
|
+
*
|
|
678
|
+
* @param args - Reminder creation parameters for relative or absolute reminders.
|
|
679
|
+
* @param requestId - Optional custom identifier for the request.
|
|
680
|
+
* @returns A promise that resolves to the created reminder.
|
|
681
|
+
*/
|
|
682
|
+
addReminder(args: AddReminderArgs, requestId?: string): Promise<Reminder>;
|
|
683
|
+
/**
|
|
684
|
+
* Creates a location reminder for a task.
|
|
685
|
+
*
|
|
686
|
+
* @param args - Location reminder creation parameters.
|
|
687
|
+
* @param requestId - Optional custom identifier for the request.
|
|
688
|
+
* @returns A promise that resolves to the created reminder.
|
|
689
|
+
*/
|
|
690
|
+
addLocationReminder(args: AddLocationReminderArgs, requestId?: string): Promise<Reminder>;
|
|
691
|
+
/**
|
|
692
|
+
* Updates an existing time-based reminder.
|
|
693
|
+
*
|
|
694
|
+
* @param id - The unique identifier of the reminder to update.
|
|
695
|
+
* @param args - Reminder update parameters.
|
|
696
|
+
* @param requestId - Optional custom identifier for the request.
|
|
697
|
+
* @returns A promise that resolves to the updated reminder.
|
|
698
|
+
*/
|
|
699
|
+
updateReminder(id: string, args: UpdateReminderArgs, requestId?: string): Promise<Reminder>;
|
|
700
|
+
/**
|
|
701
|
+
* Updates an existing location reminder.
|
|
702
|
+
*
|
|
703
|
+
* @param id - The unique identifier of the location reminder to update.
|
|
704
|
+
* @param args - Location reminder update parameters.
|
|
705
|
+
* @param requestId - Optional custom identifier for the request.
|
|
706
|
+
* @returns A promise that resolves to the updated reminder.
|
|
707
|
+
*/
|
|
708
|
+
updateLocationReminder(id: string, args: UpdateLocationReminderArgs, requestId?: string): Promise<Reminder>;
|
|
709
|
+
/**
|
|
710
|
+
* Deletes a time-based reminder by its ID.
|
|
711
|
+
*
|
|
712
|
+
* @param id - The unique identifier of the reminder to delete.
|
|
713
|
+
* @param requestId - Optional custom identifier for the request.
|
|
714
|
+
* @returns A promise that resolves to `true` if successful.
|
|
715
|
+
*/
|
|
716
|
+
deleteReminder(id: string, requestId?: string): Promise<boolean>;
|
|
717
|
+
/**
|
|
718
|
+
* Deletes a location reminder by its ID.
|
|
719
|
+
*
|
|
720
|
+
* @param id - The unique identifier of the location reminder to delete.
|
|
721
|
+
* @param requestId - Optional custom identifier for the request.
|
|
722
|
+
* @returns A promise that resolves to `true` if successful.
|
|
723
|
+
*/
|
|
724
|
+
deleteLocationReminder(id: string, requestId?: string): Promise<boolean>;
|
|
725
|
+
/**
|
|
726
|
+
* Retrieves productivity stats for the authenticated user.
|
|
727
|
+
*
|
|
728
|
+
* @returns A promise that resolves to the productivity stats.
|
|
729
|
+
*/
|
|
730
|
+
getProductivityStats(): Promise<ProductivityStats>;
|
|
731
|
+
/**
|
|
732
|
+
* Retrieves activity logs with optional filters.
|
|
733
|
+
*
|
|
734
|
+
* @param args - Optional filter parameters for activity logs.
|
|
735
|
+
* @returns A promise that resolves to a paginated response of activity events.
|
|
736
|
+
*/
|
|
737
|
+
getActivityLogs(args?: GetActivityLogsArgs): Promise<GetActivityLogsResponse>;
|
|
738
|
+
/**
|
|
739
|
+
* Uploads a file and returns attachment metadata.
|
|
740
|
+
* This creates an upload record that can be referenced in tasks or comments.
|
|
741
|
+
*
|
|
742
|
+
* @param args - Upload parameters including file content, filename, and optional project ID.
|
|
743
|
+
* @param requestId - Optional custom identifier for the request.
|
|
744
|
+
* @returns A promise that resolves to the uploaded file's attachment metadata.
|
|
745
|
+
*
|
|
746
|
+
* @example
|
|
747
|
+
* ```typescript
|
|
748
|
+
* // Upload from a file path
|
|
749
|
+
* const upload = await api.uploadFile({
|
|
750
|
+
* file: '/path/to/document.pdf',
|
|
751
|
+
* projectId: '12345'
|
|
752
|
+
* })
|
|
753
|
+
*
|
|
754
|
+
* // Upload from a Buffer
|
|
755
|
+
* const buffer = fs.readFileSync('/path/to/document.pdf')
|
|
756
|
+
* const upload = await api.uploadFile({
|
|
757
|
+
* file: buffer,
|
|
758
|
+
* fileName: 'document.pdf', // Required for Buffer/Stream
|
|
759
|
+
* projectId: '12345'
|
|
760
|
+
* })
|
|
761
|
+
*
|
|
762
|
+
* // Use the returned fileUrl in a comment
|
|
763
|
+
* await api.addComment({
|
|
764
|
+
* content: 'See attached document',
|
|
765
|
+
* taskId: '67890',
|
|
766
|
+
* attachment: {
|
|
767
|
+
* fileUrl: upload.fileUrl,
|
|
768
|
+
* fileName: upload.fileName,
|
|
769
|
+
* fileType: upload.fileType,
|
|
770
|
+
* resourceType: upload.resourceType
|
|
771
|
+
* }
|
|
772
|
+
* })
|
|
773
|
+
* ```
|
|
774
|
+
*/
|
|
775
|
+
uploadFile(args: UploadFileArgs, requestId?: string): Promise<Attachment>;
|
|
776
|
+
/**
|
|
777
|
+
* Deletes an uploaded file by its URL.
|
|
778
|
+
*
|
|
779
|
+
* @param args - The file URL to delete.
|
|
780
|
+
* @param requestId - Optional custom identifier for the request.
|
|
781
|
+
* @returns A promise that resolves to `true` if deletion was successful.
|
|
782
|
+
*
|
|
783
|
+
* @example
|
|
784
|
+
* ```typescript
|
|
785
|
+
* await api.deleteUpload({
|
|
786
|
+
* fileUrl: 'https://files.todoist.com/...'
|
|
787
|
+
* })
|
|
788
|
+
* ```
|
|
789
|
+
*/
|
|
790
|
+
deleteUpload(args: DeleteUploadArgs, requestId?: string): Promise<boolean>;
|
|
791
|
+
/**
|
|
792
|
+
* Fetches the content of a file attachment from a Todoist comment.
|
|
793
|
+
*
|
|
794
|
+
* Accepts either a Comment object (extracts the file URL from its attachment)
|
|
795
|
+
* or a direct file URL string. Returns the raw Response object so the caller
|
|
796
|
+
* can read the body in the appropriate format (.arrayBuffer(), .text(), etc.).
|
|
797
|
+
*
|
|
798
|
+
* Only known Todoist attachment hosts are allowed: the authenticated
|
|
799
|
+
* `files.todoist.com` origin (which receives the Bearer token) and the
|
|
800
|
+
* attachment CDN origins (fetched without the token). Other URLs are rejected.
|
|
801
|
+
*
|
|
802
|
+
* @param commentOrUrl - A Comment object with a file attachment, or a file URL string.
|
|
803
|
+
* @returns The raw fetch Response for the file content.
|
|
804
|
+
* @throws Error if a Comment is provided without a file attachment or file URL,
|
|
805
|
+
* or if the URL is not on a known Todoist attachment host.
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* ```typescript
|
|
809
|
+
* // From a comment object
|
|
810
|
+
* const comments = await api.getComments({ taskId: '12345' })
|
|
811
|
+
* const comment = comments.results[0]
|
|
812
|
+
* const response = await api.viewAttachment(comment)
|
|
813
|
+
* const imageData = await response.arrayBuffer()
|
|
814
|
+
*
|
|
815
|
+
* // From a URL string
|
|
816
|
+
* const response = await api.viewAttachment('https://files.todoist.com/...')
|
|
817
|
+
* const text = await response.text()
|
|
818
|
+
* ```
|
|
819
|
+
*/
|
|
820
|
+
viewAttachment(commentOrUrl: Comment | string): Promise<FileResponse>;
|
|
821
|
+
/**
|
|
822
|
+
* Retrieves a paginated list of folders.
|
|
823
|
+
*
|
|
824
|
+
* @param args - Filter parameters such as workspace ID.
|
|
825
|
+
* @returns A promise that resolves to a paginated response of folders.
|
|
826
|
+
*/
|
|
827
|
+
getFolders(args: GetFoldersArgs): Promise<GetFoldersResponse>;
|
|
828
|
+
/**
|
|
829
|
+
* Retrieves a single folder by its ID.
|
|
830
|
+
*
|
|
831
|
+
* @param id - The unique identifier of the folder.
|
|
832
|
+
* @returns A promise that resolves to the requested folder.
|
|
833
|
+
*/
|
|
834
|
+
getFolder(id: string): Promise<Folder>;
|
|
835
|
+
/**
|
|
836
|
+
* Creates a new folder.
|
|
837
|
+
*
|
|
838
|
+
* @param args - Folder creation parameters including name and workspace ID.
|
|
839
|
+
* @param requestId - Optional custom identifier for the request.
|
|
840
|
+
* @returns A promise that resolves to the created folder.
|
|
841
|
+
*/
|
|
842
|
+
addFolder(args: AddFolderArgs, requestId?: string): Promise<Folder>;
|
|
843
|
+
/**
|
|
844
|
+
* Updates an existing folder by its ID.
|
|
845
|
+
*
|
|
846
|
+
* @param id - The unique identifier of the folder to update.
|
|
847
|
+
* @param args - Update parameters such as name or default order.
|
|
848
|
+
* @param requestId - Optional custom identifier for the request.
|
|
849
|
+
* @returns A promise that resolves to the updated folder.
|
|
850
|
+
*/
|
|
851
|
+
updateFolder(id: string, args: UpdateFolderArgs, requestId?: string): Promise<Folder>;
|
|
852
|
+
/**
|
|
853
|
+
* Deletes a folder by its ID.
|
|
854
|
+
*
|
|
855
|
+
* @param id - The unique identifier of the folder to delete.
|
|
856
|
+
* @param requestId - Optional custom identifier for the request.
|
|
857
|
+
* @returns A promise that resolves to `true` if successful.
|
|
858
|
+
*/
|
|
859
|
+
deleteFolder(id: string, requestId?: string): Promise<boolean>;
|
|
860
|
+
/**
|
|
861
|
+
* Deletes a personal filter by its ID.
|
|
862
|
+
*
|
|
863
|
+
* @param id - The unique identifier of the filter to delete.
|
|
864
|
+
* @param requestId - Optional custom identifier for the request.
|
|
865
|
+
* @returns A promise that resolves to `true` if successful.
|
|
866
|
+
*/
|
|
867
|
+
deleteFilter(id: string, requestId?: string): Promise<boolean>;
|
|
868
|
+
/**
|
|
869
|
+
* Retrieves the current user's subscription state.
|
|
870
|
+
*
|
|
871
|
+
* Requires the `billing:read` scope.
|
|
872
|
+
*
|
|
873
|
+
* @returns A promise that resolves to the user's subscription info.
|
|
874
|
+
*/
|
|
875
|
+
getSubscriptionInfo(): Promise<SubscriptionInfo>;
|
|
876
|
+
/**
|
|
877
|
+
* Starts a hosted cancellation flow for the current user's plan.
|
|
878
|
+
*
|
|
879
|
+
* Requires the `billing:read_write` scope.
|
|
880
|
+
*
|
|
881
|
+
* @param args - Optional cancellation reason details and return URL.
|
|
882
|
+
* @param requestId - Optional custom identifier for the request.
|
|
883
|
+
* @returns A promise that resolves to the billing portal redirect URL.
|
|
884
|
+
*/
|
|
885
|
+
cancelPlan(args?: CancelPlanArgs, requestId?: string): Promise<BillingPortalUrlResponse>;
|
|
886
|
+
/**
|
|
887
|
+
* Reactivates a previously canceled subscription.
|
|
888
|
+
*
|
|
889
|
+
* Requires the `billing:read_write` scope.
|
|
890
|
+
*
|
|
891
|
+
* @param requestId - Optional custom identifier for the request.
|
|
892
|
+
* @returns A promise that resolves to the fresh subscription info after reactivation.
|
|
893
|
+
*/
|
|
894
|
+
reactivatePlan(requestId?: string): Promise<SubscriptionInfo>;
|
|
895
|
+
/**
|
|
896
|
+
* Creates a Stripe checkout session to upgrade the current user to Pro.
|
|
897
|
+
*
|
|
898
|
+
* Requires the `billing:read_write` scope.
|
|
899
|
+
*
|
|
900
|
+
* @param args - Currency, billing cycle, redirect URLs, and optional promotion/trial details.
|
|
901
|
+
* @param requestId - Optional custom identifier for the request.
|
|
902
|
+
* @returns A promise that resolves to the checkout session URL.
|
|
903
|
+
*/
|
|
904
|
+
upgradeToPro(args: UpgradeToProArgs, requestId?: string): Promise<CheckoutSessionResponse>;
|
|
905
|
+
/**
|
|
906
|
+
* Creates a Stripe checkout session to start a Pro trial.
|
|
907
|
+
*
|
|
908
|
+
* Requires the `billing:read_write` scope.
|
|
909
|
+
*
|
|
910
|
+
* @param args - Currency, billing cycle, and redirect URLs.
|
|
911
|
+
* @param requestId - Optional custom identifier for the request.
|
|
912
|
+
* @returns A promise that resolves to the checkout session URL.
|
|
913
|
+
*/
|
|
914
|
+
startProTrial(args: StartProTrialArgs, requestId?: string): Promise<CheckoutSessionResponse>;
|
|
915
|
+
/**
|
|
916
|
+
* Creates a one-time Stripe billing portal session for the current user's Pro plan.
|
|
917
|
+
*
|
|
918
|
+
* Requires the `billing:read_write` scope.
|
|
919
|
+
*
|
|
920
|
+
* @param args - Return URL and optional flow type / promotion code.
|
|
921
|
+
* @param requestId - Optional custom identifier for the request.
|
|
922
|
+
* @returns A promise that resolves to the billing portal URL.
|
|
923
|
+
*/
|
|
924
|
+
createProBillingPortalSession(args: ProBillingPortalArgs, requestId?: string): Promise<BillingPortalUrlResponse>;
|
|
925
|
+
/**
|
|
926
|
+
* Retrieves the current user's Pro plan and billing details.
|
|
927
|
+
*
|
|
928
|
+
* Requires the `billing:read` scope.
|
|
929
|
+
*
|
|
930
|
+
* @returns A promise that resolves to the Pro plan details.
|
|
931
|
+
*/
|
|
932
|
+
getProPlanDetails(): Promise<ProPlanDetails>;
|
|
933
|
+
/**
|
|
934
|
+
* Creates a Stripe checkout session to upgrade a workspace.
|
|
935
|
+
*
|
|
936
|
+
* Requires the `billing:read_write` scope.
|
|
937
|
+
*
|
|
938
|
+
* @param args - Workspace ID, currency, billing cycle, redirect URLs, and optional promotion details.
|
|
939
|
+
* @param requestId - Optional custom identifier for the request.
|
|
940
|
+
* @returns A promise that resolves to the checkout session URL.
|
|
941
|
+
*/
|
|
942
|
+
upgradeWorkspace(args: UpgradeWorkspaceArgs, requestId?: string): Promise<CheckoutSessionResponse>;
|
|
943
|
+
/**
|
|
944
|
+
* Creates a Stripe checkout session to start a workspace trial.
|
|
945
|
+
*
|
|
946
|
+
* Requires the `billing:read_write` scope.
|
|
947
|
+
*
|
|
948
|
+
* @param args - Workspace ID, currency, billing cycle, and redirect URLs.
|
|
949
|
+
* @param requestId - Optional custom identifier for the request.
|
|
950
|
+
* @returns A promise that resolves to the checkout session URL.
|
|
951
|
+
*/
|
|
952
|
+
startWorkspaceTrial(args: StartWorkspaceTrialArgs, requestId?: string): Promise<CheckoutSessionResponse>;
|
|
953
|
+
/**
|
|
954
|
+
* Creates a one-time Stripe billing portal session for a workspace.
|
|
955
|
+
*
|
|
956
|
+
* Requires the `billing:read_write` scope.
|
|
957
|
+
*
|
|
958
|
+
* @param args - Workspace ID, return URL, and optional flow type.
|
|
959
|
+
* @param requestId - Optional custom identifier for the request.
|
|
960
|
+
* @returns A promise that resolves to the billing portal URL.
|
|
961
|
+
*/
|
|
962
|
+
createWorkspaceBillingPortalSession(args: WorkspaceBillingPortalArgs, requestId?: string): Promise<BillingPortalUrlResponse>;
|
|
963
|
+
/**
|
|
964
|
+
* Retrieves available Pro and Teams prices.
|
|
965
|
+
*
|
|
966
|
+
* Requires the `billing:read` scope.
|
|
967
|
+
*
|
|
968
|
+
* @returns A promise that resolves to the available prices.
|
|
969
|
+
*/
|
|
970
|
+
getPrices(): Promise<PricesResponse>;
|
|
971
|
+
/**
|
|
972
|
+
* Retrieves pricing information.
|
|
973
|
+
*
|
|
974
|
+
* Requires the `billing:read` scope.
|
|
975
|
+
*
|
|
976
|
+
* @param args - Optional flag to request formatted pricing.
|
|
977
|
+
* @returns A promise that resolves to current and legacy pricing keyed by version.
|
|
978
|
+
*/
|
|
979
|
+
getPricing(args?: GetPricingArgs): Promise<PricingResponse>;
|
|
980
|
+
/**
|
|
981
|
+
* Retrieves a list of available backups.
|
|
982
|
+
*
|
|
983
|
+
* @param args - Optional parameters including MFA token.
|
|
984
|
+
* @returns A promise that resolves to an array of backups.
|
|
985
|
+
*/
|
|
986
|
+
getBackups(args?: GetBackupsArgs): Promise<Backup[]>;
|
|
987
|
+
/**
|
|
988
|
+
* Downloads a backup file as binary data.
|
|
989
|
+
*
|
|
990
|
+
* @param args - Arguments including the backup file URL (from getBackups).
|
|
991
|
+
* @returns A promise that resolves to a response with binary data accessible via arrayBuffer().
|
|
992
|
+
*/
|
|
993
|
+
downloadBackup(args: DownloadBackupArgs): Promise<FileResponse>;
|
|
994
|
+
/**
|
|
995
|
+
* Gets or creates an email forwarding address for an object.
|
|
996
|
+
*
|
|
997
|
+
* @param args - Arguments including object type and ID.
|
|
998
|
+
* @param requestId - Optional custom identifier for the request.
|
|
999
|
+
* @returns A promise that resolves to the email address.
|
|
1000
|
+
*/
|
|
1001
|
+
getOrCreateEmailForwarding(args: GetOrCreateEmailArgs, requestId?: string): Promise<GetOrCreateEmailResponse>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Disables email forwarding for an object.
|
|
1004
|
+
*
|
|
1005
|
+
* @param args - Arguments including object type and ID.
|
|
1006
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1007
|
+
* @returns A promise that resolves to `true` if successful.
|
|
1008
|
+
*/
|
|
1009
|
+
disableEmailForwarding(args: DisableEmailArgs, requestId?: string): Promise<boolean>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Retrieves ID mappings between old and new IDs.
|
|
1012
|
+
*
|
|
1013
|
+
* @param args - Arguments including object type and IDs to look up.
|
|
1014
|
+
* @returns A promise that resolves to an array of ID mappings.
|
|
1015
|
+
*/
|
|
1016
|
+
getIdMappings(args: GetIdMappingsArgs): Promise<IdMapping[]>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Retrieves moved IDs for objects that have been migrated.
|
|
1019
|
+
*
|
|
1020
|
+
* @param args - Arguments including object type and optional old IDs to look up.
|
|
1021
|
+
* @returns A promise that resolves to an array of moved ID pairs.
|
|
1022
|
+
*/
|
|
1023
|
+
getMovedIds(args: GetMovedIdsArgs): Promise<MovedId[]>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Exports a project as a template file (CSV format).
|
|
1026
|
+
*
|
|
1027
|
+
* @param args - Arguments including project ID and optional date format preference.
|
|
1028
|
+
* @returns A promise that resolves to the template file content as a string.
|
|
1029
|
+
*/
|
|
1030
|
+
exportTemplateAsFile(args: ExportTemplateFileArgs): Promise<string>;
|
|
1031
|
+
/**
|
|
1032
|
+
* Exports a project as a template URL.
|
|
1033
|
+
*
|
|
1034
|
+
* @param args - Arguments including project ID and optional date format preference.
|
|
1035
|
+
* @returns A promise that resolves to the file name and URL.
|
|
1036
|
+
*/
|
|
1037
|
+
exportTemplateAsUrl(args: ExportTemplateUrlArgs): Promise<ExportTemplateUrlResponse>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates a new project from a template file.
|
|
1040
|
+
*
|
|
1041
|
+
* @param args - Arguments including project name, template file, and optional workspace ID.
|
|
1042
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1043
|
+
* @returns A promise that resolves to the created project data.
|
|
1044
|
+
*/
|
|
1045
|
+
createProjectFromTemplate(args: CreateProjectFromTemplateArgs, requestId?: string): Promise<CreateProjectFromTemplateResponse>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Imports a template file into an existing project.
|
|
1048
|
+
*
|
|
1049
|
+
* @param args - Arguments including project ID and template file.
|
|
1050
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1051
|
+
* @returns A promise that resolves to the import result.
|
|
1052
|
+
*/
|
|
1053
|
+
importTemplateIntoProject(args: ImportTemplateIntoProjectArgs, requestId?: string): Promise<ImportTemplateResponse>;
|
|
1054
|
+
/**
|
|
1055
|
+
* Imports a template by ID into an existing project.
|
|
1056
|
+
*
|
|
1057
|
+
* @param args - Arguments including project ID, template ID, and optional locale.
|
|
1058
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1059
|
+
* @returns A promise that resolves to the import result.
|
|
1060
|
+
*/
|
|
1061
|
+
importTemplateFromId(args: ImportTemplateFromIdArgs, requestId?: string): Promise<ImportTemplateResponse>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Gets pending invitations for a workspace.
|
|
1064
|
+
*
|
|
1065
|
+
* @param args - Arguments including workspace ID.
|
|
1066
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1067
|
+
* @returns Array of email addresses with pending invitations.
|
|
1068
|
+
*/
|
|
1069
|
+
getWorkspaceInvitations(args: GetWorkspaceInvitationsArgs, requestId?: string): Promise<WorkspaceInvitationsResponse>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Gets all workspace invitations (admin only).
|
|
1072
|
+
*
|
|
1073
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1074
|
+
* @returns Array of email addresses with pending invitations.
|
|
1075
|
+
*/
|
|
1076
|
+
getAllWorkspaceInvitations(args?: {
|
|
1077
|
+
workspaceId?: string;
|
|
1078
|
+
}, requestId?: string): Promise<AllWorkspaceInvitationsResponse>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Deletes a workspace invitation (admin only).
|
|
1081
|
+
*
|
|
1082
|
+
* @param args - Arguments including workspace ID and user email.
|
|
1083
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1084
|
+
* @returns The deleted invitation.
|
|
1085
|
+
*/
|
|
1086
|
+
deleteWorkspaceInvitation(args: DeleteWorkspaceInvitationArgs, requestId?: string): Promise<WorkspaceInvitation>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Accepts a workspace invitation.
|
|
1089
|
+
*
|
|
1090
|
+
* @param args - Arguments including invite code.
|
|
1091
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1092
|
+
* @returns The accepted invitation.
|
|
1093
|
+
*/
|
|
1094
|
+
acceptWorkspaceInvitation(args: WorkspaceInvitationActionArgs, requestId?: string): Promise<WorkspaceInvitation>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Rejects a workspace invitation.
|
|
1097
|
+
*
|
|
1098
|
+
* @param args - Arguments including invite code.
|
|
1099
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1100
|
+
* @returns The rejected invitation.
|
|
1101
|
+
*/
|
|
1102
|
+
rejectWorkspaceInvitation(args: WorkspaceInvitationActionArgs, requestId?: string): Promise<WorkspaceInvitation>;
|
|
1103
|
+
/**
|
|
1104
|
+
* Joins a workspace via invitation link or domain auto-join.
|
|
1105
|
+
*
|
|
1106
|
+
* @param args - Arguments including invite code or workspace ID.
|
|
1107
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1108
|
+
* @returns Workspace user information.
|
|
1109
|
+
*/
|
|
1110
|
+
joinWorkspace(args: JoinWorkspaceArgs, requestId?: string): Promise<JoinWorkspaceResult>;
|
|
1111
|
+
/**
|
|
1112
|
+
* Uploads or updates a workspace logo.
|
|
1113
|
+
*
|
|
1114
|
+
* @param args - Arguments including workspace ID, file, and options.
|
|
1115
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1116
|
+
* @returns Logo information or null if deleted.
|
|
1117
|
+
*/
|
|
1118
|
+
uploadWorkspaceLogo(args: WorkspaceLogoArgs, requestId?: string): Promise<WorkspaceLogoResponse>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Gets workspace plan and billing details.
|
|
1121
|
+
*
|
|
1122
|
+
* @param args - Arguments including workspace ID.
|
|
1123
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1124
|
+
* @returns Workspace plan details.
|
|
1125
|
+
*/
|
|
1126
|
+
getWorkspacePlanDetails(args: GetWorkspacePlanDetailsArgs, requestId?: string): Promise<WorkspacePlanDetails>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Gets workspace users with pagination.
|
|
1129
|
+
*
|
|
1130
|
+
* @param args - Arguments including optional workspace ID, cursor, and limit.
|
|
1131
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1132
|
+
* @returns Paginated list of workspace users.
|
|
1133
|
+
*/
|
|
1134
|
+
getWorkspaceUsers(args?: GetWorkspaceUsersArgs, requestId?: string): Promise<GetWorkspaceUsersResponse>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Retrieves all workspaces for the authenticated user.
|
|
1137
|
+
*
|
|
1138
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1139
|
+
* @returns A promise that resolves to an array of workspaces.
|
|
1140
|
+
*
|
|
1141
|
+
* @example
|
|
1142
|
+
* ```typescript
|
|
1143
|
+
* const workspaces = await api.getWorkspaces()
|
|
1144
|
+
* workspaces.forEach(workspace => {
|
|
1145
|
+
* console.log(`${workspace.name} (${workspace.plan}) - Role: ${workspace.role}`)
|
|
1146
|
+
* })
|
|
1147
|
+
* ```
|
|
1148
|
+
*/
|
|
1149
|
+
getWorkspaces(requestId?: string): Promise<Workspace[]>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Retrieves a workspace by its ID.
|
|
1152
|
+
*
|
|
1153
|
+
* @param id - The unique identifier of the workspace.
|
|
1154
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1155
|
+
* @returns A promise that resolves to the requested workspace.
|
|
1156
|
+
*/
|
|
1157
|
+
getWorkspace(id: string, requestId?: string): Promise<Workspace>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Creates a new workspace.
|
|
1160
|
+
*
|
|
1161
|
+
* @param args - The arguments for creating the workspace.
|
|
1162
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1163
|
+
* @returns A promise that resolves to the created workspace.
|
|
1164
|
+
*/
|
|
1165
|
+
addWorkspace(args: AddWorkspaceArgs, requestId?: string): Promise<Workspace>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Updates an existing workspace.
|
|
1168
|
+
*
|
|
1169
|
+
* @param id - The unique identifier of the workspace to update.
|
|
1170
|
+
* @param args - The arguments for updating the workspace.
|
|
1171
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1172
|
+
* @returns A promise that resolves to the updated workspace.
|
|
1173
|
+
*/
|
|
1174
|
+
updateWorkspace(id: string, args: UpdateWorkspaceArgs, requestId?: string): Promise<Workspace>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Deletes a workspace by its ID.
|
|
1177
|
+
*
|
|
1178
|
+
* @param id - The unique identifier of the workspace to delete.
|
|
1179
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1180
|
+
* @returns A promise that resolves to `true` if successful.
|
|
1181
|
+
*/
|
|
1182
|
+
deleteWorkspace(id: string, requestId?: string): Promise<boolean>;
|
|
1183
|
+
/**
|
|
1184
|
+
* Retrieves activity information for workspace members.
|
|
1185
|
+
*
|
|
1186
|
+
* @param args - Arguments including workspace ID and optional user/project filters.
|
|
1187
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1188
|
+
* @returns A promise that resolves to workspace members activity data.
|
|
1189
|
+
*/
|
|
1190
|
+
getWorkspaceMembersActivity(args: GetWorkspaceMembersActivityArgs, requestId?: string): Promise<GetWorkspaceMembersActivityResponse>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Retrieves tasks assigned to a specific user in a workspace.
|
|
1193
|
+
*
|
|
1194
|
+
* @param args - Arguments including workspace ID, user ID, and optional project filter.
|
|
1195
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1196
|
+
* @returns A promise that resolves to workspace user tasks.
|
|
1197
|
+
*/
|
|
1198
|
+
getWorkspaceUserTasks(args: GetWorkspaceUserTasksArgs, requestId?: string): Promise<GetWorkspaceUserTasksResponse>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Invites users to a workspace by email.
|
|
1201
|
+
*
|
|
1202
|
+
* @param args - Arguments including workspace ID, email list, and optional role.
|
|
1203
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1204
|
+
* @returns A promise that resolves to the list of invited emails.
|
|
1205
|
+
*/
|
|
1206
|
+
inviteWorkspaceUsers(args: InviteWorkspaceUsersArgs, requestId?: string): Promise<InviteWorkspaceUsersResponse>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Updates a workspace user's role.
|
|
1209
|
+
*
|
|
1210
|
+
* @param args - Arguments including workspace ID, user ID, and new role.
|
|
1211
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1212
|
+
* @returns A promise that resolves to the updated workspace user view.
|
|
1213
|
+
*/
|
|
1214
|
+
updateWorkspaceUser(args: UpdateWorkspaceUserArgs, requestId?: string): Promise<JoinWorkspaceResult>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Removes a user from a workspace.
|
|
1217
|
+
*
|
|
1218
|
+
* @param args - Arguments including workspace ID and user ID.
|
|
1219
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1220
|
+
* @returns A promise that resolves to `true` if successful.
|
|
1221
|
+
*/
|
|
1222
|
+
removeWorkspaceUser(args: RemoveWorkspaceUserArgs, requestId?: string): Promise<boolean>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Gets active projects in a workspace with pagination.
|
|
1225
|
+
*
|
|
1226
|
+
* @param args - Arguments including workspace ID, cursor, and limit.
|
|
1227
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1228
|
+
* @returns Paginated list of active workspace projects.
|
|
1229
|
+
*/
|
|
1230
|
+
getWorkspaceActiveProjects(args: GetWorkspaceProjectsArgs, requestId?: string): Promise<GetProjectsResponse>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Gets archived projects in a workspace with pagination.
|
|
1233
|
+
*
|
|
1234
|
+
* @param args - Arguments including workspace ID, cursor, and limit.
|
|
1235
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1236
|
+
* @returns Paginated list of archived workspace projects.
|
|
1237
|
+
*/
|
|
1238
|
+
getWorkspaceArchivedProjects(args: GetWorkspaceProjectsArgs, requestId?: string): Promise<GetProjectsResponse>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Lists all developer applications owned by the authenticated user.
|
|
1241
|
+
*
|
|
1242
|
+
* Requires the `dev:app_console` scope.
|
|
1243
|
+
*
|
|
1244
|
+
* @param requestId - Optional request ID for idempotency.
|
|
1245
|
+
* @returns A promise that resolves to the list of apps.
|
|
1246
|
+
*/
|
|
1247
|
+
getApps(requestId?: string): Promise<App[]>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Retrieves a single developer application by ID.
|
|
1250
|
+
*
|
|
1251
|
+
* Requires the `dev:app_console` scope.
|
|
1252
|
+
*/
|
|
1253
|
+
getApp(appId: string, requestId?: string): Promise<AppWithUserCount>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Creates a new developer application.
|
|
1256
|
+
*
|
|
1257
|
+
* Requires the `dev:app_console` scope.
|
|
1258
|
+
*/
|
|
1259
|
+
addApp(args: AddAppArgs, requestId?: string): Promise<App>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Updates a developer application.
|
|
1262
|
+
*
|
|
1263
|
+
* Requires the `dev:app_console` scope.
|
|
1264
|
+
*/
|
|
1265
|
+
updateApp(appId: string, args: UpdateAppArgs, requestId?: string): Promise<AppWithUserCount>;
|
|
1266
|
+
/**
|
|
1267
|
+
* Deletes a developer application.
|
|
1268
|
+
*
|
|
1269
|
+
* Requires the `dev:app_console` scope.
|
|
1270
|
+
*/
|
|
1271
|
+
deleteApp(appId: string, requestId?: string): Promise<boolean>;
|
|
1272
|
+
/**
|
|
1273
|
+
* Retrieves the OAuth client credentials (client ID and secret) for an app.
|
|
1274
|
+
*
|
|
1275
|
+
* Requires the `dev:app_console` scope.
|
|
1276
|
+
*/
|
|
1277
|
+
getAppSecrets(appId: string, requestId?: string): Promise<AppSecrets>;
|
|
1278
|
+
/**
|
|
1279
|
+
* Rotates the app's OAuth client secret, returning the updated app record.
|
|
1280
|
+
*
|
|
1281
|
+
* Requires the `dev:app_console` scope.
|
|
1282
|
+
*/
|
|
1283
|
+
resetAppClientSecret(appId: string, requestId?: string): Promise<AppWithUserCount>;
|
|
1284
|
+
/**
|
|
1285
|
+
* Revokes every access token issued for the given app.
|
|
1286
|
+
*
|
|
1287
|
+
* Requires the `dev:app_console` scope.
|
|
1288
|
+
*/
|
|
1289
|
+
revokeAppTokens(appId: string, requestId?: string): Promise<AppWithUserCount>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Uploads an icon for a developer application. The `size` argument
|
|
1292
|
+
* selects which icon slot to update (defaults to `'medium'`).
|
|
1293
|
+
*
|
|
1294
|
+
* Requires the `dev:app_console` scope.
|
|
1295
|
+
*/
|
|
1296
|
+
uploadAppIcon(args: UploadAppIconArgs, requestId?: string): Promise<AppWithUserCount>;
|
|
1297
|
+
/**
|
|
1298
|
+
* Gets the currently issued developer test token for an app (null if none exists).
|
|
1299
|
+
*
|
|
1300
|
+
* Requires the `dev:app_console` scope.
|
|
1301
|
+
*/
|
|
1302
|
+
getAppTestToken(appId: string, requestId?: string): Promise<AppTestToken>;
|
|
1303
|
+
/**
|
|
1304
|
+
* Creates (or rotates) a developer test token for an app.
|
|
1305
|
+
*
|
|
1306
|
+
* Requires the `dev:app_console` scope.
|
|
1307
|
+
*/
|
|
1308
|
+
createAppTestToken(appId: string, requestId?: string): Promise<AppTestToken>;
|
|
1309
|
+
/**
|
|
1310
|
+
* Gets the distribution token for an app, which third parties use to install it.
|
|
1311
|
+
*
|
|
1312
|
+
* Requires the `dev:app_console` scope.
|
|
1313
|
+
*/
|
|
1314
|
+
getAppDistributionToken(appId: string, requestId?: string): Promise<AppDistributionToken>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Gets the current webhook verification token for an app.
|
|
1317
|
+
*
|
|
1318
|
+
* Requires the `dev:app_console` scope.
|
|
1319
|
+
*/
|
|
1320
|
+
getAppVerificationToken(appId: string, requestId?: string): Promise<AppVerificationToken>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Resets the webhook verification token for an app, returning the new value.
|
|
1323
|
+
*
|
|
1324
|
+
* Requires the `dev:app_console` scope.
|
|
1325
|
+
*/
|
|
1326
|
+
resetAppVerificationToken(appId: string, requestId?: string): Promise<AppVerificationToken>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Resolves a public-facing app view from a distribution token. Used during
|
|
1329
|
+
* the installation flow to show prospective installers what the app does
|
|
1330
|
+
* and which scopes it requests.
|
|
1331
|
+
*
|
|
1332
|
+
* Requires the `dev:app_console` scope.
|
|
1333
|
+
*/
|
|
1334
|
+
getAppByDistributionToken(distributionToken: string, requestId?: string): Promise<AppByDistributionToken>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Gets the webhook configuration for an app (null if no webhook is configured).
|
|
1337
|
+
*
|
|
1338
|
+
* Requires the `dev:app_console` scope.
|
|
1339
|
+
*/
|
|
1340
|
+
getAppWebhook(appId: string, requestId?: string): Promise<AppWebhook | null>;
|
|
1341
|
+
/**
|
|
1342
|
+
* Creates or updates an app webhook configuration (upsert).
|
|
1343
|
+
*
|
|
1344
|
+
* Requires the `dev:app_console` scope.
|
|
1345
|
+
*/
|
|
1346
|
+
updateAppWebhook(args: UpdateAppWebhookArgs, requestId?: string): Promise<AppWebhook>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Deletes an app webhook configuration.
|
|
1349
|
+
*
|
|
1350
|
+
* Requires the `dev:app_console` scope.
|
|
1351
|
+
*/
|
|
1352
|
+
deleteAppWebhook(appId: string, requestId?: string): Promise<boolean>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Lists all apps installed on the authenticated user's account.
|
|
1355
|
+
*
|
|
1356
|
+
* Requires the `dev:app_console` scope.
|
|
1357
|
+
*/
|
|
1358
|
+
getAppInstallations(requestId?: string): Promise<AppInstallation[]>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Installs an application via its distribution token.
|
|
1361
|
+
*
|
|
1362
|
+
* Requires the `dev:app_console` scope.
|
|
1363
|
+
*/
|
|
1364
|
+
installApp(args: InstallAppArgs, requestId?: string): Promise<AppInstallation>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Retrieves a single app installation by ID.
|
|
1367
|
+
*
|
|
1368
|
+
* Requires the `dev:app_console` scope.
|
|
1369
|
+
*/
|
|
1370
|
+
getAppInstallation(installationId: string, requestId?: string): Promise<AppInstallation>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Updates an app installation.
|
|
1373
|
+
*
|
|
1374
|
+
* Requires the `dev:app_console` scope.
|
|
1375
|
+
*/
|
|
1376
|
+
updateAppInstallation(installationId: string, args: UpdateAppInstallationArgs, requestId?: string): Promise<AppInstallation>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Uninstalls (removes) an app installation.
|
|
1379
|
+
*
|
|
1380
|
+
* Requires the `dev:app_console` scope.
|
|
1381
|
+
*/
|
|
1382
|
+
uninstallApp(installationId: string, requestId?: string): Promise<boolean>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Retrieves a single UI extension by ID.
|
|
1385
|
+
*
|
|
1386
|
+
* Requires the `dev:app_console` scope.
|
|
1387
|
+
*/
|
|
1388
|
+
getUiExtension(uiExtensionId: string, requestId?: string): Promise<UiExtension>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Lists UI extensions available (installed) in the web client for the current user.
|
|
1391
|
+
*
|
|
1392
|
+
* Requires the `dev:app_console` scope.
|
|
1393
|
+
*/
|
|
1394
|
+
getInstalledUiExtensions(requestId?: string): Promise<UiExtension[]>;
|
|
1395
|
+
/**
|
|
1396
|
+
* Lists all UI extensions belonging to a given app (integration).
|
|
1397
|
+
*
|
|
1398
|
+
* Requires the `dev:app_console` scope.
|
|
1399
|
+
*/
|
|
1400
|
+
getUiExtensionsForApp(appId: string, requestId?: string): Promise<UiExtension[]>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Adds a new UI extension to an app.
|
|
1403
|
+
*
|
|
1404
|
+
* Requires the `dev:app_console` scope.
|
|
1405
|
+
*/
|
|
1406
|
+
addUiExtension(args: AddUiExtensionArgs, requestId?: string): Promise<UiExtension>;
|
|
1407
|
+
/**
|
|
1408
|
+
* Updates an existing UI extension.
|
|
1409
|
+
*
|
|
1410
|
+
* Requires the `dev:app_console` scope.
|
|
1411
|
+
*/
|
|
1412
|
+
updateUiExtension(uiExtensionId: string, args: UpdateUiExtensionArgs, requestId?: string): Promise<UiExtension>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Deletes a UI extension.
|
|
1415
|
+
*
|
|
1416
|
+
* Requires the `dev:app_console` scope.
|
|
1417
|
+
*/
|
|
1418
|
+
deleteUiExtension(uiExtensionId: string, requestId?: string): Promise<boolean>;
|
|
1419
|
+
/**
|
|
1420
|
+
* Uploads an icon for a UI extension.
|
|
1421
|
+
*
|
|
1422
|
+
* Requires the `dev:app_console` scope.
|
|
1423
|
+
*/
|
|
1424
|
+
uploadUiExtensionIcon(args: UploadUiExtensionIconArgs, requestId?: string): Promise<UiExtension>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Lists all apps the user has authorized (granted a token to).
|
|
1427
|
+
*
|
|
1428
|
+
* Requires the `dev:app_console` scope.
|
|
1429
|
+
*/
|
|
1430
|
+
getUserAuthorizations(requestId?: string): Promise<UserAuthorization[]>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Revokes a specific user authorization (access token granted to a third-party app).
|
|
1433
|
+
*
|
|
1434
|
+
* Requires the `dev:app_console` scope.
|
|
1435
|
+
*/
|
|
1436
|
+
revokeUserAuthorization(args: RevokeUserAuthorizationArgs, requestId?: string): Promise<boolean>;
|
|
1437
|
+
}
|