@bytescale/sdk 1.0.0-alpha.2 → 1.0.0-alpha.4
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/browser/cjs/{_96d8.main.js → _70b2.main.js} +2 -2
- package/dist/browser/cjs/{_9d47.main.js → _7392.main.js} +2 -2
- package/dist/browser/cjs/main.js +499 -1863
- package/dist/node/cjs/main.js +497 -1861
- package/dist/node/esm/main.mjs +499 -1910
- package/dist/types/generated/apis/FileApi.d.ts +98 -0
- package/dist/types/{gen → generated}/apis/FolderApi.d.ts +8 -36
- package/dist/types/{gen → generated}/apis/JobApi.d.ts +4 -16
- package/dist/types/{gen → generated}/apis/UploadApi.d.ts +6 -26
- package/dist/types/{gen → generated}/models/index.d.ts +41 -201
- package/dist/types/{gen → generated}/runtime.d.ts +8 -78
- package/dist/types/index.d.ts +2 -2
- package/dist/types/{utils → uploads}/NodeUtils.d.ts +1 -1
- package/dist/types/{utils → uploads}/UploadManager.d.ts +4 -4
- package/dist/types/{utils/Model.d.ts → uploads/UploadModel.d.ts} +1 -1
- package/dist/types/{utils → uploads}/index.d.ts +1 -1
- package/package.json +2 -2
- package/tests/ChunkedStream.test.ts +1 -1
- package/tests/UploadManager.test.ts +3 -3
- package/dist/types/gen/apis/FileApi.d.ts +0 -135
- /package/dist/types/{gen → generated}/apis/index.d.ts +0 -0
- /package/dist/types/{gen → generated}/index.d.ts +0 -0
- /package/dist/types/{utils → uploads}/ChunkedStream.d.ts +0 -0
|
@@ -12,29 +12,12 @@
|
|
|
12
12
|
* As such, the "Created" state is an internal detail, and we never expose jobs in this state to the user.
|
|
13
13
|
* @export
|
|
14
14
|
*/
|
|
15
|
-
export declare
|
|
16
|
-
readonly Created: "Created";
|
|
17
|
-
readonly Pending: "Pending";
|
|
18
|
-
readonly Running: "Running";
|
|
19
|
-
readonly Rollback: "Rollback";
|
|
20
|
-
readonly Failed: "Failed";
|
|
21
|
-
readonly Succeeded: "Succeeded";
|
|
22
|
-
readonly Cancelling: "Cancelling";
|
|
23
|
-
readonly Cancelled: "Cancelled";
|
|
24
|
-
};
|
|
25
|
-
export declare type AccountJobStatus = typeof AccountJobStatus[keyof typeof AccountJobStatus];
|
|
15
|
+
export declare type AccountJobStatus = "Created" | "Pending" | "Running" | "Rollback" | "Failed" | "Succeeded" | "Cancelling" | "Cancelled";
|
|
26
16
|
/**
|
|
27
17
|
* Job type.
|
|
28
18
|
* @export
|
|
29
19
|
*/
|
|
30
|
-
export declare
|
|
31
|
-
readonly ProcessFileJob: "ProcessFileJob";
|
|
32
|
-
readonly DeleteFolderBatchJob: "DeleteFolderBatchJob";
|
|
33
|
-
readonly DeleteFileBatchJob: "DeleteFileBatchJob";
|
|
34
|
-
readonly CopyFolderBatchJob: "CopyFolderBatchJob";
|
|
35
|
-
readonly CopyFileBatchJob: "CopyFileBatchJob";
|
|
36
|
-
};
|
|
37
|
-
export declare type AccountJobType = typeof AccountJobType[keyof typeof AccountJobType];
|
|
20
|
+
export declare type AccountJobType = "ProcessFileJob" | "DeleteFolderBatchJob" | "DeleteFileBatchJob" | "CopyFolderBatchJob" | "CopyFileBatchJob";
|
|
38
21
|
/**
|
|
39
22
|
* Response body from an API endpoint that performs work asynchronously (i.e. does not complete the work immediately).
|
|
40
23
|
* @export
|
|
@@ -73,39 +56,12 @@ export interface AsyncResponse {
|
|
|
73
56
|
/**
|
|
74
57
|
* @export
|
|
75
58
|
*/
|
|
76
|
-
export declare
|
|
77
|
-
readonly HttpsWwwBytescaleComDocsJobApiGetJob: "https://www.bytescale.com/docs/job-api/GetJob";
|
|
78
|
-
};
|
|
79
|
-
export declare type AsyncResponseJobDocsEnum = typeof AsyncResponseJobDocsEnum[keyof typeof AsyncResponseJobDocsEnum];
|
|
59
|
+
export declare type AsyncResponseJobDocsEnum = "https://www.bytescale.com/docs/job-api/GetJob";
|
|
80
60
|
/**
|
|
81
61
|
* AWS Region.
|
|
82
62
|
* @export
|
|
83
63
|
*/
|
|
84
|
-
export declare
|
|
85
|
-
readonly UsEast2: "us-east-2";
|
|
86
|
-
readonly UsEast1: "us-east-1";
|
|
87
|
-
readonly UsWest1: "us-west-1";
|
|
88
|
-
readonly UsWest2: "us-west-2";
|
|
89
|
-
readonly AfSouth1: "af-south-1";
|
|
90
|
-
readonly ApEast1: "ap-east-1";
|
|
91
|
-
readonly ApSoutheast3: "ap-southeast-3";
|
|
92
|
-
readonly ApSouth1: "ap-south-1";
|
|
93
|
-
readonly ApNortheast3: "ap-northeast-3";
|
|
94
|
-
readonly ApNortheast2: "ap-northeast-2";
|
|
95
|
-
readonly ApSoutheast1: "ap-southeast-1";
|
|
96
|
-
readonly ApSoutheast2: "ap-southeast-2";
|
|
97
|
-
readonly ApNortheast1: "ap-northeast-1";
|
|
98
|
-
readonly CaCentral1: "ca-central-1";
|
|
99
|
-
readonly EuCentral1: "eu-central-1";
|
|
100
|
-
readonly EuWest1: "eu-west-1";
|
|
101
|
-
readonly EuWest2: "eu-west-2";
|
|
102
|
-
readonly EuSouth1: "eu-south-1";
|
|
103
|
-
readonly EuWest3: "eu-west-3";
|
|
104
|
-
readonly EuNorth1: "eu-north-1";
|
|
105
|
-
readonly MeSouth1: "me-south-1";
|
|
106
|
-
readonly SaEast1: "sa-east-1";
|
|
107
|
-
};
|
|
108
|
-
export declare type AwsRegion = typeof AwsRegion[keyof typeof AwsRegion];
|
|
64
|
+
export declare type AwsRegion = "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-southeast-3" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-north-1" | "me-south-1" | "sa-east-1";
|
|
109
65
|
/**
|
|
110
66
|
* Response body for BasicUpload.
|
|
111
67
|
* @export
|
|
@@ -551,10 +507,7 @@ export interface DigitalOceanStorage {
|
|
|
551
507
|
/**
|
|
552
508
|
* @export
|
|
553
509
|
*/
|
|
554
|
-
export declare
|
|
555
|
-
readonly DigitalOceanSpace: "DigitalOceanSpace";
|
|
556
|
-
};
|
|
557
|
-
export declare type DigitalOceanStorageTypeEnum = typeof DigitalOceanStorageTypeEnum[keyof typeof DigitalOceanStorageTypeEnum];
|
|
510
|
+
export declare type DigitalOceanStorageTypeEnum = "DigitalOceanSpace";
|
|
558
511
|
/**
|
|
559
512
|
*
|
|
560
513
|
* @export
|
|
@@ -683,12 +636,7 @@ export interface ErrorResponseError {
|
|
|
683
636
|
* The result of the CopyFile operation.
|
|
684
637
|
* @export
|
|
685
638
|
*/
|
|
686
|
-
export declare
|
|
687
|
-
readonly Copied: "Copied";
|
|
688
|
-
readonly FileNotFound: "FileNotFound";
|
|
689
|
-
readonly SkippedDueToCondition: "SkippedDueToCondition";
|
|
690
|
-
};
|
|
691
|
-
export declare type FileCopyStatus = typeof FileCopyStatus[keyof typeof FileCopyStatus];
|
|
639
|
+
export declare type FileCopyStatus = "Copied" | "FileNotFound" | "SkippedDueToCondition";
|
|
692
640
|
/**
|
|
693
641
|
* Contains full information about a file, including its file metadata, file tags, original file name, and MIME type.
|
|
694
642
|
* @export
|
|
@@ -882,10 +830,7 @@ export interface FileSummary {
|
|
|
882
830
|
/**
|
|
883
831
|
* @export
|
|
884
832
|
*/
|
|
885
|
-
export declare
|
|
886
|
-
readonly File: "File";
|
|
887
|
-
};
|
|
888
|
-
export declare type FileSummaryTypeEnum = typeof FileSummaryTypeEnum[keyof typeof FileSummaryTypeEnum];
|
|
833
|
+
export declare type FileSummaryTypeEnum = "File";
|
|
889
834
|
/**
|
|
890
835
|
*
|
|
891
836
|
* @export
|
|
@@ -926,10 +871,7 @@ export interface FolderDetails {
|
|
|
926
871
|
/**
|
|
927
872
|
* @export
|
|
928
873
|
*/
|
|
929
|
-
export declare
|
|
930
|
-
readonly Folder: "Folder";
|
|
931
|
-
};
|
|
932
|
-
export declare type FolderDetailsTypeEnum = typeof FolderDetailsTypeEnum[keyof typeof FolderDetailsTypeEnum];
|
|
874
|
+
export declare type FolderDetailsTypeEnum = "Folder";
|
|
933
875
|
/**
|
|
934
876
|
* The FolderSettings inherited by the current path.
|
|
935
877
|
*
|
|
@@ -1056,10 +998,7 @@ export interface FolderSettingsStorageLayerSummaryStorageLayer {
|
|
|
1056
998
|
/**
|
|
1057
999
|
* @export
|
|
1058
1000
|
*/
|
|
1059
|
-
export declare
|
|
1060
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
1061
|
-
};
|
|
1062
|
-
export declare type FolderSettingsStorageLayerSummaryStorageLayerTypeEnum = typeof FolderSettingsStorageLayerSummaryStorageLayerTypeEnum[keyof typeof FolderSettingsStorageLayerSummaryStorageLayerTypeEnum];
|
|
1001
|
+
export declare type FolderSettingsStorageLayerSummaryStorageLayerTypeEnum = "GoogleStorage";
|
|
1063
1002
|
/**
|
|
1064
1003
|
* Summary information about a folder (a subset of the FolderDetails type).
|
|
1065
1004
|
* @export
|
|
@@ -1094,10 +1033,7 @@ export interface FolderSummary {
|
|
|
1094
1033
|
/**
|
|
1095
1034
|
* @export
|
|
1096
1035
|
*/
|
|
1097
|
-
export declare
|
|
1098
|
-
readonly Folder: "Folder";
|
|
1099
|
-
};
|
|
1100
|
-
export declare type FolderSummaryTypeEnum = typeof FolderSummaryTypeEnum[keyof typeof FolderSummaryTypeEnum];
|
|
1036
|
+
export declare type FolderSummaryTypeEnum = "Folder";
|
|
1101
1037
|
/**
|
|
1102
1038
|
* Storage layer used for storing files in Google Storage, as opposed to Bytescale's built-in storage.
|
|
1103
1039
|
*
|
|
@@ -1136,10 +1072,7 @@ export interface GoogleStorage {
|
|
|
1136
1072
|
/**
|
|
1137
1073
|
* @export
|
|
1138
1074
|
*/
|
|
1139
|
-
export declare
|
|
1140
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
1141
|
-
};
|
|
1142
|
-
export declare type GoogleStorageTypeEnum = typeof GoogleStorageTypeEnum[keyof typeof GoogleStorageTypeEnum];
|
|
1075
|
+
export declare type GoogleStorageTypeEnum = "GoogleStorage";
|
|
1143
1076
|
/**
|
|
1144
1077
|
*
|
|
1145
1078
|
* @export
|
|
@@ -1177,10 +1110,7 @@ export interface InternalStorageV1 {
|
|
|
1177
1110
|
/**
|
|
1178
1111
|
* @export
|
|
1179
1112
|
*/
|
|
1180
|
-
export declare
|
|
1181
|
-
readonly InternalStorageV1: "InternalStorageV1";
|
|
1182
|
-
};
|
|
1183
|
-
export declare type InternalStorageV1TypeEnum = typeof InternalStorageV1TypeEnum[keyof typeof InternalStorageV1TypeEnum];
|
|
1113
|
+
export declare type InternalStorageV1TypeEnum = "InternalStorageV1";
|
|
1184
1114
|
/**
|
|
1185
1115
|
* Default storage layer used for files uploaded via the Bytescale API V2 (latest version).
|
|
1186
1116
|
*
|
|
@@ -1199,10 +1129,7 @@ export interface InternalStorageV2 {
|
|
|
1199
1129
|
/**
|
|
1200
1130
|
* @export
|
|
1201
1131
|
*/
|
|
1202
|
-
export declare
|
|
1203
|
-
readonly InternalStorageV2: "InternalStorageV2";
|
|
1204
|
-
};
|
|
1205
|
-
export declare type InternalStorageV2TypeEnum = typeof InternalStorageV2TypeEnum[keyof typeof InternalStorageV2TypeEnum];
|
|
1132
|
+
export declare type InternalStorageV2TypeEnum = "InternalStorageV2";
|
|
1206
1133
|
/**
|
|
1207
1134
|
* Summary information about an asynchronous background job (for example, a folder deletion).
|
|
1208
1135
|
* @export
|
|
@@ -1283,10 +1210,7 @@ export interface JobSummary {
|
|
|
1283
1210
|
/**
|
|
1284
1211
|
* @export
|
|
1285
1212
|
*/
|
|
1286
|
-
export declare
|
|
1287
|
-
readonly HttpsWwwBytescaleComDocsJobApiGetJob: "https://www.bytescale.com/docs/job-api/GetJob";
|
|
1288
|
-
};
|
|
1289
|
-
export declare type JobSummaryJobDocsEnum = typeof JobSummaryJobDocsEnum[keyof typeof JobSummaryJobDocsEnum];
|
|
1213
|
+
export declare type JobSummaryJobDocsEnum = "https://www.bytescale.com/docs/job-api/GetJob";
|
|
1290
1214
|
/**
|
|
1291
1215
|
*
|
|
1292
1216
|
* @export
|
|
@@ -1364,11 +1288,7 @@ export interface ListRecentJobsResponse {
|
|
|
1364
1288
|
* - `1.1`: this protocol version uses multipart uploads for all files. When this protocol is used, files only exist after the last CompleteUploadPart request is made. This protocol simplifies client code, and fixes a known issue in the `2.0` protocol for file TTLs (described above).
|
|
1365
1289
|
* @export
|
|
1366
1290
|
*/
|
|
1367
|
-
export declare
|
|
1368
|
-
readonly _0: "1.0";
|
|
1369
|
-
readonly _1: "1.1";
|
|
1370
|
-
};
|
|
1371
|
-
export declare type MultipartUploadProtocol = typeof MultipartUploadProtocol[keyof typeof MultipartUploadProtocol];
|
|
1291
|
+
export declare type MultipartUploadProtocol = "1.0" | "1.1";
|
|
1372
1292
|
/**
|
|
1373
1293
|
* Summary information about a file or folder.
|
|
1374
1294
|
* @export
|
|
@@ -1427,10 +1347,7 @@ export interface ObjectSummary {
|
|
|
1427
1347
|
/**
|
|
1428
1348
|
* @export
|
|
1429
1349
|
*/
|
|
1430
|
-
export declare
|
|
1431
|
-
readonly File: "File";
|
|
1432
|
-
};
|
|
1433
|
-
export declare type ObjectSummaryTypeEnum = typeof ObjectSummaryTypeEnum[keyof typeof ObjectSummaryTypeEnum];
|
|
1350
|
+
export declare type ObjectSummaryTypeEnum = "File";
|
|
1434
1351
|
/**
|
|
1435
1352
|
* Specifies the folder settings to use when creating or updating a folder.
|
|
1436
1353
|
* @export
|
|
@@ -1466,12 +1383,7 @@ export interface PatchFolderSettings {
|
|
|
1466
1383
|
* - `"Grandchildren+"`: Permissions apply to the grandchildren (files and folders) of this path and their descendants only.
|
|
1467
1384
|
* @export
|
|
1468
1385
|
*/
|
|
1469
|
-
export declare
|
|
1470
|
-
readonly Children: "Children";
|
|
1471
|
-
readonly Grandchildren: "Grandchildren+";
|
|
1472
|
-
readonly This: "This";
|
|
1473
|
-
};
|
|
1474
|
-
export declare type PathPermissionScope = typeof PathPermissionScope[keyof typeof PathPermissionScope];
|
|
1386
|
+
export declare type PathPermissionScope = "Children" | "Grandchildren+" | "This";
|
|
1475
1387
|
/**
|
|
1476
1388
|
* From T, pick a set of properties whose keys are in the union K
|
|
1477
1389
|
* @export
|
|
@@ -1502,10 +1414,7 @@ export interface PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentia
|
|
|
1502
1414
|
/**
|
|
1503
1415
|
* @export
|
|
1504
1416
|
*/
|
|
1505
|
-
export declare
|
|
1506
|
-
readonly DigitalOceanSpace: "DigitalOceanSpace";
|
|
1507
|
-
};
|
|
1508
|
-
export declare type PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum = typeof PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum[keyof typeof PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum];
|
|
1417
|
+
export declare type PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum = "DigitalOceanSpace";
|
|
1509
1418
|
/**
|
|
1510
1419
|
*
|
|
1511
1420
|
* @export
|
|
@@ -1561,10 +1470,7 @@ export interface PickGoogleStorageExcludeKeyofGoogleStorageCredentials {
|
|
|
1561
1470
|
/**
|
|
1562
1471
|
* @export
|
|
1563
1472
|
*/
|
|
1564
|
-
export declare
|
|
1565
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
1566
|
-
};
|
|
1567
|
-
export declare type PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum = typeof PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum[keyof typeof PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum];
|
|
1473
|
+
export declare type PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum = "GoogleStorage";
|
|
1568
1474
|
/**
|
|
1569
1475
|
*
|
|
1570
1476
|
* @export
|
|
@@ -1620,10 +1526,7 @@ export interface PickR2StorageExcludeKeyofR2StorageCredentials {
|
|
|
1620
1526
|
/**
|
|
1621
1527
|
* @export
|
|
1622
1528
|
*/
|
|
1623
|
-
export declare
|
|
1624
|
-
readonly R2: "R2";
|
|
1625
|
-
};
|
|
1626
|
-
export declare type PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum = typeof PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum[keyof typeof PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum];
|
|
1529
|
+
export declare type PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum = "R2";
|
|
1627
1530
|
/**
|
|
1628
1531
|
*
|
|
1629
1532
|
* @export
|
|
@@ -1681,10 +1584,7 @@ export interface PickS3StorageExcludeKeyofS3StorageCredentials {
|
|
|
1681
1584
|
/**
|
|
1682
1585
|
* @export
|
|
1683
1586
|
*/
|
|
1684
|
-
export declare
|
|
1685
|
-
readonly S3: "S3";
|
|
1686
|
-
};
|
|
1687
|
-
export declare type PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum = typeof PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum[keyof typeof PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum];
|
|
1587
|
+
export declare type PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum = "S3";
|
|
1688
1588
|
/**
|
|
1689
1589
|
*
|
|
1690
1590
|
* @export
|
|
@@ -1887,10 +1787,7 @@ export interface R2Storage {
|
|
|
1887
1787
|
/**
|
|
1888
1788
|
* @export
|
|
1889
1789
|
*/
|
|
1890
|
-
export declare
|
|
1891
|
-
readonly R2: "R2";
|
|
1892
|
-
};
|
|
1893
|
-
export declare type R2StorageTypeEnum = typeof R2StorageTypeEnum[keyof typeof R2StorageTypeEnum];
|
|
1790
|
+
export declare type R2StorageTypeEnum = "R2";
|
|
1894
1791
|
/**
|
|
1895
1792
|
*
|
|
1896
1793
|
* @export
|
|
@@ -1956,10 +1853,7 @@ export interface S3Storage {
|
|
|
1956
1853
|
/**
|
|
1957
1854
|
* @export
|
|
1958
1855
|
*/
|
|
1959
|
-
export declare
|
|
1960
|
-
readonly S3: "S3";
|
|
1961
|
-
};
|
|
1962
|
-
export declare type S3StorageTypeEnum = typeof S3StorageTypeEnum[keyof typeof S3StorageTypeEnum];
|
|
1856
|
+
export declare type S3StorageTypeEnum = "S3";
|
|
1963
1857
|
/**
|
|
1964
1858
|
*
|
|
1965
1859
|
* @export
|
|
@@ -2001,10 +1895,7 @@ export interface SpecifiedFieldValueFolderDescriptionOrNull {
|
|
|
2001
1895
|
/**
|
|
2002
1896
|
* @export
|
|
2003
1897
|
*/
|
|
2004
|
-
export declare
|
|
2005
|
-
readonly True: true;
|
|
2006
|
-
};
|
|
2007
|
-
export declare type SpecifiedFieldValueFolderDescriptionOrNullSetEnum = typeof SpecifiedFieldValueFolderDescriptionOrNullSetEnum[keyof typeof SpecifiedFieldValueFolderDescriptionOrNullSetEnum];
|
|
1898
|
+
export declare type SpecifiedFieldValueFolderDescriptionOrNullSetEnum = true;
|
|
2008
1899
|
/**
|
|
2009
1900
|
* This data type specifies the field must be updated.
|
|
2010
1901
|
* @export
|
|
@@ -2027,10 +1918,7 @@ export interface SpecifiedFieldValuePublicPermissionsArrayOrNull {
|
|
|
2027
1918
|
/**
|
|
2028
1919
|
* @export
|
|
2029
1920
|
*/
|
|
2030
|
-
export declare
|
|
2031
|
-
readonly True: true;
|
|
2032
|
-
};
|
|
2033
|
-
export declare type SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum = typeof SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum[keyof typeof SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum];
|
|
1921
|
+
export declare type SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum = true;
|
|
2034
1922
|
/**
|
|
2035
1923
|
* This data type specifies the field must be updated.
|
|
2036
1924
|
* @export
|
|
@@ -2053,10 +1941,7 @@ export interface SpecifiedFieldValueStorageLayerUpdateOrNull {
|
|
|
2053
1941
|
/**
|
|
2054
1942
|
* @export
|
|
2055
1943
|
*/
|
|
2056
|
-
export declare
|
|
2057
|
-
readonly True: true;
|
|
2058
|
-
};
|
|
2059
|
-
export declare type SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum = typeof SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum[keyof typeof SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum];
|
|
1944
|
+
export declare type SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum = true;
|
|
2060
1945
|
/**
|
|
2061
1946
|
* The value to set into the field.
|
|
2062
1947
|
* @export
|
|
@@ -2139,10 +2024,7 @@ export interface SpecifiedFieldValueStorageLayerUpdateOrNullValue {
|
|
|
2139
2024
|
/**
|
|
2140
2025
|
* @export
|
|
2141
2026
|
*/
|
|
2142
|
-
export declare
|
|
2143
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
2144
|
-
};
|
|
2145
|
-
export declare type SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum = typeof SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum[keyof typeof SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum];
|
|
2027
|
+
export declare type SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum = "GoogleStorage";
|
|
2146
2028
|
/**
|
|
2147
2029
|
* Storage layer summary information, describing an existing folder's storage layer.
|
|
2148
2030
|
*
|
|
@@ -2221,10 +2103,7 @@ export interface StorageLayerSummary {
|
|
|
2221
2103
|
/**
|
|
2222
2104
|
* @export
|
|
2223
2105
|
*/
|
|
2224
|
-
export declare
|
|
2225
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
2226
|
-
};
|
|
2227
|
-
export declare type StorageLayerSummaryTypeEnum = typeof StorageLayerSummaryTypeEnum[keyof typeof StorageLayerSummaryTypeEnum];
|
|
2106
|
+
export declare type StorageLayerSummaryTypeEnum = "GoogleStorage";
|
|
2228
2107
|
/**
|
|
2229
2108
|
* Data type used to update or create a folder's storage layer.
|
|
2230
2109
|
*
|
|
@@ -2309,10 +2188,7 @@ export interface StorageLayerUpdate {
|
|
|
2309
2188
|
/**
|
|
2310
2189
|
* @export
|
|
2311
2190
|
*/
|
|
2312
|
-
export declare
|
|
2313
|
-
readonly GoogleStorage: "GoogleStorage";
|
|
2314
|
-
};
|
|
2315
|
-
export declare type StorageLayerUpdateTypeEnum = typeof StorageLayerUpdateTypeEnum[keyof typeof StorageLayerUpdateTypeEnum];
|
|
2191
|
+
export declare type StorageLayerUpdateTypeEnum = "GoogleStorage";
|
|
2316
2192
|
/**
|
|
2317
2193
|
* Expresses a condition that matches files by their tags.
|
|
2318
2194
|
* @export
|
|
@@ -2365,10 +2241,7 @@ export interface TagCondition {
|
|
|
2365
2241
|
/**
|
|
2366
2242
|
* @export
|
|
2367
2243
|
*/
|
|
2368
|
-
export declare
|
|
2369
|
-
readonly All: "All";
|
|
2370
|
-
};
|
|
2371
|
-
export declare type TagConditionTypeEnum = typeof TagConditionTypeEnum[keyof typeof TagConditionTypeEnum];
|
|
2244
|
+
export declare type TagConditionTypeEnum = "All";
|
|
2372
2245
|
/**
|
|
2373
2246
|
*
|
|
2374
2247
|
* @export
|
|
@@ -2391,10 +2264,7 @@ export interface TagConditionAll {
|
|
|
2391
2264
|
/**
|
|
2392
2265
|
* @export
|
|
2393
2266
|
*/
|
|
2394
|
-
export declare
|
|
2395
|
-
readonly All: "All";
|
|
2396
|
-
};
|
|
2397
|
-
export declare type TagConditionAllTypeEnum = typeof TagConditionAllTypeEnum[keyof typeof TagConditionAllTypeEnum];
|
|
2267
|
+
export declare type TagConditionAllTypeEnum = "All";
|
|
2398
2268
|
/**
|
|
2399
2269
|
*
|
|
2400
2270
|
* @export
|
|
@@ -2423,10 +2293,7 @@ export interface TagConditionAnd {
|
|
|
2423
2293
|
/**
|
|
2424
2294
|
* @export
|
|
2425
2295
|
*/
|
|
2426
|
-
export declare
|
|
2427
|
-
readonly And: "And";
|
|
2428
|
-
};
|
|
2429
|
-
export declare type TagConditionAndTypeEnum = typeof TagConditionAndTypeEnum[keyof typeof TagConditionAndTypeEnum];
|
|
2296
|
+
export declare type TagConditionAndTypeEnum = "And";
|
|
2430
2297
|
/**
|
|
2431
2298
|
*
|
|
2432
2299
|
* @export
|
|
@@ -2449,10 +2316,7 @@ export interface TagConditionAny {
|
|
|
2449
2316
|
/**
|
|
2450
2317
|
* @export
|
|
2451
2318
|
*/
|
|
2452
|
-
export declare
|
|
2453
|
-
readonly Any: "Any";
|
|
2454
|
-
};
|
|
2455
|
-
export declare type TagConditionAnyTypeEnum = typeof TagConditionAnyTypeEnum[keyof typeof TagConditionAnyTypeEnum];
|
|
2319
|
+
export declare type TagConditionAnyTypeEnum = "Any";
|
|
2456
2320
|
/**
|
|
2457
2321
|
*
|
|
2458
2322
|
* @export
|
|
@@ -2475,10 +2339,7 @@ export interface TagConditionEquals {
|
|
|
2475
2339
|
/**
|
|
2476
2340
|
* @export
|
|
2477
2341
|
*/
|
|
2478
|
-
export declare
|
|
2479
|
-
readonly Equals: "Equals";
|
|
2480
|
-
};
|
|
2481
|
-
export declare type TagConditionEqualsTypeEnum = typeof TagConditionEqualsTypeEnum[keyof typeof TagConditionEqualsTypeEnum];
|
|
2342
|
+
export declare type TagConditionEqualsTypeEnum = "Equals";
|
|
2482
2343
|
/**
|
|
2483
2344
|
*
|
|
2484
2345
|
* @export
|
|
@@ -2501,10 +2362,7 @@ export interface TagConditionNot {
|
|
|
2501
2362
|
/**
|
|
2502
2363
|
* @export
|
|
2503
2364
|
*/
|
|
2504
|
-
export declare
|
|
2505
|
-
readonly Not: "Not";
|
|
2506
|
-
};
|
|
2507
|
-
export declare type TagConditionNotTypeEnum = typeof TagConditionNotTypeEnum[keyof typeof TagConditionNotTypeEnum];
|
|
2365
|
+
export declare type TagConditionNotTypeEnum = "Not";
|
|
2508
2366
|
/**
|
|
2509
2367
|
*
|
|
2510
2368
|
* @export
|
|
@@ -2533,10 +2391,7 @@ export interface TagConditionOr {
|
|
|
2533
2391
|
/**
|
|
2534
2392
|
* @export
|
|
2535
2393
|
*/
|
|
2536
|
-
export declare
|
|
2537
|
-
readonly Or: "Or";
|
|
2538
|
-
};
|
|
2539
|
-
export declare type TagConditionOrTypeEnum = typeof TagConditionOrTypeEnum[keyof typeof TagConditionOrTypeEnum];
|
|
2394
|
+
export declare type TagConditionOrTypeEnum = "Or";
|
|
2540
2395
|
/**
|
|
2541
2396
|
* This data type specifies no update is to be performed.
|
|
2542
2397
|
* @export
|
|
@@ -2553,10 +2408,7 @@ export interface UnspecifiedFieldValue {
|
|
|
2553
2408
|
/**
|
|
2554
2409
|
* @export
|
|
2555
2410
|
*/
|
|
2556
|
-
export declare
|
|
2557
|
-
readonly False: false;
|
|
2558
|
-
};
|
|
2559
|
-
export declare type UnspecifiedFieldValueSetEnum = typeof UnspecifiedFieldValueSetEnum[keyof typeof UnspecifiedFieldValueSetEnum];
|
|
2411
|
+
export declare type UnspecifiedFieldValueSetEnum = false;
|
|
2560
2412
|
/**
|
|
2561
2413
|
*
|
|
2562
2414
|
* @export
|
|
@@ -2579,10 +2431,7 @@ export interface UpdatableFieldFolderDescriptionOrNull {
|
|
|
2579
2431
|
/**
|
|
2580
2432
|
* @export
|
|
2581
2433
|
*/
|
|
2582
|
-
export declare
|
|
2583
|
-
readonly True: true;
|
|
2584
|
-
};
|
|
2585
|
-
export declare type UpdatableFieldFolderDescriptionOrNullSetEnum = typeof UpdatableFieldFolderDescriptionOrNullSetEnum[keyof typeof UpdatableFieldFolderDescriptionOrNullSetEnum];
|
|
2434
|
+
export declare type UpdatableFieldFolderDescriptionOrNullSetEnum = true;
|
|
2586
2435
|
/**
|
|
2587
2436
|
*
|
|
2588
2437
|
* @export
|
|
@@ -2605,10 +2454,7 @@ export interface UpdatableFieldPublicPermissionsArrayOrNull {
|
|
|
2605
2454
|
/**
|
|
2606
2455
|
* @export
|
|
2607
2456
|
*/
|
|
2608
|
-
export declare
|
|
2609
|
-
readonly True: true;
|
|
2610
|
-
};
|
|
2611
|
-
export declare type UpdatableFieldPublicPermissionsArrayOrNullSetEnum = typeof UpdatableFieldPublicPermissionsArrayOrNullSetEnum[keyof typeof UpdatableFieldPublicPermissionsArrayOrNullSetEnum];
|
|
2457
|
+
export declare type UpdatableFieldPublicPermissionsArrayOrNullSetEnum = true;
|
|
2612
2458
|
/**
|
|
2613
2459
|
*
|
|
2614
2460
|
* @export
|
|
@@ -2631,10 +2477,7 @@ export interface UpdatableFieldStorageLayerUpdateOrNull {
|
|
|
2631
2477
|
/**
|
|
2632
2478
|
* @export
|
|
2633
2479
|
*/
|
|
2634
|
-
export declare
|
|
2635
|
-
readonly True: true;
|
|
2636
|
-
};
|
|
2637
|
-
export declare type UpdatableFieldStorageLayerUpdateOrNullSetEnum = typeof UpdatableFieldStorageLayerUpdateOrNullSetEnum[keyof typeof UpdatableFieldStorageLayerUpdateOrNullSetEnum];
|
|
2480
|
+
export declare type UpdatableFieldStorageLayerUpdateOrNullSetEnum = true;
|
|
2638
2481
|
/**
|
|
2639
2482
|
* Request body for UploadFromUrl.
|
|
2640
2483
|
* @export
|
|
@@ -2812,10 +2655,7 @@ export interface WebStorage {
|
|
|
2812
2655
|
/**
|
|
2813
2656
|
* @export
|
|
2814
2657
|
*/
|
|
2815
|
-
export declare
|
|
2816
|
-
readonly Web: "Web";
|
|
2817
|
-
};
|
|
2818
|
-
export declare type WebStorageTypeEnum = typeof WebStorageTypeEnum[keyof typeof WebStorageTypeEnum];
|
|
2658
|
+
export declare type WebStorageTypeEnum = "Web";
|
|
2819
2659
|
/**
|
|
2820
2660
|
*
|
|
2821
2661
|
* @export
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ErrorResponse } from "./models";
|
|
2
2
|
/**
|
|
3
|
-
* @bytescale/
|
|
3
|
+
* @bytescale/api
|
|
4
4
|
* Bytescale API
|
|
5
5
|
*
|
|
6
6
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -11,55 +11,24 @@ import { ErrorResponse } from "./models";
|
|
|
11
11
|
* Do not edit the class manually.
|
|
12
12
|
*/
|
|
13
13
|
export declare const BASE_PATH: string;
|
|
14
|
-
export interface
|
|
15
|
-
basePath?: string;
|
|
14
|
+
export interface BytescaleApiClientConfig {
|
|
16
15
|
fetchApi?: FetchAPI;
|
|
17
|
-
middleware?: Middleware[];
|
|
18
|
-
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
19
|
-
username?: string;
|
|
20
|
-
password?: string;
|
|
21
16
|
apiKey?: string | ((name: string) => string);
|
|
22
|
-
|
|
23
|
-
headers?: HTTPHeaders;
|
|
24
|
-
credentials?: RequestCredentials;
|
|
25
|
-
}
|
|
26
|
-
export declare class Configuration {
|
|
27
|
-
private configuration;
|
|
28
|
-
constructor(configuration?: ConfigurationParameters);
|
|
29
|
-
set config(configuration: Configuration);
|
|
30
|
-
get basePath(): string;
|
|
31
|
-
get fetchApi(): FetchAPI | undefined;
|
|
32
|
-
get middleware(): Middleware[];
|
|
33
|
-
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
34
|
-
get username(): string | undefined;
|
|
35
|
-
get password(): string | undefined;
|
|
36
|
-
get apiKey(): ((name: string) => string) | undefined;
|
|
37
|
-
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
38
|
-
get headers(): HTTPHeaders | undefined;
|
|
39
|
-
get credentials(): RequestCredentials | undefined;
|
|
17
|
+
headers?: () => Promise<HTTPHeaders>;
|
|
40
18
|
}
|
|
41
|
-
export declare const DefaultConfig: Configuration;
|
|
42
19
|
/**
|
|
43
20
|
* This is the base class for all generated API classes.
|
|
44
21
|
*/
|
|
45
22
|
export declare class BaseAPI {
|
|
46
|
-
protected
|
|
47
|
-
|
|
48
|
-
constructor(configuration?: Configuration);
|
|
49
|
-
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
-
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware["pre"]>): T;
|
|
51
|
-
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware["post"]>): T;
|
|
23
|
+
protected readonly config: BytescaleApiClientConfig;
|
|
24
|
+
constructor(config: BytescaleApiClientConfig);
|
|
52
25
|
protected request(context: RequestOpts, initOverrides: RequestInit | InitOverrideFunction | undefined, operationBasePathOverride: string | undefined): Promise<Response>;
|
|
26
|
+
protected encodeParam(paramName: string, paramValue: string): string;
|
|
53
27
|
private createFetchParams;
|
|
54
28
|
private fetchApi;
|
|
55
|
-
/**
|
|
56
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
57
|
-
* and then shallow cloning data members.
|
|
58
|
-
*/
|
|
59
|
-
private clone;
|
|
60
29
|
}
|
|
61
|
-
export declare class
|
|
62
|
-
name: "
|
|
30
|
+
export declare class BytescaleApiError extends Error {
|
|
31
|
+
name: "BytescaleApiError";
|
|
63
32
|
readonly errorCode: string;
|
|
64
33
|
readonly details: any | undefined;
|
|
65
34
|
constructor(response: ErrorResponse);
|
|
@@ -79,12 +48,6 @@ export declare class RequiredError extends Error {
|
|
|
79
48
|
name: "RequiredError";
|
|
80
49
|
constructor(field: string, msg?: string);
|
|
81
50
|
}
|
|
82
|
-
export declare const COLLECTION_FORMATS: {
|
|
83
|
-
csv: string;
|
|
84
|
-
ssv: string;
|
|
85
|
-
tsv: string;
|
|
86
|
-
pipes: string;
|
|
87
|
-
};
|
|
88
51
|
export declare type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
|
|
89
52
|
export declare type Json = any;
|
|
90
53
|
export declare type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
@@ -98,7 +61,6 @@ export declare type HTTPBody = Json | FormData | URLSearchParams;
|
|
|
98
61
|
export declare type HTTPRequestInit = {
|
|
99
62
|
headers?: HTTPHeaders;
|
|
100
63
|
method: HTTPMethod;
|
|
101
|
-
credentials?: RequestCredentials;
|
|
102
64
|
body?: HTTPBody;
|
|
103
65
|
};
|
|
104
66
|
export declare type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original";
|
|
@@ -118,33 +80,6 @@ export interface RequestOpts {
|
|
|
118
80
|
body?: HTTPBody;
|
|
119
81
|
}
|
|
120
82
|
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
121
|
-
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
122
|
-
export interface Consume {
|
|
123
|
-
contentType: string;
|
|
124
|
-
}
|
|
125
|
-
export interface RequestContext {
|
|
126
|
-
fetch: FetchAPI;
|
|
127
|
-
url: string;
|
|
128
|
-
init: RequestInit;
|
|
129
|
-
}
|
|
130
|
-
export interface ResponseContext {
|
|
131
|
-
fetch: FetchAPI;
|
|
132
|
-
url: string;
|
|
133
|
-
init: RequestInit;
|
|
134
|
-
response: Response;
|
|
135
|
-
}
|
|
136
|
-
export interface ErrorContext {
|
|
137
|
-
fetch: FetchAPI;
|
|
138
|
-
url: string;
|
|
139
|
-
init: RequestInit;
|
|
140
|
-
error: unknown;
|
|
141
|
-
response?: Response;
|
|
142
|
-
}
|
|
143
|
-
export interface Middleware {
|
|
144
|
-
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
145
|
-
post?(context: ResponseContext): Promise<Response | void>;
|
|
146
|
-
onError?(context: ErrorContext): Promise<Response | void>;
|
|
147
|
-
}
|
|
148
83
|
export interface ApiResponse<T> {
|
|
149
84
|
raw: Response;
|
|
150
85
|
value(): Promise<T>;
|
|
@@ -171,8 +106,3 @@ export declare class BinaryResult {
|
|
|
171
106
|
blob(): Promise<Blob>;
|
|
172
107
|
json(): Promise<any>;
|
|
173
108
|
}
|
|
174
|
-
export declare class TextApiResponse {
|
|
175
|
-
raw: Response;
|
|
176
|
-
constructor(raw: Response);
|
|
177
|
-
value(): Promise<string>;
|
|
178
|
-
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./generated";
|
|
2
|
+
export * from "./uploads";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type * as stream from "stream";
|
|
3
3
|
import type * as buffer from "buffer";
|
|
4
|
-
import { BlobLike } from "./
|
|
4
|
+
import { BlobLike } from "./UploadModel";
|
|
5
5
|
/**
|
|
6
6
|
* Provides access to Node.js built-in libraries. Should only be called when we're certain we're running in Node.js.
|
|
7
7
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FileDetails } from "../
|
|
2
|
-
import { UploadManagerParams } from "./
|
|
1
|
+
import { FileDetails, BytescaleApiClientConfig } from "../generated";
|
|
2
|
+
import { UploadManagerParams } from "./UploadModel";
|
|
3
3
|
export declare class UploadManager {
|
|
4
|
-
private readonly
|
|
4
|
+
private readonly config;
|
|
5
5
|
private readonly stringMimeType;
|
|
6
6
|
private readonly defaultMaxConcurrentUploadParts;
|
|
7
7
|
private readonly uploadApi;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(config: BytescaleApiClientConfig);
|
|
9
9
|
upload(request: UploadManagerParams): Promise<FileDetails>;
|
|
10
10
|
private checkIfCancelled;
|
|
11
11
|
private beginUpload;
|