@repa/mail 0.1.0-alpha.20 → 0.1.0-alpha.22

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.
@@ -1,7 +1,389 @@
1
- import { C as ComposeNode } from './operations-14iYfteB.js';
2
- export { W as AccountStorage, T as Change, ag as Conversation, ae as ConversationLocation, af as ConversationMessage, ad as ConversationPage, ac as ConversationRow, Q as ConversationTarget, D as DraftAction, a as DraftInput, b as DraftResult, J as Entry, E as Folder, F as FolderInput, H as HeadlessInput, aB as HeadlessOperation, c as HeadlessResult, I as Inbox, O as Location, aj as MAXIMUM_RULE_CONDITIONS, ai as MAXIMUM_RULE_ITEMS, ak as MAXIMUM_RULE_PROBLEMS, ah as MAXIMUM_RULE_SCRIPT_BYTES, U as MailError, M as MailTransport, B as Mailbox, j as MailboxRules, K as Message, P as MessageLocation, ab as Participant, ay as RULES_REQUEST_BYTES, az as RULES_RESPONSE_BYTES, L as Receipt, R as Rule, d as RuleActions, e as RuleCondition, f as RuleForward, g as RuleItem, h as RuleItemInput, i as RuleVacation, k as RulesChecked, l as RulesNotice, m as RulesProblem, n as RulesSaved, a2 as SavedDraft, G as Sender, S as Submission, V as accountStorage, X as accountStorageMaximumBytes, w as attachment, y as changed, a8 as chatText, aE as composeFormat, aa as conversation, a3 as conversationCursor, a7 as conversationLocation, a9 as conversationMessage, a6 as conversationPage, a5 as conversationRow, z as download, Z as draftContent, a1 as draftInputs, $ as draftList, a0 as draftLocation, N as draftSchemas, v as entries, u as entry, q as folder, aA as headlessOperations, t as inbox, o as mailbox, p as mailboxPage, at as mailboxRules, x as message, a4 as participant, A as receipt, r as renamedFolder, an as rule, am as ruleActions, al as ruleCondition, ap as ruleForward, aq as ruleItem, ar as ruleItemInput, ao as ruleVacation, av as rulesChecked, ax as rulesInputs, as as rulesNotice, au as rulesProblem, aw as rulesSaved, aC as safeComposeLink, _ as savedDraft, s as sender, Y as serviceAccountStorage, aD as validComposeFormat } from './operations-14iYfteB.js';
1
+ import { C as ComposeNode } from './operations-g1slmaT3.js';
2
+ export { a1 as AccountStorage, _ as Change, an as Conversation, al as ConversationLocation, am as ConversationMessage, ak as ConversationPage, aj as ConversationRow, Z as ConversationTarget, D as DraftAction, a as DraftInput, b as DraftResult, U as Entry, P as Folder, F as FolderInput, H as HeadlessInput, aS as HeadlessOperation, d as HeadlessResult, T as Inbox, X as Location, aA as MAXIMUM_RULE_CONDITIONS, az as MAXIMUM_RULE_ITEMS, aB as MAXIMUM_RULE_PROBLEMS, ay as MAXIMUM_RULE_SCRIPT_BYTES, $ as MailError, c as MailTransport, O as Mailbox, k as MailboxRules, M as Message, Y as MessageLocation, s as NewTextConfidence, p as NewTextInfo, N as NewTextMessage, r as NewTextOutcome, q as NewTextRemoved, t as NewTextSignatureReason, ai as Participant, aP as RULES_REQUEST_BYTES, aQ as RULES_RESPONSE_BYTES, u as ReadContent, V as Receipt, R as Rule, e as RuleActions, f as RuleCondition, g as RuleForward, h as RuleItem, i as RuleItemInput, j as RuleVacation, l as RulesChecked, m as RulesNotice, n as RulesProblem, o as RulesSaved, a9 as SavedDraft, Q as Sender, S as Submission, a0 as accountStorage, a2 as accountStorageMaximumBytes, G as attachment, J as changed, af as chatText, aV as composeFormat, ah as conversation, aa as conversationCursor, ae as conversationLocation, ag as conversationMessage, ad as conversationPage, ac as conversationRow, K as download, a4 as draftContent, a8 as draftInputs, a6 as draftList, a7 as draftLocation, W as draftSchemas, E as entries, B as entry, x as folder, aR as headlessOperations, A as inbox, v as mailbox, w as mailboxPage, aK as mailboxRules, I as message, aq as newTextConfidence, av as newTextInfo, ax as newTextMessage, ap as newTextOutcome, au as newTextReason, at as newTextRemoved, as as newTextRemovedKind, ar as newTextSignatureReason, ab as participant, ao as readContent, L as receipt, y as renamedFolder, aE as rule, aD as ruleActions, aC as ruleCondition, aG as ruleForward, aH as ruleItem, aI as ruleItemInput, aF as ruleVacation, aM as rulesChecked, aO as rulesInputs, aJ as rulesNotice, aL as rulesProblem, aN as rulesSaved, aT as safeComposeLink, a5 as savedDraft, z as sender, a3 as serviceAccountStorage, aw as unreadNewText, aU as validComposeFormat } from './operations-g1slmaT3.js';
3
3
  import { z } from 'zod';
4
4
 
5
+ /** An integration's received-message subscriptions are bounded like its mailbox grants. */
6
+ declare const MAXIMUM_RECEIVED_SUBSCRIPTIONS = 100;
7
+ /** The mailboxes whose delivered messages publish `message.received` to the integration; every change answers the whole set. */
8
+ declare const receivedSubscriptions: z.ZodObject<{
9
+ accountIds: z.ZodArray<z.ZodUUID>;
10
+ }, z.core.$strict>;
11
+ /**
12
+ * The trigger headers a read by message identity adds to the display headers; each is omitted when the message has
13
+ * none. The service bounds them in runes (List-Id 1,024, the others 256), at most two UTF-16 units each.
14
+ */
15
+ declare const receivedHeaders: z.ZodObject<{
16
+ subject: z.ZodString;
17
+ from: z.ZodString;
18
+ to: z.ZodString;
19
+ cc: z.ZodString;
20
+ replyTo: z.ZodString;
21
+ messageId: z.ZodString;
22
+ unsubscribe: z.ZodOptional<z.ZodString>;
23
+ date: z.ZodOptional<z.ZodString>;
24
+ listId: z.ZodOptional<z.ZodString>;
25
+ autoSubmitted: z.ZodOptional<z.ZodString>;
26
+ repaFlowRun: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strict>;
28
+ /** `content: "full"`: the whole message with the trigger headers and the location of the answered entry. */
29
+ declare const receivedMessage: z.ZodObject<{
30
+ entry: z.ZodObject<{
31
+ uid: z.ZodNumber;
32
+ id: z.ZodString;
33
+ flags: z.ZodNumber;
34
+ date: z.ZodString;
35
+ octets: z.ZodNumber;
36
+ preview: z.ZodString;
37
+ hasAttachment: z.ZodBoolean;
38
+ subject: z.ZodString;
39
+ from: z.ZodString;
40
+ to: z.ZodString;
41
+ }, z.core.$strict>;
42
+ text: z.ZodString;
43
+ html: z.ZodString;
44
+ attachments: z.ZodArray<z.ZodObject<{
45
+ contentId: z.ZodOptional<z.ZodString>;
46
+ part: z.ZodString;
47
+ name: z.ZodString;
48
+ type: z.ZodString;
49
+ octets: z.ZodNumber;
50
+ }, z.core.$strict>>;
51
+ warnings: z.ZodArray<z.ZodEnum<{
52
+ incomplete_scan: "incomplete_scan";
53
+ hosted_domain_unaligned: "hosted_domain_unaligned";
54
+ link_text_mismatch: "link_text_mismatch";
55
+ lookalike_brand: "lookalike_brand";
56
+ lookalike_tenant: "lookalike_tenant";
57
+ homograph_domain: "homograph_domain";
58
+ credential_form: "credential_form";
59
+ dangerous_attachment: "dangerous_attachment";
60
+ encrypted_archive: "encrypted_archive";
61
+ }>>;
62
+ incomplete: z.ZodBoolean;
63
+ headers: z.ZodObject<{
64
+ subject: z.ZodString;
65
+ from: z.ZodString;
66
+ to: z.ZodString;
67
+ cc: z.ZodString;
68
+ replyTo: z.ZodString;
69
+ messageId: z.ZodString;
70
+ unsubscribe: z.ZodOptional<z.ZodString>;
71
+ date: z.ZodOptional<z.ZodString>;
72
+ listId: z.ZodOptional<z.ZodString>;
73
+ autoSubmitted: z.ZodOptional<z.ZodString>;
74
+ repaFlowRun: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strict>;
76
+ location: z.ZodObject<{
77
+ folderId: z.ZodString;
78
+ uidValidity: z.ZodNumber;
79
+ uid: z.ZodNumber;
80
+ flags: z.ZodNumber;
81
+ }, z.core.$strict>;
82
+ }, z.core.$strict>;
83
+ /** `content: "new"`: what the sender wrote (EMAIL-D240) with the trigger headers and the location. */
84
+ declare const receivedNewTextMessage: z.ZodObject<{
85
+ entry: z.ZodObject<{
86
+ uid: z.ZodNumber;
87
+ id: z.ZodString;
88
+ flags: z.ZodNumber;
89
+ date: z.ZodString;
90
+ octets: z.ZodNumber;
91
+ preview: z.ZodString;
92
+ hasAttachment: z.ZodBoolean;
93
+ subject: z.ZodString;
94
+ from: z.ZodString;
95
+ to: z.ZodString;
96
+ }, z.core.$strict>;
97
+ text: z.ZodString;
98
+ signature: z.ZodString;
99
+ attachments: z.ZodArray<z.ZodObject<{
100
+ contentId: z.ZodOptional<z.ZodString>;
101
+ part: z.ZodString;
102
+ name: z.ZodString;
103
+ type: z.ZodString;
104
+ octets: z.ZodNumber;
105
+ }, z.core.$strict>>;
106
+ warnings: z.ZodArray<z.ZodEnum<{
107
+ incomplete_scan: "incomplete_scan";
108
+ hosted_domain_unaligned: "hosted_domain_unaligned";
109
+ link_text_mismatch: "link_text_mismatch";
110
+ lookalike_brand: "lookalike_brand";
111
+ lookalike_tenant: "lookalike_tenant";
112
+ homograph_domain: "homograph_domain";
113
+ credential_form: "credential_form";
114
+ dangerous_attachment: "dangerous_attachment";
115
+ encrypted_archive: "encrypted_archive";
116
+ }>>;
117
+ incomplete: z.ZodBoolean;
118
+ newText: z.ZodObject<{
119
+ outcome: z.ZodEnum<{
120
+ cut: "cut";
121
+ whole: "whole";
122
+ unreadable: "unreadable";
123
+ }>;
124
+ confidence: z.ZodEnum<{
125
+ proven: "proven";
126
+ structural: "structural";
127
+ none: "none";
128
+ }>;
129
+ reason: z.ZodString;
130
+ extractorVersion: z.ZodNumber;
131
+ fullTextBytes: z.ZodNumber;
132
+ signatureReason: z.ZodEnum<{
133
+ "": "";
134
+ rfc3676_delimiter: "rfc3676_delimiter";
135
+ html_signature: "html_signature";
136
+ sender_learned: "sender_learned";
137
+ }>;
138
+ removed: z.ZodArray<z.ZodObject<{
139
+ kind: z.ZodEnum<{
140
+ quote: "quote";
141
+ forward_header: "forward_header";
142
+ signature: "signature";
143
+ }>;
144
+ messageId: z.ZodNullable<z.ZodUUID>;
145
+ headerId: z.ZodNullable<z.ZodString>;
146
+ bytes: z.ZodNumber;
147
+ }, z.core.$strict>>;
148
+ }, z.core.$strict>;
149
+ headers: z.ZodObject<{
150
+ subject: z.ZodString;
151
+ from: z.ZodString;
152
+ to: z.ZodString;
153
+ cc: z.ZodString;
154
+ replyTo: z.ZodString;
155
+ messageId: z.ZodString;
156
+ unsubscribe: z.ZodOptional<z.ZodString>;
157
+ date: z.ZodOptional<z.ZodString>;
158
+ listId: z.ZodOptional<z.ZodString>;
159
+ autoSubmitted: z.ZodOptional<z.ZodString>;
160
+ repaFlowRun: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strict>;
162
+ location: z.ZodObject<{
163
+ folderId: z.ZodString;
164
+ uidValidity: z.ZodNumber;
165
+ uid: z.ZodNumber;
166
+ flags: z.ZodNumber;
167
+ }, z.core.$strict>;
168
+ }, z.core.$strict>;
169
+ /** The asked mailboxes the person may read now; a subset of the input, in its order. */
170
+ declare const personMailboxAccess: z.ZodObject<{
171
+ readable: z.ZodArray<z.ZodUUID>;
172
+ }, z.core.$strict>;
173
+ /** Exact private operation names and bounds; the integration transport allows exactly these besides the headless set. */
174
+ declare const platformOperations: {
175
+ /**
176
+ * Adds mailboxes; each needs a current read grant, all or nothing. A mailbox without one, removed or unknown answers
177
+ * the same DENIED as a refused or unconfirmed admission (mail never says whether a mailbox exists). More than 100
178
+ * in all is LIMIT.
179
+ */
180
+ readonly receivedSubscribe: {
181
+ readonly internal: string;
182
+ readonly input: z.ZodObject<{
183
+ accountIds: z.ZodArray<z.ZodUUID>;
184
+ }, z.core.$strict>;
185
+ readonly output: z.ZodObject<{
186
+ accountIds: z.ZodArray<z.ZodUUID>;
187
+ }, z.core.$strict>;
188
+ readonly responseBytes: number;
189
+ };
190
+ /** Lists the subscribed mailboxes; it needs admission only, so DENIED here is an admission answer. */
191
+ readonly receivedSubscriptions: {
192
+ readonly internal: string;
193
+ readonly input: z.ZodObject<{}, z.core.$strict>;
194
+ readonly output: z.ZodObject<{
195
+ accountIds: z.ZodArray<z.ZodUUID>;
196
+ }, z.core.$strict>;
197
+ readonly responseBytes: number;
198
+ };
199
+ /** Removes mailboxes; needs no grant, and removing an absent subscription changes nothing. */
200
+ readonly receivedUnsubscribe: {
201
+ readonly internal: string;
202
+ readonly input: z.ZodObject<{
203
+ accountIds: z.ZodArray<z.ZodUUID>;
204
+ }, z.core.$strict>;
205
+ readonly output: z.ZodObject<{
206
+ accountIds: z.ZodArray<z.ZodUUID>;
207
+ }, z.core.$strict>;
208
+ readonly responseBytes: number;
209
+ };
210
+ /** Reads a message by `{accountId, messageId}` under the read grant; it never downloads a part. Default `full`. */
211
+ readonly receivedRead: {
212
+ readonly internal: string;
213
+ readonly input: z.ZodObject<{
214
+ accountId: z.ZodUUID;
215
+ messageId: z.ZodUUID;
216
+ content: z.ZodOptional<z.ZodEnum<{
217
+ full: "full";
218
+ new: "new";
219
+ }>>;
220
+ }, z.core.$strict>;
221
+ readonly output: z.ZodUnion<readonly [z.ZodObject<{
222
+ entry: z.ZodObject<{
223
+ uid: z.ZodNumber;
224
+ id: z.ZodString;
225
+ flags: z.ZodNumber;
226
+ date: z.ZodString;
227
+ octets: z.ZodNumber;
228
+ preview: z.ZodString;
229
+ hasAttachment: z.ZodBoolean;
230
+ subject: z.ZodString;
231
+ from: z.ZodString;
232
+ to: z.ZodString;
233
+ }, z.core.$strict>;
234
+ text: z.ZodString;
235
+ html: z.ZodString;
236
+ attachments: z.ZodArray<z.ZodObject<{
237
+ contentId: z.ZodOptional<z.ZodString>;
238
+ part: z.ZodString;
239
+ name: z.ZodString;
240
+ type: z.ZodString;
241
+ octets: z.ZodNumber;
242
+ }, z.core.$strict>>;
243
+ warnings: z.ZodArray<z.ZodEnum<{
244
+ incomplete_scan: "incomplete_scan";
245
+ hosted_domain_unaligned: "hosted_domain_unaligned";
246
+ link_text_mismatch: "link_text_mismatch";
247
+ lookalike_brand: "lookalike_brand";
248
+ lookalike_tenant: "lookalike_tenant";
249
+ homograph_domain: "homograph_domain";
250
+ credential_form: "credential_form";
251
+ dangerous_attachment: "dangerous_attachment";
252
+ encrypted_archive: "encrypted_archive";
253
+ }>>;
254
+ incomplete: z.ZodBoolean;
255
+ headers: z.ZodObject<{
256
+ subject: z.ZodString;
257
+ from: z.ZodString;
258
+ to: z.ZodString;
259
+ cc: z.ZodString;
260
+ replyTo: z.ZodString;
261
+ messageId: z.ZodString;
262
+ unsubscribe: z.ZodOptional<z.ZodString>;
263
+ date: z.ZodOptional<z.ZodString>;
264
+ listId: z.ZodOptional<z.ZodString>;
265
+ autoSubmitted: z.ZodOptional<z.ZodString>;
266
+ repaFlowRun: z.ZodOptional<z.ZodString>;
267
+ }, z.core.$strict>;
268
+ location: z.ZodObject<{
269
+ folderId: z.ZodString;
270
+ uidValidity: z.ZodNumber;
271
+ uid: z.ZodNumber;
272
+ flags: z.ZodNumber;
273
+ }, z.core.$strict>;
274
+ }, z.core.$strict>, z.ZodObject<{
275
+ entry: z.ZodObject<{
276
+ uid: z.ZodNumber;
277
+ id: z.ZodString;
278
+ flags: z.ZodNumber;
279
+ date: z.ZodString;
280
+ octets: z.ZodNumber;
281
+ preview: z.ZodString;
282
+ hasAttachment: z.ZodBoolean;
283
+ subject: z.ZodString;
284
+ from: z.ZodString;
285
+ to: z.ZodString;
286
+ }, z.core.$strict>;
287
+ text: z.ZodString;
288
+ signature: z.ZodString;
289
+ attachments: z.ZodArray<z.ZodObject<{
290
+ contentId: z.ZodOptional<z.ZodString>;
291
+ part: z.ZodString;
292
+ name: z.ZodString;
293
+ type: z.ZodString;
294
+ octets: z.ZodNumber;
295
+ }, z.core.$strict>>;
296
+ warnings: z.ZodArray<z.ZodEnum<{
297
+ incomplete_scan: "incomplete_scan";
298
+ hosted_domain_unaligned: "hosted_domain_unaligned";
299
+ link_text_mismatch: "link_text_mismatch";
300
+ lookalike_brand: "lookalike_brand";
301
+ lookalike_tenant: "lookalike_tenant";
302
+ homograph_domain: "homograph_domain";
303
+ credential_form: "credential_form";
304
+ dangerous_attachment: "dangerous_attachment";
305
+ encrypted_archive: "encrypted_archive";
306
+ }>>;
307
+ incomplete: z.ZodBoolean;
308
+ newText: z.ZodObject<{
309
+ outcome: z.ZodEnum<{
310
+ cut: "cut";
311
+ whole: "whole";
312
+ unreadable: "unreadable";
313
+ }>;
314
+ confidence: z.ZodEnum<{
315
+ proven: "proven";
316
+ structural: "structural";
317
+ none: "none";
318
+ }>;
319
+ reason: z.ZodString;
320
+ extractorVersion: z.ZodNumber;
321
+ fullTextBytes: z.ZodNumber;
322
+ signatureReason: z.ZodEnum<{
323
+ "": "";
324
+ rfc3676_delimiter: "rfc3676_delimiter";
325
+ html_signature: "html_signature";
326
+ sender_learned: "sender_learned";
327
+ }>;
328
+ removed: z.ZodArray<z.ZodObject<{
329
+ kind: z.ZodEnum<{
330
+ quote: "quote";
331
+ forward_header: "forward_header";
332
+ signature: "signature";
333
+ }>;
334
+ messageId: z.ZodNullable<z.ZodUUID>;
335
+ headerId: z.ZodNullable<z.ZodString>;
336
+ bytes: z.ZodNumber;
337
+ }, z.core.$strict>>;
338
+ }, z.core.$strict>;
339
+ headers: z.ZodObject<{
340
+ subject: z.ZodString;
341
+ from: z.ZodString;
342
+ to: z.ZodString;
343
+ cc: z.ZodString;
344
+ replyTo: z.ZodString;
345
+ messageId: z.ZodString;
346
+ unsubscribe: z.ZodOptional<z.ZodString>;
347
+ date: z.ZodOptional<z.ZodString>;
348
+ listId: z.ZodOptional<z.ZodString>;
349
+ autoSubmitted: z.ZodOptional<z.ZodString>;
350
+ repaFlowRun: z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strict>;
352
+ location: z.ZodObject<{
353
+ folderId: z.ZodString;
354
+ uidValidity: z.ZodNumber;
355
+ uid: z.ZodNumber;
356
+ flags: z.ZodNumber;
357
+ }, z.core.$strict>;
358
+ }, z.core.$strict>]>;
359
+ readonly responseBytes: number;
360
+ };
361
+ /**
362
+ * Which of 1–100 mailboxes a named person may read now (EMAIL-D250): their current Read right, answered only within
363
+ * mailboxes the integration itself may read, so any other mailbox, removed or unknown, reads as not readable. It
364
+ * answers a question about the person and never acts as them (EMAIL-D080 stands); DENIED is an admission answer.
365
+ */
366
+ readonly personMailboxAccess: {
367
+ readonly internal: string;
368
+ readonly input: z.ZodObject<{
369
+ actorId: z.ZodString;
370
+ accountIds: z.ZodArray<z.ZodUUID>;
371
+ }, z.core.$strict>;
372
+ readonly output: z.ZodObject<{
373
+ readable: z.ZodArray<z.ZodUUID>;
374
+ }, z.core.$strict>;
375
+ readonly responseBytes: number;
376
+ };
377
+ };
378
+ type PlatformOperation = keyof typeof platformOperations;
379
+ type PlatformInput<K extends PlatformOperation> = z.infer<(typeof platformOperations)[K]["input"]>;
380
+ type PlatformResult<K extends PlatformOperation> = z.infer<(typeof platformOperations)[K]["output"]>;
381
+ type ReceivedSubscriptions = z.infer<typeof receivedSubscriptions>;
382
+ type PersonMailboxAccess = z.infer<typeof personMailboxAccess>;
383
+ type ReceivedHeaders = z.infer<typeof receivedHeaders>;
384
+ type ReceivedMessage = z.infer<typeof receivedMessage>;
385
+ type ReceivedNewTextMessage = z.infer<typeof receivedNewTextMessage>;
386
+
5
387
  declare const MAXIMUM_DELIVERY_BATCH = 50;
6
388
  declare const deliveryStates: readonly ["sending", "held", "sent", "unconfirmed", "delivered", "delayed", "bounced", "failed", "complained"];
7
389
  declare const deliveryState: z.ZodEnum<{
@@ -621,9 +1003,9 @@ declare const importFailureReason: z.ZodEnum<{
621
1003
  folder_missing: "folder_missing";
622
1004
  }>;
623
1005
  declare const importMessageFailure: z.ZodEnum<{
1006
+ unreadable: "unreadable";
624
1007
  too_large: "too_large";
625
1008
  empty: "empty";
626
- unreadable: "unreadable";
627
1009
  fetch_refused: "fetch_refused";
628
1010
  malware: "malware";
629
1011
  }>;
@@ -910,9 +1292,9 @@ declare const importDetail: z.ZodObject<{
910
1292
  }>;
911
1293
  item: z.ZodString;
912
1294
  reason: z.ZodEnum<{
1295
+ unreadable: "unreadable";
913
1296
  too_large: "too_large";
914
1297
  empty: "empty";
915
- unreadable: "unreadable";
916
1298
  fetch_refused: "fetch_refused";
917
1299
  malware: "malware";
918
1300
  }>;
@@ -1021,9 +1403,9 @@ declare const importAnswer: z.ZodObject<{
1021
1403
  }>;
1022
1404
  item: z.ZodString;
1023
1405
  reason: z.ZodEnum<{
1406
+ unreadable: "unreadable";
1024
1407
  too_large: "too_large";
1025
1408
  empty: "empty";
1026
- unreadable: "unreadable";
1027
1409
  fetch_refused: "fetch_refused";
1028
1410
  malware: "malware";
1029
1411
  }>;
@@ -1275,4 +1657,50 @@ declare const inboxCounts: z.ZodObject<{
1275
1657
  type InboxFolderCount = z.infer<typeof inboxFolderCount>;
1276
1658
  type InboxCounts = z.infer<typeof inboxCounts>;
1277
1659
 
1278
- export { type CleanupInput, ComposeNode, type DeliveryEvent, type DeliveryEventName, type DeliveryMeaning, type DeliveryReason, type DeliveryState, type DeliverySummary, EXPORT_MANIFEST_NAME, type ExportManifest, type ExportStart, type HeaderSample, type HeaderSampleInput, type HeaderSampleMessage, type HeldReason, IMPORT_UPLOAD_PART_BYTES, type ImportBegin, type ImportConfirm, type ImportDetail, type ImportListAnswer, type ImportState, type ImportSummary, type ImportUploadBegin, type ImportUploadPart, type InboxCounts, type InboxFolderCount, MAXIMUM_DELIVERY_BATCH, MAXIMUM_EXPORT_FOLDERS, MAXIMUM_HEADER_SAMPLE, MAXIMUM_IMPORTS_KEPT, MAXIMUM_IMPORT_FAILURES_SHOWN, MAXIMUM_IMPORT_FOLDERS, MAXIMUM_IMPORT_MESSAGE_BYTES, MAXIMUM_IMPORT_UPLOAD_BYTES, MAXIMUM_IMPORT_UPLOAD_DAY_BYTES, MAXIMUM_SEND_BASE64_BYTES, MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, MAXIMUM_SIGNATURES, MAXIMUM_SIGNATURE_BYTES, MAXIMUM_SIGNATURE_LINES, type RecipientDelivery, type SentDeliveries, type SentDeliveriesLocation, type SentDelivery, type SentDeliveryLocation, type SentDeliveryStatus, type Signature, type SignaturePage, type SignaturePlacement, type SignatureSave, type SignatureSaved, cleanupInput, cleanupResult, deliveryEvent, deliveryEventName, deliveryMeaning, deliveryReason, deliveryState, deliveryStates, deliverySummary, exportFlag, exportManifest, exportManifestFolder, exportManifestMessage, exportStart, finishedImportStates, headerSample, headerSampleInput, headerSampleMessage, heldReason, importAnswer, importBegin, importConfirm, importDetail, importErrorCode, importFailureReason, importFile, importFileFormat, importFolderChoice, importKind, importList, importListAnswer, importMessageFailure, importPlanFolder, importProgress, importRef, importSecurity, importSource, importSourceInput, importSpecialUse, importState, importStates, importSummary, importUploadBegin, importUploadPart, importWaitReason, inboxCounts, inboxCountsInput, inboxFolderCount, inboxPosition, inboxWaitInput, recipientDelivery, sentDeliveries, sentDeliveriesLocation, sentDelivery, sentDeliveryLocation, sentDeliveryStatus, signature, signaturePage, signaturePlacement, signatureSave, signatureSaved };
1660
+ /**
1661
+ * One reply-recipient rule (EMAIL-D251) for web mail, the mail client and integrations such as repa Flows. Pure: no
1662
+ * browser or server dependency, so a preview, a composer and a server compute the same addresses.
1663
+ *
1664
+ * - Reply answers the message's Reply-To when it has one, otherwise its sender. Nobody is copied.
1665
+ * - Reply all answers that address and everyone on the message's To, with its Cc in Cc.
1666
+ * - Both remove your own addresses and repeats. Answering your own message goes to its recipients again.
1667
+ */
1668
+ /** Why an address is on a reply: the message's Reply-To, its sender, or its To or Cc. */
1669
+ type ReplyRecipientReason = "reply_to" | "from" | "to" | "cc";
1670
+ /** Why an address was left off: it is one of yours, or it is already on the reply. */
1671
+ type ReplyRemovedReason = "own" | "duplicate";
1672
+ interface ReplyRecipient {
1673
+ readonly address: string;
1674
+ readonly reason: ReplyRecipientReason;
1675
+ }
1676
+ interface ReplyRemoved {
1677
+ readonly address: string;
1678
+ readonly reason: ReplyRemovedReason;
1679
+ /** Where on the original message the address was. */
1680
+ readonly was: ReplyRecipientReason;
1681
+ }
1682
+ interface ReplyRecipients {
1683
+ readonly to: readonly ReplyRecipient[];
1684
+ readonly cc: readonly ReplyRecipient[];
1685
+ readonly removed: readonly ReplyRemoved[];
1686
+ }
1687
+ /** An address-list header, or its addresses one by one (as a received-message payload carries them). */
1688
+ type ReplyAddressField = string | readonly string[];
1689
+ interface ReplyOriginal {
1690
+ readonly from: string;
1691
+ readonly replyTo?: string;
1692
+ readonly to: ReplyAddressField;
1693
+ readonly cc: ReplyAddressField;
1694
+ }
1695
+ type ReplyAnswer = "reply" | "reply_all";
1696
+ /**
1697
+ * The addresses of an address-list header (`"Smith, Anna" <anna@x>, bo@y`): commas inside quotes, comments and
1698
+ * angle brackets do not separate, a group's name is dropped, anything without an `@` is not an address.
1699
+ */
1700
+ declare function addressList(header: ReplyAddressField): string[];
1701
+ /** The recipients of a reply or a reply all to `original`, sent by someone whose own addresses are `own`. */
1702
+ declare function replyRecipients(original: ReplyOriginal, own: readonly string[], answer: ReplyAnswer): ReplyRecipients;
1703
+ /** The addresses of recipients as one address-list header value. */
1704
+ declare function addressHeader(recipients: readonly ReplyRecipient[]): string;
1705
+
1706
+ export { type CleanupInput, ComposeNode, type DeliveryEvent, type DeliveryEventName, type DeliveryMeaning, type DeliveryReason, type DeliveryState, type DeliverySummary, EXPORT_MANIFEST_NAME, type ExportManifest, type ExportStart, type HeaderSample, type HeaderSampleInput, type HeaderSampleMessage, type HeldReason, IMPORT_UPLOAD_PART_BYTES, type ImportBegin, type ImportConfirm, type ImportDetail, type ImportListAnswer, type ImportState, type ImportSummary, type ImportUploadBegin, type ImportUploadPart, type InboxCounts, type InboxFolderCount, MAXIMUM_DELIVERY_BATCH, MAXIMUM_EXPORT_FOLDERS, MAXIMUM_HEADER_SAMPLE, MAXIMUM_IMPORTS_KEPT, MAXIMUM_IMPORT_FAILURES_SHOWN, MAXIMUM_IMPORT_FOLDERS, MAXIMUM_IMPORT_MESSAGE_BYTES, MAXIMUM_IMPORT_UPLOAD_BYTES, MAXIMUM_IMPORT_UPLOAD_DAY_BYTES, MAXIMUM_RECEIVED_SUBSCRIPTIONS, MAXIMUM_SEND_BASE64_BYTES, MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, MAXIMUM_SIGNATURES, MAXIMUM_SIGNATURE_BYTES, MAXIMUM_SIGNATURE_LINES, type PersonMailboxAccess, type PlatformInput, type PlatformOperation, type PlatformResult, type ReceivedHeaders, type ReceivedMessage, type ReceivedNewTextMessage, type ReceivedSubscriptions, type RecipientDelivery, type ReplyAddressField, type ReplyAnswer, type ReplyOriginal, type ReplyRecipient, type ReplyRecipientReason, type ReplyRecipients, type ReplyRemoved, type ReplyRemovedReason, type SentDeliveries, type SentDeliveriesLocation, type SentDelivery, type SentDeliveryLocation, type SentDeliveryStatus, type Signature, type SignaturePage, type SignaturePlacement, type SignatureSave, type SignatureSaved, addressHeader, addressList, cleanupInput, cleanupResult, deliveryEvent, deliveryEventName, deliveryMeaning, deliveryReason, deliveryState, deliveryStates, deliverySummary, exportFlag, exportManifest, exportManifestFolder, exportManifestMessage, exportStart, finishedImportStates, headerSample, headerSampleInput, headerSampleMessage, heldReason, importAnswer, importBegin, importConfirm, importDetail, importErrorCode, importFailureReason, importFile, importFileFormat, importFolderChoice, importKind, importList, importListAnswer, importMessageFailure, importPlanFolder, importProgress, importRef, importSecurity, importSource, importSourceInput, importSpecialUse, importState, importStates, importSummary, importUploadBegin, importUploadPart, importWaitReason, inboxCounts, inboxCountsInput, inboxFolderCount, inboxPosition, inboxWaitInput, personMailboxAccess, platformOperations, receivedHeaders, receivedMessage, receivedNewTextMessage, receivedSubscriptions, recipientDelivery, replyRecipients, sentDeliveries, sentDeliveriesLocation, sentDelivery, sentDeliveryLocation, sentDeliveryStatus, signature, signaturePage, signaturePlacement, signatureSave, signatureSaved };
package/dist/contracts.js CHANGED
@@ -1 +1 @@
1
- export { EXPORT_MANIFEST_NAME, IMPORT_UPLOAD_PART_BYTES, MAXIMUM_DELIVERY_BATCH, MAXIMUM_EXPORT_FOLDERS, MAXIMUM_HEADER_SAMPLE, MAXIMUM_IMPORTS_KEPT, MAXIMUM_IMPORT_FAILURES_SHOWN, MAXIMUM_IMPORT_FOLDERS, MAXIMUM_IMPORT_MESSAGE_BYTES, MAXIMUM_IMPORT_UPLOAD_BYTES, MAXIMUM_IMPORT_UPLOAD_DAY_BYTES, MAXIMUM_RULE_CONDITIONS, MAXIMUM_RULE_ITEMS, MAXIMUM_RULE_PROBLEMS, MAXIMUM_RULE_SCRIPT_BYTES, MAXIMUM_SEND_BASE64_BYTES, MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, MAXIMUM_SIGNATURES, MAXIMUM_SIGNATURE_BYTES, MAXIMUM_SIGNATURE_LINES, MailError, RULES_REQUEST_BYTES, RULES_RESPONSE_BYTES, accountStorage, accountStorageMaximumBytes, attachment, changed, chatText, cleanupInput, cleanupResult, composeFormat, conversation, conversationCursor, conversationLocation, conversationMessage, conversationPage, conversationRow, deliveryEvent, deliveryEventName, deliveryMeaning, deliveryReason, deliveryState, deliveryStates, deliverySummary, download, draftContent, draftInputs, draftList, draftLocation, draftSchemas, entries, entry, exportFlag, exportManifest, exportManifestFolder, exportManifestMessage, exportStart, finishedImportStates, folder, headerSample, headerSampleInput, headerSampleMessage, headlessOperations, heldReason, importAnswer, importBegin, importConfirm, importDetail, importErrorCode, importFailureReason, importFile, importFileFormat, importFolderChoice, importKind, importList, importListAnswer, importMessageFailure, importPlanFolder, importProgress, importRef, importSecurity, importSource, importSourceInput, importSpecialUse, importState, importStates, importSummary, importUploadBegin, importUploadPart, importWaitReason, inbox, inboxCounts, inboxCountsInput, inboxFolderCount, inboxPosition, inboxWaitInput, mailbox, mailboxPage, mailboxRules, message, participant, receipt, recipientDelivery, renamedFolder, rule, ruleActions, ruleCondition, ruleForward, ruleItem, ruleItemInput, ruleVacation, rulesChecked, rulesInputs, rulesNotice, rulesProblem, rulesSaved, safeComposeLink, savedDraft, sender, sentDeliveries, sentDeliveriesLocation, sentDelivery, sentDeliveryLocation, sentDeliveryStatus, serviceAccountStorage, signature, signaturePage, signaturePlacement, signatureSave, signatureSaved, validComposeFormat } from './chunk-CXNVFCRT.js';
1
+ export { EXPORT_MANIFEST_NAME, IMPORT_UPLOAD_PART_BYTES, MAXIMUM_DELIVERY_BATCH, MAXIMUM_EXPORT_FOLDERS, MAXIMUM_HEADER_SAMPLE, MAXIMUM_IMPORTS_KEPT, MAXIMUM_IMPORT_FAILURES_SHOWN, MAXIMUM_IMPORT_FOLDERS, MAXIMUM_IMPORT_MESSAGE_BYTES, MAXIMUM_IMPORT_UPLOAD_BYTES, MAXIMUM_IMPORT_UPLOAD_DAY_BYTES, MAXIMUM_RECEIVED_SUBSCRIPTIONS, MAXIMUM_RULE_CONDITIONS, MAXIMUM_RULE_ITEMS, MAXIMUM_RULE_PROBLEMS, MAXIMUM_RULE_SCRIPT_BYTES, MAXIMUM_SEND_BASE64_BYTES, MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, MAXIMUM_SIGNATURES, MAXIMUM_SIGNATURE_BYTES, MAXIMUM_SIGNATURE_LINES, MailError, RULES_REQUEST_BYTES, RULES_RESPONSE_BYTES, accountStorage, accountStorageMaximumBytes, addressHeader, addressList, attachment, changed, chatText, cleanupInput, cleanupResult, composeFormat, conversation, conversationCursor, conversationLocation, conversationMessage, conversationPage, conversationRow, deliveryEvent, deliveryEventName, deliveryMeaning, deliveryReason, deliveryState, deliveryStates, deliverySummary, download, draftContent, draftInputs, draftList, draftLocation, draftSchemas, entries, entry, exportFlag, exportManifest, exportManifestFolder, exportManifestMessage, exportStart, finishedImportStates, folder, headerSample, headerSampleInput, headerSampleMessage, headlessOperations, heldReason, importAnswer, importBegin, importConfirm, importDetail, importErrorCode, importFailureReason, importFile, importFileFormat, importFolderChoice, importKind, importList, importListAnswer, importMessageFailure, importPlanFolder, importProgress, importRef, importSecurity, importSource, importSourceInput, importSpecialUse, importState, importStates, importSummary, importUploadBegin, importUploadPart, importWaitReason, inbox, inboxCounts, inboxCountsInput, inboxFolderCount, inboxPosition, inboxWaitInput, mailbox, mailboxPage, mailboxRules, message, newTextConfidence, newTextInfo, newTextMessage, newTextOutcome, newTextReason, newTextRemoved, newTextRemovedKind, newTextSignatureReason, participant, personMailboxAccess, platformOperations, readContent, receipt, receivedHeaders, receivedMessage, receivedNewTextMessage, receivedSubscriptions, recipientDelivery, renamedFolder, replyRecipients, rule, ruleActions, ruleCondition, ruleForward, ruleItem, ruleItemInput, ruleVacation, rulesChecked, rulesInputs, rulesNotice, rulesProblem, rulesSaved, safeComposeLink, savedDraft, sender, sentDeliveries, sentDeliveriesLocation, sentDelivery, sentDeliveryLocation, sentDeliveryStatus, serviceAccountStorage, signature, signaturePage, signaturePlacement, signatureSave, signatureSaved, unreadNewText, validComposeFormat } from './chunk-C27HOMPC.js';
@@ -112,4 +112,4 @@ declare class EmailError extends Error {
112
112
  });
113
113
  }
114
114
 
115
- export { type EmailClientOptions as E, type EmailRequestOptions as a, type EmailSender as b, type EmailMessage as c, type EmailSendOptions as d, type EmailSubmission as e, type EmailEventPage as f, type EmailWebhookEvent as g, EmailError as h, type EmailErrorCode as i, type EmailAttachment as j, type EmailExactSender as k, type EmailDomainSender as l, type EmailDomainSendScope as m, type EmailSubmissionState as n, type EmailFeedbackType as o, type EmailEventType as p, type EmailEvent as q };
115
+ export { type EmailRequestOptions as E, type EmailClientOptions as a, type EmailSender as b, type EmailMessage as c, type EmailSendOptions as d, type EmailSubmission as e, type EmailEventPage as f, type EmailWebhookEvent as g, EmailError as h, type EmailErrorCode as i, type EmailAttachment as j, type EmailExactSender as k, type EmailDomainSender as l, type EmailDomainSendScope as m, type EmailSubmissionState as n, type EmailFeedbackType as o, type EmailEventType as p, type EmailEvent as q };