samva 0.31.0 → 0.32.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 (45) hide show
  1. package/dist/client/sdk.gen.d.ts +70 -4
  2. package/dist/client/sdk.gen.js +224 -3
  3. package/dist/client/types.gen.d.ts +591 -34
  4. package/dist/effect/errors.d.ts +1 -1
  5. package/dist/effect/errors.js +2 -2
  6. package/dist/effect/generated/campaigns.d.ts +131 -57
  7. package/dist/effect/generated/campaigns.js +27 -9
  8. package/dist/effect/generated/contact-groups.js +2 -2
  9. package/dist/effect/generated/contacts.js +6 -6
  10. package/dist/effect/generated/email.js +1 -1
  11. package/dist/effect/generated/mailboxes.d.ts +969 -16
  12. package/dist/effect/generated/mailboxes.js +263 -11
  13. package/dist/effect/generated/newsletter-issues.d.ts +199 -1
  14. package/dist/effect/generated/newsletter-issues.js +24 -2
  15. package/dist/effect/generated/newsletters.js +1 -1
  16. package/dist/effect/generated/organizations.d.ts +345 -2
  17. package/dist/effect/generated/organizations.js +65 -5
  18. package/dist/effect/generated/scheduled-messages.d.ts +25 -8
  19. package/dist/effect/generated/scheduled-messages.js +17 -9
  20. package/dist/effect/generated/shared.d.ts +90 -9
  21. package/dist/effect/generated/shared.js +14 -10
  22. package/dist/effect/generated/subscriptions.js +1 -1
  23. package/dist/effect/generated/templates.d.ts +307 -1
  24. package/dist/effect/generated/templates.js +36 -2
  25. package/dist/effect/generated/topics.js +2 -2
  26. package/dist/effect/generated/whoami.d.ts +5 -5
  27. package/dist/effect/generated/whoami.js +1 -0
  28. package/dist/effect/generated-metadata.d.ts +40 -0
  29. package/dist/effect/generated-metadata.js +10 -0
  30. package/dist/effect/index.js +2 -2
  31. package/dist/effect/internal/send.d.ts +1 -1
  32. package/dist/effect/mailboxes.d.ts +273 -0
  33. package/dist/effect/mailboxes.js +7 -1
  34. package/dist/effect/organizations.d.ts +6 -0
  35. package/dist/effect/organizations.js +7 -1
  36. package/dist/index.js +2 -2
  37. package/dist/package.js +1 -1
  38. package/dist/promises/client.js +2 -2
  39. package/dist/promises/errors.gen.d.ts +12 -2
  40. package/dist/promises/errors.gen.js +28 -1
  41. package/dist/promises/index.js +2 -2
  42. package/dist/promises/types.gen.d.ts +1 -1
  43. package/dist/service-map.d.ts +25 -0
  44. package/dist/service-map.js +9 -0
  45. package/package.json +8 -8
@@ -802,6 +802,13 @@ export type MailboxThreadState = {
802
802
  read: boolean;
803
803
  starred: boolean;
804
804
  snoozedUntil: string | null;
805
+ doneAt: string | null;
806
+ closedAt: string | null;
807
+ closedBy: {
808
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
809
+ id: string;
810
+ displayName?: string | null | undefined;
811
+ } | null;
805
812
  };
806
813
  export type MailboxLabelId = string;
807
814
  export type MailboxThreadPriority = "low" | "normal" | "high" | "urgent";
