samva 0.45.1 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +24 -0
  3. package/dist/client/sdk.gen.d.ts +438 -5
  4. package/dist/client/sdk.gen.js +1544 -229
  5. package/dist/client/types.gen.d.ts +8120 -5616
  6. package/dist/effect/accounts.d.ts +50 -0
  7. package/dist/effect/accounts.js +22 -0
  8. package/dist/effect/agents.d.ts +9 -0
  9. package/dist/effect/agents.js +1 -1
  10. package/dist/effect/approval-requests.d.ts +42 -0
  11. package/dist/effect/approval-requests.js +18 -0
  12. package/dist/effect/campaigns.d.ts +160 -160
  13. package/dist/effect/generated/accounts.d.ts +1002 -0
  14. package/dist/effect/generated/accounts.js +198 -0
  15. package/dist/effect/generated/agents.d.ts +84 -0
  16. package/dist/effect/generated/agents.js +1 -0
  17. package/dist/effect/generated/approval-requests.d.ts +777 -0
  18. package/dist/effect/generated/approval-requests.js +135 -0
  19. package/dist/effect/generated/campaigns.d.ts +17 -17
  20. package/dist/effect/generated/campaigns.js +6 -6
  21. package/dist/effect/generated/conversations.d.ts +20 -20
  22. package/dist/effect/generated/conversations.js +10 -10
  23. package/dist/effect/generated/events.js +1 -1
  24. package/dist/effect/generated/index.d.ts +11 -1
  25. package/dist/effect/generated/integrations-catalog.d.ts +671 -0
  26. package/dist/effect/generated/integrations-catalog.js +217 -0
  27. package/dist/effect/generated/integrations.d.ts +1401 -0
  28. package/dist/effect/generated/integrations.js +246 -0
  29. package/dist/effect/generated/mailboxes.d.ts +8157 -4241
  30. package/dist/effect/generated/mailboxes.js +677 -52
  31. package/dist/effect/generated/messages.d.ts +8 -8
  32. package/dist/effect/generated/messages.js +4 -4
  33. package/dist/effect/generated/scheduled-messages.d.ts +50 -50
  34. package/dist/effect/generated/scheduled-messages.js +17 -17
  35. package/dist/effect/generated/shared.d.ts +661 -511
  36. package/dist/effect/generated/shared.js +212 -179
  37. package/dist/effect/generated/template-share-links.d.ts +733 -0
  38. package/dist/effect/generated/template-share-links.js +165 -0
  39. package/dist/effect/generated/templates.d.ts +39 -22
  40. package/dist/effect/generated/templates.js +19 -16
  41. package/dist/effect/generated-metadata.d.ts +248 -0
  42. package/dist/effect/generated-metadata.js +705 -555
  43. package/dist/effect/index.d.ts +5 -0
  44. package/dist/effect/index.js +6 -1
  45. package/dist/effect/integrations-catalog.d.ts +38 -0
  46. package/dist/effect/integrations-catalog.js +16 -0
  47. package/dist/effect/integrations.d.ts +165 -0
  48. package/dist/effect/integrations.js +24 -0
  49. package/dist/effect/mailboxes.d.ts +373 -191
  50. package/dist/effect/mailboxes.js +31 -1
  51. package/dist/effect/scheduled-messages.d.ts +350 -350
  52. package/dist/effect/template-share-links.d.ts +18 -0
  53. package/dist/effect/template-share-links.js +20 -0
  54. package/dist/effect/templates.d.ts +4 -3
  55. package/dist/index.js +2 -2
  56. package/dist/package.js +1 -1
  57. package/dist/promises/client.d.ts +11 -1
  58. package/dist/promises/client.js +13 -3
  59. package/dist/promises/errors.gen.d.ts +22 -2
  60. package/dist/promises/errors.gen.js +54 -1
  61. package/dist/promises/index.js +2 -2
  62. package/dist/promises/types.gen.d.ts +1 -1
  63. package/dist/service-map.d.ts +203 -0
  64. package/dist/service-map.js +103 -0
  65. package/package.json +22 -2
