@workwae/sdk 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +7 -7
- package/client.d.ts +1 -1
- package/contract/accounts/models.d.ts +85 -45
- package/contract/accounts/routes.d.ts +191 -29
- package/contract/ai/models.d.ts +0 -1
- package/contract/ai/routes.d.ts +9 -0
- package/contract/audit-log/models.d.ts +22 -5
- package/contract/audit-log/routes.d.ts +11 -1
- package/contract/calendar/models.d.ts +249 -74
- package/contract/calendar/routes.d.ts +574 -30
- package/contract/connect/models.d.ts +30 -16
- package/contract/connect/routes.d.ts +51 -7
- package/contract/connect-domain/models.d.ts +41 -0
- package/contract/connect-domain/routes.d.ts +197 -0
- package/contract/contacts/models.d.ts +0 -10
- package/contract/contacts/routes.d.ts +14 -0
- package/contract/custom-domain.d.ts +12 -0
- package/contract/email-validation/models.d.ts +119 -0
- package/contract/email-validation/routes.d.ts +106 -0
- package/contract/errors.d.ts +28 -20
- package/contract/events/models.d.ts +139 -79
- package/contract/events/routes.d.ts +54 -44
- package/contract/exports/routes.d.ts +10 -0
- package/contract/identities/models.d.ts +7 -9
- package/contract/identities/routes.d.ts +79 -10
- package/contract/limits.d.ts +27 -73
- package/contract/mail/models.d.ts +230 -50
- package/contract/mail/routes.d.ts +649 -59
- package/contract/mcp-keys/models.d.ts +125 -0
- package/contract/mcp-keys/routes.d.ts +151 -0
- package/contract/meetings/models.d.ts +39 -33
- package/contract/meetings/routes.d.ts +121 -23
- package/contract/oauth-apps/models.d.ts +6 -6
- package/contract/oauth-apps/routes.d.ts +34 -4
- package/contract/org-connections/models.d.ts +93 -39
- package/contract/org-connections/routes.d.ts +352 -43
- package/contract/plans/credit-packs.d.ts +30 -0
- package/contract/plans/models.d.ts +208 -0
- package/contract/primitives.d.ts +7 -62
- package/contract/public.d.ts +7 -0
- package/contract/reasons.d.ts +559 -21
- package/contract/router.d.ts +6447 -2719
- package/contract/scheduling/models.d.ts +405 -0
- package/contract/scheduling/routes.d.ts +756 -0
- package/contract/send/models.d.ts +140 -45
- package/contract/send/routes.d.ts +310 -31
- package/contract/settings/models.d.ts +73 -13
- package/contract/settings/routes.d.ts +56 -4
- package/contract/suppressions/models.d.ts +21 -28
- package/contract/suppressions/routes.d.ts +62 -14
- package/contract/templates/models.d.ts +0 -14
- package/contract/templates/routes.d.ts +30 -6
- package/contract/threads/models.d.ts +0 -5
- package/contract/threads/routes.d.ts +40 -0
- package/contract/tracking-domain/models.d.ts +41 -0
- package/contract/tracking-domain/routes.d.ts +193 -0
- package/contract/usage/models.d.ts +98 -126
- package/contract/usage/routes.d.ts +48 -20
- package/contract/webhooks/models.d.ts +45 -30
- package/contract/webhooks/routes.d.ts +52 -9
- package/contract/webhooks/signing.d.ts +0 -16
- package/index.js +1 -4334
- package/package.json +6 -7
- package/index.js.map +0 -59
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @workwae/sdk
|
|
2
2
|
|
|
3
|
-
The TypeScript client for the [
|
|
3
|
+
The TypeScript client for the [Workwae](https://workwae.com) API: one REST API for Gmail,
|
|
4
4
|
Microsoft 365 and IMAP mailboxes, Google, Microsoft and CalDAV calendars, and contacts. Every
|
|
5
5
|
method, input, answer and error is typed from the same contract the API is built on.
|
|
6
6
|
|
|
@@ -11,8 +11,8 @@ method, input, answer and error is typed from the same contract the API is built
|
|
|
11
11
|
- Idempotency keys on every POST
|
|
12
12
|
- Webhook signature verification (Standard Webhooks) and typed event parsing
|
|
13
13
|
|
|
14
|
-
The full guides and API reference are
|
|
15
|
-
operation, `/
|
|
14
|
+
The full guides and API reference are at https://docs.workwae.com (`/reference` for every
|
|
15
|
+
operation, `/changelog` for what changed).
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
@@ -57,7 +57,7 @@ const queued = await workwae.outbox.create({
|
|
|
57
57
|
accountId,
|
|
58
58
|
to: [{ name: "Ada Lovelace", address: "ada@example.com" }],
|
|
59
59
|
subject: "Hello",
|
|
60
|
-
text: "Sent with
|
|
60
|
+
text: "Sent with Workwae.",
|
|
61
61
|
});
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -78,7 +78,7 @@ await workwae.accounts.list({}, { signal: controller.signal });
|
|
|
78
78
|
|
|
79
79
|
## Authentication
|
|
80
80
|
|
|
81
|
-
API keys are created on the
|
|
81
|
+
API keys are created on the console under **API keys**, with the scopes the integration needs
|
|
82
82
|
(`read`, `write`, `send`, `admin`). They reach every account of the tenant, so keep them on your
|
|
83
83
|
server.
|
|
84
84
|
|
|
@@ -190,7 +190,7 @@ repeat while the first call still runs with `idempotency_key_in_progress`.
|
|
|
190
190
|
|
|
191
191
|
## Webhooks
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
Workwae signs deliveries with [Standard Webhooks](https://www.standardwebhooks.com/).
|
|
194
194
|
`parseWebhook` verifies a delivery and returns its event, typed by `type`, with dates as `Date`.
|
|
195
195
|
Pass the raw body exactly as received:
|
|
196
196
|
|
|
@@ -231,4 +231,4 @@ import type { Account, CalendarEvent, Event, EventType, Message, OutboxEntry } f
|
|
|
231
231
|
## Versioning
|
|
232
232
|
|
|
233
233
|
The SDK follows semver from 0.1.0; while it is 0.x, a minor version may carry breaking changes,
|
|
234
|
-
always listed in the changelog.
|
|
234
|
+
always listed in the [changelog](https://docs.workwae.com/changelog).
|
package/client.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export interface ClientOptions {
|
|
|
32
32
|
fetch?: (request: Request, init?: RequestInit) => Promise<Response>;
|
|
33
33
|
retry?: RetryOptions;
|
|
34
34
|
}
|
|
35
|
-
/** A typed client for the
|
|
35
|
+
/** A typed client for the Workwae /v1 API. */
|
|
36
36
|
export declare function createClient(options: ClientOptions): WorkwaeClient;
|
|
@@ -4,7 +4,6 @@ export declare const OAuthProvider: z.ZodEnum<{
|
|
|
4
4
|
microsoft: "microsoft";
|
|
5
5
|
}>;
|
|
6
6
|
export type OAuthProvider = z.infer<typeof OAuthProvider>;
|
|
7
|
-
/** Microsoft 365 cloud. GCC (moderate) is "global"; GCC High, DoD and 21Vianet have their own. */
|
|
8
7
|
export declare const MicrosoftCloud: z.ZodEnum<{
|
|
9
8
|
global: "global";
|
|
10
9
|
"gcc-high": "gcc-high";
|
|
@@ -25,7 +24,6 @@ export declare const AccountStatus: z.ZodEnum<{
|
|
|
25
24
|
disabled: "disabled";
|
|
26
25
|
}>;
|
|
27
26
|
export type AccountStatus = z.infer<typeof AccountStatus>;
|
|
28
|
-
/** The statuses a caller may set; the others are set by the platform. */
|
|
29
27
|
export declare const SettableAccountStatus: z.ZodEnum<{
|
|
30
28
|
active: "active";
|
|
31
29
|
paused: "paused";
|
|
@@ -52,8 +50,6 @@ export declare const AccountRuntime: z.ZodObject<{
|
|
|
52
50
|
updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
53
51
|
}, z.core.$strip>;
|
|
54
52
|
export type AccountRuntime = z.infer<typeof AccountRuntime>;
|
|
55
|
-
/** tls: implicit TLS (993/465). starttls: upgrade after connect (143/587). none: plaintext,
|
|
56
|
-
* accepted only by instances that allow it (local test servers). */
|
|
57
53
|
export declare const MailSecurity: z.ZodEnum<{
|
|
58
54
|
none: "none";
|
|
59
55
|
tls: "tls";
|
|
@@ -71,17 +67,11 @@ export declare const MailServer: z.ZodObject<{
|
|
|
71
67
|
user: z.ZodString;
|
|
72
68
|
}, z.core.$strip>;
|
|
73
69
|
export type MailServer = z.infer<typeof MailServer>;
|
|
74
|
-
/** imap_password: DAV logs in with the IMAP password (what app passwords cover on iCloud, Fastmail
|
|
75
|
-
* and Yahoo); dav_password: with a separate one. */
|
|
76
70
|
export declare const DavAuth: z.ZodEnum<{
|
|
77
71
|
imap_password: "imap_password";
|
|
78
72
|
dav_password: "dav_password";
|
|
79
73
|
}>;
|
|
80
74
|
export type DavAuth = z.infer<typeof DavAuth>;
|
|
81
|
-
/**
|
|
82
|
-
* CalDAV and CardDAV of an IMAP account: the calendar and address book home sets (null: that half
|
|
83
|
-
* is not used) and the login.
|
|
84
|
-
*/
|
|
85
75
|
export declare const DavSettings: z.ZodObject<{
|
|
86
76
|
calendarUrl: z.ZodNullable<z.ZodString>;
|
|
87
77
|
contactsUrl: z.ZodNullable<z.ZodString>;
|
|
@@ -92,14 +82,12 @@ export declare const DavSettings: z.ZodObject<{
|
|
|
92
82
|
}>;
|
|
93
83
|
}, z.core.$strip>;
|
|
94
84
|
export type DavSettings = z.infer<typeof DavSettings>;
|
|
95
|
-
/** password, or OAuth tokens from this provider (XOAUTH2). */
|
|
96
85
|
export declare const ImapAuth: z.ZodEnum<{
|
|
97
86
|
google: "google";
|
|
98
87
|
microsoft: "microsoft";
|
|
99
88
|
password: "password";
|
|
100
89
|
}>;
|
|
101
90
|
export type ImapAuth = z.infer<typeof ImapAuth>;
|
|
102
|
-
/** An IMAP account's servers; secrets are never returned. */
|
|
103
91
|
export declare const ImapSettings: z.ZodObject<{
|
|
104
92
|
imap: z.ZodObject<{
|
|
105
93
|
host: z.ZodString;
|
|
@@ -138,21 +126,13 @@ export declare const ImapSettings: z.ZodObject<{
|
|
|
138
126
|
}, z.core.$strip>>;
|
|
139
127
|
}, z.core.$strip>;
|
|
140
128
|
export type ImapSettings = z.infer<typeof ImapSettings>;
|
|
141
|
-
/**
|
|
142
|
-
* How an account authenticates:
|
|
143
|
-
* - oauth: its own user grant (a refresh token from a connect flow).
|
|
144
|
-
* - password: an IMAP/SMTP password.
|
|
145
|
-
* - google_delegation / microsoft_app: the organization connection `orgConnectionId` (Google
|
|
146
|
-
* domain-wide delegation, Microsoft app-only); nobody signed in.
|
|
147
|
-
* - shared_mailbox: the delegated grant of account `delegateAccountId`, opening a mailbox that
|
|
148
|
-
* account's user has access to.
|
|
149
|
-
*/
|
|
150
129
|
export declare const AccountAuthMethod: z.ZodEnum<{
|
|
151
130
|
password: "password";
|
|
152
131
|
oauth: "oauth";
|
|
153
132
|
google_delegation: "google_delegation";
|
|
154
133
|
microsoft_app: "microsoft_app";
|
|
155
134
|
shared_mailbox: "shared_mailbox";
|
|
135
|
+
google_group: "google_group";
|
|
156
136
|
}>;
|
|
157
137
|
export type AccountAuthMethod = z.infer<typeof AccountAuthMethod>;
|
|
158
138
|
export declare const AccountAuth: z.ZodObject<{
|
|
@@ -162,9 +142,11 @@ export declare const AccountAuth: z.ZodObject<{
|
|
|
162
142
|
google_delegation: "google_delegation";
|
|
163
143
|
microsoft_app: "microsoft_app";
|
|
164
144
|
shared_mailbox: "shared_mailbox";
|
|
145
|
+
google_group: "google_group";
|
|
165
146
|
}>;
|
|
166
147
|
orgConnectionId: z.ZodNullable<z.ZodUUID>;
|
|
167
148
|
delegateAccountId: z.ZodNullable<z.ZodUUID>;
|
|
149
|
+
relayEmail: z.ZodNullable<z.ZodEmail>;
|
|
168
150
|
}, z.core.$strip>;
|
|
169
151
|
export type AccountAuth = z.infer<typeof AccountAuth>;
|
|
170
152
|
export declare const Account: z.ZodObject<{
|
|
@@ -198,12 +180,18 @@ export declare const Account: z.ZodObject<{
|
|
|
198
180
|
full: "full";
|
|
199
181
|
}>;
|
|
200
182
|
syncWindowDays: z.ZodNullable<z.ZodNumber>;
|
|
183
|
+
mailEnabled: z.ZodBoolean;
|
|
201
184
|
calendarEnabled: z.ZodBoolean;
|
|
202
185
|
contactsEnabled: z.ZodBoolean;
|
|
203
186
|
undoSendSeconds: z.ZodNumber;
|
|
204
187
|
trackOpens: z.ZodBoolean;
|
|
205
188
|
trackClicks: z.ZodBoolean;
|
|
206
189
|
trackingHoneypot: z.ZodBoolean;
|
|
190
|
+
suppressionCheck: z.ZodEnum<{
|
|
191
|
+
lists: "lists";
|
|
192
|
+
always: "always";
|
|
193
|
+
}>;
|
|
194
|
+
sendsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
207
195
|
}, z.core.$strip>;
|
|
208
196
|
settingsOverride: z.ZodObject<{
|
|
209
197
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -212,12 +200,18 @@ export declare const Account: z.ZodObject<{
|
|
|
212
200
|
full: "full";
|
|
213
201
|
}>>;
|
|
214
202
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
203
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
215
204
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
216
205
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
217
206
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
218
207
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
219
208
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
220
209
|
trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
suppressionCheck: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
lists: "lists";
|
|
212
|
+
always: "always";
|
|
213
|
+
}>>;
|
|
214
|
+
sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
221
215
|
}, z.core.$strip>;
|
|
222
216
|
runtime: z.ZodNullable<z.ZodObject<{
|
|
223
217
|
state: z.ZodEnum<{
|
|
@@ -275,9 +269,11 @@ export declare const Account: z.ZodObject<{
|
|
|
275
269
|
google_delegation: "google_delegation";
|
|
276
270
|
microsoft_app: "microsoft_app";
|
|
277
271
|
shared_mailbox: "shared_mailbox";
|
|
272
|
+
google_group: "google_group";
|
|
278
273
|
}>;
|
|
279
274
|
orgConnectionId: z.ZodNullable<z.ZodUUID>;
|
|
280
275
|
delegateAccountId: z.ZodNullable<z.ZodUUID>;
|
|
276
|
+
relayEmail: z.ZodNullable<z.ZodEmail>;
|
|
281
277
|
}, z.core.$strip>;
|
|
282
278
|
initializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
283
279
|
calendarInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
@@ -286,6 +282,28 @@ export declare const Account: z.ZodObject<{
|
|
|
286
282
|
updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
287
283
|
}, z.core.$strip>;
|
|
288
284
|
export type Account = z.infer<typeof Account>;
|
|
285
|
+
export declare const SyncKind: z.ZodEnum<{
|
|
286
|
+
mail: "mail";
|
|
287
|
+
calendar: "calendar";
|
|
288
|
+
contacts: "contacts";
|
|
289
|
+
}>;
|
|
290
|
+
export type SyncKind = z.infer<typeof SyncKind>;
|
|
291
|
+
export declare const SyncAccountRequest: z.ZodObject<{
|
|
292
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
293
|
+
mail: "mail";
|
|
294
|
+
calendar: "calendar";
|
|
295
|
+
contacts: "contacts";
|
|
296
|
+
}>>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
export type SyncAccountRequest = z.infer<typeof SyncAccountRequest>;
|
|
299
|
+
export declare const AccountSyncQueued: z.ZodObject<{
|
|
300
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
301
|
+
mail: "mail";
|
|
302
|
+
calendar: "calendar";
|
|
303
|
+
contacts: "contacts";
|
|
304
|
+
}>>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
export type AccountSyncQueued = z.infer<typeof AccountSyncQueued>;
|
|
289
307
|
export declare const AccountPage: z.ZodObject<{
|
|
290
308
|
items: z.ZodArray<z.ZodObject<{
|
|
291
309
|
id: z.ZodUUID;
|
|
@@ -318,12 +336,18 @@ export declare const AccountPage: z.ZodObject<{
|
|
|
318
336
|
full: "full";
|
|
319
337
|
}>;
|
|
320
338
|
syncWindowDays: z.ZodNullable<z.ZodNumber>;
|
|
339
|
+
mailEnabled: z.ZodBoolean;
|
|
321
340
|
calendarEnabled: z.ZodBoolean;
|
|
322
341
|
contactsEnabled: z.ZodBoolean;
|
|
323
342
|
undoSendSeconds: z.ZodNumber;
|
|
324
343
|
trackOpens: z.ZodBoolean;
|
|
325
344
|
trackClicks: z.ZodBoolean;
|
|
326
345
|
trackingHoneypot: z.ZodBoolean;
|
|
346
|
+
suppressionCheck: z.ZodEnum<{
|
|
347
|
+
lists: "lists";
|
|
348
|
+
always: "always";
|
|
349
|
+
}>;
|
|
350
|
+
sendsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
327
351
|
}, z.core.$strip>;
|
|
328
352
|
settingsOverride: z.ZodObject<{
|
|
329
353
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -332,12 +356,18 @@ export declare const AccountPage: z.ZodObject<{
|
|
|
332
356
|
full: "full";
|
|
333
357
|
}>>;
|
|
334
358
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
359
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
335
360
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
336
361
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
337
362
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
338
363
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
339
364
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
340
365
|
trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
suppressionCheck: z.ZodOptional<z.ZodEnum<{
|
|
367
|
+
lists: "lists";
|
|
368
|
+
always: "always";
|
|
369
|
+
}>>;
|
|
370
|
+
sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
341
371
|
}, z.core.$strip>;
|
|
342
372
|
runtime: z.ZodNullable<z.ZodObject<{
|
|
343
373
|
state: z.ZodEnum<{
|
|
@@ -395,9 +425,11 @@ export declare const AccountPage: z.ZodObject<{
|
|
|
395
425
|
google_delegation: "google_delegation";
|
|
396
426
|
microsoft_app: "microsoft_app";
|
|
397
427
|
shared_mailbox: "shared_mailbox";
|
|
428
|
+
google_group: "google_group";
|
|
398
429
|
}>;
|
|
399
430
|
orgConnectionId: z.ZodNullable<z.ZodUUID>;
|
|
400
431
|
delegateAccountId: z.ZodNullable<z.ZodUUID>;
|
|
432
|
+
relayEmail: z.ZodNullable<z.ZodEmail>;
|
|
401
433
|
}, z.core.$strip>;
|
|
402
434
|
initializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
403
435
|
calendarInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
@@ -423,7 +455,6 @@ export declare const ListAccountsQuery: z.ZodObject<{
|
|
|
423
455
|
cursor: z.ZodOptional<z.ZodString>;
|
|
424
456
|
}, z.core.$strip>;
|
|
425
457
|
export type ListAccountsQuery = z.infer<typeof ListAccountsQuery>;
|
|
426
|
-
/** Headless connect with tokens the tenant already holds (typically from its own OAuth app). */
|
|
427
458
|
export declare const CreateAccount: z.ZodObject<{
|
|
428
459
|
provider: z.ZodEnum<{
|
|
429
460
|
google: "google";
|
|
@@ -445,12 +476,18 @@ export declare const CreateAccount: z.ZodObject<{
|
|
|
445
476
|
full: "full";
|
|
446
477
|
}>>;
|
|
447
478
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
479
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
448
480
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
449
481
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
450
482
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
451
483
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
452
484
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
453
485
|
trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
|
|
486
|
+
suppressionCheck: z.ZodOptional<z.ZodEnum<{
|
|
487
|
+
lists: "lists";
|
|
488
|
+
always: "always";
|
|
489
|
+
}>>;
|
|
490
|
+
sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
454
491
|
}, z.core.$strip>>;
|
|
455
492
|
sharedMailboxesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
456
493
|
}, z.core.$strip>;
|
|
@@ -468,32 +505,43 @@ export declare const UpdateAccount: z.ZodObject<{
|
|
|
468
505
|
full: "full";
|
|
469
506
|
}>>;
|
|
470
507
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
508
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
471
509
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
472
510
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
473
511
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
474
512
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
475
513
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
476
514
|
trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
|
|
515
|
+
suppressionCheck: z.ZodOptional<z.ZodEnum<{
|
|
516
|
+
lists: "lists";
|
|
517
|
+
always: "always";
|
|
518
|
+
}>>;
|
|
519
|
+
sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
477
520
|
}, z.core.$strip>>;
|
|
478
521
|
}, z.core.$strip>;
|
|
479
522
|
export type UpdateAccount = z.infer<typeof UpdateAccount>;
|
|
480
523
|
export declare const DeleteAccountQuery: z.ZodObject<{
|
|
481
|
-
purge: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
524
|
+
purge: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
|
|
525
|
+
z.ZodBoolean,
|
|
526
|
+
z.ZodEnum<{
|
|
527
|
+
true: "true";
|
|
528
|
+
false: "false";
|
|
529
|
+
}>
|
|
530
|
+
]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
485
531
|
}, z.core.$strip>;
|
|
486
532
|
export type DeleteAccountQuery = z.infer<typeof DeleteAccountQuery>;
|
|
487
|
-
/** The path's account and the query's options, as a DELETE takes them. */
|
|
488
533
|
export declare const DeleteAccountInput: z.ZodObject<{
|
|
489
534
|
params: z.ZodObject<{
|
|
490
535
|
accountId: z.ZodUUID;
|
|
491
536
|
}, z.core.$strip>;
|
|
492
537
|
query: z.ZodObject<{
|
|
493
|
-
purge: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
538
|
+
purge: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
|
|
539
|
+
z.ZodBoolean,
|
|
540
|
+
z.ZodEnum<{
|
|
541
|
+
true: "true";
|
|
542
|
+
false: "false";
|
|
543
|
+
}>
|
|
544
|
+
]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
497
545
|
}, z.core.$strip>;
|
|
498
546
|
}, z.core.$strip>;
|
|
499
547
|
export type DeleteAccountInput = z.infer<typeof DeleteAccountInput>;
|
|
@@ -501,7 +549,6 @@ export declare const MintAccountTokenRequest: z.ZodObject<{
|
|
|
501
549
|
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
502
550
|
}, z.core.$strip>;
|
|
503
551
|
export type MintAccountTokenRequest = z.infer<typeof MintAccountTokenRequest>;
|
|
504
|
-
/** Short-lived token limited to one account, for a tenant's own frontend. */
|
|
505
552
|
export declare const AccountToken: z.ZodObject<{
|
|
506
553
|
token: z.ZodString;
|
|
507
554
|
expiresAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
@@ -518,13 +565,6 @@ export declare const MailServerInput: z.ZodObject<{
|
|
|
518
565
|
user: z.ZodOptional<z.ZodString>;
|
|
519
566
|
}, z.core.$strip>;
|
|
520
567
|
export type MailServerInput = z.infer<typeof MailServerInput>;
|
|
521
|
-
/**
|
|
522
|
-
* CalDAV and CardDAV for the account. A URL may be any URL on the server (its root, the
|
|
523
|
-
* principal, a calendar); the principal's calendar or address book home set is what is stored.
|
|
524
|
-
* null turns that half off. Left out: discovered from the address (a built-in provider table,
|
|
525
|
-
* /.well-known/caldav and /.well-known/carddav, then _caldavs._tcp and _carddavs._tcp SRV
|
|
526
|
-
* records), or on an update of an account that has DAV settings, kept as stored.
|
|
527
|
-
*/
|
|
528
568
|
export declare const DavInput: z.ZodObject<{
|
|
529
569
|
calendarUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
530
570
|
contactsUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
@@ -532,7 +572,6 @@ export declare const DavInput: z.ZodObject<{
|
|
|
532
572
|
password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
533
573
|
}, z.core.$strip>;
|
|
534
574
|
export type DavInput = z.infer<typeof DavInput>;
|
|
535
|
-
/** An IMAP/SMTP account and its login, as the API and the hosted page's form take it. */
|
|
536
575
|
export declare const ImapAccountInput: z.ZodObject<{
|
|
537
576
|
email: z.ZodEmail;
|
|
538
577
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -607,12 +646,18 @@ export declare const CreateImapAccount: z.ZodObject<{
|
|
|
607
646
|
full: "full";
|
|
608
647
|
}>>;
|
|
609
648
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
649
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
610
650
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
611
651
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
612
652
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
613
653
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
614
654
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
615
655
|
trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
suppressionCheck: z.ZodOptional<z.ZodEnum<{
|
|
657
|
+
lists: "lists";
|
|
658
|
+
always: "always";
|
|
659
|
+
}>>;
|
|
660
|
+
sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
616
661
|
}, z.core.$strip>>;
|
|
617
662
|
}, z.core.$strip>;
|
|
618
663
|
export type CreateImapAccount = z.infer<typeof CreateImapAccount>;
|
|
@@ -648,14 +693,12 @@ export declare const UpdateImapSettings: z.ZodObject<{
|
|
|
648
693
|
}, z.core.$strip>>>;
|
|
649
694
|
}, z.core.$strip>;
|
|
650
695
|
export type UpdateImapSettings = z.infer<typeof UpdateImapSettings>;
|
|
651
|
-
/** Where DAV context URLs were found: the built-in provider table, /.well-known, or SRV records. */
|
|
652
696
|
export declare const DavDiscoverySource: z.ZodEnum<{
|
|
653
697
|
provider: "provider";
|
|
654
698
|
"well-known": "well-known";
|
|
655
699
|
srv: "srv";
|
|
656
700
|
}>;
|
|
657
701
|
export type DavDiscoverySource = z.infer<typeof DavDiscoverySource>;
|
|
658
|
-
/** DAV context URLs found for an address before logging in; setup follows them to the home sets. */
|
|
659
702
|
export declare const DiscoveredDav: z.ZodObject<{
|
|
660
703
|
source: z.ZodEnum<{
|
|
661
704
|
provider: "provider";
|
|
@@ -666,7 +709,6 @@ export declare const DiscoveredDav: z.ZodObject<{
|
|
|
666
709
|
contactsUrl: z.ZodNullable<z.ZodString>;
|
|
667
710
|
}, z.core.$strip>;
|
|
668
711
|
export type DiscoveredDav = z.infer<typeof DiscoveredDav>;
|
|
669
|
-
/** Where mail server settings were found. */
|
|
670
712
|
export declare const AutoconfigSource: z.ZodEnum<{
|
|
671
713
|
provider: "provider";
|
|
672
714
|
srv: "srv";
|
|
@@ -675,8 +717,6 @@ export declare const AutoconfigSource: z.ZodEnum<{
|
|
|
675
717
|
mx: "mx";
|
|
676
718
|
}>;
|
|
677
719
|
export type AutoconfigSource = z.infer<typeof AutoconfigSource>;
|
|
678
|
-
/** Servers found for an address; `oauth` names the provider whose sign-in reaches this mailbox,
|
|
679
|
-
* which should be preferred over a password where the provider offers it. */
|
|
680
720
|
export declare const DiscoveredSettings: z.ZodObject<{
|
|
681
721
|
source: z.ZodEnum<{
|
|
682
722
|
provider: "provider";
|