shipmail 0.1.33 → 0.2.1

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
@@ -78,6 +78,7 @@ type MethodOptions = {
78
78
  readonly idempotencyKey?: string | undefined;
79
79
  readonly organizationId?: string | undefined;
80
80
  };
81
+ type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
81
82
 
82
83
  type MergeFields = Record<string, string | number | boolean | null>;
83
84
  type SubscriberStatus = "subscribed" | "pending" | "unsubscribed" | "bounced" | "complained" | "suppressed" | "transactional_only";
@@ -499,9 +500,9 @@ declare class Domains extends ApiResource {
499
500
 
500
501
  declare const MAILBOX_IMPORT_STATUSES: readonly ["queued", "running", "paused_throttle", "paused_quota", "completed", "failed", "cancelled", "undo_queued", "undoing", "undone", "undo_failed"];
501
502
  type MailboxImportStatus = (typeof MAILBOX_IMPORT_STATUSES)[number];
502
- declare const MAILBOX_IMPORT_PROVIDERS: readonly ["gmail", "outlook", "yahoo", "aol", "icloud", "fastmail", "zoho", "imap", "takeout", "proton", "tuta", "file"];
503
+ declare const MAILBOX_IMPORT_PROVIDERS: readonly ["gmail", "outlook", "yahoo", "aol", "icloud", "fastmail", "zoho", "infomaniak", "ovh", "gandi", "imap", "takeout", "proton", "tuta", "file"];
503
504
  type MailboxImportProvider = (typeof MAILBOX_IMPORT_PROVIDERS)[number];
504
- declare const MAILBOX_IMPORT_IMAP_PROVIDERS: readonly ["gmail", "yahoo", "aol", "icloud", "fastmail", "zoho", "imap"];
505
+ declare const MAILBOX_IMPORT_IMAP_PROVIDERS: readonly ["gmail", "yahoo", "aol", "icloud", "fastmail", "zoho", "infomaniak", "ovh", "gandi", "imap"];
505
506
  type MailboxImportImapProvider = (typeof MAILBOX_IMPORT_IMAP_PROVIDERS)[number];
506
507
  declare const MAILBOX_IMPORT_FILE_PROVIDERS: readonly ["takeout", "proton", "tuta", "file"];
507
508
  type MailboxImportFileProvider = (typeof MAILBOX_IMPORT_FILE_PROVIDERS)[number];
@@ -632,6 +633,33 @@ type MailboxExport = {
632
633
  readonly started_at: string | null;
633
634
  readonly completed_at: string | null;
634
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
+ };
635
663
  type MailboxFolder = {
636
664
  readonly object: "mailbox_folder";
637
665
  readonly id: string;
@@ -1001,6 +1029,9 @@ declare class Mailboxes extends ApiResource {
1001
1029
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
1002
1030
  downloadInboxAttachment(id: string, params: DownloadInboxAttachmentParams, options?: MethodOptions): Promise<Uint8Array>;
1003
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>;
1004
1035
  getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
1005
1036
  updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
1006
1037
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
@@ -1416,6 +1447,31 @@ type PartnerUsage = {
1416
1447
  readonly projected_total: number;
1417
1448
  readonly currency: string;
1418
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
+ };
1419
1475
 
1420
1476
  declare class Partner extends ApiResource {
1421
1477
  listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
@@ -1428,6 +1484,8 @@ declare class Partner extends ApiResource {
1428
1484
  suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1429
1485
  resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1430
1486
  offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1487
+ listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
1488
+ consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
1431
1489
  usage(options?: MethodOptions): Promise<PartnerUsage>;
1432
1490
  }
1433
1491
 
@@ -1676,4 +1734,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1676
1734
  readonly toleranceInSeconds?: number | undefined;
1677
1735
  }): Promise<WebhookEvent>;
1678
1736
 
1679
- 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 CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateWebhookParams, 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 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, type PartnerDataClassification, 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 };
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
@@ -78,6 +78,7 @@ type MethodOptions = {
78
78
  readonly idempotencyKey?: string | undefined;
79
79
  readonly organizationId?: string | undefined;
80
80
  };
81
+ type OneTimeSecretMethodOptions = Omit<MethodOptions, "idempotencyKey">;
81
82
 
82
83
  type MergeFields = Record<string, string | number | boolean | null>;
83
84
  type SubscriberStatus = "subscribed" | "pending" | "unsubscribed" | "bounced" | "complained" | "suppressed" | "transactional_only";
@@ -499,9 +500,9 @@ declare class Domains extends ApiResource {
499
500
 
500
501
  declare const MAILBOX_IMPORT_STATUSES: readonly ["queued", "running", "paused_throttle", "paused_quota", "completed", "failed", "cancelled", "undo_queued", "undoing", "undone", "undo_failed"];
501
502
  type MailboxImportStatus = (typeof MAILBOX_IMPORT_STATUSES)[number];
502
- declare const MAILBOX_IMPORT_PROVIDERS: readonly ["gmail", "outlook", "yahoo", "aol", "icloud", "fastmail", "zoho", "imap", "takeout", "proton", "tuta", "file"];
503
+ declare const MAILBOX_IMPORT_PROVIDERS: readonly ["gmail", "outlook", "yahoo", "aol", "icloud", "fastmail", "zoho", "infomaniak", "ovh", "gandi", "imap", "takeout", "proton", "tuta", "file"];
503
504
  type MailboxImportProvider = (typeof MAILBOX_IMPORT_PROVIDERS)[number];
504
- declare const MAILBOX_IMPORT_IMAP_PROVIDERS: readonly ["gmail", "yahoo", "aol", "icloud", "fastmail", "zoho", "imap"];
505
+ declare const MAILBOX_IMPORT_IMAP_PROVIDERS: readonly ["gmail", "yahoo", "aol", "icloud", "fastmail", "zoho", "infomaniak", "ovh", "gandi", "imap"];
505
506
  type MailboxImportImapProvider = (typeof MAILBOX_IMPORT_IMAP_PROVIDERS)[number];
506
507
  declare const MAILBOX_IMPORT_FILE_PROVIDERS: readonly ["takeout", "proton", "tuta", "file"];
507
508
  type MailboxImportFileProvider = (typeof MAILBOX_IMPORT_FILE_PROVIDERS)[number];
@@ -632,6 +633,33 @@ type MailboxExport = {
632
633
  readonly started_at: string | null;
633
634
  readonly completed_at: string | null;
634
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
+ };
635
663
  type MailboxFolder = {
636
664
  readonly object: "mailbox_folder";
637
665
  readonly id: string;
@@ -1001,6 +1029,9 @@ declare class Mailboxes extends ApiResource {
1001
1029
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
1002
1030
  downloadInboxAttachment(id: string, params: DownloadInboxAttachmentParams, options?: MethodOptions): Promise<Uint8Array>;
1003
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>;
1004
1035
  getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
1005
1036
  updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
1006
1037
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
@@ -1416,6 +1447,31 @@ type PartnerUsage = {
1416
1447
  readonly projected_total: number;
1417
1448
  readonly currency: string;
1418
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
+ };
1419
1475
 
1420
1476
  declare class Partner extends ApiResource {
1421
1477
  listOrganizations(options?: MethodOptions): Promise<PartnerOrganizationList>;
@@ -1428,6 +1484,8 @@ declare class Partner extends ApiResource {
1428
1484
  suspendOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1429
1485
  resumeOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1430
1486
  offboardOrganization(id: string, options?: MethodOptions): Promise<PartnerOrganization>;
1487
+ listMailboxCredentialGrants(options?: MethodOptions): Promise<PartnerMailboxCredentialGrantList>;
1488
+ consumeMailboxCredentialGrant(grantId: string, params?: ConsumePartnerMailboxCredentialGrantParams, options?: OneTimeSecretMethodOptions): Promise<PartnerMailboxCredential>;
1431
1489
  usage(options?: MethodOptions): Promise<PartnerUsage>;
1432
1490
  }
1433
1491
 
@@ -1676,4 +1734,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1676
1734
  readonly toleranceInSeconds?: number | undefined;
1677
1735
  }): Promise<WebhookEvent>;
1678
1736
 
1679
- 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 CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateWebhookParams, 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 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, type PartnerDataClassification, 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 };
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.js CHANGED
@@ -677,6 +677,28 @@ var Mailboxes = class extends ApiResource {
677
677
  methodOptions: options
678
678
  });
679
679
  }
