samva 0.14.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 +6 -0
  2. package/dist/{categories-BGUBFdH9.js → categories-DV51kr2H.js} +5 -1
  3. package/dist/client/sdk.gen.d.ts +74 -45
  4. package/dist/client/types.gen.d.ts +356 -212
  5. package/dist/{client-CZjhOKPM.js → client-BMUew5Wp.js} +307 -198
  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 +1477 -1250
  25. package/dist/effect/index.d.ts +2 -1
  26. package/dist/effect/index.js +6 -5
  27. package/dist/effect/mailboxes.d.ts +191 -92
  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-BrNnSMF2.js → inline-attachments-Cegg6tTF.js} +2 -2
  44. package/dist/{mailboxes-DT02zP7q.js → mailboxes-Thp5z0oX.js} +10 -4
  45. package/dist/{operation-g8nAzmIM.js → operation-BTXjPrwf.js} +18 -12
  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-BFRKhpSS.js → promises-KrA2nSLg.js} +224 -84
  51. package/dist/service-map.d.ts +21 -10
  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" | "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" | "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
  };
@@ -872,59 +896,51 @@ export type Mailbox = {
872
896
  id: MailboxId;
873
897
  namespaceId: NamespaceId | null;
874
898
  slug: string;
875
- displayName: string;
899
+ name: string;
876
900
  status: MailboxStatus;
877
901
  primaryAddress: string | null;
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 UpdateMailboxPayload = {
921
+ export type UpdateMailboxEndpointPayload = {
922
+ displayName?: string | null | null | undefined;
923
+ default?: true | null | undefined;
924
+ };
925
+ export type CreateMailboxEndpointPayload = {
926
+ channel: MailboxChannel;
927
+ address: string;
902
928
  displayName?: string | null | undefined;
929
+ };
930
+ export type UpdateMailboxPayload = {
931
+ name?: string | null | undefined;
903
932
  metadata?: MailboxMetadataPatch | null | undefined;
904
- defaultFrom?: {
905
- address: string;
906
- displayName?: string | null | null | undefined;
907
- } | null | undefined;
908
933
  };
909
934
  export type MailboxMetadataPatch = {
910
935
  [key: string]: string | null;
911
936
  };
912
937
  export type CreateMailboxPayload = {
913
938
  namespaceId?: NamespaceId | null | undefined;
914
- displayName: string;
915
- slug: string;
916
- addresses: [CreateMailboxAddressPayload, ...Array<CreateMailboxAddressPayload>];
917
- defaultFrom?: {
918
- address: string;
919
- displayName?: string | null | undefined;
920
- } | null | undefined;
939
+ endpoint: CreateMailboxEndpointPayload;
940
+ name: string;
941
+ slug?: string | null | undefined;
921
942
  metadata?: MailboxMetadata | null | undefined;
922
943
  };
923
- export type CreateMailboxAddressPayload = {
924
- address: string;
925
- displayName?: string | null | undefined;
926
- domainId?: string | null | undefined;
927
- };
928
944
  export type MailboxPage = {
929
945
  items: Array<MailboxSummary>;
930
946
  nextCursor: string | null;
@@ -933,57 +949,31 @@ export type MailboxSummary = {
933
949
  id: MailboxId;
934
950
  namespaceId: NamespaceId | null;
935
951
  slug: string;
936
- displayName: string;
952
+ name: string;
937
953
  status: MailboxStatus;
938
954
  primaryAddress: string | null;
939
955
  createdAt: string;
940
956
  };
941
- export type FeedbackReceipt = {
942
- id: FeedbackId;
943
- createdAt: string;
957
+ export type Whoami = {
958
+ organization: WhoamiOrganization;
959
+ credential: WhoamiApiKeyCredential | WhoamiUserCredential;
944
960
  };
945
- export type FeedbackId = string;
946
- export type SendFeedback = {
947
- /**
948
- * What happened and what you expected, in plain language (at most 4000 characters).
949
- */
950
- message: string;
951
- category?: "bug" | "confusing" | "missing" | "other" | null | undefined;
952
- context?: FeedbackContext | null | undefined;
961
+ export type WhoamiUserCredential = {
962
+ type: "user";
963
+ user: WhoamiUser;
964
+ role: "member" | "admin" | "owner";
953
965
  };
954
- export type FeedbackContext = {
955
- operation?: string | null | undefined;
956
- resourceId?: string | null | undefined;
957
- };
958
- export type ApiKeyActivityPage = {
959
- items: Array<{
960
- id: string;
961
- timestamp: string;
962
- method: string;
963
- endpoint: string;
964
- statusCode: number;
965
- latency: number;
966
- }>;
967
- nextCursor: string | null;
968
- };
969
- export type ApiKeyId = string;
970
- export type ApiKeyWithSecret = {
966
+ export type WhoamiUser = {
971
967
  id: string;
972
968
  name: string;
973
- key: string;
974
- start: string | null;
975
- description?: string | null | undefined;
976
- createdAt: string;
977
- expiresAt: string | null;
978
- lastUsedAt: string | null;
979
- isActive: boolean;
980
- access: ApiKeyAccess;
981
- owner: ApiKeyOwner | null;
969
+ email: string;
982
970
  };
983
- export type ApiKeyOwner = {
971
+ export type WhoamiApiKeyCredential = {
972
+ type: "apiKey";
984
973
  id: string;
985
974
  name: string;
986
- email: string;
975
+ start: string | null;
976
+ access: ApiKeyAccess;
987
977
  };
988
978
  export type ApiKeyAccess = {
989
979
  mode: "full";
@@ -1027,6 +1017,58 @@ export type ApiKeyResourceAccess = {
1027
1017
  billing?: "read" | "write" | null | undefined;
1028
1018
  analytics?: "read" | "write" | null | undefined;
1029
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
+ };
1030
1072
  export type ApiKey = {
1031
1073
  id: string;
1032
1074
  name: string;
@@ -2235,7 +2277,6 @@ export type EmailDomainDetailed = {
2235
2277
  }>;
2236
2278
  verifiedAt: string | null;
2237
2279
  isDefault: boolean;
2238
- defaultSenderId: EmailSenderId | null;
2239
2280
  deliverability: DeliverabilityFacts;
2240
2281
  createdAt: string;
2241
2282
  updatedAt: string;
@@ -2369,7 +2410,6 @@ export type EmailDomainPage = {
2369
2410
  dkimSelector?: string | null | undefined;
2370
2411
  dkimPublicKey?: string | null | undefined;
2371
2412
  isDefault: boolean;
2372
- defaultSenderId: EmailSenderId | null;
2373
2413
  deliverability: DeliverabilityFacts;
2374
2414
  series: SendsSeries;
2375
2415
  createdAt: string;
@@ -2481,17 +2521,16 @@ export type CampaignAudience = {
2481
2521
  contactIds?: Array<ContactId> | null | undefined;
2482
2522
  groupIds?: Array<ContactGroupId> | null | undefined;
2483
2523
  };
2484
- export type CampaignContent = EmailCampaignContent;
2485
- export type CampaignContentMetadata = {
2486
- [key: string]: JsonValue;
2487
- } | null;
2488
- export type CampaignConversationRef = ConversationId | null | null;
2489
- export type EmailCampaignContent = {
2524
+ export type CampaignContent = {
2490
2525
  channel: "email";
2491
2526
  email: EmailContent;
2492
2527
  conversationId?: CampaignConversationRef | undefined;
2493
2528
  metadata?: CampaignContentMetadata | undefined;
2494
2529
  };
2530
+ export type CampaignContentMetadata = {
2531
+ [key: string]: JsonValue;
2532
+ } | null;
2533
+ export type CampaignConversationRef = ConversationId | null | null;
2495
2534
  export type EmailContent = {
2496
2535
  subject?: string | null | undefined;
2497
2536
  html?: string | null | undefined;
@@ -2566,8 +2605,7 @@ export type CampaignDefinitionSummary = {
2566
2605
  state: "editable" | "frozen" | "archived";
2567
2606
  frozenAt: string | null;
2568
2607
  };
2569
- export type CampaignContentInput = EmailCampaignContentInput;
2570
- export type EmailCampaignContentInput = {
2608
+ export type CampaignContentInput = {
2571
2609
  channel: "email";
2572
2610
  email: EmailDispatchContent;
2573
2611
  conversationId?: CampaignConversationRef | undefined;
@@ -2631,7 +2669,16 @@ export type ScheduledMessage = {
2631
2669
  createdAt: string;
2632
2670
  updatedAt: string;
2633
2671
  };
2634
- 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
+ };
2635
2682
  export type MessageMetadata = {
2636
2683
  [key: string]: JsonValue;
2637
2684
  } | null;
@@ -2664,8 +2711,7 @@ export type ScheduledMessagePage = {
2664
2711
  items: Array<ScheduledMessage>;
2665
2712
  nextCursor: string | null;
2666
2713
  };
2667
- export type DispatchSendMessagePayload = EmailDispatchSendMessagePayload;
2668
- export type EmailDispatchSendMessagePayload = {
2714
+ export type DispatchSendMessagePayload = {
2669
2715
  conversationId?: ConversationId | null | null | undefined;
2670
2716
  metadata?: MessageMetadata | undefined;
2671
2717
  channel: "email";
@@ -2883,7 +2929,16 @@ export type MessagesListResponses = {
2883
2929
  };
2884
2930
  export type MessagesListResponse = MessagesListResponses[keyof MessagesListResponses];
2885
2931
  export type MessagesSendData = {
2886
- 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
+ };
2887
2942
  headers?: {
2888
2943
  "idempotency-key"?: string | null | undefined;
2889
2944
  };
@@ -3242,6 +3297,9 @@ export type MessagesGetEmailResponses = {
3242
3297
  expiresAt: string;
3243
3298
  } | null;
3244
3299
  createdAt: string;
3300
+ /**
3301
+ * When Samva's receiving server accepted the email; null for outbound email. The sender's `Date` header plays no part and stays in the raw MIME.
3302
+ */
3245
3303
  receivedAt: string | null;
3246
3304
  processedAt: string | null;
3247
3305
  };
@@ -5269,92 +5327,6 @@ export type EmailSetDefaultDomainResponses = {
5269
5327
  200: SuccessResult;
5270
5328
  };
5271
5329
  export type EmailSetDefaultDomainResponse = EmailSetDefaultDomainResponses[keyof EmailSetDefaultDomainResponses];
5272
- export type EmailClearDomainDefaultSenderData = {
5273
- body?: never;
5274
- path: {
5275
- id: EmailDomainId;
5276
- };
5277
- query?: never;
5278
- url: "/v1/email/domains/{id}/default-sender";
5279
- };
5280
- export type EmailClearDomainDefaultSenderErrors = {
5281
- /**
5282
- * UnauthorizedError
5283
- */
5284
- 401: UnauthorizedError;
5285
- /**
5286
- * ForbiddenError
5287
- */
5288
- 403: ForbiddenError;
5289
- /**
5290
- * ResourceNotFoundError
5291
- */
5292
- 404: ResourceNotFoundError;
5293
- /**
5294
- * ValidationError
5295
- */
5296
- 422: ValidationError;
5297
- /**
5298
- * InternalError
5299
- */
5300
- 500: InternalError;
5301
- /**
5302
- * GatewayTimeoutError
5303
- */
5304
- 504: GatewayTimeoutError;
5305
- };
5306
- export type EmailClearDomainDefaultSenderError = EmailClearDomainDefaultSenderErrors[keyof EmailClearDomainDefaultSenderErrors];
5307
- export type EmailClearDomainDefaultSenderResponses = {
5308
- /**
5309
- * SuccessResult
5310
- */
5311
- 200: SuccessResult;
5312
- };
5313
- export type EmailClearDomainDefaultSenderResponse = EmailClearDomainDefaultSenderResponses[keyof EmailClearDomainDefaultSenderResponses];
5314
- export type EmailSetDomainDefaultSenderData = {
5315
- body: {
5316
- senderId: EmailSenderId;
5317
- };
5318
- path: {
5319
- id: EmailDomainId;
5320
- };
5321
- query?: never;
5322
- url: "/v1/email/domains/{id}/default-sender";
5323
- };
5324
- export type EmailSetDomainDefaultSenderErrors = {
5325
- /**
5326
- * UnauthorizedError
5327
- */
5328
- 401: UnauthorizedError;
5329
- /**
5330
- * ForbiddenError
5331
- */
5332
- 403: ForbiddenError;
5333
- /**
5334
- * ResourceNotFoundError
5335
- */
5336
- 404: ResourceNotFoundError;
5337
- /**
5338
- * ValidationError
5339
- */
5340
- 422: ValidationError;
5341
- /**
5342
- * InternalError
5343
- */
5344
- 500: InternalError;
5345
- /**
5346
- * GatewayTimeoutError
5347
- */
5348
- 504: GatewayTimeoutError;
5349
- };
5350
- export type EmailSetDomainDefaultSenderError = EmailSetDomainDefaultSenderErrors[keyof EmailSetDomainDefaultSenderErrors];
5351
- export type EmailSetDomainDefaultSenderResponses = {
5352
- /**
5353
- * SuccessResult
5354
- */
5355
- 200: SuccessResult;
5356
- };
5357
- export type EmailSetDomainDefaultSenderResponse = EmailSetDomainDefaultSenderResponses[keyof EmailSetDomainDefaultSenderResponses];
5358
5330
  export type EmailUpdateDomainConfigData = {
5359
5331
  body: {
5360
5332
  openTracking?: boolean | null | null | undefined;
@@ -14916,6 +14888,42 @@ export type FeedbackSendResponses = {
14916
14888
  201: FeedbackReceipt;
14917
14889
  };
14918
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];
14919
14927
  export type MailboxesListData = {
14920
14928
  body?: never;
14921
14929
  path?: never;
@@ -14960,13 +14968,9 @@ export type MailboxesListResponse = MailboxesListResponses[keyof MailboxesListRe
14960
14968
  export type MailboxesCreateData = {
14961
14969
  body: {
14962
14970
  namespaceId?: NamespaceId | null | undefined;
14963
- displayName: string;
14964
- slug: string;
14965
- addresses: [CreateMailboxAddressPayload, ...Array<CreateMailboxAddressPayload>];
14966
- defaultFrom?: {
14967
- address: string;
14968
- displayName?: string | null | undefined;
14969
- } | null | undefined;
14971
+ endpoint: CreateMailboxEndpointPayload;
14972
+ name: string;
14973
+ slug?: string | null | undefined;
14970
14974
  metadata?: MailboxMetadata | null | undefined;
14971
14975
  };
14972
14976
  path?: never;
@@ -14995,9 +14999,9 @@ export type MailboxesCreateErrors = {
14995
14999
  */
14996
15000
  409: ConflictError;
14997
15001
  /**
14998
- * ValidationError
15002
+ * ValidationError | MailboxChannelUnsupportedError
14999
15003
  */
15000
- 422: ValidationError;
15004
+ 422: ValidationError | MailboxChannelUnsupportedError;
15001
15005
  /**
15002
15006
  * InternalError
15003
15007
  */
@@ -15109,12 +15113,8 @@ export type MailboxesGetResponses = {
15109
15113
  export type MailboxesGetResponse = MailboxesGetResponses[keyof MailboxesGetResponses];
15110
15114
  export type MailboxesUpdateData = {
15111
15115
  body: {
15112
- displayName?: string | null | undefined;
15116
+ name?: string | null | undefined;
15113
15117
  metadata?: MailboxMetadataPatch | null | undefined;
15114
- defaultFrom?: {
15115
- address: string;
15116
- displayName?: string | null | null | undefined;
15117
- } | null | undefined;
15118
15118
  };
15119
15119
  path: {
15120
15120
  id: MailboxId;
@@ -15156,6 +15156,145 @@ export type MailboxesUpdateResponses = {
15156
15156
  200: Mailbox;
15157
15157
  };
15158
15158
  export type MailboxesUpdateResponse = MailboxesUpdateResponses[keyof MailboxesUpdateResponses];
15159
+ export type MailboxesCreateEndpointData = {
15160
+ body: {
15161
+ channel: MailboxChannel;
15162
+ address: string;
15163
+ displayName?: string | null | undefined;
15164
+ };
15165
+ path: {
15166
+ id: MailboxId;
15167
+ };
15168
+ query?: never;
15169
+ url: "/v1/mailboxes/{id}/endpoints";
15170
+ };
15171
+ export type MailboxesCreateEndpointErrors = {
15172
+ /**
15173
+ * UnauthorizedError
15174
+ */
15175
+ 401: UnauthorizedError;
15176
+ /**
15177
+ * ForbiddenError
15178
+ */
15179
+ 403: ForbiddenError;
15180
+ /**
15181
+ * ResourceNotFoundError
15182
+ */
15183
+ 404: ResourceNotFoundError;
15184
+ /**
15185
+ * ConflictError
15186
+ */
15187
+ 409: ConflictError;
15188
+ /**
15189
+ * ValidationError | MailboxChannelUnsupportedError
15190
+ */
15191
+ 422: ValidationError | MailboxChannelUnsupportedError;
15192
+ /**
15193
+ * InternalError
15194
+ */
15195
+ 500: InternalError;
15196
+ /**
15197
+ * GatewayTimeoutError
15198
+ */
15199
+ 504: GatewayTimeoutError;
15200
+ };
15201
+ export type MailboxesCreateEndpointError = MailboxesCreateEndpointErrors[keyof MailboxesCreateEndpointErrors];
15202
+ export type MailboxesCreateEndpointResponses = {
15203
+ /**
15204
+ * Success
15205
+ */
15206
+ 201: Mailbox;
15207
+ };
15208
+ export type MailboxesCreateEndpointResponse = MailboxesCreateEndpointResponses[keyof MailboxesCreateEndpointResponses];
15209
+ export type MailboxesRemoveEndpointData = {
15210
+ body?: never;
15211
+ path: {
15212
+ id: MailboxId;
15213
+ endpointId: MailboxEndpointId;
15214
+ };
15215
+ query?: never;
15216
+ url: "/v1/mailboxes/{id}/endpoints/{endpointId}";
15217
+ };
15218
+ export type MailboxesRemoveEndpointErrors = {
15219
+ /**
15220
+ * UnauthorizedError
15221
+ */
15222
+ 401: UnauthorizedError;
15223
+ /**
15224
+ * ForbiddenError
15225
+ */
15226
+ 403: ForbiddenError;
15227
+ /**
15228
+ * ResourceNotFoundError
15229
+ */
15230
+ 404: ResourceNotFoundError;
15231
+ /**
15232
+ * ValidationError
15233
+ */
15234
+ 422: ValidationError;
15235
+ /**
15236
+ * InternalError
15237
+ */
15238
+ 500: InternalError;
15239
+ /**
15240
+ * GatewayTimeoutError
15241
+ */
15242
+ 504: GatewayTimeoutError;
15243
+ };
15244
+ export type MailboxesRemoveEndpointError = MailboxesRemoveEndpointErrors[keyof MailboxesRemoveEndpointErrors];
15245
+ export type MailboxesRemoveEndpointResponses = {
15246
+ /**
15247
+ * Mailbox
15248
+ */
15249
+ 200: Mailbox;
15250
+ };
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];
15159
15298
  export type MailboxesPauseData = {
15160
15299
  body?: never;
15161
15300
  path: {
@@ -16441,6 +16580,7 @@ export type MailboxesUpdateNoteResponses = {
16441
16580
  export type MailboxesUpdateNoteResponse = MailboxesUpdateNoteResponses[keyof MailboxesUpdateNoteResponses];
16442
16581
  export type MailboxesSendMessageData = {
16443
16582
  body: {
16583
+ channel?: "email" | null | undefined;
16444
16584
  to: [string, ...Array<string>];
16445
16585
  cc?: Array<string> | null | undefined;
16446
16586
  bcc?: Array<string> | null | undefined;
@@ -16481,9 +16621,9 @@ export type MailboxesSendMessageErrors = {
16481
16621
  */
16482
16622
  409: MailboxSendConflictError | ConflictError;
16483
16623
  /**
16484
- * ValidationError
16624
+ * MailboxChannelUnsupportedError | ValidationError
16485
16625
  */
16486
- 422: ValidationError;
16626
+ 422: MailboxChannelUnsupportedError | ValidationError;
16487
16627
  /**
16488
16628
  * RateLimitedError
16489
16629
  */
@@ -16697,6 +16837,7 @@ export type MailboxesCopyMessageAttachmentResponses = {
16697
16837
  export type MailboxesCopyMessageAttachmentResponse = MailboxesCopyMessageAttachmentResponses[keyof MailboxesCopyMessageAttachmentResponses];
16698
16838
  export type MailboxesReplyData = {
16699
16839
  body: {
16840
+ channel?: "email" | null | undefined;
16700
16841
  cc?: Array<string> | null | undefined;
16701
16842
  bcc?: Array<string> | null | undefined;
16702
16843
  text?: string | null | undefined;
@@ -16735,9 +16876,9 @@ export type MailboxesReplyErrors = {
16735
16876
  */
16736
16877
  409: MailboxSendConflictError | ConflictError;
16737
16878
  /**
16738
- * ValidationError
16879
+ * MailboxChannelUnsupportedError | ValidationError
16739
16880
  */
16740
- 422: ValidationError;
16881
+ 422: MailboxChannelUnsupportedError | ValidationError;
16741
16882
  /**
16742
16883
  * RateLimitedError
16743
16884
  */
@@ -16773,6 +16914,7 @@ export type MailboxesReplyResponses = {
16773
16914
  export type MailboxesReplyResponse = MailboxesReplyResponses[keyof MailboxesReplyResponses];
16774
16915
  export type MailboxesReplyAllData = {
16775
16916
  body: {
16917
+ channel?: "email" | null | undefined;
16776
16918
  cc?: Array<string> | null | undefined;
16777
16919
  bcc?: Array<string> | null | undefined;
16778
16920
  text?: string | null | undefined;
@@ -16811,9 +16953,9 @@ export type MailboxesReplyAllErrors = {
16811
16953
  */
16812
16954
  409: MailboxSendConflictError | ConflictError;
16813
16955
  /**
16814
- * ValidationError
16956
+ * MailboxChannelUnsupportedError | ValidationError
16815
16957
  */
16816
- 422: ValidationError;
16958
+ 422: MailboxChannelUnsupportedError | ValidationError;
16817
16959
  /**
16818
16960
  * RateLimitedError
16819
16961
  */
@@ -16888,9 +17030,9 @@ export type MailboxesForwardErrors = {
16888
17030
  */
16889
17031
  409: MailboxSendConflictError | ConflictError;
16890
17032
  /**
16891
- * ValidationError
17033
+ * MailboxChannelUnsupportedError | ValidationError
16892
17034
  */
16893
- 422: ValidationError;
17035
+ 422: MailboxChannelUnsupportedError | ValidationError;
16894
17036
  /**
16895
17037
  * RateLimitedError
16896
17038
  */
@@ -17117,6 +17259,8 @@ export type MailboxesListDraftsResponses = {
17117
17259
  export type MailboxesListDraftsResponse = MailboxesListDraftsResponses[keyof MailboxesListDraftsResponses];
17118
17260
  export type MailboxesCreateDraftData = {
17119
17261
  body: {
17262
+ channel?: "email" | null | undefined;
17263
+ endpointId?: MailboxEndpointId | null | undefined;
17120
17264
  to?: Array<string> | null | undefined;
17121
17265
  cc?: Array<string> | null | undefined;
17122
17266
  bcc?: Array<string> | null | undefined;
@@ -17147,9 +17291,9 @@ export type MailboxesCreateDraftErrors = {
17147
17291
  */
17148
17292
  404: ResourceNotFoundError;
17149
17293
  /**
17150
- * ValidationError
17294
+ * MailboxChannelUnsupportedError | ValidationError
17151
17295
  */
17152
- 422: ValidationError;
17296
+ 422: MailboxChannelUnsupportedError | ValidationError;
17153
17297
  /**
17154
17298
  * InternalError
17155
17299
  */
@@ -17343,9 +17487,9 @@ export type MailboxesSendDraftErrors = {
17343
17487
  */
17344
17488
  409: MailboxSendConflictError | ConflictError;
17345
17489
  /**
17346
- * ValidationError
17490
+ * MailboxChannelUnsupportedError | ValidationError
17347
17491
  */
17348
- 422: ValidationError;
17492
+ 422: MailboxChannelUnsupportedError | ValidationError;
17349
17493
  /**
17350
17494
  * RateLimitedError
17351
17495
  */
@@ -17502,9 +17646,9 @@ export type MailboxesCancelActionErrors = {
17502
17646
  */
17503
17647
  409: MailboxSendConflictError | ConflictError;
17504
17648
  /**
17505
- * ValidationError
17649
+ * MailboxChannelUnsupportedError | ValidationError
17506
17650
  */
17507
- 422: ValidationError;
17651
+ 422: MailboxChannelUnsupportedError | ValidationError;
17508
17652
  /**
17509
17653
  * RateLimitedError
17510
17654
  */
@@ -17569,9 +17713,9 @@ export type MailboxesRetryActionErrors = {
17569
17713
  */
17570
17714
  409: MailboxSendConflictError | ConflictError;
17571
17715
  /**
17572
- * ValidationError
17716
+ * MailboxChannelUnsupportedError | ValidationError
17573
17717
  */
17574
- 422: ValidationError;
17718
+ 422: MailboxChannelUnsupportedError | ValidationError;
17575
17719
  /**
17576
17720
  * RateLimitedError
17577
17721
  */
@@ -17636,9 +17780,9 @@ export type MailboxesApproveActionErrors = {
17636
17780
  */
17637
17781
  409: MailboxSendConflictError | ConflictError;
17638
17782
  /**
17639
- * ValidationError
17783
+ * MailboxChannelUnsupportedError | ValidationError
17640
17784
  */
17641
- 422: ValidationError;
17785
+ 422: MailboxChannelUnsupportedError | ValidationError;
17642
17786
  /**
17643
17787
  * RateLimitedError
17644
17788
  */