@bytescale/sdk 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +1 -1
- 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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bytescale/api
|
|
3
|
+
* Bytescale API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: hello@bytescale.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from "../runtime";
|
|
13
|
+
import type { AsyncResponse, CopyFileBatchRequest, CopyFileRequest, CopyFileResponse, DeleteFileBatchRequest, FileDetails, ProcessFileAndSaveRequest, ProcessFileAndSaveResponse } from "../models";
|
|
14
|
+
export interface CopyFileOperationParams {
|
|
15
|
+
accountId: string;
|
|
16
|
+
copyFileRequest: CopyFileRequest;
|
|
17
|
+
}
|
|
18
|
+
export interface CopyFileBatchOperationParams {
|
|
19
|
+
accountId: string;
|
|
20
|
+
copyFileBatchRequest: CopyFileBatchRequest;
|
|
21
|
+
}
|
|
22
|
+
export interface DeleteFileParams {
|
|
23
|
+
accountId: string;
|
|
24
|
+
filePath: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DeleteFileBatchOperationParams {
|
|
27
|
+
accountId: string;
|
|
28
|
+
deleteFileBatchRequest: DeleteFileBatchRequest;
|
|
29
|
+
}
|
|
30
|
+
export interface DownloadFileParams {
|
|
31
|
+
accountId: string;
|
|
32
|
+
filePath: string;
|
|
33
|
+
cache?: boolean;
|
|
34
|
+
cacheTtl?: number;
|
|
35
|
+
version?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GetFileDetailsParams {
|
|
38
|
+
accountId: string;
|
|
39
|
+
filePath: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ProcessFileParams {
|
|
42
|
+
accountId: string;
|
|
43
|
+
filePath: string;
|
|
44
|
+
transformation: string;
|
|
45
|
+
artifact?: string;
|
|
46
|
+
cache?: boolean;
|
|
47
|
+
cachePerm?: ProcessFileCachePermEnum;
|
|
48
|
+
cacheTtl?: number;
|
|
49
|
+
large?: boolean;
|
|
50
|
+
version?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface ProcessFileAndSaveOperationParams {
|
|
53
|
+
accountId: string;
|
|
54
|
+
filePath: string;
|
|
55
|
+
transformation: string;
|
|
56
|
+
processFileAndSaveRequest: ProcessFileAndSaveRequest;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare class FileApi extends runtime.BaseAPI {
|
|
62
|
+
/**
|
|
63
|
+
* Copies a file synchronously.
|
|
64
|
+
*/
|
|
65
|
+
copyFile(params: CopyFileOperationParams): Promise<CopyFileResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Copies multiple files asynchronously.
|
|
68
|
+
*/
|
|
69
|
+
copyFileBatch(params: CopyFileBatchOperationParams): Promise<AsyncResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Deletes a file synchronously.
|
|
72
|
+
*/
|
|
73
|
+
deleteFile(params: DeleteFileParams): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Deletes multiple files asynchronously.
|
|
76
|
+
*/
|
|
77
|
+
deleteFileBatch(params: DeleteFileBatchOperationParams): Promise<AsyncResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* Downloads a file in its original/unprocessed state.
|
|
80
|
+
*/
|
|
81
|
+
downloadFile(params: DownloadFileParams): Promise<runtime.BinaryResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Gets the full details (e.g. metadata, tags, etc.) for a file.
|
|
84
|
+
*/
|
|
85
|
+
getFileDetails(params: GetFileDetailsParams): Promise<FileDetails>;
|
|
86
|
+
/**
|
|
87
|
+
* Processes a file and returns the result.
|
|
88
|
+
*/
|
|
89
|
+
processFile(params: ProcessFileParams): Promise<runtime.BinaryResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Processes a file and saves the result.
|
|
92
|
+
*/
|
|
93
|
+
processFileAndSave(params: ProcessFileAndSaveOperationParams): Promise<ProcessFileAndSaveResponse>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @export
|
|
97
|
+
*/
|
|
98
|
+
export declare type ProcessFileCachePermEnum = "auto" | "false" | "true";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @bytescale/
|
|
2
|
+
* @bytescale/api
|
|
3
3
|
* Bytescale API
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -54,57 +54,29 @@ export declare class FolderApi extends runtime.BaseAPI {
|
|
|
54
54
|
/**
|
|
55
55
|
* Copies a folder asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
56
56
|
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Copies a folder asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
60
|
-
*/
|
|
61
|
-
copyFolder(requestParameters: CopyFolderOperationParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AsyncResponse>;
|
|
62
|
-
/**
|
|
63
|
-
* Copies multiple folders asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
64
|
-
*/
|
|
65
|
-
private copyFolderBatchWithHttpInfo;
|
|
57
|
+
copyFolder(params: CopyFolderOperationParams): Promise<AsyncResponse>;
|
|
66
58
|
/**
|
|
67
59
|
* Copies multiple folders asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
68
60
|
*/
|
|
69
|
-
copyFolderBatch(
|
|
61
|
+
copyFolderBatch(params: CopyFolderBatchOperationParams): Promise<AsyncResponse>;
|
|
70
62
|
/**
|
|
71
63
|
* Deletes a folder asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
72
64
|
*/
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Deletes a folder asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
76
|
-
*/
|
|
77
|
-
deleteFolder(requestParameters: DeleteFolderOperationParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AsyncResponse>;
|
|
65
|
+
deleteFolder(params: DeleteFolderOperationParams): Promise<AsyncResponse>;
|
|
78
66
|
/**
|
|
79
67
|
* Deletes multiple folders asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
80
68
|
*/
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Deletes multiple folders asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
84
|
-
*/
|
|
85
|
-
deleteFolderBatch(requestParameters: DeleteFolderBatchOperationParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AsyncResponse>;
|
|
69
|
+
deleteFolderBatch(params: DeleteFolderBatchOperationParams): Promise<AsyncResponse>;
|
|
86
70
|
/**
|
|
87
71
|
* Gets the full details (e.g. permission, storage layer, etc.) for a folder. Returns an empty object if no settings have been configured for this folder.
|
|
88
72
|
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Gets the full details (e.g. permission, storage layer, etc.) for a folder. Returns an empty object if no settings have been configured for this folder.
|
|
92
|
-
*/
|
|
93
|
-
getFolderDetails(requestParameters: GetFolderDetailsParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderDetails>;
|
|
94
|
-
/**
|
|
95
|
-
* Lists the folder\'s contents. The result may be paginated: subsequent pages can be requested by passing the ```cursor``` from the response into the ```cursor``` request parameter. Pagination is complete when the response includes `isPaginationComplete=true`.
|
|
96
|
-
*/
|
|
97
|
-
private listFolderWithHttpInfo;
|
|
73
|
+
getFolderDetails(params: GetFolderDetailsParams): Promise<FolderDetails>;
|
|
98
74
|
/**
|
|
99
75
|
* Lists the folder\'s contents. The result may be paginated: subsequent pages can be requested by passing the ```cursor``` from the response into the ```cursor``` request parameter. Pagination is complete when the response includes `isPaginationComplete=true`.
|
|
100
76
|
*/
|
|
101
|
-
listFolder(
|
|
102
|
-
/**
|
|
103
|
-
* Creates or updates the folder specified by the `folderPath`. If the folder\'s ancestors do not exist, they will be created automatically (with empty FolderSettings). Note: you don\'t need to create folders before uploading files to them.
|
|
104
|
-
*/
|
|
105
|
-
private putFolderWithHttpInfo;
|
|
77
|
+
listFolder(params: ListFolderParams): Promise<ListFolderResponse>;
|
|
106
78
|
/**
|
|
107
79
|
* Creates or updates the folder specified by the `folderPath`. If the folder\'s ancestors do not exist, they will be created automatically (with empty FolderSettings). Note: you don\'t need to create folders before uploading files to them.
|
|
108
80
|
*/
|
|
109
|
-
putFolder(
|
|
81
|
+
putFolder(params: PutFolderOperationParams): Promise<FolderDetails>;
|
|
110
82
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @bytescale/
|
|
2
|
+
* @bytescale/api
|
|
3
3
|
* Bytescale API
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -32,25 +32,13 @@ export declare class JobApi extends runtime.BaseAPI {
|
|
|
32
32
|
/**
|
|
33
33
|
* Cancels an in-progress background job. Requires a `secret_*` API key.
|
|
34
34
|
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Cancels an in-progress background job. Requires a `secret_*` API key.
|
|
38
|
-
*/
|
|
39
|
-
cancelJob(requestParameters: CancelJobParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
35
|
+
cancelJob(params: CancelJobParams): Promise<void>;
|
|
40
36
|
/**
|
|
41
37
|
* Gets information on a background job. Requires a `secret_*` API key.
|
|
42
38
|
*/
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Gets information on a background job. Requires a `secret_*` API key.
|
|
46
|
-
*/
|
|
47
|
-
getJob(requestParameters: GetJobParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobSummary>;
|
|
48
|
-
/**
|
|
49
|
-
* Lists the most recently issued background jobs. Requires a `secret_*` API key.
|
|
50
|
-
*/
|
|
51
|
-
private listRecentJobsWithHttpInfo;
|
|
39
|
+
getJob(params: GetJobParams): Promise<JobSummary>;
|
|
52
40
|
/**
|
|
53
41
|
* Lists the most recently issued background jobs. Requires a `secret_*` API key.
|
|
54
42
|
*/
|
|
55
|
-
listRecentJobs(
|
|
43
|
+
listRecentJobs(params: ListRecentJobsParams): Promise<ListRecentJobsResponse>;
|
|
56
44
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @bytescale/
|
|
2
|
+
* @bytescale/api
|
|
3
3
|
* Bytescale API
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -41,41 +41,21 @@ export declare class UploadApi extends runtime.BaseAPI {
|
|
|
41
41
|
/**
|
|
42
42
|
* Begins a new multipart file upload process.
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Begins a new multipart file upload process.
|
|
47
|
-
*/
|
|
48
|
-
beginMultipartUpload(requestParameters: BeginMultipartUploadOperationParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BeginMultipartUploadResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Marks an upload part as uploaded. You must call this endpoint after you have successfully issued a `PUT` request to the `uploadUrl` on the corresponding UploadPart.
|
|
51
|
-
*/
|
|
52
|
-
private completeUploadPartWithHttpInfo;
|
|
44
|
+
beginMultipartUpload(params: BeginMultipartUploadOperationParams): Promise<BeginMultipartUploadResponse>;
|
|
53
45
|
/**
|
|
54
46
|
* Marks an upload part as uploaded. You must call this endpoint after you have successfully issued a `PUT` request to the `uploadUrl` on the corresponding UploadPart.
|
|
55
47
|
*/
|
|
56
|
-
completeUploadPart(
|
|
48
|
+
completeUploadPart(params: CompleteUploadPartOperationParams): Promise<void>;
|
|
57
49
|
/**
|
|
58
50
|
* Gets a remaining upload part for a multipart file upload.
|
|
59
51
|
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Gets a remaining upload part for a multipart file upload.
|
|
63
|
-
*/
|
|
64
|
-
getUploadPart(requestParameters: GetUploadPartParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadPart>;
|
|
65
|
-
/**
|
|
66
|
-
* Lists the remaining upload parts for a multipart file upload. An empty array is returned when the upload is complete.
|
|
67
|
-
*/
|
|
68
|
-
private listUploadPartsWithHttpInfo;
|
|
52
|
+
getUploadPart(params: GetUploadPartParams): Promise<UploadPart>;
|
|
69
53
|
/**
|
|
70
54
|
* Lists the remaining upload parts for a multipart file upload. An empty array is returned when the upload is complete.
|
|
71
55
|
*/
|
|
72
|
-
listUploadParts(
|
|
73
|
-
/**
|
|
74
|
-
* Upload from a URL with a single HTTP request:
|
|
75
|
-
*/
|
|
76
|
-
private uploadFromUrlWithHttpInfo;
|
|
56
|
+
listUploadParts(params: ListUploadPartsParams): Promise<UploadPartList>;
|
|
77
57
|
/**
|
|
78
58
|
* Upload from a URL with a single HTTP request:
|
|
79
59
|
*/
|
|
80
|
-
uploadFromUrl(
|
|
60
|
+
uploadFromUrl(params: UploadFromUrlOperationParams): Promise<BasicUploadResponse>;
|
|
81
61
|
}
|