samva 0.54.0 → 0.55.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 (146) 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 +57 -3
  9. package/dist/client/sdk.gen.js +184 -8
  10. package/dist/client/types.gen.d.ts +420 -1
  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/email.js +1 -1
  30. package/dist/effect/errors.d.ts +1 -1
  31. package/dist/effect/errors.js +2 -2
  32. package/dist/effect/events.js +2 -2
  33. package/dist/effect/feedback.js +2 -2
  34. package/dist/effect/generated/accounts.d.ts +12 -1
  35. package/dist/effect/generated/accounts.js +2 -1
  36. package/dist/effect/generated/agents.js +7 -7
  37. package/dist/effect/generated/analytics.js +16 -16
  38. package/dist/effect/generated/api-keys.js +5 -5
  39. package/dist/effect/generated/approval-requests.js +1 -1
  40. package/dist/effect/generated/attachments.js +4 -4
  41. package/dist/effect/generated/brands.js +1 -1
  42. package/dist/effect/generated/campaigns.d.ts +17 -1
  43. package/dist/effect/generated/campaigns.js +15 -14
  44. package/dist/effect/generated/contact-events.js +1 -1
  45. package/dist/effect/generated/contact-groups.js +12 -12
  46. package/dist/effect/generated/contacts.js +50 -50
  47. package/dist/effect/generated/conversations.js +7 -7
  48. package/dist/effect/generated/custom-fields.js +6 -6
  49. package/dist/effect/generated/email.js +48 -48
  50. package/dist/effect/generated/events.js +5 -5
  51. package/dist/effect/generated/feedback.js +1 -1
  52. package/dist/effect/generated/index.d.ts +3 -1
  53. package/dist/effect/generated/integrations-catalog.d.ts +16 -0
  54. package/dist/effect/generated/integrations-catalog.js +10 -6
  55. package/dist/effect/generated/integrations.js +5 -5
  56. package/dist/effect/generated/journeys.d.ts +38 -1
  57. package/dist/effect/generated/journeys.js +16 -14
  58. package/dist/effect/generated/logs.js +2 -2
  59. package/dist/effect/generated/mailboxes.d.ts +41 -3
  60. package/dist/effect/generated/mailboxes.js +48 -50
  61. package/dist/effect/generated/media.js +1 -1
  62. package/dist/effect/generated/messages.js +5 -5
  63. package/dist/effect/generated/namespaces.d.ts +9 -9
  64. package/dist/effect/generated/namespaces.js +1 -1
  65. package/dist/effect/generated/newsletter-domains.js +1 -1
  66. package/dist/effect/generated/newsletter-issues.js +69 -69
  67. package/dist/effect/generated/newsletters.js +1 -1
  68. package/dist/effect/generated/operations.js +1 -1
  69. package/dist/effect/generated/organizations.d.ts +3 -0
  70. package/dist/effect/generated/organizations.js +2 -1
  71. package/dist/effect/generated/phone-numbers.d.ts +817 -0
  72. package/dist/effect/generated/phone-numbers.js +230 -0
  73. package/dist/effect/generated/policies.js +2 -2
  74. package/dist/effect/generated/scheduled-messages.js +1 -1
  75. package/dist/effect/generated/shared.d.ts +31 -10
  76. package/dist/effect/generated/shared.js +34 -13
  77. package/dist/effect/generated/subscriptions.js +1 -1
  78. package/dist/effect/generated/template-registrations.js +1 -1
  79. package/dist/effect/generated/template-share-links.js +9 -9
  80. package/dist/effect/generated/templates.js +119 -119
  81. package/dist/effect/generated/topic-forms.js +1 -1
  82. package/dist/effect/generated/topics.d.ts +10 -0
  83. package/dist/effect/generated/topics.js +20 -13
  84. package/dist/effect/generated/webhooks.js +18 -18
  85. package/dist/effect/generated/whats-app-flows.js +5 -5
  86. package/dist/effect/generated/whats-app-setup-links.js +1 -1
  87. package/dist/effect/generated/whats-app.d.ts +75 -0
  88. package/dist/effect/generated/whats-app.js +43 -18
  89. package/dist/effect/generated/whoami.js +1 -1
  90. package/dist/effect/generated-metadata.d.ts +35 -1
  91. package/dist/effect/generated-metadata.js +173 -146
  92. package/dist/effect/index.d.ts +1 -0
  93. package/dist/effect/index.js +6 -5
  94. package/dist/effect/integrations-catalog.js +1 -1
  95. package/dist/effect/integrations.js +1 -1
  96. package/dist/effect/internal/client.js +6 -6
  97. package/dist/effect/internal/email-sender.js +3 -3
  98. package/dist/effect/internal/log-events.js +2 -2
  99. package/dist/effect/internal/mailbox-events.js +1 -1
  100. package/dist/effect/internal/operation.js +2 -2
  101. package/dist/effect/internal/send.js +4 -4
  102. package/dist/effect/journeys.d.ts +10 -0
  103. package/dist/effect/journeys.js +1 -1
  104. package/dist/effect/logs.js +1 -1
  105. package/dist/effect/mailboxes.d.ts +191 -191
  106. package/dist/effect/mailboxes.js +3 -3
  107. package/dist/effect/media.js +2 -2
  108. package/dist/effect/messages.js +2 -2
  109. package/dist/effect/namespaces.d.ts +2 -2
  110. package/dist/effect/namespaces.js +1 -1
  111. package/dist/effect/newsletter-domains.js +1 -1
  112. package/dist/effect/newsletter-issues.js +1 -1
  113. package/dist/effect/newsletters.js +1 -1
  114. package/dist/effect/operations.js +1 -1
  115. package/dist/effect/organizations.js +1 -1
  116. package/dist/effect/phone-numbers.d.ts +22 -0
  117. package/dist/effect/phone-numbers.js +21 -0
  118. package/dist/effect/policies.js +1 -1
  119. package/dist/effect/retry.js +3 -3
  120. package/dist/effect/scheduled-messages.d.ts +350 -350
  121. package/dist/effect/scheduled-messages.js +1 -1
  122. package/dist/effect/subscriptions.js +1 -1
  123. package/dist/effect/template-registrations.js +1 -1
  124. package/dist/effect/template-share-links.js +1 -1
  125. package/dist/effect/templates.js +2 -2
  126. package/dist/effect/topic-forms.js +1 -1
  127. package/dist/effect/topics.d.ts +70 -2
  128. package/dist/effect/topics.js +1 -1
  129. package/dist/effect/webhooks.js +2 -2
  130. package/dist/effect/whatsapp-flows.js +1 -1
  131. package/dist/effect/whatsapp-setup-links.js +1 -1
  132. package/dist/effect/whatsapp.d.ts +10 -0
  133. package/dist/effect/whatsapp.js +1 -1
  134. package/dist/effect/whoami.js +1 -1
  135. package/dist/index.js +2 -2
  136. package/dist/package.json.js +5 -0
  137. package/dist/promises/client.d.ts +3 -1
  138. package/dist/promises/client.js +7 -5
  139. package/dist/promises/errors.gen.d.ts +16 -2
  140. package/dist/promises/errors.gen.js +48 -11
  141. package/dist/promises/index.js +3 -3
  142. package/dist/promises/types.gen.d.ts +1 -1
  143. package/dist/request-policy.js +1 -1
  144. package/dist/service-map.d.ts +25 -0
  145. package/package.json +9 -5
  146. package/dist/package.js +0 -5
