samva 0.43.3 → 0.45.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 (103) hide show
  1. package/AGENTS.md +3 -0
  2. package/README.md +4 -0
  3. package/dist/client/sdk.gen.d.ts +308 -2
  4. package/dist/client/sdk.gen.js +937 -2
  5. package/dist/client/types.gen.d.ts +2294 -54
  6. package/dist/effect/agents.d.ts +86 -86
  7. package/dist/effect/agents.js +2 -2
  8. package/dist/effect/api-keys.d.ts +36 -36
  9. package/dist/effect/api-keys.js +2 -2
  10. package/dist/effect/attachments.d.ts +3 -3
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/campaigns.d.ts +250 -250
  13. package/dist/effect/campaigns.js +3 -3
  14. package/dist/effect/categories.d.ts +23 -5
  15. package/dist/effect/categories.js +11 -20
  16. package/dist/effect/contact-groups.d.ts +44 -44
  17. package/dist/effect/contact-groups.js +3 -3
  18. package/dist/effect/contacts.d.ts +3 -3
  19. package/dist/effect/contacts.js +1 -1
  20. package/dist/effect/conversations.d.ts +53 -53
  21. package/dist/effect/conversations.js +1 -1
  22. package/dist/effect/email.d.ts +99 -97
  23. package/dist/effect/email.js +21 -21
  24. package/dist/effect/errors.d.ts +1 -1
  25. package/dist/effect/errors.js +2 -2
  26. package/dist/effect/extension-installations.d.ts +6 -6
  27. package/dist/effect/extension-installations.js +1 -1
  28. package/dist/effect/generated/campaigns.js +2 -2
  29. package/dist/effect/generated/email.d.ts +7 -0
  30. package/dist/effect/generated/email.js +8 -9
  31. package/dist/effect/generated/index.d.ts +9 -1
  32. package/dist/effect/generated/journeys.d.ts +1 -3
  33. package/dist/effect/generated/journeys.js +2 -6
  34. package/dist/effect/generated/mailboxes.d.ts +14 -14
  35. package/dist/effect/generated/mailboxes.js +2 -0
  36. package/dist/effect/generated/messages.d.ts +1 -5
  37. package/dist/effect/generated/messages.js +2 -10
  38. package/dist/effect/generated/newsletter-issues.js +29 -29
  39. package/dist/effect/generated/organizations.js +2 -2
  40. package/dist/effect/generated/scheduled-messages.js +3 -3
  41. package/dist/effect/generated/shared.d.ts +112 -2
  42. package/dist/effect/generated/shared.js +66 -25
  43. package/dist/effect/generated/subscriptions.js +4 -4
  44. package/dist/effect/generated/template-registrations.d.ts +651 -0
  45. package/dist/effect/generated/template-registrations.js +138 -0
  46. package/dist/effect/generated/templates.d.ts +789 -6
  47. package/dist/effect/generated/templates.js +156 -54
  48. package/dist/effect/generated/whats-app-flows.d.ts +1838 -0
  49. package/dist/effect/generated/whats-app-flows.js +338 -0
  50. package/dist/effect/generated/whats-app-setup-links.d.ts +705 -0
  51. package/dist/effect/generated/whats-app-setup-links.js +150 -0
  52. package/dist/effect/generated/whats-app.d.ts +2089 -0
  53. package/dist/effect/generated/whats-app.js +633 -0
  54. package/dist/effect/generated-metadata.d.ts +257 -0
  55. package/dist/effect/generated-metadata.js +223 -48
  56. package/dist/effect/index.d.ts +4 -0
  57. package/dist/effect/index.js +6 -2
  58. package/dist/effect/mailboxes.d.ts +301 -301
  59. package/dist/effect/mailboxes.js +3 -3
  60. package/dist/effect/media.d.ts +4 -4
  61. package/dist/effect/media.js +2 -2
  62. package/dist/effect/messages.d.ts +17 -17
  63. package/dist/effect/messages.js +4 -4
  64. package/dist/effect/namespaces.d.ts +5 -5
  65. package/dist/effect/namespaces.js +1 -1
  66. package/dist/effect/newsletter-issues.d.ts +8 -8
  67. package/dist/effect/newsletter-issues.js +2 -2
  68. package/dist/effect/newsletters.d.ts +3 -3
  69. package/dist/effect/newsletters.js +1 -1
  70. package/dist/effect/organizations.d.ts +10 -10
  71. package/dist/effect/organizations.js +1 -1
  72. package/dist/effect/runtime.d.ts +2 -0
  73. package/dist/effect/runtime.js +2 -1
  74. package/dist/effect/scheduled-messages.d.ts +839 -839
  75. package/dist/effect/scheduled-messages.js +1 -1
  76. package/dist/effect/template-registrations.d.ts +12 -0
  77. package/dist/effect/template-registrations.js +16 -0
  78. package/dist/effect/templates.d.ts +66 -56
  79. package/dist/effect/templates.js +16 -12
  80. package/dist/effect/topic-forms.d.ts +4 -4
  81. package/dist/effect/topic-forms.js +1 -1
  82. package/dist/effect/topics.d.ts +11 -11
  83. package/dist/effect/topics.js +2 -2
  84. package/dist/effect/webhooks.d.ts +18 -18
  85. package/dist/effect/webhooks.js +3 -3
  86. package/dist/effect/whatsapp-flows.d.ts +34 -0
  87. package/dist/effect/whatsapp-flows.js +30 -0
  88. package/dist/effect/whatsapp-setup-links.d.ts +66 -0
  89. package/dist/effect/whatsapp-setup-links.js +18 -0
  90. package/dist/effect/whatsapp.d.ts +51 -0
  91. package/dist/effect/whatsapp.js +34 -0
  92. package/dist/index.js +2 -2
  93. package/dist/mailbox/types.d.ts +2 -1
  94. package/dist/package.js +1 -1
  95. package/dist/promises/client.d.ts +9 -1
  96. package/dist/promises/client.js +11 -3
  97. package/dist/promises/errors.gen.d.ts +38 -2
  98. package/dist/promises/errors.gen.js +160 -3
  99. package/dist/promises/index.js +2 -2
  100. package/dist/promises/types.gen.d.ts +1 -1
  101. package/dist/service-map.d.ts +923 -734
  102. package/dist/service-map.js +288 -233
  103. package/package.json +27 -11
