samva 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/README.md +9 -8
- package/dist/effect/accounts.js +9 -10
- package/dist/effect/agents.js +16 -17
- package/dist/effect/analytics.js +9 -10
- package/dist/effect/api-keys.js +11 -12
- package/dist/effect/approval-requests.js +7 -8
- package/dist/effect/attachments.js +7 -8
- package/dist/effect/brands.js +9 -10
- package/dist/effect/campaigns.js +18 -19
- package/dist/effect/contact-groups.js +13 -14
- package/dist/effect/contacts.js +29 -30
- package/dist/effect/conversations.js +16 -17
- package/dist/effect/custom-fields.js +7 -8
- package/dist/effect/descriptors/accounts.d.ts +50 -52
- package/dist/effect/descriptors/accounts.js +50 -52
- package/dist/effect/descriptors/agents.d.ts +113 -115
- package/dist/effect/descriptors/agents.js +120 -122
- package/dist/effect/descriptors/analytics.d.ts +47 -49
- package/dist/effect/descriptors/analytics.js +42 -44
- package/dist/effect/descriptors/api-keys.d.ts +69 -71
- package/dist/effect/descriptors/api-keys.js +73 -75
- package/dist/effect/descriptors/approval-requests.d.ts +34 -36
- package/dist/effect/descriptors/approval-requests.js +36 -38
- package/dist/effect/descriptors/attachments.d.ts +34 -36
- package/dist/effect/descriptors/attachments.js +36 -38
- package/dist/effect/descriptors/brands.d.ts +51 -53
- package/dist/effect/descriptors/brands.js +53 -55
- package/dist/effect/descriptors/campaigns.d.ts +130 -132
- package/dist/effect/descriptors/campaigns.js +137 -139
- package/dist/effect/descriptors/contact-groups.d.ts +86 -88
- package/dist/effect/descriptors/contact-groups.js +90 -92
- package/dist/effect/descriptors/contacts.d.ts +242 -244
- package/dist/effect/descriptors/contacts.js +227 -229
- package/dist/effect/descriptors/conversations.d.ts +114 -116
- package/dist/effect/descriptors/conversations.js +123 -125
- package/dist/effect/descriptors/custom-fields.d.ts +33 -35
- package/dist/effect/descriptors/custom-fields.js +33 -35
- package/dist/effect/descriptors/email.d.ts +623 -625
- package/dist/effect/descriptors/email.js +562 -578
- package/dist/effect/descriptors/events.d.ts +15 -17
- package/dist/effect/descriptors/events.js +14 -16
- package/dist/effect/descriptors/feedback.d.ts +7 -9
- package/dist/effect/descriptors/feedback.js +3 -3
- package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
- package/dist/effect/descriptors/integrations-catalog.js +142 -144
- package/dist/effect/descriptors/integrations.d.ts +60 -62
- package/dist/effect/descriptors/integrations.js +63 -65
- package/dist/effect/descriptors/journeys.d.ts +123 -125
- package/dist/effect/descriptors/journeys.js +133 -135
- package/dist/effect/descriptors/logs.d.ts +16 -18
- package/dist/effect/descriptors/logs.js +16 -18
- package/dist/effect/descriptors/mailboxes.d.ts +780 -782
- package/dist/effect/descriptors/mailboxes.js +795 -797
- package/dist/effect/descriptors/media.d.ts +43 -45
- package/dist/effect/descriptors/media.js +46 -48
- package/dist/effect/descriptors/messages.d.ts +86 -88
- package/dist/effect/descriptors/messages.js +83 -92
- package/dist/effect/descriptors/namespaces.d.ts +96 -98
- package/dist/effect/descriptors/namespaces.js +107 -109
- package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
- package/dist/effect/descriptors/newsletter-domains.js +39 -41
- package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
- package/dist/effect/descriptors/newsletter-issues.js +109 -111
- package/dist/effect/descriptors/newsletters.d.ts +43 -45
- package/dist/effect/descriptors/newsletters.js +46 -48
- package/dist/effect/descriptors/operations.d.ts +25 -27
- package/dist/effect/descriptors/operations.js +26 -28
- package/dist/effect/descriptors/organizations.d.ts +96 -98
- package/dist/effect/descriptors/organizations.js +86 -88
- package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
- package/dist/effect/descriptors/phone-numbers.js +40 -42
- package/dist/effect/descriptors/policies.d.ts +26 -28
- package/dist/effect/descriptors/policies.js +29 -31
- package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
- package/dist/effect/descriptors/scheduled-messages.js +43 -45
- package/dist/effect/descriptors/subscriptions.d.ts +7 -9
- package/dist/effect/descriptors/subscriptions.js +3 -3
- package/dist/effect/descriptors/template-registrations.d.ts +26 -28
- package/dist/effect/descriptors/template-registrations.js +29 -31
- package/dist/effect/descriptors/template-share-links.d.ts +44 -46
- package/dist/effect/descriptors/template-share-links.js +49 -51
- package/dist/effect/descriptors/templates.d.ts +361 -363
- package/dist/effect/descriptors/templates.js +348 -350
- package/dist/effect/descriptors/topic-forms.d.ts +44 -46
- package/dist/effect/descriptors/topic-forms.js +49 -51
- package/dist/effect/descriptors/topics.d.ts +77 -79
- package/dist/effect/descriptors/topics.js +80 -82
- package/dist/effect/descriptors/webhooks.d.ts +96 -98
- package/dist/effect/descriptors/webhooks.js +103 -105
- package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
- package/dist/effect/descriptors/whats-app-flows.js +90 -92
- package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
- package/dist/effect/descriptors/whats-app-setup-links.js +33 -35
- package/dist/effect/descriptors/whats-app.d.ts +110 -112
- package/dist/effect/descriptors/whats-app.js +111 -113
- package/dist/effect/descriptors/whoami.d.ts +7 -9
- package/dist/effect/descriptors/whoami.js +3 -3
- package/dist/effect/email.js +66 -67
- package/dist/effect/events.js +5 -6
- package/dist/effect/feedback.js +4 -4
- package/dist/effect/generated/accounts.d.ts +144 -142
- package/dist/effect/generated/accounts.js +14 -9
- package/dist/effect/generated/agents.d.ts +1502 -1493
- package/dist/effect/generated/agents.js +28 -16
- package/dist/effect/generated/analytics.d.ts +55 -53
- package/dist/effect/generated/analytics.js +14 -9
- package/dist/effect/generated/api-keys.d.ts +216 -212
- package/dist/effect/generated/api-keys.js +18 -11
- package/dist/effect/generated/approval-requests.d.ts +60 -60
- package/dist/effect/generated/approval-requests.js +10 -7
- package/dist/effect/generated/attachments.d.ts +32 -32
- package/dist/effect/generated/attachments.js +10 -7
- package/dist/effect/generated/brands.d.ts +179 -177
- package/dist/effect/generated/brands.js +14 -9
- package/dist/effect/generated/campaigns.d.ts +1083 -1072
- package/dist/effect/generated/campaigns.js +32 -18
- package/dist/effect/generated/contact-events.d.ts +3 -6
- package/dist/effect/generated/contact-events.js +4 -4
- package/dist/effect/generated/contact-groups.d.ts +186 -180
- package/dist/effect/generated/contact-groups.js +22 -13
- package/dist/effect/generated/contacts.d.ts +1565 -1545
- package/dist/effect/generated/contacts.js +50 -27
- package/dist/effect/generated/conversations.d.ts +340 -331
- package/dist/effect/generated/conversations.js +28 -16
- package/dist/effect/generated/custom-fields.d.ts +63 -63
- package/dist/effect/generated/custom-fields.js +10 -7
- package/dist/effect/generated/email.d.ts +2731 -2671
- package/dist/effect/generated/email.js +130 -67
- package/dist/effect/generated/events.d.ts +160 -162
- package/dist/effect/generated/events.js +6 -5
- package/dist/effect/generated/feedback.d.ts +3 -6
- package/dist/effect/generated/feedback.js +4 -4
- package/dist/effect/generated/index.d.ts +174 -45
- package/dist/effect/generated/integrations-catalog.d.ts +459 -446
- package/dist/effect/generated/integrations-catalog.js +36 -20
- package/dist/effect/generated/integrations.d.ts +155 -152
- package/dist/effect/generated/integrations.js +16 -10
- package/dist/effect/generated/journeys.d.ts +864 -854
- package/dist/effect/generated/journeys.js +30 -17
- package/dist/effect/generated/logs.d.ts +147 -149
- package/dist/effect/generated/logs.js +6 -5
- package/dist/effect/generated/mailboxes.d.ts +7271 -7196
- package/dist/effect/generated/mailboxes.js +160 -82
- package/dist/effect/generated/media.d.ts +77 -76
- package/dist/effect/generated/media.js +12 -8
- package/dist/effect/generated/messages.d.ts +1092 -1086
- package/dist/effect/generated/messages.js +22 -13
- package/dist/effect/generated/namespaces.d.ts +184 -177
- package/dist/effect/generated/namespaces.js +24 -14
- package/dist/effect/generated/newsletter-domains.d.ts +57 -57
- package/dist/effect/generated/newsletter-domains.js +10 -7
- package/dist/effect/generated/newsletter-issues.d.ts +225 -218
- package/dist/effect/generated/newsletter-issues.js +24 -14
- package/dist/effect/generated/newsletters.d.ts +46 -45
- package/dist/effect/generated/newsletters.js +12 -8
- package/dist/effect/generated/operations.d.ts +79 -80
- package/dist/effect/generated/operations.js +8 -6
- package/dist/effect/generated/organizations.d.ts +438 -430
- package/dist/effect/generated/organizations.js +26 -15
- package/dist/effect/generated/phone-numbers.d.ts +87 -86
- package/dist/effect/generated/phone-numbers.js +12 -8
- package/dist/effect/generated/policies.d.ts +64 -65
- package/dist/effect/generated/policies.js +8 -6
- package/dist/effect/generated/scheduled-messages.d.ts +66 -65
- package/dist/effect/generated/scheduled-messages.js +12 -8
- package/dist/effect/generated/shared.d.ts +33 -33
- package/dist/effect/generated/shared.js +61 -61
- package/dist/effect/generated/subscriptions.d.ts +3 -6
- package/dist/effect/generated/subscriptions.js +4 -4
- package/dist/effect/generated/template-registrations.d.ts +135 -136
- package/dist/effect/generated/template-registrations.js +8 -6
- package/dist/effect/generated/template-share-links.d.ts +25 -24
- package/dist/effect/generated/template-share-links.js +12 -8
- package/dist/effect/generated/templates.d.ts +2678 -2645
- package/dist/effect/generated/templates.js +76 -40
- package/dist/effect/generated/topic-forms.d.ts +47 -46
- package/dist/effect/generated/topic-forms.js +12 -8
- package/dist/effect/generated/topics.d.ts +204 -199
- package/dist/effect/generated/topics.js +20 -12
- package/dist/effect/generated/webhooks.d.ts +268 -261
- package/dist/effect/generated/webhooks.js +24 -14
- package/dist/effect/generated/whats-app-flows.d.ts +250 -244
- package/dist/effect/generated/whats-app-flows.js +22 -13
- package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
- package/dist/effect/generated/whats-app-setup-links.js +10 -7
- package/dist/effect/generated/whats-app.d.ts +439 -430
- package/dist/effect/generated/whats-app.js +28 -16
- package/dist/effect/generated/whoami.d.ts +3 -6
- package/dist/effect/generated/whoami.js +4 -4
- package/dist/effect/integrations-catalog.js +20 -21
- package/dist/effect/integrations.js +10 -11
- package/dist/effect/internal/client.d.ts +2 -1
- package/dist/effect/internal/client.js +3 -3
- package/dist/effect/internal/email-sender.js +5 -4
- package/dist/effect/internal/operation.d.ts +11 -7
- package/dist/effect/internal/operation.js +17 -12
- package/dist/effect/internal/send.js +11 -8
- package/dist/effect/journeys.js +17 -18
- package/dist/effect/logs.js +5 -6
- package/dist/effect/mailboxes.js +82 -83
- package/dist/effect/media.js +8 -9
- package/dist/effect/messages.js +12 -13
- package/dist/effect/namespaces.js +14 -15
- package/dist/effect/newsletter-domains.js +7 -8
- package/dist/effect/newsletter-issues.js +14 -15
- package/dist/effect/newsletters.js +8 -9
- package/dist/effect/operations.js +6 -7
- package/dist/effect/organizations.js +15 -16
- package/dist/effect/phone-numbers.js +8 -9
- package/dist/effect/policies.js +6 -7
- package/dist/effect/runtime.js +3 -3
- package/dist/effect/scheduled-messages.js +8 -9
- package/dist/effect/subscriptions.js +4 -4
- package/dist/effect/template-registrations.js +6 -7
- package/dist/effect/template-share-links.js +8 -9
- package/dist/effect/templates.js +40 -41
- package/dist/effect/topic-forms.js +8 -9
- package/dist/effect/topics.js +12 -13
- package/dist/effect/webhooks.js +14 -15
- package/dist/effect/whatsapp-flows.js +13 -14
- package/dist/effect/whatsapp-setup-links.js +7 -8
- package/dist/effect/whatsapp.js +16 -17
- package/dist/effect/whoami.js +4 -4
- package/dist/package.json.js +1 -1
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
|
-
import { HttpApiEndpoint
|
|
2
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignFooterRequiredError, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, ConflictError, ContactId, ContactReferenceSummary, DeliveryUnavailableError, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MalformedRequestError, MessageId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ResourceNotFoundError, SenderNotReadyError, SendsSeries, ServiceUnavailableError, SmsContent, StoredEmailAttachments, StoredReplyToAddresses, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TemplateSourceError, TopicId, UnauthorizedError, ValidationError, WhatsAppTemplateDispatch, __SamvaRuntimeAbsoluteInstant } from "./shared.js";
|
|
5
5
|
export type CampaignFrom = {
|
|
@@ -3038,244 +3038,16 @@ export type CampaignsSendTest503 = ServiceUnavailableError | SenderNotReadyError
|
|
|
3038
3038
|
export declare const CampaignsSendTest503: Schema.Union<readonly [typeof ServiceUnavailableError, typeof SenderNotReadyError, typeof DeliveryUnavailableError]>;
|
|
3039
3039
|
export type CampaignsSendTest504 = GatewayTimeoutError;
|
|
3040
3040
|
export declare const CampaignsSendTest504: typeof GatewayTimeoutError;
|
|
3041
|
-
declare const
|
|
3042
|
-
readonly
|
|
3043
|
-
|
|
3044
|
-
readonly
|
|
3045
|
-
|
|
3046
|
-
readonly
|
|
3047
|
-
|
|
3048
|
-
readonly
|
|
3049
|
-
readonly
|
|
3050
|
-
|
|
3051
|
-
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3052
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3053
|
-
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
3054
|
-
readonly filename: Schema.String;
|
|
3055
|
-
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3056
|
-
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
3057
|
-
readonly contentType: Schema.String;
|
|
3058
|
-
readonly size: Schema.Finite;
|
|
3059
|
-
}>>, Schema.Null]>>;
|
|
3060
|
-
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
3061
|
-
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
3062
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3063
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3064
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3065
|
-
readonly locale: Schema.optionalKey<Schema.String>;
|
|
3066
|
-
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
3067
|
-
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
3068
|
-
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3069
|
-
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
3070
|
-
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
3071
|
-
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
3072
|
-
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
3073
|
-
}>>;
|
|
3074
|
-
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
3075
|
-
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
3076
|
-
}>>;
|
|
3077
|
-
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
3078
|
-
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3079
|
-
}>;
|
|
3080
|
-
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3081
|
-
readonly path: Schema.String;
|
|
3082
|
-
readonly commit: Schema.String;
|
|
3083
|
-
}>, Schema.Null]>>;
|
|
3084
|
-
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3085
|
-
readonly email: Schema.String;
|
|
3086
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3087
|
-
}>, Schema.Null]>>;
|
|
3088
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
3089
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3090
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3091
|
-
}>, Schema.Struct<{
|
|
3092
|
-
readonly channel: Schema.Literal<"sms">;
|
|
3093
|
-
readonly sms: Schema.Struct<{
|
|
3094
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3095
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3096
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3097
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3098
|
-
}>;
|
|
3099
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3100
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3101
|
-
}>, Schema.Struct<{
|
|
3102
|
-
readonly channel: Schema.Literal<"whatsapp">;
|
|
3103
|
-
readonly whatsapp: Schema.Struct<{
|
|
3104
|
-
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
3105
|
-
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
3106
|
-
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
3107
|
-
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
3108
|
-
}>, Schema.Struct<{
|
|
3109
|
-
readonly customField: Schema.String;
|
|
3110
|
-
}>]>>>;
|
|
3111
|
-
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
3112
|
-
}>;
|
|
3113
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3114
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3115
|
-
}>]>;
|
|
3116
|
-
readonly audience: Schema.Struct<{
|
|
3117
|
-
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
3118
|
-
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3119
|
-
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3120
|
-
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
3121
|
-
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
3122
|
-
}>;
|
|
3123
|
-
readonly policy: Schema.Struct<{
|
|
3124
|
-
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
3125
|
-
}>;
|
|
3126
|
-
readonly definition: Schema.Struct<{
|
|
3127
|
-
readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
|
|
3128
|
-
readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3129
|
-
}>;
|
|
3130
|
-
readonly latestRun: Schema.Union<readonly [Schema.Struct<{
|
|
3131
|
-
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
3132
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
3133
|
-
readonly scheduledFor: Schema.String;
|
|
3134
|
-
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3135
|
-
readonly totalRecipients: Schema.Finite;
|
|
3136
|
-
readonly dispatchedCount: Schema.Finite;
|
|
3137
|
-
readonly failedCount: Schema.Finite;
|
|
3138
|
-
readonly skippedCount: Schema.Finite;
|
|
3139
|
-
readonly pendingCount: Schema.Finite;
|
|
3140
|
-
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3141
|
-
}>, Schema.Null]>;
|
|
3142
|
-
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3143
|
-
readonly createdAt: Schema.String;
|
|
3144
|
-
readonly updatedAt: Schema.String;
|
|
3145
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
3146
|
-
readonly _tag: "ConflictError";
|
|
3147
|
-
readonly message: string;
|
|
3148
|
-
readonly resource: string;
|
|
3149
|
-
readonly id?: string | null;
|
|
3150
|
-
}, readonly [Schema.Struct<{
|
|
3151
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
3152
|
-
readonly message: Schema.String;
|
|
3153
|
-
readonly resource: Schema.String;
|
|
3154
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3155
|
-
}>], {
|
|
3156
|
-
readonly _tag: "ConflictError";
|
|
3157
|
-
readonly message: string;
|
|
3158
|
-
readonly resource: string;
|
|
3159
|
-
readonly id?: string | null;
|
|
3160
|
-
}>, Schema.Struct<{
|
|
3161
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
3162
|
-
readonly message: Schema.String;
|
|
3163
|
-
readonly resource: Schema.String;
|
|
3164
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3165
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3166
|
-
readonly _tag: "ForbiddenError";
|
|
3167
|
-
readonly message: string;
|
|
3168
|
-
}, readonly [Schema.Struct<{
|
|
3169
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
3170
|
-
readonly message: Schema.String;
|
|
3171
|
-
}>], {
|
|
3172
|
-
readonly _tag: "ForbiddenError";
|
|
3173
|
-
readonly message: string;
|
|
3174
|
-
}>, Schema.Struct<{
|
|
3175
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
3176
|
-
readonly message: Schema.String;
|
|
3177
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
3178
|
-
readonly _tag: "GatewayTimeoutError";
|
|
3179
|
-
readonly message: string;
|
|
3180
|
-
readonly retryAfterSeconds: number;
|
|
3181
|
-
}, readonly [Schema.Struct<{
|
|
3182
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
3183
|
-
readonly message: Schema.String;
|
|
3184
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
3185
|
-
}>], {
|
|
3186
|
-
readonly _tag: "GatewayTimeoutError";
|
|
3187
|
-
readonly message: string;
|
|
3188
|
-
readonly retryAfterSeconds: number;
|
|
3189
|
-
}>, Schema.Struct<{
|
|
3190
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
3191
|
-
readonly message: Schema.String;
|
|
3192
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
3193
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
3194
|
-
readonly _tag: "MalformedRequestError";
|
|
3195
|
-
readonly message: string;
|
|
3196
|
-
readonly fields: {
|
|
3197
|
-
readonly [x: string]: readonly string[];
|
|
3198
|
-
};
|
|
3199
|
-
}, readonly [Schema.Struct<{
|
|
3200
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
3201
|
-
readonly message: Schema.String;
|
|
3202
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
3203
|
-
}>], {
|
|
3204
|
-
readonly _tag: "MalformedRequestError";
|
|
3205
|
-
readonly message: string;
|
|
3206
|
-
readonly fields: {
|
|
3207
|
-
readonly [x: string]: readonly string[];
|
|
3208
|
-
};
|
|
3209
|
-
}>, Schema.Struct<{
|
|
3210
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
3211
|
-
readonly message: Schema.String;
|
|
3212
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
3213
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
3214
|
-
readonly _tag: "ResourceNotFoundError";
|
|
3215
|
-
readonly resource: string;
|
|
3216
|
-
readonly id: string;
|
|
3217
|
-
readonly message: string;
|
|
3218
|
-
}, readonly [Schema.Struct<{
|
|
3219
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3220
|
-
readonly resource: Schema.String;
|
|
3221
|
-
readonly id: Schema.String;
|
|
3222
|
-
readonly message: Schema.String;
|
|
3223
|
-
}>], {
|
|
3224
|
-
readonly _tag: "ResourceNotFoundError";
|
|
3225
|
-
readonly resource: string;
|
|
3226
|
-
readonly id: string;
|
|
3227
|
-
readonly message: string;
|
|
3228
|
-
}>, Schema.Struct<{
|
|
3229
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3230
|
-
readonly resource: Schema.String;
|
|
3231
|
-
readonly id: Schema.String;
|
|
3232
|
-
readonly message: Schema.String;
|
|
3233
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
3234
|
-
readonly _tag: "UnauthorizedError";
|
|
3235
|
-
readonly message: string;
|
|
3236
|
-
}, readonly [Schema.Struct<{
|
|
3237
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
3238
|
-
readonly message: Schema.String;
|
|
3239
|
-
}>], {
|
|
3240
|
-
readonly _tag: "UnauthorizedError";
|
|
3241
|
-
readonly message: string;
|
|
3242
|
-
}>, Schema.Struct<{
|
|
3243
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
3244
|
-
readonly message: Schema.String;
|
|
3245
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
3246
|
-
readonly _tag: "ValidationError";
|
|
3247
|
-
readonly message: string;
|
|
3248
|
-
readonly fields?: {
|
|
3249
|
-
readonly [x: string]: readonly string[];
|
|
3250
|
-
} | null;
|
|
3251
|
-
}, readonly [Schema.Struct<{
|
|
3252
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
3253
|
-
readonly message: Schema.String;
|
|
3254
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3255
|
-
}>], {
|
|
3256
|
-
readonly _tag: "ValidationError";
|
|
3257
|
-
readonly message: string;
|
|
3258
|
-
readonly fields?: {
|
|
3259
|
-
readonly [x: string]: readonly string[];
|
|
3260
|
-
} | null;
|
|
3261
|
-
}>, Schema.Struct<{
|
|
3262
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
3263
|
-
readonly message: Schema.String;
|
|
3264
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3265
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsCancelRun", "POST", "/v1/campaigns/:id/runs/:runId/cancel", Schema.toCodecStringTree<Schema.Struct<{
|
|
3266
|
-
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
3267
|
-
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
3268
|
-
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3269
|
-
readonly success: Schema.Boolean;
|
|
3270
|
-
readonly item: Schema.Struct<{
|
|
3271
|
-
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
3272
|
-
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
3273
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
3274
|
-
readonly scheduledFor: Schema.String;
|
|
3275
|
-
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3276
|
-
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3277
|
-
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3278
|
-
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
3041
|
+
export declare const CampaignsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsList", "GET", "/v1/campaigns", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
3042
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"archived">]>>;
|
|
3043
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
3044
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
3045
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3046
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
3047
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
3048
|
+
readonly name: Schema.String;
|
|
3049
|
+
readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
|
|
3050
|
+
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
3279
3051
|
readonly channel: Schema.Literal<"email">;
|
|
3280
3052
|
readonly email: Schema.Struct<{
|
|
3281
3053
|
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -3344,69 +3116,39 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3344
3116
|
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3345
3117
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3346
3118
|
}>]>;
|
|
3347
|
-
readonly
|
|
3119
|
+
readonly audience: Schema.Struct<{
|
|
3348
3120
|
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
3349
3121
|
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3350
3122
|
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3351
3123
|
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
3352
3124
|
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
3353
3125
|
}>;
|
|
3354
|
-
readonly
|
|
3126
|
+
readonly policy: Schema.Struct<{
|
|
3355
3127
|
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
3356
3128
|
}>;
|
|
3357
|
-
readonly
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
readonly
|
|
3362
|
-
|
|
3363
|
-
readonly
|
|
3364
|
-
readonly
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3374
|
-
readonly createdAt: Schema.String;
|
|
3375
|
-
readonly updatedAt: Schema.String;
|
|
3376
|
-
|
|
3377
|
-
}
|
|
3378
|
-
readonly
|
|
3379
|
-
|
|
3380
|
-
readonly resource: string;
|
|
3381
|
-
readonly id?: string | null;
|
|
3382
|
-
}, readonly [Schema.Struct<{
|
|
3383
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
3384
|
-
readonly message: Schema.String;
|
|
3385
|
-
readonly resource: Schema.String;
|
|
3386
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3387
|
-
}>], {
|
|
3388
|
-
readonly _tag: "ConflictError";
|
|
3389
|
-
readonly message: string;
|
|
3390
|
-
readonly resource: string;
|
|
3391
|
-
readonly id?: string | null;
|
|
3392
|
-
}>, Schema.Struct<{
|
|
3393
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
3394
|
-
readonly message: Schema.String;
|
|
3395
|
-
readonly resource: Schema.String;
|
|
3396
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3397
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ExternalServiceError, {
|
|
3398
|
-
readonly _tag: "ExternalServiceError";
|
|
3399
|
-
readonly message: string;
|
|
3400
|
-
}, readonly [Schema.Struct<{
|
|
3401
|
-
readonly _tag: Schema.tag<"ExternalServiceError">;
|
|
3402
|
-
readonly message: Schema.String;
|
|
3403
|
-
}>], {
|
|
3404
|
-
readonly _tag: "ExternalServiceError";
|
|
3405
|
-
readonly message: string;
|
|
3406
|
-
}>, Schema.Struct<{
|
|
3407
|
-
readonly _tag: Schema.tag<"ExternalServiceError">;
|
|
3408
|
-
readonly message: Schema.String;
|
|
3409
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3129
|
+
readonly definition: Schema.Struct<{
|
|
3130
|
+
readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
|
|
3131
|
+
readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3132
|
+
}>;
|
|
3133
|
+
readonly latestRun: Schema.Union<readonly [Schema.Struct<{
|
|
3134
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
3135
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
3136
|
+
readonly scheduledFor: Schema.String;
|
|
3137
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3138
|
+
readonly totalRecipients: Schema.Finite;
|
|
3139
|
+
readonly dispatchedCount: Schema.Finite;
|
|
3140
|
+
readonly failedCount: Schema.Finite;
|
|
3141
|
+
readonly skippedCount: Schema.Finite;
|
|
3142
|
+
readonly pendingCount: Schema.Finite;
|
|
3143
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3144
|
+
}>, Schema.Null]>;
|
|
3145
|
+
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3146
|
+
readonly createdAt: Schema.String;
|
|
3147
|
+
readonly updatedAt: Schema.String;
|
|
3148
|
+
readonly series: Schema.$Array<Schema.Finite>;
|
|
3149
|
+
}>>;
|
|
3150
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3151
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3410
3152
|
readonly _tag: "ForbiddenError";
|
|
3411
3153
|
readonly message: string;
|
|
3412
3154
|
}, readonly [Schema.Struct<{
|
|
@@ -3454,26 +3196,6 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3454
3196
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
3455
3197
|
readonly message: Schema.String;
|
|
3456
3198
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
3457
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
3458
|
-
readonly _tag: "ResourceNotFoundError";
|
|
3459
|
-
readonly resource: string;
|
|
3460
|
-
readonly id: string;
|
|
3461
|
-
readonly message: string;
|
|
3462
|
-
}, readonly [Schema.Struct<{
|
|
3463
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3464
|
-
readonly resource: Schema.String;
|
|
3465
|
-
readonly id: Schema.String;
|
|
3466
|
-
readonly message: Schema.String;
|
|
3467
|
-
}>], {
|
|
3468
|
-
readonly _tag: "ResourceNotFoundError";
|
|
3469
|
-
readonly resource: string;
|
|
3470
|
-
readonly id: string;
|
|
3471
|
-
readonly message: string;
|
|
3472
|
-
}>, Schema.Struct<{
|
|
3473
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3474
|
-
readonly resource: Schema.String;
|
|
3475
|
-
readonly id: Schema.String;
|
|
3476
|
-
readonly message: Schema.String;
|
|
3477
3199
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
3478
3200
|
readonly _tag: "UnauthorizedError";
|
|
3479
3201
|
readonly message: string;
|
|
@@ -3506,7 +3228,8 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3506
3228
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
3507
3229
|
readonly message: Schema.String;
|
|
3508
3230
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3509
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
3231
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
3232
|
+
export declare const CampaignsCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsCreate", "POST", "/v1/campaigns", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3510
3233
|
readonly name: Schema.String;
|
|
3511
3234
|
readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
|
|
3512
3235
|
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -3814,7 +3537,8 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3814
3537
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
3815
3538
|
readonly message: Schema.String;
|
|
3816
3539
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3817
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
3540
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
3541
|
+
export declare const CampaignsGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsGet", "GET", "/v1/campaigns/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
3818
3542
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
3819
3543
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3820
3544
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
@@ -3918,18 +3642,312 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3918
3642
|
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3919
3643
|
readonly createdAt: Schema.String;
|
|
3920
3644
|
readonly updatedAt: Schema.String;
|
|
3921
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3922
|
-
readonly _tag: "ForbiddenError";
|
|
3645
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3646
|
+
readonly _tag: "ForbiddenError";
|
|
3647
|
+
readonly message: string;
|
|
3648
|
+
}, readonly [Schema.Struct<{
|
|
3649
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
3650
|
+
readonly message: Schema.String;
|
|
3651
|
+
}>], {
|
|
3652
|
+
readonly _tag: "ForbiddenError";
|
|
3653
|
+
readonly message: string;
|
|
3654
|
+
}>, Schema.Struct<{
|
|
3655
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
3656
|
+
readonly message: Schema.String;
|
|
3657
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
3658
|
+
readonly _tag: "GatewayTimeoutError";
|
|
3659
|
+
readonly message: string;
|
|
3660
|
+
readonly retryAfterSeconds: number;
|
|
3661
|
+
}, readonly [Schema.Struct<{
|
|
3662
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
3663
|
+
readonly message: Schema.String;
|
|
3664
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
3665
|
+
}>], {
|
|
3666
|
+
readonly _tag: "GatewayTimeoutError";
|
|
3667
|
+
readonly message: string;
|
|
3668
|
+
readonly retryAfterSeconds: number;
|
|
3669
|
+
}>, Schema.Struct<{
|
|
3670
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
3671
|
+
readonly message: Schema.String;
|
|
3672
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
3673
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
3674
|
+
readonly _tag: "MalformedRequestError";
|
|
3675
|
+
readonly message: string;
|
|
3676
|
+
readonly fields: {
|
|
3677
|
+
readonly [x: string]: readonly string[];
|
|
3678
|
+
};
|
|
3679
|
+
}, readonly [Schema.Struct<{
|
|
3680
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
3681
|
+
readonly message: Schema.String;
|
|
3682
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
3683
|
+
}>], {
|
|
3684
|
+
readonly _tag: "MalformedRequestError";
|
|
3685
|
+
readonly message: string;
|
|
3686
|
+
readonly fields: {
|
|
3687
|
+
readonly [x: string]: readonly string[];
|
|
3688
|
+
};
|
|
3689
|
+
}>, Schema.Struct<{
|
|
3690
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
3691
|
+
readonly message: Schema.String;
|
|
3692
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
3693
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
3694
|
+
readonly _tag: "ResourceNotFoundError";
|
|
3695
|
+
readonly resource: string;
|
|
3696
|
+
readonly id: string;
|
|
3697
|
+
readonly message: string;
|
|
3698
|
+
}, readonly [Schema.Struct<{
|
|
3699
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3700
|
+
readonly resource: Schema.String;
|
|
3701
|
+
readonly id: Schema.String;
|
|
3702
|
+
readonly message: Schema.String;
|
|
3703
|
+
}>], {
|
|
3704
|
+
readonly _tag: "ResourceNotFoundError";
|
|
3705
|
+
readonly resource: string;
|
|
3706
|
+
readonly id: string;
|
|
3707
|
+
readonly message: string;
|
|
3708
|
+
}>, Schema.Struct<{
|
|
3709
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
3710
|
+
readonly resource: Schema.String;
|
|
3711
|
+
readonly id: Schema.String;
|
|
3712
|
+
readonly message: Schema.String;
|
|
3713
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
3714
|
+
readonly _tag: "UnauthorizedError";
|
|
3715
|
+
readonly message: string;
|
|
3716
|
+
}, readonly [Schema.Struct<{
|
|
3717
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
3718
|
+
readonly message: Schema.String;
|
|
3719
|
+
}>], {
|
|
3720
|
+
readonly _tag: "UnauthorizedError";
|
|
3721
|
+
readonly message: string;
|
|
3722
|
+
}>, Schema.Struct<{
|
|
3723
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
3724
|
+
readonly message: Schema.String;
|
|
3725
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
3726
|
+
readonly _tag: "ValidationError";
|
|
3727
|
+
readonly message: string;
|
|
3728
|
+
readonly fields?: {
|
|
3729
|
+
readonly [x: string]: readonly string[];
|
|
3730
|
+
} | null;
|
|
3731
|
+
}, readonly [Schema.Struct<{
|
|
3732
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
3733
|
+
readonly message: Schema.String;
|
|
3734
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3735
|
+
}>], {
|
|
3736
|
+
readonly _tag: "ValidationError";
|
|
3737
|
+
readonly message: string;
|
|
3738
|
+
readonly fields?: {
|
|
3739
|
+
readonly [x: string]: readonly string[];
|
|
3740
|
+
} | null;
|
|
3741
|
+
}>, Schema.Struct<{
|
|
3742
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
3743
|
+
readonly message: Schema.String;
|
|
3744
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
3745
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
3746
|
+
export declare const CampaignsUpdateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsUpdate", "PATCH", "/v1/campaigns/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
3747
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
3748
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3749
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3750
|
+
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
3751
|
+
readonly channel: Schema.Literal<"email">;
|
|
3752
|
+
readonly email: Schema.Struct<{
|
|
3753
|
+
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3754
|
+
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3755
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3756
|
+
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
3757
|
+
readonly filename: Schema.String;
|
|
3758
|
+
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3759
|
+
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
3760
|
+
readonly contentType: Schema.String;
|
|
3761
|
+
readonly size: Schema.Finite;
|
|
3762
|
+
}>>, Schema.Null]>>;
|
|
3763
|
+
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
3764
|
+
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
3765
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3766
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3767
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3768
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
3769
|
+
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
3770
|
+
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
3771
|
+
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3772
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
3773
|
+
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
3774
|
+
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
3775
|
+
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
3776
|
+
}>>;
|
|
3777
|
+
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
3778
|
+
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
3779
|
+
}>>;
|
|
3780
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
3781
|
+
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3782
|
+
}>;
|
|
3783
|
+
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3784
|
+
readonly path: Schema.String;
|
|
3785
|
+
readonly commit: Schema.String;
|
|
3786
|
+
}>, Schema.Null]>>;
|
|
3787
|
+
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3788
|
+
readonly email: Schema.String;
|
|
3789
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3790
|
+
}>, Schema.Null]>>;
|
|
3791
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
3792
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3793
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3794
|
+
}>, Schema.Struct<{
|
|
3795
|
+
readonly channel: Schema.Literal<"sms">;
|
|
3796
|
+
readonly sms: Schema.Struct<{
|
|
3797
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3798
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3799
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3800
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3801
|
+
}>;
|
|
3802
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3803
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3804
|
+
}>, Schema.Struct<{
|
|
3805
|
+
readonly channel: Schema.Literal<"whatsapp">;
|
|
3806
|
+
readonly whatsapp: Schema.Struct<{
|
|
3807
|
+
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
3808
|
+
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
3809
|
+
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
3810
|
+
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
3811
|
+
}>, Schema.Struct<{
|
|
3812
|
+
readonly customField: Schema.String;
|
|
3813
|
+
}>]>>>;
|
|
3814
|
+
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
3815
|
+
}>;
|
|
3816
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3817
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3818
|
+
}>]>, Schema.Null]>>;
|
|
3819
|
+
readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3820
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
3821
|
+
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3822
|
+
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3823
|
+
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
3824
|
+
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
3825
|
+
}>, Schema.Null]>>;
|
|
3826
|
+
readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3827
|
+
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
3828
|
+
}>, Schema.Null]>>;
|
|
3829
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3830
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
3831
|
+
readonly name: Schema.String;
|
|
3832
|
+
readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
|
|
3833
|
+
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
3834
|
+
readonly channel: Schema.Literal<"email">;
|
|
3835
|
+
readonly email: Schema.Struct<{
|
|
3836
|
+
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3837
|
+
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3838
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3839
|
+
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
3840
|
+
readonly filename: Schema.String;
|
|
3841
|
+
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3842
|
+
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
3843
|
+
readonly contentType: Schema.String;
|
|
3844
|
+
readonly size: Schema.Finite;
|
|
3845
|
+
}>>, Schema.Null]>>;
|
|
3846
|
+
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
3847
|
+
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
3848
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3849
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3850
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3851
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
3852
|
+
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
3853
|
+
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
3854
|
+
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3855
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
3856
|
+
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
3857
|
+
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
3858
|
+
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
3859
|
+
}>>;
|
|
3860
|
+
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
3861
|
+
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
3862
|
+
}>>;
|
|
3863
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
3864
|
+
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3865
|
+
}>;
|
|
3866
|
+
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3867
|
+
readonly path: Schema.String;
|
|
3868
|
+
readonly commit: Schema.String;
|
|
3869
|
+
}>, Schema.Null]>>;
|
|
3870
|
+
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
3871
|
+
readonly email: Schema.String;
|
|
3872
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3873
|
+
}>, Schema.Null]>>;
|
|
3874
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
3875
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3876
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3877
|
+
}>, Schema.Struct<{
|
|
3878
|
+
readonly channel: Schema.Literal<"sms">;
|
|
3879
|
+
readonly sms: Schema.Struct<{
|
|
3880
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3881
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
3882
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3883
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3884
|
+
}>;
|
|
3885
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3886
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3887
|
+
}>, Schema.Struct<{
|
|
3888
|
+
readonly channel: Schema.Literal<"whatsapp">;
|
|
3889
|
+
readonly whatsapp: Schema.Struct<{
|
|
3890
|
+
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
3891
|
+
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
3892
|
+
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
3893
|
+
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
3894
|
+
}>, Schema.Struct<{
|
|
3895
|
+
readonly customField: Schema.String;
|
|
3896
|
+
}>]>>>;
|
|
3897
|
+
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
3898
|
+
}>;
|
|
3899
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
3900
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
3901
|
+
}>]>;
|
|
3902
|
+
readonly audience: Schema.Struct<{
|
|
3903
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
3904
|
+
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3905
|
+
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
3906
|
+
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
3907
|
+
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
3908
|
+
}>;
|
|
3909
|
+
readonly policy: Schema.Struct<{
|
|
3910
|
+
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
3911
|
+
}>;
|
|
3912
|
+
readonly definition: Schema.Struct<{
|
|
3913
|
+
readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
|
|
3914
|
+
readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3915
|
+
}>;
|
|
3916
|
+
readonly latestRun: Schema.Union<readonly [Schema.Struct<{
|
|
3917
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
3918
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
3919
|
+
readonly scheduledFor: Schema.String;
|
|
3920
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3921
|
+
readonly totalRecipients: Schema.Finite;
|
|
3922
|
+
readonly dispatchedCount: Schema.Finite;
|
|
3923
|
+
readonly failedCount: Schema.Finite;
|
|
3924
|
+
readonly skippedCount: Schema.Finite;
|
|
3925
|
+
readonly pendingCount: Schema.Finite;
|
|
3926
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3927
|
+
}>, Schema.Null]>;
|
|
3928
|
+
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3929
|
+
readonly createdAt: Schema.String;
|
|
3930
|
+
readonly updatedAt: Schema.String;
|
|
3931
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
3932
|
+
readonly _tag: "ConflictError";
|
|
3923
3933
|
readonly message: string;
|
|
3934
|
+
readonly resource: string;
|
|
3935
|
+
readonly id?: string | null;
|
|
3924
3936
|
}, readonly [Schema.Struct<{
|
|
3925
|
-
readonly _tag: Schema.tag<"
|
|
3937
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
3926
3938
|
readonly message: Schema.String;
|
|
3939
|
+
readonly resource: Schema.String;
|
|
3940
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3927
3941
|
}>], {
|
|
3928
|
-
readonly _tag: "
|
|
3942
|
+
readonly _tag: "ConflictError";
|
|
3929
3943
|
readonly message: string;
|
|
3944
|
+
readonly resource: string;
|
|
3945
|
+
readonly id?: string | null;
|
|
3930
3946
|
}>, Schema.Struct<{
|
|
3931
|
-
readonly _tag: Schema.tag<"
|
|
3947
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
3932
3948
|
readonly message: Schema.String;
|
|
3949
|
+
readonly resource: Schema.String;
|
|
3950
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3933
3951
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
3934
3952
|
readonly _tag: "GatewayTimeoutError";
|
|
3935
3953
|
readonly message: string;
|
|
@@ -4018,18 +4036,14 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4018
4036
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
4019
4037
|
readonly message: Schema.String;
|
|
4020
4038
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4021
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
4039
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
4040
|
+
export declare const CampaignsArchiveEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsArchive", "POST", "/v1/campaigns/:id/archive", Schema.toCodecStringTree<Schema.Struct<{
|
|
4022
4041
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4023
|
-
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4024
4042
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4025
|
-
readonly id: Schema.brand<Schema.String, "
|
|
4026
|
-
readonly
|
|
4027
|
-
readonly
|
|
4028
|
-
readonly
|
|
4029
|
-
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4030
|
-
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4031
|
-
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4032
|
-
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
4043
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4044
|
+
readonly name: Schema.String;
|
|
4045
|
+
readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
|
|
4046
|
+
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
4033
4047
|
readonly channel: Schema.Literal<"email">;
|
|
4034
4048
|
readonly email: Schema.Struct<{
|
|
4035
4049
|
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -4098,164 +4112,56 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4098
4112
|
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4099
4113
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4100
4114
|
}>]>;
|
|
4101
|
-
readonly
|
|
4115
|
+
readonly audience: Schema.Struct<{
|
|
4102
4116
|
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
4103
4117
|
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4104
4118
|
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4105
4119
|
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
4106
4120
|
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
4107
4121
|
}>;
|
|
4108
|
-
readonly
|
|
4122
|
+
readonly policy: Schema.Struct<{
|
|
4109
4123
|
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4110
4124
|
}>;
|
|
4111
|
-
readonly
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
readonly
|
|
4116
|
-
|
|
4117
|
-
readonly
|
|
4118
|
-
readonly
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4125
|
+
readonly definition: Schema.Struct<{
|
|
4126
|
+
readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
|
|
4127
|
+
readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4128
|
+
}>;
|
|
4129
|
+
readonly latestRun: Schema.Union<readonly [Schema.Struct<{
|
|
4130
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4131
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
4132
|
+
readonly scheduledFor: Schema.String;
|
|
4133
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4134
|
+
readonly totalRecipients: Schema.Finite;
|
|
4135
|
+
readonly dispatchedCount: Schema.Finite;
|
|
4136
|
+
readonly failedCount: Schema.Finite;
|
|
4137
|
+
readonly skippedCount: Schema.Finite;
|
|
4138
|
+
readonly pendingCount: Schema.Finite;
|
|
4139
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4140
|
+
}>, Schema.Null]>;
|
|
4127
4141
|
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4128
4142
|
readonly createdAt: Schema.String;
|
|
4129
4143
|
readonly updatedAt: Schema.String;
|
|
4130
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
4131
|
-
readonly _tag: "
|
|
4132
|
-
readonly message: string;
|
|
4133
|
-
}, readonly [Schema.Struct<{
|
|
4134
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
4135
|
-
readonly message: Schema.String;
|
|
4136
|
-
}>], {
|
|
4137
|
-
readonly _tag: "ForbiddenError";
|
|
4138
|
-
readonly message: string;
|
|
4139
|
-
}>, Schema.Struct<{
|
|
4140
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
4141
|
-
readonly message: Schema.String;
|
|
4142
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
4143
|
-
readonly _tag: "GatewayTimeoutError";
|
|
4144
|
-
readonly message: string;
|
|
4145
|
-
readonly retryAfterSeconds: number;
|
|
4146
|
-
}, readonly [Schema.Struct<{
|
|
4147
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
4148
|
-
readonly message: Schema.String;
|
|
4149
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
4150
|
-
}>], {
|
|
4151
|
-
readonly _tag: "GatewayTimeoutError";
|
|
4152
|
-
readonly message: string;
|
|
4153
|
-
readonly retryAfterSeconds: number;
|
|
4154
|
-
}>, Schema.Struct<{
|
|
4155
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
4156
|
-
readonly message: Schema.String;
|
|
4157
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
4158
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
4159
|
-
readonly _tag: "MalformedRequestError";
|
|
4160
|
-
readonly message: string;
|
|
4161
|
-
readonly fields: {
|
|
4162
|
-
readonly [x: string]: readonly string[];
|
|
4163
|
-
};
|
|
4164
|
-
}, readonly [Schema.Struct<{
|
|
4165
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
4166
|
-
readonly message: Schema.String;
|
|
4167
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
4168
|
-
}>], {
|
|
4169
|
-
readonly _tag: "MalformedRequestError";
|
|
4144
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
4145
|
+
readonly _tag: "ConflictError";
|
|
4170
4146
|
readonly message: string;
|
|
4171
|
-
readonly fields: {
|
|
4172
|
-
readonly [x: string]: readonly string[];
|
|
4173
|
-
};
|
|
4174
|
-
}>, Schema.Struct<{
|
|
4175
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
4176
|
-
readonly message: Schema.String;
|
|
4177
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
4178
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
4179
|
-
readonly _tag: "ResourceNotFoundError";
|
|
4180
4147
|
readonly resource: string;
|
|
4181
|
-
readonly id
|
|
4182
|
-
readonly message: string;
|
|
4148
|
+
readonly id?: string | null;
|
|
4183
4149
|
}, readonly [Schema.Struct<{
|
|
4184
|
-
readonly _tag: Schema.tag<"
|
|
4185
|
-
readonly resource: Schema.String;
|
|
4186
|
-
readonly id: Schema.String;
|
|
4150
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
4187
4151
|
readonly message: Schema.String;
|
|
4188
|
-
}>], {
|
|
4189
|
-
readonly _tag: "ResourceNotFoundError";
|
|
4190
|
-
readonly resource: string;
|
|
4191
|
-
readonly id: string;
|
|
4192
|
-
readonly message: string;
|
|
4193
|
-
}>, Schema.Struct<{
|
|
4194
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
4195
4152
|
readonly resource: Schema.String;
|
|
4196
|
-
readonly id: Schema.String
|
|
4197
|
-
readonly message: Schema.String;
|
|
4198
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
4199
|
-
readonly _tag: "UnauthorizedError";
|
|
4200
|
-
readonly message: string;
|
|
4201
|
-
}, readonly [Schema.Struct<{
|
|
4202
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4203
|
-
readonly message: Schema.String;
|
|
4204
|
-
}>], {
|
|
4205
|
-
readonly _tag: "UnauthorizedError";
|
|
4206
|
-
readonly message: string;
|
|
4207
|
-
}>, Schema.Struct<{
|
|
4208
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4209
|
-
readonly message: Schema.String;
|
|
4210
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
4211
|
-
readonly _tag: "ValidationError";
|
|
4212
|
-
readonly message: string;
|
|
4213
|
-
readonly fields?: {
|
|
4214
|
-
readonly [x: string]: readonly string[];
|
|
4215
|
-
} | null;
|
|
4216
|
-
}, readonly [Schema.Struct<{
|
|
4217
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
4218
|
-
readonly message: Schema.String;
|
|
4219
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4153
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4220
4154
|
}>], {
|
|
4221
|
-
readonly _tag: "
|
|
4155
|
+
readonly _tag: "ConflictError";
|
|
4222
4156
|
readonly message: string;
|
|
4223
|
-
readonly
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
readonly
|
|
4228
|
-
readonly
|
|
4229
|
-
readonly
|
|
4230
|
-
}>, never, never> |
|
|
4231
|
-
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4232
|
-
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4233
|
-
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4234
|
-
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
4235
|
-
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4236
|
-
readonly totalRecipients: Schema.Finite;
|
|
4237
|
-
readonly dispatchedCount: Schema.Finite;
|
|
4238
|
-
readonly failedCount: Schema.Finite;
|
|
4239
|
-
readonly skippedCount: Schema.Finite;
|
|
4240
|
-
readonly deliveredCount: Schema.Finite;
|
|
4241
|
-
readonly hardBounceCount: Schema.Finite;
|
|
4242
|
-
readonly softBounceCount: Schema.Finite;
|
|
4243
|
-
readonly complaintCount: Schema.Finite;
|
|
4244
|
-
readonly engagement: Schema.Struct<{
|
|
4245
|
-
readonly measurement: Schema.Literal<"directional">;
|
|
4246
|
-
readonly uniqueOpens: Schema.Finite;
|
|
4247
|
-
readonly uniqueClicks: Schema.Finite;
|
|
4248
|
-
}>;
|
|
4249
|
-
readonly unsubscribesByTopic: Schema.$Array<Schema.Struct<{
|
|
4250
|
-
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
4251
|
-
readonly count: Schema.Finite;
|
|
4252
|
-
}>>;
|
|
4253
|
-
readonly replyCount: Schema.Finite;
|
|
4254
|
-
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
4255
|
-
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
4256
|
-
readonly count: Schema.Finite;
|
|
4257
|
-
}>>;
|
|
4258
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4157
|
+
readonly resource: string;
|
|
4158
|
+
readonly id?: string | null;
|
|
4159
|
+
}>, Schema.Struct<{
|
|
4160
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
4161
|
+
readonly message: Schema.String;
|
|
4162
|
+
readonly resource: Schema.String;
|
|
4163
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4164
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4259
4165
|
readonly _tag: "ForbiddenError";
|
|
4260
4166
|
readonly message: string;
|
|
4261
4167
|
}, readonly [Schema.Struct<{
|
|
@@ -4355,16 +4261,23 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4355
4261
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
4356
4262
|
readonly message: Schema.String;
|
|
4357
4263
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4358
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
4359
|
-
|
|
4264
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
4265
|
+
export declare const CampaignsListRunsEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsListRuns", "GET", "/v1/campaigns/:id/runs", Schema.toCodecStringTree<Schema.Struct<{
|
|
4266
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4267
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
4268
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>>;
|
|
4360
4269
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4361
4270
|
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
4362
4271
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4363
4272
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
4364
|
-
readonly id: Schema.brand<Schema.String, "
|
|
4365
|
-
readonly
|
|
4366
|
-
readonly
|
|
4367
|
-
readonly
|
|
4273
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4274
|
+
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
4275
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
4276
|
+
readonly scheduledFor: Schema.String;
|
|
4277
|
+
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4278
|
+
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4279
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4280
|
+
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
4368
4281
|
readonly channel: Schema.Literal<"email">;
|
|
4369
4282
|
readonly email: Schema.Struct<{
|
|
4370
4283
|
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -4433,50 +4346,270 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4433
4346
|
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4434
4347
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4435
4348
|
}>]>;
|
|
4436
|
-
readonly
|
|
4349
|
+
readonly audienceSnapshot: Schema.Struct<{
|
|
4437
4350
|
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
4438
4351
|
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4439
4352
|
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4440
4353
|
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
4441
4354
|
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
4442
4355
|
}>;
|
|
4443
|
-
readonly
|
|
4356
|
+
readonly policySnapshot: Schema.Struct<{
|
|
4444
4357
|
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4445
4358
|
}>;
|
|
4446
|
-
readonly
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
readonly
|
|
4451
|
-
|
|
4452
|
-
readonly
|
|
4453
|
-
readonly
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4359
|
+
readonly totalRecipients: Schema.Finite;
|
|
4360
|
+
readonly dispatchedCount: Schema.Finite;
|
|
4361
|
+
readonly failedCount: Schema.Finite;
|
|
4362
|
+
readonly skippedCount: Schema.Finite;
|
|
4363
|
+
readonly pendingCount: Schema.Finite;
|
|
4364
|
+
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
4365
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
4366
|
+
readonly count: Schema.Finite;
|
|
4367
|
+
}>>;
|
|
4368
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4369
|
+
readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4370
|
+
readonly holdReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4371
|
+
readonly holdDomainId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailDomainId">, Schema.Null]>;
|
|
4372
|
+
readonly holdUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4373
|
+
readonly capacityWarning: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4374
|
+
readonly lastContactId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4462
4375
|
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4463
4376
|
readonly createdAt: Schema.String;
|
|
4464
4377
|
readonly updatedAt: Schema.String;
|
|
4465
|
-
readonly series: Schema.$Array<Schema.Finite>;
|
|
4466
4378
|
}>>;
|
|
4467
|
-
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4468
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4469
|
-
readonly _tag: "ForbiddenError";
|
|
4379
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4380
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4381
|
+
readonly _tag: "ForbiddenError";
|
|
4382
|
+
readonly message: string;
|
|
4383
|
+
}, readonly [Schema.Struct<{
|
|
4384
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
4385
|
+
readonly message: Schema.String;
|
|
4386
|
+
}>], {
|
|
4387
|
+
readonly _tag: "ForbiddenError";
|
|
4388
|
+
readonly message: string;
|
|
4389
|
+
}>, Schema.Struct<{
|
|
4390
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
4391
|
+
readonly message: Schema.String;
|
|
4392
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
4393
|
+
readonly _tag: "GatewayTimeoutError";
|
|
4394
|
+
readonly message: string;
|
|
4395
|
+
readonly retryAfterSeconds: number;
|
|
4396
|
+
}, readonly [Schema.Struct<{
|
|
4397
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
4398
|
+
readonly message: Schema.String;
|
|
4399
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
4400
|
+
}>], {
|
|
4401
|
+
readonly _tag: "GatewayTimeoutError";
|
|
4402
|
+
readonly message: string;
|
|
4403
|
+
readonly retryAfterSeconds: number;
|
|
4404
|
+
}>, Schema.Struct<{
|
|
4405
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
4406
|
+
readonly message: Schema.String;
|
|
4407
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
4408
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
4409
|
+
readonly _tag: "MalformedRequestError";
|
|
4410
|
+
readonly message: string;
|
|
4411
|
+
readonly fields: {
|
|
4412
|
+
readonly [x: string]: readonly string[];
|
|
4413
|
+
};
|
|
4414
|
+
}, readonly [Schema.Struct<{
|
|
4415
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
4416
|
+
readonly message: Schema.String;
|
|
4417
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
4418
|
+
}>], {
|
|
4419
|
+
readonly _tag: "MalformedRequestError";
|
|
4420
|
+
readonly message: string;
|
|
4421
|
+
readonly fields: {
|
|
4422
|
+
readonly [x: string]: readonly string[];
|
|
4423
|
+
};
|
|
4424
|
+
}>, Schema.Struct<{
|
|
4425
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
4426
|
+
readonly message: Schema.String;
|
|
4427
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
4428
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
4429
|
+
readonly _tag: "ResourceNotFoundError";
|
|
4430
|
+
readonly resource: string;
|
|
4431
|
+
readonly id: string;
|
|
4432
|
+
readonly message: string;
|
|
4433
|
+
}, readonly [Schema.Struct<{
|
|
4434
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
4435
|
+
readonly resource: Schema.String;
|
|
4436
|
+
readonly id: Schema.String;
|
|
4437
|
+
readonly message: Schema.String;
|
|
4438
|
+
}>], {
|
|
4439
|
+
readonly _tag: "ResourceNotFoundError";
|
|
4440
|
+
readonly resource: string;
|
|
4441
|
+
readonly id: string;
|
|
4442
|
+
readonly message: string;
|
|
4443
|
+
}>, Schema.Struct<{
|
|
4444
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
4445
|
+
readonly resource: Schema.String;
|
|
4446
|
+
readonly id: Schema.String;
|
|
4447
|
+
readonly message: Schema.String;
|
|
4448
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
4449
|
+
readonly _tag: "UnauthorizedError";
|
|
4450
|
+
readonly message: string;
|
|
4451
|
+
}, readonly [Schema.Struct<{
|
|
4452
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4453
|
+
readonly message: Schema.String;
|
|
4454
|
+
}>], {
|
|
4455
|
+
readonly _tag: "UnauthorizedError";
|
|
4456
|
+
readonly message: string;
|
|
4457
|
+
}>, Schema.Struct<{
|
|
4458
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4459
|
+
readonly message: Schema.String;
|
|
4460
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
4461
|
+
readonly _tag: "ValidationError";
|
|
4462
|
+
readonly message: string;
|
|
4463
|
+
readonly fields?: {
|
|
4464
|
+
readonly [x: string]: readonly string[];
|
|
4465
|
+
} | null;
|
|
4466
|
+
}, readonly [Schema.Struct<{
|
|
4467
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
4468
|
+
readonly message: Schema.String;
|
|
4469
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4470
|
+
}>], {
|
|
4471
|
+
readonly _tag: "ValidationError";
|
|
4472
|
+
readonly message: string;
|
|
4473
|
+
readonly fields?: {
|
|
4474
|
+
readonly [x: string]: readonly string[];
|
|
4475
|
+
} | null;
|
|
4476
|
+
}>, Schema.Struct<{
|
|
4477
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
4478
|
+
readonly message: Schema.String;
|
|
4479
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4480
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
4481
|
+
export declare const CampaignsScheduleRunEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsScheduleRun", "POST", "/v1/campaigns/:id/runs", Schema.toCodecStringTree<Schema.Struct<{
|
|
4482
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4483
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
4484
|
+
readonly scheduledFor: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
|
|
4485
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
4486
|
+
readonly "idempotency-key": Schema.optionalKey<Schema.String>;
|
|
4487
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
4488
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4489
|
+
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
4490
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
4491
|
+
readonly scheduledFor: Schema.String;
|
|
4492
|
+
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4493
|
+
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4494
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4495
|
+
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
4496
|
+
readonly channel: Schema.Literal<"email">;
|
|
4497
|
+
readonly email: Schema.Struct<{
|
|
4498
|
+
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4499
|
+
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4500
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4501
|
+
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
4502
|
+
readonly filename: Schema.String;
|
|
4503
|
+
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4504
|
+
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
4505
|
+
readonly contentType: Schema.String;
|
|
4506
|
+
readonly size: Schema.Finite;
|
|
4507
|
+
}>>, Schema.Null]>>;
|
|
4508
|
+
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
4509
|
+
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
4510
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
4511
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4512
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4513
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
4514
|
+
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
4515
|
+
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
4516
|
+
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4517
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
4518
|
+
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
4519
|
+
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
4520
|
+
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
4521
|
+
}>>;
|
|
4522
|
+
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
4523
|
+
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
4524
|
+
}>>;
|
|
4525
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
4526
|
+
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4527
|
+
}>;
|
|
4528
|
+
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
4529
|
+
readonly path: Schema.String;
|
|
4530
|
+
readonly commit: Schema.String;
|
|
4531
|
+
}>, Schema.Null]>>;
|
|
4532
|
+
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
4533
|
+
readonly email: Schema.String;
|
|
4534
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4535
|
+
}>, Schema.Null]>>;
|
|
4536
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
4537
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4538
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4539
|
+
}>, Schema.Struct<{
|
|
4540
|
+
readonly channel: Schema.Literal<"sms">;
|
|
4541
|
+
readonly sms: Schema.Struct<{
|
|
4542
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4543
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
4544
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4545
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4546
|
+
}>;
|
|
4547
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4548
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4549
|
+
}>, Schema.Struct<{
|
|
4550
|
+
readonly channel: Schema.Literal<"whatsapp">;
|
|
4551
|
+
readonly whatsapp: Schema.Struct<{
|
|
4552
|
+
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
4553
|
+
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
4554
|
+
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
4555
|
+
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
4556
|
+
}>, Schema.Struct<{
|
|
4557
|
+
readonly customField: Schema.String;
|
|
4558
|
+
}>]>>>;
|
|
4559
|
+
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
4560
|
+
}>;
|
|
4561
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4562
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4563
|
+
}>]>;
|
|
4564
|
+
readonly audienceSnapshot: Schema.Struct<{
|
|
4565
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
4566
|
+
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4567
|
+
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4568
|
+
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
4569
|
+
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
4570
|
+
}>;
|
|
4571
|
+
readonly policySnapshot: Schema.Struct<{
|
|
4572
|
+
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4573
|
+
}>;
|
|
4574
|
+
readonly totalRecipients: Schema.Finite;
|
|
4575
|
+
readonly dispatchedCount: Schema.Finite;
|
|
4576
|
+
readonly failedCount: Schema.Finite;
|
|
4577
|
+
readonly skippedCount: Schema.Finite;
|
|
4578
|
+
readonly pendingCount: Schema.Finite;
|
|
4579
|
+
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
4580
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
4581
|
+
readonly count: Schema.Finite;
|
|
4582
|
+
}>>;
|
|
4583
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4584
|
+
readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4585
|
+
readonly holdReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4586
|
+
readonly holdDomainId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailDomainId">, Schema.Null]>;
|
|
4587
|
+
readonly holdUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4588
|
+
readonly capacityWarning: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4589
|
+
readonly lastContactId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4590
|
+
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4591
|
+
readonly createdAt: Schema.String;
|
|
4592
|
+
readonly updatedAt: Schema.String;
|
|
4593
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.Union<readonly [typeof ExternalServiceError, typeof BillingProviderError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof ServiceUnavailableError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof FromAddressRequiredError, typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
4594
|
+
readonly _tag: "ConflictError";
|
|
4470
4595
|
readonly message: string;
|
|
4596
|
+
readonly resource: string;
|
|
4597
|
+
readonly id?: string | null;
|
|
4471
4598
|
}, readonly [Schema.Struct<{
|
|
4472
|
-
readonly _tag: Schema.tag<"
|
|
4599
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
4473
4600
|
readonly message: Schema.String;
|
|
4601
|
+
readonly resource: Schema.String;
|
|
4602
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4474
4603
|
}>], {
|
|
4475
|
-
readonly _tag: "
|
|
4604
|
+
readonly _tag: "ConflictError";
|
|
4476
4605
|
readonly message: string;
|
|
4606
|
+
readonly resource: string;
|
|
4607
|
+
readonly id?: string | null;
|
|
4477
4608
|
}>, Schema.Struct<{
|
|
4478
|
-
readonly _tag: Schema.tag<"
|
|
4609
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
4479
4610
|
readonly message: Schema.String;
|
|
4611
|
+
readonly resource: Schema.String;
|
|
4612
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4480
4613
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
4481
4614
|
readonly _tag: "GatewayTimeoutError";
|
|
4482
4615
|
readonly message: string;
|
|
@@ -4513,63 +4646,172 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4513
4646
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
4514
4647
|
readonly message: Schema.String;
|
|
4515
4648
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
4516
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<
|
|
4517
|
-
readonly _tag: "
|
|
4649
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
4650
|
+
readonly _tag: "PaymentRequiredError";
|
|
4518
4651
|
readonly message: string;
|
|
4652
|
+
readonly resource: string;
|
|
4653
|
+
readonly currentUsage: number;
|
|
4654
|
+
readonly limit: number;
|
|
4519
4655
|
}, readonly [Schema.Struct<{
|
|
4520
|
-
readonly _tag: Schema.tag<"
|
|
4656
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
4521
4657
|
readonly message: Schema.String;
|
|
4658
|
+
readonly resource: Schema.String;
|
|
4659
|
+
readonly currentUsage: Schema.Finite;
|
|
4660
|
+
readonly limit: Schema.Finite;
|
|
4522
4661
|
}>], {
|
|
4523
|
-
readonly _tag: "
|
|
4662
|
+
readonly _tag: "PaymentRequiredError";
|
|
4524
4663
|
readonly message: string;
|
|
4664
|
+
readonly resource: string;
|
|
4665
|
+
readonly currentUsage: number;
|
|
4666
|
+
readonly limit: number;
|
|
4525
4667
|
}>, Schema.Struct<{
|
|
4526
|
-
readonly _tag: Schema.tag<"
|
|
4668
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
4527
4669
|
readonly message: Schema.String;
|
|
4528
|
-
|
|
4529
|
-
readonly
|
|
4670
|
+
readonly resource: Schema.String;
|
|
4671
|
+
readonly currentUsage: Schema.Finite;
|
|
4672
|
+
readonly limit: Schema.Finite;
|
|
4673
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
4674
|
+
readonly _tag: "ResourceNotFoundError";
|
|
4675
|
+
readonly resource: string;
|
|
4676
|
+
readonly id: string;
|
|
4530
4677
|
readonly message: string;
|
|
4531
|
-
readonly fields?: {
|
|
4532
|
-
readonly [x: string]: readonly string[];
|
|
4533
|
-
} | null;
|
|
4534
4678
|
}, readonly [Schema.Struct<{
|
|
4535
|
-
readonly _tag: Schema.tag<"
|
|
4679
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
4680
|
+
readonly resource: Schema.String;
|
|
4681
|
+
readonly id: Schema.String;
|
|
4536
4682
|
readonly message: Schema.String;
|
|
4537
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4538
4683
|
}>], {
|
|
4539
|
-
readonly _tag: "
|
|
4684
|
+
readonly _tag: "ResourceNotFoundError";
|
|
4685
|
+
readonly resource: string;
|
|
4686
|
+
readonly id: string;
|
|
4540
4687
|
readonly message: string;
|
|
4541
|
-
readonly fields?: {
|
|
4542
|
-
readonly [x: string]: readonly string[];
|
|
4543
|
-
} | null;
|
|
4544
4688
|
}>, Schema.Struct<{
|
|
4545
|
-
readonly _tag: Schema.tag<"
|
|
4689
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
4690
|
+
readonly resource: Schema.String;
|
|
4691
|
+
readonly id: Schema.String;
|
|
4546
4692
|
readonly message: Schema.String;
|
|
4547
|
-
|
|
4548
|
-
|
|
4693
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
4694
|
+
readonly _tag: "UnauthorizedError";
|
|
4695
|
+
readonly message: string;
|
|
4696
|
+
}, readonly [Schema.Struct<{
|
|
4697
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4698
|
+
readonly message: Schema.String;
|
|
4699
|
+
}>], {
|
|
4700
|
+
readonly _tag: "UnauthorizedError";
|
|
4701
|
+
readonly message: string;
|
|
4702
|
+
}>, Schema.Struct<{
|
|
4703
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
4704
|
+
readonly message: Schema.String;
|
|
4705
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
4706
|
+
export declare const CampaignsGetRunEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsGetRun", "GET", "/v1/campaigns/:id/runs/:runId", Schema.toCodecStringTree<Schema.Struct<{
|
|
4549
4707
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4550
4708
|
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4551
|
-
}>>, Schema.
|
|
4552
|
-
readonly
|
|
4553
|
-
readonly
|
|
4554
|
-
readonly
|
|
4555
|
-
|
|
4556
|
-
readonly
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
readonly
|
|
4561
|
-
|
|
4562
|
-
readonly
|
|
4563
|
-
readonly
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4709
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4710
|
+
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4711
|
+
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
4712
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
4713
|
+
readonly scheduledFor: Schema.String;
|
|
4714
|
+
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4715
|
+
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4716
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4717
|
+
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
4718
|
+
readonly channel: Schema.Literal<"email">;
|
|
4719
|
+
readonly email: Schema.Struct<{
|
|
4720
|
+
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4721
|
+
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4722
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4723
|
+
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
4724
|
+
readonly filename: Schema.String;
|
|
4725
|
+
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4726
|
+
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
4727
|
+
readonly contentType: Schema.String;
|
|
4728
|
+
readonly size: Schema.Finite;
|
|
4729
|
+
}>>, Schema.Null]>>;
|
|
4730
|
+
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
4731
|
+
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
4732
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
4733
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4734
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4735
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
4736
|
+
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
4737
|
+
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
4738
|
+
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4739
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
4740
|
+
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
4741
|
+
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
4742
|
+
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
4743
|
+
}>>;
|
|
4744
|
+
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
4745
|
+
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
4746
|
+
}>>;
|
|
4747
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
4748
|
+
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4749
|
+
}>;
|
|
4750
|
+
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
4751
|
+
readonly path: Schema.String;
|
|
4752
|
+
readonly commit: Schema.String;
|
|
4753
|
+
}>, Schema.Null]>>;
|
|
4754
|
+
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
4755
|
+
readonly email: Schema.String;
|
|
4756
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4757
|
+
}>, Schema.Null]>>;
|
|
4758
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
4759
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4760
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4761
|
+
}>, Schema.Struct<{
|
|
4762
|
+
readonly channel: Schema.Literal<"sms">;
|
|
4763
|
+
readonly sms: Schema.Struct<{
|
|
4764
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4765
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
4766
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
4767
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4768
|
+
}>;
|
|
4769
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4770
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4771
|
+
}>, Schema.Struct<{
|
|
4772
|
+
readonly channel: Schema.Literal<"whatsapp">;
|
|
4773
|
+
readonly whatsapp: Schema.Struct<{
|
|
4774
|
+
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
4775
|
+
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
4776
|
+
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
4777
|
+
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
4778
|
+
}>, Schema.Struct<{
|
|
4779
|
+
readonly customField: Schema.String;
|
|
4780
|
+
}>]>>>;
|
|
4781
|
+
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
4782
|
+
}>;
|
|
4783
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
4784
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
4785
|
+
}>]>;
|
|
4786
|
+
readonly audienceSnapshot: Schema.Struct<{
|
|
4787
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
4788
|
+
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4789
|
+
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
4790
|
+
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
4791
|
+
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
4792
|
+
}>;
|
|
4793
|
+
readonly policySnapshot: Schema.Struct<{
|
|
4794
|
+
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4795
|
+
}>;
|
|
4796
|
+
readonly totalRecipients: Schema.Finite;
|
|
4797
|
+
readonly dispatchedCount: Schema.Finite;
|
|
4798
|
+
readonly failedCount: Schema.Finite;
|
|
4799
|
+
readonly skippedCount: Schema.Finite;
|
|
4800
|
+
readonly pendingCount: Schema.Finite;
|
|
4801
|
+
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
4802
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
4803
|
+
readonly count: Schema.Finite;
|
|
4571
4804
|
}>>;
|
|
4572
|
-
readonly
|
|
4805
|
+
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4806
|
+
readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4807
|
+
readonly holdReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4808
|
+
readonly holdDomainId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailDomainId">, Schema.Null]>;
|
|
4809
|
+
readonly holdUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4810
|
+
readonly capacityWarning: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4811
|
+
readonly lastContactId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4812
|
+
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4813
|
+
readonly createdAt: Schema.String;
|
|
4814
|
+
readonly updatedAt: Schema.String;
|
|
4573
4815
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4574
4816
|
readonly _tag: "ForbiddenError";
|
|
4575
4817
|
readonly message: string;
|
|
@@ -4670,14 +4912,13 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4670
4912
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
4671
4913
|
readonly message: Schema.String;
|
|
4672
4914
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4673
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
4915
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
4916
|
+
export declare const CampaignsCancelRunEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsCancelRun", "POST", "/v1/campaigns/:id/runs/:runId/cancel", Schema.toCodecStringTree<Schema.Struct<{
|
|
4674
4917
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
readonly
|
|
4678
|
-
readonly
|
|
4679
|
-
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4680
|
-
readonly items: Schema.$Array<Schema.Struct<{
|
|
4918
|
+
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4919
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4920
|
+
readonly success: Schema.Boolean;
|
|
4921
|
+
readonly item: Schema.Struct<{
|
|
4681
4922
|
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4682
4923
|
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
4683
4924
|
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
@@ -4783,9 +5024,40 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4783
5024
|
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4784
5025
|
readonly createdAt: Schema.String;
|
|
4785
5026
|
readonly updatedAt: Schema.String;
|
|
4786
|
-
}
|
|
4787
|
-
|
|
4788
|
-
|
|
5027
|
+
}>;
|
|
5028
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
5029
|
+
readonly _tag: "ConflictError";
|
|
5030
|
+
readonly message: string;
|
|
5031
|
+
readonly resource: string;
|
|
5032
|
+
readonly id?: string | null;
|
|
5033
|
+
}, readonly [Schema.Struct<{
|
|
5034
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
5035
|
+
readonly message: Schema.String;
|
|
5036
|
+
readonly resource: Schema.String;
|
|
5037
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5038
|
+
}>], {
|
|
5039
|
+
readonly _tag: "ConflictError";
|
|
5040
|
+
readonly message: string;
|
|
5041
|
+
readonly resource: string;
|
|
5042
|
+
readonly id?: string | null;
|
|
5043
|
+
}>, Schema.Struct<{
|
|
5044
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
5045
|
+
readonly message: Schema.String;
|
|
5046
|
+
readonly resource: Schema.String;
|
|
5047
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5048
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ExternalServiceError, {
|
|
5049
|
+
readonly _tag: "ExternalServiceError";
|
|
5050
|
+
readonly message: string;
|
|
5051
|
+
}, readonly [Schema.Struct<{
|
|
5052
|
+
readonly _tag: Schema.tag<"ExternalServiceError">;
|
|
5053
|
+
readonly message: Schema.String;
|
|
5054
|
+
}>], {
|
|
5055
|
+
readonly _tag: "ExternalServiceError";
|
|
5056
|
+
readonly message: string;
|
|
5057
|
+
}>, Schema.Struct<{
|
|
5058
|
+
readonly _tag: Schema.tag<"ExternalServiceError">;
|
|
5059
|
+
readonly message: Schema.String;
|
|
5060
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
4789
5061
|
readonly _tag: "ForbiddenError";
|
|
4790
5062
|
readonly message: string;
|
|
4791
5063
|
}, readonly [Schema.Struct<{
|
|
@@ -4885,7 +5157,8 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
4885
5157
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
4886
5158
|
readonly message: Schema.String;
|
|
4887
5159
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
4888
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
5160
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
5161
|
+
export declare const CampaignsPauseRunEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsPauseRun", "POST", "/v1/campaigns/:id/runs/:runId/pause", Schema.toCodecStringTree<Schema.Struct<{
|
|
4889
5162
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
4890
5163
|
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
4891
5164
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -5129,110 +5402,33 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5129
5402
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
5130
5403
|
readonly message: Schema.String;
|
|
5131
5404
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5132
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
readonly
|
|
5147
|
-
readonly
|
|
5148
|
-
readonly
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
}>>;
|
|
5160
|
-
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
5161
|
-
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
5162
|
-
}>>;
|
|
5163
|
-
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
5164
|
-
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5165
|
-
}>;
|
|
5166
|
-
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
5167
|
-
readonly path: Schema.String;
|
|
5168
|
-
readonly commit: Schema.String;
|
|
5169
|
-
}>, Schema.Null]>>;
|
|
5170
|
-
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
5171
|
-
readonly email: Schema.String;
|
|
5172
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5173
|
-
}>, Schema.Null]>>;
|
|
5174
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
5175
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5176
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5177
|
-
}>, Schema.Struct<{
|
|
5178
|
-
readonly channel: Schema.Literal<"sms">;
|
|
5179
|
-
readonly sms: Schema.Struct<{
|
|
5180
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5181
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
5182
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5183
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5184
|
-
}>;
|
|
5185
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5186
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5187
|
-
}>, Schema.Struct<{
|
|
5188
|
-
readonly channel: Schema.Literal<"whatsapp">;
|
|
5189
|
-
readonly whatsapp: Schema.Struct<{
|
|
5190
|
-
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
5191
|
-
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
5192
|
-
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
5193
|
-
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
5194
|
-
}>, Schema.Struct<{
|
|
5195
|
-
readonly customField: Schema.String;
|
|
5196
|
-
}>]>>>;
|
|
5197
|
-
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
5198
|
-
}>;
|
|
5199
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5200
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5201
|
-
}>]>;
|
|
5202
|
-
readonly audience: Schema.Struct<{
|
|
5203
|
-
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
5204
|
-
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
5205
|
-
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
5206
|
-
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
5207
|
-
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
5208
|
-
}>;
|
|
5209
|
-
readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
|
|
5210
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
5211
|
-
readonly subject: Schema.String;
|
|
5212
|
-
readonly preheader: Schema.optionalKey<Schema.String>;
|
|
5213
|
-
readonly html: Schema.String;
|
|
5214
|
-
readonly text: Schema.String;
|
|
5215
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
5216
|
-
readonly _tag: "ConflictError";
|
|
5217
|
-
readonly message: string;
|
|
5218
|
-
readonly resource: string;
|
|
5219
|
-
readonly id?: string | null;
|
|
5220
|
-
}, readonly [Schema.Struct<{
|
|
5221
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
5222
|
-
readonly message: Schema.String;
|
|
5223
|
-
readonly resource: Schema.String;
|
|
5224
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5225
|
-
}>], {
|
|
5226
|
-
readonly _tag: "ConflictError";
|
|
5227
|
-
readonly message: string;
|
|
5228
|
-
readonly resource: string;
|
|
5229
|
-
readonly id?: string | null;
|
|
5230
|
-
}>, Schema.Struct<{
|
|
5231
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
5232
|
-
readonly message: Schema.String;
|
|
5233
|
-
readonly resource: Schema.String;
|
|
5234
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5235
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
5405
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
5406
|
+
export declare const CampaignsListRecipientsEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsListRecipients", "GET", "/v1/campaigns/:id/runs/:runId/recipients", Schema.toCodecStringTree<Schema.Struct<{
|
|
5407
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
5408
|
+
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5409
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
5410
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>>;
|
|
5411
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
5412
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
5413
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5414
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
5415
|
+
readonly id: Schema.brand<Schema.String, "CampaignRecipientId">;
|
|
5416
|
+
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5417
|
+
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
5418
|
+
readonly contact: Schema.Union<readonly [Schema.Struct<{
|
|
5419
|
+
readonly id: Schema.brand<Schema.String, "ContactId">;
|
|
5420
|
+
readonly name: Schema.String;
|
|
5421
|
+
readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5422
|
+
}>, Schema.Null]>;
|
|
5423
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
|
|
5424
|
+
readonly messageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5425
|
+
readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5426
|
+
readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>, Schema.Null]>;
|
|
5427
|
+
readonly createdAt: Schema.String;
|
|
5428
|
+
readonly updatedAt: Schema.String;
|
|
5429
|
+
}>>;
|
|
5430
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5431
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
5236
5432
|
readonly _tag: "ForbiddenError";
|
|
5237
5433
|
readonly message: string;
|
|
5238
5434
|
}, readonly [Schema.Struct<{
|
|
@@ -5300,22 +5496,135 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5300
5496
|
readonly resource: Schema.String;
|
|
5301
5497
|
readonly id: Schema.String;
|
|
5302
5498
|
readonly message: Schema.String;
|
|
5303
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<
|
|
5304
|
-
readonly _tag: "
|
|
5499
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
5500
|
+
readonly _tag: "UnauthorizedError";
|
|
5501
|
+
readonly message: string;
|
|
5502
|
+
}, readonly [Schema.Struct<{
|
|
5503
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
5504
|
+
readonly message: Schema.String;
|
|
5505
|
+
}>], {
|
|
5506
|
+
readonly _tag: "UnauthorizedError";
|
|
5507
|
+
readonly message: string;
|
|
5508
|
+
}>, Schema.Struct<{
|
|
5509
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
5510
|
+
readonly message: Schema.String;
|
|
5511
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
5512
|
+
readonly _tag: "ValidationError";
|
|
5513
|
+
readonly message: string;
|
|
5514
|
+
readonly fields?: {
|
|
5515
|
+
readonly [x: string]: readonly string[];
|
|
5516
|
+
} | null;
|
|
5517
|
+
}, readonly [Schema.Struct<{
|
|
5518
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
5519
|
+
readonly message: Schema.String;
|
|
5520
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5521
|
+
}>], {
|
|
5522
|
+
readonly _tag: "ValidationError";
|
|
5523
|
+
readonly message: string;
|
|
5524
|
+
readonly fields?: {
|
|
5525
|
+
readonly [x: string]: readonly string[];
|
|
5526
|
+
} | null;
|
|
5527
|
+
}>, Schema.Struct<{
|
|
5528
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
5529
|
+
readonly message: Schema.String;
|
|
5530
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5531
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
5532
|
+
export declare const CampaignsGetRunReportEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsGetRunReport", "GET", "/v1/campaigns/:id/runs/:runId/report", Schema.toCodecStringTree<Schema.Struct<{
|
|
5533
|
+
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
5534
|
+
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5535
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5536
|
+
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
5537
|
+
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5538
|
+
readonly totalRecipients: Schema.Finite;
|
|
5539
|
+
readonly dispatchedCount: Schema.Finite;
|
|
5540
|
+
readonly failedCount: Schema.Finite;
|
|
5541
|
+
readonly skippedCount: Schema.Finite;
|
|
5542
|
+
readonly deliveredCount: Schema.Finite;
|
|
5543
|
+
readonly hardBounceCount: Schema.Finite;
|
|
5544
|
+
readonly softBounceCount: Schema.Finite;
|
|
5545
|
+
readonly complaintCount: Schema.Finite;
|
|
5546
|
+
readonly engagement: Schema.Struct<{
|
|
5547
|
+
readonly measurement: Schema.Literal<"directional">;
|
|
5548
|
+
readonly uniqueOpens: Schema.Finite;
|
|
5549
|
+
readonly uniqueClicks: Schema.Finite;
|
|
5550
|
+
}>;
|
|
5551
|
+
readonly unsubscribesByTopic: Schema.$Array<Schema.Struct<{
|
|
5552
|
+
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
5553
|
+
readonly count: Schema.Finite;
|
|
5554
|
+
}>>;
|
|
5555
|
+
readonly replyCount: Schema.Finite;
|
|
5556
|
+
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
5557
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
5558
|
+
readonly count: Schema.Finite;
|
|
5559
|
+
}>>;
|
|
5560
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
5561
|
+
readonly _tag: "ForbiddenError";
|
|
5562
|
+
readonly message: string;
|
|
5563
|
+
}, readonly [Schema.Struct<{
|
|
5564
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
5565
|
+
readonly message: Schema.String;
|
|
5566
|
+
}>], {
|
|
5567
|
+
readonly _tag: "ForbiddenError";
|
|
5568
|
+
readonly message: string;
|
|
5569
|
+
}>, Schema.Struct<{
|
|
5570
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
5571
|
+
readonly message: Schema.String;
|
|
5572
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
5573
|
+
readonly _tag: "GatewayTimeoutError";
|
|
5305
5574
|
readonly message: string;
|
|
5306
5575
|
readonly retryAfterSeconds: number;
|
|
5307
5576
|
}, readonly [Schema.Struct<{
|
|
5308
|
-
readonly _tag: Schema.tag<"
|
|
5577
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
5309
5578
|
readonly message: Schema.String;
|
|
5310
5579
|
readonly retryAfterSeconds: Schema.Finite;
|
|
5311
5580
|
}>], {
|
|
5312
|
-
readonly _tag: "
|
|
5581
|
+
readonly _tag: "GatewayTimeoutError";
|
|
5582
|
+
readonly message: string;
|
|
5583
|
+
readonly retryAfterSeconds: number;
|
|
5584
|
+
}>, Schema.Struct<{
|
|
5585
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
5586
|
+
readonly message: Schema.String;
|
|
5587
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
5588
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
5589
|
+
readonly _tag: "MalformedRequestError";
|
|
5590
|
+
readonly message: string;
|
|
5591
|
+
readonly fields: {
|
|
5592
|
+
readonly [x: string]: readonly string[];
|
|
5593
|
+
};
|
|
5594
|
+
}, readonly [Schema.Struct<{
|
|
5595
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
5596
|
+
readonly message: Schema.String;
|
|
5597
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
5598
|
+
}>], {
|
|
5599
|
+
readonly _tag: "MalformedRequestError";
|
|
5600
|
+
readonly message: string;
|
|
5601
|
+
readonly fields: {
|
|
5602
|
+
readonly [x: string]: readonly string[];
|
|
5603
|
+
};
|
|
5604
|
+
}>, Schema.Struct<{
|
|
5605
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
5606
|
+
readonly message: Schema.String;
|
|
5607
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
5608
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
5609
|
+
readonly _tag: "ResourceNotFoundError";
|
|
5610
|
+
readonly resource: string;
|
|
5611
|
+
readonly id: string;
|
|
5612
|
+
readonly message: string;
|
|
5613
|
+
}, readonly [Schema.Struct<{
|
|
5614
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
5615
|
+
readonly resource: Schema.String;
|
|
5616
|
+
readonly id: Schema.String;
|
|
5617
|
+
readonly message: Schema.String;
|
|
5618
|
+
}>], {
|
|
5619
|
+
readonly _tag: "ResourceNotFoundError";
|
|
5620
|
+
readonly resource: string;
|
|
5621
|
+
readonly id: string;
|
|
5313
5622
|
readonly message: string;
|
|
5314
|
-
readonly retryAfterSeconds: number;
|
|
5315
5623
|
}>, Schema.Struct<{
|
|
5316
|
-
readonly _tag: Schema.tag<"
|
|
5624
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
5625
|
+
readonly resource: Schema.String;
|
|
5626
|
+
readonly id: Schema.String;
|
|
5317
5627
|
readonly message: Schema.String;
|
|
5318
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
5319
5628
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
5320
5629
|
readonly _tag: "UnauthorizedError";
|
|
5321
5630
|
readonly message: string;
|
|
@@ -5328,7 +5637,28 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5328
5637
|
}>, Schema.Struct<{
|
|
5329
5638
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
5330
5639
|
readonly message: Schema.String;
|
|
5331
|
-
}>, never, never> |
|
|
5640
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
5641
|
+
readonly _tag: "ValidationError";
|
|
5642
|
+
readonly message: string;
|
|
5643
|
+
readonly fields?: {
|
|
5644
|
+
readonly [x: string]: readonly string[];
|
|
5645
|
+
} | null;
|
|
5646
|
+
}, readonly [Schema.Struct<{
|
|
5647
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
5648
|
+
readonly message: Schema.String;
|
|
5649
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5650
|
+
}>], {
|
|
5651
|
+
readonly _tag: "ValidationError";
|
|
5652
|
+
readonly message: string;
|
|
5653
|
+
readonly fields?: {
|
|
5654
|
+
readonly [x: string]: readonly string[];
|
|
5655
|
+
} | null;
|
|
5656
|
+
}>, Schema.Struct<{
|
|
5657
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
5658
|
+
readonly message: Schema.String;
|
|
5659
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5660
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
5661
|
+
export declare const CampaignsResumeRunEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsResumeRun", "POST", "/v1/campaigns/:id/runs/:runId/resume", Schema.toCodecStringTree<Schema.Struct<{
|
|
5332
5662
|
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
5333
5663
|
readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5334
5664
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -5575,240 +5905,17 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5575
5905
|
readonly message: Schema.String;
|
|
5576
5906
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5577
5907
|
}>], {
|
|
5578
|
-
readonly _tag: "ValidationError";
|
|
5579
|
-
readonly message: string;
|
|
5580
|
-
readonly fields?: {
|
|
5581
|
-
readonly [x: string]: readonly string[];
|
|
5582
|
-
} | null;
|
|
5583
|
-
}>, Schema.Struct<{
|
|
5584
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
5585
|
-
readonly message: Schema.String;
|
|
5586
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5587
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsScheduleRun", "POST", "/v1/campaigns/:id/runs", Schema.toCodecStringTree<Schema.Struct<{
|
|
5588
|
-
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
5589
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
5590
|
-
readonly scheduledFor: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
|
|
5591
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
5592
|
-
readonly "idempotency-key": Schema.optionalKey<Schema.String>;
|
|
5593
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
5594
|
-
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
5595
|
-
readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
5596
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
5597
|
-
readonly scheduledFor: Schema.String;
|
|
5598
|
-
readonly idempotencyKey: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5599
|
-
readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5600
|
-
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5601
|
-
readonly contentSnapshot: Schema.Union<readonly [Schema.Struct<{
|
|
5602
|
-
readonly channel: Schema.Literal<"email">;
|
|
5603
|
-
readonly email: Schema.Struct<{
|
|
5604
|
-
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5605
|
-
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5606
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5607
|
-
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
5608
|
-
readonly filename: Schema.String;
|
|
5609
|
-
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5610
|
-
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
5611
|
-
readonly contentType: Schema.String;
|
|
5612
|
-
readonly size: Schema.Finite;
|
|
5613
|
-
}>>, Schema.Null]>>;
|
|
5614
|
-
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
5615
|
-
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
5616
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
5617
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5618
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5619
|
-
readonly locale: Schema.optionalKey<Schema.String>;
|
|
5620
|
-
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
5621
|
-
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
5622
|
-
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
5623
|
-
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
5624
|
-
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
5625
|
-
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
5626
|
-
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
5627
|
-
}>>;
|
|
5628
|
-
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
5629
|
-
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
5630
|
-
}>>;
|
|
5631
|
-
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
5632
|
-
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5633
|
-
}>;
|
|
5634
|
-
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
5635
|
-
readonly path: Schema.String;
|
|
5636
|
-
readonly commit: Schema.String;
|
|
5637
|
-
}>, Schema.Null]>>;
|
|
5638
|
-
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
5639
|
-
readonly email: Schema.String;
|
|
5640
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5641
|
-
}>, Schema.Null]>>;
|
|
5642
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
5643
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5644
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5645
|
-
}>, Schema.Struct<{
|
|
5646
|
-
readonly channel: Schema.Literal<"sms">;
|
|
5647
|
-
readonly sms: Schema.Struct<{
|
|
5648
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5649
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
5650
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5651
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5652
|
-
}>;
|
|
5653
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5654
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5655
|
-
}>, Schema.Struct<{
|
|
5656
|
-
readonly channel: Schema.Literal<"whatsapp">;
|
|
5657
|
-
readonly whatsapp: Schema.Struct<{
|
|
5658
|
-
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
5659
|
-
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
5660
|
-
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
5661
|
-
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
5662
|
-
}>, Schema.Struct<{
|
|
5663
|
-
readonly customField: Schema.String;
|
|
5664
|
-
}>]>>>;
|
|
5665
|
-
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
5666
|
-
}>;
|
|
5667
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
5668
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
5669
|
-
}>]>;
|
|
5670
|
-
readonly audienceSnapshot: Schema.Struct<{
|
|
5671
|
-
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
5672
|
-
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
5673
|
-
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
5674
|
-
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
5675
|
-
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
5676
|
-
}>;
|
|
5677
|
-
readonly policySnapshot: Schema.Struct<{
|
|
5678
|
-
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
5679
|
-
}>;
|
|
5680
|
-
readonly totalRecipients: Schema.Finite;
|
|
5681
|
-
readonly dispatchedCount: Schema.Finite;
|
|
5682
|
-
readonly failedCount: Schema.Finite;
|
|
5683
|
-
readonly skippedCount: Schema.Finite;
|
|
5684
|
-
readonly pendingCount: Schema.Finite;
|
|
5685
|
-
readonly skippedReasons: Schema.$Array<Schema.Struct<{
|
|
5686
|
-
readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"not_added">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"consent_required">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
|
|
5687
|
-
readonly count: Schema.Finite;
|
|
5688
|
-
}>>;
|
|
5689
|
-
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5690
|
-
readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5691
|
-
readonly holdReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5692
|
-
readonly holdDomainId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailDomainId">, Schema.Null]>;
|
|
5693
|
-
readonly holdUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5694
|
-
readonly capacityWarning: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5695
|
-
readonly lastContactId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5696
|
-
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
5697
|
-
readonly createdAt: Schema.String;
|
|
5698
|
-
readonly updatedAt: Schema.String;
|
|
5699
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.Union<readonly [typeof ExternalServiceError, typeof BillingProviderError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof ServiceUnavailableError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof FromAddressRequiredError, typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
5700
|
-
readonly _tag: "ConflictError";
|
|
5701
|
-
readonly message: string;
|
|
5702
|
-
readonly resource: string;
|
|
5703
|
-
readonly id?: string | null;
|
|
5704
|
-
}, readonly [Schema.Struct<{
|
|
5705
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
5706
|
-
readonly message: Schema.String;
|
|
5707
|
-
readonly resource: Schema.String;
|
|
5708
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5709
|
-
}>], {
|
|
5710
|
-
readonly _tag: "ConflictError";
|
|
5711
|
-
readonly message: string;
|
|
5712
|
-
readonly resource: string;
|
|
5713
|
-
readonly id?: string | null;
|
|
5714
|
-
}>, Schema.Struct<{
|
|
5715
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
5716
|
-
readonly message: Schema.String;
|
|
5717
|
-
readonly resource: Schema.String;
|
|
5718
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5719
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
5720
|
-
readonly _tag: "GatewayTimeoutError";
|
|
5721
|
-
readonly message: string;
|
|
5722
|
-
readonly retryAfterSeconds: number;
|
|
5723
|
-
}, readonly [Schema.Struct<{
|
|
5724
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
5725
|
-
readonly message: Schema.String;
|
|
5726
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
5727
|
-
}>], {
|
|
5728
|
-
readonly _tag: "GatewayTimeoutError";
|
|
5729
|
-
readonly message: string;
|
|
5730
|
-
readonly retryAfterSeconds: number;
|
|
5731
|
-
}>, Schema.Struct<{
|
|
5732
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
5733
|
-
readonly message: Schema.String;
|
|
5734
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
5735
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
5736
|
-
readonly _tag: "MalformedRequestError";
|
|
5737
|
-
readonly message: string;
|
|
5738
|
-
readonly fields: {
|
|
5739
|
-
readonly [x: string]: readonly string[];
|
|
5740
|
-
};
|
|
5741
|
-
}, readonly [Schema.Struct<{
|
|
5742
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
5743
|
-
readonly message: Schema.String;
|
|
5744
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
5745
|
-
}>], {
|
|
5746
|
-
readonly _tag: "MalformedRequestError";
|
|
5747
|
-
readonly message: string;
|
|
5748
|
-
readonly fields: {
|
|
5749
|
-
readonly [x: string]: readonly string[];
|
|
5750
|
-
};
|
|
5751
|
-
}>, Schema.Struct<{
|
|
5752
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
5753
|
-
readonly message: Schema.String;
|
|
5754
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
5755
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
5756
|
-
readonly _tag: "PaymentRequiredError";
|
|
5757
|
-
readonly message: string;
|
|
5758
|
-
readonly resource: string;
|
|
5759
|
-
readonly currentUsage: number;
|
|
5760
|
-
readonly limit: number;
|
|
5761
|
-
}, readonly [Schema.Struct<{
|
|
5762
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
5763
|
-
readonly message: Schema.String;
|
|
5764
|
-
readonly resource: Schema.String;
|
|
5765
|
-
readonly currentUsage: Schema.Finite;
|
|
5766
|
-
readonly limit: Schema.Finite;
|
|
5767
|
-
}>], {
|
|
5768
|
-
readonly _tag: "PaymentRequiredError";
|
|
5769
|
-
readonly message: string;
|
|
5770
|
-
readonly resource: string;
|
|
5771
|
-
readonly currentUsage: number;
|
|
5772
|
-
readonly limit: number;
|
|
5773
|
-
}>, Schema.Struct<{
|
|
5774
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
5775
|
-
readonly message: Schema.String;
|
|
5776
|
-
readonly resource: Schema.String;
|
|
5777
|
-
readonly currentUsage: Schema.Finite;
|
|
5778
|
-
readonly limit: Schema.Finite;
|
|
5779
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
5780
|
-
readonly _tag: "ResourceNotFoundError";
|
|
5781
|
-
readonly resource: string;
|
|
5782
|
-
readonly id: string;
|
|
5783
|
-
readonly message: string;
|
|
5784
|
-
}, readonly [Schema.Struct<{
|
|
5785
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
5786
|
-
readonly resource: Schema.String;
|
|
5787
|
-
readonly id: Schema.String;
|
|
5788
|
-
readonly message: Schema.String;
|
|
5789
|
-
}>], {
|
|
5790
|
-
readonly _tag: "ResourceNotFoundError";
|
|
5791
|
-
readonly resource: string;
|
|
5792
|
-
readonly id: string;
|
|
5793
|
-
readonly message: string;
|
|
5794
|
-
}>, Schema.Struct<{
|
|
5795
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
5796
|
-
readonly resource: Schema.String;
|
|
5797
|
-
readonly id: Schema.String;
|
|
5798
|
-
readonly message: Schema.String;
|
|
5799
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
5800
|
-
readonly _tag: "UnauthorizedError";
|
|
5801
|
-
readonly message: string;
|
|
5802
|
-
}, readonly [Schema.Struct<{
|
|
5803
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
5804
|
-
readonly message: Schema.String;
|
|
5805
|
-
}>], {
|
|
5806
|
-
readonly _tag: "UnauthorizedError";
|
|
5908
|
+
readonly _tag: "ValidationError";
|
|
5807
5909
|
readonly message: string;
|
|
5910
|
+
readonly fields?: {
|
|
5911
|
+
readonly [x: string]: readonly string[];
|
|
5912
|
+
} | null;
|
|
5808
5913
|
}>, Schema.Struct<{
|
|
5809
|
-
readonly _tag: Schema.tag<"
|
|
5914
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
5810
5915
|
readonly message: Schema.String;
|
|
5811
|
-
|
|
5916
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
5917
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
5918
|
+
export declare const CampaignsPreviewEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsPreview", "POST", "/v1/campaigns/preview", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5812
5919
|
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
5813
5920
|
readonly channel: Schema.Literal<"email">;
|
|
5814
5921
|
readonly email: Schema.Struct<{
|
|
@@ -5887,8 +5994,11 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5887
5994
|
}>;
|
|
5888
5995
|
readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
|
|
5889
5996
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
5890
|
-
readonly
|
|
5891
|
-
|
|
5997
|
+
readonly subject: Schema.String;
|
|
5998
|
+
readonly preheader: Schema.optionalKey<Schema.String>;
|
|
5999
|
+
readonly html: Schema.String;
|
|
6000
|
+
readonly text: Schema.String;
|
|
6001
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
5892
6002
|
readonly _tag: "ConflictError";
|
|
5893
6003
|
readonly message: string;
|
|
5894
6004
|
readonly resource: string;
|
|
@@ -5908,6 +6018,18 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5908
6018
|
readonly message: Schema.String;
|
|
5909
6019
|
readonly resource: Schema.String;
|
|
5910
6020
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6021
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
6022
|
+
readonly _tag: "ForbiddenError";
|
|
6023
|
+
readonly message: string;
|
|
6024
|
+
}, readonly [Schema.Struct<{
|
|
6025
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
6026
|
+
readonly message: Schema.String;
|
|
6027
|
+
}>], {
|
|
6028
|
+
readonly _tag: "ForbiddenError";
|
|
6029
|
+
readonly message: string;
|
|
6030
|
+
}>, Schema.Struct<{
|
|
6031
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
6032
|
+
readonly message: Schema.String;
|
|
5911
6033
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
5912
6034
|
readonly _tag: "GatewayTimeoutError";
|
|
5913
6035
|
readonly message: string;
|
|
@@ -5944,46 +6066,6 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
5944
6066
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
5945
6067
|
readonly message: Schema.String;
|
|
5946
6068
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
5947
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
5948
|
-
readonly _tag: "PaymentRequiredError";
|
|
5949
|
-
readonly message: string;
|
|
5950
|
-
readonly resource: string;
|
|
5951
|
-
readonly currentUsage: number;
|
|
5952
|
-
readonly limit: number;
|
|
5953
|
-
}, readonly [Schema.Struct<{
|
|
5954
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
5955
|
-
readonly message: Schema.String;
|
|
5956
|
-
readonly resource: Schema.String;
|
|
5957
|
-
readonly currentUsage: Schema.Finite;
|
|
5958
|
-
readonly limit: Schema.Finite;
|
|
5959
|
-
}>], {
|
|
5960
|
-
readonly _tag: "PaymentRequiredError";
|
|
5961
|
-
readonly message: string;
|
|
5962
|
-
readonly resource: string;
|
|
5963
|
-
readonly currentUsage: number;
|
|
5964
|
-
readonly limit: number;
|
|
5965
|
-
}>, Schema.Struct<{
|
|
5966
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
5967
|
-
readonly message: Schema.String;
|
|
5968
|
-
readonly resource: Schema.String;
|
|
5969
|
-
readonly currentUsage: Schema.Finite;
|
|
5970
|
-
readonly limit: Schema.Finite;
|
|
5971
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
|
|
5972
|
-
readonly _tag: "RateLimitedError";
|
|
5973
|
-
readonly message: string;
|
|
5974
|
-
readonly retryAfterSeconds: number;
|
|
5975
|
-
}, readonly [Schema.Struct<{
|
|
5976
|
-
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
5977
|
-
readonly message: Schema.String;
|
|
5978
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
5979
|
-
}>], {
|
|
5980
|
-
readonly _tag: "RateLimitedError";
|
|
5981
|
-
readonly message: string;
|
|
5982
|
-
readonly retryAfterSeconds: number;
|
|
5983
|
-
}>, Schema.Struct<{
|
|
5984
|
-
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
5985
|
-
readonly message: Schema.String;
|
|
5986
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
5987
6069
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
5988
6070
|
readonly _tag: "ResourceNotFoundError";
|
|
5989
6071
|
readonly resource: string;
|
|
@@ -6004,6 +6086,22 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
6004
6086
|
readonly resource: Schema.String;
|
|
6005
6087
|
readonly id: Schema.String;
|
|
6006
6088
|
readonly message: Schema.String;
|
|
6089
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
|
|
6090
|
+
readonly _tag: "ServiceUnavailableError";
|
|
6091
|
+
readonly message: string;
|
|
6092
|
+
readonly retryAfterSeconds: number;
|
|
6093
|
+
}, readonly [Schema.Struct<{
|
|
6094
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
6095
|
+
readonly message: Schema.String;
|
|
6096
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
6097
|
+
}>], {
|
|
6098
|
+
readonly _tag: "ServiceUnavailableError";
|
|
6099
|
+
readonly message: string;
|
|
6100
|
+
readonly retryAfterSeconds: number;
|
|
6101
|
+
}>, Schema.Struct<{
|
|
6102
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
6103
|
+
readonly message: Schema.String;
|
|
6104
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
6007
6105
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
6008
6106
|
readonly _tag: "UnauthorizedError";
|
|
6009
6107
|
readonly message: string;
|
|
@@ -6016,93 +6114,8 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
6016
6114
|
}>, Schema.Struct<{
|
|
6017
6115
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
6018
6116
|
readonly message: Schema.String;
|
|
6019
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
6020
|
-
|
|
6021
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6022
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6023
|
-
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
6024
|
-
readonly channel: Schema.Literal<"email">;
|
|
6025
|
-
readonly email: Schema.Struct<{
|
|
6026
|
-
readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6027
|
-
readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6028
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6029
|
-
readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
6030
|
-
readonly filename: Schema.String;
|
|
6031
|
-
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6032
|
-
readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
|
|
6033
|
-
readonly contentType: Schema.String;
|
|
6034
|
-
readonly size: Schema.Finite;
|
|
6035
|
-
}>>, Schema.Null]>>;
|
|
6036
|
-
readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
|
|
6037
|
-
readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
|
|
6038
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
6039
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6040
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
6041
|
-
readonly locale: Schema.optionalKey<Schema.String>;
|
|
6042
|
-
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
6043
|
-
readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
|
|
6044
|
-
readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
6045
|
-
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
6046
|
-
readonly tracking: Schema.optionalKey<Schema.Struct<{
|
|
6047
|
-
readonly opens: Schema.optionalKey<Schema.Boolean>;
|
|
6048
|
-
readonly clicks: Schema.optionalKey<Schema.Boolean>;
|
|
6049
|
-
}>>;
|
|
6050
|
-
readonly footer: Schema.optionalKey<Schema.Struct<{
|
|
6051
|
-
readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
6052
|
-
}>>;
|
|
6053
|
-
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
6054
|
-
readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6055
|
-
}>;
|
|
6056
|
-
readonly issue: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
6057
|
-
readonly path: Schema.String;
|
|
6058
|
-
readonly commit: Schema.String;
|
|
6059
|
-
}>, Schema.Null]>>;
|
|
6060
|
-
readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
6061
|
-
readonly email: Schema.String;
|
|
6062
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6063
|
-
}>, Schema.Null]>>;
|
|
6064
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
6065
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
6066
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
6067
|
-
}>, Schema.Struct<{
|
|
6068
|
-
readonly channel: Schema.Literal<"sms">;
|
|
6069
|
-
readonly sms: Schema.Struct<{
|
|
6070
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6071
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
6072
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6073
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
6074
|
-
}>;
|
|
6075
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
6076
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
6077
|
-
}>, Schema.Struct<{
|
|
6078
|
-
readonly channel: Schema.Literal<"whatsapp">;
|
|
6079
|
-
readonly whatsapp: Schema.Struct<{
|
|
6080
|
-
readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
|
|
6081
|
-
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
6082
|
-
readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
6083
|
-
readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
|
|
6084
|
-
}>, Schema.Struct<{
|
|
6085
|
-
readonly customField: Schema.String;
|
|
6086
|
-
}>]>>>;
|
|
6087
|
-
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
6088
|
-
}>;
|
|
6089
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
6090
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
|
|
6091
|
-
}>]>, Schema.Null]>>;
|
|
6092
|
-
readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
6093
|
-
readonly topicId: Schema.brand<Schema.String, "TopicId">;
|
|
6094
|
-
readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
6095
|
-
readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
6096
|
-
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
6097
|
-
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
6098
|
-
}>, Schema.Null]>>;
|
|
6099
|
-
readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
6100
|
-
readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
6101
|
-
}>, Schema.Null]>>;
|
|
6102
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6103
|
-
readonly id: Schema.brand<Schema.String, "CampaignId">;
|
|
6104
|
-
readonly name: Schema.String;
|
|
6105
|
-
readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
|
|
6117
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
6118
|
+
export declare const CampaignsSendTestEndpoint: HttpApiEndpoint.HttpApiEndpoint<"campaignsSendTest", "POST", "/v1/campaigns/test-send", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
6106
6119
|
readonly content: Schema.Union<readonly [Schema.Struct<{
|
|
6107
6120
|
readonly channel: Schema.Literal<"email">;
|
|
6108
6121
|
readonly email: Schema.Struct<{
|
|
@@ -6179,29 +6192,10 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
6179
6192
|
readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
|
|
6180
6193
|
readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
|
|
6181
6194
|
}>;
|
|
6182
|
-
readonly
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
|
|
6187
|
-
readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
6188
|
-
}>;
|
|
6189
|
-
readonly latestRun: Schema.Union<readonly [Schema.Struct<{
|
|
6190
|
-
readonly id: Schema.brand<Schema.String, "CampaignRunId">;
|
|
6191
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
|
|
6192
|
-
readonly scheduledFor: Schema.String;
|
|
6193
|
-
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
6194
|
-
readonly totalRecipients: Schema.Finite;
|
|
6195
|
-
readonly dispatchedCount: Schema.Finite;
|
|
6196
|
-
readonly failedCount: Schema.Finite;
|
|
6197
|
-
readonly skippedCount: Schema.Finite;
|
|
6198
|
-
readonly pendingCount: Schema.Finite;
|
|
6199
|
-
readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
6200
|
-
}>, Schema.Null]>;
|
|
6201
|
-
readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
6202
|
-
readonly createdAt: Schema.String;
|
|
6203
|
-
readonly updatedAt: Schema.String;
|
|
6204
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
6195
|
+
readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
|
|
6196
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6197
|
+
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
6198
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError]> | Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof ServiceUnavailableError, typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
6205
6199
|
readonly _tag: "ConflictError";
|
|
6206
6200
|
readonly message: string;
|
|
6207
6201
|
readonly resource: string;
|
|
@@ -6257,6 +6251,46 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
6257
6251
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
6258
6252
|
readonly message: Schema.String;
|
|
6259
6253
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
6254
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
6255
|
+
readonly _tag: "PaymentRequiredError";
|
|
6256
|
+
readonly message: string;
|
|
6257
|
+
readonly resource: string;
|
|
6258
|
+
readonly currentUsage: number;
|
|
6259
|
+
readonly limit: number;
|
|
6260
|
+
}, readonly [Schema.Struct<{
|
|
6261
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
6262
|
+
readonly message: Schema.String;
|
|
6263
|
+
readonly resource: Schema.String;
|
|
6264
|
+
readonly currentUsage: Schema.Finite;
|
|
6265
|
+
readonly limit: Schema.Finite;
|
|
6266
|
+
}>], {
|
|
6267
|
+
readonly _tag: "PaymentRequiredError";
|
|
6268
|
+
readonly message: string;
|
|
6269
|
+
readonly resource: string;
|
|
6270
|
+
readonly currentUsage: number;
|
|
6271
|
+
readonly limit: number;
|
|
6272
|
+
}>, Schema.Struct<{
|
|
6273
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
6274
|
+
readonly message: Schema.String;
|
|
6275
|
+
readonly resource: Schema.String;
|
|
6276
|
+
readonly currentUsage: Schema.Finite;
|
|
6277
|
+
readonly limit: Schema.Finite;
|
|
6278
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
|
|
6279
|
+
readonly _tag: "RateLimitedError";
|
|
6280
|
+
readonly message: string;
|
|
6281
|
+
readonly retryAfterSeconds: number;
|
|
6282
|
+
}, readonly [Schema.Struct<{
|
|
6283
|
+
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
6284
|
+
readonly message: Schema.String;
|
|
6285
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
6286
|
+
}>], {
|
|
6287
|
+
readonly _tag: "RateLimitedError";
|
|
6288
|
+
readonly message: string;
|
|
6289
|
+
readonly retryAfterSeconds: number;
|
|
6290
|
+
}>, Schema.Struct<{
|
|
6291
|
+
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
6292
|
+
readonly message: Schema.String;
|
|
6293
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
6260
6294
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
6261
6295
|
readonly _tag: "ResourceNotFoundError";
|
|
6262
6296
|
readonly resource: string;
|
|
@@ -6289,27 +6323,4 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
6289
6323
|
}>, Schema.Struct<{
|
|
6290
6324
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
6291
6325
|
readonly message: Schema.String;
|
|
6292
|
-
}>, never, never> |
|
|
6293
|
-
readonly _tag: "ValidationError";
|
|
6294
|
-
readonly message: string;
|
|
6295
|
-
readonly fields?: {
|
|
6296
|
-
readonly [x: string]: readonly string[];
|
|
6297
|
-
} | null;
|
|
6298
|
-
}, readonly [Schema.Struct<{
|
|
6299
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
6300
|
-
readonly message: Schema.String;
|
|
6301
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
6302
|
-
}>], {
|
|
6303
|
-
readonly _tag: "ValidationError";
|
|
6304
|
-
readonly message: string;
|
|
6305
|
-
readonly fields?: {
|
|
6306
|
-
readonly [x: string]: readonly string[];
|
|
6307
|
-
} | null;
|
|
6308
|
-
}>, Schema.Struct<{
|
|
6309
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
6310
|
-
readonly message: Schema.String;
|
|
6311
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
6312
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
|
|
6313
|
-
export declare class CampaignsGroup extends CampaignsGroup_base {
|
|
6314
|
-
}
|
|
6315
|
-
export {};
|
|
6326
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|