@@ -0,0 +1,18 @@
1
+ export declare const create: (input: {
2
+ readonly projectId: string;
3
+ readonly slug?: string | null | undefined;
4
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templateShareLinksCreate">;
5
+ export declare const rename: (input: {
6
+ readonly projectId: string;
7
+ readonly slug: string;
8
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templateShareLinksRename">;
9
+ export declare const get: (input: {
10
+ readonly projectId: string;
11
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templateShareLinksGet">;
12
+ declare const deleteOperation: (input: {
13
+ readonly projectId: string;
14
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templateShareLinksDelete">;
15
+ export { deleteOperation as delete };
16
+ export declare const update: (input: {
17
+ readonly projectId: string;
18
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templateShareLinksUpdate">;
@@ -0,0 +1,20 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { forGroup } from "./internal/operation.js";
3
+ import { TemplateShareLinksGroup } from "./generated/template-share-links.js";
4
+ // src/effect/template-share-links.ts
5
+ var template_share_links_exports = /* @__PURE__ */ __exportAll({
6
+ create: () => create,
7
+ delete: () => deleteOperation,
8
+ get: () => get,
9
+ rename: () => rename,
10
+ update: () => update
11
+ });
12
+ const make = /* @__PURE__ */ forGroup(TemplateShareLinksGroup);
13
+ const create = /* @__PURE__ */ make("templateShareLinksCreate");
14
+ const rename = /* @__PURE__ */ make("templateShareLinksRename");
15
+ const get = /* @__PURE__ */ make("templateShareLinksGet");
16
+ const deleteOperation = /* @__PURE__ */ make("templateShareLinksDelete");
17
+ const update = /* @__PURE__ */ make("templateShareLinksUpdate");
18
+ export { create, deleteOperation as delete, get, rename, template_share_links_exports, update };
19
+
20
+ //# sourceMappingURL=template-share-links.js.map
@@ -84,8 +84,9 @@ export declare const list: ((input?: {
84
84
  readonly updatedAt: string;
85
85
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
86
86
  };
87
- export declare const create: (input: {
88
- readonly name: string;
87
+ export declare const create: (input?: {
88
+ readonly name?: string | null | undefined;
89
+ readonly shareLinkSlug?: string | null | undefined;
89
90
  readonly projectName?: string | null | undefined;
90
91
  readonly slug?: string | null | undefined;
91
92
  readonly galleryTemplateId?: string | null | undefined;
@@ -94,7 +95,7 @@ export declare const create: (input: {
94
95
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
95
96
  readonly namespaceId?: string | null | undefined;
96
97
  readonly shared?: boolean | null | undefined;
97
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templatesCreate">;
98
+ } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"templatesCreate">;
98
99
  export declare const listFamilies: ((input?: {
99
100
  readonly limit?: number | null | undefined;
100
101
  readonly cursor?: string | undefined;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./promises/errors.gen.js";
1
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./promises/errors.gen.js";
2
2
  import { MediaUploadError } from "./inline-attachments.js";
3
3
  import { MailboxEventStream, MailboxEventStreamError } from "./mailbox-events.js";
4
4
  import { createClient } from "./promises/client.js";
5
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };
5
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.45.1";
2
+ var version = "0.46.0";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
@@ -27,7 +27,7 @@
27
27
  * ```
28
28
  */
29
29
  import { type Client, type Config } from "../client/client";
30
- import { Agents as agents, Whatsapp as whatsapp, WhatsappFlows as whatsappFlows, WhatsappSetupLinks as whatsappSetupLinks, TemplateRegistrations as templateRegistrations, Analytics as analytics, ApiKeys as apiKeys, Attachments as attachments, Brands as brands, Campaigns as campaigns, ContactGroups as contactGroups, ContactEvents as contactEvents, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Email as email, ExtensionInstallations as extensionInstallations, Extensions as extensions, Events as events, Feedback as feedback, Journeys as journeys, Mailboxes as mailboxes, Media as media, Messages as messages, Namespaces as namespaces, Operations as operations, Organizations as organizations, Policies as policies, ScheduledMessages as scheduledMessages, Subscriptions as subscriptions, Templates as templates, Topics as topics, TopicForms as topicForms, Newsletters as newsletters, Webhooks as webhooks, Whoami as whoami } from "../client/sdk.gen";
30
+ import { Agents as agents, Accounts as accounts, Integrations as integrations, IntegrationCatalog as integrationCatalog, Whatsapp as whatsapp, WhatsappFlows as whatsappFlows, WhatsappSetupLinks as whatsappSetupLinks, TemplateRegistrations as templateRegistrations, TemplateShareLinks as templateShareLinks, Analytics as analytics, ApiKeys as apiKeys, ApprovalRequests as approvalRequests, Attachments as attachments, Brands as brands, Campaigns as campaigns, ContactGroups as contactGroups, ContactEvents as contactEvents, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Email as email, ExtensionInstallations as extensionInstallations, Extensions as extensions, Events as events, Feedback as feedback, Journeys as journeys, Mailboxes as mailboxes, Media as media, Messages as messages, Namespaces as namespaces, Operations as operations, Organizations as organizations, Policies as policies, ScheduledMessages as scheduledMessages, Subscriptions as subscriptions, Templates as templates, Topics as topics, TopicForms as topicForms, Newsletters as newsletters, Webhooks as webhooks, Whoami as whoami } from "../client/sdk.gen";
31
31
  import type { MessagesSendData } from "../client/types.gen";
32
32
  import { MailboxEventStream, type MailboxEventStreamOptions } from "../mailbox-events";
33
33
  import { type RequestPolicy } from "./request";
@@ -136,6 +136,7 @@ export interface SamvaRawClient {
136
136
  readonly whatsappFlows: typeof whatsappFlows;
137
137
  readonly whatsappSetupLinks: typeof whatsappSetupLinks;
138
138
  readonly templateRegistrations: typeof templateRegistrations;
139
+ readonly templateShareLinks: typeof templateShareLinks;
139
140
  readonly campaigns: typeof campaigns;
140
141
  readonly email: typeof email;
141
142
  readonly media: typeof media;
@@ -146,6 +147,7 @@ export interface SamvaRawClient {
146
147
  readonly webhooks: typeof webhooks;
147
148
  readonly operations: typeof operations;
148
149
  readonly apiKeys: typeof apiKeys;
150
+ readonly approvalRequests: typeof approvalRequests;
149
151
  readonly organizations: typeof organizations;
150
152
  readonly policies: typeof policies;
151
153
  readonly attachments: typeof attachments;
@@ -156,6 +158,9 @@ export interface SamvaRawClient {
156
158
  readonly topicForms: typeof topicForms;
157
159
  readonly newsletters: typeof newsletters;
158
160
  readonly agents: typeof agents;
161
+ readonly accounts: typeof accounts;
162
+ readonly integrations: typeof integrations;
163
+ readonly integrationCatalog: typeof integrationCatalog;
159
164
  readonly analytics: typeof analytics;
160
165
  readonly feedback: typeof feedback;
161
166
  readonly whoami: typeof whoami;
@@ -183,6 +188,7 @@ export interface SamvaClient {
183
188
  readonly whatsappFlows: DirectService<typeof whatsappFlows>;
184
189
  readonly whatsappSetupLinks: DirectService<typeof whatsappSetupLinks>;
185
190
  readonly templateRegistrations: DirectService<typeof templateRegistrations>;
191
+ readonly templateShareLinks: DirectService<typeof templateShareLinks>;
186
192
  readonly campaigns: DirectService<typeof campaigns>;
187
193
  readonly email: DirectService<PromiseEmailTransport>;
188
194
  readonly media: DirectService<typeof media>;
@@ -193,6 +199,7 @@ export interface SamvaClient {
193
199
  readonly webhooks: DirectService<typeof webhooks>;
194
200
  readonly operations: DirectService<typeof operations>;
195
201
  readonly apiKeys: DirectService<typeof apiKeys>;
202
+ readonly approvalRequests: DirectService<typeof approvalRequests>;
196
203
  readonly organizations: DirectService<typeof organizations>;
197
204
  readonly policies: DirectService<typeof policies>;
198
205
  readonly attachments: DirectService<typeof attachments>;
@@ -203,6 +210,9 @@ export interface SamvaClient {
203
210
  readonly topicForms: DirectService<typeof topicForms>;
204
211
  readonly newsletters: DirectService<typeof newsletters>;
205
212
  readonly agents: DirectService<typeof agents>;
213
+ readonly accounts: DirectService<typeof accounts>;
214
+ readonly integrations: DirectService<typeof integrations>;
215
+ readonly integrationCatalog: DirectService<typeof integrationCatalog>;
206
216
  readonly analytics: DirectService<typeof analytics>;
207
217
  readonly feedback: DirectService<typeof feedback>;
208
218
  readonly whoami: DirectService<typeof whoami>;
@@ -2,9 +2,9 @@ import { CLIENT_ATTRIBUTION_HEADER, clientAttribution } from "../client-attribut
2
2
  import { mergeHeaders } from "../client/client/utils.gen.js";
3
3
  import { createClient as createClient$1 } from "../client/client/client.gen.js";
4
4
  import { SamvaOperations } from "../effect/generated-metadata.js";
5
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./errors.gen.js";
5
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./errors.gen.js";
6
6
  import { configureRequests } from "./request.js";
7
- import { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Email, Events, ExtensionInstallations, Extensions, Feedback, Journeys, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, Policies, ScheduledMessages, Subscriptions, TemplateRegistrations, Templates, TopicForms, Topics, Webhooks, Whatsapp, WhatsappFlows, WhatsappSetupLinks, Whoami } from "../client/sdk.gen.js";
7
+ import { Accounts, Agents, Analytics, ApiKeys, ApprovalRequests, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Email, Events, ExtensionInstallations, Extensions, Feedback, IntegrationCatalog, Integrations, Journeys, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, Policies, ScheduledMessages, Subscriptions, TemplateRegistrations, TemplateShareLinks, Templates, TopicForms, Topics, Webhooks, Whatsapp, WhatsappFlows, WhatsappSetupLinks, Whoami } from "../client/sdk.gen.js";
8
8
  import { MediaUploadError, mediaCreateBody, planInlineUploads, withUploadedAttachments } from "../inline-attachments.js";
9
9
  import { MailboxEventStream } from "../mailbox-events.js";
10
10
  import { buildEmailSendPayload, buildMessagesSendPayload, replyToEmailsPayload } from "../normalize.js";
@@ -249,6 +249,7 @@ function makeClient(config) {
249
249
  whatsappFlows: createBoundService(WhatsappFlows, clientInstance),
250
250
  whatsappSetupLinks: createBoundService(WhatsappSetupLinks, clientInstance),
251
251
  templateRegistrations: createBoundService(TemplateRegistrations, clientInstance),
252
+ templateShareLinks: createBoundService(TemplateShareLinks, clientInstance),
252
253
  campaigns: createBoundService(Campaigns, clientInstance),
253
254
  email: createBoundService(Email, clientInstance),
254
255
  media: createBoundService(Media, clientInstance),
@@ -259,6 +260,7 @@ function makeClient(config) {
259
260
  webhooks: createBoundService(Webhooks, clientInstance),
260
261
  operations: createBoundService(Operations, clientInstance),
261
262
  apiKeys: createBoundService(ApiKeys, clientInstance),
263
+ approvalRequests: createBoundService(ApprovalRequests, clientInstance),
262
264
  organizations: createBoundService(Organizations, clientInstance),
263
265
  policies: createBoundService(Policies, clientInstance),
264
266
  attachments: createBoundService(Attachments, clientInstance),
@@ -269,6 +271,9 @@ function makeClient(config) {
269
271
  topicForms: createBoundService(TopicForms, clientInstance),
270
272
  newsletters: createBoundService(Newsletters, clientInstance),
271
273
  agents: createBoundService(Agents, clientInstance),
274
+ accounts: createBoundService(Accounts, clientInstance),
275
+ integrations: createBoundService(Integrations, clientInstance),
276
+ integrationCatalog: createBoundService(IntegrationCatalog, clientInstance),
272
277
  analytics: createBoundService(Analytics, clientInstance),
273
278
  feedback: createBoundService(Feedback, clientInstance),
274
279
  whoami: createBoundService(Whoami, clientInstance),
@@ -294,6 +299,7 @@ function makeClient(config) {
294
299
  whatsappFlows: createDirectService(raw.whatsappFlows),
295
300
  whatsappSetupLinks: createDirectService(raw.whatsappSetupLinks),
296
301
  templateRegistrations: createDirectService(raw.templateRegistrations),
302
+ templateShareLinks: createDirectService(raw.templateShareLinks),
297
303
  campaigns: createDirectService(raw.campaigns),
298
304
  email: createDirectService(promiseEmail),
299
305
  media: createDirectService(raw.media),
@@ -304,6 +310,7 @@ function makeClient(config) {
304
310
  webhooks: createDirectService(raw.webhooks),
305
311
  operations: createDirectService(raw.operations),
306
312
  apiKeys: createDirectService(raw.apiKeys),
313
+ approvalRequests: createDirectService(raw.approvalRequests),
307
314
  organizations: createDirectService(raw.organizations),
308
315
  policies: createDirectService(raw.policies),
309
316
  attachments: createDirectService(raw.attachments),
@@ -314,6 +321,9 @@ function makeClient(config) {
314
321
  topicForms: createDirectService(raw.topicForms),
315
322
  newsletters: createDirectService(raw.newsletters),
316
323
  agents: createDirectService(raw.agents),
324
+ accounts: createDirectService(raw.accounts),
325
+ integrations: createDirectService(raw.integrations),
326
+ integrationCatalog: createDirectService(raw.integrationCatalog),
317
327
  analytics: createDirectService(raw.analytics),
318
328
  feedback: createDirectService(raw.feedback),
319
329
  whoami: createDirectService(raw.whoami),
@@ -329,6 +339,6 @@ function makeClient(config) {
329
339
  }));
330
340
  return result;
331
341
  }
332
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, clientWithIdempotency, createBoundClient, createClient, fromApiError };
342
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, clientWithIdempotency, createBoundClient, createClient, fromApiError };
333
343
 
334
344
  //# sourceMappingURL=client.js.map
@@ -1,5 +1,5 @@
1
1
  import type * as Wire from "../client/types.gen";
2
- export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "CredentialsError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "MalformedRequestError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "ServiceUnavailableError" | "TemplateInUseError" | "TemplateSourceError" | "UnauthorizedError" | "ValidationError" | "WhatsAppChannelError" | "WhatsAppServiceWindowClosedError" | "WhatsAppSetupLinkUnavailableError";
2
+ export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "CredentialsError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "MalformedRequestError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "ServiceUnavailableError" | "ShareLinkUnavailable" | "SlugTaken" | "TemplateInUseError" | "TemplateSourceError" | "UnauthorizedError" | "ValidationError" | "WhatsAppChannelError" | "WhatsAppServiceWindowClosedError" | "WhatsAppSetupLinkUnavailableError";
3
3
  export interface SamvaApiErrorContext {
4
4
  readonly request?: Request | undefined;
5
5
  readonly response?: Response | undefined;
@@ -263,6 +263,26 @@ export declare class ServiceUnavailableError extends SamvaApiError<"ServiceUnava
263
263
  readonly "retryAfterSeconds": number;
264
264
  constructor(payload: Omit<ServiceUnavailableErrorPayload, "_tag">, context?: SamvaApiErrorContext);
265
265
  }
266
+ type ShareLinkUnavailablePayload = {
267
+ readonly _tag: "ShareLinkUnavailable";
268
+ readonly message: string;
269
+ };
270
+ export declare class ShareLinkUnavailable extends SamvaApiError<"ShareLinkUnavailable"> {
271
+ readonly _tag: "ShareLinkUnavailable";
272
+ constructor(payload: Omit<ShareLinkUnavailablePayload, "_tag">, context?: SamvaApiErrorContext);
273
+ }
274
+ type SlugTakenPayload = {
275
+ readonly _tag: "SlugTaken";
276
+ readonly message: string;
277
+ readonly slug: string;
278
+ readonly suggestion: string;
279
+ };
280
+ export declare class SlugTaken extends SamvaApiError<"SlugTaken"> {
281
+ readonly _tag: "SlugTaken";
282
+ readonly "slug": string;
283
+ readonly "suggestion": string;
284
+ constructor(payload: Omit<SlugTakenPayload, "_tag">, context?: SamvaApiErrorContext);
285
+ }
266
286
  type TemplateInUseErrorPayload = {
267
287
  readonly _tag: "TemplateInUseError";
268
288
  readonly message: string;
@@ -389,7 +409,7 @@ export declare class WhatsAppSetupLinkUnavailableError extends SamvaApiError<"Wh
389
409
  readonly "reason": "completed" | "revoked" | "expired";
390
410
  constructor(payload: Omit<WhatsAppSetupLinkUnavailableErrorPayload, "_tag">, context?: SamvaApiErrorContext);
391
411
  }
392
- export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | CredentialsError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | MalformedRequestError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | ServiceUnavailableError | TemplateInUseError | TemplateSourceError | UnauthorizedError | ValidationError | WhatsAppChannelError | WhatsAppServiceWindowClosedError | WhatsAppSetupLinkUnavailableError;
412
+ export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | CredentialsError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | MalformedRequestError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | ServiceUnavailableError | ShareLinkUnavailable | SlugTaken | TemplateInUseError | TemplateSourceError | UnauthorizedError | ValidationError | WhatsAppChannelError | WhatsAppServiceWindowClosedError | WhatsAppSetupLinkUnavailableError;
393
413
  /** Convert a decoded error payload into its generated JavaScript error class. */
394
414
  export declare function fromApiError(error: unknown, context?: SamvaApiErrorContext): AnySamvaApiError | SamvaTransportError;
395
415
  export {};
@@ -194,6 +194,20 @@ var ServiceUnavailableError = class extends SamvaApiError {
194
194
  Object.assign(this, payload);
195
195
  }
196
196
  };
197
+ var ShareLinkUnavailable = class extends SamvaApiError {
198
+ _tag = "ShareLinkUnavailable";
199
+ constructor(payload, context = {}) {
200
+ super(messageOf("ShareLinkUnavailable", payload), context);
201
+ Object.assign(this, payload);
202
+ }
203
+ };
204
+ var SlugTaken = class extends SamvaApiError {
205
+ _tag = "SlugTaken";
206
+ constructor(payload, context = {}) {
207
+ super(messageOf("SlugTaken", payload), context);
208
+ Object.assign(this, payload);
209
+ }
210
+ };
197
211
  var TemplateInUseError = class extends SamvaApiError {
198
212
  _tag = "TemplateInUseError";
199
213
  constructor(payload, context = {}) {
@@ -267,6 +281,8 @@ const constructors = {
267
281
  ResourceNotFoundError,
268
282
  SenderNotReadyError,
269
283
  ServiceUnavailableError,
284
+ ShareLinkUnavailable,
285
+ SlugTaken,
270
286
  TemplateInUseError,
271
287
  TemplateSourceError,
272
288
  UnauthorizedError,
@@ -1681,6 +1697,43 @@ const payloadSchemas = {
1681
1697
  "x-category": ["transient"],
1682
1698
  "x-retryable": true
1683
1699
  },
1700
+ ShareLinkUnavailable: {
1701
+ type: "object",
1702
+ properties: {
1703
+ _tag: {
1704
+ type: "string",
1705
+ enum: ["ShareLinkUnavailable"]
1706
+ },
1707
+ message: { type: "string" }
1708
+ },
1709
+ required: ["_tag", "message"],
1710
+ additionalProperties: false
1711
+ },
1712
+ SlugTaken: {
1713
+ type: "object",
1714
+ properties: {
1715
+ _tag: {
1716
+ type: "string",
1717
+ enum: ["SlugTaken"]
1718
+ },
1719
+ slug: {
1720
+ type: "string",
1721
+ pattern: "^[a-z0-9-]{3,60}$"
1722
+ },
1723
+ suggestion: {
1724
+ type: "string",
1725
+ pattern: "^[a-z0-9-]{3,60}$"
1726
+ },
1727
+ message: { type: "string" }
1728
+ },
1729
+ required: [
1730
+ "_tag",
1731
+ "slug",
1732
+ "suggestion",
1733
+ "message"
1734
+ ],
1735
+ additionalProperties: false
1736
+ },
1684
1737
  TemplateInUseError: {
1685
1738
  type: "object",
1686
1739
  properties: {
@@ -2019,6 +2072,6 @@ function fromApiError(error, context = {}) {
2019
2072
  }
2020
2073
  return new SamvaTransportError(error, context);
2021
2074
  }
2022
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError };
2075
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError };
2023
2076
 
2024
2077
  //# sourceMappingURL=errors.gen.js.map
@@ -1,5 +1,5 @@
1
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./errors.gen.js";
1
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./errors.gen.js";
2
2
  import { MediaUploadError } from "../inline-attachments.js";
3
3
  import { MailboxEventStream, MailboxEventStreamError } from "../mailbox-events.js";
4
4
  import { createClient } from "./client.js";
5
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };
5
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };