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

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