samva 0.15.0 → 0.16.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 (52) hide show
  1. package/README.md +2 -0
  2. package/dist/{categories-BGUBFdH9.js → categories-DV51kr2H.js} +5 -1
  3. package/dist/client/sdk.gen.d.ts +61 -47
  4. package/dist/client/types.gen.d.ts +265 -207
  5. package/dist/{client-CDg7zJs0.js → client-BMUew5Wp.js} +300 -232
  6. package/dist/effect/analytics.js +1 -1
  7. package/dist/effect/api-keys.d.ts +1 -0
  8. package/dist/effect/api-keys.js +5 -2
  9. package/dist/effect/attachments.js +1 -1
  10. package/dist/effect/brands.js +2 -2
  11. package/dist/effect/campaigns.js +1 -1
  12. package/dist/effect/categories.js +1 -1
  13. package/dist/effect/client.js +1 -1
  14. package/dist/effect/contact-groups.js +1 -1
  15. package/dist/effect/contacts.js +1 -1
  16. package/dist/effect/conversations.js +1 -1
  17. package/dist/effect/custom-fields.js +1 -1
  18. package/dist/effect/email.d.ts +0 -18
  19. package/dist/effect/email.js +3 -7
  20. package/dist/effect/extension-installations.js +1 -1
  21. package/dist/effect/extensions.js +1 -1
  22. package/dist/effect/feedback.js +2 -2
  23. package/dist/effect/generated-metadata.d.ts +4 -0
  24. package/dist/effect/generated.d.ts +1586 -1641
  25. package/dist/effect/index.d.ts +2 -1
  26. package/dist/effect/index.js +6 -5
  27. package/dist/effect/mailboxes.d.ts +144 -94
  28. package/dist/effect/mailboxes.js +2 -2
  29. package/dist/effect/media.js +1 -1
  30. package/dist/effect/messages.js +1 -1
  31. package/dist/effect/namespaces.js +1 -1
  32. package/dist/effect/operations.js +1 -1
  33. package/dist/effect/organizations.js +1 -1
  34. package/dist/effect/retry.js +1 -1
  35. package/dist/effect/scheduled-messages.js +1 -1
  36. package/dist/effect/subscriptions.js +1 -1
  37. package/dist/effect/templates.js +2 -2
  38. package/dist/effect/unsubscribe-groups.js +1 -1
  39. package/dist/effect/webhooks.js +2 -2
  40. package/dist/effect/whoami.d.ts +46 -0
  41. package/dist/effect/whoami.js +9 -0
  42. package/dist/index.js +3 -3
  43. package/dist/{inline-attachments-UxLeyytJ.js → inline-attachments-Cegg6tTF.js} +2 -2
  44. package/dist/{mailboxes-BH_JPmOE.js → mailboxes-Thp5z0oX.js} +10 -8
  45. package/dist/{operation-BZ5Xov-x.js → operation-BTXjPrwf.js} +13 -15
  46. package/dist/promises/errors.gen.d.ts +12 -2
  47. package/dist/promises/index.d.ts +3 -1
  48. package/dist/promises/index.js +3 -3
  49. package/dist/promises/types.gen.d.ts +1 -1
  50. package/dist/{promises-Cd6Jamqk.js → promises-KrA2nSLg.js} +174 -88
  51. package/dist/service-map.d.ts +16 -15
  52. package/package.json +6 -2
@@ -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;
957
+ export type Whoami = {
958
+ organization: WhoamiOrganization;
959
+ credential: WhoamiApiKeyCredential | WhoamiUserCredential;
948
960
  };
949
- export type FeedbackContext = {
950
- operation?: string | null | undefined;
951
- resourceId?: string | null | undefined;
961
+ export type WhoamiUserCredential = {
962
+ type: "user";
963
+ user: WhoamiUser;
964
+ role: "member" | "admin" | "owner";
952
965
  };
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;
963
- };
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;
@@ -2230,7 +2277,6 @@ export type EmailDomainDetailed = {
2230
2277
  }>;
2231
2278
  verifiedAt: string | null;
2232
2279
  isDefault: boolean;
2233
- defaultSenderId: EmailSenderId | null;
2234
2280
  deliverability: DeliverabilityFacts;
2235
2281
  createdAt: string;
2236
2282
  updatedAt: string;
