@bytescale/sdk 3.30.0 → 3.31.1

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 { ProcessFileTransformationParamsParameter } from "../models";
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?: ProcessFileTransformationParamsParameter;
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?: ProcessFileTransformationParamsParameter;
161
+ transformationParams?: TransformationParams;
162
162
  }
163
163
  export declare class FileApi extends runtime.BaseAPI {
164
164
  /**
@@ -503,9 +503,11 @@ export interface DigitalOceanStorageCredentials {
503
503
  spacesAccessKey: string;
504
504
  }
505
505
  /**
506
- * An object containing a `fileName` and/or `folderPath`.
506
+ * An object containing a `fileName` and/or `folderPath` field.
507
507
  *
508
- * Both fields are optional: omitted fields will use the API key's default values, which are configured per API key via the Bytescale Dashboard.
508
+ * The `folderPath` may be relative or absolute; paths are relative to the API key's default folder (configured per API key in the Bytescale Dashboard).
509
+ *
510
+ * If a field is omitted, the API key's default values will be used for that field. These are configured per API key via the Bytescale Dashboard.
509
511
  *
510
512
  * Supports path variables.
511
513
  * @export
@@ -1422,6 +1424,12 @@ export interface ProcessFileAndSaveRequest {
1422
1424
  * @memberof ProcessFileAndSaveRequest
1423
1425
  */
1424
1426
  destination?: FilePathDefinition;
1427
+ /**
1428
+ *
1429
+ * @type {TransformationParams}
1430
+ * @memberof ProcessFileAndSaveRequest
1431
+ */
1432
+ extendedParams?: TransformationParams;
1425
1433
  /**
1426
1434
  *
1427
1435
  * @type {CopyableFileDataFileMetadata}
@@ -1585,22 +1593,6 @@ export interface ProcessFileAndSaveResponseSync {
1585
1593
  * @export
1586
1594
  */
1587
1595
  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
1596
  /**
1605
1597
  * Permissions applied to anonymous users who attempt to download files from a folder.
1606
1598
  *
@@ -1881,6 +1873,50 @@ export declare type StorageLayerSummary = InternalStorageV1 | InternalStorageV2
1881
1873
  * @export
1882
1874
  */
1883
1875
  export declare type StorageLayerUpdate = DigitalOceanStorage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
1876
+ /**
1877
+ * @type TransformationParamValue
1878
+ * A single transformation parameter provided to a Bytescale File Processing API.
1879
+ *
1880
+ * See TransformationParams for more information.
1881
+ * @export
1882
+ */
1883
+ export declare type TransformationParamValue = boolean | number | string;
1884
+ /**
1885
+ * @type TransformationParams
1886
+ * Transformation parameters provided to a Bytescale File Processing API.
1887
+ *
1888
+ * *Array support:*
1889
+ *
1890
+ * Arrays are specified by repeating the same parameter name multiple times on the querystring.
1891
+ *
1892
+ * For example, the following querystring declares a `file` parameter as an array containing two values (`/file1.txt` and `/file2.txt`):
1893
+ *
1894
+ * ```?file=/file1.txt&file=/file2.txt```
1895
+ *
1896
+ * 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:
1897
+ *
1898
+ * ```transformationParams: [{ file: "/file1.txt" }, { file: "/file2.txt" }]```
1899
+ *
1900
+ * 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.
1901
+ *
1902
+ * *Parameters are order sensitive:*
1903
+ *
1904
+ * The order of the parameters may be important. Please refer to the documentation of each File Processing API for more information.
1905
+ *
1906
+ * *Maximum URL length:*
1907
+ *
1908
+ * Bytescale URLs have a maximum total length of 1000 bytes (excluding the hostname and protocol).
1909
+ *
1910
+ * To provide a longer parameter list 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).
1911
+ *
1912
+ * The `extendedParams` field supports up to 400KB of transformation parameter data.
1913
+ * @export
1914
+ */
1915
+ export declare type TransformationParams = Array<{
1916
+ [key: string]: TransformationParamValue;
1917
+ }> | {
1918
+ [key: string]: TransformationParamValue;
1919
+ };
1884
1920
  /**
1885
1921
  * This data type specifies no update is to be performed.
1886
1922
  * @export
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.30.0",
3
+ "version": "3.31.1",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",