samva 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/AGENTS.md +4 -1
  2. package/README.md +46 -1
  3. package/dist/analytics-CaqPRsry.js +207 -0
  4. package/dist/api-keys-Ce1Y4_Ip.js +274 -0
  5. package/dist/attachments-DYqVIraC.js +140 -0
  6. package/dist/brands-ZwuOGIWO.js +175 -0
  7. package/dist/campaigns-DZlz1E9E.js +522 -0
  8. package/dist/categories-CA4XIQAb.js +1011 -0
  9. package/dist/client/sdk.gen.d.ts +234 -49
  10. package/dist/client/types.gen.d.ts +1521 -348
  11. package/dist/client-DOzUrdTE.js +1115 -0
  12. package/dist/contact-groups-BLbFXnjq.js +446 -0
  13. package/dist/contacts-BbsoXXB4.js +787 -0
  14. package/dist/conversations-_sRHueML.js +494 -0
  15. package/dist/custom-fields-BHWbwlKn.js +176 -0
  16. package/dist/effect/analytics.js +2 -21
  17. package/dist/effect/api-keys.d.ts +1 -0
  18. package/dist/effect/api-keys.js +2 -25
  19. package/dist/effect/attachments.js +2 -17
  20. package/dist/effect/brands.d.ts +1 -1
  21. package/dist/effect/brands.js +3 -24
  22. package/dist/effect/campaigns.js +2 -33
  23. package/dist/effect/categories.js +1 -1
  24. package/dist/effect/client.d.ts +1 -1
  25. package/dist/effect/client.js +3 -4
  26. package/dist/effect/contact-groups.js +2 -29
  27. package/dist/effect/contacts.d.ts +52 -0
  28. package/dist/effect/contacts.js +2 -47
  29. package/dist/effect/conversations.js +2 -35
  30. package/dist/effect/custom-fields.js +2 -17
  31. package/dist/effect/email.d.ts +3 -20
  32. package/dist/effect/email.js +2 -141
  33. package/dist/effect/events.d.ts +121 -0
  34. package/dist/effect/events.js +3 -0
  35. package/dist/effect/extension-installations.js +2 -27
  36. package/dist/effect/extensions.js +2 -19
  37. package/dist/effect/feedback.d.ts +1 -1
  38. package/dist/effect/feedback.js +3 -13
  39. package/dist/effect/generated/analytics.d.ts +715 -0
  40. package/dist/effect/generated/api-keys.d.ts +1627 -0
  41. package/dist/effect/generated/attachments.d.ts +554 -0
  42. package/dist/effect/generated/brands.d.ts +1118 -0
  43. package/dist/effect/generated/campaigns.d.ts +3783 -0
  44. package/dist/effect/generated/contact-events.d.ts +158 -0
  45. package/dist/effect/generated/contact-groups.d.ts +1445 -0
  46. package/dist/effect/generated/contacts.d.ts +3789 -0
  47. package/dist/effect/generated/conversations.d.ts +2870 -0
  48. package/dist/effect/generated/custom-fields.d.ts +562 -0
  49. package/dist/effect/generated/email.d.ts +10622 -0
  50. package/dist/effect/generated/events.d.ts +463 -0
  51. package/dist/effect/generated/extension-installations.d.ts +1786 -0
  52. package/dist/effect/generated/extensions.d.ts +927 -0
  53. package/dist/effect/generated/feedback.d.ts +116 -0
  54. package/dist/effect/generated/index.d.ts +61 -0
  55. package/dist/effect/generated/journeys.d.ts +6135 -0
  56. package/dist/effect/generated/mailboxes.d.ts +13641 -0
  57. package/dist/effect/generated/media.d.ts +741 -0
  58. package/dist/effect/generated/messages.d.ts +2355 -0
  59. package/dist/effect/generated/namespaces.d.ts +654 -0
  60. package/dist/effect/generated/operations.d.ts +514 -0
  61. package/dist/effect/generated/organizations.d.ts +1111 -0
  62. package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
  63. package/dist/effect/generated/shared.d.ts +3250 -0
  64. package/dist/effect/generated/subscriptions.d.ts +188 -0
  65. package/dist/effect/generated/templates.d.ts +8177 -0
  66. package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
  67. package/dist/effect/generated/webhooks.d.ts +1697 -0
  68. package/dist/effect/generated/whoami.d.ts +291 -0
  69. package/dist/effect/generated-metadata.d.ts +1631 -0
  70. package/dist/effect/index.d.ts +4 -1
  71. package/dist/effect/index.js +29 -26
  72. package/dist/effect/internal/client.d.ts +10 -7
  73. package/dist/effect/internal/email-sender.d.ts +17 -0
  74. package/dist/effect/internal/operation.d.ts +12 -72
  75. package/dist/effect/internal/send.d.ts +60 -0
  76. package/dist/effect/journeys.d.ts +2153 -0
  77. package/dist/effect/journeys.js +2 -0
  78. package/dist/effect/mailboxes.d.ts +255 -205
  79. package/dist/effect/mailboxes.js +2 -2
  80. package/dist/effect/media.js +3 -1
  81. package/dist/effect/messages.d.ts +2 -2
  82. package/dist/effect/messages.js +3 -1
  83. package/dist/effect/namespaces.js +2 -19
  84. package/dist/effect/operations.js +2 -15
  85. package/dist/effect/organizations.js +2 -23
  86. package/dist/effect/retry.js +1 -1
  87. package/dist/effect/scheduled-messages.js +2 -19
  88. package/dist/effect/subscriptions.js +2 -9
  89. package/dist/effect/templates.d.ts +1 -1
  90. package/dist/effect/templates.js +3 -78
  91. package/dist/effect/unsubscribe-groups.js +2 -27
  92. package/dist/effect/webhooks.d.ts +9 -9
  93. package/dist/effect/webhooks.js +3 -33
  94. package/dist/effect/whoami.d.ts +46 -0
  95. package/dist/effect/whoami.js +2 -0
  96. package/dist/email-R0NAA9PW.js +2498 -0
  97. package/dist/events-CxbTUHYT.js +82 -0
  98. package/dist/extension-installations-CD94LPmk.js +407 -0
  99. package/dist/extensions-BKyNQLvu.js +220 -0
  100. package/dist/feedback-Bpa09JOS.js +52 -0
  101. package/dist/index.js +3 -3
  102. package/dist/{inline-attachments-UxLeyytJ.js → inline-attachments-Bi1hDltp.js} +2 -2
  103. package/dist/journeys-CARo_BJT.js +499 -0
  104. package/dist/mailboxes-BRDn7BIK.js +2470 -0
  105. package/dist/media-VrrtNnft.js +181 -0
  106. package/dist/namespaces-CcvEbG-y.js +152 -0
  107. package/dist/{operation-BZ5Xov-x.js → operation-n_IYgNVK.js} +85 -102
  108. package/dist/operations-CmB3FHwf.js +93 -0
  109. package/dist/organizations-A-plufWc.js +252 -0
  110. package/dist/promises/errors.gen.d.ts +12 -2
  111. package/dist/promises/index.d.ts +9 -3
  112. package/dist/promises/index.js +3 -3
  113. package/dist/promises/types.gen.d.ts +1 -1
  114. package/dist/{promises-Cd6Jamqk.js → promises---Kbh-7z.js} +745 -195
  115. package/dist/runtime-P0l1_2-C.js +25 -0
  116. package/dist/scheduled-messages-DkKZRRaN.js +207 -0
  117. package/dist/send-Bxc0XfGE.js +722 -0
  118. package/dist/service-map.d.ts +101 -15
  119. package/dist/subscriptions-DEXYtMXg.js +67 -0
  120. package/dist/templates-DZomxsG7.js +2289 -0
  121. package/dist/unsubscribe-groups-Iqk4Isf9.js +291 -0
  122. package/dist/webhooks-CPXuu8Xf.js +530 -0
  123. package/dist/whoami-Ccz0jwlt.js +59 -0
  124. package/package.json +17 -3
  125. package/dist/categories-BGUBFdH9.js +0 -183
  126. package/dist/client-CDg7zJs0.js +0 -13726
  127. package/dist/effect/generated.d.ts +0 -64059
  128. package/dist/mailboxes-BH_JPmOE.js +0 -159
@@ -257,7 +257,7 @@ export type MailboxEventPage = {
257
257
  };