680
+ listAppPasswords(id, options) {
681
+ return this.client.request({
682
+ method: "GET",
683
+ path: `/mailboxes/${encodeURIComponent(id)}/app-passwords`,
684
+ methodOptions: options
685
+ });
686
+ }
687
+ createAppPassword(id, params, options) {
688
+ return this.client.request({
689
+ method: "POST",
690
+ path: `/mailboxes/${encodeURIComponent(id)}/app-passwords`,
691
+ body: params,
692
+ methodOptions: options
693
+ });
694
+ }
695
+ revokeAppPassword(id, appPasswordId, options) {
696
+ return this.client.request({
697
+ method: "DELETE",
698
+ path: `/mailboxes/${encodeURIComponent(id)}/app-passwords/${encodeURIComponent(appPasswordId)}`,
699
+ methodOptions: options
700
+ });
701
+ }
680
702
  getRules(id, options) {
681
703
  return this.client.request({
682
704
  method: "GET",
@@ -1035,6 +1057,21 @@ var Partner = class extends ApiResource {
1035
1057
  methodOptions: options
1036
1058
  });
1037
1059
  }
1060
+ listMailboxCredentialGrants(options) {
1061
+ return this.client.request({
1062
+ method: "GET",
1063
+ path: "/partner/mailbox-credential-grants",
1064
+ methodOptions: options
1065
+ });
1066
+ }
1067
+ consumeMailboxCredentialGrant(grantId, params = {}, options) {
1068
+ return this.client.request({
1069
+ method: "POST",
1070
+ path: `/partner/mailbox-credential-grants/${encodeURIComponent(grantId)}/consume`,
1071
+ body: params,
1072
+ methodOptions: options
1073
+ });
1074
+ }
1038
1075
  usage(options) {
1039
1076
  return this.client.request({ method: "GET", path: "/partner/usage", methodOptions: options });
1040
1077
  }
@@ -1222,7 +1259,7 @@ var Webhooks = class extends ApiResource {
1222
1259
  };
1223
1260
 
1224
1261
  // src/version.ts
1225
- var VERSION = "0.1.33";
1262
+ var VERSION = "0.2.1";
1226
1263
 
1227
1264
  // src/client.ts
1228
1265
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";