shipmail 0.4.17 → 0.4.19
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.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -765,15 +765,30 @@ type CreateMailboxImportParams = {
|
|
|
765
765
|
readonly options?: MailboxImportOptions | undefined;
|
|
766
766
|
};
|
|
767
767
|
type CreateImportUploadParams = {
|
|
768
|
+
readonly provider: MailboxImportFileProvider;
|
|
768
769
|
readonly file_name: string;
|
|
769
770
|
readonly size_bytes: number;
|
|
771
|
+
readonly source_fingerprint: string;
|
|
772
|
+
};
|
|
773
|
+
type ImportUploadPart = {
|
|
774
|
+
readonly part_number: number;
|
|
775
|
+
readonly upload_url: string;
|
|
770
776
|
};
|
|
771
777
|
type ImportUpload = {
|
|
772
778
|
readonly object: "import_upload";
|
|
773
779
|
readonly file_id: string;
|
|
774
|
-
readonly
|
|
780
|
+
readonly part_size_bytes: number;
|
|
781
|
+
readonly completed_parts: readonly CompleteImportUploadPart[];
|
|
782
|
+
readonly parts: readonly ImportUploadPart[];
|
|
775
783
|
readonly expires_in_seconds: number;
|
|
776
784
|
};
|
|
785
|
+
type CompleteImportUploadPart = {
|
|
786
|
+
readonly part_number: number;
|
|
787
|
+
readonly etag: string;
|
|
788
|
+
};
|
|
789
|
+
type CompleteImportUploadParams = {
|
|
790
|
+
readonly parts: readonly CompleteImportUploadPart[];
|
|
791
|
+
};
|
|
777
792
|
|
|
778
793
|
type MessageRuleDisposition = {
|
|
779
794
|
readonly matched_rule_ids: readonly string[];
|
|
@@ -1472,6 +1487,8 @@ declare class Mailboxes extends ApiResource {
|
|
|
1472
1487
|
cancelImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1473
1488
|
undoImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1474
1489
|
createImportUpload(id: string, params: CreateImportUploadParams, options?: MethodOptions): Promise<ImportUpload>;
|
|
1490
|
+
completeImportUpload(id: string, fileId: string, params: CompleteImportUploadParams, options?: MethodOptions): Promise<void>;
|
|
1491
|
+
abortImportUpload(id: string, fileId: string, options?: MethodOptions): Promise<void>;
|
|
1475
1492
|
}
|
|
1476
1493
|
|
|
1477
1494
|
declare class Messages extends ApiResource {
|
package/dist/index.d.ts
CHANGED
|
@@ -765,15 +765,30 @@ type CreateMailboxImportParams = {
|
|
|
765
765
|
readonly options?: MailboxImportOptions | undefined;
|
|
766
766
|
};
|
|
767
767
|
type CreateImportUploadParams = {
|
|
768
|
+
readonly provider: MailboxImportFileProvider;
|
|
768
769
|
readonly file_name: string;
|
|
769
770
|
readonly size_bytes: number;
|
|
771
|
+
readonly source_fingerprint: string;
|
|
772
|
+
};
|
|
773
|
+
type ImportUploadPart = {
|
|
774
|
+
readonly part_number: number;
|
|
775
|
+
readonly upload_url: string;
|
|
770
776
|
};
|
|
771
777
|
type ImportUpload = {
|
|
772
778
|
readonly object: "import_upload";
|
|
773
779
|
readonly file_id: string;
|
|
774
|
-
readonly
|
|
780
|
+
readonly part_size_bytes: number;
|
|
781
|
+
readonly completed_parts: readonly CompleteImportUploadPart[];
|
|
782
|
+
readonly parts: readonly ImportUploadPart[];
|
|
775
783
|
readonly expires_in_seconds: number;
|
|
776
784
|
};
|
|
785
|
+
type CompleteImportUploadPart = {
|
|
786
|
+
readonly part_number: number;
|
|
787
|
+
readonly etag: string;
|
|
788
|
+
};
|
|
789
|
+
type CompleteImportUploadParams = {
|
|
790
|
+
readonly parts: readonly CompleteImportUploadPart[];
|
|
791
|
+
};
|
|
777
792
|
|
|
778
793
|
type MessageRuleDisposition = {
|
|
779
794
|
readonly matched_rule_ids: readonly string[];
|
|
@@ -1472,6 +1487,8 @@ declare class Mailboxes extends ApiResource {
|
|
|
1472
1487
|
cancelImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1473
1488
|
undoImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1474
1489
|
createImportUpload(id: string, params: CreateImportUploadParams, options?: MethodOptions): Promise<ImportUpload>;
|
|
1490
|
+
completeImportUpload(id: string, fileId: string, params: CompleteImportUploadParams, options?: MethodOptions): Promise<void>;
|
|
1491
|
+
abortImportUpload(id: string, fileId: string, options?: MethodOptions): Promise<void>;
|
|
1475
1492
|
}
|
|
1476
1493
|
|
|
1477
1494
|
declare class Messages extends ApiResource {
|
package/dist/index.js
CHANGED
|
@@ -1051,6 +1051,21 @@ var Mailboxes = class extends ApiResource {
|
|
|
1051
1051
|
methodOptions: options
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
+
completeImportUpload(id, fileId, params, options) {
|
|
1055
|
+
return this.client.request({
|
|
1056
|
+
method: "POST",
|
|
1057
|
+
path: `/mailboxes/${encodeURIComponent(id)}/imports/files/${encodeURIComponent(fileId)}/complete`,
|
|
1058
|
+
body: params,
|
|
1059
|
+
methodOptions: options
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
abortImportUpload(id, fileId, options) {
|
|
1063
|
+
return this.client.request({
|
|
1064
|
+
method: "DELETE",
|
|
1065
|
+
path: `/mailboxes/${encodeURIComponent(id)}/imports/files/${encodeURIComponent(fileId)}`,
|
|
1066
|
+
methodOptions: options
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1054
1069
|
};
|
|
1055
1070
|
|
|
1056
1071
|
// src/resources/messages.ts
|
|
@@ -1617,7 +1632,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1617
1632
|
};
|
|
1618
1633
|
|
|
1619
1634
|
// src/version.ts
|
|
1620
|
-
var VERSION = "0.4.
|
|
1635
|
+
var VERSION = "0.4.19";
|
|
1621
1636
|
|
|
1622
1637
|
// src/client.ts
|
|
1623
1638
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|