@@ -1,8 +1,8 @@
1
+ import { Effect, Schema } from "effect";
1
2
  import { EventStream, eventStreamUrl, readRefusalBody, refusalOutcome } from "../../mailbox-events.js";
2
- import { Service } from "./client.js";
3
3
  import { LogLine } from "../generated/logs.js";
4
+ import { Service } from "./client.js";
4
5
  import { streamEvents, toStreamError } from "./mailbox-events.js";
5
- import { Effect, Schema } from "effect";
6
6
  // src/effect/internal/log-events.ts
7
7
  const LOG_EVENT_STREAM_PATH = "/v1/logs/events";
8
8
  const StreamCursor = Schema.Struct({ cursor: Schema.String.check(Schema.isPattern(/^(0|[1-9]\d{0,14})$/u)) });
@@ -1,6 +1,6 @@
1
+ import { Cause, Effect, Exit, Stream } from "effect";
1
2
  import { MailboxEventStream, MailboxEventStreamError } from "../../mailbox-events.js";
2
3
  import { Service } from "./client.js";
3
- import { Cause, Effect, Exit, Stream } from "effect";
4
4
  // src/effect/internal/mailbox-events.ts
5
5
  const toStreamError = (cause) => cause instanceof MailboxEventStreamError ? cause : new MailboxEventStreamError({
6
6
  _tag: "StreamDisconnectedError",
@@ -1,9 +1,9 @@
1
+ import { Effect, Predicate } from "effect";
1
2
  import { DEFAULT_TIMEOUT_MS, isRetrySafe, resolveTimeout } from "../../request-policy.js";
2
3
  import { streamCursorItems, streamCursorPages } from "../pagination.js";
3
4
  import { generateIdempotencyKey, withRetry } from "../retry.js";
4
- import { withTimeout } from "./timeout.js";
5
5
  import { Service } from "./client.js";
6
- import { Effect, Predicate } from "effect";
6
+ import { withTimeout } from "./timeout.js";
7
7
  // src/effect/internal/operation.ts
8
8
  /** The call's bound, else the client's, else the default; throws a `RangeError` when invalid. */
9
9
  const attemptTimeout = (options, client) => resolveTimeout("timeoutMs", options?.timeoutMs, client.timeoutMs, DEFAULT_TIMEOUT_MS);
@@ -1,12 +1,12 @@
1
+ import { Effect } from "effect";
1
2
  import { mediaCreateBody, planInlineUploads, withUploadedAttachments } from "../../inline-attachments.js";
2
3
  import { buildEmailSendPayload, buildMessagesSendPayload } from "../../normalize.js";
4
+ import { MediaGroup } from "../generated/media.js";
5
+ import { MessagesGroup } from "../generated/messages.js";
3
6
  import { generateIdempotencyKey, withRetry } from "../retry.js";
4
- import { withTimeout } from "./timeout.js";
5
7
  import { Service } from "./client.js";
6
8
  import { attemptTimeout, callEndpoint, stripUndefined } from "./operation.js";
7
- import { MediaGroup } from "../generated/media.js";
8
- import { MessagesGroup } from "../generated/messages.js";
9
- import { Effect } from "effect";
9
+ import { withTimeout } from "./timeout.js";
10
10
  // src/effect/internal/send.ts
11
11
  /**
12
12
  * Inline attachment content over the API's request cap travels as media instead: the largest
@@ -625,6 +625,11 @@ export declare const listRuns: ((input: {
625
625
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
626
626
  readonly version: number;
627
627
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
628
+ readonly contact: {
629
+ readonly id: string & import("effect/Brand").Brand<"ContactId">;
630
+ readonly name: string;
631
+ readonly displayName: string | null;
632
+ } | null;
628
633
  readonly status: "active" | "exited" | "failed" | "paused";
629
634
  readonly exitReason: "archived" | "completed" | "goal" | "merged" | null;
630
635
  readonly failureReason: string | null;
@@ -655,6 +660,11 @@ export declare const listRuns: ((input: {
655
660
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
656
661
  readonly version: number;
657
662
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
663
+ readonly contact: {
664
+ readonly id: string & import("effect/Brand").Brand<"ContactId">;
665
+ readonly name: string;
666
+ readonly displayName: string | null;
667
+ } | null;
658
668
  readonly status: "active" | "exited" | "failed" | "paused";
659
669
  readonly exitReason: "archived" | "completed" | "goal" | "merged" | null;
660
670
  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 { journeysOperations } from "./descriptors/journeys.js";
4
3
  import { JourneysGroup } from "./generated/journeys.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/journeys.ts
6
6
  var journeys_exports = /* @__PURE__ */ __exportAll({
7
7
  archive: () => archive,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { logsOperations } from "./descriptors/logs.js";
4
3
  import { LogsGroup } from "./generated/logs.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  import { events, streamCursor } from "./internal/log-events.js";
6
6
  // src/effect/logs.ts
7
7
  var logs_exports = /* @__PURE__ */ __exportAll({
@@ -1302,23 +1302,6 @@ export declare const deleteNote: (input: {
1302
1302
  readonly noteId: string;
1303
1303
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesDeleteNote">;
1304
1304
  export declare const sendMessage: (input: {
1305
- readonly channel?: "email" | null | undefined;
1306
- readonly to: readonly string[];
1307
- readonly cc?: readonly string[] | null | undefined;
1308
- readonly bcc?: readonly string[] | null | undefined;
1309
- readonly replyTo?: readonly string[] | null | undefined;
1310
- readonly subject: string;
1311
- readonly text?: string | null | undefined;
1312
- readonly html?: string | null | undefined;
1313
- readonly attachments?: readonly {
1314
- readonly filename: string;
1315
- readonly content?: string | null | undefined;
1316
- readonly mediaId?: string | null | undefined;
1317
- readonly contentType: string;
1318
- readonly size: number;
1319
- }[] | null | undefined;
1320
- readonly id: string;
1321
- } | {
1322
1305
  readonly channel: "sms" | "whatsapp";
1323
1306
  readonly to: string;
1324
1307
  readonly text?: string | null | undefined;
@@ -1351,6 +1334,23 @@ export declare const sendMessage: (input: {
1351
1334
  } | null | undefined;
1352
1335
  } | null | undefined;
1353
1336
  readonly id: string;
1337
+ } | {
1338
+ readonly channel?: "email" | null | undefined;
1339
+ readonly to: readonly string[];
1340
+ readonly cc?: readonly string[] | null | undefined;
1341
+ readonly bcc?: readonly string[] | null | undefined;
1342
+ readonly replyTo?: readonly string[] | null | undefined;
1343
+ readonly subject: string;
1344
+ readonly text?: string | null | undefined;
1345
+ readonly html?: string | null | undefined;
1346
+ readonly attachments?: readonly {
1347
+ readonly filename: string;
1348
+ readonly content?: string | null | undefined;
1349
+ readonly mediaId?: string | null | undefined;
1350
+ readonly contentType: string;
1351
+ readonly size: number;
1352
+ }[] | null | undefined;
1353
+ readonly id: string;
1354
1354
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesSendMessage">;
1355
1355
  export declare const getMessage: (input: {
1356
1356
  readonly id: string;
@@ -1371,21 +1371,6 @@ export declare const copyMessageAttachment: (input: {
1371
1371
  readonly attachmentId: string;
1372
1372
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesCopyMessageAttachment">;
1373
1373
  export declare const reply: (input: {
1374
- readonly channel?: "email" | null | undefined;
1375
- readonly cc?: readonly string[] | null | undefined;
1376
- readonly bcc?: readonly string[] | null | undefined;
1377
- readonly text?: string | null | undefined;
1378
- readonly html?: string | null | undefined;
1379
- readonly attachments?: readonly {
1380
- readonly filename: string;
1381
- readonly content?: string | null | undefined;
1382
- readonly mediaId?: string | null | undefined;
1383
- readonly contentType: string;
1384
- readonly size: number;
1385
- }[] | null | undefined;
1386
- readonly id: string;
1387
- readonly messageId: string;
1388
- } | {
1389
1374
  readonly channel: "sms" | "whatsapp";
1390
1375
  readonly text?: string | null | undefined;
1391
1376
  readonly templateId?: string | null | undefined;
@@ -1418,8 +1403,7 @@ export declare const reply: (input: {
1418
1403
  } | null | undefined;
1419
1404
  readonly id: string;
1420
1405
  readonly messageId: string;
1421
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesReply">;
1422
- export declare const replyAll: (input: {
1406
+ } | {
1423
1407
  readonly channel?: "email" | null | undefined;
1424
1408
  readonly cc?: readonly string[] | null | undefined;
1425
1409
  readonly bcc?: readonly string[] | null | undefined;
@@ -1434,7 +1418,8 @@ export declare const replyAll: (input: {
1434
1418
  }[] | null | undefined;
1435
1419
  readonly id: string;
1436
1420
  readonly messageId: string;
1437
- } | {
1421
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesReply">;
1422
+ export declare const replyAll: (input: {
1438
1423
  readonly channel: "sms" | "whatsapp";
1439
1424
  readonly text?: string | null | undefined;
1440
1425
  readonly templateId?: string | null | undefined;
@@ -1467,6 +1452,21 @@ export declare const replyAll: (input: {
1467
1452
  } | null | undefined;
1468
1453
  readonly id: string;
1469
1454
  readonly messageId: string;
1455
+ } | {
1456
+ readonly channel?: "email" | null | undefined;
1457
+ readonly cc?: readonly string[] | null | undefined;
1458
+ readonly bcc?: readonly string[] | null | undefined;
1459
+ readonly text?: string | null | undefined;
1460
+ readonly html?: string | null | undefined;
1461
+ readonly attachments?: readonly {
1462
+ readonly filename: string;
1463
+ readonly content?: string | null | undefined;
1464
+ readonly mediaId?: string | null | undefined;
1465
+ readonly contentType: string;
1466
+ readonly size: number;
1467
+ }[] | null | undefined;
1468
+ readonly id: string;
1469
+ readonly messageId: string;
1470
1470
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesReplyAll">;
1471
1471
  export declare const forward: (input: {
1472
1472
  readonly id: string;
@@ -1683,6 +1683,12 @@ export declare const listDrafts: ((input: {
1683
1683
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
1684
1684
  };
1685
1685
  export declare const createDraft: (input: {
1686
+ readonly channel: "sms" | "whatsapp";
1687
+ readonly to?: string | null | undefined;
1688
+ readonly text?: string | null | undefined;
1689
+ readonly inReplyToMessageId?: string | null | undefined;
1690
+ readonly id: string;
1691
+ } | {
1686
1692
  readonly channel?: "email" | null | undefined;
1687
1693
  readonly endpointId?: string | null | undefined;
1688
1694
  readonly to?: readonly string[] | null | undefined;
@@ -1701,12 +1707,6 @@ export declare const createDraft: (input: {
1701
1707
  }[] | null | undefined;
1702
1708
  readonly inReplyToMessageId?: string | null | undefined;
1703
1709
  readonly id: string;
1704
- } | {
1705
- readonly channel: "sms" | "whatsapp";
1706
- readonly to?: string | null | undefined;
1707
- readonly text?: string | null | undefined;
1708
- readonly inReplyToMessageId?: string | null | undefined;
1709
- readonly id: string;
1710
1710
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"mailboxesCreateDraft">;
1711
1711
  export declare const getDraft: (input: {
1712
1712
  readonly id: string;
@@ -1757,81 +1757,6 @@ export declare const listActions: ((input: {
1757
1757
  readonly before?: string | undefined;
1758
1758
  }) => import("effect/Stream").Stream<{
1759
1759
  readonly items: readonly ({
1760
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1761
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1762
- readonly proposedBy: {
1763
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1764
- readonly id: string;
1765
- readonly displayName?: string | null;
1766
- };
1767
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1768
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1769
- readonly decision: {
1770
- readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
1771
- readonly reviewRound: number;
1772
- readonly requirement: "model" | "never" | "person" | "run";
1773
- readonly decider: "agent" | "model" | "person" | "rule";
1774
- readonly outcome: "allow" | "hold" | "refuse";
1775
- readonly reason: string;
1776
- readonly scopes: readonly {
1777
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1778
- readonly id: string;
1779
- }[];
1780
- readonly rule?: {
1781
- readonly scope: {
1782
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1783
- readonly id: string;
1784
- };
1785
- readonly index: number;
1786
- } | null;
1787
- readonly guard?: string | null;
1788
- readonly guardReason?: string | null;
1789
- readonly resolution?: {
1790
- readonly by: string & import("effect/Brand").Brand<"UserId">;
1791
- readonly at: string;
1792
- readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
1793
- readonly diff?: {
1794
- readonly text?: {
1795
- readonly before: string | null;
1796
- readonly after: string | null;
1797
- } | null;
1798
- readonly html?: {
1799
- readonly before: string | null;
1800
- readonly after: string | null;
1801
- } | null;
1802
- } | null;
1803
- } | null;
1804
- } | null;
1805
- readonly resolution: {
1806
- readonly outcome: "approved" | "cancelled" | "denied";
1807
- readonly actor: {
1808
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1809
- readonly id: string;
1810
- readonly displayName?: string | null;
1811
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1812
- };
1813
- readonly resolvedAt: string;
1814
- readonly reason: string | null;
1815
- } | null;
1816
- readonly alwaysAllow: {
1817
- readonly by: "admin" | "approver" | "owner";
1818
- readonly allowed: boolean;
1819
- } | null;
1820
- readonly createdAt: string;
1821
- readonly updatedAt: string;
1822
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
1823
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1824
- readonly tool: {
1825
- readonly name: string;
1826
- readonly argumentsHash: string;
1827
- readonly arguments: {
1828
- readonly [x: string]: import("./generated/index.js").JsonValue;
1829
- };
1830
- } | null;
1831
- readonly handoff: {
1832
- readonly reason: string;
1833
- } | null;
1834
- } | {
1835
1760
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1836
1761
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1837
1762
  readonly proposedBy: {
@@ -2041,6 +1966,81 @@ export declare const listActions: ((input: {
2041
1966
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
2042
1967
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
2043
1968
  } | null;
1969
+ } | {
1970
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1971
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1972
+ readonly proposedBy: {
1973
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1974
+ readonly id: string;
1975
+ readonly displayName?: string | null;
1976
+ };
1977
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1978
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1979
+ readonly decision: {
1980
+ readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
1981
+ readonly reviewRound: number;
1982
+ readonly requirement: "model" | "never" | "person" | "run";
1983
+ readonly decider: "agent" | "model" | "person" | "rule";
1984
+ readonly outcome: "allow" | "hold" | "refuse";
1985
+ readonly reason: string;
1986
+ readonly scopes: readonly {
1987
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1988
+ readonly id: string;
1989
+ }[];
1990
+ readonly rule?: {
1991
+ readonly scope: {
1992
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1993
+ readonly id: string;
1994
+ };
1995
+ readonly index: number;
1996
+ } | null;
1997
+ readonly guard?: string | null;
1998
+ readonly guardReason?: string | null;
1999
+ readonly resolution?: {
2000
+ readonly by: string & import("effect/Brand").Brand<"UserId">;
2001
+ readonly at: string;
2002
+ readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
2003
+ readonly diff?: {
2004
+ readonly text?: {
2005
+ readonly before: string | null;
2006
+ readonly after: string | null;
2007
+ } | null;
2008
+ readonly html?: {
2009
+ readonly before: string | null;
2010
+ readonly after: string | null;
2011
+ } | null;
2012
+ } | null;
2013
+ } | null;
2014
+ } | null;
2015
+ readonly resolution: {
2016
+ readonly outcome: "approved" | "cancelled" | "denied";
2017
+ readonly actor: {
2018
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2019
+ readonly id: string;
2020
+ readonly displayName?: string | null;
2021
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2022
+ };
2023
+ readonly resolvedAt: string;
2024
+ readonly reason: string | null;
2025
+ } | null;
2026
+ readonly alwaysAllow: {
2027
+ readonly by: "admin" | "approver" | "owner";
2028
+ readonly allowed: boolean;
2029
+ } | null;
2030
+ readonly createdAt: string;
2031
+ readonly updatedAt: string;
2032
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
2033
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
2034
+ readonly tool: {
2035
+ readonly name: string;
2036
+ readonly argumentsHash: string;
2037
+ readonly arguments: {
2038
+ readonly [x: string]: import("./generated/index.js").JsonValue;
2039
+ };
2040
+ } | null;
2041
+ readonly handoff: {
2042
+ readonly reason: string;
2043
+ } | null;
2044
2044
  })[];
2045
2045
  readonly nextCursor: string | null;
2046
2046
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
@@ -2053,81 +2053,6 @@ export declare const listActions: ((input: {
2053
2053
  readonly after?: string | undefined;
2054
2054
  readonly before?: string | undefined;
2055
2055
  }) => import("effect/Stream").Stream<{
2056
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
2057
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2058
- readonly proposedBy: {
2059
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2060
- readonly id: string;
2061
- readonly displayName?: string | null;
2062
- };
2063
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
2064
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
2065
- readonly decision: {
2066
- readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
2067
- readonly reviewRound: number;
2068
- readonly requirement: "model" | "never" | "person" | "run";
2069
- readonly decider: "agent" | "model" | "person" | "rule";
2070
- readonly outcome: "allow" | "hold" | "refuse";
2071
- readonly reason: string;
2072
- readonly scopes: readonly {
2073
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2074
- readonly id: string;
2075
- }[];
2076
- readonly rule?: {
2077
- readonly scope: {
2078
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2079
- readonly id: string;
2080
- };
2081
- readonly index: number;
2082
- } | null;
2083
- readonly guard?: string | null;
2084
- readonly guardReason?: string | null;
2085
- readonly resolution?: {
2086
- readonly by: string & import("effect/Brand").Brand<"UserId">;
2087
- readonly at: string;
2088
- readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
2089
- readonly diff?: {
2090
- readonly text?: {
2091
- readonly before: string | null;
2092
- readonly after: string | null;
2093
- } | null;
2094
- readonly html?: {
2095
- readonly before: string | null;
2096
- readonly after: string | null;
2097
- } | null;
2098
- } | null;
2099
- } | null;
2100
- } | null;
2101
- readonly resolution: {
2102
- readonly outcome: "approved" | "cancelled" | "denied";
2103
- readonly actor: {
2104
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2105
- readonly id: string;
2106
- readonly displayName?: string | null;
2107
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2108
- };
2109
- readonly resolvedAt: string;
2110
- readonly reason: string | null;
2111
- } | null;
2112
- readonly alwaysAllow: {
2113
- readonly by: "admin" | "approver" | "owner";
2114
- readonly allowed: boolean;
2115
- } | null;
2116
- readonly createdAt: string;
2117
- readonly updatedAt: string;
2118
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
2119
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
2120
- readonly tool: {
2121
- readonly name: string;
2122
- readonly argumentsHash: string;
2123
- readonly arguments: {
2124
- readonly [x: string]: import("./generated/index.js").JsonValue;
2125
- };
2126
- } | null;
2127
- readonly handoff: {
2128
- readonly reason: string;
2129
- } | null;
2130
- } | {
2131
2056
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
2132
2057
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2133
2058
  readonly proposedBy: {
@@ -2337,6 +2262,81 @@ export declare const listActions: ((input: {
2337
2262
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
2338
2263
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
2339
2264
  } | null;
2265
+ } | {
2266
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
2267
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2268
+ readonly proposedBy: {
2269
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2270
+ readonly id: string;
2271
+ readonly displayName?: string | null;
2272
+ };
2273
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
2274
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
2275
+ readonly decision: {
2276
+ readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
2277
+ readonly reviewRound: number;
2278
+ readonly requirement: "model" | "never" | "person" | "run";
2279
+ readonly decider: "agent" | "model" | "person" | "rule";
2280
+ readonly outcome: "allow" | "hold" | "refuse";
2281
+ readonly reason: string;
2282
+ readonly scopes: readonly {
2283
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2284
+ readonly id: string;
2285
+ }[];
2286
+ readonly rule?: {
2287
+ readonly scope: {
2288
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2289
+ readonly id: string;
2290
+ };
2291
+ readonly index: number;
2292
+ } | null;
2293
+ readonly guard?: string | null;
2294
+ readonly guardReason?: string | null;
2295
+ readonly resolution?: {
2296
+ readonly by: string & import("effect/Brand").Brand<"UserId">;
2297
+ readonly at: string;
2298
+ readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
2299
+ readonly diff?: {
2300
+ readonly text?: {
2301
+ readonly before: string | null;
2302
+ readonly after: string | null;
2303
+ } | null;
2304
+ readonly html?: {
2305
+ readonly before: string | null;
2306
+ readonly after: string | null;
2307
+ } | null;
2308
+ } | null;
2309
+ } | null;
2310
+ } | null;
2311
+ readonly resolution: {
2312
+ readonly outcome: "approved" | "cancelled" | "denied";
2313
+ readonly actor: {
2314
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2315
+ readonly id: string;
2316
+ readonly displayName?: string | null;
2317
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2318
+ };
2319
+ readonly resolvedAt: string;
2320
+ readonly reason: string | null;
2321
+ } | null;
2322
+ readonly alwaysAllow: {
2323
+ readonly by: "admin" | "approver" | "owner";
2324
+ readonly allowed: boolean;
2325
+ } | null;
2326
+ readonly createdAt: string;
2327
+ readonly updatedAt: string;
2328
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
2329
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
2330
+ readonly tool: {
2331
+ readonly name: string;
2332
+ readonly argumentsHash: string;
2333
+ readonly arguments: {
2334
+ readonly [x: string]: import("./generated/index.js").JsonValue;
2335
+ };
2336
+ } | null;
2337
+ readonly handoff: {
2338
+ readonly reason: string;
2339
+ } | null;
2340
2340
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
2341
2341
  };
2342
2342
  export declare const getAction: (input: {
@@ -1,9 +1,9 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { MailboxEventStreamError } from "../mailbox-events.js";
3
- import { forGroup } from "./internal/operation.js";
4
- import { events } from "./internal/mailbox-events.js";
5
2
  import { mailboxesOperations } from "./descriptors/mailboxes.js";
6
3
  import { MailboxesGroup } from "./generated/mailboxes.js";
4
+ import { forGroup } from "./internal/operation.js";
5
+ import { events } from "./internal/mailbox-events.js";
6
+ import { MailboxEventStreamError } from "../mailbox-events.js";
7
7
  // src/effect/mailboxes.ts
8
8
  var mailboxes_exports = /* @__PURE__ */ __exportAll({
9
9
  MailboxEventStreamError: () => MailboxEventStreamError,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
- import { MediaGroup } from "./generated/media.js";
4
2
  import { mediaOperations } from "./descriptors/media.js";
3
+ import { MediaGroup } from "./generated/media.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/media.ts
6
6
  var media_exports = /* @__PURE__ */ __exportAll({
7
7
  complete: () => complete,
@@ -1,8 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
2
+ import { messagesOperations } from "./descriptors/messages.js";
3
3
  import { MessagesGroup } from "./generated/messages.js";
4
+ import { forGroup } from "./internal/operation.js";
4
5
  import { sendMessage } from "./internal/send.js";
5
- import { messagesOperations } from "./descriptors/messages.js";
6
6
  // src/effect/messages.ts
7
7
  var messages_exports = /* @__PURE__ */ __exportAll({
8
8
  get: () => get,
@@ -49,12 +49,12 @@ export declare const remove: (input: {
49
49
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"namespacesRemove">;
50
50
  export declare const assignResource: (input: {
51
51
  readonly id: string;
52
- readonly type: "contact" | "domain" | "sender" | "smsNumber" | "template" | "whatsappNumber";
52
+ readonly type: "contact" | "domain" | "phoneNumber" | "sender" | "smsNumber" | "template" | "whatsappNumber";
53
53
  readonly resourceId: string;
54
54
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"namespacesAssignResource">;
55
55
  export declare const removeResource: (input: {
56
56
  readonly id: string;
57
- readonly type: "contact" | "domain" | "sender" | "smsNumber" | "template" | "whatsappNumber";
57
+ readonly type: "contact" | "domain" | "phoneNumber" | "sender" | "smsNumber" | "template" | "whatsappNumber";
58
58
  readonly resourceId: string;
59
59
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"namespacesRemoveResource">;
60
60
  export declare const createPortalLink: (input: {
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { namespacesOperations } from "./descriptors/namespaces.js";
4
3
  import { NamespacesGroup } from "./generated/namespaces.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/namespaces.ts
6
6
  var namespaces_exports = /* @__PURE__ */ __exportAll({
7
7
  assignResource: () => assignResource,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { newsletterDomainsOperations } from "./descriptors/newsletter-domains.js";
4
3
  import { NewsletterDomainsGroup } from "./generated/newsletter-domains.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/newsletter-domains.ts
6
6
  var newsletter_domains_exports = /* @__PURE__ */ __exportAll({
7
7
  add: () => add,
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { forGroup } from "./internal/operation.js";
3
2
  import { newsletterIssuesOperations } from "./descriptors/newsletter-issues.js";
4
3
  import { NewsletterIssuesGroup } from "./generated/newsletter-issues.js";
4
+ import { forGroup } from "./internal/operation.js";
5
5
  // src/effect/newsletter-issues.ts
6
6
  var newsletter_issues_exports = /* @__PURE__ */ __exportAll({
7
7
  check: () => check,