samva 0.47.0 → 0.49.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/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +2 -1
- package/dist/agent/runtime.js +26 -5
- package/dist/agent/types.d.ts +27 -0
- package/dist/client/sdk.gen.d.ts +234 -34
- package/dist/client/sdk.gen.js +574 -60
- package/dist/client/types.gen.d.ts +1363 -164
- package/dist/effect/accounts.d.ts +6 -6
- package/dist/effect/agents.d.ts +13 -13
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/api-keys.d.ts +13 -11
- package/dist/effect/approval-requests.d.ts +4 -4
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/brands.d.ts +6 -6
- package/dist/effect/campaigns.d.ts +15 -15
- package/dist/effect/contact-groups.d.ts +10 -10
- package/dist/effect/contacts.d.ts +25 -25
- package/dist/effect/conversations.d.ts +13 -13
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/descriptors/integrations-catalog.d.ts +134 -0
- package/dist/effect/descriptors/integrations-catalog.js +122 -0
- package/dist/effect/descriptors/mailboxes.d.ts +32 -12
- package/dist/effect/descriptors/mailboxes.js +32 -12
- package/dist/effect/email.d.ts +61 -61
- package/dist/effect/events.d.ts +2 -2
- package/dist/effect/feedback.d.ts +1 -1
- package/dist/effect/generated/accounts.d.ts +1 -3
- package/dist/effect/generated/accounts.js +2 -7
- package/dist/effect/generated/api-keys.d.ts +30 -15
- package/dist/effect/generated/api-keys.js +2 -0
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/integrations-catalog.d.ts +2702 -1
- package/dist/effect/generated/integrations-catalog.js +578 -3
- package/dist/effect/generated/journeys.d.ts +105 -107
- package/dist/effect/generated/journeys.js +6 -12
- package/dist/effect/generated/mailboxes.d.ts +752 -463
- package/dist/effect/generated/mailboxes.js +163 -98
- package/dist/effect/generated/messages.d.ts +109 -4
- package/dist/effect/generated/messages.js +41 -8
- package/dist/effect/generated/shared.d.ts +255 -59
- package/dist/effect/generated/shared.js +64 -18
- package/dist/effect/generated/template-registrations.d.ts +53 -4
- package/dist/effect/generated/template-registrations.js +13 -5
- package/dist/effect/generated/templates.d.ts +77 -15
- package/dist/effect/generated/templates.js +26 -17
- package/dist/effect/generated/webhooks.d.ts +19 -19
- package/dist/effect/generated/webhooks.js +8 -8
- package/dist/effect/generated/whoami.d.ts +4 -4
- package/dist/effect/generated-metadata.d.ts +114 -18
- package/dist/effect/generated-metadata.js +362 -340
- package/dist/effect/integrations-catalog.d.ts +228 -3
- package/dist/effect/integrations-catalog.js +29 -1
- package/dist/effect/integrations.d.ts +7 -7
- package/dist/effect/internal/client.d.ts +7 -3
- package/dist/effect/internal/operation.d.ts +10 -6
- package/dist/effect/internal/operation.js +3 -3
- package/dist/effect/journeys.d.ts +14 -14
- package/dist/effect/mailboxes.d.ts +117 -91
- package/dist/effect/mailboxes.js +11 -7
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/messages.d.ts +9 -9
- package/dist/effect/namespaces.d.ts +11 -11
- package/dist/effect/newsletter-domains.d.ts +4 -4
- package/dist/effect/newsletter-issues.d.ts +11 -11
- package/dist/effect/newsletters.d.ts +5 -5
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/organizations.d.ts +12 -12
- package/dist/effect/policies.d.ts +3 -3
- package/dist/effect/retry.js +1 -1
- package/dist/effect/scheduled-messages.d.ts +5 -5
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/template-registrations.d.ts +9 -3
- package/dist/effect/template-share-links.d.ts +5 -5
- package/dist/effect/templates.d.ts +46 -37
- package/dist/effect/topic-forms.d.ts +5 -5
- package/dist/effect/topics.d.ts +9 -9
- package/dist/effect/webhooks.d.ts +15 -15
- package/dist/effect/whatsapp-flows.d.ts +10 -10
- package/dist/effect/whatsapp-setup-links.d.ts +4 -4
- package/dist/effect/whatsapp.d.ts +12 -12
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/inline-attachments.d.ts +0 -5
- package/dist/mailbox-events.d.ts +1 -5
- package/dist/mailbox-events.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +4 -4
- package/dist/promises/client.js +8 -4
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +83 -9
- package/package.json +2 -2
|
@@ -12,6 +12,11 @@ const IntegrationAccountId = /* @__PURE__ */ (() => Schema.String.check(Schema.i
|
|
|
12
12
|
expected: "a string matching the RegExp ^intgacct_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
13
13
|
identifier: "IntegrationAccountId"
|
|
14
14
|
})).pipe(Schema.brand("IntegrationAccountId")))();
|
|
15
|
+
const AccountStatus = /* @__PURE__ */ (() => Schema.Union([
|
|
16
|
+
Schema.Literal("pending"),
|
|
17
|
+
Schema.Literal("connected"),
|
|
18
|
+
Schema.Literal("needsReconnect")
|
|
19
|
+
]).annotate({ identifier: "AccountStatus" }))();
|
|
15
20
|
const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
16
21
|
expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
17
22
|
identifier: "UserId"
|
|
@@ -36,8 +41,8 @@ var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFound
|
|
|
36
41
|
id: Schema.String,
|
|
37
42
|
message: Schema.String
|
|
38
43
|
})) {};
|
|
39
|
-
const IntegrationReturnTo = /* @__PURE__ */ (() => Schema.String.annotate({ description: "A dashboard path starting with a single slash, such as /dashboard/acme/agents." }).check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/(
|
|
40
|
-
expected: "a string matching the RegExp ^\\/(
|
|
44
|
+
const IntegrationReturnTo = /* @__PURE__ */ (() => Schema.String.annotate({ description: "A dashboard path starting with a single slash, such as /dashboard/acme/agents." }).check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/(?:[\\x21-\\x2e\\x30-\\x5b\\x5d-\\x7e][\\x21-\\x7e]*)?$", "u")).annotate({
|
|
45
|
+
expected: "a string matching the RegExp ^\\/(?:[\\x21-\\x2e\\x30-\\x5b\\x5d-\\x7e][\\x21-\\x7e]*)?$",
|
|
41
46
|
identifier: "IntegrationReturnTo"
|
|
42
47
|
})).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })))();
|
|
43
48
|
const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
@@ -422,10 +427,24 @@ const IntegrationTool = /* @__PURE__ */ (() => Schema.String.check(Schema.isPatt
|
|
|
422
427
|
expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$",
|
|
423
428
|
identifier: "IntegrationTool"
|
|
424
429
|
})))();
|
|
430
|
+
const TemplateRegistrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
431
|
+
expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
432
|
+
identifier: "TemplateRegistrationId"
|
|
433
|
+
})).pipe(Schema.brand("TemplateRegistrationId")))();
|
|
434
|
+
const TemplateFamilyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tfam_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
435
|
+
expected: "a string matching the RegExp ^tfam_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
436
|
+
identifier: "TemplateFamilyId"
|
|
437
|
+
})).pipe(Schema.brand("TemplateFamilyId")))();
|
|
425
438
|
const JourneyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
426
439
|
expected: "a string matching the RegExp ^jrny_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
427
440
|
identifier: "JourneyId"
|
|
428
441
|
})).pipe(Schema.brand("JourneyId")))();
|
|
442
|
+
const JourneyStatus = /* @__PURE__ */ (() => Schema.Union([
|
|
443
|
+
Schema.Literal("draft"),
|
|
444
|
+
Schema.Literal("active"),
|
|
445
|
+
Schema.Literal("paused"),
|
|
446
|
+
Schema.Literal("archived")
|
|
447
|
+
]).annotate({ identifier: "JourneyStatus" }))();
|
|
429
448
|
const JourneyName = /* @__PURE__ */ (() => 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.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
|
|
430
449
|
expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
|
|
431
450
|
identifier: "JourneyName"
|
|
@@ -443,10 +462,6 @@ const JourneyNodeId = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLen
|
|
|
443
462
|
expected: "a value with a length of at least 1",
|
|
444
463
|
identifier: "JourneyNodeId"
|
|
445
464
|
})))();
|
|
446
|
-
const TemplateRegistrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
447
|
-
expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
448
|
-
identifier: "TemplateRegistrationId"
|
|
449
|
-
})).pipe(Schema.brand("TemplateRegistrationId")))();
|
|
450
465
|
const TemplateChannelVariantId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tvar_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
451
466
|
expected: "a string matching the RegExp ^tvar_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
452
467
|
identifier: "TemplateChannelVariantId"
|
|
@@ -505,8 +520,8 @@ const JourneyUpdateTagsConfig = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
505
520
|
add: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
|
|
506
521
|
remove: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })))
|
|
507
522
|
}).annotate({ identifier: "JourneyUpdateTagsConfig" }))();
|
|
508
|
-
const ShopifyShop = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$
|
|
509
|
-
expected: "a string matching the RegExp ^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$
|
|
523
|
+
const ShopifyShop = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$", "u")).annotate({
|
|
524
|
+
expected: "a string matching the RegExp ^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$",
|
|
510
525
|
identifier: "ShopifyShop"
|
|
511
526
|
})).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })))();
|
|
512
527
|
const MailboxChannel = /* @__PURE__ */ (() => Schema.Union([
|
|
@@ -620,7 +635,8 @@ const MailboxThreadFolder = /* @__PURE__ */ (() => Schema.Union([
|
|
|
620
635
|
Schema.Literal("pending"),
|
|
621
636
|
Schema.Literal("sent"),
|
|
622
637
|
Schema.Literal("archived"),
|
|
623
|
-
Schema.Literal("trash")
|
|
638
|
+
Schema.Literal("trash"),
|
|
639
|
+
Schema.Literal("spam")
|
|
624
640
|
]).annotate({ identifier: "MailboxThreadFolder" }))();
|
|
625
641
|
const MailboxGrantRole = /* @__PURE__ */ (() => Schema.Union([
|
|
626
642
|
Schema.Literal("admin"),
|
|
@@ -808,6 +824,14 @@ const TemplateFromDefaultInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
808
824
|
email: Schema.String,
|
|
809
825
|
name: Schema.optionalKey(Schema.Union([Schema.String.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" })), Schema.Null]))
|
|
810
826
|
}).annotate({ identifier: "TemplateFromDefaultInput" }))();
|
|
827
|
+
const WhatsAppBusinessAccountId_1 = /* @__PURE__ */ (() => Schema.String.annotate({ description: "For an immediate submission, the connected number to register on. Defaults to the number for the template's scope." }).check(Schema.isPattern(new globalThis.RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
828
|
+
expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
829
|
+
identifier: "WhatsAppBusinessAccountId_1"
|
|
830
|
+
})))();
|
|
831
|
+
const WhatsAppBusinessAccountId_2 = /* @__PURE__ */ (() => Schema.String.annotate({ description: "The connected WhatsApp number selected for this submission." }).check(Schema.isPattern(new globalThis.RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
832
|
+
expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
833
|
+
identifier: "WhatsAppBusinessAccountId_2"
|
|
834
|
+
})))();
|
|
811
835
|
var CredentialsError = class extends Schema.TaggedError()("CredentialsError", Schema.Struct({
|
|
812
836
|
message: Schema.String,
|
|
813
837
|
retryable: Schema.Boolean
|
|
@@ -965,13 +989,13 @@ const ApiKeyMailboxAccess = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
965
989
|
Schema.Literal("read"),
|
|
966
990
|
Schema.Literal("update"),
|
|
967
991
|
Schema.Literal("send"),
|
|
968
|
-
Schema.Literal("
|
|
992
|
+
Schema.Literal("spam.read")
|
|
969
993
|
])]), [Schema.Union([
|
|
970
994
|
Schema.Literal("read"),
|
|
971
995
|
Schema.Literal("update"),
|
|
972
996
|
Schema.Literal("send"),
|
|
973
|
-
Schema.Literal("
|
|
974
|
-
])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `
|
|
997
|
+
Schema.Literal("spam.read")
|
|
998
|
+
])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `spam.read` reads quarantined mail." }),
|
|
975
999
|
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." }))
|
|
976
1000
|
}).annotate({ identifier: "ApiKeyMailboxAccess" }))();
|
|
977
1001
|
const CampaignReplyMailbox = /* @__PURE__ */ (() => Schema.Union([MailboxId, Schema.Null]).annotate({
|
|
@@ -1016,9 +1040,9 @@ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1016
1040
|
Schema.Literal("mailbox.message.sent"),
|
|
1017
1041
|
Schema.Literal("mailbox.action.pending_approval"),
|
|
1018
1042
|
Schema.Literal("mailbox.action.resolved"),
|
|
1019
|
-
Schema.Literal("mailbox.message.
|
|
1020
|
-
Schema.Literal("mailbox.message.released"),
|
|
1043
|
+
Schema.Literal("mailbox.message.spam"),
|
|
1021
1044
|
Schema.Literal("mailbox.message.discarded"),
|
|
1045
|
+
Schema.Literal("mailbox.thread.deleted"),
|
|
1022
1046
|
Schema.Literal("mailbox.message.delivered"),
|
|
1023
1047
|
Schema.Literal("mailbox.message.read"),
|
|
1024
1048
|
Schema.Literal("mailbox.message.failed"),
|
|
@@ -1072,9 +1096,9 @@ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1072
1096
|
Schema.Literal("mailbox.message.sent"),
|
|
1073
1097
|
Schema.Literal("mailbox.action.pending_approval"),
|
|
1074
1098
|
Schema.Literal("mailbox.action.resolved"),
|
|
1075
|
-
Schema.Literal("mailbox.message.
|
|
1076
|
-
Schema.Literal("mailbox.message.released"),
|
|
1099
|
+
Schema.Literal("mailbox.message.spam"),
|
|
1077
1100
|
Schema.Literal("mailbox.message.discarded"),
|
|
1101
|
+
Schema.Literal("mailbox.thread.deleted"),
|
|
1078
1102
|
Schema.Literal("mailbox.message.delivered"),
|
|
1079
1103
|
Schema.Literal("mailbox.message.read"),
|
|
1080
1104
|
Schema.Literal("mailbox.message.failed"),
|
|
@@ -1252,6 +1276,18 @@ const SendFeedback = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1252
1276
|
]).annotate({ description: "`bug`: the API behaved wrongly. `confusing`: a response, error, or doc was hard to act on. `missing`: a capability or field you needed does not exist. `other`: anything else." }), Schema.Null])),
|
|
1253
1277
|
context: Schema.optionalKey(Schema.Union([FeedbackContext, Schema.Null]))
|
|
1254
1278
|
}).annotate({ identifier: "SendFeedback" }))();
|
|
1279
|
+
const RecipeSetupReferences = /* @__PURE__ */ (() => Schema.Struct({
|
|
1280
|
+
channel: Schema.Union([Schema.Literal("email"), Schema.Literal("whatsapp")]),
|
|
1281
|
+
templateFamilyId: Schema.optionalKey(TemplateFamilyId),
|
|
1282
|
+
integrationAccountId: Schema.optionalKey(IntegrationAccountId),
|
|
1283
|
+
publicationId: Schema.optionalKey(TemplatePublicationId),
|
|
1284
|
+
senderId: Schema.optionalKey(EmailSenderId),
|
|
1285
|
+
whatsappAccountId: Schema.optionalKey(WhatsAppBusinessAccountId),
|
|
1286
|
+
registrationId: Schema.optionalKey(TemplateRegistrationId),
|
|
1287
|
+
mailboxEndpointId: Schema.optionalKey(MailboxEndpointId),
|
|
1288
|
+
journeyId: Schema.optionalKey(JourneyId),
|
|
1289
|
+
eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" })))
|
|
1290
|
+
}).annotate({ identifier: "RecipeSetupReferences" }))();
|
|
1255
1291
|
const JourneyCustomEventTrigger = /* @__PURE__ */ (() => Schema.Struct({
|
|
1256
1292
|
type: Schema.Literal("event"),
|
|
1257
1293
|
eventName: JourneyCustomEventName
|
|
@@ -1259,7 +1295,8 @@ const JourneyCustomEventTrigger = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1259
1295
|
const JourneyEventName = /* @__PURE__ */ (() => Schema.Union([JourneyCustomEventName, Schema.Union([
|
|
1260
1296
|
Schema.Literal("contact.created"),
|
|
1261
1297
|
Schema.Literal("contact.tag_added"),
|
|
1262
|
-
Schema.Literal("contact.joined_group")
|
|
1298
|
+
Schema.Literal("contact.joined_group"),
|
|
1299
|
+
Schema.Literal("contact.connection_completed")
|
|
1263
1300
|
])]).annotate({ identifier: "JourneyEventName" }))();
|
|
1264
1301
|
const JourneyNextEdge = /* @__PURE__ */ (() => Schema.Struct({ nodeId: JourneyNodeId }).annotate({ identifier: "JourneyNextEdge" }))();
|
|
1265
1302
|
const JourneyWaitEventEdge = /* @__PURE__ */ (() => Schema.Struct({
|
|
@@ -1439,6 +1476,15 @@ const UpdateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schem
|
|
|
1439
1476
|
trackingDefault: Schema.optionalKey(Schema.Union([TemplateTrackingDefault, Schema.Null]).annotate({ description: "Engagement tracking for sends of this template: `opens` and `clicks`, each inherited from the domain and organization defaults when omitted. A send request's own `tracking` still wins. Null clears the template's default." })),
|
|
1440
1477
|
shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
|
|
1441
1478
|
}) }).annotate({ identifier: "UpdateTemplatePayload" }))();
|
|
1479
|
+
const TemplateRegistrationApproval = /* @__PURE__ */ (() => Schema.Struct({
|
|
1480
|
+
publicationId: TemplatePublicationId,
|
|
1481
|
+
businessAccountId: WhatsAppBusinessAccountId_2,
|
|
1482
|
+
expectedWabaId: Schema.String.annotate({ description: "The Meta business account ID shown for the selected number before approval." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).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" })),
|
|
1483
|
+
expectedWorkspaceRevision: Schema.String.annotate({ description: "The workspace revision reviewed for this submission." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).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" }))
|
|
1484
|
+
}).annotate({
|
|
1485
|
+
description: "For a reviewed submission, the exact publication, workspace revision, number and Meta business account. Omit the separate businessAccountId when supplying approval.",
|
|
1486
|
+
identifier: "TemplateRegistrationApproval"
|
|
1487
|
+
}))();
|
|
1442
1488
|
const SmsContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
1443
1489
|
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1444
1490
|
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
@@ -1985,6 +2031,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
|
|
|
1985
2031
|
in: "header"
|
|
1986
2032
|
});
|
|
1987
2033
|
var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
|
|
1988
|
-
export { AccountLinks, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, CredentialsError, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
2034
|
+
export { AccountLinks, AccountStatus, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, CredentialsError, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStatus, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RecipeSetupReferences, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFamilyId, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppBusinessAccountId_1, WhatsAppBusinessAccountId_2, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
1989
2035
|
|
|
1990
2036
|
//# 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, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError,
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId_1, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
export type WhatsAppRegistrationTarget = {
|
|
5
5
|
readonly provider: "whatsapp";
|
|
6
6
|
readonly wabaId: string;
|
|
@@ -32,10 +32,12 @@ export type TemplateRegistration = {
|
|
|
32
32
|
readonly id: TemplateRegistrationId;
|
|
33
33
|
readonly templateId: TemplateId;
|
|
34
34
|
readonly publicationId: TemplatePublicationId;
|
|
35
|
+
readonly templateChannelVariantId: TemplateChannelVariantId;
|
|
35
36
|
readonly target: TemplateRegistrationTarget;
|
|
36
37
|
readonly name: string;
|
|
37
38
|
readonly language: string;
|
|
38
39
|
readonly status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
|
|
40
|
+
readonly pendingTemplateChannelVariantId: TemplateChannelVariantId | null;
|
|
39
41
|
readonly category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
|
|
40
42
|
readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
|
|
41
43
|
readonly providerTemplateId: string | null;
|
|
@@ -49,6 +51,7 @@ export declare const TemplateRegistration: Schema.Struct<{
|
|
|
49
51
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
50
52
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
51
53
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
54
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
52
55
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
53
56
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
54
57
|
readonly wabaId: Schema.String;
|
|
@@ -60,6 +63,7 @@ export declare const TemplateRegistration: Schema.Struct<{
|
|
|
60
63
|
readonly name: Schema.String;
|
|
61
64
|
readonly language: Schema.String;
|
|
62
65
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
66
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
63
67
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
64
68
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
65
69
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -77,6 +81,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
|
|
|
77
81
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
78
82
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
79
83
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
84
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
80
85
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
81
86
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
82
87
|
readonly wabaId: Schema.String;
|
|
@@ -88,6 +93,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
|
|
|
88
93
|
readonly name: Schema.String;
|
|
89
94
|
readonly language: Schema.String;
|
|
90
95
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
96
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
91
97
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
92
98
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
93
99
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -110,6 +116,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
|
|
|
110
116
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
111
117
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
112
118
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
119
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
113
120
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
114
121
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
115
122
|
readonly wabaId: Schema.String;
|
|
@@ -121,6 +128,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
|
|
|
121
128
|
readonly name: Schema.String;
|
|
122
129
|
readonly language: Schema.String;
|
|
123
130
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
131
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
124
132
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
125
133
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
126
134
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -153,17 +161,25 @@ export declare const TemplateRegistrationsSubmitPathParams: Schema.Struct<{
|
|
|
153
161
|
}>;
|
|
154
162
|
export type TemplateRegistrationsSubmitRequestJson = {
|
|
155
163
|
readonly provider: "whatsapp";
|
|
156
|
-
readonly businessAccountId?:
|
|
164
|
+
readonly businessAccountId?: WhatsAppBusinessAccountId_1;
|
|
165
|
+
readonly approval?: TemplateRegistrationApproval;
|
|
157
166
|
};
|
|
158
167
|
export declare const TemplateRegistrationsSubmitRequestJson: Schema.Struct<{
|
|
159
168
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
160
|
-
readonly businessAccountId: Schema.optionalKey<Schema.
|
|
169
|
+
readonly businessAccountId: Schema.optionalKey<Schema.String>;
|
|
170
|
+
readonly approval: Schema.optionalKey<Schema.Struct<{
|
|
171
|
+
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
172
|
+
readonly businessAccountId: Schema.String;
|
|
173
|
+
readonly expectedWabaId: Schema.String;
|
|
174
|
+
readonly expectedWorkspaceRevision: Schema.String;
|
|
175
|
+
}>>;
|
|
161
176
|
}>;
|
|
162
177
|
export type TemplateRegistrationsSubmit201 = TemplateRegistration;
|
|
163
178
|
export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
|
|
164
179
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
165
180
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
166
181
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
182
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
167
183
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
168
184
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
169
185
|
readonly wabaId: Schema.String;
|
|
@@ -175,6 +191,7 @@ export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
|
|
|
175
191
|
readonly name: Schema.String;
|
|
176
192
|
readonly language: Schema.String;
|
|
177
193
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
194
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
178
195
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
179
196
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
180
197
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -200,6 +217,8 @@ export type TemplateRegistrationsSubmit500 = CredentialsError | InternalError;
|
|
|
200
217
|
export declare const TemplateRegistrationsSubmit500: Schema.Union<readonly [typeof CredentialsError, typeof InternalError]>;
|
|
201
218
|
export type TemplateRegistrationsSubmit502 = WhatsAppChannelError;
|
|
202
219
|
export declare const TemplateRegistrationsSubmit502: typeof WhatsAppChannelError;
|
|
220
|
+
export type TemplateRegistrationsSubmit503 = ServiceUnavailableError;
|
|
221
|
+
export declare const TemplateRegistrationsSubmit503: typeof ServiceUnavailableError;
|
|
203
222
|
export type TemplateRegistrationsSubmit504 = GatewayTimeoutError;
|
|
204
223
|
export declare const TemplateRegistrationsSubmit504: typeof GatewayTimeoutError;
|
|
205
224
|
export type TemplateRegistrationsGetPathParams = {
|
|
@@ -215,6 +234,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
|
|
|
215
234
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
216
235
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
217
236
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
237
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
218
238
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
219
239
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
220
240
|
readonly wabaId: Schema.String;
|
|
@@ -226,6 +246,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
|
|
|
226
246
|
readonly name: Schema.String;
|
|
227
247
|
readonly language: Schema.String;
|
|
228
248
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
249
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
229
250
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
230
251
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
231
252
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -256,6 +277,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
256
277
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
257
278
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
258
279
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
280
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
259
281
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
260
282
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
261
283
|
readonly wabaId: Schema.String;
|
|
@@ -267,6 +289,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
267
289
|
readonly name: Schema.String;
|
|
268
290
|
readonly language: Schema.String;
|
|
269
291
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
292
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
270
293
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
271
294
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
272
295
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -370,6 +393,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
370
393
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
371
394
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
372
395
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
396
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
373
397
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
374
398
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
375
399
|
readonly wabaId: Schema.String;
|
|
@@ -381,6 +405,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
381
405
|
readonly name: Schema.String;
|
|
382
406
|
readonly language: Schema.String;
|
|
383
407
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
408
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
384
409
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
385
410
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
386
411
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -482,11 +507,18 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
482
507
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
483
508
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
484
509
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
485
|
-
readonly businessAccountId: Schema.optionalKey<Schema.
|
|
510
|
+
readonly businessAccountId: Schema.optionalKey<Schema.String>;
|
|
511
|
+
readonly approval: Schema.optionalKey<Schema.Struct<{
|
|
512
|
+
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
513
|
+
readonly businessAccountId: Schema.String;
|
|
514
|
+
readonly expectedWabaId: Schema.String;
|
|
515
|
+
readonly expectedWorkspaceRevision: Schema.String;
|
|
516
|
+
}>>;
|
|
486
517
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
487
518
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
488
519
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
489
520
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
521
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
490
522
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
491
523
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
492
524
|
readonly wabaId: Schema.String;
|
|
@@ -498,6 +530,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
498
530
|
readonly name: Schema.String;
|
|
499
531
|
readonly language: Schema.String;
|
|
500
532
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
533
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
501
534
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
502
535
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
503
536
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -582,6 +615,22 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
582
615
|
readonly resource: Schema.String;
|
|
583
616
|
readonly id: Schema.String;
|
|
584
617
|
readonly message: Schema.String;
|
|
618
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
|
|
619
|
+
readonly _tag: "ServiceUnavailableError";
|
|
620
|
+
readonly message: string;
|
|
621
|
+
readonly retryAfterSeconds: number;
|
|
622
|
+
}, readonly [Schema.Struct<{
|
|
623
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
624
|
+
readonly message: Schema.String;
|
|
625
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
626
|
+
}>], {
|
|
627
|
+
readonly _tag: "ServiceUnavailableError";
|
|
628
|
+
readonly message: string;
|
|
629
|
+
readonly retryAfterSeconds: number;
|
|
630
|
+
}>, Schema.Struct<{
|
|
631
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
632
|
+
readonly message: Schema.String;
|
|
633
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
585
634
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
586
635
|
readonly _tag: "UnauthorizedError";
|
|
587
636
|
readonly message: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId_1, WhatsAppChannelError } 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/template-registrations.ts
|
|
@@ -16,6 +16,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
16
16
|
id: TemplateRegistrationId,
|
|
17
17
|
templateId: TemplateId,
|
|
18
18
|
publicationId: TemplatePublicationId,
|
|
19
|
+
templateChannelVariantId: TemplateChannelVariantId,
|
|
19
20
|
target: TemplateRegistrationTarget,
|
|
20
21
|
name: Schema.String,
|
|
21
22
|
language: Schema.String,
|
|
@@ -27,6 +28,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
27
28
|
Schema.Literal("paused"),
|
|
28
29
|
Schema.Literal("disabled")
|
|
29
30
|
]),
|
|
31
|
+
pendingTemplateChannelVariantId: Schema.Union([TemplateChannelVariantId, Schema.Null]).annotate({ description: "Content a submission sent to the provider whose outcome is not yet recorded, because its request failed or is still in flight; the provider may already hold it. While it is set nothing sends from this registration, even when `status` is `approved`. Submitting again settles it." }),
|
|
30
32
|
category: Schema.Union([
|
|
31
33
|
Schema.Literal("marketing"),
|
|
32
34
|
Schema.Literal("utility"),
|
|
@@ -51,7 +53,10 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
51
53
|
statusChangedAt: Schema.String,
|
|
52
54
|
createdAt: Schema.String,
|
|
53
55
|
updatedAt: Schema.String
|
|
54
|
-
}).annotate({
|
|
56
|
+
}).annotate({
|
|
57
|
+
description: "`templateChannelVariantId` identifies the exact content last submitted. A journey step or scheduled send pins it with `id` in `pinnedRegistration` and sends only while this registration holds that content approved.",
|
|
58
|
+
identifier: "TemplateRegistration"
|
|
59
|
+
}))();
|
|
55
60
|
const TemplateRegistrationList = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Array(TemplateRegistration) }).annotate({ identifier: "TemplateRegistrationList" }))();
|
|
56
61
|
const TemplateRegistrationsListPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TemplateId }))();
|
|
57
62
|
const TemplateRegistrationsList200 = TemplateRegistrationList;
|
|
@@ -65,7 +70,8 @@ const TemplateRegistrationsList504 = GatewayTimeoutError;
|
|
|
65
70
|
const TemplateRegistrationsSubmitPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TemplateId }))();
|
|
66
71
|
const TemplateRegistrationsSubmitRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
67
72
|
provider: Schema.Literal("whatsapp"),
|
|
68
|
-
businessAccountId: Schema.optionalKey(
|
|
73
|
+
businessAccountId: Schema.optionalKey(WhatsAppBusinessAccountId_1),
|
|
74
|
+
approval: Schema.optionalKey(TemplateRegistrationApproval)
|
|
69
75
|
}))();
|
|
70
76
|
const TemplateRegistrationsSubmit201 = TemplateRegistration;
|
|
71
77
|
const TemplateRegistrationsSubmit400 = MalformedRequestError;
|
|
@@ -76,6 +82,7 @@ const TemplateRegistrationsSubmit409 = ConflictError;
|
|
|
76
82
|
const TemplateRegistrationsSubmit422 = ValidationError;
|
|
77
83
|
const TemplateRegistrationsSubmit500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
|
|
78
84
|
const TemplateRegistrationsSubmit502 = WhatsAppChannelError;
|
|
85
|
+
const TemplateRegistrationsSubmit503 = ServiceUnavailableError;
|
|
79
86
|
const TemplateRegistrationsSubmit504 = GatewayTimeoutError;
|
|
80
87
|
const TemplateRegistrationsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
81
88
|
id: TemplateId,
|
|
@@ -114,9 +121,10 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
114
121
|
TemplateRegistrationsSubmit422.pipe(HttpApiSchema.status(422)),
|
|
115
122
|
TemplateRegistrationsSubmit500,
|
|
116
123
|
TemplateRegistrationsSubmit502.pipe(HttpApiSchema.status(502)),
|
|
124
|
+
TemplateRegistrationsSubmit503.pipe(HttpApiSchema.status(503)),
|
|
117
125
|
TemplateRegistrationsSubmit504.pipe(HttpApiSchema.status(504))
|
|
118
126
|
]
|
|
119
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for
|
|
127
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A first submission creates the provider template. A later one resubmits through the same registration."), HttpApiEndpoint.get("templateRegistrationsGet", "/v1/templates/:id/registrations/:registrationId", {
|
|
120
128
|
params: TemplateRegistrationsGetPathParams,
|
|
121
129
|
success: TemplateRegistrationsGet200,
|
|
122
130
|
error: [
|
|
@@ -129,6 +137,6 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
129
137
|
TemplateRegistrationsGet504.pipe(HttpApiSchema.status(504))
|
|
130
138
|
]
|
|
131
139
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it.")).annotate(OpenApi.Description, "Provider review of template content: submission, status, and category.") {};
|
|
132
|
-
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetPathParams, TemplateRegistrationsGroup, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
|
|
140
|
+
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetPathParams, TemplateRegistrationsGroup, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit503, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
|
|
133
141
|
|
|
134
142
|
//# sourceMappingURL=template-registrations.js.map
|