samva 0.54.0 → 0.56.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 (151) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -4
  4. package/dist/agent/index.js +1 -1
  5. package/dist/client/client/client.gen.js +1 -2
  6. package/dist/client/client/utils.gen.js +1 -1
  7. package/dist/client/client.gen.js +1 -1
  8. package/dist/client/sdk.gen.d.ts +69 -6
  9. package/dist/client/sdk.gen.js +216 -9
  10. package/dist/client/types.gen.d.ts +486 -7
  11. package/dist/client-attribution.js +1 -1
  12. package/dist/effect/agents.js +1 -1
  13. package/dist/effect/analytics.js +1 -1
  14. package/dist/effect/api-keys.js +1 -1
  15. package/dist/effect/approval-requests.js +1 -1
  16. package/dist/effect/attachments.js +1 -1
  17. package/dist/effect/brands.js +2 -2
  18. package/dist/effect/campaigns.d.ts +66 -56
  19. package/dist/effect/campaigns.js +1 -1
  20. package/dist/effect/categories.js +6 -6
  21. package/dist/effect/contact-groups.js +1 -1
  22. package/dist/effect/contacts.js +1 -1
  23. package/dist/effect/conversations.js +1 -1
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/descriptors/phone-numbers.d.ts +49 -0
  26. package/dist/effect/descriptors/phone-numbers.js +47 -0
  27. package/dist/effect/descriptors/topics.d.ts +1 -1
  28. package/dist/effect/descriptors/topics.js +1 -1
  29. package/dist/effect/descriptors/whats-app.d.ts +10 -0
  30. package/dist/effect/descriptors/whats-app.js +10 -0
  31. package/dist/effect/email.js +1 -1
  32. package/dist/effect/errors.d.ts +1 -1
  33. package/dist/effect/errors.js +2 -2
  34. package/dist/effect/events.js +2 -2
  35. package/dist/effect/feedback.js +2 -2
  36. package/dist/effect/generated/accounts.d.ts +12 -1
  37. package/dist/effect/generated/accounts.js +2 -1
  38. package/dist/effect/generated/agents.js +7 -7
  39. package/dist/effect/generated/analytics.js +16 -16
  40. package/dist/effect/generated/api-keys.js +5 -5
  41. package/dist/effect/generated/approval-requests.js +1 -1
  42. package/dist/effect/generated/attachments.js +4 -4
  43. package/dist/effect/generated/brands.js +1 -1
  44. package/dist/effect/generated/campaigns.d.ts +17 -1
  45. package/dist/effect/generated/campaigns.js +15 -14
  46. package/dist/effect/generated/contact-events.js +1 -1
  47. package/dist/effect/generated/contact-groups.js +12 -12
  48. package/dist/effect/generated/contacts.js +50 -50
  49. package/dist/effect/generated/conversations.js +7 -7
  50. package/dist/effect/generated/custom-fields.js +6 -6
  51. package/dist/effect/generated/email.js +48 -48
  52. package/dist/effect/generated/events.js +5 -5
  53. package/dist/effect/generated/feedback.js +1 -1
  54. package/dist/effect/generated/index.d.ts +3 -1
  55. package/dist/effect/generated/integrations-catalog.d.ts +16 -0
  56. package/dist/effect/generated/integrations-catalog.js +10 -6
  57. package/dist/effect/generated/integrations.js +5 -5
  58. package/dist/effect/generated/journeys.d.ts +38 -1
  59. package/dist/effect/generated/journeys.js +16 -14
  60. package/dist/effect/generated/logs.js +2 -2
  61. package/dist/effect/generated/mailboxes.d.ts +41 -3
  62. package/dist/effect/generated/mailboxes.js +48 -50
  63. package/dist/effect/generated/media.js +1 -1
  64. package/dist/effect/generated/messages.js +5 -5
  65. package/dist/effect/generated/namespaces.d.ts +9 -9
  66. package/dist/effect/generated/namespaces.js +1 -1
  67. package/dist/effect/generated/newsletter-domains.js +1 -1
  68. package/dist/effect/generated/newsletter-issues.js +69 -69
  69. package/dist/effect/generated/newsletters.js +1 -1
  70. package/dist/effect/generated/operations.js +1 -1
  71. package/dist/effect/generated/organizations.d.ts +3 -0
  72. package/dist/effect/generated/organizations.js +2 -1
  73. package/dist/effect/generated/phone-numbers.d.ts +817 -0
  74. package/dist/effect/generated/phone-numbers.js +230 -0
  75. package/dist/effect/generated/policies.js +2 -2
  76. package/dist/effect/generated/scheduled-messages.js +1 -1
  77. package/dist/effect/generated/shared.d.ts +35 -14
  78. package/dist/effect/generated/shared.js +36 -13
  79. package/dist/effect/generated/subscriptions.js +1 -1
  80. package/dist/effect/generated/template-registrations.d.ts +9 -0
  81. package/dist/effect/generated/template-registrations.js +3 -2
  82. package/dist/effect/generated/template-share-links.js +9 -9
  83. package/dist/effect/generated/templates.js +119 -119
  84. package/dist/effect/generated/topic-forms.js +1 -1
  85. package/dist/effect/generated/topics.d.ts +10 -0
  86. package/dist/effect/generated/topics.js +20 -13
  87. package/dist/effect/generated/webhooks.d.ts +19 -19
  88. package/dist/effect/generated/webhooks.js +22 -18
  89. package/dist/effect/generated/whats-app-flows.js +5 -5
  90. package/dist/effect/generated/whats-app-setup-links.js +1 -1
  91. package/dist/effect/generated/whats-app.d.ts +251 -1
  92. package/dist/effect/generated/whats-app.js +75 -20
  93. package/dist/effect/generated/whoami.js +1 -1
  94. package/dist/effect/generated-metadata.d.ts +41 -1
  95. package/dist/effect/generated-metadata.js +174 -146
  96. package/dist/effect/index.d.ts +1 -0
  97. package/dist/effect/index.js +6 -5
  98. package/dist/effect/integrations-catalog.js +1 -1
  99. package/dist/effect/integrations.js +1 -1
  100. package/dist/effect/internal/client.js +6 -6
  101. package/dist/effect/internal/email-sender.js +3 -3
  102. package/dist/effect/internal/log-events.js +2 -2
  103. package/dist/effect/internal/mailbox-events.js +1 -1
  104. package/dist/effect/internal/operation.js +2 -2
  105. package/dist/effect/internal/send.js +4 -4
  106. package/dist/effect/journeys.d.ts +10 -0
  107. package/dist/effect/journeys.js +1 -1
  108. package/dist/effect/logs.js +1 -1
  109. package/dist/effect/mailboxes.d.ts +191 -191
  110. package/dist/effect/mailboxes.js +3 -3
  111. package/dist/effect/media.js +2 -2
  112. package/dist/effect/messages.js +2 -2
  113. package/dist/effect/namespaces.d.ts +2 -2
  114. package/dist/effect/namespaces.js +1 -1
  115. package/dist/effect/newsletter-domains.js +1 -1
  116. package/dist/effect/newsletter-issues.js +1 -1
  117. package/dist/effect/newsletters.js +1 -1
  118. package/dist/effect/operations.js +1 -1
  119. package/dist/effect/organizations.js +1 -1
  120. package/dist/effect/phone-numbers.d.ts +22 -0
  121. package/dist/effect/phone-numbers.js +21 -0
  122. package/dist/effect/policies.js +1 -1
  123. package/dist/effect/retry.js +3 -3
  124. package/dist/effect/scheduled-messages.d.ts +350 -350
  125. package/dist/effect/scheduled-messages.js +1 -1
  126. package/dist/effect/subscriptions.js +1 -1
  127. package/dist/effect/template-registrations.js +1 -1
  128. package/dist/effect/template-share-links.js +1 -1
  129. package/dist/effect/templates.js +2 -2
  130. package/dist/effect/topic-forms.js +1 -1
  131. package/dist/effect/topics.d.ts +70 -2
  132. package/dist/effect/topics.js +1 -1
  133. package/dist/effect/webhooks.d.ts +4 -4
  134. package/dist/effect/webhooks.js +2 -2
  135. package/dist/effect/whatsapp-flows.js +1 -1
  136. package/dist/effect/whatsapp-setup-links.js +1 -1
  137. package/dist/effect/whatsapp.d.ts +16 -0
  138. package/dist/effect/whatsapp.js +4 -2
  139. package/dist/effect/whoami.js +1 -1
  140. package/dist/index.js +2 -2
  141. package/dist/package.json.js +5 -0
  142. package/dist/promises/client.d.ts +3 -1
  143. package/dist/promises/client.js +7 -5
  144. package/dist/promises/errors.gen.d.ts +16 -2
  145. package/dist/promises/errors.gen.js +48 -11
  146. package/dist/promises/index.js +3 -3
  147. package/dist/promises/types.gen.d.ts +1 -1
  148. package/dist/request-policy.js +1 -1
  149. package/dist/service-map.d.ts +30 -0
  150. package/package.json +9 -5
  151. package/dist/package.js +0 -5
