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,5 +1,5 @@
|
|
|
1
1
|
import { SensitiveString } from "../runtime.js";
|
|
2
|
-
import { HttpApiEndpoint,
|
|
2
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
|
|
5
5
|
// src/effect/generated/whats-app-flows.ts
|
|
@@ -207,7 +207,7 @@ const WhatsappFlowsRotateEncryptionKey422 = ValidationError;
|
|
|
207
207
|
const WhatsappFlowsRotateEncryptionKey500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
|
|
208
208
|
const WhatsappFlowsRotateEncryptionKey502 = WhatsAppChannelError;
|
|
209
209
|
const WhatsappFlowsRotateEncryptionKey504 = GatewayTimeoutError;
|
|
210
|
-
|
|
210
|
+
const WhatsappFlowsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappFlowsList", "/v1/whatsapp/flows", {
|
|
211
211
|
success: WhatsappFlowsList200,
|
|
212
212
|
error: [
|
|
213
213
|
WhatsappFlowsList400.pipe(HttpApiSchema.status(400)),
|
|
@@ -217,7 +217,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
217
217
|
WhatsappFlowsList500,
|
|
218
218
|
WhatsappFlowsList504.pipe(HttpApiSchema.status(504))
|
|
219
219
|
]
|
|
220
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns flows visible to the caller, newest first, each with its current version.")
|
|
220
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns flows visible to the caller, newest first, each with its current version."))();
|
|
221
|
+
const WhatsappFlowsCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappFlowsCreate", "/v1/whatsapp/flows", {
|
|
221
222
|
payload: WhatsappFlowsCreateRequestJson,
|
|
222
223
|
success: WhatsappFlowsCreate201.pipe(HttpApiSchema.status(201)),
|
|
223
224
|
error: [
|
|
@@ -230,7 +231,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
230
231
|
WhatsappFlowsCreate500,
|
|
231
232
|
WhatsappFlowsCreate504.pipe(HttpApiSchema.status(504))
|
|
232
233
|
]
|
|
233
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in its namespace or at organization level; the categories are Meta's and go with every version to Meta.")
|
|
234
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in its namespace or at organization level; the categories are Meta's and go with every version to Meta."))();
|
|
235
|
+
const WhatsappFlowsGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappFlowsGet", "/v1/whatsapp/flows/:id", {
|
|
234
236
|
params: WhatsappFlowsGetPathParams,
|
|
235
237
|
success: WhatsappFlowsGet200,
|
|
236
238
|
error: [
|
|
@@ -242,7 +244,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
242
244
|
WhatsappFlowsGet500,
|
|
243
245
|
WhatsappFlowsGet504.pipe(HttpApiSchema.status(504))
|
|
244
246
|
]
|
|
245
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.get").annotate(OpenApi.Summary, "Get a flow").annotate(OpenApi.Description, "Returns one flow by its ID.")
|
|
247
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.get").annotate(OpenApi.Summary, "Get a flow").annotate(OpenApi.Description, "Returns one flow by its ID."))();
|
|
248
|
+
const WhatsappFlowsSetEndpointEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.put("whatsappFlowsSetEndpoint", "/v1/whatsapp/flows/:id/endpoint", {
|
|
246
249
|
params: WhatsappFlowsSetEndpointPathParams,
|
|
247
250
|
payload: WhatsappFlowsSetEndpointRequestJson,
|
|
248
251
|
success: WhatsappFlowsSetEndpoint200,
|
|
@@ -255,7 +258,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
255
258
|
WhatsappFlowsSetEndpoint500,
|
|
256
259
|
WhatsappFlowsSetEndpoint504.pipe(HttpApiSchema.status(504))
|
|
257
260
|
]
|
|
258
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.setEndpoint").annotate(OpenApi.Summary, "Set a flow's endpoint").annotate(OpenApi.Description, "Sets the HTTPS endpoint Samva forwards the flow's data-exchange requests to, signed like a webhook delivery. The flow's first endpoint is issued a signing secret, returned once; changing the URL keeps the secret.")
|
|
261
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.setEndpoint").annotate(OpenApi.Summary, "Set a flow's endpoint").annotate(OpenApi.Description, "Sets the HTTPS endpoint Samva forwards the flow's data-exchange requests to, signed like a webhook delivery. The flow's first endpoint is issued a signing secret, returned once; changing the URL keeps the secret."))();
|
|
262
|
+
const WhatsappFlowsRotateEndpointSecretEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappFlowsRotateEndpointSecret", "/v1/whatsapp/flows/:id/endpoint/rotate-secret", {
|
|
259
263
|
params: WhatsappFlowsRotateEndpointSecretPathParams,
|
|
260
264
|
success: WhatsappFlowsRotateEndpointSecret200,
|
|
261
265
|
error: [
|
|
@@ -267,7 +271,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
267
271
|
WhatsappFlowsRotateEndpointSecret500,
|
|
268
272
|
WhatsappFlowsRotateEndpointSecret504.pipe(HttpApiSchema.status(504))
|
|
269
273
|
]
|
|
270
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.rotateEndpointSecret").annotate(OpenApi.Summary, "Rotate a flow endpoint's signing secret").annotate(OpenApi.Description, "Issues and returns a new signing secret. Requests carry a signature from the previous secret too for 24 hours.")
|
|
274
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.rotateEndpointSecret").annotate(OpenApi.Summary, "Rotate a flow endpoint's signing secret").annotate(OpenApi.Description, "Issues and returns a new signing secret. Requests carry a signature from the previous secret too for 24 hours."))();
|
|
275
|
+
const WhatsappFlowsListRegistrationsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappFlowsListRegistrations", "/v1/whatsapp/flows/:id/registrations", {
|
|
271
276
|
params: WhatsappFlowsListRegistrationsPathParams,
|
|
272
277
|
success: WhatsappFlowsListRegistrations200,
|
|
273
278
|
error: [
|
|
@@ -279,7 +284,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
279
284
|
WhatsappFlowsListRegistrations500,
|
|
280
285
|
WhatsappFlowsListRegistrations504.pipe(HttpApiSchema.status(504))
|
|
281
286
|
]
|
|
282
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.listRegistrations").annotate(OpenApi.Summary, "List a flow's registrations").annotate(OpenApi.Description, "Returns every Meta flow the flow's versions registered as, newest version first, with its status on its business account.")
|
|
287
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.listRegistrations").annotate(OpenApi.Summary, "List a flow's registrations").annotate(OpenApi.Description, "Returns every Meta flow the flow's versions registered as, newest version first, with its status on its business account."))();
|
|
288
|
+
const WhatsappFlowsRegisterEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappFlowsRegister", "/v1/whatsapp/flows/:id/registrations", {
|
|
283
289
|
params: WhatsappFlowsRegisterPathParams,
|
|
284
290
|
payload: WhatsappFlowsRegisterRequestJson,
|
|
285
291
|
success: WhatsappFlowsRegister201.pipe(HttpApiSchema.status(201)),
|
|
@@ -294,7 +300,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
294
300
|
WhatsappFlowsRegister502.pipe(HttpApiSchema.status(502)),
|
|
295
301
|
WhatsappFlowsRegister504.pipe(HttpApiSchema.status(504))
|
|
296
302
|
]
|
|
297
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.register").annotate(OpenApi.Summary, "Register and publish a flow").annotate(OpenApi.Description, "Creates the flow's current version as a Meta flow on the business account of the named number, or of the default number, and publishes it. A version already published there returns its registration. Meta's validator findings answer a validation error and stay on the draft registration.")
|
|
303
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.register").annotate(OpenApi.Summary, "Register and publish a flow").annotate(OpenApi.Description, "Creates the flow's current version as a Meta flow on the business account of the named number, or of the default number, and publishes it. A version already published there returns its registration. Meta's validator findings answer a validation error and stay on the draft registration."))();
|
|
304
|
+
const WhatsappFlowsListVersionsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappFlowsListVersions", "/v1/whatsapp/flows/:id/versions", {
|
|
298
305
|
params: WhatsappFlowsListVersionsPathParams,
|
|
299
306
|
success: WhatsappFlowsListVersions200,
|
|
300
307
|
error: [
|
|
@@ -306,7 +313,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
306
313
|
WhatsappFlowsListVersions500,
|
|
307
314
|
WhatsappFlowsListVersions504.pipe(HttpApiSchema.status(504))
|
|
308
315
|
]
|
|
309
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.listVersions").annotate(OpenApi.Summary, "List a flow's versions").annotate(OpenApi.Description, "Newest first.")
|
|
316
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.listVersions").annotate(OpenApi.Summary, "List a flow's versions").annotate(OpenApi.Description, "Newest first."))();
|
|
317
|
+
const WhatsappFlowsRecordVersionEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappFlowsRecordVersion", "/v1/whatsapp/flows/:id/versions", {
|
|
310
318
|
params: WhatsappFlowsRecordVersionPathParams,
|
|
311
319
|
payload: WhatsappFlowsRecordVersionRequestJson,
|
|
312
320
|
success: WhatsappFlowsRecordVersion201.pipe(HttpApiSchema.status(201)),
|
|
@@ -321,7 +329,8 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
321
329
|
WhatsappFlowsRecordVersion503.pipe(HttpApiSchema.status(503)),
|
|
322
330
|
WhatsappFlowsRecordVersion504.pipe(HttpApiSchema.status(504))
|
|
323
331
|
]
|
|
324
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "Supply Flow JSON to commit the flow's file and record its version, or name a commit and workspace revision to record a file already on the project's default branch. The same content returns the version that already recorded it.")
|
|
332
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "Supply Flow JSON to commit the flow's file and record its version, or name a commit and workspace revision to record a file already on the project's default branch. The same content returns the version that already recorded it."))();
|
|
333
|
+
const WhatsappFlowsRotateEncryptionKeyEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappFlowsRotateEncryptionKey", "/v1/whatsapp/flows/encryption-key/rotate", {
|
|
325
334
|
payload: WhatsappFlowsRotateEncryptionKeyRequestJson,
|
|
326
335
|
success: WhatsappFlowsRotateEncryptionKey200,
|
|
327
336
|
error: [
|
|
@@ -334,7 +343,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
|
|
|
334
343
|
WhatsappFlowsRotateEncryptionKey502.pipe(HttpApiSchema.status(502)),
|
|
335
344
|
WhatsappFlowsRotateEncryptionKey504.pipe(HttpApiSchema.status(504))
|
|
336
345
|
]
|
|
337
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.rotateEncryptionKey").annotate(OpenApi.Summary, "Rotate a business account's flow encryption key").annotate(OpenApi.Description, "Replaces the key WhatsApp encrypts data-exchange requests with on the business account of the named number, or of the default number, and uploads it to each of the account's numbers. The replaced key keeps decrypting for a day while clients fetch the new one."))
|
|
338
|
-
export { WhatsAppFlow, WhatsAppFlowEncryptionKey, WhatsAppFlowEndpoint, WhatsAppFlowEndpointAlert, WhatsAppFlowEndpointSettings, WhatsAppFlowList, WhatsAppFlowRegistration, WhatsAppFlowRegistrationId, WhatsAppFlowRegistrationList, WhatsAppFlowValidationError, WhatsAppFlowVersion, WhatsAppFlowVersionList,
|
|
346
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.rotateEncryptionKey").annotate(OpenApi.Summary, "Rotate a business account's flow encryption key").annotate(OpenApi.Description, "Replaces the key WhatsApp encrypts data-exchange requests with on the business account of the named number, or of the default number, and uploads it to each of the account's numbers. The replaced key keeps decrypting for a day while clients fetch the new one."))();
|
|
347
|
+
export { WhatsAppFlow, WhatsAppFlowEncryptionKey, WhatsAppFlowEndpoint, WhatsAppFlowEndpointAlert, WhatsAppFlowEndpointSettings, WhatsAppFlowList, WhatsAppFlowRegistration, WhatsAppFlowRegistrationId, WhatsAppFlowRegistrationList, WhatsAppFlowValidationError, WhatsAppFlowVersion, WhatsAppFlowVersionList, WhatsappFlowsCreate201, WhatsappFlowsCreate400, WhatsappFlowsCreate401, WhatsappFlowsCreate403, WhatsappFlowsCreate404, WhatsappFlowsCreate409, WhatsappFlowsCreate422, WhatsappFlowsCreate500, WhatsappFlowsCreate504, WhatsappFlowsCreateEndpoint, WhatsappFlowsCreateRequestJson, WhatsappFlowsGet200, WhatsappFlowsGet400, WhatsappFlowsGet401, WhatsappFlowsGet403, WhatsappFlowsGet404, WhatsappFlowsGet422, WhatsappFlowsGet500, WhatsappFlowsGet504, WhatsappFlowsGetEndpoint, WhatsappFlowsGetPathParams, WhatsappFlowsList200, WhatsappFlowsList400, WhatsappFlowsList401, WhatsappFlowsList403, WhatsappFlowsList422, WhatsappFlowsList500, WhatsappFlowsList504, WhatsappFlowsListEndpoint, WhatsappFlowsListRegistrations200, WhatsappFlowsListRegistrations400, WhatsappFlowsListRegistrations401, WhatsappFlowsListRegistrations403, WhatsappFlowsListRegistrations404, WhatsappFlowsListRegistrations422, WhatsappFlowsListRegistrations500, WhatsappFlowsListRegistrations504, WhatsappFlowsListRegistrationsEndpoint, WhatsappFlowsListRegistrationsPathParams, WhatsappFlowsListVersions200, WhatsappFlowsListVersions400, WhatsappFlowsListVersions401, WhatsappFlowsListVersions403, WhatsappFlowsListVersions404, WhatsappFlowsListVersions422, WhatsappFlowsListVersions500, WhatsappFlowsListVersions504, WhatsappFlowsListVersionsEndpoint, WhatsappFlowsListVersionsPathParams, WhatsappFlowsRecordVersion201, WhatsappFlowsRecordVersion400, WhatsappFlowsRecordVersion401, WhatsappFlowsRecordVersion403, WhatsappFlowsRecordVersion404, WhatsappFlowsRecordVersion409, WhatsappFlowsRecordVersion422, WhatsappFlowsRecordVersion500, WhatsappFlowsRecordVersion503, WhatsappFlowsRecordVersion504, WhatsappFlowsRecordVersionEndpoint, WhatsappFlowsRecordVersionPathParams, WhatsappFlowsRecordVersionRequestJson, WhatsappFlowsRegister201, WhatsappFlowsRegister400, WhatsappFlowsRegister401, WhatsappFlowsRegister403, WhatsappFlowsRegister404, WhatsappFlowsRegister409, WhatsappFlowsRegister422, WhatsappFlowsRegister500, WhatsappFlowsRegister502, WhatsappFlowsRegister504, WhatsappFlowsRegisterEndpoint, WhatsappFlowsRegisterPathParams, WhatsappFlowsRegisterRequestJson, WhatsappFlowsRotateEncryptionKey200, WhatsappFlowsRotateEncryptionKey400, WhatsappFlowsRotateEncryptionKey401, WhatsappFlowsRotateEncryptionKey403, WhatsappFlowsRotateEncryptionKey404, WhatsappFlowsRotateEncryptionKey422, WhatsappFlowsRotateEncryptionKey500, WhatsappFlowsRotateEncryptionKey502, WhatsappFlowsRotateEncryptionKey504, WhatsappFlowsRotateEncryptionKeyEndpoint, WhatsappFlowsRotateEncryptionKeyRequestJson, WhatsappFlowsRotateEndpointSecret200, WhatsappFlowsRotateEndpointSecret400, WhatsappFlowsRotateEndpointSecret401, WhatsappFlowsRotateEndpointSecret403, WhatsappFlowsRotateEndpointSecret404, WhatsappFlowsRotateEndpointSecret422, WhatsappFlowsRotateEndpointSecret500, WhatsappFlowsRotateEndpointSecret504, WhatsappFlowsRotateEndpointSecretEndpoint, WhatsappFlowsRotateEndpointSecretPathParams, WhatsappFlowsSetEndpoint200, WhatsappFlowsSetEndpoint400, WhatsappFlowsSetEndpoint401, WhatsappFlowsSetEndpoint403, WhatsappFlowsSetEndpoint404, WhatsappFlowsSetEndpoint422, WhatsappFlowsSetEndpoint500, WhatsappFlowsSetEndpoint504, WhatsappFlowsSetEndpointEndpoint, WhatsappFlowsSetEndpointPathParams, WhatsappFlowsSetEndpointRequestJson };
|
|
339
348
|
|
|
340
349
|
//# sourceMappingURL=whats-app-flows.js.map
|
|
@@ -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, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, __SamvaRuntimeSensitiveString } from "./shared.js";
|
|
5
5
|
export type WhatsAppSetupLinkStatus = "pending" | "completed" | "revoked" | "expired";
|
|
@@ -245,38 +245,28 @@ export type WhatsappSetupLinksRevoke500 = InternalError;
|
|
|
245
245
|
export declare const WhatsappSetupLinksRevoke500: typeof InternalError;
|
|
246
246
|
export type WhatsappSetupLinksRevoke504 = GatewayTimeoutError;
|
|
247
247
|
export declare const WhatsappSetupLinksRevoke504: typeof GatewayTimeoutError;
|
|
248
|
-
declare const
|
|
249
|
-
readonly
|
|
250
|
-
readonly
|
|
251
|
-
readonly
|
|
252
|
-
readonly
|
|
253
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
254
|
-
readonly
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
readonly
|
|
269
|
-
|
|
270
|
-
}, readonly [Schema.Struct<{
|
|
271
|
-
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
272
|
-
readonly message: Schema.String;
|
|
273
|
-
}>], {
|
|
274
|
-
readonly _tag: "BillingProviderError";
|
|
275
|
-
readonly message: string;
|
|
276
|
-
}>, Schema.Struct<{
|
|
277
|
-
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
278
|
-
readonly message: Schema.String;
|
|
279
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
248
|
+
export declare const WhatsappSetupLinksListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"whatsappSetupLinksList", "GET", "/v1/whatsapp/setup-links", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
249
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
250
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
251
|
+
readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
|
|
252
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"completed">, Schema.Literal<"revoked">, Schema.Literal<"expired">]>>;
|
|
253
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
254
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
255
|
+
readonly id: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
256
|
+
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
257
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
258
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"completed">, Schema.Literal<"revoked">, Schema.Literal<"expired">]>;
|
|
259
|
+
readonly redirectUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
260
|
+
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
261
|
+
readonly expiresAt: Schema.String;
|
|
262
|
+
readonly businessAccountId: Schema.Union<readonly [Schema.brand<Schema.String, "WhatsAppBusinessAccountId">, Schema.Null]>;
|
|
263
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
264
|
+
readonly revokedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
265
|
+
readonly createdAt: Schema.String;
|
|
266
|
+
readonly updatedAt: Schema.String;
|
|
267
|
+
}>>;
|
|
268
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
269
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
280
270
|
readonly _tag: "ForbiddenError";
|
|
281
271
|
readonly message: string;
|
|
282
272
|
}, readonly [Schema.Struct<{
|
|
@@ -324,50 +314,6 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
324
314
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
325
315
|
readonly message: Schema.String;
|
|
326
316
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
327
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
328
|
-
readonly _tag: "PaymentRequiredError";
|
|
329
|
-
readonly message: string;
|
|
330
|
-
readonly resource: string;
|
|
331
|
-
readonly currentUsage: number;
|
|
332
|
-
readonly limit: number;
|
|
333
|
-
}, readonly [Schema.Struct<{
|
|
334
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
335
|
-
readonly message: Schema.String;
|
|
336
|
-
readonly resource: Schema.String;
|
|
337
|
-
readonly currentUsage: Schema.Finite;
|
|
338
|
-
readonly limit: Schema.Finite;
|
|
339
|
-
}>], {
|
|
340
|
-
readonly _tag: "PaymentRequiredError";
|
|
341
|
-
readonly message: string;
|
|
342
|
-
readonly resource: string;
|
|
343
|
-
readonly currentUsage: number;
|
|
344
|
-
readonly limit: number;
|
|
345
|
-
}>, Schema.Struct<{
|
|
346
|
-
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
347
|
-
readonly message: Schema.String;
|
|
348
|
-
readonly resource: Schema.String;
|
|
349
|
-
readonly currentUsage: Schema.Finite;
|
|
350
|
-
readonly limit: Schema.Finite;
|
|
351
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
352
|
-
readonly _tag: "ResourceNotFoundError";
|
|
353
|
-
readonly resource: string;
|
|
354
|
-
readonly id: string;
|
|
355
|
-
readonly message: string;
|
|
356
|
-
}, readonly [Schema.Struct<{
|
|
357
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
358
|
-
readonly resource: Schema.String;
|
|
359
|
-
readonly id: Schema.String;
|
|
360
|
-
readonly message: Schema.String;
|
|
361
|
-
}>], {
|
|
362
|
-
readonly _tag: "ResourceNotFoundError";
|
|
363
|
-
readonly resource: string;
|
|
364
|
-
readonly id: string;
|
|
365
|
-
readonly message: string;
|
|
366
|
-
}>, Schema.Struct<{
|
|
367
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
368
|
-
readonly resource: Schema.String;
|
|
369
|
-
readonly id: Schema.String;
|
|
370
|
-
readonly message: Schema.String;
|
|
371
317
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
372
318
|
readonly _tag: "UnauthorizedError";
|
|
373
319
|
readonly message: string;
|
|
@@ -400,9 +346,13 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
400
346
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
401
347
|
readonly message: Schema.String;
|
|
402
348
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
403
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
404
|
-
|
|
405
|
-
|
|
349
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
350
|
+
export declare const WhatsappSetupLinksCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"whatsappSetupLinksCreate", "POST", "/v1/whatsapp/setup-links", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
351
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
352
|
+
readonly redirectUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
353
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
354
|
+
readonly expiresAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
355
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
406
356
|
readonly id: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
407
357
|
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
408
358
|
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
@@ -415,7 +365,20 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
415
365
|
readonly revokedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
416
366
|
readonly createdAt: Schema.String;
|
|
417
367
|
readonly updatedAt: Schema.String;
|
|
418
|
-
|
|
368
|
+
readonly url: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
369
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
|
|
370
|
+
readonly _tag: "BillingProviderError";
|
|
371
|
+
readonly message: string;
|
|
372
|
+
}, readonly [Schema.Struct<{
|
|
373
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
374
|
+
readonly message: Schema.String;
|
|
375
|
+
}>], {
|
|
376
|
+
readonly _tag: "BillingProviderError";
|
|
377
|
+
readonly message: string;
|
|
378
|
+
}>, Schema.Struct<{
|
|
379
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
380
|
+
readonly message: Schema.String;
|
|
381
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
419
382
|
readonly _tag: "ForbiddenError";
|
|
420
383
|
readonly message: string;
|
|
421
384
|
}, readonly [Schema.Struct<{
|
|
@@ -463,6 +426,30 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
463
426
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
464
427
|
readonly message: Schema.String;
|
|
465
428
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
429
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
430
|
+
readonly _tag: "PaymentRequiredError";
|
|
431
|
+
readonly message: string;
|
|
432
|
+
readonly resource: string;
|
|
433
|
+
readonly currentUsage: number;
|
|
434
|
+
readonly limit: number;
|
|
435
|
+
}, readonly [Schema.Struct<{
|
|
436
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
437
|
+
readonly message: Schema.String;
|
|
438
|
+
readonly resource: Schema.String;
|
|
439
|
+
readonly currentUsage: Schema.Finite;
|
|
440
|
+
readonly limit: Schema.Finite;
|
|
441
|
+
}>], {
|
|
442
|
+
readonly _tag: "PaymentRequiredError";
|
|
443
|
+
readonly message: string;
|
|
444
|
+
readonly resource: string;
|
|
445
|
+
readonly currentUsage: number;
|
|
446
|
+
readonly limit: number;
|
|
447
|
+
}>, Schema.Struct<{
|
|
448
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
449
|
+
readonly message: Schema.String;
|
|
450
|
+
readonly resource: Schema.String;
|
|
451
|
+
readonly currentUsage: Schema.Finite;
|
|
452
|
+
readonly limit: Schema.Finite;
|
|
466
453
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
467
454
|
readonly _tag: "ResourceNotFoundError";
|
|
468
455
|
readonly resource: string;
|
|
@@ -515,27 +502,22 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
515
502
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
516
503
|
readonly message: Schema.String;
|
|
517
504
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
518
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
519
|
-
|
|
520
|
-
readonly
|
|
521
|
-
|
|
522
|
-
readonly
|
|
523
|
-
|
|
524
|
-
readonly
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
readonly revokedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
535
|
-
readonly createdAt: Schema.String;
|
|
536
|
-
readonly updatedAt: Schema.String;
|
|
537
|
-
}>>;
|
|
538
|
-
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
505
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
506
|
+
export declare const WhatsappSetupLinksGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"whatsappSetupLinksGet", "GET", "/v1/whatsapp/setup-links/:linkId", Schema.toCodecStringTree<Schema.Struct<{
|
|
507
|
+
readonly linkId: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
508
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
509
|
+
readonly id: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
510
|
+
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
511
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
512
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"completed">, Schema.Literal<"revoked">, Schema.Literal<"expired">]>;
|
|
513
|
+
readonly redirectUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
514
|
+
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
515
|
+
readonly expiresAt: Schema.String;
|
|
516
|
+
readonly businessAccountId: Schema.Union<readonly [Schema.brand<Schema.String, "WhatsAppBusinessAccountId">, Schema.Null]>;
|
|
517
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
518
|
+
readonly revokedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
519
|
+
readonly createdAt: Schema.String;
|
|
520
|
+
readonly updatedAt: Schema.String;
|
|
539
521
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
540
522
|
readonly _tag: "ForbiddenError";
|
|
541
523
|
readonly message: string;
|
|
@@ -584,6 +566,26 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
584
566
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
585
567
|
readonly message: Schema.String;
|
|
586
568
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
569
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
570
|
+
readonly _tag: "ResourceNotFoundError";
|
|
571
|
+
readonly resource: string;
|
|
572
|
+
readonly id: string;
|
|
573
|
+
readonly message: string;
|
|
574
|
+
}, readonly [Schema.Struct<{
|
|
575
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
576
|
+
readonly resource: Schema.String;
|
|
577
|
+
readonly id: Schema.String;
|
|
578
|
+
readonly message: Schema.String;
|
|
579
|
+
}>], {
|
|
580
|
+
readonly _tag: "ResourceNotFoundError";
|
|
581
|
+
readonly resource: string;
|
|
582
|
+
readonly id: string;
|
|
583
|
+
readonly message: string;
|
|
584
|
+
}>, Schema.Struct<{
|
|
585
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
586
|
+
readonly resource: Schema.String;
|
|
587
|
+
readonly id: Schema.String;
|
|
588
|
+
readonly message: Schema.String;
|
|
587
589
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
588
590
|
readonly _tag: "UnauthorizedError";
|
|
589
591
|
readonly message: string;
|
|
@@ -616,7 +618,8 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
616
618
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
617
619
|
readonly message: Schema.String;
|
|
618
620
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
619
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
621
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
622
|
+
export declare const WhatsappSetupLinksRevokeEndpoint: HttpApiEndpoint.HttpApiEndpoint<"whatsappSetupLinksRevoke", "POST", "/v1/whatsapp/setup-links/:linkId/revoke", Schema.toCodecStringTree<Schema.Struct<{
|
|
620
623
|
readonly linkId: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
621
624
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
622
625
|
readonly id: Schema.brand<Schema.String, "WhatsAppSetupLinkId">;
|
|
@@ -747,7 +750,4 @@ declare const WhatsAppSetupLinksGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp
|
|
|
747
750
|
readonly _tag: Schema.tag<"WhatsAppSetupLinkUnavailableError">;
|
|
748
751
|
readonly reason: Schema.Union<readonly [Schema.Literal<"completed">, Schema.Literal<"revoked">, Schema.Literal<"expired">]>;
|
|
749
752
|
readonly message: Schema.String;
|
|
750
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
751
|
-
export declare class WhatsAppSetupLinksGroup extends WhatsAppSetupLinksGroup_base {
|
|
752
|
-
}
|
|
753
|
-
export {};
|
|
753
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SensitiveString } from "../runtime.js";
|
|
2
|
-
import { HttpApiEndpoint,
|
|
2
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
import { ApiKeySecurityMiddleware, BillingProviderError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError } from "./shared.js";
|
|
5
5
|
// src/effect/generated/whats-app-setup-links.ts
|
|
@@ -94,7 +94,7 @@ const WhatsappSetupLinksRevoke410 = WhatsAppSetupLinkUnavailableError;
|
|
|
94
94
|
const WhatsappSetupLinksRevoke422 = ValidationError;
|
|
95
95
|
const WhatsappSetupLinksRevoke500 = InternalError;
|
|
96
96
|
const WhatsappSetupLinksRevoke504 = GatewayTimeoutError;
|
|
97
|
-
|
|
97
|
+
const WhatsappSetupLinksListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappSetupLinksList", "/v1/whatsapp/setup-links", {
|
|
98
98
|
query: WhatsappSetupLinksListQuery,
|
|
99
99
|
success: WhatsappSetupLinksList200,
|
|
100
100
|
error: [
|
|
@@ -105,7 +105,8 @@ var WhatsAppSetupLinksGroup = class extends HttpApiGroup.make("WhatsApp setup li
|
|
|
105
105
|
WhatsappSetupLinksList500,
|
|
106
106
|
WhatsappSetupLinksList504.pipe(HttpApiSchema.status(504))
|
|
107
107
|
]
|
|
108
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.list").annotate(OpenApi.Summary, "List WhatsApp setup links").annotate(OpenApi.Description, "Returns setup links newest first, by namespace and status when named.")
|
|
108
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.list").annotate(OpenApi.Summary, "List WhatsApp setup links").annotate(OpenApi.Description, "Returns setup links newest first, by namespace and status when named."))();
|
|
109
|
+
const WhatsappSetupLinksCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappSetupLinksCreate", "/v1/whatsapp/setup-links", {
|
|
109
110
|
payload: WhatsappSetupLinksCreateRequestJson,
|
|
110
111
|
success: WhatsappSetupLinksCreate201.pipe(HttpApiSchema.status(201)),
|
|
111
112
|
error: [
|
|
@@ -119,7 +120,8 @@ var WhatsAppSetupLinksGroup = class extends HttpApiGroup.make("WhatsApp setup li
|
|
|
119
120
|
WhatsappSetupLinksCreate502.pipe(HttpApiSchema.status(502)),
|
|
120
121
|
WhatsappSetupLinksCreate504.pipe(HttpApiSchema.status(504))
|
|
121
122
|
]
|
|
122
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.create").annotate(OpenApi.Summary, "Create a WhatsApp setup link").annotate(OpenApi.Description, "Creates a single-use link your customer opens to connect their WhatsApp number into the namespace, without a Samva account. The response carries the link's URL once; Samva keeps only a digest of its token. The link expires at `expiresAt`, at most 30 days ahead and 7 days when omitted.")
|
|
123
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.create").annotate(OpenApi.Summary, "Create a WhatsApp setup link").annotate(OpenApi.Description, "Creates a single-use link your customer opens to connect their WhatsApp number into the namespace, without a Samva account. The response carries the link's URL once; Samva keeps only a digest of its token. The link expires at `expiresAt`, at most 30 days ahead and 7 days when omitted."))();
|
|
124
|
+
const WhatsappSetupLinksGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappSetupLinksGet", "/v1/whatsapp/setup-links/:linkId", {
|
|
123
125
|
params: WhatsappSetupLinksGetPathParams,
|
|
124
126
|
success: WhatsappSetupLinksGet200,
|
|
125
127
|
error: [
|
|
@@ -131,7 +133,8 @@ var WhatsAppSetupLinksGroup = class extends HttpApiGroup.make("WhatsApp setup li
|
|
|
131
133
|
WhatsappSetupLinksGet500,
|
|
132
134
|
WhatsappSetupLinksGet504.pipe(HttpApiSchema.status(504))
|
|
133
135
|
]
|
|
134
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.get").annotate(OpenApi.Summary, "Get a WhatsApp setup link").annotate(OpenApi.Description, "Returns a setup link’s status and connection details.")
|
|
136
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.get").annotate(OpenApi.Summary, "Get a WhatsApp setup link").annotate(OpenApi.Description, "Returns a setup link’s status and connection details."))();
|
|
137
|
+
const WhatsappSetupLinksRevokeEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappSetupLinksRevoke", "/v1/whatsapp/setup-links/:linkId/revoke", {
|
|
135
138
|
params: WhatsappSetupLinksRevokePathParams,
|
|
136
139
|
success: WhatsappSetupLinksRevoke200,
|
|
137
140
|
error: [
|
|
@@ -144,7 +147,7 @@ var WhatsAppSetupLinksGroup = class extends HttpApiGroup.make("WhatsApp setup li
|
|
|
144
147
|
WhatsappSetupLinksRevoke500,
|
|
145
148
|
WhatsappSetupLinksRevoke504.pipe(HttpApiSchema.status(504))
|
|
146
149
|
]
|
|
147
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.revoke").annotate(OpenApi.Summary, "Revoke a WhatsApp setup link").annotate(OpenApi.Description, "Stops a pending link from connecting a number. A link that already connected one, was revoked, or expired answers 410."))
|
|
148
|
-
export { CreatedWhatsAppSetupLink, WhatsAppSetupLink, WhatsAppSetupLinkId, WhatsAppSetupLinkPage, WhatsAppSetupLinkStatus,
|
|
150
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappSetupLinks.revoke").annotate(OpenApi.Summary, "Revoke a WhatsApp setup link").annotate(OpenApi.Description, "Stops a pending link from connecting a number. A link that already connected one, was revoked, or expired answers 410."))();
|
|
151
|
+
export { CreatedWhatsAppSetupLink, WhatsAppSetupLink, WhatsAppSetupLinkId, WhatsAppSetupLinkPage, WhatsAppSetupLinkStatus, WhatsappSetupLinksCreate201, WhatsappSetupLinksCreate400, WhatsappSetupLinksCreate401, WhatsappSetupLinksCreate402, WhatsappSetupLinksCreate403, WhatsappSetupLinksCreate404, WhatsappSetupLinksCreate422, WhatsappSetupLinksCreate500, WhatsappSetupLinksCreate502, WhatsappSetupLinksCreate504, WhatsappSetupLinksCreateEndpoint, WhatsappSetupLinksCreateRequestJson, WhatsappSetupLinksGet200, WhatsappSetupLinksGet400, WhatsappSetupLinksGet401, WhatsappSetupLinksGet403, WhatsappSetupLinksGet404, WhatsappSetupLinksGet422, WhatsappSetupLinksGet500, WhatsappSetupLinksGet504, WhatsappSetupLinksGetEndpoint, WhatsappSetupLinksGetPathParams, WhatsappSetupLinksList200, WhatsappSetupLinksList400, WhatsappSetupLinksList401, WhatsappSetupLinksList403, WhatsappSetupLinksList422, WhatsappSetupLinksList500, WhatsappSetupLinksList504, WhatsappSetupLinksListEndpoint, WhatsappSetupLinksListQuery, WhatsappSetupLinksRevoke200, WhatsappSetupLinksRevoke400, WhatsappSetupLinksRevoke401, WhatsappSetupLinksRevoke403, WhatsappSetupLinksRevoke404, WhatsappSetupLinksRevoke410, WhatsappSetupLinksRevoke422, WhatsappSetupLinksRevoke500, WhatsappSetupLinksRevoke504, WhatsappSetupLinksRevokeEndpoint, WhatsappSetupLinksRevokePathParams };
|
|
149
152
|
|
|
150
153
|
//# sourceMappingURL=whats-app-setup-links.js.map
|