@@ -173,222 +173,6 @@ export declare const deleteLabel: (input: {
173
173
  readonly id: string;
174
174
  readonly labelId: string;
175
175
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDeleteLabel">;
176
- export declare const listThreads: ((input: {
177
- readonly id: string;
178
- readonly limit?: number | null | undefined;
179
- readonly cursor?: string | undefined;
180
- readonly after?: string | undefined;
181
- readonly before?: string | undefined;
182
- readonly q?: string | undefined;
183
- readonly state?: "active" | "done" | undefined;
184
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
185
- readonly label?: string | undefined;
186
- readonly unread?: boolean | null | undefined;
187
- readonly starred?: boolean | null | undefined;
188
- readonly snoozed?: boolean | null | undefined;
189
- }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListThreads">) & {
190
- readonly pages: (input: {
191
- readonly id: string;
192
- readonly limit?: number | null | undefined;
193
- readonly cursor?: string | undefined;
194
- readonly after?: string | undefined;
195
- readonly before?: string | undefined;
196
- readonly q?: string | undefined;
197
- readonly state?: "active" | "done" | undefined;
198
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
199
- readonly label?: string | undefined;
200
- readonly unread?: boolean | null | undefined;
201
- readonly starred?: boolean | null | undefined;
202
- readonly snoozed?: boolean | null | undefined;
203
- }) => import("effect/Stream").Stream<{
204
- readonly items: readonly {
205
- readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
206
- readonly channel: "email" | "sms" | "whatsapp";
207
- readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
208
- readonly subject: string | null;
209
- readonly preview: string | null;
210
- readonly from: {
211
- readonly address: string | null;
212
- readonly displayName: string | null;
213
- } | null;
214
- readonly messageCount: number;
215
- readonly hasAttachments: boolean;
216
- readonly hasDraft: boolean;
217
- readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
218
- readonly priority: "high" | "low" | "normal" | "urgent";
219
- readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
220
- readonly read: boolean;
221
- readonly starred: boolean;
222
- readonly snoozedUntil: string | null;
223
- readonly doneAt: string | null;
224
- readonly closedAt: string | null;
225
- readonly closedBy: {
226
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
227
- readonly id: string;
228
- readonly displayName?: string | null;
229
- } | null;
230
- readonly lastActivityAt: string;
231
- }[];
232
- readonly nextCursor: string | null;
233
- }, 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>;
234
- readonly items: (input: {
235
- readonly id: string;
236
- readonly limit?: number | null | undefined;
237
- readonly cursor?: string | undefined;
238
- readonly after?: string | undefined;
239
- readonly before?: string | undefined;
240
- readonly q?: string | undefined;
241
- readonly state?: "active" | "done" | undefined;
242
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
243
- readonly label?: string | undefined;
244
- readonly unread?: boolean | null | undefined;
245
- readonly starred?: boolean | null | undefined;
246
- readonly snoozed?: boolean | null | undefined;
247
- }) => import("effect/Stream").Stream<{
248
- readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
249
- readonly channel: "email" | "sms" | "whatsapp";
250
- readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
251
- readonly subject: string | null;
252
- readonly preview: string | null;
253
- readonly from: {
254
- readonly address: string | null;
255
- readonly displayName: string | null;
256
- } | null;
257
- readonly messageCount: number;
258
- readonly hasAttachments: boolean;
259
- readonly hasDraft: boolean;
260
- readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
261
- readonly priority: "high" | "low" | "normal" | "urgent";
262
- readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
263
- readonly read: boolean;
264
- readonly starred: boolean;
265
- readonly snoozedUntil: string | null;
266
- readonly doneAt: string | null;
267
- readonly closedAt: string | null;
268
- readonly closedBy: {
269
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
270
- readonly id: string;
271
- readonly displayName?: string | null;
272
- } | null;
273
- readonly lastActivityAt: string;
274
- }, 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>;
275
- };
276
- export declare const listOrganizationThreads: ((input?: {
277
- readonly limit?: number | null | undefined;
278
- readonly cursor?: string | undefined;
279
- readonly after?: string | undefined;
280
- readonly before?: string | undefined;
281
- readonly q?: string | undefined;
282
- readonly state?: "active" | "done" | undefined;
283
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
284
- readonly label?: string | undefined;
285
- readonly unread?: boolean | null | undefined;
286
- readonly starred?: boolean | null | undefined;
287
- readonly snoozed?: boolean | null | undefined;
288
- readonly mailboxId?: string | readonly string[] | undefined;
289
- readonly kind?: "personal" | "shared" | undefined;
290
- readonly conversation?: string | undefined;
291
- } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationThreads">) & {
292
- readonly pages: (input?: {
293
- readonly limit?: number | null | undefined;
294
- readonly cursor?: string | undefined;
295
- readonly after?: string | undefined;
296
- readonly before?: string | undefined;
297
- readonly q?: string | undefined;
298
- readonly state?: "active" | "done" | undefined;
299
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
300
- readonly label?: string | undefined;
301
- readonly unread?: boolean | null | undefined;
302
- readonly starred?: boolean | null | undefined;
303
- readonly snoozed?: boolean | null | undefined;
304
- readonly mailboxId?: string | readonly string[] | undefined;
305
- readonly kind?: "personal" | "shared" | undefined;
306
- readonly conversation?: string | undefined;
307
- } | undefined) => import("effect/Stream").Stream<{
308
- readonly items: readonly {
309
- readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
310
- readonly channel: "email" | "sms" | "whatsapp";
311
- readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
312
- readonly subject: string | null;
313
- readonly preview: string | null;
314
- readonly from: {
315
- readonly address: string | null;
316
- readonly displayName: string | null;
317
- } | null;
318
- readonly messageCount: number;
319
- readonly hasAttachments: boolean;
320
- readonly hasDraft: boolean;
321
- readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
322
- readonly priority: "high" | "low" | "normal" | "urgent";
323
- readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
324
- readonly read: boolean;
325
- readonly starred: boolean;
326
- readonly snoozedUntil: string | null;
327
- readonly doneAt: string | null;
328
- readonly closedAt: string | null;
329
- readonly closedBy: {
330
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
331
- readonly id: string;
332
- readonly displayName?: string | null;
333
- } | null;
334
- readonly lastActivityAt: string;
335
- readonly mailbox: {
336
- readonly id: string & import("effect/Brand").Brand<"MailboxId">;
337
- readonly address: string | null;
338
- readonly kind: "personal" | "shared";
339
- };
340
- }[];
341
- readonly nextCursor: string | null;
342
- }, 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>;
343
- readonly items: (input?: {
344
- readonly limit?: number | null | undefined;
345
- readonly cursor?: string | undefined;
346
- readonly after?: string | undefined;
347
- readonly before?: string | undefined;
348
- readonly q?: string | undefined;
349
- readonly state?: "active" | "done" | undefined;
350
- readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
351
- readonly label?: string | undefined;
352
- readonly unread?: boolean | null | undefined;
353
- readonly starred?: boolean | null | undefined;
354
- readonly snoozed?: boolean | null | undefined;
355
- readonly mailboxId?: string | readonly string[] | undefined;
356
- readonly kind?: "personal" | "shared" | undefined;
357
- readonly conversation?: string | undefined;
358
- } | undefined) => import("effect/Stream").Stream<{
359
- readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
360
- readonly channel: "email" | "sms" | "whatsapp";
361
- readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
362
- readonly subject: string | null;
363
- readonly preview: string | null;
364
- readonly from: {
365
- readonly address: string | null;
366
- readonly displayName: string | null;
367
- } | null;
368
- readonly messageCount: number;
369
- readonly hasAttachments: boolean;
370
- readonly hasDraft: boolean;
371
- readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
372
- readonly priority: "high" | "low" | "normal" | "urgent";
373
- readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
374
- readonly read: boolean;
375
- readonly starred: boolean;
376
- readonly snoozedUntil: string | null;
377
- readonly doneAt: string | null;
378
- readonly closedAt: string | null;
379
- readonly closedBy: {
380
- readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
381
- readonly id: string;
382
- readonly displayName?: string | null;
383
- } | null;
384
- readonly lastActivityAt: string;
385
- readonly mailbox: {
386
- readonly id: string & import("effect/Brand").Brand<"MailboxId">;
387
- readonly address: string | null;
388
- readonly kind: "personal" | "shared";
389
- };
390
- }, 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>;
391
- };
392
176
  export declare const getNeedsYou: ((input?: {
393
177
  readonly limit?: number | null | undefined;
394
178
  readonly cursor?: string | undefined;
@@ -571,7 +355,7 @@ export declare const getNeedsYou: ((input?: {
571
355
  readonly address: string | null;
572
356
  readonly kind: "personal" | "shared";
573
357
  };
574
- readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
358
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "verdict_missing" | "virus" | "virus_unscanned";
575
359
  readonly source: "classifier" | "receipt";
576
360
  readonly heldAt: string;
577
361
  })[];
@@ -728,41 +512,314 @@ export declare const getNeedsYou: ((input?: {
728
512
  readonly [x: string]: import("./generated").JsonValue;
729
513
  } | null;
730
514
  } | null;
731
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
732
- readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
733
- readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
734
- } | null;
735
- readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
736
- readonly mailbox: {
737
- readonly id: string & import("effect/Brand").Brand<"MailboxId">;
515
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
516
+ readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
517
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
518
+ } | null;
519
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
520
+ readonly mailbox: {
521
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
522
+ readonly address: string | null;
523
+ readonly kind: "personal" | "shared";
524
+ };
525
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
526
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
527
+ readonly proposedBy: {
528
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
529
+ readonly id: string;
530
+ readonly displayName?: string | null;
531
+ };
532
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
533
+ readonly alwaysAllow: {
534
+ readonly by: "admin" | "approver" | "owner";
535
+ readonly allowed: boolean;
536
+ } | null;
537
+ readonly createdAt: string;
538
+ } | {
539
+ readonly type: "quarantinedMessage";
540
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
541
+ readonly mailbox: {
542
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
543
+ readonly address: string | null;
544
+ readonly kind: "personal" | "shared";
545
+ };
546
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "verdict_missing" | "virus" | "virus_unscanned";
547
+ readonly source: "classifier" | "receipt";
548
+ readonly heldAt: string;
549
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
550
+ };
551
+ export declare const listOrganizationDrafts: ((input?: {
552
+ readonly limit?: number | null | undefined;
553
+ readonly cursor?: string | undefined;
554
+ readonly mailboxId?: string | readonly string[] | undefined;
555
+ readonly kind?: "personal" | "shared" | undefined;
556
+ readonly threadId?: string | undefined;
557
+ } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationDrafts">) & {
558
+ readonly pages: (input?: {
559
+ readonly limit?: number | null | undefined;
560
+ readonly cursor?: string | undefined;
561
+ readonly mailboxId?: string | readonly string[] | undefined;
562
+ readonly kind?: "personal" | "shared" | undefined;
563
+ readonly threadId?: string | undefined;
564
+ } | undefined) => import("effect/Stream").Stream<{
565
+ readonly items: readonly {
566
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
567
+ readonly channel: "email" | "sms" | "whatsapp";
568
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
569
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
570
+ readonly state: "locked" | "saved" | "sent";
571
+ readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
572
+ readonly to: readonly string[];
573
+ readonly subject: string | null;
574
+ readonly createdAt: string;
575
+ readonly updatedAt: string;
576
+ readonly mailbox: {
577
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
578
+ readonly address: string | null;
579
+ readonly kind: "personal" | "shared";
580
+ };
581
+ }[];
582
+ readonly nextCursor: string | null;
583
+ }, 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>;
584
+ readonly items: (input?: {
585
+ readonly limit?: number | null | undefined;
586
+ readonly cursor?: string | undefined;
587
+ readonly mailboxId?: string | readonly string[] | undefined;
588
+ readonly kind?: "personal" | "shared" | undefined;
589
+ readonly threadId?: string | undefined;
590
+ } | undefined) => import("effect/Stream").Stream<{
591
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
592
+ readonly channel: "email" | "sms" | "whatsapp";
593
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
594
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
595
+ readonly state: "locked" | "saved" | "sent";
596
+ readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
597
+ readonly to: readonly string[];
598
+ readonly subject: string | null;
599
+ readonly createdAt: string;
600
+ readonly updatedAt: string;
601
+ readonly mailbox: {
602
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
603
+ readonly address: string | null;
604
+ readonly kind: "personal" | "shared";
605
+ };
606
+ }, 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>;
607
+ };
608
+ export declare const listOrganizationThreads: ((input?: {
609
+ readonly limit?: number | null | undefined;
610
+ readonly cursor?: string | undefined;
611
+ readonly after?: string | undefined;
612
+ readonly before?: string | undefined;
613
+ readonly q?: string | undefined;
614
+ readonly state?: "active" | "done" | undefined;
615
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
616
+ readonly label?: string | undefined;
617
+ readonly unread?: boolean | null | undefined;
618
+ readonly starred?: boolean | null | undefined;
619
+ readonly snoozed?: boolean | null | undefined;
620
+ readonly mailboxId?: string | readonly string[] | undefined;
621
+ readonly kind?: "personal" | "shared" | undefined;
622
+ readonly conversation?: string | undefined;
623
+ } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationThreads">) & {
624
+ readonly pages: (input?: {
625
+ readonly limit?: number | null | undefined;
626
+ readonly cursor?: string | undefined;
627
+ readonly after?: string | undefined;
628
+ readonly before?: string | undefined;
629
+ readonly q?: string | undefined;
630
+ readonly state?: "active" | "done" | undefined;
631
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
632
+ readonly label?: string | undefined;
633
+ readonly unread?: boolean | null | undefined;
634
+ readonly starred?: boolean | null | undefined;
635
+ readonly snoozed?: boolean | null | undefined;
636
+ readonly mailboxId?: string | readonly string[] | undefined;
637
+ readonly kind?: "personal" | "shared" | undefined;
638
+ readonly conversation?: string | undefined;
639
+ } | undefined) => import("effect/Stream").Stream<{
640
+ readonly items: readonly {
641
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
642
+ readonly channel: "email" | "sms" | "whatsapp";
643
+ readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
644
+ readonly subject: string | null;
645
+ readonly preview: string | null;
646
+ readonly from: {
647
+ readonly address: string | null;
648
+ readonly displayName: string | null;
649
+ } | null;
650
+ readonly messageCount: number;
651
+ readonly hasAttachments: boolean;
652
+ readonly hasDraft: boolean;
653
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
654
+ readonly priority: "high" | "low" | "normal" | "urgent";
655
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
656
+ readonly read: boolean;
657
+ readonly starred: boolean;
658
+ readonly snoozedUntil: string | null;
659
+ readonly doneAt: string | null;
660
+ readonly closedAt: string | null;
661
+ readonly closedBy: {
662
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
663
+ readonly id: string;
664
+ readonly displayName?: string | null;
665
+ } | null;
666
+ readonly lastActivityAt: string;
667
+ readonly mailbox: {
668
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
669
+ readonly address: string | null;
670
+ readonly kind: "personal" | "shared";
671
+ };
672
+ }[];
673
+ readonly nextCursor: string | null;
674
+ }, 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>;
675
+ readonly items: (input?: {
676
+ readonly limit?: number | null | undefined;
677
+ readonly cursor?: string | undefined;
678
+ readonly after?: string | undefined;
679
+ readonly before?: string | undefined;
680
+ readonly q?: string | undefined;
681
+ readonly state?: "active" | "done" | undefined;
682
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
683
+ readonly label?: string | undefined;
684
+ readonly unread?: boolean | null | undefined;
685
+ readonly starred?: boolean | null | undefined;
686
+ readonly snoozed?: boolean | null | undefined;
687
+ readonly mailboxId?: string | readonly string[] | undefined;
688
+ readonly kind?: "personal" | "shared" | undefined;
689
+ readonly conversation?: string | undefined;
690
+ } | undefined) => import("effect/Stream").Stream<{
691
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
692
+ readonly channel: "email" | "sms" | "whatsapp";
693
+ readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
694
+ readonly subject: string | null;
695
+ readonly preview: string | null;
696
+ readonly from: {
738
697
  readonly address: string | null;
739
- readonly kind: "personal" | "shared";
740
- };
741
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
742
- readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
743
- readonly proposedBy: {
698
+ readonly displayName: string | null;
699
+ } | null;
700
+ readonly messageCount: number;
701
+ readonly hasAttachments: boolean;
702
+ readonly hasDraft: boolean;
703
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
704
+ readonly priority: "high" | "low" | "normal" | "urgent";
705
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
706
+ readonly read: boolean;
707
+ readonly starred: boolean;
708
+ readonly snoozedUntil: string | null;
709
+ readonly doneAt: string | null;
710
+ readonly closedAt: string | null;
711
+ readonly closedBy: {
744
712
  readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
745
713
  readonly id: string;
746
714
  readonly displayName?: string | null;
747
- };
748
- readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
749
- readonly alwaysAllow: {
750
- readonly by: "admin" | "approver" | "owner";
751
- readonly allowed: boolean;
752
715
  } | null;
753
- readonly createdAt: string;
754
- } | {
755
- readonly type: "quarantinedMessage";
756
- readonly id: string & import("effect/Brand").Brand<"MessageId">;
716
+ readonly lastActivityAt: string;
757
717
  readonly mailbox: {
758
718
  readonly id: string & import("effect/Brand").Brand<"MailboxId">;
759
719
  readonly address: string | null;
760
720
  readonly kind: "personal" | "shared";
761
721
  };
762
- readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
763
- readonly source: "classifier" | "receipt";
764
- readonly heldAt: string;
765
- }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
722
+ }, 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>;
723
+ };
724
+ export declare const listThreads: ((input: {
725
+ readonly id: string;
726
+ readonly limit?: number | null | undefined;
727
+ readonly cursor?: string | undefined;
728
+ readonly after?: string | undefined;
729
+ readonly before?: string | undefined;
730
+ readonly q?: string | undefined;
731
+ readonly state?: "active" | "done" | undefined;
732
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
733
+ readonly label?: string | undefined;
734
+ readonly unread?: boolean | null | undefined;
735
+ readonly starred?: boolean | null | undefined;
736
+ readonly snoozed?: boolean | null | undefined;
737
+ }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListThreads">) & {
738
+ readonly pages: (input: {
739
+ readonly id: string;
740
+ readonly limit?: number | null | undefined;
741
+ readonly cursor?: string | undefined;
742
+ readonly after?: string | undefined;
743
+ readonly before?: string | undefined;
744
+ readonly q?: string | undefined;
745
+ readonly state?: "active" | "done" | undefined;
746
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
747
+ readonly label?: string | undefined;
748
+ readonly unread?: boolean | null | undefined;
749
+ readonly starred?: boolean | null | undefined;
750
+ readonly snoozed?: boolean | null | undefined;
751
+ }) => import("effect/Stream").Stream<{
752
+ readonly items: readonly {
753
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
754
+ readonly channel: "email" | "sms" | "whatsapp";
755
+ readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
756
+ readonly subject: string | null;
757
+ readonly preview: string | null;
758
+ readonly from: {
759
+ readonly address: string | null;
760
+ readonly displayName: string | null;
761
+ } | null;
762
+ readonly messageCount: number;
763
+ readonly hasAttachments: boolean;
764
+ readonly hasDraft: boolean;
765
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
766
+ readonly priority: "high" | "low" | "normal" | "urgent";
767
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
768
+ readonly read: boolean;
769
+ readonly starred: boolean;
770
+ readonly snoozedUntil: string | null;
771
+ readonly doneAt: string | null;
772
+ readonly closedAt: string | null;
773
+ readonly closedBy: {
774
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
775
+ readonly id: string;
776
+ readonly displayName?: string | null;
777
+ } | null;
778
+ readonly lastActivityAt: string;
779
+ }[];
780
+ readonly nextCursor: string | null;
781
+ }, 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>;
782
+ readonly items: (input: {
783
+ readonly id: string;
784
+ readonly limit?: number | null | undefined;
785
+ readonly cursor?: string | undefined;
786
+ readonly after?: string | undefined;
787
+ readonly before?: string | undefined;
788
+ readonly q?: string | undefined;
789
+ readonly state?: "active" | "done" | undefined;
790
+ readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | undefined;
791
+ readonly label?: string | undefined;
792
+ readonly unread?: boolean | null | undefined;
793
+ readonly starred?: boolean | null | undefined;
794
+ readonly snoozed?: boolean | null | undefined;
795
+ }) => import("effect/Stream").Stream<{
796
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
797
+ readonly channel: "email" | "sms" | "whatsapp";
798
+ readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
799
+ readonly subject: string | null;
800
+ readonly preview: string | null;
801
+ readonly from: {
802
+ readonly address: string | null;
803
+ readonly displayName: string | null;
804
+ } | null;
805
+ readonly messageCount: number;
806
+ readonly hasAttachments: boolean;
807
+ readonly hasDraft: boolean;
808
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
809
+ readonly priority: "high" | "low" | "normal" | "urgent";
810
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
811
+ readonly read: boolean;
812
+ readonly starred: boolean;
813
+ readonly snoozedUntil: string | null;
814
+ readonly doneAt: string | null;
815
+ readonly closedAt: string | null;
816
+ readonly closedBy: {
817
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
818
+ readonly id: string;
819
+ readonly displayName?: string | null;
820
+ } | null;
821
+ readonly lastActivityAt: string;
822
+ }, 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>;
766
823
  };
767
824
  export declare const getThread: (input: {
768
825
  readonly id: string;
@@ -1335,7 +1392,7 @@ export declare const listQuarantine: ((input: {
1335
1392
  readonly items: readonly {
1336
1393
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
1337
1394
  readonly disposition: "isolated" | "quarantined";
1338
- readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1395
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "verdict_missing" | "virus" | "virus_unscanned";
1339
1396
  readonly source: "classifier" | "receipt";
1340
1397
  readonly from: {
1341
1398
  readonly address: string;
@@ -1359,7 +1416,7 @@ export declare const listQuarantine: ((input: {
1359
1416
  }) => import("effect/Stream").Stream<{
1360
1417
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
1361
1418
  readonly disposition: "isolated" | "quarantined";
1362
- readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1419
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "verdict_missing" | "virus" | "virus_unscanned";
1363
1420
  readonly source: "classifier" | "receipt";
1364
1421
  readonly from: {
1365
1422
  readonly address: string;
@@ -1381,63 +1438,6 @@ export declare const discardMessage: (input: {
1381
1438
  readonly id: string;
1382
1439
  readonly messageId: string;
1383
1440
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDiscardMessage">;
1384
- export declare const listOrganizationDrafts: ((input?: {
1385
- readonly limit?: number | null | undefined;
1386
- readonly cursor?: string | undefined;
1387
- readonly mailboxId?: string | readonly string[] | undefined;
1388
- readonly kind?: "personal" | "shared" | undefined;
1389
- readonly threadId?: string | undefined;
1390
- } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationDrafts">) & {
1391
- readonly pages: (input?: {
1392
- readonly limit?: number | null | undefined;
1393
- readonly cursor?: string | undefined;
1394
- readonly mailboxId?: string | readonly string[] | undefined;
1395
- readonly kind?: "personal" | "shared" | undefined;
1396
- readonly threadId?: string | undefined;
1397
- } | undefined) => import("effect/Stream").Stream<{
1398
- readonly items: readonly {
1399
- readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1400
- readonly channel: "email" | "sms" | "whatsapp";
1401
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1402
- readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1403
- readonly state: "locked" | "saved" | "sent";
1404
- readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1405
- readonly to: readonly string[];
1406
- readonly subject: string | null;
1407
- readonly createdAt: string;
1408
- readonly updatedAt: string;
1409
- readonly mailbox: {
1410
- readonly id: string & import("effect/Brand").Brand<"MailboxId">;
1411
- readonly address: string | null;
1412
- readonly kind: "personal" | "shared";
1413
- };
1414
- }[];
1415
- readonly nextCursor: string | null;
1416
- }, 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>;
1417
- readonly items: (input?: {
1418
- readonly limit?: number | null | undefined;
1419
- readonly cursor?: string | undefined;
1420
- readonly mailboxId?: string | readonly string[] | undefined;
1421
- readonly kind?: "personal" | "shared" | undefined;
1422
- readonly threadId?: string | undefined;
1423
- } | undefined) => import("effect/Stream").Stream<{
1424
- readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1425
- readonly channel: "email" | "sms" | "whatsapp";
1426
- readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1427
- readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1428
- readonly state: "locked" | "saved" | "sent";
1429
- readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1430
- readonly to: readonly string[];
1431
- readonly subject: string | null;
1432
- readonly createdAt: string;
1433
- readonly updatedAt: string;
1434
- readonly mailbox: {
1435
- readonly id: string & import("effect/Brand").Brand<"MailboxId">;
1436
- readonly address: string | null;
1437
- readonly kind: "personal" | "shared";
1438
- };
1439
- }, 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>;
1440
- };
1441
1441
  export declare const listDrafts: ((input: {
1442
1442
  readonly id: string;
1443
1443
  readonly limit?: number | null | undefined;