@@ -812,6 +819,8 @@ export type MailboxThreadLabels = {
812
819
  export type UpdateMailboxThreadPayload = {
813
820
  folder?: MailboxThreadFolder | null | undefined;
814
821
  priority?: MailboxThreadPriority | null | undefined;
822
+ done?: boolean | null | undefined;
823
+ closed?: boolean | null | undefined;
815
824
  read?: boolean | null | undefined;
816
825
  starred?: boolean | null | undefined;
817
826
  snoozedUntil?: string | null | undefined;
@@ -832,6 +841,13 @@ export type MailboxThread = {
832
841
  read: boolean;
833
842
  starred: boolean;
834
843
  snoozedUntil: string | null;
844
+ doneAt: string | null;
845
+ closedAt: string | null;
846
+ closedBy: {
847
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
848
+ id: string;
849
+ displayName?: string | null | undefined;
850
+ } | null;
835
851
  lastActivityAt: string;
836
852
  conversationId: ConversationId;
837
853
  participants: Array<MailboxThreadParticipant>;
@@ -870,7 +886,99 @@ export type MailboxThreadSummary = {
870
886
  read: boolean;
871
887
  starred: boolean;
872
888
  snoozedUntil: string | null;
889
+ doneAt: string | null;
890
+ closedAt: string | null;
891
+ closedBy: {
892
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
893
+ id: string;
894
+ displayName?: string | null | undefined;
895
+ } | null;
896
+ lastActivityAt: string;
897
+ };
898
+ export type OrganizationMailboxThreadPage = {
899
+ items: Array<OrganizationMailboxThreadSummary>;
900
+ nextCursor: string | null;
901
+ };
902
+ export type OrganizationMailboxThreadSummary = {
903
+ id: MailboxThreadId;
904
+ channel: MailboxChannel;
905
+ endpointId: MailboxEndpointId | null;
906
+ subject: string | null;
907
+ preview: string | null;
908
+ from: MailboxThreadSender | null;
909
+ messageCount: number;
910
+ hasAttachments: boolean;
911
+ hasDraft: boolean;
912
+ folder: MailboxThreadFolder;
913
+ priority: MailboxThreadPriority;
914
+ labels: Array<MailboxLabelId>;
915
+ read: boolean;
916
+ starred: boolean;
917
+ snoozedUntil: string | null;
918
+ doneAt: string | null;
919
+ closedAt: string | null;
920
+ closedBy: {
921
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
922
+ id: string;
923
+ displayName?: string | null | undefined;
924
+ } | null;
873
925
  lastActivityAt: string;
926
+ mailbox: MailboxThreadMailbox;
927
+ };
928
+ export type MailboxThreadMailbox = {
929
+ id: MailboxId;
930
+ address: string | null;
931
+ kind: "personal" | "shared";
932
+ };
933
+ export type OrganizationMailboxDraftPage = {
934
+ items: Array<OrganizationMailboxDraftSummary>;
935
+ nextCursor: string | null;
936
+ };
937
+ export type OrganizationMailboxDraftSummary = {
938
+ id: MailboxDraftId;
939
+ channel: MailboxChannel;
940
+ threadId: MailboxThreadId | null;
941
+ inReplyToMessageId: MessageId | null;
942
+ state: MailboxDraftState;
943
+ lockedByActionId: MailboxActionId | null;
944
+ to: Array<string>;
945
+ subject: string | null;
946
+ createdAt: string;
947
+ updatedAt: string;
948
+ mailbox: MailboxThreadMailbox;
949
+ };
950
+ export type MailboxNeedsYou = {
951
+ items: Array<MailboxNeedsYouItem>;
952
+ nextCursor: string | null;
953
+ /**
954
+ * All items this caller may decide, independent of the current page.
955
+ */
956
+ counts: {
957
+ heldSends: number;
958
+ quarantinedMessages: number;
959
+ total: number;
960
+ };
961
+ };
962
+ export type MailboxNeedsYouItem = {
963
+ type: "heldSend";
964
+ id: MailboxActionId;
965
+ mailbox: MailboxThreadMailbox;
966
+ threadId: MailboxThreadId | null;
967
+ draftId: MailboxDraftId | null;
968
+ proposedBy: {
969
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
970
+ id: string;
971
+ displayName?: string | null | undefined;
972
+ };
973
+ source: "humanUi" | "externalApi" | "aiSdkTool" | "extension" | "externalAgent" | "samvaManagedAgent" | "system";
974
+ createdAt: string;
975
+ } | {
976
+ type: "quarantinedMessage";
977
+ id: MessageId;
978
+ mailbox: MailboxThreadMailbox;
979
+ reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "phishing" | "fraud" | "prompt_injection";
980
+ source: "receipt" | "classifier";
981
+ heldAt: string;
874
982
  };
875
983
  export type MailboxLabel = {
876
984
  id: MailboxLabelId;
@@ -976,6 +1084,8 @@ export type MailboxAgentActivity = {
976
1084
  };
977
1085
  export type Mailbox = {
978
1086
  id: MailboxId;
1087
+ kind: MailboxKind;
1088
+ owner: UserId | null;
979
1089
  namespaceId: NamespaceId | null;
980
1090
  slug: string;
981
1091
  name: string;
@@ -1003,6 +1113,10 @@ export type MailboxMetadataWritable = {
1003
1113
  [key: string]: string | undefined;
1004
1114
  };
1005
1115
  export type MailboxStatus = "active" | "paused";
1116
+ /**
1117
+ * Whether a mailbox belongs to one person or is shared with a team.
1118
+ */
1119
+ export type MailboxKind = "personal" | "shared";
1006
1120
  export type UpdateMailboxEndpointPayload = {
1007
1121
  displayName?: string | null | undefined;
1008
1122
  default?: true | null | undefined;
@@ -1032,6 +1146,8 @@ export type MailboxPage = {
1032
1146
  };
1033
1147
  export type MailboxSummary = {
1034
1148
  id: MailboxId;
1149
+ kind: MailboxKind;
1150
+ owner: UserId | null;
1035
1151
  namespaceId: NamespaceId | null;
1036
1152
  slug: string;
1037
1153
  name: string;
@@ -1046,7 +1162,7 @@ export type Whoami = {
1046
1162
  export type WhoamiUserCredential = {
1047
1163
  type: "user";
1048
1164
  user: WhoamiUser;
1049
- role: "member" | "admin" | "owner";
1165
+ role: "mail_user" | "member" | "admin" | "owner";
1050
1166
  };
1051
1167
  export type WhoamiUser = {
1052
1168
  id: string;
@@ -1439,6 +1555,11 @@ export type CreateBrand = {
1439
1555
  export type BrandList = {
1440
1556
  items: Array<Brand>;
1441
1557
  };
1558
+ export type ServiceUnavailableError = {
1559
+ _tag: "ServiceUnavailableError";
1560
+ message: string;
1561
+ retryAfterSeconds: number;
1562
+ };
1442
1563
  export type TemplateSourceError = {
1443
1564
  _tag: "TemplateSourceError";
1444
1565
  message: string;
@@ -3629,11 +3750,15 @@ export type CampaignContentInput = {
3629
3750
  path: string;
3630
3751
  commit: string;
3631
3752
  } | null | undefined;
3632
- from?: CampaignFrom | undefined;
3753
+ from?: CampaignFromInput | undefined;
3633
3754
  replyMailboxId?: CampaignReplyMailbox | undefined;
3634
3755
  conversationId?: CampaignConversationRef | undefined;
3635
3756
  metadata?: CampaignContentMetadataWritable | undefined;
3636
3757
  };
3758
+ export type CampaignFromInput = {
3759
+ email: string;
3760
+ name?: string | null | undefined;
3761
+ } | null;
3637
3762
  export type CampaignEmailInput = {
3638
3763
  subject?: string | null | undefined;
3639
3764
  html?: string | null | undefined;
@@ -3696,7 +3821,7 @@ export type ScheduledMessage = {
3696
3821
  status: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed";
3697
3822
  scheduledFor: string;
3698
3823
  timezone: string;
3699
- send: SendMessagePayload;
3824
+ send: StoredSendMessagePayload;
3700
3825
  messageId: MessageId | null;
3701
3826
  idempotencyKey: string | null;
3702
3827
  referenceId: string | null;
@@ -3708,14 +3833,17 @@ export type ScheduledMessage = {
3708
3833
  createdAt: string;
3709
3834
  updatedAt: string;
3710
3835
  };
3711
- export type SendMessagePayload = {
3836
+ export type StoredSendMessagePayload = {
3712
3837
  conversationId?: ConversationId | null | undefined;
3713
3838
  metadata?: MessageMetadata | undefined;
3714
3839
  channel: "email";
3715
- to: EmailRecipients;
3716
- cc?: EmailCcRecipients | undefined;
3717
- bcc?: EmailBccRecipients | undefined;
3718
- from?: EmailSender | undefined;
3840
+ to: Array<SavedEmailRecipient>;
3841
+ cc?: Array<SavedEmailRecipient> | null | undefined;
3842
+ bcc?: Array<SavedEmailRecipient> | null | undefined;
3843
+ from?: {
3844
+ email: string;
3845
+ name?: string | null | undefined;
3846
+ } | null | undefined;
3719
3847
  email: EmailContent;
3720
3848
  };
3721
3849
  export type MessageMetadata = {
@@ -3724,16 +3852,6 @@ export type MessageMetadata = {
3724
3852
  export type MessageMetadataWritable = {
3725
3853
  [key: string]: JsonValueWritable | undefined;
3726
3854
  } | null;
3727
- export type EmailSendMessagePayload = {
3728
- conversationId?: ConversationId | null | undefined;
3729
- metadata?: MessageMetadata | undefined;
3730
- channel: "email";
3731
- to: EmailRecipients;
3732
- cc?: EmailCcRecipients | undefined;
3733
- bcc?: EmailBccRecipients | undefined;
3734
- from?: EmailSender | undefined;
3735
- email: EmailContent;
3736
- };
3737
3855
  export type EmailContent = {
3738
3856
  subject?: string | null | undefined;
3739
3857
  html?: string | null | undefined;
@@ -3778,20 +3896,13 @@ export type EmailContentWritable = {
3778
3896
  footer?: EmailFooterOverride | undefined;
3779
3897
  headers?: EmailCustomHeadersWritable | null | undefined;
3780
3898
  };
3781
- export type EmailSender = {
3782
- email: string;
3783
- name?: string | null | undefined;
3784
- } | null;
3785
- export type EmailBccRecipients = Array<EmailRecipient> | null;
3786
- export type EmailRecipient = {
3899
+ export type SavedEmailRecipient = {
3787
3900
  contactId: ContactId;
3788
3901
  } | {
3789
3902
  email: string;
3790
3903
  name?: string | null | undefined;
3791
3904
  displayName?: string | null | undefined;
3792
3905
  };
3793
- export type EmailCcRecipients = Array<EmailRecipient> | null;
3794
- export type EmailRecipients = Array<EmailRecipient>;
3795
3906
  export type ScheduledMessageId = string;
3796
3907
  export type ScheduledMessagePage = {
3797
3908
  items: Array<ScheduledMessage>;
@@ -3829,6 +3940,20 @@ export type EmailDispatchContent = {
3829
3940
  footer?: EmailFooterOverride | undefined;
3830
3941
  headers?: EmailCustomHeadersWritable | null | undefined;
3831
3942
  };
3943
+ export type EmailSender = {
3944
+ email: string;
3945
+ name?: string | null | undefined;
3946
+ } | null;
3947
+ export type EmailBccRecipients = Array<EmailRecipient> | null;
3948
+ export type EmailRecipient = {
3949
+ contactId: ContactId;
3950
+ } | {
3951
+ email: string;
3952
+ name?: string | null | undefined;
3953
+ displayName?: string | null | undefined;
3954
+ };
3955
+ export type EmailCcRecipients = Array<EmailRecipient> | null;
3956
+ export type EmailRecipients = Array<EmailRecipient>;
3832
3957
  export type OperationPage = {
3833
3958
  items: Array<Operation>;
3834
3959
  nextCursor: string | null;
@@ -3861,6 +3986,16 @@ export type ValidateEmailResponse = {
3861
3986
  hasText: boolean;
3862
3987
  };
3863
3988
  };
3989
+ export type EmailSendMessagePayload = {
3990
+ conversationId?: ConversationId | null | undefined;
3991
+ metadata?: MessageMetadata | undefined;
3992
+ channel: "email";
3993
+ to: EmailRecipients;
3994
+ cc?: EmailCcRecipients | undefined;
3995
+ bcc?: EmailBccRecipients | undefined;
3996
+ from?: EmailSender | undefined;
3997
+ email: EmailContent;
3998
+ };
3864
3999
  export type MessageReceipt = {
3865
4000
  id: MessageId;
3866
4001
  status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
@@ -3869,6 +4004,16 @@ export type MessageReceipt = {
3869
4004
  skippedRecipients: Array<SkippedRecipient>;
3870
4005
  createdAt: string;
3871
4006
  };
4007
+ export type SendMessagePayload = {
4008
+ conversationId?: ConversationId | null | undefined;
4009
+ metadata?: MessageMetadata | undefined;
4010
+ channel: "email";
4011
+ to: EmailRecipients;
4012
+ cc?: EmailCcRecipients | undefined;
4013
+ bcc?: EmailBccRecipients | undefined;
4014
+ from?: EmailSender | undefined;
4015
+ email: EmailContent;
4016
+ };
3872
4017
  export type EmailAddress = {
3873
4018
  email: string;
3874
4019
  name: string | null;
@@ -4980,6 +5125,10 @@ export type CampaignsPreviewErrors = {
4980
5125
  * InternalError
4981
5126
  */
4982
5127
  500: InternalError;
5128
+ /**
5129
+ * ServiceUnavailableError
5130
+ */
5131
+ 503: ServiceUnavailableError;
4983
5132
  /**
4984
5133
  * GatewayTimeoutError
4985
5134
  */
@@ -5041,9 +5190,9 @@ export type CampaignsSendTestErrors = {
5041
5190
  */
5042
5191
  502: BillingProviderError | ExternalServiceError;
5043
5192
  /**
5044
- * SenderNotReadyError | DeliveryUnavailableError
5193
+ * ServiceUnavailableError | SenderNotReadyError | DeliveryUnavailableError
5045
5194
  */
5046
- 503: SenderNotReadyError | DeliveryUnavailableError;
5195
+ 503: ServiceUnavailableError | SenderNotReadyError | DeliveryUnavailableError;
5047
5196
  /**
5048
5197
  * GatewayTimeoutError
5049
5198
  */
@@ -5114,6 +5263,10 @@ export type CampaignsCreateErrors = {
5114
5263
  * UnauthorizedError
5115
5264
  */
5116
5265
  401: UnauthorizedError;
5266
+ /**
5267
+ * PaymentRequiredError
5268
+ */
5269
+ 402: PaymentRequiredError;
5117
5270
  /**
5118
5271
  * FlagDisabledError | ForbiddenError
5119
5272
  */
@@ -5126,6 +5279,10 @@ export type CampaignsCreateErrors = {
5126
5279
  * InternalError
5127
5280
  */
5128
5281
  500: InternalError;
5282
+ /**
5283
+ * BillingProviderError
5284
+ */
5285
+ 502: BillingProviderError;
5129
5286
  /**
5130
5287
  * GatewayTimeoutError
5131
5288
  */
@@ -5342,6 +5499,10 @@ export type CampaignsScheduleRunErrors = {
5342
5499
  * UnauthorizedError
5343
5500
  */
5344
5501
  401: UnauthorizedError;
5502
+ /**
5503
+ * PaymentRequiredError
5504
+ */
5505
+ 402: PaymentRequiredError;
5345
5506
  /**
5346
5507
  * FlagDisabledError | ForbiddenError
5347
5508
  */
@@ -5363,13 +5524,13 @@ export type CampaignsScheduleRunErrors = {
5363
5524
  */
5364
5525
  500: InternalError;
5365
5526
  /**
5366
- * ExternalServiceError
5527
+ * ExternalServiceError | BillingProviderError
5367
5528
  */
5368
- 502: ExternalServiceError;
5529
+ 502: ExternalServiceError | BillingProviderError;
5369
5530
  /**
5370
- * SenderNotReadyError
5531
+ * SenderNotReadyError | ServiceUnavailableError
5371
5532
  */
5372
- 503: SenderNotReadyError;
5533
+ 503: SenderNotReadyError | ServiceUnavailableError;
5373
5534
  /**
5374
5535
  * GatewayTimeoutError
5375
5536
  */
@@ -5534,6 +5695,10 @@ export type CampaignsResumeRunErrors = {
5534
5695
  * UnauthorizedError
5535
5696
  */
5536
5697
  401: UnauthorizedError;
5698
+ /**
5699
+ * PaymentRequiredError
5700
+ */
5701
+ 402: PaymentRequiredError;
5537
5702
  /**
5538
5703
  * ForbiddenError
5539
5704
  */
@@ -5555,9 +5720,9 @@ export type CampaignsResumeRunErrors = {
5555
5720
  */
5556
5721
  500: InternalError;
5557
5722
  /**
5558
- * ExternalServiceError
5723
+ * ExternalServiceError | BillingProviderError
5559
5724
  */
5560
- 502: ExternalServiceError;
5725
+ 502: ExternalServiceError | BillingProviderError;
5561
5726
  /**
5562
5727
  * GatewayTimeoutError
5563
5728
  */
@@ -13796,6 +13961,10 @@ export type NewsletterIssuesListErrors = {
13796
13961
  * InternalError
13797
13962
  */
13798
13963
  500: InternalError;
13964
+ /**
13965
+ * ServiceUnavailableError
13966
+ */
13967
+ 503: ServiceUnavailableError;
13799
13968
  /**
13800
13969
  * GatewayTimeoutError
13801
13970
  */
@@ -13849,6 +14018,10 @@ export type NewsletterIssuesUpdateErrors = {
13849
14018
  * InternalError
13850
14019
  */
13851
14020
  500: InternalError;
14021
+ /**
14022
+ * ServiceUnavailableError
14023
+ */
14024
+ 503: ServiceUnavailableError;
13852
14025
  /**
13853
14026
  * GatewayTimeoutError
13854
14027
  */
@@ -13982,6 +14155,10 @@ export type NewsletterIssuesCreateErrors = {
13982
14155
  * InternalError
13983
14156
  */
13984
14157
  500: InternalError;
14158
+ /**
14159
+ * ServiceUnavailableError
14160
+ */
14161
+ 503: ServiceUnavailableError;
13985
14162
  /**
13986
14163
  * GatewayTimeoutError
13987
14164
  */
@@ -14108,6 +14285,10 @@ export type NewsletterIssuesOpenErrors = {
14108
14285
  * InternalError
14109
14286
  */
14110
14287
  500: InternalError;
14288
+ /**
14289
+ * ServiceUnavailableError
14290
+ */
14291
+ 503: ServiceUnavailableError;
14111
14292
  /**
14112
14293
  * GatewayTimeoutError
14113
14294
  */
@@ -14237,6 +14418,10 @@ export type NewsletterIssuesGetErrors = {
14237
14418
  * InternalError
14238
14419
  */
14239
14420
  500: InternalError;
14421
+ /**
14422
+ * ServiceUnavailableError
14423
+ */
14424
+ 503: ServiceUnavailableError;
14240
14425
  /**
14241
14426
  * GatewayTimeoutError
14242
14427
  */
@@ -14289,6 +14474,10 @@ export type NewsletterIssuesRemoveErrors = {
14289
14474
  * InternalError
14290
14475
  */
14291
14476
  500: InternalError;
14477
+ /**
14478
+ * ServiceUnavailableError
14479
+ */
14480
+ 503: ServiceUnavailableError;
14292
14481
  /**
14293
14482
  * GatewayTimeoutError
14294
14483
  */
@@ -14422,6 +14611,10 @@ export type NewsletterIssuesSaveErrors = {
14422
14611
  * InternalError
14423
14612
  */
14424
14613
  500: InternalError;
14614
+ /**
14615
+ * ServiceUnavailableError
14616
+ */
14617
+ 503: ServiceUnavailableError;
14425
14618
  /**
14426
14619
  * GatewayTimeoutError
14427
14620
  */
@@ -14528,6 +14721,10 @@ export type NewsletterIssuesCheckErrors = {
14528
14721
  * InternalError
14529
14722
  */
14530
14723
  500: InternalError;
14724
+ /**
14725
+ * ServiceUnavailableError
14726
+ */
14727
+ 503: ServiceUnavailableError;
14531
14728
  /**
14532
14729
  * GatewayTimeoutError
14533
14730
  */
@@ -14662,6 +14859,10 @@ export type NewsletterIssuesRenderErrors = {
14662
14859
  * InternalError
14663
14860
  */
14664
14861
  500: InternalError;
14862
+ /**
14863
+ * ServiceUnavailableError
14864
+ */
14865
+ 503: ServiceUnavailableError;
14665
14866
  /**
14666
14867
  * GatewayTimeoutError
14667
14868
  */
@@ -14831,6 +15032,10 @@ export type NewsletterIssuesHeadErrors = {
14831
15032
  * InternalError
14832
15033
  */
14833
15034
  500: InternalError;
15035
+ /**
15036
+ * ServiceUnavailableError
15037
+ */
15038
+ 503: ServiceUnavailableError;
14834
15039
  /**
14835
15040
  * GatewayTimeoutError
14836
15041
  */
@@ -14883,6 +15088,10 @@ export type NewsletterIssuesHistoryErrors = {
14883
15088
  * InternalError
14884
15089
  */
14885
15090
  500: InternalError;
15091
+ /**
15092
+ * ServiceUnavailableError
15093
+ */
15094
+ 503: ServiceUnavailableError;
14886
15095
  /**
14887
15096
  * GatewayTimeoutError
14888
15097
  */
@@ -15566,6 +15775,10 @@ export type TemplatesCreateErrors = {
15566
15775
  * InternalError
15567
15776
  */
15568
15777
  500: InternalError;
15778
+ /**
15779
+ * ServiceUnavailableError
15780
+ */
15781
+ 503: ServiceUnavailableError;
15569
15782
  /**
15570
15783
  * GatewayTimeoutError
15571
15784
  */
@@ -16119,6 +16332,10 @@ export type TemplatesCreateFromWebsiteErrors = {
16119
16332
  * InternalError
16120
16333
  */
16121
16334
  500: InternalError;
16335
+ /**
16336
+ * ServiceUnavailableError
16337
+ */
16338
+ 503: ServiceUnavailableError;
16122
16339
  /**
16123
16340
  * GatewayTimeoutError
16124
16341
  */
@@ -16226,6 +16443,10 @@ export type TemplatesPatchWorkspaceErrors = {
16226
16443
  * InternalError
16227
16444
  */
16228
16445
  500: InternalError;
16446
+ /**
16447
+ * ServiceUnavailableError
16448
+ */
16449
+ 503: ServiceUnavailableError;
16229
16450
  /**
16230
16451
  * GatewayTimeoutError
16231
16452
  */
@@ -16352,6 +16573,10 @@ export type TemplatesOpenWorkspaceErrors = {
16352
16573
  * InternalError
16353
16574
  */
16354
16575
  500: InternalError;
16576
+ /**
16577
+ * ServiceUnavailableError
16578
+ */
16579
+ 503: ServiceUnavailableError;
16355
16580
  /**
16356
16581
  * GatewayTimeoutError
16357
16582
  */
@@ -16480,6 +16705,10 @@ export type TemplatesDiffWorkspaceErrors = {
16480
16705
  * InternalError
16481
16706
  */
16482
16707
  500: InternalError;
16708
+ /**
16709
+ * ServiceUnavailableError
16710
+ */
16711
+ 503: ServiceUnavailableError;
16483
16712
  /**
16484
16713
  * GatewayTimeoutError
16485
16714
  */
@@ -16549,6 +16778,10 @@ export type TemplatesPutWorkspaceAssetErrors = {
16549
16778
  * InternalError
16550
16779
  */
16551
16780
  500: InternalError;
16781
+ /**
16782
+ * ServiceUnavailableError
16783
+ */
16784
+ 503: ServiceUnavailableError;
16552
16785
  /**
16553
16786
  * GatewayTimeoutError
16554
16787
  */
@@ -16684,6 +16917,10 @@ export type TemplatesResolveWorkspaceConflictErrors = {
16684
16917
  * InternalError
16685
16918
  */
16686
16919
  500: InternalError;
16920
+ /**
16921
+ * ServiceUnavailableError
16922
+ */
16923
+ 503: ServiceUnavailableError;
16687
16924
  /**
16688
16925
  * GatewayTimeoutError
16689
16926
  */
@@ -16817,6 +17054,10 @@ export type TemplatesSaveWorkspaceErrors = {
16817
17054
  * InternalError
16818
17055
  */
16819
17056
  500: InternalError;
17057
+ /**
17058
+ * ServiceUnavailableError
17059
+ */
17060
+ 503: ServiceUnavailableError;
16820
17061
  /**
16821
17062
  * GatewayTimeoutError
16822
17063
  */
@@ -16923,6 +17164,10 @@ export type TemplatesRestoreWorkspaceErrors = {
16923
17164
  * InternalError
16924
17165
  */
16925
17166
  500: InternalError;
17167
+ /**
17168
+ * ServiceUnavailableError
17169
+ */
17170
+ 503: ServiceUnavailableError;
16926
17171
  /**
16927
17172
  * GatewayTimeoutError
16928
17173
  */
@@ -17057,6 +17302,10 @@ export type TemplatesWorkspaceHistoryErrors = {
17057
17302
  * InternalError
17058
17303
  */
17059
17304
  500: InternalError;
17305
+ /**
17306
+ * ServiceUnavailableError
17307
+ */
17308
+ 503: ServiceUnavailableError;
17060
17309
  /**
17061
17310
  * GatewayTimeoutError
17062
17311
  */
@@ -17119,6 +17368,10 @@ export type TemplatesCheckWorkspaceErrors = {
17119
17368
  * InternalError
17120
17369
  */
17121
17370
  500: InternalError;
17371
+ /**
17372
+ * ServiceUnavailableError
17373
+ */
17374
+ 503: ServiceUnavailableError;
17122
17375
  /**
17123
17376
  * GatewayTimeoutError
17124
17377
  */
@@ -17248,6 +17501,10 @@ export type TemplatesRenderWorkspaceFixtureErrors = {
17248
17501
  * InternalError
17249
17502
  */
17250
17503
  500: InternalError;
17504
+ /**
17505
+ * ServiceUnavailableError
17506
+ */
17507
+ 503: ServiceUnavailableError;
17251
17508
  /**
17252
17509
  * GatewayTimeoutError
17253
17510
  */
@@ -17423,6 +17680,10 @@ export type TemplatesPublishErrors = {
17423
17680
  * InternalError
17424
17681
  */
17425
17682
  500: InternalError;
17683
+ /**
17684
+ * ServiceUnavailableError
17685
+ */
17686
+ 503: ServiceUnavailableError;
17426
17687
  /**
17427
17688
  * GatewayTimeoutError
17428
17689
  */
@@ -17888,6 +18149,10 @@ export type TemplatesGetGitRepositoryErrors = {
17888
18149
  * InternalError
17889
18150
  */
17890
18151
  500: InternalError;
18152
+ /**
18153
+ * ServiceUnavailableError
18154
+ */
18155
+ 503: ServiceUnavailableError;
17891
18156
  /**
17892
18157
  * GatewayTimeoutError
17893
18158
  */
@@ -17939,6 +18204,10 @@ export type TemplatesIssueGitCredentialErrors = {
17939
18204
  * InternalError
17940
18205
  */
17941
18206
  500: InternalError;
18207
+ /**
18208
+ * ServiceUnavailableError
18209
+ */
18210
+ 503: ServiceUnavailableError;
17942
18211
  /**
17943
18212
  * GatewayTimeoutError
17944
18213
  */
@@ -18004,6 +18273,10 @@ export type TemplatesAttachWorkspaceResourceErrors = {
18004
18273
  * InternalError
18005
18274
  */
18006
18275
  500: InternalError;
18276
+ /**
18277
+ * ServiceUnavailableError
18278
+ */
18279
+ 503: ServiceUnavailableError;
18007
18280
  /**
18008
18281
  * GatewayTimeoutError
18009
18282
  */
@@ -18131,6 +18404,10 @@ export type TemplatesRemoveWorkspaceResourceErrors = {
18131
18404
  * InternalError
18132
18405
  */
18133
18406
  500: InternalError;
18407
+ /**
18408
+ * ServiceUnavailableError
18409
+ */
18410
+ 503: ServiceUnavailableError;
18134
18411
  /**
18135
18412
  * GatewayTimeoutError
18136
18413
  */
@@ -19201,6 +19478,143 @@ export type OrganizationsGetProfileResponses = {
19201
19478
  };
19202
19479
  };
19203
19480
  export type OrganizationsGetProfileResponse = OrganizationsGetProfileResponses[keyof OrganizationsGetProfileResponses];
19481
+ export type OrganizationsAssignPersonalMailboxData = {
19482
+ body: {
19483
+ mailboxAddress: string;
19484
+ };
19485
+ path: {
19486
+ userId: UserId;
19487
+ };
19488
+ query?: never;
19489
+ url: "/v1/organizations/members/{userId}/personal-mailbox";
19490
+ };
19491
+ export type OrganizationsAssignPersonalMailboxErrors = {
19492
+ /**
19493
+ * UnauthorizedError
19494
+ */
19495
+ 401: UnauthorizedError;
19496
+ /**
19497
+ * PaymentRequiredError
19498
+ */
19499
+ 402: PaymentRequiredError;
19500
+ /**
19501
+ * ForbiddenError
19502
+ */
19503
+ 403: ForbiddenError;
19504
+ /**
19505
+ * ResourceNotFoundError
19506
+ */
19507
+ 404: ResourceNotFoundError;
19508
+ /**
19509
+ * ConflictError
19510
+ */
19511
+ 409: ConflictError;
19512
+ /**
19513
+ * ValidationError
19514
+ */
19515
+ 422: ValidationError;
19516
+ /**
19517
+ * InternalError
19518
+ */
19519
+ 500: InternalError;
19520
+ /**
19521
+ * BillingProviderError
19522
+ */
19523
+ 502: BillingProviderError;
19524
+ /**
19525
+ * GatewayTimeoutError
19526
+ */
19527
+ 504: GatewayTimeoutError;
19528
+ };
19529
+ export type OrganizationsAssignPersonalMailboxError = OrganizationsAssignPersonalMailboxErrors[keyof OrganizationsAssignPersonalMailboxErrors];
19530
+ export type OrganizationsAssignPersonalMailboxResponses = {
19531
+ /**
19532
+ * Success
19533
+ */
19534
+ 200: {
19535
+ mailboxId: MailboxId;
19536
+ };
19537
+ };
19538
+ export type OrganizationsAssignPersonalMailboxResponse = OrganizationsAssignPersonalMailboxResponses[keyof OrganizationsAssignPersonalMailboxResponses];
19539
+ export type OrganizationsListPersonalMailboxAssignmentsData = {
19540
+ body?: never;
19541
+ path?: never;
19542
+ query?: never;
19543
+ url: "/v1/organizations/personal-mailboxes/assignments";
19544
+ };
19545
+ export type OrganizationsListPersonalMailboxAssignmentsErrors = {
19546
+ /**
19547
+ * UnauthorizedError
19548
+ */
19549
+ 401: UnauthorizedError;
19550
+ /**
19551
+ * ForbiddenError
19552
+ */
19553
+ 403: ForbiddenError;
19554
+ /**
19555
+ * ValidationError
19556
+ */
19557
+ 422: ValidationError;
19558
+ /**
19559
+ * InternalError
19560
+ */
19561
+ 500: InternalError;
19562
+ /**
19563
+ * GatewayTimeoutError
19564
+ */
19565
+ 504: GatewayTimeoutError;
19566
+ };
19567
+ export type OrganizationsListPersonalMailboxAssignmentsError = OrganizationsListPersonalMailboxAssignmentsErrors[keyof OrganizationsListPersonalMailboxAssignmentsErrors];
19568
+ export type OrganizationsListPersonalMailboxAssignmentsResponses = {
19569
+ /**
19570
+ * Success
19571
+ */
19572
+ 200: {
19573
+ items: Array<{
19574
+ userId: UserId;
19575
+ }>;
19576
+ };
19577
+ };
19578
+ export type OrganizationsListPersonalMailboxAssignmentsResponse = OrganizationsListPersonalMailboxAssignmentsResponses[keyof OrganizationsListPersonalMailboxAssignmentsResponses];
19579
+ export type OrganizationsGetPersonalMailboxAddressOptionsData = {
19580
+ body?: never;
19581
+ path?: never;
19582
+ query?: never;
19583
+ url: "/v1/organizations/personal-mailboxes/address-options";
19584
+ };
19585
+ export type OrganizationsGetPersonalMailboxAddressOptionsErrors = {
19586
+ /**
19587
+ * UnauthorizedError
19588
+ */
19589
+ 401: UnauthorizedError;
19590
+ /**
19591
+ * ForbiddenError
19592
+ */
19593
+ 403: ForbiddenError;
19594
+ /**
19595
+ * ValidationError
19596
+ */
19597
+ 422: ValidationError;
19598
+ /**
19599
+ * InternalError
19600
+ */
19601
+ 500: InternalError;
19602
+ /**
19603
+ * GatewayTimeoutError
19604
+ */
19605
+ 504: GatewayTimeoutError;
19606
+ };
19607
+ export type OrganizationsGetPersonalMailboxAddressOptionsError = OrganizationsGetPersonalMailboxAddressOptionsErrors[keyof OrganizationsGetPersonalMailboxAddressOptionsErrors];
19608
+ export type OrganizationsGetPersonalMailboxAddressOptionsResponses = {
19609
+ /**
19610
+ * Success
19611
+ */
19612
+ 200: {
19613
+ domains: Array<string>;
19614
+ defaultDomain: string;
19615
+ };
19616
+ };
19617
+ export type OrganizationsGetPersonalMailboxAddressOptionsResponse = OrganizationsGetPersonalMailboxAddressOptionsResponses[keyof OrganizationsGetPersonalMailboxAddressOptionsResponses];
19204
19618
  export type OrganizationsGetTrustTierData = {
19205
19619
  body?: never;
19206
19620
  path?: never;
@@ -21028,6 +21442,146 @@ export type MailboxesUpdateLabelResponses = {
21028
21442
  200: MailboxLabel;
21029
21443
  };
21030
21444
  export type MailboxesUpdateLabelResponse = MailboxesUpdateLabelResponses[keyof MailboxesUpdateLabelResponses];
21445
+ export type MailboxesGetNeedsYouData = {
21446
+ body?: never;
21447
+ path?: never;
21448
+ query?: {
21449
+ limit?: number | null | undefined;
21450
+ cursor?: Cursor | null | undefined;
21451
+ };
21452
+ url: "/v1/mailboxes/needs-you";
21453
+ };
21454
+ export type MailboxesGetNeedsYouErrors = {
21455
+ /**
21456
+ * UnauthorizedError
21457
+ */
21458
+ 401: UnauthorizedError;
21459
+ /**
21460
+ * ForbiddenError
21461
+ */
21462
+ 403: ForbiddenError;
21463
+ /**
21464
+ * ValidationError
21465
+ */
21466
+ 422: ValidationError;
21467
+ /**
21468
+ * InternalError
21469
+ */
21470
+ 500: InternalError;
21471
+ /**
21472
+ * GatewayTimeoutError
21473
+ */
21474
+ 504: GatewayTimeoutError;
21475
+ };
21476
+ export type MailboxesGetNeedsYouError = MailboxesGetNeedsYouErrors[keyof MailboxesGetNeedsYouErrors];
21477
+ export type MailboxesGetNeedsYouResponses = {
21478
+ /**
21479
+ * MailboxNeedsYou
21480
+ */
21481
+ 200: MailboxNeedsYou;
21482
+ };
21483
+ export type MailboxesGetNeedsYouResponse = MailboxesGetNeedsYouResponses[keyof MailboxesGetNeedsYouResponses];
21484
+ export type MailboxesListOrganizationDraftsData = {
21485
+ body?: never;
21486
+ path?: never;
21487
+ query?: {
21488
+ limit?: number | null | undefined;
21489
+ cursor?: Cursor | null | undefined;
21490
+ mailboxId?: MailboxId | Array<MailboxId> | null | undefined;
21491
+ kind?: "personal" | "shared" | null | undefined;
21492
+ threadId?: MailboxThreadId | null | undefined;
21493
+ };
21494
+ url: "/v1/mailboxes/drafts";
21495
+ };
21496
+ export type MailboxesListOrganizationDraftsErrors = {
21497
+ /**
21498
+ * UnauthorizedError
21499
+ */
21500
+ 401: UnauthorizedError;
21501
+ /**
21502
+ * ForbiddenError
21503
+ */
21504
+ 403: ForbiddenError;
21505
+ /**
21506
+ * ResourceNotFoundError
21507
+ */
21508
+ 404: ResourceNotFoundError;
21509
+ /**
21510
+ * ValidationError
21511
+ */
21512
+ 422: ValidationError;
21513
+ /**
21514
+ * InternalError
21515
+ */
21516
+ 500: InternalError;
21517
+ /**
21518
+ * GatewayTimeoutError
21519
+ */
21520
+ 504: GatewayTimeoutError;
21521
+ };
21522
+ export type MailboxesListOrganizationDraftsError = MailboxesListOrganizationDraftsErrors[keyof MailboxesListOrganizationDraftsErrors];
21523
+ export type MailboxesListOrganizationDraftsResponses = {
21524
+ /**
21525
+ * OrganizationMailboxDraftPage
21526
+ */
21527
+ 200: OrganizationMailboxDraftPage;
21528
+ };
21529
+ export type MailboxesListOrganizationDraftsResponse = MailboxesListOrganizationDraftsResponses[keyof MailboxesListOrganizationDraftsResponses];
21530
+ export type MailboxesListOrganizationThreadsData = {
21531
+ body?: never;
21532
+ path?: never;
21533
+ query?: {
21534
+ limit?: number | null | undefined;
21535
+ cursor?: Cursor | null | undefined;
21536
+ after?: string | null | undefined;
21537
+ before?: string | null | undefined;
21538
+ q?: string | null | undefined;
21539
+ state?: "active" | "done" | null | undefined;
21540
+ folder?: MailboxThreadFolder | null | undefined;
21541
+ label?: MailboxLabelId | null | undefined;
21542
+ unread?: boolean | null | undefined;
21543
+ starred?: boolean | null | undefined;
21544
+ snoozed?: boolean | null | undefined;
21545
+ mailboxId?: MailboxId | Array<MailboxId> | null | undefined;
21546
+ kind?: "personal" | "shared" | null | undefined;
21547
+ conversation?: ConversationId | null | undefined;
21548
+ };
21549
+ url: "/v1/mailboxes/threads";
21550
+ };
21551
+ export type MailboxesListOrganizationThreadsErrors = {
21552
+ /**
21553
+ * UnauthorizedError
21554
+ */
21555
+ 401: UnauthorizedError;
21556
+ /**
21557
+ * ForbiddenError
21558
+ */
21559
+ 403: ForbiddenError;
21560
+ /**
21561
+ * ResourceNotFoundError
21562
+ */
21563
+ 404: ResourceNotFoundError;
21564
+ /**
21565
+ * ValidationError
21566
+ */
21567
+ 422: ValidationError;
21568
+ /**
21569
+ * InternalError
21570
+ */
21571
+ 500: InternalError;
21572
+ /**
21573
+ * GatewayTimeoutError
21574
+ */
21575
+ 504: GatewayTimeoutError;
21576
+ };
21577
+ export type MailboxesListOrganizationThreadsError = MailboxesListOrganizationThreadsErrors[keyof MailboxesListOrganizationThreadsErrors];
21578
+ export type MailboxesListOrganizationThreadsResponses = {
21579
+ /**
21580
+ * OrganizationMailboxThreadPage
21581
+ */
21582
+ 200: OrganizationMailboxThreadPage;
21583
+ };
21584
+ export type MailboxesListOrganizationThreadsResponse = MailboxesListOrganizationThreadsResponses[keyof MailboxesListOrganizationThreadsResponses];
21031
21585
  export type MailboxesListThreadsData = {
21032
21586
  body?: never;
21033
21587
  path: {
@@ -21039,6 +21593,7 @@ export type MailboxesListThreadsData = {
21039
21593
  after?: string | null | undefined;
21040
21594
  before?: string | null | undefined;
21041
21595
  q?: string | null | undefined;
21596
+ state?: "active" | "done" | null | undefined;
21042
21597
  folder?: MailboxThreadFolder | null | undefined;
21043
21598
  label?: MailboxLabelId | null | undefined;
21044
21599
  unread?: boolean | null | undefined;
@@ -21128,6 +21683,8 @@ export type MailboxesUpdateThreadData = {
21128
21683
  body: {
21129
21684
  folder?: MailboxThreadFolder | null | undefined;
21130
21685
  priority?: MailboxThreadPriority | null | undefined;
21686
+ done?: boolean | null | undefined;
21687
+ closed?: boolean | null | undefined;
21131
21688
  read?: boolean | null | undefined;
21132
21689
  starred?: boolean | null | undefined;
21133
21690
  snoozedUntil?: string | null | undefined;