@@ -2364,7 +2410,6 @@ export type EmailDomainPage = {
2364
2410
  dkimSelector?: string | null | undefined;
2365
2411
  dkimPublicKey?: string | null | undefined;
2366
2412
  isDefault: boolean;
2367
- defaultSenderId: EmailSenderId | null;
2368
2413
  deliverability: DeliverabilityFacts;
2369
2414
  series: SendsSeries;
2370
2415
  createdAt: string;
@@ -2476,17 +2521,16 @@ export type CampaignAudience = {
2476
2521
  contactIds?: Array<ContactId> | null | undefined;
2477
2522
  groupIds?: Array<ContactGroupId> | null | undefined;
2478
2523
  };
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 = {
2524
+ export type CampaignContent = {
2485
2525
  channel: "email";
2486
2526
  email: EmailContent;
2487
2527
  conversationId?: CampaignConversationRef | undefined;
2488
2528
  metadata?: CampaignContentMetadata | undefined;
2489
2529
  };
2530
+ export type CampaignContentMetadata = {
2531
+ [key: string]: JsonValue;
2532
+ } | null;
2533
+ export type CampaignConversationRef = ConversationId | null | null;
2490
2534
  export type EmailContent = {
2491
2535
  subject?: string | null | undefined;
2492
2536
  html?: string | null | undefined;
@@ -2561,8 +2605,7 @@ export type CampaignDefinitionSummary = {
2561
2605
  state: "editable" | "frozen" | "archived";
2562
2606
  frozenAt: string | null;
2563
2607
  };
2564
- export type CampaignContentInput = EmailCampaignContentInput;
2565
- export type EmailCampaignContentInput = {
2608
+ export type CampaignContentInput = {
2566
2609
  channel: "email";
2567
2610
  email: EmailDispatchContent;
2568
2611
  conversationId?: CampaignConversationRef | undefined;
@@ -2626,7 +2669,16 @@ export type ScheduledMessage = {
2626
2669
  createdAt: string;
2627
2670
  updatedAt: string;
2628
2671
  };
2629
- export type SendMessagePayload = EmailSendMessagePayload;
2672
+ export type SendMessagePayload = {
2673
+ conversationId?: ConversationId | null | null | undefined;
2674
+ metadata?: MessageMetadata | undefined;
2675
+ channel: "email";
2676
+ to: EmailRecipients;
2677
+ cc?: EmailCcRecipients | undefined;
2678
+ bcc?: EmailBccRecipients | undefined;
2679
+ from?: EmailSender | undefined;
2680
+ email: EmailContent;
2681
+ };
2630
2682
  export type MessageMetadata = {
2631
2683
  [key: string]: JsonValue;
2632
2684
  } | null;
@@ -2659,8 +2711,7 @@ export type ScheduledMessagePage = {
2659
2711
  items: Array<ScheduledMessage>;
2660
2712
  nextCursor: string | null;
2661
2713
  };
2662
- export type DispatchSendMessagePayload = EmailDispatchSendMessagePayload;
2663
- export type EmailDispatchSendMessagePayload = {
2714
+ export type DispatchSendMessagePayload = {
2664
2715
  conversationId?: ConversationId | null | null | undefined;
2665
2716
  metadata?: MessageMetadata | undefined;
2666
2717
  channel: "email";
@@ -2878,7 +2929,16 @@ export type MessagesListResponses = {
2878
2929
  };
2879
2930
  export type MessagesListResponse = MessagesListResponses[keyof MessagesListResponses];
2880
2931
  export type MessagesSendData = {
2881
- body: EmailSendMessagePayload;
2932
+ body: {
2933
+ conversationId?: ConversationId | null | null | undefined;
2934
+ metadata?: MessageMetadata | undefined;
2935
+ channel: "email";
2936
+ to: EmailRecipients;
2937
+ cc?: EmailCcRecipients | undefined;
2938
+ bcc?: EmailBccRecipients | undefined;
2939
+ from?: EmailSender | undefined;
2940
+ email: EmailContent;
2941
+ };
2882
2942
  headers?: {
2883
2943
  "idempotency-key"?: string | null | undefined;
2884
2944
  };
@@ -5267,92 +5327,6 @@ export type EmailSetDefaultDomainResponses = {
5267
5327
  200: SuccessResult;
5268
5328
  };
5269
5329
  export type EmailSetDefaultDomainResponse = EmailSetDefaultDomainResponses[keyof EmailSetDefaultDomainResponses];
5270
- export type EmailClearDomainDefaultSenderData = {
5271
- body?: never;
5272
- path: {
5273
- id: EmailDomainId;
5274
- };
5275
- query?: never;
5276
- url: "/v1/email/domains/{id}/default-sender";
5277
- };
5278
- export type EmailClearDomainDefaultSenderErrors = {
5279
- /**
5280
- * UnauthorizedError
5281
- */
5282
- 401: UnauthorizedError;
5283
- /**
5284
- * ForbiddenError
5285
- */
5286
- 403: ForbiddenError;
5287
- /**
5288
- * ResourceNotFoundError
5289
- */
5290
- 404: ResourceNotFoundError;
5291
- /**
5292
- * ValidationError
5293
- */
5294
- 422: ValidationError;
5295
- /**
5296
- * InternalError
5297
- */
5298
- 500: InternalError;
5299
- /**
5300
- * GatewayTimeoutError
5301
- */
5302
- 504: GatewayTimeoutError;
5303
- };
5304
- export type EmailClearDomainDefaultSenderError = EmailClearDomainDefaultSenderErrors[keyof EmailClearDomainDefaultSenderErrors];
5305
- export type EmailClearDomainDefaultSenderResponses = {
5306
- /**
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
5330
  export type EmailUpdateDomainConfigData = {
5357
5331
  body: {
5358
5332
  openTracking?: boolean | null | null | undefined;
@@ -14914,6 +14888,42 @@ export type FeedbackSendResponses = {
14914
14888
  201: FeedbackReceipt;
14915
14889
  };
14916
14890
  export type FeedbackSendResponse = FeedbackSendResponses[keyof FeedbackSendResponses];
14891
+ export type WhoamiGetData = {
14892
+ body?: never;
14893
+ path?: never;
14894
+ query?: never;
14895
+ url: "/v1/whoami";
14896
+ };
14897
+ export type WhoamiGetErrors = {
14898
+ /**
14899
+ * UnauthorizedError
14900
+ */
14901
+ 401: UnauthorizedError;
14902
+ /**
14903
+ * ForbiddenError
14904
+ */
14905
+ 403: ForbiddenError;
14906
+ /**
14907
+ * ValidationError
14908
+ */
14909
+ 422: ValidationError;
14910
+ /**
14911
+ * InternalError
14912
+ */
14913
+ 500: InternalError;
14914
+ /**
14915
+ * GatewayTimeoutError
14916
+ */
14917
+ 504: GatewayTimeoutError;
14918
+ };
14919
+ export type WhoamiGetError = WhoamiGetErrors[keyof WhoamiGetErrors];
14920
+ export type WhoamiGetResponses = {
14921
+ /**
14922
+ * Whoami
14923
+ */
14924
+ 200: Whoami;
14925
+ };
14926
+ export type WhoamiGetResponse = WhoamiGetResponses[keyof WhoamiGetResponses];
14917
14927
  export type MailboxesListData = {
14918
14928
  body?: never;
14919
14929
  path?: never;
@@ -14958,7 +14968,7 @@ export type MailboxesListResponse = MailboxesListResponses[keyof MailboxesListRe
14958
14968
  export type MailboxesCreateData = {
14959
14969
  body: {
14960
14970
  namespaceId?: NamespaceId | null | undefined;
14961
- address: string;
14971
+ endpoint: CreateMailboxEndpointPayload;
14962
14972
  name: string;
14963
14973
  slug?: string | null | undefined;
14964
14974
  metadata?: MailboxMetadata | null | undefined;
@@ -14989,9 +14999,9 @@ export type MailboxesCreateErrors = {
14989
14999
  */
14990
15000
  409: ConflictError;
14991
15001
  /**
14992
- * ValidationError
15002
+ * ValidationError | MailboxChannelUnsupportedError
14993
15003
  */
14994
- 422: ValidationError;
15004
+ 422: ValidationError | MailboxChannelUnsupportedError;
14995
15005
  /**
14996
15006
  * InternalError
14997
15007
  */
@@ -15105,10 +15115,6 @@ export type MailboxesUpdateData = {
15105
15115
  body: {
15106
15116
  name?: string | null | undefined;
15107
15117
  metadata?: MailboxMetadataPatch | null | undefined;
15108
- defaultFrom?: {
15109
- address: string;
15110
- displayName?: string | null | null | undefined;
15111
- } | null | undefined;
15112
15118
  };
15113
15119
  path: {
15114
15120
  id: MailboxId;
@@ -15150,8 +15156,9 @@ export type MailboxesUpdateResponses = {
15150
15156
  200: Mailbox;
15151
15157
  };
15152
15158
  export type MailboxesUpdateResponse = MailboxesUpdateResponses[keyof MailboxesUpdateResponses];
15153
- export type MailboxesCreateAddressData = {
15159
+ export type MailboxesCreateEndpointData = {
15154
15160
  body: {
15161
+ channel: MailboxChannel;
15155
15162
  address: string;
15156
15163
  displayName?: string | null | undefined;
15157
15164
  };
@@ -15159,9 +15166,9 @@ export type MailboxesCreateAddressData = {
15159
15166
  id: MailboxId;
15160
15167
  };
15161
15168
  query?: never;
15162
- url: "/v1/mailboxes/{id}/addresses";
15169
+ url: "/v1/mailboxes/{id}/endpoints";
15163
15170
  };
15164
- export type MailboxesCreateAddressErrors = {
15171
+ export type MailboxesCreateEndpointErrors = {
15165
15172
  /**
15166
15173
  * UnauthorizedError
15167
15174
  */
@@ -15179,9 +15186,9 @@ export type MailboxesCreateAddressErrors = {
15179
15186
  */
15180
15187
  409: ConflictError;
15181
15188
  /**
15182
- * ValidationError
15189
+ * ValidationError | MailboxChannelUnsupportedError
15183
15190
  */
15184
- 422: ValidationError;
15191
+ 422: ValidationError | MailboxChannelUnsupportedError;
15185
15192
  /**
15186
15193
  * InternalError
15187
15194
  */
@@ -15191,24 +15198,24 @@ export type MailboxesCreateAddressErrors = {
15191
15198
  */
15192
15199
  504: GatewayTimeoutError;
15193
15200
  };
15194
- export type MailboxesCreateAddressError = MailboxesCreateAddressErrors[keyof MailboxesCreateAddressErrors];
15195
- export type MailboxesCreateAddressResponses = {
15201
+ export type MailboxesCreateEndpointError = MailboxesCreateEndpointErrors[keyof MailboxesCreateEndpointErrors];
15202
+ export type MailboxesCreateEndpointResponses = {
15196
15203
  /**
15197
15204
  * Success
15198
15205
  */
15199
15206
  201: Mailbox;
15200
15207
  };
15201
- export type MailboxesCreateAddressResponse = MailboxesCreateAddressResponses[keyof MailboxesCreateAddressResponses];
15202
- export type MailboxesRemoveAddressData = {
15208
+ export type MailboxesCreateEndpointResponse = MailboxesCreateEndpointResponses[keyof MailboxesCreateEndpointResponses];
15209
+ export type MailboxesRemoveEndpointData = {
15203
15210
  body?: never;
15204
15211
  path: {
15205
15212
  id: MailboxId;
15206
- addressId: MailboxAddressId;
15213
+ endpointId: MailboxEndpointId;
15207
15214
  };
15208
15215
  query?: never;
15209
- url: "/v1/mailboxes/{id}/addresses/{addressId}";
15216
+ url: "/v1/mailboxes/{id}/endpoints/{endpointId}";
15210
15217
  };
15211
- export type MailboxesRemoveAddressErrors = {
15218
+ export type MailboxesRemoveEndpointErrors = {
15212
15219
  /**
15213
15220
  * UnauthorizedError
15214
15221
  */
@@ -15234,14 +15241,60 @@ export type MailboxesRemoveAddressErrors = {
15234
15241
  */
15235
15242
  504: GatewayTimeoutError;
15236
15243
  };
15237
- export type MailboxesRemoveAddressError = MailboxesRemoveAddressErrors[keyof MailboxesRemoveAddressErrors];
15238
- export type MailboxesRemoveAddressResponses = {
15244
+ export type MailboxesRemoveEndpointError = MailboxesRemoveEndpointErrors[keyof MailboxesRemoveEndpointErrors];
15245
+ export type MailboxesRemoveEndpointResponses = {
15239
15246
  /**
15240
15247
  * Mailbox
15241
15248
  */
15242
15249
  200: Mailbox;
15243
15250
  };
15244
- export type MailboxesRemoveAddressResponse = MailboxesRemoveAddressResponses[keyof MailboxesRemoveAddressResponses];
15251
+ export type MailboxesRemoveEndpointResponse = MailboxesRemoveEndpointResponses[keyof MailboxesRemoveEndpointResponses];
15252
+ export type MailboxesUpdateEndpointData = {
15253
+ body: {
15254
+ displayName?: string | null | null | undefined;
15255
+ default?: true | null | undefined;
15256
+ };
15257
+ path: {
15258
+ id: MailboxId;
15259
+ endpointId: MailboxEndpointId;
15260
+ };
15261
+ query?: never;
15262
+ url: "/v1/mailboxes/{id}/endpoints/{endpointId}";
15263
+ };
15264
+ export type MailboxesUpdateEndpointErrors = {
15265
+ /**
15266
+ * UnauthorizedError
15267
+ */
15268
+ 401: UnauthorizedError;
15269
+ /**
15270
+ * ForbiddenError
15271
+ */
15272
+ 403: ForbiddenError;
15273
+ /**
15274
+ * ResourceNotFoundError
15275
+ */
15276
+ 404: ResourceNotFoundError;
15277
+ /**
15278
+ * ValidationError
15279
+ */
15280
+ 422: ValidationError;
15281
+ /**
15282
+ * InternalError
15283
+ */
15284
+ 500: InternalError;
15285
+ /**
15286
+ * GatewayTimeoutError
15287
+ */
15288
+ 504: GatewayTimeoutError;
15289
+ };
15290
+ export type MailboxesUpdateEndpointError = MailboxesUpdateEndpointErrors[keyof MailboxesUpdateEndpointErrors];
15291
+ export type MailboxesUpdateEndpointResponses = {
15292
+ /**
15293
+ * Mailbox
15294
+ */
15295
+ 200: Mailbox;
15296
+ };
15297
+ export type MailboxesUpdateEndpointResponse = MailboxesUpdateEndpointResponses[keyof MailboxesUpdateEndpointResponses];
15245
15298
  export type MailboxesPauseData = {
15246
15299
  body?: never;
15247
15300
  path: {
@@ -16527,6 +16580,7 @@ export type MailboxesUpdateNoteResponses = {
16527
16580
  export type MailboxesUpdateNoteResponse = MailboxesUpdateNoteResponses[keyof MailboxesUpdateNoteResponses];
16528
16581
  export type MailboxesSendMessageData = {
16529
16582
  body: {
16583
+ channel?: "email" | null | undefined;
16530
16584
  to: [string, ...Array<string>];
16531
16585
  cc?: Array<string> | null | undefined;
16532
16586
  bcc?: Array<string> | null | undefined;
@@ -16567,9 +16621,9 @@ export type MailboxesSendMessageErrors = {
16567
16621
  */
16568
16622
  409: MailboxSendConflictError | ConflictError;
16569
16623
  /**
16570
- * ValidationError
16624
+ * MailboxChannelUnsupportedError | ValidationError
16571
16625
  */
16572
- 422: ValidationError;
16626
+ 422: MailboxChannelUnsupportedError | ValidationError;
16573
16627
  /**
16574
16628
  * RateLimitedError
16575
16629
  */
@@ -16783,6 +16837,7 @@ export type MailboxesCopyMessageAttachmentResponses = {
16783
16837
  export type MailboxesCopyMessageAttachmentResponse = MailboxesCopyMessageAttachmentResponses[keyof MailboxesCopyMessageAttachmentResponses];
16784
16838
  export type MailboxesReplyData = {
16785
16839
  body: {
16840
+ channel?: "email" | null | undefined;
16786
16841
  cc?: Array<string> | null | undefined;
16787
16842
  bcc?: Array<string> | null | undefined;
16788
16843
  text?: string | null | undefined;
@@ -16821,9 +16876,9 @@ export type MailboxesReplyErrors = {
16821
16876
  */
16822
16877
  409: MailboxSendConflictError | ConflictError;
16823
16878
  /**
16824
- * ValidationError
16879
+ * MailboxChannelUnsupportedError | ValidationError
16825
16880
  */
16826
- 422: ValidationError;
16881
+ 422: MailboxChannelUnsupportedError | ValidationError;
16827
16882
  /**
16828
16883
  * RateLimitedError
16829
16884
  */
@@ -16859,6 +16914,7 @@ export type MailboxesReplyResponses = {
16859
16914
  export type MailboxesReplyResponse = MailboxesReplyResponses[keyof MailboxesReplyResponses];
16860
16915
  export type MailboxesReplyAllData = {
16861
16916
  body: {
16917
+ channel?: "email" | null | undefined;
16862
16918
  cc?: Array<string> | null | undefined;
16863
16919
  bcc?: Array<string> | null | undefined;
16864
16920
  text?: string | null | undefined;
@@ -16897,9 +16953,9 @@ export type MailboxesReplyAllErrors = {
16897
16953
  */
16898
16954
  409: MailboxSendConflictError | ConflictError;
16899
16955
  /**
16900
- * ValidationError
16956
+ * MailboxChannelUnsupportedError | ValidationError
16901
16957
  */
16902
- 422: ValidationError;
16958
+ 422: MailboxChannelUnsupportedError | ValidationError;
16903
16959
  /**
16904
16960
  * RateLimitedError
16905
16961
  */
@@ -16974,9 +17030,9 @@ export type MailboxesForwardErrors = {
16974
17030
  */
16975
17031
  409: MailboxSendConflictError | ConflictError;
16976
17032
  /**
16977
- * ValidationError
17033
+ * MailboxChannelUnsupportedError | ValidationError
16978
17034
  */
16979
- 422: ValidationError;
17035
+ 422: MailboxChannelUnsupportedError | ValidationError;
16980
17036
  /**
16981
17037
  * RateLimitedError
16982
17038
  */
@@ -17203,6 +17259,8 @@ export type MailboxesListDraftsResponses = {
17203
17259
  export type MailboxesListDraftsResponse = MailboxesListDraftsResponses[keyof MailboxesListDraftsResponses];
17204
17260
  export type MailboxesCreateDraftData = {
17205
17261
  body: {
17262
+ channel?: "email" | null | undefined;
17263
+ endpointId?: MailboxEndpointId | null | undefined;
17206
17264
  to?: Array<string> | null | undefined;
17207
17265
  cc?: Array<string> | null | undefined;
17208
17266
  bcc?: Array<string> | null | undefined;
@@ -17233,9 +17291,9 @@ export type MailboxesCreateDraftErrors = {
17233
17291
  */
17234
17292
  404: ResourceNotFoundError;
17235
17293
  /**
17236
- * ValidationError
17294
+ * MailboxChannelUnsupportedError | ValidationError
17237
17295
  */
17238
- 422: ValidationError;
17296
+ 422: MailboxChannelUnsupportedError | ValidationError;
17239
17297
  /**
17240
17298
  * InternalError
17241
17299
  */
@@ -17429,9 +17487,9 @@ export type MailboxesSendDraftErrors = {
17429
17487
  */
17430
17488
  409: MailboxSendConflictError | ConflictError;
17431
17489
  /**
17432
- * ValidationError
17490
+ * MailboxChannelUnsupportedError | ValidationError
17433
17491
  */
17434
- 422: ValidationError;
17492
+ 422: MailboxChannelUnsupportedError | ValidationError;
17435
17493
  /**
17436
17494
  * RateLimitedError
17437
17495
  */
@@ -17588,9 +17646,9 @@ export type MailboxesCancelActionErrors = {
17588
17646
  */
17589
17647
  409: MailboxSendConflictError | ConflictError;
17590
17648
  /**
17591
- * ValidationError
17649
+ * MailboxChannelUnsupportedError | ValidationError
17592
17650
  */
17593
- 422: ValidationError;
17651
+ 422: MailboxChannelUnsupportedError | ValidationError;
17594
17652
  /**
17595
17653
  * RateLimitedError
17596
17654
  */
@@ -17655,9 +17713,9 @@ export type MailboxesRetryActionErrors = {
17655
17713
  */
17656
17714
  409: MailboxSendConflictError | ConflictError;
17657
17715
  /**
17658
- * ValidationError
17716
+ * MailboxChannelUnsupportedError | ValidationError
17659
17717
  */
17660
- 422: ValidationError;
17718
+ 422: MailboxChannelUnsupportedError | ValidationError;
17661
17719
  /**
17662
17720
  * RateLimitedError
17663
17721
  */
@@ -17722,9 +17780,9 @@ export type MailboxesApproveActionErrors = {
17722
17780
  */
17723
17781
  409: MailboxSendConflictError | ConflictError;
17724
17782
  /**
17725
- * ValidationError
17783
+ * MailboxChannelUnsupportedError | ValidationError
17726
17784
  */
17727
- 422: ValidationError;
17785
+ 422: MailboxChannelUnsupportedError | ValidationError;
17728
17786
  /**
17729
17787
  * RateLimitedError
17730
17788
  */