@doist/todoist-api-typescript 7.5.0 → 7.6.1
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/dist/cjs/authentication.js +46 -2
- package/dist/cjs/consts/endpoints.js +54 -2
- package/dist/cjs/todoist-api.js +524 -6
- package/dist/cjs/types/activity/index.js +18 -0
- package/dist/cjs/types/activity/requests.js +2 -0
- package/dist/cjs/types/activity/types.js +28 -0
- package/dist/cjs/types/backups/index.js +18 -0
- package/dist/cjs/types/backups/requests.js +2 -0
- package/dist/cjs/types/backups/types.js +8 -0
- package/dist/cjs/types/comments/index.js +18 -0
- package/dist/cjs/types/comments/requests.js +2 -0
- package/dist/cjs/types/comments/types.js +60 -0
- package/dist/cjs/types/common.js +2 -0
- package/dist/cjs/types/emails/index.js +17 -0
- package/dist/cjs/types/emails/requests.js +5 -0
- package/dist/cjs/types/id-mappings/index.js +18 -0
- package/dist/cjs/types/id-mappings/requests.js +20 -0
- package/dist/cjs/types/id-mappings/types.js +12 -0
- package/dist/cjs/types/index.js +16 -2
- package/dist/cjs/types/insights/index.js +18 -0
- package/dist/cjs/types/insights/requests.js +2 -0
- package/dist/cjs/types/insights/types.js +84 -0
- package/dist/cjs/types/labels/index.js +18 -0
- package/dist/cjs/types/labels/requests.js +2 -0
- package/dist/cjs/types/labels/types.js +11 -0
- package/dist/cjs/types/productivity/index.js +17 -0
- package/dist/cjs/types/productivity/types.js +67 -0
- package/dist/cjs/types/projects/index.js +18 -0
- package/dist/cjs/types/projects/requests.js +2 -0
- package/dist/cjs/types/projects/types.js +56 -0
- package/dist/cjs/types/reminders/index.js +17 -0
- package/dist/cjs/types/sections/index.js +18 -0
- package/dist/cjs/types/sections/requests.js +2 -0
- package/dist/cjs/types/sections/types.js +22 -0
- package/dist/cjs/types/sync/commands/shared.js +2 -2
- package/dist/cjs/types/sync/resources/collaborators.js +2 -2
- package/dist/cjs/types/sync/resources/notes.js +2 -2
- package/dist/cjs/types/sync/resources/reminders.js +3 -3
- package/dist/cjs/types/sync/resources/user.js +2 -2
- package/dist/cjs/types/sync/resources/workspaces.js +5 -5
- package/dist/cjs/types/tasks/index.js +18 -0
- package/dist/cjs/types/tasks/requests.js +2 -0
- package/dist/cjs/types/tasks/types.js +59 -0
- package/dist/cjs/types/templates/index.js +17 -0
- package/dist/cjs/types/templates/requests.js +2 -0
- package/dist/cjs/types/uploads/index.js +17 -0
- package/dist/cjs/types/uploads/requests.js +2 -0
- package/dist/cjs/types/users/index.js +17 -0
- package/dist/cjs/types/users/types.js +51 -0
- package/dist/cjs/types/workspaces/index.js +18 -0
- package/dist/cjs/types/workspaces/requests.js +2 -0
- package/dist/cjs/types/workspaces/types.js +137 -0
- package/dist/cjs/utils/validators.js +47 -19
- package/dist/esm/authentication.js +46 -3
- package/dist/esm/consts/endpoints.js +43 -0
- package/dist/esm/todoist-api.js +522 -4
- package/dist/esm/types/activity/index.js +2 -0
- package/dist/esm/types/activity/requests.js +1 -0
- package/dist/esm/types/activity/types.js +25 -0
- package/dist/esm/types/backups/index.js +2 -0
- package/dist/esm/types/backups/requests.js +1 -0
- package/dist/esm/types/backups/types.js +5 -0
- package/dist/esm/types/comments/index.js +2 -0
- package/dist/esm/types/comments/requests.js +1 -0
- package/dist/esm/types/comments/types.js +57 -0
- package/dist/esm/types/common.js +1 -0
- package/dist/esm/types/emails/index.js +1 -0
- package/dist/esm/types/emails/requests.js +2 -0
- package/dist/esm/types/id-mappings/index.js +2 -0
- package/dist/esm/types/id-mappings/requests.js +17 -0
- package/dist/esm/types/id-mappings/types.js +9 -0
- package/dist/esm/types/index.js +16 -2
- package/dist/esm/types/insights/index.js +2 -0
- package/dist/esm/types/insights/requests.js +1 -0
- package/dist/esm/types/insights/types.js +81 -0
- package/dist/esm/types/labels/index.js +2 -0
- package/dist/esm/types/labels/requests.js +1 -0
- package/dist/esm/types/labels/types.js +8 -0
- package/dist/esm/types/productivity/index.js +1 -0
- package/dist/esm/types/productivity/types.js +64 -0
- package/dist/esm/types/projects/index.js +2 -0
- package/dist/esm/types/projects/requests.js +1 -0
- package/dist/esm/types/projects/types.js +53 -0
- package/dist/esm/types/reminders/index.js +1 -0
- package/dist/esm/types/sections/index.js +2 -0
- package/dist/esm/types/sections/requests.js +1 -0
- package/dist/esm/types/sections/types.js +19 -0
- package/dist/esm/types/sync/commands/shared.js +1 -1
- package/dist/esm/types/sync/resources/collaborators.js +1 -1
- package/dist/esm/types/sync/resources/notes.js +1 -1
- package/dist/esm/types/sync/resources/reminders.js +1 -1
- package/dist/esm/types/sync/resources/user.js +1 -1
- package/dist/esm/types/sync/resources/workspaces.js +1 -1
- package/dist/esm/types/tasks/index.js +2 -0
- package/dist/esm/types/tasks/requests.js +1 -0
- package/dist/esm/types/tasks/types.js +56 -0
- package/dist/esm/types/templates/index.js +1 -0
- package/dist/esm/types/templates/requests.js +1 -0
- package/dist/esm/types/uploads/index.js +1 -0
- package/dist/esm/types/uploads/requests.js +1 -0
- package/dist/esm/types/users/index.js +1 -0
- package/dist/esm/types/users/types.js +48 -0
- package/dist/esm/types/workspaces/index.js +2 -0
- package/dist/esm/types/workspaces/requests.js +1 -0
- package/dist/esm/types/workspaces/types.js +134 -0
- package/dist/esm/utils/validators.js +30 -2
- package/dist/types/authentication.d.ts +51 -6
- package/dist/types/consts/endpoints.d.ts +22 -0
- package/dist/types/test-utils/test-defaults.d.ts +5 -5
- package/dist/types/todoist-api.d.ts +209 -4
- package/dist/types/types/activity/index.d.ts +2 -0
- package/dist/types/types/activity/requests.d.ts +85 -0
- package/dist/types/types/activity/types.d.ts +49 -0
- package/dist/types/types/backups/index.d.ts +2 -0
- package/dist/types/types/backups/requests.d.ts +16 -0
- package/dist/types/types/backups/types.d.ts +7 -0
- package/dist/types/types/comments/index.d.ts +2 -0
- package/dist/types/types/comments/requests.d.ts +63 -0
- package/dist/types/types/comments/types.d.ts +141 -0
- package/dist/types/types/common.d.ts +6 -0
- package/dist/types/types/emails/index.d.ts +1 -0
- package/dist/types/types/emails/requests.d.ts +30 -0
- package/dist/types/types/id-mappings/index.d.ts +2 -0
- package/dist/types/types/id-mappings/requests.d.ts +28 -0
- package/dist/types/types/id-mappings/types.d.ts +13 -0
- package/dist/types/types/index.d.ts +16 -2
- package/dist/types/types/insights/index.d.ts +2 -0
- package/dist/types/types/insights/requests.d.ts +26 -0
- package/dist/types/types/insights/types.d.ts +186 -0
- package/dist/types/types/labels/index.d.ts +2 -0
- package/dist/types/types/labels/requests.d.ts +75 -0
- package/dist/types/types/labels/types.d.ts +13 -0
- package/dist/types/types/productivity/index.d.ts +1 -0
- package/dist/types/types/productivity/types.d.ts +115 -0
- package/dist/types/types/projects/index.d.ts +2 -0
- package/dist/types/types/projects/requests.d.ts +169 -0
- package/dist/types/types/projects/types.d.ts +201 -0
- package/dist/types/types/reminders/index.d.ts +1 -0
- package/dist/types/types/reminders/requests.d.ts +91 -0
- package/dist/types/types/sections/index.d.ts +2 -0
- package/dist/types/types/sections/requests.d.ts +41 -0
- package/dist/types/types/sections/types.d.ts +44 -0
- package/dist/types/types/sync/commands/projects.d.ts +2 -1
- package/dist/types/types/sync/commands/shared.d.ts +2 -2
- package/dist/types/types/sync/commands/workspaces.d.ts +1 -1
- package/dist/types/types/sync/resources/notes.d.ts +1 -1
- package/dist/types/types/sync/resources/user.d.ts +2 -2
- package/dist/types/types/sync/resources/view-options.d.ts +5 -5
- package/dist/types/types/sync/response.d.ts +5 -1
- package/dist/types/types/sync/user-preferences.d.ts +1 -1
- package/dist/types/types/tasks/index.d.ts +2 -0
- package/dist/types/types/tasks/requests.d.ts +197 -0
- package/dist/types/types/tasks/types.d.ts +162 -0
- package/dist/types/types/templates/index.d.ts +1 -0
- package/dist/types/types/templates/requests.d.ts +92 -0
- package/dist/types/types/uploads/index.d.ts +1 -0
- package/dist/types/types/uploads/requests.d.ts +32 -0
- package/dist/types/types/users/index.d.ts +1 -0
- package/dist/types/types/users/types.d.ts +66 -0
- package/dist/types/types/workspaces/index.d.ts +2 -0
- package/dist/types/types/workspaces/requests.d.ts +260 -0
- package/dist/types/types/workspaces/types.d.ts +225 -0
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/validators.d.ts +205 -12
- package/package.json +1 -1
- package/dist/cjs/types/entities.js +0 -437
- package/dist/esm/types/entities.js +0 -434
- package/dist/types/types/entities.d.ts +0 -971
- package/dist/types/types/requests.d.ts +0 -856
- /package/dist/cjs/types/{requests.js → reminders/requests.js} +0 -0
- /package/dist/esm/types/{requests.js → reminders/requests.js} +0 -0
package/dist/cjs/todoist-api.js
CHANGED
|
@@ -12,14 +12,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.TodoistApi = void 0;
|
|
15
|
-
const
|
|
16
|
-
const reminders_1 = require("./types/
|
|
17
|
-
const
|
|
15
|
+
const tasks_1 = require("./types/tasks");
|
|
16
|
+
const reminders_1 = require("./types/reminders");
|
|
17
|
+
const reminders_2 = require("./types/sync/resources/reminders");
|
|
18
18
|
const http_client_1 = require("./transport/http-client");
|
|
19
19
|
const endpoints_1 = require("./consts/endpoints");
|
|
20
20
|
const validators_1 = require("./utils/validators");
|
|
21
21
|
const url_helpers_1 = require("./utils/url-helpers");
|
|
22
22
|
const multipart_upload_1 = require("./utils/multipart-upload");
|
|
23
|
+
const case_conversion_1 = require("./utils/case-conversion");
|
|
23
24
|
const activity_helpers_1 = require("./utils/activity-helpers");
|
|
24
25
|
const uncompletable_helpers_1 = require("./utils/uncompletable-helpers");
|
|
25
26
|
const zod_1 = require("zod");
|
|
@@ -86,9 +87,9 @@ function headersToRecord(headers) {
|
|
|
86
87
|
});
|
|
87
88
|
return result;
|
|
88
89
|
}
|
|
89
|
-
const ReminderDeliveryServiceSchema = zod_1.z.enum(
|
|
90
|
+
const ReminderDeliveryServiceSchema = zod_1.z.enum(reminders_1.REMINDER_DELIVERY_SERVICES);
|
|
90
91
|
const ReminderIdSchema = zod_1.z.string();
|
|
91
|
-
const ReminderDueDateSchema =
|
|
92
|
+
const ReminderDueDateSchema = tasks_1.DueDateSchema.pick({
|
|
92
93
|
date: true,
|
|
93
94
|
string: true,
|
|
94
95
|
timezone: true,
|
|
@@ -121,7 +122,7 @@ const UpdateLocationReminderArgsSchema = zod_1.z
|
|
|
121
122
|
name: zod_1.z.string().optional(),
|
|
122
123
|
locLat: zod_1.z.string().optional(),
|
|
123
124
|
locLong: zod_1.z.string().optional(),
|
|
124
|
-
locTrigger: zod_1.z.enum(
|
|
125
|
+
locTrigger: zod_1.z.enum(reminders_2.LOCATION_TRIGGERS).optional(),
|
|
125
126
|
radius: zod_1.z.number().int().optional(),
|
|
126
127
|
})
|
|
127
128
|
.strict()
|
|
@@ -347,6 +348,30 @@ class TodoistApi {
|
|
|
347
348
|
nextCursor,
|
|
348
349
|
};
|
|
349
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Retrieves all completed tasks with optional filters.
|
|
353
|
+
*
|
|
354
|
+
* Uses offset-based pagination rather than cursor-based.
|
|
355
|
+
*
|
|
356
|
+
* @param args - Optional parameters including project ID, label, date range, and pagination.
|
|
357
|
+
* @returns A promise that resolves to completed tasks with associated project and section data.
|
|
358
|
+
*/
|
|
359
|
+
async getAllCompletedTasks(args = {}) {
|
|
360
|
+
const { since, until } = args, rest = __rest(args, ["since", "until"]);
|
|
361
|
+
const { data } = await (0, http_client_1.request)({
|
|
362
|
+
httpMethod: 'GET',
|
|
363
|
+
baseUri: this.syncApiBase,
|
|
364
|
+
relativePath: endpoints_1.ENDPOINT_REST_TASKS_COMPLETED,
|
|
365
|
+
apiToken: this.authToken,
|
|
366
|
+
customFetch: this.customFetch,
|
|
367
|
+
payload: Object.assign(Object.assign(Object.assign({}, rest), (since ? { since: since.toISOString() } : {})), (until ? { until: until.toISOString() } : {})),
|
|
368
|
+
});
|
|
369
|
+
return {
|
|
370
|
+
projects: data.projects,
|
|
371
|
+
sections: data.sections,
|
|
372
|
+
items: (0, validators_1.validateTaskArray)(data.items),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
350
375
|
/**
|
|
351
376
|
* Creates a new task with the provided parameters.
|
|
352
377
|
*
|
|
@@ -838,6 +863,116 @@ class TodoistApi {
|
|
|
838
863
|
nextCursor,
|
|
839
864
|
};
|
|
840
865
|
}
|
|
866
|
+
// ── Insights ──
|
|
867
|
+
/**
|
|
868
|
+
* Retrieves activity statistics for a project.
|
|
869
|
+
*
|
|
870
|
+
* @param projectId - The unique identifier of the project.
|
|
871
|
+
* @param args - Optional parameters including weeks and weekly counts flag.
|
|
872
|
+
* @returns A promise that resolves to the project activity stats.
|
|
873
|
+
*/
|
|
874
|
+
async getProjectActivityStats(projectId, args = {}) {
|
|
875
|
+
zod_1.z.string().parse(projectId);
|
|
876
|
+
const response = await (0, http_client_1.request)({
|
|
877
|
+
httpMethod: 'GET',
|
|
878
|
+
baseUri: this.syncApiBase,
|
|
879
|
+
relativePath: (0, endpoints_1.getProjectInsightsActivityStatsEndpoint)(projectId),
|
|
880
|
+
apiToken: this.authToken,
|
|
881
|
+
customFetch: this.customFetch,
|
|
882
|
+
payload: Object.assign({ objectType: 'ITEM', eventType: 'COMPLETED' }, args),
|
|
883
|
+
});
|
|
884
|
+
return (0, validators_1.validateProjectActivityStats)(response.data);
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Retrieves the health status of a project.
|
|
888
|
+
*
|
|
889
|
+
* @param projectId - The unique identifier of the project.
|
|
890
|
+
* @returns A promise that resolves to the project health data.
|
|
891
|
+
*/
|
|
892
|
+
async getProjectHealth(projectId) {
|
|
893
|
+
zod_1.z.string().parse(projectId);
|
|
894
|
+
const response = await (0, http_client_1.request)({
|
|
895
|
+
httpMethod: 'GET',
|
|
896
|
+
baseUri: this.syncApiBase,
|
|
897
|
+
relativePath: (0, endpoints_1.getProjectInsightsHealthEndpoint)(projectId),
|
|
898
|
+
apiToken: this.authToken,
|
|
899
|
+
customFetch: this.customFetch,
|
|
900
|
+
});
|
|
901
|
+
return (0, validators_1.validateProjectHealth)(response.data);
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Retrieves the health context for a project, including metrics and task details.
|
|
905
|
+
*
|
|
906
|
+
* @param projectId - The unique identifier of the project.
|
|
907
|
+
* @returns A promise that resolves to the project health context.
|
|
908
|
+
*/
|
|
909
|
+
async getProjectHealthContext(projectId) {
|
|
910
|
+
zod_1.z.string().parse(projectId);
|
|
911
|
+
const response = await (0, http_client_1.request)({
|
|
912
|
+
httpMethod: 'GET',
|
|
913
|
+
baseUri: this.syncApiBase,
|
|
914
|
+
relativePath: (0, endpoints_1.getProjectInsightsHealthContextEndpoint)(projectId),
|
|
915
|
+
apiToken: this.authToken,
|
|
916
|
+
customFetch: this.customFetch,
|
|
917
|
+
});
|
|
918
|
+
return (0, validators_1.validateProjectHealthContext)(response.data);
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Retrieves progress information for a project.
|
|
922
|
+
*
|
|
923
|
+
* @param projectId - The unique identifier of the project.
|
|
924
|
+
* @returns A promise that resolves to the project progress data.
|
|
925
|
+
*/
|
|
926
|
+
async getProjectProgress(projectId) {
|
|
927
|
+
zod_1.z.string().parse(projectId);
|
|
928
|
+
const response = await (0, http_client_1.request)({
|
|
929
|
+
httpMethod: 'GET',
|
|
930
|
+
baseUri: this.syncApiBase,
|
|
931
|
+
relativePath: (0, endpoints_1.getProjectInsightsProgressEndpoint)(projectId),
|
|
932
|
+
apiToken: this.authToken,
|
|
933
|
+
customFetch: this.customFetch,
|
|
934
|
+
});
|
|
935
|
+
return (0, validators_1.validateProjectProgress)(response.data);
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Retrieves insights for all projects in a workspace.
|
|
939
|
+
*
|
|
940
|
+
* @param workspaceId - The unique identifier of the workspace.
|
|
941
|
+
* @param args - Optional parameters including project IDs filter.
|
|
942
|
+
* @returns A promise that resolves to workspace insights data.
|
|
943
|
+
*/
|
|
944
|
+
async getWorkspaceInsights(workspaceId, args = {}) {
|
|
945
|
+
zod_1.z.string().parse(workspaceId);
|
|
946
|
+
const response = await (0, http_client_1.request)({
|
|
947
|
+
httpMethod: 'GET',
|
|
948
|
+
baseUri: this.syncApiBase,
|
|
949
|
+
relativePath: (0, endpoints_1.getWorkspaceInsightsEndpoint)(workspaceId),
|
|
950
|
+
apiToken: this.authToken,
|
|
951
|
+
customFetch: this.customFetch,
|
|
952
|
+
payload: Object.assign(Object.assign({}, args), (args.projectIds ? { projectIds: args.projectIds.join(',') } : {})),
|
|
953
|
+
});
|
|
954
|
+
return (0, validators_1.validateWorkspaceInsights)(response.data);
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Triggers a health analysis for a project.
|
|
958
|
+
*
|
|
959
|
+
* @param projectId - The unique identifier of the project.
|
|
960
|
+
* @param requestId - Optional custom identifier for the request.
|
|
961
|
+
* @returns A promise that resolves to the updated project health data.
|
|
962
|
+
*/
|
|
963
|
+
async analyzeProjectHealth(projectId, requestId) {
|
|
964
|
+
zod_1.z.string().parse(projectId);
|
|
965
|
+
const response = await (0, http_client_1.request)({
|
|
966
|
+
httpMethod: 'POST',
|
|
967
|
+
baseUri: this.syncApiBase,
|
|
968
|
+
relativePath: (0, endpoints_1.getProjectInsightsHealthAnalyzeEndpoint)(projectId),
|
|
969
|
+
apiToken: this.authToken,
|
|
970
|
+
customFetch: this.customFetch,
|
|
971
|
+
requestId: requestId,
|
|
972
|
+
});
|
|
973
|
+
return (0, validators_1.validateProjectHealth)(response.data);
|
|
974
|
+
}
|
|
975
|
+
// ── Sections ──
|
|
841
976
|
/**
|
|
842
977
|
* Retrieves all sections within a specific project or matching criteria.
|
|
843
978
|
*
|
|
@@ -1256,6 +1391,46 @@ class TodoistApi {
|
|
|
1256
1391
|
});
|
|
1257
1392
|
return (0, http_client_1.isSuccess)(response);
|
|
1258
1393
|
}
|
|
1394
|
+
/**
|
|
1395
|
+
* Retrieves a paginated list of time-based reminders.
|
|
1396
|
+
*
|
|
1397
|
+
* @param args - Optional parameters including task ID filter and pagination.
|
|
1398
|
+
* @returns A promise that resolves to a paginated list of reminders.
|
|
1399
|
+
*/
|
|
1400
|
+
async getReminders(args = {}) {
|
|
1401
|
+
const { data: { results, nextCursor }, } = await (0, http_client_1.request)({
|
|
1402
|
+
httpMethod: 'GET',
|
|
1403
|
+
baseUri: this.syncApiBase,
|
|
1404
|
+
relativePath: endpoints_1.ENDPOINT_REST_REMINDERS,
|
|
1405
|
+
apiToken: this.authToken,
|
|
1406
|
+
customFetch: this.customFetch,
|
|
1407
|
+
payload: args,
|
|
1408
|
+
});
|
|
1409
|
+
return {
|
|
1410
|
+
results: (0, validators_1.validateReminderArray)(results),
|
|
1411
|
+
nextCursor,
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Retrieves a paginated list of location-based reminders.
|
|
1416
|
+
*
|
|
1417
|
+
* @param args - Optional parameters including task ID filter and pagination.
|
|
1418
|
+
* @returns A promise that resolves to a paginated list of location reminders.
|
|
1419
|
+
*/
|
|
1420
|
+
async getLocationReminders(args = {}) {
|
|
1421
|
+
const { data: { results, nextCursor }, } = await (0, http_client_1.request)({
|
|
1422
|
+
httpMethod: 'GET',
|
|
1423
|
+
baseUri: this.syncApiBase,
|
|
1424
|
+
relativePath: endpoints_1.ENDPOINT_REST_LOCATION_REMINDERS,
|
|
1425
|
+
apiToken: this.authToken,
|
|
1426
|
+
customFetch: this.customFetch,
|
|
1427
|
+
payload: args,
|
|
1428
|
+
});
|
|
1429
|
+
return {
|
|
1430
|
+
results: (0, validators_1.validateLocationReminderArray)(results),
|
|
1431
|
+
nextCursor,
|
|
1432
|
+
};
|
|
1433
|
+
}
|
|
1259
1434
|
/**
|
|
1260
1435
|
* Retrieves a time-based reminder by its ID.
|
|
1261
1436
|
*
|
|
@@ -1669,6 +1844,246 @@ class TodoistApi {
|
|
|
1669
1844
|
arrayBuffer: () => response.arrayBuffer(),
|
|
1670
1845
|
};
|
|
1671
1846
|
}
|
|
1847
|
+
// ── Backups ──
|
|
1848
|
+
/**
|
|
1849
|
+
* Retrieves a list of available backups.
|
|
1850
|
+
*
|
|
1851
|
+
* @param args - Optional parameters including MFA token.
|
|
1852
|
+
* @returns A promise that resolves to an array of backups.
|
|
1853
|
+
*/
|
|
1854
|
+
async getBackups(args = {}) {
|
|
1855
|
+
const response = await (0, http_client_1.request)({
|
|
1856
|
+
httpMethod: 'GET',
|
|
1857
|
+
baseUri: this.syncApiBase,
|
|
1858
|
+
relativePath: endpoints_1.ENDPOINT_REST_BACKUPS,
|
|
1859
|
+
apiToken: this.authToken,
|
|
1860
|
+
customFetch: this.customFetch,
|
|
1861
|
+
payload: args,
|
|
1862
|
+
});
|
|
1863
|
+
return (0, validators_1.validateBackupArray)(response.data);
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* Downloads a backup file as binary data.
|
|
1867
|
+
*
|
|
1868
|
+
* @param args - Arguments including the backup file URL (from getBackups).
|
|
1869
|
+
* @returns A promise that resolves to a response with binary data accessible via arrayBuffer().
|
|
1870
|
+
*/
|
|
1871
|
+
async downloadBackup(args) {
|
|
1872
|
+
const url = `${this.syncApiBase}${endpoints_1.ENDPOINT_REST_BACKUPS_DOWNLOAD}?file=${encodeURIComponent(args.file)}`;
|
|
1873
|
+
const fetchOptions = {
|
|
1874
|
+
headers: { Authorization: `Bearer ${this.authToken}` },
|
|
1875
|
+
};
|
|
1876
|
+
if (this.customFetch) {
|
|
1877
|
+
const response = await this.customFetch(url, fetchOptions);
|
|
1878
|
+
if (!response.ok) {
|
|
1879
|
+
throw new Error(`Failed to download backup: ${response.status} ${response.statusText}`);
|
|
1880
|
+
}
|
|
1881
|
+
const text = await response.text();
|
|
1882
|
+
const buffer = new TextEncoder().encode(text).buffer;
|
|
1883
|
+
return {
|
|
1884
|
+
ok: response.ok,
|
|
1885
|
+
status: response.status,
|
|
1886
|
+
statusText: response.statusText,
|
|
1887
|
+
headers: response.headers,
|
|
1888
|
+
text: () => Promise.resolve(text),
|
|
1889
|
+
json: () => response.json(),
|
|
1890
|
+
arrayBuffer: () => Promise.resolve(buffer),
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
const response = await fetch(url, fetchOptions);
|
|
1894
|
+
if (!response.ok) {
|
|
1895
|
+
throw new Error(`Failed to download backup: ${response.status} ${response.statusText}`);
|
|
1896
|
+
}
|
|
1897
|
+
return {
|
|
1898
|
+
ok: response.ok,
|
|
1899
|
+
status: response.status,
|
|
1900
|
+
statusText: response.statusText,
|
|
1901
|
+
headers: headersToRecord(response.headers),
|
|
1902
|
+
text: () => response.text(),
|
|
1903
|
+
json: () => response.json(),
|
|
1904
|
+
arrayBuffer: () => response.arrayBuffer(),
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
// ── Emails ──
|
|
1908
|
+
/**
|
|
1909
|
+
* Gets or creates an email forwarding address for an object.
|
|
1910
|
+
*
|
|
1911
|
+
* @param args - Arguments including object type and ID.
|
|
1912
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1913
|
+
* @returns A promise that resolves to the email address.
|
|
1914
|
+
*/
|
|
1915
|
+
async getOrCreateEmailForwarding(args, requestId) {
|
|
1916
|
+
const { data } = await (0, http_client_1.request)({
|
|
1917
|
+
httpMethod: 'PUT',
|
|
1918
|
+
baseUri: this.syncApiBase,
|
|
1919
|
+
relativePath: endpoints_1.ENDPOINT_REST_EMAILS,
|
|
1920
|
+
apiToken: this.authToken,
|
|
1921
|
+
customFetch: this.customFetch,
|
|
1922
|
+
payload: args,
|
|
1923
|
+
requestId: requestId,
|
|
1924
|
+
});
|
|
1925
|
+
return data;
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* Disables email forwarding for an object.
|
|
1929
|
+
*
|
|
1930
|
+
* @param args - Arguments including object type and ID.
|
|
1931
|
+
* @param requestId - Optional custom identifier for the request.
|
|
1932
|
+
* @returns A promise that resolves to `true` if successful.
|
|
1933
|
+
*/
|
|
1934
|
+
async disableEmailForwarding(args, requestId) {
|
|
1935
|
+
const queryParams = new URLSearchParams({
|
|
1936
|
+
obj_type: args.objType,
|
|
1937
|
+
obj_id: args.objId,
|
|
1938
|
+
});
|
|
1939
|
+
const response = await (0, http_client_1.request)({
|
|
1940
|
+
httpMethod: 'DELETE',
|
|
1941
|
+
baseUri: this.syncApiBase,
|
|
1942
|
+
relativePath: `${endpoints_1.ENDPOINT_REST_EMAILS}?${queryParams.toString()}`,
|
|
1943
|
+
apiToken: this.authToken,
|
|
1944
|
+
customFetch: this.customFetch,
|
|
1945
|
+
requestId: requestId,
|
|
1946
|
+
});
|
|
1947
|
+
return (0, http_client_1.isSuccess)(response);
|
|
1948
|
+
}
|
|
1949
|
+
// ── ID Mappings ──
|
|
1950
|
+
/**
|
|
1951
|
+
* Retrieves ID mappings between old and new IDs.
|
|
1952
|
+
*
|
|
1953
|
+
* @param args - Arguments including object type and IDs to look up.
|
|
1954
|
+
* @returns A promise that resolves to an array of ID mappings.
|
|
1955
|
+
*/
|
|
1956
|
+
async getIdMappings(args) {
|
|
1957
|
+
const response = await (0, http_client_1.request)({
|
|
1958
|
+
httpMethod: 'GET',
|
|
1959
|
+
baseUri: this.syncApiBase,
|
|
1960
|
+
relativePath: generatePath(endpoints_1.ENDPOINT_REST_ID_MAPPINGS, args.objName, args.objIds.join(',')),
|
|
1961
|
+
apiToken: this.authToken,
|
|
1962
|
+
customFetch: this.customFetch,
|
|
1963
|
+
});
|
|
1964
|
+
return (0, validators_1.validateIdMappingArray)(response.data);
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Retrieves moved IDs for objects that have been migrated.
|
|
1968
|
+
*
|
|
1969
|
+
* @param args - Arguments including object type and optional old IDs to look up.
|
|
1970
|
+
* @returns A promise that resolves to an array of moved ID pairs.
|
|
1971
|
+
*/
|
|
1972
|
+
async getMovedIds(args) {
|
|
1973
|
+
const response = await (0, http_client_1.request)({
|
|
1974
|
+
httpMethod: 'GET',
|
|
1975
|
+
baseUri: this.syncApiBase,
|
|
1976
|
+
relativePath: generatePath(endpoints_1.ENDPOINT_REST_MOVED_IDS, args.objName),
|
|
1977
|
+
apiToken: this.authToken,
|
|
1978
|
+
customFetch: this.customFetch,
|
|
1979
|
+
payload: args.oldIds ? { oldIds: args.oldIds.join(',') } : undefined,
|
|
1980
|
+
});
|
|
1981
|
+
return (0, validators_1.validateMovedIdArray)(response.data);
|
|
1982
|
+
}
|
|
1983
|
+
// ── Templates ──
|
|
1984
|
+
/**
|
|
1985
|
+
* Exports a project as a template file (CSV format).
|
|
1986
|
+
*
|
|
1987
|
+
* @param args - Arguments including project ID and optional date format preference.
|
|
1988
|
+
* @returns A promise that resolves to the template file content as a string.
|
|
1989
|
+
*/
|
|
1990
|
+
async exportTemplateAsFile(args) {
|
|
1991
|
+
const response = await (0, http_client_1.request)({
|
|
1992
|
+
httpMethod: 'GET',
|
|
1993
|
+
baseUri: this.syncApiBase,
|
|
1994
|
+
relativePath: endpoints_1.ENDPOINT_REST_TEMPLATES_FILE,
|
|
1995
|
+
apiToken: this.authToken,
|
|
1996
|
+
customFetch: this.customFetch,
|
|
1997
|
+
payload: args,
|
|
1998
|
+
});
|
|
1999
|
+
return response.data;
|
|
2000
|
+
}
|
|
2001
|
+
/**
|
|
2002
|
+
* Exports a project as a template URL.
|
|
2003
|
+
*
|
|
2004
|
+
* @param args - Arguments including project ID and optional date format preference.
|
|
2005
|
+
* @returns A promise that resolves to the file name and URL.
|
|
2006
|
+
*/
|
|
2007
|
+
async exportTemplateAsUrl(args) {
|
|
2008
|
+
const { data } = await (0, http_client_1.request)({
|
|
2009
|
+
httpMethod: 'GET',
|
|
2010
|
+
baseUri: this.syncApiBase,
|
|
2011
|
+
relativePath: endpoints_1.ENDPOINT_REST_TEMPLATES_URL,
|
|
2012
|
+
apiToken: this.authToken,
|
|
2013
|
+
customFetch: this.customFetch,
|
|
2014
|
+
payload: args,
|
|
2015
|
+
});
|
|
2016
|
+
return data;
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Creates a new project from a template file.
|
|
2020
|
+
*
|
|
2021
|
+
* @param args - Arguments including project name, template file, and optional workspace ID.
|
|
2022
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2023
|
+
* @returns A promise that resolves to the created project data.
|
|
2024
|
+
*/
|
|
2025
|
+
async createProjectFromTemplate(args, requestId) {
|
|
2026
|
+
const { file, fileName, name, workspaceId } = args;
|
|
2027
|
+
const additionalFields = { name };
|
|
2028
|
+
if (workspaceId !== undefined && workspaceId !== null) {
|
|
2029
|
+
additionalFields.workspace_id = workspaceId;
|
|
2030
|
+
}
|
|
2031
|
+
const data = await (0, multipart_upload_1.uploadMultipartFile)({
|
|
2032
|
+
baseUrl: this.syncApiBase,
|
|
2033
|
+
authToken: this.authToken,
|
|
2034
|
+
endpoint: endpoints_1.ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE,
|
|
2035
|
+
file,
|
|
2036
|
+
fileName,
|
|
2037
|
+
additionalFields,
|
|
2038
|
+
customFetch: this.customFetch,
|
|
2039
|
+
requestId,
|
|
2040
|
+
});
|
|
2041
|
+
return this.validateTemplateResponse((0, case_conversion_1.camelCaseKeys)(data));
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Imports a template file into an existing project.
|
|
2045
|
+
*
|
|
2046
|
+
* @param args - Arguments including project ID and template file.
|
|
2047
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2048
|
+
* @returns A promise that resolves to the import result.
|
|
2049
|
+
*/
|
|
2050
|
+
async importTemplateIntoProject(args, requestId) {
|
|
2051
|
+
const { file, fileName, projectId } = args;
|
|
2052
|
+
const data = await (0, multipart_upload_1.uploadMultipartFile)({
|
|
2053
|
+
baseUrl: this.syncApiBase,
|
|
2054
|
+
authToken: this.authToken,
|
|
2055
|
+
endpoint: endpoints_1.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE,
|
|
2056
|
+
file,
|
|
2057
|
+
fileName,
|
|
2058
|
+
additionalFields: { project_id: projectId },
|
|
2059
|
+
customFetch: this.customFetch,
|
|
2060
|
+
requestId,
|
|
2061
|
+
});
|
|
2062
|
+
return this.validateTemplateResponse((0, case_conversion_1.camelCaseKeys)(data));
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* Imports a template by ID into an existing project.
|
|
2066
|
+
*
|
|
2067
|
+
* @param args - Arguments including project ID, template ID, and optional locale.
|
|
2068
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2069
|
+
* @returns A promise that resolves to the import result.
|
|
2070
|
+
*/
|
|
2071
|
+
async importTemplateFromId(args, requestId) {
|
|
2072
|
+
const { data } = await (0, http_client_1.request)({
|
|
2073
|
+
httpMethod: 'POST',
|
|
2074
|
+
baseUri: this.syncApiBase,
|
|
2075
|
+
relativePath: endpoints_1.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID,
|
|
2076
|
+
apiToken: this.authToken,
|
|
2077
|
+
customFetch: this.customFetch,
|
|
2078
|
+
payload: args,
|
|
2079
|
+
requestId: requestId,
|
|
2080
|
+
});
|
|
2081
|
+
return this.validateTemplateResponse(data);
|
|
2082
|
+
}
|
|
2083
|
+
validateTemplateResponse(data) {
|
|
2084
|
+
var _a, _b, _c, _d;
|
|
2085
|
+
return Object.assign(Object.assign({}, data), { projects: (0, validators_1.validateProjectArray)((_a = data.projects) !== null && _a !== void 0 ? _a : []), sections: (0, validators_1.validateSectionArray)((_b = data.sections) !== null && _b !== void 0 ? _b : []), tasks: (0, validators_1.validateTaskArray)((_c = data.tasks) !== null && _c !== void 0 ? _c : []), comments: (0, validators_1.validateCommentArray)((_d = data.comments) !== null && _d !== void 0 ? _d : []) });
|
|
2086
|
+
}
|
|
1672
2087
|
/* Workspace methods */
|
|
1673
2088
|
/**
|
|
1674
2089
|
* Gets pending invitations for a workspace.
|
|
@@ -1993,6 +2408,109 @@ class TodoistApi {
|
|
|
1993
2408
|
});
|
|
1994
2409
|
return (0, http_client_1.isSuccess)(response);
|
|
1995
2410
|
}
|
|
2411
|
+
/**
|
|
2412
|
+
* Retrieves activity information for workspace members.
|
|
2413
|
+
*
|
|
2414
|
+
* @param args - Arguments including workspace ID and optional user/project filters.
|
|
2415
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2416
|
+
* @returns A promise that resolves to workspace members activity data.
|
|
2417
|
+
*/
|
|
2418
|
+
async getWorkspaceMembersActivity(args, requestId) {
|
|
2419
|
+
const { workspaceId } = args, queryParams = __rest(args, ["workspaceId"]);
|
|
2420
|
+
const { data } = await (0, http_client_1.request)({
|
|
2421
|
+
httpMethod: 'GET',
|
|
2422
|
+
baseUri: this.syncApiBase,
|
|
2423
|
+
relativePath: endpoints_1.ENDPOINT_WORKSPACE_MEMBERS,
|
|
2424
|
+
apiToken: this.authToken,
|
|
2425
|
+
customFetch: this.customFetch,
|
|
2426
|
+
payload: Object.assign({ workspaceId }, queryParams),
|
|
2427
|
+
requestId: requestId,
|
|
2428
|
+
});
|
|
2429
|
+
return {
|
|
2430
|
+
members: (0, validators_1.validateMemberActivityInfoArray)(data.members),
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2433
|
+
/**
|
|
2434
|
+
* Retrieves tasks assigned to a specific user in a workspace.
|
|
2435
|
+
*
|
|
2436
|
+
* @param args - Arguments including workspace ID, user ID, and optional project filter.
|
|
2437
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2438
|
+
* @returns A promise that resolves to workspace user tasks.
|
|
2439
|
+
*/
|
|
2440
|
+
async getWorkspaceUserTasks(args, requestId) {
|
|
2441
|
+
const { workspaceId, userId } = args, queryParams = __rest(args, ["workspaceId", "userId"]);
|
|
2442
|
+
const { data } = await (0, http_client_1.request)({
|
|
2443
|
+
httpMethod: 'GET',
|
|
2444
|
+
baseUri: this.syncApiBase,
|
|
2445
|
+
relativePath: (0, endpoints_1.getWorkspaceUserTasksEndpoint)(workspaceId, userId),
|
|
2446
|
+
apiToken: this.authToken,
|
|
2447
|
+
customFetch: this.customFetch,
|
|
2448
|
+
payload: queryParams,
|
|
2449
|
+
requestId: requestId,
|
|
2450
|
+
});
|
|
2451
|
+
return {
|
|
2452
|
+
tasks: (0, validators_1.validateWorkspaceUserTaskArray)(data.tasks),
|
|
2453
|
+
};
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Invites users to a workspace by email.
|
|
2457
|
+
*
|
|
2458
|
+
* @param args - Arguments including workspace ID, email list, and optional role.
|
|
2459
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2460
|
+
* @returns A promise that resolves to the list of invited emails.
|
|
2461
|
+
*/
|
|
2462
|
+
async inviteWorkspaceUsers(args, requestId) {
|
|
2463
|
+
const { workspaceId } = args, payload = __rest(args, ["workspaceId"]);
|
|
2464
|
+
const { data } = await (0, http_client_1.request)({
|
|
2465
|
+
httpMethod: 'POST',
|
|
2466
|
+
baseUri: this.syncApiBase,
|
|
2467
|
+
relativePath: (0, endpoints_1.getWorkspaceInviteUsersEndpoint)(workspaceId),
|
|
2468
|
+
apiToken: this.authToken,
|
|
2469
|
+
customFetch: this.customFetch,
|
|
2470
|
+
payload: payload,
|
|
2471
|
+
requestId: requestId,
|
|
2472
|
+
});
|
|
2473
|
+
return data;
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Updates a workspace user's role.
|
|
2477
|
+
*
|
|
2478
|
+
* @param args - Arguments including workspace ID, user ID, and new role.
|
|
2479
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2480
|
+
* @returns A promise that resolves to the updated workspace user view.
|
|
2481
|
+
*/
|
|
2482
|
+
async updateWorkspaceUser(args, requestId) {
|
|
2483
|
+
const { workspaceId, userId } = args, payload = __rest(args, ["workspaceId", "userId"]);
|
|
2484
|
+
const response = await (0, http_client_1.request)({
|
|
2485
|
+
httpMethod: 'POST',
|
|
2486
|
+
baseUri: this.syncApiBase,
|
|
2487
|
+
relativePath: (0, endpoints_1.getWorkspaceUserEndpoint)(workspaceId, userId),
|
|
2488
|
+
apiToken: this.authToken,
|
|
2489
|
+
customFetch: this.customFetch,
|
|
2490
|
+
payload: payload,
|
|
2491
|
+
requestId: requestId,
|
|
2492
|
+
});
|
|
2493
|
+
return (0, validators_1.validateJoinWorkspaceResult)(response.data);
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
* Removes a user from a workspace.
|
|
2497
|
+
*
|
|
2498
|
+
* @param args - Arguments including workspace ID and user ID.
|
|
2499
|
+
* @param requestId - Optional custom identifier for the request.
|
|
2500
|
+
* @returns A promise that resolves to `true` if successful.
|
|
2501
|
+
*/
|
|
2502
|
+
async removeWorkspaceUser(args, requestId) {
|
|
2503
|
+
const { workspaceId, userId } = args;
|
|
2504
|
+
const response = await (0, http_client_1.request)({
|
|
2505
|
+
httpMethod: 'DELETE',
|
|
2506
|
+
baseUri: this.syncApiBase,
|
|
2507
|
+
relativePath: (0, endpoints_1.getWorkspaceUserEndpoint)(workspaceId, userId),
|
|
2508
|
+
apiToken: this.authToken,
|
|
2509
|
+
customFetch: this.customFetch,
|
|
2510
|
+
requestId: requestId,
|
|
2511
|
+
});
|
|
2512
|
+
return (0, http_client_1.isSuccess)(response);
|
|
2513
|
+
}
|
|
1996
2514
|
/**
|
|
1997
2515
|
* Gets active projects in a workspace with pagination.
|
|
1998
2516
|
*
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityEventSchema = exports.ActivityEventExtraDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Flexible object containing event-specific data.
|
|
7
|
+
* Uses z.record to accept any properties for forward compatibility.
|
|
8
|
+
*/
|
|
9
|
+
exports.ActivityEventExtraDataSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable();
|
|
10
|
+
/**
|
|
11
|
+
* Activity log event schema. Accepts unknown fields for forward compatibility.
|
|
12
|
+
*/
|
|
13
|
+
exports.ActivityEventSchema = zod_1.z
|
|
14
|
+
.object({
|
|
15
|
+
objectType: zod_1.z.string(),
|
|
16
|
+
objectId: zod_1.z.string(),
|
|
17
|
+
eventType: zod_1.z.string(),
|
|
18
|
+
eventDate: zod_1.z.string(),
|
|
19
|
+
id: zod_1.z
|
|
20
|
+
.union([zod_1.z.string(), zod_1.z.number()])
|
|
21
|
+
.transform((val) => { var _a; return (_a = val === null || val === void 0 ? void 0 : val.toString()) !== null && _a !== void 0 ? _a : null; })
|
|
22
|
+
.nullable(),
|
|
23
|
+
parentProjectId: zod_1.z.string().nullable(),
|
|
24
|
+
parentItemId: zod_1.z.string().nullable(),
|
|
25
|
+
initiatorId: zod_1.z.string().nullable(),
|
|
26
|
+
extraData: exports.ActivityEventExtraDataSchema,
|
|
27
|
+
})
|
|
28
|
+
.catchall(zod_1.z.any());
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|