@repa/mail 0.0.0-stage → 0.1.0-alpha.20

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.
@@ -0,0 +1,3699 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const accountStorage: z.ZodObject<{
4
+ usedBytes: z.ZodNumber;
5
+ limitBytes: z.ZodNumber;
6
+ workspaceLimitBytes: z.ZodNumber;
7
+ workspaceUsedBytes: z.ZodNumber;
8
+ warningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
9
+ workspaceWarningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
10
+ }, z.core.$strict>;
11
+ type AccountStorage = z.infer<typeof accountStorage>;
12
+ declare const accountStorageMaximumBytes: number;
13
+ /** Current Go mail response; the product and SDK expose workspace vocabulary. */
14
+ declare const serviceAccountStorage: z.ZodPipe<z.ZodObject<{
15
+ usedBytes: z.ZodNumber;
16
+ limitBytes: z.ZodNumber;
17
+ warningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
18
+ tenantLimitBytes: z.ZodNumber;
19
+ tenantUsedBytes: z.ZodNumber;
20
+ tenantWarningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
21
+ }, z.core.$strict>, z.ZodTransform<{
22
+ workspaceLimitBytes: number;
23
+ workspaceUsedBytes: number;
24
+ workspaceWarningPercent: 0 | 80 | 95;
25
+ usedBytes: number;
26
+ limitBytes: number;
27
+ warningPercent: 0 | 80 | 95;
28
+ }, {
29
+ usedBytes: number;
30
+ limitBytes: number;
31
+ warningPercent: 0 | 80 | 95;
32
+ tenantLimitBytes: number;
33
+ tenantUsedBytes: number;
34
+ tenantWarningPercent: 0 | 80 | 95;
35
+ }>>;
36
+
37
+ /** Opaque continuation; the empty string starts and ends a sequence. */
38
+ declare const conversationCursor: z.ZodString;
39
+ declare const participant: z.ZodObject<{
40
+ address: z.ZodString;
41
+ name: z.ZodString;
42
+ }, z.core.$strict>;
43
+ /** One conversation with membership in the listed folder. `latest` is its
44
+ * newest message there; counts cover visible messages in every folder. */
45
+ declare const conversationRow: z.ZodObject<{
46
+ id: z.ZodString;
47
+ latest: z.ZodObject<{
48
+ uid: z.ZodNumber;
49
+ id: z.ZodString;
50
+ flags: z.ZodNumber;
51
+ date: z.ZodString;
52
+ octets: z.ZodNumber;
53
+ preview: z.ZodString;
54
+ hasAttachment: z.ZodBoolean;
55
+ subject: z.ZodString;
56
+ from: z.ZodString;
57
+ to: z.ZodString;
58
+ }, z.core.$strict>;
59
+ messages: z.ZodNumber;
60
+ unread: z.ZodNumber;
61
+ starred: z.ZodBoolean;
62
+ hasAttachment: z.ZodBoolean;
63
+ participants: z.ZodArray<z.ZodObject<{
64
+ address: z.ZodString;
65
+ name: z.ZodString;
66
+ }, z.core.$strict>>;
67
+ }, z.core.$strict>;
68
+ /** `unindexed` counts messages in the folder that existing-mail indexing has
69
+ * not reached yet; they are in no row until it does. */
70
+ declare const conversationPage: z.ZodObject<{
71
+ conversations: z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ latest: z.ZodObject<{
74
+ uid: z.ZodNumber;
75
+ id: z.ZodString;
76
+ flags: z.ZodNumber;
77
+ date: z.ZodString;
78
+ octets: z.ZodNumber;
79
+ preview: z.ZodString;
80
+ hasAttachment: z.ZodBoolean;
81
+ subject: z.ZodString;
82
+ from: z.ZodString;
83
+ to: z.ZodString;
84
+ }, z.core.$strict>;
85
+ messages: z.ZodNumber;
86
+ unread: z.ZodNumber;
87
+ starred: z.ZodBoolean;
88
+ hasAttachment: z.ZodBoolean;
89
+ participants: z.ZodArray<z.ZodObject<{
90
+ address: z.ZodString;
91
+ name: z.ZodString;
92
+ }, z.core.$strict>>;
93
+ }, z.core.$strict>>;
94
+ next: z.ZodString;
95
+ hasMore: z.ZodBoolean;
96
+ unindexed: z.ZodNumber;
97
+ }, z.core.$strict>;
98
+ declare const conversationLocation: z.ZodObject<{
99
+ folderId: z.ZodString;
100
+ uidValidity: z.ZodNumber;
101
+ uid: z.ZodNumber;
102
+ flags: z.ZodNumber;
103
+ }, z.core.$strict>;
104
+ /** Chat text is the message's new text when a quote or signature boundary was
105
+ * proven, otherwise its whole text; `quoted` says history was hidden. */
106
+ declare const chatText: z.ZodObject<{
107
+ text: z.ZodString;
108
+ quoted: z.ZodBoolean;
109
+ signature: z.ZodString;
110
+ truncated: z.ZodBoolean;
111
+ }, z.core.$strict>;
112
+ declare const conversationMessage: z.ZodObject<{
113
+ id: z.ZodString;
114
+ headerId: z.ZodString;
115
+ parent: z.ZodNullable<z.ZodString>;
116
+ date: z.ZodString;
117
+ subject: z.ZodString;
118
+ from: z.ZodString;
119
+ to: z.ZodString;
120
+ cc: z.ZodString;
121
+ locations: z.ZodArray<z.ZodObject<{
122
+ folderId: z.ZodString;
123
+ uidValidity: z.ZodNumber;
124
+ uid: z.ZodNumber;
125
+ flags: z.ZodNumber;
126
+ }, z.core.$strict>>;
127
+ reply: z.ZodObject<{
128
+ inReplyTo: z.ZodString;
129
+ references: z.ZodArray<z.ZodString>;
130
+ }, z.core.$strict>;
131
+ chat: z.ZodObject<{
132
+ text: z.ZodString;
133
+ quoted: z.ZodBoolean;
134
+ signature: z.ZodString;
135
+ truncated: z.ZodBoolean;
136
+ }, z.core.$strict>;
137
+ hasHTML: z.ZodBoolean;
138
+ attachments: z.ZodArray<z.ZodObject<{
139
+ contentId: z.ZodOptional<z.ZodString>;
140
+ part: z.ZodString;
141
+ name: z.ZodString;
142
+ type: z.ZodString;
143
+ octets: z.ZodNumber;
144
+ }, z.core.$strict>>;
145
+ warnings: z.ZodArray<z.ZodEnum<{
146
+ incomplete_scan: "incomplete_scan";
147
+ hosted_domain_unaligned: "hosted_domain_unaligned";
148
+ link_text_mismatch: "link_text_mismatch";
149
+ lookalike_brand: "lookalike_brand";
150
+ lookalike_tenant: "lookalike_tenant";
151
+ homograph_domain: "homograph_domain";
152
+ credential_form: "credential_form";
153
+ dangerous_attachment: "dangerous_attachment";
154
+ encrypted_archive: "encrypted_archive";
155
+ }>>;
156
+ incomplete: z.ZodBoolean;
157
+ }, z.core.$strict>;
158
+ /** Messages in arrival order; `earlier` continues toward older messages. */
159
+ declare const conversation: z.ZodObject<{
160
+ id: z.ZodString;
161
+ messages: z.ZodArray<z.ZodObject<{
162
+ id: z.ZodString;
163
+ headerId: z.ZodString;
164
+ parent: z.ZodNullable<z.ZodString>;
165
+ date: z.ZodString;
166
+ subject: z.ZodString;
167
+ from: z.ZodString;
168
+ to: z.ZodString;
169
+ cc: z.ZodString;
170
+ locations: z.ZodArray<z.ZodObject<{
171
+ folderId: z.ZodString;
172
+ uidValidity: z.ZodNumber;
173
+ uid: z.ZodNumber;
174
+ flags: z.ZodNumber;
175
+ }, z.core.$strict>>;
176
+ reply: z.ZodObject<{
177
+ inReplyTo: z.ZodString;
178
+ references: z.ZodArray<z.ZodString>;
179
+ }, z.core.$strict>;
180
+ chat: z.ZodObject<{
181
+ text: z.ZodString;
182
+ quoted: z.ZodBoolean;
183
+ signature: z.ZodString;
184
+ truncated: z.ZodBoolean;
185
+ }, z.core.$strict>;
186
+ hasHTML: z.ZodBoolean;
187
+ attachments: z.ZodArray<z.ZodObject<{
188
+ contentId: z.ZodOptional<z.ZodString>;
189
+ part: z.ZodString;
190
+ name: z.ZodString;
191
+ type: z.ZodString;
192
+ octets: z.ZodNumber;
193
+ }, z.core.$strict>>;
194
+ warnings: z.ZodArray<z.ZodEnum<{
195
+ incomplete_scan: "incomplete_scan";
196
+ hosted_domain_unaligned: "hosted_domain_unaligned";
197
+ link_text_mismatch: "link_text_mismatch";
198
+ lookalike_brand: "lookalike_brand";
199
+ lookalike_tenant: "lookalike_tenant";
200
+ homograph_domain: "homograph_domain";
201
+ credential_form: "credential_form";
202
+ dangerous_attachment: "dangerous_attachment";
203
+ encrypted_archive: "encrypted_archive";
204
+ }>>;
205
+ incomplete: z.ZodBoolean;
206
+ }, z.core.$strict>>;
207
+ count: z.ZodNumber;
208
+ earlier: z.ZodString;
209
+ }, z.core.$strict>;
210
+ type Participant = z.infer<typeof participant>;
211
+ type ConversationRow = z.infer<typeof conversationRow>;
212
+ type ConversationPage = z.infer<typeof conversationPage>;
213
+ type ConversationLocation = z.infer<typeof conversationLocation>;
214
+ type ConversationMessage = z.infer<typeof conversationMessage>;
215
+ type Conversation = z.infer<typeof conversation>;
216
+
217
+ /** The complete formatting vocabulary. No CSS, external resource or arbitrary markup is persisted. */
218
+ type ComposeNode = {
219
+ kind: "text" | "br" | "p" | "strong" | "em" | "u" | "s" | "ul" | "ol" | "li" | "blockquote" | "a";
220
+ text?: string;
221
+ href?: string;
222
+ children?: ComposeNode[];
223
+ };
224
+ declare function safeComposeLink(value: string): boolean;
225
+ declare function validComposeFormat(input: unknown): input is ComposeNode[];
226
+ declare const composeFormat: z.ZodCustom<ComposeNode[], ComposeNode[]>;
227
+
228
+ declare const draftContent: z.ZodObject<{
229
+ senderId: z.ZodString;
230
+ to: z.ZodString;
231
+ cc: z.ZodString;
232
+ bcc: z.ZodString;
233
+ subject: z.ZodString;
234
+ text: z.ZodString;
235
+ format: z.ZodOptional<z.ZodCustom<ComposeNode[], ComposeNode[]>>;
236
+ inReplyTo: z.ZodOptional<z.ZodString>;
237
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
238
+ attachments: z.ZodArray<z.ZodObject<{
239
+ name: z.ZodString;
240
+ type: z.ZodString;
241
+ bytes: z.ZodString;
242
+ }, z.core.$strict>>;
243
+ }, z.core.$strict>;
244
+ declare const savedDraft: z.ZodObject<{
245
+ id: z.ZodString;
246
+ accountId: z.ZodString;
247
+ revision: z.ZodNumber;
248
+ state: z.ZodEnum<{
249
+ editing: "editing";
250
+ scheduled: "scheduled";
251
+ prepared: "prepared";
252
+ accepted: "accepted";
253
+ discarded: "discarded";
254
+ }>;
255
+ subject: z.ZodString;
256
+ updatedAt: z.ZodString;
257
+ content: z.ZodOptional<z.ZodObject<{
258
+ senderId: z.ZodString;
259
+ to: z.ZodString;
260
+ cc: z.ZodString;
261
+ bcc: z.ZodString;
262
+ subject: z.ZodString;
263
+ text: z.ZodString;
264
+ format: z.ZodOptional<z.ZodCustom<ComposeNode[], ComposeNode[]>>;
265
+ inReplyTo: z.ZodOptional<z.ZodString>;
266
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ attachments: z.ZodArray<z.ZodObject<{
268
+ name: z.ZodString;
269
+ type: z.ZodString;
270
+ bytes: z.ZodString;
271
+ }, z.core.$strict>>;
272
+ }, z.core.$strict>>;
273
+ sendAt: z.ZodOptional<z.ZodString>;
274
+ scheduleError: z.ZodOptional<z.ZodEnum<{
275
+ authority_lost: "authority_lost";
276
+ sending_refused: "sending_refused";
277
+ }>>;
278
+ }, z.core.$strict>;
279
+ declare const draftList: z.ZodObject<{
280
+ drafts: z.ZodArray<z.ZodObject<{
281
+ id: z.ZodString;
282
+ accountId: z.ZodString;
283
+ revision: z.ZodNumber;
284
+ state: z.ZodEnum<{
285
+ editing: "editing";
286
+ scheduled: "scheduled";
287
+ prepared: "prepared";
288
+ accepted: "accepted";
289
+ discarded: "discarded";
290
+ }>;
291
+ subject: z.ZodString;
292
+ updatedAt: z.ZodString;
293
+ content: z.ZodOptional<z.ZodObject<{
294
+ senderId: z.ZodString;
295
+ to: z.ZodString;
296
+ cc: z.ZodString;
297
+ bcc: z.ZodString;
298
+ subject: z.ZodString;
299
+ text: z.ZodString;
300
+ format: z.ZodOptional<z.ZodCustom<ComposeNode[], ComposeNode[]>>;
301
+ inReplyTo: z.ZodOptional<z.ZodString>;
302
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
303
+ attachments: z.ZodArray<z.ZodObject<{
304
+ name: z.ZodString;
305
+ type: z.ZodString;
306
+ bytes: z.ZodString;
307
+ }, z.core.$strict>>;
308
+ }, z.core.$strict>>;
309
+ sendAt: z.ZodOptional<z.ZodString>;
310
+ scheduleError: z.ZodOptional<z.ZodEnum<{
311
+ authority_lost: "authority_lost";
312
+ sending_refused: "sending_refused";
313
+ }>>;
314
+ }, z.core.$strict>>;
315
+ }, z.core.$strict>;
316
+ declare const draftLocation: z.ZodObject<{
317
+ accountId: z.ZodString;
318
+ id: z.ZodString;
319
+ }, z.core.$strict>;
320
+ declare const draftInputs: {
321
+ schedule: z.ZodObject<{
322
+ accountId: z.ZodString;
323
+ id: z.ZodString;
324
+ operationId: z.ZodString;
325
+ revision: z.ZodNumber;
326
+ submission: z.ZodObject<{
327
+ authorAddressId: z.ZodString;
328
+ envelopeRecipients: z.ZodArray<z.ZodString>;
329
+ raw: z.ZodString;
330
+ }, z.core.$strict>;
331
+ sendAt: z.ZodOptional<z.ZodString>;
332
+ }, z.core.$strict>;
333
+ unschedule: z.ZodObject<{
334
+ accountId: z.ZodString;
335
+ id: z.ZodString;
336
+ operationId: z.ZodString;
337
+ revision: z.ZodNumber;
338
+ }, z.core.$strict>;
339
+ list: z.ZodObject<{
340
+ accountId: z.ZodString;
341
+ }, z.core.$strict>;
342
+ get: z.ZodObject<{
343
+ accountId: z.ZodString;
344
+ id: z.ZodString;
345
+ }, z.core.$strict>;
346
+ save: z.ZodObject<{
347
+ accountId: z.ZodString;
348
+ id: z.ZodString;
349
+ operationId: z.ZodString;
350
+ revision: z.ZodNumber;
351
+ content: z.ZodObject<{
352
+ senderId: z.ZodString;
353
+ to: z.ZodString;
354
+ cc: z.ZodString;
355
+ bcc: z.ZodString;
356
+ subject: z.ZodString;
357
+ text: z.ZodString;
358
+ format: z.ZodOptional<z.ZodCustom<ComposeNode[], ComposeNode[]>>;
359
+ inReplyTo: z.ZodOptional<z.ZodString>;
360
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
361
+ attachments: z.ZodArray<z.ZodObject<{
362
+ name: z.ZodString;
363
+ type: z.ZodString;
364
+ bytes: z.ZodString;
365
+ }, z.core.$strict>>;
366
+ }, z.core.$strict>;
367
+ }, z.core.$strict>;
368
+ discard: z.ZodObject<{
369
+ accountId: z.ZodString;
370
+ id: z.ZodString;
371
+ operationId: z.ZodString;
372
+ revision: z.ZodNumber;
373
+ }, z.core.$strict>;
374
+ prepare: z.ZodObject<{
375
+ accountId: z.ZodString;
376
+ id: z.ZodString;
377
+ operationId: z.ZodString;
378
+ revision: z.ZodNumber;
379
+ submission: z.ZodObject<{
380
+ authorAddressId: z.ZodString;
381
+ envelopeRecipients: z.ZodArray<z.ZodString>;
382
+ raw: z.ZodString;
383
+ }, z.core.$strict>;
384
+ }, z.core.$strict>;
385
+ send: z.ZodObject<{
386
+ accountId: z.ZodString;
387
+ id: z.ZodString;
388
+ }, z.core.$strict>;
389
+ };
390
+ type SavedDraft = z.infer<typeof savedDraft>;
391
+ type DraftAction = keyof typeof draftInputs;
392
+ type DraftInput<K extends DraftAction> = z.infer<(typeof draftInputs)[K]>;
393
+
394
+ declare const mailbox: z.ZodObject<{
395
+ id: z.ZodString;
396
+ domainId: z.ZodString;
397
+ kind: z.ZodEnum<{
398
+ personal: "personal";
399
+ shared: "shared";
400
+ }>;
401
+ displayName: z.ZodString;
402
+ address: z.ZodString;
403
+ }, z.core.$strict>;
404
+ declare const mailboxPage: z.ZodObject<{
405
+ mailboxes: z.ZodArray<z.ZodObject<{
406
+ id: z.ZodString;
407
+ domainId: z.ZodString;
408
+ kind: z.ZodEnum<{
409
+ personal: "personal";
410
+ shared: "shared";
411
+ }>;
412
+ displayName: z.ZodString;
413
+ address: z.ZodString;
414
+ }, z.core.$strict>>;
415
+ next: z.ZodNullable<z.ZodString>;
416
+ }, z.core.$strict>;
417
+ declare const folder: z.ZodObject<{
418
+ id: z.ZodString;
419
+ name: z.ZodString;
420
+ uidValidity: z.ZodNumber;
421
+ specialUse: z.ZodOptional<z.ZodEnum<{
422
+ "\\Drafts": "\\Drafts";
423
+ "\\Sent": "\\Sent";
424
+ "\\Junk": "\\Junk";
425
+ "\\Trash": "\\Trash";
426
+ "\\Archive": "\\Archive";
427
+ }>>;
428
+ }, z.core.$strict>;
429
+ declare const renamedFolder: z.ZodObject<{
430
+ folders: z.ZodArray<z.ZodObject<{
431
+ id: z.ZodString;
432
+ name: z.ZodString;
433
+ uidValidity: z.ZodNumber;
434
+ specialUse: z.ZodOptional<z.ZodEnum<{
435
+ "\\Drafts": "\\Drafts";
436
+ "\\Sent": "\\Sent";
437
+ "\\Junk": "\\Junk";
438
+ "\\Trash": "\\Trash";
439
+ "\\Archive": "\\Archive";
440
+ }>>;
441
+ }, z.core.$strict>>;
442
+ rulesNotice: z.ZodBoolean;
443
+ }, z.core.$strict>;
444
+ type FolderInput = {
445
+ accountId: string;
446
+ operationId: string;
447
+ name: string;
448
+ };
449
+ declare const sender: z.ZodObject<{
450
+ id: z.ZodString;
451
+ address: z.ZodString;
452
+ }, z.core.$strict>;
453
+ declare const inbox: z.ZodObject<{
454
+ folders: z.ZodArray<z.ZodObject<{
455
+ id: z.ZodString;
456
+ name: z.ZodString;
457
+ uidValidity: z.ZodNumber;
458
+ specialUse: z.ZodOptional<z.ZodEnum<{
459
+ "\\Drafts": "\\Drafts";
460
+ "\\Sent": "\\Sent";
461
+ "\\Junk": "\\Junk";
462
+ "\\Trash": "\\Trash";
463
+ "\\Archive": "\\Archive";
464
+ }>>;
465
+ }, z.core.$strict>>;
466
+ senders: z.ZodArray<z.ZodObject<{
467
+ id: z.ZodString;
468
+ address: z.ZodString;
469
+ }, z.core.$strict>>;
470
+ rights: z.ZodNumber;
471
+ canDraft: z.ZodBoolean;
472
+ }, z.core.$strict>;
473
+ declare const entry: z.ZodObject<{
474
+ uid: z.ZodNumber;
475
+ id: z.ZodString;
476
+ flags: z.ZodNumber;
477
+ date: z.ZodString;
478
+ octets: z.ZodNumber;
479
+ preview: z.ZodString;
480
+ hasAttachment: z.ZodBoolean;
481
+ subject: z.ZodString;
482
+ from: z.ZodString;
483
+ to: z.ZodString;
484
+ }, z.core.$strict>;
485
+ declare const entries: z.ZodObject<{
486
+ entries: z.ZodArray<z.ZodObject<{
487
+ uid: z.ZodNumber;
488
+ id: z.ZodString;
489
+ flags: z.ZodNumber;
490
+ date: z.ZodString;
491
+ octets: z.ZodNumber;
492
+ preview: z.ZodString;
493
+ hasAttachment: z.ZodBoolean;
494
+ subject: z.ZodString;
495
+ from: z.ZodString;
496
+ to: z.ZodString;
497
+ }, z.core.$strict>>;
498
+ next: z.ZodNumber;
499
+ hasMore: z.ZodBoolean;
500
+ count: z.ZodNumber;
501
+ }, z.core.$strict>;
502
+ declare const attachment: z.ZodObject<{
503
+ contentId: z.ZodOptional<z.ZodString>;
504
+ part: z.ZodString;
505
+ name: z.ZodString;
506
+ type: z.ZodString;
507
+ octets: z.ZodNumber;
508
+ }, z.core.$strict>;
509
+ declare const message: z.ZodObject<{
510
+ entry: z.ZodObject<{
511
+ uid: z.ZodNumber;
512
+ id: z.ZodString;
513
+ flags: z.ZodNumber;
514
+ date: z.ZodString;
515
+ octets: z.ZodNumber;
516
+ preview: z.ZodString;
517
+ hasAttachment: z.ZodBoolean;
518
+ subject: z.ZodString;
519
+ from: z.ZodString;
520
+ to: z.ZodString;
521
+ }, z.core.$strict>;
522
+ headers: z.ZodObject<{
523
+ subject: z.ZodString;
524
+ from: z.ZodString;
525
+ to: z.ZodString;
526
+ cc: z.ZodString;
527
+ replyTo: z.ZodString;
528
+ messageId: z.ZodString;
529
+ unsubscribe: z.ZodOptional<z.ZodString>;
530
+ }, z.core.$strict>;
531
+ text: z.ZodString;
532
+ html: z.ZodString;
533
+ attachments: z.ZodArray<z.ZodObject<{
534
+ contentId: z.ZodOptional<z.ZodString>;
535
+ part: z.ZodString;
536
+ name: z.ZodString;
537
+ type: z.ZodString;
538
+ octets: z.ZodNumber;
539
+ }, z.core.$strict>>;
540
+ warnings: z.ZodArray<z.ZodEnum<{
541
+ incomplete_scan: "incomplete_scan";
542
+ hosted_domain_unaligned: "hosted_domain_unaligned";
543
+ link_text_mismatch: "link_text_mismatch";
544
+ lookalike_brand: "lookalike_brand";
545
+ lookalike_tenant: "lookalike_tenant";
546
+ homograph_domain: "homograph_domain";
547
+ credential_form: "credential_form";
548
+ dangerous_attachment: "dangerous_attachment";
549
+ encrypted_archive: "encrypted_archive";
550
+ }>>;
551
+ incomplete: z.ZodBoolean;
552
+ }, z.core.$strict>;
553
+ declare const changed: z.ZodObject<{
554
+ operationId: z.ZodString;
555
+ }, z.core.$strict>;
556
+ declare const download: z.ZodObject<{
557
+ name: z.ZodString;
558
+ data: z.ZodString;
559
+ }, z.core.$strict>;
560
+ declare const receipt: z.ZodObject<{
561
+ idempotencyKey: z.ZodString;
562
+ operationId: z.ZodString;
563
+ accountId: z.ZodString;
564
+ messageId: z.ZodString;
565
+ entryId: z.ZodString;
566
+ folderId: z.ZodString;
567
+ uid: z.ZodNumber;
568
+ acceptedAt: z.ZodString;
569
+ state: z.ZodLiteral<"queued">;
570
+ }, z.core.$strict>;
571
+ type Mailbox = z.infer<typeof mailbox>;
572
+ type Folder = z.infer<typeof folder>;
573
+ type Sender = z.infer<typeof sender>;
574
+ type Inbox = z.infer<typeof inbox>;
575
+ type Entry = z.infer<typeof entry>;
576
+ type Message = z.infer<typeof message>;
577
+ type Receipt = z.infer<typeof receipt>;
578
+ type DraftResults = {
579
+ list: z.infer<typeof draftList>;
580
+ send: Receipt;
581
+ get: SavedDraft;
582
+ save: SavedDraft;
583
+ discard: SavedDraft;
584
+ prepare: SavedDraft;
585
+ schedule: SavedDraft;
586
+ unschedule: SavedDraft;
587
+ };
588
+ type DraftResult<K extends DraftAction> = DraftResults[K];
589
+ declare const draftSchemas: {
590
+ [K in DraftAction]: z.ZodType<DraftResult<K>>;
591
+ };
592
+ type Location = {
593
+ accountId: string;
594
+ folderId: string;
595
+ uidValidity: number;
596
+ };
597
+ type MessageLocation = Location & {
598
+ uid: number;
599
+ };
600
+ /** A conversation named directly or by one of its messages in the viewed folder. */
601
+ type ConversationTarget = Location & ({
602
+ conversationId: string;
603
+ } | {
604
+ uid: number;
605
+ });
606
+ type Change = MessageLocation & {
607
+ operationId: string;
608
+ } & ({
609
+ action: "seen" | "starred";
610
+ enabled: boolean;
611
+ } | {
612
+ action: "move";
613
+ destinationId: string;
614
+ destinationValidity: number;
615
+ });
616
+ type Submission = {
617
+ operationId: string;
618
+ authorAddressId: string;
619
+ sentAccountId: string;
620
+ envelopeRecipients: string[];
621
+ raw: Uint8Array;
622
+ };
623
+ interface MailTransport {
624
+ storage(accountId: string, signal: AbortSignal): Promise<AccountStorage>;
625
+ draft<K extends DraftAction>(action: K, input: DraftInput<K>, signal: AbortSignal): Promise<DraftResult<K>>;
626
+ createFolder(input: {
627
+ accountId: string;
628
+ operationId: string;
629
+ name: string;
630
+ }, signal: AbortSignal): Promise<Folder>;
631
+ renameFolder(input: FolderInput & {
632
+ newName: string;
633
+ }, signal: AbortSignal): Promise<z.infer<typeof renamedFolder>>;
634
+ deleteFolder(input: FolderInput, signal: AbortSignal): Promise<Folder>;
635
+ mailboxes(after: string | undefined, signal: AbortSignal): Promise<z.infer<typeof mailboxPage>>;
636
+ open(accountId: string, signal: AbortSignal): Promise<Inbox>;
637
+ list(location: Location, before: number, signal: AbortSignal): Promise<z.infer<typeof entries>>;
638
+ read(location: MessageLocation, signal: AbortSignal): Promise<Message>;
639
+ conversations(location: Location, cursor: string, signal: AbortSignal): Promise<ConversationPage>;
640
+ conversation(target: ConversationTarget, cursor: string, signal: AbortSignal): Promise<Conversation>;
641
+ download(location: MessageLocation & {
642
+ part: string;
643
+ }, signal: AbortSignal): Promise<z.infer<typeof download>>;
644
+ change(input: Change, signal: AbortSignal): Promise<z.infer<typeof changed>>;
645
+ submit(input: Submission, signal: AbortSignal): Promise<Receipt>;
646
+ }
647
+ declare class MailError extends Error {
648
+ readonly code: string;
649
+ constructor(code: string);
650
+ }
651
+
652
+ /**
653
+ * Mailbox rules (Sieve filtering) for integrations holding the "Read and organize" mailbox level or higher
654
+ * (EMAIL-D100). The mailbox's active script is read as ordered items; writes are compare-and-swap on the revision
655
+ * read, carry no operation UUID and accept no Idempotency-Key. A refused change is a 200 answer listing problems.
656
+ * Structural bounds only: the service checks names, values, folders and the script itself and names each problem.
657
+ */
658
+ declare const MAXIMUM_RULE_SCRIPT_BYTES: number;
659
+ /** Rules and script blocks, plus the automatic reply and the forward pinned ahead of them. */
660
+ declare const MAXIMUM_RULE_ITEMS: number;
661
+ declare const MAXIMUM_RULE_CONDITIONS = 16;
662
+ declare const MAXIMUM_RULE_PROBLEMS = 32;
663
+ declare const ruleCondition: z.ZodObject<{
664
+ field: z.ZodEnum<{
665
+ subject: "subject";
666
+ from: "from";
667
+ to: "to";
668
+ cc: "cc";
669
+ listId: "listId";
670
+ body: "body";
671
+ attachmentName: "attachmentName";
672
+ tag: "tag";
673
+ }>;
674
+ operator: z.ZodEnum<{
675
+ matches: "matches";
676
+ is: "is";
677
+ contains: "contains";
678
+ }>;
679
+ negate: z.ZodBoolean;
680
+ value: z.ZodString;
681
+ }, z.core.$strict>;
682
+ declare const ruleActions: z.ZodObject<{
683
+ fileInto: z.ZodNullable<z.ZodString>;
684
+ markRead: z.ZodBoolean;
685
+ flag: z.ZodBoolean;
686
+ stop: z.ZodBoolean;
687
+ }, z.core.$strict>;
688
+ declare const rule: z.ZodObject<{
689
+ name: z.ZodString;
690
+ enabled: z.ZodBoolean;
691
+ match: z.ZodEnum<{
692
+ any: "any";
693
+ all: "all";
694
+ }>;
695
+ conditions: z.ZodArray<z.ZodObject<{
696
+ field: z.ZodEnum<{
697
+ subject: "subject";
698
+ from: "from";
699
+ to: "to";
700
+ cc: "cc";
701
+ listId: "listId";
702
+ body: "body";
703
+ attachmentName: "attachmentName";
704
+ tag: "tag";
705
+ }>;
706
+ operator: z.ZodEnum<{
707
+ matches: "matches";
708
+ is: "is";
709
+ contains: "contains";
710
+ }>;
711
+ negate: z.ZodBoolean;
712
+ value: z.ZodString;
713
+ }, z.core.$strict>>;
714
+ actions: z.ZodObject<{
715
+ fileInto: z.ZodNullable<z.ZodString>;
716
+ markRead: z.ZodBoolean;
717
+ flag: z.ZodBoolean;
718
+ stop: z.ZodBoolean;
719
+ }, z.core.$strict>;
720
+ }, z.core.$strict>;
721
+ /** The automatic reply: calendar days read in `zone` (±hhmm); a null subject is "Auto: " and the original subject. */
722
+ declare const ruleVacation: z.ZodObject<{
723
+ start: z.ZodNullable<z.ZodString>;
724
+ end: z.ZodNullable<z.ZodString>;
725
+ zone: z.ZodString;
726
+ subject: z.ZodNullable<z.ZodString>;
727
+ body: z.ZodString;
728
+ days: z.ZodNumber;
729
+ }, z.core.$strict>;
730
+ declare const ruleForward: z.ZodObject<{
731
+ address: z.ZodString;
732
+ keepCopy: z.ZodBoolean;
733
+ }, z.core.$strict>;
734
+ /** One entry of the ordered list; exactly one of rule, text, vacation and forward is set, as `kind` says. */
735
+ declare const ruleItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
736
+ kind: z.ZodLiteral<"rule">;
737
+ enabled: z.ZodBoolean;
738
+ label: z.ZodNullable<z.ZodString>;
739
+ rule: z.ZodObject<{
740
+ name: z.ZodString;
741
+ enabled: z.ZodBoolean;
742
+ match: z.ZodEnum<{
743
+ any: "any";
744
+ all: "all";
745
+ }>;
746
+ conditions: z.ZodArray<z.ZodObject<{
747
+ field: z.ZodEnum<{
748
+ subject: "subject";
749
+ from: "from";
750
+ to: "to";
751
+ cc: "cc";
752
+ listId: "listId";
753
+ body: "body";
754
+ attachmentName: "attachmentName";
755
+ tag: "tag";
756
+ }>;
757
+ operator: z.ZodEnum<{
758
+ matches: "matches";
759
+ is: "is";
760
+ contains: "contains";
761
+ }>;
762
+ negate: z.ZodBoolean;
763
+ value: z.ZodString;
764
+ }, z.core.$strict>>;
765
+ actions: z.ZodObject<{
766
+ fileInto: z.ZodNullable<z.ZodString>;
767
+ markRead: z.ZodBoolean;
768
+ flag: z.ZodBoolean;
769
+ stop: z.ZodBoolean;
770
+ }, z.core.$strict>;
771
+ }, z.core.$strict>;
772
+ text: z.ZodNull;
773
+ vacation: z.ZodNull;
774
+ forward: z.ZodNull;
775
+ folders: z.ZodArray<z.ZodString>;
776
+ missingFolders: z.ZodArray<z.ZodString>;
777
+ }, z.core.$strict>, z.ZodObject<{
778
+ kind: z.ZodLiteral<"script">;
779
+ enabled: z.ZodBoolean;
780
+ label: z.ZodNullable<z.ZodString>;
781
+ rule: z.ZodNull;
782
+ text: z.ZodString;
783
+ vacation: z.ZodNull;
784
+ forward: z.ZodNull;
785
+ folders: z.ZodArray<z.ZodString>;
786
+ missingFolders: z.ZodArray<z.ZodString>;
787
+ }, z.core.$strict>, z.ZodObject<{
788
+ kind: z.ZodLiteral<"vacation">;
789
+ enabled: z.ZodBoolean;
790
+ label: z.ZodNull;
791
+ rule: z.ZodNull;
792
+ text: z.ZodNull;
793
+ vacation: z.ZodObject<{
794
+ start: z.ZodNullable<z.ZodString>;
795
+ end: z.ZodNullable<z.ZodString>;
796
+ zone: z.ZodString;
797
+ subject: z.ZodNullable<z.ZodString>;
798
+ body: z.ZodString;
799
+ days: z.ZodNumber;
800
+ }, z.core.$strict>;
801
+ forward: z.ZodNull;
802
+ folders: z.ZodArray<z.ZodString>;
803
+ missingFolders: z.ZodArray<z.ZodString>;
804
+ }, z.core.$strict>, z.ZodObject<{
805
+ kind: z.ZodLiteral<"forward">;
806
+ enabled: z.ZodBoolean;
807
+ label: z.ZodNull;
808
+ rule: z.ZodNull;
809
+ text: z.ZodNull;
810
+ vacation: z.ZodNull;
811
+ forward: z.ZodObject<{
812
+ address: z.ZodString;
813
+ keepCopy: z.ZodBoolean;
814
+ }, z.core.$strict>;
815
+ folders: z.ZodArray<z.ZodString>;
816
+ missingFolders: z.ZodArray<z.ZodString>;
817
+ }, z.core.$strict>], "kind">;
818
+ /**
819
+ * An item as a save sends it. An integration's save keeps the stored automatic reply and forward when it leaves them
820
+ * out; any change to them or to a block that redirects or notifies is refused as the problem `integration_send`, so
821
+ * they are typed for that refusal to be an answer.
822
+ */
823
+ declare const ruleItemInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
824
+ kind: z.ZodLiteral<"rule">;
825
+ enabled: z.ZodBoolean;
826
+ rule: z.ZodObject<{
827
+ name: z.ZodString;
828
+ enabled: z.ZodBoolean;
829
+ match: z.ZodEnum<{
830
+ any: "any";
831
+ all: "all";
832
+ }>;
833
+ conditions: z.ZodArray<z.ZodObject<{
834
+ field: z.ZodEnum<{
835
+ subject: "subject";
836
+ from: "from";
837
+ to: "to";
838
+ cc: "cc";
839
+ listId: "listId";
840
+ body: "body";
841
+ attachmentName: "attachmentName";
842
+ tag: "tag";
843
+ }>;
844
+ operator: z.ZodEnum<{
845
+ matches: "matches";
846
+ is: "is";
847
+ contains: "contains";
848
+ }>;
849
+ negate: z.ZodBoolean;
850
+ value: z.ZodString;
851
+ }, z.core.$strict>>;
852
+ actions: z.ZodObject<{
853
+ fileInto: z.ZodNullable<z.ZodString>;
854
+ markRead: z.ZodBoolean;
855
+ flag: z.ZodBoolean;
856
+ stop: z.ZodBoolean;
857
+ }, z.core.$strict>;
858
+ }, z.core.$strict>;
859
+ }, z.core.$strict>, z.ZodObject<{
860
+ kind: z.ZodLiteral<"script">;
861
+ enabled: z.ZodBoolean;
862
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
863
+ text: z.ZodString;
864
+ }, z.core.$strict>, z.ZodObject<{
865
+ kind: z.ZodLiteral<"vacation">;
866
+ enabled: z.ZodBoolean;
867
+ vacation: z.ZodObject<{
868
+ start: z.ZodNullable<z.ZodString>;
869
+ end: z.ZodNullable<z.ZodString>;
870
+ zone: z.ZodString;
871
+ subject: z.ZodNullable<z.ZodString>;
872
+ body: z.ZodString;
873
+ days: z.ZodNumber;
874
+ }, z.core.$strict>;
875
+ }, z.core.$strict>, z.ZodObject<{
876
+ kind: z.ZodLiteral<"forward">;
877
+ enabled: z.ZodBoolean;
878
+ forward: z.ZodObject<{
879
+ address: z.ZodString;
880
+ keepCopy: z.ZodBoolean;
881
+ }, z.core.$strict>;
882
+ }, z.core.$strict>], "kind">;
883
+ declare const rulesNotice: z.ZodObject<{
884
+ kind: z.ZodString;
885
+ folder: z.ZodString;
886
+ renamedTo: z.ZodString;
887
+ notedAt: z.ZodString;
888
+ }, z.core.$strict>;
889
+ declare const mailboxRules: z.ZodObject<{
890
+ accountId: z.ZodString;
891
+ kind: z.ZodEnum<{
892
+ personal: "personal";
893
+ shared: "shared";
894
+ }>;
895
+ revision: z.ZodNumber;
896
+ script: z.ZodString;
897
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
898
+ kind: z.ZodLiteral<"rule">;
899
+ enabled: z.ZodBoolean;
900
+ label: z.ZodNullable<z.ZodString>;
901
+ rule: z.ZodObject<{
902
+ name: z.ZodString;
903
+ enabled: z.ZodBoolean;
904
+ match: z.ZodEnum<{
905
+ any: "any";
906
+ all: "all";
907
+ }>;
908
+ conditions: z.ZodArray<z.ZodObject<{
909
+ field: z.ZodEnum<{
910
+ subject: "subject";
911
+ from: "from";
912
+ to: "to";
913
+ cc: "cc";
914
+ listId: "listId";
915
+ body: "body";
916
+ attachmentName: "attachmentName";
917
+ tag: "tag";
918
+ }>;
919
+ operator: z.ZodEnum<{
920
+ matches: "matches";
921
+ is: "is";
922
+ contains: "contains";
923
+ }>;
924
+ negate: z.ZodBoolean;
925
+ value: z.ZodString;
926
+ }, z.core.$strict>>;
927
+ actions: z.ZodObject<{
928
+ fileInto: z.ZodNullable<z.ZodString>;
929
+ markRead: z.ZodBoolean;
930
+ flag: z.ZodBoolean;
931
+ stop: z.ZodBoolean;
932
+ }, z.core.$strict>;
933
+ }, z.core.$strict>;
934
+ text: z.ZodNull;
935
+ vacation: z.ZodNull;
936
+ forward: z.ZodNull;
937
+ folders: z.ZodArray<z.ZodString>;
938
+ missingFolders: z.ZodArray<z.ZodString>;
939
+ }, z.core.$strict>, z.ZodObject<{
940
+ kind: z.ZodLiteral<"script">;
941
+ enabled: z.ZodBoolean;
942
+ label: z.ZodNullable<z.ZodString>;
943
+ rule: z.ZodNull;
944
+ text: z.ZodString;
945
+ vacation: z.ZodNull;
946
+ forward: z.ZodNull;
947
+ folders: z.ZodArray<z.ZodString>;
948
+ missingFolders: z.ZodArray<z.ZodString>;
949
+ }, z.core.$strict>, z.ZodObject<{
950
+ kind: z.ZodLiteral<"vacation">;
951
+ enabled: z.ZodBoolean;
952
+ label: z.ZodNull;
953
+ rule: z.ZodNull;
954
+ text: z.ZodNull;
955
+ vacation: z.ZodObject<{
956
+ start: z.ZodNullable<z.ZodString>;
957
+ end: z.ZodNullable<z.ZodString>;
958
+ zone: z.ZodString;
959
+ subject: z.ZodNullable<z.ZodString>;
960
+ body: z.ZodString;
961
+ days: z.ZodNumber;
962
+ }, z.core.$strict>;
963
+ forward: z.ZodNull;
964
+ folders: z.ZodArray<z.ZodString>;
965
+ missingFolders: z.ZodArray<z.ZodString>;
966
+ }, z.core.$strict>, z.ZodObject<{
967
+ kind: z.ZodLiteral<"forward">;
968
+ enabled: z.ZodBoolean;
969
+ label: z.ZodNull;
970
+ rule: z.ZodNull;
971
+ text: z.ZodNull;
972
+ vacation: z.ZodNull;
973
+ forward: z.ZodObject<{
974
+ address: z.ZodString;
975
+ keepCopy: z.ZodBoolean;
976
+ }, z.core.$strict>;
977
+ folders: z.ZodArray<z.ZodString>;
978
+ missingFolders: z.ZodArray<z.ZodString>;
979
+ }, z.core.$strict>], "kind">>;
980
+ notices: z.ZodArray<z.ZodObject<{
981
+ kind: z.ZodString;
982
+ folder: z.ZodString;
983
+ renamedTo: z.ZodString;
984
+ notedAt: z.ZodString;
985
+ }, z.core.$strict>>;
986
+ }, z.core.$strict>;
987
+ /** Why a script or rule was refused: zero-based item and condition, one-based script line and column. */
988
+ declare const rulesProblem: z.ZodObject<{
989
+ code: z.ZodString;
990
+ item: z.ZodNullable<z.ZodNumber>;
991
+ condition: z.ZodNullable<z.ZodNumber>;
992
+ line: z.ZodNullable<z.ZodNumber>;
993
+ column: z.ZodNullable<z.ZodNumber>;
994
+ message: z.ZodString;
995
+ detail: z.ZodNullable<z.ZodString>;
996
+ }, z.core.$strict>;
997
+ declare const rulesChecked: z.ZodObject<{
998
+ ok: z.ZodBoolean;
999
+ problems: z.ZodArray<z.ZodObject<{
1000
+ code: z.ZodString;
1001
+ item: z.ZodNullable<z.ZodNumber>;
1002
+ condition: z.ZodNullable<z.ZodNumber>;
1003
+ line: z.ZodNullable<z.ZodNumber>;
1004
+ column: z.ZodNullable<z.ZodNumber>;
1005
+ message: z.ZodString;
1006
+ detail: z.ZodNullable<z.ZodString>;
1007
+ }, z.core.$strict>>;
1008
+ }, z.core.$strict>;
1009
+ /** `normalized`: the service moved an automatic reply or forward back ahead of the rules. */
1010
+ declare const rulesSaved: z.ZodDiscriminatedUnion<[z.ZodObject<{
1011
+ status: z.ZodLiteral<"saved">;
1012
+ revision: z.ZodNumber;
1013
+ script: z.ZodString;
1014
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1015
+ kind: z.ZodLiteral<"rule">;
1016
+ enabled: z.ZodBoolean;
1017
+ label: z.ZodNullable<z.ZodString>;
1018
+ rule: z.ZodObject<{
1019
+ name: z.ZodString;
1020
+ enabled: z.ZodBoolean;
1021
+ match: z.ZodEnum<{
1022
+ any: "any";
1023
+ all: "all";
1024
+ }>;
1025
+ conditions: z.ZodArray<z.ZodObject<{
1026
+ field: z.ZodEnum<{
1027
+ subject: "subject";
1028
+ from: "from";
1029
+ to: "to";
1030
+ cc: "cc";
1031
+ listId: "listId";
1032
+ body: "body";
1033
+ attachmentName: "attachmentName";
1034
+ tag: "tag";
1035
+ }>;
1036
+ operator: z.ZodEnum<{
1037
+ matches: "matches";
1038
+ is: "is";
1039
+ contains: "contains";
1040
+ }>;
1041
+ negate: z.ZodBoolean;
1042
+ value: z.ZodString;
1043
+ }, z.core.$strict>>;
1044
+ actions: z.ZodObject<{
1045
+ fileInto: z.ZodNullable<z.ZodString>;
1046
+ markRead: z.ZodBoolean;
1047
+ flag: z.ZodBoolean;
1048
+ stop: z.ZodBoolean;
1049
+ }, z.core.$strict>;
1050
+ }, z.core.$strict>;
1051
+ text: z.ZodNull;
1052
+ vacation: z.ZodNull;
1053
+ forward: z.ZodNull;
1054
+ folders: z.ZodArray<z.ZodString>;
1055
+ missingFolders: z.ZodArray<z.ZodString>;
1056
+ }, z.core.$strict>, z.ZodObject<{
1057
+ kind: z.ZodLiteral<"script">;
1058
+ enabled: z.ZodBoolean;
1059
+ label: z.ZodNullable<z.ZodString>;
1060
+ rule: z.ZodNull;
1061
+ text: z.ZodString;
1062
+ vacation: z.ZodNull;
1063
+ forward: z.ZodNull;
1064
+ folders: z.ZodArray<z.ZodString>;
1065
+ missingFolders: z.ZodArray<z.ZodString>;
1066
+ }, z.core.$strict>, z.ZodObject<{
1067
+ kind: z.ZodLiteral<"vacation">;
1068
+ enabled: z.ZodBoolean;
1069
+ label: z.ZodNull;
1070
+ rule: z.ZodNull;
1071
+ text: z.ZodNull;
1072
+ vacation: z.ZodObject<{
1073
+ start: z.ZodNullable<z.ZodString>;
1074
+ end: z.ZodNullable<z.ZodString>;
1075
+ zone: z.ZodString;
1076
+ subject: z.ZodNullable<z.ZodString>;
1077
+ body: z.ZodString;
1078
+ days: z.ZodNumber;
1079
+ }, z.core.$strict>;
1080
+ forward: z.ZodNull;
1081
+ folders: z.ZodArray<z.ZodString>;
1082
+ missingFolders: z.ZodArray<z.ZodString>;
1083
+ }, z.core.$strict>, z.ZodObject<{
1084
+ kind: z.ZodLiteral<"forward">;
1085
+ enabled: z.ZodBoolean;
1086
+ label: z.ZodNull;
1087
+ rule: z.ZodNull;
1088
+ text: z.ZodNull;
1089
+ vacation: z.ZodNull;
1090
+ forward: z.ZodObject<{
1091
+ address: z.ZodString;
1092
+ keepCopy: z.ZodBoolean;
1093
+ }, z.core.$strict>;
1094
+ folders: z.ZodArray<z.ZodString>;
1095
+ missingFolders: z.ZodArray<z.ZodString>;
1096
+ }, z.core.$strict>], "kind">>;
1097
+ normalized: z.ZodBoolean;
1098
+ }, z.core.$strict>, z.ZodObject<{
1099
+ status: z.ZodLiteral<"rejected">;
1100
+ problems: z.ZodArray<z.ZodObject<{
1101
+ code: z.ZodString;
1102
+ item: z.ZodNullable<z.ZodNumber>;
1103
+ condition: z.ZodNullable<z.ZodNumber>;
1104
+ line: z.ZodNullable<z.ZodNumber>;
1105
+ column: z.ZodNullable<z.ZodNumber>;
1106
+ message: z.ZodString;
1107
+ detail: z.ZodNullable<z.ZodString>;
1108
+ }, z.core.$strict>>;
1109
+ }, z.core.$strict>], "status">;
1110
+ declare const rulesInputs: {
1111
+ get: z.ZodObject<{
1112
+ accountId: z.ZodString;
1113
+ }, z.core.$strict>;
1114
+ check: z.ZodObject<{
1115
+ accountId: z.ZodString;
1116
+ script: z.ZodString;
1117
+ }, z.core.$strict>;
1118
+ /** Exactly one of items (re-rendered in the canonical layout) or script (stored as written). */
1119
+ save: z.ZodUnion<readonly [z.ZodObject<{
1120
+ accountId: z.ZodString;
1121
+ expectedRevision: z.ZodNumber;
1122
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1123
+ kind: z.ZodLiteral<"rule">;
1124
+ enabled: z.ZodBoolean;
1125
+ rule: z.ZodObject<{
1126
+ name: z.ZodString;
1127
+ enabled: z.ZodBoolean;
1128
+ match: z.ZodEnum<{
1129
+ any: "any";
1130
+ all: "all";
1131
+ }>;
1132
+ conditions: z.ZodArray<z.ZodObject<{
1133
+ field: z.ZodEnum<{
1134
+ subject: "subject";
1135
+ from: "from";
1136
+ to: "to";
1137
+ cc: "cc";
1138
+ listId: "listId";
1139
+ body: "body";
1140
+ attachmentName: "attachmentName";
1141
+ tag: "tag";
1142
+ }>;
1143
+ operator: z.ZodEnum<{
1144
+ matches: "matches";
1145
+ is: "is";
1146
+ contains: "contains";
1147
+ }>;
1148
+ negate: z.ZodBoolean;
1149
+ value: z.ZodString;
1150
+ }, z.core.$strict>>;
1151
+ actions: z.ZodObject<{
1152
+ fileInto: z.ZodNullable<z.ZodString>;
1153
+ markRead: z.ZodBoolean;
1154
+ flag: z.ZodBoolean;
1155
+ stop: z.ZodBoolean;
1156
+ }, z.core.$strict>;
1157
+ }, z.core.$strict>;
1158
+ }, z.core.$strict>, z.ZodObject<{
1159
+ kind: z.ZodLiteral<"script">;
1160
+ enabled: z.ZodBoolean;
1161
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1162
+ text: z.ZodString;
1163
+ }, z.core.$strict>, z.ZodObject<{
1164
+ kind: z.ZodLiteral<"vacation">;
1165
+ enabled: z.ZodBoolean;
1166
+ vacation: z.ZodObject<{
1167
+ start: z.ZodNullable<z.ZodString>;
1168
+ end: z.ZodNullable<z.ZodString>;
1169
+ zone: z.ZodString;
1170
+ subject: z.ZodNullable<z.ZodString>;
1171
+ body: z.ZodString;
1172
+ days: z.ZodNumber;
1173
+ }, z.core.$strict>;
1174
+ }, z.core.$strict>, z.ZodObject<{
1175
+ kind: z.ZodLiteral<"forward">;
1176
+ enabled: z.ZodBoolean;
1177
+ forward: z.ZodObject<{
1178
+ address: z.ZodString;
1179
+ keepCopy: z.ZodBoolean;
1180
+ }, z.core.$strict>;
1181
+ }, z.core.$strict>], "kind">>;
1182
+ }, z.core.$strict>, z.ZodObject<{
1183
+ accountId: z.ZodString;
1184
+ expectedRevision: z.ZodNumber;
1185
+ script: z.ZodString;
1186
+ }, z.core.$strict>]>;
1187
+ /** One edit of the ordered items: move needs `to`, toggle `enabled`, put `rule` (replace at index or append). */
1188
+ items: z.ZodDiscriminatedUnion<[z.ZodObject<{
1189
+ accountId: z.ZodString;
1190
+ expectedRevision: z.ZodNumber;
1191
+ operation: z.ZodLiteral<"move">;
1192
+ index: z.ZodNumber;
1193
+ to: z.ZodNumber;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ accountId: z.ZodString;
1196
+ expectedRevision: z.ZodNumber;
1197
+ operation: z.ZodLiteral<"toggle">;
1198
+ index: z.ZodNumber;
1199
+ enabled: z.ZodBoolean;
1200
+ }, z.core.$strict>, z.ZodObject<{
1201
+ accountId: z.ZodString;
1202
+ expectedRevision: z.ZodNumber;
1203
+ operation: z.ZodLiteral<"delete">;
1204
+ index: z.ZodNumber;
1205
+ }, z.core.$strict>, z.ZodObject<{
1206
+ accountId: z.ZodString;
1207
+ expectedRevision: z.ZodNumber;
1208
+ operation: z.ZodLiteral<"put">;
1209
+ index: z.ZodNumber;
1210
+ rule: z.ZodObject<{
1211
+ name: z.ZodString;
1212
+ enabled: z.ZodBoolean;
1213
+ match: z.ZodEnum<{
1214
+ any: "any";
1215
+ all: "all";
1216
+ }>;
1217
+ conditions: z.ZodArray<z.ZodObject<{
1218
+ field: z.ZodEnum<{
1219
+ subject: "subject";
1220
+ from: "from";
1221
+ to: "to";
1222
+ cc: "cc";
1223
+ listId: "listId";
1224
+ body: "body";
1225
+ attachmentName: "attachmentName";
1226
+ tag: "tag";
1227
+ }>;
1228
+ operator: z.ZodEnum<{
1229
+ matches: "matches";
1230
+ is: "is";
1231
+ contains: "contains";
1232
+ }>;
1233
+ negate: z.ZodBoolean;
1234
+ value: z.ZodString;
1235
+ }, z.core.$strict>>;
1236
+ actions: z.ZodObject<{
1237
+ fileInto: z.ZodNullable<z.ZodString>;
1238
+ markRead: z.ZodBoolean;
1239
+ flag: z.ZodBoolean;
1240
+ stop: z.ZodBoolean;
1241
+ }, z.core.$strict>;
1242
+ }, z.core.$strict>;
1243
+ }, z.core.$strict>], "operation">;
1244
+ };
1245
+ type RuleCondition = z.infer<typeof ruleCondition>;
1246
+ type RuleActions = z.infer<typeof ruleActions>;
1247
+ type Rule = z.infer<typeof rule>;
1248
+ type RuleVacation = z.infer<typeof ruleVacation>;
1249
+ type RuleForward = z.infer<typeof ruleForward>;
1250
+ type RuleItem = z.infer<typeof ruleItem>;
1251
+ type RuleItemInput = z.infer<typeof ruleItemInput>;
1252
+ type RulesNotice = z.infer<typeof rulesNotice>;
1253
+ type MailboxRules = z.infer<typeof mailboxRules>;
1254
+ type RulesProblem = z.infer<typeof rulesProblem>;
1255
+ type RulesChecked = z.infer<typeof rulesChecked>;
1256
+ type RulesSaved = z.infer<typeof rulesSaved>;
1257
+
1258
+ /** A 64 KiB script needs more than the 16 KiB metadata bound once JSON-escaped. */
1259
+ declare const RULES_REQUEST_BYTES: number;
1260
+ /** Rules answers share the large-content bound of mailbox reads. */
1261
+ declare const RULES_RESPONSE_BYTES: number;
1262
+ /** Exact server routes and finite per-operation bounds, shared by SDK and API. */
1263
+ declare const headlessOperations: {
1264
+ readonly mailboxes: {
1265
+ path: string;
1266
+ internal: string;
1267
+ input: z.ZodObject<{
1268
+ after: z.ZodOptional<z.ZodUUID>;
1269
+ limit: z.ZodNumber;
1270
+ }, z.core.$strict>;
1271
+ output: z.ZodObject<{
1272
+ mailboxes: z.ZodArray<z.ZodObject<{
1273
+ id: z.ZodString;
1274
+ domainId: z.ZodString;
1275
+ kind: z.ZodEnum<{
1276
+ personal: "personal";
1277
+ shared: "shared";
1278
+ }>;
1279
+ displayName: z.ZodString;
1280
+ address: z.ZodString;
1281
+ }, z.core.$strict>>;
1282
+ next: z.ZodNullable<z.ZodString>;
1283
+ }, z.core.$strict>;
1284
+ envelope: z.ZodObject<{
1285
+ data: z.ZodObject<{
1286
+ mailboxes: z.ZodArray<z.ZodObject<{
1287
+ id: z.ZodString;
1288
+ domainId: z.ZodString;
1289
+ kind: z.ZodEnum<{
1290
+ personal: "personal";
1291
+ shared: "shared";
1292
+ }>;
1293
+ displayName: z.ZodString;
1294
+ address: z.ZodString;
1295
+ }, z.core.$strict>>;
1296
+ next: z.ZodNullable<z.ZodString>;
1297
+ }, z.core.$strict>;
1298
+ }, z.core.$strict>;
1299
+ requestBytes: number;
1300
+ responseBytes: number;
1301
+ upload: boolean;
1302
+ key: "id" | "operationId" | undefined;
1303
+ revision: boolean;
1304
+ };
1305
+ readonly open: {
1306
+ path: string;
1307
+ internal: string;
1308
+ input: z.ZodObject<{
1309
+ accountId: z.ZodUUID;
1310
+ }, z.core.$strict>;
1311
+ output: z.ZodObject<{
1312
+ folders: z.ZodArray<z.ZodObject<{
1313
+ id: z.ZodString;
1314
+ name: z.ZodString;
1315
+ uidValidity: z.ZodNumber;
1316
+ specialUse: z.ZodOptional<z.ZodEnum<{
1317
+ "\\Drafts": "\\Drafts";
1318
+ "\\Sent": "\\Sent";
1319
+ "\\Junk": "\\Junk";
1320
+ "\\Trash": "\\Trash";
1321
+ "\\Archive": "\\Archive";
1322
+ }>>;
1323
+ }, z.core.$strict>>;
1324
+ senders: z.ZodArray<z.ZodObject<{
1325
+ id: z.ZodString;
1326
+ address: z.ZodString;
1327
+ }, z.core.$strict>>;
1328
+ rights: z.ZodNumber;
1329
+ canDraft: z.ZodBoolean;
1330
+ }, z.core.$strict>;
1331
+ envelope: z.ZodObject<{
1332
+ data: z.ZodObject<{
1333
+ folders: z.ZodArray<z.ZodObject<{
1334
+ id: z.ZodString;
1335
+ name: z.ZodString;
1336
+ uidValidity: z.ZodNumber;
1337
+ specialUse: z.ZodOptional<z.ZodEnum<{
1338
+ "\\Drafts": "\\Drafts";
1339
+ "\\Sent": "\\Sent";
1340
+ "\\Junk": "\\Junk";
1341
+ "\\Trash": "\\Trash";
1342
+ "\\Archive": "\\Archive";
1343
+ }>>;
1344
+ }, z.core.$strict>>;
1345
+ senders: z.ZodArray<z.ZodObject<{
1346
+ id: z.ZodString;
1347
+ address: z.ZodString;
1348
+ }, z.core.$strict>>;
1349
+ rights: z.ZodNumber;
1350
+ canDraft: z.ZodBoolean;
1351
+ }, z.core.$strict>;
1352
+ }, z.core.$strict>;
1353
+ requestBytes: number;
1354
+ responseBytes: number;
1355
+ upload: boolean;
1356
+ key: "id" | "operationId" | undefined;
1357
+ revision: boolean;
1358
+ };
1359
+ readonly list: {
1360
+ path: string;
1361
+ internal: string;
1362
+ input: z.ZodObject<{
1363
+ accountId: z.ZodUUID;
1364
+ folderId: z.ZodUUID;
1365
+ uidValidity: z.ZodNumber;
1366
+ before: z.ZodNumber;
1367
+ limit: z.ZodNumber;
1368
+ }, z.core.$strict>;
1369
+ output: z.ZodObject<{
1370
+ entries: z.ZodArray<z.ZodObject<{
1371
+ uid: z.ZodNumber;
1372
+ id: z.ZodString;
1373
+ flags: z.ZodNumber;
1374
+ date: z.ZodString;
1375
+ octets: z.ZodNumber;
1376
+ preview: z.ZodString;
1377
+ hasAttachment: z.ZodBoolean;
1378
+ subject: z.ZodString;
1379
+ from: z.ZodString;
1380
+ to: z.ZodString;
1381
+ }, z.core.$strict>>;
1382
+ next: z.ZodNumber;
1383
+ hasMore: z.ZodBoolean;
1384
+ count: z.ZodNumber;
1385
+ }, z.core.$strict>;
1386
+ envelope: z.ZodObject<{
1387
+ data: z.ZodObject<{
1388
+ entries: z.ZodArray<z.ZodObject<{
1389
+ uid: z.ZodNumber;
1390
+ id: z.ZodString;
1391
+ flags: z.ZodNumber;
1392
+ date: z.ZodString;
1393
+ octets: z.ZodNumber;
1394
+ preview: z.ZodString;
1395
+ hasAttachment: z.ZodBoolean;
1396
+ subject: z.ZodString;
1397
+ from: z.ZodString;
1398
+ to: z.ZodString;
1399
+ }, z.core.$strict>>;
1400
+ next: z.ZodNumber;
1401
+ hasMore: z.ZodBoolean;
1402
+ count: z.ZodNumber;
1403
+ }, z.core.$strict>;
1404
+ }, z.core.$strict>;
1405
+ requestBytes: number;
1406
+ responseBytes: number;
1407
+ upload: boolean;
1408
+ key: "id" | "operationId" | undefined;
1409
+ revision: boolean;
1410
+ };
1411
+ readonly read: {
1412
+ path: string;
1413
+ internal: string;
1414
+ input: z.ZodObject<{
1415
+ accountId: z.ZodUUID;
1416
+ folderId: z.ZodUUID;
1417
+ uidValidity: z.ZodNumber;
1418
+ uid: z.ZodNumber;
1419
+ }, z.core.$strict>;
1420
+ output: z.ZodObject<{
1421
+ entry: z.ZodObject<{
1422
+ uid: z.ZodNumber;
1423
+ id: z.ZodString;
1424
+ flags: z.ZodNumber;
1425
+ date: z.ZodString;
1426
+ octets: z.ZodNumber;
1427
+ preview: z.ZodString;
1428
+ hasAttachment: z.ZodBoolean;
1429
+ subject: z.ZodString;
1430
+ from: z.ZodString;
1431
+ to: z.ZodString;
1432
+ }, z.core.$strict>;
1433
+ headers: z.ZodObject<{
1434
+ subject: z.ZodString;
1435
+ from: z.ZodString;
1436
+ to: z.ZodString;
1437
+ cc: z.ZodString;
1438
+ replyTo: z.ZodString;
1439
+ messageId: z.ZodString;
1440
+ unsubscribe: z.ZodOptional<z.ZodString>;
1441
+ }, z.core.$strict>;
1442
+ text: z.ZodString;
1443
+ html: z.ZodString;
1444
+ attachments: z.ZodArray<z.ZodObject<{
1445
+ contentId: z.ZodOptional<z.ZodString>;
1446
+ part: z.ZodString;
1447
+ name: z.ZodString;
1448
+ type: z.ZodString;
1449
+ octets: z.ZodNumber;
1450
+ }, z.core.$strict>>;
1451
+ warnings: z.ZodArray<z.ZodEnum<{
1452
+ incomplete_scan: "incomplete_scan";
1453
+ hosted_domain_unaligned: "hosted_domain_unaligned";
1454
+ link_text_mismatch: "link_text_mismatch";
1455
+ lookalike_brand: "lookalike_brand";
1456
+ lookalike_tenant: "lookalike_tenant";
1457
+ homograph_domain: "homograph_domain";
1458
+ credential_form: "credential_form";
1459
+ dangerous_attachment: "dangerous_attachment";
1460
+ encrypted_archive: "encrypted_archive";
1461
+ }>>;
1462
+ incomplete: z.ZodBoolean;
1463
+ }, z.core.$strict>;
1464
+ envelope: z.ZodObject<{
1465
+ data: z.ZodObject<{
1466
+ entry: z.ZodObject<{
1467
+ uid: z.ZodNumber;
1468
+ id: z.ZodString;
1469
+ flags: z.ZodNumber;
1470
+ date: z.ZodString;
1471
+ octets: z.ZodNumber;
1472
+ preview: z.ZodString;
1473
+ hasAttachment: z.ZodBoolean;
1474
+ subject: z.ZodString;
1475
+ from: z.ZodString;
1476
+ to: z.ZodString;
1477
+ }, z.core.$strict>;
1478
+ headers: z.ZodObject<{
1479
+ subject: z.ZodString;
1480
+ from: z.ZodString;
1481
+ to: z.ZodString;
1482
+ cc: z.ZodString;
1483
+ replyTo: z.ZodString;
1484
+ messageId: z.ZodString;
1485
+ unsubscribe: z.ZodOptional<z.ZodString>;
1486
+ }, z.core.$strict>;
1487
+ text: z.ZodString;
1488
+ html: z.ZodString;
1489
+ attachments: z.ZodArray<z.ZodObject<{
1490
+ contentId: z.ZodOptional<z.ZodString>;
1491
+ part: z.ZodString;
1492
+ name: z.ZodString;
1493
+ type: z.ZodString;
1494
+ octets: z.ZodNumber;
1495
+ }, z.core.$strict>>;
1496
+ warnings: z.ZodArray<z.ZodEnum<{
1497
+ incomplete_scan: "incomplete_scan";
1498
+ hosted_domain_unaligned: "hosted_domain_unaligned";
1499
+ link_text_mismatch: "link_text_mismatch";
1500
+ lookalike_brand: "lookalike_brand";
1501
+ lookalike_tenant: "lookalike_tenant";
1502
+ homograph_domain: "homograph_domain";
1503
+ credential_form: "credential_form";
1504
+ dangerous_attachment: "dangerous_attachment";
1505
+ encrypted_archive: "encrypted_archive";
1506
+ }>>;
1507
+ incomplete: z.ZodBoolean;
1508
+ }, z.core.$strict>;
1509
+ }, z.core.$strict>;
1510
+ requestBytes: number;
1511
+ responseBytes: number;
1512
+ upload: boolean;
1513
+ key: "id" | "operationId" | undefined;
1514
+ revision: boolean;
1515
+ };
1516
+ readonly conversations: {
1517
+ path: string;
1518
+ internal: string;
1519
+ input: z.ZodObject<{
1520
+ accountId: z.ZodUUID;
1521
+ folderId: z.ZodUUID;
1522
+ uidValidity: z.ZodNumber;
1523
+ cursor: z.ZodString;
1524
+ limit: z.ZodNumber;
1525
+ }, z.core.$strict>;
1526
+ output: z.ZodObject<{
1527
+ conversations: z.ZodArray<z.ZodObject<{
1528
+ id: z.ZodString;
1529
+ latest: z.ZodObject<{
1530
+ uid: z.ZodNumber;
1531
+ id: z.ZodString;
1532
+ flags: z.ZodNumber;
1533
+ date: z.ZodString;
1534
+ octets: z.ZodNumber;
1535
+ preview: z.ZodString;
1536
+ hasAttachment: z.ZodBoolean;
1537
+ subject: z.ZodString;
1538
+ from: z.ZodString;
1539
+ to: z.ZodString;
1540
+ }, z.core.$strict>;
1541
+ messages: z.ZodNumber;
1542
+ unread: z.ZodNumber;
1543
+ starred: z.ZodBoolean;
1544
+ hasAttachment: z.ZodBoolean;
1545
+ participants: z.ZodArray<z.ZodObject<{
1546
+ address: z.ZodString;
1547
+ name: z.ZodString;
1548
+ }, z.core.$strict>>;
1549
+ }, z.core.$strict>>;
1550
+ next: z.ZodString;
1551
+ hasMore: z.ZodBoolean;
1552
+ unindexed: z.ZodNumber;
1553
+ }, z.core.$strict>;
1554
+ envelope: z.ZodObject<{
1555
+ data: z.ZodObject<{
1556
+ conversations: z.ZodArray<z.ZodObject<{
1557
+ id: z.ZodString;
1558
+ latest: z.ZodObject<{
1559
+ uid: z.ZodNumber;
1560
+ id: z.ZodString;
1561
+ flags: z.ZodNumber;
1562
+ date: z.ZodString;
1563
+ octets: z.ZodNumber;
1564
+ preview: z.ZodString;
1565
+ hasAttachment: z.ZodBoolean;
1566
+ subject: z.ZodString;
1567
+ from: z.ZodString;
1568
+ to: z.ZodString;
1569
+ }, z.core.$strict>;
1570
+ messages: z.ZodNumber;
1571
+ unread: z.ZodNumber;
1572
+ starred: z.ZodBoolean;
1573
+ hasAttachment: z.ZodBoolean;
1574
+ participants: z.ZodArray<z.ZodObject<{
1575
+ address: z.ZodString;
1576
+ name: z.ZodString;
1577
+ }, z.core.$strict>>;
1578
+ }, z.core.$strict>>;
1579
+ next: z.ZodString;
1580
+ hasMore: z.ZodBoolean;
1581
+ unindexed: z.ZodNumber;
1582
+ }, z.core.$strict>;
1583
+ }, z.core.$strict>;
1584
+ requestBytes: number;
1585
+ responseBytes: number;
1586
+ upload: boolean;
1587
+ key: "id" | "operationId" | undefined;
1588
+ revision: boolean;
1589
+ };
1590
+ readonly conversation: {
1591
+ path: string;
1592
+ internal: string;
1593
+ input: z.ZodUnion<readonly [z.ZodObject<{
1594
+ accountId: z.ZodUUID;
1595
+ folderId: z.ZodUUID;
1596
+ uidValidity: z.ZodNumber;
1597
+ conversationId: z.ZodUUID;
1598
+ cursor: z.ZodString;
1599
+ limit: z.ZodNumber;
1600
+ }, z.core.$strict>, z.ZodObject<{
1601
+ accountId: z.ZodUUID;
1602
+ folderId: z.ZodUUID;
1603
+ uidValidity: z.ZodNumber;
1604
+ uid: z.ZodNumber;
1605
+ cursor: z.ZodString;
1606
+ limit: z.ZodNumber;
1607
+ }, z.core.$strict>]>;
1608
+ output: z.ZodObject<{
1609
+ id: z.ZodString;
1610
+ messages: z.ZodArray<z.ZodObject<{
1611
+ id: z.ZodString;
1612
+ headerId: z.ZodString;
1613
+ parent: z.ZodNullable<z.ZodString>;
1614
+ date: z.ZodString;
1615
+ subject: z.ZodString;
1616
+ from: z.ZodString;
1617
+ to: z.ZodString;
1618
+ cc: z.ZodString;
1619
+ locations: z.ZodArray<z.ZodObject<{
1620
+ folderId: z.ZodString;
1621
+ uidValidity: z.ZodNumber;
1622
+ uid: z.ZodNumber;
1623
+ flags: z.ZodNumber;
1624
+ }, z.core.$strict>>;
1625
+ reply: z.ZodObject<{
1626
+ inReplyTo: z.ZodString;
1627
+ references: z.ZodArray<z.ZodString>;
1628
+ }, z.core.$strict>;
1629
+ chat: z.ZodObject<{
1630
+ text: z.ZodString;
1631
+ quoted: z.ZodBoolean;
1632
+ signature: z.ZodString;
1633
+ truncated: z.ZodBoolean;
1634
+ }, z.core.$strict>;
1635
+ hasHTML: z.ZodBoolean;
1636
+ attachments: z.ZodArray<z.ZodObject<{
1637
+ contentId: z.ZodOptional<z.ZodString>;
1638
+ part: z.ZodString;
1639
+ name: z.ZodString;
1640
+ type: z.ZodString;
1641
+ octets: z.ZodNumber;
1642
+ }, z.core.$strict>>;
1643
+ warnings: z.ZodArray<z.ZodEnum<{
1644
+ incomplete_scan: "incomplete_scan";
1645
+ hosted_domain_unaligned: "hosted_domain_unaligned";
1646
+ link_text_mismatch: "link_text_mismatch";
1647
+ lookalike_brand: "lookalike_brand";
1648
+ lookalike_tenant: "lookalike_tenant";
1649
+ homograph_domain: "homograph_domain";
1650
+ credential_form: "credential_form";
1651
+ dangerous_attachment: "dangerous_attachment";
1652
+ encrypted_archive: "encrypted_archive";
1653
+ }>>;
1654
+ incomplete: z.ZodBoolean;
1655
+ }, z.core.$strict>>;
1656
+ count: z.ZodNumber;
1657
+ earlier: z.ZodString;
1658
+ }, z.core.$strict>;
1659
+ envelope: z.ZodObject<{
1660
+ data: z.ZodObject<{
1661
+ id: z.ZodString;
1662
+ messages: z.ZodArray<z.ZodObject<{
1663
+ id: z.ZodString;
1664
+ headerId: z.ZodString;
1665
+ parent: z.ZodNullable<z.ZodString>;
1666
+ date: z.ZodString;
1667
+ subject: z.ZodString;
1668
+ from: z.ZodString;
1669
+ to: z.ZodString;
1670
+ cc: z.ZodString;
1671
+ locations: z.ZodArray<z.ZodObject<{
1672
+ folderId: z.ZodString;
1673
+ uidValidity: z.ZodNumber;
1674
+ uid: z.ZodNumber;
1675
+ flags: z.ZodNumber;
1676
+ }, z.core.$strict>>;
1677
+ reply: z.ZodObject<{
1678
+ inReplyTo: z.ZodString;
1679
+ references: z.ZodArray<z.ZodString>;
1680
+ }, z.core.$strict>;
1681
+ chat: z.ZodObject<{
1682
+ text: z.ZodString;
1683
+ quoted: z.ZodBoolean;
1684
+ signature: z.ZodString;
1685
+ truncated: z.ZodBoolean;
1686
+ }, z.core.$strict>;
1687
+ hasHTML: z.ZodBoolean;
1688
+ attachments: z.ZodArray<z.ZodObject<{
1689
+ contentId: z.ZodOptional<z.ZodString>;
1690
+ part: z.ZodString;
1691
+ name: z.ZodString;
1692
+ type: z.ZodString;
1693
+ octets: z.ZodNumber;
1694
+ }, z.core.$strict>>;
1695
+ warnings: z.ZodArray<z.ZodEnum<{
1696
+ incomplete_scan: "incomplete_scan";
1697
+ hosted_domain_unaligned: "hosted_domain_unaligned";
1698
+ link_text_mismatch: "link_text_mismatch";
1699
+ lookalike_brand: "lookalike_brand";
1700
+ lookalike_tenant: "lookalike_tenant";
1701
+ homograph_domain: "homograph_domain";
1702
+ credential_form: "credential_form";
1703
+ dangerous_attachment: "dangerous_attachment";
1704
+ encrypted_archive: "encrypted_archive";
1705
+ }>>;
1706
+ incomplete: z.ZodBoolean;
1707
+ }, z.core.$strict>>;
1708
+ count: z.ZodNumber;
1709
+ earlier: z.ZodString;
1710
+ }, z.core.$strict>;
1711
+ }, z.core.$strict>;
1712
+ requestBytes: number;
1713
+ responseBytes: number;
1714
+ upload: boolean;
1715
+ key: "id" | "operationId" | undefined;
1716
+ revision: boolean;
1717
+ };
1718
+ readonly download: {
1719
+ path: string;
1720
+ internal: string;
1721
+ input: z.ZodObject<{
1722
+ accountId: z.ZodUUID;
1723
+ folderId: z.ZodUUID;
1724
+ uidValidity: z.ZodNumber;
1725
+ uid: z.ZodNumber;
1726
+ part: z.ZodString;
1727
+ }, z.core.$strict>;
1728
+ output: z.ZodObject<{
1729
+ name: z.ZodString;
1730
+ data: z.ZodString;
1731
+ }, z.core.$strict>;
1732
+ envelope: z.ZodObject<{
1733
+ data: z.ZodObject<{
1734
+ name: z.ZodString;
1735
+ data: z.ZodString;
1736
+ }, z.core.$strict>;
1737
+ }, z.core.$strict>;
1738
+ requestBytes: number;
1739
+ responseBytes: number;
1740
+ upload: boolean;
1741
+ key: "id" | "operationId" | undefined;
1742
+ revision: boolean;
1743
+ };
1744
+ readonly change: {
1745
+ path: string;
1746
+ internal: string;
1747
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
1748
+ accountId: z.ZodUUID;
1749
+ folderId: z.ZodUUID;
1750
+ uidValidity: z.ZodNumber;
1751
+ uid: z.ZodNumber;
1752
+ operationId: z.ZodUUID;
1753
+ action: z.ZodEnum<{
1754
+ starred: "starred";
1755
+ seen: "seen";
1756
+ }>;
1757
+ enabled: z.ZodBoolean;
1758
+ }, z.core.$strict>, z.ZodObject<{
1759
+ accountId: z.ZodUUID;
1760
+ folderId: z.ZodUUID;
1761
+ uidValidity: z.ZodNumber;
1762
+ uid: z.ZodNumber;
1763
+ operationId: z.ZodUUID;
1764
+ action: z.ZodLiteral<"move">;
1765
+ destinationId: z.ZodUUID;
1766
+ destinationValidity: z.ZodNumber;
1767
+ }, z.core.$strict>], "action">;
1768
+ output: z.ZodObject<{
1769
+ operationId: z.ZodString;
1770
+ }, z.core.$strict>;
1771
+ envelope: z.ZodObject<{
1772
+ data: z.ZodObject<{
1773
+ operationId: z.ZodString;
1774
+ }, z.core.$strict>;
1775
+ }, z.core.$strict>;
1776
+ requestBytes: number;
1777
+ responseBytes: number;
1778
+ upload: boolean;
1779
+ key: "id" | "operationId" | undefined;
1780
+ revision: boolean;
1781
+ };
1782
+ readonly createFolder: {
1783
+ path: string;
1784
+ internal: string;
1785
+ input: z.ZodObject<{
1786
+ accountId: z.ZodUUID;
1787
+ operationId: z.ZodUUID;
1788
+ name: z.ZodString;
1789
+ }, z.core.$strict>;
1790
+ output: z.ZodObject<{
1791
+ id: z.ZodString;
1792
+ name: z.ZodString;
1793
+ uidValidity: z.ZodNumber;
1794
+ specialUse: z.ZodOptional<z.ZodEnum<{
1795
+ "\\Drafts": "\\Drafts";
1796
+ "\\Sent": "\\Sent";
1797
+ "\\Junk": "\\Junk";
1798
+ "\\Trash": "\\Trash";
1799
+ "\\Archive": "\\Archive";
1800
+ }>>;
1801
+ }, z.core.$strict>;
1802
+ envelope: z.ZodObject<{
1803
+ data: z.ZodObject<{
1804
+ id: z.ZodString;
1805
+ name: z.ZodString;
1806
+ uidValidity: z.ZodNumber;
1807
+ specialUse: z.ZodOptional<z.ZodEnum<{
1808
+ "\\Drafts": "\\Drafts";
1809
+ "\\Sent": "\\Sent";
1810
+ "\\Junk": "\\Junk";
1811
+ "\\Trash": "\\Trash";
1812
+ "\\Archive": "\\Archive";
1813
+ }>>;
1814
+ }, z.core.$strict>;
1815
+ }, z.core.$strict>;
1816
+ requestBytes: number;
1817
+ responseBytes: number;
1818
+ upload: boolean;
1819
+ key: "id" | "operationId" | undefined;
1820
+ revision: boolean;
1821
+ };
1822
+ readonly renameFolder: {
1823
+ path: string;
1824
+ internal: string;
1825
+ input: z.ZodObject<{
1826
+ accountId: z.ZodUUID;
1827
+ operationId: z.ZodUUID;
1828
+ name: z.ZodString;
1829
+ newName: z.ZodString;
1830
+ }, z.core.$strict>;
1831
+ output: z.ZodObject<{
1832
+ folders: z.ZodArray<z.ZodObject<{
1833
+ id: z.ZodString;
1834
+ name: z.ZodString;
1835
+ uidValidity: z.ZodNumber;
1836
+ specialUse: z.ZodOptional<z.ZodEnum<{
1837
+ "\\Drafts": "\\Drafts";
1838
+ "\\Sent": "\\Sent";
1839
+ "\\Junk": "\\Junk";
1840
+ "\\Trash": "\\Trash";
1841
+ "\\Archive": "\\Archive";
1842
+ }>>;
1843
+ }, z.core.$strict>>;
1844
+ rulesNotice: z.ZodBoolean;
1845
+ }, z.core.$strict>;
1846
+ envelope: z.ZodObject<{
1847
+ data: z.ZodObject<{
1848
+ folders: z.ZodArray<z.ZodObject<{
1849
+ id: z.ZodString;
1850
+ name: z.ZodString;
1851
+ uidValidity: z.ZodNumber;
1852
+ specialUse: z.ZodOptional<z.ZodEnum<{
1853
+ "\\Drafts": "\\Drafts";
1854
+ "\\Sent": "\\Sent";
1855
+ "\\Junk": "\\Junk";
1856
+ "\\Trash": "\\Trash";
1857
+ "\\Archive": "\\Archive";
1858
+ }>>;
1859
+ }, z.core.$strict>>;
1860
+ rulesNotice: z.ZodBoolean;
1861
+ }, z.core.$strict>;
1862
+ }, z.core.$strict>;
1863
+ requestBytes: number;
1864
+ responseBytes: number;
1865
+ upload: boolean;
1866
+ key: "id" | "operationId" | undefined;
1867
+ revision: boolean;
1868
+ };
1869
+ readonly deleteFolder: {
1870
+ path: string;
1871
+ internal: string;
1872
+ input: z.ZodObject<{
1873
+ accountId: z.ZodUUID;
1874
+ operationId: z.ZodUUID;
1875
+ name: z.ZodString;
1876
+ }, z.core.$strict>;
1877
+ output: z.ZodObject<{
1878
+ id: z.ZodString;
1879
+ name: z.ZodString;
1880
+ uidValidity: z.ZodNumber;
1881
+ specialUse: z.ZodOptional<z.ZodEnum<{
1882
+ "\\Drafts": "\\Drafts";
1883
+ "\\Sent": "\\Sent";
1884
+ "\\Junk": "\\Junk";
1885
+ "\\Trash": "\\Trash";
1886
+ "\\Archive": "\\Archive";
1887
+ }>>;
1888
+ }, z.core.$strict>;
1889
+ envelope: z.ZodObject<{
1890
+ data: z.ZodObject<{
1891
+ id: z.ZodString;
1892
+ name: z.ZodString;
1893
+ uidValidity: z.ZodNumber;
1894
+ specialUse: z.ZodOptional<z.ZodEnum<{
1895
+ "\\Drafts": "\\Drafts";
1896
+ "\\Sent": "\\Sent";
1897
+ "\\Junk": "\\Junk";
1898
+ "\\Trash": "\\Trash";
1899
+ "\\Archive": "\\Archive";
1900
+ }>>;
1901
+ }, z.core.$strict>;
1902
+ }, z.core.$strict>;
1903
+ requestBytes: number;
1904
+ responseBytes: number;
1905
+ upload: boolean;
1906
+ key: "id" | "operationId" | undefined;
1907
+ revision: boolean;
1908
+ };
1909
+ readonly storage: {
1910
+ path: string;
1911
+ internal: string;
1912
+ input: z.ZodObject<{
1913
+ accountId: z.ZodUUID;
1914
+ }, z.core.$strict>;
1915
+ output: z.ZodObject<{
1916
+ usedBytes: z.ZodNumber;
1917
+ limitBytes: z.ZodNumber;
1918
+ workspaceLimitBytes: z.ZodNumber;
1919
+ workspaceUsedBytes: z.ZodNumber;
1920
+ warningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
1921
+ workspaceWarningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
1922
+ }, z.core.$strict>;
1923
+ envelope: z.ZodObject<{
1924
+ data: z.ZodObject<{
1925
+ usedBytes: z.ZodNumber;
1926
+ limitBytes: z.ZodNumber;
1927
+ workspaceLimitBytes: z.ZodNumber;
1928
+ workspaceUsedBytes: z.ZodNumber;
1929
+ warningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
1930
+ workspaceWarningPercent: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<80>, z.ZodLiteral<95>]>;
1931
+ }, z.core.$strict>;
1932
+ }, z.core.$strict>;
1933
+ requestBytes: number;
1934
+ responseBytes: number;
1935
+ upload: boolean;
1936
+ key: "id" | "operationId" | undefined;
1937
+ revision: boolean;
1938
+ };
1939
+ readonly submit: {
1940
+ path: string;
1941
+ internal: string;
1942
+ input: z.ZodObject<{
1943
+ operationId: z.ZodUUID;
1944
+ authorAddressId: z.ZodUUID;
1945
+ sentAccountId: z.ZodUUID;
1946
+ envelopeRecipients: z.ZodArray<z.ZodString>;
1947
+ raw: z.ZodString;
1948
+ }, z.core.$strict>;
1949
+ output: z.ZodObject<{
1950
+ idempotencyKey: z.ZodString;
1951
+ operationId: z.ZodString;
1952
+ accountId: z.ZodString;
1953
+ messageId: z.ZodString;
1954
+ entryId: z.ZodString;
1955
+ folderId: z.ZodString;
1956
+ uid: z.ZodNumber;
1957
+ acceptedAt: z.ZodString;
1958
+ state: z.ZodLiteral<"queued">;
1959
+ }, z.core.$strict>;
1960
+ envelope: z.ZodObject<{
1961
+ data: z.ZodObject<{
1962
+ idempotencyKey: z.ZodString;
1963
+ operationId: z.ZodString;
1964
+ accountId: z.ZodString;
1965
+ messageId: z.ZodString;
1966
+ entryId: z.ZodString;
1967
+ folderId: z.ZodString;
1968
+ uid: z.ZodNumber;
1969
+ acceptedAt: z.ZodString;
1970
+ state: z.ZodLiteral<"queued">;
1971
+ }, z.core.$strict>;
1972
+ }, z.core.$strict>;
1973
+ requestBytes: number;
1974
+ responseBytes: number;
1975
+ upload: boolean;
1976
+ key: "id" | "operationId" | undefined;
1977
+ revision: boolean;
1978
+ };
1979
+ readonly draftList: {
1980
+ path: string;
1981
+ internal: string;
1982
+ input: z.ZodObject<{
1983
+ accountId: z.ZodString;
1984
+ }, z.core.$strict>;
1985
+ output: z.ZodType<{
1986
+ drafts: {
1987
+ id: string;
1988
+ accountId: string;
1989
+ revision: number;
1990
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
1991
+ subject: string;
1992
+ updatedAt: string;
1993
+ content?: {
1994
+ senderId: string;
1995
+ to: string;
1996
+ cc: string;
1997
+ bcc: string;
1998
+ subject: string;
1999
+ text: string;
2000
+ attachments: {
2001
+ name: string;
2002
+ type: string;
2003
+ bytes: string;
2004
+ }[];
2005
+ format?: ComposeNode[] | undefined;
2006
+ inReplyTo?: string | undefined;
2007
+ references?: string[] | undefined;
2008
+ } | undefined;
2009
+ sendAt?: string | undefined;
2010
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2011
+ }[];
2012
+ }, unknown, z.core.$ZodTypeInternals<{
2013
+ drafts: {
2014
+ id: string;
2015
+ accountId: string;
2016
+ revision: number;
2017
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2018
+ subject: string;
2019
+ updatedAt: string;
2020
+ content?: {
2021
+ senderId: string;
2022
+ to: string;
2023
+ cc: string;
2024
+ bcc: string;
2025
+ subject: string;
2026
+ text: string;
2027
+ attachments: {
2028
+ name: string;
2029
+ type: string;
2030
+ bytes: string;
2031
+ }[];
2032
+ format?: ComposeNode[] | undefined;
2033
+ inReplyTo?: string | undefined;
2034
+ references?: string[] | undefined;
2035
+ } | undefined;
2036
+ sendAt?: string | undefined;
2037
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2038
+ }[];
2039
+ }, unknown>>;
2040
+ envelope: z.ZodObject<{
2041
+ data: z.ZodType<{
2042
+ drafts: {
2043
+ id: string;
2044
+ accountId: string;
2045
+ revision: number;
2046
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2047
+ subject: string;
2048
+ updatedAt: string;
2049
+ content?: {
2050
+ senderId: string;
2051
+ to: string;
2052
+ cc: string;
2053
+ bcc: string;
2054
+ subject: string;
2055
+ text: string;
2056
+ attachments: {
2057
+ name: string;
2058
+ type: string;
2059
+ bytes: string;
2060
+ }[];
2061
+ format?: ComposeNode[] | undefined;
2062
+ inReplyTo?: string | undefined;
2063
+ references?: string[] | undefined;
2064
+ } | undefined;
2065
+ sendAt?: string | undefined;
2066
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2067
+ }[];
2068
+ }, unknown, z.core.$ZodTypeInternals<{
2069
+ drafts: {
2070
+ id: string;
2071
+ accountId: string;
2072
+ revision: number;
2073
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2074
+ subject: string;
2075
+ updatedAt: string;
2076
+ content?: {
2077
+ senderId: string;
2078
+ to: string;
2079
+ cc: string;
2080
+ bcc: string;
2081
+ subject: string;
2082
+ text: string;
2083
+ attachments: {
2084
+ name: string;
2085
+ type: string;
2086
+ bytes: string;
2087
+ }[];
2088
+ format?: ComposeNode[] | undefined;
2089
+ inReplyTo?: string | undefined;
2090
+ references?: string[] | undefined;
2091
+ } | undefined;
2092
+ sendAt?: string | undefined;
2093
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2094
+ }[];
2095
+ }, unknown>>;
2096
+ }, z.core.$strict>;
2097
+ requestBytes: number;
2098
+ responseBytes: number;
2099
+ upload: boolean;
2100
+ key: "id" | "operationId" | undefined;
2101
+ revision: boolean;
2102
+ };
2103
+ readonly draftGet: {
2104
+ path: string;
2105
+ internal: string;
2106
+ input: z.ZodObject<{
2107
+ accountId: z.ZodString;
2108
+ id: z.ZodString;
2109
+ }, z.core.$strict>;
2110
+ output: z.ZodType<{
2111
+ id: string;
2112
+ accountId: string;
2113
+ revision: number;
2114
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2115
+ subject: string;
2116
+ updatedAt: string;
2117
+ content?: {
2118
+ senderId: string;
2119
+ to: string;
2120
+ cc: string;
2121
+ bcc: string;
2122
+ subject: string;
2123
+ text: string;
2124
+ attachments: {
2125
+ name: string;
2126
+ type: string;
2127
+ bytes: string;
2128
+ }[];
2129
+ format?: ComposeNode[] | undefined;
2130
+ inReplyTo?: string | undefined;
2131
+ references?: string[] | undefined;
2132
+ } | undefined;
2133
+ sendAt?: string | undefined;
2134
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2135
+ }, unknown, z.core.$ZodTypeInternals<{
2136
+ id: string;
2137
+ accountId: string;
2138
+ revision: number;
2139
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2140
+ subject: string;
2141
+ updatedAt: string;
2142
+ content?: {
2143
+ senderId: string;
2144
+ to: string;
2145
+ cc: string;
2146
+ bcc: string;
2147
+ subject: string;
2148
+ text: string;
2149
+ attachments: {
2150
+ name: string;
2151
+ type: string;
2152
+ bytes: string;
2153
+ }[];
2154
+ format?: ComposeNode[] | undefined;
2155
+ inReplyTo?: string | undefined;
2156
+ references?: string[] | undefined;
2157
+ } | undefined;
2158
+ sendAt?: string | undefined;
2159
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2160
+ }, unknown>>;
2161
+ envelope: z.ZodObject<{
2162
+ data: z.ZodType<{
2163
+ id: string;
2164
+ accountId: string;
2165
+ revision: number;
2166
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2167
+ subject: string;
2168
+ updatedAt: string;
2169
+ content?: {
2170
+ senderId: string;
2171
+ to: string;
2172
+ cc: string;
2173
+ bcc: string;
2174
+ subject: string;
2175
+ text: string;
2176
+ attachments: {
2177
+ name: string;
2178
+ type: string;
2179
+ bytes: string;
2180
+ }[];
2181
+ format?: ComposeNode[] | undefined;
2182
+ inReplyTo?: string | undefined;
2183
+ references?: string[] | undefined;
2184
+ } | undefined;
2185
+ sendAt?: string | undefined;
2186
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2187
+ }, unknown, z.core.$ZodTypeInternals<{
2188
+ id: string;
2189
+ accountId: string;
2190
+ revision: number;
2191
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2192
+ subject: string;
2193
+ updatedAt: string;
2194
+ content?: {
2195
+ senderId: string;
2196
+ to: string;
2197
+ cc: string;
2198
+ bcc: string;
2199
+ subject: string;
2200
+ text: string;
2201
+ attachments: {
2202
+ name: string;
2203
+ type: string;
2204
+ bytes: string;
2205
+ }[];
2206
+ format?: ComposeNode[] | undefined;
2207
+ inReplyTo?: string | undefined;
2208
+ references?: string[] | undefined;
2209
+ } | undefined;
2210
+ sendAt?: string | undefined;
2211
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2212
+ }, unknown>>;
2213
+ }, z.core.$strict>;
2214
+ requestBytes: number;
2215
+ responseBytes: number;
2216
+ upload: boolean;
2217
+ key: "id" | "operationId" | undefined;
2218
+ revision: boolean;
2219
+ };
2220
+ readonly draftSave: {
2221
+ path: string;
2222
+ internal: string;
2223
+ input: z.ZodObject<{
2224
+ accountId: z.ZodString;
2225
+ id: z.ZodString;
2226
+ operationId: z.ZodString;
2227
+ revision: z.ZodNumber;
2228
+ content: z.ZodObject<{
2229
+ senderId: z.ZodString;
2230
+ to: z.ZodString;
2231
+ cc: z.ZodString;
2232
+ bcc: z.ZodString;
2233
+ subject: z.ZodString;
2234
+ text: z.ZodString;
2235
+ format: z.ZodOptional<z.ZodCustom<ComposeNode[], ComposeNode[]>>;
2236
+ inReplyTo: z.ZodOptional<z.ZodString>;
2237
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
2238
+ attachments: z.ZodArray<z.ZodObject<{
2239
+ name: z.ZodString;
2240
+ type: z.ZodString;
2241
+ bytes: z.ZodString;
2242
+ }, z.core.$strict>>;
2243
+ }, z.core.$strict>;
2244
+ }, z.core.$strict>;
2245
+ output: z.ZodType<{
2246
+ id: string;
2247
+ accountId: string;
2248
+ revision: number;
2249
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2250
+ subject: string;
2251
+ updatedAt: string;
2252
+ content?: {
2253
+ senderId: string;
2254
+ to: string;
2255
+ cc: string;
2256
+ bcc: string;
2257
+ subject: string;
2258
+ text: string;
2259
+ attachments: {
2260
+ name: string;
2261
+ type: string;
2262
+ bytes: string;
2263
+ }[];
2264
+ format?: ComposeNode[] | undefined;
2265
+ inReplyTo?: string | undefined;
2266
+ references?: string[] | undefined;
2267
+ } | undefined;
2268
+ sendAt?: string | undefined;
2269
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2270
+ }, unknown, z.core.$ZodTypeInternals<{
2271
+ id: string;
2272
+ accountId: string;
2273
+ revision: number;
2274
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2275
+ subject: string;
2276
+ updatedAt: string;
2277
+ content?: {
2278
+ senderId: string;
2279
+ to: string;
2280
+ cc: string;
2281
+ bcc: string;
2282
+ subject: string;
2283
+ text: string;
2284
+ attachments: {
2285
+ name: string;
2286
+ type: string;
2287
+ bytes: string;
2288
+ }[];
2289
+ format?: ComposeNode[] | undefined;
2290
+ inReplyTo?: string | undefined;
2291
+ references?: string[] | undefined;
2292
+ } | undefined;
2293
+ sendAt?: string | undefined;
2294
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2295
+ }, unknown>>;
2296
+ envelope: z.ZodObject<{
2297
+ data: z.ZodType<{
2298
+ id: string;
2299
+ accountId: string;
2300
+ revision: number;
2301
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2302
+ subject: string;
2303
+ updatedAt: string;
2304
+ content?: {
2305
+ senderId: string;
2306
+ to: string;
2307
+ cc: string;
2308
+ bcc: string;
2309
+ subject: string;
2310
+ text: string;
2311
+ attachments: {
2312
+ name: string;
2313
+ type: string;
2314
+ bytes: string;
2315
+ }[];
2316
+ format?: ComposeNode[] | undefined;
2317
+ inReplyTo?: string | undefined;
2318
+ references?: string[] | undefined;
2319
+ } | undefined;
2320
+ sendAt?: string | undefined;
2321
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2322
+ }, unknown, z.core.$ZodTypeInternals<{
2323
+ id: string;
2324
+ accountId: string;
2325
+ revision: number;
2326
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2327
+ subject: string;
2328
+ updatedAt: string;
2329
+ content?: {
2330
+ senderId: string;
2331
+ to: string;
2332
+ cc: string;
2333
+ bcc: string;
2334
+ subject: string;
2335
+ text: string;
2336
+ attachments: {
2337
+ name: string;
2338
+ type: string;
2339
+ bytes: string;
2340
+ }[];
2341
+ format?: ComposeNode[] | undefined;
2342
+ inReplyTo?: string | undefined;
2343
+ references?: string[] | undefined;
2344
+ } | undefined;
2345
+ sendAt?: string | undefined;
2346
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2347
+ }, unknown>>;
2348
+ }, z.core.$strict>;
2349
+ requestBytes: number;
2350
+ responseBytes: number;
2351
+ upload: boolean;
2352
+ key: "id" | "operationId" | undefined;
2353
+ revision: boolean;
2354
+ };
2355
+ readonly draftDiscard: {
2356
+ path: string;
2357
+ internal: string;
2358
+ input: z.ZodObject<{
2359
+ accountId: z.ZodString;
2360
+ id: z.ZodString;
2361
+ operationId: z.ZodString;
2362
+ revision: z.ZodNumber;
2363
+ }, z.core.$strict>;
2364
+ output: z.ZodType<{
2365
+ id: string;
2366
+ accountId: string;
2367
+ revision: number;
2368
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2369
+ subject: string;
2370
+ updatedAt: string;
2371
+ content?: {
2372
+ senderId: string;
2373
+ to: string;
2374
+ cc: string;
2375
+ bcc: string;
2376
+ subject: string;
2377
+ text: string;
2378
+ attachments: {
2379
+ name: string;
2380
+ type: string;
2381
+ bytes: string;
2382
+ }[];
2383
+ format?: ComposeNode[] | undefined;
2384
+ inReplyTo?: string | undefined;
2385
+ references?: string[] | undefined;
2386
+ } | undefined;
2387
+ sendAt?: string | undefined;
2388
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2389
+ }, unknown, z.core.$ZodTypeInternals<{
2390
+ id: string;
2391
+ accountId: string;
2392
+ revision: number;
2393
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2394
+ subject: string;
2395
+ updatedAt: string;
2396
+ content?: {
2397
+ senderId: string;
2398
+ to: string;
2399
+ cc: string;
2400
+ bcc: string;
2401
+ subject: string;
2402
+ text: string;
2403
+ attachments: {
2404
+ name: string;
2405
+ type: string;
2406
+ bytes: string;
2407
+ }[];
2408
+ format?: ComposeNode[] | undefined;
2409
+ inReplyTo?: string | undefined;
2410
+ references?: string[] | undefined;
2411
+ } | undefined;
2412
+ sendAt?: string | undefined;
2413
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2414
+ }, unknown>>;
2415
+ envelope: z.ZodObject<{
2416
+ data: z.ZodType<{
2417
+ id: string;
2418
+ accountId: string;
2419
+ revision: number;
2420
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2421
+ subject: string;
2422
+ updatedAt: string;
2423
+ content?: {
2424
+ senderId: string;
2425
+ to: string;
2426
+ cc: string;
2427
+ bcc: string;
2428
+ subject: string;
2429
+ text: string;
2430
+ attachments: {
2431
+ name: string;
2432
+ type: string;
2433
+ bytes: string;
2434
+ }[];
2435
+ format?: ComposeNode[] | undefined;
2436
+ inReplyTo?: string | undefined;
2437
+ references?: string[] | undefined;
2438
+ } | undefined;
2439
+ sendAt?: string | undefined;
2440
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2441
+ }, unknown, z.core.$ZodTypeInternals<{
2442
+ id: string;
2443
+ accountId: string;
2444
+ revision: number;
2445
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2446
+ subject: string;
2447
+ updatedAt: string;
2448
+ content?: {
2449
+ senderId: string;
2450
+ to: string;
2451
+ cc: string;
2452
+ bcc: string;
2453
+ subject: string;
2454
+ text: string;
2455
+ attachments: {
2456
+ name: string;
2457
+ type: string;
2458
+ bytes: string;
2459
+ }[];
2460
+ format?: ComposeNode[] | undefined;
2461
+ inReplyTo?: string | undefined;
2462
+ references?: string[] | undefined;
2463
+ } | undefined;
2464
+ sendAt?: string | undefined;
2465
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2466
+ }, unknown>>;
2467
+ }, z.core.$strict>;
2468
+ requestBytes: number;
2469
+ responseBytes: number;
2470
+ upload: boolean;
2471
+ key: "id" | "operationId" | undefined;
2472
+ revision: boolean;
2473
+ };
2474
+ readonly draftPrepare: {
2475
+ path: string;
2476
+ internal: string;
2477
+ input: z.ZodObject<{
2478
+ accountId: z.ZodString;
2479
+ id: z.ZodString;
2480
+ operationId: z.ZodString;
2481
+ revision: z.ZodNumber;
2482
+ submission: z.ZodObject<{
2483
+ authorAddressId: z.ZodString;
2484
+ envelopeRecipients: z.ZodArray<z.ZodString>;
2485
+ raw: z.ZodString;
2486
+ }, z.core.$strict>;
2487
+ }, z.core.$strict>;
2488
+ output: z.ZodType<{
2489
+ id: string;
2490
+ accountId: string;
2491
+ revision: number;
2492
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2493
+ subject: string;
2494
+ updatedAt: string;
2495
+ content?: {
2496
+ senderId: string;
2497
+ to: string;
2498
+ cc: string;
2499
+ bcc: string;
2500
+ subject: string;
2501
+ text: string;
2502
+ attachments: {
2503
+ name: string;
2504
+ type: string;
2505
+ bytes: string;
2506
+ }[];
2507
+ format?: ComposeNode[] | undefined;
2508
+ inReplyTo?: string | undefined;
2509
+ references?: string[] | undefined;
2510
+ } | undefined;
2511
+ sendAt?: string | undefined;
2512
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2513
+ }, unknown, z.core.$ZodTypeInternals<{
2514
+ id: string;
2515
+ accountId: string;
2516
+ revision: number;
2517
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2518
+ subject: string;
2519
+ updatedAt: string;
2520
+ content?: {
2521
+ senderId: string;
2522
+ to: string;
2523
+ cc: string;
2524
+ bcc: string;
2525
+ subject: string;
2526
+ text: string;
2527
+ attachments: {
2528
+ name: string;
2529
+ type: string;
2530
+ bytes: string;
2531
+ }[];
2532
+ format?: ComposeNode[] | undefined;
2533
+ inReplyTo?: string | undefined;
2534
+ references?: string[] | undefined;
2535
+ } | undefined;
2536
+ sendAt?: string | undefined;
2537
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2538
+ }, unknown>>;
2539
+ envelope: z.ZodObject<{
2540
+ data: z.ZodType<{
2541
+ id: string;
2542
+ accountId: string;
2543
+ revision: number;
2544
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2545
+ subject: string;
2546
+ updatedAt: string;
2547
+ content?: {
2548
+ senderId: string;
2549
+ to: string;
2550
+ cc: string;
2551
+ bcc: string;
2552
+ subject: string;
2553
+ text: string;
2554
+ attachments: {
2555
+ name: string;
2556
+ type: string;
2557
+ bytes: string;
2558
+ }[];
2559
+ format?: ComposeNode[] | undefined;
2560
+ inReplyTo?: string | undefined;
2561
+ references?: string[] | undefined;
2562
+ } | undefined;
2563
+ sendAt?: string | undefined;
2564
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2565
+ }, unknown, z.core.$ZodTypeInternals<{
2566
+ id: string;
2567
+ accountId: string;
2568
+ revision: number;
2569
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2570
+ subject: string;
2571
+ updatedAt: string;
2572
+ content?: {
2573
+ senderId: string;
2574
+ to: string;
2575
+ cc: string;
2576
+ bcc: string;
2577
+ subject: string;
2578
+ text: string;
2579
+ attachments: {
2580
+ name: string;
2581
+ type: string;
2582
+ bytes: string;
2583
+ }[];
2584
+ format?: ComposeNode[] | undefined;
2585
+ inReplyTo?: string | undefined;
2586
+ references?: string[] | undefined;
2587
+ } | undefined;
2588
+ sendAt?: string | undefined;
2589
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2590
+ }, unknown>>;
2591
+ }, z.core.$strict>;
2592
+ requestBytes: number;
2593
+ responseBytes: number;
2594
+ upload: boolean;
2595
+ key: "id" | "operationId" | undefined;
2596
+ revision: boolean;
2597
+ };
2598
+ readonly draftSchedule: {
2599
+ path: string;
2600
+ internal: string;
2601
+ input: z.ZodObject<{
2602
+ accountId: z.ZodString;
2603
+ id: z.ZodString;
2604
+ operationId: z.ZodString;
2605
+ revision: z.ZodNumber;
2606
+ submission: z.ZodObject<{
2607
+ authorAddressId: z.ZodString;
2608
+ envelopeRecipients: z.ZodArray<z.ZodString>;
2609
+ raw: z.ZodString;
2610
+ }, z.core.$strict>;
2611
+ sendAt: z.ZodOptional<z.ZodString>;
2612
+ }, z.core.$strict>;
2613
+ output: z.ZodType<{
2614
+ id: string;
2615
+ accountId: string;
2616
+ revision: number;
2617
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2618
+ subject: string;
2619
+ updatedAt: string;
2620
+ content?: {
2621
+ senderId: string;
2622
+ to: string;
2623
+ cc: string;
2624
+ bcc: string;
2625
+ subject: string;
2626
+ text: string;
2627
+ attachments: {
2628
+ name: string;
2629
+ type: string;
2630
+ bytes: string;
2631
+ }[];
2632
+ format?: ComposeNode[] | undefined;
2633
+ inReplyTo?: string | undefined;
2634
+ references?: string[] | undefined;
2635
+ } | undefined;
2636
+ sendAt?: string | undefined;
2637
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2638
+ }, unknown, z.core.$ZodTypeInternals<{
2639
+ id: string;
2640
+ accountId: string;
2641
+ revision: number;
2642
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2643
+ subject: string;
2644
+ updatedAt: string;
2645
+ content?: {
2646
+ senderId: string;
2647
+ to: string;
2648
+ cc: string;
2649
+ bcc: string;
2650
+ subject: string;
2651
+ text: string;
2652
+ attachments: {
2653
+ name: string;
2654
+ type: string;
2655
+ bytes: string;
2656
+ }[];
2657
+ format?: ComposeNode[] | undefined;
2658
+ inReplyTo?: string | undefined;
2659
+ references?: string[] | undefined;
2660
+ } | undefined;
2661
+ sendAt?: string | undefined;
2662
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2663
+ }, unknown>>;
2664
+ envelope: z.ZodObject<{
2665
+ data: z.ZodType<{
2666
+ id: string;
2667
+ accountId: string;
2668
+ revision: number;
2669
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2670
+ subject: string;
2671
+ updatedAt: string;
2672
+ content?: {
2673
+ senderId: string;
2674
+ to: string;
2675
+ cc: string;
2676
+ bcc: string;
2677
+ subject: string;
2678
+ text: string;
2679
+ attachments: {
2680
+ name: string;
2681
+ type: string;
2682
+ bytes: string;
2683
+ }[];
2684
+ format?: ComposeNode[] | undefined;
2685
+ inReplyTo?: string | undefined;
2686
+ references?: string[] | undefined;
2687
+ } | undefined;
2688
+ sendAt?: string | undefined;
2689
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2690
+ }, unknown, z.core.$ZodTypeInternals<{
2691
+ id: string;
2692
+ accountId: string;
2693
+ revision: number;
2694
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2695
+ subject: string;
2696
+ updatedAt: string;
2697
+ content?: {
2698
+ senderId: string;
2699
+ to: string;
2700
+ cc: string;
2701
+ bcc: string;
2702
+ subject: string;
2703
+ text: string;
2704
+ attachments: {
2705
+ name: string;
2706
+ type: string;
2707
+ bytes: string;
2708
+ }[];
2709
+ format?: ComposeNode[] | undefined;
2710
+ inReplyTo?: string | undefined;
2711
+ references?: string[] | undefined;
2712
+ } | undefined;
2713
+ sendAt?: string | undefined;
2714
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2715
+ }, unknown>>;
2716
+ }, z.core.$strict>;
2717
+ requestBytes: number;
2718
+ responseBytes: number;
2719
+ upload: boolean;
2720
+ key: "id" | "operationId" | undefined;
2721
+ revision: boolean;
2722
+ };
2723
+ readonly draftUnschedule: {
2724
+ path: string;
2725
+ internal: string;
2726
+ input: z.ZodObject<{
2727
+ accountId: z.ZodString;
2728
+ id: z.ZodString;
2729
+ operationId: z.ZodString;
2730
+ revision: z.ZodNumber;
2731
+ }, z.core.$strict>;
2732
+ output: z.ZodType<{
2733
+ id: string;
2734
+ accountId: string;
2735
+ revision: number;
2736
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2737
+ subject: string;
2738
+ updatedAt: string;
2739
+ content?: {
2740
+ senderId: string;
2741
+ to: string;
2742
+ cc: string;
2743
+ bcc: string;
2744
+ subject: string;
2745
+ text: string;
2746
+ attachments: {
2747
+ name: string;
2748
+ type: string;
2749
+ bytes: string;
2750
+ }[];
2751
+ format?: ComposeNode[] | undefined;
2752
+ inReplyTo?: string | undefined;
2753
+ references?: string[] | undefined;
2754
+ } | undefined;
2755
+ sendAt?: string | undefined;
2756
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2757
+ }, unknown, z.core.$ZodTypeInternals<{
2758
+ id: string;
2759
+ accountId: string;
2760
+ revision: number;
2761
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2762
+ subject: string;
2763
+ updatedAt: string;
2764
+ content?: {
2765
+ senderId: string;
2766
+ to: string;
2767
+ cc: string;
2768
+ bcc: string;
2769
+ subject: string;
2770
+ text: string;
2771
+ attachments: {
2772
+ name: string;
2773
+ type: string;
2774
+ bytes: string;
2775
+ }[];
2776
+ format?: ComposeNode[] | undefined;
2777
+ inReplyTo?: string | undefined;
2778
+ references?: string[] | undefined;
2779
+ } | undefined;
2780
+ sendAt?: string | undefined;
2781
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2782
+ }, unknown>>;
2783
+ envelope: z.ZodObject<{
2784
+ data: z.ZodType<{
2785
+ id: string;
2786
+ accountId: string;
2787
+ revision: number;
2788
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2789
+ subject: string;
2790
+ updatedAt: string;
2791
+ content?: {
2792
+ senderId: string;
2793
+ to: string;
2794
+ cc: string;
2795
+ bcc: string;
2796
+ subject: string;
2797
+ text: string;
2798
+ attachments: {
2799
+ name: string;
2800
+ type: string;
2801
+ bytes: string;
2802
+ }[];
2803
+ format?: ComposeNode[] | undefined;
2804
+ inReplyTo?: string | undefined;
2805
+ references?: string[] | undefined;
2806
+ } | undefined;
2807
+ sendAt?: string | undefined;
2808
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2809
+ }, unknown, z.core.$ZodTypeInternals<{
2810
+ id: string;
2811
+ accountId: string;
2812
+ revision: number;
2813
+ state: "editing" | "scheduled" | "prepared" | "accepted" | "discarded";
2814
+ subject: string;
2815
+ updatedAt: string;
2816
+ content?: {
2817
+ senderId: string;
2818
+ to: string;
2819
+ cc: string;
2820
+ bcc: string;
2821
+ subject: string;
2822
+ text: string;
2823
+ attachments: {
2824
+ name: string;
2825
+ type: string;
2826
+ bytes: string;
2827
+ }[];
2828
+ format?: ComposeNode[] | undefined;
2829
+ inReplyTo?: string | undefined;
2830
+ references?: string[] | undefined;
2831
+ } | undefined;
2832
+ sendAt?: string | undefined;
2833
+ scheduleError?: "authority_lost" | "sending_refused" | undefined;
2834
+ }, unknown>>;
2835
+ }, z.core.$strict>;
2836
+ requestBytes: number;
2837
+ responseBytes: number;
2838
+ upload: boolean;
2839
+ key: "id" | "operationId" | undefined;
2840
+ revision: boolean;
2841
+ };
2842
+ readonly draftSend: {
2843
+ path: string;
2844
+ internal: string;
2845
+ input: z.ZodObject<{
2846
+ accountId: z.ZodString;
2847
+ id: z.ZodString;
2848
+ }, z.core.$strict>;
2849
+ output: z.ZodType<{
2850
+ idempotencyKey: string;
2851
+ operationId: string;
2852
+ accountId: string;
2853
+ messageId: string;
2854
+ entryId: string;
2855
+ folderId: string;
2856
+ uid: number;
2857
+ acceptedAt: string;
2858
+ state: "queued";
2859
+ }, unknown, z.core.$ZodTypeInternals<{
2860
+ idempotencyKey: string;
2861
+ operationId: string;
2862
+ accountId: string;
2863
+ messageId: string;
2864
+ entryId: string;
2865
+ folderId: string;
2866
+ uid: number;
2867
+ acceptedAt: string;
2868
+ state: "queued";
2869
+ }, unknown>>;
2870
+ envelope: z.ZodObject<{
2871
+ data: z.ZodType<{
2872
+ idempotencyKey: string;
2873
+ operationId: string;
2874
+ accountId: string;
2875
+ messageId: string;
2876
+ entryId: string;
2877
+ folderId: string;
2878
+ uid: number;
2879
+ acceptedAt: string;
2880
+ state: "queued";
2881
+ }, unknown, z.core.$ZodTypeInternals<{
2882
+ idempotencyKey: string;
2883
+ operationId: string;
2884
+ accountId: string;
2885
+ messageId: string;
2886
+ entryId: string;
2887
+ folderId: string;
2888
+ uid: number;
2889
+ acceptedAt: string;
2890
+ state: "queued";
2891
+ }, unknown>>;
2892
+ }, z.core.$strict>;
2893
+ requestBytes: number;
2894
+ responseBytes: number;
2895
+ upload: boolean;
2896
+ key: "id" | "operationId" | undefined;
2897
+ revision: boolean;
2898
+ };
2899
+ readonly rulesGet: {
2900
+ path: string;
2901
+ internal: string;
2902
+ input: z.ZodObject<{
2903
+ accountId: z.ZodString;
2904
+ }, z.core.$strict>;
2905
+ output: z.ZodObject<{
2906
+ accountId: z.ZodString;
2907
+ kind: z.ZodEnum<{
2908
+ personal: "personal";
2909
+ shared: "shared";
2910
+ }>;
2911
+ revision: z.ZodNumber;
2912
+ script: z.ZodString;
2913
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2914
+ kind: z.ZodLiteral<"rule">;
2915
+ enabled: z.ZodBoolean;
2916
+ label: z.ZodNullable<z.ZodString>;
2917
+ rule: z.ZodObject<{
2918
+ name: z.ZodString;
2919
+ enabled: z.ZodBoolean;
2920
+ match: z.ZodEnum<{
2921
+ any: "any";
2922
+ all: "all";
2923
+ }>;
2924
+ conditions: z.ZodArray<z.ZodObject<{
2925
+ field: z.ZodEnum<{
2926
+ subject: "subject";
2927
+ from: "from";
2928
+ to: "to";
2929
+ cc: "cc";
2930
+ listId: "listId";
2931
+ body: "body";
2932
+ attachmentName: "attachmentName";
2933
+ tag: "tag";
2934
+ }>;
2935
+ operator: z.ZodEnum<{
2936
+ matches: "matches";
2937
+ is: "is";
2938
+ contains: "contains";
2939
+ }>;
2940
+ negate: z.ZodBoolean;
2941
+ value: z.ZodString;
2942
+ }, z.core.$strict>>;
2943
+ actions: z.ZodObject<{
2944
+ fileInto: z.ZodNullable<z.ZodString>;
2945
+ markRead: z.ZodBoolean;
2946
+ flag: z.ZodBoolean;
2947
+ stop: z.ZodBoolean;
2948
+ }, z.core.$strict>;
2949
+ }, z.core.$strict>;
2950
+ text: z.ZodNull;
2951
+ vacation: z.ZodNull;
2952
+ forward: z.ZodNull;
2953
+ folders: z.ZodArray<z.ZodString>;
2954
+ missingFolders: z.ZodArray<z.ZodString>;
2955
+ }, z.core.$strict>, z.ZodObject<{
2956
+ kind: z.ZodLiteral<"script">;
2957
+ enabled: z.ZodBoolean;
2958
+ label: z.ZodNullable<z.ZodString>;
2959
+ rule: z.ZodNull;
2960
+ text: z.ZodString;
2961
+ vacation: z.ZodNull;
2962
+ forward: z.ZodNull;
2963
+ folders: z.ZodArray<z.ZodString>;
2964
+ missingFolders: z.ZodArray<z.ZodString>;
2965
+ }, z.core.$strict>, z.ZodObject<{
2966
+ kind: z.ZodLiteral<"vacation">;
2967
+ enabled: z.ZodBoolean;
2968
+ label: z.ZodNull;
2969
+ rule: z.ZodNull;
2970
+ text: z.ZodNull;
2971
+ vacation: z.ZodObject<{
2972
+ start: z.ZodNullable<z.ZodString>;
2973
+ end: z.ZodNullable<z.ZodString>;
2974
+ zone: z.ZodString;
2975
+ subject: z.ZodNullable<z.ZodString>;
2976
+ body: z.ZodString;
2977
+ days: z.ZodNumber;
2978
+ }, z.core.$strict>;
2979
+ forward: z.ZodNull;
2980
+ folders: z.ZodArray<z.ZodString>;
2981
+ missingFolders: z.ZodArray<z.ZodString>;
2982
+ }, z.core.$strict>, z.ZodObject<{
2983
+ kind: z.ZodLiteral<"forward">;
2984
+ enabled: z.ZodBoolean;
2985
+ label: z.ZodNull;
2986
+ rule: z.ZodNull;
2987
+ text: z.ZodNull;
2988
+ vacation: z.ZodNull;
2989
+ forward: z.ZodObject<{
2990
+ address: z.ZodString;
2991
+ keepCopy: z.ZodBoolean;
2992
+ }, z.core.$strict>;
2993
+ folders: z.ZodArray<z.ZodString>;
2994
+ missingFolders: z.ZodArray<z.ZodString>;
2995
+ }, z.core.$strict>], "kind">>;
2996
+ notices: z.ZodArray<z.ZodObject<{
2997
+ kind: z.ZodString;
2998
+ folder: z.ZodString;
2999
+ renamedTo: z.ZodString;
3000
+ notedAt: z.ZodString;
3001
+ }, z.core.$strict>>;
3002
+ }, z.core.$strict>;
3003
+ envelope: z.ZodObject<{
3004
+ data: z.ZodObject<{
3005
+ accountId: z.ZodString;
3006
+ kind: z.ZodEnum<{
3007
+ personal: "personal";
3008
+ shared: "shared";
3009
+ }>;
3010
+ revision: z.ZodNumber;
3011
+ script: z.ZodString;
3012
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3013
+ kind: z.ZodLiteral<"rule">;
3014
+ enabled: z.ZodBoolean;
3015
+ label: z.ZodNullable<z.ZodString>;
3016
+ rule: z.ZodObject<{
3017
+ name: z.ZodString;
3018
+ enabled: z.ZodBoolean;
3019
+ match: z.ZodEnum<{
3020
+ any: "any";
3021
+ all: "all";
3022
+ }>;
3023
+ conditions: z.ZodArray<z.ZodObject<{
3024
+ field: z.ZodEnum<{
3025
+ subject: "subject";
3026
+ from: "from";
3027
+ to: "to";
3028
+ cc: "cc";
3029
+ listId: "listId";
3030
+ body: "body";
3031
+ attachmentName: "attachmentName";
3032
+ tag: "tag";
3033
+ }>;
3034
+ operator: z.ZodEnum<{
3035
+ matches: "matches";
3036
+ is: "is";
3037
+ contains: "contains";
3038
+ }>;
3039
+ negate: z.ZodBoolean;
3040
+ value: z.ZodString;
3041
+ }, z.core.$strict>>;
3042
+ actions: z.ZodObject<{
3043
+ fileInto: z.ZodNullable<z.ZodString>;
3044
+ markRead: z.ZodBoolean;
3045
+ flag: z.ZodBoolean;
3046
+ stop: z.ZodBoolean;
3047
+ }, z.core.$strict>;
3048
+ }, z.core.$strict>;
3049
+ text: z.ZodNull;
3050
+ vacation: z.ZodNull;
3051
+ forward: z.ZodNull;
3052
+ folders: z.ZodArray<z.ZodString>;
3053
+ missingFolders: z.ZodArray<z.ZodString>;
3054
+ }, z.core.$strict>, z.ZodObject<{
3055
+ kind: z.ZodLiteral<"script">;
3056
+ enabled: z.ZodBoolean;
3057
+ label: z.ZodNullable<z.ZodString>;
3058
+ rule: z.ZodNull;
3059
+ text: z.ZodString;
3060
+ vacation: z.ZodNull;
3061
+ forward: z.ZodNull;
3062
+ folders: z.ZodArray<z.ZodString>;
3063
+ missingFolders: z.ZodArray<z.ZodString>;
3064
+ }, z.core.$strict>, z.ZodObject<{
3065
+ kind: z.ZodLiteral<"vacation">;
3066
+ enabled: z.ZodBoolean;
3067
+ label: z.ZodNull;
3068
+ rule: z.ZodNull;
3069
+ text: z.ZodNull;
3070
+ vacation: z.ZodObject<{
3071
+ start: z.ZodNullable<z.ZodString>;
3072
+ end: z.ZodNullable<z.ZodString>;
3073
+ zone: z.ZodString;
3074
+ subject: z.ZodNullable<z.ZodString>;
3075
+ body: z.ZodString;
3076
+ days: z.ZodNumber;
3077
+ }, z.core.$strict>;
3078
+ forward: z.ZodNull;
3079
+ folders: z.ZodArray<z.ZodString>;
3080
+ missingFolders: z.ZodArray<z.ZodString>;
3081
+ }, z.core.$strict>, z.ZodObject<{
3082
+ kind: z.ZodLiteral<"forward">;
3083
+ enabled: z.ZodBoolean;
3084
+ label: z.ZodNull;
3085
+ rule: z.ZodNull;
3086
+ text: z.ZodNull;
3087
+ vacation: z.ZodNull;
3088
+ forward: z.ZodObject<{
3089
+ address: z.ZodString;
3090
+ keepCopy: z.ZodBoolean;
3091
+ }, z.core.$strict>;
3092
+ folders: z.ZodArray<z.ZodString>;
3093
+ missingFolders: z.ZodArray<z.ZodString>;
3094
+ }, z.core.$strict>], "kind">>;
3095
+ notices: z.ZodArray<z.ZodObject<{
3096
+ kind: z.ZodString;
3097
+ folder: z.ZodString;
3098
+ renamedTo: z.ZodString;
3099
+ notedAt: z.ZodString;
3100
+ }, z.core.$strict>>;
3101
+ }, z.core.$strict>;
3102
+ }, z.core.$strict>;
3103
+ requestBytes: number;
3104
+ responseBytes: number;
3105
+ upload: boolean;
3106
+ key: "id" | "operationId" | undefined;
3107
+ revision: boolean;
3108
+ };
3109
+ readonly rulesCheck: {
3110
+ path: string;
3111
+ internal: string;
3112
+ input: z.ZodObject<{
3113
+ accountId: z.ZodString;
3114
+ script: z.ZodString;
3115
+ }, z.core.$strict>;
3116
+ output: z.ZodObject<{
3117
+ ok: z.ZodBoolean;
3118
+ problems: z.ZodArray<z.ZodObject<{
3119
+ code: z.ZodString;
3120
+ item: z.ZodNullable<z.ZodNumber>;
3121
+ condition: z.ZodNullable<z.ZodNumber>;
3122
+ line: z.ZodNullable<z.ZodNumber>;
3123
+ column: z.ZodNullable<z.ZodNumber>;
3124
+ message: z.ZodString;
3125
+ detail: z.ZodNullable<z.ZodString>;
3126
+ }, z.core.$strict>>;
3127
+ }, z.core.$strict>;
3128
+ envelope: z.ZodObject<{
3129
+ data: z.ZodObject<{
3130
+ ok: z.ZodBoolean;
3131
+ problems: z.ZodArray<z.ZodObject<{
3132
+ code: z.ZodString;
3133
+ item: z.ZodNullable<z.ZodNumber>;
3134
+ condition: z.ZodNullable<z.ZodNumber>;
3135
+ line: z.ZodNullable<z.ZodNumber>;
3136
+ column: z.ZodNullable<z.ZodNumber>;
3137
+ message: z.ZodString;
3138
+ detail: z.ZodNullable<z.ZodString>;
3139
+ }, z.core.$strict>>;
3140
+ }, z.core.$strict>;
3141
+ }, z.core.$strict>;
3142
+ requestBytes: number;
3143
+ responseBytes: number;
3144
+ upload: boolean;
3145
+ key: "id" | "operationId" | undefined;
3146
+ revision: boolean;
3147
+ };
3148
+ readonly rulesSave: {
3149
+ path: string;
3150
+ internal: string;
3151
+ input: z.ZodUnion<readonly [z.ZodObject<{
3152
+ accountId: z.ZodString;
3153
+ expectedRevision: z.ZodNumber;
3154
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3155
+ kind: z.ZodLiteral<"rule">;
3156
+ enabled: z.ZodBoolean;
3157
+ rule: z.ZodObject<{
3158
+ name: z.ZodString;
3159
+ enabled: z.ZodBoolean;
3160
+ match: z.ZodEnum<{
3161
+ any: "any";
3162
+ all: "all";
3163
+ }>;
3164
+ conditions: z.ZodArray<z.ZodObject<{
3165
+ field: z.ZodEnum<{
3166
+ subject: "subject";
3167
+ from: "from";
3168
+ to: "to";
3169
+ cc: "cc";
3170
+ listId: "listId";
3171
+ body: "body";
3172
+ attachmentName: "attachmentName";
3173
+ tag: "tag";
3174
+ }>;
3175
+ operator: z.ZodEnum<{
3176
+ matches: "matches";
3177
+ is: "is";
3178
+ contains: "contains";
3179
+ }>;
3180
+ negate: z.ZodBoolean;
3181
+ value: z.ZodString;
3182
+ }, z.core.$strict>>;
3183
+ actions: z.ZodObject<{
3184
+ fileInto: z.ZodNullable<z.ZodString>;
3185
+ markRead: z.ZodBoolean;
3186
+ flag: z.ZodBoolean;
3187
+ stop: z.ZodBoolean;
3188
+ }, z.core.$strict>;
3189
+ }, z.core.$strict>;
3190
+ }, z.core.$strict>, z.ZodObject<{
3191
+ kind: z.ZodLiteral<"script">;
3192
+ enabled: z.ZodBoolean;
3193
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3194
+ text: z.ZodString;
3195
+ }, z.core.$strict>, z.ZodObject<{
3196
+ kind: z.ZodLiteral<"vacation">;
3197
+ enabled: z.ZodBoolean;
3198
+ vacation: z.ZodObject<{
3199
+ start: z.ZodNullable<z.ZodString>;
3200
+ end: z.ZodNullable<z.ZodString>;
3201
+ zone: z.ZodString;
3202
+ subject: z.ZodNullable<z.ZodString>;
3203
+ body: z.ZodString;
3204
+ days: z.ZodNumber;
3205
+ }, z.core.$strict>;
3206
+ }, z.core.$strict>, z.ZodObject<{
3207
+ kind: z.ZodLiteral<"forward">;
3208
+ enabled: z.ZodBoolean;
3209
+ forward: z.ZodObject<{
3210
+ address: z.ZodString;
3211
+ keepCopy: z.ZodBoolean;
3212
+ }, z.core.$strict>;
3213
+ }, z.core.$strict>], "kind">>;
3214
+ }, z.core.$strict>, z.ZodObject<{
3215
+ accountId: z.ZodString;
3216
+ expectedRevision: z.ZodNumber;
3217
+ script: z.ZodString;
3218
+ }, z.core.$strict>]>;
3219
+ output: z.ZodDiscriminatedUnion<[z.ZodObject<{
3220
+ status: z.ZodLiteral<"saved">;
3221
+ revision: z.ZodNumber;
3222
+ script: z.ZodString;
3223
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3224
+ kind: z.ZodLiteral<"rule">;
3225
+ enabled: z.ZodBoolean;
3226
+ label: z.ZodNullable<z.ZodString>;
3227
+ rule: z.ZodObject<{
3228
+ name: z.ZodString;
3229
+ enabled: z.ZodBoolean;
3230
+ match: z.ZodEnum<{
3231
+ any: "any";
3232
+ all: "all";
3233
+ }>;
3234
+ conditions: z.ZodArray<z.ZodObject<{
3235
+ field: z.ZodEnum<{
3236
+ subject: "subject";
3237
+ from: "from";
3238
+ to: "to";
3239
+ cc: "cc";
3240
+ listId: "listId";
3241
+ body: "body";
3242
+ attachmentName: "attachmentName";
3243
+ tag: "tag";
3244
+ }>;
3245
+ operator: z.ZodEnum<{
3246
+ matches: "matches";
3247
+ is: "is";
3248
+ contains: "contains";
3249
+ }>;
3250
+ negate: z.ZodBoolean;
3251
+ value: z.ZodString;
3252
+ }, z.core.$strict>>;
3253
+ actions: z.ZodObject<{
3254
+ fileInto: z.ZodNullable<z.ZodString>;
3255
+ markRead: z.ZodBoolean;
3256
+ flag: z.ZodBoolean;
3257
+ stop: z.ZodBoolean;
3258
+ }, z.core.$strict>;
3259
+ }, z.core.$strict>;
3260
+ text: z.ZodNull;
3261
+ vacation: z.ZodNull;
3262
+ forward: z.ZodNull;
3263
+ folders: z.ZodArray<z.ZodString>;
3264
+ missingFolders: z.ZodArray<z.ZodString>;
3265
+ }, z.core.$strict>, z.ZodObject<{
3266
+ kind: z.ZodLiteral<"script">;
3267
+ enabled: z.ZodBoolean;
3268
+ label: z.ZodNullable<z.ZodString>;
3269
+ rule: z.ZodNull;
3270
+ text: z.ZodString;
3271
+ vacation: z.ZodNull;
3272
+ forward: z.ZodNull;
3273
+ folders: z.ZodArray<z.ZodString>;
3274
+ missingFolders: z.ZodArray<z.ZodString>;
3275
+ }, z.core.$strict>, z.ZodObject<{
3276
+ kind: z.ZodLiteral<"vacation">;
3277
+ enabled: z.ZodBoolean;
3278
+ label: z.ZodNull;
3279
+ rule: z.ZodNull;
3280
+ text: z.ZodNull;
3281
+ vacation: z.ZodObject<{
3282
+ start: z.ZodNullable<z.ZodString>;
3283
+ end: z.ZodNullable<z.ZodString>;
3284
+ zone: z.ZodString;
3285
+ subject: z.ZodNullable<z.ZodString>;
3286
+ body: z.ZodString;
3287
+ days: z.ZodNumber;
3288
+ }, z.core.$strict>;
3289
+ forward: z.ZodNull;
3290
+ folders: z.ZodArray<z.ZodString>;
3291
+ missingFolders: z.ZodArray<z.ZodString>;
3292
+ }, z.core.$strict>, z.ZodObject<{
3293
+ kind: z.ZodLiteral<"forward">;
3294
+ enabled: z.ZodBoolean;
3295
+ label: z.ZodNull;
3296
+ rule: z.ZodNull;
3297
+ text: z.ZodNull;
3298
+ vacation: z.ZodNull;
3299
+ forward: z.ZodObject<{
3300
+ address: z.ZodString;
3301
+ keepCopy: z.ZodBoolean;
3302
+ }, z.core.$strict>;
3303
+ folders: z.ZodArray<z.ZodString>;
3304
+ missingFolders: z.ZodArray<z.ZodString>;
3305
+ }, z.core.$strict>], "kind">>;
3306
+ normalized: z.ZodBoolean;
3307
+ }, z.core.$strict>, z.ZodObject<{
3308
+ status: z.ZodLiteral<"rejected">;
3309
+ problems: z.ZodArray<z.ZodObject<{
3310
+ code: z.ZodString;
3311
+ item: z.ZodNullable<z.ZodNumber>;
3312
+ condition: z.ZodNullable<z.ZodNumber>;
3313
+ line: z.ZodNullable<z.ZodNumber>;
3314
+ column: z.ZodNullable<z.ZodNumber>;
3315
+ message: z.ZodString;
3316
+ detail: z.ZodNullable<z.ZodString>;
3317
+ }, z.core.$strict>>;
3318
+ }, z.core.$strict>], "status">;
3319
+ envelope: z.ZodObject<{
3320
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
3321
+ status: z.ZodLiteral<"saved">;
3322
+ revision: z.ZodNumber;
3323
+ script: z.ZodString;
3324
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3325
+ kind: z.ZodLiteral<"rule">;
3326
+ enabled: z.ZodBoolean;
3327
+ label: z.ZodNullable<z.ZodString>;
3328
+ rule: z.ZodObject<{
3329
+ name: z.ZodString;
3330
+ enabled: z.ZodBoolean;
3331
+ match: z.ZodEnum<{
3332
+ any: "any";
3333
+ all: "all";
3334
+ }>;
3335
+ conditions: z.ZodArray<z.ZodObject<{
3336
+ field: z.ZodEnum<{
3337
+ subject: "subject";
3338
+ from: "from";
3339
+ to: "to";
3340
+ cc: "cc";
3341
+ listId: "listId";
3342
+ body: "body";
3343
+ attachmentName: "attachmentName";
3344
+ tag: "tag";
3345
+ }>;
3346
+ operator: z.ZodEnum<{
3347
+ matches: "matches";
3348
+ is: "is";
3349
+ contains: "contains";
3350
+ }>;
3351
+ negate: z.ZodBoolean;
3352
+ value: z.ZodString;
3353
+ }, z.core.$strict>>;
3354
+ actions: z.ZodObject<{
3355
+ fileInto: z.ZodNullable<z.ZodString>;
3356
+ markRead: z.ZodBoolean;
3357
+ flag: z.ZodBoolean;
3358
+ stop: z.ZodBoolean;
3359
+ }, z.core.$strict>;
3360
+ }, z.core.$strict>;
3361
+ text: z.ZodNull;
3362
+ vacation: z.ZodNull;
3363
+ forward: z.ZodNull;
3364
+ folders: z.ZodArray<z.ZodString>;
3365
+ missingFolders: z.ZodArray<z.ZodString>;
3366
+ }, z.core.$strict>, z.ZodObject<{
3367
+ kind: z.ZodLiteral<"script">;
3368
+ enabled: z.ZodBoolean;
3369
+ label: z.ZodNullable<z.ZodString>;
3370
+ rule: z.ZodNull;
3371
+ text: z.ZodString;
3372
+ vacation: z.ZodNull;
3373
+ forward: z.ZodNull;
3374
+ folders: z.ZodArray<z.ZodString>;
3375
+ missingFolders: z.ZodArray<z.ZodString>;
3376
+ }, z.core.$strict>, z.ZodObject<{
3377
+ kind: z.ZodLiteral<"vacation">;
3378
+ enabled: z.ZodBoolean;
3379
+ label: z.ZodNull;
3380
+ rule: z.ZodNull;
3381
+ text: z.ZodNull;
3382
+ vacation: z.ZodObject<{
3383
+ start: z.ZodNullable<z.ZodString>;
3384
+ end: z.ZodNullable<z.ZodString>;
3385
+ zone: z.ZodString;
3386
+ subject: z.ZodNullable<z.ZodString>;
3387
+ body: z.ZodString;
3388
+ days: z.ZodNumber;
3389
+ }, z.core.$strict>;
3390
+ forward: z.ZodNull;
3391
+ folders: z.ZodArray<z.ZodString>;
3392
+ missingFolders: z.ZodArray<z.ZodString>;
3393
+ }, z.core.$strict>, z.ZodObject<{
3394
+ kind: z.ZodLiteral<"forward">;
3395
+ enabled: z.ZodBoolean;
3396
+ label: z.ZodNull;
3397
+ rule: z.ZodNull;
3398
+ text: z.ZodNull;
3399
+ vacation: z.ZodNull;
3400
+ forward: z.ZodObject<{
3401
+ address: z.ZodString;
3402
+ keepCopy: z.ZodBoolean;
3403
+ }, z.core.$strict>;
3404
+ folders: z.ZodArray<z.ZodString>;
3405
+ missingFolders: z.ZodArray<z.ZodString>;
3406
+ }, z.core.$strict>], "kind">>;
3407
+ normalized: z.ZodBoolean;
3408
+ }, z.core.$strict>, z.ZodObject<{
3409
+ status: z.ZodLiteral<"rejected">;
3410
+ problems: z.ZodArray<z.ZodObject<{
3411
+ code: z.ZodString;
3412
+ item: z.ZodNullable<z.ZodNumber>;
3413
+ condition: z.ZodNullable<z.ZodNumber>;
3414
+ line: z.ZodNullable<z.ZodNumber>;
3415
+ column: z.ZodNullable<z.ZodNumber>;
3416
+ message: z.ZodString;
3417
+ detail: z.ZodNullable<z.ZodString>;
3418
+ }, z.core.$strict>>;
3419
+ }, z.core.$strict>], "status">;
3420
+ }, z.core.$strict>;
3421
+ requestBytes: number;
3422
+ responseBytes: number;
3423
+ upload: boolean;
3424
+ key: "id" | "operationId" | undefined;
3425
+ revision: boolean;
3426
+ };
3427
+ readonly rulesItems: {
3428
+ path: string;
3429
+ internal: string;
3430
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
3431
+ accountId: z.ZodString;
3432
+ expectedRevision: z.ZodNumber;
3433
+ operation: z.ZodLiteral<"move">;
3434
+ index: z.ZodNumber;
3435
+ to: z.ZodNumber;
3436
+ }, z.core.$strict>, z.ZodObject<{
3437
+ accountId: z.ZodString;
3438
+ expectedRevision: z.ZodNumber;
3439
+ operation: z.ZodLiteral<"toggle">;
3440
+ index: z.ZodNumber;
3441
+ enabled: z.ZodBoolean;
3442
+ }, z.core.$strict>, z.ZodObject<{
3443
+ accountId: z.ZodString;
3444
+ expectedRevision: z.ZodNumber;
3445
+ operation: z.ZodLiteral<"delete">;
3446
+ index: z.ZodNumber;
3447
+ }, z.core.$strict>, z.ZodObject<{
3448
+ accountId: z.ZodString;
3449
+ expectedRevision: z.ZodNumber;
3450
+ operation: z.ZodLiteral<"put">;
3451
+ index: z.ZodNumber;
3452
+ rule: z.ZodObject<{
3453
+ name: z.ZodString;
3454
+ enabled: z.ZodBoolean;
3455
+ match: z.ZodEnum<{
3456
+ any: "any";
3457
+ all: "all";
3458
+ }>;
3459
+ conditions: z.ZodArray<z.ZodObject<{
3460
+ field: z.ZodEnum<{
3461
+ subject: "subject";
3462
+ from: "from";
3463
+ to: "to";
3464
+ cc: "cc";
3465
+ listId: "listId";
3466
+ body: "body";
3467
+ attachmentName: "attachmentName";
3468
+ tag: "tag";
3469
+ }>;
3470
+ operator: z.ZodEnum<{
3471
+ matches: "matches";
3472
+ is: "is";
3473
+ contains: "contains";
3474
+ }>;
3475
+ negate: z.ZodBoolean;
3476
+ value: z.ZodString;
3477
+ }, z.core.$strict>>;
3478
+ actions: z.ZodObject<{
3479
+ fileInto: z.ZodNullable<z.ZodString>;
3480
+ markRead: z.ZodBoolean;
3481
+ flag: z.ZodBoolean;
3482
+ stop: z.ZodBoolean;
3483
+ }, z.core.$strict>;
3484
+ }, z.core.$strict>;
3485
+ }, z.core.$strict>], "operation">;
3486
+ output: z.ZodDiscriminatedUnion<[z.ZodObject<{
3487
+ status: z.ZodLiteral<"saved">;
3488
+ revision: z.ZodNumber;
3489
+ script: z.ZodString;
3490
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3491
+ kind: z.ZodLiteral<"rule">;
3492
+ enabled: z.ZodBoolean;
3493
+ label: z.ZodNullable<z.ZodString>;
3494
+ rule: z.ZodObject<{
3495
+ name: z.ZodString;
3496
+ enabled: z.ZodBoolean;
3497
+ match: z.ZodEnum<{
3498
+ any: "any";
3499
+ all: "all";
3500
+ }>;
3501
+ conditions: z.ZodArray<z.ZodObject<{
3502
+ field: z.ZodEnum<{
3503
+ subject: "subject";
3504
+ from: "from";
3505
+ to: "to";
3506
+ cc: "cc";
3507
+ listId: "listId";
3508
+ body: "body";
3509
+ attachmentName: "attachmentName";
3510
+ tag: "tag";
3511
+ }>;
3512
+ operator: z.ZodEnum<{
3513
+ matches: "matches";
3514
+ is: "is";
3515
+ contains: "contains";
3516
+ }>;
3517
+ negate: z.ZodBoolean;
3518
+ value: z.ZodString;
3519
+ }, z.core.$strict>>;
3520
+ actions: z.ZodObject<{
3521
+ fileInto: z.ZodNullable<z.ZodString>;
3522
+ markRead: z.ZodBoolean;
3523
+ flag: z.ZodBoolean;
3524
+ stop: z.ZodBoolean;
3525
+ }, z.core.$strict>;
3526
+ }, z.core.$strict>;
3527
+ text: z.ZodNull;
3528
+ vacation: z.ZodNull;
3529
+ forward: z.ZodNull;
3530
+ folders: z.ZodArray<z.ZodString>;
3531
+ missingFolders: z.ZodArray<z.ZodString>;
3532
+ }, z.core.$strict>, z.ZodObject<{
3533
+ kind: z.ZodLiteral<"script">;
3534
+ enabled: z.ZodBoolean;
3535
+ label: z.ZodNullable<z.ZodString>;
3536
+ rule: z.ZodNull;
3537
+ text: z.ZodString;
3538
+ vacation: z.ZodNull;
3539
+ forward: z.ZodNull;
3540
+ folders: z.ZodArray<z.ZodString>;
3541
+ missingFolders: z.ZodArray<z.ZodString>;
3542
+ }, z.core.$strict>, z.ZodObject<{
3543
+ kind: z.ZodLiteral<"vacation">;
3544
+ enabled: z.ZodBoolean;
3545
+ label: z.ZodNull;
3546
+ rule: z.ZodNull;
3547
+ text: z.ZodNull;
3548
+ vacation: z.ZodObject<{
3549
+ start: z.ZodNullable<z.ZodString>;
3550
+ end: z.ZodNullable<z.ZodString>;
3551
+ zone: z.ZodString;
3552
+ subject: z.ZodNullable<z.ZodString>;
3553
+ body: z.ZodString;
3554
+ days: z.ZodNumber;
3555
+ }, z.core.$strict>;
3556
+ forward: z.ZodNull;
3557
+ folders: z.ZodArray<z.ZodString>;
3558
+ missingFolders: z.ZodArray<z.ZodString>;
3559
+ }, z.core.$strict>, z.ZodObject<{
3560
+ kind: z.ZodLiteral<"forward">;
3561
+ enabled: z.ZodBoolean;
3562
+ label: z.ZodNull;
3563
+ rule: z.ZodNull;
3564
+ text: z.ZodNull;
3565
+ vacation: z.ZodNull;
3566
+ forward: z.ZodObject<{
3567
+ address: z.ZodString;
3568
+ keepCopy: z.ZodBoolean;
3569
+ }, z.core.$strict>;
3570
+ folders: z.ZodArray<z.ZodString>;
3571
+ missingFolders: z.ZodArray<z.ZodString>;
3572
+ }, z.core.$strict>], "kind">>;
3573
+ normalized: z.ZodBoolean;
3574
+ }, z.core.$strict>, z.ZodObject<{
3575
+ status: z.ZodLiteral<"rejected">;
3576
+ problems: z.ZodArray<z.ZodObject<{
3577
+ code: z.ZodString;
3578
+ item: z.ZodNullable<z.ZodNumber>;
3579
+ condition: z.ZodNullable<z.ZodNumber>;
3580
+ line: z.ZodNullable<z.ZodNumber>;
3581
+ column: z.ZodNullable<z.ZodNumber>;
3582
+ message: z.ZodString;
3583
+ detail: z.ZodNullable<z.ZodString>;
3584
+ }, z.core.$strict>>;
3585
+ }, z.core.$strict>], "status">;
3586
+ envelope: z.ZodObject<{
3587
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
3588
+ status: z.ZodLiteral<"saved">;
3589
+ revision: z.ZodNumber;
3590
+ script: z.ZodString;
3591
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3592
+ kind: z.ZodLiteral<"rule">;
3593
+ enabled: z.ZodBoolean;
3594
+ label: z.ZodNullable<z.ZodString>;
3595
+ rule: z.ZodObject<{
3596
+ name: z.ZodString;
3597
+ enabled: z.ZodBoolean;
3598
+ match: z.ZodEnum<{
3599
+ any: "any";
3600
+ all: "all";
3601
+ }>;
3602
+ conditions: z.ZodArray<z.ZodObject<{
3603
+ field: z.ZodEnum<{
3604
+ subject: "subject";
3605
+ from: "from";
3606
+ to: "to";
3607
+ cc: "cc";
3608
+ listId: "listId";
3609
+ body: "body";
3610
+ attachmentName: "attachmentName";
3611
+ tag: "tag";
3612
+ }>;
3613
+ operator: z.ZodEnum<{
3614
+ matches: "matches";
3615
+ is: "is";
3616
+ contains: "contains";
3617
+ }>;
3618
+ negate: z.ZodBoolean;
3619
+ value: z.ZodString;
3620
+ }, z.core.$strict>>;
3621
+ actions: z.ZodObject<{
3622
+ fileInto: z.ZodNullable<z.ZodString>;
3623
+ markRead: z.ZodBoolean;
3624
+ flag: z.ZodBoolean;
3625
+ stop: z.ZodBoolean;
3626
+ }, z.core.$strict>;
3627
+ }, z.core.$strict>;
3628
+ text: z.ZodNull;
3629
+ vacation: z.ZodNull;
3630
+ forward: z.ZodNull;
3631
+ folders: z.ZodArray<z.ZodString>;
3632
+ missingFolders: z.ZodArray<z.ZodString>;
3633
+ }, z.core.$strict>, z.ZodObject<{
3634
+ kind: z.ZodLiteral<"script">;
3635
+ enabled: z.ZodBoolean;
3636
+ label: z.ZodNullable<z.ZodString>;
3637
+ rule: z.ZodNull;
3638
+ text: z.ZodString;
3639
+ vacation: z.ZodNull;
3640
+ forward: z.ZodNull;
3641
+ folders: z.ZodArray<z.ZodString>;
3642
+ missingFolders: z.ZodArray<z.ZodString>;
3643
+ }, z.core.$strict>, z.ZodObject<{
3644
+ kind: z.ZodLiteral<"vacation">;
3645
+ enabled: z.ZodBoolean;
3646
+ label: z.ZodNull;
3647
+ rule: z.ZodNull;
3648
+ text: z.ZodNull;
3649
+ vacation: z.ZodObject<{
3650
+ start: z.ZodNullable<z.ZodString>;
3651
+ end: z.ZodNullable<z.ZodString>;
3652
+ zone: z.ZodString;
3653
+ subject: z.ZodNullable<z.ZodString>;
3654
+ body: z.ZodString;
3655
+ days: z.ZodNumber;
3656
+ }, z.core.$strict>;
3657
+ forward: z.ZodNull;
3658
+ folders: z.ZodArray<z.ZodString>;
3659
+ missingFolders: z.ZodArray<z.ZodString>;
3660
+ }, z.core.$strict>, z.ZodObject<{
3661
+ kind: z.ZodLiteral<"forward">;
3662
+ enabled: z.ZodBoolean;
3663
+ label: z.ZodNull;
3664
+ rule: z.ZodNull;
3665
+ text: z.ZodNull;
3666
+ vacation: z.ZodNull;
3667
+ forward: z.ZodObject<{
3668
+ address: z.ZodString;
3669
+ keepCopy: z.ZodBoolean;
3670
+ }, z.core.$strict>;
3671
+ folders: z.ZodArray<z.ZodString>;
3672
+ missingFolders: z.ZodArray<z.ZodString>;
3673
+ }, z.core.$strict>], "kind">>;
3674
+ normalized: z.ZodBoolean;
3675
+ }, z.core.$strict>, z.ZodObject<{
3676
+ status: z.ZodLiteral<"rejected">;
3677
+ problems: z.ZodArray<z.ZodObject<{
3678
+ code: z.ZodString;
3679
+ item: z.ZodNullable<z.ZodNumber>;
3680
+ condition: z.ZodNullable<z.ZodNumber>;
3681
+ line: z.ZodNullable<z.ZodNumber>;
3682
+ column: z.ZodNullable<z.ZodNumber>;
3683
+ message: z.ZodString;
3684
+ detail: z.ZodNullable<z.ZodString>;
3685
+ }, z.core.$strict>>;
3686
+ }, z.core.$strict>], "status">;
3687
+ }, z.core.$strict>;
3688
+ requestBytes: number;
3689
+ responseBytes: number;
3690
+ upload: boolean;
3691
+ key: "id" | "operationId" | undefined;
3692
+ revision: boolean;
3693
+ };
3694
+ };
3695
+ type HeadlessOperation = keyof typeof headlessOperations;
3696
+ type HeadlessInput<K extends HeadlessOperation> = z.infer<(typeof headlessOperations)[K]['input']>;
3697
+ type HeadlessResult<K extends HeadlessOperation> = z.infer<(typeof headlessOperations)[K]['output']>;
3698
+
3699
+ export { draftList as $, receipt as A, type Mailbox as B, type ComposeNode as C, type DraftAction as D, type Folder as E, type FolderInput as F, type Sender as G, type HeadlessInput as H, type Inbox as I, type Entry as J, type Message as K, type Receipt as L, type MailTransport as M, draftSchemas as N, type Location as O, type MessageLocation as P, type ConversationTarget as Q, type Rule as R, type Submission as S, type Change as T, MailError as U, accountStorage as V, type AccountStorage as W, accountStorageMaximumBytes as X, serviceAccountStorage as Y, draftContent as Z, savedDraft as _, type DraftInput as a, draftLocation as a0, draftInputs as a1, type SavedDraft as a2, conversationCursor as a3, participant as a4, conversationRow as a5, conversationPage as a6, conversationLocation as a7, chatText as a8, conversationMessage as a9, headlessOperations as aA, type HeadlessOperation as aB, safeComposeLink as aC, validComposeFormat as aD, composeFormat as aE, conversation as aa, type Participant as ab, type ConversationRow as ac, type ConversationPage as ad, type ConversationLocation as ae, type ConversationMessage as af, type Conversation as ag, MAXIMUM_RULE_SCRIPT_BYTES as ah, MAXIMUM_RULE_ITEMS as ai, MAXIMUM_RULE_CONDITIONS as aj, MAXIMUM_RULE_PROBLEMS as ak, ruleCondition as al, ruleActions as am, rule as an, ruleVacation as ao, ruleForward as ap, ruleItem as aq, ruleItemInput as ar, rulesNotice as as, mailboxRules as at, rulesProblem as au, rulesChecked as av, rulesSaved as aw, rulesInputs as ax, RULES_REQUEST_BYTES as ay, RULES_RESPONSE_BYTES as az, type DraftResult as b, type HeadlessResult as c, type RuleActions as d, type RuleCondition as e, type RuleForward as f, type RuleItem as g, type RuleItemInput as h, type RuleVacation as i, type MailboxRules as j, type RulesChecked as k, type RulesNotice as l, type RulesProblem as m, type RulesSaved as n, mailbox as o, mailboxPage as p, folder as q, renamedFolder as r, sender as s, inbox as t, entry as u, entries as v, attachment as w, message as x, changed as y, download as z };