samva 0.17.0 → 0.18.0
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/AGENTS.md +5 -0
- package/README.md +16 -3
- package/dist/{rolldown-runtime-D7D4PA-g.js → _virtual/_rolldown/runtime.js} +1 -1
- package/dist/client/client/client.gen.js +174 -0
- package/dist/client/client/utils.gen.js +177 -0
- package/dist/client/client.gen.js +8 -0
- package/dist/client/core/auth.gen.js +12 -0
- package/dist/client/core/bodySerializer.gen.js +6 -0
- package/dist/client/core/params.gen.js +77 -0
- package/dist/client/core/pathSerializer.gen.js +82 -0
- package/dist/client/core/serverSentEvents.gen.js +96 -0
- package/dist/client/core/utils.gen.js +78 -0
- package/dist/{promises---Kbh-7z.js → client/sdk.gen.js} +4 -2293
- package/dist/client-attribution.js +9 -0
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/analytics.js +23 -2
- package/dist/effect/api-keys.d.ts +12 -12
- package/dist/effect/api-keys.js +29 -2
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/attachments.js +19 -2
- package/dist/effect/brands.d.ts +6 -6
- package/dist/effect/brands.js +26 -3
- package/dist/effect/campaigns.d.ts +18 -18
- package/dist/effect/campaigns.js +35 -2
- package/dist/effect/categories.d.ts +2 -2
- package/dist/effect/categories.js +95 -1
- package/dist/effect/client.js +3 -3
- package/dist/effect/contact-groups.d.ts +14 -14
- package/dist/effect/contact-groups.js +31 -2
- package/dist/effect/contacts.d.ts +28 -28
- package/dist/effect/contacts.js +52 -2
- package/dist/effect/conversations.d.ts +17 -17
- package/dist/effect/conversations.js +37 -2
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/custom-fields.js +19 -2
- package/dist/effect/email.d.ts +75 -75
- package/dist/effect/email.js +140 -2
- package/dist/effect/errors.d.ts +2 -0
- package/dist/effect/errors.js +3 -0
- package/dist/effect/events.d.ts +2 -2
- package/dist/effect/events.js +17 -3
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extension-installations.js +29 -2
- package/dist/effect/extensions.d.ts +9 -9
- package/dist/effect/extensions.js +21 -2
- package/dist/effect/feedback.d.ts +1 -1
- package/dist/effect/feedback.js +14 -3
- package/dist/{analytics-CaqPRsry.js → effect/generated/analytics.js} +4 -23
- package/dist/{api-keys-Ce1Y4_Ip.js → effect/generated/api-keys.js} +4 -29
- package/dist/{attachments-DYqVIraC.js → effect/generated/attachments.js} +3 -18
- package/dist/{brands-ZwuOGIWO.js → effect/generated/brands.js} +5 -25
- package/dist/{campaigns-DZlz1E9E.js → effect/generated/campaigns.js} +4 -35
- package/dist/effect/generated/contact-events.js +37 -0
- package/dist/{contact-groups-BLbFXnjq.js → effect/generated/contact-groups.js} +3 -30
- package/dist/{contacts-BbsoXXB4.js → effect/generated/contacts.js} +3 -81
- package/dist/{conversations-_sRHueML.js → effect/generated/conversations.js} +3 -36
- package/dist/{custom-fields-BHWbwlKn.js → effect/generated/custom-fields.js} +5 -19
- package/dist/{email-R0NAA9PW.js → effect/generated/email.js} +995 -1146
- package/dist/{events-CxbTUHYT.js → effect/generated/events.js} +3 -15
- package/dist/{extension-installations-CD94LPmk.js → effect/generated/extension-installations.js} +4 -29
- package/dist/{extensions-BKyNQLvu.js → effect/generated/extensions.js} +3 -20
- package/dist/{feedback-Bpa09JOS.js → effect/generated/feedback.js} +3 -12
- package/dist/{journeys-CARo_BJT.js → effect/generated/journeys.js} +3 -38
- package/dist/{mailboxes-BRDn7BIK.js → effect/generated/mailboxes.js} +793 -951
- package/dist/{media-VrrtNnft.js → effect/generated/media.js} +3 -3
- package/dist/effect/generated/messages.js +671 -0
- package/dist/{namespaces-CcvEbG-y.js → effect/generated/namespaces.js} +3 -20
- package/dist/{operations-CmB3FHwf.js → effect/generated/operations.js} +3 -16
- package/dist/{organizations-A-plufWc.js → effect/generated/organizations.js} +3 -24
- package/dist/{scheduled-messages-DkKZRRaN.js → effect/generated/scheduled-messages.js} +4 -21
- package/dist/effect/generated/shared.js +1053 -0
- package/dist/{subscriptions-DEXYtMXg.js → effect/generated/subscriptions.js} +3 -9
- package/dist/{templates-DZomxsG7.js → effect/generated/templates.js} +3 -78
- package/dist/{unsubscribe-groups-Iqk4Isf9.js → effect/generated/unsubscribe-groups.js} +5 -29
- package/dist/{webhooks-CPXuu8Xf.js → effect/generated/webhooks.js} +4 -34
- package/dist/{whoami-Ccz0jwlt.js → effect/generated/whoami.js} +5 -10
- package/dist/{categories-CA4XIQAb.js → effect/generated-metadata.js} +2 -94
- package/dist/effect/index.d.ts +1 -2
- package/dist/effect/index.js +32 -32
- package/dist/effect/internal/client.js +69 -0
- package/dist/effect/internal/email-sender.js +21 -0
- package/dist/effect/internal/mailbox-events.js +33 -0
- package/dist/effect/internal/operation.js +116 -0
- package/dist/effect/internal/send.js +56 -0
- package/dist/effect/journeys.d.ts +18 -18
- package/dist/effect/journeys.js +39 -2
- package/dist/effect/mailboxes.d.ts +191 -191
- package/dist/effect/mailboxes.js +135 -3
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +10 -10
- package/dist/effect/messages.d.ts +14 -14
- package/dist/effect/messages.js +15 -14
- package/dist/effect/namespaces.d.ts +7 -7
- package/dist/effect/namespaces.js +21 -2
- package/dist/effect/operations.d.ts +5 -5
- package/dist/effect/operations.js +17 -2
- package/dist/effect/organizations.d.ts +7 -7
- package/dist/effect/organizations.js +25 -2
- package/dist/effect/pagination.js +39 -0
- package/dist/effect/retry.js +3 -3
- package/dist/{runtime-P0l1_2-C.js → effect/runtime.js} +2 -2
- package/dist/effect/scheduled-messages.d.ts +7 -7
- package/dist/effect/scheduled-messages.js +21 -2
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/subscriptions.js +10 -2
- package/dist/effect/templates.d.ts +39 -39
- package/dist/effect/templates.js +80 -3
- package/dist/effect/unsubscribe-groups.d.ts +11 -11
- package/dist/effect/unsubscribe-groups.js +29 -2
- package/dist/effect/webhooks.d.ts +14 -14
- package/dist/effect/webhooks.js +35 -3
- package/dist/effect/whoami.d.ts +9 -9
- package/dist/effect/whoami.js +10 -2
- package/dist/index.js +4 -3
- package/dist/{inline-attachments-Bi1hDltp.js → inline-attachments.js} +13 -7
- package/dist/{mailbox-events-VKR4f3qq.js → mailbox-events.js} +2 -2
- package/dist/{normalize-B79uJIeb.js → normalize.js} +2 -2
- package/dist/package.js +6 -0
- package/dist/promises/errors.gen.js +1340 -0
- package/dist/promises/index.js +288 -3
- package/dist/{operation-n_IYgNVK.js → service-map.js} +2 -148
- package/package.json +6 -2
- package/dist/client-DOzUrdTE.js +0 -1115
- package/dist/send-Bxc0XfGE.js +0 -722
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
//#region src/effect/generated/messages.ts
|
|
5
|
+
const MessageSender = /* @__PURE__ */ Schema.Struct({
|
|
6
|
+
address: Schema.String,
|
|
7
|
+
name: Schema.Union([Schema.String, Schema.Null])
|
|
8
|
+
}).annotate({ identifier: "MessageSender" });
|
|
9
|
+
const SubmissionClient = /* @__PURE__ */ Schema.Struct({
|
|
10
|
+
surface: Schema.Union([
|
|
11
|
+
Schema.Literal("typescript-promise"),
|
|
12
|
+
Schema.Literal("typescript-effect"),
|
|
13
|
+
Schema.Literal("cli"),
|
|
14
|
+
Schema.Literal("mcp")
|
|
15
|
+
]),
|
|
16
|
+
version: Schema.String
|
|
17
|
+
}).annotate({ identifier: "SubmissionClient" });
|
|
18
|
+
const MessageDeliveryId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
19
|
+
expected: "a string matching the RegExp ^mdel_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
20
|
+
identifier: "MessageDeliveryId"
|
|
21
|
+
})).pipe(Schema.brand("MessageDeliveryId"));
|
|
22
|
+
const MessageDeliveryError = /* @__PURE__ */ Schema.Struct({
|
|
23
|
+
code: Schema.Union([Schema.String, Schema.Null]),
|
|
24
|
+
message: Schema.Union([Schema.String, Schema.Null]),
|
|
25
|
+
retryable: Schema.Union([Schema.Boolean, Schema.Null])
|
|
26
|
+
}).annotate({ identifier: "MessageDeliveryError" });
|
|
27
|
+
const DeliveryErrorDetails = /* @__PURE__ */ Schema.Struct({
|
|
28
|
+
code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
29
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
30
|
+
message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
31
|
+
details: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Union([
|
|
32
|
+
Schema.String,
|
|
33
|
+
Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
34
|
+
Schema.Null
|
|
35
|
+
])), Schema.Null])),
|
|
36
|
+
retryable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
37
|
+
}).annotate({ identifier: "DeliveryErrorDetails" });
|
|
38
|
+
const EmailAddress = /* @__PURE__ */ Schema.Struct({
|
|
39
|
+
email: Schema.String,
|
|
40
|
+
name: Schema.Union([Schema.String, Schema.Null])
|
|
41
|
+
}).annotate({ identifier: "EmailAddress" });
|
|
42
|
+
const MessageEventId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mevt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
43
|
+
expected: "a string matching the RegExp ^mevt_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
44
|
+
identifier: "MessageEventId"
|
|
45
|
+
})).pipe(Schema.brand("MessageEventId"));
|
|
46
|
+
const ValidateEmailResponse = /* @__PURE__ */ Schema.Struct({
|
|
47
|
+
valid: Schema.Literal(true),
|
|
48
|
+
from: Schema.Struct({
|
|
49
|
+
email: Schema.String,
|
|
50
|
+
name: Schema.Union([Schema.String, Schema.Null])
|
|
51
|
+
}),
|
|
52
|
+
recipientCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
|
|
53
|
+
content: Schema.Struct({
|
|
54
|
+
source: Schema.Union([Schema.Literal("inline"), Schema.Literal("template")]),
|
|
55
|
+
subject: Schema.String,
|
|
56
|
+
hasHtml: Schema.Boolean,
|
|
57
|
+
hasText: Schema.Boolean
|
|
58
|
+
})
|
|
59
|
+
}).annotate({ identifier: "ValidateEmailResponse" });
|
|
60
|
+
const SubmissionCredential = /* @__PURE__ */ Schema.Union([
|
|
61
|
+
Schema.Struct({
|
|
62
|
+
kind: Schema.Literal("api_key"),
|
|
63
|
+
apiKeyId: Schema.Union([ApiKeyId, Schema.Null])
|
|
64
|
+
}),
|
|
65
|
+
Schema.Struct({
|
|
66
|
+
kind: Schema.Literal("oauth"),
|
|
67
|
+
clientId: Schema.Union([Schema.String, Schema.Null])
|
|
68
|
+
}),
|
|
69
|
+
Schema.Struct({ kind: Schema.Literal("session") })
|
|
70
|
+
]).annotate({ identifier: "SubmissionCredential" });
|
|
71
|
+
const MessageContent = /* @__PURE__ */ Schema.Struct({
|
|
72
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
73
|
+
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
74
|
+
markdown: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
75
|
+
email: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
76
|
+
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
77
|
+
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
78
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
79
|
+
headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
|
|
80
|
+
tracking: Schema.optionalKey(EmailTrackingOverrideV1),
|
|
81
|
+
attachments: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Struct({
|
|
82
|
+
filename: Schema.String,
|
|
83
|
+
contentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
84
|
+
isInline: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
85
|
+
content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
86
|
+
mediaId: Schema.optionalKey(Schema.Union([MediaId, Schema.Null])),
|
|
87
|
+
contentType: Schema.String,
|
|
88
|
+
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
89
|
+
})), Schema.Null]))
|
|
90
|
+
}), Schema.Null])),
|
|
91
|
+
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]))
|
|
92
|
+
}).annotate({ identifier: "MessageContent" });
|
|
93
|
+
const MessageAddress = /* @__PURE__ */ Schema.Struct({
|
|
94
|
+
address: Schema.String,
|
|
95
|
+
contactId: Schema.Union([ContactId, Schema.Null])
|
|
96
|
+
}).annotate({ identifier: "MessageAddress" });
|
|
97
|
+
const MessageDelivery = /* @__PURE__ */ Schema.Struct({
|
|
98
|
+
id: MessageDeliveryId,
|
|
99
|
+
recipient: Schema.Union([Schema.String, Schema.Null]),
|
|
100
|
+
status: Schema.Union([
|
|
101
|
+
Schema.Literal("pending"),
|
|
102
|
+
Schema.Literal("scheduled"),
|
|
103
|
+
Schema.Literal("queued"),
|
|
104
|
+
Schema.Literal("processing"),
|
|
105
|
+
Schema.Literal("sent"),
|
|
106
|
+
Schema.Literal("delivered"),
|
|
107
|
+
Schema.Literal("read"),
|
|
108
|
+
Schema.Literal("failed"),
|
|
109
|
+
Schema.Literal("bounced"),
|
|
110
|
+
Schema.Literal("complained")
|
|
111
|
+
]),
|
|
112
|
+
attemptCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
113
|
+
waitReason: Schema.Union([Schema.Union([
|
|
114
|
+
Schema.Literal("rate"),
|
|
115
|
+
Schema.Literal("daily-quota"),
|
|
116
|
+
Schema.Literal("domain-health"),
|
|
117
|
+
Schema.Literal("sending-paused"),
|
|
118
|
+
Schema.Literal("upstream-unavailable"),
|
|
119
|
+
Schema.Literal("retry"),
|
|
120
|
+
Schema.Literal("campaign-paused"),
|
|
121
|
+
Schema.Literal("domain-warming"),
|
|
122
|
+
Schema.Literal("onboarding-review"),
|
|
123
|
+
Schema.Literal("content-review"),
|
|
124
|
+
Schema.Literal("screening-unavailable")
|
|
125
|
+
]), Schema.Null]),
|
|
126
|
+
nextRetryAt: Schema.Union([Schema.String, Schema.Null]),
|
|
127
|
+
sentAt: Schema.Union([Schema.String, Schema.Null]),
|
|
128
|
+
deliveredAt: Schema.Union([Schema.String, Schema.Null]),
|
|
129
|
+
readAt: Schema.Union([Schema.String, Schema.Null]),
|
|
130
|
+
failedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
131
|
+
error: Schema.Union([MessageDeliveryError, Schema.Null]),
|
|
132
|
+
createdAt: Schema.String,
|
|
133
|
+
updatedAt: Schema.String
|
|
134
|
+
}).annotate({ identifier: "MessageDelivery" });
|
|
135
|
+
const MessageEventPage = /* @__PURE__ */ Schema.Struct({
|
|
136
|
+
items: Schema.Array(Schema.Struct({
|
|
137
|
+
id: MessageEventId,
|
|
138
|
+
messageId: MessageId,
|
|
139
|
+
eventType: Schema.String,
|
|
140
|
+
status: Schema.String,
|
|
141
|
+
timestamp: Schema.String,
|
|
142
|
+
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]))
|
|
143
|
+
})),
|
|
144
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
145
|
+
}).annotate({ identifier: "MessageEventPage" });
|
|
146
|
+
const MessageSubmission = /* @__PURE__ */ Schema.Struct({
|
|
147
|
+
origin: Schema.Union([
|
|
148
|
+
Schema.Literal("direct"),
|
|
149
|
+
Schema.Literal("campaign"),
|
|
150
|
+
Schema.Literal("scheduled"),
|
|
151
|
+
Schema.Literal("mailbox"),
|
|
152
|
+
Schema.Literal("forwarding"),
|
|
153
|
+
Schema.Literal("journey")
|
|
154
|
+
]),
|
|
155
|
+
transport: Schema.Union([Schema.Literal("http"), Schema.Null]),
|
|
156
|
+
credential: Schema.Union([SubmissionCredential, Schema.Null]),
|
|
157
|
+
userId: Schema.Union([UserId, Schema.Null]),
|
|
158
|
+
client: Schema.Union([SubmissionClient, Schema.Null])
|
|
159
|
+
}).annotate({ identifier: "MessageSubmission" });
|
|
160
|
+
const MessageReceipt = /* @__PURE__ */ Schema.Struct({
|
|
161
|
+
id: MessageId,
|
|
162
|
+
status: Schema.Union([
|
|
163
|
+
Schema.Literal("pending"),
|
|
164
|
+
Schema.Literal("scheduled"),
|
|
165
|
+
Schema.Literal("queued"),
|
|
166
|
+
Schema.Literal("processing"),
|
|
167
|
+
Schema.Literal("sent"),
|
|
168
|
+
Schema.Literal("delivered"),
|
|
169
|
+
Schema.Literal("read"),
|
|
170
|
+
Schema.Literal("failed"),
|
|
171
|
+
Schema.Literal("bounced"),
|
|
172
|
+
Schema.Literal("complained")
|
|
173
|
+
]),
|
|
174
|
+
waitReason: Schema.Union([Schema.Union([
|
|
175
|
+
Schema.Literal("rate"),
|
|
176
|
+
Schema.Literal("daily-quota"),
|
|
177
|
+
Schema.Literal("domain-health"),
|
|
178
|
+
Schema.Literal("sending-paused"),
|
|
179
|
+
Schema.Literal("upstream-unavailable"),
|
|
180
|
+
Schema.Literal("retry"),
|
|
181
|
+
Schema.Literal("campaign-paused"),
|
|
182
|
+
Schema.Literal("domain-warming"),
|
|
183
|
+
Schema.Literal("onboarding-review"),
|
|
184
|
+
Schema.Literal("content-review"),
|
|
185
|
+
Schema.Literal("screening-unavailable")
|
|
186
|
+
]), Schema.Null]),
|
|
187
|
+
reviewExpectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
188
|
+
skippedRecipients: Schema.Array(SkippedRecipient),
|
|
189
|
+
createdAt: Schema.String
|
|
190
|
+
}).annotate({ identifier: "MessageReceipt" });
|
|
191
|
+
const MessageDeliveryList = /* @__PURE__ */ Schema.Struct({ items: Schema.Array(MessageDelivery) }).annotate({ identifier: "MessageDeliveryList" });
|
|
192
|
+
const Message = /* @__PURE__ */ Schema.Struct({
|
|
193
|
+
id: MessageId,
|
|
194
|
+
channel: Schema.Literal("email"),
|
|
195
|
+
direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
|
|
196
|
+
status: Schema.Union([
|
|
197
|
+
Schema.Literal("pending"),
|
|
198
|
+
Schema.Literal("scheduled"),
|
|
199
|
+
Schema.Literal("queued"),
|
|
200
|
+
Schema.Literal("processing"),
|
|
201
|
+
Schema.Literal("sent"),
|
|
202
|
+
Schema.Literal("delivered"),
|
|
203
|
+
Schema.Literal("read"),
|
|
204
|
+
Schema.Literal("failed"),
|
|
205
|
+
Schema.Literal("bounced"),
|
|
206
|
+
Schema.Literal("complained")
|
|
207
|
+
]),
|
|
208
|
+
from: Schema.Union([MessageSender, Schema.Null]),
|
|
209
|
+
to: Schema.Array(MessageAddress),
|
|
210
|
+
cc: Schema.Array(MessageAddress),
|
|
211
|
+
bcc: Schema.Array(MessageAddress),
|
|
212
|
+
replyTo: Schema.Array(Schema.String),
|
|
213
|
+
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
214
|
+
conversationId: Schema.Union([ConversationId, Schema.Null]),
|
|
215
|
+
inReplyToMessageId: Schema.Union([MessageId, Schema.Null]),
|
|
216
|
+
tags: Schema.Array(Schema.String),
|
|
217
|
+
metadata: Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]),
|
|
218
|
+
isTest: Schema.Boolean,
|
|
219
|
+
scheduledAt: Schema.Union([Schema.String, Schema.Null]),
|
|
220
|
+
submission: Schema.Union([MessageSubmission, Schema.Null]),
|
|
221
|
+
waitReason: Schema.Union([Schema.Union([
|
|
222
|
+
Schema.Literal("rate"),
|
|
223
|
+
Schema.Literal("daily-quota"),
|
|
224
|
+
Schema.Literal("domain-health"),
|
|
225
|
+
Schema.Literal("sending-paused"),
|
|
226
|
+
Schema.Literal("upstream-unavailable"),
|
|
227
|
+
Schema.Literal("retry"),
|
|
228
|
+
Schema.Literal("campaign-paused"),
|
|
229
|
+
Schema.Literal("domain-warming"),
|
|
230
|
+
Schema.Literal("onboarding-review"),
|
|
231
|
+
Schema.Literal("content-review"),
|
|
232
|
+
Schema.Literal("screening-unavailable")
|
|
233
|
+
]), Schema.Null]),
|
|
234
|
+
reviewExpectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
235
|
+
skippedRecipients: Schema.Array(SkippedRecipient),
|
|
236
|
+
createdAt: Schema.String,
|
|
237
|
+
updatedAt: Schema.String
|
|
238
|
+
}).annotate({ identifier: "Message" });
|
|
239
|
+
const MessagesListQuery = /* @__PURE__ */ Schema.Struct({
|
|
240
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
241
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
|
|
242
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
243
|
+
direction: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]), Schema.Null])),
|
|
244
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
245
|
+
Schema.Literal("pending"),
|
|
246
|
+
Schema.Literal("scheduled"),
|
|
247
|
+
Schema.Literal("queued"),
|
|
248
|
+
Schema.Literal("processing"),
|
|
249
|
+
Schema.Literal("sent"),
|
|
250
|
+
Schema.Literal("delivered"),
|
|
251
|
+
Schema.Literal("read"),
|
|
252
|
+
Schema.Literal("failed"),
|
|
253
|
+
Schema.Literal("bounced"),
|
|
254
|
+
Schema.Literal("complained")
|
|
255
|
+
]), Schema.Null])),
|
|
256
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
257
|
+
contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
|
|
258
|
+
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
259
|
+
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
260
|
+
before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
261
|
+
});
|
|
262
|
+
const MessagesList200 = MessagePage;
|
|
263
|
+
const MessagesList401 = UnauthorizedError;
|
|
264
|
+
const MessagesList403 = ForbiddenError;
|
|
265
|
+
const MessagesList422 = ValidationError;
|
|
266
|
+
const MessagesList500 = InternalError;
|
|
267
|
+
const MessagesList504 = GatewayTimeoutError;
|
|
268
|
+
const MessagesSendHeaders = /* @__PURE__ */ Schema.Struct({ "idempotency-key": Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Optional org-scoped key that makes a send idempotent. Repeating a request with the same key and identical payload replays the original 201 response; reusing the key with different content returns 409." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema.Null])) });
|
|
269
|
+
const MessagesSendRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
270
|
+
conversationId: Schema.optionalKey(Schema.Union([Schema.Union([ConversationId, Schema.Null]), Schema.Null])),
|
|
271
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
272
|
+
channel: Schema.Literal("email"),
|
|
273
|
+
to: EmailRecipients,
|
|
274
|
+
cc: Schema.optionalKey(EmailCcRecipients),
|
|
275
|
+
bcc: Schema.optionalKey(EmailBccRecipients),
|
|
276
|
+
from: Schema.optionalKey(EmailSender),
|
|
277
|
+
email: EmailContent
|
|
278
|
+
});
|
|
279
|
+
const MessagesSend201 = MessageReceipt;
|
|
280
|
+
const MessagesSend401 = UnauthorizedError;
|
|
281
|
+
const MessagesSend402 = PaymentRequiredError;
|
|
282
|
+
const MessagesSend403 = /* @__PURE__ */ Schema.Union([
|
|
283
|
+
ForbiddenError,
|
|
284
|
+
OnboardingReviewRequiredError,
|
|
285
|
+
FlagDisabledError
|
|
286
|
+
]);
|
|
287
|
+
const MessagesSend404 = ResourceNotFoundError;
|
|
288
|
+
const MessagesSend409 = ConflictError;
|
|
289
|
+
const MessagesSend422 = ValidationError;
|
|
290
|
+
const MessagesSend429 = RateLimitedError;
|
|
291
|
+
const MessagesSend500 = InternalError;
|
|
292
|
+
const MessagesSend502 = /* @__PURE__ */ Schema.Union([BillingProviderError, ExternalServiceError]);
|
|
293
|
+
const MessagesSend503 = /* @__PURE__ */ Schema.Union([SenderNotReadyError, DeliveryUnavailableError]);
|
|
294
|
+
const MessagesSend504 = GatewayTimeoutError;
|
|
295
|
+
const MessagesGetPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
296
|
+
const MessagesGet200 = Message;
|
|
297
|
+
const MessagesGet401 = UnauthorizedError;
|
|
298
|
+
const MessagesGet403 = ForbiddenError;
|
|
299
|
+
const MessagesGet404 = ResourceNotFoundError;
|
|
300
|
+
const MessagesGet422 = ValidationError;
|
|
301
|
+
const MessagesGet500 = InternalError;
|
|
302
|
+
const MessagesGet504 = GatewayTimeoutError;
|
|
303
|
+
const MessagesRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
304
|
+
const MessagesRemove200 = /* @__PURE__ */ Schema.Struct({
|
|
305
|
+
success: Schema.Boolean,
|
|
306
|
+
message: Schema.String
|
|
307
|
+
});
|
|
308
|
+
const MessagesRemove401 = UnauthorizedError;
|
|
309
|
+
const MessagesRemove403 = ForbiddenError;
|
|
310
|
+
const MessagesRemove404 = ResourceNotFoundError;
|
|
311
|
+
const MessagesRemove422 = ValidationError;
|
|
312
|
+
const MessagesRemove500 = InternalError;
|
|
313
|
+
const MessagesRemove502 = BillingProviderError;
|
|
314
|
+
const MessagesRemove504 = GatewayTimeoutError;
|
|
315
|
+
const MessagesGetContentPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
316
|
+
const MessagesGetContent200 = MessageContent;
|
|
317
|
+
const MessagesGetContent401 = UnauthorizedError;
|
|
318
|
+
const MessagesGetContent403 = ForbiddenError;
|
|
319
|
+
const MessagesGetContent404 = ResourceNotFoundError;
|
|
320
|
+
const MessagesGetContent422 = ValidationError;
|
|
321
|
+
const MessagesGetContent500 = InternalError;
|
|
322
|
+
const MessagesGetContent504 = GatewayTimeoutError;
|
|
323
|
+
const MessagesListDeliveriesPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
324
|
+
const MessagesListDeliveries200 = MessageDeliveryList;
|
|
325
|
+
const MessagesListDeliveries401 = UnauthorizedError;
|
|
326
|
+
const MessagesListDeliveries403 = ForbiddenError;
|
|
327
|
+
const MessagesListDeliveries404 = ResourceNotFoundError;
|
|
328
|
+
const MessagesListDeliveries422 = ValidationError;
|
|
329
|
+
const MessagesListDeliveries500 = InternalError;
|
|
330
|
+
const MessagesListDeliveries504 = GatewayTimeoutError;
|
|
331
|
+
const MessagesGetEmailPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
332
|
+
const MessagesGetEmailQuery = /* @__PURE__ */ Schema.Struct({
|
|
333
|
+
includeDownloadUrls: Schema.optionalKey(Schema.Union([Schema.String.annotate({ contentMediaType: "application/json" }), Schema.Null])),
|
|
334
|
+
urlExpiresIn: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
335
|
+
});
|
|
336
|
+
const MessagesGetEmail200 = /* @__PURE__ */ Schema.Struct({
|
|
337
|
+
deliveries: Schema.Array(Schema.Struct({
|
|
338
|
+
scheduling: Schema.Union([Schema.Struct({
|
|
339
|
+
dueAt: Schema.String,
|
|
340
|
+
expiresAt: Schema.String,
|
|
341
|
+
waitReason: Schema.Union([Schema.Union([
|
|
342
|
+
Schema.Literal("rate"),
|
|
343
|
+
Schema.Literal("daily-quota"),
|
|
344
|
+
Schema.Literal("domain-health"),
|
|
345
|
+
Schema.Literal("sending-paused"),
|
|
346
|
+
Schema.Literal("upstream-unavailable"),
|
|
347
|
+
Schema.Literal("retry"),
|
|
348
|
+
Schema.Literal("campaign-paused"),
|
|
349
|
+
Schema.Literal("domain-warming"),
|
|
350
|
+
Schema.Literal("onboarding-review"),
|
|
351
|
+
Schema.Literal("content-review"),
|
|
352
|
+
Schema.Literal("screening-unavailable")
|
|
353
|
+
]), Schema.Null]),
|
|
354
|
+
reviewExpectedAt: Schema.Union([Schema.String, Schema.Null])
|
|
355
|
+
}), Schema.Null]),
|
|
356
|
+
id: Schema.String,
|
|
357
|
+
messageId: Schema.String,
|
|
358
|
+
recipientId: Schema.Union([Schema.String, Schema.Null]),
|
|
359
|
+
channel: Schema.Literal("email"),
|
|
360
|
+
status: Schema.Union([
|
|
361
|
+
Schema.Literal("pending"),
|
|
362
|
+
Schema.Literal("scheduled"),
|
|
363
|
+
Schema.Literal("queued"),
|
|
364
|
+
Schema.Literal("processing"),
|
|
365
|
+
Schema.Literal("sent"),
|
|
366
|
+
Schema.Literal("delivered"),
|
|
367
|
+
Schema.Literal("read"),
|
|
368
|
+
Schema.Literal("failed"),
|
|
369
|
+
Schema.Literal("bounced"),
|
|
370
|
+
Schema.Literal("complained")
|
|
371
|
+
]),
|
|
372
|
+
attemptCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
373
|
+
maxAttempts: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
374
|
+
queuedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
375
|
+
claimedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
376
|
+
lastAttemptAt: Schema.Union([Schema.String, Schema.Null]),
|
|
377
|
+
nextRetryAt: Schema.Union([Schema.String, Schema.Null]),
|
|
378
|
+
sentAt: Schema.Union([Schema.String, Schema.Null]),
|
|
379
|
+
deliveredAt: Schema.Union([Schema.String, Schema.Null]),
|
|
380
|
+
readAt: Schema.Union([Schema.String, Schema.Null]),
|
|
381
|
+
failedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
382
|
+
terminalAt: Schema.Union([Schema.String, Schema.Null]),
|
|
383
|
+
errorCode: Schema.Union([Schema.String, Schema.Null]),
|
|
384
|
+
errorMessage: Schema.Union([Schema.String, Schema.Null]),
|
|
385
|
+
errorDetails: Schema.Union([DeliveryErrorDetails, Schema.Null]),
|
|
386
|
+
cost: Schema.String,
|
|
387
|
+
currency: Schema.String,
|
|
388
|
+
idempotencyKey: Schema.Union([Schema.String, Schema.Null]),
|
|
389
|
+
createdAt: Schema.String,
|
|
390
|
+
updatedAt: Schema.String
|
|
391
|
+
})),
|
|
392
|
+
id: MessageId,
|
|
393
|
+
organizationId: Schema.String,
|
|
394
|
+
conversationId: Schema.Union([ConversationId, Schema.Null]),
|
|
395
|
+
status: Schema.Union([
|
|
396
|
+
Schema.Literal("pending"),
|
|
397
|
+
Schema.Literal("scheduled"),
|
|
398
|
+
Schema.Literal("queued"),
|
|
399
|
+
Schema.Literal("processing"),
|
|
400
|
+
Schema.Literal("sent"),
|
|
401
|
+
Schema.Literal("delivered"),
|
|
402
|
+
Schema.Literal("read"),
|
|
403
|
+
Schema.Literal("failed"),
|
|
404
|
+
Schema.Literal("bounced"),
|
|
405
|
+
Schema.Literal("complained")
|
|
406
|
+
]),
|
|
407
|
+
channel: Schema.Literal("email"),
|
|
408
|
+
direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
|
|
409
|
+
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
410
|
+
fromEmail: Schema.String,
|
|
411
|
+
fromName: Schema.Union([Schema.String, Schema.Null]),
|
|
412
|
+
toEmails: Schema.Array(EmailAddress),
|
|
413
|
+
ccEmails: Schema.Union([Schema.Array(EmailAddress), Schema.Null]),
|
|
414
|
+
bccEmails: Schema.Union([Schema.Array(EmailAddress), Schema.Null]),
|
|
415
|
+
replyToEmails: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
416
|
+
messageIdHeader: Schema.String,
|
|
417
|
+
inReplyTo: Schema.Union([Schema.String, Schema.Null]),
|
|
418
|
+
references: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
419
|
+
threadPosition: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
|
|
420
|
+
newContent: Schema.Union([Schema.String, Schema.Null]),
|
|
421
|
+
quotedContent: Schema.Union([Schema.String, Schema.Null]),
|
|
422
|
+
hasQuotedContent: Schema.Boolean,
|
|
423
|
+
dkimVerdict: Schema.Union([Schema.Union([
|
|
424
|
+
Schema.Literal("pass"),
|
|
425
|
+
Schema.Literal("fail"),
|
|
426
|
+
Schema.Literal("softfail"),
|
|
427
|
+
Schema.Literal("neutral"),
|
|
428
|
+
Schema.Literal("none"),
|
|
429
|
+
Schema.Literal("policy"),
|
|
430
|
+
Schema.Literal("temperror"),
|
|
431
|
+
Schema.Literal("permerror")
|
|
432
|
+
]), Schema.Null]),
|
|
433
|
+
spfVerdict: Schema.Union([Schema.Union([
|
|
434
|
+
Schema.Literal("pass"),
|
|
435
|
+
Schema.Literal("fail"),
|
|
436
|
+
Schema.Literal("softfail"),
|
|
437
|
+
Schema.Literal("neutral"),
|
|
438
|
+
Schema.Literal("none"),
|
|
439
|
+
Schema.Literal("policy"),
|
|
440
|
+
Schema.Literal("temperror"),
|
|
441
|
+
Schema.Literal("permerror")
|
|
442
|
+
]), Schema.Null]),
|
|
443
|
+
dmarcVerdict: Schema.Union([Schema.Union([
|
|
444
|
+
Schema.Literal("pass"),
|
|
445
|
+
Schema.Literal("fail"),
|
|
446
|
+
Schema.Literal("softfail"),
|
|
447
|
+
Schema.Literal("neutral"),
|
|
448
|
+
Schema.Literal("none"),
|
|
449
|
+
Schema.Literal("policy"),
|
|
450
|
+
Schema.Literal("temperror"),
|
|
451
|
+
Schema.Literal("permerror")
|
|
452
|
+
]), Schema.Null]),
|
|
453
|
+
isAutoReply: Schema.Boolean,
|
|
454
|
+
autoReplyReason: Schema.Union([Schema.Union([
|
|
455
|
+
Schema.Literal("out-of-office"),
|
|
456
|
+
Schema.Literal("auto-response"),
|
|
457
|
+
Schema.Literal("delivery-status"),
|
|
458
|
+
Schema.Literal("read-receipt")
|
|
459
|
+
]), Schema.Null]),
|
|
460
|
+
listUnsubscribeUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
461
|
+
listUnsubscribeEmail: Schema.Union([Schema.String, Schema.Null]),
|
|
462
|
+
priority: Schema.Union([Schema.Union([
|
|
463
|
+
Schema.Literal("high"),
|
|
464
|
+
Schema.Literal("normal"),
|
|
465
|
+
Schema.Literal("low")
|
|
466
|
+
]), Schema.Null]),
|
|
467
|
+
parsingErrors: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
468
|
+
parsingDuration: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
|
|
469
|
+
hasAttachments: Schema.Boolean,
|
|
470
|
+
attachmentCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
471
|
+
attachments: Schema.Array(Schema.Struct({
|
|
472
|
+
id: AttachmentId,
|
|
473
|
+
filename: Schema.String,
|
|
474
|
+
contentType: Schema.String,
|
|
475
|
+
size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
476
|
+
isInline: Schema.Boolean,
|
|
477
|
+
contentId: Schema.Union([Schema.String, Schema.Null])
|
|
478
|
+
})),
|
|
479
|
+
downloadUrls: Schema.Union([Schema.Struct({
|
|
480
|
+
rawMime: Schema.Union([Schema.String, Schema.Null]),
|
|
481
|
+
html: Schema.Union([Schema.String, Schema.Null]),
|
|
482
|
+
text: Schema.Union([Schema.String, Schema.Null]),
|
|
483
|
+
expiresAt: Schema.String
|
|
484
|
+
}), Schema.Null]),
|
|
485
|
+
createdAt: Schema.String,
|
|
486
|
+
receivedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "When Samva's receiving server accepted the email; null for outbound email. The sender's `Date` header plays no part and stays in the raw MIME." }),
|
|
487
|
+
processedAt: Schema.Union([Schema.String, Schema.Null])
|
|
488
|
+
});
|
|
489
|
+
const MessagesGetEmail401 = UnauthorizedError;
|
|
490
|
+
const MessagesGetEmail403 = ForbiddenError;
|
|
491
|
+
const MessagesGetEmail404 = ResourceNotFoundError;
|
|
492
|
+
const MessagesGetEmail422 = ValidationError;
|
|
493
|
+
const MessagesGetEmail500 = InternalError;
|
|
494
|
+
const MessagesGetEmail504 = GatewayTimeoutError;
|
|
495
|
+
const MessagesGetEventsPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
496
|
+
const MessagesGetEventsQuery = /* @__PURE__ */ Schema.Struct({
|
|
497
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
498
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
499
|
+
});
|
|
500
|
+
const MessagesGetEvents200 = MessageEventPage;
|
|
501
|
+
const MessagesGetEvents401 = UnauthorizedError;
|
|
502
|
+
const MessagesGetEvents403 = ForbiddenError;
|
|
503
|
+
const MessagesGetEvents404 = ResourceNotFoundError;
|
|
504
|
+
const MessagesGetEvents422 = ValidationError;
|
|
505
|
+
const MessagesGetEvents500 = InternalError;
|
|
506
|
+
const MessagesGetEvents504 = GatewayTimeoutError;
|
|
507
|
+
const MessagesGetStatusPathParams = /* @__PURE__ */ Schema.Struct({ id: MessageId });
|
|
508
|
+
const MessagesGetStatus200 = /* @__PURE__ */ Schema.Struct({
|
|
509
|
+
id: MessageId,
|
|
510
|
+
status: Schema.Union([
|
|
511
|
+
Schema.Literal("pending"),
|
|
512
|
+
Schema.Literal("scheduled"),
|
|
513
|
+
Schema.Literal("queued"),
|
|
514
|
+
Schema.Literal("processing"),
|
|
515
|
+
Schema.Literal("sent"),
|
|
516
|
+
Schema.Literal("delivered"),
|
|
517
|
+
Schema.Literal("read"),
|
|
518
|
+
Schema.Literal("failed"),
|
|
519
|
+
Schema.Literal("bounced"),
|
|
520
|
+
Schema.Literal("complained")
|
|
521
|
+
]),
|
|
522
|
+
updatedAt: Schema.String
|
|
523
|
+
});
|
|
524
|
+
const MessagesGetStatus401 = UnauthorizedError;
|
|
525
|
+
const MessagesGetStatus403 = ForbiddenError;
|
|
526
|
+
const MessagesGetStatus404 = ResourceNotFoundError;
|
|
527
|
+
const MessagesGetStatus422 = ValidationError;
|
|
528
|
+
const MessagesGetStatus500 = InternalError;
|
|
529
|
+
const MessagesGetStatus504 = GatewayTimeoutError;
|
|
530
|
+
const MessagesValidateEmailRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
531
|
+
conversationId: Schema.optionalKey(Schema.Union([Schema.Union([ConversationId, Schema.Null]), Schema.Null])),
|
|
532
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
533
|
+
channel: Schema.Literal("email"),
|
|
534
|
+
to: EmailRecipients,
|
|
535
|
+
cc: Schema.optionalKey(EmailCcRecipients),
|
|
536
|
+
bcc: Schema.optionalKey(EmailBccRecipients),
|
|
537
|
+
from: Schema.optionalKey(EmailSender),
|
|
538
|
+
email: EmailContent
|
|
539
|
+
});
|
|
540
|
+
const MessagesValidateEmail200 = ValidateEmailResponse;
|
|
541
|
+
const MessagesValidateEmail401 = UnauthorizedError;
|
|
542
|
+
const MessagesValidateEmail403 = ForbiddenError;
|
|
543
|
+
const MessagesValidateEmail404 = ResourceNotFoundError;
|
|
544
|
+
const MessagesValidateEmail422 = ValidationError;
|
|
545
|
+
const MessagesValidateEmail500 = InternalError;
|
|
546
|
+
const MessagesValidateEmail503 = SenderNotReadyError;
|
|
547
|
+
const MessagesValidateEmail504 = GatewayTimeoutError;
|
|
548
|
+
var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpoint.get("messagesList", "/v1/messages", {
|
|
549
|
+
query: MessagesListQuery,
|
|
550
|
+
success: MessagesList200,
|
|
551
|
+
error: [
|
|
552
|
+
MessagesList401.pipe(HttpApiSchema.status(401)),
|
|
553
|
+
MessagesList403.pipe(HttpApiSchema.status(403)),
|
|
554
|
+
MessagesList422.pipe(HttpApiSchema.status(422)),
|
|
555
|
+
MessagesList500,
|
|
556
|
+
MessagesList504.pipe(HttpApiSchema.status(504))
|
|
557
|
+
]
|
|
558
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.list").annotate(OpenApi.Summary, "List messages").annotate(OpenApi.Description, "Returns message summaries, newest first (oldest first when filtered by conversation), with optional filters for channel, direction, status, conversation, contact, sender address, and creation time. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("messagesSend", "/v1/messages", {
|
|
559
|
+
headers: MessagesSendHeaders,
|
|
560
|
+
payload: MessagesSendRequestJson,
|
|
561
|
+
success: MessagesSend201.pipe(HttpApiSchema.status(201)),
|
|
562
|
+
error: [
|
|
563
|
+
MessagesSend401.pipe(HttpApiSchema.status(401)),
|
|
564
|
+
MessagesSend402.pipe(HttpApiSchema.status(402)),
|
|
565
|
+
MessagesSend403.pipe(HttpApiSchema.status(403)),
|
|
566
|
+
MessagesSend404.pipe(HttpApiSchema.status(404)),
|
|
567
|
+
MessagesSend409.pipe(HttpApiSchema.status(409)),
|
|
568
|
+
MessagesSend422.pipe(HttpApiSchema.status(422)),
|
|
569
|
+
MessagesSend429.pipe(HttpApiSchema.status(429)),
|
|
570
|
+
MessagesSend500,
|
|
571
|
+
MessagesSend502.pipe(HttpApiSchema.status(502)),
|
|
572
|
+
MessagesSend503.pipe(HttpApiSchema.status(503)),
|
|
573
|
+
MessagesSend504.pipe(HttpApiSchema.status(504))
|
|
574
|
+
]
|
|
575
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
|
|
576
|
+
params: MessagesGetPathParams,
|
|
577
|
+
success: MessagesGet200,
|
|
578
|
+
error: [
|
|
579
|
+
MessagesGet401.pipe(HttpApiSchema.status(401)),
|
|
580
|
+
MessagesGet403.pipe(HttpApiSchema.status(403)),
|
|
581
|
+
MessagesGet404.pipe(HttpApiSchema.status(404)),
|
|
582
|
+
MessagesGet422.pipe(HttpApiSchema.status(422)),
|
|
583
|
+
MessagesGet500,
|
|
584
|
+
MessagesGet504.pipe(HttpApiSchema.status(504))
|
|
585
|
+
]
|
|
586
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.get").annotate(OpenApi.Summary, "Get a message").annotate(OpenApi.Description, "Returns a message by its ID: addresses, subject, status, and why it is waiting when it is. Per-recipient delivery state and the body are their own reads."), HttpApiEndpoint.delete("messagesRemove", "/v1/messages/:id", {
|
|
587
|
+
params: MessagesRemovePathParams,
|
|
588
|
+
success: MessagesRemove200,
|
|
589
|
+
error: [
|
|
590
|
+
MessagesRemove401.pipe(HttpApiSchema.status(401)),
|
|
591
|
+
MessagesRemove403.pipe(HttpApiSchema.status(403)),
|
|
592
|
+
MessagesRemove404.pipe(HttpApiSchema.status(404)),
|
|
593
|
+
MessagesRemove422.pipe(HttpApiSchema.status(422)),
|
|
594
|
+
MessagesRemove500,
|
|
595
|
+
MessagesRemove502.pipe(HttpApiSchema.status(502)),
|
|
596
|
+
MessagesRemove504.pipe(HttpApiSchema.status(504))
|
|
597
|
+
]
|
|
598
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.remove").annotate(OpenApi.Summary, "Delete a message").annotate(OpenApi.Description, "Permanently deletes a message by its ID."), HttpApiEndpoint.get("messagesGetContent", "/v1/messages/:id/content", {
|
|
599
|
+
params: MessagesGetContentPathParams,
|
|
600
|
+
success: MessagesGetContent200,
|
|
601
|
+
error: [
|
|
602
|
+
MessagesGetContent401.pipe(HttpApiSchema.status(401)),
|
|
603
|
+
MessagesGetContent403.pipe(HttpApiSchema.status(403)),
|
|
604
|
+
MessagesGetContent404.pipe(HttpApiSchema.status(404)),
|
|
605
|
+
MessagesGetContent422.pipe(HttpApiSchema.status(422)),
|
|
606
|
+
MessagesGetContent500,
|
|
607
|
+
MessagesGetContent504.pipe(HttpApiSchema.status(504))
|
|
608
|
+
]
|
|
609
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getContent").annotate(OpenApi.Summary, "Get message content").annotate(OpenApi.Description, "Returns the content the message was sent or received with."), HttpApiEndpoint.get("messagesListDeliveries", "/v1/messages/:id/deliveries", {
|
|
610
|
+
params: MessagesListDeliveriesPathParams,
|
|
611
|
+
success: MessagesListDeliveries200,
|
|
612
|
+
error: [
|
|
613
|
+
MessagesListDeliveries401.pipe(HttpApiSchema.status(401)),
|
|
614
|
+
MessagesListDeliveries403.pipe(HttpApiSchema.status(403)),
|
|
615
|
+
MessagesListDeliveries404.pipe(HttpApiSchema.status(404)),
|
|
616
|
+
MessagesListDeliveries422.pipe(HttpApiSchema.status(422)),
|
|
617
|
+
MessagesListDeliveries500,
|
|
618
|
+
MessagesListDeliveries504.pipe(HttpApiSchema.status(504))
|
|
619
|
+
]
|
|
620
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.listDeliveries").annotate(OpenApi.Summary, "List message deliveries").annotate(OpenApi.Description, "Returns one delivery per recipient: its status, attempts, delivery times, and why it failed or is waiting."), HttpApiEndpoint.get("messagesGetEmail", "/v1/messages/:id/email", {
|
|
621
|
+
params: MessagesGetEmailPathParams,
|
|
622
|
+
query: MessagesGetEmailQuery,
|
|
623
|
+
success: MessagesGetEmail200,
|
|
624
|
+
error: [
|
|
625
|
+
MessagesGetEmail401.pipe(HttpApiSchema.status(401)),
|
|
626
|
+
MessagesGetEmail403.pipe(HttpApiSchema.status(403)),
|
|
627
|
+
MessagesGetEmail404.pipe(HttpApiSchema.status(404)),
|
|
628
|
+
MessagesGetEmail422.pipe(HttpApiSchema.status(422)),
|
|
629
|
+
MessagesGetEmail500,
|
|
630
|
+
MessagesGetEmail504.pipe(HttpApiSchema.status(504))
|
|
631
|
+
]
|
|
632
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getEmail").annotate(OpenApi.Summary, "Get email message details").annotate(OpenApi.Description, "Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content."), HttpApiEndpoint.get("messagesGetEvents", "/v1/messages/:id/events", {
|
|
633
|
+
params: MessagesGetEventsPathParams,
|
|
634
|
+
query: MessagesGetEventsQuery,
|
|
635
|
+
success: MessagesGetEvents200,
|
|
636
|
+
error: [
|
|
637
|
+
MessagesGetEvents401.pipe(HttpApiSchema.status(401)),
|
|
638
|
+
MessagesGetEvents403.pipe(HttpApiSchema.status(403)),
|
|
639
|
+
MessagesGetEvents404.pipe(HttpApiSchema.status(404)),
|
|
640
|
+
MessagesGetEvents422.pipe(HttpApiSchema.status(422)),
|
|
641
|
+
MessagesGetEvents500,
|
|
642
|
+
MessagesGetEvents504.pipe(HttpApiSchema.status(504))
|
|
643
|
+
]
|
|
644
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getEvents").annotate(OpenApi.Summary, "List message events").annotate(OpenApi.Description, "Returns the delivery events recorded for a message, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("messagesGetStatus", "/v1/messages/:id/status", {
|
|
645
|
+
params: MessagesGetStatusPathParams,
|
|
646
|
+
success: MessagesGetStatus200,
|
|
647
|
+
error: [
|
|
648
|
+
MessagesGetStatus401.pipe(HttpApiSchema.status(401)),
|
|
649
|
+
MessagesGetStatus403.pipe(HttpApiSchema.status(403)),
|
|
650
|
+
MessagesGetStatus404.pipe(HttpApiSchema.status(404)),
|
|
651
|
+
MessagesGetStatus422.pipe(HttpApiSchema.status(422)),
|
|
652
|
+
MessagesGetStatus500,
|
|
653
|
+
MessagesGetStatus504.pipe(HttpApiSchema.status(504))
|
|
654
|
+
]
|
|
655
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getStatus").annotate(OpenApi.Summary, "Get message delivery status").annotate(OpenApi.Description, "Returns the current delivery status of a message by its ID."), HttpApiEndpoint.post("messagesValidateEmail", "/v1/messages/validate/email", {
|
|
656
|
+
payload: MessagesValidateEmailRequestJson,
|
|
657
|
+
success: MessagesValidateEmail200,
|
|
658
|
+
error: [
|
|
659
|
+
MessagesValidateEmail401.pipe(HttpApiSchema.status(401)),
|
|
660
|
+
MessagesValidateEmail403.pipe(HttpApiSchema.status(403)),
|
|
661
|
+
MessagesValidateEmail404.pipe(HttpApiSchema.status(404)),
|
|
662
|
+
MessagesValidateEmail422.pipe(HttpApiSchema.status(422)),
|
|
663
|
+
MessagesValidateEmail500,
|
|
664
|
+
MessagesValidateEmail503.pipe(HttpApiSchema.status(503)),
|
|
665
|
+
MessagesValidateEmail504.pipe(HttpApiSchema.status(504))
|
|
666
|
+
]
|
|
667
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.validateEmail").annotate(OpenApi.Summary, "Validate an email message").annotate(OpenApi.Description, "Resolves recipients, sender, and inline or published-template content without sending anything, creating contacts or messages, or counting toward your quota.")).annotate(OpenApi.Description, "Send messages and read their delivery state and timeline.") {};
|
|
668
|
+
//#endregion
|
|
669
|
+
export { DeliveryErrorDetails, EmailAddress, Message, MessageAddress, MessageContent, MessageDelivery, MessageDeliveryError, MessageDeliveryId, MessageDeliveryList, MessageEventId, MessageEventPage, MessageReceipt, MessageSender, MessageSubmission, MessagesGet200, MessagesGet401, MessagesGet403, MessagesGet404, MessagesGet422, MessagesGet500, MessagesGet504, MessagesGetContent200, MessagesGetContent401, MessagesGetContent403, MessagesGetContent404, MessagesGetContent422, MessagesGetContent500, MessagesGetContent504, MessagesGetContentPathParams, MessagesGetEmail200, MessagesGetEmail401, MessagesGetEmail403, MessagesGetEmail404, MessagesGetEmail422, MessagesGetEmail500, MessagesGetEmail504, MessagesGetEmailPathParams, MessagesGetEmailQuery, MessagesGetEvents200, MessagesGetEvents401, MessagesGetEvents403, MessagesGetEvents404, MessagesGetEvents422, MessagesGetEvents500, MessagesGetEvents504, MessagesGetEventsPathParams, MessagesGetEventsQuery, MessagesGetPathParams, MessagesGetStatus200, MessagesGetStatus401, MessagesGetStatus403, MessagesGetStatus404, MessagesGetStatus422, MessagesGetStatus500, MessagesGetStatus504, MessagesGetStatusPathParams, MessagesGroup, MessagesList200, MessagesList401, MessagesList403, MessagesList422, MessagesList500, MessagesList504, MessagesListDeliveries200, MessagesListDeliveries401, MessagesListDeliveries403, MessagesListDeliveries404, MessagesListDeliveries422, MessagesListDeliveries500, MessagesListDeliveries504, MessagesListDeliveriesPathParams, MessagesListQuery, MessagesRemove200, MessagesRemove401, MessagesRemove403, MessagesRemove404, MessagesRemove422, MessagesRemove500, MessagesRemove502, MessagesRemove504, MessagesRemovePathParams, MessagesSend201, MessagesSend401, MessagesSend402, MessagesSend403, MessagesSend404, MessagesSend409, MessagesSend422, MessagesSend429, MessagesSend500, MessagesSend502, MessagesSend503, MessagesSend504, MessagesSendHeaders, MessagesSendRequestJson, MessagesValidateEmail200, MessagesValidateEmail401, MessagesValidateEmail403, MessagesValidateEmail404, MessagesValidateEmail422, MessagesValidateEmail500, MessagesValidateEmail503, MessagesValidateEmail504, MessagesValidateEmailRequestJson, SubmissionClient, SubmissionCredential, ValidateEmailResponse };
|
|
670
|
+
|
|
671
|
+
//# sourceMappingURL=messages.js.map
|