@wraps.dev/client 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -46,6 +46,50 @@ interface paths {
46
46
  patch?: never;
47
47
  trace?: never;
48
48
  };
49
+ "/v1/connections/": {
50
+ parameters: {
51
+ query?: never;
52
+ header?: never;
53
+ path?: never;
54
+ cookie?: never;
55
+ };
56
+ /**
57
+ * List AWS connections
58
+ * @description Returns all AWS account connections for the authenticated organization.
59
+ */
60
+ get: operations["getV1Connections"];
61
+ put?: never;
62
+ /**
63
+ * Register or update an AWS connection
64
+ * @description Registers or updates the AWS account connection. Returns externalId for IAM role trust policy and webhookSecret for EventBridge configuration.
65
+ */
66
+ post: operations["postV1Connections"];
67
+ delete?: never;
68
+ options?: never;
69
+ head?: never;
70
+ patch?: never;
71
+ trace?: never;
72
+ };
73
+ "/v1/connections/{id}": {
74
+ parameters: {
75
+ query?: never;
76
+ header?: never;
77
+ path?: never;
78
+ cookie?: never;
79
+ };
80
+ get?: never;
81
+ put?: never;
82
+ post?: never;
83
+ /**
84
+ * Disconnect an AWS account
85
+ * @description Clears the webhook secret for the connection. The account record is preserved.
86
+ */
87
+ delete: operations["deleteV1ConnectionsById"];
88
+ options?: never;
89
+ head?: never;
90
+ patch?: never;
91
+ trace?: never;
92
+ };
49
93
  "/v1/contacts/": {
50
94
  parameters: {
51
95
  query?: never;
@@ -102,6 +146,26 @@ interface paths {
102
146
  patch: operations["patchV1ContactsById"];
103
147
  trace?: never;
104
148
  };
149
+ "/v1/contacts/{id}/topics": {
150
+ parameters: {
151
+ query?: never;
152
+ header?: never;
153
+ path?: never;
154
+ cookie?: never;
155
+ };
156
+ get?: never;
157
+ /**
158
+ * Replace contact topics
159
+ * @description Replaces all topic subscriptions for a contact. Use PATCH to add topics without removing existing ones.
160
+ */
161
+ put: operations["putV1ContactsByIdTopics"];
162
+ post?: never;
163
+ delete?: never;
164
+ options?: never;
165
+ head?: never;
166
+ patch?: never;
167
+ trace?: never;
168
+ };
105
169
  "/v1/batch/": {
106
170
  parameters: {
107
171
  query?: never;
@@ -270,6 +334,154 @@ interface paths {
270
334
  patch?: never;
271
335
  trace?: never;
272
336
  };
337
+ "/v1/templates/push": {
338
+ parameters: {
339
+ query?: never;
340
+ header?: never;
341
+ path?: never;
342
+ cookie?: never;
343
+ };
344
+ get?: never;
345
+ put?: never;
346
+ /**
347
+ * Push a template from CLI
348
+ * @description Upserts a template compiled from React Email source. Used by `wraps push`.
349
+ */
350
+ post: operations["postV1TemplatesPush"];
351
+ delete?: never;
352
+ options?: never;
353
+ head?: never;
354
+ patch?: never;
355
+ trace?: never;
356
+ };
357
+ "/v1/templates/push/batch": {
358
+ parameters: {
359
+ query?: never;
360
+ header?: never;
361
+ path?: never;
362
+ cookie?: never;
363
+ };
364
+ get?: never;
365
+ put?: never;
366
+ /**
367
+ * Push multiple templates from CLI
368
+ * @description Batch upsert templates compiled from React Email source.
369
+ */
370
+ post: operations["postV1TemplatesPushBatch"];
371
+ delete?: never;
372
+ options?: never;
373
+ head?: never;
374
+ patch?: never;
375
+ trace?: never;
376
+ };
377
+ "/v1/templates/pull": {
378
+ parameters: {
379
+ query?: never;
380
+ header?: never;
381
+ path?: never;
382
+ cookie?: never;
383
+ };
384
+ /**
385
+ * Pull templates for CLI sync
386
+ * @description Returns all templates pushed from CLI with their React Email source.
387
+ */
388
+ get: operations["getV1TemplatesPull"];
389
+ put?: never;
390
+ post?: never;
391
+ delete?: never;
392
+ options?: never;
393
+ head?: never;
394
+ patch?: never;
395
+ trace?: never;
396
+ };
397
+ "/tools/email-check": {
398
+ parameters: {
399
+ query?: never;
400
+ header?: never;
401
+ path?: never;
402
+ cookie?: never;
403
+ };
404
+ get?: never;
405
+ put?: never;
406
+ /**
407
+ * Check email deliverability
408
+ * @description Comprehensive email deliverability check for any domain. Returns SPF, DKIM, DMARC status and a grade. Optionally provide DKIM selectors for providers like AWS SES that use random selectors.
409
+ */
410
+ post: operations["postToolsEmail-check"];
411
+ delete?: never;
412
+ options?: never;
413
+ head?: never;
414
+ patch?: never;
415
+ trace?: never;
416
+ };
417
+ "/tools/email-check/{domain}": {
418
+ parameters: {
419
+ query?: never;
420
+ header?: never;
421
+ path?: never;
422
+ cookie?: never;
423
+ };
424
+ /**
425
+ * Check email deliverability (GET)
426
+ * @description Quick email deliverability check for any domain via GET request.
427
+ */
428
+ get: operations["getToolsEmail-checkByDomain"];
429
+ put?: never;
430
+ post?: never;
431
+ delete?: never;
432
+ options?: never;
433
+ head?: never;
434
+ patch?: never;
435
+ trace?: never;
436
+ };
437
+ "/v1/workflow-schedules/{workflowId}/enable": {
438
+ parameters: {
439
+ query?: never;
440
+ header?: never;
441
+ path?: never;
442
+ cookie?: never;
443
+ };
444
+ get?: never;
445
+ put?: never;
446
+ post: operations["postV1Workflow-schedulesByWorkflowIdEnable"];
447
+ delete?: never;
448
+ options?: never;
449
+ head?: never;
450
+ patch?: never;
451
+ trace?: never;
452
+ };
453
+ "/v1/workflow-schedules/{workflowId}/disable": {
454
+ parameters: {
455
+ query?: never;
456
+ header?: never;
457
+ path?: never;
458
+ cookie?: never;
459
+ };
460
+ get?: never;
461
+ put?: never;
462
+ post: operations["postV1Workflow-schedulesByWorkflowIdDisable"];
463
+ delete?: never;
464
+ options?: never;
465
+ head?: never;
466
+ patch?: never;
467
+ trace?: never;
468
+ };
469
+ "/v1/workflow-schedules/{workflowId}": {
470
+ parameters: {
471
+ query?: never;
472
+ header?: never;
473
+ path?: never;
474
+ cookie?: never;
475
+ };
476
+ get?: never;
477
+ put: operations["putV1Workflow-schedulesByWorkflowId"];
478
+ post?: never;
479
+ delete?: never;
480
+ options?: never;
481
+ head?: never;
482
+ patch?: never;
483
+ trace?: never;
484
+ };
273
485
  }
274
486
  interface operations {
275
487
  getHealth: {
@@ -285,7 +497,59 @@ interface operations {
285
497
  headers: {
286
498
  [name: string]: unknown;
287
499
  };
288
- content?: never;
500
+ content: {
501
+ "application/json": {
502
+ /**
503
+ * @description Health status
504
+ * @example ok
505
+ */
506
+ status: string;
507
+ /**
508
+ * Format: date-time
509
+ * @description ISO 8601 timestamp
510
+ */
511
+ timestamp: string;
512
+ /**
513
+ * @description API version
514
+ * @example 1.0.0
515
+ */
516
+ version: string;
517
+ };
518
+ "multipart/form-data": {
519
+ /**
520
+ * @description Health status
521
+ * @example ok
522
+ */
523
+ status: string;
524
+ /**
525
+ * Format: date-time
526
+ * @description ISO 8601 timestamp
527
+ */
528
+ timestamp: string;
529
+ /**
530
+ * @description API version
531
+ * @example 1.0.0
532
+ */
533
+ version: string;
534
+ };
535
+ "text/plain": {
536
+ /**
537
+ * @description Health status
538
+ * @example ok
539
+ */
540
+ status: string;
541
+ /**
542
+ * Format: date-time
543
+ * @description ISO 8601 timestamp
544
+ */
545
+ timestamp: string;
546
+ /**
547
+ * @description API version
548
+ * @example 1.0.0
549
+ */
550
+ version: string;
551
+ };
552
+ };
289
553
  };
290
554
  };
291
555
  };
@@ -302,19 +566,38 @@ interface operations {
302
566
  headers: {
303
567
  [name: string]: unknown;
304
568
  };
305
- content?: never;
569
+ content: {
570
+ "application/json": {
571
+ /** @description API name */
572
+ name: string;
573
+ /** @description API version */
574
+ version: string;
575
+ /** @description Documentation URL */
576
+ docs: string;
577
+ };
578
+ "multipart/form-data": {
579
+ /** @description API name */
580
+ name: string;
581
+ /** @description API version */
582
+ version: string;
583
+ /** @description Documentation URL */
584
+ docs: string;
585
+ };
586
+ "text/plain": {
587
+ /** @description API name */
588
+ name: string;
589
+ /** @description API version */
590
+ version: string;
591
+ /** @description Documentation URL */
592
+ docs: string;
593
+ };
594
+ };
306
595
  };
307
596
  };
308
597
  };
309
- getV1Contacts: {
598
+ getV1Connections: {
310
599
  parameters: {
311
- query?: {
312
- page?: string;
313
- pageSize?: string;
314
- emailStatus?: string;
315
- smsStatus?: string;
316
- search?: string;
317
- };
600
+ query?: never;
318
601
  header?: never;
319
602
  path?: never;
320
603
  cookie?: never;
@@ -329,7 +612,7 @@ interface operations {
329
612
  };
330
613
  };
331
614
  };
332
- postV1Contacts: {
615
+ postV1Connections: {
333
616
  parameters: {
334
617
  query?: never;
335
618
  header?: never;
@@ -339,49 +622,40 @@ interface operations {
339
622
  requestBody: {
340
623
  content: {
341
624
  "application/json": {
342
- email?: string;
343
- phone?: string;
344
- firstName?: string;
345
- lastName?: string;
346
- company?: string;
347
- jobTitle?: string;
348
- emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
349
- smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
350
- properties?: {
625
+ /** @description AWS account ID (12 digits) */
626
+ accountId: string;
627
+ /** @description AWS region (e.g. us-east-1) */
628
+ region: string;
629
+ /** @description Display name for the account */
630
+ name?: string;
631
+ /** @description Service features config */
632
+ features?: {
351
633
  [key: string]: unknown;
352
634
  };
353
- topicIds?: string[];
354
- topicSlugs?: string[];
355
635
  };
356
636
  "multipart/form-data": {
357
- email?: string;
358
- phone?: string;
359
- firstName?: string;
360
- lastName?: string;
361
- company?: string;
362
- jobTitle?: string;
363
- emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
364
- smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
365
- properties?: {
637
+ /** @description AWS account ID (12 digits) */
638
+ accountId: string;
639
+ /** @description AWS region (e.g. us-east-1) */
640
+ region: string;
641
+ /** @description Display name for the account */
642
+ name?: string;
643
+ /** @description Service features config */
644
+ features?: {
366
645
  [key: string]: unknown;
367
646
  };
368
- topicIds?: string[];
369
- topicSlugs?: string[];
370
647
  };
371
648
  "text/plain": {
372
- email?: string;
373
- phone?: string;
374
- firstName?: string;
375
- lastName?: string;
376
- company?: string;
377
- jobTitle?: string;
378
- emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
379
- smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
380
- properties?: {
649
+ /** @description AWS account ID (12 digits) */
650
+ accountId: string;
651
+ /** @description AWS region (e.g. us-east-1) */
652
+ region: string;
653
+ /** @description Display name for the account */
654
+ name?: string;
655
+ /** @description Service features config */
656
+ features?: {
381
657
  [key: string]: unknown;
382
658
  };
383
- topicIds?: string[];
384
- topicSlugs?: string[];
385
659
  };
386
660
  };
387
661
  };
@@ -394,61 +668,42 @@ interface operations {
394
668
  };
395
669
  };
396
670
  };
397
- deleteV1Contacts: {
671
+ deleteV1ConnectionsById: {
398
672
  parameters: {
399
673
  query?: never;
400
674
  header?: never;
401
- path?: never;
675
+ path: {
676
+ /** @description Connection ID */
677
+ id: string;
678
+ };
402
679
  cookie?: never;
403
680
  };
404
- requestBody: {
405
- content: {
406
- "application/json": {
407
- ids: string[];
408
- };
409
- "multipart/form-data": {
410
- ids: string[];
411
- };
412
- "text/plain": {
413
- ids: string[];
414
- };
415
- };
416
- };
417
- responses: {
418
- 200: {
419
- headers: {
420
- [name: string]: unknown;
681
+ requestBody?: never;
682
+ responses: {
683
+ 200: {
684
+ headers: {
685
+ [name: string]: unknown;
421
686
  };
422
687
  content?: never;
423
688
  };
424
689
  };
425
690
  };
426
- getV1ContactsById: {
691
+ getV1Contacts: {
427
692
  parameters: {
428
- query?: never;
429
- header?: never;
430
- path: {
431
- id: string;
432
- };
433
- cookie?: never;
434
- };
435
- requestBody?: never;
436
- responses: {
437
- 200: {
438
- headers: {
439
- [name: string]: unknown;
440
- };
441
- content?: never;
693
+ query?: {
694
+ /** @description Page number (1-indexed) */
695
+ page?: string;
696
+ /** @description Number of items per page (max 100) */
697
+ pageSize?: string;
698
+ /** @description Filter by email status */
699
+ emailStatus?: string;
700
+ /** @description Filter by SMS status */
701
+ smsStatus?: string;
702
+ /** @description Search by email or phone */
703
+ search?: string;
442
704
  };
443
- };
444
- };
445
- deleteV1ContactsById: {
446
- parameters: {
447
- query?: never;
448
705
  header?: never;
449
- path: {
450
- id: string;
451
- };
706
+ path?: never;
452
707
  cookie?: never;
453
708
  };
454
709
  requestBody?: never;
@@ -457,78 +712,443 @@ interface operations {
457
712
  headers: {
458
713
  [name: string]: unknown;
459
714
  };
460
- content?: never;
715
+ content: {
716
+ "application/json": {
717
+ contacts: {
718
+ /** @description Contact ID */
719
+ id: string;
720
+ /** @description Email address */
721
+ email: string | null;
722
+ /** @description Phone number */
723
+ phone: string | null;
724
+ /** @description First name */
725
+ firstName: string | null;
726
+ /** @description Last name */
727
+ lastName: string | null;
728
+ /** @description Company name */
729
+ company: string | null;
730
+ /** @description Job title */
731
+ jobTitle: string | null;
732
+ /** @description Email subscription status */
733
+ emailStatus: string | null;
734
+ /** @description SMS subscription status */
735
+ smsStatus: string | null;
736
+ properties: {
737
+ [key: string]: unknown;
738
+ };
739
+ /** @description Number of emails sent */
740
+ emailsSent: number;
741
+ /** @description Number of emails opened */
742
+ emailsOpened: number;
743
+ /** @description Number of emails clicked */
744
+ emailsClicked: number;
745
+ /** @description Number of SMS sent */
746
+ smsSent: number;
747
+ /** @description Number of SMS clicked */
748
+ smsClicked: number;
749
+ /**
750
+ * Format: date-time
751
+ * @description Creation timestamp
752
+ */
753
+ createdAt: string;
754
+ /**
755
+ * Format: date-time
756
+ * @description Last update timestamp
757
+ */
758
+ updatedAt: string;
759
+ }[];
760
+ /** @description Total number of contacts matching filter */
761
+ total: number;
762
+ /** @description Current page number */
763
+ page: number;
764
+ /** @description Number of items per page */
765
+ pageSize: number;
766
+ /** @description Total number of pages */
767
+ totalPages: number;
768
+ };
769
+ "multipart/form-data": {
770
+ contacts: {
771
+ /** @description Contact ID */
772
+ id: string;
773
+ /** @description Email address */
774
+ email: string | null;
775
+ /** @description Phone number */
776
+ phone: string | null;
777
+ /** @description First name */
778
+ firstName: string | null;
779
+ /** @description Last name */
780
+ lastName: string | null;
781
+ /** @description Company name */
782
+ company: string | null;
783
+ /** @description Job title */
784
+ jobTitle: string | null;
785
+ /** @description Email subscription status */
786
+ emailStatus: string | null;
787
+ /** @description SMS subscription status */
788
+ smsStatus: string | null;
789
+ properties: {
790
+ [key: string]: unknown;
791
+ };
792
+ /** @description Number of emails sent */
793
+ emailsSent: number;
794
+ /** @description Number of emails opened */
795
+ emailsOpened: number;
796
+ /** @description Number of emails clicked */
797
+ emailsClicked: number;
798
+ /** @description Number of SMS sent */
799
+ smsSent: number;
800
+ /** @description Number of SMS clicked */
801
+ smsClicked: number;
802
+ /**
803
+ * Format: date-time
804
+ * @description Creation timestamp
805
+ */
806
+ createdAt: string;
807
+ /**
808
+ * Format: date-time
809
+ * @description Last update timestamp
810
+ */
811
+ updatedAt: string;
812
+ }[];
813
+ /** @description Total number of contacts matching filter */
814
+ total: number;
815
+ /** @description Current page number */
816
+ page: number;
817
+ /** @description Number of items per page */
818
+ pageSize: number;
819
+ /** @description Total number of pages */
820
+ totalPages: number;
821
+ };
822
+ "text/plain": {
823
+ contacts: {
824
+ /** @description Contact ID */
825
+ id: string;
826
+ /** @description Email address */
827
+ email: string | null;
828
+ /** @description Phone number */
829
+ phone: string | null;
830
+ /** @description First name */
831
+ firstName: string | null;
832
+ /** @description Last name */
833
+ lastName: string | null;
834
+ /** @description Company name */
835
+ company: string | null;
836
+ /** @description Job title */
837
+ jobTitle: string | null;
838
+ /** @description Email subscription status */
839
+ emailStatus: string | null;
840
+ /** @description SMS subscription status */
841
+ smsStatus: string | null;
842
+ properties: {
843
+ [key: string]: unknown;
844
+ };
845
+ /** @description Number of emails sent */
846
+ emailsSent: number;
847
+ /** @description Number of emails opened */
848
+ emailsOpened: number;
849
+ /** @description Number of emails clicked */
850
+ emailsClicked: number;
851
+ /** @description Number of SMS sent */
852
+ smsSent: number;
853
+ /** @description Number of SMS clicked */
854
+ smsClicked: number;
855
+ /**
856
+ * Format: date-time
857
+ * @description Creation timestamp
858
+ */
859
+ createdAt: string;
860
+ /**
861
+ * Format: date-time
862
+ * @description Last update timestamp
863
+ */
864
+ updatedAt: string;
865
+ }[];
866
+ /** @description Total number of contacts matching filter */
867
+ total: number;
868
+ /** @description Current page number */
869
+ page: number;
870
+ /** @description Number of items per page */
871
+ pageSize: number;
872
+ /** @description Total number of pages */
873
+ totalPages: number;
874
+ };
875
+ };
461
876
  };
462
877
  };
463
878
  };
464
- patchV1ContactsById: {
879
+ postV1Contacts: {
465
880
  parameters: {
466
881
  query?: never;
467
882
  header?: never;
468
- path: {
469
- id: string;
470
- };
883
+ path?: never;
471
884
  cookie?: never;
472
885
  };
473
886
  requestBody: {
474
887
  content: {
475
888
  "application/json": {
889
+ /** @description Email address */
476
890
  email?: string;
891
+ /** @description Phone number */
477
892
  phone?: string;
478
- firstName?: (string | null) | null;
479
- lastName?: (string | null) | null;
480
- company?: (string | null) | null;
481
- jobTitle?: (string | null) | null;
893
+ /** @description First name */
894
+ firstName?: string;
895
+ /** @description Last name */
896
+ lastName?: string;
897
+ /** @description Company name */
898
+ company?: string;
899
+ /** @description Job title */
900
+ jobTitle?: string;
901
+ /** @description Email subscription status */
482
902
  emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
903
+ /** @description SMS consent status */
483
904
  smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
905
+ /** @description Custom properties */
484
906
  properties?: {
485
907
  [key: string]: unknown;
486
908
  };
909
+ /** @description Topic IDs to subscribe */
487
910
  topicIds?: string[];
911
+ /** @description Topic slugs to subscribe */
488
912
  topicSlugs?: string[];
489
913
  };
490
914
  "multipart/form-data": {
915
+ /** @description Email address */
491
916
  email?: string;
917
+ /** @description Phone number */
492
918
  phone?: string;
493
- firstName?: (string | null) | null;
494
- lastName?: (string | null) | null;
495
- company?: (string | null) | null;
496
- jobTitle?: (string | null) | null;
919
+ /** @description First name */
920
+ firstName?: string;
921
+ /** @description Last name */
922
+ lastName?: string;
923
+ /** @description Company name */
924
+ company?: string;
925
+ /** @description Job title */
926
+ jobTitle?: string;
927
+ /** @description Email subscription status */
497
928
  emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
929
+ /** @description SMS consent status */
498
930
  smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
931
+ /** @description Custom properties */
499
932
  properties?: {
500
933
  [key: string]: unknown;
501
934
  };
935
+ /** @description Topic IDs to subscribe */
502
936
  topicIds?: string[];
937
+ /** @description Topic slugs to subscribe */
503
938
  topicSlugs?: string[];
504
939
  };
505
940
  "text/plain": {
941
+ /** @description Email address */
506
942
  email?: string;
943
+ /** @description Phone number */
507
944
  phone?: string;
508
- firstName?: (string | null) | null;
509
- lastName?: (string | null) | null;
510
- company?: (string | null) | null;
511
- jobTitle?: (string | null) | null;
945
+ /** @description First name */
946
+ firstName?: string;
947
+ /** @description Last name */
948
+ lastName?: string;
949
+ /** @description Company name */
950
+ company?: string;
951
+ /** @description Job title */
952
+ jobTitle?: string;
953
+ /** @description Email subscription status */
512
954
  emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
955
+ /** @description SMS consent status */
513
956
  smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
957
+ /** @description Custom properties */
514
958
  properties?: {
515
959
  [key: string]: unknown;
516
960
  };
961
+ /** @description Topic IDs to subscribe */
517
962
  topicIds?: string[];
963
+ /** @description Topic slugs to subscribe */
518
964
  topicSlugs?: string[];
519
965
  };
520
966
  };
521
967
  };
522
968
  responses: {
523
- 200: {
969
+ 201: {
524
970
  headers: {
525
971
  [name: string]: unknown;
526
972
  };
527
- content?: never;
973
+ content: {
974
+ "application/json": {
975
+ /** @description Contact ID */
976
+ id: string;
977
+ /** @description Email address */
978
+ email: string | null;
979
+ /** @description Phone number */
980
+ phone: string | null;
981
+ /** @description First name */
982
+ firstName: string | null;
983
+ /** @description Last name */
984
+ lastName: string | null;
985
+ /** @description Company name */
986
+ company: string | null;
987
+ /** @description Job title */
988
+ jobTitle: string | null;
989
+ /** @description Email subscription status */
990
+ emailStatus: string | null;
991
+ /** @description SMS subscription status */
992
+ smsStatus: string | null;
993
+ properties: {
994
+ [key: string]: unknown;
995
+ };
996
+ /** @description Number of emails sent */
997
+ emailsSent: number;
998
+ /** @description Number of emails opened */
999
+ emailsOpened: number;
1000
+ /** @description Number of emails clicked */
1001
+ emailsClicked: number;
1002
+ /** @description Number of SMS sent */
1003
+ smsSent: number;
1004
+ /** @description Number of SMS clicked */
1005
+ smsClicked: number;
1006
+ /**
1007
+ * Format: date-time
1008
+ * @description Creation timestamp
1009
+ */
1010
+ createdAt: string;
1011
+ /**
1012
+ * Format: date-time
1013
+ * @description Last update timestamp
1014
+ */
1015
+ updatedAt: string;
1016
+ /** @description Topic IDs pending confirmation */
1017
+ pendingTopics?: string[];
1018
+ };
1019
+ "multipart/form-data": {
1020
+ /** @description Contact ID */
1021
+ id: string;
1022
+ /** @description Email address */
1023
+ email: string | null;
1024
+ /** @description Phone number */
1025
+ phone: string | null;
1026
+ /** @description First name */
1027
+ firstName: string | null;
1028
+ /** @description Last name */
1029
+ lastName: string | null;
1030
+ /** @description Company name */
1031
+ company: string | null;
1032
+ /** @description Job title */
1033
+ jobTitle: string | null;
1034
+ /** @description Email subscription status */
1035
+ emailStatus: string | null;
1036
+ /** @description SMS subscription status */
1037
+ smsStatus: string | null;
1038
+ properties: {
1039
+ [key: string]: unknown;
1040
+ };
1041
+ /** @description Number of emails sent */
1042
+ emailsSent: number;
1043
+ /** @description Number of emails opened */
1044
+ emailsOpened: number;
1045
+ /** @description Number of emails clicked */
1046
+ emailsClicked: number;
1047
+ /** @description Number of SMS sent */
1048
+ smsSent: number;
1049
+ /** @description Number of SMS clicked */
1050
+ smsClicked: number;
1051
+ /**
1052
+ * Format: date-time
1053
+ * @description Creation timestamp
1054
+ */
1055
+ createdAt: string;
1056
+ /**
1057
+ * Format: date-time
1058
+ * @description Last update timestamp
1059
+ */
1060
+ updatedAt: string;
1061
+ /** @description Topic IDs pending confirmation */
1062
+ pendingTopics?: string[];
1063
+ };
1064
+ "text/plain": {
1065
+ /** @description Contact ID */
1066
+ id: string;
1067
+ /** @description Email address */
1068
+ email: string | null;
1069
+ /** @description Phone number */
1070
+ phone: string | null;
1071
+ /** @description First name */
1072
+ firstName: string | null;
1073
+ /** @description Last name */
1074
+ lastName: string | null;
1075
+ /** @description Company name */
1076
+ company: string | null;
1077
+ /** @description Job title */
1078
+ jobTitle: string | null;
1079
+ /** @description Email subscription status */
1080
+ emailStatus: string | null;
1081
+ /** @description SMS subscription status */
1082
+ smsStatus: string | null;
1083
+ properties: {
1084
+ [key: string]: unknown;
1085
+ };
1086
+ /** @description Number of emails sent */
1087
+ emailsSent: number;
1088
+ /** @description Number of emails opened */
1089
+ emailsOpened: number;
1090
+ /** @description Number of emails clicked */
1091
+ emailsClicked: number;
1092
+ /** @description Number of SMS sent */
1093
+ smsSent: number;
1094
+ /** @description Number of SMS clicked */
1095
+ smsClicked: number;
1096
+ /**
1097
+ * Format: date-time
1098
+ * @description Creation timestamp
1099
+ */
1100
+ createdAt: string;
1101
+ /**
1102
+ * Format: date-time
1103
+ * @description Last update timestamp
1104
+ */
1105
+ updatedAt: string;
1106
+ /** @description Topic IDs pending confirmation */
1107
+ pendingTopics?: string[];
1108
+ };
1109
+ };
1110
+ };
1111
+ 400: {
1112
+ headers: {
1113
+ [name: string]: unknown;
1114
+ };
1115
+ content: {
1116
+ "application/json": {
1117
+ /** @description Error message */
1118
+ error: string;
1119
+ };
1120
+ "multipart/form-data": {
1121
+ /** @description Error message */
1122
+ error: string;
1123
+ };
1124
+ "text/plain": {
1125
+ /** @description Error message */
1126
+ error: string;
1127
+ };
1128
+ };
1129
+ };
1130
+ 409: {
1131
+ headers: {
1132
+ [name: string]: unknown;
1133
+ };
1134
+ content: {
1135
+ "application/json": {
1136
+ /** @description Error message */
1137
+ error: string;
1138
+ };
1139
+ "multipart/form-data": {
1140
+ /** @description Error message */
1141
+ error: string;
1142
+ };
1143
+ "text/plain": {
1144
+ /** @description Error message */
1145
+ error: string;
1146
+ };
1147
+ };
528
1148
  };
529
1149
  };
530
1150
  };
531
- postV1Batch: {
1151
+ deleteV1Contacts: {
532
1152
  parameters: {
533
1153
  query?: never;
534
1154
  header?: never;
@@ -538,61 +1158,16 @@ interface operations {
538
1158
  requestBody: {
539
1159
  content: {
540
1160
  "application/json": {
541
- channel?: "email" | "sms";
542
- name?: string;
543
- audienceType?: "all" | "topic" | "segment";
544
- topicId?: string;
545
- segmentId?: string;
546
- subject?: string;
547
- previewText?: string;
548
- from?: string;
549
- fromName?: string;
550
- replyTo?: string;
551
- templateId?: string;
552
- htmlContent?: string;
553
- body?: string;
554
- senderId?: string;
555
- scheduledFor?: string;
556
- awsAccountId: string;
557
- totalRecipients?: number;
1161
+ /** @description Contact IDs to delete (max 100) */
1162
+ ids: string[];
558
1163
  };
559
1164
  "multipart/form-data": {
560
- channel?: "email" | "sms";
561
- name?: string;
562
- audienceType?: "all" | "topic" | "segment";
563
- topicId?: string;
564
- segmentId?: string;
565
- subject?: string;
566
- previewText?: string;
567
- from?: string;
568
- fromName?: string;
569
- replyTo?: string;
570
- templateId?: string;
571
- htmlContent?: string;
572
- body?: string;
573
- senderId?: string;
574
- scheduledFor?: string;
575
- awsAccountId: string;
576
- totalRecipients?: number;
1165
+ /** @description Contact IDs to delete (max 100) */
1166
+ ids: string[];
577
1167
  };
578
1168
  "text/plain": {
579
- channel?: "email" | "sms";
580
- name?: string;
581
- audienceType?: "all" | "topic" | "segment";
582
- topicId?: string;
583
- segmentId?: string;
584
- subject?: string;
585
- previewText?: string;
586
- from?: string;
587
- fromName?: string;
588
- replyTo?: string;
589
- templateId?: string;
590
- htmlContent?: string;
591
- body?: string;
592
- senderId?: string;
593
- scheduledFor?: string;
594
- awsAccountId: string;
595
- totalRecipients?: number;
1169
+ /** @description Contact IDs to delete (max 100) */
1170
+ ids: string[];
596
1171
  };
597
1172
  };
598
1173
  };
@@ -603,35 +1178,49 @@ interface operations {
603
1178
  };
604
1179
  content: {
605
1180
  "application/json": {
606
- id: string;
607
- status: string;
608
- channel: string;
609
- totalRecipients: number;
610
- createdAt: string;
1181
+ success: boolean;
1182
+ /** @description Number of contacts deleted */
1183
+ deleted: number;
611
1184
  };
612
1185
  "multipart/form-data": {
613
- id: string;
614
- status: string;
615
- channel: string;
616
- totalRecipients: number;
617
- createdAt: string;
1186
+ success: boolean;
1187
+ /** @description Number of contacts deleted */
1188
+ deleted: number;
618
1189
  };
619
1190
  "text/plain": {
620
- id: string;
621
- status: string;
622
- channel: string;
623
- totalRecipients: number;
624
- createdAt: string;
1191
+ success: boolean;
1192
+ /** @description Number of contacts deleted */
1193
+ deleted: number;
1194
+ };
1195
+ };
1196
+ };
1197
+ 400: {
1198
+ headers: {
1199
+ [name: string]: unknown;
1200
+ };
1201
+ content: {
1202
+ "application/json": {
1203
+ /** @description Error message */
1204
+ error: string;
1205
+ };
1206
+ "multipart/form-data": {
1207
+ /** @description Error message */
1208
+ error: string;
1209
+ };
1210
+ "text/plain": {
1211
+ /** @description Error message */
1212
+ error: string;
625
1213
  };
626
1214
  };
627
1215
  };
628
1216
  };
629
1217
  };
630
- getV1BatchById: {
1218
+ getV1ContactsById: {
631
1219
  parameters: {
632
1220
  query?: never;
633
1221
  header?: never;
634
1222
  path: {
1223
+ /** @description Contact ID */
635
1224
  id: string;
636
1225
  };
637
1226
  cookie?: never;
@@ -642,15 +1231,183 @@ interface operations {
642
1231
  headers: {
643
1232
  [name: string]: unknown;
644
1233
  };
645
- content?: never;
1234
+ content: {
1235
+ "application/json": {
1236
+ /** @description Contact ID */
1237
+ id: string;
1238
+ /** @description Email address */
1239
+ email: string | null;
1240
+ /** @description Phone number */
1241
+ phone: string | null;
1242
+ /** @description First name */
1243
+ firstName: string | null;
1244
+ /** @description Last name */
1245
+ lastName: string | null;
1246
+ /** @description Company name */
1247
+ company: string | null;
1248
+ /** @description Job title */
1249
+ jobTitle: string | null;
1250
+ /** @description Email subscription status */
1251
+ emailStatus: string | null;
1252
+ /** @description SMS subscription status */
1253
+ smsStatus: string | null;
1254
+ properties: {
1255
+ [key: string]: unknown;
1256
+ };
1257
+ /** @description Number of emails sent */
1258
+ emailsSent: number;
1259
+ /** @description Number of emails opened */
1260
+ emailsOpened: number;
1261
+ /** @description Number of emails clicked */
1262
+ emailsClicked: number;
1263
+ /** @description Number of SMS sent */
1264
+ smsSent: number;
1265
+ /** @description Number of SMS clicked */
1266
+ smsClicked: number;
1267
+ /**
1268
+ * Format: date-time
1269
+ * @description Creation timestamp
1270
+ */
1271
+ createdAt: string;
1272
+ /**
1273
+ * Format: date-time
1274
+ * @description Last update timestamp
1275
+ */
1276
+ updatedAt: string;
1277
+ topics: {
1278
+ topicId: string;
1279
+ topicName: string;
1280
+ status: string;
1281
+ subscribedAt: string | null;
1282
+ }[];
1283
+ };
1284
+ "multipart/form-data": {
1285
+ /** @description Contact ID */
1286
+ id: string;
1287
+ /** @description Email address */
1288
+ email: string | null;
1289
+ /** @description Phone number */
1290
+ phone: string | null;
1291
+ /** @description First name */
1292
+ firstName: string | null;
1293
+ /** @description Last name */
1294
+ lastName: string | null;
1295
+ /** @description Company name */
1296
+ company: string | null;
1297
+ /** @description Job title */
1298
+ jobTitle: string | null;
1299
+ /** @description Email subscription status */
1300
+ emailStatus: string | null;
1301
+ /** @description SMS subscription status */
1302
+ smsStatus: string | null;
1303
+ properties: {
1304
+ [key: string]: unknown;
1305
+ };
1306
+ /** @description Number of emails sent */
1307
+ emailsSent: number;
1308
+ /** @description Number of emails opened */
1309
+ emailsOpened: number;
1310
+ /** @description Number of emails clicked */
1311
+ emailsClicked: number;
1312
+ /** @description Number of SMS sent */
1313
+ smsSent: number;
1314
+ /** @description Number of SMS clicked */
1315
+ smsClicked: number;
1316
+ /**
1317
+ * Format: date-time
1318
+ * @description Creation timestamp
1319
+ */
1320
+ createdAt: string;
1321
+ /**
1322
+ * Format: date-time
1323
+ * @description Last update timestamp
1324
+ */
1325
+ updatedAt: string;
1326
+ topics: {
1327
+ topicId: string;
1328
+ topicName: string;
1329
+ status: string;
1330
+ subscribedAt: string | null;
1331
+ }[];
1332
+ };
1333
+ "text/plain": {
1334
+ /** @description Contact ID */
1335
+ id: string;
1336
+ /** @description Email address */
1337
+ email: string | null;
1338
+ /** @description Phone number */
1339
+ phone: string | null;
1340
+ /** @description First name */
1341
+ firstName: string | null;
1342
+ /** @description Last name */
1343
+ lastName: string | null;
1344
+ /** @description Company name */
1345
+ company: string | null;
1346
+ /** @description Job title */
1347
+ jobTitle: string | null;
1348
+ /** @description Email subscription status */
1349
+ emailStatus: string | null;
1350
+ /** @description SMS subscription status */
1351
+ smsStatus: string | null;
1352
+ properties: {
1353
+ [key: string]: unknown;
1354
+ };
1355
+ /** @description Number of emails sent */
1356
+ emailsSent: number;
1357
+ /** @description Number of emails opened */
1358
+ emailsOpened: number;
1359
+ /** @description Number of emails clicked */
1360
+ emailsClicked: number;
1361
+ /** @description Number of SMS sent */
1362
+ smsSent: number;
1363
+ /** @description Number of SMS clicked */
1364
+ smsClicked: number;
1365
+ /**
1366
+ * Format: date-time
1367
+ * @description Creation timestamp
1368
+ */
1369
+ createdAt: string;
1370
+ /**
1371
+ * Format: date-time
1372
+ * @description Last update timestamp
1373
+ */
1374
+ updatedAt: string;
1375
+ topics: {
1376
+ topicId: string;
1377
+ topicName: string;
1378
+ status: string;
1379
+ subscribedAt: string | null;
1380
+ }[];
1381
+ };
1382
+ };
1383
+ };
1384
+ 404: {
1385
+ headers: {
1386
+ [name: string]: unknown;
1387
+ };
1388
+ content: {
1389
+ "application/json": {
1390
+ /** @description Error message */
1391
+ error: string;
1392
+ };
1393
+ "multipart/form-data": {
1394
+ /** @description Error message */
1395
+ error: string;
1396
+ };
1397
+ "text/plain": {
1398
+ /** @description Error message */
1399
+ error: string;
1400
+ };
1401
+ };
646
1402
  };
647
1403
  };
648
1404
  };
649
- deleteV1BatchById: {
1405
+ deleteV1ContactsById: {
650
1406
  parameters: {
651
1407
  query?: never;
652
1408
  header?: never;
653
1409
  path: {
1410
+ /** @description Contact ID */
654
1411
  id: string;
655
1412
  };
656
1413
  cookie?: never;
@@ -664,67 +1421,125 @@ interface operations {
664
1421
  content: {
665
1422
  "application/json": {
666
1423
  success: boolean;
667
- id: string;
668
- status: string;
669
1424
  };
670
1425
  "multipart/form-data": {
671
1426
  success: boolean;
672
- id: string;
673
- status: string;
674
1427
  };
675
1428
  "text/plain": {
676
1429
  success: boolean;
677
- id: string;
678
- status: string;
679
1430
  };
680
1431
  };
681
1432
  };
682
- };
683
- };
684
- postV1Events: {
685
- parameters: {
686
- query?: never;
687
- header?: never;
688
- path?: never;
689
- cookie?: never;
690
- };
691
- requestBody: {
692
- content: {
1433
+ 404: {
1434
+ headers: {
1435
+ [name: string]: unknown;
1436
+ };
1437
+ content: {
1438
+ "application/json": {
1439
+ /** @description Error message */
1440
+ error: string;
1441
+ };
1442
+ "multipart/form-data": {
1443
+ /** @description Error message */
1444
+ error: string;
1445
+ };
1446
+ "text/plain": {
1447
+ /** @description Error message */
1448
+ error: string;
1449
+ };
1450
+ };
1451
+ };
1452
+ };
1453
+ };
1454
+ patchV1ContactsById: {
1455
+ parameters: {
1456
+ query?: never;
1457
+ header?: never;
1458
+ path: {
1459
+ /** @description Contact ID */
1460
+ id: string;
1461
+ };
1462
+ cookie?: never;
1463
+ };
1464
+ requestBody: {
1465
+ content: {
693
1466
  "application/json": {
694
- /** @description Event name (e.g., 'purchase.completed') */
695
- name: string;
696
- /** @description Contact ID */
697
- contactId?: string;
698
- /** @description Contact email (alternative to contactId) */
699
- contactEmail?: string;
700
- /** @description Event properties */
1467
+ /** @description Email address */
1468
+ email?: string;
1469
+ /** @description Phone number */
1470
+ phone?: string;
1471
+ /** @description First name */
1472
+ firstName?: string | null;
1473
+ /** @description Last name */
1474
+ lastName?: string | null;
1475
+ /** @description Company name */
1476
+ company?: string | null;
1477
+ /** @description Job title */
1478
+ jobTitle?: string | null;
1479
+ /** @description Email subscription status */
1480
+ emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
1481
+ /** @description SMS consent status */
1482
+ smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
1483
+ /** @description Custom properties */
701
1484
  properties?: {
702
1485
  [key: string]: unknown;
703
1486
  };
1487
+ /** @description Topic IDs to subscribe */
1488
+ topicIds?: string[];
1489
+ /** @description Topic slugs to subscribe */
1490
+ topicSlugs?: string[];
704
1491
  };
705
1492
  "multipart/form-data": {
706
- /** @description Event name (e.g., 'purchase.completed') */
707
- name: string;
708
- /** @description Contact ID */
709
- contactId?: string;
710
- /** @description Contact email (alternative to contactId) */
711
- contactEmail?: string;
712
- /** @description Event properties */
1493
+ /** @description Email address */
1494
+ email?: string;
1495
+ /** @description Phone number */
1496
+ phone?: string;
1497
+ /** @description First name */
1498
+ firstName?: string | null;
1499
+ /** @description Last name */
1500
+ lastName?: string | null;
1501
+ /** @description Company name */
1502
+ company?: string | null;
1503
+ /** @description Job title */
1504
+ jobTitle?: string | null;
1505
+ /** @description Email subscription status */
1506
+ emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
1507
+ /** @description SMS consent status */
1508
+ smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
1509
+ /** @description Custom properties */
713
1510
  properties?: {
714
1511
  [key: string]: unknown;
715
1512
  };
1513
+ /** @description Topic IDs to subscribe */
1514
+ topicIds?: string[];
1515
+ /** @description Topic slugs to subscribe */
1516
+ topicSlugs?: string[];
716
1517
  };
717
1518
  "text/plain": {
718
- /** @description Event name (e.g., 'purchase.completed') */
719
- name: string;
720
- /** @description Contact ID */
721
- contactId?: string;
722
- /** @description Contact email (alternative to contactId) */
723
- contactEmail?: string;
724
- /** @description Event properties */
1519
+ /** @description Email address */
1520
+ email?: string;
1521
+ /** @description Phone number */
1522
+ phone?: string;
1523
+ /** @description First name */
1524
+ firstName?: string | null;
1525
+ /** @description Last name */
1526
+ lastName?: string | null;
1527
+ /** @description Company name */
1528
+ company?: string | null;
1529
+ /** @description Job title */
1530
+ jobTitle?: string | null;
1531
+ /** @description Email subscription status */
1532
+ emailStatus?: "active" | "unsubscribed" | "bounced" | "complained";
1533
+ /** @description SMS consent status */
1534
+ smsStatus?: "pending_consent" | "opted_in" | "opted_out" | "invalid";
1535
+ /** @description Custom properties */
725
1536
  properties?: {
726
1537
  [key: string]: unknown;
727
1538
  };
1539
+ /** @description Topic IDs to subscribe */
1540
+ topicIds?: string[];
1541
+ /** @description Topic slugs to subscribe */
1542
+ topicSlugs?: string[];
728
1543
  };
729
1544
  };
730
1545
  };
@@ -733,48 +1548,194 @@ interface operations {
733
1548
  headers: {
734
1549
  [name: string]: unknown;
735
1550
  };
736
- content?: never;
1551
+ content: {
1552
+ "application/json": {
1553
+ /** @description Contact ID */
1554
+ id: string;
1555
+ /** @description Email address */
1556
+ email: string | null;
1557
+ /** @description Phone number */
1558
+ phone: string | null;
1559
+ /** @description First name */
1560
+ firstName: string | null;
1561
+ /** @description Last name */
1562
+ lastName: string | null;
1563
+ /** @description Company name */
1564
+ company: string | null;
1565
+ /** @description Job title */
1566
+ jobTitle: string | null;
1567
+ /** @description Email subscription status */
1568
+ emailStatus: string | null;
1569
+ /** @description SMS subscription status */
1570
+ smsStatus: string | null;
1571
+ properties: {
1572
+ [key: string]: unknown;
1573
+ };
1574
+ /** @description Number of emails sent */
1575
+ emailsSent: number;
1576
+ /** @description Number of emails opened */
1577
+ emailsOpened: number;
1578
+ /** @description Number of emails clicked */
1579
+ emailsClicked: number;
1580
+ /** @description Number of SMS sent */
1581
+ smsSent: number;
1582
+ /** @description Number of SMS clicked */
1583
+ smsClicked: number;
1584
+ /**
1585
+ * Format: date-time
1586
+ * @description Creation timestamp
1587
+ */
1588
+ createdAt: string;
1589
+ /**
1590
+ * Format: date-time
1591
+ * @description Last update timestamp
1592
+ */
1593
+ updatedAt: string;
1594
+ /** @description Topic IDs pending confirmation */
1595
+ pendingTopics?: string[];
1596
+ };
1597
+ "multipart/form-data": {
1598
+ /** @description Contact ID */
1599
+ id: string;
1600
+ /** @description Email address */
1601
+ email: string | null;
1602
+ /** @description Phone number */
1603
+ phone: string | null;
1604
+ /** @description First name */
1605
+ firstName: string | null;
1606
+ /** @description Last name */
1607
+ lastName: string | null;
1608
+ /** @description Company name */
1609
+ company: string | null;
1610
+ /** @description Job title */
1611
+ jobTitle: string | null;
1612
+ /** @description Email subscription status */
1613
+ emailStatus: string | null;
1614
+ /** @description SMS subscription status */
1615
+ smsStatus: string | null;
1616
+ properties: {
1617
+ [key: string]: unknown;
1618
+ };
1619
+ /** @description Number of emails sent */
1620
+ emailsSent: number;
1621
+ /** @description Number of emails opened */
1622
+ emailsOpened: number;
1623
+ /** @description Number of emails clicked */
1624
+ emailsClicked: number;
1625
+ /** @description Number of SMS sent */
1626
+ smsSent: number;
1627
+ /** @description Number of SMS clicked */
1628
+ smsClicked: number;
1629
+ /**
1630
+ * Format: date-time
1631
+ * @description Creation timestamp
1632
+ */
1633
+ createdAt: string;
1634
+ /**
1635
+ * Format: date-time
1636
+ * @description Last update timestamp
1637
+ */
1638
+ updatedAt: string;
1639
+ /** @description Topic IDs pending confirmation */
1640
+ pendingTopics?: string[];
1641
+ };
1642
+ "text/plain": {
1643
+ /** @description Contact ID */
1644
+ id: string;
1645
+ /** @description Email address */
1646
+ email: string | null;
1647
+ /** @description Phone number */
1648
+ phone: string | null;
1649
+ /** @description First name */
1650
+ firstName: string | null;
1651
+ /** @description Last name */
1652
+ lastName: string | null;
1653
+ /** @description Company name */
1654
+ company: string | null;
1655
+ /** @description Job title */
1656
+ jobTitle: string | null;
1657
+ /** @description Email subscription status */
1658
+ emailStatus: string | null;
1659
+ /** @description SMS subscription status */
1660
+ smsStatus: string | null;
1661
+ properties: {
1662
+ [key: string]: unknown;
1663
+ };
1664
+ /** @description Number of emails sent */
1665
+ emailsSent: number;
1666
+ /** @description Number of emails opened */
1667
+ emailsOpened: number;
1668
+ /** @description Number of emails clicked */
1669
+ emailsClicked: number;
1670
+ /** @description Number of SMS sent */
1671
+ smsSent: number;
1672
+ /** @description Number of SMS clicked */
1673
+ smsClicked: number;
1674
+ /**
1675
+ * Format: date-time
1676
+ * @description Creation timestamp
1677
+ */
1678
+ createdAt: string;
1679
+ /**
1680
+ * Format: date-time
1681
+ * @description Last update timestamp
1682
+ */
1683
+ updatedAt: string;
1684
+ /** @description Topic IDs pending confirmation */
1685
+ pendingTopics?: string[];
1686
+ };
1687
+ };
1688
+ };
1689
+ 404: {
1690
+ headers: {
1691
+ [name: string]: unknown;
1692
+ };
1693
+ content: {
1694
+ "application/json": {
1695
+ /** @description Error message */
1696
+ error: string;
1697
+ };
1698
+ "multipart/form-data": {
1699
+ /** @description Error message */
1700
+ error: string;
1701
+ };
1702
+ "text/plain": {
1703
+ /** @description Error message */
1704
+ error: string;
1705
+ };
1706
+ };
737
1707
  };
738
1708
  };
739
1709
  };
740
- postV1EventsBatch: {
1710
+ putV1ContactsByIdTopics: {
741
1711
  parameters: {
742
1712
  query?: never;
743
1713
  header?: never;
744
- path?: never;
1714
+ path: {
1715
+ /** @description Contact ID */
1716
+ id: string;
1717
+ };
745
1718
  cookie?: never;
746
1719
  };
747
1720
  requestBody: {
748
1721
  content: {
749
1722
  "application/json": {
750
- events: {
751
- name: string;
752
- contactId?: string;
753
- contactEmail?: string;
754
- properties?: {
755
- [key: string]: unknown;
756
- };
757
- }[];
1723
+ /** @description Topic IDs to subscribe */
1724
+ topicIds?: string[];
1725
+ /** @description Topic slugs to subscribe */
1726
+ topicSlugs?: string[];
758
1727
  };
759
1728
  "multipart/form-data": {
760
- events: {
761
- name: string;
762
- contactId?: string;
763
- contactEmail?: string;
764
- properties?: {
765
- [key: string]: unknown;
766
- };
767
- }[];
1729
+ /** @description Topic IDs to subscribe */
1730
+ topicIds?: string[];
1731
+ /** @description Topic slugs to subscribe */
1732
+ topicSlugs?: string[];
768
1733
  };
769
1734
  "text/plain": {
770
- events: {
771
- name: string;
772
- contactId?: string;
773
- contactEmail?: string;
774
- properties?: {
775
- [key: string]: unknown;
776
- };
777
- }[];
1735
+ /** @description Topic IDs to subscribe */
1736
+ topicIds?: string[];
1737
+ /** @description Topic slugs to subscribe */
1738
+ topicSlugs?: string[];
778
1739
  };
779
1740
  };
780
1741
  };
@@ -783,51 +1744,182 @@ interface operations {
783
1744
  headers: {
784
1745
  [name: string]: unknown;
785
1746
  };
786
- content?: never;
1747
+ content: {
1748
+ "application/json": {
1749
+ topics: {
1750
+ topicId: string;
1751
+ topicName: string;
1752
+ status: string;
1753
+ subscribedAt: string | null;
1754
+ }[];
1755
+ pendingTopics?: string[];
1756
+ };
1757
+ "multipart/form-data": {
1758
+ topics: {
1759
+ topicId: string;
1760
+ topicName: string;
1761
+ status: string;
1762
+ subscribedAt: string | null;
1763
+ }[];
1764
+ pendingTopics?: string[];
1765
+ };
1766
+ "text/plain": {
1767
+ topics: {
1768
+ topicId: string;
1769
+ topicName: string;
1770
+ status: string;
1771
+ subscribedAt: string | null;
1772
+ }[];
1773
+ pendingTopics?: string[];
1774
+ };
1775
+ };
1776
+ };
1777
+ 404: {
1778
+ headers: {
1779
+ [name: string]: unknown;
1780
+ };
1781
+ content: {
1782
+ "application/json": {
1783
+ /** @description Error message */
1784
+ error: string;
1785
+ };
1786
+ "multipart/form-data": {
1787
+ /** @description Error message */
1788
+ error: string;
1789
+ };
1790
+ "text/plain": {
1791
+ /** @description Error message */
1792
+ error: string;
1793
+ };
1794
+ };
787
1795
  };
788
1796
  };
789
1797
  };
790
- postV1WorkflowsByWorkflowIdTrigger: {
1798
+ postV1Batch: {
791
1799
  parameters: {
792
1800
  query?: never;
793
1801
  header?: never;
794
- path: {
795
- /** @description Workflow ID to trigger */
796
- workflowId: string;
797
- };
1802
+ path?: never;
798
1803
  cookie?: never;
799
1804
  };
800
1805
  requestBody: {
801
1806
  content: {
802
1807
  "application/json": {
803
- /** @description Contact ID */
804
- contactId?: string;
805
- /** @description Contact email (alternative to contactId) */
806
- contactEmail?: string;
807
- /** @description Data to pass to the workflow as trigger data */
808
- data?: {
809
- [key: string]: unknown;
810
- };
1808
+ /** @description Channel to send through */
1809
+ channel?: "email" | "sms";
1810
+ /** @description Name for the batch send */
1811
+ name?: string;
1812
+ /** @description Audience targeting type */
1813
+ audienceType?: "all" | "topic" | "segment";
1814
+ /** @description Topic ID to target */
1815
+ topicId?: string;
1816
+ /** @description Segment ID to target */
1817
+ segmentId?: string;
1818
+ /** @description Email subject line */
1819
+ subject?: string;
1820
+ /** @description Email preview text */
1821
+ previewText?: string;
1822
+ /** @description From email address */
1823
+ from?: string;
1824
+ /** @description From display name */
1825
+ fromName?: string;
1826
+ /** @description Reply-to email address */
1827
+ replyTo?: string;
1828
+ /** @description Email template ID */
1829
+ templateId?: string;
1830
+ /** @description Raw HTML content (if not using template) */
1831
+ htmlContent?: string;
1832
+ /** @description SMS body text */
1833
+ body?: string;
1834
+ /** @description SMS sender ID */
1835
+ senderId?: string;
1836
+ /**
1837
+ * Format: date-time
1838
+ * @description ISO 8601 datetime for scheduled send
1839
+ */
1840
+ scheduledFor?: string;
1841
+ /** @description AWS account ID to use for sending */
1842
+ awsAccountId: string;
1843
+ /** @description Pre-counted recipient count */
1844
+ totalRecipients?: number;
811
1845
  };
812
1846
  "multipart/form-data": {
813
- /** @description Contact ID */
814
- contactId?: string;
815
- /** @description Contact email (alternative to contactId) */
816
- contactEmail?: string;
817
- /** @description Data to pass to the workflow as trigger data */
818
- data?: {
819
- [key: string]: unknown;
820
- };
1847
+ /** @description Channel to send through */
1848
+ channel?: "email" | "sms";
1849
+ /** @description Name for the batch send */
1850
+ name?: string;
1851
+ /** @description Audience targeting type */
1852
+ audienceType?: "all" | "topic" | "segment";
1853
+ /** @description Topic ID to target */
1854
+ topicId?: string;
1855
+ /** @description Segment ID to target */
1856
+ segmentId?: string;
1857
+ /** @description Email subject line */
1858
+ subject?: string;
1859
+ /** @description Email preview text */
1860
+ previewText?: string;
1861
+ /** @description From email address */
1862
+ from?: string;
1863
+ /** @description From display name */
1864
+ fromName?: string;
1865
+ /** @description Reply-to email address */
1866
+ replyTo?: string;
1867
+ /** @description Email template ID */
1868
+ templateId?: string;
1869
+ /** @description Raw HTML content (if not using template) */
1870
+ htmlContent?: string;
1871
+ /** @description SMS body text */
1872
+ body?: string;
1873
+ /** @description SMS sender ID */
1874
+ senderId?: string;
1875
+ /**
1876
+ * Format: date-time
1877
+ * @description ISO 8601 datetime for scheduled send
1878
+ */
1879
+ scheduledFor?: string;
1880
+ /** @description AWS account ID to use for sending */
1881
+ awsAccountId: string;
1882
+ /** @description Pre-counted recipient count */
1883
+ totalRecipients?: number;
821
1884
  };
822
1885
  "text/plain": {
823
- /** @description Contact ID */
824
- contactId?: string;
825
- /** @description Contact email (alternative to contactId) */
826
- contactEmail?: string;
827
- /** @description Data to pass to the workflow as trigger data */
828
- data?: {
829
- [key: string]: unknown;
830
- };
1886
+ /** @description Channel to send through */
1887
+ channel?: "email" | "sms";
1888
+ /** @description Name for the batch send */
1889
+ name?: string;
1890
+ /** @description Audience targeting type */
1891
+ audienceType?: "all" | "topic" | "segment";
1892
+ /** @description Topic ID to target */
1893
+ topicId?: string;
1894
+ /** @description Segment ID to target */
1895
+ segmentId?: string;
1896
+ /** @description Email subject line */
1897
+ subject?: string;
1898
+ /** @description Email preview text */
1899
+ previewText?: string;
1900
+ /** @description From email address */
1901
+ from?: string;
1902
+ /** @description From display name */
1903
+ fromName?: string;
1904
+ /** @description Reply-to email address */
1905
+ replyTo?: string;
1906
+ /** @description Email template ID */
1907
+ templateId?: string;
1908
+ /** @description Raw HTML content (if not using template) */
1909
+ htmlContent?: string;
1910
+ /** @description SMS body text */
1911
+ body?: string;
1912
+ /** @description SMS sender ID */
1913
+ senderId?: string;
1914
+ /**
1915
+ * Format: date-time
1916
+ * @description ISO 8601 datetime for scheduled send
1917
+ */
1918
+ scheduledFor?: string;
1919
+ /** @description AWS account ID to use for sending */
1920
+ awsAccountId: string;
1921
+ /** @description Pre-counted recipient count */
1922
+ totalRecipients?: number;
831
1923
  };
832
1924
  };
833
1925
  };
@@ -836,7 +1928,414 @@ interface operations {
836
1928
  headers: {
837
1929
  [name: string]: unknown;
838
1930
  };
839
- content?: never;
1931
+ content: {
1932
+ "application/json": {
1933
+ /** @description Batch ID */
1934
+ id: string;
1935
+ /** @description Batch status (queued, scheduled, processing, completed, failed, cancelled) */
1936
+ status: string;
1937
+ /** @description Channel (email or sms) */
1938
+ channel: string;
1939
+ /** @description Total number of recipients */
1940
+ totalRecipients: number;
1941
+ /**
1942
+ * Format: date-time
1943
+ * @description Creation timestamp
1944
+ */
1945
+ createdAt: string;
1946
+ };
1947
+ "multipart/form-data": {
1948
+ /** @description Batch ID */
1949
+ id: string;
1950
+ /** @description Batch status (queued, scheduled, processing, completed, failed, cancelled) */
1951
+ status: string;
1952
+ /** @description Channel (email or sms) */
1953
+ channel: string;
1954
+ /** @description Total number of recipients */
1955
+ totalRecipients: number;
1956
+ /**
1957
+ * Format: date-time
1958
+ * @description Creation timestamp
1959
+ */
1960
+ createdAt: string;
1961
+ };
1962
+ "text/plain": {
1963
+ /** @description Batch ID */
1964
+ id: string;
1965
+ /** @description Batch status (queued, scheduled, processing, completed, failed, cancelled) */
1966
+ status: string;
1967
+ /** @description Channel (email or sms) */
1968
+ channel: string;
1969
+ /** @description Total number of recipients */
1970
+ totalRecipients: number;
1971
+ /**
1972
+ * Format: date-time
1973
+ * @description Creation timestamp
1974
+ */
1975
+ createdAt: string;
1976
+ };
1977
+ };
1978
+ };
1979
+ };
1980
+ };
1981
+ getV1BatchById: {
1982
+ parameters: {
1983
+ query?: never;
1984
+ header?: never;
1985
+ path: {
1986
+ /** @description Batch ID */
1987
+ id: string;
1988
+ };
1989
+ cookie?: never;
1990
+ };
1991
+ requestBody?: never;
1992
+ responses: {
1993
+ 200: {
1994
+ headers: {
1995
+ [name: string]: unknown;
1996
+ };
1997
+ content: {
1998
+ "application/json": {
1999
+ id: string;
2000
+ status: string;
2001
+ channel: string;
2002
+ name: string | null;
2003
+ totalRecipients: number;
2004
+ processedRecipients: number;
2005
+ sent: number;
2006
+ failed: number;
2007
+ startedAt: string | null;
2008
+ completedAt: string | null;
2009
+ createdAt: string;
2010
+ };
2011
+ "multipart/form-data": {
2012
+ id: string;
2013
+ status: string;
2014
+ channel: string;
2015
+ name: string | null;
2016
+ totalRecipients: number;
2017
+ processedRecipients: number;
2018
+ sent: number;
2019
+ failed: number;
2020
+ startedAt: string | null;
2021
+ completedAt: string | null;
2022
+ createdAt: string;
2023
+ };
2024
+ "text/plain": {
2025
+ id: string;
2026
+ status: string;
2027
+ channel: string;
2028
+ name: string | null;
2029
+ totalRecipients: number;
2030
+ processedRecipients: number;
2031
+ sent: number;
2032
+ failed: number;
2033
+ startedAt: string | null;
2034
+ completedAt: string | null;
2035
+ createdAt: string;
2036
+ };
2037
+ };
2038
+ };
2039
+ };
2040
+ };
2041
+ deleteV1BatchById: {
2042
+ parameters: {
2043
+ query?: never;
2044
+ header?: never;
2045
+ path: {
2046
+ /** @description Batch ID to cancel */
2047
+ id: string;
2048
+ };
2049
+ cookie?: never;
2050
+ };
2051
+ requestBody?: never;
2052
+ responses: {
2053
+ 200: {
2054
+ headers: {
2055
+ [name: string]: unknown;
2056
+ };
2057
+ content: {
2058
+ "application/json": {
2059
+ success: boolean;
2060
+ id: string;
2061
+ status: string;
2062
+ };
2063
+ "multipart/form-data": {
2064
+ success: boolean;
2065
+ id: string;
2066
+ status: string;
2067
+ };
2068
+ "text/plain": {
2069
+ success: boolean;
2070
+ id: string;
2071
+ status: string;
2072
+ };
2073
+ };
2074
+ };
2075
+ };
2076
+ };
2077
+ postV1Events: {
2078
+ parameters: {
2079
+ query?: never;
2080
+ header?: never;
2081
+ path?: never;
2082
+ cookie?: never;
2083
+ };
2084
+ requestBody: {
2085
+ content: {
2086
+ "application/json": {
2087
+ /** @description Event name (e.g., 'purchase.completed') */
2088
+ name: string;
2089
+ /** @description Contact ID */
2090
+ contactId?: string;
2091
+ /** @description Contact email (alternative to contactId) */
2092
+ contactEmail?: string;
2093
+ /** @description Event properties */
2094
+ properties?: {
2095
+ [key: string]: unknown;
2096
+ };
2097
+ };
2098
+ "multipart/form-data": {
2099
+ /** @description Event name (e.g., 'purchase.completed') */
2100
+ name: string;
2101
+ /** @description Contact ID */
2102
+ contactId?: string;
2103
+ /** @description Contact email (alternative to contactId) */
2104
+ contactEmail?: string;
2105
+ /** @description Event properties */
2106
+ properties?: {
2107
+ [key: string]: unknown;
2108
+ };
2109
+ };
2110
+ "text/plain": {
2111
+ /** @description Event name (e.g., 'purchase.completed') */
2112
+ name: string;
2113
+ /** @description Contact ID */
2114
+ contactId?: string;
2115
+ /** @description Contact email (alternative to contactId) */
2116
+ contactEmail?: string;
2117
+ /** @description Event properties */
2118
+ properties?: {
2119
+ [key: string]: unknown;
2120
+ };
2121
+ };
2122
+ };
2123
+ };
2124
+ responses: {
2125
+ 200: {
2126
+ headers: {
2127
+ [name: string]: unknown;
2128
+ };
2129
+ content: {
2130
+ "application/json": {
2131
+ success: boolean;
2132
+ /** @description Number of workflows triggered */
2133
+ workflowsTriggered: number;
2134
+ /** @description Number of executions resumed */
2135
+ executionsResumed: number;
2136
+ };
2137
+ "multipart/form-data": {
2138
+ success: boolean;
2139
+ /** @description Number of workflows triggered */
2140
+ workflowsTriggered: number;
2141
+ /** @description Number of executions resumed */
2142
+ executionsResumed: number;
2143
+ };
2144
+ "text/plain": {
2145
+ success: boolean;
2146
+ /** @description Number of workflows triggered */
2147
+ workflowsTriggered: number;
2148
+ /** @description Number of executions resumed */
2149
+ executionsResumed: number;
2150
+ };
2151
+ };
2152
+ };
2153
+ 400: {
2154
+ headers: {
2155
+ [name: string]: unknown;
2156
+ };
2157
+ content: {
2158
+ "application/json": {
2159
+ /** @constant */
2160
+ success: false;
2161
+ error: string;
2162
+ };
2163
+ "multipart/form-data": {
2164
+ /** @constant */
2165
+ success: false;
2166
+ error: string;
2167
+ };
2168
+ "text/plain": {
2169
+ /** @constant */
2170
+ success: false;
2171
+ error: string;
2172
+ };
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ postV1EventsBatch: {
2178
+ parameters: {
2179
+ query?: never;
2180
+ header?: never;
2181
+ path?: never;
2182
+ cookie?: never;
2183
+ };
2184
+ requestBody: {
2185
+ content: {
2186
+ "application/json": {
2187
+ /** @description List of events to process */
2188
+ events: {
2189
+ name: string;
2190
+ contactId?: string;
2191
+ contactEmail?: string;
2192
+ properties?: {
2193
+ [key: string]: unknown;
2194
+ };
2195
+ }[];
2196
+ };
2197
+ "multipart/form-data": {
2198
+ /** @description List of events to process */
2199
+ events: {
2200
+ name: string;
2201
+ contactId?: string;
2202
+ contactEmail?: string;
2203
+ properties?: {
2204
+ [key: string]: unknown;
2205
+ };
2206
+ }[];
2207
+ };
2208
+ "text/plain": {
2209
+ /** @description List of events to process */
2210
+ events: {
2211
+ name: string;
2212
+ contactId?: string;
2213
+ contactEmail?: string;
2214
+ properties?: {
2215
+ [key: string]: unknown;
2216
+ };
2217
+ }[];
2218
+ };
2219
+ };
2220
+ };
2221
+ responses: {
2222
+ 200: {
2223
+ headers: {
2224
+ [name: string]: unknown;
2225
+ };
2226
+ content: {
2227
+ "application/json": {
2228
+ success: boolean;
2229
+ /** @description Number of events processed */
2230
+ processed: number;
2231
+ /** @description Total workflows triggered */
2232
+ workflowsTriggered: number;
2233
+ /** @description Total executions resumed */
2234
+ executionsResumed: number;
2235
+ /** @description Error messages if any */
2236
+ errors: string[];
2237
+ };
2238
+ "multipart/form-data": {
2239
+ success: boolean;
2240
+ /** @description Number of events processed */
2241
+ processed: number;
2242
+ /** @description Total workflows triggered */
2243
+ workflowsTriggered: number;
2244
+ /** @description Total executions resumed */
2245
+ executionsResumed: number;
2246
+ /** @description Error messages if any */
2247
+ errors: string[];
2248
+ };
2249
+ "text/plain": {
2250
+ success: boolean;
2251
+ /** @description Number of events processed */
2252
+ processed: number;
2253
+ /** @description Total workflows triggered */
2254
+ workflowsTriggered: number;
2255
+ /** @description Total executions resumed */
2256
+ executionsResumed: number;
2257
+ /** @description Error messages if any */
2258
+ errors: string[];
2259
+ };
2260
+ };
2261
+ };
2262
+ };
2263
+ };
2264
+ postV1WorkflowsByWorkflowIdTrigger: {
2265
+ parameters: {
2266
+ query?: never;
2267
+ header?: never;
2268
+ path: {
2269
+ /** @description Workflow ID to trigger */
2270
+ workflowId: string;
2271
+ };
2272
+ cookie?: never;
2273
+ };
2274
+ requestBody: {
2275
+ content: {
2276
+ "application/json": {
2277
+ /** @description Contact ID */
2278
+ contactId?: string;
2279
+ /** @description Contact email (alternative to contactId) */
2280
+ contactEmail?: string;
2281
+ /** @description Data to pass to the workflow */
2282
+ data?: {
2283
+ [key: string]: unknown;
2284
+ };
2285
+ };
2286
+ "multipart/form-data": {
2287
+ /** @description Contact ID */
2288
+ contactId?: string;
2289
+ /** @description Contact email (alternative to contactId) */
2290
+ contactEmail?: string;
2291
+ /** @description Data to pass to the workflow */
2292
+ data?: {
2293
+ [key: string]: unknown;
2294
+ };
2295
+ };
2296
+ "text/plain": {
2297
+ /** @description Contact ID */
2298
+ contactId?: string;
2299
+ /** @description Contact email (alternative to contactId) */
2300
+ contactEmail?: string;
2301
+ /** @description Data to pass to the workflow */
2302
+ data?: {
2303
+ [key: string]: unknown;
2304
+ };
2305
+ };
2306
+ };
2307
+ };
2308
+ responses: {
2309
+ 200: {
2310
+ headers: {
2311
+ [name: string]: unknown;
2312
+ };
2313
+ content: {
2314
+ "application/json": {
2315
+ success: boolean;
2316
+ message?: string;
2317
+ workflowId?: string;
2318
+ workflowName?: string;
2319
+ contactId?: string;
2320
+ error?: string;
2321
+ };
2322
+ "multipart/form-data": {
2323
+ success: boolean;
2324
+ message?: string;
2325
+ workflowId?: string;
2326
+ workflowName?: string;
2327
+ contactId?: string;
2328
+ error?: string;
2329
+ };
2330
+ "text/plain": {
2331
+ success: boolean;
2332
+ message?: string;
2333
+ workflowId?: string;
2334
+ workflowName?: string;
2335
+ contactId?: string;
2336
+ error?: string;
2337
+ };
2338
+ };
840
2339
  };
841
2340
  };
842
2341
  };
@@ -845,7 +2344,1210 @@ interface operations {
845
2344
  query?: never;
846
2345
  header?: never;
847
2346
  path: {
848
- /** @description Workflow ID to trigger */
2347
+ /** @description Workflow ID to trigger */
2348
+ workflowId: string;
2349
+ };
2350
+ cookie?: never;
2351
+ };
2352
+ requestBody: {
2353
+ content: {
2354
+ "application/json": {
2355
+ /** @description List of contacts to trigger the workflow for */
2356
+ contacts: {
2357
+ contactId?: string;
2358
+ contactEmail?: string;
2359
+ data?: {
2360
+ [key: string]: unknown;
2361
+ };
2362
+ }[];
2363
+ /** @description Common data to pass to all workflow triggers */
2364
+ data?: {
2365
+ [key: string]: unknown;
2366
+ };
2367
+ };
2368
+ "multipart/form-data": {
2369
+ /** @description List of contacts to trigger the workflow for */
2370
+ contacts: {
2371
+ contactId?: string;
2372
+ contactEmail?: string;
2373
+ data?: {
2374
+ [key: string]: unknown;
2375
+ };
2376
+ }[];
2377
+ /** @description Common data to pass to all workflow triggers */
2378
+ data?: {
2379
+ [key: string]: unknown;
2380
+ };
2381
+ };
2382
+ "text/plain": {
2383
+ /** @description List of contacts to trigger the workflow for */
2384
+ contacts: {
2385
+ contactId?: string;
2386
+ contactEmail?: string;
2387
+ data?: {
2388
+ [key: string]: unknown;
2389
+ };
2390
+ }[];
2391
+ /** @description Common data to pass to all workflow triggers */
2392
+ data?: {
2393
+ [key: string]: unknown;
2394
+ };
2395
+ };
2396
+ };
2397
+ };
2398
+ responses: {
2399
+ 200: {
2400
+ headers: {
2401
+ [name: string]: unknown;
2402
+ };
2403
+ content: {
2404
+ "application/json": {
2405
+ success: boolean;
2406
+ workflowId?: string;
2407
+ workflowName?: string;
2408
+ /** @description Number of contacts triggered */
2409
+ triggered?: number;
2410
+ /** @description Error messages if any */
2411
+ errors?: string[];
2412
+ error?: string;
2413
+ };
2414
+ "multipart/form-data": {
2415
+ success: boolean;
2416
+ workflowId?: string;
2417
+ workflowName?: string;
2418
+ /** @description Number of contacts triggered */
2419
+ triggered?: number;
2420
+ /** @description Error messages if any */
2421
+ errors?: string[];
2422
+ error?: string;
2423
+ };
2424
+ "text/plain": {
2425
+ success: boolean;
2426
+ workflowId?: string;
2427
+ workflowName?: string;
2428
+ /** @description Number of contacts triggered */
2429
+ triggered?: number;
2430
+ /** @description Error messages if any */
2431
+ errors?: string[];
2432
+ error?: string;
2433
+ };
2434
+ };
2435
+ };
2436
+ };
2437
+ };
2438
+ postWebhooksSesByAwsAccountNumber: {
2439
+ parameters: {
2440
+ query?: never;
2441
+ header?: never;
2442
+ path: {
2443
+ /** @description 12-digit AWS account ID */
2444
+ awsAccountNumber: string;
2445
+ };
2446
+ cookie?: never;
2447
+ };
2448
+ requestBody?: never;
2449
+ responses: {
2450
+ 200: {
2451
+ headers: {
2452
+ [name: string]: unknown;
2453
+ };
2454
+ content: {
2455
+ "application/json": {
2456
+ /** @description Processing status */
2457
+ status: string;
2458
+ eventType?: string;
2459
+ messageId?: string;
2460
+ reason?: string;
2461
+ };
2462
+ "multipart/form-data": {
2463
+ /** @description Processing status */
2464
+ status: string;
2465
+ eventType?: string;
2466
+ messageId?: string;
2467
+ reason?: string;
2468
+ };
2469
+ "text/plain": {
2470
+ /** @description Processing status */
2471
+ status: string;
2472
+ eventType?: string;
2473
+ messageId?: string;
2474
+ reason?: string;
2475
+ };
2476
+ };
2477
+ };
2478
+ 401: {
2479
+ headers: {
2480
+ [name: string]: unknown;
2481
+ };
2482
+ content: {
2483
+ "application/json": {
2484
+ error: string;
2485
+ };
2486
+ "multipart/form-data": {
2487
+ error: string;
2488
+ };
2489
+ "text/plain": {
2490
+ error: string;
2491
+ };
2492
+ };
2493
+ };
2494
+ 404: {
2495
+ headers: {
2496
+ [name: string]: unknown;
2497
+ };
2498
+ content: {
2499
+ "application/json": {
2500
+ error: string;
2501
+ };
2502
+ "multipart/form-data": {
2503
+ error: string;
2504
+ };
2505
+ "text/plain": {
2506
+ error: string;
2507
+ };
2508
+ };
2509
+ };
2510
+ 500: {
2511
+ headers: {
2512
+ [name: string]: unknown;
2513
+ };
2514
+ content: {
2515
+ "application/json": {
2516
+ error: string;
2517
+ details?: string;
2518
+ };
2519
+ "multipart/form-data": {
2520
+ error: string;
2521
+ details?: string;
2522
+ };
2523
+ "text/plain": {
2524
+ error: string;
2525
+ details?: string;
2526
+ };
2527
+ };
2528
+ };
2529
+ };
2530
+ };
2531
+ getUnsubscribeByToken: {
2532
+ parameters: {
2533
+ query?: never;
2534
+ header?: never;
2535
+ path: {
2536
+ /** @description Unsubscribe token */
2537
+ token: string;
2538
+ };
2539
+ cookie?: never;
2540
+ };
2541
+ requestBody?: never;
2542
+ responses: {
2543
+ /** @description HTML confirmation page */
2544
+ 200: {
2545
+ headers: {
2546
+ [name: string]: unknown;
2547
+ };
2548
+ content: {
2549
+ "application/json": string;
2550
+ "multipart/form-data": string;
2551
+ "text/plain": string;
2552
+ };
2553
+ };
2554
+ /** @description HTML error page */
2555
+ 400: {
2556
+ headers: {
2557
+ [name: string]: unknown;
2558
+ };
2559
+ content: {
2560
+ "application/json": string;
2561
+ "multipart/form-data": string;
2562
+ "text/plain": string;
2563
+ };
2564
+ };
2565
+ /** @description HTML not found page */
2566
+ 404: {
2567
+ headers: {
2568
+ [name: string]: unknown;
2569
+ };
2570
+ content: {
2571
+ "application/json": string;
2572
+ "multipart/form-data": string;
2573
+ "text/plain": string;
2574
+ };
2575
+ };
2576
+ };
2577
+ };
2578
+ postUnsubscribeByToken: {
2579
+ parameters: {
2580
+ query?: never;
2581
+ header?: never;
2582
+ path: {
2583
+ /** @description Unsubscribe token */
2584
+ token: string;
2585
+ };
2586
+ cookie?: never;
2587
+ };
2588
+ requestBody: {
2589
+ content: {
2590
+ "application/json": unknown;
2591
+ "multipart/form-data": unknown;
2592
+ "text/plain": unknown;
2593
+ };
2594
+ };
2595
+ responses: {
2596
+ 200: {
2597
+ headers: {
2598
+ [name: string]: unknown;
2599
+ };
2600
+ content: {
2601
+ "application/json": {
2602
+ success: boolean;
2603
+ message?: string;
2604
+ contactId?: string;
2605
+ topicId?: string;
2606
+ };
2607
+ "multipart/form-data": {
2608
+ success: boolean;
2609
+ message?: string;
2610
+ contactId?: string;
2611
+ topicId?: string;
2612
+ };
2613
+ "text/plain": {
2614
+ success: boolean;
2615
+ message?: string;
2616
+ contactId?: string;
2617
+ topicId?: string;
2618
+ };
2619
+ };
2620
+ };
2621
+ 400: {
2622
+ headers: {
2623
+ [name: string]: unknown;
2624
+ };
2625
+ content: {
2626
+ "application/json": {
2627
+ error: string;
2628
+ };
2629
+ "multipart/form-data": {
2630
+ error: string;
2631
+ };
2632
+ "text/plain": {
2633
+ error: string;
2634
+ };
2635
+ };
2636
+ };
2637
+ 404: {
2638
+ headers: {
2639
+ [name: string]: unknown;
2640
+ };
2641
+ content: {
2642
+ "application/json": {
2643
+ error: string;
2644
+ };
2645
+ "multipart/form-data": {
2646
+ error: string;
2647
+ };
2648
+ "text/plain": {
2649
+ error: string;
2650
+ };
2651
+ };
2652
+ };
2653
+ };
2654
+ };
2655
+ postV1TemplatesPush: {
2656
+ parameters: {
2657
+ query?: never;
2658
+ header?: never;
2659
+ path?: never;
2660
+ cookie?: never;
2661
+ };
2662
+ requestBody: {
2663
+ content: {
2664
+ "application/json": {
2665
+ /** @description Template slug (filename without extension) */
2666
+ slug: string;
2667
+ /** @description React Email TSX source code */
2668
+ source: string;
2669
+ /** @description Compiled HTML output */
2670
+ compiledHtml: string;
2671
+ /** @description Compiled plain text output */
2672
+ compiledText: string;
2673
+ /** @description Email subject line */
2674
+ subject: string;
2675
+ /** @description Preview/preheader text */
2676
+ previewText?: string;
2677
+ /** @description Email type for compliance */
2678
+ emailType: "marketing" | "transactional";
2679
+ /** @description Template variables */
2680
+ variables: unknown[];
2681
+ /** @description SHA256 hash of source file */
2682
+ sourceHash: string;
2683
+ /** @description SES template name */
2684
+ sesTemplateName: string;
2685
+ /** @description Path in project (e.g. templates/welcome.tsx) */
2686
+ cliProjectPath?: string;
2687
+ /** @description Force overwrite even if edited on dashboard */
2688
+ force?: boolean;
2689
+ };
2690
+ "multipart/form-data": {
2691
+ /** @description Template slug (filename without extension) */
2692
+ slug: string;
2693
+ /** @description React Email TSX source code */
2694
+ source: string;
2695
+ /** @description Compiled HTML output */
2696
+ compiledHtml: string;
2697
+ /** @description Compiled plain text output */
2698
+ compiledText: string;
2699
+ /** @description Email subject line */
2700
+ subject: string;
2701
+ /** @description Preview/preheader text */
2702
+ previewText?: string;
2703
+ /** @description Email type for compliance */
2704
+ emailType: "marketing" | "transactional";
2705
+ /** @description Template variables */
2706
+ variables: unknown[];
2707
+ /** @description SHA256 hash of source file */
2708
+ sourceHash: string;
2709
+ /** @description SES template name */
2710
+ sesTemplateName: string;
2711
+ /** @description Path in project (e.g. templates/welcome.tsx) */
2712
+ cliProjectPath?: string;
2713
+ /** @description Force overwrite even if edited on dashboard */
2714
+ force?: boolean;
2715
+ };
2716
+ "text/plain": {
2717
+ /** @description Template slug (filename without extension) */
2718
+ slug: string;
2719
+ /** @description React Email TSX source code */
2720
+ source: string;
2721
+ /** @description Compiled HTML output */
2722
+ compiledHtml: string;
2723
+ /** @description Compiled plain text output */
2724
+ compiledText: string;
2725
+ /** @description Email subject line */
2726
+ subject: string;
2727
+ /** @description Preview/preheader text */
2728
+ previewText?: string;
2729
+ /** @description Email type for compliance */
2730
+ emailType: "marketing" | "transactional";
2731
+ /** @description Template variables */
2732
+ variables: unknown[];
2733
+ /** @description SHA256 hash of source file */
2734
+ sourceHash: string;
2735
+ /** @description SES template name */
2736
+ sesTemplateName: string;
2737
+ /** @description Path in project (e.g. templates/welcome.tsx) */
2738
+ cliProjectPath?: string;
2739
+ /** @description Force overwrite even if edited on dashboard */
2740
+ force?: boolean;
2741
+ };
2742
+ };
2743
+ };
2744
+ responses: {
2745
+ 200: {
2746
+ headers: {
2747
+ [name: string]: unknown;
2748
+ };
2749
+ content?: never;
2750
+ };
2751
+ };
2752
+ };
2753
+ postV1TemplatesPushBatch: {
2754
+ parameters: {
2755
+ query?: never;
2756
+ header?: never;
2757
+ path?: never;
2758
+ cookie?: never;
2759
+ };
2760
+ requestBody: {
2761
+ content: {
2762
+ "application/json": {
2763
+ templates: {
2764
+ slug: string;
2765
+ source: string;
2766
+ compiledHtml: string;
2767
+ compiledText: string;
2768
+ subject: string;
2769
+ previewText?: string;
2770
+ emailType: "marketing" | "transactional";
2771
+ variables: unknown[];
2772
+ sourceHash: string;
2773
+ sesTemplateName: string;
2774
+ cliProjectPath?: string;
2775
+ force?: boolean;
2776
+ }[];
2777
+ };
2778
+ "multipart/form-data": {
2779
+ templates: {
2780
+ slug: string;
2781
+ source: string;
2782
+ compiledHtml: string;
2783
+ compiledText: string;
2784
+ subject: string;
2785
+ previewText?: string;
2786
+ emailType: "marketing" | "transactional";
2787
+ variables: unknown[];
2788
+ sourceHash: string;
2789
+ sesTemplateName: string;
2790
+ cliProjectPath?: string;
2791
+ force?: boolean;
2792
+ }[];
2793
+ };
2794
+ "text/plain": {
2795
+ templates: {
2796
+ slug: string;
2797
+ source: string;
2798
+ compiledHtml: string;
2799
+ compiledText: string;
2800
+ subject: string;
2801
+ previewText?: string;
2802
+ emailType: "marketing" | "transactional";
2803
+ variables: unknown[];
2804
+ sourceHash: string;
2805
+ sesTemplateName: string;
2806
+ cliProjectPath?: string;
2807
+ force?: boolean;
2808
+ }[];
2809
+ };
2810
+ };
2811
+ };
2812
+ responses: {
2813
+ 200: {
2814
+ headers: {
2815
+ [name: string]: unknown;
2816
+ };
2817
+ content?: never;
2818
+ };
2819
+ };
2820
+ };
2821
+ getV1TemplatesPull: {
2822
+ parameters: {
2823
+ query?: never;
2824
+ header?: never;
2825
+ path?: never;
2826
+ cookie?: never;
2827
+ };
2828
+ requestBody?: never;
2829
+ responses: {
2830
+ 200: {
2831
+ headers: {
2832
+ [name: string]: unknown;
2833
+ };
2834
+ content?: never;
2835
+ };
2836
+ };
2837
+ };
2838
+ "postToolsEmail-check": {
2839
+ parameters: {
2840
+ query?: never;
2841
+ header?: never;
2842
+ path?: never;
2843
+ cookie?: never;
2844
+ };
2845
+ requestBody: {
2846
+ content: {
2847
+ "application/json": {
2848
+ /** @description Domain to check */
2849
+ domain: string;
2850
+ /** @description Quick mode (skip blacklist checks) */
2851
+ quick?: boolean;
2852
+ /** @description Single DKIM selector to check */
2853
+ dkimSelector?: string;
2854
+ /** @description Multiple DKIM selectors to check */
2855
+ dkimSelectors?: string[];
2856
+ };
2857
+ "multipart/form-data": {
2858
+ /** @description Domain to check */
2859
+ domain: string;
2860
+ /** @description Quick mode (skip blacklist checks) */
2861
+ quick?: boolean;
2862
+ /** @description Single DKIM selector to check */
2863
+ dkimSelector?: string;
2864
+ /** @description Multiple DKIM selectors to check */
2865
+ dkimSelectors?: string[];
2866
+ };
2867
+ "text/plain": {
2868
+ /** @description Domain to check */
2869
+ domain: string;
2870
+ /** @description Quick mode (skip blacklist checks) */
2871
+ quick?: boolean;
2872
+ /** @description Single DKIM selector to check */
2873
+ dkimSelector?: string;
2874
+ /** @description Multiple DKIM selectors to check */
2875
+ dkimSelectors?: string[];
2876
+ };
2877
+ };
2878
+ };
2879
+ responses: {
2880
+ 200: {
2881
+ headers: {
2882
+ [name: string]: unknown;
2883
+ };
2884
+ content: {
2885
+ "application/json": {
2886
+ success: boolean;
2887
+ domain?: string;
2888
+ checkedAt?: string;
2889
+ duration?: number;
2890
+ score?: {
2891
+ grade: string;
2892
+ score: number;
2893
+ maxScore: number;
2894
+ breakdown: {
2895
+ [key: string]: unknown;
2896
+ };
2897
+ };
2898
+ spf?: {
2899
+ exists: boolean;
2900
+ valid: boolean;
2901
+ record: string | null;
2902
+ lookupCount: number;
2903
+ lookupLimit: number;
2904
+ allMechanism: string | null;
2905
+ includes: string[];
2906
+ hasPtr: boolean;
2907
+ warnings: string[];
2908
+ };
2909
+ dkim?: {
2910
+ found: boolean;
2911
+ selectorsFound: {
2912
+ selector: string;
2913
+ keyType: string | null;
2914
+ keyBits: number | null;
2915
+ testMode: boolean;
2916
+ }[];
2917
+ selectorsChecked: number;
2918
+ warnings: string[];
2919
+ };
2920
+ dmarc?: {
2921
+ exists: boolean;
2922
+ valid: boolean;
2923
+ record: string | null;
2924
+ policy: string | null;
2925
+ subdomainPolicy: string | null;
2926
+ reportingEnabled: boolean;
2927
+ pct: number | null;
2928
+ alignmentSpf: string | null;
2929
+ alignmentDkim: string | null;
2930
+ ruaAddresses: string[];
2931
+ warnings: string[];
2932
+ };
2933
+ mx?: {
2934
+ exists: boolean;
2935
+ hasRedundancy: boolean;
2936
+ records: {
2937
+ exchange: string;
2938
+ priority: number;
2939
+ resolves: boolean;
2940
+ ipv4Count: number;
2941
+ ipv6Count: number;
2942
+ }[];
2943
+ };
2944
+ domainAge?: {
2945
+ ageInDays: number | null;
2946
+ createdAt: string | null;
2947
+ expiresAt: string | null;
2948
+ daysUntilExpiry: number | null;
2949
+ registrar: string | null;
2950
+ source: string | null;
2951
+ privacyEnabled: boolean;
2952
+ };
2953
+ ipv6?: {
2954
+ mxHasIpv6: boolean;
2955
+ spfIncludesIpv6: boolean;
2956
+ mxIpv6Count: number;
2957
+ };
2958
+ reverseDns?: {
2959
+ allHavePtr: boolean;
2960
+ allConfirm: boolean;
2961
+ count: number;
2962
+ };
2963
+ blacklist?: {
2964
+ checked: boolean;
2965
+ overallClean: boolean;
2966
+ domainListings: {
2967
+ blacklist: string;
2968
+ priority: string;
2969
+ delistUrl: string | null;
2970
+ }[];
2971
+ ipListings: {
2972
+ blacklist: string;
2973
+ priority: string;
2974
+ target: string;
2975
+ delistUrl: string | null;
2976
+ }[];
2977
+ };
2978
+ issues?: {
2979
+ check: string;
2980
+ reason: string;
2981
+ points: number;
2982
+ severity: string;
2983
+ }[];
2984
+ bonuses?: {
2985
+ check: string;
2986
+ reason: string;
2987
+ points: number;
2988
+ }[];
2989
+ error?: string;
2990
+ };
2991
+ "multipart/form-data": {
2992
+ success: boolean;
2993
+ domain?: string;
2994
+ checkedAt?: string;
2995
+ duration?: number;
2996
+ score?: {
2997
+ grade: string;
2998
+ score: number;
2999
+ maxScore: number;
3000
+ breakdown: {
3001
+ [key: string]: unknown;
3002
+ };
3003
+ };
3004
+ spf?: {
3005
+ exists: boolean;
3006
+ valid: boolean;
3007
+ record: string | null;
3008
+ lookupCount: number;
3009
+ lookupLimit: number;
3010
+ allMechanism: string | null;
3011
+ includes: string[];
3012
+ hasPtr: boolean;
3013
+ warnings: string[];
3014
+ };
3015
+ dkim?: {
3016
+ found: boolean;
3017
+ selectorsFound: {
3018
+ selector: string;
3019
+ keyType: string | null;
3020
+ keyBits: number | null;
3021
+ testMode: boolean;
3022
+ }[];
3023
+ selectorsChecked: number;
3024
+ warnings: string[];
3025
+ };
3026
+ dmarc?: {
3027
+ exists: boolean;
3028
+ valid: boolean;
3029
+ record: string | null;
3030
+ policy: string | null;
3031
+ subdomainPolicy: string | null;
3032
+ reportingEnabled: boolean;
3033
+ pct: number | null;
3034
+ alignmentSpf: string | null;
3035
+ alignmentDkim: string | null;
3036
+ ruaAddresses: string[];
3037
+ warnings: string[];
3038
+ };
3039
+ mx?: {
3040
+ exists: boolean;
3041
+ hasRedundancy: boolean;
3042
+ records: {
3043
+ exchange: string;
3044
+ priority: number;
3045
+ resolves: boolean;
3046
+ ipv4Count: number;
3047
+ ipv6Count: number;
3048
+ }[];
3049
+ };
3050
+ domainAge?: {
3051
+ ageInDays: number | null;
3052
+ createdAt: string | null;
3053
+ expiresAt: string | null;
3054
+ daysUntilExpiry: number | null;
3055
+ registrar: string | null;
3056
+ source: string | null;
3057
+ privacyEnabled: boolean;
3058
+ };
3059
+ ipv6?: {
3060
+ mxHasIpv6: boolean;
3061
+ spfIncludesIpv6: boolean;
3062
+ mxIpv6Count: number;
3063
+ };
3064
+ reverseDns?: {
3065
+ allHavePtr: boolean;
3066
+ allConfirm: boolean;
3067
+ count: number;
3068
+ };
3069
+ blacklist?: {
3070
+ checked: boolean;
3071
+ overallClean: boolean;
3072
+ domainListings: {
3073
+ blacklist: string;
3074
+ priority: string;
3075
+ delistUrl: string | null;
3076
+ }[];
3077
+ ipListings: {
3078
+ blacklist: string;
3079
+ priority: string;
3080
+ target: string;
3081
+ delistUrl: string | null;
3082
+ }[];
3083
+ };
3084
+ issues?: {
3085
+ check: string;
3086
+ reason: string;
3087
+ points: number;
3088
+ severity: string;
3089
+ }[];
3090
+ bonuses?: {
3091
+ check: string;
3092
+ reason: string;
3093
+ points: number;
3094
+ }[];
3095
+ error?: string;
3096
+ };
3097
+ "text/plain": {
3098
+ success: boolean;
3099
+ domain?: string;
3100
+ checkedAt?: string;
3101
+ duration?: number;
3102
+ score?: {
3103
+ grade: string;
3104
+ score: number;
3105
+ maxScore: number;
3106
+ breakdown: {
3107
+ [key: string]: unknown;
3108
+ };
3109
+ };
3110
+ spf?: {
3111
+ exists: boolean;
3112
+ valid: boolean;
3113
+ record: string | null;
3114
+ lookupCount: number;
3115
+ lookupLimit: number;
3116
+ allMechanism: string | null;
3117
+ includes: string[];
3118
+ hasPtr: boolean;
3119
+ warnings: string[];
3120
+ };
3121
+ dkim?: {
3122
+ found: boolean;
3123
+ selectorsFound: {
3124
+ selector: string;
3125
+ keyType: string | null;
3126
+ keyBits: number | null;
3127
+ testMode: boolean;
3128
+ }[];
3129
+ selectorsChecked: number;
3130
+ warnings: string[];
3131
+ };
3132
+ dmarc?: {
3133
+ exists: boolean;
3134
+ valid: boolean;
3135
+ record: string | null;
3136
+ policy: string | null;
3137
+ subdomainPolicy: string | null;
3138
+ reportingEnabled: boolean;
3139
+ pct: number | null;
3140
+ alignmentSpf: string | null;
3141
+ alignmentDkim: string | null;
3142
+ ruaAddresses: string[];
3143
+ warnings: string[];
3144
+ };
3145
+ mx?: {
3146
+ exists: boolean;
3147
+ hasRedundancy: boolean;
3148
+ records: {
3149
+ exchange: string;
3150
+ priority: number;
3151
+ resolves: boolean;
3152
+ ipv4Count: number;
3153
+ ipv6Count: number;
3154
+ }[];
3155
+ };
3156
+ domainAge?: {
3157
+ ageInDays: number | null;
3158
+ createdAt: string | null;
3159
+ expiresAt: string | null;
3160
+ daysUntilExpiry: number | null;
3161
+ registrar: string | null;
3162
+ source: string | null;
3163
+ privacyEnabled: boolean;
3164
+ };
3165
+ ipv6?: {
3166
+ mxHasIpv6: boolean;
3167
+ spfIncludesIpv6: boolean;
3168
+ mxIpv6Count: number;
3169
+ };
3170
+ reverseDns?: {
3171
+ allHavePtr: boolean;
3172
+ allConfirm: boolean;
3173
+ count: number;
3174
+ };
3175
+ blacklist?: {
3176
+ checked: boolean;
3177
+ overallClean: boolean;
3178
+ domainListings: {
3179
+ blacklist: string;
3180
+ priority: string;
3181
+ delistUrl: string | null;
3182
+ }[];
3183
+ ipListings: {
3184
+ blacklist: string;
3185
+ priority: string;
3186
+ target: string;
3187
+ delistUrl: string | null;
3188
+ }[];
3189
+ };
3190
+ issues?: {
3191
+ check: string;
3192
+ reason: string;
3193
+ points: number;
3194
+ severity: string;
3195
+ }[];
3196
+ bonuses?: {
3197
+ check: string;
3198
+ reason: string;
3199
+ points: number;
3200
+ }[];
3201
+ error?: string;
3202
+ };
3203
+ };
3204
+ };
3205
+ };
3206
+ };
3207
+ "getToolsEmail-checkByDomain": {
3208
+ parameters: {
3209
+ query?: never;
3210
+ header?: never;
3211
+ path: {
3212
+ /** @description Domain to check */
3213
+ domain: string;
3214
+ };
3215
+ cookie?: never;
3216
+ };
3217
+ requestBody?: never;
3218
+ responses: {
3219
+ 200: {
3220
+ headers: {
3221
+ [name: string]: unknown;
3222
+ };
3223
+ content: {
3224
+ "application/json": {
3225
+ success: boolean;
3226
+ domain?: string;
3227
+ checkedAt?: string;
3228
+ duration?: number;
3229
+ score?: {
3230
+ grade: string;
3231
+ score: number;
3232
+ maxScore: number;
3233
+ breakdown: {
3234
+ [key: string]: unknown;
3235
+ };
3236
+ };
3237
+ spf?: {
3238
+ exists: boolean;
3239
+ valid: boolean;
3240
+ record: string | null;
3241
+ lookupCount: number;
3242
+ lookupLimit: number;
3243
+ allMechanism: string | null;
3244
+ includes: string[];
3245
+ hasPtr: boolean;
3246
+ warnings: string[];
3247
+ };
3248
+ dkim?: {
3249
+ found: boolean;
3250
+ selectorsFound: {
3251
+ selector: string;
3252
+ keyType: string | null;
3253
+ keyBits: number | null;
3254
+ testMode: boolean;
3255
+ }[];
3256
+ selectorsChecked: number;
3257
+ warnings: string[];
3258
+ };
3259
+ dmarc?: {
3260
+ exists: boolean;
3261
+ valid: boolean;
3262
+ record: string | null;
3263
+ policy: string | null;
3264
+ subdomainPolicy: string | null;
3265
+ reportingEnabled: boolean;
3266
+ pct: number | null;
3267
+ alignmentSpf: string | null;
3268
+ alignmentDkim: string | null;
3269
+ ruaAddresses: string[];
3270
+ warnings: string[];
3271
+ };
3272
+ mx?: {
3273
+ exists: boolean;
3274
+ hasRedundancy: boolean;
3275
+ records: {
3276
+ exchange: string;
3277
+ priority: number;
3278
+ resolves: boolean;
3279
+ ipv4Count: number;
3280
+ ipv6Count: number;
3281
+ }[];
3282
+ };
3283
+ domainAge?: {
3284
+ ageInDays: number | null;
3285
+ createdAt: string | null;
3286
+ expiresAt: string | null;
3287
+ daysUntilExpiry: number | null;
3288
+ registrar: string | null;
3289
+ source: string | null;
3290
+ privacyEnabled: boolean;
3291
+ };
3292
+ ipv6?: {
3293
+ mxHasIpv6: boolean;
3294
+ spfIncludesIpv6: boolean;
3295
+ mxIpv6Count: number;
3296
+ };
3297
+ reverseDns?: {
3298
+ allHavePtr: boolean;
3299
+ allConfirm: boolean;
3300
+ count: number;
3301
+ };
3302
+ blacklist?: {
3303
+ checked: boolean;
3304
+ overallClean: boolean;
3305
+ domainListings: {
3306
+ blacklist: string;
3307
+ priority: string;
3308
+ delistUrl: string | null;
3309
+ }[];
3310
+ ipListings: {
3311
+ blacklist: string;
3312
+ priority: string;
3313
+ target: string;
3314
+ delistUrl: string | null;
3315
+ }[];
3316
+ };
3317
+ issues?: {
3318
+ check: string;
3319
+ reason: string;
3320
+ points: number;
3321
+ severity: string;
3322
+ }[];
3323
+ bonuses?: {
3324
+ check: string;
3325
+ reason: string;
3326
+ points: number;
3327
+ }[];
3328
+ error?: string;
3329
+ };
3330
+ "multipart/form-data": {
3331
+ success: boolean;
3332
+ domain?: string;
3333
+ checkedAt?: string;
3334
+ duration?: number;
3335
+ score?: {
3336
+ grade: string;
3337
+ score: number;
3338
+ maxScore: number;
3339
+ breakdown: {
3340
+ [key: string]: unknown;
3341
+ };
3342
+ };
3343
+ spf?: {
3344
+ exists: boolean;
3345
+ valid: boolean;
3346
+ record: string | null;
3347
+ lookupCount: number;
3348
+ lookupLimit: number;
3349
+ allMechanism: string | null;
3350
+ includes: string[];
3351
+ hasPtr: boolean;
3352
+ warnings: string[];
3353
+ };
3354
+ dkim?: {
3355
+ found: boolean;
3356
+ selectorsFound: {
3357
+ selector: string;
3358
+ keyType: string | null;
3359
+ keyBits: number | null;
3360
+ testMode: boolean;
3361
+ }[];
3362
+ selectorsChecked: number;
3363
+ warnings: string[];
3364
+ };
3365
+ dmarc?: {
3366
+ exists: boolean;
3367
+ valid: boolean;
3368
+ record: string | null;
3369
+ policy: string | null;
3370
+ subdomainPolicy: string | null;
3371
+ reportingEnabled: boolean;
3372
+ pct: number | null;
3373
+ alignmentSpf: string | null;
3374
+ alignmentDkim: string | null;
3375
+ ruaAddresses: string[];
3376
+ warnings: string[];
3377
+ };
3378
+ mx?: {
3379
+ exists: boolean;
3380
+ hasRedundancy: boolean;
3381
+ records: {
3382
+ exchange: string;
3383
+ priority: number;
3384
+ resolves: boolean;
3385
+ ipv4Count: number;
3386
+ ipv6Count: number;
3387
+ }[];
3388
+ };
3389
+ domainAge?: {
3390
+ ageInDays: number | null;
3391
+ createdAt: string | null;
3392
+ expiresAt: string | null;
3393
+ daysUntilExpiry: number | null;
3394
+ registrar: string | null;
3395
+ source: string | null;
3396
+ privacyEnabled: boolean;
3397
+ };
3398
+ ipv6?: {
3399
+ mxHasIpv6: boolean;
3400
+ spfIncludesIpv6: boolean;
3401
+ mxIpv6Count: number;
3402
+ };
3403
+ reverseDns?: {
3404
+ allHavePtr: boolean;
3405
+ allConfirm: boolean;
3406
+ count: number;
3407
+ };
3408
+ blacklist?: {
3409
+ checked: boolean;
3410
+ overallClean: boolean;
3411
+ domainListings: {
3412
+ blacklist: string;
3413
+ priority: string;
3414
+ delistUrl: string | null;
3415
+ }[];
3416
+ ipListings: {
3417
+ blacklist: string;
3418
+ priority: string;
3419
+ target: string;
3420
+ delistUrl: string | null;
3421
+ }[];
3422
+ };
3423
+ issues?: {
3424
+ check: string;
3425
+ reason: string;
3426
+ points: number;
3427
+ severity: string;
3428
+ }[];
3429
+ bonuses?: {
3430
+ check: string;
3431
+ reason: string;
3432
+ points: number;
3433
+ }[];
3434
+ error?: string;
3435
+ };
3436
+ "text/plain": {
3437
+ success: boolean;
3438
+ domain?: string;
3439
+ checkedAt?: string;
3440
+ duration?: number;
3441
+ score?: {
3442
+ grade: string;
3443
+ score: number;
3444
+ maxScore: number;
3445
+ breakdown: {
3446
+ [key: string]: unknown;
3447
+ };
3448
+ };
3449
+ spf?: {
3450
+ exists: boolean;
3451
+ valid: boolean;
3452
+ record: string | null;
3453
+ lookupCount: number;
3454
+ lookupLimit: number;
3455
+ allMechanism: string | null;
3456
+ includes: string[];
3457
+ hasPtr: boolean;
3458
+ warnings: string[];
3459
+ };
3460
+ dkim?: {
3461
+ found: boolean;
3462
+ selectorsFound: {
3463
+ selector: string;
3464
+ keyType: string | null;
3465
+ keyBits: number | null;
3466
+ testMode: boolean;
3467
+ }[];
3468
+ selectorsChecked: number;
3469
+ warnings: string[];
3470
+ };
3471
+ dmarc?: {
3472
+ exists: boolean;
3473
+ valid: boolean;
3474
+ record: string | null;
3475
+ policy: string | null;
3476
+ subdomainPolicy: string | null;
3477
+ reportingEnabled: boolean;
3478
+ pct: number | null;
3479
+ alignmentSpf: string | null;
3480
+ alignmentDkim: string | null;
3481
+ ruaAddresses: string[];
3482
+ warnings: string[];
3483
+ };
3484
+ mx?: {
3485
+ exists: boolean;
3486
+ hasRedundancy: boolean;
3487
+ records: {
3488
+ exchange: string;
3489
+ priority: number;
3490
+ resolves: boolean;
3491
+ ipv4Count: number;
3492
+ ipv6Count: number;
3493
+ }[];
3494
+ };
3495
+ domainAge?: {
3496
+ ageInDays: number | null;
3497
+ createdAt: string | null;
3498
+ expiresAt: string | null;
3499
+ daysUntilExpiry: number | null;
3500
+ registrar: string | null;
3501
+ source: string | null;
3502
+ privacyEnabled: boolean;
3503
+ };
3504
+ ipv6?: {
3505
+ mxHasIpv6: boolean;
3506
+ spfIncludesIpv6: boolean;
3507
+ mxIpv6Count: number;
3508
+ };
3509
+ reverseDns?: {
3510
+ allHavePtr: boolean;
3511
+ allConfirm: boolean;
3512
+ count: number;
3513
+ };
3514
+ blacklist?: {
3515
+ checked: boolean;
3516
+ overallClean: boolean;
3517
+ domainListings: {
3518
+ blacklist: string;
3519
+ priority: string;
3520
+ delistUrl: string | null;
3521
+ }[];
3522
+ ipListings: {
3523
+ blacklist: string;
3524
+ priority: string;
3525
+ target: string;
3526
+ delistUrl: string | null;
3527
+ }[];
3528
+ };
3529
+ issues?: {
3530
+ check: string;
3531
+ reason: string;
3532
+ points: number;
3533
+ severity: string;
3534
+ }[];
3535
+ bonuses?: {
3536
+ check: string;
3537
+ reason: string;
3538
+ points: number;
3539
+ }[];
3540
+ error?: string;
3541
+ };
3542
+ };
3543
+ };
3544
+ };
3545
+ };
3546
+ "postV1Workflow-schedulesByWorkflowIdEnable": {
3547
+ parameters: {
3548
+ query?: never;
3549
+ header?: never;
3550
+ path: {
849
3551
  workflowId: string;
850
3552
  };
851
3553
  cookie?: never;
@@ -853,68 +3555,19 @@ interface operations {
853
3555
  requestBody: {
854
3556
  content: {
855
3557
  "application/json": {
856
- /** @description List of contacts to trigger the workflow for */
857
- contacts: {
858
- contactId?: string;
859
- contactEmail?: string;
860
- data?: {
861
- [key: string]: unknown;
862
- };
863
- }[];
864
- /** @description Common data to pass to all workflow triggers */
865
- data?: {
866
- [key: string]: unknown;
867
- };
3558
+ cronExpression: string;
3559
+ timezone?: string;
868
3560
  };
869
3561
  "multipart/form-data": {
870
- /** @description List of contacts to trigger the workflow for */
871
- contacts: {
872
- contactId?: string;
873
- contactEmail?: string;
874
- data?: {
875
- [key: string]: unknown;
876
- };
877
- }[];
878
- /** @description Common data to pass to all workflow triggers */
879
- data?: {
880
- [key: string]: unknown;
881
- };
3562
+ cronExpression: string;
3563
+ timezone?: string;
882
3564
  };
883
3565
  "text/plain": {
884
- /** @description List of contacts to trigger the workflow for */
885
- contacts: {
886
- contactId?: string;
887
- contactEmail?: string;
888
- data?: {
889
- [key: string]: unknown;
890
- };
891
- }[];
892
- /** @description Common data to pass to all workflow triggers */
893
- data?: {
894
- [key: string]: unknown;
895
- };
896
- };
897
- };
898
- };
899
- responses: {
900
- 200: {
901
- headers: {
902
- [name: string]: unknown;
3566
+ cronExpression: string;
3567
+ timezone?: string;
903
3568
  };
904
- content?: never;
905
- };
906
- };
907
- };
908
- postWebhooksSesByAwsAccountNumber: {
909
- parameters: {
910
- query?: never;
911
- header?: never;
912
- path: {
913
- awsAccountNumber: string;
914
3569
  };
915
- cookie?: never;
916
3570
  };
917
- requestBody?: never;
918
3571
  responses: {
919
3572
  200: {
920
3573
  headers: {
@@ -924,12 +3577,12 @@ interface operations {
924
3577
  };
925
3578
  };
926
3579
  };
927
- getUnsubscribeByToken: {
3580
+ "postV1Workflow-schedulesByWorkflowIdDisable": {
928
3581
  parameters: {
929
3582
  query?: never;
930
3583
  header?: never;
931
3584
  path: {
932
- token: string;
3585
+ workflowId: string;
933
3586
  };
934
3587
  cookie?: never;
935
3588
  };
@@ -943,20 +3596,29 @@ interface operations {
943
3596
  };
944
3597
  };
945
3598
  };
946
- postUnsubscribeByToken: {
3599
+ "putV1Workflow-schedulesByWorkflowId": {
947
3600
  parameters: {
948
3601
  query?: never;
949
3602
  header?: never;
950
3603
  path: {
951
- token: string;
3604
+ workflowId: string;
952
3605
  };
953
3606
  cookie?: never;
954
3607
  };
955
3608
  requestBody: {
956
3609
  content: {
957
- "application/json": unknown;
958
- "multipart/form-data": unknown;
959
- "text/plain": unknown;
3610
+ "application/json": {
3611
+ cronExpression: string;
3612
+ timezone?: string;
3613
+ };
3614
+ "multipart/form-data": {
3615
+ cronExpression: string;
3616
+ timezone?: string;
3617
+ };
3618
+ "text/plain": {
3619
+ cronExpression: string;
3620
+ timezone?: string;
3621
+ };
960
3622
  };
961
3623
  };
962
3624
  responses: {
@@ -1004,4 +3666,590 @@ interface WrapsPlatformConfig {
1004
3666
  declare function createPlatformClient(config: WrapsPlatformConfig): openapi_fetch.Client<paths, `${string}/${string}`>;
1005
3667
  type PlatformClient = ReturnType<typeof createPlatformClient>;
1006
3668
 
1007
- export { type PlatformClient, type WrapsPlatformConfig, createPlatformClient, type operations, type paths };
3669
+ /**
3670
+ * Wraps Project Configuration
3671
+ *
3672
+ * Identity functions for TypeScript intellisense when defining
3673
+ * wraps.config.ts and brand.ts files.
3674
+ */
3675
+ interface WrapsEnvironment {
3676
+ region?: string;
3677
+ from?: {
3678
+ email: string;
3679
+ name?: string;
3680
+ };
3681
+ replyTo?: string;
3682
+ }
3683
+ interface WrapsProjectConfig {
3684
+ /** Organization slug from wraps.dev */
3685
+ org: string;
3686
+ /** Default sender address */
3687
+ from?: {
3688
+ email: string;
3689
+ name?: string;
3690
+ };
3691
+ /** Default reply-to address */
3692
+ replyTo?: string;
3693
+ /** AWS region for SES */
3694
+ region?: string;
3695
+ /** Environment-specific overrides */
3696
+ environments?: Record<string, WrapsEnvironment>;
3697
+ /** Default environment name */
3698
+ defaultEnv?: string;
3699
+ /** Path to templates directory (default: "./templates") */
3700
+ templatesDir?: string;
3701
+ /** Path to workflows directory (default: "./workflows") */
3702
+ workflowsDir?: string;
3703
+ /** Path to brand file (default: "./brand.ts") */
3704
+ brandFile?: string;
3705
+ /** Preview server options */
3706
+ preview?: {
3707
+ port?: number;
3708
+ open?: boolean;
3709
+ };
3710
+ }
3711
+ interface WrapsBrandKit {
3712
+ /** Primary brand color (hex) */
3713
+ primaryColor: string;
3714
+ /** Secondary brand color (hex) */
3715
+ secondaryColor?: string;
3716
+ /** Email background color (hex) */
3717
+ backgroundColor?: string;
3718
+ /** Text color (hex) */
3719
+ textColor?: string;
3720
+ /** Body font family */
3721
+ fontFamily?: string;
3722
+ /** Heading font family */
3723
+ headingFontFamily?: string;
3724
+ /** Button border radius (CSS value) */
3725
+ buttonRadius?: string;
3726
+ /** Button style preset */
3727
+ buttonStyle?: 'rounded' | 'square' | 'pill';
3728
+ /** Company name for footer */
3729
+ companyName?: string;
3730
+ /** Company address for CAN-SPAM compliance */
3731
+ companyAddress?: string;
3732
+ /** Logo URL */
3733
+ logoUrl?: string;
3734
+ /** Social media links */
3735
+ socialLinks?: Array<{
3736
+ platform: string;
3737
+ url: string;
3738
+ }>;
3739
+ }
3740
+ /**
3741
+ * Define your Wraps project configuration.
3742
+ * Use this in `wraps/wraps.config.ts` for full TypeScript intellisense.
3743
+ *
3744
+ * @example
3745
+ * ```ts
3746
+ * import { defineConfig } from '@wraps.dev/client';
3747
+ *
3748
+ * export default defineConfig({
3749
+ * org: 'my-company',
3750
+ * from: { email: 'hello@myapp.com', name: 'My App' },
3751
+ * region: 'us-east-1',
3752
+ * });
3753
+ * ```
3754
+ */
3755
+ declare function defineConfig(config: WrapsProjectConfig): WrapsProjectConfig;
3756
+ /**
3757
+ * Define your brand kit for consistent email styling.
3758
+ * Use this in `wraps/brand.ts` for full TypeScript intellisense.
3759
+ *
3760
+ * @example
3761
+ * ```ts
3762
+ * import { defineBrand } from '@wraps.dev/client';
3763
+ *
3764
+ * export default defineBrand({
3765
+ * primaryColor: '#5046e5',
3766
+ * companyName: 'My Company',
3767
+ * companyAddress: '123 Main St, City, ST 12345',
3768
+ * });
3769
+ * ```
3770
+ */
3771
+ declare function defineBrand(brand: WrapsBrandKit): WrapsBrandKit;
3772
+
3773
+ /**
3774
+ * Workflow Definition Types
3775
+ *
3776
+ * Declarative TypeScript workflow definitions for email automation.
3777
+ * Use `defineWorkflow()` in `wraps/workflows/*.ts` for full TypeScript intellisense.
3778
+ *
3779
+ * @example
3780
+ * ```ts
3781
+ * import { defineWorkflow, sendEmail, delay, condition, exit } from '@wraps.dev/client';
3782
+ *
3783
+ * export default defineWorkflow({
3784
+ * name: 'User Onboarding',
3785
+ * description: 'Welcome sequence for new users',
3786
+ *
3787
+ * trigger: { type: 'contact_created' },
3788
+ *
3789
+ * steps: [
3790
+ * sendEmail('welcome', { template: 'welcome' }),
3791
+ * delay('wait-1-day', { days: 1 }),
3792
+ * condition('check-activation', {
3793
+ * field: 'contact.hasActivated',
3794
+ * operator: 'equals',
3795
+ * value: true,
3796
+ * branches: {
3797
+ * yes: [exit('activated')],
3798
+ * no: [sendEmail('tips', { template: 'getting-started-tips' })],
3799
+ * },
3800
+ * }),
3801
+ * ],
3802
+ * });
3803
+ * ```
3804
+ */
3805
+ /**
3806
+ * Trigger types for workflow entry points
3807
+ */
3808
+ type WorkflowTriggerType = 'event' | 'contact_created' | 'contact_updated' | 'segment_entry' | 'segment_exit' | 'schedule' | 'api' | 'topic_subscribed' | 'topic_unsubscribed';
3809
+ /**
3810
+ * Trigger configuration based on trigger type
3811
+ */
3812
+ interface TriggerDefinition {
3813
+ /** The type of trigger that starts this workflow */
3814
+ type: WorkflowTriggerType;
3815
+ /** For 'event' trigger: the event name to listen for */
3816
+ eventName?: string;
3817
+ /** For segment triggers: the segment ID to monitor */
3818
+ segmentId?: string;
3819
+ /** For 'schedule' trigger: cron expression */
3820
+ schedule?: string;
3821
+ /** For 'schedule' trigger: timezone (e.g., 'America/New_York') */
3822
+ timezone?: string;
3823
+ /** For topic triggers: the topic ID to monitor */
3824
+ topicId?: string;
3825
+ }
3826
+ /**
3827
+ * Workflow step types available in the builder
3828
+ */
3829
+ type WorkflowStepType = 'trigger' | 'send_email' | 'send_sms' | 'delay' | 'exit' | 'condition' | 'webhook' | 'update_contact' | 'wait_for_event' | 'wait_for_email_engagement' | 'subscribe_topic' | 'unsubscribe_topic';
3830
+ /**
3831
+ * Duration configuration for delays and timeouts
3832
+ */
3833
+ interface DurationConfig {
3834
+ /** Number of days */
3835
+ days?: number;
3836
+ /** Number of hours */
3837
+ hours?: number;
3838
+ /** Number of minutes */
3839
+ minutes?: number;
3840
+ }
3841
+ /**
3842
+ * Condition operators for branching
3843
+ */
3844
+ type ConditionOperator = 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'greater_than' | 'less_than' | 'greater_than_or_equals' | 'less_than_or_equals' | 'is_set' | 'is_not_set' | 'is_true' | 'is_false';
3845
+ /**
3846
+ * Configuration for send_email step
3847
+ */
3848
+ interface SendEmailStepConfig {
3849
+ /** Template slug or inline content */
3850
+ template?: string;
3851
+ subject?: string;
3852
+ body?: string;
3853
+ /** Override sender address */
3854
+ from?: string;
3855
+ /** Override sender name */
3856
+ fromName?: string;
3857
+ /** Override reply-to address */
3858
+ replyTo?: string;
3859
+ }
3860
+ /**
3861
+ * Configuration for send_sms step
3862
+ */
3863
+ interface SendSmsStepConfig {
3864
+ /** Template slug or inline message */
3865
+ template?: string;
3866
+ message?: string;
3867
+ /** Override sender ID */
3868
+ senderId?: string;
3869
+ }
3870
+ /**
3871
+ * Configuration for delay step (user-facing)
3872
+ */
3873
+ interface DelayStepConfig extends DurationConfig {
3874
+ }
3875
+ /**
3876
+ * Configuration for delay step (internal/DB format)
3877
+ */
3878
+ interface DelayStepDbConfig {
3879
+ /** Delay amount */
3880
+ amount: number;
3881
+ /** Delay unit */
3882
+ unit: 'minutes' | 'hours' | 'days' | 'weeks';
3883
+ }
3884
+ /**
3885
+ * Configuration for condition step
3886
+ */
3887
+ interface ConditionStepConfig {
3888
+ /** Field to evaluate (e.g., 'contact.email', 'contact.hasActivated') */
3889
+ field: string;
3890
+ /** Comparison operator */
3891
+ operator: ConditionOperator;
3892
+ /** Value to compare against (not used for is_set, is_not_set, is_true, is_false) */
3893
+ value?: unknown;
3894
+ /** Branches for yes/no outcomes */
3895
+ branches: {
3896
+ yes?: StepDefinition[];
3897
+ no?: StepDefinition[];
3898
+ };
3899
+ }
3900
+ /**
3901
+ * Configuration for wait_for_event step (user-facing)
3902
+ */
3903
+ interface WaitForEventStepConfig {
3904
+ /** Event name to wait for */
3905
+ eventName: string;
3906
+ /** Timeout duration (optional) - will be converted to timeoutSeconds */
3907
+ timeout?: DurationConfig;
3908
+ }
3909
+ /**
3910
+ * Configuration for wait_for_event step (internal/DB format)
3911
+ */
3912
+ interface WaitForEventStepDbConfig {
3913
+ /** Event name to wait for */
3914
+ eventName: string;
3915
+ /** Timeout in seconds */
3916
+ timeoutSeconds?: number;
3917
+ }
3918
+ /**
3919
+ * Configuration for wait_for_email_engagement step (user-facing)
3920
+ */
3921
+ interface WaitForEmailEngagementStepConfig {
3922
+ /** ID of the email step to track */
3923
+ emailStepId: string;
3924
+ /** Type of engagement to wait for */
3925
+ engagementType: 'opened' | 'clicked';
3926
+ /** Timeout duration (optional) - will be converted to timeoutSeconds */
3927
+ timeout?: DurationConfig;
3928
+ }
3929
+ /**
3930
+ * Configuration for wait_for_email_engagement step (internal/DB format)
3931
+ */
3932
+ interface WaitForEmailEngagementStepDbConfig {
3933
+ /** Timeout in seconds */
3934
+ timeoutSeconds?: number;
3935
+ }
3936
+ /**
3937
+ * Configuration for update_contact step
3938
+ */
3939
+ interface UpdateContactStepConfig {
3940
+ /** Field updates to apply */
3941
+ updates: Array<{
3942
+ field: string;
3943
+ operation: 'set' | 'increment' | 'decrement' | 'append' | 'remove';
3944
+ value?: unknown;
3945
+ }>;
3946
+ }
3947
+ /**
3948
+ * Configuration for webhook step
3949
+ */
3950
+ interface WebhookStepConfig {
3951
+ /** Webhook URL */
3952
+ url: string;
3953
+ /** HTTP method (default: POST) */
3954
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
3955
+ /** HTTP headers */
3956
+ headers?: Record<string, string>;
3957
+ /** Request body (for POST/PUT/PATCH) */
3958
+ body?: Record<string, unknown>;
3959
+ }
3960
+ /**
3961
+ * Configuration for subscribe/unsubscribe_topic step
3962
+ */
3963
+ interface TopicStepConfig {
3964
+ /** Topic ID to subscribe to or unsubscribe from */
3965
+ topicId: string;
3966
+ /** Channel for the subscription */
3967
+ channel?: 'email' | 'sms';
3968
+ }
3969
+ /**
3970
+ * Configuration for exit step
3971
+ */
3972
+ interface ExitStepConfig {
3973
+ /** Optional reason for exiting */
3974
+ reason?: string;
3975
+ /** Mark execution as completed, cancelled, or failed */
3976
+ markAs?: 'completed' | 'cancelled' | 'failed';
3977
+ }
3978
+ /**
3979
+ * A step in the workflow definition
3980
+ */
3981
+ interface StepDefinition {
3982
+ /** Unique step identifier (used for transitions and references) */
3983
+ id: string;
3984
+ /** Step type */
3985
+ type: WorkflowStepType;
3986
+ /** Optional display name (defaults to type if not provided) */
3987
+ name?: string;
3988
+ /** Step-specific configuration */
3989
+ config: StepConfig;
3990
+ /** Branches for condition steps */
3991
+ branches?: {
3992
+ yes?: StepDefinition[];
3993
+ no?: StepDefinition[];
3994
+ };
3995
+ }
3996
+ /**
3997
+ * Union of all step configurations (internal/DB format)
3998
+ * This is the format stored in the database and used by the execution engine.
3999
+ */
4000
+ type StepConfig = ({
4001
+ type: 'send_email';
4002
+ } & SendEmailStepConfig) | ({
4003
+ type: 'send_sms';
4004
+ } & SendSmsStepConfig) | ({
4005
+ type: 'delay';
4006
+ } & DelayStepDbConfig) | ({
4007
+ type: 'condition';
4008
+ } & Omit<ConditionStepConfig, 'branches'>) | ({
4009
+ type: 'wait_for_event';
4010
+ } & WaitForEventStepDbConfig) | ({
4011
+ type: 'wait_for_email_engagement';
4012
+ } & WaitForEmailEngagementStepDbConfig) | ({
4013
+ type: 'update_contact';
4014
+ } & UpdateContactStepConfig) | ({
4015
+ type: 'webhook';
4016
+ } & WebhookStepConfig) | ({
4017
+ type: 'subscribe_topic';
4018
+ } & TopicStepConfig) | ({
4019
+ type: 'unsubscribe_topic';
4020
+ } & TopicStepConfig) | ({
4021
+ type: 'exit';
4022
+ } & ExitStepConfig);
4023
+ /**
4024
+ * Workflow execution settings
4025
+ */
4026
+ interface WorkflowSettings {
4027
+ /** Allow the same contact to re-enter the workflow if they trigger it again */
4028
+ allowReentry?: boolean;
4029
+ /** Minimum seconds between re-entries for the same contact (only used if allowReentry is true) */
4030
+ reentryDelaySeconds?: number;
4031
+ /** Maximum concurrent executions allowed for this workflow */
4032
+ maxConcurrentExecutions?: number;
4033
+ /** Cooldown period in seconds before a contact can trigger this workflow again */
4034
+ contactCooldownSeconds?: number;
4035
+ }
4036
+ /**
4037
+ * Complete workflow definition
4038
+ */
4039
+ interface WorkflowDefinition {
4040
+ /** Display name for the workflow */
4041
+ name: string;
4042
+ /** Optional description */
4043
+ description?: string;
4044
+ /** What triggers this workflow */
4045
+ trigger: TriggerDefinition;
4046
+ /** Steps in the workflow (executed sequentially unless branched) */
4047
+ steps: StepDefinition[];
4048
+ /** Execution settings */
4049
+ settings?: WorkflowSettings;
4050
+ /** Optional: associate workflow with a topic for subscription checks */
4051
+ topicId?: string;
4052
+ /** Default sender settings (can be overridden per step) */
4053
+ defaults?: {
4054
+ from?: string;
4055
+ fromName?: string;
4056
+ replyTo?: string;
4057
+ senderId?: string;
4058
+ };
4059
+ }
4060
+ /**
4061
+ * Define an email automation workflow.
4062
+ * Use this in `wraps/workflows/*.ts` for full TypeScript intellisense.
4063
+ *
4064
+ * @example
4065
+ * ```ts
4066
+ * import { defineWorkflow, sendEmail, delay, exit } from '@wraps.dev/client';
4067
+ *
4068
+ * export default defineWorkflow({
4069
+ * name: 'Welcome Sequence',
4070
+ * trigger: { type: 'contact_created' },
4071
+ * steps: [
4072
+ * sendEmail('welcome', { template: 'welcome' }),
4073
+ * delay('wait-1-day', { days: 1 }),
4074
+ * sendEmail('tips', { template: 'getting-started-tips' }),
4075
+ * ],
4076
+ * });
4077
+ * ```
4078
+ */
4079
+ declare function defineWorkflow(definition: WorkflowDefinition): WorkflowDefinition;
4080
+
4081
+ /**
4082
+ * Workflow Step Helper Functions
4083
+ *
4084
+ * Ergonomic helpers for defining workflow steps declaratively.
4085
+ * These functions return step definitions that can be used in `defineWorkflow()`.
4086
+ */
4087
+
4088
+ /**
4089
+ * Send an email using a template or inline content.
4090
+ *
4091
+ * @example
4092
+ * ```ts
4093
+ * // Using a template
4094
+ * sendEmail('welcome', { template: 'welcome-email' })
4095
+ *
4096
+ * // With overrides
4097
+ * sendEmail('promo', {
4098
+ * template: 'promo-email',
4099
+ * from: 'marketing@example.com',
4100
+ * fromName: 'Marketing Team',
4101
+ * })
4102
+ * ```
4103
+ */
4104
+ declare function sendEmail(id: string, config: SendEmailStepConfig & {
4105
+ name?: string;
4106
+ }): StepDefinition;
4107
+ /**
4108
+ * Send an SMS using a template or inline message.
4109
+ *
4110
+ * @example
4111
+ * ```ts
4112
+ * // Using a template
4113
+ * sendSms('reminder', { template: 'appointment-reminder' })
4114
+ *
4115
+ * // Inline message
4116
+ * sendSms('otp', { message: 'Your code is {{otp}}' })
4117
+ * ```
4118
+ */
4119
+ declare function sendSms(id: string, config: SendSmsStepConfig & {
4120
+ name?: string;
4121
+ }): StepDefinition;
4122
+ /**
4123
+ * Wait for a specified duration before continuing.
4124
+ *
4125
+ * @example
4126
+ * ```ts
4127
+ * delay('wait-1-day', { days: 1 })
4128
+ * delay('wait-2-hours', { hours: 2 })
4129
+ * delay('wait-30-min', { minutes: 30 })
4130
+ * ```
4131
+ */
4132
+ declare function delay(id: string, duration: DurationConfig & {
4133
+ name?: string;
4134
+ }): StepDefinition;
4135
+ /**
4136
+ * Branch the workflow based on a condition.
4137
+ *
4138
+ * @example
4139
+ * ```ts
4140
+ * condition('check-activated', {
4141
+ * field: 'contact.hasActivated',
4142
+ * operator: 'equals',
4143
+ * value: true,
4144
+ * branches: {
4145
+ * yes: [exit('already-active')],
4146
+ * no: [sendEmail('activation-reminder', { template: 'activate' })],
4147
+ * },
4148
+ * })
4149
+ * ```
4150
+ */
4151
+ declare function condition(id: string, config: ConditionStepConfig & {
4152
+ name?: string;
4153
+ }): StepDefinition;
4154
+ /**
4155
+ * Wait for a specific event before continuing.
4156
+ *
4157
+ * @example
4158
+ * ```ts
4159
+ * waitForEvent('wait-for-purchase', {
4160
+ * eventName: 'purchase_completed',
4161
+ * timeout: { days: 7 },
4162
+ * })
4163
+ * ```
4164
+ */
4165
+ declare function waitForEvent(id: string, config: WaitForEventStepConfig & {
4166
+ name?: string;
4167
+ }): StepDefinition;
4168
+ /**
4169
+ * Wait for engagement with a previous email step.
4170
+ *
4171
+ * @example
4172
+ * ```ts
4173
+ * waitForEmailEngagement('wait-for-open', {
4174
+ * emailStepId: 'welcome',
4175
+ * engagementType: 'opened',
4176
+ * timeout: { days: 3 },
4177
+ * })
4178
+ * ```
4179
+ */
4180
+ declare function waitForEmailEngagement(id: string, config: WaitForEmailEngagementStepConfig & {
4181
+ name?: string;
4182
+ }): StepDefinition;
4183
+ /**
4184
+ * Exit the workflow.
4185
+ *
4186
+ * @example
4187
+ * ```ts
4188
+ * exit('completed')
4189
+ * exit('cancelled', { reason: 'User unsubscribed', markAs: 'cancelled' })
4190
+ * ```
4191
+ */
4192
+ declare function exit(id: string, config?: ExitStepConfig & {
4193
+ name?: string;
4194
+ }): StepDefinition;
4195
+ /**
4196
+ * Update contact fields.
4197
+ *
4198
+ * @example
4199
+ * ```ts
4200
+ * updateContact('mark-welcomed', {
4201
+ * updates: [
4202
+ * { field: 'welcomeEmailSent', operation: 'set', value: true },
4203
+ * { field: 'emailCount', operation: 'increment', value: 1 },
4204
+ * ],
4205
+ * })
4206
+ * ```
4207
+ */
4208
+ declare function updateContact(id: string, config: Omit<UpdateContactStepConfig, 'type'> & {
4209
+ name?: string;
4210
+ }): StepDefinition;
4211
+ /**
4212
+ * Subscribe a contact to a topic.
4213
+ *
4214
+ * @example
4215
+ * ```ts
4216
+ * subscribeTopic('subscribe-newsletter', {
4217
+ * topicId: 'newsletter',
4218
+ * channel: 'email',
4219
+ * })
4220
+ * ```
4221
+ */
4222
+ declare function subscribeTopic(id: string, config: Omit<TopicStepConfig, 'type'> & {
4223
+ name?: string;
4224
+ }): StepDefinition;
4225
+ /**
4226
+ * Unsubscribe a contact from a topic.
4227
+ *
4228
+ * @example
4229
+ * ```ts
4230
+ * unsubscribeTopic('unsubscribe-promo', {
4231
+ * topicId: 'promotions',
4232
+ * channel: 'email',
4233
+ * })
4234
+ * ```
4235
+ */
4236
+ declare function unsubscribeTopic(id: string, config: Omit<TopicStepConfig, 'type'> & {
4237
+ name?: string;
4238
+ }): StepDefinition;
4239
+ /**
4240
+ * Call an external webhook.
4241
+ *
4242
+ * @example
4243
+ * ```ts
4244
+ * webhook('notify-slack', {
4245
+ * url: 'https://hooks.slack.com/services/...',
4246
+ * method: 'POST',
4247
+ * body: { text: 'New user signed up!' },
4248
+ * })
4249
+ * ```
4250
+ */
4251
+ declare function webhook(id: string, config: Omit<WebhookStepConfig, 'type'> & {
4252
+ name?: string;
4253
+ }): StepDefinition;
4254
+
4255
+ export { type ConditionOperator, type ConditionStepConfig, type DelayStepConfig, type DelayStepDbConfig, type DurationConfig, type ExitStepConfig, type PlatformClient, type SendEmailStepConfig, type SendSmsStepConfig, type StepConfig, type StepDefinition, type TopicStepConfig, type TriggerDefinition, type UpdateContactStepConfig, type WaitForEmailEngagementStepConfig, type WaitForEmailEngagementStepDbConfig, type WaitForEventStepConfig, type WaitForEventStepDbConfig, type WebhookStepConfig, type WorkflowDefinition, type WorkflowSettings, type WorkflowStepType, type WorkflowTriggerType, type WrapsBrandKit, type WrapsEnvironment, type WrapsPlatformConfig, type WrapsProjectConfig, condition, createPlatformClient, defineBrand, defineConfig, defineWorkflow, delay, exit, type operations, type paths, sendEmail, sendSms, subscribeTopic, unsubscribeTopic, updateContact, waitForEmailEngagement, waitForEvent, webhook };