@bytescale/sdk 3.24.0 → 3.25.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.
@@ -912,6 +912,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
912
912
  if (params.cache !== undefined) {
913
913
  query["cache"] = params.cache;
914
914
  }
915
+ if (params.cacheOnly !== undefined) {
916
+ query["cache_only"] = params.cacheOnly;
917
+ }
915
918
  if (params.cachePerm !== undefined) {
916
919
  query["cache_perm"] = params.cachePerm;
917
920
  }
@@ -1078,7 +1081,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1078
1081
  }
1079
1082
  }
1080
1083
  /**
1081
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1084
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1082
1085
  */
1083
1086
  }, {
1084
1087
  key: "deleteFolder",
@@ -1104,7 +1107,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1104
1107
  }
1105
1108
  }
1106
1109
  /**
1107
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1110
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1108
1111
  */
1109
1112
  }, {
1110
1113
  key: "deleteFolderBatch",
@@ -1656,23 +1659,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1656
1659
  }, {
1657
1660
  key: "getCommonTransformationQueryParams",
1658
1661
  value: function getCommonTransformationQueryParams(trans) {
1659
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1662
+ return this.makeQueryParams({
1663
+ cacheOnly: null,
1664
+ cachePermanently: null,
1665
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1666
+ artifact: null
1667
+ }, {
1668
+ cacheOnly: "cache_only",
1660
1669
  cachePermanently: "cache_perm"
1661
1670
  })(trans);
1662
1671
  }
1663
1672
  }, {
1664
1673
  key: "getCommonQueryParams",
1665
1674
  value: function getCommonQueryParams(params) {
1666
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1675
+ return this.makeQueryParams({
1676
+ cache: null,
1677
+ cacheTtl: null,
1678
+ version: null,
1679
+ forceDownloadPrompt: null
1680
+ }, {
1667
1681
  cacheTtl: "cache_ttl",
1668
1682
  forceDownloadPrompt: "download"
1669
1683
  })(params);
1670
1684
  }
1685
+ /**
1686
+ * Masks the querystring params per the 'keys' array.
1687
+ *
1688
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1689
+ */
1671
1690
  }, {
1672
1691
  key: "makeQueryParams",
1673
- value: function makeQueryParams(keys, keyOverrides) {
1692
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1674
1693
  return function (data) {
1675
1694
  var result = [];
1695
+ var keys = Object.keys(keyPrototype);
1676
1696
  keys.forEach(function (key) {
1677
1697
  var _a;
1678
1698
  var value = data[key];
@@ -897,6 +897,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
897
897
  if (params.cache !== undefined) {
898
898
  query["cache"] = params.cache;
899
899
  }
900
+ if (params.cacheOnly !== undefined) {
901
+ query["cache_only"] = params.cacheOnly;
902
+ }
900
903
  if (params.cachePerm !== undefined) {
901
904
  query["cache_perm"] = params.cachePerm;
902
905
  }
@@ -1063,7 +1066,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1063
1066
  }
1064
1067
  }
1065
1068
  /**
1066
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1069
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1067
1070
  */
1068
1071
  }, {
1069
1072
  key: "deleteFolder",
@@ -1089,7 +1092,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1089
1092
  }
1090
1093
  }
1091
1094
  /**
1092
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1095
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1093
1096
  */
1094
1097
  }, {
1095
1098
  key: "deleteFolderBatch",
@@ -1641,23 +1644,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1641
1644
  }, {
1642
1645
  key: "getCommonTransformationQueryParams",
1643
1646
  value: function getCommonTransformationQueryParams(trans) {
1644
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1647
+ return this.makeQueryParams({
1648
+ cacheOnly: null,
1649
+ cachePermanently: null,
1650
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1651
+ artifact: null
1652
+ }, {
1653
+ cacheOnly: "cache_only",
1645
1654
  cachePermanently: "cache_perm"
1646
1655
  })(trans);
1647
1656
  }
1648
1657
  }, {
1649
1658
  key: "getCommonQueryParams",
1650
1659
  value: function getCommonQueryParams(params) {
1651
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1660
+ return this.makeQueryParams({
1661
+ cache: null,
1662
+ cacheTtl: null,
1663
+ version: null,
1664
+ forceDownloadPrompt: null
1665
+ }, {
1652
1666
  cacheTtl: "cache_ttl",
1653
1667
  forceDownloadPrompt: "download"
1654
1668
  })(params);
1655
1669
  }
1670
+ /**
1671
+ * Masks the querystring params per the 'keys' array.
1672
+ *
1673
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1674
+ */
1656
1675
  }, {
1657
1676
  key: "makeQueryParams",
1658
- value: function makeQueryParams(keys, keyOverrides) {
1677
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1659
1678
  return function (data) {
1660
1679
  var result = [];
1680
+ var keys = Object.keys(keyPrototype);
1661
1681
  keys.forEach(function (key) {
1662
1682
  var _a;
1663
1683
  var value = data[key];
@@ -912,6 +912,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
912
912
  if (params.cache !== undefined) {
913
913
  query["cache"] = params.cache;
914
914
  }
915
+ if (params.cacheOnly !== undefined) {
916
+ query["cache_only"] = params.cacheOnly;
917
+ }
915
918
  if (params.cachePerm !== undefined) {
916
919
  query["cache_perm"] = params.cachePerm;
917
920
  }
@@ -1078,7 +1081,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1078
1081
  }
1079
1082
  }
1080
1083
  /**
1081
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1084
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1082
1085
  */
1083
1086
  }, {
1084
1087
  key: "deleteFolder",
@@ -1104,7 +1107,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1104
1107
  }
1105
1108
  }
1106
1109
  /**
1107
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1110
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1108
1111
  */
1109
1112
  }, {
1110
1113
  key: "deleteFolderBatch",
@@ -1656,23 +1659,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1656
1659
  }, {
1657
1660
  key: "getCommonTransformationQueryParams",
1658
1661
  value: function getCommonTransformationQueryParams(trans) {
1659
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1662
+ return this.makeQueryParams({
1663
+ cacheOnly: null,
1664
+ cachePermanently: null,
1665
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1666
+ artifact: null
1667
+ }, {
1668
+ cacheOnly: "cache_only",
1660
1669
  cachePermanently: "cache_perm"
1661
1670
  })(trans);
1662
1671
  }
1663
1672
  }, {
1664
1673
  key: "getCommonQueryParams",
1665
1674
  value: function getCommonQueryParams(params) {
1666
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1675
+ return this.makeQueryParams({
1676
+ cache: null,
1677
+ cacheTtl: null,
1678
+ version: null,
1679
+ forceDownloadPrompt: null
1680
+ }, {
1667
1681
  cacheTtl: "cache_ttl",
1668
1682
  forceDownloadPrompt: "download"
1669
1683
  })(params);
1670
1684
  }
1685
+ /**
1686
+ * Masks the querystring params per the 'keys' array.
1687
+ *
1688
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1689
+ */
1671
1690
  }, {
1672
1691
  key: "makeQueryParams",
1673
- value: function makeQueryParams(keys, keyOverrides) {
1692
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1674
1693
  return function (data) {
1675
1694
  var result = [];
1695
+ var keys = Object.keys(keyPrototype);
1676
1696
  keys.forEach(function (key) {
1677
1697
  var _a;
1678
1698
  var value = data[key];
@@ -899,6 +899,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
899
899
  if (params.cache !== undefined) {
900
900
  query["cache"] = params.cache;
901
901
  }
902
+ if (params.cacheOnly !== undefined) {
903
+ query["cache_only"] = params.cacheOnly;
904
+ }
902
905
  if (params.cachePerm !== undefined) {
903
906
  query["cache_perm"] = params.cachePerm;
904
907
  }
@@ -1065,7 +1068,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1065
1068
  }
1066
1069
  }
1067
1070
  /**
1068
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1071
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1069
1072
  */
1070
1073
  }, {
1071
1074
  key: "deleteFolder",
@@ -1091,7 +1094,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1091
1094
  }
1092
1095
  }
1093
1096
  /**
1094
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1097
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1095
1098
  */
1096
1099
  }, {
1097
1100
  key: "deleteFolderBatch",
@@ -1643,23 +1646,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1643
1646
  }, {
1644
1647
  key: "getCommonTransformationQueryParams",
1645
1648
  value: function getCommonTransformationQueryParams(trans) {
1646
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1649
+ return this.makeQueryParams({
1650
+ cacheOnly: null,
1651
+ cachePermanently: null,
1652
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1653
+ artifact: null
1654
+ }, {
1655
+ cacheOnly: "cache_only",
1647
1656
  cachePermanently: "cache_perm"
1648
1657
  })(trans);
1649
1658
  }
1650
1659
  }, {
1651
1660
  key: "getCommonQueryParams",
1652
1661
  value: function getCommonQueryParams(params) {
1653
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1662
+ return this.makeQueryParams({
1663
+ cache: null,
1664
+ cacheTtl: null,
1665
+ version: null,
1666
+ forceDownloadPrompt: null
1667
+ }, {
1654
1668
  cacheTtl: "cache_ttl",
1655
1669
  forceDownloadPrompt: "download"
1656
1670
  })(params);
1657
1671
  }
1672
+ /**
1673
+ * Masks the querystring params per the 'keys' array.
1674
+ *
1675
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1676
+ */
1658
1677
  }, {
1659
1678
  key: "makeQueryParams",
1660
- value: function makeQueryParams(keys, keyOverrides) {
1679
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1661
1680
  return function (data) {
1662
1681
  var result = [];
1682
+ var keys = Object.keys(keyPrototype);
1663
1683
  keys.forEach(function (key) {
1664
1684
  var _a;
1665
1685
  var value = data[key];
@@ -25,6 +25,11 @@ export declare class UrlBuilder {
25
25
  private static getBaseUrl;
26
26
  private static getCommonTransformationQueryParams;
27
27
  private static getCommonQueryParams;
28
+ /**
29
+ * Masks the querystring params per the 'keys' array.
30
+ *
31
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
32
+ */
28
33
  private static makeQueryParams;
29
34
  private static getTransformationParams;
30
35
  private static addQueryParams;
@@ -23,11 +23,13 @@ export interface UrlBuilderParams {
23
23
  export declare type UrlBuilderOptions = UrlBuilderOptionsRaw | UrlBuilderTransformationOptions;
24
24
  export declare type UrlBuilderTransformationOptions = UrlBuilderTransformationApiOptions | UrlBuilderOptionsPreset;
25
25
  export declare type UrlBuilderTransformationApiOptions = UrlBuilderOptionsImage | UrlBuilderOptionsVideo | UrlBuilderOptionsAudio | UrlBuilderOptionsArchive;
26
- export interface UrlBuilderOptionsBase {
26
+ export interface UrlBuilderOptionsBase extends NonDeprecatedCommonQueryParams, DeprecatedCommonQueryParams {
27
27
  /**
28
- * @deprecated This field has no effect: the 'auth' querystring parameter is no-longer required by the Bytescale CDN. You may remove this field from your code.
28
+ * The base URL of the Bytescale CDN. (Excludes trailing "/".)
29
29
  */
30
- auth?: boolean;
30
+ cdnUrl?: string;
31
+ }
32
+ export interface NonDeprecatedCommonQueryParams {
31
33
  /**
32
34
  * Specifies whether to use caching for this request, or to always re-request the file.
33
35
  *
@@ -42,10 +44,6 @@ export interface UrlBuilderOptionsBase {
42
44
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
43
45
  */
44
46
  cacheTtl?: number;
45
- /**
46
- * The base URL of the Bytescale CDN. (Excludes trailing "/".)
47
- */
48
- cdnUrl?: string;
49
47
  /**
50
48
  * Forces the browser to display a download prompt for the file, instead of displaying the file in the browser.
51
49
  *
@@ -63,6 +61,12 @@ export interface UrlBuilderOptionsBase {
63
61
  */
64
62
  version?: string;
65
63
  }
64
+ export interface DeprecatedCommonQueryParams {
65
+ /**
66
+ * @deprecated This field has no effect: the 'auth' querystring parameter is no-longer required by the Bytescale CDN. You may remove this field from your code.
67
+ */
68
+ auth?: boolean;
69
+ }
66
70
  export interface UrlBuilderOptionsRaw extends UrlBuilderOptionsBase {
67
71
  transformation?: undefined;
68
72
  }
@@ -127,7 +131,8 @@ export interface UrlBuilderOptionsTransformationApi<T> extends UrlBuilderOptions
127
131
  */
128
132
  transformationParams?: T | T[];
129
133
  }
130
- export interface UrlBuilderOptionsTransformation extends UrlBuilderOptionsBase {
134
+ export declare type UrlBuilderOptionsTransformation = UrlBuilderOptionsTransformationOnly & UrlBuilderOptionsBase;
135
+ export interface UrlBuilderOptionsTransformationOnly {
131
136
  /**
132
137
  * The transformation artifact to download.
133
138
  *
@@ -138,6 +143,16 @@ export interface UrlBuilderOptionsTransformation extends UrlBuilderOptionsBase {
138
143
  * Default: "/"
139
144
  */
140
145
  artifact?: string;
146
+ /**
147
+ * Only serve transformations from the cache; do not perform new transformations on cache miss.
148
+ *
149
+ * If true, then if the transformation result does not exist in the cache, a 404 will be returned. No transformations will be performed.
150
+ *
151
+ * If false, then if the transformation result does not exist in the cache, a new transformation will be performed to produce the result.
152
+ *
153
+ * Default: false
154
+ */
155
+ cacheOnly?: boolean;
141
156
  /**
142
157
  * Specifies whether to permanently cache the transformed result in the Bytescale CDN.
143
158
  *
@@ -78,6 +78,16 @@ export interface ProcessFileParams {
78
78
  * Default: true
79
79
  */
80
80
  cache?: boolean;
81
+ /**
82
+ * Only serve transformations from the cache; do not perform new transformations on cache miss.
83
+ *
84
+ * If `true`, then if the transformation result does not exist in the cache, a 404 will be returned. No transformations will be performed.
85
+ *
86
+ * If `false`, then if the transformation result does not exist in the cache, a new transformation will be performed to produce the result.
87
+ *
88
+ * Default: `false`
89
+ */
90
+ cacheOnly?: boolean;
81
91
  /**
82
92
  * Specifies whether to cache the transformed result in the Bytescale CDN perma-cache.
83
93
  *
@@ -57,11 +57,11 @@ export declare class FolderApi extends runtime.BaseAPI {
57
57
  */
58
58
  copyFolderBatch(params: CopyFolderBatchOperationParams): Promise<AsyncResponse>;
59
59
  /**
60
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
60
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
61
61
  */
62
62
  deleteFolder(params: DeleteFolderOperationParams): Promise<AsyncResponse>;
63
63
  /**
64
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
64
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
65
65
  */
66
66
  deleteFolderBatch(params: DeleteFolderBatchOperationParams): Promise<AsyncResponse>;
67
67
  /**
@@ -266,15 +266,10 @@ export interface CopyFolderRequest {
266
266
  */
267
267
  copyFiles?: boolean;
268
268
  /**
269
- * If `true` then copies files from folders that have overridden storage settings, else skips them.
270
269
  *
271
- * If the `source` folder overrides its storage settings, then its files will only be copied if this flag is `true`.
270
+ * If `false` then if a file's parent folder has overridden storage settings, the file won't be copied.
272
271
  *
273
- * If the `source` folder inherits its storage settings, then its files will be copied regardless of this flag.
274
- *
275
- * In all cases, files will only be copied if `copyFiles` is also set to `true`.
276
- *
277
- * You can ignore this setting if your account does not use folders with overridden storage settings, such as custom AWS S3 buckets.
272
+ * If you don't use folders with custom storage settings (like AWS S3 buckets), you don't need to worry about this setting.
278
273
  *
279
274
  * Conditional: `copyVirtualFolders` and `copyOverriddenStorage` cannot both be `true`.
280
275
  *
@@ -409,9 +404,9 @@ export interface DeleteFolderBatchRequest {
409
404
  /**
410
405
  * Request body for DeleteFolder.
411
406
  *
412
- * If the folder has overridden storage settings, then no files will be deleted.
413
- *
414
407
  * You can use ListFolder to preview the operation using the `dryRun` parameter.
408
+ *
409
+ * *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won't be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder.
415
410
  * @export
416
411
  * @interface DeleteFolderRequest
417
412
  */
@@ -912,6 +912,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
912
912
  if (params.cache !== undefined) {
913
913
  query["cache"] = params.cache;
914
914
  }
915
+ if (params.cacheOnly !== undefined) {
916
+ query["cache_only"] = params.cacheOnly;
917
+ }
915
918
  if (params.cachePerm !== undefined) {
916
919
  query["cache_perm"] = params.cachePerm;
917
920
  }
@@ -1078,7 +1081,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1078
1081
  }
1079
1082
  }
1080
1083
  /**
1081
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1084
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1082
1085
  */
1083
1086
  }, {
1084
1087
  key: "deleteFolder",
@@ -1104,7 +1107,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1104
1107
  }
1105
1108
  }
1106
1109
  /**
1107
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1110
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1108
1111
  */
1109
1112
  }, {
1110
1113
  key: "deleteFolderBatch",
@@ -1656,23 +1659,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1656
1659
  }, {
1657
1660
  key: "getCommonTransformationQueryParams",
1658
1661
  value: function getCommonTransformationQueryParams(trans) {
1659
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1662
+ return this.makeQueryParams({
1663
+ cacheOnly: null,
1664
+ cachePermanently: null,
1665
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1666
+ artifact: null
1667
+ }, {
1668
+ cacheOnly: "cache_only",
1660
1669
  cachePermanently: "cache_perm"
1661
1670
  })(trans);
1662
1671
  }
1663
1672
  }, {
1664
1673
  key: "getCommonQueryParams",
1665
1674
  value: function getCommonQueryParams(params) {
1666
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1675
+ return this.makeQueryParams({
1676
+ cache: null,
1677
+ cacheTtl: null,
1678
+ version: null,
1679
+ forceDownloadPrompt: null
1680
+ }, {
1667
1681
  cacheTtl: "cache_ttl",
1668
1682
  forceDownloadPrompt: "download"
1669
1683
  })(params);
1670
1684
  }
1685
+ /**
1686
+ * Masks the querystring params per the 'keys' array.
1687
+ *
1688
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1689
+ */
1671
1690
  }, {
1672
1691
  key: "makeQueryParams",
1673
- value: function makeQueryParams(keys, keyOverrides) {
1692
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1674
1693
  return function (data) {
1675
1694
  var result = [];
1695
+ var keys = Object.keys(keyPrototype);
1676
1696
  keys.forEach(function (key) {
1677
1697
  var _a;
1678
1698
  var value = data[key];
@@ -897,6 +897,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
897
897
  if (params.cache !== undefined) {
898
898
  query["cache"] = params.cache;
899
899
  }
900
+ if (params.cacheOnly !== undefined) {
901
+ query["cache_only"] = params.cacheOnly;
902
+ }
900
903
  if (params.cachePerm !== undefined) {
901
904
  query["cache_perm"] = params.cachePerm;
902
905
  }
@@ -1063,7 +1066,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1063
1066
  }
1064
1067
  }
1065
1068
  /**
1066
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1069
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1067
1070
  */
1068
1071
  }, {
1069
1072
  key: "deleteFolder",
@@ -1089,7 +1092,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1089
1092
  }
1090
1093
  }
1091
1094
  /**
1092
- * 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 using the `dryRun` parameter. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1095
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *When deleting a folder with external storage:* if the folder at `folderPath` has overridden storage settings (like an AWS S3 bucket), no files will be deleted, regardless of the parameters you pass. Only the mapping will be removed. If the folder at `folderPath` has inherited storage settings but includes subfolders with overridden storage settings, files in those subfolders won\'t be deleted, regardless of the parameters you pass. In summary, files in folders with overridden storage are never deleted, unless you directly delete a subfolder of such a folder. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1093
1096
  */
1094
1097
  }, {
1095
1098
  key: "deleteFolderBatch",
@@ -1641,23 +1644,40 @@ var UrlBuilder = /*#__PURE__*/function () {
1641
1644
  }, {
1642
1645
  key: "getCommonTransformationQueryParams",
1643
1646
  value: function getCommonTransformationQueryParams(trans) {
1644
- return this.makeQueryParams(["cachePermanently", "artifact"], {
1647
+ return this.makeQueryParams({
1648
+ cacheOnly: null,
1649
+ cachePermanently: null,
1650
+ // Keep this as the last param: this is the convention for transformation URLs (although not required).
1651
+ artifact: null
1652
+ }, {
1653
+ cacheOnly: "cache_only",
1645
1654
  cachePermanently: "cache_perm"
1646
1655
  })(trans);
1647
1656
  }
1648
1657
  }, {
1649
1658
  key: "getCommonQueryParams",
1650
1659
  value: function getCommonQueryParams(params) {
1651
- return this.makeQueryParams(["cache", "cacheTtl", "version", "forceDownloadPrompt"], {
1660
+ return this.makeQueryParams({
1661
+ cache: null,
1662
+ cacheTtl: null,
1663
+ version: null,
1664
+ forceDownloadPrompt: null
1665
+ }, {
1652
1666
  cacheTtl: "cache_ttl",
1653
1667
  forceDownloadPrompt: "download"
1654
1668
  })(params);
1655
1669
  }
1670
+ /**
1671
+ * Masks the querystring params per the 'keys' array.
1672
+ *
1673
+ * Order sensitive: querystring params will appear per the order of the 'keys' array.
1674
+ */
1656
1675
  }, {
1657
1676
  key: "makeQueryParams",
1658
- value: function makeQueryParams(keys, keyOverrides) {
1677
+ value: function makeQueryParams(keyPrototype, keyOverrides) {
1659
1678
  return function (data) {
1660
1679
  var result = [];
1680
+ var keys = Object.keys(keyPrototype);
1661
1681
  keys.forEach(function (key) {
1662
1682
  var _a;
1663
1683
  var value = data[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.24.0",
3
+ "version": "3.25.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",