shipmail 0.5.10 → 0.6.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
@@ -20,7 +20,6 @@ type ShipmailConfig = {
20
20
  readonly timeout?: number | undefined;
21
21
  readonly fetch?: typeof fetch | undefined;
22
22
  readonly defaultHeaders?: Record<string, string> | undefined;
23
- readonly organizationId?: string | undefined;
24
23
  };
25
24
  type PaginationParams = {
26
25
  readonly cursor?: string | undefined;
@@ -60,9 +59,9 @@ type EmailRecipient = {
60
59
  readonly name?: string | null | undefined;
61
60
  };
62
61
  type EmailRecipientInput = EmailRecipient | string;
63
- declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
62
+ declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered", "reply.overdue", "conversation.needs_action", "calendar.event_starting", "booking.created"];
64
63
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
65
- declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
64
+ declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered", "reply.overdue", "conversation.needs_action", "calendar.event_starting", "booking.created"];
66
65
  type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
67
66
  type StatusResponse = {
68
67
  readonly status: string;
@@ -83,7 +82,6 @@ type MethodOptions = {
83
82
  readonly signal?: AbortSignal | undefined;
84
83
  readonly headers?: Record<string, string> | undefined;
85
84
  readonly idempotencyKey?: string | undefined;
86
- readonly organizationId?: string | undefined;
87
85
  };
88
86
  type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
89
87
 
@@ -925,6 +923,7 @@ type ScheduledMessage = {
925
923
  readonly object: "scheduled_message";
926
924
  readonly id: string;
927
925
  readonly scheduled_message_id: string;
926
+ readonly status?: "scheduled" | "settling" | undefined;
928
927
  readonly kind: "scheduled" | "undo";
929
928
  readonly mailbox_id: string;
930
929
  readonly mailbox_address: string;
@@ -1078,7 +1077,7 @@ type MailboxExport = {
1078
1077
  readonly completed_at: string | null;
1079
1078
  };
1080
1079
  type MailboxAppPasswordState = "pending_create" | "active" | "pending_revoke" | "revoked" | "failed";
1081
- type MailboxAppPasswordPurpose = "operator_client" | "partner_embedded_webmail";
1080
+ type MailboxAppPasswordPurpose = "operator_client";
1082
1081
  type MailboxAppPassword = {
1083
1082
  readonly object: "mailbox_app_password";
1084
1083
  readonly id: string;
@@ -2017,107 +2016,6 @@ declare class Newsletters extends ApiResource {
2017
2016
  resume(id: string, options?: MethodOptions): Promise<Newsletter>;
2018
2017
  }
2019
2018
 
2020
- type PartnerOrganizationStatus = "pending_owner" | "active" | "suspended" | "offboarding" | "disconnected";
2021
- type PartnerDataClassification = "internal_test" | "customer";
2022
- type PartnerOrganization = {
2023
- readonly object: "partner_organization";
2024
- readonly id: string;
2025
- readonly organization_id: string;
2026
- readonly name: string;
2027
- readonly external_reference: string;
2028
- readonly owner_email: string;
2029
- readonly owner_user_id: string | null;
2030
- readonly status: PartnerOrganizationStatus;
2031
- readonly data_classification: PartnerDataClassification;
2032
- readonly mailbox_limit: number;
2033
- readonly delegated_permissions: readonly string[];
2034
- readonly owner_accepted_at: string | null;
2035
- readonly activated_at: string | null;
2036
- readonly suspended_at: string | null;
2037
- readonly disconnected_at: string | null;
2038
- readonly created_at: string;
2039
- readonly updated_at: string;
2040
- };
2041
- type CreatePartnerOrganizationParams = {
2042
- readonly name: string;
2043
- readonly external_reference: string;
2044
- readonly owner_email: string;
2045
- readonly mailbox_limit: number;
2046
- readonly data_classification: PartnerDataClassification;
2047
- };
2048
- type UpdatePartnerOrganizationParams = {
2049
- readonly name?: string | undefined;
2050
- readonly mailbox_limit?: number | undefined;
2051
- };
2052
- type PartnerOrganizationList = {
2053
- readonly data: readonly PartnerOrganization[];
2054
- };
2055
- type PartnerOwnershipInvitation = {
2056
- readonly object: "partner_ownership_invitation";
2057
- readonly owner_email: string;
2058
- readonly email_sent: boolean;
2059
- readonly expires_at: string;
2060
- };
2061
- type CreatedPartnerOrganization = PartnerOrganization & {
2062
- readonly ownership_invitation: PartnerOwnershipInvitation | null;
2063
- };
2064
- type PartnerUsage = {
2065
- readonly object: "partner_usage";
2066
- readonly period_start: string;
2067
- readonly period_end: string;
2068
- readonly closed_through: string | null;
2069
- readonly active_children: number;
2070
- readonly active_mailboxes: number;
2071
- readonly child_active_seconds: number;
2072
- readonly mailbox_active_seconds: number;
2073
- readonly child_subtotal: number;
2074
- readonly mailbox_subtotal: number;
2075
- readonly minimum_shortfall: number;
2076
- readonly projected_total: number;
2077
- readonly currency: string;
2078
- };
2079
- type ConsumePartnerMailboxCredentialGrantParams = {
2080
- readonly name?: string | undefined;
2081
- readonly expires_at?: string | undefined;
2082
- readonly allowed_cidrs?: readonly string[] | undefined;
2083
- };
2084
- type PartnerMailboxCredentialGrant = {
2085
- readonly object: "partner_mailbox_credential_grant";
2086
- readonly id: string;
2087
- readonly partner_organization_id: string;
2088
- readonly organization_id: string;
2089
- readonly organization_name: string;
2090
- readonly external_reference: string;
2091
- readonly operator_email: string;
2092
- readonly mailbox_id: string;
2093
- readonly mailbox_address: string;
2094
- readonly disclosure_version: string;
2095
- readonly expires_at: string;
2096
- readonly consented_at: string;
2097
- };
2098
- type PartnerMailboxCredentialGrantList = {
2099
- readonly data: readonly PartnerMailboxCredentialGrant[];
2100
- };
2101
- type PartnerMailboxCredential = CreatedMailboxAppPassword & {
2102
- readonly operator_notified: boolean;
2103
- };
2104
-
2105
- declare class Partner extends ApiResource {
2106
- listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
2107
- createOrganization(params: CreatePartnerOrganizationParams, options?: MethodOptions): Promise<CreatedPartnerOrganization>;
2108
- getOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2109
- updateOrganization(id: string, params: UpdatePartnerOrganizationParams, options?: MethodOptions): Promise<PartnerOrganization>;
2110
- resendOwnershipInvitation(id: string, params?: {
2111
- readonly owner_email?: string | undefined;
2112
- }, options?: MethodOptions): Promise<PartnerOwnershipInvitation>;
2113
- suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2114
- resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2115
- offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2116
- listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
2117
- consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
2118
- usage(options?: MethodOptions): Promise<PartnerUsage>;
2119
- }
2120
-
2121
2019
  type ReplyScanStatus = "completed";
2122
2020
  type ReplyScan = {
2123
2021
  readonly object: "reply_scan";
@@ -2342,7 +2240,6 @@ declare class ShipmailClient {
2342
2240
  private readonly timeout;
2343
2241
  private readonly fetchFn;
2344
2242
  private readonly defaultHeaders;
2345
- private readonly organizationId;
2346
2243
  readonly audiences: Audiences;
2347
2244
  readonly automations: Automations;
2348
2245
  readonly bookingPages: BookingPages;
@@ -2353,7 +2250,6 @@ declare class ShipmailClient {
2353
2250
  readonly members: Members;
2354
2251
  readonly messages: Messages;
2355
2252
  readonly newsletters: Newsletters;
2356
- readonly partner: Partner;
2357
2253
  readonly replyScans: ReplyScans;
2358
2254
  readonly scheduledMessages: ScheduledMessages;
2359
2255
  readonly suppressions: Suppressions;
@@ -2455,4 +2351,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
2455
2351
  readonly toleranceInSeconds?: number | undefined;
2456
2352
  }): Promise<WebhookEvent>;
2457
2353
 
2458
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxDraftParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxDraft, type InboxDraftRecipient, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMembersParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxDeliveryDestination, type MailboxDeliveryRouting, 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 Member, type MemberRole, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnImageFit, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, 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, type PrepareNewsletterAssetUploadParams, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, ReconciliationRequiredError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, type UpdateMailboxDeliveryRoutingParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, 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 };
2354
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxDraftParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, 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 EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxDraft, type InboxDraftRecipient, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMembersParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxDeliveryDestination, type MailboxDeliveryRouting, 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 Member, type MemberRole, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnImageFit, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PrepareNewsletterAssetUploadParams, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, ReconciliationRequiredError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, type UpdateMailboxDeliveryRoutingParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateScheduledMessageParams, 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
@@ -20,7 +20,6 @@ type ShipmailConfig = {
20
20
  readonly timeout?: number | undefined;
21
21
  readonly fetch?: typeof fetch | undefined;
22
22
  readonly defaultHeaders?: Record<string, string> | undefined;
23
- readonly organizationId?: string | undefined;
24
23
  };
25
24
  type PaginationParams = {
26
25
  readonly cursor?: string | undefined;
@@ -60,9 +59,9 @@ type EmailRecipient = {
60
59
  readonly name?: string | null | undefined;
61
60
  };
62
61
  type EmailRecipientInput = EmailRecipient | string;
63
- declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
62
+ declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered", "reply.overdue", "conversation.needs_action", "calendar.event_starting", "booking.created"];
64
63
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
65
- declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
64
+ declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "mailbox.export.completed", "mailbox.export.failed", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered", "reply.overdue", "conversation.needs_action", "calendar.event_starting", "booking.created"];
66
65
  type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
67
66
  type StatusResponse = {
68
67
  readonly status: string;
@@ -83,7 +82,6 @@ type MethodOptions = {
83
82
  readonly signal?: AbortSignal | undefined;
84
83
  readonly headers?: Record<string, string> | undefined;
85
84
  readonly idempotencyKey?: string | undefined;
86
- readonly organizationId?: string | undefined;
87
85
  };
88
86
  type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
89
87
 
@@ -925,6 +923,7 @@ type ScheduledMessage = {
925
923
  readonly object: "scheduled_message";
926
924
  readonly id: string;
927
925
  readonly scheduled_message_id: string;
926
+ readonly status?: "scheduled" | "settling" | undefined;
928
927
  readonly kind: "scheduled" | "undo";
929
928
  readonly mailbox_id: string;
930
929
  readonly mailbox_address: string;
@@ -1078,7 +1077,7 @@ type MailboxExport = {
1078
1077
  readonly completed_at: string | null;
1079
1078
  };
1080
1079
  type MailboxAppPasswordState = "pending_create" | "active" | "pending_revoke" | "revoked" | "failed";
1081
- type MailboxAppPasswordPurpose = "operator_client" | "partner_embedded_webmail";
1080
+ type MailboxAppPasswordPurpose = "operator_client";
1082
1081
  type MailboxAppPassword = {
1083
1082
  readonly object: "mailbox_app_password";
1084
1083
  readonly id: string;
@@ -2017,107 +2016,6 @@ declare class Newsletters extends ApiResource {
2017
2016
  resume(id: string, options?: MethodOptions): Promise<Newsletter>;
2018
2017
  }
2019
2018
 
2020
- type PartnerOrganizationStatus = "pending_owner" | "active" | "suspended" | "offboarding" | "disconnected";
2021
- type PartnerDataClassification = "internal_test" | "customer";
2022
- type PartnerOrganization = {
2023
- readonly object: "partner_organization";
2024
- readonly id: string;
2025
- readonly organization_id: string;
2026
- readonly name: string;
2027
- readonly external_reference: string;
2028
- readonly owner_email: string;
2029
- readonly owner_user_id: string | null;
2030
- readonly status: PartnerOrganizationStatus;
2031
- readonly data_classification: PartnerDataClassification;
2032
- readonly mailbox_limit: number;
2033
- readonly delegated_permissions: readonly string[];
2034
- readonly owner_accepted_at: string | null;
2035
- readonly activated_at: string | null;
2036
- readonly suspended_at: string | null;
2037
- readonly disconnected_at: string | null;
2038
- readonly created_at: string;
2039
- readonly updated_at: string;
2040
- };
2041
- type CreatePartnerOrganizationParams = {
2042
- readonly name: string;
2043
- readonly external_reference: string;
2044
- readonly owner_email: string;
2045
- readonly mailbox_limit: number;
2046
- readonly data_classification: PartnerDataClassification;
2047
- };
2048
- type UpdatePartnerOrganizationParams = {
2049
- readonly name?: string | undefined;
2050
- readonly mailbox_limit?: number | undefined;
2051
- };
2052
- type PartnerOrganizationList = {
2053
- readonly data: readonly PartnerOrganization[];
2054
- };
2055
- type PartnerOwnershipInvitation = {
2056
- readonly object: "partner_ownership_invitation";
2057
- readonly owner_email: string;
2058
- readonly email_sent: boolean;
2059
- readonly expires_at: string;
2060
- };
2061
- type CreatedPartnerOrganization = PartnerOrganization & {
2062
- readonly ownership_invitation: PartnerOwnershipInvitation | null;
2063
- };
2064
- type PartnerUsage = {
2065
- readonly object: "partner_usage";
2066
- readonly period_start: string;
2067
- readonly period_end: string;
2068
- readonly closed_through: string | null;
2069
- readonly active_children: number;
2070
- readonly active_mailboxes: number;
2071
- readonly child_active_seconds: number;
2072
- readonly mailbox_active_seconds: number;
2073
- readonly child_subtotal: number;
2074
- readonly mailbox_subtotal: number;
2075
- readonly minimum_shortfall: number;
2076
- readonly projected_total: number;
2077
- readonly currency: string;
2078
- };
2079
- type ConsumePartnerMailboxCredentialGrantParams = {
2080
- readonly name?: string | undefined;
2081
- readonly expires_at?: string | undefined;
2082
- readonly allowed_cidrs?: readonly string[] | undefined;
2083
- };
2084
- type PartnerMailboxCredentialGrant = {
2085
- readonly object: "partner_mailbox_credential_grant";
2086
- readonly id: string;
2087
- readonly partner_organization_id: string;
2088
- readonly organization_id: string;
2089
- readonly organization_name: string;
2090
- readonly external_reference: string;
2091
- readonly operator_email: string;
2092
- readonly mailbox_id: string;
2093
- readonly mailbox_address: string;
2094
- readonly disclosure_version: string;
2095
- readonly expires_at: string;
2096
- readonly consented_at: string;
2097
- };
2098
- type PartnerMailboxCredentialGrantList = {
2099
- readonly data: readonly PartnerMailboxCredentialGrant[];
2100
- };
2101
- type PartnerMailboxCredential = CreatedMailboxAppPassword & {
2102
- readonly operator_notified: boolean;
2103
- };
2104
-
2105
- declare class Partner extends ApiResource {
2106
- listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
2107
- createOrganization(params: CreatePartnerOrganizationParams, options?: MethodOptions): Promise<CreatedPartnerOrganization>;
2108
- getOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2109
- updateOrganization(id: string, params: UpdatePartnerOrganizationParams, options?: MethodOptions): Promise<PartnerOrganization>;
2110
- resendOwnershipInvitation(id: string, params?: {
2111
- readonly owner_email?: string | undefined;
2112
- }, options?: MethodOptions): Promise<PartnerOwnershipInvitation>;
2113
- suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2114
- resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2115
- offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
2116
- listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
2117
- consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
2118
- usage(options?: MethodOptions): Promise<PartnerUsage>;
2119
- }
2120
-
2121
2019
  type ReplyScanStatus = "completed";
2122
2020
  type ReplyScan = {
2123
2021
  readonly object: "reply_scan";
@@ -2342,7 +2240,6 @@ declare class ShipmailClient {
2342
2240
  private readonly timeout;
2343
2241
  private readonly fetchFn;
2344
2242
  private readonly defaultHeaders;
2345
- private readonly organizationId;
2346
2243
  readonly audiences: Audiences;
2347
2244
  readonly automations: Automations;
2348
2245
  readonly bookingPages: BookingPages;
@@ -2353,7 +2250,6 @@ declare class ShipmailClient {
2353
2250
  readonly members: Members;
2354
2251
  readonly messages: Messages;
2355
2252
  readonly newsletters: Newsletters;
2356
- readonly partner: Partner;
2357
2253
  readonly replyScans: ReplyScans;
2358
2254
  readonly scheduledMessages: ScheduledMessages;
2359
2255
  readonly suppressions: Suppressions;
@@ -2455,4 +2351,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
2455
2351
  readonly toleranceInSeconds?: number | undefined;
2456
2352
  }): Promise<WebhookEvent>;
2457
2353
 
2458
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxDraftParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxDraft, type InboxDraftRecipient, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMembersParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxDeliveryDestination, type MailboxDeliveryRouting, 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 Member, type MemberRole, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnImageFit, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, 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, type PrepareNewsletterAssetUploadParams, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, ReconciliationRequiredError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, type UpdateMailboxDeliveryRoutingParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, 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 };
2354
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxDraftParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, 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 EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxDraft, type InboxDraftRecipient, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMembersParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxDeliveryDestination, type MailboxDeliveryRouting, 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 Member, type MemberRole, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnImageFit, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PrepareNewsletterAssetUploadParams, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, ReconciliationRequiredError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, type UpdateMailboxDeliveryRoutingParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateScheduledMessageParams, 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.js CHANGED
@@ -32,15 +32,10 @@ var API_KEY_SCOPES = [
32
32
  "webhooks:read",
33
33
  "webhooks:write",
34
34
  "suppressions:read",
35
- "suppressions:write",
36
- "partner:organizations:read",
37
- "partner:organizations:write",
38
- "partner:organizations:access",
39
- "partner:mailbox_credentials:issue",
40
- "partner:usage:read"
35
+ "suppressions:write"
41
36
  ];
42
37
  var API_KEY_SCOPE_DESCRIPTIONS = {
43
- "*": "All non-partner API endpoints in this organization.",
38
+ "*": "All API endpoints in this organization.",
44
39
  "audiences:read": "List and retrieve newsletter audiences and their subscribers.",
45
40
  "audiences:write": "Create audiences and add, update, or remove their subscribers.",
46
41
  "automations:read": "List and retrieve assistant automations.",
@@ -72,19 +67,13 @@ var API_KEY_SCOPE_DESCRIPTIONS = {
72
67
  "webhooks:read": "List webhooks, retrieve webhooks, and list deliveries.",
73
68
  "webhooks:write": "Create, update, delete, test, and rotate webhooks.",
74
69
  "suppressions:read": "List suppressed recipient addresses.",
75
- "suppressions:write": "Remove addresses from the suppression list.",
76
- "partner:organizations:read": "List and retrieve this partner's child organizations.",
77
- "partner:organizations:write": "Create and manage this partner's child organizations.",
78
- "partner:organizations:access": "Act on an active child using the delegated organization header.",
79
- "partner:mailbox_credentials:issue": "List and consume operator-approved grants for embedded-webmail credentials.",
80
- "partner:usage:read": "Read consolidated child and mailbox usage for this partner."
70
+ "suppressions:write": "Remove addresses from the suppression list."
81
71
  };
82
72
  function isApiKeyScope(value) {
83
73
  return API_KEY_SCOPES.some((scope) => scope === value);
84
74
  }
85
75
  function apiKeyScopesGrant(grantedScopes, requiredScope) {
86
76
  if (requiredScope === "public") return true;
87
- if (requiredScope.startsWith("partner:")) return grantedScopes.includes(requiredScope);
88
77
  return grantedScopes.includes("*") || grantedScopes.includes(requiredScope);
89
78
  }
90
79
 
@@ -1377,87 +1366,6 @@ var Newsletters = class extends ApiResource {
1377
1366
  }
1378
1367
  };
1379
1368
 
1380
- // src/resources/partner.ts
1381
- var Partner = class extends ApiResource {
1382
- listOrganizations(options) {
1383
- return this.client.request({
1384
- method: "GET",
1385
- path: "/partner/organizations",
1386
- methodOptions: options
1387
- });
1388
- }
1389
- createOrganization(params, options) {
1390
- return this.client.request({
1391
- method: "POST",
1392
- path: "/partner/organizations",
1393
- body: params,
1394
- methodOptions: options
1395
- });
1396
- }
1397
- getOrganization(id, options) {
1398
- return this.client.request({
1399
- method: "GET",
1400
- path: `/partner/organizations/${encodeURIComponent(id)}`,
1401
- methodOptions: options
1402
- });
1403
- }
1404
- updateOrganization(id, params, options) {
1405
- return this.client.request({
1406
- method: "PATCH",
1407
- path: `/partner/organizations/${encodeURIComponent(id)}`,
1408
- body: params,
1409
- methodOptions: options
1410
- });
1411
- }
1412
- resendOwnershipInvitation(id, params = {}, options) {
1413
- return this.client.request({
1414
- method: "POST",
1415
- path: `/partner/organizations/${encodeURIComponent(id)}/ownership-invitations`,
1416
- body: params,
1417
- methodOptions: options
1418
- });
1419
- }
1420
- suspendOrganization(id, options) {
1421
- return this.client.request({
1422
- method: "POST",
1423
- path: `/partner/organizations/${encodeURIComponent(id)}/suspend`,
1424
- methodOptions: options
1425
- });
1426
- }
1427
- resumeOrganization(id, options) {
1428
- return this.client.request({
1429
- method: "POST",
1430
- path: `/partner/organizations/${encodeURIComponent(id)}/resume`,
1431
- methodOptions: options
1432
- });
1433
- }
1434
- offboardOrganization(id, options) {
1435
- return this.client.request({
1436
- method: "DELETE",
1437
- path: `/partner/organizations/${encodeURIComponent(id)}`,
1438
- methodOptions: options
1439
- });
1440
- }
1441
- listMailboxCredentialGrants(options) {
1442
- return this.client.request({
1443
- method: "GET",
1444
- path: "/partner/mailbox-credential-grants",
1445
- methodOptions: options
1446
- });
1447
- }
1448
- consumeMailboxCredentialGrant(grantId, params = {}, options) {
1449
- return this.client.request({
1450
- method: "POST",
1451
- path: `/partner/mailbox-credential-grants/${encodeURIComponent(grantId)}/consume`,
1452
- body: params,
1453
- methodOptions: options
1454
- });
1455
- }
1456
- usage(options) {
1457
- return this.client.request({ method: "GET", path: "/partner/usage", methodOptions: options });
1458
- }
1459
- };
1460
-
1461
1369
  // src/resources/reply-scans.ts
1462
1370
  var ReplyScans = class extends ApiResource {
1463
1371
  create(params, options) {
@@ -1706,7 +1614,7 @@ var Webhooks = class extends ApiResource {
1706
1614
  };
1707
1615
 
1708
1616
  // src/version.ts
1709
- var VERSION = "0.5.10";
1617
+ var VERSION = "0.6.0";
1710
1618
 
1711
1619
  // src/client.ts
1712
1620
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1758,7 +1666,6 @@ var ShipmailClient = class {
1758
1666
  this.timeout = DEFAULT_TIMEOUT;
1759
1667
  this.fetchFn = globalThis.fetch;
1760
1668
  this.defaultHeaders = {};
1761
- this.organizationId = void 0;
1762
1669
  } else {
1763
1670
  this.apiKey = config.apiKey;
1764
1671
  this.baseUrl = config.baseUrl ?? DEFAULT_BASE_URL;
@@ -1766,7 +1673,6 @@ var ShipmailClient = class {
1766
1673
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT;
1767
1674
  this.fetchFn = config.fetch ?? globalThis.fetch;
1768
1675
  this.defaultHeaders = config.defaultHeaders ? { ...config.defaultHeaders } : {};
1769
- this.organizationId = config.organizationId;
1770
1676
  }
1771
1677
  if (!Number.isSafeInteger(this.maxRetries) || this.maxRetries < 0) {
1772
1678
  throw new RangeError("maxRetries must be a non-negative safe integer");
@@ -1781,7 +1687,6 @@ var ShipmailClient = class {
1781
1687
  this.members = new Members(this);
1782
1688
  this.messages = new Messages(this);
1783
1689
  this.newsletters = new Newsletters(this);
1784
- this.partner = new Partner(this);
1785
1690
  this.replyScans = new ReplyScans(this);
1786
1691
  this.scheduledMessages = new ScheduledMessages(this);
1787
1692
  this.suppressions = new Suppressions(this);
@@ -1828,10 +1733,6 @@ var ShipmailClient = class {
1828
1733
  if (methodOpts?.idempotencyKey) {
1829
1734
  headers["Idempotency-Key"] = methodOpts.idempotencyKey;
1830
1735
  }
1831
- const targetOrganizationId = methodOpts?.organizationId ?? this.organizationId;
1832
- if (targetOrganizationId) {
1833
- headers["X-Shipmail-Organization-Id"] = targetOrganizationId;
1834
- }
1835
1736
  let body = null;
1836
1737
  if (options.rawBody !== void 0) {
1837
1738
  headers["Content-Type"] = options.contentType ?? "application/octet-stream";
@@ -1917,7 +1818,11 @@ var WEBHOOK_EVENT_TYPES = [
1917
1818
  "org.reputation_warning",
1918
1819
  "org.sending_throttled",
1919
1820
  "org.sending_suspended",
1920
- "org.reputation_recovered"
1821
+ "org.reputation_recovered",
1822
+ "reply.overdue",
1823
+ "conversation.needs_action",
1824
+ "calendar.event_starting",
1825
+ "booking.created"
1921
1826
  ];
1922
1827
  var WEBHOOK_DELIVERY_EVENT_TYPES = ["webhook.test", ...WEBHOOK_EVENT_TYPES];
1923
1828
  var DOMAIN_STATUSES = ["pending", "verifying", "verified", "degraded", "failed"];