@bytescale/sdk 3.30.0 → 3.31.0
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.
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from "../runtime";
|
|
13
13
|
import type { AsyncResponse, CopyFileBatchRequest, CopyFileRequest, CopyFileResponse, DeleteFileBatchRequest, FileDetails, ProcessFileAndSaveRequest, ProcessFileAndSaveResponse } from "../models";
|
|
14
|
-
import type {
|
|
14
|
+
import type { TransformationParams } from "../models";
|
|
15
15
|
export interface CopyFileOperationParams {
|
|
16
16
|
accountId: string;
|
|
17
17
|
copyFileRequest: CopyFileRequest;
|
|
@@ -125,7 +125,7 @@ export interface ProcessFileParams {
|
|
|
125
125
|
* - https://www.bytescale.com/docs/audio-processing-api
|
|
126
126
|
* - https://www.bytescale.com/docs/archive-processing-api
|
|
127
127
|
*/
|
|
128
|
-
transformationParams?:
|
|
128
|
+
transformationParams?: TransformationParams;
|
|
129
129
|
/**
|
|
130
130
|
* Add this parameter and increment its value to force the file to be reprocessed.
|
|
131
131
|
*
|
|
@@ -158,7 +158,7 @@ export interface ProcessFileAndSaveOperationParams {
|
|
|
158
158
|
* - https://www.bytescale.com/docs/audio-processing-api
|
|
159
159
|
* - https://www.bytescale.com/docs/archive-processing-api
|
|
160
160
|
*/
|
|
161
|
-
transformationParams?:
|
|
161
|
+
transformationParams?: TransformationParams;
|
|
162
162
|
}
|
|
163
163
|
export declare class FileApi extends runtime.BaseAPI {
|
|
164
164
|
/**
|
|
@@ -1422,6 +1422,12 @@ export interface ProcessFileAndSaveRequest {
|
|
|
1422
1422
|
* @memberof ProcessFileAndSaveRequest
|
|
1423
1423
|
*/
|
|
1424
1424
|
destination?: FilePathDefinition;
|
|
1425
|
+
/**
|
|
1426
|
+
*
|
|
1427
|
+
* @type {TransformationParams}
|
|
1428
|
+
* @memberof ProcessFileAndSaveRequest
|
|
1429
|
+
*/
|
|
1430
|
+
extendedParams?: TransformationParams;
|
|
1425
1431
|
/**
|
|
1426
1432
|
*
|
|
1427
1433
|
* @type {CopyableFileDataFileMetadata}
|
|
@@ -1585,22 +1591,6 @@ export interface ProcessFileAndSaveResponseSync {
|
|
|
1585
1591
|
* @export
|
|
1586
1592
|
*/
|
|
1587
1593
|
export declare type ProcessFileAndSaveResponseSyncAsyncEnum = false;
|
|
1588
|
-
/**
|
|
1589
|
-
* @type ProcessFileTransformationParamsParameter
|
|
1590
|
-
*
|
|
1591
|
-
* @export
|
|
1592
|
-
*/
|
|
1593
|
-
export declare type ProcessFileTransformationParamsParameter = Array<{
|
|
1594
|
-
[key: string]: ProcessFileTransformationParamsParameterOneOfValue;
|
|
1595
|
-
}> | {
|
|
1596
|
-
[key: string]: ProcessFileTransformationParamsParameterOneOfValue;
|
|
1597
|
-
};
|
|
1598
|
-
/**
|
|
1599
|
-
* @type ProcessFileTransformationParamsParameterOneOfValue
|
|
1600
|
-
*
|
|
1601
|
-
* @export
|
|
1602
|
-
*/
|
|
1603
|
-
export declare type ProcessFileTransformationParamsParameterOneOfValue = boolean | number | string;
|
|
1604
1594
|
/**
|
|
1605
1595
|
* Permissions applied to anonymous users who attempt to download files from a folder.
|
|
1606
1596
|
*
|
|
@@ -1881,6 +1871,50 @@ export declare type StorageLayerSummary = InternalStorageV1 | InternalStorageV2
|
|
|
1881
1871
|
* @export
|
|
1882
1872
|
*/
|
|
1883
1873
|
export declare type StorageLayerUpdate = DigitalOceanStorage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
|
|
1874
|
+
/**
|
|
1875
|
+
* @type TransformationParamValue
|
|
1876
|
+
* A single transformation parameter provided to a Bytescale File Processing API.
|
|
1877
|
+
*
|
|
1878
|
+
* See TransformationParams for more information.
|
|
1879
|
+
* @export
|
|
1880
|
+
*/
|
|
1881
|
+
export declare type TransformationParamValue = boolean | number | string;
|
|
1882
|
+
/**
|
|
1883
|
+
* @type TransformationParams
|
|
1884
|
+
* Transformation parameters provided to a Bytescale File Processing API.
|
|
1885
|
+
*
|
|
1886
|
+
* *Array support:*
|
|
1887
|
+
*
|
|
1888
|
+
* Arrays are specified by repeating the same parameter name multiple times on the querystring.
|
|
1889
|
+
*
|
|
1890
|
+
* For example, the following querystring declares a `file` parameter as an array containing two values (`/file1.txt` and `/file2.txt`):
|
|
1891
|
+
*
|
|
1892
|
+
* ```?file=/file1.txt&file=/file2.txt```
|
|
1893
|
+
*
|
|
1894
|
+
* The Bytescale SDKs and the ProcessFileAndSave request body (the `extendedParams` field) also support arrays of transformation parameters. These are specified by providing an array of objects as the field value instead of an object, for example:
|
|
1895
|
+
*
|
|
1896
|
+
* ```transformationParams: [{ file: "/file1.txt" }, { file: "/file2.txt" }]```
|
|
1897
|
+
*
|
|
1898
|
+
* This structure allows parameter groups to be retained, which is important for certain transformations. For example, the Video Processing API allows developers to specify multiple clusters of `w`, `h` and `q` parameters when specifying the Adaptive Bitrate (ABR) variants in an HTTP Live Streaming (HLS) output video.
|
|
1899
|
+
*
|
|
1900
|
+
* *Parameters are order sensitive:*
|
|
1901
|
+
*
|
|
1902
|
+
* The order of the parameters may be important. Please refer to the documentation of each File Processing API for more information.
|
|
1903
|
+
*
|
|
1904
|
+
* *Maximum URL length:*
|
|
1905
|
+
*
|
|
1906
|
+
* Bytescale URLs have a maximum total length of 1000 bytes (excluding the hostname and protocol).
|
|
1907
|
+
*
|
|
1908
|
+
* To provide a longer list of parameters to a Bytescale File Processing API, you must use ProcessFileAndSave (POST) instead of ProcessFile (GET). This allows you to specify parameters via the ProcessFileAndSave HTTP request body (via the `extendedParams` field) instead of via the querystring.
|
|
1909
|
+
*
|
|
1910
|
+
* The `extendedParams` field supports up to 400KB of transformation parameter data.
|
|
1911
|
+
* @export
|
|
1912
|
+
*/
|
|
1913
|
+
export declare type TransformationParams = Array<{
|
|
1914
|
+
[key: string]: TransformationParamValue;
|
|
1915
|
+
}> | {
|
|
1916
|
+
[key: string]: TransformationParamValue;
|
|
1917
|
+
};
|
|
1884
1918
|
/**
|
|
1885
1919
|
* This data type specifies no update is to be performed.
|
|
1886
1920
|
* @export
|