samva 0.5.0 → 0.7.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 (65) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +14 -4
  3. package/dist/{categories-B9Nw2v_F.js → categories-DvsHUJtX.js} +32 -8
  4. package/dist/client/sdk.gen.d.ts +493 -88
  5. package/dist/client/types.gen.d.ts +3136 -416
  6. package/dist/{client-B7gEkvEq.js → client-5O8KsY5Z.js} +2638 -902
  7. package/dist/{client-attribution-B2yJBXdZ.js → client-attribution-27MNycCV.js} +2 -2
  8. package/dist/effect/analytics.d.ts +66 -0
  9. package/dist/effect/analytics.js +21 -0
  10. package/dist/effect/api-keys.d.ts +198 -34
  11. package/dist/effect/api-keys.js +1 -1
  12. package/dist/effect/attachments.d.ts +53 -0
  13. package/dist/effect/attachments.js +17 -0
  14. package/dist/effect/brands.d.ts +212 -0
  15. package/dist/effect/brands.js +24 -0
  16. package/dist/effect/campaigns.d.ts +36 -18
  17. package/dist/effect/campaigns.js +1 -1
  18. package/dist/effect/categories.d.ts +3 -3
  19. package/dist/effect/categories.js +1 -1
  20. package/dist/effect/client.js +1 -1
  21. package/dist/effect/contact-groups.d.ts +375 -0
  22. package/dist/effect/contact-groups.js +29 -0
  23. package/dist/effect/contacts.d.ts +35 -19
  24. package/dist/effect/contacts.js +1 -1
  25. package/dist/effect/conversations.d.ts +188 -47
  26. package/dist/effect/conversations.js +1 -1
  27. package/dist/effect/custom-fields.d.ts +111 -0
  28. package/dist/effect/custom-fields.js +17 -0
  29. package/dist/effect/email.d.ts +268 -121
  30. package/dist/effect/email.js +2 -2
  31. package/dist/effect/generated-metadata.d.ts +20 -4
  32. package/dist/effect/generated.d.ts +13934 -7968
  33. package/dist/effect/index.d.ts +7 -2
  34. package/dist/effect/index.js +9 -4
  35. package/dist/effect/internal/operation.d.ts +121 -27
  36. package/dist/effect/media.d.ts +5 -5
  37. package/dist/effect/media.js +1 -1
  38. package/dist/effect/messages.d.ts +319 -73
  39. package/dist/effect/messages.js +1 -1
  40. package/dist/effect/operations.d.ts +6 -6
  41. package/dist/effect/operations.js +1 -1
  42. package/dist/effect/organizations.d.ts +7 -374
  43. package/dist/effect/organizations.js +2 -4
  44. package/dist/effect/retry.js +1 -1
  45. package/dist/effect/scheduled-messages.d.ts +7 -7
  46. package/dist/effect/scheduled-messages.js +1 -1
  47. package/dist/effect/templates.d.ts +263 -305
  48. package/dist/effect/templates.js +7 -5
  49. package/dist/effect/unsubscribe-groups.d.ts +161 -0
  50. package/dist/effect/unsubscribe-groups.js +25 -0
  51. package/dist/effect/webhooks.d.ts +18 -18
  52. package/dist/effect/webhooks.js +2 -2
  53. package/dist/index.js +2 -2
  54. package/dist/{normalize-BiIJnycv.js → normalize-B79uJIeb.js} +13 -14
  55. package/dist/normalize.d.ts +3 -7
  56. package/dist/{operation-B4FjN6wq.js → operation-Cb5V9FJ7.js} +123 -11
  57. package/dist/promises/errors.gen.d.ts +50 -43
  58. package/dist/promises/index.d.ts +20 -6
  59. package/dist/promises/index.js +2 -2
  60. package/dist/promises/types.gen.d.ts +1 -1
  61. package/dist/{promises-CP_nxUus.js → promises-C2yyw-pf.js} +1582 -368
  62. package/dist/service-map.d.ts +189 -12
  63. package/package.json +32 -12
  64. package/dist/effect/design.d.ts +0 -209
  65. package/dist/effect/design.js +0 -13
