@doist/todoist-api-typescript 7.9.1 → 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 -10
- 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 -73
- 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 -155
- 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 -7
- 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 -70
- 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 -152
- 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 -13
- 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 -142
- 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 -267
- 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 -1404
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const DayActivitySchema = z.object({
|
|
3
|
-
date: z.string(),
|
|
4
|
-
totalCount: z.number().int(),
|
|
5
|
-
});
|
|
6
|
-
export const WeekRollupSchema = z.object({
|
|
7
|
-
fromDate: z.string(),
|
|
8
|
-
toDate: z.string(),
|
|
9
|
-
totalCount: z.number().int(),
|
|
10
|
-
});
|
|
11
|
-
export const ProjectActivityStatsSchema = z.object({
|
|
12
|
-
dayItems: z.array(DayActivitySchema),
|
|
13
|
-
weekItems: z.array(WeekRollupSchema).nullable(),
|
|
14
|
-
});
|
|
15
|
-
/** Available project health statuses. */
|
|
16
|
-
export const HEALTH_STATUSES = [
|
|
17
|
-
'UNKNOWN',
|
|
18
|
-
'ON_TRACK',
|
|
19
|
-
'AT_RISK',
|
|
20
|
-
'CRITICAL',
|
|
21
|
-
'EXCELLENT',
|
|
22
|
-
'ERROR',
|
|
23
|
-
];
|
|
24
|
-
export const TaskRecommendationSchema = z.object({
|
|
25
|
-
taskId: z.string(),
|
|
26
|
-
recommendation: z.string(),
|
|
27
|
-
});
|
|
28
|
-
export const ProjectHealthSchema = z.object({
|
|
29
|
-
status: z.enum(HEALTH_STATUSES),
|
|
30
|
-
description: z.string().nullable().optional(),
|
|
31
|
-
descriptionSummary: z.string().nullable().optional(),
|
|
32
|
-
taskRecommendations: z.array(TaskRecommendationSchema).nullable().optional(),
|
|
33
|
-
projectId: z.string().nullable().optional(),
|
|
34
|
-
updatedAt: z.string().nullable().optional(),
|
|
35
|
-
isStale: z.boolean().default(false),
|
|
36
|
-
updateInProgress: z.boolean().default(false),
|
|
37
|
-
});
|
|
38
|
-
export const ProjectMetricsSchema = z.object({
|
|
39
|
-
totalTasks: z.number().int(),
|
|
40
|
-
completedTasks: z.number().int(),
|
|
41
|
-
overdueTasks: z.number().int(),
|
|
42
|
-
tasksCreatedThisWeek: z.number().int(),
|
|
43
|
-
tasksCompletedThisWeek: z.number().int(),
|
|
44
|
-
averageCompletionTime: z.number().nullable(),
|
|
45
|
-
});
|
|
46
|
-
export const TaskContextSchema = z.object({
|
|
47
|
-
id: z.string(),
|
|
48
|
-
content: z.string(),
|
|
49
|
-
due: z.string().nullable().optional(),
|
|
50
|
-
deadline: z.string().nullable().optional(),
|
|
51
|
-
priority: z.string(),
|
|
52
|
-
isCompleted: z.boolean(),
|
|
53
|
-
createdAt: z.string(),
|
|
54
|
-
updatedAt: z.string(),
|
|
55
|
-
completedAt: z.string().nullable(),
|
|
56
|
-
completedByUid: z.string().nullable(),
|
|
57
|
-
labels: z.array(z.string()),
|
|
58
|
-
});
|
|
59
|
-
export const ProjectHealthContextSchema = z.object({
|
|
60
|
-
projectId: z.string(),
|
|
61
|
-
projectName: z.string(),
|
|
62
|
-
projectDescription: z.string().nullable(),
|
|
63
|
-
projectMetrics: ProjectMetricsSchema,
|
|
64
|
-
tasks: z.array(TaskContextSchema),
|
|
65
|
-
language: z.string().nullable().optional(),
|
|
66
|
-
});
|
|
67
|
-
export const ProjectProgressSchema = z.object({
|
|
68
|
-
projectId: z.string(),
|
|
69
|
-
completedCount: z.number().int(),
|
|
70
|
-
activeCount: z.number().int(),
|
|
71
|
-
progressPercent: z.number().int(),
|
|
72
|
-
});
|
|
73
|
-
export const ProjectInsightSchema = z.object({
|
|
74
|
-
projectId: z.string(),
|
|
75
|
-
health: ProjectHealthSchema.nullable(),
|
|
76
|
-
progress: ProjectProgressSchema.nullable(),
|
|
77
|
-
});
|
|
78
|
-
export const WorkspaceInsightsSchema = z.object({
|
|
79
|
-
folderId: z.string().nullable(),
|
|
80
|
-
projectInsights: z.array(ProjectInsightSchema),
|
|
81
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './types.js';
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const StreakSchema = z.object({
|
|
3
|
-
count: z.number(),
|
|
4
|
-
start: z.string(),
|
|
5
|
-
end: z.string(),
|
|
6
|
-
});
|
|
7
|
-
export const CompletedItemSchema = z.object({
|
|
8
|
-
id: z.string(),
|
|
9
|
-
completed: z.number(),
|
|
10
|
-
});
|
|
11
|
-
export const ItemsWithDateSchema = z.object({
|
|
12
|
-
items: z.array(CompletedItemSchema),
|
|
13
|
-
totalCompleted: z.number(),
|
|
14
|
-
});
|
|
15
|
-
export const KarmaUpdateSchema = z.object({
|
|
16
|
-
time: z.string(),
|
|
17
|
-
newKarma: z.number(),
|
|
18
|
-
positiveKarma: z.number(),
|
|
19
|
-
negativeKarma: z.number(),
|
|
20
|
-
positiveKarmaReasons: z.array(z.any()),
|
|
21
|
-
negativeKarmaReasons: z.array(z.any()),
|
|
22
|
-
});
|
|
23
|
-
export const ProductivityStatsSchema = z.object({
|
|
24
|
-
completedCount: z.number(),
|
|
25
|
-
daysItems: z.array(ItemsWithDateSchema.extend({
|
|
26
|
-
date: z.string(),
|
|
27
|
-
})),
|
|
28
|
-
goals: z.object({
|
|
29
|
-
currentDailyStreak: StreakSchema,
|
|
30
|
-
currentWeeklyStreak: StreakSchema,
|
|
31
|
-
dailyGoal: z.number(),
|
|
32
|
-
ignoreDays: z.array(z.number()),
|
|
33
|
-
karmaDisabled: z.number(),
|
|
34
|
-
lastDailyStreak: StreakSchema,
|
|
35
|
-
lastWeeklyStreak: StreakSchema,
|
|
36
|
-
maxDailyStreak: StreakSchema,
|
|
37
|
-
maxWeeklyStreak: StreakSchema,
|
|
38
|
-
user: z.string(),
|
|
39
|
-
userId: z.string(),
|
|
40
|
-
vacationMode: z.number(),
|
|
41
|
-
weeklyGoal: z.number(),
|
|
42
|
-
}),
|
|
43
|
-
karma: z.number(),
|
|
44
|
-
karmaGraphData: z.array(z.object({
|
|
45
|
-
date: z.string(),
|
|
46
|
-
karmaAvg: z.number(),
|
|
47
|
-
})),
|
|
48
|
-
karmaLastUpdate: z.number(),
|
|
49
|
-
karmaTrend: z.string(),
|
|
50
|
-
karmaUpdateReasons: z.array(KarmaUpdateSchema),
|
|
51
|
-
projectColors: z.record(z.string(), z.string()),
|
|
52
|
-
weekItems: z.array(ItemsWithDateSchema.extend({
|
|
53
|
-
from: z.string(),
|
|
54
|
-
to: z.string(),
|
|
55
|
-
})),
|
|
56
|
-
});
|
|
57
|
-
export const ColorSchema = z.object({
|
|
58
|
-
/** The key of the color (i.e. 'berry_red') */
|
|
59
|
-
key: z.string(),
|
|
60
|
-
/** The display name of the color (i.e. 'Berry Red') */
|
|
61
|
-
displayName: z.string(),
|
|
62
|
-
/** The hex value of the color (i.e. '#b8255f') */
|
|
63
|
-
hexValue: z.string(),
|
|
64
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getProjectUrl } from '../../utils/url-helpers.js';
|
|
3
|
-
/**
|
|
4
|
-
* Base schema for all project types in Todoist.
|
|
5
|
-
* Contains common fields shared between personal and workspace projects.
|
|
6
|
-
*/
|
|
7
|
-
export const BaseProjectSchema = z.object({
|
|
8
|
-
id: z.string(),
|
|
9
|
-
canAssignTasks: z.boolean(),
|
|
10
|
-
childOrder: z.number().int(),
|
|
11
|
-
color: z.string(),
|
|
12
|
-
createdAt: z.string().nullable(),
|
|
13
|
-
isArchived: z.boolean(),
|
|
14
|
-
isDeleted: z.boolean(),
|
|
15
|
-
isFavorite: z.boolean(),
|
|
16
|
-
isFrozen: z.boolean(),
|
|
17
|
-
name: z.string(),
|
|
18
|
-
updatedAt: z.string().nullable(),
|
|
19
|
-
viewStyle: z.string(),
|
|
20
|
-
defaultOrder: z.number().int(),
|
|
21
|
-
description: z.string(),
|
|
22
|
-
isCollapsed: z.boolean(),
|
|
23
|
-
isShared: z.boolean(),
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Schema for personal projects in Todoist.
|
|
27
|
-
*/
|
|
28
|
-
export const PersonalProjectSchema = BaseProjectSchema.extend({
|
|
29
|
-
parentId: z.string().nullable(),
|
|
30
|
-
inboxProject: z.boolean().optional().default(false),
|
|
31
|
-
}).transform((data) => {
|
|
32
|
-
return Object.assign(Object.assign({}, data), { url: getProjectUrl(data.id, data.name) });
|
|
33
|
-
});
|
|
34
|
-
/** Available project visibility levels. */
|
|
35
|
-
export const PROJECT_VISIBILITIES = ['restricted', 'team', 'public'];
|
|
36
|
-
export const ProjectVisibilitySchema = z.enum(PROJECT_VISIBILITIES);
|
|
37
|
-
/**
|
|
38
|
-
* Schema for workspace projects in Todoist.
|
|
39
|
-
*/
|
|
40
|
-
export const WorkspaceProjectSchema = BaseProjectSchema.extend({
|
|
41
|
-
access: z.object({ visibility: ProjectVisibilitySchema }).optional(),
|
|
42
|
-
collaboratorRoleDefault: z.string(),
|
|
43
|
-
folderId: z.string().nullable(),
|
|
44
|
-
isInviteOnly: z.boolean().nullable(),
|
|
45
|
-
isLinkSharingEnabled: z.boolean(),
|
|
46
|
-
role: z.string().nullable(),
|
|
47
|
-
status: z.string(),
|
|
48
|
-
workspaceId: z.string(),
|
|
49
|
-
}).transform((data) => {
|
|
50
|
-
return Object.assign(Object.assign({}, data), { url: getProjectUrl(data.id, data.name) });
|
|
51
|
-
});
|
|
52
|
-
/** Available project view styles. */
|
|
53
|
-
export const PROJECT_VIEW_STYLES = ['list', 'board', 'calendar'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './requests.js';
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { DueDateSchema } from '../tasks/types.js';
|
|
3
|
-
import { LOCATION_TRIGGERS, ReminderTypeEnum } from '../sync/resources/reminders.js';
|
|
4
|
-
/** Available reminder delivery services. */
|
|
5
|
-
export const REMINDER_DELIVERY_SERVICES = ['email', 'push'];
|
|
6
|
-
export const ReminderDeliveryServiceSchema = z.enum(REMINDER_DELIVERY_SERVICES);
|
|
7
|
-
export const ReminderIdSchema = z.string();
|
|
8
|
-
export const ReminderDueDateSchema = DueDateSchema.pick({
|
|
9
|
-
date: true,
|
|
10
|
-
string: true,
|
|
11
|
-
timezone: true,
|
|
12
|
-
lang: true,
|
|
13
|
-
isRecurring: true,
|
|
14
|
-
})
|
|
15
|
-
.partial()
|
|
16
|
-
.strict();
|
|
17
|
-
// ── Add schemas ──────────────────────────────────────────────────────
|
|
18
|
-
export const AddRelativeReminderArgsSchema = z
|
|
19
|
-
.object({
|
|
20
|
-
taskId: z.string(),
|
|
21
|
-
reminderType: z.literal(ReminderTypeEnum.Relative).optional(),
|
|
22
|
-
minuteOffset: z.number().int(),
|
|
23
|
-
service: ReminderDeliveryServiceSchema.optional(),
|
|
24
|
-
notifyUid: z.string().optional(),
|
|
25
|
-
isUrgent: z.boolean().optional(),
|
|
26
|
-
})
|
|
27
|
-
.strict();
|
|
28
|
-
export const AddAbsoluteReminderArgsSchema = z
|
|
29
|
-
.object({
|
|
30
|
-
taskId: z.string(),
|
|
31
|
-
reminderType: z.literal(ReminderTypeEnum.Absolute),
|
|
32
|
-
due: ReminderDueDateSchema,
|
|
33
|
-
service: ReminderDeliveryServiceSchema.optional(),
|
|
34
|
-
notifyUid: z.string().optional(),
|
|
35
|
-
isUrgent: z.boolean().optional(),
|
|
36
|
-
})
|
|
37
|
-
.strict();
|
|
38
|
-
export const AddReminderArgsSchema = z.union([
|
|
39
|
-
AddRelativeReminderArgsSchema,
|
|
40
|
-
AddAbsoluteReminderArgsSchema,
|
|
41
|
-
]);
|
|
42
|
-
export const AddLocationReminderArgsSchema = z
|
|
43
|
-
.object({
|
|
44
|
-
taskId: z.string(),
|
|
45
|
-
notifyUid: z.string().optional(),
|
|
46
|
-
name: z.string(),
|
|
47
|
-
locLat: z.string(),
|
|
48
|
-
locLong: z.string(),
|
|
49
|
-
locTrigger: z.enum(LOCATION_TRIGGERS),
|
|
50
|
-
radius: z.number().int().optional(),
|
|
51
|
-
})
|
|
52
|
-
.strict();
|
|
53
|
-
// ── Update schemas ───────────────────────────────────────────────────
|
|
54
|
-
export const UpdateRelativeReminderArgsSchema = z
|
|
55
|
-
.object({
|
|
56
|
-
reminderType: z.literal(ReminderTypeEnum.Relative),
|
|
57
|
-
minuteOffset: z.number().int().optional(),
|
|
58
|
-
notifyUid: z.string().optional(),
|
|
59
|
-
service: ReminderDeliveryServiceSchema.optional(),
|
|
60
|
-
isUrgent: z.boolean().optional(),
|
|
61
|
-
})
|
|
62
|
-
.strict();
|
|
63
|
-
export const UpdateAbsoluteReminderArgsSchema = z
|
|
64
|
-
.object({
|
|
65
|
-
reminderType: z.literal(ReminderTypeEnum.Absolute),
|
|
66
|
-
due: ReminderDueDateSchema.optional(),
|
|
67
|
-
notifyUid: z.string().optional(),
|
|
68
|
-
service: ReminderDeliveryServiceSchema.optional(),
|
|
69
|
-
isUrgent: z.boolean().optional(),
|
|
70
|
-
})
|
|
71
|
-
.strict();
|
|
72
|
-
export const UpdateReminderArgsSchema = z
|
|
73
|
-
.discriminatedUnion('reminderType', [
|
|
74
|
-
UpdateRelativeReminderArgsSchema,
|
|
75
|
-
UpdateAbsoluteReminderArgsSchema,
|
|
76
|
-
])
|
|
77
|
-
.refine((args) => Object.entries(args).some(([key, value]) => key !== 'reminderType' && value !== undefined), {
|
|
78
|
-
message: 'At least one reminder field must be provided to updateReminder',
|
|
79
|
-
});
|
|
80
|
-
export const UpdateLocationReminderArgsSchema = z
|
|
81
|
-
.object({
|
|
82
|
-
notifyUid: z.string().optional(),
|
|
83
|
-
name: z.string().optional(),
|
|
84
|
-
locLat: z.string().optional(),
|
|
85
|
-
locLong: z.string().optional(),
|
|
86
|
-
locTrigger: z.enum(LOCATION_TRIGGERS).optional(),
|
|
87
|
-
radius: z.number().int().optional(),
|
|
88
|
-
})
|
|
89
|
-
.strict()
|
|
90
|
-
.refine((args) => Object.values(args).some((value) => value !== undefined), {
|
|
91
|
-
message: 'At least one reminder field must be provided to updateLocationReminder',
|
|
92
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getSectionUrl } from '../../utils/url-helpers.js';
|
|
3
|
-
export const SectionSchema = z
|
|
4
|
-
.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
userId: z.string(),
|
|
7
|
-
projectId: z.string(),
|
|
8
|
-
addedAt: z.string(),
|
|
9
|
-
updatedAt: z.string(),
|
|
10
|
-
archivedAt: z.string().nullable(),
|
|
11
|
-
name: z.string(),
|
|
12
|
-
sectionOrder: z.number().int(),
|
|
13
|
-
isArchived: z.boolean(),
|
|
14
|
-
isDeleted: z.boolean(),
|
|
15
|
-
isCollapsed: z.boolean(),
|
|
16
|
-
})
|
|
17
|
-
.transform((data) => {
|
|
18
|
-
return Object.assign(Object.assign({}, data), { url: getSectionUrl(data.id, data.name) });
|
|
19
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Re-export all domain types
|
|
2
|
-
export * from './shared.js';
|
|
3
|
-
export * from './tasks.js';
|
|
4
|
-
export * from './projects.js';
|
|
5
|
-
export * from './sections.js';
|
|
6
|
-
export * from './labels.js';
|
|
7
|
-
export * from './filters.js';
|
|
8
|
-
export * from './notes.js';
|
|
9
|
-
export * from './reminders.js';
|
|
10
|
-
export * from './workspaces.js';
|
|
11
|
-
export * from './folders.js';
|
|
12
|
-
export * from './workspace-filters.js';
|
|
13
|
-
export * from './workspace-goals.js';
|
|
14
|
-
export * from './notifications.js';
|
|
15
|
-
export * from './sharing.js';
|
|
16
|
-
export * from './view-options.js';
|
|
17
|
-
export * from './project-view-options.js';
|
|
18
|
-
export * from './calendars.js';
|
|
19
|
-
export * from './others.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types used across multiple Sync API command argument types.
|
|
3
|
-
*/
|
|
4
|
-
/** Available project workflow statuses. */
|
|
5
|
-
export const PROJECT_STATUSES = [
|
|
6
|
-
'PLANNED',
|
|
7
|
-
'IN_PROGRESS',
|
|
8
|
-
'PAUSED',
|
|
9
|
-
'COMPLETED',
|
|
10
|
-
'CANCELED',
|
|
11
|
-
];
|
|
12
|
-
export { COLLABORATOR_ROLES } from '../../workspaces/types.js';
|
|
13
|
-
/** Available reminder notification services. */
|
|
14
|
-
export const REMINDER_SERVICES = ['default', 'email', 'mobile', 'push', 'no_default'];
|
|
15
|
-
/** Available workspace project sort orders. */
|
|
16
|
-
export const WORKSPACE_PROJECT_SORT_ORDERS = ['MANUAL', 'A_TO_Z', 'Z_TO_A'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All available Sync API resource types.
|
|
3
|
-
*/
|
|
4
|
-
export const SYNC_RESOURCE_TYPES = [
|
|
5
|
-
'labels',
|
|
6
|
-
'projects',
|
|
7
|
-
'items',
|
|
8
|
-
'notes',
|
|
9
|
-
'project_notes',
|
|
10
|
-
'sections',
|
|
11
|
-
'filters',
|
|
12
|
-
'reminders',
|
|
13
|
-
'reminders_location',
|
|
14
|
-
'locations',
|
|
15
|
-
'user',
|
|
16
|
-
'live_notifications',
|
|
17
|
-
'collaborators',
|
|
18
|
-
'collaborator_states',
|
|
19
|
-
'user_settings',
|
|
20
|
-
'notification_settings',
|
|
21
|
-
'user_plan_limits',
|
|
22
|
-
'completed_info',
|
|
23
|
-
'stats',
|
|
24
|
-
'workspaces',
|
|
25
|
-
'workspace_users',
|
|
26
|
-
'workspace_filters',
|
|
27
|
-
'view_options',
|
|
28
|
-
'project_view_options_defaults',
|
|
29
|
-
'role_actions',
|
|
30
|
-
'folders',
|
|
31
|
-
'workspace_goals',
|
|
32
|
-
'day_orders',
|
|
33
|
-
'calendars',
|
|
34
|
-
'calendar_accounts',
|
|
35
|
-
'suggestions',
|
|
36
|
-
'tooltips',
|
|
37
|
-
];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const CalendarSchema = z
|
|
3
|
-
.object({
|
|
4
|
-
id: z.string(),
|
|
5
|
-
summary: z.string(),
|
|
6
|
-
color: z.string().nullable(),
|
|
7
|
-
accountId: z.string(),
|
|
8
|
-
isVisible: z.boolean(),
|
|
9
|
-
isTaskCalendar: z.boolean().optional(),
|
|
10
|
-
})
|
|
11
|
-
.passthrough();
|
|
12
|
-
/** Available calendar account provider types. */
|
|
13
|
-
export const CALENDAR_ACCOUNT_TYPES = ['google', 'microsoft', 'apple'];
|
|
14
|
-
/** Available calendar sync states. */
|
|
15
|
-
export const CALENDAR_SYNC_STATES = ['synced', 'syncing', 'error'];
|
|
16
|
-
export const CalendarAccountSchema = z
|
|
17
|
-
.object({
|
|
18
|
-
id: z.string(),
|
|
19
|
-
name: z.string(),
|
|
20
|
-
type: z.enum(CALENDAR_ACCOUNT_TYPES),
|
|
21
|
-
isDeleted: z.boolean().optional(),
|
|
22
|
-
isEventsEnabled: z.boolean().optional(),
|
|
23
|
-
isTasksEnabled: z.boolean().optional(),
|
|
24
|
-
isAllDayTasksEnabled: z.boolean().optional(),
|
|
25
|
-
pendingOperationUntil: z.string().nullable().optional(),
|
|
26
|
-
calendarsSyncState: z.enum(CALENDAR_SYNC_STATES).optional(),
|
|
27
|
-
})
|
|
28
|
-
.passthrough();
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WorkspaceRoleSchema } from '../../workspaces/types.js';
|
|
3
|
-
export const CollaboratorSchema = z
|
|
4
|
-
.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
email: z.string(),
|
|
7
|
-
fullName: z.string(),
|
|
8
|
-
timezone: z.string(),
|
|
9
|
-
imageId: z.string().nullable(),
|
|
10
|
-
})
|
|
11
|
-
.passthrough();
|
|
12
|
-
/** Available collaborator statuses. */
|
|
13
|
-
export const COLLABORATOR_STATUSES = ['active', 'invited'];
|
|
14
|
-
export const CollaboratorStateSchema = z
|
|
15
|
-
.object({
|
|
16
|
-
userId: z.string(),
|
|
17
|
-
projectId: z.string(),
|
|
18
|
-
state: z.enum(COLLABORATOR_STATUSES),
|
|
19
|
-
isDeleted: z.boolean(),
|
|
20
|
-
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
21
|
-
})
|
|
22
|
-
.passthrough();
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const CompletedProjectMetadataSchema = z
|
|
3
|
-
.object({
|
|
4
|
-
projectId: z.string(),
|
|
5
|
-
archivedSections: z.number().int(),
|
|
6
|
-
completedItems: z.number().int(),
|
|
7
|
-
})
|
|
8
|
-
.passthrough();
|
|
9
|
-
export const CompletedSectionMetadataSchema = z
|
|
10
|
-
.object({
|
|
11
|
-
sectionId: z.string(),
|
|
12
|
-
id: z.string(),
|
|
13
|
-
completedItems: z.number().int(),
|
|
14
|
-
})
|
|
15
|
-
.passthrough();
|
|
16
|
-
export const CompletedTaskMetadataSchema = z
|
|
17
|
-
.object({
|
|
18
|
-
itemId: z.string(),
|
|
19
|
-
id: z.string().optional(),
|
|
20
|
-
completedItems: z.number().int(),
|
|
21
|
-
})
|
|
22
|
-
.passthrough();
|
|
23
|
-
export const CompletedInfoSchema = z.union([
|
|
24
|
-
CompletedProjectMetadataSchema,
|
|
25
|
-
CompletedSectionMetadataSchema,
|
|
26
|
-
CompletedTaskMetadataSchema,
|
|
27
|
-
]);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const FilterSchema = z
|
|
3
|
-
.object({
|
|
4
|
-
id: z.string(),
|
|
5
|
-
name: z.string(),
|
|
6
|
-
query: z.string(),
|
|
7
|
-
color: z.string(),
|
|
8
|
-
isDeleted: z.boolean(),
|
|
9
|
-
isFavorite: z.boolean(),
|
|
10
|
-
isFrozen: z.boolean(),
|
|
11
|
-
itemOrder: z.number().int(),
|
|
12
|
-
})
|
|
13
|
-
.passthrough();
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './filters.js';
|
|
2
|
-
export * from './collaborators.js';
|
|
3
|
-
export * from './folders.js';
|
|
4
|
-
export * from './tooltips.js';
|
|
5
|
-
export * from './notes.js';
|
|
6
|
-
export * from './workspace-filters.js';
|
|
7
|
-
export * from './workspace-goals.js';
|
|
8
|
-
export * from './calendars.js';
|
|
9
|
-
export * from './reminders.js';
|
|
10
|
-
export * from './completed-info.js';
|
|
11
|
-
export * from './view-options.js';
|
|
12
|
-
export * from './user-plan-limits.js';
|
|
13
|
-
export * from './live-notifications.js';
|
|
14
|
-
export * from './workspaces.js';
|
|
15
|
-
export * from './user.js';
|
|
16
|
-
export * from './user-settings.js';
|
|
17
|
-
export * from './suggestions.js';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Live notification resource from the Sync API.
|
|
4
|
-
*
|
|
5
|
-
* Uses a base schema with commonly-present fields plus `.passthrough()` for
|
|
6
|
-
* forward compatibility. The Sync API returns 20+ notification variants;
|
|
7
|
-
* fully typing each is too fragile for a library, so we validate the common
|
|
8
|
-
* shape and preserve all extra fields.
|
|
9
|
-
*/
|
|
10
|
-
export const LiveNotificationSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
id: z.string(),
|
|
13
|
-
createdAt: z.string(),
|
|
14
|
-
fromUid: z.string(),
|
|
15
|
-
notificationType: z.string(),
|
|
16
|
-
isUnread: z.boolean(),
|
|
17
|
-
// Commonly present optional fields
|
|
18
|
-
projectId: z.string().optional(),
|
|
19
|
-
invitationId: z.string().optional(),
|
|
20
|
-
itemId: z.string().optional(),
|
|
21
|
-
itemContent: z.string().optional(),
|
|
22
|
-
responsibleUid: z.string().optional(),
|
|
23
|
-
assignedByUid: z.string().optional(),
|
|
24
|
-
fromUser: z
|
|
25
|
-
.object({
|
|
26
|
-
email: z.string(),
|
|
27
|
-
fullName: z.string(),
|
|
28
|
-
id: z.string(),
|
|
29
|
-
imageId: z.string().nullable(),
|
|
30
|
-
})
|
|
31
|
-
.optional(),
|
|
32
|
-
projectName: z.string().optional(),
|
|
33
|
-
isDeleted: z.boolean().optional(),
|
|
34
|
-
invitationSecret: z.string().optional(),
|
|
35
|
-
})
|
|
36
|
-
.passthrough();
|