@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
package/dist/cjs/types/http.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNetworkError = isNetworkError;
|
|
4
|
-
exports.isHttpError = isHttpError;
|
|
5
|
-
/**
|
|
6
|
-
* Type guard to check if an error is a network error
|
|
7
|
-
*/
|
|
8
|
-
function isNetworkError(error) {
|
|
9
|
-
// Network errors in fetch are typically TypeError with specific messages.
|
|
10
|
-
// Timeout errors are created by fetch-with-retry with the TimeoutError name.
|
|
11
|
-
return ((error instanceof TypeError &&
|
|
12
|
-
(error.message.includes('fetch') ||
|
|
13
|
-
error.message.includes('network') ||
|
|
14
|
-
error.message.includes('Failed to fetch') ||
|
|
15
|
-
error.message.includes('NetworkError'))) ||
|
|
16
|
-
error.name === 'TimeoutError' ||
|
|
17
|
-
error.isNetworkError === true);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Type guard to check if an error is an HTTP error
|
|
21
|
-
*/
|
|
22
|
-
function isHttpError(error) {
|
|
23
|
-
return 'status' in error && typeof error.status === 'number';
|
|
24
|
-
}
|
|
@@ -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,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MOVED_ID_OBJECT_TYPES = exports.ID_MAPPING_OBJECT_TYPES = void 0;
|
|
4
|
-
/** Object types that support ID mappings. */
|
|
5
|
-
exports.ID_MAPPING_OBJECT_TYPES = [
|
|
6
|
-
'sections',
|
|
7
|
-
'tasks',
|
|
8
|
-
'comments',
|
|
9
|
-
'reminders',
|
|
10
|
-
'location_reminders',
|
|
11
|
-
'projects',
|
|
12
|
-
];
|
|
13
|
-
/** Object types that support moved ID lookups. */
|
|
14
|
-
exports.MOVED_ID_OBJECT_TYPES = [
|
|
15
|
-
'sections',
|
|
16
|
-
'tasks',
|
|
17
|
-
'comments',
|
|
18
|
-
'reminders',
|
|
19
|
-
'location_reminders',
|
|
20
|
-
];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MovedIdSchema = exports.IdMappingSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.IdMappingSchema = zod_1.z.object({
|
|
6
|
-
oldId: zod_1.z.string().nullable(),
|
|
7
|
-
newId: zod_1.z.string().nullable(),
|
|
8
|
-
});
|
|
9
|
-
exports.MovedIdSchema = zod_1.z.object({
|
|
10
|
-
oldId: zod_1.z.string(),
|
|
11
|
-
newId: zod_1.z.string(),
|
|
12
|
-
});
|
package/dist/cjs/types/index.js
DELETED
|
@@ -1,36 +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("./tasks"), exports);
|
|
18
|
-
__exportStar(require("./projects"), exports);
|
|
19
|
-
__exportStar(require("./sections"), exports);
|
|
20
|
-
__exportStar(require("./labels"), exports);
|
|
21
|
-
__exportStar(require("./comments"), exports);
|
|
22
|
-
__exportStar(require("./reminders"), exports);
|
|
23
|
-
__exportStar(require("./users"), exports);
|
|
24
|
-
__exportStar(require("./productivity"), exports);
|
|
25
|
-
__exportStar(require("./activity"), exports);
|
|
26
|
-
__exportStar(require("./workspaces"), exports);
|
|
27
|
-
__exportStar(require("./folders"), exports);
|
|
28
|
-
__exportStar(require("./insights"), exports);
|
|
29
|
-
__exportStar(require("./backups"), exports);
|
|
30
|
-
__exportStar(require("./id-mappings"), exports);
|
|
31
|
-
__exportStar(require("./emails"), exports);
|
|
32
|
-
__exportStar(require("./uploads"), exports);
|
|
33
|
-
__exportStar(require("./templates"), exports);
|
|
34
|
-
__exportStar(require("./errors"), exports);
|
|
35
|
-
__exportStar(require("./http"), exports);
|
|
36
|
-
__exportStar(require("./sync"), exports);
|
|
@@ -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,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceInsightsSchema = exports.ProjectInsightSchema = exports.ProjectProgressSchema = exports.ProjectHealthContextSchema = exports.TaskContextSchema = exports.ProjectMetricsSchema = exports.ProjectHealthSchema = exports.TaskRecommendationSchema = exports.HEALTH_STATUSES = exports.ProjectActivityStatsSchema = exports.WeekRollupSchema = exports.DayActivitySchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.DayActivitySchema = zod_1.z.object({
|
|
6
|
-
date: zod_1.z.string(),
|
|
7
|
-
totalCount: zod_1.z.number().int(),
|
|
8
|
-
});
|
|
9
|
-
exports.WeekRollupSchema = zod_1.z.object({
|
|
10
|
-
fromDate: zod_1.z.string(),
|
|
11
|
-
toDate: zod_1.z.string(),
|
|
12
|
-
totalCount: zod_1.z.number().int(),
|
|
13
|
-
});
|
|
14
|
-
exports.ProjectActivityStatsSchema = zod_1.z.object({
|
|
15
|
-
dayItems: zod_1.z.array(exports.DayActivitySchema),
|
|
16
|
-
weekItems: zod_1.z.array(exports.WeekRollupSchema).nullable(),
|
|
17
|
-
});
|
|
18
|
-
/** Available project health statuses. */
|
|
19
|
-
exports.HEALTH_STATUSES = [
|
|
20
|
-
'UNKNOWN',
|
|
21
|
-
'ON_TRACK',
|
|
22
|
-
'AT_RISK',
|
|
23
|
-
'CRITICAL',
|
|
24
|
-
'EXCELLENT',
|
|
25
|
-
'ERROR',
|
|
26
|
-
];
|
|
27
|
-
exports.TaskRecommendationSchema = zod_1.z.object({
|
|
28
|
-
taskId: zod_1.z.string(),
|
|
29
|
-
recommendation: zod_1.z.string(),
|
|
30
|
-
});
|
|
31
|
-
exports.ProjectHealthSchema = zod_1.z.object({
|
|
32
|
-
status: zod_1.z.enum(exports.HEALTH_STATUSES),
|
|
33
|
-
description: zod_1.z.string().nullable().optional(),
|
|
34
|
-
descriptionSummary: zod_1.z.string().nullable().optional(),
|
|
35
|
-
taskRecommendations: zod_1.z.array(exports.TaskRecommendationSchema).nullable().optional(),
|
|
36
|
-
projectId: zod_1.z.string().nullable().optional(),
|
|
37
|
-
updatedAt: zod_1.z.string().nullable().optional(),
|
|
38
|
-
isStale: zod_1.z.boolean().default(false),
|
|
39
|
-
updateInProgress: zod_1.z.boolean().default(false),
|
|
40
|
-
});
|
|
41
|
-
exports.ProjectMetricsSchema = zod_1.z.object({
|
|
42
|
-
totalTasks: zod_1.z.number().int(),
|
|
43
|
-
completedTasks: zod_1.z.number().int(),
|
|
44
|
-
overdueTasks: zod_1.z.number().int(),
|
|
45
|
-
tasksCreatedThisWeek: zod_1.z.number().int(),
|
|
46
|
-
tasksCompletedThisWeek: zod_1.z.number().int(),
|
|
47
|
-
averageCompletionTime: zod_1.z.number().nullable(),
|
|
48
|
-
});
|
|
49
|
-
exports.TaskContextSchema = zod_1.z.object({
|
|
50
|
-
id: zod_1.z.string(),
|
|
51
|
-
content: zod_1.z.string(),
|
|
52
|
-
due: zod_1.z.string().nullable().optional(),
|
|
53
|
-
deadline: zod_1.z.string().nullable().optional(),
|
|
54
|
-
priority: zod_1.z.string(),
|
|
55
|
-
isCompleted: zod_1.z.boolean(),
|
|
56
|
-
createdAt: zod_1.z.string(),
|
|
57
|
-
updatedAt: zod_1.z.string(),
|
|
58
|
-
completedAt: zod_1.z.string().nullable(),
|
|
59
|
-
completedByUid: zod_1.z.string().nullable(),
|
|
60
|
-
labels: zod_1.z.array(zod_1.z.string()),
|
|
61
|
-
});
|
|
62
|
-
exports.ProjectHealthContextSchema = zod_1.z.object({
|
|
63
|
-
projectId: zod_1.z.string(),
|
|
64
|
-
projectName: zod_1.z.string(),
|
|
65
|
-
projectDescription: zod_1.z.string().nullable(),
|
|
66
|
-
projectMetrics: exports.ProjectMetricsSchema,
|
|
67
|
-
tasks: zod_1.z.array(exports.TaskContextSchema),
|
|
68
|
-
language: zod_1.z.string().nullable().optional(),
|
|
69
|
-
});
|
|
70
|
-
exports.ProjectProgressSchema = zod_1.z.object({
|
|
71
|
-
projectId: zod_1.z.string(),
|
|
72
|
-
completedCount: zod_1.z.number().int(),
|
|
73
|
-
activeCount: zod_1.z.number().int(),
|
|
74
|
-
progressPercent: zod_1.z.number().int(),
|
|
75
|
-
});
|
|
76
|
-
exports.ProjectInsightSchema = zod_1.z.object({
|
|
77
|
-
projectId: zod_1.z.string(),
|
|
78
|
-
health: exports.ProjectHealthSchema.nullable(),
|
|
79
|
-
progress: exports.ProjectProgressSchema.nullable(),
|
|
80
|
-
});
|
|
81
|
-
exports.WorkspaceInsightsSchema = zod_1.z.object({
|
|
82
|
-
folderId: zod_1.z.string().nullable(),
|
|
83
|
-
projectInsights: zod_1.z.array(exports.ProjectInsightSchema),
|
|
84
|
-
});
|
|
@@ -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,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LabelSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.LabelSchema = zod_1.z.object({
|
|
6
|
-
id: zod_1.z.string(),
|
|
7
|
-
order: zod_1.z.number().int().nullable(),
|
|
8
|
-
name: zod_1.z.string(),
|
|
9
|
-
color: zod_1.z.string(),
|
|
10
|
-
isFavorite: zod_1.z.boolean(),
|
|
11
|
-
});
|
|
@@ -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,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColorSchema = exports.ProductivityStatsSchema = exports.KarmaUpdateSchema = exports.ItemsWithDateSchema = exports.CompletedItemSchema = exports.StreakSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.StreakSchema = zod_1.z.object({
|
|
6
|
-
count: zod_1.z.number(),
|
|
7
|
-
start: zod_1.z.string(),
|
|
8
|
-
end: zod_1.z.string(),
|
|
9
|
-
});
|
|
10
|
-
exports.CompletedItemSchema = zod_1.z.object({
|
|
11
|
-
id: zod_1.z.string(),
|
|
12
|
-
completed: zod_1.z.number(),
|
|
13
|
-
});
|
|
14
|
-
exports.ItemsWithDateSchema = zod_1.z.object({
|
|
15
|
-
items: zod_1.z.array(exports.CompletedItemSchema),
|
|
16
|
-
totalCompleted: zod_1.z.number(),
|
|
17
|
-
});
|
|
18
|
-
exports.KarmaUpdateSchema = zod_1.z.object({
|
|
19
|
-
time: zod_1.z.string(),
|
|
20
|
-
newKarma: zod_1.z.number(),
|
|
21
|
-
positiveKarma: zod_1.z.number(),
|
|
22
|
-
negativeKarma: zod_1.z.number(),
|
|
23
|
-
positiveKarmaReasons: zod_1.z.array(zod_1.z.any()),
|
|
24
|
-
negativeKarmaReasons: zod_1.z.array(zod_1.z.any()),
|
|
25
|
-
});
|
|
26
|
-
exports.ProductivityStatsSchema = zod_1.z.object({
|
|
27
|
-
completedCount: zod_1.z.number(),
|
|
28
|
-
daysItems: zod_1.z.array(exports.ItemsWithDateSchema.extend({
|
|
29
|
-
date: zod_1.z.string(),
|
|
30
|
-
})),
|
|
31
|
-
goals: zod_1.z.object({
|
|
32
|
-
currentDailyStreak: exports.StreakSchema,
|
|
33
|
-
currentWeeklyStreak: exports.StreakSchema,
|
|
34
|
-
dailyGoal: zod_1.z.number(),
|
|
35
|
-
ignoreDays: zod_1.z.array(zod_1.z.number()),
|
|
36
|
-
karmaDisabled: zod_1.z.number(),
|
|
37
|
-
lastDailyStreak: exports.StreakSchema,
|
|
38
|
-
lastWeeklyStreak: exports.StreakSchema,
|
|
39
|
-
maxDailyStreak: exports.StreakSchema,
|
|
40
|
-
maxWeeklyStreak: exports.StreakSchema,
|
|
41
|
-
user: zod_1.z.string(),
|
|
42
|
-
userId: zod_1.z.string(),
|
|
43
|
-
vacationMode: zod_1.z.number(),
|
|
44
|
-
weeklyGoal: zod_1.z.number(),
|
|
45
|
-
}),
|
|
46
|
-
karma: zod_1.z.number(),
|
|
47
|
-
karmaGraphData: zod_1.z.array(zod_1.z.object({
|
|
48
|
-
date: zod_1.z.string(),
|
|
49
|
-
karmaAvg: zod_1.z.number(),
|
|
50
|
-
})),
|
|
51
|
-
karmaLastUpdate: zod_1.z.number(),
|
|
52
|
-
karmaTrend: zod_1.z.string(),
|
|
53
|
-
karmaUpdateReasons: zod_1.z.array(exports.KarmaUpdateSchema),
|
|
54
|
-
projectColors: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
55
|
-
weekItems: zod_1.z.array(exports.ItemsWithDateSchema.extend({
|
|
56
|
-
from: zod_1.z.string(),
|
|
57
|
-
to: zod_1.z.string(),
|
|
58
|
-
})),
|
|
59
|
-
});
|
|
60
|
-
exports.ColorSchema = zod_1.z.object({
|
|
61
|
-
/** The key of the color (i.e. 'berry_red') */
|
|
62
|
-
key: zod_1.z.string(),
|
|
63
|
-
/** The display name of the color (i.e. 'Berry Red') */
|
|
64
|
-
displayName: zod_1.z.string(),
|
|
65
|
-
/** The hex value of the color (i.e. '#b8255f') */
|
|
66
|
-
hexValue: zod_1.z.string(),
|
|
67
|
-
});
|
|
@@ -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,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PROJECT_VIEW_STYLES = exports.WorkspaceProjectSchema = exports.ProjectVisibilitySchema = exports.PROJECT_VISIBILITIES = exports.PersonalProjectSchema = exports.BaseProjectSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const url_helpers_1 = require("../../utils/url-helpers");
|
|
6
|
-
/**
|
|
7
|
-
* Base schema for all project types in Todoist.
|
|
8
|
-
* Contains common fields shared between personal and workspace projects.
|
|
9
|
-
*/
|
|
10
|
-
exports.BaseProjectSchema = zod_1.z.object({
|
|
11
|
-
id: zod_1.z.string(),
|
|
12
|
-
canAssignTasks: zod_1.z.boolean(),
|
|
13
|
-
childOrder: zod_1.z.number().int(),
|
|
14
|
-
color: zod_1.z.string(),
|
|
15
|
-
createdAt: zod_1.z.string().nullable(),
|
|
16
|
-
isArchived: zod_1.z.boolean(),
|
|
17
|
-
isDeleted: zod_1.z.boolean(),
|
|
18
|
-
isFavorite: zod_1.z.boolean(),
|
|
19
|
-
isFrozen: zod_1.z.boolean(),
|
|
20
|
-
name: zod_1.z.string(),
|
|
21
|
-
updatedAt: zod_1.z.string().nullable(),
|
|
22
|
-
viewStyle: zod_1.z.string(),
|
|
23
|
-
defaultOrder: zod_1.z.number().int(),
|
|
24
|
-
description: zod_1.z.string(),
|
|
25
|
-
isCollapsed: zod_1.z.boolean(),
|
|
26
|
-
isShared: zod_1.z.boolean(),
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* Schema for personal projects in Todoist.
|
|
30
|
-
*/
|
|
31
|
-
exports.PersonalProjectSchema = exports.BaseProjectSchema.extend({
|
|
32
|
-
parentId: zod_1.z.string().nullable(),
|
|
33
|
-
inboxProject: zod_1.z.boolean().optional().default(false),
|
|
34
|
-
}).transform((data) => {
|
|
35
|
-
return Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getProjectUrl)(data.id, data.name) });
|
|
36
|
-
});
|
|
37
|
-
/** Available project visibility levels. */
|
|
38
|
-
exports.PROJECT_VISIBILITIES = ['restricted', 'team', 'public'];
|
|
39
|
-
exports.ProjectVisibilitySchema = zod_1.z.enum(exports.PROJECT_VISIBILITIES);
|
|
40
|
-
/**
|
|
41
|
-
* Schema for workspace projects in Todoist.
|
|
42
|
-
*/
|
|
43
|
-
exports.WorkspaceProjectSchema = exports.BaseProjectSchema.extend({
|
|
44
|
-
access: zod_1.z.object({ visibility: exports.ProjectVisibilitySchema }).optional(),
|
|
45
|
-
collaboratorRoleDefault: zod_1.z.string(),
|
|
46
|
-
folderId: zod_1.z.string().nullable(),
|
|
47
|
-
isInviteOnly: zod_1.z.boolean().nullable(),
|
|
48
|
-
isLinkSharingEnabled: zod_1.z.boolean(),
|
|
49
|
-
role: zod_1.z.string().nullable(),
|
|
50
|
-
status: zod_1.z.string(),
|
|
51
|
-
workspaceId: zod_1.z.string(),
|
|
52
|
-
}).transform((data) => {
|
|
53
|
-
return Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getProjectUrl)(data.id, data.name) });
|
|
54
|
-
});
|
|
55
|
-
/** Available project view styles. */
|
|
56
|
-
exports.PROJECT_VIEW_STYLES = ['list', 'board', 'calendar'];
|
|
@@ -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,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateLocationReminderArgsSchema = exports.UpdateReminderArgsSchema = exports.UpdateAbsoluteReminderArgsSchema = exports.UpdateRelativeReminderArgsSchema = exports.AddLocationReminderArgsSchema = exports.AddReminderArgsSchema = exports.AddAbsoluteReminderArgsSchema = exports.AddRelativeReminderArgsSchema = exports.ReminderDueDateSchema = exports.ReminderIdSchema = exports.ReminderDeliveryServiceSchema = exports.REMINDER_DELIVERY_SERVICES = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const types_1 = require("../tasks/types");
|
|
6
|
-
const reminders_1 = require("../sync/resources/reminders");
|
|
7
|
-
/** Available reminder delivery services. */
|
|
8
|
-
exports.REMINDER_DELIVERY_SERVICES = ['email', 'push'];
|
|
9
|
-
exports.ReminderDeliveryServiceSchema = zod_1.z.enum(exports.REMINDER_DELIVERY_SERVICES);
|
|
10
|
-
exports.ReminderIdSchema = zod_1.z.string();
|
|
11
|
-
exports.ReminderDueDateSchema = types_1.DueDateSchema.pick({
|
|
12
|
-
date: true,
|
|
13
|
-
string: true,
|
|
14
|
-
timezone: true,
|
|
15
|
-
lang: true,
|
|
16
|
-
isRecurring: true,
|
|
17
|
-
})
|
|
18
|
-
.partial()
|
|
19
|
-
.strict();
|
|
20
|
-
// ── Add schemas ──────────────────────────────────────────────────────
|
|
21
|
-
exports.AddRelativeReminderArgsSchema = zod_1.z
|
|
22
|
-
.object({
|
|
23
|
-
taskId: zod_1.z.string(),
|
|
24
|
-
reminderType: zod_1.z.literal(reminders_1.ReminderTypeEnum.Relative).optional(),
|
|
25
|
-
minuteOffset: zod_1.z.number().int(),
|
|
26
|
-
service: exports.ReminderDeliveryServiceSchema.optional(),
|
|
27
|
-
notifyUid: zod_1.z.string().optional(),
|
|
28
|
-
isUrgent: zod_1.z.boolean().optional(),
|
|
29
|
-
})
|
|
30
|
-
.strict();
|
|
31
|
-
exports.AddAbsoluteReminderArgsSchema = zod_1.z
|
|
32
|
-
.object({
|
|
33
|
-
taskId: zod_1.z.string(),
|
|
34
|
-
reminderType: zod_1.z.literal(reminders_1.ReminderTypeEnum.Absolute),
|
|
35
|
-
due: exports.ReminderDueDateSchema,
|
|
36
|
-
service: exports.ReminderDeliveryServiceSchema.optional(),
|
|
37
|
-
notifyUid: zod_1.z.string().optional(),
|
|
38
|
-
isUrgent: zod_1.z.boolean().optional(),
|
|
39
|
-
})
|
|
40
|
-
.strict();
|
|
41
|
-
exports.AddReminderArgsSchema = zod_1.z.union([
|
|
42
|
-
exports.AddRelativeReminderArgsSchema,
|
|
43
|
-
exports.AddAbsoluteReminderArgsSchema,
|
|
44
|
-
]);
|
|
45
|
-
exports.AddLocationReminderArgsSchema = zod_1.z
|
|
46
|
-
.object({
|
|
47
|
-
taskId: zod_1.z.string(),
|
|
48
|
-
notifyUid: zod_1.z.string().optional(),
|
|
49
|
-
name: zod_1.z.string(),
|
|
50
|
-
locLat: zod_1.z.string(),
|
|
51
|
-
locLong: zod_1.z.string(),
|
|
52
|
-
locTrigger: zod_1.z.enum(reminders_1.LOCATION_TRIGGERS),
|
|
53
|
-
radius: zod_1.z.number().int().optional(),
|
|
54
|
-
})
|
|
55
|
-
.strict();
|
|
56
|
-
// ── Update schemas ───────────────────────────────────────────────────
|
|
57
|
-
exports.UpdateRelativeReminderArgsSchema = zod_1.z
|
|
58
|
-
.object({
|
|
59
|
-
reminderType: zod_1.z.literal(reminders_1.ReminderTypeEnum.Relative),
|
|
60
|
-
minuteOffset: zod_1.z.number().int().optional(),
|
|
61
|
-
notifyUid: zod_1.z.string().optional(),
|
|
62
|
-
service: exports.ReminderDeliveryServiceSchema.optional(),
|
|
63
|
-
isUrgent: zod_1.z.boolean().optional(),
|
|
64
|
-
})
|
|
65
|
-
.strict();
|
|
66
|
-
exports.UpdateAbsoluteReminderArgsSchema = zod_1.z
|
|
67
|
-
.object({
|
|
68
|
-
reminderType: zod_1.z.literal(reminders_1.ReminderTypeEnum.Absolute),
|
|
69
|
-
due: exports.ReminderDueDateSchema.optional(),
|
|
70
|
-
notifyUid: zod_1.z.string().optional(),
|
|
71
|
-
service: exports.ReminderDeliveryServiceSchema.optional(),
|
|
72
|
-
isUrgent: zod_1.z.boolean().optional(),
|
|
73
|
-
})
|
|
74
|
-
.strict();
|
|
75
|
-
exports.UpdateReminderArgsSchema = zod_1.z
|
|
76
|
-
.discriminatedUnion('reminderType', [
|
|
77
|
-
exports.UpdateRelativeReminderArgsSchema,
|
|
78
|
-
exports.UpdateAbsoluteReminderArgsSchema,
|
|
79
|
-
])
|
|
80
|
-
.refine((args) => Object.entries(args).some(([key, value]) => key !== 'reminderType' && value !== undefined), {
|
|
81
|
-
message: 'At least one reminder field must be provided to updateReminder',
|
|
82
|
-
});
|
|
83
|
-
exports.UpdateLocationReminderArgsSchema = zod_1.z
|
|
84
|
-
.object({
|
|
85
|
-
notifyUid: zod_1.z.string().optional(),
|
|
86
|
-
name: zod_1.z.string().optional(),
|
|
87
|
-
locLat: zod_1.z.string().optional(),
|
|
88
|
-
locLong: zod_1.z.string().optional(),
|
|
89
|
-
locTrigger: zod_1.z.enum(reminders_1.LOCATION_TRIGGERS).optional(),
|
|
90
|
-
radius: zod_1.z.number().int().optional(),
|
|
91
|
-
})
|
|
92
|
-
.strict()
|
|
93
|
-
.refine((args) => Object.values(args).some((value) => value !== undefined), {
|
|
94
|
-
message: 'At least one reminder field must be provided to updateLocationReminder',
|
|
95
|
-
});
|
|
@@ -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,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SectionSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const url_helpers_1 = require("../../utils/url-helpers");
|
|
6
|
-
exports.SectionSchema = zod_1.z
|
|
7
|
-
.object({
|
|
8
|
-
id: zod_1.z.string(),
|
|
9
|
-
userId: zod_1.z.string(),
|
|
10
|
-
projectId: zod_1.z.string(),
|
|
11
|
-
addedAt: zod_1.z.string(),
|
|
12
|
-
updatedAt: zod_1.z.string(),
|
|
13
|
-
archivedAt: zod_1.z.string().nullable(),
|
|
14
|
-
name: zod_1.z.string(),
|
|
15
|
-
sectionOrder: zod_1.z.number().int(),
|
|
16
|
-
isArchived: zod_1.z.boolean(),
|
|
17
|
-
isDeleted: zod_1.z.boolean(),
|
|
18
|
-
isCollapsed: zod_1.z.boolean(),
|
|
19
|
-
})
|
|
20
|
-
.transform((data) => {
|
|
21
|
-
return Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getSectionUrl)(data.id, data.name) });
|
|
22
|
-
});
|
|
@@ -1,35 +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
|
-
// Re-export all domain types
|
|
18
|
-
__exportStar(require("./shared"), exports);
|
|
19
|
-
__exportStar(require("./tasks"), exports);
|
|
20
|
-
__exportStar(require("./projects"), exports);
|
|
21
|
-
__exportStar(require("./sections"), exports);
|
|
22
|
-
__exportStar(require("./labels"), exports);
|
|
23
|
-
__exportStar(require("./filters"), exports);
|
|
24
|
-
__exportStar(require("./notes"), exports);
|
|
25
|
-
__exportStar(require("./reminders"), exports);
|
|
26
|
-
__exportStar(require("./workspaces"), exports);
|
|
27
|
-
__exportStar(require("./folders"), exports);
|
|
28
|
-
__exportStar(require("./workspace-filters"), exports);
|
|
29
|
-
__exportStar(require("./workspace-goals"), exports);
|
|
30
|
-
__exportStar(require("./notifications"), exports);
|
|
31
|
-
__exportStar(require("./sharing"), exports);
|
|
32
|
-
__exportStar(require("./view-options"), exports);
|
|
33
|
-
__exportStar(require("./project-view-options"), exports);
|
|
34
|
-
__exportStar(require("./calendars"), exports);
|
|
35
|
-
__exportStar(require("./others"), exports);
|