@@ -8,6 +8,7 @@ export declare const list: ((input?: {
8
8
  readonly status?: string | null | undefined;
9
9
  readonly conversationId?: string | null | undefined;
10
10
  readonly contactId?: string | null | undefined;
11
+ readonly from?: string | null | undefined;
11
12
  readonly startDate?: string | null | undefined;
12
13
  readonly endDate?: string | null | undefined;
13
14
  } | undefined) => import("effect/Effect").Effect<{
@@ -22,7 +23,33 @@ export declare const list: ((input?: {
22
23
  } | null;
23
24
  readonly channel: "email";
24
25
  readonly direction: "inbound" | "outbound";
25
- readonly content: import("./generated").JsonValue;
26
+ readonly content: {
27
+ readonly text?: string | null;
28
+ readonly html?: string | null;
29
+ readonly markdown?: string | null;
30
+ readonly email?: {
31
+ readonly subject?: string | null;
32
+ readonly html?: string | null;
33
+ readonly text?: string | null;
34
+ readonly headers?: {
35
+ readonly [x: string]: string;
36
+ } | null;
37
+ readonly tracking?: {
38
+ readonly opens?: boolean;
39
+ readonly clicks?: boolean;
40
+ };
41
+ readonly attachments?: readonly {
42
+ readonly filename: string;
43
+ readonly content?: string | null;
44
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
45
+ readonly contentType: string;
46
+ readonly size: number;
47
+ }[] | null;
48
+ } | null;
49
+ readonly metadata?: {
50
+ readonly [x: string]: import("./generated").JsonValue;
51
+ } | null;
52
+ };
26
53
  readonly metadata: {
27
54
  readonly [x: string]: import("./generated").JsonValue;
28
55
  } | null;
@@ -31,17 +58,28 @@ export declare const list: ((input?: {
31
58
  readonly tags: readonly string[];
32
59
  readonly categories: readonly string[];
33
60
  readonly isTest: boolean;
34
- readonly isInternal: boolean;
35
- readonly isAutomated: boolean;
36
61
  readonly externalId: string | null;
37
62
  readonly referenceId: string | null;
38
- readonly apiKeyId: string | null;
39
- readonly httpMethod: string | null;
40
- readonly apiRequestMetadata: import("./generated").JsonValue;
41
- readonly apiResponseMetadata: import("./generated").JsonValue;
63
+ readonly submission: {
64
+ readonly origin: "campaign" | "direct" | "scheduled";
65
+ readonly transport: "http" | null;
66
+ readonly credential: {
67
+ readonly kind: "api_key";
68
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
69
+ } | {
70
+ readonly kind: "oauth";
71
+ readonly clientId: string | null;
72
+ } | {
73
+ readonly kind: "session";
74
+ } | null;
75
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
76
+ readonly client: {
77
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
78
+ readonly version: string;
79
+ } | null;
80
+ } | null;
42
81
  readonly createdAt: string;
43
82
  readonly updatedAt: string;
44
- readonly createdBy: string | null;
45
83
  readonly fromContact: {
46
84
  readonly id: string;
47
85
  readonly name: string;
@@ -91,7 +129,8 @@ export declare const list: ((input?: {
91
129
  readonly scheduling: {
92
130
  readonly dueAt: string;
93
131
  readonly expiresAt: string;
94
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
132
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
133
+ readonly reviewExpectedAt: string | null;
95
134
  } | null;
96
135
  readonly id: string;
97
136
  readonly messageId: string;
@@ -111,17 +150,24 @@ export declare const list: ((input?: {
111
150
  readonly terminalAt: string | null;
112
151
  readonly errorCode: string | null;
113
152
  readonly errorMessage: string | null;
114
- readonly errorDetails: import("./generated").JsonValue;
153
+ readonly errorDetails: {
154
+ readonly code?: string | null;
155
+ readonly name?: string | null;
156
+ readonly message?: string | null;
157
+ readonly details?: {
158
+ readonly [x: string]: string | number | null;
159
+ } | null;
160
+ readonly retryable?: boolean | null;
161
+ } | null;
115
162
  readonly cost: string;
116
163
  readonly currency: string;
117
164
  readonly idempotencyKey: string | null;
118
- readonly metadata: import("./generated").JsonValue;
119
165
  readonly createdAt: string;
120
166
  readonly updatedAt: string;
121
167
  }[];
122
168
  readonly emailDeliveryDetails: readonly {
123
169
  readonly deliveryId: string;
124
- readonly messageIdHeader: string | null;
170
+ readonly messageIdHeader: string;
125
171
  readonly inReplyTo: string | null;
126
172
  readonly references: readonly string[] | null;
127
173
  readonly subject: string;
@@ -153,6 +199,8 @@ export declare const list: ((input?: {
153
199
  readonly createdAt: string;
154
200
  readonly updatedAt: string;
155
201
  }[];
202
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
203
+ readonly reviewExpectedAt: string | null;
156
204
  }[];
157
205
  readonly pagination: {
158
206
  readonly page: number;
@@ -160,7 +208,7 @@ export declare const list: ((input?: {
160
208
  readonly total: number;
161
209
  readonly totalPages: number;
162
210
  };
163
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
211
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
164
212
  readonly pages: (input?: {
165
213
  readonly page?: string | null | undefined;
166
214
  readonly limit?: string | null | undefined;
@@ -169,6 +217,7 @@ export declare const list: ((input?: {
169
217
  readonly status?: string | null | undefined;
170
218
  readonly conversationId?: string | null | undefined;
171
219
  readonly contactId?: string | null | undefined;
220
+ readonly from?: string | null | undefined;
172
221
  readonly startDate?: string | null | undefined;
173
222
  readonly endDate?: string | null | undefined;
174
223
  } | undefined) => import("effect/Stream").Stream<{
@@ -183,7 +232,33 @@ export declare const list: ((input?: {
183
232
  } | null;
184
233
  readonly channel: "email";
185
234
  readonly direction: "inbound" | "outbound";
186
- readonly content: import("./generated").JsonValue;
235
+ readonly content: {
236
+ readonly text?: string | null;
237
+ readonly html?: string | null;
238
+ readonly markdown?: string | null;
239
+ readonly email?: {
240
+ readonly subject?: string | null;
241
+ readonly html?: string | null;
242
+ readonly text?: string | null;
243
+ readonly headers?: {
244
+ readonly [x: string]: string;
245
+ } | null;
246
+ readonly tracking?: {
247
+ readonly opens?: boolean;
248
+ readonly clicks?: boolean;
249
+ };
250
+ readonly attachments?: readonly {
251
+ readonly filename: string;
252
+ readonly content?: string | null;
253
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
254
+ readonly contentType: string;
255
+ readonly size: number;
256
+ }[] | null;
257
+ } | null;
258
+ readonly metadata?: {
259
+ readonly [x: string]: import("./generated").JsonValue;
260
+ } | null;
261
+ };
187
262
  readonly metadata: {
188
263
  readonly [x: string]: import("./generated").JsonValue;
189
264
  } | null;
@@ -192,17 +267,28 @@ export declare const list: ((input?: {
192
267
  readonly tags: readonly string[];
193
268
  readonly categories: readonly string[];
194
269
  readonly isTest: boolean;
195
- readonly isInternal: boolean;
196
- readonly isAutomated: boolean;
197
270
  readonly externalId: string | null;
198
271
  readonly referenceId: string | null;
199
- readonly apiKeyId: string | null;
200
- readonly httpMethod: string | null;
201
- readonly apiRequestMetadata: import("./generated").JsonValue;
202
- readonly apiResponseMetadata: import("./generated").JsonValue;
272
+ readonly submission: {
273
+ readonly origin: "campaign" | "direct" | "scheduled";
274
+ readonly transport: "http" | null;
275
+ readonly credential: {
276
+ readonly kind: "api_key";
277
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
278
+ } | {
279
+ readonly kind: "oauth";
280
+ readonly clientId: string | null;
281
+ } | {
282
+ readonly kind: "session";
283
+ } | null;
284
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
285
+ readonly client: {
286
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
287
+ readonly version: string;
288
+ } | null;
289
+ } | null;
203
290
  readonly createdAt: string;
204
291
  readonly updatedAt: string;
205
- readonly createdBy: string | null;
206
292
  readonly fromContact: {
207
293
  readonly id: string;
208
294
  readonly name: string;
@@ -252,7 +338,8 @@ export declare const list: ((input?: {
252
338
  readonly scheduling: {
253
339
  readonly dueAt: string;
254
340
  readonly expiresAt: string;
255
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
341
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
342
+ readonly reviewExpectedAt: string | null;
256
343
  } | null;
257
344
  readonly id: string;
258
345
  readonly messageId: string;
@@ -272,17 +359,24 @@ export declare const list: ((input?: {
272
359
  readonly terminalAt: string | null;
273
360
  readonly errorCode: string | null;
274
361
  readonly errorMessage: string | null;
275
- readonly errorDetails: import("./generated").JsonValue;
362
+ readonly errorDetails: {
363
+ readonly code?: string | null;
364
+ readonly name?: string | null;
365
+ readonly message?: string | null;
366
+ readonly details?: {
367
+ readonly [x: string]: string | number | null;
368
+ } | null;
369
+ readonly retryable?: boolean | null;
370
+ } | null;
276
371
  readonly cost: string;
277
372
  readonly currency: string;
278
373
  readonly idempotencyKey: string | null;
279
- readonly metadata: import("./generated").JsonValue;
280
374
  readonly createdAt: string;
281
375
  readonly updatedAt: string;
282
376
  }[];
283
377
  readonly emailDeliveryDetails: readonly {
284
378
  readonly deliveryId: string;
285
- readonly messageIdHeader: string | null;
379
+ readonly messageIdHeader: string;
286
380
  readonly inReplyTo: string | null;
287
381
  readonly references: readonly string[] | null;
288
382
  readonly subject: string;
@@ -314,6 +408,8 @@ export declare const list: ((input?: {
314
408
  readonly createdAt: string;
315
409
  readonly updatedAt: string;
316
410
  }[];
411
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
412
+ readonly reviewExpectedAt: string | null;
317
413
  }[];
318
414
  readonly pagination: {
319
415
  readonly page: number;
@@ -321,7 +417,7 @@ export declare const list: ((input?: {
321
417
  readonly total: number;
322
418
  readonly totalPages: number;
323
419
  };
324
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
420
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
325
421
  readonly items: (input?: {
326
422
  readonly page?: string | null | undefined;
327
423
  readonly limit?: string | null | undefined;
@@ -330,6 +426,7 @@ export declare const list: ((input?: {
330
426
  readonly status?: string | null | undefined;
331
427
  readonly conversationId?: string | null | undefined;
332
428
  readonly contactId?: string | null | undefined;
429
+ readonly from?: string | null | undefined;
333
430
  readonly startDate?: string | null | undefined;
334
431
  readonly endDate?: string | null | undefined;
335
432
  } | undefined) => import("effect/Stream").Stream<{
@@ -343,7 +440,33 @@ export declare const list: ((input?: {
343
440
  } | null;
344
441
  readonly channel: "email";
345
442
  readonly direction: "inbound" | "outbound";
346
- readonly content: import("./generated").JsonValue;
443
+ readonly content: {
444
+ readonly text?: string | null;
445
+ readonly html?: string | null;
446
+ readonly markdown?: string | null;
447
+ readonly email?: {
448
+ readonly subject?: string | null;
449
+ readonly html?: string | null;
450
+ readonly text?: string | null;
451
+ readonly headers?: {
452
+ readonly [x: string]: string;
453
+ } | null;
454
+ readonly tracking?: {
455
+ readonly opens?: boolean;
456
+ readonly clicks?: boolean;
457
+ };
458
+ readonly attachments?: readonly {
459
+ readonly filename: string;
460
+ readonly content?: string | null;
461
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
462
+ readonly contentType: string;
463
+ readonly size: number;
464
+ }[] | null;
465
+ } | null;
466
+ readonly metadata?: {
467
+ readonly [x: string]: import("./generated").JsonValue;
468
+ } | null;
469
+ };
347
470
  readonly metadata: {
348
471
  readonly [x: string]: import("./generated").JsonValue;
349
472
  } | null;
@@ -352,17 +475,28 @@ export declare const list: ((input?: {
352
475
  readonly tags: readonly string[];
353
476
  readonly categories: readonly string[];
354
477
  readonly isTest: boolean;
355
- readonly isInternal: boolean;
356
- readonly isAutomated: boolean;
357
478
  readonly externalId: string | null;
358
479
  readonly referenceId: string | null;
359
- readonly apiKeyId: string | null;
360
- readonly httpMethod: string | null;
361
- readonly apiRequestMetadata: import("./generated").JsonValue;
362
- readonly apiResponseMetadata: import("./generated").JsonValue;
480
+ readonly submission: {
481
+ readonly origin: "campaign" | "direct" | "scheduled";
482
+ readonly transport: "http" | null;
483
+ readonly credential: {
484
+ readonly kind: "api_key";
485
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
486
+ } | {
487
+ readonly kind: "oauth";
488
+ readonly clientId: string | null;
489
+ } | {
490
+ readonly kind: "session";
491
+ } | null;
492
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
493
+ readonly client: {
494
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
495
+ readonly version: string;
496
+ } | null;
497
+ } | null;
363
498
  readonly createdAt: string;
364
499
  readonly updatedAt: string;
365
- readonly createdBy: string | null;
366
500
  readonly fromContact: {
367
501
  readonly id: string;
368
502
  readonly name: string;
@@ -412,7 +546,8 @@ export declare const list: ((input?: {
412
546
  readonly scheduling: {
413
547
  readonly dueAt: string;
414
548
  readonly expiresAt: string;
415
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
549
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
550
+ readonly reviewExpectedAt: string | null;
416
551
  } | null;
417
552
  readonly id: string;
418
553
  readonly messageId: string;
@@ -432,17 +567,24 @@ export declare const list: ((input?: {
432
567
  readonly terminalAt: string | null;
433
568
  readonly errorCode: string | null;
434
569
  readonly errorMessage: string | null;
435
- readonly errorDetails: import("./generated").JsonValue;
570
+ readonly errorDetails: {
571
+ readonly code?: string | null;
572
+ readonly name?: string | null;
573
+ readonly message?: string | null;
574
+ readonly details?: {
575
+ readonly [x: string]: string | number | null;
576
+ } | null;
577
+ readonly retryable?: boolean | null;
578
+ } | null;
436
579
  readonly cost: string;
437
580
  readonly currency: string;
438
581
  readonly idempotencyKey: string | null;
439
- readonly metadata: import("./generated").JsonValue;
440
582
  readonly createdAt: string;
441
583
  readonly updatedAt: string;
442
584
  }[];
443
585
  readonly emailDeliveryDetails: readonly {
444
586
  readonly deliveryId: string;
445
- readonly messageIdHeader: string | null;
587
+ readonly messageIdHeader: string;
446
588
  readonly inReplyTo: string | null;
447
589
  readonly references: readonly string[] | null;
448
590
  readonly subject: string;
@@ -474,7 +616,9 @@ export declare const list: ((input?: {
474
616
  readonly createdAt: string;
475
617
  readonly updatedAt: string;
476
618
  }[];
477
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
619
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
620
+ readonly reviewExpectedAt: string | null;
621
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
478
622
  };
479
623
  export declare const send: (input: MessageSendInput, options?: SendOptions | undefined) => import("effect/Effect").Effect<{
480
624
  readonly id: string;
@@ -487,7 +631,33 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
487
631
  } | null;
488
632
  readonly channel: "email";
489
633
  readonly direction: "inbound" | "outbound";
490
- readonly content: import("./generated").JsonValue;
634
+ readonly content: {
635
+ readonly text?: string | null;
636
+ readonly html?: string | null;
637
+ readonly markdown?: string | null;
638
+ readonly email?: {
639
+ readonly subject?: string | null;
640
+ readonly html?: string | null;
641
+ readonly text?: string | null;
642
+ readonly headers?: {
643
+ readonly [x: string]: string;
644
+ } | null;
645
+ readonly tracking?: {
646
+ readonly opens?: boolean;
647
+ readonly clicks?: boolean;
648
+ };
649
+ readonly attachments?: readonly {
650
+ readonly filename: string;
651
+ readonly content?: string | null;
652
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
653
+ readonly contentType: string;
654
+ readonly size: number;
655
+ }[] | null;
656
+ } | null;
657
+ readonly metadata?: {
658
+ readonly [x: string]: import("./generated").JsonValue;
659
+ } | null;
660
+ };
491
661
  readonly metadata: {
492
662
  readonly [x: string]: import("./generated").JsonValue;
493
663
  } | null;
@@ -496,17 +666,28 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
496
666
  readonly tags: readonly string[];
497
667
  readonly categories: readonly string[];
498
668
  readonly isTest: boolean;
499
- readonly isInternal: boolean;
500
- readonly isAutomated: boolean;
501
669
  readonly externalId: string | null;
502
670
  readonly referenceId: string | null;
503
- readonly apiKeyId: string | null;
504
- readonly httpMethod: string | null;
505
- readonly apiRequestMetadata: import("./generated").JsonValue;
506
- readonly apiResponseMetadata: import("./generated").JsonValue;
671
+ readonly submission: {
672
+ readonly origin: "campaign" | "direct" | "scheduled";
673
+ readonly transport: "http" | null;
674
+ readonly credential: {
675
+ readonly kind: "api_key";
676
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
677
+ } | {
678
+ readonly kind: "oauth";
679
+ readonly clientId: string | null;
680
+ } | {
681
+ readonly kind: "session";
682
+ } | null;
683
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
684
+ readonly client: {
685
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
686
+ readonly version: string;
687
+ } | null;
688
+ } | null;
507
689
  readonly createdAt: string;
508
690
  readonly updatedAt: string;
509
- readonly createdBy: string | null;
510
691
  readonly fromContact: {
511
692
  readonly id: string;
512
693
  readonly name: string;
@@ -556,7 +737,8 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
556
737
  readonly scheduling: {
557
738
  readonly dueAt: string;
558
739
  readonly expiresAt: string;
559
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
740
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
741
+ readonly reviewExpectedAt: string | null;
560
742
  } | null;
561
743
  readonly id: string;
562
744
  readonly messageId: string;
@@ -576,17 +758,24 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
576
758
  readonly terminalAt: string | null;
577
759
  readonly errorCode: string | null;
578
760
  readonly errorMessage: string | null;
579
- readonly errorDetails: import("./generated").JsonValue;
761
+ readonly errorDetails: {
762
+ readonly code?: string | null;
763
+ readonly name?: string | null;
764
+ readonly message?: string | null;
765
+ readonly details?: {
766
+ readonly [x: string]: string | number | null;
767
+ } | null;
768
+ readonly retryable?: boolean | null;
769
+ } | null;
580
770
  readonly cost: string;
581
771
  readonly currency: string;
582
772
  readonly idempotencyKey: string | null;
583
- readonly metadata: import("./generated").JsonValue;
584
773
  readonly createdAt: string;
585
774
  readonly updatedAt: string;
586
775
  }[];
587
776
  readonly emailDeliveryDetails: readonly {
588
777
  readonly deliveryId: string;
589
- readonly messageIdHeader: string | null;
778
+ readonly messageIdHeader: string;
590
779
  readonly inReplyTo: string | null;
591
780
  readonly references: readonly string[] | null;
592
781
  readonly subject: string;
@@ -618,7 +807,9 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
618
807
  readonly createdAt: string;
619
808
  readonly updatedAt: string;
620
809
  }[];
621
- }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").OnboardingReviewRequiredError | import("./generated").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("./generated").WebhookEnqueueError, import("./client").Service>;
810
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
811
+ readonly reviewExpectedAt: string | null;
812
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").DeliveryUnavailableError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").OnboardingReviewRequiredError | import("./generated").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
622
813
  export declare const validateEmail: (input: {
623
814
  readonly conversationId?: string | null | undefined;
624
815
  readonly metadata?: {
@@ -740,7 +931,7 @@ export declare const validateEmail: (input: {
740
931
  readonly hasHtml: boolean;
741
932
  readonly hasText: boolean;
742
933
  };
743
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
934
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
744
935
  export declare const get: (input: {
745
936
  readonly id: string;
746
937
  }) => import("effect/Effect").Effect<{
@@ -754,7 +945,33 @@ export declare const get: (input: {
754
945
  } | null;
755
946
  readonly channel: "email";
756
947
  readonly direction: "inbound" | "outbound";
757
- readonly content: import("./generated").JsonValue;
948
+ readonly content: {
949
+ readonly text?: string | null;
950
+ readonly html?: string | null;
951
+ readonly markdown?: string | null;
952
+ readonly email?: {
953
+ readonly subject?: string | null;
954
+ readonly html?: string | null;
955
+ readonly text?: string | null;
956
+ readonly headers?: {
957
+ readonly [x: string]: string;
958
+ } | null;
959
+ readonly tracking?: {
960
+ readonly opens?: boolean;
961
+ readonly clicks?: boolean;
962
+ };
963
+ readonly attachments?: readonly {
964
+ readonly filename: string;
965
+ readonly content?: string | null;
966
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
967
+ readonly contentType: string;
968
+ readonly size: number;
969
+ }[] | null;
970
+ } | null;
971
+ readonly metadata?: {
972
+ readonly [x: string]: import("./generated").JsonValue;
973
+ } | null;
974
+ };
758
975
  readonly metadata: {
759
976
  readonly [x: string]: import("./generated").JsonValue;
760
977
  } | null;
@@ -763,17 +980,28 @@ export declare const get: (input: {
763
980
  readonly tags: readonly string[];
764
981
  readonly categories: readonly string[];
765
982
  readonly isTest: boolean;
766
- readonly isInternal: boolean;
767
- readonly isAutomated: boolean;
768
983
  readonly externalId: string | null;
769
984
  readonly referenceId: string | null;
770
- readonly apiKeyId: string | null;
771
- readonly httpMethod: string | null;
772
- readonly apiRequestMetadata: import("./generated").JsonValue;
773
- readonly apiResponseMetadata: import("./generated").JsonValue;
985
+ readonly submission: {
986
+ readonly origin: "campaign" | "direct" | "scheduled";
987
+ readonly transport: "http" | null;
988
+ readonly credential: {
989
+ readonly kind: "api_key";
990
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
991
+ } | {
992
+ readonly kind: "oauth";
993
+ readonly clientId: string | null;
994
+ } | {
995
+ readonly kind: "session";
996
+ } | null;
997
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
998
+ readonly client: {
999
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
1000
+ readonly version: string;
1001
+ } | null;
1002
+ } | null;
774
1003
  readonly createdAt: string;
775
1004
  readonly updatedAt: string;
776
- readonly createdBy: string | null;
777
1005
  readonly fromContact: {
778
1006
  readonly id: string;
779
1007
  readonly name: string;
@@ -823,7 +1051,8 @@ export declare const get: (input: {
823
1051
  readonly scheduling: {
824
1052
  readonly dueAt: string;
825
1053
  readonly expiresAt: string;
826
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
1054
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1055
+ readonly reviewExpectedAt: string | null;
827
1056
  } | null;
828
1057
  readonly id: string;
829
1058
  readonly messageId: string;
@@ -843,17 +1072,24 @@ export declare const get: (input: {
843
1072
  readonly terminalAt: string | null;
844
1073
  readonly errorCode: string | null;
845
1074
  readonly errorMessage: string | null;
846
- readonly errorDetails: import("./generated").JsonValue;
1075
+ readonly errorDetails: {
1076
+ readonly code?: string | null;
1077
+ readonly name?: string | null;
1078
+ readonly message?: string | null;
1079
+ readonly details?: {
1080
+ readonly [x: string]: string | number | null;
1081
+ } | null;
1082
+ readonly retryable?: boolean | null;
1083
+ } | null;
847
1084
  readonly cost: string;
848
1085
  readonly currency: string;
849
1086
  readonly idempotencyKey: string | null;
850
- readonly metadata: import("./generated").JsonValue;
851
1087
  readonly createdAt: string;
852
1088
  readonly updatedAt: string;
853
1089
  }[];
854
1090
  readonly emailDeliveryDetails: readonly {
855
1091
  readonly deliveryId: string;
856
- readonly messageIdHeader: string | null;
1092
+ readonly messageIdHeader: string;
857
1093
  readonly inReplyTo: string | null;
858
1094
  readonly references: readonly string[] | null;
859
1095
  readonly subject: string;
@@ -885,7 +1121,9 @@ export declare const get: (input: {
885
1121
  readonly createdAt: string;
886
1122
  readonly updatedAt: string;
887
1123
  }[];
888
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
1124
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1125
+ readonly reviewExpectedAt: string | null;
1126
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
889
1127
  export declare const getEmail: (input: {
890
1128
  readonly id: string;
891
1129
  readonly includeS3Urls?: string | null | undefined;
@@ -895,7 +1133,8 @@ export declare const getEmail: (input: {
895
1133
  readonly scheduling: {
896
1134
  readonly dueAt: string;
897
1135
  readonly expiresAt: string;
898
- readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "provider-unavailable" | "rate" | "retry" | "tenant-health" | null;
1136
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1137
+ readonly reviewExpectedAt: string | null;
899
1138
  } | null;
900
1139
  readonly id: string;
901
1140
  readonly messageId: string;
@@ -915,11 +1154,18 @@ export declare const getEmail: (input: {
915
1154
  readonly terminalAt: string | null;
916
1155
  readonly errorCode: string | null;
917
1156
  readonly errorMessage: string | null;
918
- readonly errorDetails: import("./generated").JsonValue;
1157
+ readonly errorDetails: {
1158
+ readonly code?: string | null;
1159
+ readonly name?: string | null;
1160
+ readonly message?: string | null;
1161
+ readonly details?: {
1162
+ readonly [x: string]: string | number | null;
1163
+ } | null;
1164
+ readonly retryable?: boolean | null;
1165
+ } | null;
919
1166
  readonly cost: string;
920
1167
  readonly currency: string;
921
1168
  readonly idempotencyKey: string | null;
922
- readonly metadata: import("./generated").JsonValue;
923
1169
  readonly createdAt: string;
924
1170
  readonly updatedAt: string;
925
1171
  }[];
@@ -981,20 +1227,20 @@ export declare const getEmail: (input: {
981
1227
  readonly createdAt: string;
982
1228
  readonly receivedAt: string | null;
983
1229
  readonly processedAt: string | null;
984
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
1230
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
985
1231
  export declare const remove: (input: {
986
1232
  readonly id: string;
987
1233
  }) => import("effect/Effect").Effect<{
988
1234
  readonly success: boolean;
989
1235
  readonly message: string;
990
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
1236
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
991
1237
  export declare const getStatus: (input: {
992
1238
  readonly id: string;
993
1239
  }) => import("effect/Effect").Effect<{
994
1240
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
995
1241
  readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
996
1242
  readonly updatedAt: string;
997
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
1243
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
998
1244
  export declare const getEvents: (input: {
999
1245
  readonly id: string;
1000
1246
  }) => import("effect/Effect").Effect<readonly {
@@ -1006,4 +1252,4 @@ export declare const getEvents: (input: {
1006
1252
  readonly metadata?: {
1007
1253
  readonly [x: string]: import("./generated").JsonValue;
1008
1254
  } | null;
1009
- }[], import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
1255
+ }[], import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;