samva 0.55.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/client/sdk.gen.d.ts +13 -4
- package/dist/client/sdk.gen.js +32 -1
- package/dist/client/types.gen.d.ts +66 -6
- 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 +111 -103
- package/dist/effect/descriptors/whats-app.js +111 -103
- 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 +37 -37
- package/dist/effect/generated/shared.js +63 -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 +142 -134
- package/dist/effect/generated/template-registrations.js +9 -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 +284 -277
- package/dist/effect/generated/webhooks.js +28 -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 +482 -298
- package/dist/effect/generated/whats-app.js +58 -16
- package/dist/effect/generated/whoami.d.ts +3 -6
- package/dist/effect/generated/whoami.js +4 -4
- package/dist/effect/generated-metadata.d.ts +6 -0
- package/dist/effect/generated-metadata.js +1 -0
- 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.d.ts +4 -4
- 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.d.ts +6 -0
- package/dist/effect/whatsapp.js +18 -17
- package/dist/effect/whoami.js +4 -4
- package/dist/package.json.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +5 -0
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint
|
|
1
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
export type WhatsAppRegistrationTarget = {
|
|
@@ -42,6 +42,7 @@ export type TemplateRegistration = {
|
|
|
42
42
|
readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
|
|
43
43
|
readonly providerTemplateId: string | null;
|
|
44
44
|
readonly reason: string | null;
|
|
45
|
+
readonly targetReleasedAt?: string;
|
|
45
46
|
readonly submittedAt: string | null;
|
|
46
47
|
readonly statusChangedAt: string;
|
|
47
48
|
readonly createdAt: string;
|
|
@@ -68,6 +69,7 @@ export declare const TemplateRegistration: Schema.Struct<{
|
|
|
68
69
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
69
70
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
70
71
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
72
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
71
73
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
72
74
|
readonly statusChangedAt: Schema.String;
|
|
73
75
|
readonly createdAt: Schema.String;
|
|
@@ -98,6 +100,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
|
|
|
98
100
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
99
101
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
100
102
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
103
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
101
104
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
102
105
|
readonly statusChangedAt: Schema.String;
|
|
103
106
|
readonly createdAt: Schema.String;
|
|
@@ -133,6 +136,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
|
|
|
133
136
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
134
137
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
135
138
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
139
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
136
140
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
137
141
|
readonly statusChangedAt: Schema.String;
|
|
138
142
|
readonly createdAt: Schema.String;
|
|
@@ -196,6 +200,7 @@ export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
|
|
|
196
200
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
197
201
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
198
202
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
203
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
199
204
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
200
205
|
readonly statusChangedAt: Schema.String;
|
|
201
206
|
readonly createdAt: Schema.String;
|
|
@@ -251,6 +256,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
|
|
|
251
256
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
252
257
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
253
258
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
259
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
254
260
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
255
261
|
readonly statusChangedAt: Schema.String;
|
|
256
262
|
readonly createdAt: Schema.String;
|
|
@@ -270,34 +276,36 @@ export type TemplateRegistrationsGet500 = InternalError;
|
|
|
270
276
|
export declare const TemplateRegistrationsGet500: typeof InternalError;
|
|
271
277
|
export type TemplateRegistrationsGet504 = GatewayTimeoutError;
|
|
272
278
|
export declare const TemplateRegistrationsGet504: typeof GatewayTimeoutError;
|
|
273
|
-
declare const
|
|
279
|
+
export declare const TemplateRegistrationsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsList", "GET", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
|
|
274
280
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
275
|
-
readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
276
281
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
277
|
-
readonly
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
readonly
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
282
|
+
readonly data: Schema.$Array<Schema.Struct<{
|
|
283
|
+
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
284
|
+
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
285
|
+
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
286
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
287
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
288
|
+
readonly provider: Schema.Literal<"whatsapp">;
|
|
289
|
+
readonly wabaId: Schema.String;
|
|
290
|
+
}>, Schema.Struct<{
|
|
291
|
+
readonly provider: Schema.Literal<"dlt">;
|
|
292
|
+
readonly entityId: Schema.String;
|
|
293
|
+
readonly headerId: Schema.String;
|
|
294
|
+
}>]>;
|
|
295
|
+
readonly name: Schema.String;
|
|
296
|
+
readonly language: Schema.String;
|
|
297
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
298
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
299
|
+
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
300
|
+
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
301
|
+
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
302
|
+
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
303
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
304
|
+
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
305
|
+
readonly statusChangedAt: Schema.String;
|
|
306
|
+
readonly createdAt: Schema.String;
|
|
307
|
+
readonly updatedAt: Schema.String;
|
|
308
|
+
}>>;
|
|
301
309
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
302
310
|
readonly _tag: "ForbiddenError";
|
|
303
311
|
readonly message: string;
|
|
@@ -398,36 +406,65 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
398
406
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
399
407
|
readonly message: Schema.String;
|
|
400
408
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
401
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
409
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
410
|
+
export declare const TemplateRegistrationsSubmitEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsSubmit", "POST", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
|
|
402
411
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
403
|
-
}>>, never,
|
|
404
|
-
readonly
|
|
405
|
-
|
|
406
|
-
|
|
412
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
413
|
+
readonly provider: Schema.Literal<"whatsapp">;
|
|
414
|
+
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
415
|
+
readonly approval: Schema.optionalKey<Schema.Struct<{
|
|
407
416
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
408
|
-
readonly
|
|
409
|
-
readonly
|
|
410
|
-
|
|
411
|
-
readonly wabaId: Schema.String;
|
|
412
|
-
}>, Schema.Struct<{
|
|
413
|
-
readonly provider: Schema.Literal<"dlt">;
|
|
414
|
-
readonly entityId: Schema.String;
|
|
415
|
-
readonly headerId: Schema.String;
|
|
416
|
-
}>]>;
|
|
417
|
-
readonly name: Schema.String;
|
|
418
|
-
readonly language: Schema.String;
|
|
419
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
420
|
-
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
421
|
-
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
422
|
-
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
423
|
-
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
424
|
-
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
425
|
-
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
426
|
-
readonly statusChangedAt: Schema.String;
|
|
427
|
-
readonly createdAt: Schema.String;
|
|
428
|
-
readonly updatedAt: Schema.String;
|
|
417
|
+
readonly businessAccountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
|
|
418
|
+
readonly expectedWabaId: Schema.String;
|
|
419
|
+
readonly expectedWorkspaceRevision: Schema.String;
|
|
429
420
|
}>>;
|
|
430
|
-
}>>, Schema.toCodecJson<Schema.
|
|
421
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
422
|
+
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
423
|
+
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
424
|
+
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
425
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
426
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
427
|
+
readonly provider: Schema.Literal<"whatsapp">;
|
|
428
|
+
readonly wabaId: Schema.String;
|
|
429
|
+
}>, Schema.Struct<{
|
|
430
|
+
readonly provider: Schema.Literal<"dlt">;
|
|
431
|
+
readonly entityId: Schema.String;
|
|
432
|
+
readonly headerId: Schema.String;
|
|
433
|
+
}>]>;
|
|
434
|
+
readonly name: Schema.String;
|
|
435
|
+
readonly language: Schema.String;
|
|
436
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
437
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
438
|
+
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
439
|
+
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
440
|
+
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
441
|
+
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
442
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
443
|
+
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
444
|
+
readonly statusChangedAt: Schema.String;
|
|
445
|
+
readonly createdAt: Schema.String;
|
|
446
|
+
readonly updatedAt: Schema.String;
|
|
447
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
448
|
+
readonly _tag: "ConflictError";
|
|
449
|
+
readonly message: string;
|
|
450
|
+
readonly resource: string;
|
|
451
|
+
readonly id?: string | null;
|
|
452
|
+
}, readonly [Schema.Struct<{
|
|
453
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
454
|
+
readonly message: Schema.String;
|
|
455
|
+
readonly resource: Schema.String;
|
|
456
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
457
|
+
}>], {
|
|
458
|
+
readonly _tag: "ConflictError";
|
|
459
|
+
readonly message: string;
|
|
460
|
+
readonly resource: string;
|
|
461
|
+
readonly id?: string | null;
|
|
462
|
+
}>, Schema.Struct<{
|
|
463
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
464
|
+
readonly message: Schema.String;
|
|
465
|
+
readonly resource: Schema.String;
|
|
466
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
467
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
431
468
|
readonly _tag: "ForbiddenError";
|
|
432
469
|
readonly message: string;
|
|
433
470
|
}, readonly [Schema.Struct<{
|
|
@@ -495,6 +532,22 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
495
532
|
readonly resource: Schema.String;
|
|
496
533
|
readonly id: Schema.String;
|
|
497
534
|
readonly message: Schema.String;
|
|
535
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
|
|
536
|
+
readonly _tag: "ServiceUnavailableError";
|
|
537
|
+
readonly message: string;
|
|
538
|
+
readonly retryAfterSeconds: number;
|
|
539
|
+
}, readonly [Schema.Struct<{
|
|
540
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
541
|
+
readonly message: Schema.String;
|
|
542
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
543
|
+
}>], {
|
|
544
|
+
readonly _tag: "ServiceUnavailableError";
|
|
545
|
+
readonly message: string;
|
|
546
|
+
readonly retryAfterSeconds: number;
|
|
547
|
+
}>, Schema.Struct<{
|
|
548
|
+
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
549
|
+
readonly message: Schema.String;
|
|
550
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
498
551
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
499
552
|
readonly _tag: "UnauthorizedError";
|
|
500
553
|
readonly message: string;
|
|
@@ -527,18 +580,39 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
527
580
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
528
581
|
readonly message: Schema.String;
|
|
529
582
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
530
|
-
}>, never, never> |
|
|
583
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<WhatsAppChannelError, {
|
|
584
|
+
readonly _tag: "WhatsAppChannelError";
|
|
585
|
+
readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
|
|
586
|
+
readonly message: string;
|
|
587
|
+
readonly provider: string;
|
|
588
|
+
readonly providerCode?: string | null;
|
|
589
|
+
readonly statusCode?: number | null;
|
|
590
|
+
}, readonly [Schema.Struct<{
|
|
591
|
+
readonly _tag: Schema.tag<"WhatsAppChannelError">;
|
|
592
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
|
|
593
|
+
readonly message: Schema.String;
|
|
594
|
+
readonly provider: Schema.String;
|
|
595
|
+
readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
596
|
+
readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
597
|
+
}>], {
|
|
598
|
+
readonly _tag: "WhatsAppChannelError";
|
|
599
|
+
readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
|
|
600
|
+
readonly message: string;
|
|
601
|
+
readonly provider: string;
|
|
602
|
+
readonly providerCode?: string | null;
|
|
603
|
+
readonly statusCode?: number | null;
|
|
604
|
+
}>, Schema.Struct<{
|
|
605
|
+
readonly _tag: Schema.tag<"WhatsAppChannelError">;
|
|
606
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
|
|
607
|
+
readonly message: Schema.String;
|
|
608
|
+
readonly provider: Schema.String;
|
|
609
|
+
readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
610
|
+
readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
611
|
+
}>, never, never>>, ApiKeySecurityMiddleware, never>;
|
|
612
|
+
export declare const TemplateRegistrationsGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsGet", "GET", "/v1/templates/:id/registrations/:registrationId", Schema.toCodecStringTree<Schema.Struct<{
|
|
531
613
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
|
|
535
|
-
readonly approval: Schema.optionalKey<Schema.Struct<{
|
|
536
|
-
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
537
|
-
readonly businessAccountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
|
|
538
|
-
readonly expectedWabaId: Schema.String;
|
|
539
|
-
readonly expectedWorkspaceRevision: Schema.String;
|
|
540
|
-
}>>;
|
|
541
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
614
|
+
readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
615
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
542
616
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
543
617
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
544
618
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
@@ -559,31 +633,12 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
559
633
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
560
634
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
561
635
|
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
636
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
562
637
|
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
563
638
|
readonly statusChangedAt: Schema.String;
|
|
564
639
|
readonly createdAt: Schema.String;
|
|
565
640
|
readonly updatedAt: Schema.String;
|
|
566
|
-
}>>, Schema.toCodecJson<Schema.
|
|
567
|
-
readonly _tag: "ConflictError";
|
|
568
|
-
readonly message: string;
|
|
569
|
-
readonly resource: string;
|
|
570
|
-
readonly id?: string | null;
|
|
571
|
-
}, readonly [Schema.Struct<{
|
|
572
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
573
|
-
readonly message: Schema.String;
|
|
574
|
-
readonly resource: Schema.String;
|
|
575
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
576
|
-
}>], {
|
|
577
|
-
readonly _tag: "ConflictError";
|
|
578
|
-
readonly message: string;
|
|
579
|
-
readonly resource: string;
|
|
580
|
-
readonly id?: string | null;
|
|
581
|
-
}>, Schema.Struct<{
|
|
582
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
583
|
-
readonly message: Schema.String;
|
|
584
|
-
readonly resource: Schema.String;
|
|
585
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
586
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
641
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
587
642
|
readonly _tag: "ForbiddenError";
|
|
588
643
|
readonly message: string;
|
|
589
644
|
}, readonly [Schema.Struct<{
|
|
@@ -651,22 +706,6 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
651
706
|
readonly resource: Schema.String;
|
|
652
707
|
readonly id: Schema.String;
|
|
653
708
|
readonly message: Schema.String;
|
|
654
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
|
|
655
|
-
readonly _tag: "ServiceUnavailableError";
|
|
656
|
-
readonly message: string;
|
|
657
|
-
readonly retryAfterSeconds: number;
|
|
658
|
-
}, readonly [Schema.Struct<{
|
|
659
|
-
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
660
|
-
readonly message: Schema.String;
|
|
661
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
662
|
-
}>], {
|
|
663
|
-
readonly _tag: "ServiceUnavailableError";
|
|
664
|
-
readonly message: string;
|
|
665
|
-
readonly retryAfterSeconds: number;
|
|
666
|
-
}>, Schema.Struct<{
|
|
667
|
-
readonly _tag: Schema.tag<"ServiceUnavailableError">;
|
|
668
|
-
readonly message: Schema.String;
|
|
669
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
670
709
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
671
710
|
readonly _tag: "UnauthorizedError";
|
|
672
711
|
readonly message: string;
|
|
@@ -699,35 +738,4 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
699
738
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
700
739
|
readonly message: Schema.String;
|
|
701
740
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
702
|
-
}>, never, never> |
|
|
703
|
-
readonly _tag: "WhatsAppChannelError";
|
|
704
|
-
readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
|
|
705
|
-
readonly message: string;
|
|
706
|
-
readonly provider: string;
|
|
707
|
-
readonly providerCode?: string | null;
|
|
708
|
-
readonly statusCode?: number | null;
|
|
709
|
-
}, readonly [Schema.Struct<{
|
|
710
|
-
readonly _tag: Schema.tag<"WhatsAppChannelError">;
|
|
711
|
-
readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
|
|
712
|
-
readonly message: Schema.String;
|
|
713
|
-
readonly provider: Schema.String;
|
|
714
|
-
readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
715
|
-
readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
716
|
-
}>], {
|
|
717
|
-
readonly _tag: "WhatsAppChannelError";
|
|
718
|
-
readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
|
|
719
|
-
readonly message: string;
|
|
720
|
-
readonly provider: string;
|
|
721
|
-
readonly providerCode?: string | null;
|
|
722
|
-
readonly statusCode?: number | null;
|
|
723
|
-
}>, Schema.Struct<{
|
|
724
|
-
readonly _tag: Schema.tag<"WhatsAppChannelError">;
|
|
725
|
-
readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
|
|
726
|
-
readonly message: Schema.String;
|
|
727
|
-
readonly provider: Schema.String;
|
|
728
|
-
readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
729
|
-
readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
730
|
-
}>, never, never>>, ApiKeySecurityMiddleware, never>, false>;
|
|
731
|
-
export declare class TemplateRegistrationsGroup extends TemplateRegistrationsGroup_base {
|
|
732
|
-
}
|
|
733
|
-
export {};
|
|
741
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint,
|
|
1
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/template-registrations.ts
|
|
@@ -49,6 +49,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
49
49
|
]), Schema.Null]),
|
|
50
50
|
providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
|
|
51
51
|
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
52
|
+
targetReleasedAt: Schema.optionalKey(Schema.String),
|
|
52
53
|
submittedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
53
54
|
statusChangedAt: Schema.String,
|
|
54
55
|
createdAt: Schema.String,
|
|
@@ -96,7 +97,7 @@ const TemplateRegistrationsGet404 = ResourceNotFoundError;
|
|
|
96
97
|
const TemplateRegistrationsGet422 = ValidationError;
|
|
97
98
|
const TemplateRegistrationsGet500 = InternalError;
|
|
98
99
|
const TemplateRegistrationsGet504 = GatewayTimeoutError;
|
|
99
|
-
|
|
100
|
+
const TemplateRegistrationsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsList", "/v1/templates/:id/registrations", {
|
|
100
101
|
params: TemplateRegistrationsListPathParams,
|
|
101
102
|
success: TemplateRegistrationsList200,
|
|
102
103
|
error: [
|
|
@@ -108,7 +109,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
108
109
|
TemplateRegistrationsList500,
|
|
109
110
|
TemplateRegistrationsList504.pipe(HttpApiSchema.status(504))
|
|
110
111
|
]
|
|
111
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted.")
|
|
112
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted."))();
|
|
113
|
+
const TemplateRegistrationsSubmitEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("templateRegistrationsSubmit", "/v1/templates/:id/registrations", {
|
|
112
114
|
params: TemplateRegistrationsSubmitPathParams,
|
|
113
115
|
payload: TemplateRegistrationsSubmitRequestJson,
|
|
114
116
|
success: TemplateRegistrationsSubmit201.pipe(HttpApiSchema.status(201)),
|
|
@@ -124,7 +126,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
124
126
|
TemplateRegistrationsSubmit503.pipe(HttpApiSchema.status(503)),
|
|
125
127
|
TemplateRegistrationsSubmit504.pipe(HttpApiSchema.status(504))
|
|
126
128
|
]
|
|
127
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A
|
|
129
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A submission updates the existing provider template while it exists. When Meta confirms a deletion, you can submit the same handle again once Meta frees its name."))();
|
|
130
|
+
const TemplateRegistrationsGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsGet", "/v1/templates/:id/registrations/:registrationId", {
|
|
128
131
|
params: TemplateRegistrationsGetPathParams,
|
|
129
132
|
success: TemplateRegistrationsGet200,
|
|
130
133
|
error: [
|
|
@@ -136,7 +139,7 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
136
139
|
TemplateRegistrationsGet500,
|
|
137
140
|
TemplateRegistrationsGet504.pipe(HttpApiSchema.status(504))
|
|
138
141
|
]
|
|
139
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it."))
|
|
140
|
-
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504,
|
|
142
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it."))();
|
|
143
|
+
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetEndpoint, TemplateRegistrationsGetPathParams, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListEndpoint, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit503, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitEndpoint, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
|
|
141
144
|
|
|
142
145
|
//# sourceMappingURL=template-registrations.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint
|
|
1
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, SlugTaken, TemplateProjectId, TemplateSourceError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
export type TemplateShareLinksGetPathParams = {
|
|
@@ -203,18 +203,16 @@ export type TemplateShareLinksUpdate503 = ServiceUnavailableError;
|
|
|
203
203
|
export declare const TemplateShareLinksUpdate503: typeof ServiceUnavailableError;
|
|
204
204
|
export type TemplateShareLinksUpdate504 = GatewayTimeoutError;
|
|
205
205
|
export declare const TemplateShareLinksUpdate504: typeof GatewayTimeoutError;
|
|
206
|
-
declare const
|
|
206
|
+
export declare const TemplateShareLinksGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksGet", "GET", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
207
207
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
208
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
209
|
-
readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
210
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
208
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
211
209
|
readonly slug: Schema.String;
|
|
212
210
|
readonly url: Schema.String;
|
|
213
211
|
readonly canonicalPath: Schema.String;
|
|
214
212
|
readonly views: Schema.Finite;
|
|
215
213
|
readonly opens: Schema.Finite;
|
|
216
214
|
readonly updatedAt: Schema.String;
|
|
217
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
215
|
+
}>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
218
216
|
readonly _tag: "ForbiddenError";
|
|
219
217
|
readonly message: string;
|
|
220
218
|
}, readonly [Schema.Struct<{
|
|
@@ -310,10 +308,18 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
310
308
|
}>, Schema.Struct<{
|
|
311
309
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
312
310
|
readonly message: Schema.String;
|
|
313
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
311
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
312
|
+
export declare const TemplateShareLinksCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksCreate", "POST", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
314
313
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
315
|
-
}>>, never,
|
|
316
|
-
readonly
|
|
314
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
315
|
+
readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
316
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
317
|
+
readonly slug: Schema.String;
|
|
318
|
+
readonly url: Schema.String;
|
|
319
|
+
readonly canonicalPath: Schema.String;
|
|
320
|
+
readonly views: Schema.Finite;
|
|
321
|
+
readonly opens: Schema.Finite;
|
|
322
|
+
readonly updatedAt: Schema.String;
|
|
317
323
|
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
318
324
|
readonly _tag: "ForbiddenError";
|
|
319
325
|
readonly message: string;
|
|
@@ -410,16 +416,12 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
410
416
|
}>, Schema.Struct<{
|
|
411
417
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
412
418
|
readonly message: Schema.String;
|
|
413
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
419
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
420
|
+
export declare const TemplateShareLinksDeleteEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksDelete", "DELETE", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
414
421
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
415
|
-
}>>, never, never, never, Schema.toCodecJson<Schema.
|
|
416
|
-
readonly
|
|
417
|
-
|
|
418
|
-
readonly canonicalPath: Schema.String;
|
|
419
|
-
readonly views: Schema.Finite;
|
|
420
|
-
readonly opens: Schema.Finite;
|
|
421
|
-
readonly updatedAt: Schema.String;
|
|
422
|
-
}>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
422
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
423
|
+
readonly deleted: Schema.Boolean;
|
|
424
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
423
425
|
readonly _tag: "ForbiddenError";
|
|
424
426
|
readonly message: string;
|
|
425
427
|
}, readonly [Schema.Struct<{
|
|
@@ -515,7 +517,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
515
517
|
}>, Schema.Struct<{
|
|
516
518
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
517
519
|
readonly message: Schema.String;
|
|
518
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
520
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
521
|
+
export declare const TemplateShareLinksRenameEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksRename", "PATCH", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
519
522
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
520
523
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
521
524
|
readonly slug: Schema.String;
|
|
@@ -622,7 +625,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
622
625
|
}>, Schema.Struct<{
|
|
623
626
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
624
627
|
readonly message: Schema.String;
|
|
625
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
628
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
629
|
+
export declare const TemplateShareLinksUpdateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksUpdate", "POST", "/v1/template-projects/:projectId/share-link/update", Schema.toCodecStringTree<Schema.Struct<{
|
|
626
630
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
627
631
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
628
632
|
readonly slug: Schema.String;
|
|
@@ -727,7 +731,4 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
727
731
|
}>, Schema.Struct<{
|
|
728
732
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
729
733
|
readonly message: Schema.String;
|
|
730
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
731
|
-
export declare class TemplateShareLinksGroup extends TemplateShareLinksGroup_base {
|
|
732
|
-
}
|
|
733
|
-
export {};
|
|
734
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|