samva 0.45.0 → 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 (67) 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 +8124 -5612
  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/analytics.d.ts +6 -0
  18. package/dist/effect/generated/analytics.js +4 -2
  19. package/dist/effect/generated/approval-requests.d.ts +777 -0
  20. package/dist/effect/generated/approval-requests.js +135 -0
  21. package/dist/effect/generated/campaigns.d.ts +17 -17
  22. package/dist/effect/generated/campaigns.js +6 -6
  23. package/dist/effect/generated/conversations.d.ts +20 -20
  24. package/dist/effect/generated/conversations.js +10 -10
  25. package/dist/effect/generated/events.js +1 -1
  26. package/dist/effect/generated/index.d.ts +11 -1
  27. package/dist/effect/generated/integrations-catalog.d.ts +671 -0
  28. package/dist/effect/generated/integrations-catalog.js +217 -0
  29. package/dist/effect/generated/integrations.d.ts +1401 -0
  30. package/dist/effect/generated/integrations.js +246 -0
  31. package/dist/effect/generated/mailboxes.d.ts +8157 -4241
  32. package/dist/effect/generated/mailboxes.js +677 -52
  33. package/dist/effect/generated/messages.d.ts +8 -8
  34. package/dist/effect/generated/messages.js +4 -4
  35. package/dist/effect/generated/scheduled-messages.d.ts +50 -50
  36. package/dist/effect/generated/scheduled-messages.js +17 -17
  37. package/dist/effect/generated/shared.d.ts +661 -511
  38. package/dist/effect/generated/shared.js +212 -179
  39. package/dist/effect/generated/template-share-links.d.ts +733 -0
  40. package/dist/effect/generated/template-share-links.js +165 -0
  41. package/dist/effect/generated/templates.d.ts +39 -22
  42. package/dist/effect/generated/templates.js +19 -16
  43. package/dist/effect/generated-metadata.d.ts +248 -0
  44. package/dist/effect/generated-metadata.js +705 -555
  45. package/dist/effect/index.d.ts +5 -0
  46. package/dist/effect/index.js +6 -1
  47. package/dist/effect/integrations-catalog.d.ts +38 -0
  48. package/dist/effect/integrations-catalog.js +16 -0
  49. package/dist/effect/integrations.d.ts +165 -0
  50. package/dist/effect/integrations.js +24 -0
  51. package/dist/effect/mailboxes.d.ts +373 -191
  52. package/dist/effect/mailboxes.js +31 -1
  53. package/dist/effect/scheduled-messages.d.ts +350 -350
  54. package/dist/effect/template-share-links.d.ts +18 -0
  55. package/dist/effect/template-share-links.js +20 -0
  56. package/dist/effect/templates.d.ts +4 -3
  57. package/dist/index.js +2 -2
  58. package/dist/package.js +1 -1
  59. package/dist/promises/client.d.ts +11 -1
  60. package/dist/promises/client.js +13 -3
  61. package/dist/promises/errors.gen.d.ts +22 -2
  62. package/dist/promises/errors.gen.js +54 -1
  63. package/dist/promises/index.js +2 -2
  64. package/dist/promises/types.gen.d.ts +1 -1
  65. package/dist/service-map.d.ts +203 -0
  66. package/dist/service-map.js +103 -0
  67. package/package.json +22 -2
@@ -1,5 +1,24 @@
1
1
  export { events } from "./internal/mailbox-events";
2
2
  export { type MailboxEvent, MailboxEventStreamError, type MailboxEventStreamErrorFields, type MailboxEventStreamErrorReason, type MailboxEventStreamErrorTag, type MailboxEventStreamFailure, type MailboxEventStreamOptions, type MailboxEventStreamReconnect, type MailboxEventType, } from "../mailbox-events";
