samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -1,13 +1,13 @@
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
3
  export declare const list: ((input?: {
4
- readonly limit?: string | null | undefined;
4
+ readonly limit?: number | null | undefined;
5
5
  readonly cursor?: string | null | undefined;
6
6
  readonly after?: string | null | undefined;
7
7
  readonly before?: string | null | undefined;
8
8
  } | undefined) => import("./internal/operation").OperationResult<"mailboxesList">) & {
9
9
  readonly pages: (input?: {
10
- readonly limit?: string | null | undefined;
10
+ readonly limit?: number | null | undefined;
11
11
  readonly cursor?: string | null | undefined;
12
12
  readonly after?: string | null | undefined;
13
13
  readonly before?: string | null | undefined;
@@ -24,7 +24,7 @@ export declare const list: ((input?: {
24
24
  readonly nextCursor: string | null;
25
25
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
26
26
  readonly items: (input?: {
27
- readonly limit?: string | null | undefined;
27
+ readonly limit?: number | null | undefined;
28
28
  readonly cursor?: string | null | undefined;
29
29
  readonly after?: string | null | undefined;
30
30
  readonly before?: string | null | undefined;
@@ -93,12 +93,12 @@ export declare const getAgentActivity: (input: {
93
93
  }) => import("./internal/operation").OperationResult<"mailboxesGetAgentActivity">;
94
94
  export declare const listGrants: ((input: {
95
95
  readonly id: string;
96
- readonly limit?: string | null | undefined;
96
+ readonly limit?: number | null | undefined;
97
97
  readonly cursor?: string | null | undefined;
98
98
  }) => import("./internal/operation").OperationResult<"mailboxesListGrants">) & {
99
99
  readonly pages: (input: {
100
100
  readonly id: string;
101
- readonly limit?: string | null | undefined;
101
+ readonly limit?: number | null | undefined;
102
102
  readonly cursor?: string | null | undefined;
103
103
  }) => import("effect/Stream").Stream<{
104
104
  readonly items: readonly {
@@ -116,7 +116,7 @@ export declare const listGrants: ((input: {
116
116
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
117
117
  readonly items: (input: {
118
118
  readonly id: string;
119
- readonly limit?: string | null | undefined;
119
+ readonly limit?: number | null | undefined;
120
120
  readonly cursor?: string | null | undefined;
121
121
  }) => import("effect/Stream").Stream<{
122
122
  readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
@@ -196,29 +196,29 @@ export declare const deleteLabel: (input: {
196
196
  }) => import("./internal/operation").OperationResult<"mailboxesDeleteLabel">;
197
197
  export declare const listThreads: ((input: {
198
198
  readonly id: string;
199
- readonly limit?: string | null | undefined;
199
+ readonly limit?: number | null | undefined;
200
200
  readonly cursor?: string | null | undefined;
201
201
  readonly after?: string | null | undefined;
202
202
  readonly before?: string | null | undefined;
203
203
  readonly q?: string | null | undefined;
204
204
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
205
205
  readonly label?: string | null | undefined;
206
- readonly unread?: "false" | "true" | null | undefined;
207
- readonly starred?: "false" | "true" | null | undefined;
208
- readonly snoozed?: "false" | "true" | null | undefined;
206
+ readonly unread?: boolean | null | undefined;
207
+ readonly starred?: boolean | null | undefined;
208
+ readonly snoozed?: boolean | null | undefined;
209
209
  }) => import("./internal/operation").OperationResult<"mailboxesListThreads">) & {
210
210
  readonly pages: (input: {
211
211
  readonly id: string;
212
- readonly limit?: string | null | undefined;
212
+ readonly limit?: number | null | undefined;
213
213
  readonly cursor?: string | null | undefined;
214
214
  readonly after?: string | null | undefined;
215
215
  readonly before?: string | null | undefined;
216
216
  readonly q?: string | null | undefined;
217
217
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
218
218
  readonly label?: string | null | undefined;
219
- readonly unread?: "false" | "true" | null | undefined;
220
- readonly starred?: "false" | "true" | null | undefined;
221
- readonly snoozed?: "false" | "true" | null | undefined;
219
+ readonly unread?: boolean | null | undefined;
220
+ readonly starred?: boolean | null | undefined;
221
+ readonly snoozed?: boolean | null | undefined;
222
222
  }) => import("effect/Stream").Stream<{
223
223
  readonly items: readonly {
224
224
  readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
@@ -245,16 +245,16 @@ export declare const listThreads: ((input: {
245
245
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
246
246
  readonly items: (input: {
247
247
  readonly id: string;
248
- readonly limit?: string | null | undefined;
248
+ readonly limit?: number | null | undefined;
249
249
  readonly cursor?: string | null | undefined;
250
250
  readonly after?: string | null | undefined;
251
251
  readonly before?: string | null | undefined;
252
252
  readonly q?: string | null | undefined;
253
253
  readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
254
254
  readonly label?: string | null | undefined;
255
- readonly unread?: "false" | "true" | null | undefined;
256
- readonly starred?: "false" | "true" | null | undefined;
257
- readonly snoozed?: "false" | "true" | null | undefined;
255
+ readonly unread?: boolean | null | undefined;
256
+ readonly starred?: boolean | null | undefined;
257
+ readonly snoozed?: boolean | null | undefined;
258
258
  }) => import("effect/Stream").Stream<{
259
259
  readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
260
260
  readonly channel: "email";
@@ -303,17 +303,21 @@ export declare const removeThreadLabels: (input: {
303
303
  export declare const listThreadMessages: ((input: {
304
304
  readonly id: string;
305
305
  readonly threadId: string;
306
- readonly limit?: string | null | undefined;
306
+ readonly limit?: number | null | undefined;
307
307
  readonly cursor?: string | null | undefined;
308
308
  }) => import("./internal/operation").OperationResult<"mailboxesListThreadMessages">) & {
309
309
  readonly pages: (input: {
310
310
  readonly id: string;
311
311
  readonly threadId: string;
312
- readonly limit?: string | null | undefined;
312
+ readonly limit?: number | null | undefined;
313
313
  readonly cursor?: string | null | undefined;
314
314
  }) => import("effect/Stream").Stream<{
315
315
  readonly items: readonly {
316
316
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
317
+ readonly campaign?: {
318
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
319
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
320
+ } | null;
317
321
  readonly channel: "email";
318
322
  readonly direction: "inbound" | "outbound";
319
323
  readonly from: {
@@ -336,10 +340,14 @@ export declare const listThreadMessages: ((input: {
336
340
  readonly items: (input: {
337
341
  readonly id: string;
338
342
  readonly threadId: string;
339
- readonly limit?: string | null | undefined;
343
+ readonly limit?: number | null | undefined;
340
344
  readonly cursor?: string | null | undefined;
341
345
  }) => import("effect/Stream").Stream<{
342
346
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
347
+ readonly campaign?: {
348
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
349
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
350
+ } | null;
343
351
  readonly channel: "email";
344
352
  readonly direction: "inbound" | "outbound";
345
353
  readonly from: {
@@ -361,17 +369,21 @@ export declare const listThreadMessages: ((input: {
361
369
  export declare const getThreadContent: ((input: {
362
370
  readonly id: string;
363
371
  readonly threadId: string;
364
- readonly limit?: string | null | undefined;
372
+ readonly limit?: number | null | undefined;
365
373
  readonly cursor?: string | null | undefined;
366
374
  }) => import("./internal/operation").OperationResult<"mailboxesGetThreadContent">) & {
367
375
  readonly pages: (input: {
368
376
  readonly id: string;
369
377
  readonly threadId: string;
370
- readonly limit?: string | null | undefined;
378
+ readonly limit?: number | null | undefined;
371
379
  readonly cursor?: string | null | undefined;
372
380
  }) => import("effect/Stream").Stream<{
373
381
  readonly items: readonly {
374
382
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
383
+ readonly campaign?: {
384
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
385
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
386
+ } | null;
375
387
  readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
376
388
  readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
377
389
  readonly direction: "inbound" | "outbound";
@@ -429,10 +441,14 @@ export declare const getThreadContent: ((input: {
429
441
  readonly items: (input: {
430
442
  readonly id: string;
431
443
  readonly threadId: string;
432
- readonly limit?: string | null | undefined;
444
+ readonly limit?: number | null | undefined;
433
445
  readonly cursor?: string | null | undefined;
434
446
  }) => import("effect/Stream").Stream<{
435
447
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
448
+ readonly campaign?: {
449
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
450
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
451
+ } | null;
436
452
  readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
437
453
  readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
438
454
  readonly direction: "inbound" | "outbound";
@@ -489,13 +505,13 @@ export declare const getThreadContent: ((input: {
489
505
  export declare const listThreadNotes: ((input: {
490
506
  readonly id: string;
491
507
  readonly threadId: string;
492
- readonly limit?: string | null | undefined;
508
+ readonly limit?: number | null | undefined;
493
509
  readonly cursor?: string | null | undefined;
494
510
  }) => import("./internal/operation").OperationResult<"mailboxesListThreadNotes">) & {
495
511
  readonly pages: (input: {
496
512
  readonly id: string;
497
513
  readonly threadId: string;
498
- readonly limit?: string | null | undefined;
514
+ readonly limit?: number | null | undefined;
499
515
  readonly cursor?: string | null | undefined;
500
516
  }) => import("effect/Stream").Stream<{
501
517
  readonly items: readonly {
@@ -516,7 +532,7 @@ export declare const listThreadNotes: ((input: {
516
532
  readonly items: (input: {
517
533
  readonly id: string;
518
534
  readonly threadId: string;
519
- readonly limit?: string | null | undefined;
535
+ readonly limit?: number | null | undefined;
520
536
  readonly cursor?: string | null | undefined;
521
537
  }) => import("effect/Stream").Stream<{
522
538
  readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
@@ -646,14 +662,14 @@ export declare const forward: (input: {
646
662
  }) => import("./internal/operation").OperationResult<"mailboxesForward">;
647
663
  export declare const listQuarantine: ((input: {
648
664
  readonly id: string;
649
- readonly limit?: string | null | undefined;
665
+ readonly limit?: number | null | undefined;
650
666
  readonly cursor?: string | null | undefined;
651
667
  readonly after?: string | null | undefined;
652
668
  readonly before?: string | null | undefined;
653
669
  }) => import("./internal/operation").OperationResult<"mailboxesListQuarantine">) & {
654
670
  readonly pages: (input: {
655
671
  readonly id: string;
656
- readonly limit?: string | null | undefined;
672
+ readonly limit?: number | null | undefined;
657
673
  readonly cursor?: string | null | undefined;
658
674
  readonly after?: string | null | undefined;
659
675
  readonly before?: string | null | undefined;
@@ -678,7 +694,7 @@ export declare const listQuarantine: ((input: {
678
694
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
679
695
  readonly items: (input: {
680
696
  readonly id: string;
681
- readonly limit?: string | null | undefined;
697
+ readonly limit?: number | null | undefined;
682
698
  readonly cursor?: string | null | undefined;
683
699
  readonly after?: string | null | undefined;
684
700
  readonly before?: string | null | undefined;
@@ -709,13 +725,13 @@ export declare const discardMessage: (input: {
709
725
  }) => import("./internal/operation").OperationResult<"mailboxesDiscardMessage">;
710
726
  export declare const listDrafts: ((input: {
711
727
  readonly id: string;
712
- readonly limit?: string | null | undefined;
728
+ readonly limit?: number | null | undefined;
713
729
  readonly cursor?: string | null | undefined;
714
730
  readonly threadId?: string | null | undefined;
715
731
  }) => import("./internal/operation").OperationResult<"mailboxesListDrafts">) & {
716
732
  readonly pages: (input: {
717
733
  readonly id: string;
718
- readonly limit?: string | null | undefined;
734
+ readonly limit?: number | null | undefined;
719
735
  readonly cursor?: string | null | undefined;
720
736
  readonly threadId?: string | null | undefined;
721
737
  }) => import("effect/Stream").Stream<{
@@ -735,7 +751,7 @@ export declare const listDrafts: ((input: {
735
751
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
736
752
  readonly items: (input: {
737
753
  readonly id: string;
738
- readonly limit?: string | null | undefined;
754
+ readonly limit?: number | null | undefined;
739
755
  readonly cursor?: string | null | undefined;
740
756
  readonly threadId?: string | null | undefined;
741
757
  }) => import("effect/Stream").Stream<{
@@ -805,7 +821,7 @@ export declare const sendDraft: (input: {
805
821
  }) => import("./internal/operation").OperationResult<"mailboxesSendDraft">;
806
822
  export declare const listActions: ((input: {
807
823
  readonly id: string;
808
- readonly limit?: string | null | undefined;
824
+ readonly limit?: number | null | undefined;
809
825
  readonly cursor?: string | null | undefined;
810
826
  readonly threadId?: string | null | undefined;
811
827
  readonly state?: "accepted" | "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "completed" | "executed" | "executing" | "failed" | "notSent" | "policyDenied" | "proposed" | "queued" | "uncertain" | null | undefined;
@@ -814,7 +830,7 @@ export declare const listActions: ((input: {
814
830
  }) => import("./internal/operation").OperationResult<"mailboxesListActions">) & {
815
831
  readonly pages: (input: {
816
832
  readonly id: string;
817
- readonly limit?: string | null | undefined;
833
+ readonly limit?: number | null | undefined;
818
834
  readonly cursor?: string | null | undefined;
819
835
  readonly threadId?: string | null | undefined;
820
836
  readonly state?: "accepted" | "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "completed" | "executed" | "executing" | "failed" | "notSent" | "policyDenied" | "proposed" | "queued" | "uncertain" | null | undefined;
@@ -822,6 +838,45 @@ export declare const listActions: ((input: {
822
838
  readonly before?: string | null | undefined;
823
839
  }) => import("effect/Stream").Stream<{
824
840
  readonly items: readonly ({
841
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
842
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
843
+ readonly proposedBy: {
844
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
845
+ readonly id: string;
846
+ readonly displayName?: string | null;
847
+ };
848
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
849
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
850
+ readonly decision: {
851
+ readonly outcome: "allow" | "deny" | "requireApproval";
852
+ readonly reason: string | null;
853
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
854
+ readonly source: "grant" | "installation" | "policy" | null;
855
+ readonly decidedAt: string;
856
+ } | null;
857
+ readonly resolution: {
858
+ readonly outcome: "approved" | "cancelled" | "denied";
859
+ readonly actor: {
860
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
861
+ readonly id: string;
862
+ readonly displayName?: string | null;
863
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
864
+ };
865
+ readonly resolvedAt: string;
866
+ readonly reason: string | null;
867
+ } | null;
868
+ readonly createdAt: string;
869
+ readonly updatedAt: string;
870
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "toolCall" | "updateDraft";
871
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
872
+ readonly tool: {
873
+ readonly name: string;
874
+ readonly argumentsHash: string;
875
+ readonly arguments: {
876
+ readonly [x: string]: import("./generated").JsonValue;
877
+ };
878
+ } | null;
879
+ } | {
825
880
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
826
881
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
827
882
  readonly proposedBy: {
@@ -864,8 +919,8 @@ export declare const listActions: ((input: {
864
919
  readonly reviewExpectedAt: string | null;
865
920
  readonly skippedRecipients: readonly {
866
921
  readonly address: string;
867
- readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
868
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
922
+ readonly reason: "bounce" | "complaint" | "manual" | "topic-unsubscribe" | "unsubscribe";
923
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
869
924
  }[];
870
925
  readonly executeUntil: string | null;
871
926
  readonly retryAt: string | null;
@@ -945,57 +1000,57 @@ export declare const listActions: ((input: {
945
1000
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
946
1001
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
947
1002
  } | null;
948
- } | {
949
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
950
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
951
- readonly proposedBy: {
952
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
953
- readonly id: string;
954
- readonly displayName?: string | null;
955
- };
956
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
957
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
958
- readonly decision: {
959
- readonly outcome: "allow" | "deny" | "requireApproval";
960
- readonly reason: string | null;
961
- readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
962
- readonly source: "grant" | "installation" | "policy" | null;
963
- readonly decidedAt: string;
964
- } | null;
965
- readonly resolution: {
966
- readonly outcome: "approved" | "cancelled" | "denied";
967
- readonly actor: {
968
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
969
- readonly id: string;
970
- readonly displayName?: string | null;
971
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
972
- };
973
- readonly resolvedAt: string;
974
- readonly reason: string | null;
975
- } | null;
976
- readonly createdAt: string;
977
- readonly updatedAt: string;
978
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "toolCall" | "updateDraft";
979
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
980
- readonly tool: {
981
- readonly name: string;
982
- readonly argumentsHash: string;
983
- readonly arguments: {
984
- readonly [x: string]: import("./generated").JsonValue;
985
- };
986
- } | null;
987
1003
  })[];
988
1004
  readonly nextCursor: string | null;
989
1005
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
990
1006
  readonly items: (input: {
991
1007
  readonly id: string;
992
- readonly limit?: string | null | undefined;
1008
+ readonly limit?: number | null | undefined;
993
1009
  readonly cursor?: string | null | undefined;
994
1010
  readonly threadId?: string | null | undefined;
995
1011
  readonly state?: "accepted" | "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "completed" | "executed" | "executing" | "failed" | "notSent" | "policyDenied" | "proposed" | "queued" | "uncertain" | null | undefined;
996
1012
  readonly after?: string | null | undefined;
997
1013
  readonly before?: string | null | undefined;
998
1014
  }) => import("effect/Stream").Stream<{
1015
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1016
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1017
+ readonly proposedBy: {
1018
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1019
+ readonly id: string;
1020
+ readonly displayName?: string | null;
1021
+ };
1022
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1023
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1024
+ readonly decision: {
1025
+ readonly outcome: "allow" | "deny" | "requireApproval";
1026
+ readonly reason: string | null;
1027
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1028
+ readonly source: "grant" | "installation" | "policy" | null;
1029
+ readonly decidedAt: string;
1030
+ } | null;
1031
+ readonly resolution: {
1032
+ readonly outcome: "approved" | "cancelled" | "denied";
1033
+ readonly actor: {
1034
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1035
+ readonly id: string;
1036
+ readonly displayName?: string | null;
1037
+ readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1038
+ };
1039
+ readonly resolvedAt: string;
1040
+ readonly reason: string | null;
1041
+ } | null;
1042
+ readonly createdAt: string;
1043
+ readonly updatedAt: string;
1044
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "toolCall" | "updateDraft";
1045
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1046
+ readonly tool: {
1047
+ readonly name: string;
1048
+ readonly argumentsHash: string;
1049
+ readonly arguments: {
1050
+ readonly [x: string]: import("./generated").JsonValue;
1051
+ };
1052
+ } | null;
1053
+ } | {
999
1054
  readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1000
1055
  readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1001
1056
  readonly proposedBy: {
@@ -1038,8 +1093,8 @@ export declare const listActions: ((input: {
1038
1093
  readonly reviewExpectedAt: string | null;
1039
1094
  readonly skippedRecipients: readonly {
1040
1095
  readonly address: string;
1041
- readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1042
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1096
+ readonly reason: "bounce" | "complaint" | "manual" | "topic-unsubscribe" | "unsubscribe";
1097
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
1043
1098
  }[];
1044
1099
  readonly executeUntil: string | null;
1045
1100
  readonly retryAt: string | null;
@@ -1119,45 +1174,6 @@ export declare const listActions: ((input: {
1119
1174
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1120
1175
  readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1121
1176
  } | null;
1122
- } | {
1123
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1124
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1125
- readonly proposedBy: {
1126
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1127
- readonly id: string;
1128
- readonly displayName?: string | null;
1129
- };
1130
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1131
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1132
- readonly decision: {
1133
- readonly outcome: "allow" | "deny" | "requireApproval";
1134
- readonly reason: string | null;
1135
- readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1136
- readonly source: "grant" | "installation" | "policy" | null;
1137
- readonly decidedAt: string;
1138
- } | null;
1139
- readonly resolution: {
1140
- readonly outcome: "approved" | "cancelled" | "denied";
1141
- readonly actor: {
1142
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1143
- readonly id: string;
1144
- readonly displayName?: string | null;
1145
- readonly source: "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1146
- };
1147
- readonly resolvedAt: string;
1148
- readonly reason: string | null;
1149
- } | null;
1150
- readonly createdAt: string;
1151
- readonly updatedAt: string;
1152
- readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "toolCall" | "updateDraft";
1153
- readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1154
- readonly tool: {
1155
- readonly name: string;
1156
- readonly argumentsHash: string;
1157
- readonly arguments: {
1158
- readonly [x: string]: import("./generated").JsonValue;
1159
- };
1160
- } | null;
1161
1177
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
1162
1178
  };
1163
1179
  export declare const getAction: (input: {
@@ -1183,14 +1199,14 @@ export declare const denyAction: (input: {
1183
1199
  }) => import("./internal/operation").OperationResult<"mailboxesDenyAction">;
1184
1200
  export declare const listEvents: ((input: {
1185
1201
  readonly id: string;
1186
- readonly limit?: string | null | undefined;
1202
+ readonly limit?: number | null | undefined;
1187
1203
  readonly cursor?: string | null | undefined;
1188
1204
  readonly after?: string | null | undefined;
1189
1205
  readonly before?: string | null | undefined;
1190
1206
  }) => import("./internal/operation").OperationResult<"mailboxesListEvents">) & {
1191
1207
  readonly pages: (input: {
1192
1208
  readonly id: string;
1193
- readonly limit?: string | null | undefined;
1209
+ readonly limit?: number | null | undefined;
1194
1210
  readonly cursor?: string | null | undefined;
1195
1211
  readonly after?: string | null | undefined;
1196
1212
  readonly before?: string | null | undefined;
@@ -1214,7 +1230,7 @@ export declare const listEvents: ((input: {
1214
1230
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
1215
1231
  readonly items: (input: {
1216
1232
  readonly id: string;
1217
- readonly limit?: string | null | undefined;
1233
+ readonly limit?: number | null | undefined;
1218
1234
  readonly cursor?: string | null | undefined;
1219
1235
  readonly after?: string | null | undefined;
1220
1236
  readonly before?: string | null | undefined;
@@ -1,7 +1,7 @@
1
1
  import { type MessageSendInput, type SendOptions } from "./internal/send";
2
2
  export type { MessageSendInput, SendOptions };
3
3
  export declare const list: ((input?: {
4
- readonly limit?: string | null | undefined;
4
+ readonly limit?: number | null | undefined;
5
5
  readonly cursor?: string | null | undefined;
6
6
  readonly channel?: "email" | null | undefined;
7
7
  readonly direction?: "inbound" | "outbound" | null | undefined;
@@ -14,7 +14,7 @@ export declare const list: ((input?: {
14
14
  readonly before?: string | null | undefined;
15
15
  } | undefined) => import("./internal/operation").OperationResult<"messagesList">) & {
16
16
  readonly pages: (input?: {
17
- readonly limit?: string | null | undefined;
17
+ readonly limit?: number | null | undefined;
18
18
  readonly cursor?: string | null | undefined;
19
19
  readonly channel?: "email" | null | undefined;
20
20
  readonly direction?: "inbound" | "outbound" | null | undefined;
@@ -28,6 +28,10 @@ export declare const list: ((input?: {
28
28
  } | undefined) => import("effect/Stream").Stream<{
29
29
  readonly items: readonly {
30
30
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
31
+ readonly campaign?: {
32
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
33
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
34
+ } | null;
31
35
  readonly channel: "email";
32
36
  readonly direction: "inbound" | "outbound";
33
37
  readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
@@ -40,7 +44,7 @@ export declare const list: ((input?: {
40
44
  readonly nextCursor: string | null;
41
45
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
42
46
  readonly items: (input?: {
43
- readonly limit?: string | null | undefined;
47
+ readonly limit?: number | null | undefined;
44
48
  readonly cursor?: string | null | undefined;
45
49
  readonly channel?: "email" | null | undefined;
46
50
  readonly direction?: "inbound" | "outbound" | null | undefined;
@@ -53,6 +57,10 @@ export declare const list: ((input?: {
53
57
  readonly before?: string | null | undefined;
54
58
  } | undefined) => import("effect/Stream").Stream<{
55
59
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
60
+ readonly campaign?: {
61
+ readonly campaignId: string & import("effect/Brand").Brand<"CampaignId">;
62
+ readonly runId: string & import("effect/Brand").Brand<"CampaignRunId">;
63
+ } | null;
56
64
  readonly channel: "email";
57
65
  readonly direction: "inbound" | "outbound";
58
66
  readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
@@ -70,8 +78,8 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
70
78
  readonly reviewExpectedAt: string | null;
71
79
  readonly skippedRecipients: readonly {
72
80
  readonly address: string;
73
- readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
74
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
81
+ readonly reason: "bounce" | "complaint" | "manual" | "topic-unsubscribe" | "unsubscribe";
82
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
75
83
  }[];
76
84
  readonly createdAt: string;
77
85
  }, import("./errors").BillingProviderError | import("./errors").ConflictError | import("./errors").DeliveryUnavailableError | import("./errors").ExternalServiceError | import("./errors").FlagDisabledError | import("./errors").ForbiddenError | import("./errors").FromAddressRequiredError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("..").MediaUploadError | import("./errors").OnboardingReviewRequiredError | import("./errors").PaymentRequiredError | import("./errors").RateLimitedError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").SenderNotReadyError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
@@ -176,7 +184,7 @@ export declare const validateEmail: (input: {
176
184
  readonly timeZone?: string | undefined;
177
185
  readonly inReplyToMessageId?: string | null | undefined;
178
186
  readonly replyTo?: readonly string[] | null | undefined;
179
- readonly unsubscribeGroupId?: string | null | undefined;
187
+ readonly topicId?: string | null | undefined;
180
188
  readonly tracking?: {
181
189
  readonly opens?: boolean | undefined;
182
190
  readonly clicks?: boolean | undefined;
@@ -194,8 +202,8 @@ export declare const get: (input: {
194
202
  }) => import("./internal/operation").OperationResult<"messagesGet">;
195
203
  export declare const getEmail: (input: {
196
204
  readonly id: string;
197
- readonly includeDownloadUrls?: string | null | undefined;
198
- readonly urlExpiresIn?: string | null | undefined;
205
+ readonly includeDownloadUrls?: boolean | null | undefined;
206
+ readonly urlExpiresIn?: number | null | undefined;
199
207
  }) => import("./internal/operation").OperationResult<"messagesGetEmail">;
200
208
  export declare const remove: (input: {
201
209
  readonly id: string;
@@ -205,12 +213,12 @@ export declare const getStatus: (input: {
205
213
  }) => import("./internal/operation").OperationResult<"messagesGetStatus">;
206
214
  export declare const getEvents: ((input: {
207
215
  readonly id: string;
208
- readonly limit?: string | null | undefined;
216
+ readonly limit?: number | null | undefined;
209
217
  readonly cursor?: string | null | undefined;
210
218
  }) => import("./internal/operation").OperationResult<"messagesGetEvents">) & {
211
219
  readonly pages: (input: {
212
220
  readonly id: string;
213
- readonly limit?: string | null | undefined;
221
+ readonly limit?: number | null | undefined;
214
222
  readonly cursor?: string | null | undefined;
215
223
  }) => import("effect/Stream").Stream<{
216
224
  readonly items: readonly {
@@ -227,7 +235,7 @@ export declare const getEvents: ((input: {
227
235
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
228
236
  readonly items: (input: {
229
237
  readonly id: string;
230
- readonly limit?: string | null | undefined;
238
+ readonly limit?: number | null | undefined;
231
239
  readonly cursor?: string | null | undefined;
232
240
  }) => import("effect/Stream").Stream<{
233
241
  readonly id: string & import("effect/Brand").Brand<"MessageEventId">;