shipmail 0.2.0 → 0.2.2

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
@@ -500,9 +500,9 @@ declare class Domains extends ApiResource {
500
500
 
501
501
  declare const MAILBOX_IMPORT_STATUSES: readonly ["queued", "running", "paused_throttle", "paused_quota", "completed", "failed", "cancelled", "undo_queued", "undoing", "undone", "undo_failed"];
502
502
  type MailboxImportStatus = (typeof MAILBOX_IMPORT_STATUSES)[number];
503
- 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", "titan", "namecheap", "migadu", "gmx", "mail_com", "mailbox_org", "mxroute", "infomaniak", "ovh", "gandi", "imap", "takeout", "proton", "tuta", "file"];
504
504
  type MailboxImportProvider = (typeof MAILBOX_IMPORT_PROVIDERS)[number];
505
- 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", "titan", "namecheap", "migadu", "gmx", "mail_com", "mailbox_org", "mxroute", "infomaniak", "ovh", "gandi", "imap"];
506
506
  type MailboxImportImapProvider = (typeof MAILBOX_IMPORT_IMAP_PROVIDERS)[number];
507
507
  declare const MAILBOX_IMPORT_FILE_PROVIDERS: readonly ["takeout", "proton", "tuta", "file"];
508
508
  type MailboxImportFileProvider = (typeof MAILBOX_IMPORT_FILE_PROVIDERS)[number];
@@ -1024,6 +1024,8 @@ declare class Mailboxes extends ApiResource {
1024
1024
  listIdentities(id: string, options?: MethodOptions): Promise<MailboxIdentities>;
1025
1025
  listInboxMessages(id: string, params?: ListInboxMessagesParams, options?: MethodOptions): Promise<InboxMessages>;
1026
1026
  getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
1027
+ replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1028
+ replyToInboxThread(id: string, threadId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1027
1029
  updateInboxMessage(id: string, messageId: string, params: UpdateInboxMessageParams, options?: MethodOptions): Promise<InboxMessageAction>;
1028
1030
  moveInboxMessage(id: string, messageId: string, params: MoveInboxMessageParams, options?: MethodOptions): Promise<InboxMessageAction>;
1029
1031
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
@@ -1523,11 +1525,14 @@ type Thread = {
1523
1525
  type ListThreadsParams = PaginationParams & {
1524
1526
  readonly mailbox_id: string;
1525
1527
  };
1526
- type GetThreadParams = PaginationParams;
1528
+ type GetThreadParams = PaginationParams & {
1529
+ readonly mailbox_id: string;
1530
+ };
1527
1531
  type ReplyToThreadParams = {
1532
+ readonly mailbox_id: string;
1533
+ readonly to: readonly EmailRecipientInput[];
1528
1534
  readonly html?: string | undefined;
1529
1535
  readonly text?: string | undefined;
1530
- readonly to?: readonly EmailRecipientInput[] | undefined;
1531
1536
  readonly cc?: readonly EmailRecipientInput[] | undefined;
1532
1537
  readonly scheduled_at?: string | undefined;
1533
1538
  readonly sandbox_outcome?: SandboxOutcome | undefined;
@@ -1536,7 +1541,7 @@ type ReplyToThreadParams = {
1536
1541
  declare class Threads extends ApiResource {
1537
1542
  list(params: ListThreadsParams, options?: MethodOptions): Promise<PaginatedResponse<Thread>>;
1538
1543
  listAutoPaginating(params: Omit<ListThreadsParams, "cursor">): Page<Thread>;
1539
- get(id: string, params?: GetThreadParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1544
+ get(id: string, params: GetThreadParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1540
1545
  reply(id: string, params: ReplyToThreadParams, options?: MethodOptions): Promise<Message>;
1541
1546
  }
1542
1547
 
package/dist/index.d.ts CHANGED
@@ -500,9 +500,9 @@ declare class Domains extends ApiResource {
500
500
 
501
501
  declare const MAILBOX_IMPORT_STATUSES: readonly ["queued", "running", "paused_throttle", "paused_quota", "completed", "failed", "cancelled", "undo_queued", "undoing", "undone", "undo_failed"];
502
502
  type MailboxImportStatus = (typeof MAILBOX_IMPORT_STATUSES)[number];
503
- 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", "titan", "namecheap", "migadu", "gmx", "mail_com", "mailbox_org", "mxroute", "infomaniak", "ovh", "gandi", "imap", "takeout", "proton", "tuta", "file"];
504
504
  type MailboxImportProvider = (typeof MAILBOX_IMPORT_PROVIDERS)[number];
505
- 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", "titan", "namecheap", "migadu", "gmx", "mail_com", "mailbox_org", "mxroute", "infomaniak", "ovh", "gandi", "imap"];
506
506
  type MailboxImportImapProvider = (typeof MAILBOX_IMPORT_IMAP_PROVIDERS)[number];
507
507
  declare const MAILBOX_IMPORT_FILE_PROVIDERS: readonly ["takeout", "proton", "tuta", "file"];
508
508
  type MailboxImportFileProvider = (typeof MAILBOX_IMPORT_FILE_PROVIDERS)[number];
@@ -1024,6 +1024,8 @@ declare class Mailboxes extends ApiResource {
1024
1024
  listIdentities(id: string, options?: MethodOptions): Promise<MailboxIdentities>;
1025
1025
  listInboxMessages(id: string, params?: ListInboxMessagesParams, options?: MethodOptions): Promise<InboxMessages>;
1026
1026
  getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
1027
+ replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1028
+ replyToInboxThread(id: string, threadId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1027
1029
  updateInboxMessage(id: string, messageId: string, params: UpdateInboxMessageParams, options?: MethodOptions): Promise<InboxMessageAction>;
1028
1030
  moveInboxMessage(id: string, messageId: string, params: MoveInboxMessageParams, options?: MethodOptions): Promise<InboxMessageAction>;
1029
1031
  deleteInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<void>;
@@ -1523,11 +1525,14 @@ type Thread = {
1523
1525
  type ListThreadsParams = PaginationParams & {
1524
1526
  readonly mailbox_id: string;
1525
1527
  };
1526
- type GetThreadParams = PaginationParams;
1528
+ type GetThreadParams = PaginationParams & {
1529
+ readonly mailbox_id: string;
1530
+ };
1527
1531
  type ReplyToThreadParams = {
1532
+ readonly mailbox_id: string;
1533
+ readonly to: readonly EmailRecipientInput[];
1528
1534
  readonly html?: string | undefined;
1529
1535
  readonly text?: string | undefined;
1530
- readonly to?: readonly EmailRecipientInput[] | undefined;
1531
1536
  readonly cc?: readonly EmailRecipientInput[] | undefined;
1532
1537
  readonly scheduled_at?: string | undefined;
1533
1538
  readonly sandbox_outcome?: SandboxOutcome | undefined;
@@ -1536,7 +1541,7 @@ type ReplyToThreadParams = {
1536
1541
  declare class Threads extends ApiResource {
1537
1542
  list(params: ListThreadsParams, options?: MethodOptions): Promise<PaginatedResponse<Thread>>;
1538
1543
  listAutoPaginating(params: Omit<ListThreadsParams, "cursor">): Page<Thread>;
1539
- get(id: string, params?: GetThreadParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1544
+ get(id: string, params: GetThreadParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1540
1545
  reply(id: string, params: ReplyToThreadParams, options?: MethodOptions): Promise<Message>;
1541
1546
  }
1542
1547
 
package/dist/index.js CHANGED
@@ -635,6 +635,22 @@ var Mailboxes = class extends ApiResource {
635
635
  methodOptions: options
636
636
  });
637
637
  }
638
+ replyToInboxMessage(id, messageId, params, options) {
639
+ return this.client.request({
640
+ method: "POST",
641
+ path: `/mailboxes/${encodeURIComponent(id)}/inbox/messages/${encodeURIComponent(messageId)}/reply`,
642
+ body: params,
643
+ methodOptions: options
644
+ });
645
+ }
646
+ replyToInboxThread(id, threadId, params, options) {
647
+ return this.client.request({
648
+ method: "POST",
649
+ path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads/${encodeURIComponent(threadId)}/reply`,
650
+ body: params,
651
+ methodOptions: options
652
+ });
653
+ }
638
654
  updateInboxMessage(id, messageId, params, options) {
639
655
  return this.client.request({
640
656
  method: "PATCH",
@@ -1140,8 +1156,9 @@ var Threads = class extends ApiResource {
1140
1156
  method: "GET",
1141
1157
  path: `/threads/${encodeURIComponent(id)}`,
1142
1158
  query: {
1143
- cursor: params?.cursor,
1144
- limit: params?.limit
1159
+ mailbox_id: params.mailbox_id,
1160
+ cursor: params.cursor,
1161
+ limit: params.limit
1145
1162
  },
1146
1163
  methodOptions: options
1147
1164
  });
@@ -1259,7 +1276,7 @@ var Webhooks = class extends ApiResource {
1259
1276
  };
1260
1277
 
1261
1278
  // src/version.ts
1262
- var VERSION = "0.2.0";
1279
+ var VERSION = "0.2.2";
1263
1280
 
1264
1281
  // src/client.ts
1265
1282
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";