3
+ export declare const createImportUpload: (input: {
4
+ readonly id: string;
5
+ readonly importId?: string | null | undefined;
6
+ readonly filename: string;
7
+ readonly sizeBytes: number;
8
+ readonly format: "apple" | "gmail" | "mbox";
9
+ readonly mailboxPath?: string | null | undefined;
10
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesCreateImportUpload">;
11
+ export declare const startImport: (input: {
12
+ readonly id: string;
13
+ readonly importId: string;
14
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesStartImport">;
15
+ export declare const getImport: (input: {
16
+ readonly id: string;
17
+ readonly importId: string;
18
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesGetImport">;
19
+ export declare const listImports: (input: {
20
+ readonly id: string;
21
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListImports">;
3
22
  export declare const list: ((input?: {
4
23
  readonly limit?: number | null | undefined;
5
24
  readonly cursor?: string | undefined;
@@ -610,6 +629,9 @@ export declare const listOrganizationThreads: ((input?: {
610
629
  readonly cursor?: string | undefined;
611
630
  readonly after?: string | undefined;
612
631
  readonly before?: string | undefined;
632
+ readonly recipient?: string | undefined;
633
+ readonly senders?: string | readonly string[] | undefined;
634
+ readonly excludeTrash?: boolean | null | undefined;
613
635
  readonly q?: string | undefined;
614
636
  readonly state?: "active" | "done" | undefined;
615
637
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -626,6 +648,9 @@ export declare const listOrganizationThreads: ((input?: {
626
648
  readonly cursor?: string | undefined;
627
649
  readonly after?: string | undefined;
628
650
  readonly before?: string | undefined;
651
+ readonly recipient?: string | undefined;
652
+ readonly senders?: string | readonly string[] | undefined;
653
+ readonly excludeTrash?: boolean | null | undefined;
629
654
  readonly q?: string | undefined;
630
655
  readonly state?: "active" | "done" | undefined;
631
656
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -656,6 +681,8 @@ export declare const listOrganizationThreads: ((input?: {
656
681
  readonly read: boolean;
657
682
  readonly starred: boolean;
658
683
  readonly snoozedUntil: string | null;
684
+ readonly reminderSetAt?: string | null;
685
+ readonly reminderInboxAt?: string | null;
659
686
  readonly doneAt: string | null;
660
687
  readonly closedAt: string | null;
661
688
  readonly closedBy: {
@@ -677,6 +704,9 @@ export declare const listOrganizationThreads: ((input?: {
677
704
  readonly cursor?: string | undefined;
678
705
  readonly after?: string | undefined;
679
706
  readonly before?: string | undefined;
707
+ readonly recipient?: string | undefined;
708
+ readonly senders?: string | readonly string[] | undefined;
709
+ readonly excludeTrash?: boolean | null | undefined;
680
710
  readonly q?: string | undefined;
681
711
  readonly state?: "active" | "done" | undefined;
682
712
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -706,6 +736,8 @@ export declare const listOrganizationThreads: ((input?: {
706
736
  readonly read: boolean;
707
737
  readonly starred: boolean;
708
738
  readonly snoozedUntil: string | null;
739
+ readonly reminderSetAt?: string | null;
740
+ readonly reminderInboxAt?: string | null;
709
741
  readonly doneAt: string | null;
710
742
  readonly closedAt: string | null;
711
743
  readonly closedBy: {
@@ -727,6 +759,9 @@ export declare const listThreads: ((input: {
727
759
  readonly cursor?: string | undefined;
728
760
  readonly after?: string | undefined;
729
761
  readonly before?: string | undefined;
762
+ readonly recipient?: string | undefined;
763
+ readonly senders?: string | readonly string[] | undefined;
764
+ readonly excludeTrash?: boolean | null | undefined;
730
765
  readonly q?: string | undefined;
731
766
  readonly state?: "active" | "done" | undefined;
732
767
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -741,6 +776,9 @@ export declare const listThreads: ((input: {
741
776
  readonly cursor?: string | undefined;
742
777
  readonly after?: string | undefined;
743
778
  readonly before?: string | undefined;
779
+ readonly recipient?: string | undefined;
780
+ readonly senders?: string | readonly string[] | undefined;
781
+ readonly excludeTrash?: boolean | null | undefined;
744
782
  readonly q?: string | undefined;
745
783
  readonly state?: "active" | "done" | undefined;
746
784
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -768,6 +806,8 @@ export declare const listThreads: ((input: {
768
806
  readonly read: boolean;
769
807
  readonly starred: boolean;
770
808
  readonly snoozedUntil: string | null;
809
+ readonly reminderSetAt?: string | null;
810
+ readonly reminderInboxAt?: string | null;
771
811
  readonly doneAt: string | null;
772
812
  readonly closedAt: string | null;
773
813
  readonly closedBy: {
@@ -785,6 +825,9 @@ export declare const listThreads: ((input: {
785
825
  readonly cursor?: string | undefined;
786
826
  readonly after?: string | undefined;
787
827
  readonly before?: string | undefined;
828
+ readonly recipient?: string | undefined;
829
+ readonly senders?: string | readonly string[] | undefined;
830
+ readonly excludeTrash?: boolean | null | undefined;
788
831
  readonly q?: string | undefined;
789
832
  readonly state?: "active" | "done" | undefined;
790
833
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
@@ -811,6 +854,8 @@ export declare const listThreads: ((input: {
811
854
  readonly read: boolean;
812
855
  readonly starred: boolean;
813
856
  readonly snoozedUntil: string | null;
857
+ readonly reminderSetAt?: string | null;
858
+ readonly reminderInboxAt?: string | null;
814
859
  readonly doneAt: string | null;
815
860
  readonly closedAt: string | null;
816
861
  readonly closedBy: {
@@ -835,6 +880,8 @@ export declare const updateThread: (input: {
835
880
  readonly read?: boolean | null | undefined;
836
881
  readonly starred?: boolean | null | undefined;
837
882
  readonly snoozedUntil?: string | null | undefined;
883
+ readonly ifNoReply?: boolean | undefined;
884
+ readonly reminderInboxAt?: string | null | undefined;
838
885
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesUpdateThread">;
839
886
  export declare const addThreadLabels: (input: {
840
887
  readonly id: string;
@@ -1193,23 +1240,6 @@ export declare const deleteNote: (input: {
1193
1240
  readonly noteId: string;
1194
1241
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDeleteNote">;
1195
1242
  export declare const sendMessage: (input: {
1196
- readonly channel?: "email" | null | undefined;
1197
- readonly to: readonly string[];
1198
- readonly cc?: readonly string[] | null | undefined;
1199
- readonly bcc?: readonly string[] | null | undefined;
1200
- readonly replyTo?: readonly string[] | null | undefined;
1201
- readonly subject: string;
1202
- readonly text?: string | null | undefined;
1203
- readonly html?: string | null | undefined;
1204
- readonly attachments?: readonly {
1205
- readonly filename: string;
1206
- readonly content?: string | null | undefined;
1207
- readonly mediaId?: string | null | undefined;
1208
- readonly contentType: string;
1209
- readonly size: number;
1210
- }[] | null | undefined;
1211
- readonly id: string;
1212
- } | {
1213
1243
  readonly channel: "sms" | "whatsapp";
1214
1244
  readonly to: string;
1215
1245
  readonly text?: string | null | undefined;
@@ -1242,6 +1272,23 @@ export declare const sendMessage: (input: {
1242
1272
  } | null | undefined;
1243
1273
  } | null | undefined;
1244
1274
  readonly id: string;
1275
+ } | {
1276
+ readonly channel?: "email" | null | undefined;
1277
+ readonly to: readonly string[];
1278
+ readonly cc?: readonly string[] | null | undefined;
1279
+ readonly bcc?: readonly string[] | null | undefined;
1280
+ readonly replyTo?: readonly string[] | null | undefined;
1281
+ readonly subject: string;
1282
+ readonly text?: string | null | undefined;
1283
+ readonly html?: string | null | undefined;
1284
+ readonly attachments?: readonly {
1285
+ readonly filename: string;
1286
+ readonly content?: string | null | undefined;
1287
+ readonly mediaId?: string | null | undefined;
1288
+ readonly contentType: string;
1289
+ readonly size: number;
1290
+ }[] | null | undefined;
1291
+ readonly id: string;
1245
1292
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesSendMessage">;
1246
1293
  export declare const getMessage: (input: {
1247
1294
  readonly id: string;
@@ -1262,21 +1309,6 @@ export declare const copyMessageAttachment: (input: {
1262
1309
  readonly attachmentId: string;
1263
1310
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesCopyMessageAttachment">;
1264
1311
  export declare const reply: (input: {
1265
- readonly channel?: "email" | null | undefined;
1266
- readonly cc?: readonly string[] | null | undefined;
1267
- readonly bcc?: readonly string[] | null | undefined;
1268
- readonly text?: string | null | undefined;
1269
- readonly html?: string | null | undefined;
1270
- readonly attachments?: readonly {
1271
- readonly filename: string;
1272
- readonly content?: string | null | undefined;
1273
- readonly mediaId?: string | null | undefined;
1274
- readonly contentType: string;
1275
- readonly size: number;
1276
- }[] | null | undefined;
1277
- readonly id: string;
1278
- readonly messageId: string;
1279
- } | {
1280
1312
  readonly channel: "sms" | "whatsapp";
1281
1313
  readonly text?: string | null | undefined;
1282
1314
  readonly templateId?: string | null | undefined;
@@ -1309,8 +1341,7 @@ export declare const reply: (input: {
1309
1341
  } | null | undefined;
1310
1342
  readonly id: string;
1311
1343
  readonly messageId: string;
1312
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesReply">;
1313
- export declare const replyAll: (input: {
1344
+ } | {
1314
1345
  readonly channel?: "email" | null | undefined;
1315
1346
  readonly cc?: readonly string[] | null | undefined;
1316
1347
  readonly bcc?: readonly string[] | null | undefined;
@@ -1325,7 +1356,8 @@ export declare const replyAll: (input: {
1325
1356
  }[] | null | undefined;
1326
1357
  readonly id: string;
1327
1358
  readonly messageId: string;
1328
- } | {
1359
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesReply">;
1360
+ export declare const replyAll: (input: {
1329
1361
  readonly channel: "sms" | "whatsapp";
1330
1362
  readonly text?: string | null | undefined;
1331
1363
  readonly templateId?: string | null | undefined;
@@ -1358,6 +1390,21 @@ export declare const replyAll: (input: {
1358
1390
  } | null | undefined;
1359
1391
  readonly id: string;
1360
1392
  readonly messageId: string;
1393
+ } | {
1394
+ readonly channel?: "email" | null | undefined;
1395
+ readonly cc?: readonly string[] | null | undefined;
1396
+ readonly bcc?: readonly string[] | null | undefined;
1397
+ readonly text?: string | null | undefined;
1398
+ readonly html?: string | null | undefined;
1399
+ readonly attachments?: readonly {
1400
+ readonly filename: string;
1401
+ readonly content?: string | null | undefined;
1402
+ readonly mediaId?: string | null | undefined;
1403
+ readonly contentType: string;
1404
+ readonly size: number;
1405
+ }[] | null | undefined;
1406
+ readonly id: string;
1407
+ readonly messageId: string;
1361
1408
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesReplyAll">;
1362
1409
  export declare const forward: (input: {
1363
1410
  readonly id: string;
@@ -1438,6 +1485,101 @@ export declare const discardMessage: (input: {
1438
1485
  readonly id: string;
1439
1486
  readonly messageId: string;
1440
1487
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDiscardMessage">;
1488
+ export declare const scheduleDraft: (input: {
1489
+ readonly id: string;
1490
+ readonly draftId: string;
1491
+ readonly idempotencyKey: string;
1492
+ readonly base: string;
1493
+ readonly draftRevision: number;
1494
+ readonly sendAt: string;
1495
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesScheduleDraft">;
1496
+ export declare const rescheduleSend: (input: {
1497
+ readonly id: string;
1498
+ readonly outboxId: string;
1499
+ readonly idempotencyKey: string;
1500
+ readonly base: string;
1501
+ readonly expectedRevision: number;
1502
+ readonly sendAt: string;
1503
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesRescheduleSend">;
1504
+ export declare const unscheduleSend: (input: {
1505
+ readonly id: string;
1506
+ readonly outboxId: string;
1507
+ readonly idempotencyKey: string;
1508
+ readonly base: string;
1509
+ readonly expectedRevision: number;
1510
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesUnscheduleSend">;
1511
+ export declare const sendScheduledNow: (input: {
1512
+ readonly id: string;
1513
+ readonly outboxId: string;
1514
+ readonly idempotencyKey: string;
1515
+ readonly base: string;
1516
+ readonly expectedRevision: number;
1517
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesSendScheduledNow">;
1518
+ export declare const listScheduledSends: ((input: {
1519
+ readonly id: string;
1520
+ readonly limit?: number | null | undefined;
1521
+ readonly cursor?: string | undefined;
1522
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListScheduledSends">) & {
1523
+ readonly pages: (input: {
1524
+ readonly id: string;
1525
+ readonly limit?: number | null | undefined;
1526
+ readonly cursor?: string | undefined;
1527
+ }) => import("effect/Stream").Stream<{
1528
+ readonly items: readonly {
1529
+ readonly id: string & import("effect/Brand").Brand<"MailOutboxItemId">;
1530
+ readonly mailboxId: string & import("effect/Brand").Brand<"MailboxId">;
1531
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1532
+ readonly draftId: string & import("effect/Brand").Brand<"MailboxDraftId">;
1533
+ readonly draftRevision: number;
1534
+ readonly draftSummary?: {
1535
+ readonly to: readonly string[];
1536
+ readonly subject: string;
1537
+ };
1538
+ readonly status: "cancelled" | "dispatched" | "failed" | "held" | "queued";
1539
+ readonly scheduledFor?: string | null;
1540
+ readonly holdReason: "threadChanged" | null;
1541
+ readonly revision: number;
1542
+ readonly baseSeq: number;
1543
+ readonly heldAtSeq: number | null;
1544
+ readonly actionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1545
+ readonly problem: {
1546
+ readonly code: string;
1547
+ readonly message: string;
1548
+ } | null;
1549
+ readonly createdAt: string;
1550
+ readonly updatedAt: string;
1551
+ }[];
1552
+ readonly nextCursor: string | null;
1553
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
1554
+ readonly items: (input: {
1555
+ readonly id: string;
1556
+ readonly limit?: number | null | undefined;
1557
+ readonly cursor?: string | undefined;
1558
+ }) => import("effect/Stream").Stream<{
1559
+ readonly id: string & import("effect/Brand").Brand<"MailOutboxItemId">;
1560
+ readonly mailboxId: string & import("effect/Brand").Brand<"MailboxId">;
1561
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1562
+ readonly draftId: string & import("effect/Brand").Brand<"MailboxDraftId">;
1563
+ readonly draftRevision: number;
1564
+ readonly draftSummary?: {
1565
+ readonly to: readonly string[];
1566
+ readonly subject: string;
1567
+ };
1568
+ readonly status: "cancelled" | "dispatched" | "failed" | "held" | "queued";
1569
+ readonly scheduledFor?: string | null;
1570
+ readonly holdReason: "threadChanged" | null;
1571
+ readonly revision: number;
1572
+ readonly baseSeq: number;
1573
+ readonly heldAtSeq: number | null;
1574
+ readonly actionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1575
+ readonly problem: {
1576
+ readonly code: string;
1577
+ readonly message: string;
1578
+ } | null;
1579
+ readonly createdAt: string;
1580
+ readonly updatedAt: string;
1581
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
1582
+ };
1441
1583
  export declare const listDrafts: ((input: {
1442
1584
  readonly id: string;
1443
1585
  readonly limit?: number | null | undefined;
@@ -1483,6 +1625,12 @@ export declare const listDrafts: ((input: {
1483
1625
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
1484
1626
  };
1485
1627
  export declare const createDraft: (input: {
1628
+ readonly channel: "sms" | "whatsapp";
1629
+ readonly to?: string | null | undefined;
1630
+ readonly text?: string | null | undefined;
1631
+ readonly inReplyToMessageId?: string | null | undefined;
1632
+ readonly id: string;
1633
+ } | {
1486
1634
  readonly channel?: "email" | null | undefined;
1487
1635
  readonly endpointId?: string | null | undefined;
1488
1636
  readonly to?: readonly string[] | null | undefined;
@@ -1501,12 +1649,6 @@ export declare const createDraft: (input: {
1501
1649
  }[] | null | undefined;
1502
1650
  readonly inReplyToMessageId?: string | null | undefined;
1503
1651
  readonly id: string;
1504
- } | {
1505
- readonly channel: "sms" | "whatsapp";
1506
- readonly to?: string | null | undefined;
1507
- readonly text?: string | null | undefined;
1508
- readonly inReplyToMessageId?: string | null | undefined;
1509
- readonly id: string;
1510
1652
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesCreateDraft">;
1511
1653
  export declare const getDraft: (input: {
1512
1654
  readonly id: string;
@@ -1557,81 +1699,6 @@ export declare const listActions: ((input: {
1557
1699
  readonly before?: string | undefined;
1558
1700
  }) => import("effect/Stream").Stream<{
1559
1701
  readonly items: readonly ({
1560
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1561
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1562
- readonly proposedBy: {
1563
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1564
- readonly id: string;
1565
- readonly displayName?: string | null;
1566
- };
1567
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1568
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1569
- readonly decision: {
1570
- readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
1571
- readonly reviewRound: number;
1572
- readonly requirement: "model" | "never" | "person" | "run";
1573
- readonly decider: "agent" | "model" | "person" | "rule";
1574
- readonly outcome: "allow" | "hold" | "refuse";
1575
- readonly reason: string;
1576
- readonly scopes: readonly {
1577
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1578
- readonly id: string;
1579
- }[];
1580
- readonly rule?: {
1581
- readonly scope: {
1582
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1583
- readonly id: string;
1584
- };
1585
- readonly index: number;
1586
- } | null;
1587
- readonly guard?: string | null;
1588
- readonly guardReason?: string | null;
1589
- readonly resolution?: {
1590
- readonly by: string & import("effect/Brand").Brand<"UserId">;
1591
- readonly at: string;
1592
- readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
1593
- readonly diff?: {
1594
- readonly text?: {
1595
- readonly before: string | null;
1596
- readonly after: string | null;
1597
- } | null;
1598
- readonly html?: {
1599
- readonly before: string | null;
1600
- readonly after: string | null;
1601
- } | null;
1602
- } | null;
1603
- } | null;
1604
- } | null;
1605
- readonly resolution: {
1606
- readonly outcome: "approved" | "cancelled" | "denied";
1607
- readonly actor: {
1608
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1609
- readonly id: string;
1610
- readonly displayName?: string | null;
1611
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1612
- };
1613
- readonly resolvedAt: string;
1614
- readonly reason: string | null;
1615
- } | null;
1616
- readonly alwaysAllow: {
1617
- readonly by: "admin" | "approver" | "owner";
1618
- readonly allowed: boolean;
1619
- } | null;
1620
- readonly createdAt: string;
1621
- readonly updatedAt: string;
1622
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
1623
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1624
- readonly tool: {
1625
- readonly name: string;
1626
- readonly argumentsHash: string;
1627
- readonly arguments: {
1628
- readonly [x: string]: import("./generated").JsonValue;
1629
- };
1630
- } | null;
1631
- readonly handoff: {
1632
- readonly reason: string;
1633
- } | null;
1634
- } | {
1635
1702
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1636
1703
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1637
1704
  readonly proposedBy: {
@@ -1841,6 +1908,81 @@ export declare const listActions: ((input: {
1841
1908
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1842
1909
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1843
1910
  } | null;
1911
+ } | {
1912
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1913
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1914
+ readonly proposedBy: {
1915
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1916
+ readonly id: string;
1917
+ readonly displayName?: string | null;
1918
+ };
1919
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1920
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1921
+ readonly decision: {
1922
+ readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
1923
+ readonly reviewRound: number;
1924
+ readonly requirement: "model" | "never" | "person" | "run";
1925
+ readonly decider: "agent" | "model" | "person" | "rule";
1926
+ readonly outcome: "allow" | "hold" | "refuse";
1927
+ readonly reason: string;
1928
+ readonly scopes: readonly {
1929
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1930
+ readonly id: string;
1931
+ }[];
1932
+ readonly rule?: {
1933
+ readonly scope: {
1934
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1935
+ readonly id: string;
1936
+ };
1937
+ readonly index: number;
1938
+ } | null;
1939
+ readonly guard?: string | null;
1940
+ readonly guardReason?: string | null;
1941
+ readonly resolution?: {
1942
+ readonly by: string & import("effect/Brand").Brand<"UserId">;
1943
+ readonly at: string;
1944
+ readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
1945
+ readonly diff?: {
1946
+ readonly text?: {
1947
+ readonly before: string | null;
1948
+ readonly after: string | null;
1949
+ } | null;
1950
+ readonly html?: {
1951
+ readonly before: string | null;
1952
+ readonly after: string | null;
1953
+ } | null;
1954
+ } | null;
1955
+ } | null;
1956
+ } | null;
1957
+ readonly resolution: {
1958
+ readonly outcome: "approved" | "cancelled" | "denied";
1959
+ readonly actor: {
1960
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1961
+ readonly id: string;
1962
+ readonly displayName?: string | null;
1963
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1964
+ };
1965
+ readonly resolvedAt: string;
1966
+ readonly reason: string | null;
1967
+ } | null;
1968
+ readonly alwaysAllow: {
1969
+ readonly by: "admin" | "approver" | "owner";
1970
+ readonly allowed: boolean;
1971
+ } | null;
1972
+ readonly createdAt: string;
1973
+ readonly updatedAt: string;
1974
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
1975
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1976
+ readonly tool: {
1977
+ readonly name: string;
1978
+ readonly argumentsHash: string;
1979
+ readonly arguments: {
1980
+ readonly [x: string]: import("./generated").JsonValue;
1981
+ };
1982
+ } | null;
1983
+ readonly handoff: {
1984
+ readonly reason: string;
1985
+ } | null;
1844
1986
  })[];
1845
1987
  readonly nextCursor: string | null;
1846
1988
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
@@ -1853,81 +1995,6 @@ export declare const listActions: ((input: {
1853
1995
  readonly after?: string | undefined;
1854
1996
  readonly before?: string | undefined;
1855
1997
  }) => import("effect/Stream").Stream<{
1856
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1857
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1858
- readonly proposedBy: {
1859
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1860
- readonly id: string;
1861
- readonly displayName?: string | null;
1862
- };
1863
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1864
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1865
- readonly decision: {
1866
- readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
1867
- readonly reviewRound: number;
1868
- readonly requirement: "model" | "never" | "person" | "run";
1869
- readonly decider: "agent" | "model" | "person" | "rule";
1870
- readonly outcome: "allow" | "hold" | "refuse";
1871
- readonly reason: string;
1872
- readonly scopes: readonly {
1873
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1874
- readonly id: string;
1875
- }[];
1876
- readonly rule?: {
1877
- readonly scope: {
1878
- readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1879
- readonly id: string;
1880
- };
1881
- readonly index: number;
1882
- } | null;
1883
- readonly guard?: string | null;
1884
- readonly guardReason?: string | null;
1885
- readonly resolution?: {
1886
- readonly by: string & import("effect/Brand").Brand<"UserId">;
1887
- readonly at: string;
1888
- readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
1889
- readonly diff?: {
1890
- readonly text?: {
1891
- readonly before: string | null;
1892
- readonly after: string | null;
1893
- } | null;
1894
- readonly html?: {
1895
- readonly before: string | null;
1896
- readonly after: string | null;
1897
- } | null;
1898
- } | null;
1899
- } | null;
1900
- } | null;
1901
- readonly resolution: {
1902
- readonly outcome: "approved" | "cancelled" | "denied";
1903
- readonly actor: {
1904
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1905
- readonly id: string;
1906
- readonly displayName?: string | null;
1907
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1908
- };
1909
- readonly resolvedAt: string;
1910
- readonly reason: string | null;
1911
- } | null;
1912
- readonly alwaysAllow: {
1913
- readonly by: "admin" | "approver" | "owner";
1914
- readonly allowed: boolean;
1915
- } | null;
1916
- readonly createdAt: string;
1917
- readonly updatedAt: string;
1918
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
1919
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1920
- readonly tool: {
1921
- readonly name: string;
1922
- readonly argumentsHash: string;
1923
- readonly arguments: {
1924
- readonly [x: string]: import("./generated").JsonValue;
1925
- };
1926
- } | null;
1927
- readonly handoff: {
1928
- readonly reason: string;
1929
- } | null;
1930
- } | {
1931
1998
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1932
1999
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1933
2000
  readonly proposedBy: {
@@ -2137,6 +2204,81 @@ export declare const listActions: ((input: {
2137
2204
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
2138
2205
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
2139
2206
  } | null;
2207
+ } | {
2208
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
2209
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2210
+ readonly proposedBy: {
2211
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2212
+ readonly id: string;
2213
+ readonly displayName?: string | null;
2214
+ };
2215
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
2216
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
2217
+ readonly decision: {
2218
+ readonly id: string & import("effect/Brand").Brand<"PolicyDecisionId">;
2219
+ readonly reviewRound: number;
2220
+ readonly requirement: "model" | "never" | "person" | "run";
2221
+ readonly decider: "agent" | "model" | "person" | "rule";
2222
+ readonly outcome: "allow" | "hold" | "refuse";
2223
+ readonly reason: string;
2224
+ readonly scopes: readonly {
2225
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2226
+ readonly id: string;
2227
+ }[];
2228
+ readonly rule?: {
2229
+ readonly scope: {
2230
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2231
+ readonly id: string;
2232
+ };
2233
+ readonly index: number;
2234
+ } | null;
2235
+ readonly guard?: string | null;
2236
+ readonly guardReason?: string | null;
2237
+ readonly resolution?: {
2238
+ readonly by: string & import("effect/Brand").Brand<"UserId">;
2239
+ readonly at: string;
2240
+ readonly as: "alwaysAllowed" | "approved" | "denied" | "edited";
2241
+ readonly diff?: {
2242
+ readonly text?: {
2243
+ readonly before: string | null;
2244
+ readonly after: string | null;
2245
+ } | null;
2246
+ readonly html?: {
2247
+ readonly before: string | null;
2248
+ readonly after: string | null;
2249
+ } | null;
2250
+ } | null;
2251
+ } | null;
2252
+ } | null;
2253
+ readonly resolution: {
2254
+ readonly outcome: "approved" | "cancelled" | "denied";
2255
+ readonly actor: {
2256
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
2257
+ readonly id: string;
2258
+ readonly displayName?: string | null;
2259
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
2260
+ };
2261
+ readonly resolvedAt: string;
2262
+ readonly reason: string | null;
2263
+ } | null;
2264
+ readonly alwaysAllow: {
2265
+ readonly by: "admin" | "approver" | "owner";
2266
+ readonly allowed: boolean;
2267
+ } | null;
2268
+ readonly createdAt: string;
2269
+ readonly updatedAt: string;
2270
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "handoff" | "toolCall" | "updateDraft";
2271
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
2272
+ readonly tool: {
2273
+ readonly name: string;
2274
+ readonly argumentsHash: string;
2275
+ readonly arguments: {
2276
+ readonly [x: string]: import("./generated").JsonValue;
2277
+ };
2278
+ } | null;
2279
+ readonly handoff: {
2280
+ readonly reason: string;
2281
+ } | null;
2140
2282
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
2141
2283
  };
2142
2284
  export declare const getAction: (input: {
@@ -2220,3 +2362,43 @@ export declare const listEvents: ((input: {
2220
2362
  readonly occurredAt: string;
2221
2363
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
2222
2364
  };
2365
+ export declare const countSplits: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesCountSplits">;
2366
+ export declare const listSplits: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListSplits">;
2367
+ export declare const createSplit: (input: {
2368
+ readonly name: string;
2369
+ readonly filter: {
2370
+ readonly kind: "query";
2371
+ readonly query: string;
2372
+ } | {
2373
+ readonly kind: "address";
2374
+ readonly address: string;
2375
+ } | {
2376
+ readonly kind: "vip";
2377
+ readonly senders: readonly string[];
2378
+ };
2379
+ readonly mailboxId: string | null;
2380
+ readonly position: number;
2381
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesCreateSplit">;
2382
+ export declare const updateSplit: (input: {
2383
+ readonly splitId: string;
2384
+ readonly name: string;
2385
+ readonly filter: {
2386
+ readonly kind: "query";
2387
+ readonly query: string;
2388
+ } | {
2389
+ readonly kind: "address";
2390
+ readonly address: string;
2391
+ } | {
2392
+ readonly kind: "vip";
2393
+ readonly senders: readonly string[];
2394
+ };
2395
+ readonly mailboxId: string | null;
2396
+ readonly position: number;
2397
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesUpdateSplit">;
2398
+ export declare const deleteSplit: (input: {
2399
+ readonly splitId: string;
2400
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDeleteSplit">;
2401
+ export declare const listAddresses: (input: {
2402
+ readonly id: string;
2403
+ readonly recipient?: string | readonly string[] | undefined;
2404
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListAddresses">;