@doist/todoist-api-typescript 7.9.0 → 7.10.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/README.md +5 -204
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.mjs +1 -0
- package/package.json +12 -92
- package/LICENSE +0 -21
- package/dist/cjs/authentication.js +0 -204
- package/dist/cjs/consts/endpoints.js +0 -141
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/test-utils/asserts.js +0 -11
- package/dist/cjs/test-utils/msw-setup.js +0 -97
- package/dist/cjs/test-utils/obsidian-fetch-adapter.js +0 -53
- package/dist/cjs/test-utils/test-defaults.js +0 -240
- package/dist/cjs/todoist-api.js +0 -2623
- package/dist/cjs/transport/fetch-with-retry.js +0 -206
- package/dist/cjs/transport/http-client.js +0 -133
- package/dist/cjs/transport/http-dispatcher.js +0 -72
- package/dist/cjs/types/activity/index.js +0 -18
- package/dist/cjs/types/activity/requests.js +0 -2
- package/dist/cjs/types/activity/types.js +0 -28
- package/dist/cjs/types/backups/index.js +0 -18
- package/dist/cjs/types/backups/requests.js +0 -2
- package/dist/cjs/types/backups/types.js +0 -8
- package/dist/cjs/types/comments/index.js +0 -18
- package/dist/cjs/types/comments/requests.js +0 -2
- package/dist/cjs/types/comments/types.js +0 -60
- package/dist/cjs/types/common.js +0 -2
- package/dist/cjs/types/emails/index.js +0 -17
- package/dist/cjs/types/emails/requests.js +0 -5
- package/dist/cjs/types/errors.js +0 -29
- package/dist/cjs/types/folders/index.js +0 -17
- package/dist/cjs/types/folders/requests.js +0 -2
- package/dist/cjs/types/http.js +0 -24
- package/dist/cjs/types/id-mappings/index.js +0 -18
- package/dist/cjs/types/id-mappings/requests.js +0 -20
- package/dist/cjs/types/id-mappings/types.js +0 -12
- package/dist/cjs/types/index.js +0 -36
- package/dist/cjs/types/insights/index.js +0 -18
- package/dist/cjs/types/insights/requests.js +0 -2
- package/dist/cjs/types/insights/types.js +0 -84
- package/dist/cjs/types/labels/index.js +0 -18
- package/dist/cjs/types/labels/requests.js +0 -2
- package/dist/cjs/types/labels/types.js +0 -11
- package/dist/cjs/types/productivity/index.js +0 -17
- package/dist/cjs/types/productivity/types.js +0 -67
- package/dist/cjs/types/projects/index.js +0 -18
- package/dist/cjs/types/projects/requests.js +0 -2
- package/dist/cjs/types/projects/types.js +0 -56
- package/dist/cjs/types/reminders/index.js +0 -17
- package/dist/cjs/types/reminders/requests.js +0 -95
- package/dist/cjs/types/sections/index.js +0 -18
- package/dist/cjs/types/sections/requests.js +0 -2
- package/dist/cjs/types/sections/types.js +0 -22
- package/dist/cjs/types/sync/commands/calendars.js +0 -2
- package/dist/cjs/types/sync/commands/filters.js +0 -2
- package/dist/cjs/types/sync/commands/folders.js +0 -2
- package/dist/cjs/types/sync/commands/index.js +0 -35
- package/dist/cjs/types/sync/commands/labels.js +0 -5
- package/dist/cjs/types/sync/commands/notes.js +0 -2
- package/dist/cjs/types/sync/commands/notifications.js +0 -2
- package/dist/cjs/types/sync/commands/others.js +0 -2
- package/dist/cjs/types/sync/commands/project-view-options.js +0 -2
- package/dist/cjs/types/sync/commands/projects.js +0 -2
- package/dist/cjs/types/sync/commands/reminders.js +0 -2
- package/dist/cjs/types/sync/commands/sections.js +0 -2
- package/dist/cjs/types/sync/commands/shared.js +0 -20
- package/dist/cjs/types/sync/commands/sharing.js +0 -2
- package/dist/cjs/types/sync/commands/tasks.js +0 -2
- package/dist/cjs/types/sync/commands/view-options.js +0 -2
- package/dist/cjs/types/sync/commands/workspace-filters.js +0 -2
- package/dist/cjs/types/sync/commands/workspace-goals.js +0 -2
- package/dist/cjs/types/sync/commands/workspaces.js +0 -2
- package/dist/cjs/types/sync/index.js +0 -22
- package/dist/cjs/types/sync/request.js +0 -2
- package/dist/cjs/types/sync/resource-types.js +0 -40
- package/dist/cjs/types/sync/resources/calendars.js +0 -31
- package/dist/cjs/types/sync/resources/collaborators.js +0 -25
- package/dist/cjs/types/sync/resources/completed-info.js +0 -30
- package/dist/cjs/types/sync/resources/filters.js +0 -16
- package/dist/cjs/types/sync/resources/folders.js +0 -14
- package/dist/cjs/types/sync/resources/index.js +0 -33
- package/dist/cjs/types/sync/resources/live-notifications.js +0 -39
- package/dist/cjs/types/sync/resources/notes.js +0 -23
- package/dist/cjs/types/sync/resources/reminders.js +0 -50
- package/dist/cjs/types/sync/resources/suggestions.js +0 -42
- package/dist/cjs/types/sync/resources/tooltips.js +0 -10
- package/dist/cjs/types/sync/resources/user-plan-limits.js +0 -24
- package/dist/cjs/types/sync/resources/user-settings.js +0 -42
- package/dist/cjs/types/sync/resources/user.js +0 -120
- package/dist/cjs/types/sync/resources/view-options.js +0 -83
- package/dist/cjs/types/sync/resources/workspace-filters.js +0 -21
- package/dist/cjs/types/sync/resources/workspace-goals.js +0 -32
- package/dist/cjs/types/sync/resources/workspaces.js +0 -56
- package/dist/cjs/types/sync/response.js +0 -2
- package/dist/cjs/types/sync/user-preferences.js +0 -71
- package/dist/cjs/types/tasks/index.js +0 -18
- package/dist/cjs/types/tasks/requests.js +0 -2
- package/dist/cjs/types/tasks/types.js +0 -59
- package/dist/cjs/types/templates/index.js +0 -17
- package/dist/cjs/types/templates/requests.js +0 -2
- package/dist/cjs/types/uploads/index.js +0 -17
- package/dist/cjs/types/uploads/requests.js +0 -2
- package/dist/cjs/types/users/index.js +0 -17
- package/dist/cjs/types/users/types.js +0 -51
- package/dist/cjs/types/workspaces/index.js +0 -18
- package/dist/cjs/types/workspaces/requests.js +0 -2
- package/dist/cjs/types/workspaces/types.js +0 -137
- package/dist/cjs/utils/activity-helpers.js +0 -58
- package/dist/cjs/utils/case-conversion.js +0 -69
- package/dist/cjs/utils/colors.js +0 -143
- package/dist/cjs/utils/index.js +0 -25
- package/dist/cjs/utils/multipart-upload.js +0 -178
- package/dist/cjs/utils/processing-helpers.js +0 -18
- package/dist/cjs/utils/sanitization.js +0 -116
- package/dist/cjs/utils/sync-helpers.js +0 -22
- package/dist/cjs/utils/uncompletable-helpers.js +0 -60
- package/dist/cjs/utils/url-helpers.js +0 -74
- package/dist/cjs/utils/validators.js +0 -141
- package/dist/esm/authentication.js +0 -196
- package/dist/esm/consts/endpoints.js +0 -122
- package/dist/esm/index.js +0 -4
- package/dist/esm/test-utils/asserts.js +0 -8
- package/dist/esm/test-utils/msw-setup.js +0 -88
- package/dist/esm/test-utils/obsidian-fetch-adapter.js +0 -50
- package/dist/esm/test-utils/test-defaults.js +0 -237
- package/dist/esm/todoist-api.js +0 -2619
- package/dist/esm/transport/fetch-with-retry.js +0 -203
- package/dist/esm/transport/http-client.js +0 -128
- package/dist/esm/transport/http-dispatcher.js +0 -35
- package/dist/esm/types/activity/index.js +0 -2
- package/dist/esm/types/activity/requests.js +0 -1
- package/dist/esm/types/activity/types.js +0 -25
- package/dist/esm/types/backups/index.js +0 -2
- package/dist/esm/types/backups/requests.js +0 -1
- package/dist/esm/types/backups/types.js +0 -5
- package/dist/esm/types/comments/index.js +0 -2
- package/dist/esm/types/comments/requests.js +0 -1
- package/dist/esm/types/comments/types.js +0 -57
- package/dist/esm/types/common.js +0 -1
- package/dist/esm/types/emails/index.js +0 -1
- package/dist/esm/types/emails/requests.js +0 -2
- package/dist/esm/types/errors.js +0 -24
- package/dist/esm/types/folders/index.js +0 -1
- package/dist/esm/types/folders/requests.js +0 -1
- package/dist/esm/types/http.js +0 -20
- package/dist/esm/types/id-mappings/index.js +0 -2
- package/dist/esm/types/id-mappings/requests.js +0 -17
- package/dist/esm/types/id-mappings/types.js +0 -9
- package/dist/esm/types/index.js +0 -20
- package/dist/esm/types/insights/index.js +0 -2
- package/dist/esm/types/insights/requests.js +0 -1
- package/dist/esm/types/insights/types.js +0 -81
- package/dist/esm/types/labels/index.js +0 -2
- package/dist/esm/types/labels/requests.js +0 -1
- package/dist/esm/types/labels/types.js +0 -8
- package/dist/esm/types/productivity/index.js +0 -1
- package/dist/esm/types/productivity/types.js +0 -64
- package/dist/esm/types/projects/index.js +0 -2
- package/dist/esm/types/projects/requests.js +0 -1
- package/dist/esm/types/projects/types.js +0 -53
- package/dist/esm/types/reminders/index.js +0 -1
- package/dist/esm/types/reminders/requests.js +0 -92
- package/dist/esm/types/sections/index.js +0 -2
- package/dist/esm/types/sections/requests.js +0 -1
- package/dist/esm/types/sections/types.js +0 -19
- package/dist/esm/types/sync/commands/calendars.js +0 -1
- package/dist/esm/types/sync/commands/filters.js +0 -1
- package/dist/esm/types/sync/commands/folders.js +0 -1
- package/dist/esm/types/sync/commands/index.js +0 -19
- package/dist/esm/types/sync/commands/labels.js +0 -2
- package/dist/esm/types/sync/commands/notes.js +0 -1
- package/dist/esm/types/sync/commands/notifications.js +0 -1
- package/dist/esm/types/sync/commands/others.js +0 -1
- package/dist/esm/types/sync/commands/project-view-options.js +0 -1
- package/dist/esm/types/sync/commands/projects.js +0 -1
- package/dist/esm/types/sync/commands/reminders.js +0 -1
- package/dist/esm/types/sync/commands/sections.js +0 -1
- package/dist/esm/types/sync/commands/shared.js +0 -16
- package/dist/esm/types/sync/commands/sharing.js +0 -1
- package/dist/esm/types/sync/commands/tasks.js +0 -1
- package/dist/esm/types/sync/commands/view-options.js +0 -1
- package/dist/esm/types/sync/commands/workspace-filters.js +0 -1
- package/dist/esm/types/sync/commands/workspace-goals.js +0 -1
- package/dist/esm/types/sync/commands/workspaces.js +0 -1
- package/dist/esm/types/sync/index.js +0 -6
- package/dist/esm/types/sync/request.js +0 -1
- package/dist/esm/types/sync/resource-types.js +0 -37
- package/dist/esm/types/sync/resources/calendars.js +0 -28
- package/dist/esm/types/sync/resources/collaborators.js +0 -22
- package/dist/esm/types/sync/resources/completed-info.js +0 -27
- package/dist/esm/types/sync/resources/filters.js +0 -13
- package/dist/esm/types/sync/resources/folders.js +0 -11
- package/dist/esm/types/sync/resources/index.js +0 -17
- package/dist/esm/types/sync/resources/live-notifications.js +0 -36
- package/dist/esm/types/sync/resources/notes.js +0 -20
- package/dist/esm/types/sync/resources/reminders.js +0 -47
- package/dist/esm/types/sync/resources/suggestions.js +0 -39
- package/dist/esm/types/sync/resources/tooltips.js +0 -7
- package/dist/esm/types/sync/resources/user-plan-limits.js +0 -21
- package/dist/esm/types/sync/resources/user-settings.js +0 -39
- package/dist/esm/types/sync/resources/user.js +0 -117
- package/dist/esm/types/sync/resources/view-options.js +0 -80
- package/dist/esm/types/sync/resources/workspace-filters.js +0 -18
- package/dist/esm/types/sync/resources/workspace-goals.js +0 -29
- package/dist/esm/types/sync/resources/workspaces.js +0 -53
- package/dist/esm/types/sync/response.js +0 -1
- package/dist/esm/types/sync/user-preferences.js +0 -68
- package/dist/esm/types/tasks/index.js +0 -2
- package/dist/esm/types/tasks/requests.js +0 -1
- package/dist/esm/types/tasks/types.js +0 -56
- package/dist/esm/types/templates/index.js +0 -1
- package/dist/esm/types/templates/requests.js +0 -1
- package/dist/esm/types/uploads/index.js +0 -1
- package/dist/esm/types/uploads/requests.js +0 -1
- package/dist/esm/types/users/index.js +0 -1
- package/dist/esm/types/users/types.js +0 -48
- package/dist/esm/types/workspaces/index.js +0 -2
- package/dist/esm/types/workspaces/requests.js +0 -1
- package/dist/esm/types/workspaces/types.js +0 -134
- package/dist/esm/utils/activity-helpers.js +0 -53
- package/dist/esm/utils/case-conversion.js +0 -61
- package/dist/esm/utils/colors.js +0 -139
- package/dist/esm/utils/index.js +0 -4
- package/dist/esm/utils/multipart-upload.js +0 -142
- package/dist/esm/utils/processing-helpers.js +0 -12
- package/dist/esm/utils/sanitization.js +0 -112
- package/dist/esm/utils/sync-helpers.js +0 -19
- package/dist/esm/utils/uncompletable-helpers.js +0 -54
- package/dist/esm/utils/url-helpers.js +0 -68
- package/dist/esm/utils/validators.js +0 -132
- package/dist/types/authentication.d.ts +0 -158
- package/dist/types/consts/endpoints.d.ts +0 -81
- package/dist/types/index.d.ts +0 -4
- package/dist/types/test-utils/asserts.d.ts +0 -1
- package/dist/types/test-utils/msw-setup.d.ts +0 -33
- package/dist/types/test-utils/obsidian-fetch-adapter.d.ts +0 -29
- package/dist/types/test-utils/test-defaults.d.ts +0 -261
- package/dist/types/todoist-api.d.ts +0 -1018
- package/dist/types/transport/fetch-with-retry.d.ts +0 -12
- package/dist/types/transport/http-client.d.ts +0 -16
- package/dist/types/transport/http-dispatcher.d.ts +0 -3
- package/dist/types/types/activity/index.d.ts +0 -2
- package/dist/types/types/activity/requests.d.ts +0 -85
- package/dist/types/types/activity/types.d.ts +0 -49
- package/dist/types/types/backups/index.d.ts +0 -2
- package/dist/types/types/backups/requests.d.ts +0 -16
- package/dist/types/types/backups/types.d.ts +0 -7
- package/dist/types/types/comments/index.d.ts +0 -2
- package/dist/types/types/comments/requests.d.ts +0 -64
- package/dist/types/types/comments/types.d.ts +0 -141
- package/dist/types/types/common.d.ts +0 -6
- package/dist/types/types/emails/index.d.ts +0 -1
- package/dist/types/types/emails/requests.d.ts +0 -30
- package/dist/types/types/errors.d.ts +0 -12
- package/dist/types/types/folders/index.d.ts +0 -1
- package/dist/types/types/folders/requests.d.ts +0 -20
- package/dist/types/types/http.d.ts +0 -85
- package/dist/types/types/id-mappings/index.d.ts +0 -2
- package/dist/types/types/id-mappings/requests.d.ts +0 -28
- package/dist/types/types/id-mappings/types.d.ts +0 -13
- package/dist/types/types/index.d.ts +0 -20
- package/dist/types/types/insights/index.d.ts +0 -2
- package/dist/types/types/insights/requests.d.ts +0 -26
- package/dist/types/types/insights/types.d.ts +0 -186
- package/dist/types/types/labels/index.d.ts +0 -2
- package/dist/types/types/labels/requests.d.ts +0 -75
- package/dist/types/types/labels/types.d.ts +0 -13
- package/dist/types/types/productivity/index.d.ts +0 -1
- package/dist/types/types/productivity/types.d.ts +0 -115
- package/dist/types/types/projects/index.d.ts +0 -2
- package/dist/types/types/projects/requests.d.ts +0 -169
- package/dist/types/types/projects/types.d.ts +0 -201
- package/dist/types/types/reminders/index.d.ts +0 -1
- package/dist/types/types/reminders/requests.d.ts +0 -205
- package/dist/types/types/sections/index.d.ts +0 -2
- package/dist/types/types/sections/requests.d.ts +0 -41
- package/dist/types/types/sections/types.d.ts +0 -44
- package/dist/types/types/sync/commands/calendars.d.ts +0 -14
- package/dist/types/types/sync/commands/filters.d.ts +0 -22
- package/dist/types/types/sync/commands/folders.d.ts +0 -18
- package/dist/types/types/sync/commands/index.d.ts +0 -171
- package/dist/types/types/sync/commands/labels.d.ts +0 -32
- package/dist/types/types/sync/commands/notes.d.ts +0 -27
- package/dist/types/types/sync/commands/notifications.d.ts +0 -10
- package/dist/types/types/sync/commands/others.d.ts +0 -39
- package/dist/types/types/sync/commands/project-view-options.d.ts +0 -14
- package/dist/types/types/sync/commands/projects.d.ts +0 -90
- package/dist/types/types/sync/commands/reminders.d.ts +0 -51
- package/dist/types/types/sync/commands/sections.d.ts +0 -31
- package/dist/types/types/sync/commands/shared.d.ts +0 -51
- package/dist/types/types/sync/commands/sharing.d.ts +0 -16
- package/dist/types/types/sync/commands/tasks.d.ts +0 -78
- package/dist/types/types/sync/commands/view-options.d.ts +0 -15
- package/dist/types/types/sync/commands/workspace-filters.d.ts +0 -23
- package/dist/types/types/sync/commands/workspace-goals.d.ts +0 -24
- package/dist/types/types/sync/commands/workspaces.d.ts +0 -79
- package/dist/types/types/sync/index.d.ts +0 -6
- package/dist/types/types/sync/request.d.ts +0 -7
- package/dist/types/types/sync/resource-types.d.ts +0 -5
- package/dist/types/types/sync/resources/calendars.d.ts +0 -38
- package/dist/types/types/sync/resources/collaborators.d.ts +0 -28
- package/dist/types/types/sync/resources/completed-info.d.ts +0 -33
- package/dist/types/types/sync/resources/filters.d.ts +0 -12
- package/dist/types/types/sync/resources/folders.d.ts +0 -10
- package/dist/types/types/sync/resources/index.d.ts +0 -17
- package/dist/types/types/sync/resources/live-notifications.d.ts +0 -32
- package/dist/types/types/sync/resources/notes.d.ts +0 -34
- package/dist/types/types/sync/resources/reminders.d.ts +0 -126
- package/dist/types/types/sync/resources/suggestions.d.ts +0 -96
- package/dist/types/types/sync/resources/tooltips.d.ts +0 -6
- package/dist/types/types/sync/resources/user-plan-limits.d.ts +0 -41
- package/dist/types/types/sync/resources/user-settings.d.ts +0 -40
- package/dist/types/types/sync/resources/user.d.ts +0 -134
- package/dist/types/types/sync/resources/view-options.d.ts +0 -169
- package/dist/types/types/sync/resources/workspace-filters.d.ts +0 -17
- package/dist/types/types/sync/resources/workspace-goals.d.ts +0 -29
- package/dist/types/types/sync/resources/workspaces.d.ts +0 -57
- package/dist/types/types/sync/response.d.ts +0 -51
- package/dist/types/types/sync/user-preferences.d.ts +0 -39
- package/dist/types/types/tasks/index.d.ts +0 -2
- package/dist/types/types/tasks/requests.d.ts +0 -197
- package/dist/types/types/tasks/types.d.ts +0 -162
- package/dist/types/types/templates/index.d.ts +0 -1
- package/dist/types/types/templates/requests.d.ts +0 -92
- package/dist/types/types/uploads/index.d.ts +0 -1
- package/dist/types/types/uploads/requests.d.ts +0 -32
- package/dist/types/types/users/index.d.ts +0 -1
- package/dist/types/types/users/types.d.ts +0 -66
- package/dist/types/types/workspaces/index.d.ts +0 -2
- package/dist/types/types/workspaces/requests.d.ts +0 -260
- package/dist/types/types/workspaces/types.d.ts +0 -225
- package/dist/types/utils/activity-helpers.d.ts +0 -28
- package/dist/types/utils/case-conversion.d.ts +0 -12
- package/dist/types/utils/colors.d.ts +0 -197
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/multipart-upload.d.ts +0 -54
- package/dist/types/utils/processing-helpers.d.ts +0 -1
- package/dist/types/utils/sanitization.d.ts +0 -35
- package/dist/types/utils/sync-helpers.d.ts +0 -17
- package/dist/types/utils/uncompletable-helpers.d.ts +0 -30
- package/dist/types/utils/url-helpers.d.ts +0 -32
- package/dist/types/utils/validators.d.ts +0 -1406
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** Known activity object types. Accepts any string for forward compatibility. */
|
|
2
|
-
export type InsightsObjectType = 'ITEM' | 'PROJECT' | 'NOTE' | (string & Record<string, never>);
|
|
3
|
-
/** Known activity event types. Accepts any string for forward compatibility. */
|
|
4
|
-
export type InsightsEventType = 'ADDED' | 'DELETED' | 'UPDATED' | 'ARCHIVED' | 'UNARCHIVED' | 'COMPLETED' | 'UNCOMPLETED' | 'SHARED' | 'LEFT' | (string & Record<string, never>);
|
|
5
|
-
/**
|
|
6
|
-
* Arguments for getting project activity stats.
|
|
7
|
-
* @see https://developer.todoist.com/api/v1/#tag/Insights/operation/get_project_activity_stats_api_v1_projects__project_id__insights_activity_stats_get
|
|
8
|
-
*/
|
|
9
|
-
export type GetProjectActivityStatsArgs = {
|
|
10
|
-
/** The type of object to get activity counts for (default: 'ITEM'). */
|
|
11
|
-
objectType?: InsightsObjectType;
|
|
12
|
-
/** The type of event to count (default: 'COMPLETED'). */
|
|
13
|
-
eventType?: InsightsEventType;
|
|
14
|
-
/** Number of weeks of activity counts to retrieve (1-12, default 2). */
|
|
15
|
-
weeks?: number;
|
|
16
|
-
/** Whether to include weekly rollup counts in the response. */
|
|
17
|
-
includeWeeklyCounts?: boolean;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Arguments for getting workspace insights.
|
|
21
|
-
* @see https://developer.todoist.com/api/v1/#tag/Insights/operation/get_workspace_insights_api_v1_workspaces__workspace_id__insights_get
|
|
22
|
-
*/
|
|
23
|
-
export type GetWorkspaceInsightsArgs = {
|
|
24
|
-
/** Project IDs to get insights for. */
|
|
25
|
-
projectIds?: string[];
|
|
26
|
-
};
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const DayActivitySchema: z.ZodObject<{
|
|
3
|
-
date: z.ZodString;
|
|
4
|
-
totalCount: z.ZodNumber;
|
|
5
|
-
}, z.core.$strip>;
|
|
6
|
-
/** Daily activity count for a specific date. */
|
|
7
|
-
export type DayActivity = z.infer<typeof DayActivitySchema>;
|
|
8
|
-
export declare const WeekRollupSchema: z.ZodObject<{
|
|
9
|
-
fromDate: z.ZodString;
|
|
10
|
-
toDate: z.ZodString;
|
|
11
|
-
totalCount: z.ZodNumber;
|
|
12
|
-
}, z.core.$strip>;
|
|
13
|
-
/** Weekly rollup of activity data. */
|
|
14
|
-
export type WeekRollup = z.infer<typeof WeekRollupSchema>;
|
|
15
|
-
export declare const ProjectActivityStatsSchema: z.ZodObject<{
|
|
16
|
-
dayItems: z.ZodArray<z.ZodObject<{
|
|
17
|
-
date: z.ZodString;
|
|
18
|
-
totalCount: z.ZodNumber;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
weekItems: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
21
|
-
fromDate: z.ZodString;
|
|
22
|
-
toDate: z.ZodString;
|
|
23
|
-
totalCount: z.ZodNumber;
|
|
24
|
-
}, z.core.$strip>>>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
/** Project activity statistics with daily and optional weekly rollups. */
|
|
27
|
-
export type ProjectActivityStats = z.infer<typeof ProjectActivityStatsSchema>;
|
|
28
|
-
/** Available project health statuses. */
|
|
29
|
-
export declare const HEALTH_STATUSES: readonly ["UNKNOWN", "ON_TRACK", "AT_RISK", "CRITICAL", "EXCELLENT", "ERROR"];
|
|
30
|
-
/** Health status of a project. */
|
|
31
|
-
export type HealthStatus = (typeof HEALTH_STATUSES)[number];
|
|
32
|
-
export declare const TaskRecommendationSchema: z.ZodObject<{
|
|
33
|
-
taskId: z.ZodString;
|
|
34
|
-
recommendation: z.ZodString;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
|
-
/** A recommendation for a specific task. */
|
|
37
|
-
export type TaskRecommendation = z.infer<typeof TaskRecommendationSchema>;
|
|
38
|
-
export declare const ProjectHealthSchema: z.ZodObject<{
|
|
39
|
-
status: z.ZodEnum<{
|
|
40
|
-
UNKNOWN: "UNKNOWN";
|
|
41
|
-
ON_TRACK: "ON_TRACK";
|
|
42
|
-
AT_RISK: "AT_RISK";
|
|
43
|
-
CRITICAL: "CRITICAL";
|
|
44
|
-
EXCELLENT: "EXCELLENT";
|
|
45
|
-
ERROR: "ERROR";
|
|
46
|
-
}>;
|
|
47
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
-
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
50
|
-
taskId: z.ZodString;
|
|
51
|
-
recommendation: z.ZodString;
|
|
52
|
-
}, z.core.$strip>>>>;
|
|
53
|
-
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
/** Project health status and recommendations. */
|
|
59
|
-
export type ProjectHealth = z.infer<typeof ProjectHealthSchema>;
|
|
60
|
-
export declare const ProjectMetricsSchema: z.ZodObject<{
|
|
61
|
-
totalTasks: z.ZodNumber;
|
|
62
|
-
completedTasks: z.ZodNumber;
|
|
63
|
-
overdueTasks: z.ZodNumber;
|
|
64
|
-
tasksCreatedThisWeek: z.ZodNumber;
|
|
65
|
-
tasksCompletedThisWeek: z.ZodNumber;
|
|
66
|
-
averageCompletionTime: z.ZodNullable<z.ZodNumber>;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
/** Project metrics summary. */
|
|
69
|
-
export type ProjectMetrics = z.infer<typeof ProjectMetricsSchema>;
|
|
70
|
-
export declare const TaskContextSchema: z.ZodObject<{
|
|
71
|
-
id: z.ZodString;
|
|
72
|
-
content: z.ZodString;
|
|
73
|
-
due: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
-
deadline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
-
priority: z.ZodString;
|
|
76
|
-
isCompleted: z.ZodBoolean;
|
|
77
|
-
createdAt: z.ZodString;
|
|
78
|
-
updatedAt: z.ZodString;
|
|
79
|
-
completedAt: z.ZodNullable<z.ZodString>;
|
|
80
|
-
completedByUid: z.ZodNullable<z.ZodString>;
|
|
81
|
-
labels: z.ZodArray<z.ZodString>;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
/** Task context used in health analysis. */
|
|
84
|
-
export type TaskContext = z.infer<typeof TaskContextSchema>;
|
|
85
|
-
export declare const ProjectHealthContextSchema: z.ZodObject<{
|
|
86
|
-
projectId: z.ZodString;
|
|
87
|
-
projectName: z.ZodString;
|
|
88
|
-
projectDescription: z.ZodNullable<z.ZodString>;
|
|
89
|
-
projectMetrics: z.ZodObject<{
|
|
90
|
-
totalTasks: z.ZodNumber;
|
|
91
|
-
completedTasks: z.ZodNumber;
|
|
92
|
-
overdueTasks: z.ZodNumber;
|
|
93
|
-
tasksCreatedThisWeek: z.ZodNumber;
|
|
94
|
-
tasksCompletedThisWeek: z.ZodNumber;
|
|
95
|
-
averageCompletionTime: z.ZodNullable<z.ZodNumber>;
|
|
96
|
-
}, z.core.$strip>;
|
|
97
|
-
tasks: z.ZodArray<z.ZodObject<{
|
|
98
|
-
id: z.ZodString;
|
|
99
|
-
content: z.ZodString;
|
|
100
|
-
due: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
-
deadline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
-
priority: z.ZodString;
|
|
103
|
-
isCompleted: z.ZodBoolean;
|
|
104
|
-
createdAt: z.ZodString;
|
|
105
|
-
updatedAt: z.ZodString;
|
|
106
|
-
completedAt: z.ZodNullable<z.ZodString>;
|
|
107
|
-
completedByUid: z.ZodNullable<z.ZodString>;
|
|
108
|
-
labels: z.ZodArray<z.ZodString>;
|
|
109
|
-
}, z.core.$strip>>;
|
|
110
|
-
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
-
}, z.core.$strip>;
|
|
112
|
-
/** Full project context for health analysis. */
|
|
113
|
-
export type ProjectHealthContext = z.infer<typeof ProjectHealthContextSchema>;
|
|
114
|
-
export declare const ProjectProgressSchema: z.ZodObject<{
|
|
115
|
-
projectId: z.ZodString;
|
|
116
|
-
completedCount: z.ZodNumber;
|
|
117
|
-
activeCount: z.ZodNumber;
|
|
118
|
-
progressPercent: z.ZodNumber;
|
|
119
|
-
}, z.core.$strip>;
|
|
120
|
-
/** Project progress with completion counts and percentage. */
|
|
121
|
-
export type ProjectProgress = z.infer<typeof ProjectProgressSchema>;
|
|
122
|
-
export declare const ProjectInsightSchema: z.ZodObject<{
|
|
123
|
-
projectId: z.ZodString;
|
|
124
|
-
health: z.ZodNullable<z.ZodObject<{
|
|
125
|
-
status: z.ZodEnum<{
|
|
126
|
-
UNKNOWN: "UNKNOWN";
|
|
127
|
-
ON_TRACK: "ON_TRACK";
|
|
128
|
-
AT_RISK: "AT_RISK";
|
|
129
|
-
CRITICAL: "CRITICAL";
|
|
130
|
-
EXCELLENT: "EXCELLENT";
|
|
131
|
-
ERROR: "ERROR";
|
|
132
|
-
}>;
|
|
133
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
-
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
|
-
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
136
|
-
taskId: z.ZodString;
|
|
137
|
-
recommendation: z.ZodString;
|
|
138
|
-
}, z.core.$strip>>>>;
|
|
139
|
-
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
-
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
142
|
-
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
143
|
-
}, z.core.$strip>>;
|
|
144
|
-
progress: z.ZodNullable<z.ZodObject<{
|
|
145
|
-
projectId: z.ZodString;
|
|
146
|
-
completedCount: z.ZodNumber;
|
|
147
|
-
activeCount: z.ZodNumber;
|
|
148
|
-
progressPercent: z.ZodNumber;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
}, z.core.$strip>;
|
|
151
|
-
/** Insight data for a single project within a workspace. */
|
|
152
|
-
export type ProjectInsight = z.infer<typeof ProjectInsightSchema>;
|
|
153
|
-
export declare const WorkspaceInsightsSchema: z.ZodObject<{
|
|
154
|
-
folderId: z.ZodNullable<z.ZodString>;
|
|
155
|
-
projectInsights: z.ZodArray<z.ZodObject<{
|
|
156
|
-
projectId: z.ZodString;
|
|
157
|
-
health: z.ZodNullable<z.ZodObject<{
|
|
158
|
-
status: z.ZodEnum<{
|
|
159
|
-
UNKNOWN: "UNKNOWN";
|
|
160
|
-
ON_TRACK: "ON_TRACK";
|
|
161
|
-
AT_RISK: "AT_RISK";
|
|
162
|
-
CRITICAL: "CRITICAL";
|
|
163
|
-
EXCELLENT: "EXCELLENT";
|
|
164
|
-
ERROR: "ERROR";
|
|
165
|
-
}>;
|
|
166
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
-
descriptionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
168
|
-
taskRecommendations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
169
|
-
taskId: z.ZodString;
|
|
170
|
-
recommendation: z.ZodString;
|
|
171
|
-
}, z.core.$strip>>>>;
|
|
172
|
-
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
-
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
-
updateInProgress: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
-
}, z.core.$strip>>;
|
|
177
|
-
progress: z.ZodNullable<z.ZodObject<{
|
|
178
|
-
projectId: z.ZodString;
|
|
179
|
-
completedCount: z.ZodNumber;
|
|
180
|
-
activeCount: z.ZodNumber;
|
|
181
|
-
progressPercent: z.ZodNumber;
|
|
182
|
-
}, z.core.$strip>>;
|
|
183
|
-
}, z.core.$strip>>;
|
|
184
|
-
}, z.core.$strip>;
|
|
185
|
-
/** Workspace insights grouped by folder. */
|
|
186
|
-
export type WorkspaceInsights = z.infer<typeof WorkspaceInsightsSchema>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { ColorKey } from '../../utils/colors.js';
|
|
2
|
-
import type { SearchArgs } from '../common.js';
|
|
3
|
-
import type { Label } from './types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Arguments for retrieving labels.
|
|
6
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/get_labels_api_v1_labels_get
|
|
7
|
-
*/
|
|
8
|
-
export type GetLabelsArgs = {
|
|
9
|
-
cursor?: string | null;
|
|
10
|
-
limit?: number;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Arguments for searching labels.
|
|
14
|
-
*/
|
|
15
|
-
export type SearchLabelsArgs = SearchArgs;
|
|
16
|
-
/**
|
|
17
|
-
* Response from retrieving labels.
|
|
18
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/get_labels_api_v1_labels_get
|
|
19
|
-
*/
|
|
20
|
-
export type GetLabelsResponse = {
|
|
21
|
-
results: Label[];
|
|
22
|
-
nextCursor: string | null;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Arguments for creating a new label.
|
|
26
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/create_label_api_v1_labels_post
|
|
27
|
-
*/
|
|
28
|
-
export type AddLabelArgs = {
|
|
29
|
-
name: string;
|
|
30
|
-
order?: number | null;
|
|
31
|
-
color?: ColorKey;
|
|
32
|
-
isFavorite?: boolean;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Arguments for updating a label.
|
|
36
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/update_label_api_v1_labels__label_id__post
|
|
37
|
-
*/
|
|
38
|
-
export type UpdateLabelArgs = {
|
|
39
|
-
name?: string;
|
|
40
|
-
order?: number | null;
|
|
41
|
-
color?: ColorKey;
|
|
42
|
-
isFavorite?: boolean;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Arguments for retrieving shared labels.
|
|
46
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
|
|
47
|
-
*/
|
|
48
|
-
export type GetSharedLabelsArgs = {
|
|
49
|
-
omitPersonal?: boolean;
|
|
50
|
-
cursor?: string | null;
|
|
51
|
-
limit?: number;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Response from retrieving shared labels.
|
|
55
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_api_v1_labels_shared_get
|
|
56
|
-
*/
|
|
57
|
-
export type GetSharedLabelsResponse = {
|
|
58
|
-
results: string[];
|
|
59
|
-
nextCursor: string | null;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Arguments for renaming a shared label.
|
|
63
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_rename_api_v1_labels_shared_rename_post
|
|
64
|
-
*/
|
|
65
|
-
export type RenameSharedLabelArgs = {
|
|
66
|
-
name: string;
|
|
67
|
-
newName: string;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Arguments for removing a shared label.
|
|
71
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels/operation/shared_labels_remove_api_v1_labels_shared_remove_post
|
|
72
|
-
*/
|
|
73
|
-
export type RemoveSharedLabelArgs = {
|
|
74
|
-
name: string;
|
|
75
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const LabelSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
order: z.ZodNullable<z.ZodNumber>;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
color: z.ZodString;
|
|
7
|
-
isFavorite: z.ZodBoolean;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
/**
|
|
10
|
-
* Represents a label in Todoist.
|
|
11
|
-
* @see https://developer.todoist.com/api/v1/#tag/Labels
|
|
12
|
-
*/
|
|
13
|
-
export type Label = z.infer<typeof LabelSchema>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './types.js';
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const StreakSchema: z.ZodObject<{
|
|
3
|
-
count: z.ZodNumber;
|
|
4
|
-
start: z.ZodString;
|
|
5
|
-
end: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export declare const CompletedItemSchema: z.ZodObject<{
|
|
8
|
-
id: z.ZodString;
|
|
9
|
-
completed: z.ZodNumber;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export declare const ItemsWithDateSchema: z.ZodObject<{
|
|
12
|
-
items: z.ZodArray<z.ZodObject<{
|
|
13
|
-
id: z.ZodString;
|
|
14
|
-
completed: z.ZodNumber;
|
|
15
|
-
}, z.core.$strip>>;
|
|
16
|
-
totalCompleted: z.ZodNumber;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export declare const KarmaUpdateSchema: z.ZodObject<{
|
|
19
|
-
time: z.ZodString;
|
|
20
|
-
newKarma: z.ZodNumber;
|
|
21
|
-
positiveKarma: z.ZodNumber;
|
|
22
|
-
negativeKarma: z.ZodNumber;
|
|
23
|
-
positiveKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
24
|
-
negativeKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
export declare const ProductivityStatsSchema: z.ZodObject<{
|
|
27
|
-
completedCount: z.ZodNumber;
|
|
28
|
-
daysItems: z.ZodArray<z.ZodObject<{
|
|
29
|
-
items: z.ZodArray<z.ZodObject<{
|
|
30
|
-
id: z.ZodString;
|
|
31
|
-
completed: z.ZodNumber;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
totalCompleted: z.ZodNumber;
|
|
34
|
-
date: z.ZodString;
|
|
35
|
-
}, z.core.$strip>>;
|
|
36
|
-
goals: z.ZodObject<{
|
|
37
|
-
currentDailyStreak: z.ZodObject<{
|
|
38
|
-
count: z.ZodNumber;
|
|
39
|
-
start: z.ZodString;
|
|
40
|
-
end: z.ZodString;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
currentWeeklyStreak: z.ZodObject<{
|
|
43
|
-
count: z.ZodNumber;
|
|
44
|
-
start: z.ZodString;
|
|
45
|
-
end: z.ZodString;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
dailyGoal: z.ZodNumber;
|
|
48
|
-
ignoreDays: z.ZodArray<z.ZodNumber>;
|
|
49
|
-
karmaDisabled: z.ZodNumber;
|
|
50
|
-
lastDailyStreak: z.ZodObject<{
|
|
51
|
-
count: z.ZodNumber;
|
|
52
|
-
start: z.ZodString;
|
|
53
|
-
end: z.ZodString;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
|
-
lastWeeklyStreak: z.ZodObject<{
|
|
56
|
-
count: z.ZodNumber;
|
|
57
|
-
start: z.ZodString;
|
|
58
|
-
end: z.ZodString;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
maxDailyStreak: z.ZodObject<{
|
|
61
|
-
count: z.ZodNumber;
|
|
62
|
-
start: z.ZodString;
|
|
63
|
-
end: z.ZodString;
|
|
64
|
-
}, z.core.$strip>;
|
|
65
|
-
maxWeeklyStreak: z.ZodObject<{
|
|
66
|
-
count: z.ZodNumber;
|
|
67
|
-
start: z.ZodString;
|
|
68
|
-
end: z.ZodString;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
user: z.ZodString;
|
|
71
|
-
userId: z.ZodString;
|
|
72
|
-
vacationMode: z.ZodNumber;
|
|
73
|
-
weeklyGoal: z.ZodNumber;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
karma: z.ZodNumber;
|
|
76
|
-
karmaGraphData: z.ZodArray<z.ZodObject<{
|
|
77
|
-
date: z.ZodString;
|
|
78
|
-
karmaAvg: z.ZodNumber;
|
|
79
|
-
}, z.core.$strip>>;
|
|
80
|
-
karmaLastUpdate: z.ZodNumber;
|
|
81
|
-
karmaTrend: z.ZodString;
|
|
82
|
-
karmaUpdateReasons: z.ZodArray<z.ZodObject<{
|
|
83
|
-
time: z.ZodString;
|
|
84
|
-
newKarma: z.ZodNumber;
|
|
85
|
-
positiveKarma: z.ZodNumber;
|
|
86
|
-
negativeKarma: z.ZodNumber;
|
|
87
|
-
positiveKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
88
|
-
negativeKarmaReasons: z.ZodArray<z.ZodAny>;
|
|
89
|
-
}, z.core.$strip>>;
|
|
90
|
-
projectColors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
91
|
-
weekItems: z.ZodArray<z.ZodObject<{
|
|
92
|
-
items: z.ZodArray<z.ZodObject<{
|
|
93
|
-
id: z.ZodString;
|
|
94
|
-
completed: z.ZodNumber;
|
|
95
|
-
}, z.core.$strip>>;
|
|
96
|
-
totalCompleted: z.ZodNumber;
|
|
97
|
-
from: z.ZodString;
|
|
98
|
-
to: z.ZodString;
|
|
99
|
-
}, z.core.$strip>>;
|
|
100
|
-
}, z.core.$strip>;
|
|
101
|
-
/**
|
|
102
|
-
* Represents the Productivity stats for the authenticated user.
|
|
103
|
-
* @see https://developer.todoist.com/api/v1/#tag/User/operation/get_productivity_stats_api_v1_tasks_completed_stats_get
|
|
104
|
-
*/
|
|
105
|
-
export type ProductivityStats = z.infer<typeof ProductivityStatsSchema>;
|
|
106
|
-
export declare const ColorSchema: z.ZodObject<{
|
|
107
|
-
key: z.ZodString;
|
|
108
|
-
displayName: z.ZodString;
|
|
109
|
-
hexValue: z.ZodString;
|
|
110
|
-
}, z.core.$strip>;
|
|
111
|
-
/**
|
|
112
|
-
* Represents a color in Todoist.
|
|
113
|
-
* @see https://developer.todoist.com/api/v1/#tag/Colors
|
|
114
|
-
*/
|
|
115
|
-
export type Color = z.infer<typeof ColorSchema>;
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import type { ColorKey } from '../../utils/colors.js';
|
|
2
|
-
import type { SearchArgs } from '../common.js';
|
|
3
|
-
import type { Comment } from '../comments/types.js';
|
|
4
|
-
import type { Section } from '../sections/types.js';
|
|
5
|
-
import type { Task } from '../tasks/types.js';
|
|
6
|
-
import type { User } from '../users/types.js';
|
|
7
|
-
import type { CollaboratorRole, WorkspaceRole } from '../workspaces/types.js';
|
|
8
|
-
import type { PersonalProject, ProjectViewStyle, ProjectVisibility, WorkspaceProject } from './types.js';
|
|
9
|
-
/**
|
|
10
|
-
* Arguments for retrieving projects.
|
|
11
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_projects_api_v1_projects_get
|
|
12
|
-
*/
|
|
13
|
-
export type GetProjectsArgs = {
|
|
14
|
-
cursor?: string | null;
|
|
15
|
-
limit?: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Arguments for searching projects.
|
|
19
|
-
*/
|
|
20
|
-
export type SearchProjectsArgs = SearchArgs;
|
|
21
|
-
/**
|
|
22
|
-
* Response from retrieving projects.
|
|
23
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_projects_api_v1_projects_get
|
|
24
|
-
*/
|
|
25
|
-
export type GetProjectsResponse = {
|
|
26
|
-
results: (PersonalProject | WorkspaceProject)[];
|
|
27
|
-
nextCursor: string | null;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Arguments for retrieving archived projects.
|
|
31
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_archived_projects_api_v1_projects_archived_get
|
|
32
|
-
*/
|
|
33
|
-
export type GetArchivedProjectsArgs = {
|
|
34
|
-
cursor?: string | null;
|
|
35
|
-
limit?: number;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Response from retrieving archived projects.
|
|
39
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_archived_projects_api_v1_projects_archived_get
|
|
40
|
-
*/
|
|
41
|
-
export type GetArchivedProjectsResponse = {
|
|
42
|
-
results: (PersonalProject | WorkspaceProject)[];
|
|
43
|
-
nextCursor: string | null;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Arguments for creating a new project.
|
|
47
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/create_project_api_v1_projects_post
|
|
48
|
-
*/
|
|
49
|
-
export type AddProjectArgs = {
|
|
50
|
-
name: string;
|
|
51
|
-
parentId?: string;
|
|
52
|
-
color?: ColorKey;
|
|
53
|
-
isFavorite?: boolean;
|
|
54
|
-
viewStyle?: ProjectViewStyle;
|
|
55
|
-
workspaceId?: string;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Arguments for updating a project.
|
|
59
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/update_project_api_v1_projects__project_id__post
|
|
60
|
-
*/
|
|
61
|
-
export type UpdateProjectArgs = {
|
|
62
|
-
name?: string;
|
|
63
|
-
color?: ColorKey;
|
|
64
|
-
isFavorite?: boolean;
|
|
65
|
-
viewStyle?: ProjectViewStyle;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Arguments for retrieving project collaborators.
|
|
69
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_project_collaborators_api_v1_projects__project_id__collaborators_get
|
|
70
|
-
*/
|
|
71
|
-
export type GetProjectCollaboratorsArgs = {
|
|
72
|
-
cursor?: string | null;
|
|
73
|
-
limit?: number;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Response from retrieving project collaborators.
|
|
77
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/get_project_collaborators_api_v1_projects__project_id__collaborators_get
|
|
78
|
-
*/
|
|
79
|
-
export type GetProjectCollaboratorsResponse = {
|
|
80
|
-
results: User[];
|
|
81
|
-
nextCursor: string | null;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Arguments for moving a project to a workspace.
|
|
85
|
-
*/
|
|
86
|
-
export type MoveProjectToWorkspaceArgs = {
|
|
87
|
-
/** The ID of the project to move. */
|
|
88
|
-
projectId: string;
|
|
89
|
-
/** The target workspace ID. */
|
|
90
|
-
workspaceId: string;
|
|
91
|
-
/** Optional target folder ID within the workspace. */
|
|
92
|
-
folderId?: string | null;
|
|
93
|
-
/** Optional access settings for the project in the workspace. */
|
|
94
|
-
access?: {
|
|
95
|
-
visibility: ProjectVisibility;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Arguments for moving a project to personal.
|
|
100
|
-
*/
|
|
101
|
-
export type MoveProjectToPersonalArgs = {
|
|
102
|
-
/** The ID of the project to move. */
|
|
103
|
-
projectId: string;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Arguments for counting archived projects.
|
|
107
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/count_projects_archived_api_v1_projects_archived_count_get
|
|
108
|
-
*/
|
|
109
|
-
export type GetArchivedProjectsCountArgs = {
|
|
110
|
-
workspaceId?: number | null;
|
|
111
|
-
joined?: boolean | null;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Response from counting archived projects.
|
|
115
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/count_projects_archived_api_v1_projects_archived_count_get
|
|
116
|
-
*/
|
|
117
|
-
export type GetArchivedProjectsCountResponse = {
|
|
118
|
-
count: number;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* An action permitted for a role.
|
|
122
|
-
*/
|
|
123
|
-
export type ActionView = {
|
|
124
|
-
name: string;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* A project collaborator role with its permitted actions.
|
|
128
|
-
*/
|
|
129
|
-
export type ProjectRoleView = {
|
|
130
|
-
name: CollaboratorRole;
|
|
131
|
-
actions: ActionView[];
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* A workspace role with its permitted actions.
|
|
135
|
-
*/
|
|
136
|
-
export type WorkspaceRoleView = {
|
|
137
|
-
name: WorkspaceRole;
|
|
138
|
-
actions: ActionView[];
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* Response from getting project permissions (role-to-action mappings).
|
|
142
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/permissions_api_v1_projects_permissions_get
|
|
143
|
-
*/
|
|
144
|
-
export type GetProjectPermissionsResponse = {
|
|
145
|
-
projectCollaboratorActions: ProjectRoleView[];
|
|
146
|
-
workspaceCollaboratorActions: WorkspaceRoleView[];
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Arguments for getting full project data.
|
|
150
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/projects_full_data_api_v1_projects__project_id__full_get
|
|
151
|
-
*/
|
|
152
|
-
export type GetFullProjectArgs = {
|
|
153
|
-
/**
|
|
154
|
-
* Required to access the public project without authentication.
|
|
155
|
-
*/
|
|
156
|
-
publicKey?: string | null;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* Response from getting full project data.
|
|
160
|
-
* @see https://developer.todoist.com/api/v1/#tag/Projects/operation/projects_full_data_api_v1_projects__project_id__full_get
|
|
161
|
-
*/
|
|
162
|
-
export type GetFullProjectResponse = {
|
|
163
|
-
project: (PersonalProject | WorkspaceProject) | null;
|
|
164
|
-
commentsCount: number;
|
|
165
|
-
tasks: Task[];
|
|
166
|
-
sections: Section[];
|
|
167
|
-
collaborators: User[];
|
|
168
|
-
notes: Comment[];
|
|
169
|
-
};
|