shipmail 0.1.32 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -18,6 +18,7 @@ type ShipMailConfig = {
18
18
  readonly timeout?: number | undefined;
19
19
  readonly fetch?: typeof fetch | undefined;
20
20
  readonly defaultHeaders?: Record<string, string> | undefined;
21
+ readonly organizationId?: string | undefined;
21
22
  };
22
23
  type PaginationParams = {
23
24
  readonly cursor?: string | undefined;
@@ -75,7 +76,9 @@ type MethodOptions = {
75
76
  readonly signal?: AbortSignal | undefined;
76
77
  readonly headers?: Record<string, string> | undefined;
77
78
  readonly idempotencyKey?: string | undefined;
79
+ readonly organizationId?: string | undefined;
78
80
  };
81
+ type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
79
82
 
80
83
  type MergeFields = Record<string, string | number | boolean | null>;
81
84
  type SubscriberStatus = "subscribed" | "pending" | "unsubscribed" | "bounced" | "complained" | "suppressed" | "transactional_only";
@@ -165,6 +168,8 @@ declare class Audiences extends ApiResource {
165
168
  delete(id: string, options?: MethodOptions): Promise<void>;
166
169
  }
167
170
 
171
+ declare const CONFERENCING_PROVIDER_IDS: readonly ["zoom", "google_meet"];
172
+ type ConferencingProviderId = (typeof CONFERENCING_PROVIDER_IDS)[number];
168
173
  type BookingPage = {
169
174
  readonly object: "booking_page";
170
175
  readonly id: string;
@@ -181,6 +186,7 @@ type BookingPage = {
181
186
  readonly buffer_minutes: number;
182
187
  readonly minimum_notice_minutes: number;
183
188
  readonly max_advance_days: number;
189
+ readonly conferencing_provider: ConferencingProviderId | null;
184
190
  readonly active: boolean;
185
191
  readonly created_at: string;
186
192
  readonly updated_at: string;
@@ -199,6 +205,7 @@ type CreateBookingPageParams = {
199
205
  readonly buffer_minutes?: number | undefined;
200
206
  readonly minimum_notice_minutes?: number | undefined;
201
207
  readonly max_advance_days?: number | undefined;
208
+ readonly conferencing_provider?: ConferencingProviderId | null | undefined;
202
209
  readonly active?: boolean | undefined;
203
210
  };
204
211
  type UpdateBookingPageParams = {
@@ -214,6 +221,7 @@ type UpdateBookingPageParams = {
214
221
  readonly buffer_minutes?: number | undefined;
215
222
  readonly minimum_notice_minutes?: number | undefined;
216
223
  readonly max_advance_days?: number | undefined;
224
+ readonly conferencing_provider?: ConferencingProviderId | null | undefined;
217
225
  readonly active?: boolean | undefined;
218
226
  };
219
227
 
@@ -625,6 +633,33 @@ type MailboxExport = {
625
633
  readonly started_at: string | null;
626
634
  readonly completed_at: string | null;
627
635
  };
636
+ type MailboxAppPasswordState = "pending_create" | "active" | "pending_revoke" | "revoked" | "failed";
637
+ type MailboxAppPasswordPurpose = "operator_client" | "partner_embedded_webmail";
638
+ type MailboxAppPassword = {
639
+ readonly object: "mailbox_app_password";
640
+ readonly id: string;
641
+ readonly mailbox_id: string;
642
+ readonly name: string;
643
+ readonly state: MailboxAppPasswordState;
644
+ readonly purpose: MailboxAppPasswordPurpose;
645
+ readonly expires_at: string | null;
646
+ readonly allowed_cidrs: readonly string[];
647
+ readonly last_used_at: string | null;
648
+ readonly created_at: string;
649
+ readonly revoked_at: string | null;
650
+ };
651
+ type CreatedMailboxAppPassword = MailboxAppPassword & {
652
+ readonly secret: string;
653
+ };
654
+ type MailboxAppPasswordList = {
655
+ readonly object: "list";
656
+ readonly data: readonly MailboxAppPassword[];
657
+ };
658
+ type CreateMailboxAppPasswordParams = {
659
+ readonly name: string;
660
+ readonly expires_at?: string | undefined;
661
+ readonly allowed_cidrs?: readonly string[] | undefined;
662
+ };
628
663
  type MailboxFolder = {
629
664
  readonly object: "mailbox_folder";
630
665
  readonly id: string;
@@ -807,12 +842,18 @@ type MailboxForwardingList = {
807
842
  type CreateMailboxForwardingParams = {
808
843
  readonly destination: string;
809
844
  };
810
- type CreateMailboxParams = {
845
+ type CreateMailboxBaseParams = {
811
846
  readonly domain_id: string;
812
847
  readonly address: string;
813
- readonly password: string;
814
848
  readonly display_name?: string | undefined;
815
849
  };
850
+ type CreateMailboxParams = CreateMailboxBaseParams & ({
851
+ readonly password: string;
852
+ readonly generate_password?: never;
853
+ } | {
854
+ readonly password?: never;
855
+ readonly generate_password: true;
856
+ });
816
857
  type UpdateMailboxParams = {
817
858
  readonly display_name?: string | null | undefined;
818
859
  };
@@ -988,6 +1029,9 @@ declare class Mailboxes extends ApiResource {
988
1029
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
989
1030
  downloadInboxAttachment(id: string, params: DownloadInboxAttachmentParams, options?: MethodOptions): Promise<Uint8Array>;
990
1031
  resetPassword(id: string, params: ResetMailboxPasswordParams, options?: MethodOptions): Promise<Mailbox>;
1032
+ listAppPasswords(id: string, options?: MethodOptions): Promise<MailboxAppPasswordList>;
1033
+ createAppPassword(id: string, params: CreateMailboxAppPasswordParams, options?: OneTimeSecretMethodOptions): Promise<CreatedMailboxAppPassword>;
1034
+ revokeAppPassword(id: string, appPasswordId: string, options?: MethodOptions): Promise<void>;
991
1035
  getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
992
1036
  updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
993
1037
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
@@ -1344,6 +1388,107 @@ declare class Newsletters extends ApiResource {
1344
1388
  resume(id: string, options?: MethodOptions): Promise<Newsletter>;
1345
1389
  }
1346
1390
 
1391
+ type PartnerOrganizationStatus = "pending_owner" | "active" | "suspended" | "offboarding" | "disconnected";
1392
+ type PartnerDataClassification = "internal_test" | "customer";
1393
+ type PartnerOrganization = {
1394
+ readonly object: "partner_organization";
1395
+ readonly id: string;
1396
+ readonly organization_id: string;
1397
+ readonly name: string;
1398
+ readonly external_reference: string;
1399
+ readonly owner_email: string;
1400
+ readonly owner_user_id: string | null;
1401
+ readonly status: PartnerOrganizationStatus;
1402
+ readonly data_classification: PartnerDataClassification;
1403
+ readonly mailbox_limit: number;
1404
+ readonly delegated_permissions: readonly string[];
1405
+ readonly owner_accepted_at: string | null;
1406
+ readonly activated_at: string | null;
1407
+ readonly suspended_at: string | null;
1408
+ readonly disconnected_at: string | null;
1409
+ readonly created_at: string;
1410
+ readonly updated_at: string;
1411
+ };
1412
+ type CreatePartnerOrganizationParams = {
1413
+ readonly name: string;
1414
+ readonly external_reference: string;
1415
+ readonly owner_email: string;
1416
+ readonly mailbox_limit: number;
1417
+ readonly data_classification: PartnerDataClassification;
1418
+ };
1419
+ type UpdatePartnerOrganizationParams = {
1420
+ readonly name?: string | undefined;
1421
+ readonly mailbox_limit?: number | undefined;
1422
+ };
1423
+ type PartnerOrganizationList = {
1424
+ readonly data: readonly PartnerOrganization[];
1425
+ };
1426
+ type PartnerOwnershipInvitation = {
1427
+ readonly object: "partner_ownership_invitation";
1428
+ readonly owner_email: string;
1429
+ readonly email_sent: boolean;
1430
+ readonly expires_at: string;
1431
+ };
1432
+ type CreatedPartnerOrganization = PartnerOrganization & {
1433
+ readonly ownership_invitation: PartnerOwnershipInvitation | null;
1434
+ };
1435
+ type PartnerUsage = {
1436
+ readonly object: "partner_usage";
1437
+ readonly period_start: string;
1438
+ readonly period_end: string;
1439
+ readonly closed_through: string | null;
1440
+ readonly active_children: number;
1441
+ readonly active_mailboxes: number;
1442
+ readonly child_active_seconds: number;
1443
+ readonly mailbox_active_seconds: number;
1444
+ readonly child_subtotal: number;
1445
+ readonly mailbox_subtotal: number;
1446
+ readonly minimum_shortfall: number;
1447
+ readonly projected_total: number;
1448
+ readonly currency: string;
1449
+ };
1450
+ type ConsumePartnerMailboxCredentialGrantParams = {
1451
+ readonly name?: string | undefined;
1452
+ readonly expires_at?: string | undefined;
1453
+ readonly allowed_cidrs?: readonly string[] | undefined;
1454
+ };
1455
+ type PartnerMailboxCredentialGrant = {
1456
+ readonly object: "partner_mailbox_credential_grant";
1457
+ readonly id: string;
1458
+ readonly partner_organization_id: string;
1459
+ readonly organization_id: string;
1460
+ readonly organization_name: string;
1461
+ readonly external_reference: string;
1462
+ readonly operator_email: string;
1463
+ readonly mailbox_id: string;
1464
+ readonly mailbox_address: string;
1465
+ readonly disclosure_version: string;
1466
+ readonly expires_at: string;
1467
+ readonly consented_at: string;
1468
+ };
1469
+ type PartnerMailboxCredentialGrantList = {
1470
+ readonly data: readonly PartnerMailboxCredentialGrant[];
1471
+ };
1472
+ type PartnerMailboxCredential = CreatedMailboxAppPassword & {
1473
+ readonly operator_notified: boolean;
1474
+ };
1475
+
1476
+ declare class Partner extends ApiResource {
1477
+ listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
1478
+ createOrganization(params: CreatePartnerOrganizationParams, options?: MethodOptions): Promise<CreatedPartnerOrganization>;
1479
+ getOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1480
+ updateOrganization(id: string, params: UpdatePartnerOrganizationParams, options?: MethodOptions): Promise<PartnerOrganization>;
1481
+ resendOwnershipInvitation(id: string, params?: {
1482
+ readonly owner_email?: string | undefined;
1483
+ }, options?: MethodOptions): Promise<PartnerOwnershipInvitation>;
1484
+ suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1485
+ resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1486
+ offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1487
+ listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
1488
+ consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
1489
+ usage(options?: MethodOptions): Promise<PartnerUsage>;
1490
+ }
1491
+
1347
1492
  declare class Status extends ApiResource {
1348
1493
  get(options?: MethodOptions): Promise<StatusResponse>;
1349
1494
  }
@@ -1492,6 +1637,7 @@ declare class ShipMailClient {
1492
1637
  private readonly timeout;
1493
1638
  private readonly fetchFn;
1494
1639
  private readonly defaultHeaders;
1640
+ private readonly organizationId;
1495
1641
  readonly audiences: Audiences;
1496
1642
  readonly bookingPages: BookingPages;
1497
1643
  readonly calendar: Calendar;
@@ -1499,6 +1645,7 @@ declare class ShipMailClient {
1499
1645
  readonly mailboxes: Mailboxes;
1500
1646
  readonly messages: Messages;
1501
1647
  readonly newsletters: Newsletters;
1648
+ readonly partner: Partner;
1502
1649
  readonly suppressions: Suppressions;
1503
1650
  readonly threads: Threads;
1504
1651
  readonly webhooks: Webhooks;
@@ -1587,4 +1734,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1587
1734
  readonly toleranceInSeconds?: number | undefined;
1588
1735
  }): Promise<WebhookEvent>;
1589
1736
 
1590
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, ConflictError, ConnectionError, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
1737
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ type ShipMailConfig = {
18
18
  readonly timeout?: number | undefined;
19
19
  readonly fetch?: typeof fetch | undefined;
20
20
  readonly defaultHeaders?: Record<string, string> | undefined;
21
+ readonly organizationId?: string | undefined;
21
22
  };
22
23
  type PaginationParams = {
23
24
  readonly cursor?: string | undefined;
@@ -75,7 +76,9 @@ type MethodOptions = {
75
76
  readonly signal?: AbortSignal | undefined;
76
77
  readonly headers?: Record<string, string> | undefined;
77
78
  readonly idempotencyKey?: string | undefined;
79
+ readonly organizationId?: string | undefined;
78
80
  };
81
+ type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
79
82
 
80
83
  type MergeFields = Record<string, string | number | boolean | null>;
81
84
  type SubscriberStatus = "subscribed" | "pending" | "unsubscribed" | "bounced" | "complained" | "suppressed" | "transactional_only";
@@ -165,6 +168,8 @@ declare class Audiences extends ApiResource {
165
168
  delete(id: string, options?: MethodOptions): Promise<void>;
166
169
  }
167
170
 
171
+ declare const CONFERENCING_PROVIDER_IDS: readonly ["zoom", "google_meet"];
172
+ type ConferencingProviderId = (typeof CONFERENCING_PROVIDER_IDS)[number];
168
173
  type BookingPage = {
169
174
  readonly object: "booking_page";
170
175
  readonly id: string;
@@ -181,6 +186,7 @@ type BookingPage = {
181
186
  readonly buffer_minutes: number;
182
187
  readonly minimum_notice_minutes: number;
183
188
  readonly max_advance_days: number;
189
+ readonly conferencing_provider: ConferencingProviderId | null;
184
190
  readonly active: boolean;
185
191
  readonly created_at: string;
186
192
  readonly updated_at: string;
@@ -199,6 +205,7 @@ type CreateBookingPageParams = {
199
205
  readonly buffer_minutes?: number | undefined;
200
206
  readonly minimum_notice_minutes?: number | undefined;
201
207
  readonly max_advance_days?: number | undefined;
208
+ readonly conferencing_provider?: ConferencingProviderId | null | undefined;
202
209
  readonly active?: boolean | undefined;
203
210
  };
204
211
  type UpdateBookingPageParams = {
@@ -214,6 +221,7 @@ type UpdateBookingPageParams = {
214
221
  readonly buffer_minutes?: number | undefined;
215
222
  readonly minimum_notice_minutes?: number | undefined;
216
223
  readonly max_advance_days?: number | undefined;
224
+ readonly conferencing_provider?: ConferencingProviderId | null | undefined;
217
225
  readonly active?: boolean | undefined;
218
226
  };
219
227
 
@@ -625,6 +633,33 @@ type MailboxExport = {
625
633
  readonly started_at: string | null;
626
634
  readonly completed_at: string | null;
627
635
  };
636
+ type MailboxAppPasswordState = "pending_create" | "active" | "pending_revoke" | "revoked" | "failed";
637
+ type MailboxAppPasswordPurpose = "operator_client" | "partner_embedded_webmail";
638
+ type MailboxAppPassword = {
639
+ readonly object: "mailbox_app_password";
640
+ readonly id: string;
641
+ readonly mailbox_id: string;
642
+ readonly name: string;
643
+ readonly state: MailboxAppPasswordState;
644
+ readonly purpose: MailboxAppPasswordPurpose;
645
+ readonly expires_at: string | null;
646
+ readonly allowed_cidrs: readonly string[];
647
+ readonly last_used_at: string | null;
648
+ readonly created_at: string;
649
+ readonly revoked_at: string | null;
650
+ };
651
+ type CreatedMailboxAppPassword = MailboxAppPassword & {
652
+ readonly secret: string;
653
+ };
654
+ type MailboxAppPasswordList = {
655
+ readonly object: "list";
656
+ readonly data: readonly MailboxAppPassword[];
657
+ };
658
+ type CreateMailboxAppPasswordParams = {
659
+ readonly name: string;
660
+ readonly expires_at?: string | undefined;
661
+ readonly allowed_cidrs?: readonly string[] | undefined;
662
+ };
628
663
  type MailboxFolder = {
629
664
  readonly object: "mailbox_folder";
630
665
  readonly id: string;
@@ -807,12 +842,18 @@ type MailboxForwardingList = {
807
842
  type CreateMailboxForwardingParams = {
808
843
  readonly destination: string;
809
844
  };
810
- type CreateMailboxParams = {
845
+ type CreateMailboxBaseParams = {
811
846
  readonly domain_id: string;
812
847
  readonly address: string;
813
- readonly password: string;
814
848
  readonly display_name?: string | undefined;
815
849
  };
850
+ type CreateMailboxParams = CreateMailboxBaseParams & ({
851
+ readonly password: string;
852
+ readonly generate_password?: never;
853
+ } | {
854
+ readonly password?: never;
855
+ readonly generate_password: true;
856
+ });
816
857
  type UpdateMailboxParams = {
817
858
  readonly display_name?: string | null | undefined;
818
859
  };
@@ -988,6 +1029,9 @@ declare class Mailboxes extends ApiResource {
988
1029
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
989
1030
  downloadInboxAttachment(id: string, params: DownloadInboxAttachmentParams, options?: MethodOptions): Promise<Uint8Array>;
990
1031
  resetPassword(id: string, params: ResetMailboxPasswordParams, options?: MethodOptions): Promise<Mailbox>;
1032
+ listAppPasswords(id: string, options?: MethodOptions): Promise<MailboxAppPasswordList>;
1033
+ createAppPassword(id: string, params: CreateMailboxAppPasswordParams, options?: OneTimeSecretMethodOptions): Promise<CreatedMailboxAppPassword>;
1034
+ revokeAppPassword(id: string, appPasswordId: string, options?: MethodOptions): Promise<void>;
991
1035
  getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
992
1036
  updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
993
1037
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
@@ -1344,6 +1388,107 @@ declare class Newsletters extends ApiResource {
1344
1388
  resume(id: string, options?: MethodOptions): Promise<Newsletter>;
1345
1389
  }
1346
1390
 
1391
+ type PartnerOrganizationStatus = "pending_owner" | "active" | "suspended" | "offboarding" | "disconnected";
1392
+ type PartnerDataClassification = "internal_test" | "customer";
1393
+ type PartnerOrganization = {
1394
+ readonly object: "partner_organization";
1395
+ readonly id: string;
1396
+ readonly organization_id: string;
1397
+ readonly name: string;
1398
+ readonly external_reference: string;
1399
+ readonly owner_email: string;
1400
+ readonly owner_user_id: string | null;
1401
+ readonly status: PartnerOrganizationStatus;
1402
+ readonly data_classification: PartnerDataClassification;
1403
+ readonly mailbox_limit: number;
1404
+ readonly delegated_permissions: readonly string[];
1405
+ readonly owner_accepted_at: string | null;
1406
+ readonly activated_at: string | null;
1407
+ readonly suspended_at: string | null;
1408
+ readonly disconnected_at: string | null;
1409
+ readonly created_at: string;
1410
+ readonly updated_at: string;
1411
+ };
1412
+ type CreatePartnerOrganizationParams = {
1413
+ readonly name: string;
1414
+ readonly external_reference: string;
1415
+ readonly owner_email: string;
1416
+ readonly mailbox_limit: number;
1417
+ readonly data_classification: PartnerDataClassification;
1418
+ };
1419
+ type UpdatePartnerOrganizationParams = {
1420
+ readonly name?: string | undefined;
1421
+ readonly mailbox_limit?: number | undefined;
1422
+ };
1423
+ type PartnerOrganizationList = {
1424
+ readonly data: readonly PartnerOrganization[];
1425
+ };
1426
+ type PartnerOwnershipInvitation = {
1427
+ readonly object: "partner_ownership_invitation";
1428
+ readonly owner_email: string;
1429
+ readonly email_sent: boolean;
1430
+ readonly expires_at: string;
1431
+ };
1432
+ type CreatedPartnerOrganization = PartnerOrganization & {
1433
+ readonly ownership_invitation: PartnerOwnershipInvitation | null;
1434
+ };
1435
+ type PartnerUsage = {
1436
+ readonly object: "partner_usage";
1437
+ readonly period_start: string;
1438
+ readonly period_end: string;
1439
+ readonly closed_through: string | null;
1440
+ readonly active_children: number;
1441
+ readonly active_mailboxes: number;
1442
+ readonly child_active_seconds: number;
1443
+ readonly mailbox_active_seconds: number;
1444
+ readonly child_subtotal: number;
1445
+ readonly mailbox_subtotal: number;
1446
+ readonly minimum_shortfall: number;
1447
+ readonly projected_total: number;
1448
+ readonly currency: string;
1449
+ };
1450
+ type ConsumePartnerMailboxCredentialGrantParams = {
1451
+ readonly name?: string | undefined;
1452
+ readonly expires_at?: string | undefined;
1453
+ readonly allowed_cidrs?: readonly string[] | undefined;
1454
+ };
1455
+ type PartnerMailboxCredentialGrant = {
1456
+ readonly object: "partner_mailbox_credential_grant";
1457
+ readonly id: string;
1458
+ readonly partner_organization_id: string;
1459
+ readonly organization_id: string;
1460
+ readonly organization_name: string;
1461
+ readonly external_reference: string;
1462
+ readonly operator_email: string;
1463
+ readonly mailbox_id: string;
1464
+ readonly mailbox_address: string;
1465
+ readonly disclosure_version: string;
1466
+ readonly expires_at: string;
1467
+ readonly consented_at: string;
1468
+ };
1469
+ type PartnerMailboxCredentialGrantList = {
1470
+ readonly data: readonly PartnerMailboxCredentialGrant[];
1471
+ };
1472
+ type PartnerMailboxCredential = CreatedMailboxAppPassword & {
1473
+ readonly operator_notified: boolean;
1474
+ };
1475
+
1476
+ declare class Partner extends ApiResource {
1477
+ listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
1478
+ createOrganization(params: CreatePartnerOrganizationParams, options?: MethodOptions): Promise<CreatedPartnerOrganization>;
1479
+ getOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1480
+ updateOrganization(id: string, params: UpdatePartnerOrganizationParams, options?: MethodOptions): Promise<PartnerOrganization>;
1481
+ resendOwnershipInvitation(id: string, params?: {
1482
+ readonly owner_email?: string | undefined;
1483
+ }, options?: MethodOptions): Promise<PartnerOwnershipInvitation>;
1484
+ suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1485
+ resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1486
+ offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1487
+ listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
1488
+ consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
1489
+ usage(options?: MethodOptions): Promise<PartnerUsage>;
1490
+ }
1491
+
1347
1492
  declare class Status extends ApiResource {
1348
1493
  get(options?: MethodOptions): Promise<StatusResponse>;
1349
1494
  }
@@ -1492,6 +1637,7 @@ declare class ShipMailClient {
1492
1637
  private readonly timeout;
1493
1638
  private readonly fetchFn;
1494
1639
  private readonly defaultHeaders;
1640
+ private readonly organizationId;
1495
1641
  readonly audiences: Audiences;
1496
1642
  readonly bookingPages: BookingPages;
1497
1643
  readonly calendar: Calendar;
@@ -1499,6 +1645,7 @@ declare class ShipMailClient {
1499
1645
  readonly mailboxes: Mailboxes;
1500
1646
  readonly messages: Messages;
1501
1647
  readonly newsletters: Newsletters;
1648
+ readonly partner: Partner;
1502
1649
  readonly suppressions: Suppressions;
1503
1650
  readonly threads: Threads;
1504
1651
  readonly webhooks: Webhooks;
@@ -1587,4 +1734,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1587
1734
  readonly toleranceInSeconds?: number | undefined;
1588
1735
  }): Promise<WebhookEvent>;
1589
1736
 
1590
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, ConflictError, ConnectionError, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
1737
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };