@unsent/sdk 1.0.3 → 1.0.4

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.
package/dist/index.d.mts CHANGED
@@ -22,30 +22,7 @@ interface paths {
22
22
  * Health Check
23
23
  * @description Check if the API is running correctly
24
24
  */
25
- get: {
26
- parameters: {
27
- query?: never;
28
- header?: never;
29
- path?: never;
30
- cookie?: never;
31
- };
32
- requestBody?: never;
33
- responses: {
34
- /** @description API is healthy */
35
- 200: {
36
- headers: {
37
- [name: string]: unknown;
38
- };
39
- content: {
40
- "application/json": {
41
- status: string;
42
- uptime: number;
43
- timestamp: number;
44
- };
45
- };
46
- };
47
- };
48
- };
25
+ get: operations["getHealth"];
49
26
  put?: never;
50
27
  post?: never;
51
28
  delete?: never;
@@ -61,58 +38,11 @@ interface paths {
61
38
  path?: never;
62
39
  cookie?: never;
63
40
  };
64
- get: {
65
- parameters: {
66
- query?: never;
67
- header?: never;
68
- path?: never;
69
- cookie?: never;
70
- };
71
- requestBody?: never;
72
- responses: {
73
- /** @description List API Keys */
74
- 200: {
75
- headers: {
76
- [name: string]: unknown;
77
- };
78
- content: {
79
- "application/json": unknown[];
80
- };
81
- };
82
- };
83
- };
41
+ /** @description Retrieve a list of API keys for the current team */
42
+ get: operations["getApiKeys"];
84
43
  put?: never;
85
- post: {
86
- parameters: {
87
- query?: never;
88
- header?: never;
89
- path?: never;
90
- cookie?: never;
91
- };
92
- requestBody?: {
93
- content: {
94
- "application/json": {
95
- name: string;
96
- /**
97
- * @default FULL
98
- * @enum {string}
99
- */
100
- permission?: "FULL" | "SENDING";
101
- };
102
- };
103
- };
104
- responses: {
105
- /** @description Create API Key */
106
- 200: {
107
- headers: {
108
- [name: string]: unknown;
109
- };
110
- content: {
111
- "application/json": Record<string, never>;
112
- };
113
- };
114
- };
115
- };
44
+ /** @description Create a new API key for the current team */
45
+ post: operations["createApiKey"];
116
46
  delete?: never;
117
47
  options?: never;
118
48
  head?: never;
@@ -129,28 +59,8 @@ interface paths {
129
59
  get?: never;
130
60
  put?: never;
131
61
  post?: never;
132
- delete: {
133
- parameters: {
134
- query?: never;
135
- header?: never;
136
- path: {
137
- id: string;
138
- };
139
- cookie?: never;
140
- };
141
- requestBody?: never;
142
- responses: {
143
- /** @description Delete API Key */
144
- 200: {
145
- headers: {
146
- [name: string]: unknown;
147
- };
148
- content: {
149
- "application/json": Record<string, never>;
150
- };
151
- };
152
- };
153
- };
62
+ /** @description Delete an API key by ID */
63
+ delete: operations["deleteApiKey"];
154
64
  options?: never;
155
65
  head?: never;
156
66
  patch?: never;
@@ -163,26 +73,8 @@ interface paths {
163
73
  path?: never;
164
74
  cookie?: never;
165
75
  };
166
- get: {
167
- parameters: {
168
- query?: never;
169
- header?: never;
170
- path?: never;
171
- cookie?: never;
172
- };
173
- requestBody?: never;
174
- responses: {
175
- /** @description Get Settings */
176
- 200: {
177
- headers: {
178
- [name: string]: unknown;
179
- };
180
- content: {
181
- "application/json": Record<string, never>;
182
- };
183
- };
184
- };
185
- };
76
+ /** @description Retrieve team settings */
77
+ get: operations["getSettings"];
186
78
  put?: never;
187
79
  post?: never;
188
80
  delete?: never;
@@ -198,26 +90,8 @@ interface paths {
198
90
  path?: never;
199
91
  cookie?: never;
200
92
  };
201
- get: {
202
- parameters: {
203
- query?: never;
204
- header?: never;
205
- path?: never;
206
- cookie?: never;
207
- };
208
- requestBody?: never;
209
- responses: {
210
- /** @description Get Analytics */
211
- 200: {
212
- headers: {
213
- [name: string]: unknown;
214
- };
215
- content: {
216
- "application/json": Record<string, never>;
217
- };
218
- };
219
- };
220
- };
93
+ /** @description Retrieve email analytics */
94
+ get: operations["getAnalytics"];
221
95
  put?: never;
222
96
  post?: never;
223
97
  delete?: never;
@@ -233,29 +107,8 @@ interface paths {
233
107
  path?: never;
234
108
  cookie?: never;
235
109
  };
236
- get: {
237
- parameters: {
238
- query?: {
239
- days?: string;
240
- domain?: string;
241
- };
242
- header?: never;
243
- path?: never;
244
- cookie?: never;
245
- };
246
- requestBody?: never;
247
- responses: {
248
- /** @description Get Email Time Series */
249
- 200: {
250
- headers: {
251
- [name: string]: unknown;
252
- };
253
- content: {
254
- "application/json": Record<string, never>;
255
- };
256
- };
257
- };
258
- };
110
+ /** @description Retrieve analytics data over time */
111
+ get: operations["getTimeSeries"];
259
112
  put?: never;
260
113
  post?: never;
261
114
  delete?: never;
@@ -271,28 +124,8 @@ interface paths {
271
124
  path?: never;
272
125
  cookie?: never;
273
126
  };
274
- get: {
275
- parameters: {
276
- query?: {
277
- domain?: string;
278
- };
279
- header?: never;
280
- path?: never;
281
- cookie?: never;
282
- };
283
- requestBody?: never;
284
- responses: {
285
- /** @description Get Reputation Metrics */
286
- 200: {
287
- headers: {
288
- [name: string]: unknown;
289
- };
290
- content: {
291
- "application/json": Record<string, never>;
292
- };
293
- };
294
- };
295
- };
127
+ /** @description Retrieve sender reputation score */
128
+ get: operations["getReputation"];
296
129
  put?: never;
297
130
  post?: never;
298
131
  delete?: never;
@@ -308,120 +141,11 @@ interface paths {
308
141
  path?: never;
309
142
  cookie?: never;
310
143
  };
311
- get: {
312
- parameters: {
313
- query?: never;
314
- header?: never;
315
- path?: never;
316
- cookie?: never;
317
- };
318
- requestBody?: never;
319
- responses: {
320
- /** @description Retrieve domains accessible by the API key */
321
- 200: {
322
- headers: {
323
- [name: string]: unknown;
324
- };
325
- content: {
326
- "application/json": unknown[];
327
- };
328
- };
329
- };
330
- };
144
+ /** @description Retrieve a list of domains */
145
+ get: operations["getDomains"];
331
146
  put?: never;
332
- post: {
333
- parameters: {
334
- query?: never;
335
- header?: never;
336
- path?: never;
337
- cookie?: never;
338
- };
339
- requestBody: {
340
- content: {
341
- "application/json": {
342
- name: string;
343
- region: string;
344
- };
345
- };
346
- };
347
- responses: {
348
- /** @description Create a new domain */
349
- 200: {
350
- headers: {
351
- [name: string]: unknown;
352
- };
353
- content: {
354
- "application/json": {
355
- /**
356
- * @description The ID of the domain
357
- * @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
358
- */
359
- id: string;
360
- /**
361
- * @description The name of the domain
362
- * @example example.com
363
- */
364
- name: string;
365
- /**
366
- * @description The ID of the team
367
- * @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
368
- */
369
- teamId: string;
370
- /** @description The status of the domain */
371
- status: string;
372
- /**
373
- * @description The region of the domain
374
- * @default us-east-1
375
- * @example us-east-1
376
- */
377
- region: string;
378
- /**
379
- * @description Whether click tracking is enabled
380
- * @default false
381
- * @example false
382
- */
383
- clickTracking: boolean;
384
- /**
385
- * @description Whether open tracking is enabled
386
- * @default false
387
- * @example false
388
- */
389
- openTracking: boolean;
390
- /** @description The public key of the domain */
391
- publicKey: string;
392
- /** @description The DKIM status of the domain */
393
- dkimStatus?: string | null;
394
- /** @description The SPF details of the domain */
395
- spfDetails?: string | null;
396
- /** @description The creation date of the domain */
397
- createdAt: string;
398
- /** @description The last update date of the domain */
399
- updatedAt: string;
400
- /**
401
- * @description Whether DMARC is added
402
- * @default false
403
- */
404
- dmarcAdded: boolean;
405
- /**
406
- * @description Whether the domain is verifying
407
- * @default false
408
- */
409
- isVerifying: boolean;
410
- /** @description The error message of the domain */
411
- errorMessage?: string | null;
412
- /** @description The subdomain of the domain */
413
- subdomain?: string | null;
414
- /** @description The verification error of the domain */
415
- verificationError?: string | null;
416
- /** @description The last checked time of the domain */
417
- lastCheckedTime?: string | null;
418
- /** @description The DNS records of the domain */
419
- dnsRecords: unknown[];
420
- };
421
- };
422
- };
423
- };
424
- };
147
+ /** @description Create a new domain */
148
+ post: operations["createDomain"];
425
149
  delete?: never;
426
150
  options?: never;
427
151
  head?: never;
@@ -436,46 +160,8 @@ interface paths {
436
160
  cookie?: never;
437
161
  };
438
162
  get?: never;
439
- put: {
440
- parameters: {
441
- query?: never;
442
- header?: never;
443
- path: {
444
- id: string;
445
- };
446
- cookie?: never;
447
- };
448
- requestBody?: never;
449
- responses: {
450
- /** @description Verify domain */
451
- 200: {
452
- headers: {
453
- [name: string]: unknown;
454
- };
455
- content: {
456
- "application/json": Record<string, never>;
457
- };
458
- };
459
- /** @description Forbidden - API key doesn't have access to this domain */
460
- 403: {
461
- headers: {
462
- [name: string]: unknown;
463
- };
464
- content: {
465
- "application/json": Record<string, never>;
466
- };
467
- };
468
- /** @description Domain not found */
469
- 404: {
470
- headers: {
471
- [name: string]: unknown;
472
- };
473
- content: {
474
- "application/json": Record<string, never>;
475
- };
476
- };
477
- };
478
- };
163
+ /** @description Trigger domain verification */
164
+ put: operations["verifyDomain"];
479
165
  post?: never;
480
166
  delete?: never;
481
167
  options?: never;
@@ -490,134 +176,12 @@ interface paths {
490
176
  path?: never;
491
177
  cookie?: never;
492
178
  };
493
- get: {
494
- parameters: {
495
- query?: never;
496
- header?: never;
497
- path: {
498
- id: string;
499
- };
500
- cookie?: never;
501
- };
502
- requestBody?: never;
503
- responses: {
504
- /** @description Retrieve the domain */
505
- 200: {
506
- headers: {
507
- [name: string]: unknown;
508
- };
509
- content: {
510
- "application/json": {
511
- /**
512
- * @description The ID of the domain
513
- * @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
514
- */
515
- id: string;
516
- /**
517
- * @description The name of the domain
518
- * @example example.com
519
- */
520
- name: string;
521
- /**
522
- * @description The ID of the team
523
- * @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
524
- */
525
- teamId: string;
526
- /** @description The status of the domain */
527
- status: string;
528
- /**
529
- * @description The region of the domain
530
- * @default us-east-1
531
- * @example us-east-1
532
- */
533
- region: string;
534
- /**
535
- * @description Whether click tracking is enabled
536
- * @default false
537
- * @example false
538
- */
539
- clickTracking: boolean;
540
- /**
541
- * @description Whether open tracking is enabled
542
- * @default false
543
- * @example false
544
- */
545
- openTracking: boolean;
546
- /** @description The public key of the domain */
547
- publicKey: string;
548
- /** @description The DKIM status of the domain */
549
- dkimStatus?: string | null;
550
- /** @description The SPF details of the domain */
551
- spfDetails?: string | null;
552
- /** @description The creation date of the domain */
553
- createdAt: string;
554
- /** @description The last update date of the domain */
555
- updatedAt: string;
556
- /**
557
- * @description Whether DMARC is added
558
- * @default false
559
- */
560
- dmarcAdded: boolean;
561
- /**
562
- * @description Whether the domain is verifying
563
- * @default false
564
- */
565
- isVerifying: boolean;
566
- /** @description The error message of the domain */
567
- errorMessage?: string | null;
568
- /** @description The subdomain of the domain */
569
- subdomain?: string | null;
570
- /** @description The verification error of the domain */
571
- verificationError?: string | null;
572
- /** @description The last checked time of the domain */
573
- lastCheckedTime?: string | null;
574
- /** @description The DNS records of the domain */
575
- dnsRecords: unknown[];
576
- };
577
- };
578
- };
579
- };
580
- };
179
+ /** @description Retrieve domain details by ID */
180
+ get: operations["getDomain"];
581
181
  put?: never;
582
182
  post?: never;
583
- delete: {
584
- parameters: {
585
- query?: never;
586
- header?: never;
587
- path: {
588
- id: string;
589
- };
590
- cookie?: never;
591
- };
592
- requestBody?: never;
593
- responses: {
594
- /** @description Domain deleted successfully */
595
- 200: {
596
- headers: {
597
- [name: string]: unknown;
598
- };
599
- content: {
600
- "application/json": Record<string, never>;
601
- };
602
- };
603
- /** @description Forbidden - API key doesn't have access */
604
- 403: {
605
- headers: {
606
- [name: string]: unknown;
607
- };
608
- content?: never;
609
- };
610
- /** @description Domain not found */
611
- 404: {
612
- headers: {
613
- [name: string]: unknown;
614
- };
615
- content: {
616
- "application/json": Record<string, never>;
617
- };
618
- };
619
- };
620
- };
183
+ /** @description Delete a domain by ID */
184
+ delete: operations["deleteDomain"];
621
185
  options?: never;
622
186
  head?: never;
623
187
  patch?: never;
@@ -630,59 +194,15 @@ interface paths {
630
194
  path?: never;
631
195
  cookie?: never;
632
196
  };
633
- get: {
634
- parameters: {
635
- query?: never;
636
- header?: never;
637
- path: {
638
- emailId: string;
639
- };
640
- cookie?: never;
641
- };
642
- requestBody?: never;
643
- responses: {
644
- /** @description Retrieve the email */
645
- 200: {
646
- headers: {
647
- [name: string]: unknown;
648
- };
649
- content: {
650
- "application/json": Record<string, never>;
651
- };
652
- };
653
- };
654
- };
197
+ /** @description Retrieve email details by ID */
198
+ get: operations["getEmail"];
655
199
  put?: never;
656
200
  post?: never;
657
201
  delete?: never;
658
202
  options?: never;
659
203
  head?: never;
660
- patch: {
661
- parameters: {
662
- query?: never;
663
- header?: never;
664
- path: {
665
- emailId: string;
666
- };
667
- cookie?: never;
668
- };
669
- requestBody: {
670
- content: {
671
- "application/json": Record<string, never>;
672
- };
673
- };
674
- responses: {
675
- /** @description Retrieve the user */
676
- 200: {
677
- headers: {
678
- [name: string]: unknown;
679
- };
680
- content: {
681
- "application/json": Record<string, never>;
682
- };
683
- };
684
- };
685
- };
204
+ /** @description Update a scheduled email */
205
+ patch: operations["updateEmail"];
686
206
  trace?: never;
687
207
  };
688
208
  "/v1/emails": {
@@ -692,32 +212,8 @@ interface paths {
692
212
  path?: never;
693
213
  cookie?: never;
694
214
  };
695
- get: {
696
- parameters: {
697
- query?: {
698
- page?: string;
699
- limit?: string;
700
- startDate?: string;
701
- endDate?: string;
702
- domainId?: string | string[];
703
- };
704
- header?: never;
705
- path?: never;
706
- cookie?: never;
707
- };
708
- requestBody?: never;
709
- responses: {
710
- /** @description Retrieve a list of emails */
711
- 200: {
712
- headers: {
713
- [name: string]: unknown;
714
- };
715
- content: {
716
- "application/json": Record<string, never>;
717
- };
718
- };
719
- };
720
- };
215
+ /** @description Retrieve a list of sent emails */
216
+ get: operations["listEmails"];
721
217
  put?: never;
722
218
  /** @description Send an email.
723
219
  *
@@ -729,62 +225,7 @@ interface paths {
729
225
  * - Use the `variables` object to replace placeholders in the template (e.g. `{{name}}`).
730
226
  * - The `templateId` must belong to your team.
731
227
  * */
732
- post: {
733
- parameters: {
734
- query?: never;
735
- header?: {
736
- /** @description Pass the optional Idempotency-Key header to make the request safe to retry. The key can be up to 256 characters. The server stores the canonical request body and behaves as follows:
737
- *
738
- * - Same key + same request body → returns the original emailId with 200 OK without re-sending.
739
- * - Same key + different request body → returns 409 Conflict with code: NOT_UNIQUE so you can detect the mismatch.
740
- * - Same key while another request is still being processed → returns 409 Conflict; retry after a short delay or once the first request completes.
741
- *
742
- * Entries expire after 24 hours. Use a unique key per logical send (for example, an order or signup ID). */
743
- "Idempotency-Key"?: string;
744
- };
745
- path?: never;
746
- cookie?: never;
747
- };
748
- requestBody: {
749
- content: {
750
- "application/json": {
751
- to: string | string[];
752
- from: string;
753
- /** @description Optional when templateId is provided */
754
- subject?: string;
755
- /** @description ID of a template from the dashboard */
756
- templateId?: string;
757
- variables?: {
758
- [key: string]: string;
759
- };
760
- replyTo?: string | string[];
761
- cc?: string | string[];
762
- bcc?: string | string[];
763
- text?: string | null;
764
- html?: string | null;
765
- /** @description Custom headers to included with the emails */
766
- headers?: {
767
- [key: string]: string;
768
- };
769
- attachments?: unknown[];
770
- /** Format: date-time */
771
- scheduledAt?: string;
772
- inReplyToId?: string | null;
773
- };
774
- };
775
- };
776
- responses: {
777
- /** @description Retrieve the user */
778
- 200: {
779
- headers: {
780
- [name: string]: unknown;
781
- };
782
- content: {
783
- "application/json": Record<string, never>;
784
- };
785
- };
786
- };
787
- };
228
+ post: operations["sendEmail"];
788
229
  delete?: never;
789
230
  options?: never;
790
231
  head?: never;
@@ -798,29 +239,8 @@ interface paths {
798
239
  path?: never;
799
240
  cookie?: never;
800
241
  };
801
- get: {
802
- parameters: {
803
- query?: {
804
- page?: number;
805
- limit?: number;
806
- };
807
- header?: never;
808
- path?: never;
809
- cookie?: never;
810
- };
811
- requestBody?: never;
812
- responses: {
813
- /** @description List bounced emails */
814
- 200: {
815
- headers: {
816
- [name: string]: unknown;
817
- };
818
- content: {
819
- "application/json": Record<string, never>;
820
- };
821
- };
822
- };
823
- };
242
+ /** @description Retrieve list of bounced emails */
243
+ get: operations["getBounces"];
824
244
  put?: never;
825
245
  post?: never;
826
246
  delete?: never;
@@ -836,29 +256,8 @@ interface paths {
836
256
  path?: never;
837
257
  cookie?: never;
838
258
  };
839
- get: {
840
- parameters: {
841
- query?: {
842
- page?: number;
843
- limit?: number;
844
- };
845
- header?: never;
846
- path?: never;
847
- cookie?: never;
848
- };
849
- requestBody?: never;
850
- responses: {
851
- /** @description List email complaints */
852
- 200: {
853
- headers: {
854
- [name: string]: unknown;
855
- };
856
- content: {
857
- "application/json": Record<string, never>;
858
- };
859
- };
860
- };
861
- };
259
+ /** @description Retrieve list of spam complaints */
260
+ get: operations["getComplaints"];
862
261
  put?: never;
863
262
  post?: never;
864
263
  delete?: never;
@@ -874,29 +273,8 @@ interface paths {
874
273
  path?: never;
875
274
  cookie?: never;
876
275
  };
877
- get: {
878
- parameters: {
879
- query?: {
880
- page?: number;
881
- limit?: number;
882
- };
883
- header?: never;
884
- path?: never;
885
- cookie?: never;
886
- };
887
- requestBody?: never;
888
- responses: {
889
- /** @description List unsubscribed emails (contacts) */
890
- 200: {
891
- headers: {
892
- [name: string]: unknown;
893
- };
894
- content: {
895
- "application/json": Record<string, never>;
896
- };
897
- };
898
- };
899
- };
276
+ /** @description Retrieve list of unsubscribed emails */
277
+ get: operations["getUnsubscribes"];
900
278
  put?: never;
901
279
  post?: never;
902
280
  delete?: never;
@@ -914,30 +292,8 @@ interface paths {
914
292
  };
915
293
  get?: never;
916
294
  put?: never;
917
- post: {
918
- parameters: {
919
- query?: never;
920
- header?: never;
921
- path?: never;
922
- cookie?: never;
923
- };
924
- requestBody: {
925
- content: {
926
- "application/json": unknown[];
927
- };
928
- };
929
- responses: {
930
- /** @description List of successfully created email IDs */
931
- 200: {
932
- headers: {
933
- [name: string]: unknown;
934
- };
935
- content: {
936
- "application/json": Record<string, never>;
937
- };
938
- };
939
- };
940
- };
295
+ /** @description Send multiple emails in a single batch */
296
+ post: operations["sendBatchEmails"];
941
297
  delete?: never;
942
298
  options?: never;
943
299
  head?: never;
@@ -953,28 +309,8 @@ interface paths {
953
309
  };
954
310
  get?: never;
955
311
  put?: never;
956
- post: {
957
- parameters: {
958
- query?: never;
959
- header?: never;
960
- path: {
961
- emailId: string;
962
- };
963
- cookie?: never;
964
- };
965
- requestBody?: never;
966
- responses: {
967
- /** @description Retrieve the user */
968
- 200: {
969
- headers: {
970
- [name: string]: unknown;
971
- };
972
- content: {
973
- "application/json": Record<string, never>;
974
- };
975
- };
976
- };
977
- };
312
+ /** @description Cancel a scheduled email */
313
+ post: operations["cancelScheduledEmail"];
978
314
  delete?: never;
979
315
  options?: never;
980
316
  head?: never;
@@ -988,70 +324,11 @@ interface paths {
988
324
  path?: never;
989
325
  cookie?: never;
990
326
  };
991
- get: {
992
- parameters: {
993
- query?: {
994
- emails?: string;
995
- page?: number;
996
- limit?: number;
997
- ids?: string;
998
- };
999
- header?: never;
1000
- path: {
1001
- contactBookId: string;
1002
- };
1003
- cookie?: never;
1004
- };
1005
- requestBody?: never;
1006
- responses: {
1007
- /** @description Retrieve multiple contacts */
1008
- 200: {
1009
- headers: {
1010
- [name: string]: unknown;
1011
- };
1012
- content: {
1013
- "application/json": unknown[];
1014
- };
1015
- };
1016
- };
1017
- };
327
+ /** @description Retrieve a list of contacts from a contact book */
328
+ get: operations["getContacts"];
1018
329
  put?: never;
1019
- post: {
1020
- parameters: {
1021
- query?: never;
1022
- header?: never;
1023
- path: {
1024
- contactBookId: string;
1025
- };
1026
- cookie?: never;
1027
- };
1028
- requestBody: {
1029
- content: {
1030
- "application/json": {
1031
- email: string;
1032
- firstName?: string;
1033
- lastName?: string;
1034
- properties?: {
1035
- [key: string]: string;
1036
- };
1037
- subscribed?: boolean;
1038
- };
1039
- };
1040
- };
1041
- responses: {
1042
- /** @description Retrieve the user */
1043
- 200: {
1044
- headers: {
1045
- [name: string]: unknown;
1046
- };
1047
- content: {
1048
- "application/json": {
1049
- contactId?: string;
1050
- };
1051
- };
1052
- };
1053
- };
1054
- };
330
+ /** @description Create a new contact in a contact book */
331
+ post: operations["createContact"];
1055
332
  delete?: never;
1056
333
  options?: never;
1057
334
  head?: never;
@@ -1065,888 +342,1934 @@ interface paths {
1065
342
  path?: never;
1066
343
  cookie?: never;
1067
344
  };
1068
- get: {
1069
- parameters: {
1070
- query?: never;
1071
- header?: never;
1072
- path: {
1073
- contactBookId: string;
1074
- contactId: string;
1075
- };
1076
- cookie?: never;
1077
- };
1078
- requestBody?: never;
1079
- responses: {
1080
- /** @description Retrieve the contact */
1081
- 200: {
1082
- headers: {
1083
- [name: string]: unknown;
1084
- };
1085
- content: {
1086
- "application/json": Record<string, never>;
1087
- };
1088
- };
1089
- };
1090
- };
1091
- put: {
1092
- parameters: {
1093
- query?: never;
1094
- header?: never;
1095
- path: {
1096
- contactBookId: string;
1097
- };
1098
- cookie?: never;
1099
- };
1100
- requestBody: {
1101
- content: {
1102
- "application/json": Record<string, never>;
1103
- };
1104
- };
1105
- responses: {
1106
- /** @description Contact upserted successfully */
1107
- 200: {
1108
- headers: {
1109
- [name: string]: unknown;
1110
- };
1111
- content: {
1112
- "application/json": Record<string, never>;
1113
- };
345
+ /** @description Retrieve contact details by ID */
346
+ get: operations["getContact"];
347
+ /** @description Create or update a contact */
348
+ put: operations["upsertContact"];
349
+ post?: never;
350
+ /** @description Delete a contact by ID */
351
+ delete: operations["deleteContact"];
352
+ options?: never;
353
+ head?: never;
354
+ /** @description Update contact details */
355
+ patch: operations["updateContact"];
356
+ trace?: never;
357
+ };
358
+ "/v1/campaigns": {
359
+ parameters: {
360
+ query?: never;
361
+ header?: never;
362
+ path?: never;
363
+ cookie?: never;
364
+ };
365
+ /** @description Retrieve a list of campaigns */
366
+ get: operations["getCampaigns"];
367
+ put?: never;
368
+ /** @description Create a new campaign */
369
+ post: operations["createCampaign"];
370
+ delete?: never;
371
+ options?: never;
372
+ head?: never;
373
+ patch?: never;
374
+ trace?: never;
375
+ };
376
+ "/v1/campaigns/{campaignId}": {
377
+ parameters: {
378
+ query?: never;
379
+ header?: never;
380
+ path?: never;
381
+ cookie?: never;
382
+ };
383
+ /** @description Retrieve campaign details by ID */
384
+ get: operations["getCampaign"];
385
+ put?: never;
386
+ post?: never;
387
+ delete?: never;
388
+ options?: never;
389
+ head?: never;
390
+ patch?: never;
391
+ trace?: never;
392
+ };
393
+ "/v1/campaigns/{campaignId}/schedule": {
394
+ parameters: {
395
+ query?: never;
396
+ header?: never;
397
+ path?: never;
398
+ cookie?: never;
399
+ };
400
+ get?: never;
401
+ put?: never;
402
+ /** @description Schedule a campaign for sending */
403
+ post: operations["scheduleCampaign"];
404
+ delete?: never;
405
+ options?: never;
406
+ head?: never;
407
+ patch?: never;
408
+ trace?: never;
409
+ };
410
+ "/v1/campaigns/{campaignId}/pause": {
411
+ parameters: {
412
+ query?: never;
413
+ header?: never;
414
+ path?: never;
415
+ cookie?: never;
416
+ };
417
+ get?: never;
418
+ put?: never;
419
+ /** @description Pause a running campaign */
420
+ post: operations["pauseCampaign"];
421
+ delete?: never;
422
+ options?: never;
423
+ head?: never;
424
+ patch?: never;
425
+ trace?: never;
426
+ };
427
+ "/v1/campaigns/{campaignId}/resume": {
428
+ parameters: {
429
+ query?: never;
430
+ header?: never;
431
+ path?: never;
432
+ cookie?: never;
433
+ };
434
+ get?: never;
435
+ put?: never;
436
+ /** @description Resume a paused campaign */
437
+ post: operations["resumeCampaign"];
438
+ delete?: never;
439
+ options?: never;
440
+ head?: never;
441
+ patch?: never;
442
+ trace?: never;
443
+ };
444
+ "/v1/contactBooks": {
445
+ parameters: {
446
+ query?: never;
447
+ header?: never;
448
+ path?: never;
449
+ cookie?: never;
450
+ };
451
+ /** @description Retrieve a list of contact books */
452
+ get: operations["getContactBooks"];
453
+ put?: never;
454
+ /** @description Create a new contact book */
455
+ post: operations["createContactBook"];
456
+ delete?: never;
457
+ options?: never;
458
+ head?: never;
459
+ patch?: never;
460
+ trace?: never;
461
+ };
462
+ "/v1/contactBooks/{id}": {
463
+ parameters: {
464
+ query?: never;
465
+ header?: never;
466
+ path?: never;
467
+ cookie?: never;
468
+ };
469
+ /** @description Retrieve contact book details by ID */
470
+ get: operations["getContactBook"];
471
+ put?: never;
472
+ post?: never;
473
+ /** @description Delete a contact book by ID */
474
+ delete: operations["deleteContactBook"];
475
+ options?: never;
476
+ head?: never;
477
+ /** @description Update a contact book */
478
+ patch: operations["updateContactBook"];
479
+ trace?: never;
480
+ };
481
+ "/v1/templates": {
482
+ parameters: {
483
+ query?: never;
484
+ header?: never;
485
+ path?: never;
486
+ cookie?: never;
487
+ };
488
+ /** @description Retrieve a list of templates */
489
+ get: operations["getTemplates"];
490
+ put?: never;
491
+ /** @description Create a new email template */
492
+ post: operations["createTemplate"];
493
+ delete?: never;
494
+ options?: never;
495
+ head?: never;
496
+ patch?: never;
497
+ trace?: never;
498
+ };
499
+ "/v1/templates/{id}": {
500
+ parameters: {
501
+ query?: never;
502
+ header?: never;
503
+ path?: never;
504
+ cookie?: never;
505
+ };
506
+ /** @description Retrieve template details by ID */
507
+ get: operations["getTemplate"];
508
+ put?: never;
509
+ post?: never;
510
+ /** @description Delete a template by ID */
511
+ delete: operations["deleteTemplate"];
512
+ options?: never;
513
+ head?: never;
514
+ /** @description Update a template */
515
+ patch: operations["updateTemplate"];
516
+ trace?: never;
517
+ };
518
+ "/v1/suppressions": {
519
+ parameters: {
520
+ query?: never;
521
+ header?: never;
522
+ path?: never;
523
+ cookie?: never;
524
+ };
525
+ /** @description Retrieve a list of suppressed emails */
526
+ get: operations["getSuppressions"];
527
+ put?: never;
528
+ /** @description Add an email to the suppression list */
529
+ post: operations["addSuppression"];
530
+ delete?: never;
531
+ options?: never;
532
+ head?: never;
533
+ patch?: never;
534
+ trace?: never;
535
+ };
536
+ "/v1/suppressions/email/{email}": {
537
+ parameters: {
538
+ query?: never;
539
+ header?: never;
540
+ path?: never;
541
+ cookie?: never;
542
+ };
543
+ get?: never;
544
+ put?: never;
545
+ post?: never;
546
+ /** @description Remove an email from the suppression list */
547
+ delete: operations["deleteSuppression"];
548
+ options?: never;
549
+ head?: never;
550
+ patch?: never;
551
+ trace?: never;
552
+ };
553
+ }
554
+ interface operations {
555
+ getHealth: {
556
+ parameters: {
557
+ query?: never;
558
+ header?: never;
559
+ path?: never;
560
+ cookie?: never;
561
+ };
562
+ requestBody?: never;
563
+ responses: {
564
+ /** @description API is healthy */
565
+ 200: {
566
+ headers: {
567
+ [name: string]: unknown;
568
+ };
569
+ content: {
570
+ "application/json": {
571
+ status: string;
572
+ uptime: number;
573
+ timestamp: number;
574
+ };
575
+ };
576
+ };
577
+ };
578
+ };
579
+ getApiKeys: {
580
+ parameters: {
581
+ query?: never;
582
+ header?: never;
583
+ path?: never;
584
+ cookie?: never;
585
+ };
586
+ requestBody?: never;
587
+ responses: {
588
+ /** @description List API Keys */
589
+ 200: {
590
+ headers: {
591
+ [name: string]: unknown;
592
+ };
593
+ content: {
594
+ "application/json": {
595
+ id: string;
596
+ name: string;
597
+ partialToken: string;
598
+ lastUsed?: string | null;
599
+ createdAt: string;
600
+ permission: string;
601
+ }[];
602
+ };
603
+ };
604
+ };
605
+ };
606
+ createApiKey: {
607
+ parameters: {
608
+ query?: never;
609
+ header?: never;
610
+ path?: never;
611
+ cookie?: never;
612
+ };
613
+ requestBody?: {
614
+ content: {
615
+ "application/json": {
616
+ name: string;
617
+ /**
618
+ * @default FULL
619
+ * @enum {string}
620
+ */
621
+ permission?: "FULL" | "SENDING";
622
+ };
623
+ };
624
+ };
625
+ responses: {
626
+ /** @description Create API Key */
627
+ 200: {
628
+ headers: {
629
+ [name: string]: unknown;
630
+ };
631
+ content: {
632
+ "application/json": Record<string, never>;
633
+ };
634
+ };
635
+ };
636
+ };
637
+ deleteApiKey: {
638
+ parameters: {
639
+ query?: never;
640
+ header?: never;
641
+ path: {
642
+ id: string;
643
+ };
644
+ cookie?: never;
645
+ };
646
+ requestBody?: never;
647
+ responses: {
648
+ /** @description Delete API Key */
649
+ 200: {
650
+ headers: {
651
+ [name: string]: unknown;
652
+ };
653
+ content: {
654
+ "application/json": Record<string, never>;
655
+ };
656
+ };
657
+ };
658
+ };
659
+ getSettings: {
660
+ parameters: {
661
+ query?: never;
662
+ header?: never;
663
+ path?: never;
664
+ cookie?: never;
665
+ };
666
+ requestBody?: never;
667
+ responses: {
668
+ /** @description Get Settings */
669
+ 200: {
670
+ headers: {
671
+ [name: string]: unknown;
672
+ };
673
+ content: {
674
+ "application/json": Record<string, never>;
675
+ };
676
+ };
677
+ };
678
+ };
679
+ getAnalytics: {
680
+ parameters: {
681
+ query?: never;
682
+ header?: never;
683
+ path?: never;
684
+ cookie?: never;
685
+ };
686
+ requestBody?: never;
687
+ responses: {
688
+ /** @description Get Analytics */
689
+ 200: {
690
+ headers: {
691
+ [name: string]: unknown;
692
+ };
693
+ content: {
694
+ "application/json": Record<string, never>;
695
+ };
696
+ };
697
+ };
698
+ };
699
+ getTimeSeries: {
700
+ parameters: {
701
+ query?: {
702
+ days?: string;
703
+ domain?: string;
704
+ };
705
+ header?: never;
706
+ path?: never;
707
+ cookie?: never;
708
+ };
709
+ requestBody?: never;
710
+ responses: {
711
+ /** @description Get Email Time Series */
712
+ 200: {
713
+ headers: {
714
+ [name: string]: unknown;
715
+ };
716
+ content: {
717
+ "application/json": Record<string, never>;
718
+ };
719
+ };
720
+ };
721
+ };
722
+ getReputation: {
723
+ parameters: {
724
+ query?: {
725
+ domain?: string;
726
+ };
727
+ header?: never;
728
+ path?: never;
729
+ cookie?: never;
730
+ };
731
+ requestBody?: never;
732
+ responses: {
733
+ /** @description Get Reputation Metrics */
734
+ 200: {
735
+ headers: {
736
+ [name: string]: unknown;
737
+ };
738
+ content: {
739
+ "application/json": Record<string, never>;
740
+ };
741
+ };
742
+ };
743
+ };
744
+ getDomains: {
745
+ parameters: {
746
+ query?: never;
747
+ header?: never;
748
+ path?: never;
749
+ cookie?: never;
750
+ };
751
+ requestBody?: never;
752
+ responses: {
753
+ /** @description Retrieve domains accessible by the API key */
754
+ 200: {
755
+ headers: {
756
+ [name: string]: unknown;
757
+ };
758
+ content: {
759
+ "application/json": {
760
+ /**
761
+ * @description The ID of the domain
762
+ * @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
763
+ */
764
+ id: string;
765
+ /**
766
+ * @description The name of the domain
767
+ * @example example.com
768
+ */
769
+ name: string;
770
+ /**
771
+ * @description The ID of the team
772
+ * @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
773
+ */
774
+ teamId: string;
775
+ /** @description The status of the domain */
776
+ status: string;
777
+ /**
778
+ * @description The region of the domain
779
+ * @default us-east-1
780
+ * @example us-east-1
781
+ */
782
+ region: string;
783
+ /**
784
+ * @description Whether click tracking is enabled
785
+ * @default false
786
+ * @example false
787
+ */
788
+ clickTracking: boolean;
789
+ /**
790
+ * @description Whether open tracking is enabled
791
+ * @default false
792
+ * @example false
793
+ */
794
+ openTracking: boolean;
795
+ /** @description The public key of the domain */
796
+ publicKey: string;
797
+ /** @description The DKIM status of the domain */
798
+ dkimStatus?: string | null;
799
+ /** @description The SPF details of the domain */
800
+ spfDetails?: string | null;
801
+ /** @description The creation date of the domain */
802
+ createdAt: string;
803
+ /** @description The last update date of the domain */
804
+ updatedAt: string;
805
+ /**
806
+ * @description Whether DMARC is added
807
+ * @default false
808
+ */
809
+ dmarcAdded: boolean;
810
+ /**
811
+ * @description Whether the domain is verifying
812
+ * @default false
813
+ */
814
+ isVerifying: boolean;
815
+ /** @description The error message of the domain */
816
+ errorMessage?: string | null;
817
+ /** @description The subdomain of the domain */
818
+ subdomain?: string | null;
819
+ /** @description The verification error of the domain */
820
+ verificationError?: string | null;
821
+ /** @description The last checked time of the domain */
822
+ lastCheckedTime?: string | null;
823
+ /** @description The DNS records of the domain */
824
+ dnsRecords: {
825
+ /**
826
+ * @description DNS record type
827
+ * @example TXT
828
+ * @enum {string}
829
+ */
830
+ type: "MX" | "TXT";
831
+ /**
832
+ * @description DNS record name
833
+ * @example mail
834
+ */
835
+ name: string;
836
+ /**
837
+ * @description DNS record value
838
+ * @example v=spf1 include:amazonses.com ~all
839
+ */
840
+ value: string;
841
+ /**
842
+ * @description DNS record TTL
843
+ * @example Auto
844
+ */
845
+ ttl: string;
846
+ /**
847
+ * @description DNS record priority
848
+ * @example 10
849
+ */
850
+ priority?: string | null;
851
+ /** @description The status of the domain */
852
+ status: string;
853
+ /** @description Whether the record is recommended */
854
+ recommended?: boolean;
855
+ }[];
856
+ }[];
857
+ };
858
+ };
859
+ };
860
+ };
861
+ createDomain: {
862
+ parameters: {
863
+ query?: never;
864
+ header?: never;
865
+ path?: never;
866
+ cookie?: never;
867
+ };
868
+ requestBody: {
869
+ content: {
870
+ "application/json": {
871
+ name: string;
872
+ region: string;
873
+ };
874
+ };
875
+ };
876
+ responses: {
877
+ /** @description Create a new domain */
878
+ 200: {
879
+ headers: {
880
+ [name: string]: unknown;
881
+ };
882
+ content: {
883
+ "application/json": {
884
+ /**
885
+ * @description The ID of the domain
886
+ * @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
887
+ */
888
+ id: string;
889
+ /**
890
+ * @description The name of the domain
891
+ * @example example.com
892
+ */
893
+ name: string;
894
+ /**
895
+ * @description The ID of the team
896
+ * @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
897
+ */
898
+ teamId: string;
899
+ /** @description The status of the domain */
900
+ status: string;
901
+ /**
902
+ * @description The region of the domain
903
+ * @default us-east-1
904
+ * @example us-east-1
905
+ */
906
+ region: string;
907
+ /**
908
+ * @description Whether click tracking is enabled
909
+ * @default false
910
+ * @example false
911
+ */
912
+ clickTracking: boolean;
913
+ /**
914
+ * @description Whether open tracking is enabled
915
+ * @default false
916
+ * @example false
917
+ */
918
+ openTracking: boolean;
919
+ /** @description The public key of the domain */
920
+ publicKey: string;
921
+ /** @description The DKIM status of the domain */
922
+ dkimStatus?: string | null;
923
+ /** @description The SPF details of the domain */
924
+ spfDetails?: string | null;
925
+ /** @description The creation date of the domain */
926
+ createdAt: string;
927
+ /** @description The last update date of the domain */
928
+ updatedAt: string;
929
+ /**
930
+ * @description Whether DMARC is added
931
+ * @default false
932
+ */
933
+ dmarcAdded: boolean;
934
+ /**
935
+ * @description Whether the domain is verifying
936
+ * @default false
937
+ */
938
+ isVerifying: boolean;
939
+ /** @description The error message of the domain */
940
+ errorMessage?: string | null;
941
+ /** @description The subdomain of the domain */
942
+ subdomain?: string | null;
943
+ /** @description The verification error of the domain */
944
+ verificationError?: string | null;
945
+ /** @description The last checked time of the domain */
946
+ lastCheckedTime?: string | null;
947
+ /** @description The DNS records of the domain */
948
+ dnsRecords: {
949
+ /**
950
+ * @description DNS record type
951
+ * @example TXT
952
+ * @enum {string}
953
+ */
954
+ type: "MX" | "TXT";
955
+ /**
956
+ * @description DNS record name
957
+ * @example mail
958
+ */
959
+ name: string;
960
+ /**
961
+ * @description DNS record value
962
+ * @example v=spf1 include:amazonses.com ~all
963
+ */
964
+ value: string;
965
+ /**
966
+ * @description DNS record TTL
967
+ * @example Auto
968
+ */
969
+ ttl: string;
970
+ /**
971
+ * @description DNS record priority
972
+ * @example 10
973
+ */
974
+ priority?: string | null;
975
+ /** @description The status of the domain */
976
+ status: string;
977
+ /** @description Whether the record is recommended */
978
+ recommended?: boolean;
979
+ }[];
980
+ };
981
+ };
982
+ };
983
+ };
984
+ };
985
+ verifyDomain: {
986
+ parameters: {
987
+ query?: never;
988
+ header?: never;
989
+ path: {
990
+ id: string;
991
+ };
992
+ cookie?: never;
993
+ };
994
+ requestBody?: never;
995
+ responses: {
996
+ /** @description Verify domain */
997
+ 200: {
998
+ headers: {
999
+ [name: string]: unknown;
1000
+ };
1001
+ content: {
1002
+ "application/json": Record<string, never>;
1003
+ };
1004
+ };
1005
+ /** @description Forbidden - API key doesn't have access to this domain */
1006
+ 403: {
1007
+ headers: {
1008
+ [name: string]: unknown;
1009
+ };
1010
+ content: {
1011
+ "application/json": Record<string, never>;
1012
+ };
1013
+ };
1014
+ /** @description Domain not found */
1015
+ 404: {
1016
+ headers: {
1017
+ [name: string]: unknown;
1018
+ };
1019
+ content: {
1020
+ "application/json": Record<string, never>;
1021
+ };
1022
+ };
1023
+ };
1024
+ };
1025
+ getDomain: {
1026
+ parameters: {
1027
+ query?: never;
1028
+ header?: never;
1029
+ path: {
1030
+ id: string;
1031
+ };
1032
+ cookie?: never;
1033
+ };
1034
+ requestBody?: never;
1035
+ responses: {
1036
+ /** @description Retrieve the domain */
1037
+ 200: {
1038
+ headers: {
1039
+ [name: string]: unknown;
1040
+ };
1041
+ content: {
1042
+ "application/json": {
1043
+ /**
1044
+ * @description The ID of the domain
1045
+ * @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
1046
+ */
1047
+ id: string;
1048
+ /**
1049
+ * @description The name of the domain
1050
+ * @example example.com
1051
+ */
1052
+ name: string;
1053
+ /**
1054
+ * @description The ID of the team
1055
+ * @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
1056
+ */
1057
+ teamId: string;
1058
+ /** @description The status of the domain */
1059
+ status: string;
1060
+ /**
1061
+ * @description The region of the domain
1062
+ * @default us-east-1
1063
+ * @example us-east-1
1064
+ */
1065
+ region: string;
1066
+ /**
1067
+ * @description Whether click tracking is enabled
1068
+ * @default false
1069
+ * @example false
1070
+ */
1071
+ clickTracking: boolean;
1072
+ /**
1073
+ * @description Whether open tracking is enabled
1074
+ * @default false
1075
+ * @example false
1076
+ */
1077
+ openTracking: boolean;
1078
+ /** @description The public key of the domain */
1079
+ publicKey: string;
1080
+ /** @description The DKIM status of the domain */
1081
+ dkimStatus?: string | null;
1082
+ /** @description The SPF details of the domain */
1083
+ spfDetails?: string | null;
1084
+ /** @description The creation date of the domain */
1085
+ createdAt: string;
1086
+ /** @description The last update date of the domain */
1087
+ updatedAt: string;
1088
+ /**
1089
+ * @description Whether DMARC is added
1090
+ * @default false
1091
+ */
1092
+ dmarcAdded: boolean;
1093
+ /**
1094
+ * @description Whether the domain is verifying
1095
+ * @default false
1096
+ */
1097
+ isVerifying: boolean;
1098
+ /** @description The error message of the domain */
1099
+ errorMessage?: string | null;
1100
+ /** @description The subdomain of the domain */
1101
+ subdomain?: string | null;
1102
+ /** @description The verification error of the domain */
1103
+ verificationError?: string | null;
1104
+ /** @description The last checked time of the domain */
1105
+ lastCheckedTime?: string | null;
1106
+ /** @description The DNS records of the domain */
1107
+ dnsRecords: {
1108
+ /**
1109
+ * @description DNS record type
1110
+ * @example TXT
1111
+ * @enum {string}
1112
+ */
1113
+ type: "MX" | "TXT";
1114
+ /**
1115
+ * @description DNS record name
1116
+ * @example mail
1117
+ */
1118
+ name: string;
1119
+ /**
1120
+ * @description DNS record value
1121
+ * @example v=spf1 include:amazonses.com ~all
1122
+ */
1123
+ value: string;
1124
+ /**
1125
+ * @description DNS record TTL
1126
+ * @example Auto
1127
+ */
1128
+ ttl: string;
1129
+ /**
1130
+ * @description DNS record priority
1131
+ * @example 10
1132
+ */
1133
+ priority?: string | null;
1134
+ /** @description The status of the domain */
1135
+ status: string;
1136
+ /** @description Whether the record is recommended */
1137
+ recommended?: boolean;
1138
+ }[];
1139
+ };
1140
+ };
1141
+ };
1142
+ };
1143
+ };
1144
+ deleteDomain: {
1145
+ parameters: {
1146
+ query?: never;
1147
+ header?: never;
1148
+ path: {
1149
+ id: string;
1150
+ };
1151
+ cookie?: never;
1152
+ };
1153
+ requestBody?: never;
1154
+ responses: {
1155
+ /** @description Domain deleted successfully */
1156
+ 200: {
1157
+ headers: {
1158
+ [name: string]: unknown;
1159
+ };
1160
+ content: {
1161
+ "application/json": Record<string, never>;
1162
+ };
1163
+ };
1164
+ /** @description Forbidden - API key doesn't have access */
1165
+ 403: {
1166
+ headers: {
1167
+ [name: string]: unknown;
1168
+ };
1169
+ content: {
1170
+ "application/json": Record<string, never>;
1171
+ };
1172
+ };
1173
+ /** @description Domain not found */
1174
+ 404: {
1175
+ headers: {
1176
+ [name: string]: unknown;
1177
+ };
1178
+ content: {
1179
+ "application/json": Record<string, never>;
1180
+ };
1181
+ };
1182
+ };
1183
+ };
1184
+ getEmail: {
1185
+ parameters: {
1186
+ query?: never;
1187
+ header?: never;
1188
+ path: {
1189
+ emailId: string;
1190
+ };
1191
+ cookie?: never;
1192
+ };
1193
+ requestBody?: never;
1194
+ responses: {
1195
+ /** @description Retrieve the email */
1196
+ 200: {
1197
+ headers: {
1198
+ [name: string]: unknown;
1199
+ };
1200
+ content: {
1201
+ "application/json": Record<string, never>;
1202
+ };
1203
+ };
1204
+ };
1205
+ };
1206
+ updateEmail: {
1207
+ parameters: {
1208
+ query?: never;
1209
+ header?: never;
1210
+ path: {
1211
+ emailId: string;
1212
+ };
1213
+ cookie?: never;
1214
+ };
1215
+ requestBody: {
1216
+ content: {
1217
+ "application/json": Record<string, never>;
1218
+ };
1219
+ };
1220
+ responses: {
1221
+ /** @description Retrieve the user */
1222
+ 200: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "application/json": Record<string, never>;
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ listEmails: {
1233
+ parameters: {
1234
+ query?: {
1235
+ page?: string;
1236
+ limit?: string;
1237
+ startDate?: string;
1238
+ endDate?: string;
1239
+ domainId?: string | string[];
1240
+ };
1241
+ header?: never;
1242
+ path?: never;
1243
+ cookie?: never;
1244
+ };
1245
+ requestBody?: never;
1246
+ responses: {
1247
+ /** @description Retrieve a list of emails */
1248
+ 200: {
1249
+ headers: {
1250
+ [name: string]: unknown;
1251
+ };
1252
+ content: {
1253
+ "application/json": Record<string, never>;
1254
+ };
1255
+ };
1256
+ };
1257
+ };
1258
+ sendEmail: {
1259
+ parameters: {
1260
+ query?: never;
1261
+ header?: {
1262
+ /** @description Pass the optional Idempotency-Key header to make the request safe to retry. The key can be up to 256 characters. The server stores the canonical request body and behaves as follows:
1263
+ *
1264
+ * - Same key + same request body → returns the original emailId with 200 OK without re-sending.
1265
+ * - Same key + different request body → returns 409 Conflict with code: NOT_UNIQUE so you can detect the mismatch.
1266
+ * - Same key while another request is still being processed → returns 409 Conflict; retry after a short delay or once the first request completes.
1267
+ *
1268
+ * Entries expire after 24 hours. Use a unique key per logical send (for example, an order or signup ID). */
1269
+ "Idempotency-Key"?: string;
1270
+ };
1271
+ path?: never;
1272
+ cookie?: never;
1273
+ };
1274
+ requestBody: {
1275
+ content: {
1276
+ "application/json": {
1277
+ to: string | string[];
1278
+ from: string;
1279
+ /** @description Optional when templateId is provided */
1280
+ subject?: string;
1281
+ /** @description ID of a template from the dashboard */
1282
+ templateId?: string;
1283
+ variables?: {
1284
+ [key: string]: string;
1285
+ };
1286
+ replyTo?: string | string[];
1287
+ cc?: string | string[];
1288
+ bcc?: string | string[];
1289
+ text?: string | null;
1290
+ html?: string | null;
1291
+ /** @description Custom headers to included with the emails */
1292
+ headers?: {
1293
+ [key: string]: string;
1294
+ };
1295
+ attachments?: Record<string, never>[];
1296
+ /** Format: date-time */
1297
+ scheduledAt?: string;
1298
+ inReplyToId?: string | null;
1299
+ };
1300
+ };
1301
+ };
1302
+ responses: {
1303
+ /** @description Retrieve the user */
1304
+ 200: {
1305
+ headers: {
1306
+ [name: string]: unknown;
1307
+ };
1308
+ content: {
1309
+ "application/json": Record<string, never>;
1114
1310
  };
1115
1311
  };
1116
1312
  };
1117
- post?: never;
1118
- delete: {
1119
- parameters: {
1120
- query?: never;
1121
- header?: never;
1122
- path: {
1123
- contactBookId: string;
1124
- contactId: string;
1313
+ };
1314
+ getBounces: {
1315
+ parameters: {
1316
+ query?: {
1317
+ page?: number;
1318
+ limit?: number;
1319
+ };
1320
+ header?: never;
1321
+ path?: never;
1322
+ cookie?: never;
1323
+ };
1324
+ requestBody?: never;
1325
+ responses: {
1326
+ /** @description List bounced emails */
1327
+ 200: {
1328
+ headers: {
1329
+ [name: string]: unknown;
1330
+ };
1331
+ content: {
1332
+ "application/json": Record<string, never>;
1125
1333
  };
1126
- cookie?: never;
1127
1334
  };
1128
- requestBody?: never;
1129
- responses: {
1130
- /** @description Contact deleted successfully */
1131
- 200: {
1132
- headers: {
1133
- [name: string]: unknown;
1134
- };
1135
- content: {
1136
- "application/json": Record<string, never>;
1137
- };
1335
+ };
1336
+ };
1337
+ getComplaints: {
1338
+ parameters: {
1339
+ query?: {
1340
+ page?: number;
1341
+ limit?: number;
1342
+ };
1343
+ header?: never;
1344
+ path?: never;
1345
+ cookie?: never;
1346
+ };
1347
+ requestBody?: never;
1348
+ responses: {
1349
+ /** @description List email complaints */
1350
+ 200: {
1351
+ headers: {
1352
+ [name: string]: unknown;
1353
+ };
1354
+ content: {
1355
+ "application/json": Record<string, never>;
1138
1356
  };
1139
1357
  };
1140
1358
  };
1141
- options?: never;
1142
- head?: never;
1143
- patch: {
1144
- parameters: {
1145
- query?: never;
1146
- header?: never;
1147
- path: {
1148
- contactBookId: string;
1149
- contactId: string;
1359
+ };
1360
+ getUnsubscribes: {
1361
+ parameters: {
1362
+ query?: {
1363
+ page?: number;
1364
+ limit?: number;
1365
+ };
1366
+ header?: never;
1367
+ path?: never;
1368
+ cookie?: never;
1369
+ };
1370
+ requestBody?: never;
1371
+ responses: {
1372
+ /** @description List unsubscribed emails (contacts) */
1373
+ 200: {
1374
+ headers: {
1375
+ [name: string]: unknown;
1376
+ };
1377
+ content: {
1378
+ "application/json": Record<string, never>;
1379
+ };
1380
+ };
1381
+ };
1382
+ };
1383
+ sendBatchEmails: {
1384
+ parameters: {
1385
+ query?: never;
1386
+ header?: {
1387
+ /** @description Pass the optional Idempotency-Key header to make the request safe to retry. The key can be up to 256 characters. The server stores the canonical request body and behaves as follows:
1388
+ *
1389
+ * - Same key + same request body → returns the original emailId with 200 OK without re-sending.
1390
+ * - Same key + different request body → returns 409 Conflict with code: NOT_UNIQUE so you can detect the mismatch.
1391
+ * - Same key while another request is still being processed → returns 409 Conflict; retry after a short delay or once the first request completes.
1392
+ *
1393
+ * Entries expire after 24 hours. Use a unique key per logical send (for example, an order or signup ID). */
1394
+ "Idempotency-Key"?: string;
1395
+ };
1396
+ path?: never;
1397
+ cookie?: never;
1398
+ };
1399
+ requestBody: {
1400
+ content: {
1401
+ "application/json": {
1402
+ to: string | string[];
1403
+ from: string;
1404
+ /** @description Optional when templateId is provided */
1405
+ subject?: string;
1406
+ /** @description ID of a template from the dashboard */
1407
+ templateId?: string;
1408
+ variables?: {
1409
+ [key: string]: string;
1410
+ };
1411
+ replyTo?: string | string[];
1412
+ cc?: string | string[];
1413
+ bcc?: string | string[];
1414
+ text?: string | null;
1415
+ html?: string | null;
1416
+ /** @description Custom headers to included with the emails */
1417
+ headers?: {
1418
+ [key: string]: string;
1419
+ };
1420
+ attachments?: Record<string, never>[];
1421
+ /** Format: date-time */
1422
+ scheduledAt?: string;
1423
+ inReplyToId?: string | null;
1424
+ }[];
1425
+ };
1426
+ };
1427
+ responses: {
1428
+ /** @description List of successfully created email IDs */
1429
+ 200: {
1430
+ headers: {
1431
+ [name: string]: unknown;
1432
+ };
1433
+ content: {
1434
+ "application/json": Record<string, never>;
1435
+ };
1436
+ };
1437
+ };
1438
+ };
1439
+ cancelScheduledEmail: {
1440
+ parameters: {
1441
+ query?: never;
1442
+ header?: never;
1443
+ path: {
1444
+ emailId: string;
1445
+ };
1446
+ cookie?: never;
1447
+ };
1448
+ requestBody?: never;
1449
+ responses: {
1450
+ /** @description Retrieve the user */
1451
+ 200: {
1452
+ headers: {
1453
+ [name: string]: unknown;
1454
+ };
1455
+ content: {
1456
+ "application/json": Record<string, never>;
1457
+ };
1458
+ };
1459
+ };
1460
+ };
1461
+ getContacts: {
1462
+ parameters: {
1463
+ query?: {
1464
+ emails?: string;
1465
+ page?: number;
1466
+ limit?: number;
1467
+ ids?: string;
1468
+ };
1469
+ header?: never;
1470
+ path: {
1471
+ contactBookId: string;
1472
+ };
1473
+ cookie?: never;
1474
+ };
1475
+ requestBody?: never;
1476
+ responses: {
1477
+ /** @description Retrieve multiple contacts */
1478
+ 200: {
1479
+ headers: {
1480
+ [name: string]: unknown;
1481
+ };
1482
+ content: {
1483
+ "application/json": Record<string, never>[];
1150
1484
  };
1151
- cookie?: never;
1152
1485
  };
1153
- requestBody: {
1486
+ };
1487
+ };
1488
+ createContact: {
1489
+ parameters: {
1490
+ query?: never;
1491
+ header?: never;
1492
+ path: {
1493
+ contactBookId: string;
1494
+ };
1495
+ cookie?: never;
1496
+ };
1497
+ requestBody: {
1498
+ content: {
1499
+ "application/json": {
1500
+ email: string;
1501
+ firstName?: string;
1502
+ lastName?: string;
1503
+ properties?: {
1504
+ [key: string]: string;
1505
+ };
1506
+ subscribed?: boolean;
1507
+ };
1508
+ };
1509
+ };
1510
+ responses: {
1511
+ /** @description Retrieve the user */
1512
+ 200: {
1513
+ headers: {
1514
+ [name: string]: unknown;
1515
+ };
1154
1516
  content: {
1155
1517
  "application/json": {
1156
- firstName?: string;
1157
- lastName?: string;
1158
- properties?: {
1159
- [key: string]: string;
1160
- };
1161
- subscribed?: boolean;
1518
+ contactId?: string;
1162
1519
  };
1163
1520
  };
1164
1521
  };
1165
- responses: {
1166
- /** @description Retrieve the user */
1167
- 200: {
1168
- headers: {
1169
- [name: string]: unknown;
1522
+ };
1523
+ };
1524
+ getContact: {
1525
+ parameters: {
1526
+ query?: never;
1527
+ header?: never;
1528
+ path: {
1529
+ contactBookId: string;
1530
+ contactId: string;
1531
+ };
1532
+ cookie?: never;
1533
+ };
1534
+ requestBody?: never;
1535
+ responses: {
1536
+ /** @description Retrieve the contact */
1537
+ 200: {
1538
+ headers: {
1539
+ [name: string]: unknown;
1540
+ };
1541
+ content: {
1542
+ "application/json": Record<string, never>;
1543
+ };
1544
+ };
1545
+ };
1546
+ };
1547
+ upsertContact: {
1548
+ parameters: {
1549
+ query?: never;
1550
+ header?: never;
1551
+ path: {
1552
+ contactBookId: string;
1553
+ contactId: string;
1554
+ };
1555
+ cookie?: never;
1556
+ };
1557
+ requestBody: {
1558
+ content: {
1559
+ "application/json": Record<string, never>;
1560
+ };
1561
+ };
1562
+ responses: {
1563
+ /** @description Contact upserted successfully */
1564
+ 200: {
1565
+ headers: {
1566
+ [name: string]: unknown;
1567
+ };
1568
+ content: {
1569
+ "application/json": Record<string, never>;
1570
+ };
1571
+ };
1572
+ };
1573
+ };
1574
+ deleteContact: {
1575
+ parameters: {
1576
+ query?: never;
1577
+ header?: never;
1578
+ path: {
1579
+ contactBookId: string;
1580
+ contactId: string;
1581
+ };
1582
+ cookie?: never;
1583
+ };
1584
+ requestBody?: never;
1585
+ responses: {
1586
+ /** @description Contact deleted successfully */
1587
+ 200: {
1588
+ headers: {
1589
+ [name: string]: unknown;
1590
+ };
1591
+ content: {
1592
+ "application/json": Record<string, never>;
1593
+ };
1594
+ };
1595
+ };
1596
+ };
1597
+ updateContact: {
1598
+ parameters: {
1599
+ query?: never;
1600
+ header?: never;
1601
+ path: {
1602
+ contactBookId: string;
1603
+ contactId: string;
1604
+ };
1605
+ cookie?: never;
1606
+ };
1607
+ requestBody: {
1608
+ content: {
1609
+ "application/json": {
1610
+ firstName?: string;
1611
+ lastName?: string;
1612
+ properties?: {
1613
+ [key: string]: string;
1170
1614
  };
1171
- content: {
1172
- "application/json": {
1173
- contactId?: string;
1174
- };
1615
+ subscribed?: boolean;
1616
+ };
1617
+ };
1618
+ };
1619
+ responses: {
1620
+ /** @description Retrieve the user */
1621
+ 200: {
1622
+ headers: {
1623
+ [name: string]: unknown;
1624
+ };
1625
+ content: {
1626
+ "application/json": {
1627
+ contactId?: string;
1175
1628
  };
1176
1629
  };
1177
1630
  };
1178
1631
  };
1179
- trace?: never;
1180
1632
  };
1181
- "/v1/campaigns": {
1633
+ getCampaigns: {
1182
1634
  parameters: {
1183
1635
  query?: never;
1184
1636
  header?: never;
1185
1637
  path?: never;
1186
1638
  cookie?: never;
1187
1639
  };
1188
- get: {
1189
- parameters: {
1190
- query?: never;
1191
- header?: never;
1192
- path?: never;
1193
- cookie?: never;
1640
+ requestBody?: never;
1641
+ responses: {
1642
+ /** @description List campaigns */
1643
+ 200: {
1644
+ headers: {
1645
+ [name: string]: unknown;
1646
+ };
1647
+ content: {
1648
+ "application/json": {
1649
+ id: string;
1650
+ name: string;
1651
+ subject: string;
1652
+ status?: string | null;
1653
+ created_at: string;
1654
+ /** @default 0 */
1655
+ sent: number;
1656
+ /** @default 0 */
1657
+ delivered: number;
1658
+ /** @default 0 */
1659
+ opened: number;
1660
+ /** @default 0 */
1661
+ clicked: number;
1662
+ }[];
1663
+ };
1194
1664
  };
1195
- requestBody?: never;
1196
- responses: {
1197
- /** @description List campaigns */
1198
- 200: {
1199
- headers: {
1200
- [name: string]: unknown;
1201
- };
1202
- content: {
1203
- "application/json": unknown[];
1204
- };
1665
+ };
1666
+ };
1667
+ createCampaign: {
1668
+ parameters: {
1669
+ query?: never;
1670
+ header?: never;
1671
+ path?: never;
1672
+ cookie?: never;
1673
+ };
1674
+ requestBody: {
1675
+ content: {
1676
+ "application/json": {
1677
+ name: string;
1678
+ from: string;
1679
+ subject: string;
1680
+ previewText?: string;
1681
+ contactBookId: string;
1682
+ content?: string;
1683
+ html?: string;
1684
+ replyTo?: string | string[];
1685
+ cc?: string | string[];
1686
+ bcc?: string | string[];
1687
+ sendNow?: boolean;
1688
+ /** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
1689
+ scheduledAt?: string;
1690
+ batchSize?: number;
1205
1691
  };
1206
1692
  };
1207
1693
  };
1208
- put?: never;
1209
- post: {
1210
- parameters: {
1211
- query?: never;
1212
- header?: never;
1213
- path?: never;
1214
- cookie?: never;
1215
- };
1216
- requestBody: {
1694
+ responses: {
1695
+ /** @description Create a campaign. Note: The campaign content MUST include an unsubscribe link placeholder `{{unsent_unsubscribe_url}}`. */
1696
+ 200: {
1697
+ headers: {
1698
+ [name: string]: unknown;
1699
+ };
1217
1700
  content: {
1218
1701
  "application/json": {
1702
+ id: string;
1219
1703
  name: string;
1220
1704
  from: string;
1221
1705
  subject: string;
1222
- previewText?: string;
1223
- contactBookId: string;
1224
- content?: string;
1225
- html?: string;
1226
- replyTo?: string | string[];
1227
- cc?: string | string[];
1228
- bcc?: string | string[];
1229
- sendNow?: boolean;
1230
- /** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
1231
- scheduledAt?: string;
1232
- batchSize?: number;
1706
+ previewText: string | null;
1707
+ contactBookId: string | null;
1708
+ html: string | null;
1709
+ content: string | null;
1710
+ status: string;
1711
+ /** Format: date-time */
1712
+ scheduledAt: string | null;
1713
+ batchSize: number;
1714
+ batchWindowMinutes: number;
1715
+ total: number;
1716
+ sent: number;
1717
+ delivered: number;
1718
+ opened: number;
1719
+ clicked: number;
1720
+ unsubscribed: number;
1721
+ bounced: number;
1722
+ hardBounced: number;
1723
+ complained: number;
1724
+ replyTo: string[];
1725
+ cc: string[];
1726
+ bcc: string[];
1727
+ /** Format: date-time */
1728
+ createdAt: string;
1729
+ /** Format: date-time */
1730
+ updatedAt: string;
1233
1731
  };
1234
1732
  };
1235
1733
  };
1236
- responses: {
1237
- /** @description Create a campaign. Note: The campaign content MUST include an unsubscribe link placeholder `{{unsent_unsubscribe_url}}`. */
1238
- 200: {
1239
- headers: {
1240
- [name: string]: unknown;
1241
- };
1242
- content: {
1243
- "application/json": {
1244
- id: string;
1245
- name: string;
1246
- from: string;
1247
- subject: string;
1248
- previewText: string | null;
1249
- contactBookId: string | null;
1250
- html: string | null;
1251
- content: string | null;
1252
- status: string;
1253
- /** Format: date-time */
1254
- scheduledAt: string | null;
1255
- batchSize: number;
1256
- batchWindowMinutes: number;
1257
- total: number;
1258
- sent: number;
1259
- delivered: number;
1260
- opened: number;
1261
- clicked: number;
1262
- unsubscribed: number;
1263
- bounced: number;
1264
- hardBounced: number;
1265
- complained: number;
1266
- replyTo: unknown[];
1267
- cc: unknown[];
1268
- bcc: unknown[];
1269
- /** Format: date-time */
1270
- createdAt: string;
1271
- /** Format: date-time */
1272
- updatedAt: string;
1273
- };
1734
+ };
1735
+ };
1736
+ getCampaign: {
1737
+ parameters: {
1738
+ query?: never;
1739
+ header?: never;
1740
+ path: {
1741
+ campaignId: string;
1742
+ };
1743
+ cookie?: never;
1744
+ };
1745
+ requestBody?: never;
1746
+ responses: {
1747
+ /** @description Get campaign details */
1748
+ 200: {
1749
+ headers: {
1750
+ [name: string]: unknown;
1751
+ };
1752
+ content: {
1753
+ "application/json": {
1754
+ id: string;
1755
+ name: string;
1756
+ from: string;
1757
+ subject: string;
1758
+ previewText: string | null;
1759
+ contactBookId: string | null;
1760
+ html: string | null;
1761
+ content: string | null;
1762
+ status: string;
1763
+ /** Format: date-time */
1764
+ scheduledAt: string | null;
1765
+ batchSize: number;
1766
+ batchWindowMinutes: number;
1767
+ total: number;
1768
+ sent: number;
1769
+ delivered: number;
1770
+ opened: number;
1771
+ clicked: number;
1772
+ unsubscribed: number;
1773
+ bounced: number;
1774
+ hardBounced: number;
1775
+ complained: number;
1776
+ replyTo: string[];
1777
+ cc: string[];
1778
+ bcc: string[];
1779
+ /** Format: date-time */
1780
+ createdAt: string;
1781
+ /** Format: date-time */
1782
+ updatedAt: string;
1274
1783
  };
1275
1784
  };
1276
1785
  };
1277
1786
  };
1278
- delete?: never;
1279
- options?: never;
1280
- head?: never;
1281
- patch?: never;
1282
- trace?: never;
1283
1787
  };
1284
- "/v1/campaigns/{campaignId}": {
1788
+ scheduleCampaign: {
1285
1789
  parameters: {
1286
1790
  query?: never;
1287
1791
  header?: never;
1288
- path?: never;
1792
+ path: {
1793
+ campaignId: string;
1794
+ };
1289
1795
  cookie?: never;
1290
1796
  };
1291
- get: {
1292
- parameters: {
1293
- query?: never;
1294
- header?: never;
1295
- path: {
1296
- campaignId: string;
1797
+ requestBody: {
1798
+ content: {
1799
+ "application/json": {
1800
+ /** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
1801
+ scheduledAt?: string;
1802
+ batchSize?: number;
1297
1803
  };
1298
- cookie?: never;
1299
1804
  };
1300
- requestBody?: never;
1301
- responses: {
1302
- /** @description Get campaign details */
1303
- 200: {
1304
- headers: {
1305
- [name: string]: unknown;
1306
- };
1307
- content: {
1308
- "application/json": {
1309
- id: string;
1310
- name: string;
1311
- from: string;
1312
- subject: string;
1313
- previewText: string | null;
1314
- contactBookId: string | null;
1315
- html: string | null;
1316
- content: string | null;
1317
- status: string;
1318
- /** Format: date-time */
1319
- scheduledAt: string | null;
1320
- batchSize: number;
1321
- batchWindowMinutes: number;
1322
- total: number;
1323
- sent: number;
1324
- delivered: number;
1325
- opened: number;
1326
- clicked: number;
1327
- unsubscribed: number;
1328
- bounced: number;
1329
- hardBounced: number;
1330
- complained: number;
1331
- replyTo: unknown[];
1332
- cc: unknown[];
1333
- bcc: unknown[];
1334
- /** Format: date-time */
1335
- createdAt: string;
1336
- /** Format: date-time */
1337
- updatedAt: string;
1338
- };
1339
- };
1805
+ };
1806
+ responses: {
1807
+ /** @description Schedule a campaign */
1808
+ 200: {
1809
+ headers: {
1810
+ [name: string]: unknown;
1811
+ };
1812
+ content: {
1813
+ "application/json": Record<string, never>;
1814
+ };
1815
+ };
1816
+ };
1817
+ };
1818
+ pauseCampaign: {
1819
+ parameters: {
1820
+ query?: never;
1821
+ header?: never;
1822
+ path: {
1823
+ campaignId: string;
1824
+ };
1825
+ cookie?: never;
1826
+ };
1827
+ requestBody?: never;
1828
+ responses: {
1829
+ /** @description Pause a campaign */
1830
+ 200: {
1831
+ headers: {
1832
+ [name: string]: unknown;
1833
+ };
1834
+ content: {
1835
+ "application/json": Record<string, never>;
1836
+ };
1837
+ };
1838
+ };
1839
+ };
1840
+ resumeCampaign: {
1841
+ parameters: {
1842
+ query?: never;
1843
+ header?: never;
1844
+ path: {
1845
+ campaignId: string;
1846
+ };
1847
+ cookie?: never;
1848
+ };
1849
+ requestBody?: never;
1850
+ responses: {
1851
+ /** @description Resume a campaign */
1852
+ 200: {
1853
+ headers: {
1854
+ [name: string]: unknown;
1855
+ };
1856
+ content: {
1857
+ "application/json": Record<string, never>;
1858
+ };
1859
+ };
1860
+ };
1861
+ };
1862
+ getContactBooks: {
1863
+ parameters: {
1864
+ query?: never;
1865
+ header?: never;
1866
+ path?: never;
1867
+ cookie?: never;
1868
+ };
1869
+ requestBody?: never;
1870
+ responses: {
1871
+ /** @description Retrieve all contact books */
1872
+ 200: {
1873
+ headers: {
1874
+ [name: string]: unknown;
1875
+ };
1876
+ content: {
1877
+ "application/json": Record<string, never>[];
1340
1878
  };
1341
1879
  };
1342
1880
  };
1343
- put?: never;
1344
- post?: never;
1345
- delete?: never;
1346
- options?: never;
1347
- head?: never;
1348
- patch?: never;
1349
- trace?: never;
1350
1881
  };
1351
- "/v1/campaigns/{campaignId}/schedule": {
1882
+ createContactBook: {
1352
1883
  parameters: {
1353
1884
  query?: never;
1354
1885
  header?: never;
1355
1886
  path?: never;
1356
1887
  cookie?: never;
1357
1888
  };
1358
- get?: never;
1359
- put?: never;
1360
- post: {
1361
- parameters: {
1362
- query?: never;
1363
- header?: never;
1364
- path: {
1365
- campaignId: string;
1889
+ requestBody?: {
1890
+ content: {
1891
+ "application/json": {
1892
+ name: string;
1893
+ emoji?: string;
1894
+ properties?: {
1895
+ [key: string]: string;
1896
+ };
1366
1897
  };
1367
- cookie?: never;
1368
1898
  };
1369
- requestBody: {
1899
+ };
1900
+ responses: {
1901
+ /** @description Create a contact book */
1902
+ 200: {
1903
+ headers: {
1904
+ [name: string]: unknown;
1905
+ };
1370
1906
  content: {
1371
1907
  "application/json": {
1372
- /** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
1373
- scheduledAt?: string;
1374
- batchSize?: number;
1375
- };
1376
- };
1377
- };
1378
- responses: {
1379
- /** @description Schedule a campaign */
1380
- 200: {
1381
- headers: {
1382
- [name: string]: unknown;
1383
- };
1384
- content: {
1385
- "application/json": Record<string, never>;
1908
+ id: string;
1909
+ name: string;
1910
+ emoji: string;
1911
+ properties?: unknown;
1912
+ teamId: string;
1913
+ createdAt: string;
1914
+ updatedAt: string;
1386
1915
  };
1387
1916
  };
1388
1917
  };
1389
1918
  };
1390
- delete?: never;
1391
- options?: never;
1392
- head?: never;
1393
- patch?: never;
1394
- trace?: never;
1395
1919
  };
1396
- "/v1/campaigns/{campaignId}/pause": {
1920
+ getContactBook: {
1397
1921
  parameters: {
1398
1922
  query?: never;
1399
1923
  header?: never;
1400
- path?: never;
1924
+ path: {
1925
+ id: string;
1926
+ };
1401
1927
  cookie?: never;
1402
1928
  };
1403
- get?: never;
1404
- put?: never;
1405
- post: {
1406
- parameters: {
1407
- query?: never;
1408
- header?: never;
1409
- path: {
1410
- campaignId: string;
1411
- };
1412
- cookie?: never;
1413
- };
1414
- requestBody?: never;
1415
- responses: {
1416
- /** @description Pause a campaign */
1417
- 200: {
1418
- headers: {
1419
- [name: string]: unknown;
1420
- };
1421
- content: {
1422
- "application/json": Record<string, never>;
1929
+ requestBody?: never;
1930
+ responses: {
1931
+ /** @description Get contact book details */
1932
+ 200: {
1933
+ headers: {
1934
+ [name: string]: unknown;
1935
+ };
1936
+ content: {
1937
+ "application/json": {
1938
+ id: string;
1939
+ name: string;
1940
+ emoji: string;
1941
+ properties?: unknown;
1942
+ teamId: string;
1943
+ createdAt: string;
1944
+ updatedAt: string;
1945
+ details: {
1946
+ totalContacts: number;
1947
+ unsubscribedContacts: number;
1948
+ campaigns: unknown[];
1949
+ };
1423
1950
  };
1424
1951
  };
1425
1952
  };
1426
1953
  };
1427
- delete?: never;
1428
- options?: never;
1429
- head?: never;
1430
- patch?: never;
1431
- trace?: never;
1432
1954
  };
1433
- "/v1/campaigns/{campaignId}/resume": {
1955
+ deleteContactBook: {
1434
1956
  parameters: {
1435
1957
  query?: never;
1436
1958
  header?: never;
1437
- path?: never;
1959
+ path: {
1960
+ id: string;
1961
+ };
1438
1962
  cookie?: never;
1439
1963
  };
1440
- get?: never;
1441
- put?: never;
1442
- post: {
1443
- parameters: {
1444
- query?: never;
1445
- header?: never;
1446
- path: {
1447
- campaignId: string;
1448
- };
1449
- cookie?: never;
1450
- };
1451
- requestBody?: never;
1452
- responses: {
1453
- /** @description Resume a campaign */
1454
- 200: {
1455
- headers: {
1456
- [name: string]: unknown;
1457
- };
1458
- content: {
1459
- "application/json": Record<string, never>;
1964
+ requestBody?: never;
1965
+ responses: {
1966
+ /** @description Delete contact book */
1967
+ 200: {
1968
+ headers: {
1969
+ [name: string]: unknown;
1970
+ };
1971
+ content: {
1972
+ "application/json": {
1973
+ success: boolean;
1460
1974
  };
1461
1975
  };
1462
1976
  };
1463
1977
  };
1464
- delete?: never;
1465
- options?: never;
1466
- head?: never;
1467
- patch?: never;
1468
- trace?: never;
1469
1978
  };
1470
- "/v1/contactBooks": {
1979
+ updateContactBook: {
1471
1980
  parameters: {
1472
1981
  query?: never;
1473
1982
  header?: never;
1474
- path?: never;
1983
+ path: {
1984
+ id: string;
1985
+ };
1475
1986
  cookie?: never;
1476
1987
  };
1477
- get: {
1478
- parameters: {
1479
- query?: never;
1480
- header?: never;
1481
- path?: never;
1482
- cookie?: never;
1483
- };
1484
- requestBody?: never;
1485
- responses: {
1486
- /** @description Retrieve all contact books */
1487
- 200: {
1488
- headers: {
1489
- [name: string]: unknown;
1490
- };
1491
- content: {
1492
- "application/json": unknown[];
1988
+ requestBody?: {
1989
+ content: {
1990
+ "application/json": {
1991
+ name?: string;
1992
+ emoji?: string;
1993
+ properties?: {
1994
+ [key: string]: string;
1493
1995
  };
1494
1996
  };
1495
1997
  };
1496
1998
  };
1497
- put?: never;
1498
- post: {
1499
- parameters: {
1500
- query?: never;
1501
- header?: never;
1502
- path?: never;
1503
- cookie?: never;
1504
- };
1505
- requestBody?: {
1999
+ responses: {
2000
+ /** @description Update contact book */
2001
+ 200: {
2002
+ headers: {
2003
+ [name: string]: unknown;
2004
+ };
1506
2005
  content: {
1507
2006
  "application/json": {
2007
+ id: string;
1508
2008
  name: string;
1509
- emoji?: string;
1510
- properties?: {
1511
- [key: string]: string;
1512
- };
1513
- };
1514
- };
1515
- };
1516
- responses: {
1517
- /** @description Create a contact book */
1518
- 200: {
1519
- headers: {
1520
- [name: string]: unknown;
1521
- };
1522
- content: {
1523
- "application/json": {
1524
- id: string;
1525
- name: string;
1526
- emoji: string;
1527
- properties?: unknown;
1528
- teamId: string;
1529
- createdAt: string;
1530
- updatedAt: string;
1531
- };
1532
2009
  };
1533
2010
  };
1534
2011
  };
1535
2012
  };
1536
- delete?: never;
1537
- options?: never;
1538
- head?: never;
1539
- patch?: never;
1540
- trace?: never;
1541
2013
  };
1542
- "/v1/contactBooks/{id}": {
2014
+ getTemplates: {
1543
2015
  parameters: {
1544
2016
  query?: never;
1545
2017
  header?: never;
1546
2018
  path?: never;
1547
2019
  cookie?: never;
1548
2020
  };
1549
- get: {
1550
- parameters: {
1551
- query?: never;
1552
- header?: never;
1553
- path: {
1554
- id: string;
2021
+ requestBody?: never;
2022
+ responses: {
2023
+ /** @description List templates */
2024
+ 200: {
2025
+ headers: {
2026
+ [name: string]: unknown;
1555
2027
  };
1556
- cookie?: never;
1557
- };
1558
- requestBody?: never;
1559
- responses: {
1560
- /** @description Get contact book details */
1561
- 200: {
1562
- headers: {
1563
- [name: string]: unknown;
1564
- };
1565
- content: {
1566
- "application/json": {
1567
- id: string;
1568
- name: string;
1569
- emoji: string;
1570
- properties?: unknown;
1571
- teamId: string;
1572
- createdAt: string;
1573
- updatedAt: string;
1574
- details: {
1575
- totalContacts: number;
1576
- unsubscribedContacts: number;
1577
- campaigns: unknown[];
1578
- };
1579
- };
1580
- };
2028
+ content: {
2029
+ "application/json": {
2030
+ id: string;
2031
+ name: string;
2032
+ subject: string;
2033
+ html?: string | null;
2034
+ content?: string | null;
2035
+ teamId: string;
2036
+ createdAt: string;
2037
+ updatedAt: string;
2038
+ }[];
1581
2039
  };
1582
2040
  };
1583
2041
  };
1584
- put?: never;
1585
- post?: never;
1586
- delete: {
1587
- parameters: {
1588
- query?: never;
1589
- header?: never;
1590
- path: {
1591
- id: string;
1592
- };
1593
- cookie?: never;
1594
- };
1595
- requestBody?: never;
1596
- responses: {
1597
- /** @description Delete contact book */
1598
- 200: {
1599
- headers: {
1600
- [name: string]: unknown;
1601
- };
1602
- content: {
1603
- "application/json": {
1604
- success: boolean;
1605
- };
1606
- };
2042
+ };
2043
+ createTemplate: {
2044
+ parameters: {
2045
+ query?: never;
2046
+ header?: never;
2047
+ path?: never;
2048
+ cookie?: never;
2049
+ };
2050
+ requestBody?: {
2051
+ content: {
2052
+ "application/json": {
2053
+ name: string;
2054
+ subject: string;
2055
+ html?: string;
2056
+ content?: string;
1607
2057
  };
1608
2058
  };
1609
2059
  };
1610
- options?: never;
1611
- head?: never;
1612
- patch: {
1613
- parameters: {
1614
- query?: never;
1615
- header?: never;
1616
- path: {
1617
- id: string;
2060
+ responses: {
2061
+ /** @description Create template */
2062
+ 200: {
2063
+ headers: {
2064
+ [name: string]: unknown;
1618
2065
  };
1619
- cookie?: never;
1620
- };
1621
- requestBody?: {
1622
2066
  content: {
1623
2067
  "application/json": {
1624
- name?: string;
1625
- emoji?: string;
1626
- properties?: {
1627
- [key: string]: string;
1628
- };
1629
- };
1630
- };
1631
- };
1632
- responses: {
1633
- /** @description Update contact book */
1634
- 200: {
1635
- headers: {
1636
- [name: string]: unknown;
1637
- };
1638
- content: {
1639
- "application/json": {
1640
- id: string;
1641
- name: string;
1642
- };
2068
+ id: string;
1643
2069
  };
1644
2070
  };
1645
2071
  };
1646
2072
  };
1647
- trace?: never;
1648
2073
  };
1649
- "/v1/templates": {
2074
+ getTemplate: {
1650
2075
  parameters: {
1651
2076
  query?: never;
1652
2077
  header?: never;
1653
- path?: never;
2078
+ path: {
2079
+ id: string;
2080
+ };
1654
2081
  cookie?: never;
1655
2082
  };
1656
- get: {
1657
- parameters: {
1658
- query?: never;
1659
- header?: never;
1660
- path?: never;
1661
- cookie?: never;
1662
- };
1663
- requestBody?: never;
1664
- responses: {
1665
- /** @description List templates */
1666
- 200: {
1667
- headers: {
1668
- [name: string]: unknown;
1669
- };
1670
- content: {
1671
- "application/json": unknown[];
1672
- };
2083
+ requestBody?: never;
2084
+ responses: {
2085
+ /** @description Get template */
2086
+ 200: {
2087
+ headers: {
2088
+ [name: string]: unknown;
1673
2089
  };
1674
- };
1675
- };
1676
- put?: never;
1677
- post: {
1678
- parameters: {
1679
- query?: never;
1680
- header?: never;
1681
- path?: never;
1682
- cookie?: never;
1683
- };
1684
- requestBody?: {
1685
2090
  content: {
1686
2091
  "application/json": {
2092
+ id: string;
1687
2093
  name: string;
1688
2094
  subject: string;
1689
- html?: string;
1690
- content?: string;
1691
- };
1692
- };
1693
- };
1694
- responses: {
1695
- /** @description Create template */
1696
- 200: {
1697
- headers: {
1698
- [name: string]: unknown;
1699
- };
1700
- content: {
1701
- "application/json": {
1702
- id: string;
1703
- };
2095
+ html?: string | null;
2096
+ content?: string | null;
2097
+ teamId: string;
2098
+ createdAt: string;
2099
+ updatedAt: string;
1704
2100
  };
1705
2101
  };
1706
2102
  };
1707
2103
  };
1708
- delete?: never;
1709
- options?: never;
1710
- head?: never;
1711
- patch?: never;
1712
- trace?: never;
1713
2104
  };
1714
- "/v1/templates/{id}": {
2105
+ deleteTemplate: {
1715
2106
  parameters: {
1716
2107
  query?: never;
1717
2108
  header?: never;
1718
- path?: never;
2109
+ path: {
2110
+ id: string;
2111
+ };
1719
2112
  cookie?: never;
1720
2113
  };
1721
- get: {
1722
- parameters: {
1723
- query?: never;
1724
- header?: never;
1725
- path: {
1726
- id: string;
2114
+ requestBody?: never;
2115
+ responses: {
2116
+ /** @description Delete template */
2117
+ 200: {
2118
+ headers: {
2119
+ [name: string]: unknown;
1727
2120
  };
1728
- cookie?: never;
1729
- };
1730
- requestBody?: never;
1731
- responses: {
1732
- /** @description Get template */
1733
- 200: {
1734
- headers: {
1735
- [name: string]: unknown;
1736
- };
1737
- content: {
1738
- "application/json": {
1739
- id: string;
1740
- name: string;
1741
- subject: string;
1742
- html?: string | null;
1743
- content?: string | null;
1744
- teamId: string;
1745
- createdAt: string;
1746
- updatedAt: string;
1747
- };
2121
+ content: {
2122
+ "application/json": {
2123
+ success: boolean;
1748
2124
  };
1749
2125
  };
1750
2126
  };
1751
2127
  };
1752
- put?: never;
1753
- post?: never;
1754
- delete: {
1755
- parameters: {
1756
- query?: never;
1757
- header?: never;
1758
- path: {
1759
- id: string;
1760
- };
1761
- cookie?: never;
1762
- };
1763
- requestBody?: never;
1764
- responses: {
1765
- /** @description Delete template */
1766
- 200: {
1767
- headers: {
1768
- [name: string]: unknown;
1769
- };
1770
- content: {
1771
- "application/json": {
1772
- success: boolean;
1773
- };
1774
- };
1775
- };
2128
+ };
2129
+ updateTemplate: {
2130
+ parameters: {
2131
+ query?: never;
2132
+ header?: never;
2133
+ path: {
2134
+ id: string;
1776
2135
  };
2136
+ cookie?: never;
1777
2137
  };
1778
- options?: never;
1779
- head?: never;
1780
- patch: {
1781
- parameters: {
1782
- query?: never;
1783
- header?: never;
1784
- path: {
1785
- id: string;
2138
+ requestBody?: {
2139
+ content: {
2140
+ "application/json": {
2141
+ name?: string;
2142
+ subject?: string;
2143
+ html?: string;
2144
+ content?: string;
1786
2145
  };
1787
- cookie?: never;
1788
2146
  };
1789
- requestBody?: {
2147
+ };
2148
+ responses: {
2149
+ /** @description Update template */
2150
+ 200: {
2151
+ headers: {
2152
+ [name: string]: unknown;
2153
+ };
1790
2154
  content: {
1791
2155
  "application/json": {
1792
- name?: string;
1793
- subject?: string;
1794
- html?: string;
1795
- content?: string;
2156
+ success: boolean;
1796
2157
  };
1797
2158
  };
1798
2159
  };
1799
- responses: {
1800
- /** @description Update template */
1801
- 200: {
1802
- headers: {
1803
- [name: string]: unknown;
1804
- };
1805
- content: {
1806
- "application/json": {
1807
- success: boolean;
1808
- };
1809
- };
2160
+ };
2161
+ };
2162
+ getSuppressions: {
2163
+ parameters: {
2164
+ query?: {
2165
+ page?: number;
2166
+ limit?: number;
2167
+ search?: string;
2168
+ reason?: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE" | null;
2169
+ };
2170
+ header?: never;
2171
+ path?: never;
2172
+ cookie?: never;
2173
+ };
2174
+ requestBody?: never;
2175
+ responses: {
2176
+ /** @description List suppressions */
2177
+ 200: {
2178
+ headers: {
2179
+ [name: string]: unknown;
2180
+ };
2181
+ content: {
2182
+ "application/json": Record<string, never>;
1810
2183
  };
1811
2184
  };
1812
2185
  };
1813
- trace?: never;
1814
2186
  };
1815
- "/v1/suppressions": {
2187
+ addSuppression: {
1816
2188
  parameters: {
1817
2189
  query?: never;
1818
2190
  header?: never;
1819
2191
  path?: never;
1820
2192
  cookie?: never;
1821
2193
  };
1822
- get: {
1823
- parameters: {
1824
- query?: {
1825
- page?: number;
1826
- limit?: number;
1827
- search?: string;
1828
- reason?: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE" | null;
1829
- };
1830
- header?: never;
1831
- path?: never;
1832
- cookie?: never;
1833
- };
1834
- requestBody?: never;
1835
- responses: {
1836
- /** @description List suppressions */
1837
- 200: {
1838
- headers: {
1839
- [name: string]: unknown;
1840
- };
1841
- content: {
1842
- "application/json": Record<string, never>;
1843
- };
2194
+ requestBody?: {
2195
+ content: {
2196
+ "application/json": {
2197
+ /** Format: email */
2198
+ email: string;
2199
+ /** @enum {string} */
2200
+ reason: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE";
2201
+ source?: string;
1844
2202
  };
1845
2203
  };
1846
2204
  };
1847
- put?: never;
1848
- post: {
1849
- parameters: {
1850
- query?: never;
1851
- header?: never;
1852
- path?: never;
1853
- cookie?: never;
1854
- };
1855
- requestBody?: {
1856
- content: {
1857
- "application/json": {
1858
- /** Format: email */
1859
- email: string;
1860
- /** @enum {string} */
1861
- reason: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE";
1862
- source?: string;
1863
- };
2205
+ responses: {
2206
+ /** @description Create suppression */
2207
+ 200: {
2208
+ headers: {
2209
+ [name: string]: unknown;
1864
2210
  };
1865
- };
1866
- responses: {
1867
- /** @description Create suppression */
1868
- 200: {
1869
- headers: {
1870
- [name: string]: unknown;
1871
- };
1872
- content: {
1873
- "application/json": Record<string, never>;
1874
- };
2211
+ content: {
2212
+ "application/json": Record<string, never>;
1875
2213
  };
1876
2214
  };
1877
2215
  };
1878
- delete?: never;
1879
- options?: never;
1880
- head?: never;
1881
- patch?: never;
1882
- trace?: never;
1883
2216
  };
1884
- "/v1/suppressions/email/{email}": {
2217
+ deleteSuppression: {
1885
2218
  parameters: {
1886
2219
  query?: never;
1887
2220
  header?: never;
1888
- path?: never;
2221
+ path: {
2222
+ email: string;
2223
+ };
1889
2224
  cookie?: never;
1890
2225
  };
1891
- get?: never;
1892
- put?: never;
1893
- post?: never;
1894
- delete: {
1895
- parameters: {
1896
- query?: never;
1897
- header?: never;
1898
- path: {
1899
- email: string;
2226
+ requestBody?: never;
2227
+ responses: {
2228
+ /** @description Delete suppression */
2229
+ 200: {
2230
+ headers: {
2231
+ [name: string]: unknown;
2232
+ };
2233
+ content: {
2234
+ "application/json": Record<string, never>;
1900
2235
  };
1901
- cookie?: never;
1902
2236
  };
1903
- requestBody?: never;
1904
- responses: {
1905
- /** @description Delete suppression */
1906
- 200: {
1907
- headers: {
1908
- [name: string]: unknown;
1909
- };
1910
- content: {
1911
- "application/json": Record<string, never>;
1912
- };
2237
+ /** @description Suppression not found */
2238
+ 404: {
2239
+ headers: {
2240
+ [name: string]: unknown;
1913
2241
  };
1914
- /** @description Suppression not found */
1915
- 404: {
1916
- headers: {
1917
- [name: string]: unknown;
1918
- };
1919
- content: {
1920
- "application/json": Record<string, never>;
1921
- };
2242
+ content: {
2243
+ "application/json": Record<string, never>;
1922
2244
  };
1923
2245
  };
1924
2246
  };
1925
- options?: never;
1926
- head?: never;
1927
- patch?: never;
1928
- trace?: never;
1929
2247
  };
1930
2248
  }
1931
2249
 
1932
- type CreateContactPayload = paths["/v1/contactBooks/{contactBookId}/contacts"]["post"]["requestBody"]["content"]["application/json"];
2250
+ type CreateContactPayload = NonNullable<paths["/v1/contactBooks/{contactBookId}/contacts"]["post"]["requestBody"]>["content"]["application/json"];
1933
2251
  type CreateContactResponse = {
1934
2252
  data: CreateContactResponseSuccess | null;
1935
2253
  error: ErrorResponse | null;
1936
2254
  };
1937
2255
  type CreateContactResponseSuccess = paths["/v1/contactBooks/{contactBookId}/contacts"]["post"]["responses"]["200"]["content"]["application/json"];
2256
+ type ListContactsResponseSuccess = paths["/v1/contactBooks/{contactBookId}/contacts"]["get"]["responses"]["200"]["content"]["application/json"];
2257
+ type ListContactsResponse = {
2258
+ data: ListContactsResponseSuccess | null;
2259
+ error: ErrorResponse | null;
2260
+ };
1938
2261
  type GetContactResponseSuccess = paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["get"]["responses"]["200"]["content"]["application/json"];
1939
2262
  type GetContactResponse = {
1940
2263
  data: GetContactResponseSuccess | null;
1941
2264
  error: ErrorResponse | null;
1942
2265
  };
1943
- type UpdateContactPayload = paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["patch"]["requestBody"]["content"]["application/json"];
2266
+ type UpdateContactPayload = NonNullable<paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["patch"]["requestBody"]>["content"]["application/json"];
1944
2267
  type UpdateContactResponseSuccess = paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["patch"]["responses"]["200"]["content"]["application/json"];
1945
2268
  type UpdateContactResponse = {
1946
2269
  data: UpdateContactResponseSuccess | null;
1947
2270
  error: ErrorResponse | null;
1948
2271
  };
1949
- type UpsertContactPayload = paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["put"]["requestBody"]["content"]["application/json"];
2272
+ type UpsertContactPayload = NonNullable<paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["put"]["requestBody"]>["content"]["application/json"];
1950
2273
  type UpsertContactResponseSuccess = paths["/v1/contactBooks/{contactBookId}/contacts/{contactId}"]["put"]["responses"]["200"]["content"]["application/json"];
1951
2274
  type UpsertContactResponse = {
1952
2275
  data: UpsertContactResponseSuccess | null;
@@ -1961,10 +2284,12 @@ type DeleteContactResponse = {
1961
2284
  declare class Contacts {
1962
2285
  private readonly unsent;
1963
2286
  constructor(unsent: unsent);
1964
- list(contactBookId: string): Promise<{
1965
- data: any[] | null;
1966
- error: ErrorResponse | null;
1967
- }>;
2287
+ list(contactBookId: string, query?: {
2288
+ emails?: string;
2289
+ page?: number;
2290
+ limit?: number;
2291
+ ids?: string;
2292
+ }): Promise<ListContactsResponse>;
1968
2293
  create(contactBookId: string, payload: CreateContactPayload): Promise<CreateContactResponse>;
1969
2294
  get(contactBookId: string, contactId: string): Promise<GetContactResponse>;
1970
2295
  update(contactBookId: string, contactId: string, payload: UpdateContactPayload): Promise<UpdateContactResponse>;
@@ -2079,7 +2404,7 @@ declare class Emails {
2079
2404
  cancel(id: string): Promise<CancelEmailResponse>;
2080
2405
  }
2081
2406
 
2082
- type CreateDomainPayload = paths["/v1/domains"]["post"]["requestBody"]["content"]["application/json"];
2407
+ type CreateDomainPayload = NonNullable<paths["/v1/domains"]["post"]["requestBody"]>["content"]["application/json"];
2083
2408
  type CreateDomainResponse = {
2084
2409
  data: CreateDomainResponseSuccess | null;
2085
2410
  error: ErrorResponse | null;
@@ -2110,99 +2435,82 @@ declare class Domains {
2110
2435
  constructor(unsent: unsent);
2111
2436
  list(): Promise<GetDomainsResponse>;
2112
2437
  create(payload: CreateDomainPayload): Promise<CreateDomainResponse>;
2113
- verify(id: number): Promise<VerifyDomainResponse>;
2114
- get(id: number): Promise<GetDomainResponse>;
2115
- delete(id: number): Promise<DeleteDomainResponse>;
2438
+ verify(id: string): Promise<VerifyDomainResponse>;
2439
+ get(id: string): Promise<GetDomainResponse>;
2440
+ delete(id: string): Promise<DeleteDomainResponse>;
2116
2441
  }
2117
2442
 
2118
- type ListContactBooksResponse = {
2119
- data: any[] | null;
2443
+ type CreateContactBookPayload = NonNullable<paths["/v1/contactBooks"]["post"]["requestBody"]>["content"]["application/json"];
2444
+ type CreateContactBookResponseSuccess = paths["/v1/contactBooks"]["post"]["responses"]["200"]["content"]["application/json"];
2445
+ type CreateContactBookResponse = {
2446
+ data: CreateContactBookResponseSuccess | null;
2120
2447
  error: ErrorResponse | null;
2121
2448
  };
2122
- type CreateContactBookResponse = {
2123
- data: {
2124
- id: string;
2125
- } | null;
2449
+ type ListContactBooksResponseSuccess = paths["/v1/contactBooks"]["get"]["responses"]["200"]["content"]["application/json"];
2450
+ type ListContactBooksResponse = {
2451
+ data: ListContactBooksResponseSuccess | null;
2126
2452
  error: ErrorResponse | null;
2127
2453
  };
2454
+ type GetContactBookResponseSuccess = paths["/v1/contactBooks/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
2128
2455
  type GetContactBookResponse = {
2129
- data: any | null;
2456
+ data: GetContactBookResponseSuccess | null;
2130
2457
  error: ErrorResponse | null;
2131
2458
  };
2459
+ type UpdateContactBookPayload = NonNullable<paths["/v1/contactBooks/{id}"]["patch"]["requestBody"]>["content"]["application/json"];
2460
+ type UpdateContactBookResponseSuccess = paths["/v1/contactBooks/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
2132
2461
  type UpdateContactBookResponse = {
2133
- data: {
2134
- id: string;
2135
- name: string;
2136
- } | null;
2462
+ data: UpdateContactBookResponseSuccess | null;
2137
2463
  error: ErrorResponse | null;
2138
2464
  };
2465
+ type DeleteContactBookResponseSuccess = paths["/v1/contactBooks/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
2139
2466
  type DeleteContactBookResponse = {
2140
- data: {
2141
- success: boolean;
2142
- } | null;
2467
+ data: DeleteContactBookResponseSuccess | null;
2143
2468
  error: ErrorResponse | null;
2144
2469
  };
2145
2470
  declare class ContactBooks {
2146
2471
  private readonly unsent;
2147
2472
  constructor(unsent: unsent);
2148
2473
  list(): Promise<ListContactBooksResponse>;
2149
- create(payload: {
2150
- name: string;
2151
- emoji?: string;
2152
- properties?: any;
2153
- }): Promise<CreateContactBookResponse>;
2474
+ create(payload: CreateContactBookPayload): Promise<CreateContactBookResponse>;
2154
2475
  get(id: string): Promise<GetContactBookResponse>;
2155
- update(id: string, payload: {
2156
- name?: string;
2157
- emoji?: string;
2158
- properties?: any;
2159
- }): Promise<UpdateContactBookResponse>;
2476
+ update(id: string, payload: UpdateContactBookPayload): Promise<UpdateContactBookResponse>;
2160
2477
  delete(id: string): Promise<DeleteContactBookResponse>;
2161
2478
  }
2162
2479
 
2480
+ type ListTemplatesResponseSuccess = paths["/v1/templates"]["get"]["responses"]["200"]["content"]["application/json"];
2163
2481
  type ListTemplatesResponse = {
2164
- data: any[] | null;
2482
+ data: ListTemplatesResponseSuccess | null;
2165
2483
  error: ErrorResponse | null;
2166
2484
  };
2485
+ type CreateTemplatePayload = NonNullable<paths["/v1/templates"]["post"]["requestBody"]>["content"]["application/json"];
2486
+ type CreateTemplateResponseSuccess = paths["/v1/templates"]["post"]["responses"]["200"]["content"]["application/json"];
2167
2487
  type CreateTemplateResponse = {
2168
- data: {
2169
- id: string;
2170
- } | null;
2488
+ data: CreateTemplateResponseSuccess | null;
2171
2489
  error: ErrorResponse | null;
2172
2490
  };
2491
+ type GetTemplateResponseSuccess = paths["/v1/templates/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
2173
2492
  type GetTemplateResponse = {
2174
- data: any | null;
2493
+ data: GetTemplateResponseSuccess | null;
2175
2494
  error: ErrorResponse | null;
2176
2495
  };
2496
+ type UpdateTemplatePayload = NonNullable<paths["/v1/templates/{id}"]["patch"]["requestBody"]>["content"]["application/json"];
2497
+ type UpdateTemplateResponseSuccess = paths["/v1/templates/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
2177
2498
  type UpdateTemplateResponse = {
2178
- data: {
2179
- success: boolean;
2180
- } | null;
2499
+ data: UpdateTemplateResponseSuccess | null;
2181
2500
  error: ErrorResponse | null;
2182
2501
  };
2502
+ type DeleteTemplateResponseSuccess = paths["/v1/templates/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
2183
2503
  type DeleteTemplateResponse = {
2184
- data: {
2185
- success: boolean;
2186
- } | null;
2504
+ data: DeleteTemplateResponseSuccess | null;
2187
2505
  error: ErrorResponse | null;
2188
2506
  };
2189
2507
  declare class Templates {
2190
2508
  private readonly unsent;
2191
2509
  constructor(unsent: unsent);
2192
2510
  list(): Promise<ListTemplatesResponse>;
2193
- create(payload: {
2194
- name: string;
2195
- subject: string;
2196
- html?: string;
2197
- content?: string;
2198
- }): Promise<CreateTemplateResponse>;
2511
+ create(payload: CreateTemplatePayload): Promise<CreateTemplateResponse>;
2199
2512
  get(id: string): Promise<GetTemplateResponse>;
2200
- update(id: string, payload: {
2201
- name?: string;
2202
- subject?: string;
2203
- html?: string;
2204
- content?: string;
2205
- }): Promise<UpdateTemplateResponse>;
2513
+ update(id: string, payload: UpdateTemplatePayload): Promise<UpdateTemplateResponse>;
2206
2514
  delete(id: string): Promise<DeleteTemplateResponse>;
2207
2515
  }
2208
2516
 
@@ -2228,6 +2536,13 @@ type DeleteWebhookResponse = {
2228
2536
  } | null;
2229
2537
  error: ErrorResponse | null;
2230
2538
  };
2539
+ /**
2540
+ * Webhooks resource
2541
+ *
2542
+ * @remarks
2543
+ * This resource is currently in development and not fully implemented on the server side yet.
2544
+ * The methods below are placeholders/preparations for the future implementation.
2545
+ */
2231
2546
  declare class Webhooks {
2232
2547
  private readonly unsent;
2233
2548
  constructor(unsent: unsent);
@@ -2243,8 +2558,9 @@ declare class Webhooks {
2243
2558
  delete(id: string): Promise<DeleteWebhookResponse>;
2244
2559
  }
2245
2560
 
2561
+ type GetAnalyticsResponseSuccess = paths["/v1/analytics"]["get"]["responses"]["200"]["content"]["application/json"];
2246
2562
  type GetAnalyticsResponse = {
2247
- data: any | null;
2563
+ data: GetAnalyticsResponseSuccess | null;
2248
2564
  error: ErrorResponse | null;
2249
2565
  };
2250
2566
  type GetTimeSeriesResponseSuccess = paths["/v1/analytics/time-series"]["get"]["responses"]["200"]["content"]["application/json"];
@@ -2260,7 +2576,7 @@ type GetReputationResponse = {
2260
2576
  declare class Analytics {
2261
2577
  private readonly unsent;
2262
2578
  constructor(unsent: unsent);
2263
- get(query?: Record<string, string>): Promise<GetAnalyticsResponse>;
2579
+ get(): Promise<GetAnalyticsResponse>;
2264
2580
  getTimeSeries(query?: {
2265
2581
  days?: number;
2266
2582
  domain?: string;
@@ -2270,7 +2586,7 @@ declare class Analytics {
2270
2586
  }): Promise<GetReputationResponse>;
2271
2587
  }
2272
2588
 
2273
- type CreateCampaignPayload = paths["/v1/campaigns"]["post"]["requestBody"]["content"]["application/json"];
2589
+ type CreateCampaignPayload = NonNullable<paths["/v1/campaigns"]["post"]["requestBody"]>["content"]["application/json"];
2274
2590
  type CreateCampaignResponseSuccess = paths["/v1/campaigns"]["post"]["responses"]["200"]["content"]["application/json"];
2275
2591
  type CreateCampaignResponse = {
2276
2592
  data: CreateCampaignResponseSuccess | null;
@@ -2281,26 +2597,26 @@ type GetCampaignResponse = {
2281
2597
  data: GetCampaignResponseSuccess | null;
2282
2598
  error: ErrorResponse | null;
2283
2599
  };
2284
- type ScheduleCampaignPayload = paths["/v1/campaigns/{campaignId}/schedule"]["post"]["requestBody"]["content"]["application/json"];
2600
+ type ScheduleCampaignPayload = NonNullable<paths["/v1/campaigns/{campaignId}/schedule"]["post"]["requestBody"]>["content"]["application/json"];
2285
2601
  type ScheduleCampaignResponseSuccess = paths["/v1/campaigns/{campaignId}/schedule"]["post"]["responses"]["200"]["content"]["application/json"];
2286
2602
  type ScheduleCampaignResponse = {
2287
2603
  data: ScheduleCampaignResponseSuccess | null;
2288
2604
  error: ErrorResponse | null;
2289
2605
  };
2290
- type CampaignActionResponseSuccess = {
2291
- success: boolean;
2292
- };
2606
+ type CampaignActionResponseSuccess = paths["/v1/campaigns/{campaignId}/pause"]["post"]["responses"]["200"]["content"]["application/json"];
2293
2607
  type CampaignActionResponse = {
2294
2608
  data: CampaignActionResponseSuccess | null;
2295
2609
  error: ErrorResponse | null;
2296
2610
  };
2611
+ type ListCampaignsResponseSuccess = paths["/v1/campaigns"]["get"]["responses"]["200"]["content"]["application/json"];
2612
+ type ListCampaignsResponse = {
2613
+ data: ListCampaignsResponseSuccess | null;
2614
+ error: ErrorResponse | null;
2615
+ };
2297
2616
  declare class Campaigns {
2298
2617
  private readonly unsent;
2299
2618
  constructor(unsent: unsent);
2300
- list(): Promise<{
2301
- data: any[] | null;
2302
- error: ErrorResponse | null;
2303
- }>;
2619
+ list(): Promise<ListCampaignsResponse>;
2304
2620
  create(payload: CreateCampaignPayload): Promise<CreateCampaignResponse>;
2305
2621
  get(campaignId: string): Promise<GetCampaignResponse>;
2306
2622
  schedule(campaignId: string, payload: ScheduleCampaignPayload): Promise<ScheduleCampaignResponse>;
@@ -2308,20 +2624,20 @@ declare class Campaigns {
2308
2624
  resume(campaignId: string): Promise<CampaignActionResponse>;
2309
2625
  }
2310
2626
 
2627
+ type ListSuppressionsResponseSuccess = paths["/v1/suppressions"]["get"]["responses"]["200"]["content"]["application/json"];
2311
2628
  type ListSuppressionsResponse = {
2312
- data: any[] | null;
2629
+ data: ListSuppressionsResponseSuccess | null;
2313
2630
  error: ErrorResponse | null;
2314
2631
  };
2632
+ type CreateSuppressionPayload = NonNullable<paths["/v1/suppressions"]["post"]["requestBody"]>["content"]["application/json"];
2633
+ type AddSuppressionResponseSuccess = paths["/v1/suppressions"]["post"]["responses"]["200"]["content"]["application/json"];
2315
2634
  type AddSuppressionResponse = {
2316
- data: {
2317
- id: string;
2318
- } | null;
2635
+ data: AddSuppressionResponseSuccess | null;
2319
2636
  error: ErrorResponse | null;
2320
2637
  };
2638
+ type DeleteSuppressionResponseSuccess = paths["/v1/suppressions/email/{email}"]["delete"]["responses"]["200"]["content"]["application/json"];
2321
2639
  type DeleteSuppressionResponse = {
2322
- data: {
2323
- success: boolean;
2324
- } | null;
2640
+ data: DeleteSuppressionResponseSuccess | null;
2325
2641
  error: ErrorResponse | null;
2326
2642
  };
2327
2643
  declare class Suppressions {
@@ -2330,38 +2646,34 @@ declare class Suppressions {
2330
2646
  list(query?: {
2331
2647
  page?: number;
2332
2648
  limit?: number;
2649
+ search?: string;
2650
+ reason?: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE";
2333
2651
  }): Promise<ListSuppressionsResponse>;
2334
- add(payload: {
2335
- email: string;
2336
- reason?: string;
2337
- }): Promise<AddSuppressionResponse>;
2652
+ add(payload: CreateSuppressionPayload): Promise<AddSuppressionResponse>;
2338
2653
  delete(email: string): Promise<DeleteSuppressionResponse>;
2339
2654
  }
2340
2655
 
2656
+ type ListApiKeysResponseSuccess = paths["/v1/api-keys"]["get"]["responses"]["200"]["content"]["application/json"];
2341
2657
  type ListApiKeysResponse = {
2342
- data: any[] | null;
2658
+ data: ListApiKeysResponseSuccess | null;
2343
2659
  error: ErrorResponse | null;
2344
2660
  };
2661
+ type CreateApiKeyPayload = NonNullable<paths["/v1/api-keys"]["post"]["requestBody"]>["content"]["application/json"];
2662
+ type CreateApiKeyResponseSuccess = paths["/v1/api-keys"]["post"]["responses"]["200"]["content"]["application/json"];
2345
2663
  type CreateApiKeyResponse = {
2346
- data: {
2347
- token: string;
2348
- } | null;
2664
+ data: CreateApiKeyResponseSuccess | null;
2349
2665
  error: ErrorResponse | null;
2350
2666
  };
2667
+ type DeleteApiKeyResponseSuccess = paths["/v1/api-keys/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
2351
2668
  type DeleteApiKeyResponse = {
2352
- data: {
2353
- success: boolean;
2354
- } | null;
2669
+ data: DeleteApiKeyResponseSuccess | null;
2355
2670
  error: ErrorResponse | null;
2356
2671
  };
2357
2672
  declare class ApiKeys {
2358
2673
  private readonly unsent;
2359
2674
  constructor(unsent: unsent);
2360
2675
  list(): Promise<ListApiKeysResponse>;
2361
- create(payload: {
2362
- name: string;
2363
- permission?: "FULL" | "SENDING";
2364
- }): Promise<CreateApiKeyResponse>;
2676
+ create(payload: CreateApiKeyPayload): Promise<CreateApiKeyResponse>;
2365
2677
  delete(id: string): Promise<DeleteApiKeyResponse>;
2366
2678
  }
2367
2679