@sayedhfatimi/convex-email 0.0.0-stage → 0.1.1
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/LICENSE +201 -0
- package/README.md +709 -2
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +7 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/registry.d.ts +9 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +20 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/resend/inbound.d.ts +5 -0
- package/dist/adapters/resend/inbound.d.ts.map +1 -0
- package/dist/adapters/resend/inbound.js +207 -0
- package/dist/adapters/resend/inbound.js.map +1 -0
- package/dist/adapters/resend/index.d.ts +4 -0
- package/dist/adapters/resend/index.d.ts.map +1 -0
- package/dist/adapters/resend/index.js +27 -0
- package/dist/adapters/resend/index.js.map +1 -0
- package/dist/adapters/resend/parse.d.ts +3 -0
- package/dist/adapters/resend/parse.d.ts.map +1 -0
- package/dist/adapters/resend/parse.js +94 -0
- package/dist/adapters/resend/parse.js.map +1 -0
- package/dist/adapters/resend/send.d.ts +15 -0
- package/dist/adapters/resend/send.d.ts.map +1 -0
- package/dist/adapters/resend/send.js +117 -0
- package/dist/adapters/resend/send.js.map +1 -0
- package/dist/adapters/resend/webhook.d.ts +6 -0
- package/dist/adapters/resend/webhook.d.ts.map +1 -0
- package/dist/adapters/resend/webhook.js +66 -0
- package/dist/adapters/resend/webhook.js.map +1 -0
- package/dist/adapters/ses/inbound.d.ts +3 -0
- package/dist/adapters/ses/inbound.d.ts.map +1 -0
- package/dist/adapters/ses/inbound.js +52 -0
- package/dist/adapters/ses/inbound.js.map +1 -0
- package/dist/adapters/ses/index.d.ts +4 -0
- package/dist/adapters/ses/index.d.ts.map +1 -0
- package/dist/adapters/ses/index.js +28 -0
- package/dist/adapters/ses/index.js.map +1 -0
- package/dist/adapters/ses/parse.d.ts +7 -0
- package/dist/adapters/ses/parse.d.ts.map +1 -0
- package/dist/adapters/ses/parse.js +209 -0
- package/dist/adapters/ses/parse.js.map +1 -0
- package/dist/adapters/ses/send.d.ts +10 -0
- package/dist/adapters/ses/send.d.ts.map +1 -0
- package/dist/adapters/ses/send.js +179 -0
- package/dist/adapters/ses/send.js.map +1 -0
- package/dist/adapters/ses/sigv4.d.ts +19 -0
- package/dist/adapters/ses/sigv4.d.ts.map +1 -0
- package/dist/adapters/ses/sigv4.js +50 -0
- package/dist/adapters/ses/sigv4.js.map +1 -0
- package/dist/adapters/ses/sns.d.ts +23 -0
- package/dist/adapters/ses/sns.d.ts.map +1 -0
- package/dist/adapters/ses/sns.js +281 -0
- package/dist/adapters/ses/sns.js.map +1 -0
- package/dist/adapters/types.d.ts +11 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/client/index.d.ts +214 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +304 -0
- package/dist/client/index.js.map +1 -0
- package/dist/component/_generated/api.d.ts +62 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +345 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +133 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +80 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/attachments.d.ts +21 -0
- package/dist/component/attachments.d.ts.map +1 -0
- package/dist/component/attachments.js +66 -0
- package/dist/component/attachments.js.map +1 -0
- package/dist/component/cleanup.d.ts +15 -0
- package/dist/component/cleanup.d.ts.map +1 -0
- package/dist/component/cleanup.js +152 -0
- package/dist/component/cleanup.js.map +1 -0
- package/dist/component/config.d.ts +34 -0
- package/dist/component/config.d.ts.map +1 -0
- package/dist/component/config.js +33 -0
- package/dist/component/config.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +8 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/credentials.d.ts +19 -0
- package/dist/component/credentials.d.ts.map +1 -0
- package/dist/component/credentials.js +45 -0
- package/dist/component/credentials.js.map +1 -0
- package/dist/component/deliver.d.ts +58 -0
- package/dist/component/deliver.d.ts.map +1 -0
- package/dist/component/deliver.js +328 -0
- package/dist/component/deliver.js.map +1 -0
- package/dist/component/events.d.ts +15 -0
- package/dist/component/events.d.ts.map +1 -0
- package/dist/component/events.js +141 -0
- package/dist/component/events.js.map +1 -0
- package/dist/component/inbound.d.ts +354 -0
- package/dist/component/inbound.d.ts.map +1 -0
- package/dist/component/inbound.js +933 -0
- package/dist/component/inbound.js.map +1 -0
- package/dist/component/queries.d.ts +76 -0
- package/dist/component/queries.d.ts.map +1 -0
- package/dist/component/queries.js +175 -0
- package/dist/component/queries.js.map +1 -0
- package/dist/component/schema.d.ts +473 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +185 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/send.d.ts +112 -0
- package/dist/component/send.d.ts.map +1 -0
- package/dist/component/send.js +393 -0
- package/dist/component/send.js.map +1 -0
- package/dist/component/status.d.ts +2 -0
- package/dist/component/status.d.ts.map +1 -0
- package/dist/component/status.js +8 -0
- package/dist/component/status.js.map +1 -0
- package/dist/component/suppression.d.ts +36 -0
- package/dist/component/suppression.d.ts.map +1 -0
- package/dist/component/suppression.js +89 -0
- package/dist/component/suppression.js.map +1 -0
- package/dist/component/unsubscribe.d.ts +58 -0
- package/dist/component/unsubscribe.d.ts.map +1 -0
- package/dist/component/unsubscribe.js +129 -0
- package/dist/component/unsubscribe.js.map +1 -0
- package/dist/component/webhooks.d.ts +36 -0
- package/dist/component/webhooks.d.ts.map +1 -0
- package/dist/component/webhooks.js +71 -0
- package/dist/component/webhooks.js.map +1 -0
- package/dist/shared/address.d.ts +9 -0
- package/dist/shared/address.d.ts.map +1 -0
- package/dist/shared/address.js +76 -0
- package/dist/shared/address.js.map +1 -0
- package/dist/shared/authResults.d.ts +15 -0
- package/dist/shared/authResults.d.ts.map +1 -0
- package/dist/shared/authResults.js +86 -0
- package/dist/shared/authResults.js.map +1 -0
- package/dist/shared/htmlToText.d.ts +13 -0
- package/dist/shared/htmlToText.d.ts.map +1 -0
- package/dist/shared/htmlToText.js +221 -0
- package/dist/shared/htmlToText.js.map +1 -0
- package/dist/shared/mime.d.ts +4 -0
- package/dist/shared/mime.d.ts.map +1 -0
- package/dist/shared/mime.js +63 -0
- package/dist/shared/mime.js.map +1 -0
- package/dist/shared/readCapped.d.ts +7 -0
- package/dist/shared/readCapped.d.ts.map +1 -0
- package/dist/shared/readCapped.js +38 -0
- package/dist/shared/readCapped.js.map +1 -0
- package/dist/shared/sanitize.d.ts +10 -0
- package/dist/shared/sanitize.d.ts.map +1 -0
- package/dist/shared/sanitize.js +68 -0
- package/dist/shared/sanitize.js.map +1 -0
- package/dist/shared/threading.d.ts +6 -0
- package/dist/shared/threading.d.ts.map +1 -0
- package/dist/shared/threading.js +23 -0
- package/dist/shared/threading.js.map +1 -0
- package/dist/shared/types.d.ts +260 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +2 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/unsubToken.d.ts +15 -0
- package/dist/shared/unsubToken.d.ts.map +1 -0
- package/dist/shared/unsubToken.js +83 -0
- package/dist/shared/unsubToken.js.map +1 -0
- package/dist/shared/validators.d.ts +760 -0
- package/dist/shared/validators.d.ts.map +1 -0
- package/dist/shared/validators.js +200 -0
- package/dist/shared/validators.js.map +1 -0
- package/package.json +88 -4
- package/src/adapters/index.ts +8 -0
- package/src/adapters/registry.ts +28 -0
- package/src/adapters/resend/inbound.ts +245 -0
- package/src/adapters/resend/index.ts +29 -0
- package/src/adapters/resend/parse.ts +118 -0
- package/src/adapters/resend/send.ts +125 -0
- package/src/adapters/resend/webhook.ts +77 -0
- package/src/adapters/ses/inbound.ts +63 -0
- package/src/adapters/ses/index.ts +30 -0
- package/src/adapters/ses/parse.ts +236 -0
- package/src/adapters/ses/send.ts +206 -0
- package/src/adapters/ses/sigv4.ts +56 -0
- package/src/adapters/ses/sns.ts +321 -0
- package/src/adapters/types.ts +27 -0
- package/src/client/index.ts +549 -0
- package/src/component/_generated/api.ts +78 -0
- package/src/component/_generated/component.ts +475 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +169 -0
- package/src/component/attachments.ts +69 -0
- package/src/component/cleanup.ts +173 -0
- package/src/component/config.ts +52 -0
- package/src/component/convex.config.ts +9 -0
- package/src/component/credentials.ts +63 -0
- package/src/component/deliver.ts +380 -0
- package/src/component/events.ts +179 -0
- package/src/component/inbound.ts +1107 -0
- package/src/component/queries.ts +203 -0
- package/src/component/schema.ts +222 -0
- package/src/component/send.ts +467 -0
- package/src/component/status.ts +8 -0
- package/src/component/suppression.ts +114 -0
- package/src/component/unsubscribe.ts +154 -0
- package/src/component/webhooks.ts +84 -0
- package/src/shared/address.ts +75 -0
- package/src/shared/authResults.ts +94 -0
- package/src/shared/htmlToText.ts +218 -0
- package/src/shared/mime.ts +80 -0
- package/src/shared/readCapped.ts +39 -0
- package/src/shared/sanitize.ts +73 -0
- package/src/shared/threading.ts +26 -0
- package/src/shared/types.ts +254 -0
- package/src/shared/unsubToken.ts +95 -0
- package/src/shared/validators.ts +282 -0
- package/src/test.ts +25 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
export declare const vSuppressionReason: import("convex/values").VUnion<"complaint" | "hard_bounce" | "manual", [import("convex/values").VLiteral<"hard_bounce", "required">, import("convex/values").VLiteral<"complaint", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
2
|
+
export declare const vInboundProvider: import("convex/values").VUnion<"raw" | "resend" | "ses", [import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>, import("convex/values").VLiteral<"raw", "required">], "required", never>;
|
|
3
|
+
export declare const vInboundState: import("convex/values").VUnion<"failed" | "fetched" | "handled" | "received" | "unhandled", [import("convex/values").VLiteral<"received", "required">, import("convex/values").VLiteral<"fetched", "required">, import("convex/values").VLiteral<"handled", "required">, import("convex/values").VLiteral<"unhandled", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
4
|
+
declare const _default: import("convex/server").SchemaDefinition<{
|
|
5
|
+
/** Singleton: the runtime config last passed by the client. No credentials. */
|
|
6
|
+
config: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
7
|
+
adapterOptions: {
|
|
8
|
+
resend?: {
|
|
9
|
+
ownDomains: string[];
|
|
10
|
+
} | undefined;
|
|
11
|
+
};
|
|
12
|
+
credentialsHandle: string;
|
|
13
|
+
defaultTenant?: string | undefined;
|
|
14
|
+
keepRawMime: boolean;
|
|
15
|
+
messageIdDomain?: string | undefined;
|
|
16
|
+
onEventHandle?: string | undefined;
|
|
17
|
+
onInboundHandle?: string | undefined;
|
|
18
|
+
providers: ("resend" | "ses")[];
|
|
19
|
+
sendVia: "resend" | "ses";
|
|
20
|
+
testAllowlist: string[];
|
|
21
|
+
testMode: boolean;
|
|
22
|
+
trustedAuthServIds?: string[] | undefined;
|
|
23
|
+
unsubscribe?: {
|
|
24
|
+
mailto?: string | undefined;
|
|
25
|
+
url: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
providers: import("convex/values").VArray<("resend" | "ses")[], import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>, "required">;
|
|
29
|
+
sendVia: import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>;
|
|
30
|
+
credentialsHandle: import("convex/values").VString<string, "required">;
|
|
31
|
+
onInboundHandle: import("convex/values").VString<string | undefined, "optional">;
|
|
32
|
+
onEventHandle: import("convex/values").VString<string | undefined, "optional">;
|
|
33
|
+
testMode: import("convex/values").VBoolean<boolean, "required">;
|
|
34
|
+
testAllowlist: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
35
|
+
defaultTenant: import("convex/values").VString<string | undefined, "optional">;
|
|
36
|
+
adapterOptions: import("convex/values").VObject<{
|
|
37
|
+
resend?: {
|
|
38
|
+
ownDomains: string[];
|
|
39
|
+
} | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
resend: import("convex/values").VObject<{
|
|
42
|
+
ownDomains: string[];
|
|
43
|
+
} | undefined, {
|
|
44
|
+
ownDomains: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
45
|
+
}, "optional", "ownDomains">;
|
|
46
|
+
}, "required", "resend" | "resend.ownDomains">;
|
|
47
|
+
unsubscribe: import("convex/values").VObject<{
|
|
48
|
+
mailto?: string | undefined;
|
|
49
|
+
url: string;
|
|
50
|
+
} | undefined, {
|
|
51
|
+
url: import("convex/values").VString<string, "required">;
|
|
52
|
+
mailto: import("convex/values").VString<string | undefined, "optional">;
|
|
53
|
+
}, "optional", "mailto" | "url">;
|
|
54
|
+
keepRawMime: import("convex/values").VBoolean<boolean, "required">;
|
|
55
|
+
messageIdDomain: import("convex/values").VString<string | undefined, "optional">;
|
|
56
|
+
trustedAuthServIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
57
|
+
}, "required", "adapterOptions" | "adapterOptions.resend" | "adapterOptions.resend.ownDomains" | "credentialsHandle" | "defaultTenant" | "keepRawMime" | "messageIdDomain" | "onEventHandle" | "onInboundHandle" | "providers" | "sendVia" | "testAllowlist" | "testMode" | "trustedAuthServIds" | "unsubscribe" | "unsubscribe.mailto" | "unsubscribe.url">, {}, {}, {}>;
|
|
58
|
+
messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
59
|
+
addrs?: {
|
|
60
|
+
cc: {
|
|
61
|
+
address: string;
|
|
62
|
+
name?: string | undefined;
|
|
63
|
+
}[];
|
|
64
|
+
from: {
|
|
65
|
+
address: string;
|
|
66
|
+
name?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
to: {
|
|
69
|
+
address: string;
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
} | undefined;
|
|
73
|
+
bcc: string[];
|
|
74
|
+
bodiesPurgedAt?: number | undefined;
|
|
75
|
+
category?: string | undefined;
|
|
76
|
+
cc: string[];
|
|
77
|
+
contentHash?: string | undefined;
|
|
78
|
+
createdAt: number;
|
|
79
|
+
deliveryAmbiguous?: true | undefined;
|
|
80
|
+
direction: "inbound" | "outbound";
|
|
81
|
+
error?: string | undefined;
|
|
82
|
+
from: string;
|
|
83
|
+
hasRemoteImages?: boolean | undefined;
|
|
84
|
+
headers: {
|
|
85
|
+
name: string;
|
|
86
|
+
value: string;
|
|
87
|
+
}[];
|
|
88
|
+
htmlStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
89
|
+
idempotencyKey?: string | undefined;
|
|
90
|
+
inReplyTo?: string | undefined;
|
|
91
|
+
inboundId?: import("convex/values").GenericId<"inbound"> | undefined;
|
|
92
|
+
messageIdReused?: boolean | undefined;
|
|
93
|
+
provider: "raw" | "resend" | "ses";
|
|
94
|
+
providerId?: string | undefined;
|
|
95
|
+
references: string[];
|
|
96
|
+
replyTo: string[];
|
|
97
|
+
rfcMessageId: string;
|
|
98
|
+
status: "bounced" | "complained" | "delivered" | "delivery_delayed" | "failed" | "queued" | "received" | "rejected" | "sending" | "sent" | "suppressed" | "test";
|
|
99
|
+
stream: "bulk" | "transactional";
|
|
100
|
+
subject: string;
|
|
101
|
+
suppressedRecipients: string[];
|
|
102
|
+
tags: Record<string, string>;
|
|
103
|
+
tenant?: string | undefined;
|
|
104
|
+
tenantAdopted?: true | undefined;
|
|
105
|
+
textFromHtml?: true | undefined;
|
|
106
|
+
textStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
107
|
+
threadId: string;
|
|
108
|
+
to: string[];
|
|
109
|
+
truncated?: boolean | undefined;
|
|
110
|
+
unsubscribe?: {
|
|
111
|
+
mailto?: string | undefined;
|
|
112
|
+
url: string;
|
|
113
|
+
} | undefined;
|
|
114
|
+
unsubscribeHeader?: boolean | undefined;
|
|
115
|
+
updatedAt: number;
|
|
116
|
+
verdicts?: {
|
|
117
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
118
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
119
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
120
|
+
} | undefined;
|
|
121
|
+
verdictsSource?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
direction: import("convex/values").VUnion<"inbound" | "outbound", [import("convex/values").VLiteral<"outbound", "required">, import("convex/values").VLiteral<"inbound", "required">], "required", never>;
|
|
124
|
+
/**
|
|
125
|
+
* Outbound: `config.sendVia` at enqueue time (a later cutover never
|
|
126
|
+
* re-routes it). Inbound: the provider it arrived through, or `raw`.
|
|
127
|
+
*/
|
|
128
|
+
provider: import("convex/values").VUnion<"raw" | "resend" | "ses", [import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>, import("convex/values").VLiteral<"raw", "required">], "required", never>;
|
|
129
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
130
|
+
stream: import("convex/values").VUnion<"bulk" | "transactional", [import("convex/values").VLiteral<"transactional", "required">, import("convex/values").VLiteral<"bulk", "required">], "required", never>;
|
|
131
|
+
from: import("convex/values").VString<string, "required">;
|
|
132
|
+
to: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
133
|
+
cc: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
134
|
+
bcc: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
135
|
+
replyTo: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
136
|
+
subject: import("convex/values").VString<string, "required">;
|
|
137
|
+
htmlStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
|
|
138
|
+
textStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
|
|
139
|
+
/** App-supplied extra headers (never Message-ID, threading or unsubscribe). */
|
|
140
|
+
headers: import("convex/values").VArray<{
|
|
141
|
+
name: string;
|
|
142
|
+
value: string;
|
|
143
|
+
}[], import("convex/values").VObject<{
|
|
144
|
+
name: string;
|
|
145
|
+
value: string;
|
|
146
|
+
}, {
|
|
147
|
+
name: import("convex/values").VString<string, "required">;
|
|
148
|
+
value: import("convex/values").VString<string, "required">;
|
|
149
|
+
}, "required", "name" | "value">, "required">;
|
|
150
|
+
rfcMessageId: import("convex/values").VString<string, "required">;
|
|
151
|
+
inReplyTo: import("convex/values").VString<string | undefined, "optional">;
|
|
152
|
+
references: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
153
|
+
threadId: import("convex/values").VString<string, "required">;
|
|
154
|
+
providerId: import("convex/values").VString<string | undefined, "optional">;
|
|
155
|
+
status: import("convex/values").VUnion<"bounced" | "complained" | "delivered" | "delivery_delayed" | "failed" | "queued" | "received" | "rejected" | "sending" | "sent" | "suppressed" | "test", [import("convex/values").VLiteral<"received", "required">, import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"test", "required">, import("convex/values").VLiteral<"suppressed", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"sent", "required">, import("convex/values").VLiteral<"delivery_delayed", "required">, import("convex/values").VLiteral<"delivered", "required">, import("convex/values").VLiteral<"bounced", "required">, import("convex/values").VLiteral<"complained", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"rejected", "required">], "required", never>;
|
|
156
|
+
category: import("convex/values").VString<string | undefined, "optional">;
|
|
157
|
+
/**
|
|
158
|
+
* True when the delivery worker must add `List-Unsubscribe` and
|
|
159
|
+
* `List-Unsubscribe-Post` (it signs the token, since it holds credentials).
|
|
160
|
+
*/
|
|
161
|
+
unsubscribeHeader: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
162
|
+
/**
|
|
163
|
+
* With `unsubscribeHeader`: the unsubscribe url and mailto at send time,
|
|
164
|
+
* so a later config change (another Email instance) never alters them.
|
|
165
|
+
*/
|
|
166
|
+
unsubscribe: import("convex/values").VObject<{
|
|
167
|
+
mailto?: string | undefined;
|
|
168
|
+
url: string;
|
|
169
|
+
} | undefined, {
|
|
170
|
+
url: import("convex/values").VString<string, "required">;
|
|
171
|
+
mailto: import("convex/values").VString<string | undefined, "optional">;
|
|
172
|
+
}, "optional", "mailto" | "url">;
|
|
173
|
+
tags: import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>;
|
|
174
|
+
idempotencyKey: import("convex/values").VString<string | undefined, "optional">;
|
|
175
|
+
error: import("convex/values").VString<string | undefined, "optional">;
|
|
176
|
+
/**
|
|
177
|
+
* Outbound only: an attempt ended with no definite provider answer (a
|
|
178
|
+
* network error, a timeout), so the provider may have the message.
|
|
179
|
+
* `retrySend` then needs `force`. Never cleared.
|
|
180
|
+
*/
|
|
181
|
+
deliveryAmbiguous: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
182
|
+
/** Recipients dropped by suppression or an unsubscribe, normalised. */
|
|
183
|
+
suppressedRecipients: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
184
|
+
/**
|
|
185
|
+
* Inbound only: the `inbound` row that created it. A duplicate row may
|
|
186
|
+
* point at this message too, but only this row may purge its bodies.
|
|
187
|
+
*/
|
|
188
|
+
inboundId: import("convex/values").VId<import("convex/values").GenericId<"inbound"> | undefined, "optional">;
|
|
189
|
+
/** Inbound only: SPF/DKIM/DMARC verdicts and who vouched for them. */
|
|
190
|
+
verdicts: import("convex/values").VObject<{
|
|
191
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
192
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
193
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
194
|
+
} | undefined, {
|
|
195
|
+
spf: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
196
|
+
dkim: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
197
|
+
dmarc: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
198
|
+
}, "optional", "dkim" | "dmarc" | "spf">;
|
|
199
|
+
verdictsSource: import("convex/values").VString<string | undefined, "optional">;
|
|
200
|
+
/** Inbound only: the cleaned HTML still has remote images (marked). */
|
|
201
|
+
hasRemoteImages: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
202
|
+
/** Inbound only: the parsed addresses, exactly as parsed (never re-parsed). */
|
|
203
|
+
addrs: import("convex/values").VObject<{
|
|
204
|
+
cc: {
|
|
205
|
+
address: string;
|
|
206
|
+
name?: string | undefined;
|
|
207
|
+
}[];
|
|
208
|
+
from: {
|
|
209
|
+
address: string;
|
|
210
|
+
name?: string | undefined;
|
|
211
|
+
};
|
|
212
|
+
to: {
|
|
213
|
+
address: string;
|
|
214
|
+
name?: string | undefined;
|
|
215
|
+
}[];
|
|
216
|
+
} | undefined, {
|
|
217
|
+
from: import("convex/values").VObject<{
|
|
218
|
+
address: string;
|
|
219
|
+
name?: string | undefined;
|
|
220
|
+
}, {
|
|
221
|
+
address: import("convex/values").VString<string, "required">;
|
|
222
|
+
name: import("convex/values").VString<string | undefined, "optional">;
|
|
223
|
+
}, "required", "address" | "name">;
|
|
224
|
+
to: import("convex/values").VArray<{
|
|
225
|
+
address: string;
|
|
226
|
+
name?: string | undefined;
|
|
227
|
+
}[], import("convex/values").VObject<{
|
|
228
|
+
address: string;
|
|
229
|
+
name?: string | undefined;
|
|
230
|
+
}, {
|
|
231
|
+
address: import("convex/values").VString<string, "required">;
|
|
232
|
+
name: import("convex/values").VString<string | undefined, "optional">;
|
|
233
|
+
}, "required", "address" | "name">, "required">;
|
|
234
|
+
cc: import("convex/values").VArray<{
|
|
235
|
+
address: string;
|
|
236
|
+
name?: string | undefined;
|
|
237
|
+
}[], import("convex/values").VObject<{
|
|
238
|
+
address: string;
|
|
239
|
+
name?: string | undefined;
|
|
240
|
+
}, {
|
|
241
|
+
address: import("convex/values").VString<string, "required">;
|
|
242
|
+
name: import("convex/values").VString<string | undefined, "optional">;
|
|
243
|
+
}, "required", "address" | "name">, "required">;
|
|
244
|
+
}, "optional", "cc" | "from" | "from.address" | "from.name" | "to">;
|
|
245
|
+
/** Inbound only: SHA-256 over subject, bodies and attachment names/sizes. */
|
|
246
|
+
contentHash: import("convex/values").VString<string | undefined, "optional">;
|
|
247
|
+
/** Inbound only: the stored text was derived from the HTML (set only when true). */
|
|
248
|
+
textFromHtml: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
249
|
+
/** Inbound only: a field was cut to fit the bounds (set only when true). */
|
|
250
|
+
truncated: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
251
|
+
/**
|
|
252
|
+
* Inbound only: it arrived with no tenant and took its parent's (the
|
|
253
|
+
* sender was one of that outbound message's recipients).
|
|
254
|
+
*/
|
|
255
|
+
tenantAdopted: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
256
|
+
/** Inbound only: another inbound message already used this Message-ID. */
|
|
257
|
+
messageIdReused: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
258
|
+
/** Set by `cleanup` once the bodies and attachments have been removed. */
|
|
259
|
+
bodiesPurgedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
260
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
261
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
262
|
+
}, "required", "addrs" | "addrs.cc" | "addrs.from" | "addrs.from.address" | "addrs.from.name" | "addrs.to" | "bcc" | "bodiesPurgedAt" | "category" | "cc" | "contentHash" | "createdAt" | "deliveryAmbiguous" | "direction" | "error" | "from" | "hasRemoteImages" | "headers" | "htmlStorageId" | "idempotencyKey" | "inReplyTo" | "inboundId" | "messageIdReused" | "provider" | "providerId" | "references" | "replyTo" | "rfcMessageId" | "status" | "stream" | "subject" | "suppressedRecipients" | "tags" | "tenant" | "tenantAdopted" | "textFromHtml" | "textStorageId" | "threadId" | "to" | "truncated" | "unsubscribe" | "unsubscribe.mailto" | "unsubscribe.url" | "unsubscribeHeader" | "updatedAt" | "verdicts" | "verdicts.dkim" | "verdicts.dmarc" | "verdicts.spf" | "verdictsSource" | `tags.${string}`>, {
|
|
263
|
+
by_provider_providerId: ["provider", "providerId", "_creationTime"];
|
|
264
|
+
by_rfcMessageId: ["rfcMessageId", "_creationTime"];
|
|
265
|
+
by_status_purged: ["status", "bodiesPurgedAt", "_creationTime"];
|
|
266
|
+
by_status_updatedAt: ["status", "updatedAt", "_creationTime"];
|
|
267
|
+
by_tenant_idempotencyKey: ["tenant", "idempotencyKey", "_creationTime"];
|
|
268
|
+
by_tenant_rfcMessageId: ["tenant", "rfcMessageId", "_creationTime"];
|
|
269
|
+
by_tenant_thread: ["tenant", "threadId", "_creationTime"];
|
|
270
|
+
}, {}, {}>;
|
|
271
|
+
attachments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
272
|
+
contentId?: string | undefined;
|
|
273
|
+
contentType: string;
|
|
274
|
+
disposition: "attachment" | "inline";
|
|
275
|
+
filename: string;
|
|
276
|
+
messageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
277
|
+
size: number;
|
|
278
|
+
storageId: import("convex/values").GenericId<"_storage">;
|
|
279
|
+
tenant?: string | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
/** Unset until a send links it; an attachment links to one message only. */
|
|
282
|
+
messageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
|
|
283
|
+
/** The tenant it was stored for; only that tenant's sends may link it. */
|
|
284
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
285
|
+
storageId: import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">;
|
|
286
|
+
filename: import("convex/values").VString<string, "required">;
|
|
287
|
+
contentType: import("convex/values").VString<string, "required">;
|
|
288
|
+
size: import("convex/values").VFloat64<number, "required">;
|
|
289
|
+
contentId: import("convex/values").VString<string | undefined, "optional">;
|
|
290
|
+
disposition: import("convex/values").VUnion<"attachment" | "inline", [import("convex/values").VLiteral<"attachment", "required">, import("convex/values").VLiteral<"inline", "required">], "required", never>;
|
|
291
|
+
}, "required", "contentId" | "contentType" | "disposition" | "filename" | "messageId" | "size" | "storageId" | "tenant">, {
|
|
292
|
+
by_message: ["messageId", "_creationTime"];
|
|
293
|
+
by_storageId: ["storageId", "_creationTime"];
|
|
294
|
+
}, {}, {}>;
|
|
295
|
+
/** Delivery events from webhooks, kept even when no message matches. */
|
|
296
|
+
events: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
297
|
+
at: number;
|
|
298
|
+
bounceType?: "hard" | "soft" | "undetermined" | undefined;
|
|
299
|
+
detail?: string | undefined;
|
|
300
|
+
messageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
301
|
+
orphan: boolean;
|
|
302
|
+
provider: "resend" | "ses";
|
|
303
|
+
providerEventId: string;
|
|
304
|
+
providerId: string;
|
|
305
|
+
tenant?: string | undefined;
|
|
306
|
+
type: "bounced" | "complained" | "delivered" | "delivery_delayed" | "failed" | "rejected" | "sent";
|
|
307
|
+
}, {
|
|
308
|
+
/** The webhook route's tenant, which scopes matching and de-duplication. */
|
|
309
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
310
|
+
messageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
|
|
311
|
+
provider: import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>;
|
|
312
|
+
providerId: import("convex/values").VString<string, "required">;
|
|
313
|
+
providerEventId: import("convex/values").VString<string, "required">;
|
|
314
|
+
type: import("convex/values").VUnion<"bounced" | "complained" | "delivered" | "delivery_delayed" | "failed" | "rejected" | "sent", [import("convex/values").VLiteral<"sent", "required">, import("convex/values").VLiteral<"delivered", "required">, import("convex/values").VLiteral<"delivery_delayed", "required">, import("convex/values").VLiteral<"bounced", "required">, import("convex/values").VLiteral<"complained", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"rejected", "required">], "required", never>;
|
|
315
|
+
bounceType: import("convex/values").VUnion<"hard" | "soft" | "undetermined" | undefined, [import("convex/values").VLiteral<"hard", "required">, import("convex/values").VLiteral<"soft", "required">, import("convex/values").VLiteral<"undetermined", "required">], "optional", never>;
|
|
316
|
+
at: import("convex/values").VFloat64<number, "required">;
|
|
317
|
+
detail: import("convex/values").VString<string | undefined, "optional">;
|
|
318
|
+
/** True when no message of ours carries `providerId`. */
|
|
319
|
+
orphan: import("convex/values").VBoolean<boolean, "required">;
|
|
320
|
+
}, "required", "at" | "bounceType" | "detail" | "messageId" | "orphan" | "provider" | "providerEventId" | "providerId" | "tenant" | "type">, {
|
|
321
|
+
by_message: ["messageId", "_creationTime"];
|
|
322
|
+
by_tenant_provider_eventId: ["tenant", "provider", "providerEventId", "_creationTime"];
|
|
323
|
+
}, {}, {}>;
|
|
324
|
+
/** Inbound mail, one row per provider notification (or raw hand-in). */
|
|
325
|
+
inbound: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
326
|
+
appNote?: string | undefined;
|
|
327
|
+
attempts?: number | undefined;
|
|
328
|
+
failure?: string | undefined;
|
|
329
|
+
messageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
330
|
+
notification?: {
|
|
331
|
+
from?: string | undefined;
|
|
332
|
+
location: {
|
|
333
|
+
emailId: string;
|
|
334
|
+
kind: "resend";
|
|
335
|
+
} | {
|
|
336
|
+
bucket: string;
|
|
337
|
+
key: string;
|
|
338
|
+
kind: "s3";
|
|
339
|
+
};
|
|
340
|
+
providerId: string;
|
|
341
|
+
recipients: string[];
|
|
342
|
+
verdicts?: {
|
|
343
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
344
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
345
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
346
|
+
} | undefined;
|
|
347
|
+
} | undefined;
|
|
348
|
+
provider: "raw" | "resend" | "ses";
|
|
349
|
+
providerId?: string | undefined;
|
|
350
|
+
purgedAt?: number | undefined;
|
|
351
|
+
rawStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
352
|
+
source?: string | undefined;
|
|
353
|
+
state: "failed" | "fetched" | "handled" | "received" | "unhandled";
|
|
354
|
+
tenant?: string | undefined;
|
|
355
|
+
verdicts?: {
|
|
356
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
357
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
358
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
provider: import("convex/values").VUnion<"raw" | "resend" | "ses", [import("convex/values").VUnion<"resend" | "ses", [import("convex/values").VLiteral<"resend", "required">, import("convex/values").VLiteral<"ses", "required">], "required", never>, import("convex/values").VLiteral<"raw", "required">], "required", never>;
|
|
362
|
+
providerId: import("convex/values").VString<string | undefined, "optional">;
|
|
363
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
364
|
+
/** What the provider told us: where the content lives, who it was for. */
|
|
365
|
+
notification: import("convex/values").VObject<{
|
|
366
|
+
from?: string | undefined;
|
|
367
|
+
location: {
|
|
368
|
+
emailId: string;
|
|
369
|
+
kind: "resend";
|
|
370
|
+
} | {
|
|
371
|
+
bucket: string;
|
|
372
|
+
key: string;
|
|
373
|
+
kind: "s3";
|
|
374
|
+
};
|
|
375
|
+
providerId: string;
|
|
376
|
+
recipients: string[];
|
|
377
|
+
verdicts?: {
|
|
378
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
379
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
380
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
381
|
+
} | undefined;
|
|
382
|
+
} | undefined, {
|
|
383
|
+
providerId: import("convex/values").VString<string, "required">;
|
|
384
|
+
recipients: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
385
|
+
from: import("convex/values").VString<string | undefined, "optional">;
|
|
386
|
+
location: import("convex/values").VUnion<{
|
|
387
|
+
emailId: string;
|
|
388
|
+
kind: "resend";
|
|
389
|
+
} | {
|
|
390
|
+
bucket: string;
|
|
391
|
+
key: string;
|
|
392
|
+
kind: "s3";
|
|
393
|
+
}, [import("convex/values").VObject<{
|
|
394
|
+
emailId: string;
|
|
395
|
+
kind: "resend";
|
|
396
|
+
}, {
|
|
397
|
+
kind: import("convex/values").VLiteral<"resend", "required">;
|
|
398
|
+
emailId: import("convex/values").VString<string, "required">;
|
|
399
|
+
}, "required", "emailId" | "kind">, import("convex/values").VObject<{
|
|
400
|
+
bucket: string;
|
|
401
|
+
key: string;
|
|
402
|
+
kind: "s3";
|
|
403
|
+
}, {
|
|
404
|
+
kind: import("convex/values").VLiteral<"s3", "required">;
|
|
405
|
+
bucket: import("convex/values").VString<string, "required">;
|
|
406
|
+
key: import("convex/values").VString<string, "required">;
|
|
407
|
+
}, "required", "bucket" | "key" | "kind">], "required", "bucket" | "emailId" | "key" | "kind">;
|
|
408
|
+
verdicts: import("convex/values").VObject<{
|
|
409
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
410
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
411
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
412
|
+
} | undefined, {
|
|
413
|
+
spf: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
414
|
+
dkim: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
415
|
+
dmarc: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
416
|
+
}, "optional", "dkim" | "dmarc" | "spf">;
|
|
417
|
+
}, "optional", "from" | "location" | "location.bucket" | "location.emailId" | "location.key" | "location.kind" | "providerId" | "recipients" | "verdicts" | "verdicts.dkim" | "verdicts.dmarc" | "verdicts.spf">;
|
|
418
|
+
source: import("convex/values").VString<string | undefined, "optional">;
|
|
419
|
+
/** Verdicts the caller handed to `receiveRaw`. */
|
|
420
|
+
verdicts: import("convex/values").VObject<{
|
|
421
|
+
dkim?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
422
|
+
dmarc?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
423
|
+
spf?: "fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined;
|
|
424
|
+
} | undefined, {
|
|
425
|
+
spf: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
426
|
+
dkim: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
427
|
+
dmarc: import("convex/values").VUnion<"fail" | "neutral" | "none" | "pass" | "permerror" | "softfail" | "temperror" | undefined, [import("convex/values").VLiteral<"pass", "required">, import("convex/values").VLiteral<"fail", "required">, import("convex/values").VLiteral<"softfail", "required">, import("convex/values").VLiteral<"neutral", "required">, import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"temperror", "required">, import("convex/values").VLiteral<"permerror", "required">], "optional", never>;
|
|
428
|
+
}, "optional", "dkim" | "dmarc" | "spf">;
|
|
429
|
+
state: import("convex/values").VUnion<"failed" | "fetched" | "handled" | "received" | "unhandled", [import("convex/values").VLiteral<"received", "required">, import("convex/values").VLiteral<"fetched", "required">, import("convex/values").VLiteral<"handled", "required">, import("convex/values").VLiteral<"unhandled", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
430
|
+
messageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
|
|
431
|
+
rawStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
|
|
432
|
+
failure: import("convex/values").VString<string | undefined, "optional">;
|
|
433
|
+
/** Scheduled fetch re-attempts used so far. */
|
|
434
|
+
attempts: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
435
|
+
appNote: import("convex/values").VString<string | undefined, "optional">;
|
|
436
|
+
/** Set by `cleanup` once the message bodies and raw MIME are gone. */
|
|
437
|
+
purgedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
438
|
+
}, "required", "appNote" | "attempts" | "failure" | "messageId" | "notification" | "notification.from" | "notification.location" | "notification.location.bucket" | "notification.location.emailId" | "notification.location.key" | "notification.location.kind" | "notification.providerId" | "notification.recipients" | "notification.verdicts" | "notification.verdicts.dkim" | "notification.verdicts.dmarc" | "notification.verdicts.spf" | "provider" | "providerId" | "purgedAt" | "rawStorageId" | "source" | "state" | "tenant" | "verdicts" | "verdicts.dkim" | "verdicts.dmarc" | "verdicts.spf">, {
|
|
439
|
+
by_state_purged: ["state", "purgedAt", "_creationTime"];
|
|
440
|
+
by_tenant_provider_providerId: ["tenant", "provider", "providerId", "_creationTime"];
|
|
441
|
+
by_tenant_state: ["tenant", "state", "_creationTime"];
|
|
442
|
+
}, {}, {}>;
|
|
443
|
+
suppressions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
444
|
+
address: string;
|
|
445
|
+
createdAt: number;
|
|
446
|
+
reason: "complaint" | "hard_bounce" | "manual";
|
|
447
|
+
sourceMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
448
|
+
tenant?: string | undefined;
|
|
449
|
+
}, {
|
|
450
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
451
|
+
address: import("convex/values").VString<string, "required">;
|
|
452
|
+
reason: import("convex/values").VUnion<"complaint" | "hard_bounce" | "manual", [import("convex/values").VLiteral<"hard_bounce", "required">, import("convex/values").VLiteral<"complaint", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
453
|
+
sourceMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
|
|
454
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
455
|
+
}, "required", "address" | "createdAt" | "reason" | "sourceMessageId" | "tenant">, {
|
|
456
|
+
by_tenant_address: ["tenant", "address", "_creationTime"];
|
|
457
|
+
}, {}, {}>;
|
|
458
|
+
unsubscribes: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
459
|
+
address: string;
|
|
460
|
+
category: string;
|
|
461
|
+
createdAt: number;
|
|
462
|
+
tenant?: string | undefined;
|
|
463
|
+
}, {
|
|
464
|
+
tenant: import("convex/values").VString<string | undefined, "optional">;
|
|
465
|
+
address: import("convex/values").VString<string, "required">;
|
|
466
|
+
category: import("convex/values").VString<string, "required">;
|
|
467
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
468
|
+
}, "required", "address" | "category" | "createdAt" | "tenant">, {
|
|
469
|
+
by_tenant_address_category: ["tenant", "address", "category", "_creationTime"];
|
|
470
|
+
}, {}, {}>;
|
|
471
|
+
}, true>;
|
|
472
|
+
export default _default;
|
|
473
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB,6QAI9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wTAA2C,CAAC;AAEzE,eAAO,MAAM,aAAa,iZAMzB,CAAC;;IAGA,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqB7E;;;WAGG;;;;;;;;;;;;QAYH,+EAA+E;;;;;;;;;;;;;;;;;;QAS/E;;;WAGG;;QAEH;;;WAGG;;;;;;;;;;;QAOH;;;;WAIG;;QAEH,uEAAuE;;QAEvE;;;WAGG;;QAEH,sEAAsE;;;;;;;;;;;QAGtE,uEAAuE;;QAEvE,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAI/E,6EAA6E;;QAE7E,oFAAoF;;QAEpF,4EAA4E;;QAE5E;;;WAGG;;QAEH,0EAA0E;;QAE1E,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;QAe1E,4EAA4E;;QAE5E,0EAA0E;;;;;;;;;;;;IAY5E,wEAAwE;;;;;;;;;;;;;QAEtE,4EAA4E;;;;;;;;;;QAY5E,yDAAyD;;;;;;IAU3D,wEAAwE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAKtE,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAG1E,kDAAkD;;;;;;;;;;;;;;QAMlD,+CAA+C;;;QAG/C,sEAAsE"}
|