258
258
  export type MailboxEvent = {
259
259
  id: MailboxEventId;
260
- type: "mailbox.created" | "address.attached" | "address.detached" | "email.received" | "email.released" | "email.sent" | "thread.created" | "action.proposed" | "action.policy_decided" | "action.approval_requested" | "action.approval_resolved" | "action.accepted" | "action.executed" | "action.failed";
260
+ type: "mailbox.created" | "endpoint.attached" | "endpoint.detached" | "message.received" | "message.released" | "message.sent" | "thread.created" | "action.proposed" | "action.policy_decided" | "action.approval_requested" | "action.approval_resolved" | "action.accepted" | "action.executed" | "action.failed";
261
261
  threadId: MailboxThreadId | null;
262
262
  actionId: MailboxActionId | null;
263
263
  actor: {
@@ -393,6 +393,7 @@ export type MailboxSendAction = {
393
393
  intent: MailboxSendSnapshot | null;
394
394
  };
395
395
  export type MailboxSendSnapshot = {
396
+ channel: "email";
396
397
  draftRevision: number;
397
398
  from: string;
398
399
  fromName: string | null;
@@ -456,6 +457,11 @@ export type MailboxSendRefusedError = {
456
457
  message: string;
457
458
  receipt: MailboxSendReceipt;
458
459
  };
460
+ export type MailboxChannelUnsupportedError = {
461
+ _tag: "MailboxChannelUnsupportedError";
462
+ message: string;
463
+ channel: string;
464
+ };
459
465
  export type MailboxPendingAction = MailboxSendAction | MailboxNonSendAction;
460
466
  export type MailboxPendingSendReceipt = {
461
467
  actionId: MailboxActionId;
@@ -481,6 +487,7 @@ export type MailboxActionPage = {
481
487
  };
482
488
  export type MailboxDraft = {
483
489
  id: MailboxDraftId;
490
+ channel: "email";
484
491
  threadId: MailboxThreadId | null;
485
492
  inReplyToMessageId: MessageId | null;
486
493
  state: MailboxDraftState;
@@ -489,6 +496,7 @@ export type MailboxDraft = {
489
496
  subject: string | null;
490
497
  createdAt: string;
491
498
  updatedAt: string;
499
+ endpointId: MailboxEndpointId | null;
492
500
  cc: Array<string>;
493
501
  bcc: Array<string>;
494
502
  replyTo: Array<string>;
@@ -497,6 +505,7 @@ export type MailboxDraft = {
497
505
  attachments: Array<EmailAttachment>;
498
506
  };
499
507
  export type MailboxDraftState = "saved" | "locked" | "sent";
508
+ export type MailboxEndpointId = string;
500
509
  export type UpdateMailboxDraftPayload = {
501
510
  to?: Array<string> | null | undefined;
502
511
  cc?: Array<string> | null | null | undefined;
@@ -508,6 +517,8 @@ export type UpdateMailboxDraftPayload = {
508
517
  attachments?: Array<EmailAttachment> | null | null | undefined;
509
518
  };
510
519
  export type CreateMailboxDraftPayload = {
520
+ channel?: "email" | null | undefined;
521
+ endpointId?: MailboxEndpointId | null | undefined;
511
522
  to?: Array<string> | null | undefined;
512
523
  cc?: Array<string> | null | undefined;
513
524
  bcc?: Array<string> | null | undefined;
@@ -524,6 +535,7 @@ export type MailboxDraftPage = {
524
535
  };
525
536
  export type MailboxDraftSummary = {
526
537
  id: MailboxDraftId;
538
+ channel: MailboxChannel;
527
539
  threadId: MailboxThreadId | null;
528
540
  inReplyToMessageId: MessageId | null;
529
541
  state: MailboxDraftState;
@@ -533,6 +545,10 @@ export type MailboxDraftSummary = {
533
545
  createdAt: string;
534
546
  updatedAt: string;
535
547
  };
548
+ /**
549
+ * The channel an endpoint, thread, or message belongs to.
550
+ */
551
+ export type MailboxChannel = "email";
536
552
  export type MailboxQuarantinedMessage = {
537
553
  id: MessageId;
538
554
  disposition: "quarantined" | "isolated";
@@ -562,6 +578,7 @@ export type ForwardMailboxMessagePayload = {
562
578
  attachments?: Array<EmailAttachment> | null | undefined;
563
579
  };
564
580
  export type ReplyMailboxMessagePayload = {
581
+ channel?: "email" | null | undefined;
565
582
  cc?: Array<string> | null | undefined;
566
583
  bcc?: Array<string> | null | undefined;
567
584
  text?: string | null | undefined;
@@ -586,6 +603,13 @@ export type MailboxMessage = {
586
603
  conversationId: ConversationId;
587
604
  direction: "inbound" | "outbound";
588
605
  from: MailboxMessageSender;
606
+ sentBy?: {
607
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
608
+ id: string;
609
+ displayName?: string | null | undefined;
610
+ } | null | undefined;
611
+ occurredAt: string;
612
+ channel: "email";
589
613
  recipients: Array<MailboxMessageRecipient>;
590
614
  replyTo: Array<string>;
591
615
  subject?: string | null | undefined;
@@ -605,12 +629,15 @@ export type MailboxMessage = {
605
629
  size: number;
606
630
  isInline: boolean;
607
631
  }>;
608
- sentBy?: {
632
+ };
633
+ export type MailboxMessageSender = {
634
+ actor?: {
609
635
  kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
610
636
  id: string;
611
637
  displayName?: string | null | undefined;
612
638
  } | null | undefined;
613
- occurredAt: string;
639
+ displayName?: string | null | undefined;
640
+ address: string;
614
641
  };
615
642
  export type MailboxMessageAuthentication = {
616
643
  spf: string | null;
@@ -627,16 +654,8 @@ export type MailboxMessageRecipient = {
627
654
  displayName?: string | null | undefined;
628
655
  address: string;
629
656
  };
630
- export type MailboxMessageSender = {
631
- actor?: {
632
- kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
633
- id: string;
634
- displayName?: string | null | undefined;
635
- } | null | undefined;
636
- displayName?: string | null | undefined;
637
- address: string;
638
- };
639
657
  export type SendMailboxMessagePayload = {
658
+ channel?: "email" | null | undefined;
640
659
  to: [string, ...Array<string>];
641
660
  cc?: Array<string> | null | undefined;
642
661
  bcc?: Array<string> | null | undefined;
@@ -684,6 +703,7 @@ export type MailboxMessagePage = {
684
703
  };
685
704
  export type MailboxMessageSummary = {
686
705
  id: MessageId;
706
+ channel: MailboxChannel;
687
707
  direction: "inbound" | "outbound";
688
708
  from: MailboxMessageSender;
689
709
  to: Array<string>;
@@ -716,6 +736,8 @@ export type UpdateMailboxThreadPayload = {
716
736
  };
717
737
  export type MailboxThread = {
718
738
  id: MailboxThreadId;
739
+ channel: MailboxChannel;
740
+ endpointId: MailboxEndpointId | null;
719
741
  subject: string | null;
720
742
  preview: string | null;
721
743
  from: MailboxThreadSender | null;
@@ -752,6 +774,8 @@ export type MailboxThreadPage = {
752
774
  };
753
775
  export type MailboxThreadSummary = {
754
776
  id: MailboxThreadId;
777
+ channel: MailboxChannel;
778
+ endpointId: MailboxEndpointId | null;
755
779
  subject: string | null;
756
780
  preview: string | null;
757
781
  from: MailboxThreadSender | null;
@@ -862,7 +886,7 @@ export type MailboxAgentActivity = {
862
886
  };
863
887
  events: {
864
888
  byType: Array<{
865
- type: "mailbox.created" | "address.attached" | "address.detached" | "email.received" | "email.released" | "email.sent" | "thread.created" | "action.proposed" | "action.policy_decided" | "action.approval_requested" | "action.approval_resolved" | "action.accepted" | "action.executed" | "action.failed";
889
+ type: "mailbox.created" | "endpoint.attached" | "endpoint.detached" | "message.received" | "message.released" | "message.sent" | "thread.created" | "action.proposed" | "action.policy_decided" | "action.approval_requested" | "action.approval_resolved" | "action.accepted" | "action.executed" | "action.failed";
866
890
  count: number;
867
891
  }>;
868
892
  };
@@ -878,44 +902,41 @@ export type Mailbox = {
878
902
  createdAt: string;
879
903
  description: string | null;
880
904
  metadata: MailboxMetadata;
881
- addresses: Array<MailboxAddress>;
882
- defaultFrom: MailboxDefaultFrom | null;
905
+ endpoints: Array<MailboxEndpoint>;
883
906
  updatedAt: string;
884
907
  };
885
- export type MailboxDefaultFrom = {
908
+ export type MailboxEndpoint = {
909
+ id: MailboxEndpointId;
886
910
  address: string;
887
911
  displayName: string | null;
888
- };
889
- export type MailboxAddress = {
890
- id: MailboxAddressId;
891
- address: string;
912
+ default: boolean;
913
+ channel: "email";
892
914
  source: "samvaHosted" | "verifiedDomain";
893
915
  domainId: string | null;
894
- displayName: string | null;
895
916
  };
896
- export type MailboxAddressId = string;
897
917
  export type MailboxMetadata = {
898
918
  [key: string]: string;
899
919
  };
900
920
  export type MailboxStatus = "active" | "paused";
901
- export type CreateMailboxAddressPayload = {
921
+ export type UpdateMailboxEndpointPayload = {
922
+ displayName?: string | null | null | undefined;
923
+ default?: true | null | undefined;
924
+ };
925
+ export type CreateMailboxEndpointPayload = {
926
+ channel: MailboxChannel;
902
927
  address: string;
903
928
  displayName?: string | null | undefined;
904
929
  };
905
930
  export type UpdateMailboxPayload = {
906
931
  name?: string | null | undefined;
907
932
  metadata?: MailboxMetadataPatch | null | undefined;
908
- defaultFrom?: {
909
- address: string;
910
- displayName?: string | null | null | undefined;
911
- } | null | undefined;
912
933
  };
913
934
  export type MailboxMetadataPatch = {
914
935
  [key: string]: string | null;
915
936
  };
916
937
  export type CreateMailboxPayload = {
917
938
  namespaceId?: NamespaceId | null | undefined;
918
- address: string;
939
+ endpoint: CreateMailboxEndpointPayload;
919
940
  name: string;
920
941
  slug?: string | null | undefined;
921
942
  metadata?: MailboxMetadata | null | undefined;
@@ -933,52 +954,26 @@ export type MailboxSummary = {
933
954
  primaryAddress: string | null;
934
955
  createdAt: string;
935
956
  };
936
- export type FeedbackReceipt = {
937
- id: FeedbackId;
938
- createdAt: string;
939
- };
940
- export type FeedbackId = string;
941
- export type SendFeedback = {
942
- /**
943
- * What happened and what you expected, in plain language (at most 4000 characters).
944
- */
945
- message: string;
946
- category?: "bug" | "confusing" | "missing" | "other" | null | undefined;
947
- context?: FeedbackContext | null | undefined;
948
- };
949
- export type FeedbackContext = {
950
- operation?: string | null | undefined;
951
- resourceId?: string | null | undefined;
957
+ export type Whoami = {
958
+ organization: WhoamiOrganization;
959
+ credential: WhoamiApiKeyCredential | WhoamiUserCredential;
952
960
  };
953
- export type ApiKeyActivityPage = {
954
- items: Array<{
955
- id: string;
956
- timestamp: string;
957
- method: string;
958
- endpoint: string;
959
- statusCode: number;
960
- latency: number;
961
- }>;
962
- nextCursor: string | null;
961
+ export type WhoamiUserCredential = {
962
+ type: "user";
963
+ user: WhoamiUser;
964
+ role: "member" | "admin" | "owner";
963
965
  };
964
- export type ApiKeyId = string;
965
- export type ApiKeyWithSecret = {
966
+ export type WhoamiUser = {
966
967
  id: string;
967
968
  name: string;
968
- key: string;
969
- start: string | null;
970
- description?: string | null | undefined;
971
- createdAt: string;
972
- expiresAt: string | null;
973
- lastUsedAt: string | null;
974
- isActive: boolean;
975
- access: ApiKeyAccess;
976
- owner: ApiKeyOwner | null;
969
+ email: string;
977
970
  };
978
- export type ApiKeyOwner = {
971
+ export type WhoamiApiKeyCredential = {
972
+ type: "apiKey";
979
973
  id: string;
980
974
  name: string;
981
- email: string;
975
+ start: string | null;
976
+ access: ApiKeyAccess;
982
977
  };
983
978
  export type ApiKeyAccess = {
984
979
  mode: "full";
@@ -1022,6 +1017,58 @@ export type ApiKeyResourceAccess = {
1022
1017
  billing?: "read" | "write" | null | undefined;
1023
1018
  analytics?: "read" | "write" | null | undefined;
1024
1019
  };
1020
+ export type WhoamiOrganization = {
1021
+ id: OrganizationId;
1022
+ slug: string;
1023
+ name: string;
1024
+ };
1025
+ export type FeedbackReceipt = {
1026
+ id: FeedbackId;
1027
+ createdAt: string;
1028
+ };
1029
+ export type FeedbackId = string;
1030
+ export type SendFeedback = {
1031
+ /**
1032
+ * What happened and what you expected, in plain language (at most 4000 characters).
1033
+ */
1034
+ message: string;
1035
+ category?: "bug" | "confusing" | "missing" | "other" | null | undefined;
1036
+ context?: FeedbackContext | null | undefined;
1037
+ };
1038
+ export type FeedbackContext = {
1039
+ operation?: string | null | undefined;
1040
+ resourceId?: string | null | undefined;
1041
+ };
1042
+ export type ApiKeyActivityPage = {
1043
+ items: Array<{
1044
+ id: string;
1045
+ timestamp: string;
1046
+ method: string;
1047
+ endpoint: string;
1048
+ statusCode: number;
1049
+ latency: number;
1050
+ }>;
1051
+ nextCursor: string | null;
1052
+ };
1053
+ export type ApiKeyId = string;
1054
+ export type ApiKeyWithSecret = {
1055
+ id: string;
1056
+ name: string;
1057
+ key: string;
1058
+ start: string | null;
1059
+ description?: string | null | undefined;
1060
+ createdAt: string;
1061
+ expiresAt: string | null;
1062
+ lastUsedAt: string | null;
1063
+ isActive: boolean;
1064
+ access: ApiKeyAccess;
1065
+ owner: ApiKeyOwner | null;
1066
+ };
1067
+ export type ApiKeyOwner = {
1068
+ id: string;
1069
+ name: string;
1070
+ email: string;
1071
+ };
1025
1072
  export type ApiKey = {
1026
1073
  id: string;
1027
1074
  name: string;
@@ -1163,7 +1210,7 @@ export type WebhookEndpoint = {
1163
1210
  id: WebhookEndpointId;
1164
1211
  name: string;
1165
1212
  url: string;
1166
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
1213
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1167
1214
  channels: Array<"email"> | null;
1168
1215
  mailboxIds: Array<MailboxId> | null;
1169
1216
  namespaceId: NamespaceId | null;
@@ -1177,7 +1224,7 @@ export type WebhookEndpoint = {
1177
1224
  export type UpdateWebhookPayload = {
1178
1225
  name?: string | null | undefined;
1179
1226
  url?: string | null | undefined;
1180
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded"> | null | undefined;
1227
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
1181
1228
  channels?: Array<"email"> | null | null | undefined;
1182
1229
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
1183
1230
  namespaceId?: NamespaceId | null | null | undefined;
@@ -1194,7 +1241,7 @@ export type WebhookEndpointListItem = {
1194
1241
  id: WebhookEndpointId;
1195
1242
  name: string;
1196
1243
  url: string;
1197
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
1244
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1198
1245
  channels: Array<"email"> | null;
1199
1246
  mailboxIds: Array<MailboxId> | null;
1200
1247
  namespaceId: NamespaceId | null;
@@ -1216,7 +1263,7 @@ export type WebhookDeliveryCounts = {
1216
1263
  export type CreateWebhookPayload = {
1217
1264
  name: string;
1218
1265
  url: string;
1219
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
1266
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1220
1267
  channels?: Array<"email"> | null | undefined;
1221
1268
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
1222
1269
  namespaceId?: NamespaceId | null | undefined;
@@ -1610,6 +1657,317 @@ export type SubscribePayload = {
1610
1657
  consentIp?: string | null | undefined;
1611
1658
  consentSource?: string | null | undefined;
1612
1659
  };
1660
+ export type JourneyRunDetail = {
1661
+ id: JourneyRunId;
1662
+ journeyId: JourneyId;
1663
+ version: number;
1664
+ contactId: ContactId;
1665
+ status: JourneyRunStatus;
1666
+ exitReason: JourneyRunExitReason | null;
1667
+ failureReason: string | null;
1668
+ currentNodeId: JourneyNodeId | null;
1669
+ trigger: JourneyRunTrigger;
1670
+ enteredAt: string;
1671
+ endedAt: string | null;
1672
+ steps: Array<JourneyRunStep>;
1673
+ };
1674
+ export type JourneyRunStep = {
1675
+ nodeId: JourneyNodeId;
1676
+ type: string;
1677
+ enteredAt: string;
1678
+ completedAt: string | null;
1679
+ outcome: JourneyRunStepOutcome | null;
1680
+ nextNodeId: JourneyNodeId | null;
1681
+ messageId: MessageId | null;
1682
+ error: string | null;
1683
+ };
1684
+ export type JourneyNodeId = string;
1685
+ export type JourneyRunStepOutcome = "completed" | "matched" | "timed_out" | "goal" | "archived" | "failed";
1686
+ export type JourneyRunTrigger = {
1687
+ eventId: string;
1688
+ eventName: string;
1689
+ properties: JsonObject;
1690
+ };
1691
+ export type JsonObject = {
1692
+ [key: string]: JsonValue;
1693
+ };
1694
+ export type JourneyRunExitReason = "completed" | "goal" | "archived";
1695
+ export type JourneyRunStatus = "active" | "paused" | "exited" | "failed";
1696
+ export type JourneyId = string;
1697
+ export type JourneyRunId = string;
1698
+ export type JourneyRunPage = {
1699
+ items: Array<JourneyRun>;
1700
+ nextCursor: string | null;
1701
+ };
1702
+ export type JourneyRun = {
1703
+ id: JourneyRunId;
1704
+ journeyId: JourneyId;
1705
+ version: number;
1706
+ contactId: ContactId;
1707
+ status: JourneyRunStatus;
1708
+ exitReason: JourneyRunExitReason | null;
1709
+ failureReason: string | null;
1710
+ currentNodeId: JourneyNodeId | null;
1711
+ trigger: JourneyRunTrigger;
1712
+ enteredAt: string;
1713
+ endedAt: string | null;
1714
+ };
1715
+ export type JourneyStats = {
1716
+ journeyId: JourneyId;
1717
+ version: number;
1718
+ runs: JourneyRunCounts;
1719
+ nodes: Array<JourneyNodeStats>;
1720
+ };
1721
+ export type JourneyNodeStats = {
1722
+ nodeId: JourneyNodeId;
1723
+ current: number;
1724
+ entered: number;
1725
+ };
1726
+ export type JourneyRunCounts = {
1727
+ active: number;
1728
+ paused: number;
1729
+ exited: number;
1730
+ failed: number;
1731
+ };
1732
+ export type JourneyVersion = {
1733
+ journeyId: JourneyId;
1734
+ version: number;
1735
+ definition: JourneyDefinition;
1736
+ publishedAt: string;
1737
+ };
1738
+ export type JourneyDefinition = {
1739
+ trigger: JourneyTrigger;
1740
+ rootNodeId: JourneyNodeId;
1741
+ nodes: {
1742
+ [key: string]: JourneyNode;
1743
+ };
1744
+ goal?: JourneyGoal | undefined;
1745
+ reentry?: boolean | undefined;
1746
+ };
1747
+ export type JourneyGoal = {
1748
+ eventName: JourneyEventName;
1749
+ };
1750
+ export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
1751
+ export type JourneyCustomEventName = string;
1752
+ export type JourneyNode = JourneySendEmailNode | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNode | JourneyExitNode;
1753
+ export type JourneyExitNode = {
1754
+ type: "exit";
1755
+ config: JourneyEmptyConfig;
1756
+ next: [];
1757
+ };
1758
+ export type JourneyEmptyConfig = {
1759
+ [key: string]: never;
1760
+ };
1761
+ export type JourneyWebhookNode = {
1762
+ type: "webhook";
1763
+ config: JourneyWebhookConfig;
1764
+ next: [JourneyNextEdge];
1765
+ };
1766
+ export type JourneyNextEdge = {
1767
+ nodeId: JourneyNodeId;
1768
+ };
1769
+ export type JourneyWebhookConfig = {
1770
+ data?: JsonObject | undefined;
1771
+ };
1772
+ export type JourneyUpdateTagsNode = {
1773
+ type: "update_tags";
1774
+ config: JourneyUpdateTagsConfig;
1775
+ next: [JourneyNextEdge];
1776
+ };
1777
+ export type JourneyUpdateTagsConfig = {
1778
+ add: Array<string>;
1779
+ remove: Array<string>;
1780
+ };
1781
+ export type JourneyBranchNode = {
1782
+ type: "branch";
1783
+ config: JourneyEmptyConfig;
1784
+ next: Array<JourneyBranchEdge>;
1785
+ };
1786
+ export type JourneyBranchEdge = {
1787
+ nodeId: JourneyNodeId;
1788
+ condition?: JourneyCondition | undefined;
1789
+ };
1790
+ export type JourneyCondition = {
1791
+ match: "all" | "any";
1792
+ predicates: [JourneyPredicate, ...Array<JourneyPredicate>];
1793
+ };
1794
+ export type JourneyPredicate = JourneyTagPredicate | JourneyPropertyPredicate | JourneyCustomFieldPredicate | JourneyEventPredicate;
1795
+ export type JourneyEventPredicate = {
1796
+ type: "event";
1797
+ eventName: JourneyEventName;
1798
+ occurred: boolean;
1799
+ };
1800
+ export type JourneyCustomFieldPredicate = {
1801
+ type: "custom_field";
1802
+ key: string;
1803
+ comparison: JourneyComparison;
1804
+ };
1805
+ export type JourneyComparison = JourneyEqualityComparison | JourneyNumericComparison | JourneyStringComparison | JourneyPresenceComparison;
1806
+ export type JourneyPresenceComparison = {
1807
+ operator: "exists" | "not_exists";
1808
+ };
1809
+ export type JourneyStringComparison = {
1810
+ operator: "contains" | "not_contains" | "starts_with" | "ends_with";
1811
+ value: string;
1812
+ };
1813
+ export type JourneyNumericComparison = {
1814
+ operator: "gt" | "gte" | "lt" | "lte";
1815
+ value: number;
1816
+ };
1817
+ export type JourneyEqualityComparison = {
1818
+ operator: "eq" | "neq";
1819
+ value: string | number | boolean | null;
1820
+ };
1821
+ export type JourneyPropertyPredicate = {
1822
+ type: "property";
1823
+ field: JourneyContactProperty;
1824
+ comparison: JourneyComparison;
1825
+ };
1826
+ export type JourneyContactProperty = "name" | "displayName" | "externalId" | "status" | "profile.firstName" | "profile.lastName" | "profile.company" | "profile.jobTitle" | "profile.source" | "profile.location.country" | "profile.location.state" | "profile.location.city" | "profile.location.timezone";
1827
+ export type JourneyTagPredicate = {
1828
+ type: "tag";
1829
+ tag: string;
1830
+ present: boolean;
1831
+ };
1832
+ export type JourneyWaitForEventNode = {
1833
+ type: "wait_for_event";
1834
+ config: JourneyWaitForEventConfig;
1835
+ next: [JourneyWaitEventEdge, JourneyWaitEventEdge];
1836
+ };
1837
+ export type JourneyWaitEventEdge = {
1838
+ nodeId: JourneyNodeId;
1839
+ outcome: "matched" | "timed_out";
1840
+ };
1841
+ export type JourneyWaitForEventConfig = {
1842
+ eventName: JourneyEventName;
1843
+ timeoutSeconds: number;
1844
+ };
1845
+ export type JourneyWaitNode = {
1846
+ type: "wait";
1847
+ config: JourneyWaitConfig;
1848
+ next: [JourneyNextEdge];
1849
+ };
1850
+ export type JourneyWaitConfig = {
1851
+ durationSeconds: number;
1852
+ };
1853
+ export type JourneySendEmailNode = {
1854
+ type: "send_email";
1855
+ config: JourneySendEmailConfig;
1856
+ next: [JourneyNextEdge];
1857
+ };
1858
+ export type JourneySendEmailConfig = {
1859
+ template: TemplateId | string;
1860
+ senderId?: EmailSenderId | undefined;
1861
+ templateData?: JsonObject | undefined;
1862
+ };
1863
+ export type EmailSenderId = string;
1864
+ export type JourneyTrigger = JourneyCustomEventTrigger | JourneyContactCreatedTrigger | JourneyTagAddedTrigger | JourneyGroupJoinedTrigger;
1865
+ export type JourneyGroupJoinedTrigger = {
1866
+ type: "contact.joined_group";
1867
+ groupId: ContactGroupId;
1868
+ };
1869
+ export type JourneyTagAddedTrigger = {
1870
+ type: "contact.tag_added";
1871
+ tag: string;
1872
+ };
1873
+ export type JourneyContactCreatedTrigger = {
1874
+ type: "contact.created";
1875
+ };
1876
+ export type JourneyCustomEventTrigger = {
1877
+ type: "event";
1878
+ eventName: JourneyCustomEventName;
1879
+ };
1880
+ export type JourneyStatus = "draft" | "active" | "paused" | "archived";
1881
+ export type PublishJourneyPayload = {
1882
+ revision: string;
1883
+ };
1884
+ export type ReplaceJourneyDraftPayload = {
1885
+ revision: string;
1886
+ definition: JourneyDefinition;
1887
+ };
1888
+ export type DeleteJourneyResponse = {
1889
+ id: JourneyId;
1890
+ deleted: true;
1891
+ };
1892
+ export type UpdateJourneyPayload = {
1893
+ name: JourneyName;
1894
+ };
1895
+ export type JourneyName = string;
1896
+ export type Journey = {
1897
+ id: JourneyId;
1898
+ name: string;
1899
+ status: JourneyStatus;
1900
+ revision: string;
1901
+ draft: JourneyDefinition;
1902
+ publishedVersion: number | null;
1903
+ publishedAt: string | null;
1904
+ createdAt: string;
1905
+ updatedAt: string;
1906
+ };
1907
+ export type CreateJourneyPayload = {
1908
+ name: JourneyName;
1909
+ definition: JourneyDefinition;
1910
+ };
1911
+ export type JourneyPage = {
1912
+ items: Array<JourneyListItem>;
1913
+ nextCursor: string | null;
1914
+ };
1915
+ export type JourneyListItem = {
1916
+ id: JourneyId;
1917
+ name: string;
1918
+ status: JourneyStatus;
1919
+ publishedVersion: number | null;
1920
+ publishedAt: string | null;
1921
+ createdAt: string;
1922
+ updatedAt: string;
1923
+ };
1924
+ export type ContactEventPage = {
1925
+ items: Array<ContactEvent>;
1926
+ nextCursor: string | null;
1927
+ };
1928
+ export type ContactEvent = {
1929
+ id: string;
1930
+ contactId: ContactId;
1931
+ name: string;
1932
+ source: "api" | "samva";
1933
+ properties: JsonObject;
1934
+ occurredAt: string;
1935
+ recordedAt: string;
1936
+ };
1937
+ export type BatchEventsResult = {
1938
+ total: number;
1939
+ accepted: number;
1940
+ errors: number;
1941
+ results: Array<{
1942
+ index: number;
1943
+ status: "accepted" | "error";
1944
+ event?: ContactEvent | null | undefined;
1945
+ error?: string | null | undefined;
1946
+ }>;
1947
+ };
1948
+ export type BatchEventsPayload = {
1949
+ events: [CreateEventPayload, ...Array<CreateEventPayload>];
1950
+ };
1951
+ export type CreateEventPayload = {
1952
+ contact: ContactEventReference;
1953
+ name: string;
1954
+ properties?: JsonObject | null | undefined;
1955
+ occurredAt?: string | null | undefined;
1956
+ idempotencyKey?: string | null | undefined;
1957
+ };
1958
+ export type ContactEventReference = {
1959
+ id: ContactId;
1960
+ externalId?: never | undefined;
1961
+ email?: never | undefined;
1962
+ } | {
1963
+ externalId: string;
1964
+ id?: never | undefined;
1965
+ email?: never | undefined;
1966
+ } | {
1967
+ email: string;
1968
+ id?: never | undefined;
1969
+ externalId?: never | undefined;
1970
+ };
1613
1971
  export type ContactGroupMembershipPage = {
1614
1972
  items: Array<{
1615
1973
  id: ContactGroupId;
@@ -1638,9 +1996,6 @@ export type BulkUpdateResult = {
1638
1996
  updated: number;
1639
1997
  failed: number;
1640
1998
  };
1641
- export type JsonObject = {
1642
- [key: string]: JsonValue;
1643
- };
1644
1999
  export type ContactPreferences = {
1645
2000
  preferredChannels?: Array<"email"> | null | undefined;
1646
2001
  language?: string | null | undefined;
@@ -2100,7 +2455,6 @@ export type SuppressionEntry = {
2100
2455
  expiresAt: string | null;
2101
2456
  createdAt: string;
2102
2457
  };
2103
- export type EmailSenderId = string;
2104
2458
  export type EmailSenderPage = {
2105
2459
  items: Array<{
2106
2460
  id: EmailSenderId;
@@ -2230,7 +2584,6 @@ export type EmailDomainDetailed = {
2230
2584
  }>;
2231
2585
  verifiedAt: string | null;
2232
2586
  isDefault: boolean;
2233
- defaultSenderId: EmailSenderId | null;
2234
2587
  deliverability: DeliverabilityFacts;
2235
2588
  createdAt: string;
2236
2589
  updatedAt: string;
@@ -2364,7 +2717,6 @@ export type EmailDomainPage = {
2364
2717
  dkimSelector?: string | null | undefined;
2365
2718
  dkimPublicKey?: string | null | undefined;
2366
2719
  isDefault: boolean;
2367
- defaultSenderId: EmailSenderId | null;
2368
2720
  deliverability: DeliverabilityFacts;
2369
2721
  series: SendsSeries;
2370
2722
  createdAt: string;
@@ -2476,17 +2828,16 @@ export type CampaignAudience = {
2476
2828
  contactIds?: Array<ContactId> | null | undefined;
2477
2829
  groupIds?: Array<ContactGroupId> | null | undefined;
2478
2830
  };
2479
- export type CampaignContent = EmailCampaignContent;
2480
- export type CampaignContentMetadata = {
2481
- [key: string]: JsonValue;
2482
- } | null;
2483
- export type CampaignConversationRef = ConversationId | null | null;
2484
- export type EmailCampaignContent = {
2831
+ export type CampaignContent = {
2485
2832
  channel: "email";
2486
2833
  email: EmailContent;
2487
2834
  conversationId?: CampaignConversationRef | undefined;
2488
2835
  metadata?: CampaignContentMetadata | undefined;
2489
2836
  };
2837
+ export type CampaignContentMetadata = {
2838
+ [key: string]: JsonValue;
2839
+ } | null;
2840
+ export type CampaignConversationRef = ConversationId | null | null;
2490
2841
  export type EmailContent = {
2491
2842
  subject?: string | null | undefined;
2492
2843
  html?: string | null | undefined;
@@ -2561,8 +2912,7 @@ export type CampaignDefinitionSummary = {
2561
2912
  state: "editable" | "frozen" | "archived";
2562
2913
  frozenAt: string | null;
2563
2914
  };
2564
- export type CampaignContentInput = EmailCampaignContentInput;
2565
- export type EmailCampaignContentInput = {
2915
+ export type CampaignContentInput = {
2566
2916
  channel: "email";
2567
2917
  email: EmailDispatchContent;
2568
2918
  conversationId?: CampaignConversationRef | undefined;
@@ -2626,7 +2976,16 @@ export type ScheduledMessage = {
2626
2976
  createdAt: string;
2627
2977
  updatedAt: string;
2628
2978
  };
2629
- export type SendMessagePayload = EmailSendMessagePayload;
2979
+ export type SendMessagePayload = {
2980
+ conversationId?: ConversationId | null | null | undefined;
2981
+ metadata?: MessageMetadata | undefined;
2982
+ channel: "email";
2983
+ to: EmailRecipients;
2984
+ cc?: EmailCcRecipients | undefined;
2985
+ bcc?: EmailBccRecipients | undefined;
2986
+ from?: EmailSender | undefined;
2987
+ email: EmailContent;
2988
+ };
2630
2989
  export type MessageMetadata = {
2631
2990
  [key: string]: JsonValue;
2632
2991
  } | null;
@@ -2659,8 +3018,7 @@ export type ScheduledMessagePage = {
2659
3018
  items: Array<ScheduledMessage>;
2660
3019
  nextCursor: string | null;
2661
3020
  };
2662
- export type DispatchSendMessagePayload = EmailDispatchSendMessagePayload;
2663
- export type EmailDispatchSendMessagePayload = {
3021
+ export type DispatchSendMessagePayload = {
2664
3022
  conversationId?: ConversationId | null | null | undefined;
2665
3023
  metadata?: MessageMetadata | undefined;
2666
3024
  channel: "email";
@@ -2800,7 +3158,7 @@ export type Message = {
2800
3158
  updatedAt: string;
2801
3159
  };
2802
3160
  export type MessageSubmission = {
2803
- origin: "direct" | "campaign" | "scheduled" | "mailbox" | "forwarding";
3161
+ origin: "direct" | "campaign" | "scheduled" | "mailbox" | "forwarding" | "journey";
2804
3162
  transport: "http" | null;
2805
3163
  credential: SubmissionCredential | null;
2806
3164
  userId: UserId | null;
@@ -2878,7 +3236,16 @@ export type MessagesListResponses = {
2878
3236
  };
2879
3237
  export type MessagesListResponse = MessagesListResponses[keyof MessagesListResponses];
2880
3238
  export type MessagesSendData = {
2881
- body: EmailSendMessagePayload;
3239
+ body: {
3240
+ conversationId?: ConversationId | null | null | undefined;
3241
+ metadata?: MessageMetadata | undefined;
3242
+ channel: "email";
3243
+ to: EmailRecipients;
3244
+ cc?: EmailCcRecipients | undefined;
3245
+ bcc?: EmailBccRecipients | undefined;
3246
+ from?: EmailSender | undefined;
3247
+ email: EmailContent;
3248
+ };
2882
3249
  headers?: {
2883
3250
  "idempotency-key"?: string | null | undefined;
2884
3251
  };
@@ -5267,15 +5634,22 @@ export type EmailSetDefaultDomainResponses = {
5267
5634
  200: SuccessResult;
5268
5635
  };
5269
5636
  export type EmailSetDefaultDomainResponse = EmailSetDefaultDomainResponses[keyof EmailSetDefaultDomainResponses];
5270
- export type EmailClearDomainDefaultSenderData = {
5271
- body?: never;
5637
+ export type EmailUpdateDomainConfigData = {
5638
+ body: {
5639
+ openTracking?: boolean | null | null | undefined;
5640
+ clickTracking?: boolean | null | null | undefined;
5641
+ replyTo?: Array<string> | null | null | undefined;
5642
+ unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
5643
+ footerEnabled?: boolean | null | null | undefined;
5644
+ brandSlug?: string | null | null | undefined;
5645
+ };
5272
5646
  path: {
5273
5647
  id: EmailDomainId;
5274
5648
  };
5275
5649
  query?: never;
5276
- url: "/v1/email/domains/{id}/default-sender";
5650
+ url: "/v1/email/domains/{id}/config";
5277
5651
  };
5278
- export type EmailClearDomainDefaultSenderErrors = {
5652
+ export type EmailUpdateDomainConfigErrors = {
5279
5653
  /**
5280
5654
  * UnauthorizedError
5281
5655
  */
@@ -5301,103 +5675,10 @@ export type EmailClearDomainDefaultSenderErrors = {
5301
5675
  */
5302
5676
  504: GatewayTimeoutError;
5303
5677
  };
5304
- export type EmailClearDomainDefaultSenderError = EmailClearDomainDefaultSenderErrors[keyof EmailClearDomainDefaultSenderErrors];
5305
- export type EmailClearDomainDefaultSenderResponses = {
5678
+ export type EmailUpdateDomainConfigError = EmailUpdateDomainConfigErrors[keyof EmailUpdateDomainConfigErrors];
5679
+ export type EmailUpdateDomainConfigResponses = {
5306
5680
  /**
5307
- * SuccessResult
5308
- */
5309
- 200: SuccessResult;
5310
- };
5311
- export type EmailClearDomainDefaultSenderResponse = EmailClearDomainDefaultSenderResponses[keyof EmailClearDomainDefaultSenderResponses];
5312
- export type EmailSetDomainDefaultSenderData = {
5313
- body: {
5314
- senderId: EmailSenderId;
5315
- };
5316
- path: {
5317
- id: EmailDomainId;
5318
- };
5319
- query?: never;
5320
- url: "/v1/email/domains/{id}/default-sender";
5321
- };
5322
- export type EmailSetDomainDefaultSenderErrors = {
5323
- /**
5324
- * UnauthorizedError
5325
- */
5326
- 401: UnauthorizedError;
5327
- /**
5328
- * ForbiddenError
5329
- */
5330
- 403: ForbiddenError;
5331
- /**
5332
- * ResourceNotFoundError
5333
- */
5334
- 404: ResourceNotFoundError;
5335
- /**
5336
- * ValidationError
5337
- */
5338
- 422: ValidationError;
5339
- /**
5340
- * InternalError
5341
- */
5342
- 500: InternalError;
5343
- /**
5344
- * GatewayTimeoutError
5345
- */
5346
- 504: GatewayTimeoutError;
5347
- };
5348
- export type EmailSetDomainDefaultSenderError = EmailSetDomainDefaultSenderErrors[keyof EmailSetDomainDefaultSenderErrors];
5349
- export type EmailSetDomainDefaultSenderResponses = {
5350
- /**
5351
- * SuccessResult
5352
- */
5353
- 200: SuccessResult;
5354
- };
5355
- export type EmailSetDomainDefaultSenderResponse = EmailSetDomainDefaultSenderResponses[keyof EmailSetDomainDefaultSenderResponses];
5356
- export type EmailUpdateDomainConfigData = {
5357
- body: {
5358
- openTracking?: boolean | null | null | undefined;
5359
- clickTracking?: boolean | null | null | undefined;
5360
- replyTo?: Array<string> | null | null | undefined;
5361
- unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
5362
- footerEnabled?: boolean | null | null | undefined;
5363
- brandSlug?: string | null | null | undefined;
5364
- };
5365
- path: {
5366
- id: EmailDomainId;
5367
- };
5368
- query?: never;
5369
- url: "/v1/email/domains/{id}/config";
5370
- };
5371
- export type EmailUpdateDomainConfigErrors = {
5372
- /**
5373
- * UnauthorizedError
5374
- */
5375
- 401: UnauthorizedError;
5376
- /**
5377
- * ForbiddenError
5378
- */
5379
- 403: ForbiddenError;
5380
- /**
5381
- * ResourceNotFoundError
5382
- */
5383
- 404: ResourceNotFoundError;
5384
- /**
5385
- * ValidationError
5386
- */
5387
- 422: ValidationError;
5388
- /**
5389
- * InternalError
5390
- */
5391
- 500: InternalError;
5392
- /**
5393
- * GatewayTimeoutError
5394
- */
5395
- 504: GatewayTimeoutError;
5396
- };
5397
- export type EmailUpdateDomainConfigError = EmailUpdateDomainConfigErrors[keyof EmailUpdateDomainConfigErrors];
5398
- export type EmailUpdateDomainConfigResponses = {
5399
- /**
5400
- * Success
5681
+ * Success
5401
5682
  */
5402
5683
  200: {
5403
5684
  id: EmailDomainId;
@@ -8940,11 +9221,829 @@ export type ContactsBulkImportErrors = {
8940
9221
  /**
8941
9222
  * PaymentRequiredError
8942
9223
  */
8943
- 402: PaymentRequiredError;
9224
+ 402: PaymentRequiredError;
9225
+ /**
9226
+ * ForbiddenError
9227
+ */
9228
+ 403: ForbiddenError;
9229
+ /**
9230
+ * ValidationError
9231
+ */
9232
+ 422: ValidationError;
9233
+ /**
9234
+ * InternalError
9235
+ */
9236
+ 500: InternalError;
9237
+ /**
9238
+ * BillingProviderError
9239
+ */
9240
+ 502: BillingProviderError;
9241
+ /**
9242
+ * GatewayTimeoutError
9243
+ */
9244
+ 504: GatewayTimeoutError;
9245
+ };
9246
+ export type ContactsBulkImportError = ContactsBulkImportErrors[keyof ContactsBulkImportErrors];
9247
+ export type ContactsBulkImportResponses = {
9248
+ /**
9249
+ * Success
9250
+ */
9251
+ 200: {
9252
+ total: number;
9253
+ created: number;
9254
+ updated: number;
9255
+ skipped: number;
9256
+ errors: number;
9257
+ results: Array<{
9258
+ index: number;
9259
+ status: "created" | "updated" | "skipped" | "error";
9260
+ contactId?: ContactId | null | undefined;
9261
+ error?: string | null | undefined;
9262
+ }>;
9263
+ };
9264
+ };
9265
+ export type ContactsBulkImportResponse = ContactsBulkImportResponses[keyof ContactsBulkImportResponses];
9266
+ export type ContactsBulkDeleteData = {
9267
+ body: {
9268
+ ids: [ContactId, ...Array<ContactId>];
9269
+ };
9270
+ path?: never;
9271
+ query?: never;
9272
+ url: "/v1/contacts/bulk-delete";
9273
+ };
9274
+ export type ContactsBulkDeleteErrors = {
9275
+ /**
9276
+ * UnauthorizedError
9277
+ */
9278
+ 401: UnauthorizedError;
9279
+ /**
9280
+ * ForbiddenError
9281
+ */
9282
+ 403: ForbiddenError;
9283
+ /**
9284
+ * ValidationError
9285
+ */
9286
+ 422: ValidationError;
9287
+ /**
9288
+ * InternalError
9289
+ */
9290
+ 500: InternalError;
9291
+ /**
9292
+ * BillingProviderError
9293
+ */
9294
+ 502: BillingProviderError;
9295
+ /**
9296
+ * GatewayTimeoutError
9297
+ */
9298
+ 504: GatewayTimeoutError;
9299
+ };
9300
+ export type ContactsBulkDeleteError = ContactsBulkDeleteErrors[keyof ContactsBulkDeleteErrors];
9301
+ export type ContactsBulkDeleteResponses = {
9302
+ /**
9303
+ * Success
9304
+ */
9305
+ 200: {
9306
+ deleted: number;
9307
+ failed: number;
9308
+ };
9309
+ };
9310
+ export type ContactsBulkDeleteResponse = ContactsBulkDeleteResponses[keyof ContactsBulkDeleteResponses];
9311
+ export type ContactsBulkUpdateTagsData = {
9312
+ body: {
9313
+ ids: [ContactId, ...Array<ContactId>];
9314
+ operation: "add" | "remove" | "set";
9315
+ tags: [string, ...Array<string>];
9316
+ };
9317
+ path?: never;
9318
+ query?: never;
9319
+ url: "/v1/contacts/bulk-update-tags";
9320
+ };
9321
+ export type ContactsBulkUpdateTagsErrors = {
9322
+ /**
9323
+ * UnauthorizedError
9324
+ */
9325
+ 401: UnauthorizedError;
9326
+ /**
9327
+ * ForbiddenError
9328
+ */
9329
+ 403: ForbiddenError;
9330
+ /**
9331
+ * ValidationError
9332
+ */
9333
+ 422: ValidationError;
9334
+ /**
9335
+ * InternalError
9336
+ */
9337
+ 500: InternalError;
9338
+ /**
9339
+ * GatewayTimeoutError
9340
+ */
9341
+ 504: GatewayTimeoutError;
9342
+ };
9343
+ export type ContactsBulkUpdateTagsError = ContactsBulkUpdateTagsErrors[keyof ContactsBulkUpdateTagsErrors];
9344
+ export type ContactsBulkUpdateTagsResponses = {
9345
+ /**
9346
+ * BulkUpdateResult
9347
+ */
9348
+ 200: BulkUpdateResult;
9349
+ };
9350
+ export type ContactsBulkUpdateTagsResponse = ContactsBulkUpdateTagsResponses[keyof ContactsBulkUpdateTagsResponses];
9351
+ export type ContactsBulkUpdateStatusData = {
9352
+ body: {
9353
+ ids: [ContactId, ...Array<ContactId>];
9354
+ status: "active" | "paused" | "blocked" | "archived";
9355
+ };
9356
+ path?: never;
9357
+ query?: never;
9358
+ url: "/v1/contacts/bulk-update-status";
9359
+ };
9360
+ export type ContactsBulkUpdateStatusErrors = {
9361
+ /**
9362
+ * UnauthorizedError
9363
+ */
9364
+ 401: UnauthorizedError;
9365
+ /**
9366
+ * PaymentRequiredError
9367
+ */
9368
+ 402: PaymentRequiredError;
9369
+ /**
9370
+ * ForbiddenError
9371
+ */
9372
+ 403: ForbiddenError;
9373
+ /**
9374
+ * ValidationError
9375
+ */
9376
+ 422: ValidationError;
9377
+ /**
9378
+ * InternalError
9379
+ */
9380
+ 500: InternalError;
9381
+ /**
9382
+ * BillingProviderError
9383
+ */
9384
+ 502: BillingProviderError;
9385
+ /**
9386
+ * GatewayTimeoutError
9387
+ */
9388
+ 504: GatewayTimeoutError;
9389
+ };
9390
+ export type ContactsBulkUpdateStatusError = ContactsBulkUpdateStatusErrors[keyof ContactsBulkUpdateStatusErrors];
9391
+ export type ContactsBulkUpdateStatusResponses = {
9392
+ /**
9393
+ * BulkUpdateResult
9394
+ */
9395
+ 200: BulkUpdateResult;
9396
+ };
9397
+ export type ContactsBulkUpdateStatusResponse = ContactsBulkUpdateStatusResponses[keyof ContactsBulkUpdateStatusResponses];
9398
+ export type ContactsExportData = {
9399
+ body: {
9400
+ ids?: Array<ContactId> | null | undefined;
9401
+ format?: "json" | "csv" | null | undefined;
9402
+ filters?: {
9403
+ status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
9404
+ tags?: Array<string> | null | undefined;
9405
+ } | null | undefined;
9406
+ fields?: Array<string> | null | undefined;
9407
+ };
9408
+ path?: never;
9409
+ query?: never;
9410
+ url: "/v1/contacts/export";
9411
+ };
9412
+ export type ContactsExportErrors = {
9413
+ /**
9414
+ * UnauthorizedError
9415
+ */
9416
+ 401: UnauthorizedError;
9417
+ /**
9418
+ * ForbiddenError
9419
+ */
9420
+ 403: ForbiddenError;
9421
+ /**
9422
+ * ValidationError
9423
+ */
9424
+ 422: ValidationError;
9425
+ /**
9426
+ * InternalError
9427
+ */
9428
+ 500: InternalError;
9429
+ /**
9430
+ * GatewayTimeoutError
9431
+ */
9432
+ 504: GatewayTimeoutError;
9433
+ };
9434
+ export type ContactsExportError = ContactsExportErrors[keyof ContactsExportErrors];
9435
+ export type ContactsExportResponses = {
9436
+ /**
9437
+ * Success
9438
+ */
9439
+ 200: {
9440
+ data: string;
9441
+ format: "json" | "csv";
9442
+ count: number;
9443
+ };
9444
+ };
9445
+ export type ContactsExportResponse = ContactsExportResponses[keyof ContactsExportResponses];
9446
+ export type ContactsGetActivityTimelineData = {
9447
+ body?: never;
9448
+ path: {
9449
+ id: ContactId;
9450
+ };
9451
+ query?: {
9452
+ limit?: string | null | undefined;
9453
+ cursor?: Cursor | null | undefined;
9454
+ channel?: "email" | null | undefined;
9455
+ };
9456
+ url: "/v1/contacts/{id}/activity";
9457
+ };
9458
+ export type ContactsGetActivityTimelineErrors = {
9459
+ /**
9460
+ * UnauthorizedError
9461
+ */
9462
+ 401: UnauthorizedError;
9463
+ /**
9464
+ * ForbiddenError
9465
+ */
9466
+ 403: ForbiddenError;
9467
+ /**
9468
+ * ResourceNotFoundError
9469
+ */
9470
+ 404: ResourceNotFoundError;
9471
+ /**
9472
+ * ValidationError
9473
+ */
9474
+ 422: ValidationError;
9475
+ /**
9476
+ * InternalError
9477
+ */
9478
+ 500: InternalError;
9479
+ /**
9480
+ * GatewayTimeoutError
9481
+ */
9482
+ 504: GatewayTimeoutError;
9483
+ };
9484
+ export type ContactsGetActivityTimelineError = ContactsGetActivityTimelineErrors[keyof ContactsGetActivityTimelineErrors];
9485
+ export type ContactsGetActivityTimelineResponses = {
9486
+ /**
9487
+ * ContactActivityPage
9488
+ */
9489
+ 200: ContactActivityPage;
9490
+ };
9491
+ export type ContactsGetActivityTimelineResponse = ContactsGetActivityTimelineResponses[keyof ContactsGetActivityTimelineResponses];
9492
+ export type ContactsGetGroupMembershipsData = {
9493
+ body?: never;
9494
+ path: {
9495
+ id: ContactId;
9496
+ };
9497
+ query?: {
9498
+ limit?: string | null | undefined;
9499
+ cursor?: Cursor | null | undefined;
9500
+ };
9501
+ url: "/v1/contacts/{id}/groups";
9502
+ };
9503
+ export type ContactsGetGroupMembershipsErrors = {
9504
+ /**
9505
+ * UnauthorizedError
9506
+ */
9507
+ 401: UnauthorizedError;
9508
+ /**
9509
+ * ForbiddenError
9510
+ */
9511
+ 403: ForbiddenError;
9512
+ /**
9513
+ * ResourceNotFoundError
9514
+ */
9515
+ 404: ResourceNotFoundError;
9516
+ /**
9517
+ * ValidationError
9518
+ */
9519
+ 422: ValidationError;
9520
+ /**
9521
+ * InternalError
9522
+ */
9523
+ 500: InternalError;
9524
+ /**
9525
+ * GatewayTimeoutError
9526
+ */
9527
+ 504: GatewayTimeoutError;
9528
+ };
9529
+ export type ContactsGetGroupMembershipsError = ContactsGetGroupMembershipsErrors[keyof ContactsGetGroupMembershipsErrors];
9530
+ export type ContactsGetGroupMembershipsResponses = {
9531
+ /**
9532
+ * ContactGroupMembershipPage
9533
+ */
9534
+ 200: ContactGroupMembershipPage;
9535
+ };
9536
+ export type ContactsGetGroupMembershipsResponse = ContactsGetGroupMembershipsResponses[keyof ContactsGetGroupMembershipsResponses];
9537
+ export type EventsCreateData = {
9538
+ body: {
9539
+ contact: ContactEventReference;
9540
+ name: string;
9541
+ properties?: JsonObject | null | undefined;
9542
+ occurredAt?: string | null | undefined;
9543
+ idempotencyKey?: string | null | undefined;
9544
+ };
9545
+ path?: never;
9546
+ query?: never;
9547
+ url: "/v1/events";
9548
+ };
9549
+ export type EventsCreateErrors = {
9550
+ /**
9551
+ * UnauthorizedError
9552
+ */
9553
+ 401: UnauthorizedError;
9554
+ /**
9555
+ * PaymentRequiredError
9556
+ */
9557
+ 402: PaymentRequiredError;
9558
+ /**
9559
+ * ForbiddenError
9560
+ */
9561
+ 403: ForbiddenError;
9562
+ /**
9563
+ * ResourceNotFoundError
9564
+ */
9565
+ 404: ResourceNotFoundError;
9566
+ /**
9567
+ * ConflictError
9568
+ */
9569
+ 409: ConflictError;
9570
+ /**
9571
+ * ValidationError
9572
+ */
9573
+ 422: ValidationError;
9574
+ /**
9575
+ * InternalError
9576
+ */
9577
+ 500: InternalError;
9578
+ /**
9579
+ * BillingProviderError
9580
+ */
9581
+ 502: BillingProviderError;
9582
+ /**
9583
+ * GatewayTimeoutError
9584
+ */
9585
+ 504: GatewayTimeoutError;
9586
+ };
9587
+ export type EventsCreateError = EventsCreateErrors[keyof EventsCreateErrors];
9588
+ export type EventsCreateResponses = {
9589
+ /**
9590
+ * ContactEvent
9591
+ */
9592
+ 200: ContactEvent;
9593
+ };
9594
+ export type EventsCreateResponse = EventsCreateResponses[keyof EventsCreateResponses];
9595
+ export type EventsBatchData = {
9596
+ body: {
9597
+ events: [CreateEventPayload, ...Array<CreateEventPayload>];
9598
+ };
9599
+ path?: never;
9600
+ query?: never;
9601
+ url: "/v1/events/batch";
9602
+ };
9603
+ export type EventsBatchErrors = {
9604
+ /**
9605
+ * UnauthorizedError
9606
+ */
9607
+ 401: UnauthorizedError;
9608
+ /**
9609
+ * ForbiddenError
9610
+ */
9611
+ 403: ForbiddenError;
9612
+ /**
9613
+ * ResourceNotFoundError
9614
+ */
9615
+ 404: ResourceNotFoundError;
9616
+ /**
9617
+ * ValidationError
9618
+ */
9619
+ 422: ValidationError;
9620
+ /**
9621
+ * InternalError
9622
+ */
9623
+ 500: InternalError;
9624
+ /**
9625
+ * GatewayTimeoutError
9626
+ */
9627
+ 504: GatewayTimeoutError;
9628
+ };
9629
+ export type EventsBatchError = EventsBatchErrors[keyof EventsBatchErrors];
9630
+ export type EventsBatchResponses = {
9631
+ /**
9632
+ * BatchEventsResult
9633
+ */
9634
+ 200: BatchEventsResult;
9635
+ };
9636
+ export type EventsBatchResponse = EventsBatchResponses[keyof EventsBatchResponses];
9637
+ export type ContactEventsListEventsData = {
9638
+ body?: never;
9639
+ path: {
9640
+ id: ContactId;
9641
+ };
9642
+ query?: {
9643
+ limit?: string | null | undefined;
9644
+ cursor?: Cursor | null | undefined;
9645
+ };
9646
+ url: "/v1/contacts/{id}/events";
9647
+ };
9648
+ export type ContactEventsListEventsErrors = {
9649
+ /**
9650
+ * UnauthorizedError
9651
+ */
9652
+ 401: UnauthorizedError;
9653
+ /**
9654
+ * ForbiddenError
9655
+ */
9656
+ 403: ForbiddenError;
9657
+ /**
9658
+ * ResourceNotFoundError
9659
+ */
9660
+ 404: ResourceNotFoundError;
9661
+ /**
9662
+ * ValidationError
9663
+ */
9664
+ 422: ValidationError;
9665
+ /**
9666
+ * InternalError
9667
+ */
9668
+ 500: InternalError;
9669
+ /**
9670
+ * GatewayTimeoutError
9671
+ */
9672
+ 504: GatewayTimeoutError;
9673
+ };
9674
+ export type ContactEventsListEventsError = ContactEventsListEventsErrors[keyof ContactEventsListEventsErrors];
9675
+ export type ContactEventsListEventsResponses = {
9676
+ /**
9677
+ * ContactEventPage
9678
+ */
9679
+ 200: ContactEventPage;
9680
+ };
9681
+ export type ContactEventsListEventsResponse = ContactEventsListEventsResponses[keyof ContactEventsListEventsResponses];
9682
+ export type JourneysListData = {
9683
+ body?: never;
9684
+ path?: never;
9685
+ query?: {
9686
+ status?: JourneyStatus | null | undefined;
9687
+ limit?: string | null | undefined;
9688
+ cursor?: Cursor | null | undefined;
9689
+ };
9690
+ url: "/v1/journeys";
9691
+ };
9692
+ export type JourneysListErrors = {
9693
+ /**
9694
+ * UnauthorizedError
9695
+ */
9696
+ 401: UnauthorizedError;
9697
+ /**
9698
+ * ForbiddenError
9699
+ */
9700
+ 403: ForbiddenError;
9701
+ /**
9702
+ * ValidationError
9703
+ */
9704
+ 422: ValidationError;
9705
+ /**
9706
+ * InternalError
9707
+ */
9708
+ 500: InternalError;
9709
+ /**
9710
+ * GatewayTimeoutError
9711
+ */
9712
+ 504: GatewayTimeoutError;
9713
+ };
9714
+ export type JourneysListError = JourneysListErrors[keyof JourneysListErrors];
9715
+ export type JourneysListResponses = {
9716
+ /**
9717
+ * JourneyPage
9718
+ */
9719
+ 200: JourneyPage;
9720
+ };
9721
+ export type JourneysListResponse = JourneysListResponses[keyof JourneysListResponses];
9722
+ export type JourneysCreateData = {
9723
+ body: {
9724
+ name: JourneyName;
9725
+ definition: JourneyDefinition;
9726
+ };
9727
+ path?: never;
9728
+ query?: never;
9729
+ url: "/v1/journeys";
9730
+ };
9731
+ export type JourneysCreateErrors = {
9732
+ /**
9733
+ * UnauthorizedError
9734
+ */
9735
+ 401: UnauthorizedError;
9736
+ /**
9737
+ * PaymentRequiredError
9738
+ */
9739
+ 402: PaymentRequiredError;
9740
+ /**
9741
+ * ForbiddenError
9742
+ */
9743
+ 403: ForbiddenError;
9744
+ /**
9745
+ * ResourceNotFoundError
9746
+ */
9747
+ 404: ResourceNotFoundError;
9748
+ /**
9749
+ * ConflictError
9750
+ */
9751
+ 409: ConflictError;
9752
+ /**
9753
+ * ValidationError
9754
+ */
9755
+ 422: ValidationError;
9756
+ /**
9757
+ * InternalError
9758
+ */
9759
+ 500: InternalError;
9760
+ /**
9761
+ * BillingProviderError
9762
+ */
9763
+ 502: BillingProviderError;
9764
+ /**
9765
+ * GatewayTimeoutError
9766
+ */
9767
+ 504: GatewayTimeoutError;
9768
+ };
9769
+ export type JourneysCreateError = JourneysCreateErrors[keyof JourneysCreateErrors];
9770
+ export type JourneysCreateResponses = {
9771
+ /**
9772
+ * Journey
9773
+ */
9774
+ 201: Journey;
9775
+ };
9776
+ export type JourneysCreateResponse = JourneysCreateResponses[keyof JourneysCreateResponses];
9777
+ export type JourneysRemoveData = {
9778
+ body?: never;
9779
+ path: {
9780
+ id: JourneyId;
9781
+ };
9782
+ query?: never;
9783
+ url: "/v1/journeys/{id}";
9784
+ };
9785
+ export type JourneysRemoveErrors = {
9786
+ /**
9787
+ * UnauthorizedError
9788
+ */
9789
+ 401: UnauthorizedError;
9790
+ /**
9791
+ * ForbiddenError
9792
+ */
9793
+ 403: ForbiddenError;
9794
+ /**
9795
+ * ResourceNotFoundError
9796
+ */
9797
+ 404: ResourceNotFoundError;
9798
+ /**
9799
+ * ConflictError
9800
+ */
9801
+ 409: ConflictError;
9802
+ /**
9803
+ * ValidationError
9804
+ */
9805
+ 422: ValidationError;
9806
+ /**
9807
+ * InternalError
9808
+ */
9809
+ 500: InternalError;
9810
+ /**
9811
+ * GatewayTimeoutError
9812
+ */
9813
+ 504: GatewayTimeoutError;
9814
+ };
9815
+ export type JourneysRemoveError = JourneysRemoveErrors[keyof JourneysRemoveErrors];
9816
+ export type JourneysRemoveResponses = {
9817
+ /**
9818
+ * DeleteJourneyResponse
9819
+ */
9820
+ 200: DeleteJourneyResponse;
9821
+ };
9822
+ export type JourneysRemoveResponse = JourneysRemoveResponses[keyof JourneysRemoveResponses];
9823
+ export type JourneysGetData = {
9824
+ body?: never;
9825
+ path: {
9826
+ id: JourneyId;
9827
+ };
9828
+ query?: never;
9829
+ url: "/v1/journeys/{id}";
9830
+ };
9831
+ export type JourneysGetErrors = {
9832
+ /**
9833
+ * UnauthorizedError
9834
+ */
9835
+ 401: UnauthorizedError;
9836
+ /**
9837
+ * ForbiddenError
9838
+ */
9839
+ 403: ForbiddenError;
9840
+ /**
9841
+ * ResourceNotFoundError
9842
+ */
9843
+ 404: ResourceNotFoundError;
9844
+ /**
9845
+ * ValidationError
9846
+ */
9847
+ 422: ValidationError;
9848
+ /**
9849
+ * InternalError
9850
+ */
9851
+ 500: InternalError;
9852
+ /**
9853
+ * GatewayTimeoutError
9854
+ */
9855
+ 504: GatewayTimeoutError;
9856
+ };
9857
+ export type JourneysGetError = JourneysGetErrors[keyof JourneysGetErrors];
9858
+ export type JourneysGetResponses = {
9859
+ /**
9860
+ * Journey
9861
+ */
9862
+ 200: Journey;
9863
+ };
9864
+ export type JourneysGetResponse = JourneysGetResponses[keyof JourneysGetResponses];
9865
+ export type JourneysUpdateData = {
9866
+ body: {
9867
+ name: JourneyName;
9868
+ };
9869
+ path: {
9870
+ id: JourneyId;
9871
+ };
9872
+ query?: never;
9873
+ url: "/v1/journeys/{id}";
9874
+ };
9875
+ export type JourneysUpdateErrors = {
9876
+ /**
9877
+ * UnauthorizedError
9878
+ */
9879
+ 401: UnauthorizedError;
9880
+ /**
9881
+ * ForbiddenError
9882
+ */
9883
+ 403: ForbiddenError;
9884
+ /**
9885
+ * ResourceNotFoundError
9886
+ */
9887
+ 404: ResourceNotFoundError;
9888
+ /**
9889
+ * ValidationError
9890
+ */
9891
+ 422: ValidationError;
9892
+ /**
9893
+ * InternalError
9894
+ */
9895
+ 500: InternalError;
9896
+ /**
9897
+ * GatewayTimeoutError
9898
+ */
9899
+ 504: GatewayTimeoutError;
9900
+ };
9901
+ export type JourneysUpdateError = JourneysUpdateErrors[keyof JourneysUpdateErrors];
9902
+ export type JourneysUpdateResponses = {
9903
+ /**
9904
+ * Journey
9905
+ */
9906
+ 200: Journey;
9907
+ };
9908
+ export type JourneysUpdateResponse = JourneysUpdateResponses[keyof JourneysUpdateResponses];
9909
+ export type JourneysReplaceDraftData = {
9910
+ body: {
9911
+ revision: string;
9912
+ definition: JourneyDefinition;
9913
+ };
9914
+ path: {
9915
+ id: JourneyId;
9916
+ };
9917
+ query?: never;
9918
+ url: "/v1/journeys/{id}/draft";
9919
+ };
9920
+ export type JourneysReplaceDraftErrors = {
9921
+ /**
9922
+ * UnauthorizedError
9923
+ */
9924
+ 401: UnauthorizedError;
9925
+ /**
9926
+ * PaymentRequiredError
9927
+ */
9928
+ 402: PaymentRequiredError;
9929
+ /**
9930
+ * ForbiddenError
9931
+ */
9932
+ 403: ForbiddenError;
9933
+ /**
9934
+ * ResourceNotFoundError
9935
+ */
9936
+ 404: ResourceNotFoundError;
9937
+ /**
9938
+ * ConflictError
9939
+ */
9940
+ 409: ConflictError;
9941
+ /**
9942
+ * ValidationError
9943
+ */
9944
+ 422: ValidationError;
9945
+ /**
9946
+ * InternalError
9947
+ */
9948
+ 500: InternalError;
9949
+ /**
9950
+ * BillingProviderError
9951
+ */
9952
+ 502: BillingProviderError;
9953
+ /**
9954
+ * GatewayTimeoutError
9955
+ */
9956
+ 504: GatewayTimeoutError;
9957
+ };
9958
+ export type JourneysReplaceDraftError = JourneysReplaceDraftErrors[keyof JourneysReplaceDraftErrors];
9959
+ export type JourneysReplaceDraftResponses = {
9960
+ /**
9961
+ * Journey
9962
+ */
9963
+ 200: Journey;
9964
+ };
9965
+ export type JourneysReplaceDraftResponse = JourneysReplaceDraftResponses[keyof JourneysReplaceDraftResponses];
9966
+ export type JourneysPublishData = {
9967
+ body: {
9968
+ revision: string;
9969
+ };
9970
+ path: {
9971
+ id: JourneyId;
9972
+ };
9973
+ query?: never;
9974
+ url: "/v1/journeys/{id}/publish";
9975
+ };
9976
+ export type JourneysPublishErrors = {
9977
+ /**
9978
+ * UnauthorizedError
9979
+ */
9980
+ 401: UnauthorizedError;
9981
+ /**
9982
+ * PaymentRequiredError
9983
+ */
9984
+ 402: PaymentRequiredError;
9985
+ /**
9986
+ * ForbiddenError
9987
+ */
9988
+ 403: ForbiddenError;
9989
+ /**
9990
+ * ResourceNotFoundError
9991
+ */
9992
+ 404: ResourceNotFoundError;
9993
+ /**
9994
+ * ConflictError
9995
+ */
9996
+ 409: ConflictError;
9997
+ /**
9998
+ * ValidationError
9999
+ */
10000
+ 422: ValidationError;
10001
+ /**
10002
+ * InternalError
10003
+ */
10004
+ 500: InternalError;
10005
+ /**
10006
+ * BillingProviderError
10007
+ */
10008
+ 502: BillingProviderError;
10009
+ /**
10010
+ * GatewayTimeoutError
10011
+ */
10012
+ 504: GatewayTimeoutError;
10013
+ };
10014
+ export type JourneysPublishError = JourneysPublishErrors[keyof JourneysPublishErrors];
10015
+ export type JourneysPublishResponses = {
10016
+ /**
10017
+ * Journey
10018
+ */
10019
+ 200: Journey;
10020
+ };
10021
+ export type JourneysPublishResponse = JourneysPublishResponses[keyof JourneysPublishResponses];
10022
+ export type JourneysPauseData = {
10023
+ body?: never;
10024
+ path: {
10025
+ id: JourneyId;
10026
+ };
10027
+ query?: never;
10028
+ url: "/v1/journeys/{id}/pause";
10029
+ };
10030
+ export type JourneysPauseErrors = {
10031
+ /**
10032
+ * UnauthorizedError
10033
+ */
10034
+ 401: UnauthorizedError;
10035
+ /**
10036
+ * ForbiddenError
10037
+ */
10038
+ 403: ForbiddenError;
10039
+ /**
10040
+ * ResourceNotFoundError
10041
+ */
10042
+ 404: ResourceNotFoundError;
8944
10043
  /**
8945
- * ForbiddenError
10044
+ * ConflictError
8946
10045
  */
8947
- 403: ForbiddenError;
10046
+ 409: ConflictError;
8948
10047
  /**
8949
10048
  * ValidationError
8950
10049
  */
@@ -8953,52 +10052,48 @@ export type ContactsBulkImportErrors = {
8953
10052
  * InternalError
8954
10053
  */
8955
10054
  500: InternalError;
8956
- /**
8957
- * BillingProviderError
8958
- */
8959
- 502: BillingProviderError;
8960
10055
  /**
8961
10056
  * GatewayTimeoutError
8962
10057
  */
8963
10058
  504: GatewayTimeoutError;
8964
10059
  };
8965
- export type ContactsBulkImportError = ContactsBulkImportErrors[keyof ContactsBulkImportErrors];
8966
- export type ContactsBulkImportResponses = {
10060
+ export type JourneysPauseError = JourneysPauseErrors[keyof JourneysPauseErrors];
10061
+ export type JourneysPauseResponses = {
8967
10062
  /**
8968
- * Success
10063
+ * Journey
8969
10064
  */
8970
- 200: {
8971
- total: number;
8972
- created: number;
8973
- updated: number;
8974
- skipped: number;
8975
- errors: number;
8976
- results: Array<{
8977
- index: number;
8978
- status: "created" | "updated" | "skipped" | "error";
8979
- contactId?: ContactId | null | undefined;
8980
- error?: string | null | undefined;
8981
- }>;
8982
- };
10065
+ 200: Journey;
8983
10066
  };
8984
- export type ContactsBulkImportResponse = ContactsBulkImportResponses[keyof ContactsBulkImportResponses];
8985
- export type ContactsBulkDeleteData = {
8986
- body: {
8987
- ids: [ContactId, ...Array<ContactId>];
10067
+ export type JourneysPauseResponse = JourneysPauseResponses[keyof JourneysPauseResponses];
10068
+ export type JourneysResumeData = {
10069
+ body?: never;
10070
+ path: {
10071
+ id: JourneyId;
8988
10072
  };
8989
- path?: never;
8990
10073
  query?: never;
8991
- url: "/v1/contacts/bulk-delete";
10074
+ url: "/v1/journeys/{id}/resume";
8992
10075
  };
8993
- export type ContactsBulkDeleteErrors = {
10076
+ export type JourneysResumeErrors = {
8994
10077
  /**
8995
10078
  * UnauthorizedError
8996
10079
  */
8997
10080
  401: UnauthorizedError;
10081
+ /**
10082
+ * PaymentRequiredError
10083
+ */
10084
+ 402: PaymentRequiredError;
8998
10085
  /**
8999
10086
  * ForbiddenError
9000
10087
  */
9001
10088
  403: ForbiddenError;
10089
+ /**
10090
+ * ResourceNotFoundError
10091
+ */
10092
+ 404: ResourceNotFoundError;
10093
+ /**
10094
+ * ConflictError
10095
+ */
10096
+ 409: ConflictError;
9002
10097
  /**
9003
10098
  * ValidationError
9004
10099
  */
@@ -9016,28 +10111,23 @@ export type ContactsBulkDeleteErrors = {
9016
10111
  */
9017
10112
  504: GatewayTimeoutError;
9018
10113
  };
9019
- export type ContactsBulkDeleteError = ContactsBulkDeleteErrors[keyof ContactsBulkDeleteErrors];
9020
- export type ContactsBulkDeleteResponses = {
10114
+ export type JourneysResumeError = JourneysResumeErrors[keyof JourneysResumeErrors];
10115
+ export type JourneysResumeResponses = {
9021
10116
  /**
9022
- * Success
10117
+ * Journey
9023
10118
  */
9024
- 200: {
9025
- deleted: number;
9026
- failed: number;
9027
- };
10119
+ 200: Journey;
9028
10120
  };
9029
- export type ContactsBulkDeleteResponse = ContactsBulkDeleteResponses[keyof ContactsBulkDeleteResponses];
9030
- export type ContactsBulkUpdateTagsData = {
9031
- body: {
9032
- ids: [ContactId, ...Array<ContactId>];
9033
- operation: "add" | "remove" | "set";
9034
- tags: [string, ...Array<string>];
10121
+ export type JourneysResumeResponse = JourneysResumeResponses[keyof JourneysResumeResponses];
10122
+ export type JourneysArchiveData = {
10123
+ body?: never;
10124
+ path: {
10125
+ id: JourneyId;
9035
10126
  };
9036
- path?: never;
9037
10127
  query?: never;
9038
- url: "/v1/contacts/bulk-update-tags";
10128
+ url: "/v1/journeys/{id}/archive";
9039
10129
  };
9040
- export type ContactsBulkUpdateTagsErrors = {
10130
+ export type JourneysArchiveErrors = {
9041
10131
  /**
9042
10132
  * UnauthorizedError
9043
10133
  */
@@ -9046,6 +10136,14 @@ export type ContactsBulkUpdateTagsErrors = {
9046
10136
  * ForbiddenError
9047
10137
  */
9048
10138
  403: ForbiddenError;
10139
+ /**
10140
+ * ResourceNotFoundError
10141
+ */
10142
+ 404: ResourceNotFoundError;
10143
+ /**
10144
+ * ConflictError
10145
+ */
10146
+ 409: ConflictError;
9049
10147
  /**
9050
10148
  * ValidationError
9051
10149
  */
@@ -9059,36 +10157,36 @@ export type ContactsBulkUpdateTagsErrors = {
9059
10157
  */
9060
10158
  504: GatewayTimeoutError;
9061
10159
  };
9062
- export type ContactsBulkUpdateTagsError = ContactsBulkUpdateTagsErrors[keyof ContactsBulkUpdateTagsErrors];
9063
- export type ContactsBulkUpdateTagsResponses = {
10160
+ export type JourneysArchiveError = JourneysArchiveErrors[keyof JourneysArchiveErrors];
10161
+ export type JourneysArchiveResponses = {
9064
10162
  /**
9065
- * BulkUpdateResult
10163
+ * Journey
9066
10164
  */
9067
- 200: BulkUpdateResult;
10165
+ 200: Journey;
9068
10166
  };
9069
- export type ContactsBulkUpdateTagsResponse = ContactsBulkUpdateTagsResponses[keyof ContactsBulkUpdateTagsResponses];
9070
- export type ContactsBulkUpdateStatusData = {
9071
- body: {
9072
- ids: [ContactId, ...Array<ContactId>];
9073
- status: "active" | "paused" | "blocked" | "archived";
10167
+ export type JourneysArchiveResponse = JourneysArchiveResponses[keyof JourneysArchiveResponses];
10168
+ export type JourneysGetVersionData = {
10169
+ body?: never;
10170
+ path: {
10171
+ id: JourneyId;
10172
+ version: string;
9074
10173
  };
9075
- path?: never;
9076
10174
  query?: never;
9077
- url: "/v1/contacts/bulk-update-status";
10175
+ url: "/v1/journeys/{id}/versions/{version}";
9078
10176
  };
9079
- export type ContactsBulkUpdateStatusErrors = {
10177
+ export type JourneysGetVersionErrors = {
9080
10178
  /**
9081
10179
  * UnauthorizedError
9082
10180
  */
9083
10181
  401: UnauthorizedError;
9084
- /**
9085
- * PaymentRequiredError
9086
- */
9087
- 402: PaymentRequiredError;
9088
10182
  /**
9089
10183
  * ForbiddenError
9090
10184
  */
9091
10185
  403: ForbiddenError;
10186
+ /**
10187
+ * ResourceNotFoundError
10188
+ */
10189
+ 404: ResourceNotFoundError;
9092
10190
  /**
9093
10191
  * ValidationError
9094
10192
  */
@@ -9097,38 +10195,30 @@ export type ContactsBulkUpdateStatusErrors = {
9097
10195
  * InternalError
9098
10196
  */
9099
10197
  500: InternalError;
9100
- /**
9101
- * BillingProviderError
9102
- */
9103
- 502: BillingProviderError;
9104
10198
  /**
9105
10199
  * GatewayTimeoutError
9106
10200
  */
9107
10201
  504: GatewayTimeoutError;
9108
10202
  };
9109
- export type ContactsBulkUpdateStatusError = ContactsBulkUpdateStatusErrors[keyof ContactsBulkUpdateStatusErrors];
9110
- export type ContactsBulkUpdateStatusResponses = {
10203
+ export type JourneysGetVersionError = JourneysGetVersionErrors[keyof JourneysGetVersionErrors];
10204
+ export type JourneysGetVersionResponses = {
9111
10205
  /**
9112
- * BulkUpdateResult
10206
+ * JourneyVersion
9113
10207
  */
9114
- 200: BulkUpdateResult;
10208
+ 200: JourneyVersion;
9115
10209
  };
9116
- export type ContactsBulkUpdateStatusResponse = ContactsBulkUpdateStatusResponses[keyof ContactsBulkUpdateStatusResponses];
9117
- export type ContactsExportData = {
9118
- body: {
9119
- ids?: Array<ContactId> | null | undefined;
9120
- format?: "json" | "csv" | null | undefined;
9121
- filters?: {
9122
- status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
9123
- tags?: Array<string> | null | undefined;
9124
- } | null | undefined;
9125
- fields?: Array<string> | null | undefined;
10210
+ export type JourneysGetVersionResponse = JourneysGetVersionResponses[keyof JourneysGetVersionResponses];
10211
+ export type JourneysStatsData = {
10212
+ body?: never;
10213
+ path: {
10214
+ id: JourneyId;
9126
10215
  };
9127
- path?: never;
9128
- query?: never;
9129
- url: "/v1/contacts/export";
10216
+ query?: {
10217
+ version?: string | null | undefined;
10218
+ };
10219
+ url: "/v1/journeys/{id}/stats";
9130
10220
  };
9131
- export type ContactsExportErrors = {
10221
+ export type JourneysStatsErrors = {
9132
10222
  /**
9133
10223
  * UnauthorizedError
9134
10224
  */
@@ -9137,6 +10227,10 @@ export type ContactsExportErrors = {
9137
10227
  * ForbiddenError
9138
10228
  */
9139
10229
  403: ForbiddenError;
10230
+ /**
10231
+ * ResourceNotFoundError
10232
+ */
10233
+ 404: ResourceNotFoundError;
9140
10234
  /**
9141
10235
  * ValidationError
9142
10236
  */
@@ -9150,31 +10244,28 @@ export type ContactsExportErrors = {
9150
10244
  */
9151
10245
  504: GatewayTimeoutError;
9152
10246
  };
9153
- export type ContactsExportError = ContactsExportErrors[keyof ContactsExportErrors];
9154
- export type ContactsExportResponses = {
10247
+ export type JourneysStatsError = JourneysStatsErrors[keyof JourneysStatsErrors];
10248
+ export type JourneysStatsResponses = {
9155
10249
  /**
9156
- * Success
10250
+ * JourneyStats
9157
10251
  */
9158
- 200: {
9159
- data: string;
9160
- format: "json" | "csv";
9161
- count: number;
9162
- };
10252
+ 200: JourneyStats;
9163
10253
  };
9164
- export type ContactsExportResponse = ContactsExportResponses[keyof ContactsExportResponses];
9165
- export type ContactsGetActivityTimelineData = {
10254
+ export type JourneysStatsResponse = JourneysStatsResponses[keyof JourneysStatsResponses];
10255
+ export type JourneysListRunsData = {
9166
10256
  body?: never;
9167
10257
  path: {
9168
- id: ContactId;
10258
+ id: JourneyId;
9169
10259
  };
9170
10260
  query?: {
10261
+ status?: JourneyRunStatus | null | undefined;
10262
+ contactId?: ContactId | null | undefined;
9171
10263
  limit?: string | null | undefined;
9172
10264
  cursor?: Cursor | null | undefined;
9173
- channel?: "email" | null | undefined;
9174
10265
  };
9175
- url: "/v1/contacts/{id}/activity";
10266
+ url: "/v1/journeys/{id}/runs";
9176
10267
  };
9177
- export type ContactsGetActivityTimelineErrors = {
10268
+ export type JourneysListRunsErrors = {
9178
10269
  /**
9179
10270
  * UnauthorizedError
9180
10271
  */
@@ -9200,26 +10291,24 @@ export type ContactsGetActivityTimelineErrors = {
9200
10291
  */
9201
10292
  504: GatewayTimeoutError;
9202
10293
  };
9203
- export type ContactsGetActivityTimelineError = ContactsGetActivityTimelineErrors[keyof ContactsGetActivityTimelineErrors];
9204
- export type ContactsGetActivityTimelineResponses = {
10294
+ export type JourneysListRunsError = JourneysListRunsErrors[keyof JourneysListRunsErrors];
10295
+ export type JourneysListRunsResponses = {
9205
10296
  /**
9206
- * ContactActivityPage
10297
+ * JourneyRunPage
9207
10298
  */
9208
- 200: ContactActivityPage;
10299
+ 200: JourneyRunPage;
9209
10300
  };
9210
- export type ContactsGetActivityTimelineResponse = ContactsGetActivityTimelineResponses[keyof ContactsGetActivityTimelineResponses];
9211
- export type ContactsGetGroupMembershipsData = {
10301
+ export type JourneysListRunsResponse = JourneysListRunsResponses[keyof JourneysListRunsResponses];
10302
+ export type JourneysGetRunData = {
9212
10303
  body?: never;
9213
10304
  path: {
9214
- id: ContactId;
9215
- };
9216
- query?: {
9217
- limit?: string | null | undefined;
9218
- cursor?: Cursor | null | undefined;
10305
+ id: JourneyId;
10306
+ runId: JourneyRunId;
9219
10307
  };
9220
- url: "/v1/contacts/{id}/groups";
10308
+ query?: never;
10309
+ url: "/v1/journeys/{id}/runs/{runId}";
9221
10310
  };
9222
- export type ContactsGetGroupMembershipsErrors = {
10311
+ export type JourneysGetRunErrors = {
9223
10312
  /**
9224
10313
  * UnauthorizedError
9225
10314
  */
@@ -9245,14 +10334,14 @@ export type ContactsGetGroupMembershipsErrors = {
9245
10334
  */
9246
10335
  504: GatewayTimeoutError;
9247
10336
  };
9248
- export type ContactsGetGroupMembershipsError = ContactsGetGroupMembershipsErrors[keyof ContactsGetGroupMembershipsErrors];
9249
- export type ContactsGetGroupMembershipsResponses = {
10337
+ export type JourneysGetRunError = JourneysGetRunErrors[keyof JourneysGetRunErrors];
10338
+ export type JourneysGetRunResponses = {
9250
10339
  /**
9251
- * ContactGroupMembershipPage
10340
+ * JourneyRunDetail
9252
10341
  */
9253
- 200: ContactGroupMembershipPage;
10342
+ 200: JourneyRunDetail;
9254
10343
  };
9255
- export type ContactsGetGroupMembershipsResponse = ContactsGetGroupMembershipsResponses[keyof ContactsGetGroupMembershipsResponses];
10344
+ export type JourneysGetRunResponse = JourneysGetRunResponses[keyof JourneysGetRunResponses];
9256
10345
  export type SubscriptionsSubscribeData = {
9257
10346
  body: {
9258
10347
  /**
@@ -13692,7 +14781,7 @@ export type WebhooksCreateData = {
13692
14781
  body: {
13693
14782
  name: string;
13694
14783
  url: string;
13695
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
14784
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
13696
14785
  channels?: Array<"email"> | null | undefined;
13697
14786
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
13698
14787
  namespaceId?: NamespaceId | null | undefined;
@@ -13846,7 +14935,7 @@ export type WebhooksUpdateData = {
13846
14935
  body: {
13847
14936
  name?: string | null | undefined;
13848
14937
  url?: string | null | undefined;
13849
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded"> | null | undefined;
14938
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
13850
14939
  channels?: Array<"email"> | null | null | undefined;
13851
14940
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
13852
14941
  namespaceId?: NamespaceId | null | null | undefined;
@@ -14914,6 +16003,42 @@ export type FeedbackSendResponses = {
14914
16003
  201: FeedbackReceipt;
14915
16004
  };
14916
16005
  export type FeedbackSendResponse = FeedbackSendResponses[keyof FeedbackSendResponses];
16006
+ export type WhoamiGetData = {
16007
+ body?: never;
16008
+ path?: never;
16009
+ query?: never;
16010
+ url: "/v1/whoami";
16011
+ };
16012
+ export type WhoamiGetErrors = {
16013
+ /**
16014
+ * UnauthorizedError
16015
+ */
16016
+ 401: UnauthorizedError;
16017
+ /**
16018
+ * ForbiddenError
16019
+ */
16020
+ 403: ForbiddenError;
16021
+ /**
16022
+ * ValidationError
16023
+ */
16024
+ 422: ValidationError;
16025
+ /**
16026
+ * InternalError
16027
+ */
16028
+ 500: InternalError;
16029
+ /**
16030
+ * GatewayTimeoutError
16031
+ */
16032
+ 504: GatewayTimeoutError;
16033
+ };
16034
+ export type WhoamiGetError = WhoamiGetErrors[keyof WhoamiGetErrors];
16035
+ export type WhoamiGetResponses = {
16036
+ /**
16037
+ * Whoami
16038
+ */
16039
+ 200: Whoami;
16040
+ };
16041
+ export type WhoamiGetResponse = WhoamiGetResponses[keyof WhoamiGetResponses];
14917
16042
  export type MailboxesListData = {
14918
16043
  body?: never;
14919
16044
  path?: never;
@@ -14958,7 +16083,7 @@ export type MailboxesListResponse = MailboxesListResponses[keyof MailboxesListRe
14958
16083
  export type MailboxesCreateData = {
14959
16084
  body: {
14960
16085
  namespaceId?: NamespaceId | null | undefined;
14961
- address: string;
16086
+ endpoint: CreateMailboxEndpointPayload;
14962
16087
  name: string;
14963
16088
  slug?: string | null | undefined;
14964
16089
  metadata?: MailboxMetadata | null | undefined;
@@ -14989,9 +16114,9 @@ export type MailboxesCreateErrors = {
14989
16114
  */
14990
16115
  409: ConflictError;
14991
16116
  /**
14992
- * ValidationError
16117
+ * ValidationError | MailboxChannelUnsupportedError
14993
16118
  */
14994
- 422: ValidationError;
16119
+ 422: ValidationError | MailboxChannelUnsupportedError;
14995
16120
  /**
14996
16121
  * InternalError
14997
16122
  */
@@ -15105,10 +16230,6 @@ export type MailboxesUpdateData = {
15105
16230
  body: {
15106
16231
  name?: string | null | undefined;
15107
16232
  metadata?: MailboxMetadataPatch | null | undefined;
15108
- defaultFrom?: {
15109
- address: string;
15110
- displayName?: string | null | null | undefined;
15111
- } | null | undefined;
15112
16233
  };
15113
16234
  path: {
15114
16235
  id: MailboxId;
@@ -15150,8 +16271,9 @@ export type MailboxesUpdateResponses = {
15150
16271
  200: Mailbox;
15151
16272
  };
15152
16273
  export type MailboxesUpdateResponse = MailboxesUpdateResponses[keyof MailboxesUpdateResponses];
15153
- export type MailboxesCreateAddressData = {
16274
+ export type MailboxesCreateEndpointData = {
15154
16275
  body: {
16276
+ channel: MailboxChannel;
15155
16277
  address: string;
15156
16278
  displayName?: string | null | undefined;
15157
16279
  };
@@ -15159,9 +16281,9 @@ export type MailboxesCreateAddressData = {
15159
16281
  id: MailboxId;
15160
16282
  };
15161
16283
  query?: never;
15162
- url: "/v1/mailboxes/{id}/addresses";
16284
+ url: "/v1/mailboxes/{id}/endpoints";
15163
16285
  };
15164
- export type MailboxesCreateAddressErrors = {
16286
+ export type MailboxesCreateEndpointErrors = {
15165
16287
  /**
15166
16288
  * UnauthorizedError
15167
16289
  */
@@ -15179,9 +16301,9 @@ export type MailboxesCreateAddressErrors = {
15179
16301
  */
15180
16302
  409: ConflictError;
15181
16303
  /**
15182
- * ValidationError
16304
+ * ValidationError | MailboxChannelUnsupportedError
15183
16305
  */
15184
- 422: ValidationError;
16306
+ 422: ValidationError | MailboxChannelUnsupportedError;
15185
16307
  /**
15186
16308
  * InternalError
15187
16309
  */
@@ -15191,24 +16313,70 @@ export type MailboxesCreateAddressErrors = {
15191
16313
  */
15192
16314
  504: GatewayTimeoutError;
15193
16315
  };
15194
- export type MailboxesCreateAddressError = MailboxesCreateAddressErrors[keyof MailboxesCreateAddressErrors];
15195
- export type MailboxesCreateAddressResponses = {
16316
+ export type MailboxesCreateEndpointError = MailboxesCreateEndpointErrors[keyof MailboxesCreateEndpointErrors];
16317
+ export type MailboxesCreateEndpointResponses = {
15196
16318
  /**
15197
16319
  * Success
15198
16320
  */
15199
16321
  201: Mailbox;
15200
16322
  };
15201
- export type MailboxesCreateAddressResponse = MailboxesCreateAddressResponses[keyof MailboxesCreateAddressResponses];
15202
- export type MailboxesRemoveAddressData = {
16323
+ export type MailboxesCreateEndpointResponse = MailboxesCreateEndpointResponses[keyof MailboxesCreateEndpointResponses];
16324
+ export type MailboxesRemoveEndpointData = {
15203
16325
  body?: never;
15204
16326
  path: {
15205
16327
  id: MailboxId;
15206
- addressId: MailboxAddressId;
16328
+ endpointId: MailboxEndpointId;
16329
+ };
16330
+ query?: never;
16331
+ url: "/v1/mailboxes/{id}/endpoints/{endpointId}";
16332
+ };
16333
+ export type MailboxesRemoveEndpointErrors = {
16334
+ /**
16335
+ * UnauthorizedError
16336
+ */
16337
+ 401: UnauthorizedError;
16338
+ /**
16339
+ * ForbiddenError
16340
+ */
16341
+ 403: ForbiddenError;
16342
+ /**
16343
+ * ResourceNotFoundError
16344
+ */
16345
+ 404: ResourceNotFoundError;
16346
+ /**
16347
+ * ValidationError
16348
+ */
16349
+ 422: ValidationError;
16350
+ /**
16351
+ * InternalError
16352
+ */
16353
+ 500: InternalError;
16354
+ /**
16355
+ * GatewayTimeoutError
16356
+ */
16357
+ 504: GatewayTimeoutError;
16358
+ };
16359
+ export type MailboxesRemoveEndpointError = MailboxesRemoveEndpointErrors[keyof MailboxesRemoveEndpointErrors];
16360
+ export type MailboxesRemoveEndpointResponses = {
16361
+ /**
16362
+ * Mailbox
16363
+ */
16364
+ 200: Mailbox;
16365
+ };
16366
+ export type MailboxesRemoveEndpointResponse = MailboxesRemoveEndpointResponses[keyof MailboxesRemoveEndpointResponses];
16367
+ export type MailboxesUpdateEndpointData = {
16368
+ body: {
16369
+ displayName?: string | null | null | undefined;
16370
+ default?: true | null | undefined;
16371
+ };
16372
+ path: {
16373
+ id: MailboxId;
16374
+ endpointId: MailboxEndpointId;
15207
16375
  };
15208
16376
  query?: never;
15209
- url: "/v1/mailboxes/{id}/addresses/{addressId}";
16377
+ url: "/v1/mailboxes/{id}/endpoints/{endpointId}";
15210
16378
  };
15211
- export type MailboxesRemoveAddressErrors = {
16379
+ export type MailboxesUpdateEndpointErrors = {
15212
16380
  /**
15213
16381
  * UnauthorizedError
15214
16382
  */
@@ -15234,14 +16402,14 @@ export type MailboxesRemoveAddressErrors = {
15234
16402
  */
15235
16403
  504: GatewayTimeoutError;
15236
16404
  };
15237
- export type MailboxesRemoveAddressError = MailboxesRemoveAddressErrors[keyof MailboxesRemoveAddressErrors];
15238
- export type MailboxesRemoveAddressResponses = {
16405
+ export type MailboxesUpdateEndpointError = MailboxesUpdateEndpointErrors[keyof MailboxesUpdateEndpointErrors];
16406
+ export type MailboxesUpdateEndpointResponses = {
15239
16407
  /**
15240
16408
  * Mailbox
15241
16409
  */
15242
16410
  200: Mailbox;
15243
16411
  };
15244
- export type MailboxesRemoveAddressResponse = MailboxesRemoveAddressResponses[keyof MailboxesRemoveAddressResponses];
16412
+ export type MailboxesUpdateEndpointResponse = MailboxesUpdateEndpointResponses[keyof MailboxesUpdateEndpointResponses];
15245
16413
  export type MailboxesPauseData = {
15246
16414
  body?: never;
15247
16415
  path: {
@@ -16527,6 +17695,7 @@ export type MailboxesUpdateNoteResponses = {
16527
17695
  export type MailboxesUpdateNoteResponse = MailboxesUpdateNoteResponses[keyof MailboxesUpdateNoteResponses];
16528
17696
  export type MailboxesSendMessageData = {
16529
17697
  body: {
17698
+ channel?: "email" | null | undefined;
16530
17699
  to: [string, ...Array<string>];
16531
17700
  cc?: Array<string> | null | undefined;
16532
17701
  bcc?: Array<string> | null | undefined;
@@ -16567,9 +17736,9 @@ export type MailboxesSendMessageErrors = {
16567
17736
  */
16568
17737
  409: MailboxSendConflictError | ConflictError;
16569
17738
  /**
16570
- * ValidationError
17739
+ * MailboxChannelUnsupportedError | ValidationError
16571
17740
  */
16572
- 422: ValidationError;
17741
+ 422: MailboxChannelUnsupportedError | ValidationError;
16573
17742
  /**
16574
17743
  * RateLimitedError
16575
17744
  */
@@ -16783,6 +17952,7 @@ export type MailboxesCopyMessageAttachmentResponses = {
16783
17952
  export type MailboxesCopyMessageAttachmentResponse = MailboxesCopyMessageAttachmentResponses[keyof MailboxesCopyMessageAttachmentResponses];
16784
17953
  export type MailboxesReplyData = {
16785
17954
  body: {
17955
+ channel?: "email" | null | undefined;
16786
17956
  cc?: Array<string> | null | undefined;
16787
17957
  bcc?: Array<string> | null | undefined;
16788
17958
  text?: string | null | undefined;
@@ -16821,9 +17991,9 @@ export type MailboxesReplyErrors = {
16821
17991
  */
16822
17992
  409: MailboxSendConflictError | ConflictError;
16823
17993
  /**
16824
- * ValidationError
17994
+ * MailboxChannelUnsupportedError | ValidationError
16825
17995
  */
16826
- 422: ValidationError;
17996
+ 422: MailboxChannelUnsupportedError | ValidationError;
16827
17997
  /**
16828
17998
  * RateLimitedError
16829
17999
  */
@@ -16859,6 +18029,7 @@ export type MailboxesReplyResponses = {
16859
18029
  export type MailboxesReplyResponse = MailboxesReplyResponses[keyof MailboxesReplyResponses];
16860
18030
  export type MailboxesReplyAllData = {
16861
18031
  body: {
18032
+ channel?: "email" | null | undefined;
16862
18033
  cc?: Array<string> | null | undefined;
16863
18034
  bcc?: Array<string> | null | undefined;
16864
18035
  text?: string | null | undefined;
@@ -16897,9 +18068,9 @@ export type MailboxesReplyAllErrors = {
16897
18068
  */
16898
18069
  409: MailboxSendConflictError | ConflictError;
16899
18070
  /**
16900
- * ValidationError
18071
+ * MailboxChannelUnsupportedError | ValidationError
16901
18072
  */
16902
- 422: ValidationError;
18073
+ 422: MailboxChannelUnsupportedError | ValidationError;
16903
18074
  /**
16904
18075
  * RateLimitedError
16905
18076
  */
@@ -16974,9 +18145,9 @@ export type MailboxesForwardErrors = {
16974
18145
  */
16975
18146
  409: MailboxSendConflictError | ConflictError;
16976
18147
  /**
16977
- * ValidationError
18148
+ * MailboxChannelUnsupportedError | ValidationError
16978
18149
  */
16979
- 422: ValidationError;
18150
+ 422: MailboxChannelUnsupportedError | ValidationError;
16980
18151
  /**
16981
18152
  * RateLimitedError
16982
18153
  */
@@ -17203,6 +18374,8 @@ export type MailboxesListDraftsResponses = {
17203
18374
  export type MailboxesListDraftsResponse = MailboxesListDraftsResponses[keyof MailboxesListDraftsResponses];
17204
18375
  export type MailboxesCreateDraftData = {
17205
18376
  body: {
18377
+ channel?: "email" | null | undefined;
18378
+ endpointId?: MailboxEndpointId | null | undefined;
17206
18379
  to?: Array<string> | null | undefined;
17207
18380
  cc?: Array<string> | null | undefined;
17208
18381
  bcc?: Array<string> | null | undefined;
@@ -17233,9 +18406,9 @@ export type MailboxesCreateDraftErrors = {
17233
18406
  */
17234
18407
  404: ResourceNotFoundError;
17235
18408
  /**
17236
- * ValidationError
18409
+ * MailboxChannelUnsupportedError | ValidationError
17237
18410
  */
17238
- 422: ValidationError;
18411
+ 422: MailboxChannelUnsupportedError | ValidationError;
17239
18412
  /**
17240
18413
  * InternalError
17241
18414
  */
@@ -17429,9 +18602,9 @@ export type MailboxesSendDraftErrors = {
17429
18602
  */
17430
18603
  409: MailboxSendConflictError | ConflictError;
17431
18604
  /**
17432
- * ValidationError
18605
+ * MailboxChannelUnsupportedError | ValidationError
17433
18606
  */
17434
- 422: ValidationError;
18607
+ 422: MailboxChannelUnsupportedError | ValidationError;
17435
18608
  /**
17436
18609
  * RateLimitedError
17437
18610
  */
@@ -17588,9 +18761,9 @@ export type MailboxesCancelActionErrors = {
17588
18761
  */
17589
18762
  409: MailboxSendConflictError | ConflictError;
17590
18763
  /**
17591
- * ValidationError
18764
+ * MailboxChannelUnsupportedError | ValidationError
17592
18765
  */
17593
- 422: ValidationError;
18766
+ 422: MailboxChannelUnsupportedError | ValidationError;
17594
18767
  /**
17595
18768
  * RateLimitedError
17596
18769
  */
@@ -17655,9 +18828,9 @@ export type MailboxesRetryActionErrors = {
17655
18828
  */
17656
18829
  409: MailboxSendConflictError | ConflictError;
17657
18830
  /**
17658
- * ValidationError
18831
+ * MailboxChannelUnsupportedError | ValidationError
17659
18832
  */
17660
- 422: ValidationError;
18833
+ 422: MailboxChannelUnsupportedError | ValidationError;
17661
18834
  /**
17662
18835
  * RateLimitedError
17663
18836
  */
@@ -17722,9 +18895,9 @@ export type MailboxesApproveActionErrors = {
17722
18895
  */
17723
18896
  409: MailboxSendConflictError | ConflictError;
17724
18897
  /**
17725
- * ValidationError
18898
+ * MailboxChannelUnsupportedError | ValidationError
17726
18899
  */
17727
- 422: ValidationError;
18900
+ 422: MailboxChannelUnsupportedError | ValidationError;
17728
18901
  /**
17729
18902
  * RateLimitedError
17730
18903
  */