@@ -1,4 +1,4 @@
1
- import { version } from "./package.js";
1
+ import { version } from "./package.json.js";
2
2
  // src/client-attribution.ts
3
3
  const SDK_VERSION = version;
4
4
  const CLIENT_ATTRIBUTION_HEADER = "x-samva-client";
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { agentsOperations } from "./descriptors/agents.js";
4
3
  import { AgentsGroup } from "./generated/agents.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/agents.ts
6
6
  var agents_exports = /* @__PURE__ */ __exportAll({
7
7
  continueOnStandard: () => continueOnStandard,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { analyticsOperations } from "./descriptors/analytics.js";
4
3
  import { AnalyticsGroup } from "./generated/analytics.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/analytics.ts
6
6
  var analytics_exports = /* @__PURE__ */ __exportAll({
7
7
  exportData: () => exportData,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { apiKeysOperations } from "./descriptors/api-keys.js";
4
3
  import { APIKeysGroup, ApiKeysCreateRequestJson, ApiKeysUpdateRequestJson } from "./generated/api-keys.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/api-keys.ts
6
6
  var api_keys_exports = /* @__PURE__ */ __exportAll({
7
7
  CreatePayload: () => ApiKeysCreateRequestJson,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { approvalRequestsOperations } from "./descriptors/approval-requests.js";
4
3
  import { ApprovalRequestsGroup } from "./generated/approval-requests.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/approval-requests.ts
6
6
  var approval_requests_exports = /* @__PURE__ */ __exportAll({
7
7
  approve: () => approve,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { attachmentsOperations } from "./descriptors/attachments.js";
4
3
  import { AttachmentsGroup } from "./generated/attachments.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/attachments.ts
6
6
  var attachments_exports = /* @__PURE__ */ __exportAll({
7
7
  downloadUrl: () => downloadUrl,
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { CreateBrand, UpdateBrand } from "./generated/shared.js";
3
- import { forGroup } from "./internal/operation.js";
4
2
  import { brandsOperations } from "./descriptors/brands.js";
5
3
  import { BrandsGroup } from "./generated/brands.js";
4
+ import { forGroup } from "./internal/operation.js";
5
+ import { CreateBrand, UpdateBrand } from "./generated/shared.js";
6
6
  // src/effect/brands.ts
7
7
  var brands_exports = /* @__PURE__ */ __exportAll({
8
8
  CreatePayload: () => CreateBrand,
@@ -734,20 +734,6 @@ export declare const list: ((input?: {
734
734
  readonly name: string;
735
735
  readonly channel: "email" | "sms" | "whatsapp";
736
736
  readonly content: {
737
- readonly channel: "sms";
738
- readonly sms: {
739
- readonly text?: string | null;
740
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
741
- readonly templateSlug?: string | null;
742
- readonly templateData?: {
743
- readonly [x: string]: import("./generated/index.js").JsonValue;
744
- } | null;
745
- };
746
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
747
- readonly metadata?: {
748
- readonly [x: string]: import("./generated/index.js").JsonValue;
749
- } | null;
750
- } | {
751
737
  readonly channel: "email";
752
738
  readonly email: {
753
739
  readonly subject?: string | null;
@@ -797,6 +783,20 @@ export declare const list: ((input?: {
797
783
  readonly metadata?: {
798
784
  readonly [x: string]: import("./generated/index.js").JsonValue;
799
785
  } | null;
786
+ } | {
787
+ readonly channel: "sms";
788
+ readonly sms: {
789
+ readonly text?: string | null;
790
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
791
+ readonly templateSlug?: string | null;
792
+ readonly templateData?: {
793
+ readonly [x: string]: import("./generated/index.js").JsonValue;
794
+ } | null;
795
+ };
796
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
797
+ readonly metadata?: {
798
+ readonly [x: string]: import("./generated/index.js").JsonValue;
799
+ } | null;
800
800
  } | {
801
801
  readonly channel: "whatsapp";
802
802
  readonly whatsapp: {
@@ -860,20 +860,6 @@ export declare const list: ((input?: {
860
860
  readonly name: string;
861
861
  readonly channel: "email" | "sms" | "whatsapp";
862
862
  readonly content: {
863
- readonly channel: "sms";
864
- readonly sms: {
865
- readonly text?: string | null;
866
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
867
- readonly templateSlug?: string | null;
868
- readonly templateData?: {
869
- readonly [x: string]: import("./generated/index.js").JsonValue;
870
- } | null;
871
- };
872
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
873
- readonly metadata?: {
874
- readonly [x: string]: import("./generated/index.js").JsonValue;
875
- } | null;
876
- } | {
877
863
  readonly channel: "email";
878
864
  readonly email: {
879
865
  readonly subject?: string | null;
@@ -923,6 +909,20 @@ export declare const list: ((input?: {
923
909
  readonly metadata?: {
924
910
  readonly [x: string]: import("./generated/index.js").JsonValue;
925
911
  } | null;
912
+ } | {
913
+ readonly channel: "sms";
914
+ readonly sms: {
915
+ readonly text?: string | null;
916
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
917
+ readonly templateSlug?: string | null;
918
+ readonly templateData?: {
919
+ readonly [x: string]: import("./generated/index.js").JsonValue;
920
+ } | null;
921
+ };
922
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
923
+ readonly metadata?: {
924
+ readonly [x: string]: import("./generated/index.js").JsonValue;
925
+ } | null;
926
926
  } | {
927
927
  readonly channel: "whatsapp";
928
928
  readonly whatsapp: {
@@ -1250,20 +1250,6 @@ export declare const listRuns: ((input: {
1250
1250
  readonly startedAt: string | null;
1251
1251
  readonly completedAt: string | null;
1252
1252
  readonly contentSnapshot: {
1253
- readonly channel: "sms";
1254
- readonly sms: {
1255
- readonly text?: string | null;
1256
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1257
- readonly templateSlug?: string | null;
1258
- readonly templateData?: {
1259
- readonly [x: string]: import("./generated/index.js").JsonValue;
1260
- } | null;
1261
- };
1262
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1263
- readonly metadata?: {
1264
- readonly [x: string]: import("./generated/index.js").JsonValue;
1265
- } | null;
1266
- } | {
1267
1253
  readonly channel: "email";
1268
1254
  readonly email: {
1269
1255
  readonly subject?: string | null;
@@ -1313,6 +1299,20 @@ export declare const listRuns: ((input: {
1313
1299
  readonly metadata?: {
1314
1300
  readonly [x: string]: import("./generated/index.js").JsonValue;
1315
1301
  } | null;
1302
+ } | {
1303
+ readonly channel: "sms";
1304
+ readonly sms: {
1305
+ readonly text?: string | null;
1306
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1307
+ readonly templateSlug?: string | null;
1308
+ readonly templateData?: {
1309
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1310
+ } | null;
1311
+ };
1312
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1313
+ readonly metadata?: {
1314
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1315
+ } | null;
1316
1316
  } | {
1317
1317
  readonly channel: "whatsapp";
1318
1318
  readonly whatsapp: {
@@ -1380,20 +1380,6 @@ export declare const listRuns: ((input: {
1380
1380
  readonly startedAt: string | null;
1381
1381
  readonly completedAt: string | null;
1382
1382
  readonly contentSnapshot: {
1383
- readonly channel: "sms";
1384
- readonly sms: {
1385
- readonly text?: string | null;
1386
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1387
- readonly templateSlug?: string | null;
1388
- readonly templateData?: {
1389
- readonly [x: string]: import("./generated/index.js").JsonValue;
1390
- } | null;
1391
- };
1392
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1393
- readonly metadata?: {
1394
- readonly [x: string]: import("./generated/index.js").JsonValue;
1395
- } | null;
1396
- } | {
1397
1383
  readonly channel: "email";
1398
1384
  readonly email: {
1399
1385
  readonly subject?: string | null;
@@ -1443,6 +1429,20 @@ export declare const listRuns: ((input: {
1443
1429
  readonly metadata?: {
1444
1430
  readonly [x: string]: import("./generated/index.js").JsonValue;
1445
1431
  } | null;
1432
+ } | {
1433
+ readonly channel: "sms";
1434
+ readonly sms: {
1435
+ readonly text?: string | null;
1436
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1437
+ readonly templateSlug?: string | null;
1438
+ readonly templateData?: {
1439
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1440
+ } | null;
1441
+ };
1442
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1443
+ readonly metadata?: {
1444
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1445
+ } | null;
1446
1446
  } | {
1447
1447
  readonly channel: "whatsapp";
1448
1448
  readonly whatsapp: {
@@ -1533,6 +1533,11 @@ export declare const listRecipients: ((input: {
1533
1533
  readonly id: string & import("effect/Brand").Brand<"CampaignRecipientId">;
1534
1534
  readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
1535
1535
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
1536
+ readonly contact: {
1537
+ readonly id: string & import("effect/Brand").Brand<"ContactId">;
1538
+ readonly name: string;
1539
+ readonly displayName: string | null;
1540
+ } | null;
1536
1541
  readonly status: "dispatched" | "dispatching" | "failed" | "pending" | "skipped";
1537
1542
  readonly messageId: string | null;
1538
1543
  readonly failureReason: string | null;
@@ -1552,6 +1557,11 @@ export declare const listRecipients: ((input: {
1552
1557
  readonly id: string & import("effect/Brand").Brand<"CampaignRecipientId">;
1553
1558
  readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
1554
1559
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
1560
+ readonly contact: {
1561
+ readonly id: string & import("effect/Brand").Brand<"ContactId">;
1562
+ readonly name: string;
1563
+ readonly displayName: string | null;
1564
+ } | null;
1555
1565
  readonly status: "dispatched" | "dispatching" | "failed" | "pending" | "skipped";
1556
1566
  readonly messageId: string | null;
1557
1567
  readonly failureReason: string | null;
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { campaignsOperations } from "./descriptors/campaigns.js";
4
3
  import { CampaignsGroup } from "./generated/campaigns.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/campaigns.ts
6
6
  var campaigns_exports = /* @__PURE__ */ __exportAll({
7
7
  archive: () => archive,
@@ -1,6 +1,6 @@
1
- import { SamvaErrorMetadata } from "./generated-metadata.js";
2
1
  import { Effect } from "effect";
3
- import * as Predicate$1 from "effect/Predicate";
2
+ import * as Predicate from "effect/Predicate";
3
+ import { SamvaErrorMetadata } from "./generated-metadata.js";
4
4
  // src/effect/categories.ts
5
5
  /**
6
6
  * Semantic error-category helpers for the Effect SDK.
@@ -23,7 +23,7 @@ import * as Predicate$1 from "effect/Predicate";
23
23
  */
24
24
  const metadata = SamvaErrorMetadata;
25
25
  const outcomeOf = (error) => {
26
- if (!Predicate$1.isObject(error) || typeof error._tag !== "string") return void 0;
26
+ if (!Predicate.isObject(error) || typeof error._tag !== "string") return void 0;
27
27
  const entry = metadata[error._tag];
28
28
  if (entry?.rules === void 0) return entry;
29
29
  const value = error[entry.rules.field];
@@ -46,12 +46,12 @@ const isBillingError = categoryGuard("billing");
46
46
  * attempt — retrying them would loop forever.
47
47
  */
48
48
  const isRequestTransportError = (error) => {
49
- if (!Predicate$1.isTagged(error, "HttpClientError")) return false;
49
+ if (!Predicate.isTagged(error, "HttpClientError")) return false;
50
50
  const reason = error.reason;
51
- return Predicate$1.isObject(reason) && Predicate$1.isTagged(reason, "TransportError");
51
+ return Predicate.isObject(reason) && Predicate.isTagged(reason, "TransportError");
52
52
  };
53
53
  /** A request attempt that outlasted its `timeoutMs`; it fails like a lost response. */
54
- const isAttemptTimeout = (error) => Predicate$1.isTagged(error, "SamvaTimeoutError");
54
+ const isAttemptTimeout = (error) => Predicate.isTagged(error, "SamvaTimeoutError");
55
55
  /** True for transient failures, including raw request-transport errors and attempt timeouts. */
56
56
  const isTransient = (error) => hasCategory(error, "transient") || isRequestTransportError(error) || isAttemptTimeout(error);
57
57
  /** True when an error is declared safe to retry (throttling / transient / transport / timeout). */
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { contactGroupsOperations } from "./descriptors/contact-groups.js";
4
3
  import { ContactGroupsGroup } from "./generated/contact-groups.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/contact-groups.ts
6
6
  var contact_groups_exports = /* @__PURE__ */ __exportAll({
7
7
  addMembers: () => addMembers,
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { contactsOperations } from "./descriptors/contacts.js";
4
3
  import { ContactEventsGroup } from "./generated/contact-events.js";
5
4
  import { ContactsGroup } from "./generated/contacts.js";
5
+ import { forGroup } from "./internal/operation.js";
6
6
  // src/effect/contacts.ts
7
7
  var contacts_exports = /* @__PURE__ */ __exportAll({
8
8
  addIdentity: () => addIdentity,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { conversationsOperations } from "./descriptors/conversations.js";
4
3
  import { ConversationsGroup } from "./generated/conversations.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/conversations.ts
6
6
  var conversations_exports = /* @__PURE__ */ __exportAll({
7
7
  addCategories: () => addCategories,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { customFieldsOperations } from "./descriptors/custom-fields.js";
4
3
  import { CustomFieldsGroup } from "./generated/custom-fields.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/custom-fields.ts
6
6
  var custom_fields_exports = /* @__PURE__ */ __exportAll({
7
7
  create: () => create,
@@ -0,0 +1,49 @@
1
+ export declare const phoneNumbersOperations: {
2
+ readonly phoneNumbersSearchAvailableNumbers: {
3
+ readonly group: "Phone numbers";
4
+ readonly method: "GET";
5
+ readonly idempotent: false;
6
+ readonly paginated: false;
7
+ readonly call: {
8
+ readonly kind: "params";
9
+ };
10
+ };
11
+ readonly phoneNumbersPurchaseNumber: {
12
+ readonly group: "Phone numbers";
13
+ readonly method: "POST";
14
+ readonly idempotent: false;
15
+ readonly paginated: false;
16
+ readonly call: {
17
+ readonly kind: "payload";
18
+ };
19
+ };
20
+ readonly phoneNumbersListPhoneNumbers: {
21
+ readonly group: "Phone numbers";
22
+ readonly method: "GET";
23
+ readonly idempotent: false;
24
+ readonly paginated: false;
25
+ readonly call: {
26
+ readonly kind: "params";
27
+ };
28
+ };
29
+ readonly phoneNumbersGetPhoneNumber: {
30
+ readonly group: "Phone numbers";
31
+ readonly method: "GET";
32
+ readonly idempotent: false;
33
+ readonly paginated: false;
34
+ readonly call: {
35
+ readonly kind: "path";
36
+ readonly paths: readonly ["id"];
37
+ };
38
+ };
39
+ readonly phoneNumbersReleasePhoneNumber: {
40
+ readonly group: "Phone numbers";
41
+ readonly method: "DELETE";
42
+ readonly idempotent: false;
43
+ readonly paginated: false;
44
+ readonly call: {
45
+ readonly kind: "path";
46
+ readonly paths: readonly ["id"];
47
+ };
48
+ };
49
+ };
@@ -0,0 +1,47 @@
1
+ // src/effect/descriptors/phone-numbers.ts
2
+ const phoneNumbersOperations = {
3
+ phoneNumbersSearchAvailableNumbers: {
4
+ group: "Phone numbers",
5
+ method: "GET",
6
+ idempotent: false,
7
+ paginated: false,
8
+ call: { kind: "params" }
9
+ },
10
+ phoneNumbersPurchaseNumber: {
11
+ group: "Phone numbers",
12
+ method: "POST",
13
+ idempotent: false,
14
+ paginated: false,
15
+ call: { kind: "payload" }
16
+ },
17
+ phoneNumbersListPhoneNumbers: {
18
+ group: "Phone numbers",
19
+ method: "GET",
20
+ idempotent: false,
21
+ paginated: false,
22
+ call: { kind: "params" }
23
+ },
24
+ phoneNumbersGetPhoneNumber: {
25
+ group: "Phone numbers",
26
+ method: "GET",
27
+ idempotent: false,
28
+ paginated: false,
29
+ call: {
30
+ kind: "path",
31
+ paths: ["id"]
32
+ }
33
+ },
34
+ phoneNumbersReleasePhoneNumber: {
35
+ group: "Phone numbers",
36
+ method: "DELETE",
37
+ idempotent: false,
38
+ paginated: false,
39
+ call: {
40
+ kind: "path",
41
+ paths: ["id"]
42
+ }
43
+ }
44
+ };
45
+ export { phoneNumbersOperations };
46
+
47
+ //# sourceMappingURL=phone-numbers.js.map
@@ -3,7 +3,7 @@ export declare const topicsOperations: {
3
3
  readonly group: "Topics";
4
4
  readonly method: "GET";
5
5
  readonly idempotent: false;
6
- readonly paginated: false;
6
+ readonly paginated: true;
7
7
  readonly call: {
8
8
  readonly kind: "params";
9
9
  };
@@ -4,7 +4,7 @@ const topicsOperations = {
4
4
  group: "Topics",
5
5
  method: "GET",
6
6
  idempotent: false,
7
- paginated: false,
7
+ paginated: true,
8
8
  call: { kind: "params" }
9
9
  },
10
10
  topicsCreate: {
@@ -93,6 +93,16 @@ export declare const whatsappOperations: {
93
93
  readonly paths: readonly ["accountId"];
94
94
  };
95
95
  };
96
+ readonly whatsappReleaseBusinessAccount: {
97
+ readonly group: "WhatsApp";
98
+ readonly method: "POST";
99
+ readonly idempotent: false;
100
+ readonly paginated: false;
101
+ readonly call: {
102
+ readonly kind: "pathPayload";
103
+ readonly paths: readonly ["accountId"];
104
+ };
105
+ };
96
106
  readonly whatsappSetDefaultBusinessAccount: {
97
107
  readonly group: "WhatsApp";
98
108
  readonly method: "POST";
@@ -82,6 +82,16 @@ const whatsappOperations = {
82
82
  paths: ["accountId"]
83
83
  }
84
84
  },
85
+ whatsappReleaseBusinessAccount: {
86
+ group: "WhatsApp",
87
+ method: "POST",
88
+ idempotent: false,
89
+ paginated: false,
90
+ call: {
91
+ kind: "pathPayload",
92
+ paths: ["accountId"]
93
+ }
94
+ },
85
95
  whatsappSetDefaultBusinessAccount: {
86
96
  group: "WhatsApp",
87
97
  method: "POST",
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { emailOperations } from "./descriptors/email.js";
4
3
  import { EmailGroup, TrackingRecipientEmail } from "./generated/email.js";
5
4
  import { addEmailSender } from "./internal/email-sender.js";
5
+ import { forGroup } from "./internal/operation.js";
6
6
  import { sendEmail } from "./internal/send.js";
7
7
  // src/effect/email.ts
8
8
  var email_exports = /* @__PURE__ */ __exportAll({
@@ -1,3 +1,3 @@
1
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, WhatsAppChannelError, WhatsAppSetupLinkUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, ServiceUnavailableError, UnauthorizedError, ValidationError, WhatsAppServiceWindowClosedError, TemplateSourceError, TemplateInUseError, DeliveryUnavailableError, } from "./generated/shared.js";
1
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, PhoneNumberProvisioningError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, } from "./generated/shared.js";
2
2
  export { MediaUploadError } from "../inline-attachments.js";
3
3
  export { SamvaTimeoutError } from "./internal/timeout.js";
@@ -1,4 +1,4 @@
1
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, PhoneNumberProvisioningError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError } from "./generated/shared.js";
1
2
  import { MediaUploadError } from "../inline-attachments.js";
2
- import { 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 } from "./generated/shared.js";
3
3
  import { SamvaTimeoutError } from "./internal/timeout.js";
4
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaTimeoutError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError };
4
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, PhoneNumberProvisioningError, RateLimitedError, ResourceNotFoundError, SamvaTimeoutError, SenderNotReadyError, ServiceUnavailableError, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError };
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { CreateEventPayload } from "./generated/shared.js";
3
- import { forGroup } from "./internal/operation.js";
4
2
  import { eventsOperations } from "./descriptors/events.js";
5
3
  import { EventsGroup } from "./generated/events.js";
4
+ import { forGroup } from "./internal/operation.js";
5
+ import { CreateEventPayload } from "./generated/shared.js";
6
6
  // src/effect/events.ts
7
7
  var events_exports = /* @__PURE__ */ __exportAll({
8
8
  CreateEventPayload: () => CreateEventPayload,
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { SendFeedback } from "./generated/shared.js";
3
- import { forGroup } from "./internal/operation.js";
4
2
  import { feedbackOperations } from "./descriptors/feedback.js";
5
3
  import { FeedbackGroup } from "./generated/feedback.js";
4
+ import { forGroup } from "./internal/operation.js";
5
+ import { SendFeedback } from "./generated/shared.js";
6
6
  // src/effect/feedback.ts
7
7
  var feedback_exports = /* @__PURE__ */ __exportAll({
8
8
  SendPayload: () => SendFeedback,
@@ -1,6 +1,6 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { AccountStatus, ApiKeySecurityMiddleware, ContactId, ForbiddenError, GatewayTimeoutError, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, InternalError, JsonObject, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
3
+ import { AccountStatus, ApiKeySecurityMiddleware, ContactId, ContactReferenceSummary, ForbiddenError, GatewayTimeoutError, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, InternalError, JsonObject, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
4
4
  export type AccountInfo = {
5
5
  readonly externalId?: string;
6
6
  readonly displayName?: string;
@@ -309,6 +309,7 @@ export type AccountsListContactConnections200 = {
309
309
  readonly organizationId: OrganizationId;
310
310
  readonly integrationId: IntegrationId;
311
311
  readonly contactId: ContactId;
312
+ readonly contact: ContactReferenceSummary | null;
312
313
  readonly accountId: IntegrationAccountId;
313
314
  readonly provider?: IntegrationKey;
314
315
  readonly info: AccountInfo;
@@ -322,6 +323,11 @@ export declare const AccountsListContactConnections200: Schema.Struct<{
322
323
  readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
323
324
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
324
325
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
326
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
327
+ readonly id: Schema.brand<Schema.String, "ContactId">;
328
+ readonly name: Schema.String;
329
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
330
+ }>, Schema.Null]>;
325
331
  readonly accountId: Schema.brand<Schema.String, "IntegrationAccountId">;
326
332
  readonly provider: Schema.optionalKey<Schema.String>;
327
333
  readonly info: Schema.Struct<{
@@ -806,6 +812,11 @@ declare const AccountsGroup_base: HttpApiGroup.HttpApiGroup<"Accounts", HttpApiE
806
812
  readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
807
813
  readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
808
814
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
815
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
816
+ readonly id: Schema.brand<Schema.String, "ContactId">;
817
+ readonly name: Schema.String;
818
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
819
+ }>, Schema.Null]>;
809
820
  readonly accountId: Schema.brand<Schema.String, "IntegrationAccountId">;
810
821
  readonly provider: Schema.optionalKey<Schema.String>;
811
822
  readonly info: Schema.Struct<{
@@ -1,6 +1,6 @@
1
- import { AccountStatus, ApiKeySecurityMiddleware, ContactId, ForbiddenError, GatewayTimeoutError, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, InternalError, JsonObject, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
2
1
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
3
+ import { AccountStatus, ApiKeySecurityMiddleware, ContactId, ContactReferenceSummary, ForbiddenError, GatewayTimeoutError, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, InternalError, JsonObject, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/accounts.ts
5
5
  const AccountInfo = /* @__PURE__ */ (() => Schema.Struct({
6
6
  externalId: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))),
@@ -106,6 +106,7 @@ const AccountsListContactConnections200 = /* @__PURE__ */ (() => Schema.Struct({
106
106
  organizationId: OrganizationId,
107
107
  integrationId: IntegrationId,
108
108
  contactId: ContactId,
109
+ contact: Schema.Union([ContactReferenceSummary, Schema.Null]),
109
110
  accountId: IntegrationAccountId,
110
111
  provider: Schema.optionalKey(IntegrationKey),
111
112
  info: AccountInfo,