@repa/mail 0.1.0-alpha.21 → 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.
- package/README.md +2 -2
- package/dist/{chunk-RQOWWVHG.js → chunk-C27HOMPC.js} +131 -26
- package/dist/contracts.d.ts +429 -1
- package/dist/contracts.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ browser-safe. This package uses the repa evaluation licence; no public
|
|
|
6
6
|
production SLA or stable production-use terms are promised.
|
|
7
7
|
|
|
8
8
|
Published on npm: **0.1.0-alpha.20** on the `alpha` channel (first publication
|
|
9
|
-
under this name). This source is the **0.1.0-alpha.
|
|
10
|
-
new-text reads below arrive
|
|
9
|
+
under this name). This source is the **0.1.0-alpha.22** candidate, not yet published;
|
|
10
|
+
new-text reads below arrive in 0.1.0-alpha.21. Pin the exact version; a matching mail service
|
|
11
11
|
deployment is qualified separately.
|
|
12
12
|
|
|
13
13
|
```sh
|
|
@@ -556,7 +556,52 @@ var headlessOperations = {
|
|
|
556
556
|
{ requestBytes: RULES_REQUEST_BYTES, responseBytes: RULES_RESPONSE_BYTES, revision: true }
|
|
557
557
|
)
|
|
558
558
|
};
|
|
559
|
-
var
|
|
559
|
+
var MiB2 = 1024 * 1024;
|
|
560
|
+
var NIL_UUID = "00000000-0000-0000-0000-000000000000";
|
|
561
|
+
var uuid6 = z.uuid().refine((value) => value !== NIL_UUID);
|
|
562
|
+
var MAXIMUM_RECEIVED_SUBSCRIPTIONS = 100;
|
|
563
|
+
var accountIds = z.array(uuid6).min(1).max(MAXIMUM_RECEIVED_SUBSCRIPTIONS).refine((ids) => new Set(ids.map((id) => id.toLowerCase())).size === ids.length, { message: "accountIds must be distinct" });
|
|
564
|
+
var receivedSubscriptions = z.object({ accountIds: z.array(z.uuid()).max(MAXIMUM_RECEIVED_SUBSCRIPTIONS) }).strict();
|
|
565
|
+
var receivedHeaders = message.shape.headers.extend({
|
|
566
|
+
date: z.string().max(512).optional(),
|
|
567
|
+
listId: z.string().max(2048).optional(),
|
|
568
|
+
autoSubmitted: z.string().max(512).optional(),
|
|
569
|
+
/** `X-Repa-Flow-Run`: the flow run that sent the message (FLOWS-D005 loop guard). */
|
|
570
|
+
repaFlowRun: z.string().max(512).optional()
|
|
571
|
+
}).strict();
|
|
572
|
+
var receivedMessage = message.extend({ headers: receivedHeaders, location: conversationLocation }).strict();
|
|
573
|
+
var receivedNewTextMessage = newTextMessage.extend({ headers: receivedHeaders, location: conversationLocation }).strict();
|
|
574
|
+
var actorId = z.string().min(1).max(256).regex(/^[^\u0000-\u001f\u007f]+$/);
|
|
575
|
+
var personMailboxAccess = z.object({ readable: z.array(uuid6).max(MAXIMUM_RECEIVED_SUBSCRIPTIONS) }).strict();
|
|
576
|
+
function platformOperation(internal, input, output, responseBytes = MiB2) {
|
|
577
|
+
return { internal, input, output, responseBytes };
|
|
578
|
+
}
|
|
579
|
+
var platformOperations = {
|
|
580
|
+
/**
|
|
581
|
+
* Adds mailboxes; each needs a current read grant, all or nothing. A mailbox without one, removed or unknown answers
|
|
582
|
+
* the same DENIED as a refused or unconfirmed admission (mail never says whether a mailbox exists). More than 100
|
|
583
|
+
* in all is LIMIT.
|
|
584
|
+
*/
|
|
585
|
+
receivedSubscribe: platformOperation("received-subscribe", z.object({ accountIds }).strict(), receivedSubscriptions),
|
|
586
|
+
/** Lists the subscribed mailboxes; it needs admission only, so DENIED here is an admission answer. */
|
|
587
|
+
receivedSubscriptions: platformOperation("received-subscriptions", z.object({}).strict(), receivedSubscriptions),
|
|
588
|
+
/** Removes mailboxes; needs no grant, and removing an absent subscription changes nothing. */
|
|
589
|
+
receivedUnsubscribe: platformOperation("received-unsubscribe", z.object({ accountIds }).strict(), receivedSubscriptions),
|
|
590
|
+
/** Reads a message by `{accountId, messageId}` under the read grant; it never downloads a part. Default `full`. */
|
|
591
|
+
receivedRead: platformOperation(
|
|
592
|
+
"read",
|
|
593
|
+
z.object({ accountId: uuid6, messageId: uuid6, content: readContent.optional() }).strict(),
|
|
594
|
+
z.union([receivedMessage, receivedNewTextMessage]),
|
|
595
|
+
14 * MiB2
|
|
596
|
+
),
|
|
597
|
+
/**
|
|
598
|
+
* Which of 1–100 mailboxes a named person may read now (EMAIL-D250): their current Read right, answered only within
|
|
599
|
+
* mailboxes the integration itself may read, so any other mailbox, removed or unknown, reads as not readable. It
|
|
600
|
+
* answers a question about the person and never acts as them (EMAIL-D080 stands); DENIED is an admission answer.
|
|
601
|
+
*/
|
|
602
|
+
personMailboxAccess: platformOperation("person-mailbox-access", z.object({ actorId, accountIds }).strict(), personMailboxAccess)
|
|
603
|
+
};
|
|
604
|
+
var uuid7 = z.string().uuid();
|
|
560
605
|
var uint4 = z.number().int().min(1).max(4294967295);
|
|
561
606
|
var count2 = z.number().int().nonnegative();
|
|
562
607
|
var time = z.string();
|
|
@@ -669,24 +714,24 @@ var sentDeliveryStatus = z.object({
|
|
|
669
714
|
timeline: z.array(deliveryEvent).max(50),
|
|
670
715
|
timelineComplete: z.boolean()
|
|
671
716
|
}).strict();
|
|
672
|
-
var sentDeliveryLocation = z.object({ accountId:
|
|
717
|
+
var sentDeliveryLocation = z.object({ accountId: uuid7, folderId: uuid7, uidValidity: uint4, uid: uint4 }).strict();
|
|
673
718
|
var sentDelivery = z.object({ status: sentDeliveryStatus.nullable() }).strict();
|
|
674
719
|
var sentDeliveriesLocation = z.object({
|
|
675
|
-
accountId:
|
|
676
|
-
folderId:
|
|
720
|
+
accountId: uuid7,
|
|
721
|
+
folderId: uuid7,
|
|
677
722
|
uidValidity: uint4,
|
|
678
723
|
uids: z.array(uint4).min(1).max(MAXIMUM_DELIVERY_BATCH)
|
|
679
724
|
}).strict();
|
|
680
725
|
var sentDeliveries = z.object({
|
|
681
726
|
messages: z.array(z.object({ uid: uint4, summary: deliverySummary.nullable() }).strict()).max(MAXIMUM_DELIVERY_BATCH)
|
|
682
727
|
}).strict();
|
|
683
|
-
var
|
|
728
|
+
var uuid8 = z.string().uuid();
|
|
684
729
|
var MAXIMUM_SIGNATURES = 100;
|
|
685
730
|
var MAXIMUM_SIGNATURE_BYTES = 2048;
|
|
686
731
|
var MAXIMUM_SIGNATURE_LINES = 12;
|
|
687
732
|
var signaturePlacement = z.enum(["above", "below"]);
|
|
688
733
|
var signature = z.object({
|
|
689
|
-
addressId:
|
|
734
|
+
addressId: uuid8,
|
|
690
735
|
address: z.string().max(320),
|
|
691
736
|
text: z.string().max(MAXIMUM_SIGNATURE_BYTES),
|
|
692
737
|
format: composeFormat.refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= 16384).optional(),
|
|
@@ -696,21 +741,21 @@ var signature = z.object({
|
|
|
696
741
|
}).strict();
|
|
697
742
|
var signaturePage = z.object({ signatures: z.array(signature).max(MAXIMUM_SIGNATURES), complete: z.boolean() }).strict();
|
|
698
743
|
var signatureSave = z.object({
|
|
699
|
-
operationId:
|
|
700
|
-
addressId:
|
|
744
|
+
operationId: uuid8,
|
|
745
|
+
addressId: uuid8,
|
|
701
746
|
text: z.string().max(MAXIMUM_SIGNATURE_BYTES),
|
|
702
747
|
format: composeFormat.refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= 16384).optional(),
|
|
703
748
|
placement: signaturePlacement,
|
|
704
749
|
expectedRevision: z.number().int().nonnegative()
|
|
705
750
|
}).strict();
|
|
706
751
|
var signatureSaved = z.object({ signature }).strict();
|
|
707
|
-
var
|
|
752
|
+
var uuid9 = z.string().uuid();
|
|
708
753
|
var uint5 = z.number().int().min(1).max(4294967295);
|
|
709
754
|
var address = z.string().min(1).max(320);
|
|
710
755
|
var MAXIMUM_HEADER_SAMPLE = 400;
|
|
711
756
|
var headerSampleInput = z.object({
|
|
712
|
-
accountId:
|
|
713
|
-
folderId:
|
|
757
|
+
accountId: uuid9,
|
|
758
|
+
folderId: uuid9.optional(),
|
|
714
759
|
uidValidity: uint5.optional(),
|
|
715
760
|
limit: z.number().int().min(1).max(MAXIMUM_HEADER_SAMPLE)
|
|
716
761
|
}).strict().refine((input) => input.folderId === void 0 === (input.uidValidity === void 0), {
|
|
@@ -731,7 +776,7 @@ var headerSampleMessage = z.object({
|
|
|
731
776
|
date: z.string().max(40).nullable()
|
|
732
777
|
}).strict();
|
|
733
778
|
var headerSample = z.object({ messages: z.array(headerSampleMessage).max(MAXIMUM_HEADER_SAMPLE), hasMore: z.boolean() }).strict();
|
|
734
|
-
var
|
|
779
|
+
var uuid10 = z.uuid();
|
|
735
780
|
var time2 = z.iso.datetime({ offset: true });
|
|
736
781
|
var count3 = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
737
782
|
var folderName2 = z.string().min(1).max(1024);
|
|
@@ -782,9 +827,9 @@ var importSourceInput = z.object({
|
|
|
782
827
|
username: z.string().min(1).max(320),
|
|
783
828
|
password: z.string().min(1).max(1024)
|
|
784
829
|
}).strict();
|
|
785
|
-
var importBegin = z.object({ operationId:
|
|
786
|
-
var importRef = z.object({ accountId:
|
|
787
|
-
var importList = z.object({ accountId:
|
|
830
|
+
var importBegin = z.object({ operationId: uuid10, accountId: uuid10, source: importSourceInput }).strict();
|
|
831
|
+
var importRef = z.object({ accountId: uuid10, importId: uuid10 }).strict();
|
|
832
|
+
var importList = z.object({ accountId: uuid10 }).strict();
|
|
788
833
|
var importFolderChoice = z.object({
|
|
789
834
|
ordinal: z.number().int().min(0).max(MAXIMUM_IMPORT_FOLDERS - 1),
|
|
790
835
|
include: z.boolean(),
|
|
@@ -794,9 +839,9 @@ var importConfirm = importRef.extend({
|
|
|
794
839
|
folders: z.array(importFolderChoice).min(1).max(MAXIMUM_IMPORT_FOLDERS)
|
|
795
840
|
}).strict();
|
|
796
841
|
var importUploadBegin = z.object({
|
|
797
|
-
operationId:
|
|
798
|
-
accountId:
|
|
799
|
-
folderId:
|
|
842
|
+
operationId: uuid10,
|
|
843
|
+
accountId: uuid10,
|
|
844
|
+
folderId: uuid10,
|
|
800
845
|
fileName: z.string().min(1).max(255),
|
|
801
846
|
format: importFileFormat,
|
|
802
847
|
bytes: z.number().int().min(1).max(MAXIMUM_IMPORT_UPLOAD_BYTES)
|
|
@@ -826,14 +871,14 @@ var importFile = z.object({
|
|
|
826
871
|
receivedBytes: count3
|
|
827
872
|
}).strict();
|
|
828
873
|
var importSummary = z.object({
|
|
829
|
-
id:
|
|
830
|
-
accountId:
|
|
874
|
+
id: uuid10,
|
|
875
|
+
accountId: uuid10,
|
|
831
876
|
kind: importKind,
|
|
832
877
|
state: importState,
|
|
833
878
|
source: importSource.nullable(),
|
|
834
879
|
file: importFile.nullable(),
|
|
835
880
|
/** The destination folder of an upload. */
|
|
836
|
-
folderId:
|
|
881
|
+
folderId: uuid10.nullable(),
|
|
837
882
|
createdAt: time2,
|
|
838
883
|
startedAt: time2.nullable(),
|
|
839
884
|
finishedAt: time2.nullable(),
|
|
@@ -880,15 +925,15 @@ var importErrorCode = z.enum([
|
|
|
880
925
|
"UPLOAD_TOO_LARGE",
|
|
881
926
|
"UPLOAD_DAY_LIMIT"
|
|
882
927
|
]);
|
|
883
|
-
var
|
|
928
|
+
var uuid11 = z.uuid();
|
|
884
929
|
var time3 = z.iso.datetime({ offset: true });
|
|
885
930
|
var count4 = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
886
931
|
var MAXIMUM_EXPORT_FOLDERS = 1024;
|
|
887
932
|
var EXPORT_MANIFEST_NAME = "manifest.json";
|
|
888
933
|
var exportStart = z.object({
|
|
889
|
-
accountId:
|
|
934
|
+
accountId: uuid11,
|
|
890
935
|
/** null exports every folder the person may read. */
|
|
891
|
-
folderIds: z.array(
|
|
936
|
+
folderIds: z.array(uuid11).min(1).max(MAXIMUM_EXPORT_FOLDERS).nullable()
|
|
892
937
|
}).strict();
|
|
893
938
|
var exportFlag = z.enum(["seen", "answered", "flagged", "draft", "deleted"]);
|
|
894
939
|
var exportManifestMessage = z.object({
|
|
@@ -908,7 +953,7 @@ var exportManifestFolder = z.object({
|
|
|
908
953
|
}).strict();
|
|
909
954
|
var exportManifest = z.object({
|
|
910
955
|
version: z.literal(1),
|
|
911
|
-
mailbox: z.object({ accountId:
|
|
956
|
+
mailbox: z.object({ accountId: uuid11, address: z.string().min(1).max(320).nullable() }).strict(),
|
|
912
957
|
exportedAt: time3,
|
|
913
958
|
folders: z.array(exportManifestFolder).max(MAXIMUM_EXPORT_FOLDERS)
|
|
914
959
|
}).strict();
|
|
@@ -926,4 +971,64 @@ var inboxCountsInput = account3.extend({ folderIds: z.array(z.uuid()).min(1).max
|
|
|
926
971
|
var inboxFolderCount = z.object({ folderId: z.uuid(), unseen: z.number().int().nonnegative(), total: z.number().int().nonnegative(), uidNext: z.number().int().min(1).max(4294967295), uidValidity: z.number().int().min(1).max(4294967295) }).strict();
|
|
927
972
|
var inboxCounts = inboxPosition.extend({ folders: z.array(inboxFolderCount).max(200) }).strict();
|
|
928
973
|
|
|
929
|
-
|
|
974
|
+
// src/contracts/reply-recipients.ts
|
|
975
|
+
function addressList(header3) {
|
|
976
|
+
const text3 = typeof header3 === "string" ? header3 : header3.join(", ");
|
|
977
|
+
const items2 = [];
|
|
978
|
+
let current = "", quoted = false, angle = false, comment = 0;
|
|
979
|
+
for (let index2 = 0; index2 < text3.length; index2++) {
|
|
980
|
+
const char = text3[index2];
|
|
981
|
+
if (char === "\\" && quoted) {
|
|
982
|
+
current += char + (text3[++index2] ?? "");
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
if (char === '"' && !angle && !comment) quoted = !quoted;
|
|
986
|
+
else if (!quoted && char === "(") comment++;
|
|
987
|
+
else if (!quoted && char === ")" && comment) comment--;
|
|
988
|
+
else if (!quoted && !comment && char === "<") angle = true;
|
|
989
|
+
else if (!quoted && !comment && char === ">") angle = false;
|
|
990
|
+
if (!quoted && !angle && !comment && (char === "," || char === ";")) {
|
|
991
|
+
items2.push(current);
|
|
992
|
+
current = "";
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
if (!quoted && !angle && !comment && char === ":") {
|
|
996
|
+
current = "";
|
|
997
|
+
continue;
|
|
998
|
+
}
|
|
999
|
+
current += char;
|
|
1000
|
+
}
|
|
1001
|
+
items2.push(current);
|
|
1002
|
+
return items2.map((item) => (/<([^<>]*)>/.exec(item)?.[1] ?? item.replace(/\([^)]*\)/g, "")).trim()).filter((address2) => /^[^@\s]+@[^@\s]+$/.test(address2));
|
|
1003
|
+
}
|
|
1004
|
+
function replyRecipients(original, own, answer) {
|
|
1005
|
+
const mine = new Set(own.map((address2) => address2.toLowerCase()));
|
|
1006
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1007
|
+
const removed = [];
|
|
1008
|
+
const keep = (addresses, reason) => addresses.flatMap((address2) => {
|
|
1009
|
+
const key = address2.toLowerCase();
|
|
1010
|
+
if (mine.has(key)) {
|
|
1011
|
+
removed.push({ address: address2, reason: "own", was: reason });
|
|
1012
|
+
return [];
|
|
1013
|
+
}
|
|
1014
|
+
if (seen.has(key)) {
|
|
1015
|
+
removed.push({ address: address2, reason: "duplicate", was: reason });
|
|
1016
|
+
return [];
|
|
1017
|
+
}
|
|
1018
|
+
seen.add(key);
|
|
1019
|
+
return [{ address: address2, reason }];
|
|
1020
|
+
});
|
|
1021
|
+
const fromHere = addressList(original.from).some((address2) => mine.has(address2.toLowerCase()));
|
|
1022
|
+
const replyTo = original.replyTo ? addressList(original.replyTo) : [];
|
|
1023
|
+
const answerTo = fromHere ? [] : replyTo.length ? keep(replyTo, "reply_to") : keep(addressList(original.from), "from");
|
|
1024
|
+
if (answer === "reply") return { to: fromHere ? keep(addressList(original.to), "to") : answerTo, cc: [], removed };
|
|
1025
|
+
let to = [...answerTo, ...keep(addressList(original.to), "to")];
|
|
1026
|
+
let cc = keep(addressList(original.cc), "cc");
|
|
1027
|
+
if (!to.length) [to, cc] = [cc, []];
|
|
1028
|
+
return { to, cc, removed };
|
|
1029
|
+
}
|
|
1030
|
+
function addressHeader(recipients) {
|
|
1031
|
+
return recipients.map((recipient) => recipient.address).join(", ");
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
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 };
|
package/dist/contracts.d.ts
CHANGED
|
@@ -2,6 +2,388 @@ import { C as ComposeNode } from './operations-g1slmaT3.js';
|
|
|
2
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<{
|
|
@@ -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
|
-
|
|
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, newTextConfidence, newTextInfo, newTextMessage, newTextOutcome, newTextReason, newTextRemoved, newTextRemovedKind, newTextSignatureReason, participant, readContent, 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, unreadNewText, validComposeFormat } from './chunk-
|
|
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';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, headlessOperations } from './chunk-
|
|
1
|
+
import { MAXIMUM_SEND_BODY_BYTES, MAXIMUM_SEND_BYTES, headlessOperations } from './chunk-C27HOMPC.js';
|
|
2
2
|
import { EmailError, publicErrorCodes } from './chunk-XW4CRZRY.js';
|
|
3
3
|
export { EmailError } from './chunk-XW4CRZRY.js';
|
|
4
4
|
import { createHmac, timingSafeEqual } from 'crypto';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repa/mail",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.22",
|
|
4
4
|
"description": "Server-side client library for the repa mail HTTP API: send, submission status, event history and signed webhook verification.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repaRelease": {
|
|
16
16
|
"train": "public-sdk",
|
|
17
|
-
"coordinatedVersion": "0.1.0-alpha.
|
|
17
|
+
"coordinatedVersion": "0.1.0-alpha.22",
|
|
18
18
|
"channel": "alpha",
|
|
19
19
|
"licenseStatus": "evaluation-only"
|
|
20
20
|
},
|