samva 0.4.0 → 0.6.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 (63) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +12 -2
  3. package/dist/{categories-CsUa8ojo.js → categories-4u9Az4No.js} +28 -8
  4. package/dist/client/sdk.gen.d.ts +545 -74
  5. package/dist/client/types.gen.d.ts +3907 -747
  6. package/dist/{client-BmZK_uCt.js → client-DCM6U0-I.js} +3061 -808
  7. package/dist/{client-attribution-BslSOa_8.js → client-attribution-DYUSAa76.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/campaigns.d.ts +52 -18
  15. package/dist/effect/campaigns.js +1 -1
  16. package/dist/effect/categories.d.ts +3 -3
  17. package/dist/effect/categories.js +1 -1
  18. package/dist/effect/client.js +1 -1
  19. package/dist/effect/contact-groups.d.ts +375 -0
  20. package/dist/effect/contact-groups.js +29 -0
  21. package/dist/effect/contacts.d.ts +35 -19
  22. package/dist/effect/contacts.js +1 -1
  23. package/dist/effect/conversations.d.ts +191 -44
  24. package/dist/effect/conversations.js +1 -1
  25. package/dist/effect/custom-fields.d.ts +111 -0
  26. package/dist/effect/custom-fields.js +17 -0
  27. package/dist/effect/design.d.ts +2 -2
  28. package/dist/effect/design.js +1 -1
  29. package/dist/effect/email.d.ts +931 -97
  30. package/dist/effect/email.js +27 -3
  31. package/dist/effect/generated-metadata.d.ts +16 -4
  32. package/dist/effect/generated.d.ts +19596 -10819
  33. package/dist/effect/index.d.ts +6 -1
  34. package/dist/effect/index.js +8 -3
  35. package/dist/effect/internal/operation.d.ts +124 -26
  36. package/dist/effect/media.d.ts +8 -8
  37. package/dist/effect/media.js +1 -1
  38. package/dist/effect/messages.d.ts +473 -64
  39. package/dist/effect/messages.js +5 -3
  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 -110
  43. package/dist/effect/organizations.js +2 -4
  44. package/dist/effect/retry.js +1 -1
  45. package/dist/effect/scheduled-messages.d.ts +96 -12
  46. package/dist/effect/scheduled-messages.js +5 -3
  47. package/dist/effect/templates.d.ts +35 -295
  48. package/dist/effect/templates.js +3 -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 +52 -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-B1knNlxk.js → operation-02YX3hY9.js} +144 -8
  57. package/dist/promises/errors.gen.d.ts +47 -39
  58. package/dist/promises/index.d.ts +19 -4
  59. package/dist/promises/index.js +2 -2
  60. package/dist/promises/types.gen.d.ts +1 -1
  61. package/dist/{promises-n1opem5V.js → promises-8MaPNAam.js} +1679 -267
  62. package/dist/service-map.d.ts +221 -8
  63. package/package.json +29 -9
@@ -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;
@@ -88,6 +126,11 @@ export declare const list: ((input?: {
88
126
  } | null;
89
127
  }[];
90
128
  readonly deliveries: readonly {
129
+ readonly scheduling: {
130
+ readonly dueAt: string;
131
+ readonly expiresAt: string;
132
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
133
+ } | null;
91
134
  readonly id: string;
92
135
  readonly messageId: string;
93
136
  readonly recipientId: string | null;
@@ -106,17 +149,24 @@ export declare const list: ((input?: {
106
149
  readonly terminalAt: string | null;
107
150
  readonly errorCode: string | null;
108
151
  readonly errorMessage: string | null;
109
- readonly errorDetails: import("./generated").JsonValue;
152
+ readonly errorDetails: {
153
+ readonly code?: string | null;
154
+ readonly name?: string | null;
155
+ readonly message?: string | null;
156
+ readonly details?: {
157
+ readonly [x: string]: string | number | null;
158
+ } | null;
159
+ readonly retryable?: boolean | null;
160
+ } | null;
110
161
  readonly cost: string;
111
162
  readonly currency: string;
112
163
  readonly idempotencyKey: string | null;
113
- readonly metadata: import("./generated").JsonValue;
114
164
  readonly createdAt: string;
115
165
  readonly updatedAt: string;
116
166
  }[];
117
167
  readonly emailDeliveryDetails: readonly {
118
168
  readonly deliveryId: string;
119
- readonly messageIdHeader: string | null;
169
+ readonly messageIdHeader: string;
120
170
  readonly inReplyTo: string | null;
121
171
  readonly references: readonly string[] | null;
122
172
  readonly subject: string;
@@ -155,7 +205,7 @@ export declare const list: ((input?: {
155
205
  readonly total: number;
156
206
  readonly totalPages: number;
157
207
  };
158
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
208
+ }, 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>) & {
159
209
  readonly pages: (input?: {
160
210
  readonly page?: string | null | undefined;
161
211
  readonly limit?: string | null | undefined;
@@ -164,6 +214,7 @@ export declare const list: ((input?: {
164
214
  readonly status?: string | null | undefined;
165
215
  readonly conversationId?: string | null | undefined;
166
216
  readonly contactId?: string | null | undefined;
217
+ readonly from?: string | null | undefined;
167
218
  readonly startDate?: string | null | undefined;
168
219
  readonly endDate?: string | null | undefined;
169
220
  } | undefined) => import("effect/Stream").Stream<{
@@ -178,7 +229,33 @@ export declare const list: ((input?: {
178
229
  } | null;
179
230
  readonly channel: "email";
180
231
  readonly direction: "inbound" | "outbound";
181
- readonly content: import("./generated").JsonValue;
232
+ readonly content: {
233
+ readonly text?: string | null;
234
+ readonly html?: string | null;
235
+ readonly markdown?: string | null;
236
+ readonly email?: {
237
+ readonly subject?: string | null;
238
+ readonly html?: string | null;
239
+ readonly text?: string | null;
240
+ readonly headers?: {
241
+ readonly [x: string]: string;
242
+ } | null;
243
+ readonly tracking?: {
244
+ readonly opens?: boolean;
245
+ readonly clicks?: boolean;
246
+ };
247
+ readonly attachments?: readonly {
248
+ readonly filename: string;
249
+ readonly content?: string | null;
250
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
251
+ readonly contentType: string;
252
+ readonly size: number;
253
+ }[] | null;
254
+ } | null;
255
+ readonly metadata?: {
256
+ readonly [x: string]: import("./generated").JsonValue;
257
+ } | null;
258
+ };
182
259
  readonly metadata: {
183
260
  readonly [x: string]: import("./generated").JsonValue;
184
261
  } | null;
@@ -187,17 +264,28 @@ export declare const list: ((input?: {
187
264
  readonly tags: readonly string[];
188
265
  readonly categories: readonly string[];
189
266
  readonly isTest: boolean;
190
- readonly isInternal: boolean;
191
- readonly isAutomated: boolean;
192
267
  readonly externalId: string | null;
193
268
  readonly referenceId: string | null;
194
- readonly apiKeyId: string | null;
195
- readonly httpMethod: string | null;
196
- readonly apiRequestMetadata: import("./generated").JsonValue;
197
- readonly apiResponseMetadata: import("./generated").JsonValue;
269
+ readonly submission: {
270
+ readonly origin: "campaign" | "direct" | "scheduled";
271
+ readonly transport: "http" | null;
272
+ readonly credential: {
273
+ readonly kind: "api_key";
274
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
275
+ } | {
276
+ readonly kind: "oauth";
277
+ readonly clientId: string | null;
278
+ } | {
279
+ readonly kind: "session";
280
+ } | null;
281
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
282
+ readonly client: {
283
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
284
+ readonly version: string;
285
+ } | null;
286
+ } | null;
198
287
  readonly createdAt: string;
199
288
  readonly updatedAt: string;
200
- readonly createdBy: string | null;
201
289
  readonly fromContact: {
202
290
  readonly id: string;
203
291
  readonly name: string;
@@ -244,6 +332,11 @@ export declare const list: ((input?: {
244
332
  } | null;
245
333
  }[];
246
334
  readonly deliveries: readonly {
335
+ readonly scheduling: {
336
+ readonly dueAt: string;
337
+ readonly expiresAt: string;
338
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
339
+ } | null;
247
340
  readonly id: string;
248
341
  readonly messageId: string;
249
342
  readonly recipientId: string | null;
@@ -262,17 +355,24 @@ export declare const list: ((input?: {
262
355
  readonly terminalAt: string | null;
263
356
  readonly errorCode: string | null;
264
357
  readonly errorMessage: string | null;
265
- readonly errorDetails: import("./generated").JsonValue;
358
+ readonly errorDetails: {
359
+ readonly code?: string | null;
360
+ readonly name?: string | null;
361
+ readonly message?: string | null;
362
+ readonly details?: {
363
+ readonly [x: string]: string | number | null;
364
+ } | null;
365
+ readonly retryable?: boolean | null;
366
+ } | null;
266
367
  readonly cost: string;
267
368
  readonly currency: string;
268
369
  readonly idempotencyKey: string | null;
269
- readonly metadata: import("./generated").JsonValue;
270
370
  readonly createdAt: string;
271
371
  readonly updatedAt: string;
272
372
  }[];
273
373
  readonly emailDeliveryDetails: readonly {
274
374
  readonly deliveryId: string;
275
- readonly messageIdHeader: string | null;
375
+ readonly messageIdHeader: string;
276
376
  readonly inReplyTo: string | null;
277
377
  readonly references: readonly string[] | null;
278
378
  readonly subject: string;
@@ -311,7 +411,7 @@ export declare const list: ((input?: {
311
411
  readonly total: number;
312
412
  readonly totalPages: number;
313
413
  };
314
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
414
+ }, 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>;
315
415
  readonly items: (input?: {
316
416
  readonly page?: string | null | undefined;
317
417
  readonly limit?: string | null | undefined;
@@ -320,6 +420,7 @@ export declare const list: ((input?: {
320
420
  readonly status?: string | null | undefined;
321
421
  readonly conversationId?: string | null | undefined;
322
422
  readonly contactId?: string | null | undefined;
423
+ readonly from?: string | null | undefined;
323
424
  readonly startDate?: string | null | undefined;
324
425
  readonly endDate?: string | null | undefined;
325
426
  } | undefined) => import("effect/Stream").Stream<{
@@ -333,7 +434,33 @@ export declare const list: ((input?: {
333
434
  } | null;
334
435
  readonly channel: "email";
335
436
  readonly direction: "inbound" | "outbound";
336
- readonly content: import("./generated").JsonValue;
437
+ readonly content: {
438
+ readonly text?: string | null;
439
+ readonly html?: string | null;
440
+ readonly markdown?: string | null;
441
+ readonly email?: {
442
+ readonly subject?: string | null;
443
+ readonly html?: string | null;
444
+ readonly text?: string | null;
445
+ readonly headers?: {
446
+ readonly [x: string]: string;
447
+ } | null;
448
+ readonly tracking?: {
449
+ readonly opens?: boolean;
450
+ readonly clicks?: boolean;
451
+ };
452
+ readonly attachments?: readonly {
453
+ readonly filename: string;
454
+ readonly content?: string | null;
455
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
456
+ readonly contentType: string;
457
+ readonly size: number;
458
+ }[] | null;
459
+ } | null;
460
+ readonly metadata?: {
461
+ readonly [x: string]: import("./generated").JsonValue;
462
+ } | null;
463
+ };
337
464
  readonly metadata: {
338
465
  readonly [x: string]: import("./generated").JsonValue;
339
466
  } | null;
@@ -342,17 +469,28 @@ export declare const list: ((input?: {
342
469
  readonly tags: readonly string[];
343
470
  readonly categories: readonly string[];
344
471
  readonly isTest: boolean;
345
- readonly isInternal: boolean;
346
- readonly isAutomated: boolean;
347
472
  readonly externalId: string | null;
348
473
  readonly referenceId: string | null;
349
- readonly apiKeyId: string | null;
350
- readonly httpMethod: string | null;
351
- readonly apiRequestMetadata: import("./generated").JsonValue;
352
- readonly apiResponseMetadata: import("./generated").JsonValue;
474
+ readonly submission: {
475
+ readonly origin: "campaign" | "direct" | "scheduled";
476
+ readonly transport: "http" | null;
477
+ readonly credential: {
478
+ readonly kind: "api_key";
479
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
480
+ } | {
481
+ readonly kind: "oauth";
482
+ readonly clientId: string | null;
483
+ } | {
484
+ readonly kind: "session";
485
+ } | null;
486
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
487
+ readonly client: {
488
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
489
+ readonly version: string;
490
+ } | null;
491
+ } | null;
353
492
  readonly createdAt: string;
354
493
  readonly updatedAt: string;
355
- readonly createdBy: string | null;
356
494
  readonly fromContact: {
357
495
  readonly id: string;
358
496
  readonly name: string;
@@ -399,6 +537,11 @@ export declare const list: ((input?: {
399
537
  } | null;
400
538
  }[];
401
539
  readonly deliveries: readonly {
540
+ readonly scheduling: {
541
+ readonly dueAt: string;
542
+ readonly expiresAt: string;
543
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
544
+ } | null;
402
545
  readonly id: string;
403
546
  readonly messageId: string;
404
547
  readonly recipientId: string | null;
@@ -417,17 +560,24 @@ export declare const list: ((input?: {
417
560
  readonly terminalAt: string | null;
418
561
  readonly errorCode: string | null;
419
562
  readonly errorMessage: string | null;
420
- readonly errorDetails: import("./generated").JsonValue;
563
+ readonly errorDetails: {
564
+ readonly code?: string | null;
565
+ readonly name?: string | null;
566
+ readonly message?: string | null;
567
+ readonly details?: {
568
+ readonly [x: string]: string | number | null;
569
+ } | null;
570
+ readonly retryable?: boolean | null;
571
+ } | null;
421
572
  readonly cost: string;
422
573
  readonly currency: string;
423
574
  readonly idempotencyKey: string | null;
424
- readonly metadata: import("./generated").JsonValue;
425
575
  readonly createdAt: string;
426
576
  readonly updatedAt: string;
427
577
  }[];
428
578
  readonly emailDeliveryDetails: readonly {
429
579
  readonly deliveryId: string;
430
- readonly messageIdHeader: string | null;
580
+ readonly messageIdHeader: string;
431
581
  readonly inReplyTo: string | null;
432
582
  readonly references: readonly string[] | null;
433
583
  readonly subject: string;
@@ -459,7 +609,7 @@ export declare const list: ((input?: {
459
609
  readonly createdAt: string;
460
610
  readonly updatedAt: string;
461
611
  }[];
462
- }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
612
+ }, 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>;
463
613
  };
464
614
  export declare const send: (input: MessageSendInput, options?: SendOptions | undefined) => import("effect/Effect").Effect<{
465
615
  readonly id: string;
@@ -472,7 +622,33 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
472
622
  } | null;
473
623
  readonly channel: "email";
474
624
  readonly direction: "inbound" | "outbound";
475
- readonly content: import("./generated").JsonValue;
625
+ readonly content: {
626
+ readonly text?: string | null;
627
+ readonly html?: string | null;
628
+ readonly markdown?: string | null;
629
+ readonly email?: {
630
+ readonly subject?: string | null;
631
+ readonly html?: string | null;
632
+ readonly text?: string | null;
633
+ readonly headers?: {
634
+ readonly [x: string]: string;
635
+ } | null;
636
+ readonly tracking?: {
637
+ readonly opens?: boolean;
638
+ readonly clicks?: boolean;
639
+ };
640
+ readonly attachments?: readonly {
641
+ readonly filename: string;
642
+ readonly content?: string | null;
643
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
644
+ readonly contentType: string;
645
+ readonly size: number;
646
+ }[] | null;
647
+ } | null;
648
+ readonly metadata?: {
649
+ readonly [x: string]: import("./generated").JsonValue;
650
+ } | null;
651
+ };
476
652
  readonly metadata: {
477
653
  readonly [x: string]: import("./generated").JsonValue;
478
654
  } | null;
@@ -481,17 +657,28 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
481
657
  readonly tags: readonly string[];
482
658
  readonly categories: readonly string[];
483
659
  readonly isTest: boolean;
484
- readonly isInternal: boolean;
485
- readonly isAutomated: boolean;
486
660
  readonly externalId: string | null;
487
661
  readonly referenceId: string | null;
488
- readonly apiKeyId: string | null;
489
- readonly httpMethod: string | null;
490
- readonly apiRequestMetadata: import("./generated").JsonValue;
491
- readonly apiResponseMetadata: import("./generated").JsonValue;
662
+ readonly submission: {
663
+ readonly origin: "campaign" | "direct" | "scheduled";
664
+ readonly transport: "http" | null;
665
+ readonly credential: {
666
+ readonly kind: "api_key";
667
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
668
+ } | {
669
+ readonly kind: "oauth";
670
+ readonly clientId: string | null;
671
+ } | {
672
+ readonly kind: "session";
673
+ } | null;
674
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
675
+ readonly client: {
676
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
677
+ readonly version: string;
678
+ } | null;
679
+ } | null;
492
680
  readonly createdAt: string;
493
681
  readonly updatedAt: string;
494
- readonly createdBy: string | null;
495
682
  readonly fromContact: {
496
683
  readonly id: string;
497
684
  readonly name: string;
@@ -538,6 +725,11 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
538
725
  } | null;
539
726
  }[];
540
727
  readonly deliveries: readonly {
728
+ readonly scheduling: {
729
+ readonly dueAt: string;
730
+ readonly expiresAt: string;
731
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
732
+ } | null;
541
733
  readonly id: string;
542
734
  readonly messageId: string;
543
735
  readonly recipientId: string | null;
@@ -556,17 +748,24 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
556
748
  readonly terminalAt: string | null;
557
749
  readonly errorCode: string | null;
558
750
  readonly errorMessage: string | null;
559
- readonly errorDetails: import("./generated").JsonValue;
751
+ readonly errorDetails: {
752
+ readonly code?: string | null;
753
+ readonly name?: string | null;
754
+ readonly message?: string | null;
755
+ readonly details?: {
756
+ readonly [x: string]: string | number | null;
757
+ } | null;
758
+ readonly retryable?: boolean | null;
759
+ } | null;
560
760
  readonly cost: string;
561
761
  readonly currency: string;
562
762
  readonly idempotencyKey: string | null;
563
- readonly metadata: import("./generated").JsonValue;
564
763
  readonly createdAt: string;
565
764
  readonly updatedAt: string;
566
765
  }[];
567
766
  readonly emailDeliveryDetails: readonly {
568
767
  readonly deliveryId: string;
569
- readonly messageIdHeader: string | null;
768
+ readonly messageIdHeader: string;
570
769
  readonly inReplyTo: string | null;
571
770
  readonly references: readonly string[] | null;
572
771
  readonly subject: string;
@@ -598,7 +797,129 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
598
797
  readonly createdAt: string;
599
798
  readonly updatedAt: string;
600
799
  }[];
601
- }, 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").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("./generated").WebhookEnqueueError, import("./client").Service>;
800
+ }, 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>;
801
+ export declare const validateEmail: (input: {
802
+ readonly conversationId?: string | null | undefined;
803
+ readonly metadata?: {
804
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
805
+ readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
806
+ } | null)[] | {
807
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
808
+ } | null)[] | {
809
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
810
+ } | null)[] | {
811
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
812
+ } | null)[] | {
813
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
814
+ } | null)[] | {
815
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
816
+ } | null)[] | {
817
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
818
+ } | null)[] | {
819
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
820
+ } | null)[] | {
821
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
822
+ } | null)[] | {
823
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
824
+ } | null)[] | {
825
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
826
+ } | null)[] | {
827
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
828
+ } | null | undefined;
829
+ } | null | undefined;
830
+ readonly channel: string;
831
+ readonly to: readonly ({
832
+ readonly contactId: string;
833
+ } | {
834
+ readonly email: string;
835
+ readonly name?: string | null | undefined;
836
+ readonly displayName?: string | null | undefined;
837
+ })[];
838
+ readonly cc?: readonly ({
839
+ readonly contactId: string;
840
+ } | {
841
+ readonly email: string;
842
+ readonly name?: string | null | undefined;
843
+ readonly displayName?: string | null | undefined;
844
+ })[] | null | undefined;
845
+ readonly bcc?: readonly ({
846
+ readonly contactId: string;
847
+ } | {
848
+ readonly email: string;
849
+ readonly name?: string | null | undefined;
850
+ readonly displayName?: string | null | undefined;
851
+ })[] | null | undefined;
852
+ readonly from?: {
853
+ readonly email: string;
854
+ readonly name?: string | null | undefined;
855
+ } | null | undefined;
856
+ readonly email: {
857
+ readonly subject?: string | null | undefined;
858
+ readonly html?: string | null | undefined;
859
+ readonly text?: string | null | undefined;
860
+ readonly attachments?: readonly {
861
+ readonly filename: string;
862
+ readonly content?: string | null | undefined;
863
+ readonly mediaId?: string | null | undefined;
864
+ readonly contentType: string;
865
+ readonly size: number;
866
+ }[] | null | undefined;
867
+ readonly publicationId?: string | undefined;
868
+ readonly inputContractId?: string | undefined;
869
+ readonly templateId?: string | null | undefined;
870
+ readonly templateSlug?: string | null | undefined;
871
+ readonly templateData?: {
872
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
873
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
874
+ } | null)[] | {
875
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
876
+ } | null)[] | {
877
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
878
+ } | null)[] | {
879
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
880
+ } | null)[] | {
881
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
882
+ } | null)[] | {
883
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
884
+ } | null)[] | {
885
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
886
+ } | null)[] | {
887
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
888
+ } | null)[] | {
889
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
890
+ } | null)[] | {
891
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
892
+ } | null)[] | {
893
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
894
+ } | null)[] | {
895
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
896
+ } | null | undefined;
897
+ } | null | undefined;
898
+ readonly inReplyToMessageId?: string | null | undefined;
899
+ readonly replyTo?: readonly string[] | null | undefined;
900
+ readonly unsubscribeGroupId?: string | null | undefined;
901
+ readonly tracking?: {
902
+ readonly opens?: boolean | undefined;
903
+ readonly clicks?: boolean | undefined;
904
+ } | undefined;
905
+ readonly footer?: {
906
+ readonly enabled?: boolean | null | undefined;
907
+ } | undefined;
908
+ };
909
+ }) => import("effect/Effect").Effect<{
910
+ readonly valid: true;
911
+ readonly from: {
912
+ readonly email: string;
913
+ readonly name: string | null;
914
+ };
915
+ readonly recipientCount: number;
916
+ readonly content: {
917
+ readonly source: "inline" | "template";
918
+ readonly subject: string;
919
+ readonly hasHtml: boolean;
920
+ readonly hasText: boolean;
921
+ };
922
+ }, 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>;
602
923
  export declare const get: (input: {
603
924
  readonly id: string;
604
925
  }) => import("effect/Effect").Effect<{
@@ -612,7 +933,33 @@ export declare const get: (input: {
612
933
  } | null;
613
934
  readonly channel: "email";
614
935
  readonly direction: "inbound" | "outbound";
615
- readonly content: import("./generated").JsonValue;
936
+ readonly content: {
937
+ readonly text?: string | null;
938
+ readonly html?: string | null;
939
+ readonly markdown?: string | null;
940
+ readonly email?: {
941
+ readonly subject?: string | null;
942
+ readonly html?: string | null;
943
+ readonly text?: string | null;
944
+ readonly headers?: {
945
+ readonly [x: string]: string;
946
+ } | null;
947
+ readonly tracking?: {
948
+ readonly opens?: boolean;
949
+ readonly clicks?: boolean;
950
+ };
951
+ readonly attachments?: readonly {
952
+ readonly filename: string;
953
+ readonly content?: string | null;
954
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
955
+ readonly contentType: string;
956
+ readonly size: number;
957
+ }[] | null;
958
+ } | null;
959
+ readonly metadata?: {
960
+ readonly [x: string]: import("./generated").JsonValue;
961
+ } | null;
962
+ };
616
963
  readonly metadata: {
617
964
  readonly [x: string]: import("./generated").JsonValue;
618
965
  } | null;
@@ -621,17 +968,28 @@ export declare const get: (input: {
621
968
  readonly tags: readonly string[];
622
969
  readonly categories: readonly string[];
623
970
  readonly isTest: boolean;
624
- readonly isInternal: boolean;
625
- readonly isAutomated: boolean;
626
971
  readonly externalId: string | null;
627
972
  readonly referenceId: string | null;
628
- readonly apiKeyId: string | null;
629
- readonly httpMethod: string | null;
630
- readonly apiRequestMetadata: import("./generated").JsonValue;
631
- readonly apiResponseMetadata: import("./generated").JsonValue;
973
+ readonly submission: {
974
+ readonly origin: "campaign" | "direct" | "scheduled";
975
+ readonly transport: "http" | null;
976
+ readonly credential: {
977
+ readonly kind: "api_key";
978
+ readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
979
+ } | {
980
+ readonly kind: "oauth";
981
+ readonly clientId: string | null;
982
+ } | {
983
+ readonly kind: "session";
984
+ } | null;
985
+ readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
986
+ readonly client: {
987
+ readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
988
+ readonly version: string;
989
+ } | null;
990
+ } | null;
632
991
  readonly createdAt: string;
633
992
  readonly updatedAt: string;
634
- readonly createdBy: string | null;
635
993
  readonly fromContact: {
636
994
  readonly id: string;
637
995
  readonly name: string;
@@ -678,6 +1036,11 @@ export declare const get: (input: {
678
1036
  } | null;
679
1037
  }[];
680
1038
  readonly deliveries: readonly {
1039
+ readonly scheduling: {
1040
+ readonly dueAt: string;
1041
+ readonly expiresAt: string;
1042
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1043
+ } | null;
681
1044
  readonly id: string;
682
1045
  readonly messageId: string;
683
1046
  readonly recipientId: string | null;
@@ -696,17 +1059,24 @@ export declare const get: (input: {
696
1059
  readonly terminalAt: string | null;
697
1060
  readonly errorCode: string | null;
698
1061
  readonly errorMessage: string | null;
699
- readonly errorDetails: import("./generated").JsonValue;
1062
+ readonly errorDetails: {
1063
+ readonly code?: string | null;
1064
+ readonly name?: string | null;
1065
+ readonly message?: string | null;
1066
+ readonly details?: {
1067
+ readonly [x: string]: string | number | null;
1068
+ } | null;
1069
+ readonly retryable?: boolean | null;
1070
+ } | null;
700
1071
  readonly cost: string;
701
1072
  readonly currency: string;
702
1073
  readonly idempotencyKey: string | null;
703
- readonly metadata: import("./generated").JsonValue;
704
1074
  readonly createdAt: string;
705
1075
  readonly updatedAt: string;
706
1076
  }[];
707
1077
  readonly emailDeliveryDetails: readonly {
708
1078
  readonly deliveryId: string;
709
- readonly messageIdHeader: string | null;
1079
+ readonly messageIdHeader: string;
710
1080
  readonly inReplyTo: string | null;
711
1081
  readonly references: readonly string[] | null;
712
1082
  readonly subject: string;
@@ -738,12 +1108,51 @@ export declare const get: (input: {
738
1108
  readonly createdAt: string;
739
1109
  readonly updatedAt: string;
740
1110
  }[];
741
- }, 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>;
1111
+ }, 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>;
742
1112
  export declare const getEmail: (input: {
743
1113
  readonly id: string;
744
1114
  readonly includeS3Urls?: string | null | undefined;
745
1115
  readonly urlExpiresIn?: string | null | undefined;
746
1116
  }) => import("effect/Effect").Effect<{
1117
+ readonly deliveries: readonly {
1118
+ readonly scheduling: {
1119
+ readonly dueAt: string;
1120
+ readonly expiresAt: string;
1121
+ readonly waitReason: "campaign-paused" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1122
+ } | null;
1123
+ readonly id: string;
1124
+ readonly messageId: string;
1125
+ readonly recipientId: string | null;
1126
+ readonly channel: "email";
1127
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
1128
+ readonly attemptCount: number;
1129
+ readonly maxAttempts: number;
1130
+ readonly queuedAt: string | null;
1131
+ readonly claimedAt: string | null;
1132
+ readonly lastAttemptAt: string | null;
1133
+ readonly nextRetryAt: string | null;
1134
+ readonly sentAt: string | null;
1135
+ readonly deliveredAt: string | null;
1136
+ readonly readAt: string | null;
1137
+ readonly failedAt: string | null;
1138
+ readonly terminalAt: string | null;
1139
+ readonly errorCode: string | null;
1140
+ readonly errorMessage: string | null;
1141
+ readonly errorDetails: {
1142
+ readonly code?: string | null;
1143
+ readonly name?: string | null;
1144
+ readonly message?: string | null;
1145
+ readonly details?: {
1146
+ readonly [x: string]: string | number | null;
1147
+ } | null;
1148
+ readonly retryable?: boolean | null;
1149
+ } | null;
1150
+ readonly cost: string;
1151
+ readonly currency: string;
1152
+ readonly idempotencyKey: string | null;
1153
+ readonly createdAt: string;
1154
+ readonly updatedAt: string;
1155
+ }[];
747
1156
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
748
1157
  readonly organizationId: string;
749
1158
  readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
@@ -802,20 +1211,20 @@ export declare const getEmail: (input: {
802
1211
  readonly createdAt: string;
803
1212
  readonly receivedAt: string | null;
804
1213
  readonly processedAt: string | null;
805
- }, 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>;
1214
+ }, 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>;
806
1215
  export declare const remove: (input: {
807
1216
  readonly id: string;
808
1217
  }) => import("effect/Effect").Effect<{
809
1218
  readonly success: boolean;
810
1219
  readonly message: string;
811
- }, 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>;
1220
+ }, 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>;
812
1221
  export declare const getStatus: (input: {
813
1222
  readonly id: string;
814
1223
  }) => import("effect/Effect").Effect<{
815
1224
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
816
1225
  readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
817
1226
  readonly updatedAt: string;
818
- }, 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>;
1227
+ }, 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>;
819
1228
  export declare const getEvents: (input: {
820
1229
  readonly id: string;
821
1230
  }) => import("effect/Effect").Effect<readonly {
@@ -827,4 +1236,4 @@ export declare const getEvents: (input: {
827
1236
  readonly metadata?: {
828
1237
  readonly [x: string]: import("./generated").JsonValue;
829
1238
  } | null;
830
- }[], 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>;
1239
+ }[], 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>;