samva 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/README.md +9 -8
- package/dist/effect/accounts.js +9 -10
- package/dist/effect/agents.js +16 -17
- package/dist/effect/analytics.js +9 -10
- package/dist/effect/api-keys.js +11 -12
- package/dist/effect/approval-requests.js +7 -8
- package/dist/effect/attachments.js +7 -8
- package/dist/effect/brands.js +9 -10
- package/dist/effect/campaigns.js +18 -19
- package/dist/effect/contact-groups.js +13 -14
- package/dist/effect/contacts.js +29 -30
- package/dist/effect/conversations.js +16 -17
- package/dist/effect/custom-fields.js +7 -8
- package/dist/effect/descriptors/accounts.d.ts +50 -52
- package/dist/effect/descriptors/accounts.js +50 -52
- package/dist/effect/descriptors/agents.d.ts +113 -115
- package/dist/effect/descriptors/agents.js +120 -122
- package/dist/effect/descriptors/analytics.d.ts +47 -49
- package/dist/effect/descriptors/analytics.js +42 -44
- package/dist/effect/descriptors/api-keys.d.ts +69 -71
- package/dist/effect/descriptors/api-keys.js +73 -75
- package/dist/effect/descriptors/approval-requests.d.ts +34 -36
- package/dist/effect/descriptors/approval-requests.js +36 -38
- package/dist/effect/descriptors/attachments.d.ts +34 -36
- package/dist/effect/descriptors/attachments.js +36 -38
- package/dist/effect/descriptors/brands.d.ts +51 -53
- package/dist/effect/descriptors/brands.js +53 -55
- package/dist/effect/descriptors/campaigns.d.ts +130 -132
- package/dist/effect/descriptors/campaigns.js +137 -139
- package/dist/effect/descriptors/contact-groups.d.ts +86 -88
- package/dist/effect/descriptors/contact-groups.js +90 -92
- package/dist/effect/descriptors/contacts.d.ts +242 -244
- package/dist/effect/descriptors/contacts.js +227 -229
- package/dist/effect/descriptors/conversations.d.ts +114 -116
- package/dist/effect/descriptors/conversations.js +123 -125
- package/dist/effect/descriptors/custom-fields.d.ts +33 -35
- package/dist/effect/descriptors/custom-fields.js +33 -35
- package/dist/effect/descriptors/email.d.ts +623 -625
- package/dist/effect/descriptors/email.js +562 -578
- package/dist/effect/descriptors/events.d.ts +15 -17
- package/dist/effect/descriptors/events.js +14 -16
- package/dist/effect/descriptors/feedback.d.ts +7 -9
- package/dist/effect/descriptors/feedback.js +3 -3
- package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
- package/dist/effect/descriptors/integrations-catalog.js +142 -144
- package/dist/effect/descriptors/integrations.d.ts +60 -62
- package/dist/effect/descriptors/integrations.js +63 -65
- package/dist/effect/descriptors/journeys.d.ts +123 -125
- package/dist/effect/descriptors/journeys.js +133 -135
- package/dist/effect/descriptors/logs.d.ts +16 -18
- package/dist/effect/descriptors/logs.js +16 -18
- package/dist/effect/descriptors/mailboxes.d.ts +780 -782
- package/dist/effect/descriptors/mailboxes.js +795 -797
- package/dist/effect/descriptors/media.d.ts +43 -45
- package/dist/effect/descriptors/media.js +46 -48
- package/dist/effect/descriptors/messages.d.ts +86 -88
- package/dist/effect/descriptors/messages.js +83 -92
- package/dist/effect/descriptors/namespaces.d.ts +96 -98
- package/dist/effect/descriptors/namespaces.js +107 -109
- package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
- package/dist/effect/descriptors/newsletter-domains.js +39 -41
- package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
- package/dist/effect/descriptors/newsletter-issues.js +109 -111
- package/dist/effect/descriptors/newsletters.d.ts +43 -45
- package/dist/effect/descriptors/newsletters.js +46 -48
- package/dist/effect/descriptors/operations.d.ts +25 -27
- package/dist/effect/descriptors/operations.js +26 -28
- package/dist/effect/descriptors/organizations.d.ts +96 -98
- package/dist/effect/descriptors/organizations.js +86 -88
- package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
- package/dist/effect/descriptors/phone-numbers.js +40 -42
- package/dist/effect/descriptors/policies.d.ts +26 -28
- package/dist/effect/descriptors/policies.js +29 -31
- package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
- package/dist/effect/descriptors/scheduled-messages.js +43 -45
- package/dist/effect/descriptors/subscriptions.d.ts +7 -9
- package/dist/effect/descriptors/subscriptions.js +3 -3
- package/dist/effect/descriptors/template-registrations.d.ts +26 -28
- package/dist/effect/descriptors/template-registrations.js +29 -31
- package/dist/effect/descriptors/template-share-links.d.ts +44 -46
- package/dist/effect/descriptors/template-share-links.js +49 -51
- package/dist/effect/descriptors/templates.d.ts +361 -363
- package/dist/effect/descriptors/templates.js +348 -350
- package/dist/effect/descriptors/topic-forms.d.ts +44 -46
- package/dist/effect/descriptors/topic-forms.js +49 -51
- package/dist/effect/descriptors/topics.d.ts +77 -79
- package/dist/effect/descriptors/topics.js +80 -82
- package/dist/effect/descriptors/webhooks.d.ts +96 -98
- package/dist/effect/descriptors/webhooks.js +103 -105
- package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
- package/dist/effect/descriptors/whats-app-flows.js +90 -92
- package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
- package/dist/effect/descriptors/whats-app-setup-links.js +33 -35
- package/dist/effect/descriptors/whats-app.d.ts +110 -112
- package/dist/effect/descriptors/whats-app.js +111 -113
- package/dist/effect/descriptors/whoami.d.ts +7 -9
- package/dist/effect/descriptors/whoami.js +3 -3
- package/dist/effect/email.js +66 -67
- package/dist/effect/events.js +5 -6
- package/dist/effect/feedback.js +4 -4
- package/dist/effect/generated/accounts.d.ts +144 -142
- package/dist/effect/generated/accounts.js +14 -9
- package/dist/effect/generated/agents.d.ts +1502 -1493
- package/dist/effect/generated/agents.js +28 -16
- package/dist/effect/generated/analytics.d.ts +55 -53
- package/dist/effect/generated/analytics.js +14 -9
- package/dist/effect/generated/api-keys.d.ts +216 -212
- package/dist/effect/generated/api-keys.js +18 -11
- package/dist/effect/generated/approval-requests.d.ts +60 -60
- package/dist/effect/generated/approval-requests.js +10 -7
- package/dist/effect/generated/attachments.d.ts +32 -32
- package/dist/effect/generated/attachments.js +10 -7
- package/dist/effect/generated/brands.d.ts +179 -177
- package/dist/effect/generated/brands.js +14 -9
- package/dist/effect/generated/campaigns.d.ts +1083 -1072
- package/dist/effect/generated/campaigns.js +32 -18
- package/dist/effect/generated/contact-events.d.ts +3 -6
- package/dist/effect/generated/contact-events.js +4 -4
- package/dist/effect/generated/contact-groups.d.ts +186 -180
- package/dist/effect/generated/contact-groups.js +22 -13
- package/dist/effect/generated/contacts.d.ts +1565 -1545
- package/dist/effect/generated/contacts.js +50 -27
- package/dist/effect/generated/conversations.d.ts +340 -331
- package/dist/effect/generated/conversations.js +28 -16
- package/dist/effect/generated/custom-fields.d.ts +63 -63
- package/dist/effect/generated/custom-fields.js +10 -7
- package/dist/effect/generated/email.d.ts +2731 -2671
- package/dist/effect/generated/email.js +130 -67
- package/dist/effect/generated/events.d.ts +160 -162
- package/dist/effect/generated/events.js +6 -5
- package/dist/effect/generated/feedback.d.ts +3 -6
- package/dist/effect/generated/feedback.js +4 -4
- package/dist/effect/generated/index.d.ts +174 -45
- package/dist/effect/generated/integrations-catalog.d.ts +459 -446
- package/dist/effect/generated/integrations-catalog.js +36 -20
- package/dist/effect/generated/integrations.d.ts +155 -152
- package/dist/effect/generated/integrations.js +16 -10
- package/dist/effect/generated/journeys.d.ts +864 -854
- package/dist/effect/generated/journeys.js +30 -17
- package/dist/effect/generated/logs.d.ts +147 -149
- package/dist/effect/generated/logs.js +6 -5
- package/dist/effect/generated/mailboxes.d.ts +7271 -7196
- package/dist/effect/generated/mailboxes.js +160 -82
- package/dist/effect/generated/media.d.ts +77 -76
- package/dist/effect/generated/media.js +12 -8
- package/dist/effect/generated/messages.d.ts +1092 -1086
- package/dist/effect/generated/messages.js +22 -13
- package/dist/effect/generated/namespaces.d.ts +184 -177
- package/dist/effect/generated/namespaces.js +24 -14
- package/dist/effect/generated/newsletter-domains.d.ts +57 -57
- package/dist/effect/generated/newsletter-domains.js +10 -7
- package/dist/effect/generated/newsletter-issues.d.ts +225 -218
- package/dist/effect/generated/newsletter-issues.js +24 -14
- package/dist/effect/generated/newsletters.d.ts +46 -45
- package/dist/effect/generated/newsletters.js +12 -8
- package/dist/effect/generated/operations.d.ts +79 -80
- package/dist/effect/generated/operations.js +8 -6
- package/dist/effect/generated/organizations.d.ts +438 -430
- package/dist/effect/generated/organizations.js +26 -15
- package/dist/effect/generated/phone-numbers.d.ts +87 -86
- package/dist/effect/generated/phone-numbers.js +12 -8
- package/dist/effect/generated/policies.d.ts +64 -65
- package/dist/effect/generated/policies.js +8 -6
- package/dist/effect/generated/scheduled-messages.d.ts +66 -65
- package/dist/effect/generated/scheduled-messages.js +12 -8
- package/dist/effect/generated/shared.d.ts +33 -33
- package/dist/effect/generated/shared.js +61 -61
- package/dist/effect/generated/subscriptions.d.ts +3 -6
- package/dist/effect/generated/subscriptions.js +4 -4
- package/dist/effect/generated/template-registrations.d.ts +135 -136
- package/dist/effect/generated/template-registrations.js +8 -6
- package/dist/effect/generated/template-share-links.d.ts +25 -24
- package/dist/effect/generated/template-share-links.js +12 -8
- package/dist/effect/generated/templates.d.ts +2678 -2645
- package/dist/effect/generated/templates.js +76 -40
- package/dist/effect/generated/topic-forms.d.ts +47 -46
- package/dist/effect/generated/topic-forms.js +12 -8
- package/dist/effect/generated/topics.d.ts +204 -199
- package/dist/effect/generated/topics.js +20 -12
- package/dist/effect/generated/webhooks.d.ts +268 -261
- package/dist/effect/generated/webhooks.js +24 -14
- package/dist/effect/generated/whats-app-flows.d.ts +250 -244
- package/dist/effect/generated/whats-app-flows.js +22 -13
- package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
- package/dist/effect/generated/whats-app-setup-links.js +10 -7
- package/dist/effect/generated/whats-app.d.ts +439 -430
- package/dist/effect/generated/whats-app.js +28 -16
- package/dist/effect/generated/whoami.d.ts +3 -6
- package/dist/effect/generated/whoami.js +4 -4
- package/dist/effect/integrations-catalog.js +20 -21
- package/dist/effect/integrations.js +10 -11
- package/dist/effect/internal/client.d.ts +2 -1
- package/dist/effect/internal/client.js +3 -3
- package/dist/effect/internal/email-sender.js +5 -4
- package/dist/effect/internal/operation.d.ts +11 -7
- package/dist/effect/internal/operation.js +17 -12
- package/dist/effect/internal/send.js +11 -8
- package/dist/effect/journeys.js +17 -18
- package/dist/effect/logs.js +5 -6
- package/dist/effect/mailboxes.js +82 -83
- package/dist/effect/media.js +8 -9
- package/dist/effect/messages.js +12 -13
- package/dist/effect/namespaces.js +14 -15
- package/dist/effect/newsletter-domains.js +7 -8
- package/dist/effect/newsletter-issues.js +14 -15
- package/dist/effect/newsletters.js +8 -9
- package/dist/effect/operations.js +6 -7
- package/dist/effect/organizations.js +15 -16
- package/dist/effect/phone-numbers.js +8 -9
- package/dist/effect/policies.js +6 -7
- package/dist/effect/runtime.js +3 -3
- package/dist/effect/scheduled-messages.js +8 -9
- package/dist/effect/subscriptions.js +4 -4
- package/dist/effect/template-registrations.js +6 -7
- package/dist/effect/template-share-links.js +8 -9
- package/dist/effect/templates.js +40 -41
- package/dist/effect/topic-forms.js +8 -9
- package/dist/effect/topics.js +12 -13
- package/dist/effect/webhooks.js +14 -15
- package/dist/effect/whatsapp-flows.js +13 -14
- package/dist/effect/whatsapp-setup-links.js +7 -8
- package/dist/effect/whatsapp.js +16 -17
- package/dist/effect/whoami.js +4 -4
- package/dist/package.json.js +1 -1
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NonEmptySensitiveString, 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, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
5
5
|
// src/effect/generated/whats-app.ts
|
|
@@ -516,7 +516,7 @@ const WhatsappGetTemplateStats403 = ForbiddenError;
|
|
|
516
516
|
const WhatsappGetTemplateStats422 = ValidationError;
|
|
517
517
|
const WhatsappGetTemplateStats500 = InternalError;
|
|
518
518
|
const WhatsappGetTemplateStats504 = GatewayTimeoutError;
|
|
519
|
-
|
|
519
|
+
const WhatsappListBusinessAccountsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappListBusinessAccounts", "/v1/whatsapp/business-accounts", {
|
|
520
520
|
query: WhatsappListBusinessAccountsQuery,
|
|
521
521
|
success: WhatsappListBusinessAccounts200,
|
|
522
522
|
error: [
|
|
@@ -527,7 +527,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
527
527
|
WhatsappListBusinessAccounts500,
|
|
528
528
|
WhatsappListBusinessAccounts504.pipe(HttpApiSchema.status(504))
|
|
529
529
|
]
|
|
530
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.listBusinessAccounts").annotate(OpenApi.Summary, "List WhatsApp business accounts").annotate(OpenApi.Description, "Lists connected WhatsApp business accounts, newest first. Pass nextCursor back as cursor to continue.")
|
|
530
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.listBusinessAccounts").annotate(OpenApi.Summary, "List WhatsApp business accounts").annotate(OpenApi.Description, "Lists connected WhatsApp business accounts, newest first. Pass nextCursor back as cursor to continue."))();
|
|
531
|
+
const WhatsappConnectBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappConnectBusinessAccount", "/v1/whatsapp/business-accounts", {
|
|
531
532
|
payload: WhatsappConnectBusinessAccountRequestJson,
|
|
532
533
|
success: WhatsappConnectBusinessAccount201.pipe(HttpApiSchema.status(201)),
|
|
533
534
|
error: [
|
|
@@ -542,7 +543,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
542
543
|
WhatsappConnectBusinessAccount502.pipe(HttpApiSchema.status(502)),
|
|
543
544
|
WhatsappConnectBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
544
545
|
]
|
|
545
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.connectBusinessAccount").annotate(OpenApi.Summary, "Connect a WhatsApp business account").annotate(OpenApi.Description, "Completes embedded signup: exchanges its code for the business's Meta token, checks the token grants Samva both WhatsApp permissions over the WABA, subscribes Samva to the WABA's webhooks, and registers the phone number with the Cloud API. A number that stays on the WhatsApp Business app (coexistence) is already registered, so it skips registration and Samva asks Meta to sync its contacts and chat history. A number Meta has not verified yet connects as pending; sync it once verification finishes.")
|
|
546
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.connectBusinessAccount").annotate(OpenApi.Summary, "Connect a WhatsApp business account").annotate(OpenApi.Description, "Completes embedded signup: exchanges its code for the business's Meta token, checks the token grants Samva both WhatsApp permissions over the WABA, subscribes Samva to the WABA's webhooks, and registers the phone number with the Cloud API. A number that stays on the WhatsApp Business app (coexistence) is already registered, so it skips registration and Samva asks Meta to sync its contacts and chat history. A number Meta has not verified yet connects as pending; sync it once verification finishes."))();
|
|
547
|
+
const WhatsappGetBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetBusinessAccount", "/v1/whatsapp/business-accounts/:accountId", {
|
|
546
548
|
params: WhatsappGetBusinessAccountPathParams,
|
|
547
549
|
success: WhatsappGetBusinessAccount200,
|
|
548
550
|
error: [
|
|
@@ -554,7 +556,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
554
556
|
WhatsappGetBusinessAccount500,
|
|
555
557
|
WhatsappGetBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
556
558
|
]
|
|
557
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getBusinessAccount").annotate(OpenApi.Summary, "Get a WhatsApp business account").annotate(OpenApi.Description, "Returns a single connected WhatsApp business account by its identifier.")
|
|
559
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getBusinessAccount").annotate(OpenApi.Summary, "Get a WhatsApp business account").annotate(OpenApi.Description, "Returns a single connected WhatsApp business account by its identifier."))();
|
|
560
|
+
const WhatsappDisconnectBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("whatsappDisconnectBusinessAccount", "/v1/whatsapp/business-accounts/:accountId", {
|
|
558
561
|
params: WhatsappDisconnectBusinessAccountPathParams,
|
|
559
562
|
success: WhatsappDisconnectBusinessAccount200,
|
|
560
563
|
error: [
|
|
@@ -566,7 +569,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
566
569
|
WhatsappDisconnectBusinessAccount500,
|
|
567
570
|
WhatsappDisconnectBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
568
571
|
]
|
|
569
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.disconnectBusinessAccount").annotate(OpenApi.Summary, "Disconnect a WhatsApp business account").annotate(OpenApi.Description, "Disconnects a WhatsApp business account from the organization.")
|
|
572
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.disconnectBusinessAccount").annotate(OpenApi.Summary, "Disconnect a WhatsApp business account").annotate(OpenApi.Description, "Disconnects a WhatsApp business account from the organization."))();
|
|
573
|
+
const WhatsappUpdateBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.patch("whatsappUpdateBusinessAccount", "/v1/whatsapp/business-accounts/:accountId", {
|
|
570
574
|
params: WhatsappUpdateBusinessAccountPathParams,
|
|
571
575
|
payload: WhatsappUpdateBusinessAccountRequestJson,
|
|
572
576
|
success: WhatsappUpdateBusinessAccount200,
|
|
@@ -579,7 +583,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
579
583
|
WhatsappUpdateBusinessAccount500,
|
|
580
584
|
WhatsappUpdateBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
581
585
|
]
|
|
582
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.updateBusinessAccount").annotate(OpenApi.Summary, "Update a WhatsApp business account").annotate(OpenApi.Description, "Updates the display name or webhook settings of a connected WhatsApp business account.")
|
|
586
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.updateBusinessAccount").annotate(OpenApi.Summary, "Update a WhatsApp business account").annotate(OpenApi.Description, "Updates the display name or webhook settings of a connected WhatsApp business account."))();
|
|
587
|
+
const WhatsappReleaseBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappReleaseBusinessAccount", "/v1/whatsapp/business-accounts/:accountId/release", {
|
|
583
588
|
params: WhatsappReleaseBusinessAccountPathParams,
|
|
584
589
|
payload: WhatsappReleaseBusinessAccountRequestJson,
|
|
585
590
|
success: WhatsappReleaseBusinessAccount200,
|
|
@@ -593,7 +598,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
593
598
|
WhatsappReleaseBusinessAccount500,
|
|
594
599
|
WhatsappReleaseBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
595
600
|
]
|
|
596
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.releaseBusinessAccount").annotate(OpenApi.Summary, "Release a WhatsApp number to another organization").annotate(OpenApi.Description, "Reserves a disconnected WhatsApp number for the named Samva organization. The recipient claims it through fresh Meta Embedded Signup for the same WhatsApp Business Account, Meta phone number ID, and E.164 number. The old account remains in history and cannot reconnect.")
|
|
601
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.releaseBusinessAccount").annotate(OpenApi.Summary, "Release a WhatsApp number to another organization").annotate(OpenApi.Description, "Reserves a disconnected WhatsApp number for the named Samva organization. The recipient claims it through fresh Meta Embedded Signup for the same WhatsApp Business Account, Meta phone number ID, and E.164 number. The old account remains in history and cannot reconnect."))();
|
|
602
|
+
const WhatsappSetDefaultBusinessAccountEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappSetDefaultBusinessAccount", "/v1/whatsapp/business-accounts/:accountId/set-default", {
|
|
597
603
|
params: WhatsappSetDefaultBusinessAccountPathParams,
|
|
598
604
|
success: WhatsappSetDefaultBusinessAccount200,
|
|
599
605
|
error: [
|
|
@@ -605,7 +611,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
605
611
|
WhatsappSetDefaultBusinessAccount500,
|
|
606
612
|
WhatsappSetDefaultBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
607
613
|
]
|
|
608
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.setDefaultBusinessAccount").annotate(OpenApi.Summary, "Set the default WhatsApp business account").annotate(OpenApi.Description, "Marks a connected WhatsApp business account as the organization's default and returns it.")
|
|
614
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.setDefaultBusinessAccount").annotate(OpenApi.Summary, "Set the default WhatsApp business account").annotate(OpenApi.Description, "Marks a connected WhatsApp business account as the organization's default and returns it."))();
|
|
615
|
+
const WhatsappSyncAccountStatusEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("whatsappSyncAccountStatus", "/v1/whatsapp/business-accounts/:accountId/sync", {
|
|
609
616
|
params: WhatsappSyncAccountStatusPathParams,
|
|
610
617
|
success: WhatsappSyncAccountStatus200,
|
|
611
618
|
error: [
|
|
@@ -618,7 +625,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
618
625
|
WhatsappSyncAccountStatus502.pipe(HttpApiSchema.status(502)),
|
|
619
626
|
WhatsappSyncAccountStatus504.pipe(HttpApiSchema.status(504))
|
|
620
627
|
]
|
|
621
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.syncAccountStatus").annotate(OpenApi.Summary, "Sync a WhatsApp business account status").annotate(OpenApi.Description, "Reads the number's quality rating, messaging limit, and registration from Meta, and registers the number with the Cloud API if it is verified but not yet registered.")
|
|
628
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.syncAccountStatus").annotate(OpenApi.Summary, "Sync a WhatsApp business account status").annotate(OpenApi.Description, "Reads the number's quality rating, messaging limit, and registration from Meta, and registers the number with the Cloud API if it is verified but not yet registered."))();
|
|
629
|
+
const WhatsappGetMediaDownloadUrlEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetMediaDownloadUrl", "/v1/whatsapp/media/:deliveryId/download-url", {
|
|
622
630
|
params: WhatsappGetMediaDownloadUrlPathParams,
|
|
623
631
|
success: WhatsappGetMediaDownloadUrl200,
|
|
624
632
|
error: [
|
|
@@ -630,7 +638,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
630
638
|
WhatsappGetMediaDownloadUrl500,
|
|
631
639
|
WhatsappGetMediaDownloadUrl504.pipe(HttpApiSchema.status(504))
|
|
632
640
|
]
|
|
633
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getMediaDownloadUrl").annotate(OpenApi.Summary, "Get a WhatsApp media download URL").annotate(OpenApi.Description, "Returns a short-lived URL for the media an inbound WhatsApp delivery carried, when Samva stored it.")
|
|
641
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getMediaDownloadUrl").annotate(OpenApi.Summary, "Get a WhatsApp media download URL").annotate(OpenApi.Description, "Returns a short-lived URL for the media an inbound WhatsApp delivery carried, when Samva stored it."))();
|
|
642
|
+
const WhatsappGetServiceWindowBillingEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetServiceWindowBilling", "/v1/whatsapp/service-window/billing", {
|
|
634
643
|
query: WhatsappGetServiceWindowBillingQuery,
|
|
635
644
|
success: WhatsappGetServiceWindowBilling200,
|
|
636
645
|
error: [
|
|
@@ -642,7 +651,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
642
651
|
WhatsappGetServiceWindowBilling500,
|
|
643
652
|
WhatsappGetServiceWindowBilling504.pipe(HttpApiSchema.status(504))
|
|
644
653
|
]
|
|
645
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getServiceWindowBilling").annotate(OpenApi.Summary, "Get WhatsApp service window billing").annotate(OpenApi.Description, "Returns message counts and the estimated Meta cost for a WhatsApp service window.")
|
|
654
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getServiceWindowBilling").annotate(OpenApi.Summary, "Get WhatsApp service window billing").annotate(OpenApi.Description, "Returns message counts and the estimated Meta cost for a WhatsApp service window."))();
|
|
655
|
+
const WhatsappGetServiceWindowStatusEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetServiceWindowStatus", "/v1/whatsapp/service-window/status", {
|
|
646
656
|
query: WhatsappGetServiceWindowStatusQuery,
|
|
647
657
|
success: WhatsappGetServiceWindowStatus200,
|
|
648
658
|
error: [
|
|
@@ -654,7 +664,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
654
664
|
WhatsappGetServiceWindowStatus500,
|
|
655
665
|
WhatsappGetServiceWindowStatus504.pipe(HttpApiSchema.status(504))
|
|
656
666
|
]
|
|
657
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getServiceWindowStatus").annotate(OpenApi.Summary, "Get WhatsApp service window status").annotate(OpenApi.Description, "Returns whether the service window and free entry point are active for a customer and business phone pair.")
|
|
667
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getServiceWindowStatus").annotate(OpenApi.Summary, "Get WhatsApp service window status").annotate(OpenApi.Description, "Returns whether the service window and free entry point are active for a customer and business phone pair."))();
|
|
668
|
+
const WhatsappGetStatsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetStats", "/v1/whatsapp/stats", {
|
|
658
669
|
query: WhatsappGetStatsQuery,
|
|
659
670
|
success: WhatsappGetStats200,
|
|
660
671
|
error: [
|
|
@@ -665,7 +676,8 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
665
676
|
WhatsappGetStats500,
|
|
666
677
|
WhatsappGetStats504.pipe(HttpApiSchema.status(504))
|
|
667
678
|
]
|
|
668
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getStats").annotate(OpenApi.Summary, "Get WhatsApp messaging stats").annotate(OpenApi.Description, "Returns aggregate WhatsApp delivery, read, and failure statistics for the organization.")
|
|
679
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getStats").annotate(OpenApi.Summary, "Get WhatsApp messaging stats").annotate(OpenApi.Description, "Returns aggregate WhatsApp delivery, read, and failure statistics for the organization."))();
|
|
680
|
+
const WhatsappGetTemplateStatsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whatsappGetTemplateStats", "/v1/whatsapp/templates/stats", {
|
|
669
681
|
query: WhatsappGetTemplateStatsQuery,
|
|
670
682
|
success: WhatsappGetTemplateStats200,
|
|
671
683
|
error: [
|
|
@@ -676,7 +688,7 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
676
688
|
WhatsappGetTemplateStats500,
|
|
677
689
|
WhatsappGetTemplateStats504.pipe(HttpApiSchema.status(504))
|
|
678
690
|
]
|
|
679
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getTemplateStats").annotate(OpenApi.Summary, "Get WhatsApp template stats").annotate(OpenApi.Description, "Returns sent, delivered, read, and failed counts and Meta's estimated cost for each WhatsApp template, split by what sent it: a campaign, a journey step, or a direct send. Filter by template, campaign, journey, or the time the message was created."))
|
|
680
|
-
export { MoneyAmount,
|
|
691
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getTemplateStats").annotate(OpenApi.Summary, "Get WhatsApp template stats").annotate(OpenApi.Description, "Returns sent, delivered, read, and failed counts and Meta's estimated cost for each WhatsApp template, split by what sent it: a campaign, a journey step, or a direct send. Filter by template, campaign, journey, or the time the message was created."))();
|
|
692
|
+
export { MoneyAmount, WhatsAppServiceWindowId, WhatsAppTemplateStats, WhatsAppTemplateStatsRow, WhatsAppTemplateStatsSource, WhatsappConnectBusinessAccount201, WhatsappConnectBusinessAccount400, WhatsappConnectBusinessAccount401, WhatsappConnectBusinessAccount402, WhatsappConnectBusinessAccount403, WhatsappConnectBusinessAccount404, WhatsappConnectBusinessAccount409, WhatsappConnectBusinessAccount422, WhatsappConnectBusinessAccount500, WhatsappConnectBusinessAccount502, WhatsappConnectBusinessAccount504, WhatsappConnectBusinessAccountEndpoint, WhatsappConnectBusinessAccountRequestJson, WhatsappDisconnectBusinessAccount200, WhatsappDisconnectBusinessAccount400, WhatsappDisconnectBusinessAccount401, WhatsappDisconnectBusinessAccount403, WhatsappDisconnectBusinessAccount404, WhatsappDisconnectBusinessAccount422, WhatsappDisconnectBusinessAccount500, WhatsappDisconnectBusinessAccount504, WhatsappDisconnectBusinessAccountEndpoint, WhatsappDisconnectBusinessAccountPathParams, WhatsappGetBusinessAccount200, WhatsappGetBusinessAccount400, WhatsappGetBusinessAccount401, WhatsappGetBusinessAccount403, WhatsappGetBusinessAccount404, WhatsappGetBusinessAccount422, WhatsappGetBusinessAccount500, WhatsappGetBusinessAccount504, WhatsappGetBusinessAccountEndpoint, WhatsappGetBusinessAccountPathParams, WhatsappGetMediaDownloadUrl200, WhatsappGetMediaDownloadUrl400, WhatsappGetMediaDownloadUrl401, WhatsappGetMediaDownloadUrl403, WhatsappGetMediaDownloadUrl404, WhatsappGetMediaDownloadUrl422, WhatsappGetMediaDownloadUrl500, WhatsappGetMediaDownloadUrl504, WhatsappGetMediaDownloadUrlEndpoint, WhatsappGetMediaDownloadUrlPathParams, WhatsappGetServiceWindowBilling200, WhatsappGetServiceWindowBilling400, WhatsappGetServiceWindowBilling401, WhatsappGetServiceWindowBilling403, WhatsappGetServiceWindowBilling404, WhatsappGetServiceWindowBilling422, WhatsappGetServiceWindowBilling500, WhatsappGetServiceWindowBilling504, WhatsappGetServiceWindowBillingEndpoint, WhatsappGetServiceWindowBillingQuery, WhatsappGetServiceWindowStatus200, WhatsappGetServiceWindowStatus400, WhatsappGetServiceWindowStatus401, WhatsappGetServiceWindowStatus403, WhatsappGetServiceWindowStatus404, WhatsappGetServiceWindowStatus422, WhatsappGetServiceWindowStatus500, WhatsappGetServiceWindowStatus504, WhatsappGetServiceWindowStatusEndpoint, WhatsappGetServiceWindowStatusQuery, WhatsappGetStats200, WhatsappGetStats400, WhatsappGetStats401, WhatsappGetStats403, WhatsappGetStats422, WhatsappGetStats500, WhatsappGetStats504, WhatsappGetStatsEndpoint, WhatsappGetStatsQuery, WhatsappGetTemplateStats200, WhatsappGetTemplateStats400, WhatsappGetTemplateStats401, WhatsappGetTemplateStats403, WhatsappGetTemplateStats422, WhatsappGetTemplateStats500, WhatsappGetTemplateStats504, WhatsappGetTemplateStatsEndpoint, WhatsappGetTemplateStatsQuery, WhatsappListBusinessAccounts200, WhatsappListBusinessAccounts400, WhatsappListBusinessAccounts401, WhatsappListBusinessAccounts403, WhatsappListBusinessAccounts422, WhatsappListBusinessAccounts500, WhatsappListBusinessAccounts504, WhatsappListBusinessAccountsEndpoint, WhatsappListBusinessAccountsQuery, WhatsappReleaseBusinessAccount200, WhatsappReleaseBusinessAccount400, WhatsappReleaseBusinessAccount401, WhatsappReleaseBusinessAccount403, WhatsappReleaseBusinessAccount404, WhatsappReleaseBusinessAccount409, WhatsappReleaseBusinessAccount422, WhatsappReleaseBusinessAccount500, WhatsappReleaseBusinessAccount504, WhatsappReleaseBusinessAccountEndpoint, WhatsappReleaseBusinessAccountPathParams, WhatsappReleaseBusinessAccountRequestJson, WhatsappSetDefaultBusinessAccount200, WhatsappSetDefaultBusinessAccount400, WhatsappSetDefaultBusinessAccount401, WhatsappSetDefaultBusinessAccount403, WhatsappSetDefaultBusinessAccount404, WhatsappSetDefaultBusinessAccount422, WhatsappSetDefaultBusinessAccount500, WhatsappSetDefaultBusinessAccount504, WhatsappSetDefaultBusinessAccountEndpoint, WhatsappSetDefaultBusinessAccountPathParams, WhatsappSyncAccountStatus200, WhatsappSyncAccountStatus400, WhatsappSyncAccountStatus401, WhatsappSyncAccountStatus403, WhatsappSyncAccountStatus404, WhatsappSyncAccountStatus422, WhatsappSyncAccountStatus500, WhatsappSyncAccountStatus502, WhatsappSyncAccountStatus504, WhatsappSyncAccountStatusEndpoint, WhatsappSyncAccountStatusPathParams, WhatsappUpdateBusinessAccount200, WhatsappUpdateBusinessAccount400, WhatsappUpdateBusinessAccount401, WhatsappUpdateBusinessAccount403, WhatsappUpdateBusinessAccount404, WhatsappUpdateBusinessAccount422, WhatsappUpdateBusinessAccount500, WhatsappUpdateBusinessAccount504, WhatsappUpdateBusinessAccountEndpoint, WhatsappUpdateBusinessAccountPathParams, WhatsappUpdateBusinessAccountRequestJson };
|
|
681
693
|
|
|
682
694
|
//# sourceMappingURL=whats-app.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 { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
export type WhoamiUser = {
|
|
@@ -195,7 +195,7 @@ export type WhoamiGet500 = InternalError;
|
|
|
195
195
|
export declare const WhoamiGet500: typeof InternalError;
|
|
196
196
|
export type WhoamiGet504 = GatewayTimeoutError;
|
|
197
197
|
export declare const WhoamiGet504: typeof GatewayTimeoutError;
|
|
198
|
-
declare const
|
|
198
|
+
export declare const WhoamiGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"whoamiGet", "GET", "/v1/whoami", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
199
199
|
readonly organization: Schema.Struct<{
|
|
200
200
|
readonly id: Schema.brand<Schema.String, "OrganizationId">;
|
|
201
201
|
readonly slug: Schema.String;
|
|
@@ -324,7 +324,4 @@ declare const WhoamiGroup_base: HttpApiGroup.HttpApiGroup<"Whoami", HttpApiEndpo
|
|
|
324
324
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
325
325
|
readonly message: Schema.String;
|
|
326
326
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
327
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
328
|
-
export declare class WhoamiGroup extends WhoamiGroup_base {
|
|
329
|
-
}
|
|
330
|
-
export {};
|
|
327
|
+
}>, 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 { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/whoami.ts
|
|
@@ -41,7 +41,7 @@ const WhoamiGet403 = ForbiddenError;
|
|
|
41
41
|
const WhoamiGet422 = ValidationError;
|
|
42
42
|
const WhoamiGet500 = InternalError;
|
|
43
43
|
const WhoamiGet504 = GatewayTimeoutError;
|
|
44
|
-
|
|
44
|
+
const WhoamiGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("whoamiGet", "/v1/whoami", {
|
|
45
45
|
success: WhoamiGet200,
|
|
46
46
|
error: [
|
|
47
47
|
WhoamiGet400.pipe(HttpApiSchema.status(400)),
|
|
@@ -51,7 +51,7 @@ var WhoamiGroup = class extends HttpApiGroup.make("Whoami").add(HttpApiEndpoint.
|
|
|
51
51
|
WhoamiGet500,
|
|
52
52
|
WhoamiGet504.pipe(HttpApiSchema.status(504))
|
|
53
53
|
]
|
|
54
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whoami.get").annotate(OpenApi.Summary, "Get the calling credential").annotate(OpenApi.Description, "Returns the organization the request acts in and the credential it presents: an API key with its name, prefix, and access, or a signed-in user with their role. Any valid credential may call it, whatever its grants."))
|
|
55
|
-
export { Whoami, WhoamiApiKeyCredential, WhoamiGet200, WhoamiGet400, WhoamiGet401, WhoamiGet403, WhoamiGet422, WhoamiGet500, WhoamiGet504,
|
|
54
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whoami.get").annotate(OpenApi.Summary, "Get the calling credential").annotate(OpenApi.Description, "Returns the organization the request acts in and the credential it presents: an API key with its name, prefix, and access, or a signed-in user with their role. Any valid credential may call it, whatever its grants."))();
|
|
55
|
+
export { Whoami, WhoamiApiKeyCredential, WhoamiGet200, WhoamiGet400, WhoamiGet401, WhoamiGet403, WhoamiGet422, WhoamiGet500, WhoamiGet504, WhoamiGetEndpoint, WhoamiOrganization, WhoamiUser, WhoamiUserCredential };
|
|
56
56
|
|
|
57
57
|
//# sourceMappingURL=whoami.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { integrationCatalogList, integrationCatalogPrepare, integrationCatalogRecipeCatalog, integrationCatalogRecipeConnectionHandoff, integrationCatalogRecipePreview, integrationCatalogRecipeReadiness, integrationCatalogRecipeSetupActivate, integrationCatalogRecipeSetupGet, integrationCatalogRecipeSetupReplace, integrationCatalogRecipeSetupsList, integrationCatalogRecipeTest, integrationCatalogRecipeTestHandoff, integrationCatalogRecipeTestReceipt, integrationCatalogRecipeWhatsAppChallengeBegin, integrationCatalogRecipeWhatsAppChallengeConfirm, integrationCatalogRecipeWhatsAppChallengeGet, integrationCatalogSearch } from "./descriptors/integrations-catalog.js";
|
|
3
|
+
import { IntegrationCatalogListEndpoint, IntegrationCatalogPrepareEndpoint, IntegrationCatalogRecipeCatalogEndpoint, IntegrationCatalogRecipeConnectionHandoffEndpoint, IntegrationCatalogRecipePreviewEndpoint, IntegrationCatalogRecipeReadinessEndpoint, IntegrationCatalogRecipeSetupActivateEndpoint, IntegrationCatalogRecipeSetupGetEndpoint, IntegrationCatalogRecipeSetupReplaceEndpoint, IntegrationCatalogRecipeSetupsListEndpoint, IntegrationCatalogRecipeTestEndpoint, IntegrationCatalogRecipeTestHandoffEndpoint, IntegrationCatalogRecipeTestReceiptEndpoint, IntegrationCatalogRecipeWhatsAppChallengeBeginEndpoint, IntegrationCatalogRecipeWhatsAppChallengeConfirmEndpoint, IntegrationCatalogRecipeWhatsAppChallengeGetEndpoint, IntegrationCatalogSearchEndpoint } from "./generated/integrations-catalog.js";
|
|
4
|
+
import { operation } from "./internal/operation.js";
|
|
5
5
|
// src/effect/integrations-catalog.ts
|
|
6
6
|
var integrations_catalog_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
list: () => list,
|
|
@@ -22,24 +22,23 @@ var integrations_catalog_exports = /* @__PURE__ */ __exportAll({
|
|
|
22
22
|
recipeWhatsAppChallengeGet: () => recipeWhatsAppChallengeGet,
|
|
23
23
|
search: () => search
|
|
24
24
|
});
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const list = /* @__PURE__ */ make("integrationCatalogList");
|
|
25
|
+
const recipeConnectionHandoff = /* @__PURE__ */ operation("integrationCatalogRecipeConnectionHandoff", IntegrationCatalogRecipeConnectionHandoffEndpoint, integrationCatalogRecipeConnectionHandoff);
|
|
26
|
+
const recipeTestHandoff = /* @__PURE__ */ operation("integrationCatalogRecipeTestHandoff", IntegrationCatalogRecipeTestHandoffEndpoint, integrationCatalogRecipeTestHandoff);
|
|
27
|
+
const recipeSetupsList = /* @__PURE__ */ operation("integrationCatalogRecipeSetupsList", IntegrationCatalogRecipeSetupsListEndpoint, integrationCatalogRecipeSetupsList);
|
|
28
|
+
const recipeSetupGet = /* @__PURE__ */ operation("integrationCatalogRecipeSetupGet", IntegrationCatalogRecipeSetupGetEndpoint, integrationCatalogRecipeSetupGet);
|
|
29
|
+
const recipeSetupReplace = /* @__PURE__ */ operation("integrationCatalogRecipeSetupReplace", IntegrationCatalogRecipeSetupReplaceEndpoint, integrationCatalogRecipeSetupReplace);
|
|
30
|
+
const recipeSetupActivate = /* @__PURE__ */ operation("integrationCatalogRecipeSetupActivate", IntegrationCatalogRecipeSetupActivateEndpoint, integrationCatalogRecipeSetupActivate);
|
|
31
|
+
const recipePreview = /* @__PURE__ */ operation("integrationCatalogRecipePreview", IntegrationCatalogRecipePreviewEndpoint, integrationCatalogRecipePreview);
|
|
32
|
+
const recipeWhatsAppChallengeBegin = /* @__PURE__ */ operation("integrationCatalogRecipeWhatsAppChallengeBegin", IntegrationCatalogRecipeWhatsAppChallengeBeginEndpoint, integrationCatalogRecipeWhatsAppChallengeBegin);
|
|
33
|
+
const recipeWhatsAppChallengeGet = /* @__PURE__ */ operation("integrationCatalogRecipeWhatsAppChallengeGet", IntegrationCatalogRecipeWhatsAppChallengeGetEndpoint, integrationCatalogRecipeWhatsAppChallengeGet);
|
|
34
|
+
const recipeWhatsAppChallengeConfirm = /* @__PURE__ */ operation("integrationCatalogRecipeWhatsAppChallengeConfirm", IntegrationCatalogRecipeWhatsAppChallengeConfirmEndpoint, integrationCatalogRecipeWhatsAppChallengeConfirm);
|
|
35
|
+
const recipeTest = /* @__PURE__ */ operation("integrationCatalogRecipeTest", IntegrationCatalogRecipeTestEndpoint, integrationCatalogRecipeTest);
|
|
36
|
+
const recipeTestReceipt = /* @__PURE__ */ operation("integrationCatalogRecipeTestReceipt", IntegrationCatalogRecipeTestReceiptEndpoint, integrationCatalogRecipeTestReceipt);
|
|
37
|
+
const recipeCatalog = /* @__PURE__ */ operation("integrationCatalogRecipeCatalog", IntegrationCatalogRecipeCatalogEndpoint, integrationCatalogRecipeCatalog);
|
|
38
|
+
const recipeReadiness = /* @__PURE__ */ operation("integrationCatalogRecipeReadiness", IntegrationCatalogRecipeReadinessEndpoint, integrationCatalogRecipeReadiness);
|
|
39
|
+
const prepare = /* @__PURE__ */ operation("integrationCatalogPrepare", IntegrationCatalogPrepareEndpoint, integrationCatalogPrepare);
|
|
40
|
+
const search = /* @__PURE__ */ operation("integrationCatalogSearch", IntegrationCatalogSearchEndpoint, integrationCatalogSearch);
|
|
41
|
+
const list = /* @__PURE__ */ operation("integrationCatalogList", IntegrationCatalogListEndpoint, integrationCatalogList);
|
|
43
42
|
export { integrations_catalog_exports, list, prepare, recipeCatalog, recipeConnectionHandoff, recipePreview, recipeReadiness, recipeSetupActivate, recipeSetupGet, recipeSetupReplace, recipeSetupsList, recipeTest, recipeTestHandoff, recipeTestReceipt, recipeWhatsAppChallengeBegin, recipeWhatsAppChallengeConfirm, recipeWhatsAppChallengeGet, search };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=integrations-catalog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { integrationsGet, integrationsInstall, integrationsList, integrationsListTools, integrationsReadTool, integrationsRemove, integrationsUpdate } from "./descriptors/integrations.js";
|
|
3
|
+
import { IntegrationsGetEndpoint, IntegrationsInstallEndpoint, IntegrationsListEndpoint, IntegrationsListToolsEndpoint, IntegrationsReadToolEndpoint, IntegrationsRemoveEndpoint, IntegrationsUpdateEndpoint } from "./generated/integrations.js";
|
|
4
|
+
import { operation } from "./internal/operation.js";
|
|
5
5
|
// src/effect/integrations.ts
|
|
6
6
|
var integrations_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
get: () => get,
|
|
@@ -12,14 +12,13 @@ var integrations_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
remove: () => remove,
|
|
13
13
|
update: () => update
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const remove = /* @__PURE__ */ make("integrationsRemove");
|
|
15
|
+
const list = /* @__PURE__ */ operation("integrationsList", IntegrationsListEndpoint, integrationsList);
|
|
16
|
+
const install = /* @__PURE__ */ operation("integrationsInstall", IntegrationsInstallEndpoint, integrationsInstall);
|
|
17
|
+
const listTools = /* @__PURE__ */ operation("integrationsListTools", IntegrationsListToolsEndpoint, integrationsListTools);
|
|
18
|
+
const readTool = /* @__PURE__ */ operation("integrationsReadTool", IntegrationsReadToolEndpoint, integrationsReadTool);
|
|
19
|
+
const get = /* @__PURE__ */ operation("integrationsGet", IntegrationsGetEndpoint, integrationsGet);
|
|
20
|
+
const update = /* @__PURE__ */ operation("integrationsUpdate", IntegrationsUpdateEndpoint, integrationsUpdate);
|
|
21
|
+
const remove = /* @__PURE__ */ operation("integrationsRemove", IntegrationsRemoveEndpoint, integrationsRemove);
|
|
23
22
|
export { get, install, integrations_exports, list, listTools, readTool, remove, update };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=integrations.js.map
|
|
@@ -55,7 +55,8 @@ export interface Interface {
|
|
|
55
55
|
readonly timeoutMs?: number | null | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* The generated call for one endpoint. A group's client is built on the first call to any of its
|
|
58
|
-
* endpoints and reused, so a group the program never calls costs nothing.
|
|
58
|
+
* endpoints and reused for that group value, so a group the program never calls costs nothing.
|
|
59
|
+
* Operations pass one-endpoint groups, several of which share an identifier.
|
|
59
60
|
*/
|
|
60
61
|
readonly endpoint: <Name extends Operation>(group: HttpApiGroup.Constraint, name: Name) => Effect.Effect<OperationCall<Name>>;
|
|
61
62
|
/** The origin and headers a connection outside HTTP requests, such as the event stream, uses. */
|
|
@@ -49,9 +49,9 @@ const make = (config) => Effect.gen(function* () {
|
|
|
49
49
|
if (removesAttribution) attributed = HttpClientRequest.removeHeader(attributed, CLIENT_ATTRIBUTION_HEADER);
|
|
50
50
|
return HttpClientRequest.setHeaders(attributed, authHeaders(config));
|
|
51
51
|
}));
|
|
52
|
-
const groups = /* @__PURE__ */ new
|
|
52
|
+
const groups = /* @__PURE__ */ new WeakMap();
|
|
53
53
|
const groupClient = (group) => {
|
|
54
|
-
const built = groups.get(group
|
|
54
|
+
const built = groups.get(group);
|
|
55
55
|
if (built !== void 0) return Effect.succeed(built);
|
|
56
56
|
return HttpApiClient.group(HttpApi.make("SamvaApi").add(group).annotate(HttpApi.PayloadParseOptions, { onExcessProperty: "error" }), {
|
|
57
57
|
group: group.identifier,
|
|
@@ -59,7 +59,7 @@ const make = (config) => Effect.gen(function* () {
|
|
|
59
59
|
baseUrl
|
|
60
60
|
}).pipe(Effect.provide(AuthorizationClient), Effect.map((client) => {
|
|
61
61
|
const calls = client;
|
|
62
|
-
groups.set(group
|
|
62
|
+
groups.set(group, calls);
|
|
63
63
|
return calls;
|
|
64
64
|
}));
|
|
65
65
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { replyToEmailsPayload } from "../../normalize.js";
|
|
3
|
-
import {
|
|
3
|
+
import { EmailAddSenderEndpoint } from "../generated/email.js";
|
|
4
4
|
import { generateIdempotencyKey, withRetry } from "../retry.js";
|
|
5
5
|
import { Service } from "./client.js";
|
|
6
|
-
import { attemptTimeout, callEndpoint, stripUndefined } from "./operation.js";
|
|
6
|
+
import { attemptTimeout, callEndpoint, endpointGroup, stripUndefined } from "./operation.js";
|
|
7
7
|
import { withTimeout } from "./timeout.js";
|
|
8
8
|
// src/effect/internal/email-sender.ts
|
|
9
|
-
const
|
|
9
|
+
const EmailAddSender = /* @__PURE__ */ endpointGroup("Email", EmailAddSenderEndpoint);
|
|
10
|
+
const addEmailSender = /* @__PURE__ */ Effect.fn("Email.addSender")(function* (input, options) {
|
|
10
11
|
const client = yield* Service;
|
|
11
12
|
const timeoutMs = attemptTimeout(options, client);
|
|
12
13
|
const idempotencyKey = options?.idempotencyKey ?? client.idempotency?.("emailAddSender") ?? (yield* generateIdempotencyKey);
|
|
13
14
|
const { replyToEmails, ...sender } = input;
|
|
14
|
-
return yield* withRetry(withTimeout(callEndpoint(
|
|
15
|
+
return yield* withRetry(withTimeout(callEndpoint(EmailAddSender, "emailAddSender", {
|
|
15
16
|
headers: { "idempotency-key": idempotencyKey },
|
|
16
17
|
payload: stripUndefined({
|
|
17
18
|
...sender,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Brand, Effect, Redacted, Stream } from "effect";
|
|
2
|
-
import type
|
|
2
|
+
import { type HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import type { SDK_OPERATION_CALLS } from "../../service-map.js";
|
|
4
4
|
import { type FlatRaw, type Operation, type OperationResult } from "./client.js";
|
|
5
5
|
export type { OperationResult };
|
|
@@ -37,8 +37,8 @@ export declare const attemptTimeout: (options: {
|
|
|
37
37
|
readonly timeoutMs?: number | null | undefined;
|
|
38
38
|
}) => number | null;
|
|
39
39
|
/**
|
|
40
|
-
* What one operation wrapper reads at runtime. `codegen/generate-registry.ts` emits
|
|
41
|
-
* beside each domain, so a focused
|
|
40
|
+
* What one operation wrapper reads at runtime. `codegen/generate-registry.ts` emits one binding per
|
|
41
|
+
* operation beside each domain, so a focused import carries only its own operations' descriptors.
|
|
42
42
|
*/
|
|
43
43
|
interface OperationDescriptor {
|
|
44
44
|
readonly group: string;
|
|
@@ -54,7 +54,6 @@ interface OperationDescriptor {
|
|
|
54
54
|
readonly paths?: ReadonlyArray<string> | undefined;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
export type OperationDescriptors = Readonly<Record<string, OperationDescriptor>>;
|
|
58
57
|
type OperationFunction<Name extends SdkOperation> = (typeof SDK_OPERATION_CALLS)[Name] extends {
|
|
59
58
|
readonly kind: "none";
|
|
60
59
|
} ? (input?: never, options?: OperationOptions) => OperationResult<Name> : {} extends Input<Name> ? (input?: Input<Name>, options?: OperationOptions) => OperationResult<Name> : (input: Input<Name>, options?: OperationOptions) => OperationResult<Name>;
|
|
@@ -77,9 +76,14 @@ type PaginationCompanions<Parameters, A, E, R> = {} extends Parameters ? {
|
|
|
77
76
|
type WithPagination<Method> = Method extends (input: infer Parameters) => Effect.Effect<infer A, infer E, infer R> ? IsPaginated<A> extends true ? Method & PaginationCompanions<Parameters, A, E, R> : Method : Method;
|
|
78
77
|
export declare const stripUndefined: <Value>(input: Value) => Value;
|
|
79
78
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
79
|
+
* A group holding only `endpoint`, so the client built for it decodes that endpoint's schemas and
|
|
80
|
+
* nothing else. The client caches by group identity: bind each one once, at module scope.
|
|
82
81
|
*/
|
|
83
|
-
export declare const
|
|
82
|
+
export declare const endpointGroup: (identifier: string, endpoint: HttpApiEndpoint.Top) => HttpApiGroup.Constraint;
|
|
83
|
+
/**
|
|
84
|
+
* One operation wrapper from its own endpoint and descriptor. Generated domain modules call this
|
|
85
|
+
* once per operation, so a bundler keeps only the operations a program imports.
|
|
86
|
+
*/
|
|
87
|
+
export declare const operation: <Name extends SdkOperation>(operationName: Name, endpoint: HttpApiEndpoint.Top, descriptor: OperationDescriptor) => WithPagination<OperationFunction<Name>>;
|
|
84
88
|
/** Call one endpoint with an already-shaped request, outside the direct-operation adapter. */
|
|
85
89
|
export declare const callEndpoint: <Name extends SdkOperation>(group: HttpApiGroup.Constraint, name: Name, request: unknown) => OperationResult<Name>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Effect, Predicate } from "effect";
|
|
2
|
+
import { HttpApiGroup } from "effect/http-api";
|
|
2
3
|
import { DEFAULT_TIMEOUT_MS, isRetrySafe, resolveTimeout } from "../../request-policy.js";
|
|
3
4
|
import { streamCursorItems, streamCursorPages } from "../pagination.js";
|
|
4
5
|
import { generateIdempotencyKey, withRetry } from "../retry.js";
|
|
@@ -51,14 +52,18 @@ const adapt = (descriptor, operationName, rawCall, input, idempotencyKey, timeou
|
|
|
51
52
|
};
|
|
52
53
|
const isCursorPageEnvelope = (value) => Predicate.isObject(value) && Array.isArray(value.items) && (value.nextCursor === null || typeof value.nextCursor === "string");
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
55
|
+
* A group holding only `endpoint`, so the client built for it decodes that endpoint's schemas and
|
|
56
|
+
* nothing else. The client caches by group identity: bind each one once, at module scope.
|
|
56
57
|
*/
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
const endpointGroup = (identifier, endpoint) => HttpApiGroup.make(identifier).add(endpoint);
|
|
59
|
+
/**
|
|
60
|
+
* One operation wrapper from its own endpoint and descriptor. Generated domain modules call this
|
|
61
|
+
* once per operation, so a bundler keeps only the operations a program imports.
|
|
62
|
+
*/
|
|
63
|
+
const operation = (operationName, endpoint, descriptor) => {
|
|
64
|
+
if (endpoint.identifier !== operationName) throw new Error(`${operationName} is bound to the ${endpoint.identifier} endpoint`);
|
|
65
|
+
let group;
|
|
66
|
+
return make(() => group ??= endpointGroup(descriptor.group, endpoint), operationName, descriptor);
|
|
62
67
|
};
|
|
63
68
|
/** Call one endpoint with an already-shaped request, outside the direct-operation adapter. */
|
|
64
69
|
const callEndpoint = (group, name, request) => Effect.flatMap(Service, (client) => Effect.flatMap(client.endpoint(group, name), (call) => call(request)));
|
|
@@ -66,20 +71,20 @@ const make = (group, operationName, descriptor) => {
|
|
|
66
71
|
const call = Effect.fn(traceName(descriptor, operationName))(function* (input, options) {
|
|
67
72
|
const client = yield* Service;
|
|
68
73
|
const timeoutMs = attemptTimeout(options, client);
|
|
69
|
-
const rawCall = yield* client.endpoint(group, operationName);
|
|
74
|
+
const rawCall = yield* client.endpoint(group(), operationName);
|
|
70
75
|
const idempotencyKey = descriptor.idempotent ? options?.idempotencyKey ?? client.idempotency?.(operationName) ?? (yield* generateIdempotencyKey) : void 0;
|
|
71
76
|
return yield* adapt(descriptor, operationName, rawCall, input, idempotencyKey, timeoutMs);
|
|
72
77
|
});
|
|
73
|
-
const
|
|
78
|
+
const wrapper = call;
|
|
74
79
|
if (descriptor.paginated) {
|
|
75
80
|
const list = (input) => Effect.filterOrElse(call(input), isCursorPageEnvelope, () => Effect.die(/* @__PURE__ */ new Error(`${operationName} did not return a cursor page envelope`)));
|
|
76
|
-
Object.assign(
|
|
81
|
+
Object.assign(wrapper, {
|
|
77
82
|
pages: (input) => streamCursorPages(list, input ?? {}),
|
|
78
83
|
items: (input) => streamCursorItems(list, input ?? {})
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
|
-
return
|
|
86
|
+
return wrapper;
|
|
82
87
|
};
|
|
83
|
-
export { attemptTimeout, callEndpoint,
|
|
88
|
+
export { attemptTimeout, callEndpoint, endpointGroup, operation, stripUndefined };
|
|
84
89
|
|
|
85
90
|
//# sourceMappingURL=operation.js.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { mediaCreateBody, planInlineUploads, withUploadedAttachments } from "../../inline-attachments.js";
|
|
3
3
|
import { buildEmailSendPayload, buildMessagesSendPayload } from "../../normalize.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { MediaCompleteEndpoint, MediaCreateEndpoint } from "../generated/media.js";
|
|
5
|
+
import { MessagesSendEndpoint } from "../generated/messages.js";
|
|
6
6
|
import { generateIdempotencyKey, withRetry } from "../retry.js";
|
|
7
7
|
import { Service } from "./client.js";
|
|
8
|
-
import { attemptTimeout, callEndpoint, stripUndefined } from "./operation.js";
|
|
8
|
+
import { attemptTimeout, callEndpoint, endpointGroup, stripUndefined } from "./operation.js";
|
|
9
9
|
import { withTimeout } from "./timeout.js";
|
|
10
10
|
// src/effect/internal/send.ts
|
|
11
|
+
const MessagesSend = /* @__PURE__ */ endpointGroup("Messages", MessagesSendEndpoint);
|
|
12
|
+
const MediaCreate = /* @__PURE__ */ endpointGroup("Media", MediaCreateEndpoint);
|
|
13
|
+
const MediaComplete = /* @__PURE__ */ endpointGroup("Media", MediaCompleteEndpoint);
|
|
11
14
|
/**
|
|
12
15
|
* Inline attachment content over the API's request cap travels as media instead: the largest
|
|
13
16
|
* attachments are uploaded (create, put to the presigned URL, complete) and replaced by their
|
|
@@ -19,7 +22,7 @@ const uploadOversizedAttachments = (client, payload, timeoutMs, uploadTimeoutMs)
|
|
|
19
22
|
if (plan.length === 0) return payload;
|
|
20
23
|
const uploaded = /* @__PURE__ */ new Map();
|
|
21
24
|
for (const upload of plan) {
|
|
22
|
-
const created = yield* withTimeout(callEndpoint(
|
|
25
|
+
const created = yield* withTimeout(callEndpoint(MediaCreate, "mediaCreate", { payload: mediaCreateBody(upload) }), timeoutMs);
|
|
23
26
|
yield* client.putUpload({
|
|
24
27
|
filename: upload.filename,
|
|
25
28
|
mediaId: created.id,
|
|
@@ -29,7 +32,7 @@ const uploadOversizedAttachments = (client, payload, timeoutMs, uploadTimeoutMs)
|
|
|
29
32
|
bytes: upload.bytes,
|
|
30
33
|
timeoutMs: uploadTimeoutMs
|
|
31
34
|
});
|
|
32
|
-
yield* withTimeout(callEndpoint(
|
|
35
|
+
yield* withTimeout(callEndpoint(MediaComplete, "mediaComplete", { params: { id: created.id } }), timeoutMs);
|
|
33
36
|
uploaded.set(upload.index, {
|
|
34
37
|
mediaId: created.id,
|
|
35
38
|
upload
|
|
@@ -42,15 +45,15 @@ const sendPayload = (payload, options) => Effect.gen(function* () {
|
|
|
42
45
|
const timeoutMs = attemptTimeout(options, client);
|
|
43
46
|
const idempotencyKey = options?.idempotencyKey ?? client.idempotency?.("messagesSend") ?? (yield* generateIdempotencyKey);
|
|
44
47
|
const prepared = yield* uploadOversizedAttachments(client, payload, timeoutMs, options?.uploadTimeoutMs);
|
|
45
|
-
return yield* withRetry(withTimeout(callEndpoint(
|
|
48
|
+
return yield* withRetry(withTimeout(callEndpoint(MessagesSend, "messagesSend", {
|
|
46
49
|
payload: stripUndefined(prepared),
|
|
47
50
|
headers: { "idempotency-key": idempotencyKey }
|
|
48
51
|
}), timeoutMs));
|
|
49
52
|
});
|
|
50
|
-
const sendMessage = Effect.fn("Messages.send")(function* (input, options) {
|
|
53
|
+
const sendMessage = /* @__PURE__ */ Effect.fn("Messages.send")(function* (input, options) {
|
|
51
54
|
return yield* sendPayload(buildMessagesSendPayload(input), options);
|
|
52
55
|
});
|
|
53
|
-
const sendEmail = Effect.fn("Email.send")(function* (input, options) {
|
|
56
|
+
const sendEmail = /* @__PURE__ */ Effect.fn("Email.send")(function* (input, options) {
|
|
54
57
|
return yield* sendPayload(buildEmailSendPayload(input), options);
|
|
55
58
|
});
|
|
56
59
|
export { sendEmail, sendMessage };
|
package/dist/effect/journeys.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { journeysArchive, journeysCreate, journeysGet, journeysGetRun, journeysGetVersion, journeysList, journeysListRuns, journeysPause, journeysPublish, journeysRemove, journeysReplaceDraft, journeysResume, journeysStats, journeysUpdate } from "./descriptors/journeys.js";
|
|
3
|
+
import { JourneysArchiveEndpoint, JourneysCreateEndpoint, JourneysGetEndpoint, JourneysGetRunEndpoint, JourneysGetVersionEndpoint, JourneysListEndpoint, JourneysListRunsEndpoint, JourneysPauseEndpoint, JourneysPublishEndpoint, JourneysRemoveEndpoint, JourneysReplaceDraftEndpoint, JourneysResumeEndpoint, JourneysStatsEndpoint, JourneysUpdateEndpoint } from "./generated/journeys.js";
|
|
4
|
+
import { operation } from "./internal/operation.js";
|
|
5
5
|
// src/effect/journeys.ts
|
|
6
6
|
var journeys_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
archive: () => archive,
|
|
@@ -19,21 +19,20 @@ var journeys_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
19
|
stats: () => stats,
|
|
20
20
|
update: () => update
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const getRun = /* @__PURE__ */ make("journeysGetRun");
|
|
22
|
+
const list = /* @__PURE__ */ operation("journeysList", JourneysListEndpoint, journeysList);
|
|
23
|
+
const create = /* @__PURE__ */ operation("journeysCreate", JourneysCreateEndpoint, journeysCreate);
|
|
24
|
+
const get = /* @__PURE__ */ operation("journeysGet", JourneysGetEndpoint, journeysGet);
|
|
25
|
+
const update = /* @__PURE__ */ operation("journeysUpdate", JourneysUpdateEndpoint, journeysUpdate);
|
|
26
|
+
const remove = /* @__PURE__ */ operation("journeysRemove", JourneysRemoveEndpoint, journeysRemove);
|
|
27
|
+
const replaceDraft = /* @__PURE__ */ operation("journeysReplaceDraft", JourneysReplaceDraftEndpoint, journeysReplaceDraft);
|
|
28
|
+
const publish = /* @__PURE__ */ operation("journeysPublish", JourneysPublishEndpoint, journeysPublish);
|
|
29
|
+
const pause = /* @__PURE__ */ operation("journeysPause", JourneysPauseEndpoint, journeysPause);
|
|
30
|
+
const resume = /* @__PURE__ */ operation("journeysResume", JourneysResumeEndpoint, journeysResume);
|
|
31
|
+
const archive = /* @__PURE__ */ operation("journeysArchive", JourneysArchiveEndpoint, journeysArchive);
|
|
32
|
+
const getVersion = /* @__PURE__ */ operation("journeysGetVersion", JourneysGetVersionEndpoint, journeysGetVersion);
|
|
33
|
+
const stats = /* @__PURE__ */ operation("journeysStats", JourneysStatsEndpoint, journeysStats);
|
|
34
|
+
const listRuns = /* @__PURE__ */ operation("journeysListRuns", JourneysListRunsEndpoint, journeysListRuns);
|
|
35
|
+
const getRun = /* @__PURE__ */ operation("journeysGetRun", JourneysGetRunEndpoint, journeysGetRun);
|
|
37
36
|
export { archive, create, get, getRun, getVersion, journeys_exports, list, listRuns, pause, publish, remove, replaceDraft, resume, stats, update };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=journeys.js.map
|