samva 0.51.0 → 0.53.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 -2
- package/README.md +1 -0
- package/dist/client/sdk.gen.d.ts +82 -36
- package/dist/client/sdk.gen.js +192 -57
- package/dist/client/types.gen.d.ts +607 -291
- package/dist/effect/campaigns.d.ts +56 -56
- package/dist/effect/descriptors/integrations-catalog.d.ts +1 -1
- package/dist/effect/descriptors/integrations-catalog.js +1 -1
- package/dist/effect/descriptors/integrations.d.ts +1 -1
- package/dist/effect/descriptors/integrations.js +1 -1
- package/dist/effect/descriptors/logs.d.ts +21 -0
- package/dist/effect/descriptors/logs.js +23 -0
- package/dist/effect/descriptors/whats-app.d.ts +1 -1
- package/dist/effect/descriptors/whats-app.js +1 -1
- package/dist/effect/events.d.ts +16 -0
- package/dist/effect/generated/agents.js +4 -4
- package/dist/effect/generated/campaigns.d.ts +18 -6
- package/dist/effect/generated/campaigns.js +2 -6
- package/dist/effect/generated/email.js +3 -3
- package/dist/effect/generated/events.d.ts +48 -0
- package/dist/effect/generated/events.js +1 -1
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/integrations-catalog.d.ts +93 -49
- package/dist/effect/generated/integrations-catalog.js +17 -28
- package/dist/effect/generated/integrations.d.ts +20 -40
- package/dist/effect/generated/integrations.js +9 -13
- package/dist/effect/generated/journeys.d.ts +1113 -67
- package/dist/effect/generated/journeys.js +14 -8
- package/dist/effect/generated/logs.d.ts +2323 -0
- package/dist/effect/generated/logs.js +312 -0
- package/dist/effect/generated/mailboxes.d.ts +38 -24
- package/dist/effect/generated/mailboxes.js +22 -21
- package/dist/effect/generated/messages.d.ts +11 -882
- package/dist/effect/generated/messages.js +4 -243
- package/dist/effect/generated/newsletter-domains.d.ts +61 -13
- package/dist/effect/generated/newsletter-domains.js +5 -5
- package/dist/effect/generated/newsletter-issues.d.ts +166 -34
- package/dist/effect/generated/newsletter-issues.js +12 -12
- package/dist/effect/generated/newsletters.d.ts +76 -16
- package/dist/effect/generated/newsletters.js +6 -6
- package/dist/effect/generated/organizations.js +1 -1
- package/dist/effect/generated/scheduled-messages.d.ts +36 -0
- package/dist/effect/generated/scheduled-messages.js +1 -1
- package/dist/effect/generated/shared.d.ts +1706 -442
- package/dist/effect/generated/shared.js +370 -93
- package/dist/effect/generated/subscriptions.d.ts +4 -4
- package/dist/effect/generated/subscriptions.js +2 -6
- package/dist/effect/generated/template-registrations.d.ts +46 -10
- package/dist/effect/generated/template-registrations.js +4 -4
- package/dist/effect/generated/templates.js +2 -2
- package/dist/effect/generated/whats-app-flows.d.ts +173 -35
- package/dist/effect/generated/whats-app-flows.js +19 -17
- package/dist/effect/generated/whats-app-setup-links.d.ts +61 -13
- package/dist/effect/generated/whats-app-setup-links.js +5 -5
- package/dist/effect/generated/whats-app.d.ts +187 -65
- package/dist/effect/generated/whats-app.js +18 -24
- package/dist/effect/generated-metadata.d.ts +15 -3
- package/dist/effect/generated-metadata.js +375 -349
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +2 -1
- package/dist/effect/integrations-catalog.d.ts +92 -4
- package/dist/effect/integrations.d.ts +40 -8
- package/dist/effect/internal/client.js +25 -3
- package/dist/effect/internal/log-events.d.ts +19 -0
- package/dist/effect/internal/log-events.js +53 -0
- package/dist/effect/internal/mailbox-events.d.ts +6 -2
- package/dist/effect/internal/mailbox-events.js +4 -3
- package/dist/effect/journeys.d.ts +212 -146
- package/dist/effect/logs.d.ts +149 -0
- package/dist/effect/logs.js +18 -0
- package/dist/effect/mailboxes.d.ts +158 -150
- package/dist/effect/mailboxes.js +1 -1
- package/dist/effect/newsletter-domains.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +66 -0
- package/dist/effect/whatsapp-flows.d.ts +30 -0
- package/dist/effect/whatsapp-setup-links.d.ts +2 -2
- package/dist/effect/whatsapp.d.ts +73 -3
- package/dist/mailbox-events.d.ts +50 -3
- package/dist/mailbox-events.js +38 -19
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +3 -1
- package/dist/promises/client.js +3 -1
- package/dist/promises/errors.gen.d.ts +2 -0
- package/dist/promises/errors.gen.js +137 -34
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/request-id.d.ts +3 -0
- package/dist/request-id.js +7 -0
- package/dist/service-map.d.ts +14 -3
- package/package.json +6 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender,
|
|
1
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryErrorDetails, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MailboxEndpointId, MailboxId, MailboxThreadId, MalformedRequestError, MessageContent, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SmsSendMessagePayload, SubmissionClient, UnauthorizedError, UserId, ValidationError, WhatsAppSendMessagePayload } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/messages.ts
|
|
@@ -6,84 +6,6 @@ const MessageSender = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
6
6
|
address: Schema.String,
|
|
7
7
|
name: Schema.Union([Schema.String, Schema.Null])
|
|
8
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 SmsMessageContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
19
|
-
text: Schema.String,
|
|
20
|
-
unicode: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
21
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
|
|
22
|
-
}).annotate({ identifier: "SmsMessageContent" }))();
|
|
23
|
-
const WhatsAppStoredLocation = /* @__PURE__ */ (() => Schema.Struct({
|
|
24
|
-
latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
25
|
-
longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
26
|
-
name: Schema.optionalKey(Schema.String),
|
|
27
|
-
address: Schema.optionalKey(Schema.String),
|
|
28
|
-
url: Schema.optionalKey(Schema.String)
|
|
29
|
-
}).annotate({ identifier: "WhatsAppStoredLocation" }))();
|
|
30
|
-
const WhatsAppStoredContactCard = /* @__PURE__ */ (() => Schema.Struct({
|
|
31
|
-
name: Schema.optionalKey(Schema.Struct({
|
|
32
|
-
formattedName: Schema.optionalKey(Schema.String),
|
|
33
|
-
firstName: Schema.optionalKey(Schema.String),
|
|
34
|
-
lastName: Schema.optionalKey(Schema.String),
|
|
35
|
-
middleName: Schema.optionalKey(Schema.String),
|
|
36
|
-
prefix: Schema.optionalKey(Schema.String),
|
|
37
|
-
suffix: Schema.optionalKey(Schema.String)
|
|
38
|
-
})),
|
|
39
|
-
phones: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
40
|
-
phone: Schema.optionalKey(Schema.String),
|
|
41
|
-
type: Schema.optionalKey(Schema.String),
|
|
42
|
-
waId: Schema.optionalKey(Schema.String)
|
|
43
|
-
}))),
|
|
44
|
-
emails: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
45
|
-
email: Schema.optionalKey(Schema.String),
|
|
46
|
-
type: Schema.optionalKey(Schema.String)
|
|
47
|
-
}))),
|
|
48
|
-
urls: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
49
|
-
url: Schema.optionalKey(Schema.String),
|
|
50
|
-
type: Schema.optionalKey(Schema.String)
|
|
51
|
-
}))),
|
|
52
|
-
org: Schema.optionalKey(Schema.Struct({
|
|
53
|
-
company: Schema.optionalKey(Schema.String),
|
|
54
|
-
department: Schema.optionalKey(Schema.String),
|
|
55
|
-
title: Schema.optionalKey(Schema.String)
|
|
56
|
-
})),
|
|
57
|
-
addresses: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
58
|
-
street: Schema.optionalKey(Schema.String),
|
|
59
|
-
city: Schema.optionalKey(Schema.String),
|
|
60
|
-
state: Schema.optionalKey(Schema.String),
|
|
61
|
-
zip: Schema.optionalKey(Schema.String),
|
|
62
|
-
country: Schema.optionalKey(Schema.String),
|
|
63
|
-
countryCode: Schema.optionalKey(Schema.String),
|
|
64
|
-
type: Schema.optionalKey(Schema.String)
|
|
65
|
-
}))),
|
|
66
|
-
birthday: Schema.optionalKey(Schema.String)
|
|
67
|
-
}).annotate({ identifier: "WhatsAppStoredContactCard" }))();
|
|
68
|
-
const WhatsAppReceivedReply = /* @__PURE__ */ (() => Schema.Struct({
|
|
69
|
-
type: Schema.Union([
|
|
70
|
-
Schema.Literal("button"),
|
|
71
|
-
Schema.Literal("list"),
|
|
72
|
-
Schema.Literal("template_button")
|
|
73
|
-
]),
|
|
74
|
-
id: Schema.String,
|
|
75
|
-
title: Schema.String,
|
|
76
|
-
description: Schema.optionalKey(Schema.String)
|
|
77
|
-
}).annotate({ identifier: "WhatsAppReceivedReply" }))();
|
|
78
|
-
const WhatsAppReceivedFlowResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
79
|
-
flowToken: Schema.Union([Schema.String, Schema.Null]),
|
|
80
|
-
response: Schema.Record(Schema.String, JsonValue),
|
|
81
|
-
body: Schema.optionalKey(Schema.String)
|
|
82
|
-
}).annotate({ identifier: "WhatsAppReceivedFlowResponse" }))();
|
|
83
|
-
const WhatsAppStructuredContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
84
|
-
type: Schema.String,
|
|
85
|
-
data: Schema.Record(Schema.String, JsonValue)
|
|
86
|
-
}).annotate({ identifier: "WhatsAppStructuredContent" }))();
|
|
87
9
|
const MessageDeliveryError = /* @__PURE__ */ (() => Schema.Struct({
|
|
88
10
|
code: Schema.Union([Schema.String, Schema.Null]),
|
|
89
11
|
message: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -94,17 +16,6 @@ const EstimatedProviderCost = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
94
16
|
currency: Schema.String,
|
|
95
17
|
billingMode: Schema.Literal("pass_through")
|
|
96
18
|
}).annotate({ identifier: "EstimatedProviderCost" }))();
|
|
97
|
-
const DeliveryErrorDetails = /* @__PURE__ */ (() => Schema.Struct({
|
|
98
|
-
code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
99
|
-
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
100
|
-
message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
101
|
-
details: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Union([
|
|
102
|
-
Schema.String,
|
|
103
|
-
Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
104
|
-
Schema.Null
|
|
105
|
-
])), Schema.Null])),
|
|
106
|
-
retryable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
107
|
-
}).annotate({ identifier: "DeliveryErrorDetails" }))();
|
|
108
19
|
const EmailAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
109
20
|
email: Schema.String,
|
|
110
21
|
name: Schema.Union([Schema.String, Schema.Null])
|
|
@@ -142,54 +53,6 @@ const SubmissionCredential = /* @__PURE__ */ (() => Schema.Union([
|
|
|
142
53
|
}),
|
|
143
54
|
Schema.Struct({ kind: Schema.Literal("session") })
|
|
144
55
|
]).annotate({ identifier: "SubmissionCredential" }))();
|
|
145
|
-
const WhatsAppStoredReaction = /* @__PURE__ */ (() => Schema.Struct({
|
|
146
|
-
messageId: Schema.Union([MessageId, Schema.Null]),
|
|
147
|
-
providerMessageId: Schema.String,
|
|
148
|
-
emoji: Schema.Union([Schema.String, Schema.Null])
|
|
149
|
-
}).annotate({ identifier: "WhatsAppStoredReaction" }))();
|
|
150
|
-
const WhatsAppMessageReference = /* @__PURE__ */ (() => Schema.Struct({
|
|
151
|
-
messageId: Schema.Union([MessageId, Schema.Null]),
|
|
152
|
-
providerMessageId: Schema.String
|
|
153
|
-
}).annotate({ identifier: "WhatsAppMessageReference" }))();
|
|
154
|
-
const WhatsAppStoredMedia = /* @__PURE__ */ (() => Schema.Union([
|
|
155
|
-
Schema.Struct({
|
|
156
|
-
type: Schema.Union([
|
|
157
|
-
Schema.Literal("image"),
|
|
158
|
-
Schema.Literal("video"),
|
|
159
|
-
Schema.Literal("audio"),
|
|
160
|
-
Schema.Literal("document"),
|
|
161
|
-
Schema.Literal("sticker")
|
|
162
|
-
]),
|
|
163
|
-
url: Schema.String,
|
|
164
|
-
caption: Schema.optionalKey(Schema.String),
|
|
165
|
-
filename: Schema.optionalKey(Schema.String)
|
|
166
|
-
}),
|
|
167
|
-
Schema.Struct({
|
|
168
|
-
type: Schema.Union([
|
|
169
|
-
Schema.Literal("image"),
|
|
170
|
-
Schema.Literal("video"),
|
|
171
|
-
Schema.Literal("audio"),
|
|
172
|
-
Schema.Literal("document"),
|
|
173
|
-
Schema.Literal("sticker")
|
|
174
|
-
]),
|
|
175
|
-
mediaId: MediaId,
|
|
176
|
-
caption: Schema.optionalKey(Schema.String),
|
|
177
|
-
filename: Schema.optionalKey(Schema.String)
|
|
178
|
-
}),
|
|
179
|
-
Schema.Struct({
|
|
180
|
-
type: Schema.Union([
|
|
181
|
-
Schema.Literal("image"),
|
|
182
|
-
Schema.Literal("video"),
|
|
183
|
-
Schema.Literal("audio"),
|
|
184
|
-
Schema.Literal("document"),
|
|
185
|
-
Schema.Literal("sticker")
|
|
186
|
-
]),
|
|
187
|
-
providerMediaId: Schema.String,
|
|
188
|
-
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
189
|
-
caption: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
190
|
-
filename: Schema.optionalKey(Schema.String)
|
|
191
|
-
})
|
|
192
|
-
]).annotate({ identifier: "WhatsAppStoredMedia" }))();
|
|
193
56
|
const MessageReplyObservation = /* @__PURE__ */ (() => Schema.Struct({
|
|
194
57
|
endpoints: Schema.Array(Schema.Struct({
|
|
195
58
|
mailboxId: MailboxId,
|
|
@@ -205,20 +68,6 @@ const MessageReplyObservation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
205
68
|
}), Schema.Null])
|
|
206
69
|
}), Schema.Null])
|
|
207
70
|
}).annotate({ identifier: "MessageReplyObservation" }))();
|
|
208
|
-
const WhatsAppStoredFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
209
|
-
type: Schema.Literal("flow"),
|
|
210
|
-
header: Schema.optionalKey(WhatsAppTextHeader),
|
|
211
|
-
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
212
|
-
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
213
|
-
flowId: WhatsAppFlowId,
|
|
214
|
-
cta: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(30).annotate({ expected: "a string with at most 30 code points" })).check(Schema.isMaxLength(30).annotate({ expected: "a value with a length of at most 30" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
215
|
-
token: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
216
|
-
action: Schema.optionalKey(Schema.Union([Schema.Literal("navigate"), Schema.Literal("data_exchange")])),
|
|
217
|
-
screen: Schema.optionalKey(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[A-Za-z_]{1,100}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z_]{1,100}$" }))),
|
|
218
|
-
data: Schema.optionalKey(Schema.Record(Schema.String, JsonValue)),
|
|
219
|
-
flowVersionId: WhatsAppFlowVersionId,
|
|
220
|
-
providerFlowId: Schema.String
|
|
221
|
-
}).annotate({ identifier: "WhatsAppStoredFlowMessage" }))();
|
|
222
71
|
const MessageDeliveryObservation = /* @__PURE__ */ (() => Schema.Struct({
|
|
223
72
|
id: MessageDeliveryId,
|
|
224
73
|
recipient: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -389,94 +238,6 @@ const Message = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
389
238
|
createdAt: Schema.String,
|
|
390
239
|
updatedAt: Schema.String
|
|
391
240
|
}).annotate({ identifier: "Message" }))();
|
|
392
|
-
const WhatsAppStoredInteractive = /* @__PURE__ */ (() => Schema.Union([
|
|
393
|
-
WhatsAppButtonsMessage,
|
|
394
|
-
WhatsAppListMessage,
|
|
395
|
-
WhatsAppCtaUrlMessage,
|
|
396
|
-
WhatsAppStoredFlowMessage
|
|
397
|
-
]).annotate({ identifier: "WhatsAppStoredInteractive" }))();
|
|
398
|
-
const WhatsAppMessageContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
399
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
400
|
-
template: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
401
|
-
name: Schema.String,
|
|
402
|
-
language: Schema.String,
|
|
403
|
-
components: Schema.Array(Schema.Struct({
|
|
404
|
-
type: Schema.Union([
|
|
405
|
-
Schema.Literal("header"),
|
|
406
|
-
Schema.Literal("body"),
|
|
407
|
-
Schema.Literal("footer"),
|
|
408
|
-
Schema.Literal("button")
|
|
409
|
-
]),
|
|
410
|
-
sub_type: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
411
|
-
Schema.Literal("url"),
|
|
412
|
-
Schema.Literal("quick_reply"),
|
|
413
|
-
Schema.Literal("copy_code"),
|
|
414
|
-
Schema.Literal("flow")
|
|
415
|
-
]), Schema.Null])),
|
|
416
|
-
index: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
417
|
-
parameters: Schema.Array(Schema.Struct({
|
|
418
|
-
type: Schema.Union([
|
|
419
|
-
Schema.Literal("text"),
|
|
420
|
-
Schema.Literal("currency"),
|
|
421
|
-
Schema.Literal("date_time"),
|
|
422
|
-
Schema.Literal("image"),
|
|
423
|
-
Schema.Literal("document"),
|
|
424
|
-
Schema.Literal("video"),
|
|
425
|
-
Schema.Literal("coupon_code"),
|
|
426
|
-
Schema.Literal("action")
|
|
427
|
-
]),
|
|
428
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
429
|
-
currency: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
430
|
-
fallback_value: Schema.String,
|
|
431
|
-
code: Schema.String,
|
|
432
|
-
amount_1000: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
433
|
-
}), Schema.Null])),
|
|
434
|
-
date_time: Schema.optionalKey(Schema.Union([Schema.Struct({ fallback_value: Schema.String }), Schema.Null])),
|
|
435
|
-
image: Schema.optionalKey(Schema.Union([Schema.Struct({ link: Schema.String }), Schema.Null])),
|
|
436
|
-
document: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
437
|
-
link: Schema.String,
|
|
438
|
-
filename: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
439
|
-
}), Schema.Null])),
|
|
440
|
-
video: Schema.optionalKey(Schema.Union([Schema.Struct({ link: Schema.String }), Schema.Null])),
|
|
441
|
-
coupon_code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
442
|
-
action: Schema.optionalKey(Schema.Union([Schema.Struct({ flow_token: Schema.String }), Schema.Null]))
|
|
443
|
-
}))
|
|
444
|
-
}))
|
|
445
|
-
}), Schema.Null])),
|
|
446
|
-
interactive: Schema.optionalKey(WhatsAppStoredInteractive),
|
|
447
|
-
media: Schema.optionalKey(Schema.Union([WhatsAppStoredMedia, Schema.Null])),
|
|
448
|
-
reaction: Schema.optionalKey(WhatsAppStoredReaction),
|
|
449
|
-
location: Schema.optionalKey(WhatsAppStoredLocation),
|
|
450
|
-
contacts: Schema.optionalKey(Schema.Array(WhatsAppStoredContactCard)),
|
|
451
|
-
reply: Schema.optionalKey(WhatsAppReceivedReply),
|
|
452
|
-
flowResponse: Schema.optionalKey(WhatsAppReceivedFlowResponse),
|
|
453
|
-
context: Schema.optionalKey(WhatsAppMessageReference)
|
|
454
|
-
}).annotate({ identifier: "WhatsAppMessageContent" }))();
|
|
455
|
-
const MessageContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
456
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
457
|
-
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
458
|
-
markdown: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
459
|
-
sms: Schema.optionalKey(Schema.Union([SmsMessageContent, Schema.Null])),
|
|
460
|
-
whatsapp: Schema.optionalKey(Schema.Union([WhatsAppMessageContent, Schema.Null])),
|
|
461
|
-
email: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
462
|
-
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
463
|
-
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
464
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
465
|
-
headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
|
|
466
|
-
tracking: Schema.optionalKey(EmailTrackingOverrideV1),
|
|
467
|
-
attachments: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Struct({
|
|
468
|
-
filename: Schema.String,
|
|
469
|
-
contentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
470
|
-
isInline: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
471
|
-
content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
472
|
-
mediaId: Schema.optionalKey(Schema.Union([MediaId, Schema.Null])),
|
|
473
|
-
contentType: Schema.String,
|
|
474
|
-
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
475
|
-
})), Schema.Null]))
|
|
476
|
-
}), Schema.Null])),
|
|
477
|
-
structured: Schema.optionalKey(Schema.Union([WhatsAppStructuredContent, Schema.Null])),
|
|
478
|
-
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]))
|
|
479
|
-
}).annotate({ identifier: "MessageContent" }))();
|
|
480
241
|
const MessagesListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
481
242
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
482
243
|
cursor: Schema.optionalKey(Schema.String),
|
|
@@ -512,7 +273,7 @@ const MessagesList403 = ForbiddenError;
|
|
|
512
273
|
const MessagesList422 = ValidationError;
|
|
513
274
|
const MessagesList500 = InternalError;
|
|
514
275
|
const MessagesList504 = GatewayTimeoutError;
|
|
515
|
-
const MessagesSendHeaders = /* @__PURE__ */ (() => Schema.Struct({ "idempotency-key": Schema.optionalKey(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
|
|
276
|
+
const MessagesSendHeaders = /* @__PURE__ */ (() => Schema.Struct({ "idempotency-key": Schema.optionalKey(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 after the first send succeeds. While it is in progress, wait for Retry-After and retry with the same key and body. Reusing the key with different content also returns 409, without a retry hint." }).check(Schema.isPattern(new globalThis.RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" }))) }))();
|
|
516
277
|
const MessagesSendRequestJson = /* @__PURE__ */ (() => Schema.Union([
|
|
517
278
|
EmailSendMessagePayload,
|
|
518
279
|
SmsSendMessagePayload,
|
|
@@ -833,7 +594,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
|
|
|
833
594
|
MessagesSend503.pipe(HttpApiSchema.status(503)),
|
|
834
595
|
MessagesSend504.pipe(HttpApiSchema.status(504))
|
|
835
596
|
]
|
|
836
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "An email send whose namespace has no sending setup returns ValidationError: share the sender domain with namespaces, or use a sender owned by that namespace. Sending setup that has stopped after failure returns ValidationError; restart or reconcile the domain's sending setup. Setup still in progress returns ConflictError. 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. Email and WhatsApp sends are available.
|
|
597
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "An email send whose namespace has no sending setup returns ValidationError: share the sender domain with namespaces, or use a sender owned by that namespace. Sending setup that has stopped after failure returns ValidationError; restart or reconcile the domain's sending setup. Setup still in progress returns ConflictError. 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. Email and WhatsApp sends are available. Once a send succeeds, repeating the request with the same `Idempotency-Key` and body returns the original receipt. While it is still in progress, a 409 includes a `Retry-After` header. Reusing the key for different content returns a 409 without a retry hint."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
|
|
837
598
|
params: MessagesGetPathParams,
|
|
838
599
|
success: MessagesGet200,
|
|
839
600
|
error: [
|
|
@@ -934,6 +695,6 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
|
|
|
934
695
|
MessagesValidateEmail504.pipe(HttpApiSchema.status(504))
|
|
935
696
|
]
|
|
936
697
|
}).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.") {};
|
|
937
|
-
export {
|
|
698
|
+
export { EmailAddress, EstimatedProviderCost, Message, MessageAddress, MessageDeliveryError, MessageDeliveryList, MessageDeliveryObservation, MessageEventId, MessageEventPage, MessageReceipt, MessageReplyObservation, MessageSender, MessageSubmission, MessagesGet200, MessagesGet400, MessagesGet401, MessagesGet403, MessagesGet404, MessagesGet422, MessagesGet500, MessagesGet504, MessagesGetContent200, MessagesGetContent400, MessagesGetContent401, MessagesGetContent403, MessagesGetContent404, MessagesGetContent422, MessagesGetContent500, MessagesGetContent504, MessagesGetContentPathParams, MessagesGetEmail200, MessagesGetEmail400, MessagesGetEmail401, MessagesGetEmail403, MessagesGetEmail404, MessagesGetEmail422, MessagesGetEmail500, MessagesGetEmail504, MessagesGetEmailPathParams, MessagesGetEmailQuery, MessagesGetEvents200, MessagesGetEvents400, MessagesGetEvents401, MessagesGetEvents403, MessagesGetEvents404, MessagesGetEvents422, MessagesGetEvents500, MessagesGetEvents504, MessagesGetEventsPathParams, MessagesGetEventsQuery, MessagesGetPathParams, MessagesGetStatus200, MessagesGetStatus400, MessagesGetStatus401, MessagesGetStatus403, MessagesGetStatus404, MessagesGetStatus422, MessagesGetStatus500, MessagesGetStatus504, MessagesGetStatusPathParams, MessagesGroup, MessagesList200, MessagesList400, MessagesList401, MessagesList403, MessagesList422, MessagesList500, MessagesList504, MessagesListDeliveries200, MessagesListDeliveries400, MessagesListDeliveries401, MessagesListDeliveries403, MessagesListDeliveries404, MessagesListDeliveries422, MessagesListDeliveries500, MessagesListDeliveries504, MessagesListDeliveriesPathParams, MessagesListQuery, MessagesRemove200, MessagesRemove400, MessagesRemove401, MessagesRemove403, MessagesRemove404, MessagesRemove422, MessagesRemove500, MessagesRemove502, MessagesRemove504, MessagesRemovePathParams, MessagesSend201, MessagesSend400, MessagesSend401, MessagesSend402, MessagesSend403, MessagesSend404, MessagesSend409, MessagesSend422, MessagesSend429, MessagesSend500, MessagesSend502, MessagesSend503, MessagesSend504, MessagesSendHeaders, MessagesSendRequestJson, MessagesValidateEmail200, MessagesValidateEmail400, MessagesValidateEmail401, MessagesValidateEmail403, MessagesValidateEmail404, MessagesValidateEmail422, MessagesValidateEmail500, MessagesValidateEmail503, MessagesValidateEmail504, MessagesValidateEmailRequestJson, SubmissionCredential, ValidateEmailResponse };
|
|
938
699
|
|
|
939
700
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, ConflictError,
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NewsletterId, OrganizationId, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
export type PublicationDomainPage = {
|
|
5
5
|
readonly items: ReadonlyArray<{
|
|
6
6
|
readonly organizationId: OrganizationId;
|
|
@@ -92,8 +92,8 @@ export type NewsletterDomainsList400 = MalformedRequestError;
|
|
|
92
92
|
export declare const NewsletterDomainsList400: typeof MalformedRequestError;
|
|
93
93
|
export type NewsletterDomainsList401 = UnauthorizedError;
|
|
94
94
|
export declare const NewsletterDomainsList401: typeof UnauthorizedError;
|
|
95
|
-
export type NewsletterDomainsList403 = ForbiddenError
|
|
96
|
-
export declare const NewsletterDomainsList403:
|
|
95
|
+
export type NewsletterDomainsList403 = ForbiddenError;
|
|
96
|
+
export declare const NewsletterDomainsList403: typeof ForbiddenError;
|
|
97
97
|
export type NewsletterDomainsList404 = ResourceNotFoundError;
|
|
98
98
|
export declare const NewsletterDomainsList404: typeof ResourceNotFoundError;
|
|
99
99
|
export type NewsletterDomainsList409 = ConflictError;
|
|
@@ -168,8 +168,8 @@ export type NewsletterDomainsAdd400 = MalformedRequestError;
|
|
|
168
168
|
export declare const NewsletterDomainsAdd400: typeof MalformedRequestError;
|
|
169
169
|
export type NewsletterDomainsAdd401 = UnauthorizedError;
|
|
170
170
|
export declare const NewsletterDomainsAdd401: typeof UnauthorizedError;
|
|
171
|
-
export type NewsletterDomainsAdd403 = ForbiddenError
|
|
172
|
-
export declare const NewsletterDomainsAdd403:
|
|
171
|
+
export type NewsletterDomainsAdd403 = ForbiddenError;
|
|
172
|
+
export declare const NewsletterDomainsAdd403: typeof ForbiddenError;
|
|
173
173
|
export type NewsletterDomainsAdd404 = ResourceNotFoundError;
|
|
174
174
|
export declare const NewsletterDomainsAdd404: typeof ResourceNotFoundError;
|
|
175
175
|
export type NewsletterDomainsAdd409 = ConflictError;
|
|
@@ -234,8 +234,8 @@ export type NewsletterDomainsGet400 = MalformedRequestError;
|
|
|
234
234
|
export declare const NewsletterDomainsGet400: typeof MalformedRequestError;
|
|
235
235
|
export type NewsletterDomainsGet401 = UnauthorizedError;
|
|
236
236
|
export declare const NewsletterDomainsGet401: typeof UnauthorizedError;
|
|
237
|
-
export type NewsletterDomainsGet403 = ForbiddenError
|
|
238
|
-
export declare const NewsletterDomainsGet403:
|
|
237
|
+
export type NewsletterDomainsGet403 = ForbiddenError;
|
|
238
|
+
export declare const NewsletterDomainsGet403: typeof ForbiddenError;
|
|
239
239
|
export type NewsletterDomainsGet404 = ResourceNotFoundError;
|
|
240
240
|
export declare const NewsletterDomainsGet404: typeof ResourceNotFoundError;
|
|
241
241
|
export type NewsletterDomainsGet409 = ConflictError;
|
|
@@ -306,8 +306,8 @@ export type NewsletterDomainsRemove400 = MalformedRequestError;
|
|
|
306
306
|
export declare const NewsletterDomainsRemove400: typeof MalformedRequestError;
|
|
307
307
|
export type NewsletterDomainsRemove401 = UnauthorizedError;
|
|
308
308
|
export declare const NewsletterDomainsRemove401: typeof UnauthorizedError;
|
|
309
|
-
export type NewsletterDomainsRemove403 = ForbiddenError
|
|
310
|
-
export declare const NewsletterDomainsRemove403:
|
|
309
|
+
export type NewsletterDomainsRemove403 = ForbiddenError;
|
|
310
|
+
export declare const NewsletterDomainsRemove403: typeof ForbiddenError;
|
|
311
311
|
export type NewsletterDomainsRemove404 = ResourceNotFoundError;
|
|
312
312
|
export declare const NewsletterDomainsRemove404: typeof ResourceNotFoundError;
|
|
313
313
|
export type NewsletterDomainsRemove409 = ConflictError;
|
|
@@ -344,7 +344,7 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
344
344
|
readonly value: Schema.String;
|
|
345
345
|
}>>;
|
|
346
346
|
readonly verificationErrors: Schema.$Array<Schema.String>;
|
|
347
|
-
}>>, Schema.toCodecJson<Schema.
|
|
347
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
348
348
|
readonly _tag: "ConflictError";
|
|
349
349
|
readonly message: string;
|
|
350
350
|
readonly resource: string;
|
|
@@ -364,6 +364,18 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
364
364
|
readonly message: Schema.String;
|
|
365
365
|
readonly resource: Schema.String;
|
|
366
366
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
367
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
368
|
+
readonly _tag: "ForbiddenError";
|
|
369
|
+
readonly message: string;
|
|
370
|
+
}, readonly [Schema.Struct<{
|
|
371
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
372
|
+
readonly message: Schema.String;
|
|
373
|
+
}>], {
|
|
374
|
+
readonly _tag: "ForbiddenError";
|
|
375
|
+
readonly message: string;
|
|
376
|
+
}>, Schema.Struct<{
|
|
377
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
378
|
+
readonly message: Schema.String;
|
|
367
379
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
368
380
|
readonly _tag: "GatewayTimeoutError";
|
|
369
381
|
readonly message: string;
|
|
@@ -475,7 +487,7 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
475
487
|
readonly value: Schema.String;
|
|
476
488
|
}>>;
|
|
477
489
|
readonly verificationErrors: Schema.$Array<Schema.String>;
|
|
478
|
-
}>>, Schema.toCodecJson<Schema.
|
|
490
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
479
491
|
readonly _tag: "ConflictError";
|
|
480
492
|
readonly message: string;
|
|
481
493
|
readonly resource: string;
|
|
@@ -495,6 +507,18 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
495
507
|
readonly message: Schema.String;
|
|
496
508
|
readonly resource: Schema.String;
|
|
497
509
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
510
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
511
|
+
readonly _tag: "ForbiddenError";
|
|
512
|
+
readonly message: string;
|
|
513
|
+
}, readonly [Schema.Struct<{
|
|
514
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
515
|
+
readonly message: Schema.String;
|
|
516
|
+
}>], {
|
|
517
|
+
readonly _tag: "ForbiddenError";
|
|
518
|
+
readonly message: string;
|
|
519
|
+
}>, Schema.Struct<{
|
|
520
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
521
|
+
readonly message: Schema.String;
|
|
498
522
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
499
523
|
readonly _tag: "GatewayTimeoutError";
|
|
500
524
|
readonly message: string;
|
|
@@ -611,7 +635,7 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
611
635
|
readonly verificationErrors: Schema.$Array<Schema.String>;
|
|
612
636
|
}>>;
|
|
613
637
|
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
614
|
-
}>>, Schema.toCodecJson<Schema.
|
|
638
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
615
639
|
readonly _tag: "ConflictError";
|
|
616
640
|
readonly message: string;
|
|
617
641
|
readonly resource: string;
|
|
@@ -631,6 +655,18 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
631
655
|
readonly message: Schema.String;
|
|
632
656
|
readonly resource: Schema.String;
|
|
633
657
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
658
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
659
|
+
readonly _tag: "ForbiddenError";
|
|
660
|
+
readonly message: string;
|
|
661
|
+
}, readonly [Schema.Struct<{
|
|
662
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
663
|
+
readonly message: Schema.String;
|
|
664
|
+
}>], {
|
|
665
|
+
readonly _tag: "ForbiddenError";
|
|
666
|
+
readonly message: string;
|
|
667
|
+
}>, Schema.Struct<{
|
|
668
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
669
|
+
readonly message: Schema.String;
|
|
634
670
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
635
671
|
readonly _tag: "GatewayTimeoutError";
|
|
636
672
|
readonly message: string;
|
|
@@ -744,7 +780,7 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
744
780
|
readonly value: Schema.String;
|
|
745
781
|
}>>;
|
|
746
782
|
readonly verificationErrors: Schema.$Array<Schema.String>;
|
|
747
|
-
}>>, Schema.toCodecJson<Schema.
|
|
783
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
748
784
|
readonly _tag: "ConflictError";
|
|
749
785
|
readonly message: string;
|
|
750
786
|
readonly resource: string;
|
|
@@ -764,6 +800,18 @@ declare const NewsletterDomainsGroup_base: HttpApiGroup.HttpApiGroup<"Newsletter
|
|
|
764
800
|
readonly message: Schema.String;
|
|
765
801
|
readonly resource: Schema.String;
|
|
766
802
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
803
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
804
|
+
readonly _tag: "ForbiddenError";
|
|
805
|
+
readonly message: string;
|
|
806
|
+
}, readonly [Schema.Struct<{
|
|
807
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
808
|
+
readonly message: Schema.String;
|
|
809
|
+
}>], {
|
|
810
|
+
readonly _tag: "ForbiddenError";
|
|
811
|
+
readonly message: string;
|
|
812
|
+
}>, Schema.Struct<{
|
|
813
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
814
|
+
readonly message: Schema.String;
|
|
767
815
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
768
816
|
readonly _tag: "GatewayTimeoutError";
|
|
769
817
|
readonly message: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NewsletterId, OrganizationId, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/newsletter-domains.ts
|
|
@@ -40,7 +40,7 @@ const NewsletterDomainsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
40
40
|
const NewsletterDomainsList200 = PublicationDomainPage;
|
|
41
41
|
const NewsletterDomainsList400 = MalformedRequestError;
|
|
42
42
|
const NewsletterDomainsList401 = UnauthorizedError;
|
|
43
|
-
const NewsletterDomainsList403 =
|
|
43
|
+
const NewsletterDomainsList403 = ForbiddenError;
|
|
44
44
|
const NewsletterDomainsList404 = ResourceNotFoundError;
|
|
45
45
|
const NewsletterDomainsList409 = ConflictError;
|
|
46
46
|
const NewsletterDomainsList422 = ValidationError;
|
|
@@ -78,7 +78,7 @@ const NewsletterDomainsAdd200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
78
78
|
}))();
|
|
79
79
|
const NewsletterDomainsAdd400 = MalformedRequestError;
|
|
80
80
|
const NewsletterDomainsAdd401 = UnauthorizedError;
|
|
81
|
-
const NewsletterDomainsAdd403 =
|
|
81
|
+
const NewsletterDomainsAdd403 = ForbiddenError;
|
|
82
82
|
const NewsletterDomainsAdd404 = ResourceNotFoundError;
|
|
83
83
|
const NewsletterDomainsAdd409 = ConflictError;
|
|
84
84
|
const NewsletterDomainsAdd422 = ValidationError;
|
|
@@ -117,7 +117,7 @@ const NewsletterDomainsGet200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
117
117
|
}))();
|
|
118
118
|
const NewsletterDomainsGet400 = MalformedRequestError;
|
|
119
119
|
const NewsletterDomainsGet401 = UnauthorizedError;
|
|
120
|
-
const NewsletterDomainsGet403 =
|
|
120
|
+
const NewsletterDomainsGet403 = ForbiddenError;
|
|
121
121
|
const NewsletterDomainsGet404 = ResourceNotFoundError;
|
|
122
122
|
const NewsletterDomainsGet409 = ConflictError;
|
|
123
123
|
const NewsletterDomainsGet422 = ValidationError;
|
|
@@ -157,7 +157,7 @@ const NewsletterDomainsRemove200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
157
157
|
}))();
|
|
158
158
|
const NewsletterDomainsRemove400 = MalformedRequestError;
|
|
159
159
|
const NewsletterDomainsRemove401 = UnauthorizedError;
|
|
160
|
-
const NewsletterDomainsRemove403 =
|
|
160
|
+
const NewsletterDomainsRemove403 = ForbiddenError;
|
|
161
161
|
const NewsletterDomainsRemove404 = ResourceNotFoundError;
|
|
162
162
|
const NewsletterDomainsRemove409 = ConflictError;
|
|
163
163
|
const NewsletterDomainsRemove422 = ValidationError;
|