@doist/todoist-sdk 9.1.0-next.2 → 9.1.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 +1 -0
- package/dist/cjs/clients/app-client.js +347 -0
- package/dist/cjs/clients/base-client.js +1 -0
- package/dist/cjs/clients/ui-extension-client.js +109 -0
- package/dist/cjs/consts/endpoints.js +70 -6
- package/dist/cjs/test-utils/test-defaults.js +75 -23
- package/dist/cjs/todoist-api.js +269 -33
- package/dist/cjs/transport/http-client.js +1 -0
- package/dist/cjs/types/apps/types.js +253 -0
- package/dist/cjs/types/index.js +2 -1
- package/dist/cjs/types/sync/commands/index.js +0 -1
- package/dist/cjs/types/sync/resource-types.js +0 -1
- package/dist/cjs/types/sync/response.js +10 -12
- package/dist/cjs/types/ui-extensions/index.js +18 -0
- package/dist/cjs/types/ui-extensions/types.js +77 -0
- package/dist/cjs/utils/validators.js +45 -33
- package/dist/esm/authentication.js +1 -0
- package/dist/esm/clients/app-client.js +343 -0
- package/dist/esm/clients/base-client.js +1 -0
- package/dist/esm/clients/ui-extension-client.js +105 -0
- package/dist/esm/consts/endpoints.js +54 -5
- package/dist/esm/test-utils/test-defaults.js +73 -22
- package/dist/esm/todoist-api.js +269 -33
- package/dist/esm/transport/http-client.js +1 -0
- package/dist/esm/types/apps/types.js +248 -0
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/sync/commands/index.js +0 -1
- package/dist/esm/types/sync/resource-types.js +0 -1
- package/dist/esm/types/sync/response.js +0 -2
- package/dist/esm/types/ui-extensions/types.js +74 -0
- package/dist/esm/utils/validators.js +14 -2
- package/dist/types/authentication.d.ts +1 -1
- package/dist/types/clients/app-client.d.ts +37 -0
- package/dist/types/clients/base-client.d.ts +1 -0
- package/dist/types/clients/ui-extension-client.d.ts +18 -0
- package/dist/types/consts/endpoints.d.ts +25 -5
- package/dist/types/test-utils/test-defaults.d.ts +16 -4
- package/dist/types/todoist-api.d.ts +202 -12
- package/dist/types/types/apps/index.d.ts +2 -0
- package/dist/types/types/apps/requests.d.ts +89 -0
- package/dist/types/types/apps/types.d.ts +414 -0
- package/dist/types/types/http.d.ts +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/sync/commands/index.d.ts +0 -9
- package/dist/types/types/sync/resource-types.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 +6 -6
- package/dist/types/types/sync/response.d.ts +6 -31
- package/dist/types/types/sync/user-preferences.d.ts +1 -1
- package/dist/types/types/tasks/requests.d.ts +0 -1
- package/dist/types/types/ui-extensions/index.d.ts +2 -0
- package/dist/types/types/ui-extensions/requests.d.ts +108 -0
- package/dist/types/types/ui-extensions/types.d.ts +185 -0
- package/dist/types/utils/validators.d.ts +231 -55
- package/package.json +1 -1
- package/dist/cjs/clients/goals-client.js +0 -145
- package/dist/cjs/types/goals/types.js +0 -56
- package/dist/esm/clients/goals-client.js +0 -141
- package/dist/esm/types/goals/types.js +0 -53
- package/dist/types/clients/goals-client.d.ts +0 -20
- package/dist/types/types/goals/requests.d.ts +0 -33
- package/dist/types/types/goals/types.d.ts +0 -51
- package/dist/types/types/sync/commands/goals.d.ts +0 -33
- /package/dist/cjs/types/{goals → apps}/index.js +0 -0
- /package/dist/cjs/types/{goals → apps}/requests.js +0 -0
- /package/dist/cjs/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
- /package/dist/esm/types/{goals → apps}/index.js +0 -0
- /package/dist/esm/types/{goals → apps}/requests.js +0 -0
- /package/dist/{types/types/goals/index.d.ts → esm/types/ui-extensions/index.js} +0 -0
- /package/dist/esm/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Available statuses for a developer application.
|
|
4
|
+
*/
|
|
5
|
+
export declare const APP_STATUSES: readonly ["public"];
|
|
6
|
+
/**
|
|
7
|
+
* Status of a developer application.
|
|
8
|
+
*/
|
|
9
|
+
export type AppStatus = (typeof APP_STATUSES)[number];
|
|
10
|
+
export declare const AppStatusSchema: z.ZodEnum<{
|
|
11
|
+
public: "public";
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Webhook event types that can be subscribed to.
|
|
15
|
+
*
|
|
16
|
+
* These are the friendly public names the backend uses in webhook payloads.
|
|
17
|
+
* The on-the-wire config endpoint uses a different (legacy) form (see
|
|
18
|
+
* {@link WEBHOOK_EVENT_WIRE_NAMES}); the SDK converts between the two
|
|
19
|
+
* so consumers only ever work with these pretty names.
|
|
20
|
+
*
|
|
21
|
+
* @see https://developer.todoist.com/sync/v1/#webhooks
|
|
22
|
+
*/
|
|
23
|
+
export declare const WEBHOOK_EVENTS: readonly ["item:added", "item:updated", "item:completed", "item:uncompleted", "item:deleted", "note:added", "note:updated", "note:deleted", "project:added", "project:updated", "project:deleted", "project:archived", "project:unarchived", "section:added", "section:updated", "section:deleted", "section:archived", "section:unarchived", "label:added", "label:updated", "label:deleted", "filter:added", "filter:updated", "filter:deleted", "reminder:fired"];
|
|
24
|
+
/**
|
|
25
|
+
* A webhook event that can be subscribed to.
|
|
26
|
+
*/
|
|
27
|
+
export type WebhookEvent = (typeof WEBHOOK_EVENTS)[number];
|
|
28
|
+
export declare const WebhookEventSchema: z.ZodEnum<{
|
|
29
|
+
"project:added": "project:added";
|
|
30
|
+
"project:updated": "project:updated";
|
|
31
|
+
"project:deleted": "project:deleted";
|
|
32
|
+
"project:archived": "project:archived";
|
|
33
|
+
"project:unarchived": "project:unarchived";
|
|
34
|
+
"item:added": "item:added";
|
|
35
|
+
"item:updated": "item:updated";
|
|
36
|
+
"item:completed": "item:completed";
|
|
37
|
+
"item:uncompleted": "item:uncompleted";
|
|
38
|
+
"item:deleted": "item:deleted";
|
|
39
|
+
"note:added": "note:added";
|
|
40
|
+
"note:updated": "note:updated";
|
|
41
|
+
"note:deleted": "note:deleted";
|
|
42
|
+
"section:added": "section:added";
|
|
43
|
+
"section:updated": "section:updated";
|
|
44
|
+
"section:deleted": "section:deleted";
|
|
45
|
+
"section:archived": "section:archived";
|
|
46
|
+
"section:unarchived": "section:unarchived";
|
|
47
|
+
"label:added": "label:added";
|
|
48
|
+
"label:updated": "label:updated";
|
|
49
|
+
"label:deleted": "label:deleted";
|
|
50
|
+
"filter:added": "filter:added";
|
|
51
|
+
"filter:updated": "filter:updated";
|
|
52
|
+
"filter:deleted": "filter:deleted";
|
|
53
|
+
"reminder:fired": "reminder:fired";
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Raw wire-format webhook event names used by the config endpoint
|
|
57
|
+
* (`POST/GET /apps/<id>/webhook`). Exported for completeness — prefer
|
|
58
|
+
* {@link WEBHOOK_EVENTS} when working with the SDK.
|
|
59
|
+
*/
|
|
60
|
+
export declare const WEBHOOK_EVENT_WIRE_NAMES: readonly ["e_item_added", "e_item_updated", "e_item_completed", "e_item_uncompleted", "e_item_deleted", "e_note_added", "e_note_updated", "e_note_deleted", "e_project_added", "e_project_updated", "e_project_deleted", "e_project_archived", "e_project_unarchived", "e_section_added", "e_section_updated", "e_section_deleted", "e_section_archived", "e_section_unarchived", "e_label_added", "e_label_updated", "e_label_deleted", "e_filter_added", "e_filter_updated", "e_filter_deleted", "e_reminder_fired"];
|
|
61
|
+
/**
|
|
62
|
+
* Wire-format webhook event name (the `e_*` form).
|
|
63
|
+
*/
|
|
64
|
+
export type WebhookEventWireName = (typeof WEBHOOK_EVENT_WIRE_NAMES)[number];
|
|
65
|
+
export declare const WebhookEventWireNameSchema: z.ZodEnum<{
|
|
66
|
+
e_item_added: "e_item_added";
|
|
67
|
+
e_item_updated: "e_item_updated";
|
|
68
|
+
e_item_completed: "e_item_completed";
|
|
69
|
+
e_item_uncompleted: "e_item_uncompleted";
|
|
70
|
+
e_item_deleted: "e_item_deleted";
|
|
71
|
+
e_note_added: "e_note_added";
|
|
72
|
+
e_note_updated: "e_note_updated";
|
|
73
|
+
e_note_deleted: "e_note_deleted";
|
|
74
|
+
e_project_added: "e_project_added";
|
|
75
|
+
e_project_updated: "e_project_updated";
|
|
76
|
+
e_project_deleted: "e_project_deleted";
|
|
77
|
+
e_project_archived: "e_project_archived";
|
|
78
|
+
e_project_unarchived: "e_project_unarchived";
|
|
79
|
+
e_section_added: "e_section_added";
|
|
80
|
+
e_section_updated: "e_section_updated";
|
|
81
|
+
e_section_deleted: "e_section_deleted";
|
|
82
|
+
e_section_archived: "e_section_archived";
|
|
83
|
+
e_section_unarchived: "e_section_unarchived";
|
|
84
|
+
e_label_added: "e_label_added";
|
|
85
|
+
e_label_updated: "e_label_updated";
|
|
86
|
+
e_label_deleted: "e_label_deleted";
|
|
87
|
+
e_filter_added: "e_filter_added";
|
|
88
|
+
e_filter_updated: "e_filter_updated";
|
|
89
|
+
e_filter_deleted: "e_filter_deleted";
|
|
90
|
+
e_reminder_fired: "e_reminder_fired";
|
|
91
|
+
}>;
|
|
92
|
+
/**
|
|
93
|
+
* Translates a wire-format event name (`'e_item_added'`) to its pretty form (`'item:added'`).
|
|
94
|
+
*/
|
|
95
|
+
export declare function webhookEventFromWireName(wireName: WebhookEventWireName): WebhookEvent;
|
|
96
|
+
/**
|
|
97
|
+
* Translates a pretty event name (`'item:added'`) to its wire-format form (`'e_item_added'`).
|
|
98
|
+
*/
|
|
99
|
+
export declare function webhookEventToWireName(event: WebhookEvent): WebhookEventWireName;
|
|
100
|
+
/**
|
|
101
|
+
* Available statuses for an app webhook.
|
|
102
|
+
*/
|
|
103
|
+
export declare const WEBHOOK_STATUSES: readonly ["active", "invalid"];
|
|
104
|
+
/**
|
|
105
|
+
* Delivery status of an app webhook.
|
|
106
|
+
*/
|
|
107
|
+
export type WebhookStatus = (typeof WEBHOOK_STATUSES)[number];
|
|
108
|
+
export declare const WebhookStatusSchema: z.ZodEnum<{
|
|
109
|
+
active: "active";
|
|
110
|
+
invalid: "invalid";
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Supported webhook payload versions. v9 is deprecated and intentionally excluded.
|
|
114
|
+
*/
|
|
115
|
+
export declare const WEBHOOK_VERSIONS: readonly ["1"];
|
|
116
|
+
/**
|
|
117
|
+
* Webhook payload version.
|
|
118
|
+
*/
|
|
119
|
+
export type WebhookVersion = (typeof WEBHOOK_VERSIONS)[number];
|
|
120
|
+
export declare const WebhookVersionSchema: z.ZodEnum<{
|
|
121
|
+
1: "1";
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Available installation types for an app installation.
|
|
125
|
+
*/
|
|
126
|
+
export declare const INSTALLATION_TYPES: readonly ["user"];
|
|
127
|
+
/**
|
|
128
|
+
* Scope of an app installation.
|
|
129
|
+
*/
|
|
130
|
+
export type InstallationType = (typeof INSTALLATION_TYPES)[number];
|
|
131
|
+
export declare const InstallationTypeSchema: z.ZodEnum<{
|
|
132
|
+
user: "user";
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* Transforms a comma-separated scope string into `string[] | null`.
|
|
136
|
+
*
|
|
137
|
+
* The backend stores `app_token_scopes` as a single comma-separated string
|
|
138
|
+
* (e.g. `"data:read,task:add"`). Reads are exposed as `string[]` (rather than
|
|
139
|
+
* `Permission[]`) so that newly added backend scopes don't break parsing —
|
|
140
|
+
* writes accept `Permission` for autocomplete while still permitting `string`
|
|
141
|
+
* (via `UpdateAppArgs`), so a fetched `App.appTokenScopes` can be round-tripped
|
|
142
|
+
* back into `updateApp()` without casts.
|
|
143
|
+
*
|
|
144
|
+
* Preserves `null` on read (backend returns `null` for apps that have had
|
|
145
|
+
* their scopes cleared via `updateApp({ appTokenScopes: null })`) so the
|
|
146
|
+
* read and write shapes line up and information is not lost.
|
|
147
|
+
*/
|
|
148
|
+
export declare const AppTokenScopesSchema: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
149
|
+
/**
|
|
150
|
+
* Schema for a developer application.
|
|
151
|
+
* @see https://developer.todoist.com/api/v1/#tag/Apps
|
|
152
|
+
*/
|
|
153
|
+
export declare const AppSchema: z.ZodObject<{
|
|
154
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
public: "public";
|
|
157
|
+
}>;
|
|
158
|
+
displayName: z.ZodString;
|
|
159
|
+
userId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
160
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
161
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
162
|
+
oauthRedirectUri: z.ZodNullable<z.ZodString>;
|
|
163
|
+
description: z.ZodNullable<z.ZodString>;
|
|
164
|
+
iconSm: z.ZodNullable<z.ZodString>;
|
|
165
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
166
|
+
iconLg: z.ZodNullable<z.ZodString>;
|
|
167
|
+
appTokenScopes: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
/**
|
|
170
|
+
* A developer application.
|
|
171
|
+
*/
|
|
172
|
+
export type App = z.infer<typeof AppSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* Schema for a developer application that includes the user count.
|
|
175
|
+
* Returned by most endpoints that manage a single app (get, update, delete).
|
|
176
|
+
*/
|
|
177
|
+
export declare const AppWithUserCountSchema: z.ZodObject<{
|
|
178
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
179
|
+
status: z.ZodEnum<{
|
|
180
|
+
public: "public";
|
|
181
|
+
}>;
|
|
182
|
+
displayName: z.ZodString;
|
|
183
|
+
userId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
184
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
185
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
186
|
+
oauthRedirectUri: z.ZodNullable<z.ZodString>;
|
|
187
|
+
description: z.ZodNullable<z.ZodString>;
|
|
188
|
+
iconSm: z.ZodNullable<z.ZodString>;
|
|
189
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
190
|
+
iconLg: z.ZodNullable<z.ZodString>;
|
|
191
|
+
appTokenScopes: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
192
|
+
userCount: z.ZodNumber;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
/**
|
|
195
|
+
* A developer application with authorized user count.
|
|
196
|
+
*/
|
|
197
|
+
export type AppWithUserCount = z.infer<typeof AppWithUserCountSchema>;
|
|
198
|
+
/**
|
|
199
|
+
* OAuth client credentials for a developer application.
|
|
200
|
+
*/
|
|
201
|
+
export declare const AppSecretsSchema: z.ZodObject<{
|
|
202
|
+
clientId: z.ZodString;
|
|
203
|
+
clientSecret: z.ZodString;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
/**
|
|
206
|
+
* OAuth client credentials for a developer application.
|
|
207
|
+
*/
|
|
208
|
+
export type AppSecrets = z.infer<typeof AppSecretsSchema>;
|
|
209
|
+
/**
|
|
210
|
+
* Webhook verification token for a developer application.
|
|
211
|
+
*/
|
|
212
|
+
export declare const AppVerificationTokenSchema: z.ZodObject<{
|
|
213
|
+
verificationToken: z.ZodString;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
/**
|
|
216
|
+
* Webhook verification token for a developer application.
|
|
217
|
+
*/
|
|
218
|
+
export type AppVerificationToken = z.infer<typeof AppVerificationTokenSchema>;
|
|
219
|
+
/**
|
|
220
|
+
* Developer test access token for a developer application.
|
|
221
|
+
*/
|
|
222
|
+
export declare const AppTestTokenSchema: z.ZodObject<{
|
|
223
|
+
accessToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
}, z.core.$strip>;
|
|
225
|
+
/**
|
|
226
|
+
* Developer test access token for a developer application.
|
|
227
|
+
*/
|
|
228
|
+
export type AppTestToken = z.infer<typeof AppTestTokenSchema>;
|
|
229
|
+
/**
|
|
230
|
+
* Distribution token for a developer application.
|
|
231
|
+
*/
|
|
232
|
+
export declare const AppDistributionTokenSchema: z.ZodObject<{
|
|
233
|
+
distributionToken: z.ZodString;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
/**
|
|
236
|
+
* Distribution token for a developer application.
|
|
237
|
+
*/
|
|
238
|
+
export type AppDistributionToken = z.infer<typeof AppDistributionTokenSchema>;
|
|
239
|
+
/**
|
|
240
|
+
* Subset of an app returned when resolving by distribution token — used by the installation flow.
|
|
241
|
+
* Includes a lightweight list of the app's UI extensions (not full `UIExtension` records).
|
|
242
|
+
*/
|
|
243
|
+
export declare const AppByDistributionTokenUiExtensionSchema: z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
description: z.ZodString;
|
|
246
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
247
|
+
extensionType: z.ZodEnum<{
|
|
248
|
+
"context-menu": "context-menu";
|
|
249
|
+
composer: "composer";
|
|
250
|
+
settings: "settings";
|
|
251
|
+
}>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
/**
|
|
254
|
+
* UI extension metadata returned by the `by_distribution_token` endpoint.
|
|
255
|
+
*/
|
|
256
|
+
export type AppByDistributionTokenUiExtension = z.infer<typeof AppByDistributionTokenUiExtensionSchema>;
|
|
257
|
+
export declare const AppByDistributionTokenSchema: z.ZodObject<{
|
|
258
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
259
|
+
displayName: z.ZodString;
|
|
260
|
+
description: z.ZodNullable<z.ZodString>;
|
|
261
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
262
|
+
appTokenScopes: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
263
|
+
uiExtensions: z.ZodArray<z.ZodObject<{
|
|
264
|
+
name: z.ZodString;
|
|
265
|
+
description: z.ZodString;
|
|
266
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
267
|
+
extensionType: z.ZodEnum<{
|
|
268
|
+
"context-menu": "context-menu";
|
|
269
|
+
composer: "composer";
|
|
270
|
+
settings: "settings";
|
|
271
|
+
}>;
|
|
272
|
+
}, z.core.$strip>>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
/**
|
|
275
|
+
* Public-facing app info resolved via distribution token — used during installation.
|
|
276
|
+
*/
|
|
277
|
+
export type AppByDistributionToken = z.infer<typeof AppByDistributionTokenSchema>;
|
|
278
|
+
/**
|
|
279
|
+
* Schema for an app webhook.
|
|
280
|
+
*
|
|
281
|
+
* Events arrive from the wire in their `e_*` form and are transformed to
|
|
282
|
+
* their pretty `item:added`-style names for SDK consumers.
|
|
283
|
+
*/
|
|
284
|
+
export declare const AppWebhookSchema: z.ZodObject<{
|
|
285
|
+
status: z.ZodEnum<{
|
|
286
|
+
active: "active";
|
|
287
|
+
invalid: "invalid";
|
|
288
|
+
}>;
|
|
289
|
+
callbackUrl: z.ZodString;
|
|
290
|
+
version: z.ZodEnum<{
|
|
291
|
+
1: "1";
|
|
292
|
+
}>;
|
|
293
|
+
events: z.ZodArray<z.ZodPipe<z.ZodEnum<{
|
|
294
|
+
e_item_added: "e_item_added";
|
|
295
|
+
e_item_updated: "e_item_updated";
|
|
296
|
+
e_item_completed: "e_item_completed";
|
|
297
|
+
e_item_uncompleted: "e_item_uncompleted";
|
|
298
|
+
e_item_deleted: "e_item_deleted";
|
|
299
|
+
e_note_added: "e_note_added";
|
|
300
|
+
e_note_updated: "e_note_updated";
|
|
301
|
+
e_note_deleted: "e_note_deleted";
|
|
302
|
+
e_project_added: "e_project_added";
|
|
303
|
+
e_project_updated: "e_project_updated";
|
|
304
|
+
e_project_deleted: "e_project_deleted";
|
|
305
|
+
e_project_archived: "e_project_archived";
|
|
306
|
+
e_project_unarchived: "e_project_unarchived";
|
|
307
|
+
e_section_added: "e_section_added";
|
|
308
|
+
e_section_updated: "e_section_updated";
|
|
309
|
+
e_section_deleted: "e_section_deleted";
|
|
310
|
+
e_section_archived: "e_section_archived";
|
|
311
|
+
e_section_unarchived: "e_section_unarchived";
|
|
312
|
+
e_label_added: "e_label_added";
|
|
313
|
+
e_label_updated: "e_label_updated";
|
|
314
|
+
e_label_deleted: "e_label_deleted";
|
|
315
|
+
e_filter_added: "e_filter_added";
|
|
316
|
+
e_filter_updated: "e_filter_updated";
|
|
317
|
+
e_filter_deleted: "e_filter_deleted";
|
|
318
|
+
e_reminder_fired: "e_reminder_fired";
|
|
319
|
+
}>, z.ZodTransform<"project:added" | "project:updated" | "project:deleted" | "project:archived" | "project:unarchived" | "item:added" | "item:updated" | "item:completed" | "item:uncompleted" | "item:deleted" | "note:added" | "note:updated" | "note:deleted" | "section:added" | "section:updated" | "section:deleted" | "section:archived" | "section:unarchived" | "label:added" | "label:updated" | "label:deleted" | "filter:added" | "filter:updated" | "filter:deleted" | "reminder:fired", "e_item_added" | "e_item_updated" | "e_item_completed" | "e_item_uncompleted" | "e_item_deleted" | "e_note_added" | "e_note_updated" | "e_note_deleted" | "e_project_added" | "e_project_updated" | "e_project_deleted" | "e_project_archived" | "e_project_unarchived" | "e_section_added" | "e_section_updated" | "e_section_deleted" | "e_section_archived" | "e_section_unarchived" | "e_label_added" | "e_label_updated" | "e_label_deleted" | "e_filter_added" | "e_filter_updated" | "e_filter_deleted" | "e_reminder_fired">>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
/**
|
|
322
|
+
* Webhook configuration for a developer application.
|
|
323
|
+
*/
|
|
324
|
+
export type AppWebhook = z.infer<typeof AppWebhookSchema>;
|
|
325
|
+
/**
|
|
326
|
+
* Lightweight view of an app embedded in an installation record.
|
|
327
|
+
* Mirrors `AppSchema` shape — backend returns the same `ApplicationRestView`.
|
|
328
|
+
*/
|
|
329
|
+
export declare const InstalledIntegrationSchema: z.ZodObject<{
|
|
330
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
331
|
+
status: z.ZodEnum<{
|
|
332
|
+
public: "public";
|
|
333
|
+
}>;
|
|
334
|
+
displayName: z.ZodString;
|
|
335
|
+
userId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
336
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
337
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
338
|
+
oauthRedirectUri: z.ZodNullable<z.ZodString>;
|
|
339
|
+
description: z.ZodNullable<z.ZodString>;
|
|
340
|
+
iconSm: z.ZodNullable<z.ZodString>;
|
|
341
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
342
|
+
iconLg: z.ZodNullable<z.ZodString>;
|
|
343
|
+
appTokenScopes: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
/**
|
|
346
|
+
* Embedded app info on an installation record.
|
|
347
|
+
*/
|
|
348
|
+
export type InstalledIntegration = z.infer<typeof InstalledIntegrationSchema>;
|
|
349
|
+
/**
|
|
350
|
+
* Schema for an installed application (integration installed to a user's account).
|
|
351
|
+
*/
|
|
352
|
+
export declare const AppInstallationSchema: z.ZodObject<{
|
|
353
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
354
|
+
creator: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
355
|
+
createdTs: z.ZodNumber;
|
|
356
|
+
installationType: z.ZodEnum<{
|
|
357
|
+
user: "user";
|
|
358
|
+
}>;
|
|
359
|
+
appTokenScopesValidated: z.ZodBoolean;
|
|
360
|
+
integration: z.ZodNullable<z.ZodObject<{
|
|
361
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
362
|
+
status: z.ZodEnum<{
|
|
363
|
+
public: "public";
|
|
364
|
+
}>;
|
|
365
|
+
displayName: z.ZodString;
|
|
366
|
+
userId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
367
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
368
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
369
|
+
oauthRedirectUri: z.ZodNullable<z.ZodString>;
|
|
370
|
+
description: z.ZodNullable<z.ZodString>;
|
|
371
|
+
iconSm: z.ZodNullable<z.ZodString>;
|
|
372
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
373
|
+
iconLg: z.ZodNullable<z.ZodString>;
|
|
374
|
+
appTokenScopes: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string[] | null, string | null>>;
|
|
375
|
+
}, z.core.$strip>>;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
/**
|
|
378
|
+
* Installation of a developer application on a user's account.
|
|
379
|
+
*/
|
|
380
|
+
export type AppInstallation = z.infer<typeof AppInstallationSchema>;
|
|
381
|
+
/**
|
|
382
|
+
* Lightweight app info included on a user authorization record.
|
|
383
|
+
*/
|
|
384
|
+
export declare const UserAuthorizationAppSchema: z.ZodObject<{
|
|
385
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
386
|
+
displayName: z.ZodString;
|
|
387
|
+
description: z.ZodNullable<z.ZodString>;
|
|
388
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
389
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
/**
|
|
392
|
+
* App info attached to a user authorization entry.
|
|
393
|
+
*/
|
|
394
|
+
export type UserAuthorizationApp = z.infer<typeof UserAuthorizationAppSchema>;
|
|
395
|
+
/**
|
|
396
|
+
* Schema for a user authorization entry — a token the user has granted to a third-party app.
|
|
397
|
+
*/
|
|
398
|
+
export declare const UserAuthorizationSchema: z.ZodObject<{
|
|
399
|
+
accessTokenId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
400
|
+
scope: z.ZodArray<z.ZodString>;
|
|
401
|
+
scopeDescriptions: z.ZodArray<z.ZodString>;
|
|
402
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
403
|
+
app: z.ZodNullable<z.ZodObject<{
|
|
404
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
405
|
+
displayName: z.ZodString;
|
|
406
|
+
description: z.ZodNullable<z.ZodString>;
|
|
407
|
+
serviceUrl: z.ZodNullable<z.ZodString>;
|
|
408
|
+
iconMd: z.ZodNullable<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
/**
|
|
412
|
+
* A user authorization entry (access token granted to a third-party app).
|
|
413
|
+
*/
|
|
414
|
+
export type UserAuthorization = z.infer<typeof UserAuthorizationSchema>;
|
|
@@ -9,7 +9,6 @@ export * from './productivity/index.js';
|
|
|
9
9
|
export * from './activity/index.js';
|
|
10
10
|
export * from './workspaces/index.js';
|
|
11
11
|
export * from './folders/index.js';
|
|
12
|
-
export * from './goals/index.js';
|
|
13
12
|
export * from './insights/index.js';
|
|
14
13
|
export * from './backups/index.js';
|
|
15
14
|
export * from './id-mappings/index.js';
|
|
@@ -19,3 +18,5 @@ export * from './templates/index.js';
|
|
|
19
18
|
export * from './errors.js';
|
|
20
19
|
export * from './http.js';
|
|
21
20
|
export * from './sync/index.js';
|
|
21
|
+
export * from './apps/index.js';
|
|
22
|
+
export * from './ui-extensions/index.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CalendarUpdateArgs, CalendarAccountUpdateArgs, CalendarAccountRestoreTaskCalendarArgs } from './calendars.js';
|
|
2
2
|
import type { FilterAddArgs, FilterUpdateArgs, FilterUpdateOrdersArgs, FilterDeleteArgs } from './filters.js';
|
|
3
3
|
import type { FolderAddArgs, FolderUpdateArgs, FolderDeleteArgs } from './folders.js';
|
|
4
|
-
import type { GoalAddArgs, GoalUpdateArgs, GoalCompleteArgs, GoalUncompleteArgs, GoalDeleteArgs, GoalLinkItemArgs, GoalUnlinkItemArgs } from './goals.js';
|
|
5
4
|
import type { LabelAddArgs, LabelRenameArgs, LabelUpdateArgs, LabelUpdateOrdersArgs, LabelDeleteArgs, LabelDeleteOccurrencesArgs } from './labels.js';
|
|
6
5
|
import type { NoteAddArgs, NoteUpdateArgs, NoteDeleteArgs, NoteReactionAddArgs, NoteReactionRemoveArgs } from './notes.js';
|
|
7
6
|
import type { LiveNotificationsMarkUnreadArgs, LiveNotificationsMarkReadArgs, LiveNotificationsMarkReadAllArgs, LiveNotificationsSetLastReadArgs } from './notifications.js';
|
|
@@ -97,13 +96,6 @@ export type SyncCommandsMap = {
|
|
|
97
96
|
workspace_goal_delete: WorkspaceGoalDeleteArgs;
|
|
98
97
|
workspace_goal_project_add: WorkspaceGoalProjectAddArgs;
|
|
99
98
|
workspace_goal_project_remove: WorkspaceGoalProjectRemoveArgs;
|
|
100
|
-
goal_add: GoalAddArgs;
|
|
101
|
-
goal_update: GoalUpdateArgs;
|
|
102
|
-
goal_complete: GoalCompleteArgs;
|
|
103
|
-
goal_uncomplete: GoalUncompleteArgs;
|
|
104
|
-
goal_delete: GoalDeleteArgs;
|
|
105
|
-
goal_link_item: GoalLinkItemArgs;
|
|
106
|
-
goal_unlink_item: GoalUnlinkItemArgs;
|
|
107
99
|
live_notifications_mark_unread: LiveNotificationsMarkUnreadArgs;
|
|
108
100
|
live_notifications_mark_read: LiveNotificationsMarkReadArgs;
|
|
109
101
|
live_notifications_mark_read_all: LiveNotificationsMarkReadAllArgs;
|
|
@@ -171,7 +163,6 @@ export * from './workspaces.js';
|
|
|
171
163
|
export * from './folders.js';
|
|
172
164
|
export * from './workspace-filters.js';
|
|
173
165
|
export * from './workspace-goals.js';
|
|
174
|
-
export * from './goals.js';
|
|
175
166
|
export * from './notifications.js';
|
|
176
167
|
export * from './sharing.js';
|
|
177
168
|
export * from './view-options.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* All available Sync API resource types.
|
|
3
3
|
*/
|
|
4
|
-
export declare const SYNC_RESOURCE_TYPES: readonly ["labels", "projects", "items", "notes", "project_notes", "sections", "filters", "reminders", "reminders_location", "locations", "user", "live_notifications", "collaborators", "collaborator_states", "user_settings", "notification_settings", "user_plan_limits", "completed_info", "stats", "workspaces", "workspace_users", "workspace_filters", "view_options", "project_view_options_defaults", "role_actions", "folders", "workspace_goals", "
|
|
4
|
+
export declare const SYNC_RESOURCE_TYPES: readonly ["labels", "projects", "items", "notes", "project_notes", "sections", "filters", "reminders", "reminders_location", "locations", "user", "live_notifications", "collaborators", "collaborator_states", "user_settings", "notification_settings", "user_plan_limits", "completed_info", "stats", "workspaces", "workspace_users", "workspace_filters", "view_options", "project_view_options_defaults", "role_actions", "folders", "workspace_goals", "day_orders", "calendars", "calendar_accounts", "suggestions", "tooltips"];
|
|
5
5
|
export type SyncResourceType = (typeof SYNC_RESOURCE_TYPES)[number];
|
|
@@ -89,7 +89,7 @@ export declare const SyncUserSchema: z.ZodObject<{
|
|
|
89
89
|
mfaEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
90
90
|
mobileHost: z.ZodNullable<z.ZodString>;
|
|
91
91
|
mobileNumber: z.ZodNullable<z.ZodString>;
|
|
92
|
-
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday",
|
|
92
|
+
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 3 | 2 | 1 | 4 | 5 | 6 | 7>>;
|
|
93
93
|
onboardingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
94
|
onboardingRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
95
|
onboardingPersona: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -113,7 +113,7 @@ export declare const SyncUserSchema: z.ZodObject<{
|
|
|
113
113
|
}, z.core.$strip>>>;
|
|
114
114
|
shareLimit: z.ZodNumber;
|
|
115
115
|
sortOrder: z.ZodNumber;
|
|
116
|
-
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday",
|
|
116
|
+
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 3 | 2 | 1 | 4 | 5 | 6 | 7>>;
|
|
117
117
|
startPage: z.ZodString;
|
|
118
118
|
themeId: z.ZodString;
|
|
119
119
|
timeFormat: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
|
|
@@ -32,7 +32,6 @@ export declare const GROUPED_BY_OPTIONS: readonly ["ASSIGNEE", "ADDED_DATE", "DU
|
|
|
32
32
|
/** Field to group tasks by. */
|
|
33
33
|
export type GroupedBy = (typeof GROUPED_BY_OPTIONS)[number];
|
|
34
34
|
export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
35
|
-
WORKSPACE: "WORKSPACE";
|
|
36
35
|
PROJECT: "PROJECT";
|
|
37
36
|
LABEL: "LABEL";
|
|
38
37
|
ASSIGNEE: "ASSIGNEE";
|
|
@@ -40,19 +39,20 @@ export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
|
40
39
|
DUE_DATE: "DUE_DATE";
|
|
41
40
|
DEADLINE: "DEADLINE";
|
|
42
41
|
PRIORITY: "PRIORITY";
|
|
42
|
+
WORKSPACE: "WORKSPACE";
|
|
43
43
|
}>>;
|
|
44
44
|
/** Available sorting options. */
|
|
45
45
|
export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "ASSIGNEE", "DUE_DATE", "DEADLINE", "ADDED_DATE", "PRIORITY", "PROJECT", "WORKSPACE"];
|
|
46
46
|
/** Field to sort tasks by. */
|
|
47
47
|
export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
|
|
48
48
|
export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
|
|
49
|
-
WORKSPACE: "WORKSPACE";
|
|
50
49
|
PROJECT: "PROJECT";
|
|
51
50
|
ASSIGNEE: "ASSIGNEE";
|
|
52
51
|
ADDED_DATE: "ADDED_DATE";
|
|
53
52
|
DUE_DATE: "DUE_DATE";
|
|
54
53
|
DEADLINE: "DEADLINE";
|
|
55
54
|
PRIORITY: "PRIORITY";
|
|
55
|
+
WORKSPACE: "WORKSPACE";
|
|
56
56
|
MANUAL: "MANUAL";
|
|
57
57
|
ALPHABETICALLY: "ALPHABETICALLY";
|
|
58
58
|
}>>;
|
|
@@ -92,7 +92,6 @@ export declare const ViewOptionsSchema: z.ZodObject<{
|
|
|
92
92
|
}>;
|
|
93
93
|
objectId: z.ZodOptional<z.ZodString>;
|
|
94
94
|
groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
95
|
-
WORKSPACE: "WORKSPACE";
|
|
96
95
|
PROJECT: "PROJECT";
|
|
97
96
|
LABEL: "LABEL";
|
|
98
97
|
ASSIGNEE: "ASSIGNEE";
|
|
@@ -100,6 +99,7 @@ export declare const ViewOptionsSchema: z.ZodObject<{
|
|
|
100
99
|
DUE_DATE: "DUE_DATE";
|
|
101
100
|
DEADLINE: "DEADLINE";
|
|
102
101
|
PRIORITY: "PRIORITY";
|
|
102
|
+
WORKSPACE: "WORKSPACE";
|
|
103
103
|
}>>>;
|
|
104
104
|
filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
105
|
viewMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -109,13 +109,13 @@ export declare const ViewOptionsSchema: z.ZodObject<{
|
|
|
109
109
|
}>>;
|
|
110
110
|
showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
|
|
111
111
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
112
|
-
WORKSPACE: "WORKSPACE";
|
|
113
112
|
PROJECT: "PROJECT";
|
|
114
113
|
ASSIGNEE: "ASSIGNEE";
|
|
115
114
|
ADDED_DATE: "ADDED_DATE";
|
|
116
115
|
DUE_DATE: "DUE_DATE";
|
|
117
116
|
DEADLINE: "DEADLINE";
|
|
118
117
|
PRIORITY: "PRIORITY";
|
|
118
|
+
WORKSPACE: "WORKSPACE";
|
|
119
119
|
MANUAL: "MANUAL";
|
|
120
120
|
ALPHABETICALLY: "ALPHABETICALLY";
|
|
121
121
|
}>>>;
|
|
@@ -133,7 +133,6 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
|
|
|
133
133
|
CALENDAR: "CALENDAR";
|
|
134
134
|
}>>>;
|
|
135
135
|
groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
136
|
-
WORKSPACE: "WORKSPACE";
|
|
137
136
|
PROJECT: "PROJECT";
|
|
138
137
|
LABEL: "LABEL";
|
|
139
138
|
ASSIGNEE: "ASSIGNEE";
|
|
@@ -141,15 +140,16 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
|
|
|
141
140
|
DUE_DATE: "DUE_DATE";
|
|
142
141
|
DEADLINE: "DEADLINE";
|
|
143
142
|
PRIORITY: "PRIORITY";
|
|
143
|
+
WORKSPACE: "WORKSPACE";
|
|
144
144
|
}>>>;
|
|
145
145
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
146
|
-
WORKSPACE: "WORKSPACE";
|
|
147
146
|
PROJECT: "PROJECT";
|
|
148
147
|
ASSIGNEE: "ASSIGNEE";
|
|
149
148
|
ADDED_DATE: "ADDED_DATE";
|
|
150
149
|
DUE_DATE: "DUE_DATE";
|
|
151
150
|
DEADLINE: "DEADLINE";
|
|
152
151
|
PRIORITY: "PRIORITY";
|
|
152
|
+
WORKSPACE: "WORKSPACE";
|
|
153
153
|
MANUAL: "MANUAL";
|
|
154
154
|
ALPHABETICALLY: "ALPHABETICALLY";
|
|
155
155
|
}>>>;
|