samva 0.27.0 → 0.28.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 +7 -0
- package/README.md +12 -7
- package/dist/client/sdk.gen.d.ts +322 -143
- package/dist/client/sdk.gen.js +604 -95
- package/dist/client/types.gen.d.ts +1342 -479
- package/dist/effect/agents.d.ts +6 -8
- package/dist/effect/analytics.d.ts +1 -1
- package/dist/effect/api-keys.d.ts +6 -6
- package/dist/effect/attachments.d.ts +1 -1
- package/dist/effect/brands.d.ts +2 -0
- package/dist/effect/campaigns.d.ts +275 -25
- package/dist/effect/campaigns.js +7 -1
- package/dist/effect/contact-groups.d.ts +9 -9
- package/dist/effect/contacts.d.ts +74 -81
- package/dist/effect/contacts.js +7 -3
- package/dist/effect/conversations.d.ts +14 -6
- package/dist/effect/email.d.ts +34 -34
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +3 -3
- package/dist/effect/extensions.d.ts +6 -6
- package/dist/effect/generated/agents.d.ts +6 -28
- package/dist/effect/generated/agents.js +2 -3
- package/dist/effect/generated/analytics.d.ts +3 -3
- package/dist/effect/generated/analytics.js +1 -1
- package/dist/effect/generated/api-keys.d.ts +6 -6
- package/dist/effect/generated/api-keys.js +2 -2
- package/dist/effect/generated/attachments.d.ts +3 -3
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/brands.d.ts +16 -0
- package/dist/effect/generated/campaigns.d.ts +1181 -302
- package/dist/effect/generated/campaigns.js +169 -36
- package/dist/effect/generated/contact-events.d.ts +3 -3
- package/dist/effect/generated/contact-events.js +1 -1
- package/dist/effect/generated/contact-groups.d.ts +9 -9
- package/dist/effect/generated/contact-groups.js +7 -7
- package/dist/effect/generated/contacts.d.ts +2063 -290
- package/dist/effect/generated/contacts.js +343 -75
- package/dist/effect/generated/conversations.d.ts +14 -6
- package/dist/effect/generated/conversations.js +6 -6
- package/dist/effect/generated/email.d.ts +40 -40
- package/dist/effect/generated/email.js +15 -15
- package/dist/effect/generated/extension-installations.d.ts +3 -3
- package/dist/effect/generated/extension-installations.js +1 -1
- package/dist/effect/generated/extensions.d.ts +6 -6
- package/dist/effect/generated/extensions.js +2 -2
- package/dist/effect/generated/index.d.ts +5 -3
- package/dist/effect/generated/journeys.d.ts +9 -9
- package/dist/effect/generated/journeys.js +3 -3
- package/dist/effect/generated/mailboxes.d.ts +172 -124
- package/dist/effect/generated/mailboxes.js +22 -14
- package/dist/effect/generated/messages.d.ts +53 -29
- package/dist/effect/generated/messages.js +9 -5
- package/dist/effect/generated/namespaces.d.ts +3 -3
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/operations.d.ts +3 -3
- package/dist/effect/generated/operations.js +1 -1
- package/dist/effect/generated/organizations.d.ts +0 -9
- package/dist/effect/generated/organizations.js +1 -4
- package/dist/effect/generated/scheduled-messages.d.ts +69 -20
- package/dist/effect/generated/scheduled-messages.js +22 -3
- package/dist/effect/generated/shared.d.ts +396 -107
- package/dist/effect/generated/shared.js +170 -89
- package/dist/effect/generated/subscriptions.d.ts +4 -7
- package/dist/effect/generated/subscriptions.js +3 -4
- package/dist/effect/generated/templates.d.ts +71 -407
- package/dist/effect/generated/templates.js +23 -23
- package/dist/effect/generated/topic-forms.d.ts +656 -0
- package/dist/effect/generated/topic-forms.js +145 -0
- package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
- package/dist/effect/generated/topics.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +6 -6
- package/dist/effect/generated/webhooks.js +2 -2
- package/dist/effect/generated-metadata.d.ts +78 -24
- package/dist/effect/generated-metadata.js +61 -27
- package/dist/effect/index.d.ts +2 -1
- package/dist/effect/index.js +4 -3
- package/dist/effect/internal/operation.js +3 -3
- package/dist/effect/internal/send.d.ts +4 -4
- package/dist/effect/journeys.d.ts +7 -7
- package/dist/effect/mailboxes.d.ts +137 -121
- package/dist/effect/messages.d.ts +19 -11
- package/dist/effect/namespaces.d.ts +3 -3
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/scheduled-messages.d.ts +6 -6
- package/dist/effect/subscriptions.d.ts +1 -2
- package/dist/effect/templates.d.ts +13 -13
- package/dist/effect/topic-forms.d.ts +30 -0
- package/dist/effect/topic-forms.js +21 -0
- package/dist/effect/topics.d.ts +94 -0
- package/dist/effect/topics.js +29 -0
- package/dist/effect/webhooks.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +65 -8
- package/dist/promises/errors.gen.js +139 -7
- package/dist/promises/index.d.ts +5 -3
- package/dist/promises/index.js +7 -5
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +74 -25
- package/dist/service-map.js +43 -12
- package/package.json +12 -8
- package/dist/effect/generated/unsubscribe-groups.js +0 -284
- package/dist/effect/unsubscribe-groups.d.ts +0 -74
- package/dist/effect/unsubscribe-groups.js +0 -29
|
@@ -33,7 +33,6 @@ const AgentIntegrationReference = /* @__PURE__ */ Schema.String.check(Schema.isP
|
|
|
33
33
|
}));
|
|
34
34
|
const AgentMode = /* @__PURE__ */ Schema.Union([Schema.Literal("live"), Schema.Literal("supervised")]).annotate({ identifier: "AgentMode" });
|
|
35
35
|
const AgentModel = /* @__PURE__ */ Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" });
|
|
36
|
-
const AgentApprovalPolicy = /* @__PURE__ */ Schema.Union([Schema.Literal("toolActions"), Schema.Literal("none")]).annotate({ identifier: "AgentApprovalPolicy" });
|
|
37
36
|
const TimeZone = /* @__PURE__ */ Schema.String.annotate({ identifier: "TimeZone" });
|
|
38
37
|
const Weekday = /* @__PURE__ */ Schema.Union([
|
|
39
38
|
Schema.Literal("monday"),
|
|
@@ -128,6 +127,10 @@ const BrandSocialLink = /* @__PURE__ */ Schema.Struct({
|
|
|
128
127
|
label: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })),
|
|
129
128
|
url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))
|
|
130
129
|
}).annotate({ identifier: "BrandSocialLink" });
|
|
130
|
+
const CampaignId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
131
|
+
expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
132
|
+
identifier: "CampaignId"
|
|
133
|
+
})).pipe(Schema.brand("CampaignId"));
|
|
131
134
|
const MediaId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
132
135
|
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
133
136
|
identifier: "MediaId"
|
|
@@ -154,10 +157,10 @@ const RenderTimeZone = /* @__PURE__ */ Schema.String.check(Schema.isMaxCodePoint
|
|
|
154
157
|
identifier: "RenderTimeZone"
|
|
155
158
|
})).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" }));
|
|
156
159
|
const ReplyToAddresses = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null]).annotate({ identifier: "ReplyToAddresses" });
|
|
157
|
-
const
|
|
160
|
+
const TopicId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
158
161
|
expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
159
|
-
identifier: "
|
|
160
|
-
})).pipe(Schema.brand("
|
|
162
|
+
identifier: "TopicId"
|
|
163
|
+
})).pipe(Schema.brand("TopicId"));
|
|
161
164
|
const EmailTrackingOverrideV1 = /* @__PURE__ */ Schema.Struct({
|
|
162
165
|
opens: Schema.optionalKey(Schema.Boolean.annotate({ description: "Override open tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking." })),
|
|
163
166
|
clicks: Schema.optionalKey(Schema.Boolean.annotate({ description: "Override click tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking." }))
|
|
@@ -170,10 +173,15 @@ const EmailCustomHeaders = /* @__PURE__ */ Schema.Record(Schema.String, Schema.S
|
|
|
170
173
|
expected: "a value with at most 11 entries",
|
|
171
174
|
identifier: "EmailCustomHeaders"
|
|
172
175
|
}));
|
|
176
|
+
const CampaignFrom = /* @__PURE__ */ Schema.Union([Schema.Struct({
|
|
177
|
+
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
178
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
179
|
+
}), Schema.Null]).annotate({ identifier: "CampaignFrom" });
|
|
173
180
|
const ConversationId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
174
181
|
expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
175
182
|
identifier: "ConversationId"
|
|
176
183
|
})).pipe(Schema.brand("ConversationId"));
|
|
184
|
+
const CampaignContentMetadata = /* @__PURE__ */ Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "CampaignContentMetadata" });
|
|
177
185
|
const ContactId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
178
186
|
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
179
187
|
identifier: "ContactId"
|
|
@@ -182,6 +190,10 @@ const ContactGroupId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @
|
|
|
182
190
|
expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
183
191
|
identifier: "ContactGroupId"
|
|
184
192
|
})).pipe(Schema.brand("ContactGroupId"));
|
|
193
|
+
const CampaignRunId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
194
|
+
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
195
|
+
identifier: "CampaignRunId"
|
|
196
|
+
})).pipe(Schema.brand("CampaignRunId"));
|
|
185
197
|
const SendsSeries = /* @__PURE__ */ Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
|
|
186
198
|
description: "Daily email sends for the last 14 calendar days in the organization's own timezone, oldest first and zero-filled. Always fourteen entries; an entity that has never sent reports fourteen zeroes.",
|
|
187
199
|
identifier: "SendsSeries"
|
|
@@ -209,6 +221,42 @@ var SenderNotReadyError = class extends Schema.TaggedError()("SenderNotReadyErro
|
|
|
209
221
|
sender: Schema.String,
|
|
210
222
|
retryAfterSeconds: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
|
|
211
223
|
})) {};
|
|
224
|
+
var OnboardingReviewRequiredError = class extends Schema.TaggedError()("OnboardingReviewRequiredError", Schema.Struct({
|
|
225
|
+
message: Schema.String,
|
|
226
|
+
code: Schema.Union([
|
|
227
|
+
Schema.Literal("review_required"),
|
|
228
|
+
Schema.Literal("review_in_progress"),
|
|
229
|
+
Schema.Literal("information_required"),
|
|
230
|
+
Schema.Literal("review_rejected"),
|
|
231
|
+
Schema.Literal("identity_review_required"),
|
|
232
|
+
Schema.Literal("identity_review_rejected"),
|
|
233
|
+
Schema.Literal("identity_changed")
|
|
234
|
+
]),
|
|
235
|
+
decision: Schema.Union([
|
|
236
|
+
Schema.Literal("undecided"),
|
|
237
|
+
Schema.Literal("approved"),
|
|
238
|
+
Schema.Literal("rejected")
|
|
239
|
+
]),
|
|
240
|
+
stage: Schema.Union([
|
|
241
|
+
Schema.Literal("collecting"),
|
|
242
|
+
Schema.Literal("automated_review"),
|
|
243
|
+
Schema.Literal("manual_review"),
|
|
244
|
+
Schema.Literal("information_requested"),
|
|
245
|
+
Schema.Literal("complete")
|
|
246
|
+
]),
|
|
247
|
+
nextAction: Schema.Union([
|
|
248
|
+
Schema.Literal("wait_for_review"),
|
|
249
|
+
Schema.Literal("provide_information"),
|
|
250
|
+
Schema.Literal("verify_sending_identity"),
|
|
251
|
+
Schema.Literal("reapply"),
|
|
252
|
+
Schema.Literal("contact_support")
|
|
253
|
+
]),
|
|
254
|
+
identityId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
255
|
+
})) {};
|
|
256
|
+
var DeliveryUnavailableError = class extends Schema.TaggedError()("DeliveryUnavailableError", Schema.Struct({
|
|
257
|
+
message: Schema.String,
|
|
258
|
+
retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
259
|
+
})) {};
|
|
212
260
|
const ContactIdentityId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
213
261
|
expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
214
262
|
identifier: "ContactIdentityId"
|
|
@@ -409,38 +457,6 @@ const MailboxSendError = /* @__PURE__ */ Schema.Union([
|
|
|
409
457
|
message: Schema.String
|
|
410
458
|
})
|
|
411
459
|
]).annotate({ identifier: "MailboxSendError" });
|
|
412
|
-
var OnboardingReviewRequiredError = class extends Schema.TaggedError()("OnboardingReviewRequiredError", Schema.Struct({
|
|
413
|
-
message: Schema.String,
|
|
414
|
-
code: Schema.Union([
|
|
415
|
-
Schema.Literal("review_required"),
|
|
416
|
-
Schema.Literal("review_in_progress"),
|
|
417
|
-
Schema.Literal("information_required"),
|
|
418
|
-
Schema.Literal("review_rejected"),
|
|
419
|
-
Schema.Literal("identity_review_required"),
|
|
420
|
-
Schema.Literal("identity_review_rejected"),
|
|
421
|
-
Schema.Literal("identity_changed")
|
|
422
|
-
]),
|
|
423
|
-
decision: Schema.Union([
|
|
424
|
-
Schema.Literal("undecided"),
|
|
425
|
-
Schema.Literal("approved"),
|
|
426
|
-
Schema.Literal("rejected")
|
|
427
|
-
]),
|
|
428
|
-
stage: Schema.Union([
|
|
429
|
-
Schema.Literal("collecting"),
|
|
430
|
-
Schema.Literal("automated_review"),
|
|
431
|
-
Schema.Literal("manual_review"),
|
|
432
|
-
Schema.Literal("information_requested"),
|
|
433
|
-
Schema.Literal("complete")
|
|
434
|
-
]),
|
|
435
|
-
nextAction: Schema.Union([
|
|
436
|
-
Schema.Literal("wait_for_review"),
|
|
437
|
-
Schema.Literal("provide_information"),
|
|
438
|
-
Schema.Literal("verify_sending_identity"),
|
|
439
|
-
Schema.Literal("reapply"),
|
|
440
|
-
Schema.Literal("contact_support")
|
|
441
|
-
]),
|
|
442
|
-
identityId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
443
|
-
})) {};
|
|
444
460
|
const MailboxThreadFolder = /* @__PURE__ */ Schema.Union([
|
|
445
461
|
Schema.Literal("inbox"),
|
|
446
462
|
Schema.Literal("assigned"),
|
|
@@ -470,10 +486,6 @@ const EmailSender = /* @__PURE__ */ Schema.Union([Schema.Struct({
|
|
|
470
486
|
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
471
487
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
472
488
|
}), Schema.Null]).annotate({ identifier: "EmailSender" });
|
|
473
|
-
var DeliveryUnavailableError = class extends Schema.TaggedError()("DeliveryUnavailableError", Schema.Struct({
|
|
474
|
-
message: Schema.String,
|
|
475
|
-
retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
476
|
-
})) {};
|
|
477
489
|
const IanaTimezone = /* @__PURE__ */ Schema.String.annotate({ identifier: "IanaTimezone" });
|
|
478
490
|
const NamespaceMetadata = /* @__PURE__ */ Schema.Record(Schema.String, Schema.String).annotate({
|
|
479
491
|
description: "Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.",
|
|
@@ -497,6 +509,44 @@ const TemplateTrackingDefault = /* @__PURE__ */ Schema.Struct({
|
|
|
497
509
|
opens: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
498
510
|
clicks: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
499
511
|
}).annotate({ identifier: "TemplateTrackingDefault" });
|
|
512
|
+
var TemplateSourceError = class extends Schema.TaggedError()("TemplateSourceError", Schema.Struct({
|
|
513
|
+
message: Schema.String,
|
|
514
|
+
diagnostics: Schema.Array(Schema.Struct({
|
|
515
|
+
code: Schema.String,
|
|
516
|
+
severity: Schema.Union([
|
|
517
|
+
Schema.Literal("error"),
|
|
518
|
+
Schema.Literal("warning"),
|
|
519
|
+
Schema.Literal("info")
|
|
520
|
+
]),
|
|
521
|
+
message: Schema.String,
|
|
522
|
+
origins: Schema.Array(Schema.Struct({
|
|
523
|
+
fileName: Schema.String,
|
|
524
|
+
lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
525
|
+
columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
526
|
+
})),
|
|
527
|
+
clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
528
|
+
notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
529
|
+
provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
530
|
+
fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
531
|
+
occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
|
|
532
|
+
fileName: Schema.String,
|
|
533
|
+
lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
534
|
+
columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
535
|
+
}))), Schema.Null])),
|
|
536
|
+
compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
537
|
+
assessment: Schema.Union([
|
|
538
|
+
Schema.Literal("risk"),
|
|
539
|
+
Schema.Literal("degradation"),
|
|
540
|
+
Schema.Literal("unverified"),
|
|
541
|
+
Schema.Literal("not-applicable")
|
|
542
|
+
]),
|
|
543
|
+
title: Schema.String
|
|
544
|
+
}), Schema.Null]))
|
|
545
|
+
})),
|
|
546
|
+
revision: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
547
|
+
})) {};
|
|
548
|
+
const TopicContactByEmail = /* @__PURE__ */ Schema.Struct({ email: Schema.String }).annotate({ identifier: "TopicContactByEmail" });
|
|
549
|
+
const TopicContactByPhone = /* @__PURE__ */ Schema.Struct({ phone: Schema.String }).annotate({ identifier: "TopicContactByPhone" });
|
|
500
550
|
const TestWebhookPayload = /* @__PURE__ */ Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" });
|
|
501
551
|
const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
|
|
502
552
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
|
|
@@ -524,6 +574,10 @@ const WorkingHoursRange = /* @__PURE__ */ Schema.Struct({
|
|
|
524
574
|
opens: ClockTime,
|
|
525
575
|
closes: ClockTime
|
|
526
576
|
}).annotate({ identifier: "WorkingHoursRange" });
|
|
577
|
+
const CampaignReplyMailbox = /* @__PURE__ */ Schema.Union([Schema.Union([MailboxId, Schema.Null]), Schema.Null]).annotate({
|
|
578
|
+
description: "Omit to inherit the topic mailbox; null disables mailbox inheritance. An explicit email.replyTo overrides an inherited mailbox.",
|
|
579
|
+
identifier: "CampaignReplyMailbox"
|
|
580
|
+
});
|
|
527
581
|
const CreateWebhookPayload = /* @__PURE__ */ Schema.Struct({
|
|
528
582
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ expected: "a string with at most 100 code points" })).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })),
|
|
529
583
|
url: Schema.String,
|
|
@@ -639,42 +693,9 @@ const ApiKeyMailboxAccess = /* @__PURE__ */ Schema.Struct({
|
|
|
639
693
|
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
|
|
640
694
|
sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
|
|
641
695
|
}).annotate({ identifier: "ApiKeyMailboxAccess" });
|
|
642
|
-
const MessageSummary = /* @__PURE__ */ Schema.Struct({
|
|
643
|
-
id: MessageId,
|
|
644
|
-
channel: Schema.Literal("email"),
|
|
645
|
-
direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
|
|
646
|
-
status: Schema.Union([
|
|
647
|
-
Schema.Literal("pending"),
|
|
648
|
-
Schema.Literal("scheduled"),
|
|
649
|
-
Schema.Literal("queued"),
|
|
650
|
-
Schema.Literal("processing"),
|
|
651
|
-
Schema.Literal("sent"),
|
|
652
|
-
Schema.Literal("delivered"),
|
|
653
|
-
Schema.Literal("read"),
|
|
654
|
-
Schema.Literal("failed"),
|
|
655
|
-
Schema.Literal("bounced"),
|
|
656
|
-
Schema.Literal("complained")
|
|
657
|
-
]),
|
|
658
|
-
from: Schema.Union([Schema.String, Schema.Null]),
|
|
659
|
-
to: Schema.Array(Schema.String),
|
|
660
|
-
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
661
|
-
waitReason: Schema.Union([Schema.Union([
|
|
662
|
-
Schema.Literal("rate"),
|
|
663
|
-
Schema.Literal("daily-quota"),
|
|
664
|
-
Schema.Literal("domain-health"),
|
|
665
|
-
Schema.Literal("sending-paused"),
|
|
666
|
-
Schema.Literal("upstream-unavailable"),
|
|
667
|
-
Schema.Literal("retry"),
|
|
668
|
-
Schema.Literal("campaign-paused"),
|
|
669
|
-
Schema.Literal("domain-warming"),
|
|
670
|
-
Schema.Literal("onboarding-review"),
|
|
671
|
-
Schema.Literal("content-review"),
|
|
672
|
-
Schema.Literal("screening-unavailable")
|
|
673
|
-
]), Schema.Null]),
|
|
674
|
-
createdAt: Schema.String
|
|
675
|
-
}).annotate({ identifier: "MessageSummary" });
|
|
676
696
|
const BrandFooter = /* @__PURE__ */ Schema.Struct({
|
|
677
697
|
companyName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null])),
|
|
698
|
+
websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
|
|
678
699
|
address: Schema.optionalKey(Schema.Union([BrandAddress, Schema.Null])),
|
|
679
700
|
socialLinks: Schema.optionalKey(Schema.Union([Schema.Array(BrandSocialLink).check(Schema.isMaxLength(12).annotate({ expected: "a value with a length of at most 12" })), Schema.Null]))
|
|
680
701
|
}).annotate({ identifier: "BrandFooter" });
|
|
@@ -700,10 +721,11 @@ const SkippedRecipient = /* @__PURE__ */ Schema.Struct({
|
|
|
700
721
|
Schema.Literal("complaint"),
|
|
701
722
|
Schema.Literal("unsubscribe"),
|
|
702
723
|
Schema.Literal("manual"),
|
|
703
|
-
Schema.Literal("
|
|
724
|
+
Schema.Literal("topic-unsubscribe")
|
|
704
725
|
]),
|
|
705
|
-
|
|
726
|
+
topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null]))
|
|
706
727
|
}).annotate({ identifier: "SkippedRecipient" });
|
|
728
|
+
const CampaignConversationRef = /* @__PURE__ */ Schema.Union([Schema.Union([ConversationId, Schema.Null]), Schema.Null]).annotate({ identifier: "CampaignConversationRef" });
|
|
707
729
|
const ContactEvent = /* @__PURE__ */ Schema.Struct({
|
|
708
730
|
id: Schema.String,
|
|
709
731
|
contactId: ContactId,
|
|
@@ -735,10 +757,56 @@ const EmailRecipient = /* @__PURE__ */ Schema.Union([Schema.Struct({ contactId:
|
|
|
735
757
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
736
758
|
displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
737
759
|
})]).annotate({ identifier: "EmailRecipient" });
|
|
760
|
+
const TopicContactById = /* @__PURE__ */ Schema.Struct({ contactId: ContactId }).annotate({ identifier: "TopicContactById" });
|
|
761
|
+
const CampaignAudience = /* @__PURE__ */ Schema.Struct({
|
|
762
|
+
topicId: TopicId,
|
|
763
|
+
includeTags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
764
|
+
excludeTags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
765
|
+
contactIds: Schema.optionalKey(Schema.Union([Schema.Array(ContactId).check(Schema.isMaxLength(25e3).annotate({ expected: "a value with a length of at most 25000" })), Schema.Null])),
|
|
766
|
+
groupIds: Schema.optionalKey(Schema.Union([Schema.Array(ContactGroupId).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })), Schema.Null]))
|
|
767
|
+
}).annotate({ identifier: "CampaignAudience" });
|
|
738
768
|
const JourneyGroupJoinedTrigger = /* @__PURE__ */ Schema.Struct({
|
|
739
769
|
type: Schema.Literal("contact.joined_group"),
|
|
740
770
|
groupId: ContactGroupId
|
|
741
771
|
}).annotate({ identifier: "JourneyGroupJoinedTrigger" });
|
|
772
|
+
const MessageSummary = /* @__PURE__ */ Schema.Struct({
|
|
773
|
+
id: MessageId,
|
|
774
|
+
campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
775
|
+
campaignId: CampaignId,
|
|
776
|
+
runId: CampaignRunId
|
|
777
|
+
}), Schema.Null])),
|
|
778
|
+
channel: Schema.Literal("email"),
|
|
779
|
+
direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
|
|
780
|
+
status: Schema.Union([
|
|
781
|
+
Schema.Literal("pending"),
|
|
782
|
+
Schema.Literal("scheduled"),
|
|
783
|
+
Schema.Literal("queued"),
|
|
784
|
+
Schema.Literal("processing"),
|
|
785
|
+
Schema.Literal("sent"),
|
|
786
|
+
Schema.Literal("delivered"),
|
|
787
|
+
Schema.Literal("read"),
|
|
788
|
+
Schema.Literal("failed"),
|
|
789
|
+
Schema.Literal("bounced"),
|
|
790
|
+
Schema.Literal("complained")
|
|
791
|
+
]),
|
|
792
|
+
from: Schema.Union([Schema.String, Schema.Null]),
|
|
793
|
+
to: Schema.Array(Schema.String),
|
|
794
|
+
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
795
|
+
waitReason: Schema.Union([Schema.Union([
|
|
796
|
+
Schema.Literal("rate"),
|
|
797
|
+
Schema.Literal("daily-quota"),
|
|
798
|
+
Schema.Literal("domain-health"),
|
|
799
|
+
Schema.Literal("sending-paused"),
|
|
800
|
+
Schema.Literal("upstream-unavailable"),
|
|
801
|
+
Schema.Literal("retry"),
|
|
802
|
+
Schema.Literal("campaign-paused"),
|
|
803
|
+
Schema.Literal("domain-warming"),
|
|
804
|
+
Schema.Literal("onboarding-review"),
|
|
805
|
+
Schema.Literal("content-review"),
|
|
806
|
+
Schema.Literal("screening-unavailable")
|
|
807
|
+
]), Schema.Null]),
|
|
808
|
+
createdAt: Schema.String
|
|
809
|
+
}).annotate({ identifier: "MessageSummary" });
|
|
742
810
|
const JourneySendEmailConfig = /* @__PURE__ */ Schema.Struct({
|
|
743
811
|
template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
|
|
744
812
|
senderId: Schema.optionalKey(EmailSenderId),
|
|
@@ -886,10 +954,6 @@ const ApiKeyAccess = /* @__PURE__ */ Schema.Union([Schema.Struct({ mode: Schema.
|
|
|
886
954
|
mailboxes: Schema.optionalKey(Schema.Union([ApiKeyMailboxAccess, Schema.Null])),
|
|
887
955
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only." }))
|
|
888
956
|
})]).annotate({ identifier: "ApiKeyAccess" });
|
|
889
|
-
const MessagePage = /* @__PURE__ */ Schema.Struct({
|
|
890
|
-
items: Schema.Array(MessageSummary),
|
|
891
|
-
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
892
|
-
}).annotate({ identifier: "MessagePage" });
|
|
893
957
|
const CreateBrand = /* @__PURE__ */ Schema.Struct({
|
|
894
958
|
slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
|
|
895
959
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
|
|
@@ -928,6 +992,15 @@ const EmailRecipients = /* @__PURE__ */ Schema.Array(EmailRecipient).check(Schem
|
|
|
928
992
|
}));
|
|
929
993
|
const EmailCcRecipients = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailCcRecipients" });
|
|
930
994
|
const EmailBccRecipients = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailBccRecipients" });
|
|
995
|
+
const TopicContactRef = /* @__PURE__ */ Schema.Union([
|
|
996
|
+
TopicContactById,
|
|
997
|
+
TopicContactByEmail,
|
|
998
|
+
TopicContactByPhone
|
|
999
|
+
]).annotate({ identifier: "TopicContactRef" });
|
|
1000
|
+
const MessagePage = /* @__PURE__ */ Schema.Struct({
|
|
1001
|
+
items: Schema.Array(MessageSummary),
|
|
1002
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
1003
|
+
}).annotate({ identifier: "MessagePage" });
|
|
931
1004
|
const JourneyTrigger = /* @__PURE__ */ Schema.Union([
|
|
932
1005
|
JourneyCustomEventTrigger,
|
|
933
1006
|
JourneyContactCreatedTrigger,
|
|
@@ -1025,11 +1098,10 @@ const AgentDefinition = /* @__PURE__ */ Schema.Struct({
|
|
|
1025
1098
|
integrationIds: Schema.Array(AgentIntegrationReference).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
|
|
1026
1099
|
mode: AgentMode,
|
|
1027
1100
|
model: AgentModel,
|
|
1028
|
-
approvalPolicy: AgentApprovalPolicy,
|
|
1029
1101
|
workingHours: Schema.Union([WorkingHours, Schema.Null]),
|
|
1030
1102
|
takeoverTimeoutMinutes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(10080).annotate({ expected: "a value less than or equal to 10080" }))
|
|
1031
1103
|
}).annotate({ identifier: "AgentDefinition" });
|
|
1032
|
-
const
|
|
1104
|
+
const CampaignEmailInput = /* @__PURE__ */ Schema.Struct({
|
|
1033
1105
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1034
1106
|
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1035
1107
|
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -1043,12 +1115,13 @@ const EmailContent = /* @__PURE__ */ Schema.Struct({
|
|
|
1043
1115
|
timeZone: Schema.optionalKey(RenderTimeZone),
|
|
1044
1116
|
inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null])),
|
|
1045
1117
|
replyTo: Schema.optionalKey(ReplyToAddresses),
|
|
1046
|
-
|
|
1118
|
+
topicId: Schema.optionalKey(Schema.Union([Schema.Union([TopicId, Schema.Null]), Schema.Null]).annotate({ description: "The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic." })),
|
|
1047
1119
|
tracking: Schema.optionalKey(EmailTrackingOverrideV1),
|
|
1048
1120
|
footer: Schema.optionalKey(EmailFooterOverride),
|
|
1049
|
-
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
|
|
1050
|
-
|
|
1051
|
-
|
|
1121
|
+
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null])),
|
|
1122
|
+
preheader: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
1123
|
+
}).annotate({ identifier: "CampaignEmailInput" });
|
|
1124
|
+
const EmailContent = /* @__PURE__ */ Schema.Struct({
|
|
1052
1125
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1053
1126
|
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1054
1127
|
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -1062,11 +1135,11 @@ const EmailDispatchContent = /* @__PURE__ */ Schema.Struct({
|
|
|
1062
1135
|
timeZone: Schema.optionalKey(RenderTimeZone),
|
|
1063
1136
|
inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null])),
|
|
1064
1137
|
replyTo: Schema.optionalKey(ReplyToAddresses),
|
|
1065
|
-
|
|
1138
|
+
topicId: Schema.optionalKey(Schema.Union([Schema.Union([TopicId, Schema.Null]), Schema.Null]).annotate({ description: "The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic." })),
|
|
1066
1139
|
tracking: Schema.optionalKey(EmailTrackingOverrideV1),
|
|
1067
1140
|
footer: Schema.optionalKey(EmailFooterOverride),
|
|
1068
1141
|
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
|
|
1069
|
-
}).annotate({ identifier: "
|
|
1142
|
+
}).annotate({ identifier: "EmailContent" });
|
|
1070
1143
|
const ContactIdentity = /* @__PURE__ */ Schema.Struct({
|
|
1071
1144
|
id: ContactIdentityId,
|
|
1072
1145
|
type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
|
|
@@ -1095,6 +1168,14 @@ var MailboxSendConflictError = class extends Schema.TaggedError()("MailboxSendCo
|
|
|
1095
1168
|
id: MailboxActionId,
|
|
1096
1169
|
receipt: MailboxSendReceipt
|
|
1097
1170
|
})) {};
|
|
1171
|
+
const CampaignContentInput = /* @__PURE__ */ Schema.Struct({
|
|
1172
|
+
channel: Schema.Literal("email"),
|
|
1173
|
+
email: CampaignEmailInput,
|
|
1174
|
+
from: Schema.optionalKey(CampaignFrom),
|
|
1175
|
+
replyMailboxId: Schema.optionalKey(CampaignReplyMailbox),
|
|
1176
|
+
conversationId: Schema.optionalKey(CampaignConversationRef),
|
|
1177
|
+
metadata: Schema.optionalKey(CampaignContentMetadata)
|
|
1178
|
+
}).annotate({ identifier: "CampaignContentInput" });
|
|
1098
1179
|
const JourneyCondition = /* @__PURE__ */ Schema.Struct({
|
|
1099
1180
|
match: Schema.Union([Schema.Literal("all"), Schema.Literal("any")]),
|
|
1100
1181
|
predicates: Schema.TupleWithRest(Schema.Tuple([JourneyPredicate]), [JourneyPredicate])
|
|
@@ -1138,6 +1219,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
|
|
|
1138
1219
|
});
|
|
1139
1220
|
var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
|
|
1140
1221
|
//#endregion
|
|
1141
|
-
export {
|
|
1222
|
+
export { AgentDefinition, AgentIntegrationReference, AgentMode, AgentModel, AgentName, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFrom, CampaignId, CampaignReplyMailbox, CampaignRunId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, Weekday, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
1142
1223
|
|
|
1143
1224
|
//# sourceMappingURL=shared.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, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError,
|
|
3
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, TopicId, UnauthorizedError, ValidationError } from "./shared";
|
|
4
4
|
export type SubscribeResult = {
|
|
5
5
|
readonly success: boolean;
|
|
6
6
|
readonly expiresAt: string;
|
|
@@ -11,24 +11,22 @@ export declare const SubscribeResult: Schema.Struct<{
|
|
|
11
11
|
}>;
|
|
12
12
|
export type SubscriptionsSubscribeRequestJson = {
|
|
13
13
|
readonly email: string;
|
|
14
|
-
readonly
|
|
14
|
+
readonly topicId: TopicId;
|
|
15
15
|
readonly from: {
|
|
16
16
|
readonly email: string;
|
|
17
17
|
readonly name?: string | null;
|
|
18
18
|
};
|
|
19
|
-
readonly unsubscribeGroupId?: UnsubscribeId | null;
|
|
20
19
|
readonly templateSlug?: string | null;
|
|
21
20
|
readonly consentIp?: string | null;
|
|
22
21
|
readonly consentSource?: string | null;
|
|
23
22
|
};
|
|
24
23
|
export declare const SubscriptionsSubscribeRequestJson: Schema.Struct<{
|
|
25
24
|
readonly email: Schema.String;
|
|
26
|
-
readonly
|
|
25
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
27
26
|
readonly from: Schema.Struct<{
|
|
28
27
|
readonly email: Schema.String;
|
|
29
28
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
30
29
|
}>;
|
|
31
|
-
readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
|
|
32
30
|
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
33
31
|
readonly consentIp: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
34
32
|
readonly consentSource: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -62,12 +60,11 @@ export type SubscriptionsSubscribe504 = GatewayTimeoutError;
|
|
|
62
60
|
export declare const SubscriptionsSubscribe504: typeof GatewayTimeoutError;
|
|
63
61
|
declare const SubscriptionsGroup_base: HttpApiGroup.HttpApiGroup<"Subscriptions", HttpApiEndpoint.HttpApiEndpoint<"subscriptionsSubscribe", "POST", "/v1/subscriptions", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
64
62
|
readonly email: Schema.String;
|
|
65
|
-
readonly
|
|
63
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
66
64
|
readonly from: Schema.Struct<{
|
|
67
65
|
readonly email: Schema.String;
|
|
68
66
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
69
67
|
}>;
|
|
70
|
-
readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
|
|
71
68
|
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
72
69
|
readonly consentIp: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
73
70
|
readonly consentSource: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError,
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, 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
|
//#region src/effect/generated/subscriptions.ts
|
|
@@ -8,12 +8,11 @@ const SubscribeResult = /* @__PURE__ */ Schema.Struct({
|
|
|
8
8
|
}).annotate({ identifier: "SubscribeResult" });
|
|
9
9
|
const SubscriptionsSubscribeRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
10
10
|
email: Schema.String.annotate({ description: "The recipient email address; confirmation proves consent for this address." }).check(Schema.isMaxCodePoints(320).annotate({ expected: "a string with at most 320 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })).check(Schema.isMaxLength(320).annotate({ expected: "a value with a length of at most 320" })),
|
|
11
|
-
|
|
11
|
+
topicId: TopicId,
|
|
12
12
|
from: Schema.Struct({
|
|
13
13
|
email: Schema.String,
|
|
14
14
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
15
15
|
}).annotate({ description: "Your verified email sender. The ordinary send pipeline selects its domain and customer brand." }),
|
|
16
|
-
unsubscribeGroupId: Schema.optionalKey(Schema.Union([UnsubscribeId, Schema.Null]).annotate({ description: "Clear this unsubscribe group after confirmation; all other opt-outs remain." })),
|
|
17
16
|
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "A published email template slug receiving confirmUrl. Omit it to send the default confirmation email." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
18
17
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The recipient IP recorded by your server when they requested subscription." }).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
|
|
19
18
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The signup page or source recorded by your server when consent was requested." }).check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null]))
|
|
@@ -55,7 +54,7 @@ var SubscriptionsGroup = class extends HttpApiGroup.make("Subscriptions").add(Ht
|
|
|
55
54
|
SubscriptionsSubscribe503.pipe(HttpApiSchema.status(503)),
|
|
56
55
|
SubscriptionsSubscribe504.pipe(HttpApiSchema.status(504))
|
|
57
56
|
]
|
|
58
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation
|
|
57
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the topic subscription change.")).annotate(OpenApi.Description, "Recipient-confirmed topic subscriptions") {};
|
|
59
58
|
//#endregion
|
|
60
59
|
export { SubscribeResult, SubscriptionsGroup, SubscriptionsSubscribe200, SubscriptionsSubscribe401, SubscriptionsSubscribe402, SubscriptionsSubscribe403, SubscriptionsSubscribe404, SubscriptionsSubscribe409, SubscriptionsSubscribe422, SubscriptionsSubscribe429, SubscriptionsSubscribe500, SubscriptionsSubscribe502, SubscriptionsSubscribe503, SubscriptionsSubscribe504, SubscriptionsSubscribeRequestJson };
|
|
61
60
|
|