@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,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectViewOptionsDefaultsSchema = exports.ViewOptionsSchema = exports.CalendarSettingsSchema = exports.CALENDAR_LAYOUTS = exports.SortOrderSchema = exports.SORT_ORDERS = exports.SortedBySchema = exports.SORTED_BY_OPTIONS = exports.GroupedBySchema = exports.GROUPED_BY_OPTIONS = exports.ViewModeSchema = exports.VIEW_MODES = exports.ViewTypeSchema = exports.VIEW_TYPES = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
/** Available view types. */
|
|
6
|
-
exports.VIEW_TYPES = [
|
|
7
|
-
'TODAY',
|
|
8
|
-
'UPCOMING',
|
|
9
|
-
'PROJECT',
|
|
10
|
-
'LABEL',
|
|
11
|
-
'FILTER',
|
|
12
|
-
'WORKSPACE_FILTER',
|
|
13
|
-
'SEARCH',
|
|
14
|
-
'TEMPLATE_PREVIEW',
|
|
15
|
-
'TASK_DETAIL',
|
|
16
|
-
'AUTOMATION',
|
|
17
|
-
'ASSIGNED',
|
|
18
|
-
'OVERDUE',
|
|
19
|
-
'WORKSPACE_OVERVIEW',
|
|
20
|
-
];
|
|
21
|
-
exports.ViewTypeSchema = zod_1.z.enum(exports.VIEW_TYPES);
|
|
22
|
-
/** Available view modes. */
|
|
23
|
-
exports.VIEW_MODES = ['LIST', 'BOARD', 'CALENDAR'];
|
|
24
|
-
exports.ViewModeSchema = zod_1.z.enum(exports.VIEW_MODES);
|
|
25
|
-
/** Available grouping options. */
|
|
26
|
-
exports.GROUPED_BY_OPTIONS = [
|
|
27
|
-
'ASSIGNEE',
|
|
28
|
-
'ADDED_DATE',
|
|
29
|
-
'DUE_DATE',
|
|
30
|
-
'DEADLINE',
|
|
31
|
-
'LABEL',
|
|
32
|
-
'PRIORITY',
|
|
33
|
-
'PROJECT',
|
|
34
|
-
'WORKSPACE',
|
|
35
|
-
];
|
|
36
|
-
exports.GroupedBySchema = zod_1.z.enum(exports.GROUPED_BY_OPTIONS).nullable();
|
|
37
|
-
/** Available sorting options. */
|
|
38
|
-
exports.SORTED_BY_OPTIONS = [
|
|
39
|
-
'MANUAL',
|
|
40
|
-
'ALPHABETICALLY',
|
|
41
|
-
'ASSIGNEE',
|
|
42
|
-
'DUE_DATE',
|
|
43
|
-
'DEADLINE',
|
|
44
|
-
'ADDED_DATE',
|
|
45
|
-
'PRIORITY',
|
|
46
|
-
'PROJECT',
|
|
47
|
-
'WORKSPACE',
|
|
48
|
-
];
|
|
49
|
-
exports.SortedBySchema = zod_1.z.enum(exports.SORTED_BY_OPTIONS).nullable();
|
|
50
|
-
/** Available sort directions. */
|
|
51
|
-
exports.SORT_ORDERS = ['ASC', 'DESC'];
|
|
52
|
-
exports.SortOrderSchema = zod_1.z.enum(exports.SORT_ORDERS).nullable();
|
|
53
|
-
/** Available calendar layout modes. */
|
|
54
|
-
exports.CALENDAR_LAYOUTS = ['WEEK', 'MONTH'];
|
|
55
|
-
exports.CalendarSettingsSchema = zod_1.z
|
|
56
|
-
.object({
|
|
57
|
-
layout: zod_1.z.enum(exports.CALENDAR_LAYOUTS).optional(),
|
|
58
|
-
})
|
|
59
|
-
.passthrough();
|
|
60
|
-
exports.ViewOptionsSchema = zod_1.z
|
|
61
|
-
.object({
|
|
62
|
-
viewType: exports.ViewTypeSchema,
|
|
63
|
-
objectId: zod_1.z.string().optional(),
|
|
64
|
-
groupedBy: exports.GroupedBySchema.optional(),
|
|
65
|
-
filteredBy: zod_1.z.string().nullable().optional(),
|
|
66
|
-
viewMode: exports.ViewModeSchema.optional(),
|
|
67
|
-
showCompletedTasks: zod_1.z.boolean().optional(),
|
|
68
|
-
sortedBy: exports.SortedBySchema.optional(),
|
|
69
|
-
sortOrder: exports.SortOrderSchema.optional(),
|
|
70
|
-
})
|
|
71
|
-
.passthrough();
|
|
72
|
-
exports.ProjectViewOptionsDefaultsSchema = zod_1.z
|
|
73
|
-
.object({
|
|
74
|
-
projectId: zod_1.z.string(),
|
|
75
|
-
viewMode: exports.ViewModeSchema.nullable().optional(),
|
|
76
|
-
groupedBy: exports.GroupedBySchema.optional(),
|
|
77
|
-
sortedBy: exports.SortedBySchema.optional(),
|
|
78
|
-
sortOrder: exports.SortOrderSchema.optional(),
|
|
79
|
-
showCompletedTasks: zod_1.z.boolean().optional(),
|
|
80
|
-
filteredBy: zod_1.z.string().nullable().optional(),
|
|
81
|
-
calendarSettings: exports.CalendarSettingsSchema.nullable().optional(),
|
|
82
|
-
})
|
|
83
|
-
.passthrough();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceFilterSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.WorkspaceFilterSchema = zod_1.z
|
|
6
|
-
.object({
|
|
7
|
-
id: zod_1.z.string(),
|
|
8
|
-
workspaceId: zod_1.z.string(),
|
|
9
|
-
name: zod_1.z.string(),
|
|
10
|
-
query: zod_1.z.string(),
|
|
11
|
-
color: zod_1.z.string(),
|
|
12
|
-
itemOrder: zod_1.z.number().int(),
|
|
13
|
-
isDeleted: zod_1.z.boolean(),
|
|
14
|
-
isFavorite: zod_1.z.boolean(),
|
|
15
|
-
isFrozen: zod_1.z.boolean(),
|
|
16
|
-
creatorUid: zod_1.z.string(),
|
|
17
|
-
updaterUid: zod_1.z.string(),
|
|
18
|
-
createdAt: zod_1.z.string(),
|
|
19
|
-
updatedAt: zod_1.z.string(),
|
|
20
|
-
})
|
|
21
|
-
.passthrough();
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceGoalSchema = exports.WorkspaceGoalProgressSchema = exports.WorkspaceGoalMilestoneSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.WorkspaceGoalMilestoneSchema = zod_1.z
|
|
6
|
-
.object({
|
|
7
|
-
id: zod_1.z.string(),
|
|
8
|
-
title: zod_1.z.string(),
|
|
9
|
-
isCompleted: zod_1.z.boolean(),
|
|
10
|
-
})
|
|
11
|
-
.passthrough();
|
|
12
|
-
exports.WorkspaceGoalProgressSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
completedItems: zod_1.z.number().int(),
|
|
15
|
-
totalItems: zod_1.z.number().int(),
|
|
16
|
-
})
|
|
17
|
-
.passthrough();
|
|
18
|
-
exports.WorkspaceGoalSchema = zod_1.z
|
|
19
|
-
.object({
|
|
20
|
-
id: zod_1.z.string(),
|
|
21
|
-
workspaceId: zod_1.z.string(),
|
|
22
|
-
title: zod_1.z.string(),
|
|
23
|
-
description: zod_1.z.string().nullable(),
|
|
24
|
-
deadline: zod_1.z.string().nullable(),
|
|
25
|
-
isDeleted: zod_1.z.boolean(),
|
|
26
|
-
projectIds: zod_1.z.array(zod_1.z.string()),
|
|
27
|
-
progress: exports.WorkspaceGoalProgressSchema.nullable(),
|
|
28
|
-
creatorUid: zod_1.z.string(),
|
|
29
|
-
createdAt: zod_1.z.string(),
|
|
30
|
-
updatedAt: zod_1.z.string(),
|
|
31
|
-
})
|
|
32
|
-
.passthrough();
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SyncWorkspaceSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const types_1 = require("../../workspaces/types");
|
|
6
|
-
/**
|
|
7
|
-
* Sync API workspace resource.
|
|
8
|
-
*
|
|
9
|
-
* This is a superset of the REST `WorkspaceSchema` — the Sync API returns
|
|
10
|
-
* additional fields like description, isDeleted, isCollapsed, member counts,
|
|
11
|
-
* domain settings, and sorting preferences.
|
|
12
|
-
*/
|
|
13
|
-
exports.SyncWorkspaceSchema = zod_1.z
|
|
14
|
-
.object({
|
|
15
|
-
id: zod_1.z.string(),
|
|
16
|
-
name: zod_1.z.string(),
|
|
17
|
-
description: zod_1.z.string(),
|
|
18
|
-
logoBig: zod_1.z.string().optional(),
|
|
19
|
-
logoMedium: zod_1.z.string().optional(),
|
|
20
|
-
logoSmall: zod_1.z.string().optional(),
|
|
21
|
-
logoS640: zod_1.z.string().optional(),
|
|
22
|
-
creatorId: zod_1.z.string(),
|
|
23
|
-
createdAt: zod_1.z.string(),
|
|
24
|
-
isDeleted: zod_1.z.boolean(),
|
|
25
|
-
isCollapsed: zod_1.z.boolean(),
|
|
26
|
-
role: types_1.WorkspaceRoleSchema,
|
|
27
|
-
plan: types_1.WorkspacePlanSchema,
|
|
28
|
-
limits: types_1.WorkspaceLimitsSchema,
|
|
29
|
-
inviteCode: zod_1.z.string().nullable().optional(),
|
|
30
|
-
isLinkSharingEnabled: zod_1.z.boolean().nullable().optional(),
|
|
31
|
-
isGuestAllowed: zod_1.z.boolean().nullable().optional(),
|
|
32
|
-
currentActiveProjects: zod_1.z.number().nullable(),
|
|
33
|
-
currentMemberCount: zod_1.z.number().nullable(),
|
|
34
|
-
memberCountByType: zod_1.z
|
|
35
|
-
.object({
|
|
36
|
-
adminCount: zod_1.z.number().int(),
|
|
37
|
-
guestCount: zod_1.z.number().int(),
|
|
38
|
-
memberCount: zod_1.z.number().int(),
|
|
39
|
-
})
|
|
40
|
-
.optional(),
|
|
41
|
-
currentTemplateCount: zod_1.z.number().nullable(),
|
|
42
|
-
pendingInvitations: zod_1.z.array(zod_1.z.string()).nullable().optional(),
|
|
43
|
-
domainName: zod_1.z.string().optional(),
|
|
44
|
-
domainDiscovery: zod_1.z.boolean().optional(),
|
|
45
|
-
restrictEmailDomains: zod_1.z.boolean().optional(),
|
|
46
|
-
adminSortingApplied: zod_1.z.boolean(),
|
|
47
|
-
projectSortPreference: zod_1.z.string().optional(),
|
|
48
|
-
defaultCollaborators: zod_1.z
|
|
49
|
-
.object({
|
|
50
|
-
predefinedGroupIds: zod_1.z.array(zod_1.z.string()),
|
|
51
|
-
userIds: zod_1.z.array(zod_1.z.number()),
|
|
52
|
-
})
|
|
53
|
-
.optional(),
|
|
54
|
-
properties: types_1.WorkspacePropertiesSchema.optional(),
|
|
55
|
-
})
|
|
56
|
-
.passthrough();
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DayOfWeekSchema = exports.TimeFormatSchema = exports.DateFormatSchema = exports.BooleanFromZeroOneSchema = exports.DAY_OF_WEEK_TO_API = exports.TIME_FORMAT_TO_API = exports.DATE_FORMAT_TO_API = exports.DAY_OF_WEEK_FROM_API = exports.TIME_FORMAT_FROM_API = exports.DATE_FORMAT_FROM_API = exports.DAYS_OF_WEEK = exports.TIME_FORMATS = exports.DATE_FORMATS = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
/** Available date format options. */
|
|
6
|
-
exports.DATE_FORMATS = ['DD/MM/YYYY', 'MM/DD/YYYY'];
|
|
7
|
-
/** Available time format options. */
|
|
8
|
-
exports.TIME_FORMATS = ['24h', '12h'];
|
|
9
|
-
/** Available days of the week. */
|
|
10
|
-
exports.DAYS_OF_WEEK = [
|
|
11
|
-
'Monday',
|
|
12
|
-
'Tuesday',
|
|
13
|
-
'Wednesday',
|
|
14
|
-
'Thursday',
|
|
15
|
-
'Friday',
|
|
16
|
-
'Saturday',
|
|
17
|
-
'Sunday',
|
|
18
|
-
];
|
|
19
|
-
exports.DATE_FORMAT_FROM_API = {
|
|
20
|
-
0: 'DD/MM/YYYY',
|
|
21
|
-
1: 'MM/DD/YYYY',
|
|
22
|
-
};
|
|
23
|
-
exports.TIME_FORMAT_FROM_API = {
|
|
24
|
-
0: '24h',
|
|
25
|
-
1: '12h',
|
|
26
|
-
};
|
|
27
|
-
exports.DAY_OF_WEEK_FROM_API = {
|
|
28
|
-
1: 'Monday',
|
|
29
|
-
2: 'Tuesday',
|
|
30
|
-
3: 'Wednesday',
|
|
31
|
-
4: 'Thursday',
|
|
32
|
-
5: 'Friday',
|
|
33
|
-
6: 'Saturday',
|
|
34
|
-
7: 'Sunday',
|
|
35
|
-
};
|
|
36
|
-
exports.DATE_FORMAT_TO_API = {
|
|
37
|
-
'DD/MM/YYYY': 0,
|
|
38
|
-
'MM/DD/YYYY': 1,
|
|
39
|
-
};
|
|
40
|
-
exports.TIME_FORMAT_TO_API = { '24h': 0, '12h': 1 };
|
|
41
|
-
exports.DAY_OF_WEEK_TO_API = {
|
|
42
|
-
Monday: 1,
|
|
43
|
-
Tuesday: 2,
|
|
44
|
-
Wednesday: 3,
|
|
45
|
-
Thursday: 4,
|
|
46
|
-
Friday: 5,
|
|
47
|
-
Saturday: 6,
|
|
48
|
-
Sunday: 7,
|
|
49
|
-
};
|
|
50
|
-
/** Zod read-schema: parse API 0/1 integer, emit boolean */
|
|
51
|
-
exports.BooleanFromZeroOneSchema = zod_1.z
|
|
52
|
-
.union([zod_1.z.literal(0), zod_1.z.literal(1)])
|
|
53
|
-
.transform((v) => v === 1);
|
|
54
|
-
/** Zod read-schemas: parse API numbers, emit descriptive strings */
|
|
55
|
-
exports.DateFormatSchema = zod_1.z
|
|
56
|
-
.union([zod_1.z.literal(0), zod_1.z.literal(1)])
|
|
57
|
-
.transform((v) => exports.DATE_FORMAT_FROM_API[v]);
|
|
58
|
-
exports.TimeFormatSchema = zod_1.z
|
|
59
|
-
.union([zod_1.z.literal(0), zod_1.z.literal(1)])
|
|
60
|
-
.transform((v) => exports.TIME_FORMAT_FROM_API[v]);
|
|
61
|
-
exports.DayOfWeekSchema = zod_1.z
|
|
62
|
-
.union([
|
|
63
|
-
zod_1.z.literal(1),
|
|
64
|
-
zod_1.z.literal(2),
|
|
65
|
-
zod_1.z.literal(3),
|
|
66
|
-
zod_1.z.literal(4),
|
|
67
|
-
zod_1.z.literal(5),
|
|
68
|
-
zod_1.z.literal(6),
|
|
69
|
-
zod_1.z.literal(7),
|
|
70
|
-
])
|
|
71
|
-
.transform((v) => exports.DAY_OF_WEEK_FROM_API[v]);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./requests"), exports);
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskSchema = exports.DeadlineSchema = exports.DurationSchema = exports.DURATION_UNITS = exports.DueDateSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const url_helpers_1 = require("../../utils/url-helpers");
|
|
6
|
-
const uncompletable_helpers_1 = require("../../utils/uncompletable-helpers");
|
|
7
|
-
exports.DueDateSchema = zod_1.z
|
|
8
|
-
.object({
|
|
9
|
-
isRecurring: zod_1.z.boolean(),
|
|
10
|
-
string: zod_1.z.string(),
|
|
11
|
-
date: zod_1.z.string(),
|
|
12
|
-
})
|
|
13
|
-
.extend({
|
|
14
|
-
datetime: zod_1.z.string().nullable().optional(),
|
|
15
|
-
timezone: zod_1.z.string().nullable().optional(),
|
|
16
|
-
lang: zod_1.z.string().nullable().optional(),
|
|
17
|
-
});
|
|
18
|
-
/** Available duration units for task deadlines. */
|
|
19
|
-
exports.DURATION_UNITS = ['minute', 'day'];
|
|
20
|
-
exports.DurationSchema = zod_1.z.object({
|
|
21
|
-
amount: zod_1.z.number().positive('Value should be greater than zero'),
|
|
22
|
-
unit: zod_1.z.enum(exports.DURATION_UNITS),
|
|
23
|
-
});
|
|
24
|
-
exports.DeadlineSchema = zod_1.z.object({
|
|
25
|
-
date: zod_1.z.string(),
|
|
26
|
-
lang: zod_1.z.string(),
|
|
27
|
-
});
|
|
28
|
-
exports.TaskSchema = zod_1.z
|
|
29
|
-
.object({
|
|
30
|
-
id: zod_1.z.string(),
|
|
31
|
-
userId: zod_1.z.string(),
|
|
32
|
-
projectId: zod_1.z.string(),
|
|
33
|
-
sectionId: zod_1.z.string().nullable(),
|
|
34
|
-
parentId: zod_1.z.string().nullable(),
|
|
35
|
-
addedByUid: zod_1.z.string().nullable(),
|
|
36
|
-
assignedByUid: zod_1.z.string().nullable(),
|
|
37
|
-
responsibleUid: zod_1.z.string().nullable(),
|
|
38
|
-
labels: zod_1.z.array(zod_1.z.string()),
|
|
39
|
-
deadline: exports.DeadlineSchema.nullable(),
|
|
40
|
-
duration: exports.DurationSchema.nullable(),
|
|
41
|
-
checked: zod_1.z.boolean(),
|
|
42
|
-
isDeleted: zod_1.z.boolean(),
|
|
43
|
-
addedAt: zod_1.z.string().nullable(),
|
|
44
|
-
completedAt: zod_1.z.string().nullable(),
|
|
45
|
-
updatedAt: zod_1.z.string().nullable(),
|
|
46
|
-
due: exports.DueDateSchema.nullable(),
|
|
47
|
-
priority: zod_1.z.number().int(),
|
|
48
|
-
childOrder: zod_1.z.number().int(),
|
|
49
|
-
content: zod_1.z.string(),
|
|
50
|
-
description: zod_1.z.string(),
|
|
51
|
-
dayOrder: zod_1.z.number().int(),
|
|
52
|
-
isCollapsed: zod_1.z.boolean(),
|
|
53
|
-
isUncompletable: zod_1.z.boolean().default(false),
|
|
54
|
-
})
|
|
55
|
-
.transform((data) => {
|
|
56
|
-
// Auto-detect uncompletable status from content prefix
|
|
57
|
-
const isUncompletable = (0, uncompletable_helpers_1.hasUncompletablePrefix)(data.content);
|
|
58
|
-
return Object.assign(Object.assign({}, data), { isUncompletable, url: (0, url_helpers_1.getTaskUrl)(data.id, data.content) });
|
|
59
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CurrentUserSchema = exports.PREMIUM_STATUSES = exports.TimezoneInfoSchema = exports.UserSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.UserSchema = zod_1.z.object({
|
|
6
|
-
id: zod_1.z.string(),
|
|
7
|
-
name: zod_1.z.string(),
|
|
8
|
-
email: zod_1.z.string(),
|
|
9
|
-
});
|
|
10
|
-
exports.TimezoneInfoSchema = zod_1.z.object({
|
|
11
|
-
gmtString: zod_1.z.string(),
|
|
12
|
-
hours: zod_1.z.number().int(),
|
|
13
|
-
isDst: zod_1.z.number().int(),
|
|
14
|
-
minutes: zod_1.z.number().int(),
|
|
15
|
-
timezone: zod_1.z.string(),
|
|
16
|
-
});
|
|
17
|
-
/** Available user premium statuses. */
|
|
18
|
-
exports.PREMIUM_STATUSES = [
|
|
19
|
-
'not_premium',
|
|
20
|
-
'current_personal_plan',
|
|
21
|
-
'legacy_personal_plan',
|
|
22
|
-
'teams_business_member',
|
|
23
|
-
];
|
|
24
|
-
exports.CurrentUserSchema = zod_1.z.object({
|
|
25
|
-
id: zod_1.z.string(),
|
|
26
|
-
email: zod_1.z.string(),
|
|
27
|
-
fullName: zod_1.z.string(),
|
|
28
|
-
avatarBig: zod_1.z.string().nullish(),
|
|
29
|
-
avatarMedium: zod_1.z.string().nullish(),
|
|
30
|
-
avatarS640: zod_1.z.string().nullish(),
|
|
31
|
-
avatarSmall: zod_1.z.string().nullish(),
|
|
32
|
-
businessAccountId: zod_1.z.string().nullable(),
|
|
33
|
-
isPremium: zod_1.z.boolean(),
|
|
34
|
-
premiumStatus: zod_1.z.enum(exports.PREMIUM_STATUSES),
|
|
35
|
-
dateFormat: zod_1.z.number().int(),
|
|
36
|
-
timeFormat: zod_1.z.number().int(),
|
|
37
|
-
weeklyGoal: zod_1.z.number().int(),
|
|
38
|
-
dailyGoal: zod_1.z.number().int(),
|
|
39
|
-
completedCount: zod_1.z.number().int(),
|
|
40
|
-
completedToday: zod_1.z.number().int(),
|
|
41
|
-
karma: zod_1.z.number(),
|
|
42
|
-
karmaTrend: zod_1.z.string(),
|
|
43
|
-
lang: zod_1.z.string(),
|
|
44
|
-
nextWeek: zod_1.z.number().int(),
|
|
45
|
-
startDay: zod_1.z.number().int(),
|
|
46
|
-
startPage: zod_1.z.string(),
|
|
47
|
-
tzInfo: exports.TimezoneInfoSchema,
|
|
48
|
-
inboxProjectId: zod_1.z.string(),
|
|
49
|
-
daysOff: zod_1.z.array(zod_1.z.number().int()),
|
|
50
|
-
weekendStartDay: zod_1.z.number().int(),
|
|
51
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./requests"), exports);
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceUserTaskSchema = exports.MemberActivityInfoSchema = exports.WorkspaceSchema = exports.WorkspacePropertiesSchema = exports.WorkspaceLimitsSchema = exports.WorkspacePlanSchema = exports.WORKSPACE_PLANS = exports.JoinWorkspaceResultSchema = exports.WorkspacePlanDetailsSchema = exports.WORKSPACE_PLAN_STATUSES = exports.WORKSPACE_CURRENT_PLANS = exports.FormattedPriceListingSchema = exports.PlanPriceSchema = exports.WorkspaceInvitationSchema = exports.WorkspaceUserSchema = exports.WorkspaceRoleSchema = exports.WORKSPACE_ROLES = exports.COLLABORATOR_ROLES = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const types_1 = require("../tasks/types");
|
|
6
|
-
/** Available project collaborator roles. */
|
|
7
|
-
exports.COLLABORATOR_ROLES = [
|
|
8
|
-
'CREATOR',
|
|
9
|
-
'ADMIN',
|
|
10
|
-
'READ_WRITE',
|
|
11
|
-
'EDIT_ONLY',
|
|
12
|
-
'COMPLETE_ONLY',
|
|
13
|
-
];
|
|
14
|
-
/**
|
|
15
|
-
* Available workspace roles.
|
|
16
|
-
*/
|
|
17
|
-
exports.WORKSPACE_ROLES = ['ADMIN', 'MEMBER', 'GUEST'];
|
|
18
|
-
exports.WorkspaceRoleSchema = zod_1.z.enum(exports.WORKSPACE_ROLES);
|
|
19
|
-
exports.WorkspaceUserSchema = zod_1.z.object({
|
|
20
|
-
userId: zod_1.z.string(),
|
|
21
|
-
workspaceId: zod_1.z.string(),
|
|
22
|
-
userEmail: zod_1.z.string(),
|
|
23
|
-
fullName: zod_1.z.string(),
|
|
24
|
-
timezone: zod_1.z.string(),
|
|
25
|
-
role: exports.WorkspaceRoleSchema,
|
|
26
|
-
imageId: zod_1.z.string().nullable(),
|
|
27
|
-
isDeleted: zod_1.z.boolean().default(false),
|
|
28
|
-
});
|
|
29
|
-
exports.WorkspaceInvitationSchema = zod_1.z.object({
|
|
30
|
-
id: zod_1.z.string().default('0'),
|
|
31
|
-
inviterId: zod_1.z.string(),
|
|
32
|
-
userEmail: zod_1.z.string(),
|
|
33
|
-
workspaceId: zod_1.z.string(),
|
|
34
|
-
role: exports.WorkspaceRoleSchema,
|
|
35
|
-
isExistingUser: zod_1.z.boolean(),
|
|
36
|
-
});
|
|
37
|
-
exports.PlanPriceSchema = zod_1.z.object({
|
|
38
|
-
currency: zod_1.z.string(),
|
|
39
|
-
amount: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
|
|
40
|
-
interval: zod_1.z.string().optional(),
|
|
41
|
-
});
|
|
42
|
-
exports.FormattedPriceListingSchema = zod_1.z.object({
|
|
43
|
-
currency: zod_1.z.string().optional(),
|
|
44
|
-
amount: zod_1.z.number().optional(),
|
|
45
|
-
interval: zod_1.z.string().optional(),
|
|
46
|
-
formatted: zod_1.z.string().optional(),
|
|
47
|
-
});
|
|
48
|
-
/** Available workspace plan names. */
|
|
49
|
-
exports.WORKSPACE_CURRENT_PLANS = ['Business', 'Starter'];
|
|
50
|
-
/** Available workspace plan statuses. */
|
|
51
|
-
exports.WORKSPACE_PLAN_STATUSES = [
|
|
52
|
-
'Active',
|
|
53
|
-
'Downgraded',
|
|
54
|
-
'Cancelled',
|
|
55
|
-
'NeverSubscribed',
|
|
56
|
-
];
|
|
57
|
-
exports.WorkspacePlanDetailsSchema = zod_1.z.object({
|
|
58
|
-
currentMemberCount: zod_1.z.number(),
|
|
59
|
-
currentPlan: zod_1.z.enum(exports.WORKSPACE_CURRENT_PLANS),
|
|
60
|
-
currentPlanStatus: zod_1.z.enum(exports.WORKSPACE_PLAN_STATUSES),
|
|
61
|
-
downgradeAt: zod_1.z.string().nullable(),
|
|
62
|
-
currentActiveProjects: zod_1.z.number(),
|
|
63
|
-
maximumActiveProjects: zod_1.z.number(),
|
|
64
|
-
priceList: zod_1.z.array(exports.FormattedPriceListingSchema),
|
|
65
|
-
workspaceId: zod_1.z.number(),
|
|
66
|
-
isTrialing: zod_1.z.boolean(),
|
|
67
|
-
trialEndsAt: zod_1.z.string().nullable(),
|
|
68
|
-
cancelAtPeriodEnd: zod_1.z.boolean(),
|
|
69
|
-
hasTrialed: zod_1.z.boolean(),
|
|
70
|
-
planPrice: exports.PlanPriceSchema.nullable(),
|
|
71
|
-
hasBillingPortal: zod_1.z.boolean(),
|
|
72
|
-
hasBillingPortalSwitchToAnnual: zod_1.z.boolean(),
|
|
73
|
-
});
|
|
74
|
-
exports.JoinWorkspaceResultSchema = zod_1.z.object({
|
|
75
|
-
customSortingApplied: zod_1.z.boolean(),
|
|
76
|
-
projectSortPreference: zod_1.z.string(),
|
|
77
|
-
role: exports.WorkspaceRoleSchema,
|
|
78
|
-
userId: zod_1.z.string(),
|
|
79
|
-
workspaceId: zod_1.z.string(),
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* Available workspace plans.
|
|
83
|
-
*/
|
|
84
|
-
exports.WORKSPACE_PLANS = ['STARTER', 'BUSINESS'];
|
|
85
|
-
exports.WorkspacePlanSchema = zod_1.z.enum(exports.WORKSPACE_PLANS);
|
|
86
|
-
/**
|
|
87
|
-
* Workspace resource limits.
|
|
88
|
-
*/
|
|
89
|
-
exports.WorkspaceLimitsSchema = zod_1.z
|
|
90
|
-
.object({
|
|
91
|
-
current: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable(),
|
|
92
|
-
next: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable(),
|
|
93
|
-
})
|
|
94
|
-
.catchall(zod_1.z.any());
|
|
95
|
-
/**
|
|
96
|
-
* Workspace properties (flexible object for unknown fields).
|
|
97
|
-
*/
|
|
98
|
-
exports.WorkspacePropertiesSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
|
|
99
|
-
/**
|
|
100
|
-
* Represents a workspace in Todoist.
|
|
101
|
-
*/
|
|
102
|
-
exports.WorkspaceSchema = zod_1.z.object({
|
|
103
|
-
id: zod_1.z.string(),
|
|
104
|
-
name: zod_1.z.string(),
|
|
105
|
-
plan: exports.WorkspacePlanSchema,
|
|
106
|
-
role: exports.WorkspaceRoleSchema,
|
|
107
|
-
inviteCode: zod_1.z.string(),
|
|
108
|
-
isLinkSharingEnabled: zod_1.z.boolean(),
|
|
109
|
-
isGuestAllowed: zod_1.z.boolean(),
|
|
110
|
-
limits: exports.WorkspaceLimitsSchema,
|
|
111
|
-
logoBig: zod_1.z.string().nullish(),
|
|
112
|
-
logoMedium: zod_1.z.string().nullish(),
|
|
113
|
-
logoSmall: zod_1.z.string().nullish(),
|
|
114
|
-
logoS640: zod_1.z.string().nullish(),
|
|
115
|
-
createdAt: zod_1.z.string(),
|
|
116
|
-
creatorId: zod_1.z.string(),
|
|
117
|
-
properties: exports.WorkspacePropertiesSchema,
|
|
118
|
-
});
|
|
119
|
-
exports.MemberActivityInfoSchema = zod_1.z.object({
|
|
120
|
-
userId: zod_1.z.string(),
|
|
121
|
-
tasksAssigned: zod_1.z.number().int(),
|
|
122
|
-
tasksOverdue: zod_1.z.number().int(),
|
|
123
|
-
});
|
|
124
|
-
exports.WorkspaceUserTaskSchema = zod_1.z.object({
|
|
125
|
-
id: zod_1.z.string(),
|
|
126
|
-
content: zod_1.z.string(),
|
|
127
|
-
responsibleUid: zod_1.z.string().nullable(),
|
|
128
|
-
due: types_1.DueDateSchema.nullable(),
|
|
129
|
-
deadline: types_1.DeadlineSchema.nullable(),
|
|
130
|
-
labels: zod_1.z.array(zod_1.z.string()),
|
|
131
|
-
notesCount: zod_1.z.number().int(),
|
|
132
|
-
projectId: zod_1.z.string(),
|
|
133
|
-
projectName: zod_1.z.string(),
|
|
134
|
-
priority: zod_1.z.number().int(),
|
|
135
|
-
description: zod_1.z.string(),
|
|
136
|
-
isOverdue: zod_1.z.boolean(),
|
|
137
|
-
});
|