@bytescale/sdk 3.44.0 → 3.46.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.
@@ -520,7 +520,11 @@ var BaseAPI = /*#__PURE__*/function () {
520
520
  //
521
521
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
522
522
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
523
- cache: "no-store"
523
+ cache: "no-store",
524
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
525
+ // unless the following is set.
526
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
527
+ duplex: "half"
524
528
  })), function (_BytescaleApiClientCo) {
525
529
  response = _BytescaleApiClientCo;
526
530
  });
@@ -971,8 +975,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
975
  if (params.cacheTtl !== undefined) {
972
976
  query["cache_ttl"] = params.cacheTtl;
973
977
  }
974
- if (params.cacheTtlNotFound !== undefined) {
975
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
978
+ if (params.cacheTtl404 !== undefined) {
979
+ query["cache_ttl_404"] = params.cacheTtl404;
976
980
  }
977
981
  if (params.version !== undefined) {
978
982
  query["version"] = params.version;
@@ -1045,8 +1049,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1045
1049
  if (params.cacheTtl !== undefined) {
1046
1050
  query["cache_ttl"] = params.cacheTtl;
1047
1051
  }
1048
- if (params.cacheTtlNotFound !== undefined) {
1049
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1052
+ if (params.cacheTtl404 !== undefined) {
1053
+ query["cache_ttl_404"] = params.cacheTtl404;
1050
1054
  }
1051
1055
  if (params.transformationParams !== undefined) {
1052
1056
  query["transformationParams"] = params.transformationParams;
@@ -1206,7 +1210,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1206
1210
  }
1207
1211
  }
1208
1212
  /**
1209
- * 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.
1213
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1210
1214
  */
1211
1215
  }, {
1212
1216
  key: "deleteFolder",
@@ -1232,7 +1236,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1232
1236
  }
1233
1237
  }
1234
1238
  /**
1235
- * 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.
1239
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1236
1240
  */
1237
1241
  }, {
1238
1242
  key: "deleteFolderBatch",
@@ -1802,12 +1806,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1802
1806
  return this.makeQueryParams({
1803
1807
  cache: null,
1804
1808
  cacheTtl: null,
1805
- cacheTtlNotFound: null,
1809
+ cacheTtl404: null,
1806
1810
  version: null,
1807
1811
  forceDownloadPrompt: null
1808
1812
  }, {
1809
1813
  cacheTtl: "cache_ttl",
1810
- cacheTtlNotFound: "cache_ttl_not_found",
1814
+ cacheTtl404: "cache_ttl_404",
1811
1815
  forceDownloadPrompt: "download"
1812
1816
  })(params);
1813
1817
  }
@@ -505,7 +505,11 @@ var BaseAPI = /*#__PURE__*/function () {
505
505
  //
506
506
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
507
507
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
508
- cache: "no-store"
508
+ cache: "no-store",
509
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
510
+ // unless the following is set.
511
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
512
+ duplex: "half"
509
513
  })), function (_BytescaleApiClientCo) {
510
514
  response = _BytescaleApiClientCo;
511
515
  });
@@ -956,8 +960,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
956
960
  if (params.cacheTtl !== undefined) {
957
961
  query["cache_ttl"] = params.cacheTtl;
958
962
  }
959
- if (params.cacheTtlNotFound !== undefined) {
960
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
963
+ if (params.cacheTtl404 !== undefined) {
964
+ query["cache_ttl_404"] = params.cacheTtl404;
961
965
  }
962
966
  if (params.version !== undefined) {
963
967
  query["version"] = params.version;
@@ -1030,8 +1034,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1030
1034
  if (params.cacheTtl !== undefined) {
1031
1035
  query["cache_ttl"] = params.cacheTtl;
1032
1036
  }
1033
- if (params.cacheTtlNotFound !== undefined) {
1034
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1037
+ if (params.cacheTtl404 !== undefined) {
1038
+ query["cache_ttl_404"] = params.cacheTtl404;
1035
1039
  }
1036
1040
  if (params.transformationParams !== undefined) {
1037
1041
  query["transformationParams"] = params.transformationParams;
@@ -1191,7 +1195,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1191
1195
  }
1192
1196
  }
1193
1197
  /**
1194
- * 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.
1198
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1195
1199
  */
1196
1200
  }, {
1197
1201
  key: "deleteFolder",
@@ -1217,7 +1221,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1217
1221
  }
1218
1222
  }
1219
1223
  /**
1220
- * 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.
1224
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1221
1225
  */
1222
1226
  }, {
1223
1227
  key: "deleteFolderBatch",
@@ -1787,12 +1791,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1787
1791
  return this.makeQueryParams({
1788
1792
  cache: null,
1789
1793
  cacheTtl: null,
1790
- cacheTtlNotFound: null,
1794
+ cacheTtl404: null,
1791
1795
  version: null,
1792
1796
  forceDownloadPrompt: null
1793
1797
  }, {
1794
1798
  cacheTtl: "cache_ttl",
1795
- cacheTtlNotFound: "cache_ttl_not_found",
1799
+ cacheTtl404: "cache_ttl_404",
1796
1800
  forceDownloadPrompt: "download"
1797
1801
  })(params);
1798
1802
  }
@@ -520,7 +520,11 @@ var BaseAPI = /*#__PURE__*/function () {
520
520
  //
521
521
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
522
522
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
523
- cache: "no-store"
523
+ cache: "no-store",
524
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
525
+ // unless the following is set.
526
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
527
+ duplex: "half"
524
528
  })), function (_BytescaleApiClientCo) {
525
529
  response = _BytescaleApiClientCo;
526
530
  });
@@ -971,8 +975,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
975
  if (params.cacheTtl !== undefined) {
972
976
  query["cache_ttl"] = params.cacheTtl;
973
977
  }
974
- if (params.cacheTtlNotFound !== undefined) {
975
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
978
+ if (params.cacheTtl404 !== undefined) {
979
+ query["cache_ttl_404"] = params.cacheTtl404;
976
980
  }
977
981
  if (params.version !== undefined) {
978
982
  query["version"] = params.version;
@@ -1045,8 +1049,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1045
1049
  if (params.cacheTtl !== undefined) {
1046
1050
  query["cache_ttl"] = params.cacheTtl;
1047
1051
  }
1048
- if (params.cacheTtlNotFound !== undefined) {
1049
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1052
+ if (params.cacheTtl404 !== undefined) {
1053
+ query["cache_ttl_404"] = params.cacheTtl404;
1050
1054
  }
1051
1055
  if (params.transformationParams !== undefined) {
1052
1056
  query["transformationParams"] = params.transformationParams;
@@ -1206,7 +1210,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1206
1210
  }
1207
1211
  }
1208
1212
  /**
1209
- * 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.
1213
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1210
1214
  */
1211
1215
  }, {
1212
1216
  key: "deleteFolder",
@@ -1232,7 +1236,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1232
1236
  }
1233
1237
  }
1234
1238
  /**
1235
- * 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.
1239
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1236
1240
  */
1237
1241
  }, {
1238
1242
  key: "deleteFolderBatch",
@@ -1802,12 +1806,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1802
1806
  return this.makeQueryParams({
1803
1807
  cache: null,
1804
1808
  cacheTtl: null,
1805
- cacheTtlNotFound: null,
1809
+ cacheTtl404: null,
1806
1810
  version: null,
1807
1811
  forceDownloadPrompt: null
1808
1812
  }, {
1809
1813
  cacheTtl: "cache_ttl",
1810
- cacheTtlNotFound: "cache_ttl_not_found",
1814
+ cacheTtl404: "cache_ttl_404",
1811
1815
  forceDownloadPrompt: "download"
1812
1816
  })(params);
1813
1817
  }
@@ -2652,6 +2656,7 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2652
2656
  headers: headers,
2653
2657
  body: content,
2654
2658
  signal: signal,
2659
+ duplex: "half",
2655
2660
  cache: "no-store" // Required for Next.js's Fetch implementation, which caches POST/PUT requests by default.
2656
2661
  }), function (response) {
2657
2662
  return {
@@ -507,7 +507,11 @@ var BaseAPI = /*#__PURE__*/function () {
507
507
  //
508
508
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
509
509
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
510
- cache: "no-store"
510
+ cache: "no-store",
511
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
512
+ // unless the following is set.
513
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
514
+ duplex: "half"
511
515
  })), function (_BytescaleApiClientCo) {
512
516
  response = _BytescaleApiClientCo;
513
517
  });
@@ -958,8 +962,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
958
962
  if (params.cacheTtl !== undefined) {
959
963
  query["cache_ttl"] = params.cacheTtl;
960
964
  }
961
- if (params.cacheTtlNotFound !== undefined) {
962
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
965
+ if (params.cacheTtl404 !== undefined) {
966
+ query["cache_ttl_404"] = params.cacheTtl404;
963
967
  }
964
968
  if (params.version !== undefined) {
965
969
  query["version"] = params.version;
@@ -1032,8 +1036,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1032
1036
  if (params.cacheTtl !== undefined) {
1033
1037
  query["cache_ttl"] = params.cacheTtl;
1034
1038
  }
1035
- if (params.cacheTtlNotFound !== undefined) {
1036
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1039
+ if (params.cacheTtl404 !== undefined) {
1040
+ query["cache_ttl_404"] = params.cacheTtl404;
1037
1041
  }
1038
1042
  if (params.transformationParams !== undefined) {
1039
1043
  query["transformationParams"] = params.transformationParams;
@@ -1193,7 +1197,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1193
1197
  }
1194
1198
  }
1195
1199
  /**
1196
- * 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.
1200
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1197
1201
  */
1198
1202
  }, {
1199
1203
  key: "deleteFolder",
@@ -1219,7 +1223,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1219
1223
  }
1220
1224
  }
1221
1225
  /**
1222
- * 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.
1226
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1223
1227
  */
1224
1228
  }, {
1225
1229
  key: "deleteFolderBatch",
@@ -1789,12 +1793,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1789
1793
  return this.makeQueryParams({
1790
1794
  cache: null,
1791
1795
  cacheTtl: null,
1792
- cacheTtlNotFound: null,
1796
+ cacheTtl404: null,
1793
1797
  version: null,
1794
1798
  forceDownloadPrompt: null
1795
1799
  }, {
1796
1800
  cacheTtl: "cache_ttl",
1797
- cacheTtlNotFound: "cache_ttl_not_found",
1801
+ cacheTtl404: "cache_ttl_404",
1798
1802
  forceDownloadPrompt: "download"
1799
1803
  })(params);
1800
1804
  }
@@ -2647,6 +2651,7 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2647
2651
  headers: headers,
2648
2652
  body: content,
2649
2653
  signal: signal,
2654
+ duplex: "half",
2650
2655
  cache: "no-store" // Required for Next.js's Fetch implementation, which caches POST/PUT requests by default.
2651
2656
  }), function (response) {
2652
2657
  return {
@@ -49,7 +49,7 @@ export interface NonDeprecatedCommonQueryParams {
49
49
  *
50
50
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
51
51
  */
52
- cacheTtlNotFound?: number;
52
+ cacheTtl404?: number;
53
53
  /**
54
54
  * Forces the browser to display a download prompt for the file, instead of displaying the file in the browser.
55
55
  *
@@ -48,7 +48,7 @@ export interface DownloadFileParams {
48
48
  *
49
49
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
50
50
  */
51
- cacheTtlNotFound?: number;
51
+ cacheTtl404?: number;
52
52
  /**
53
53
  * Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value.
54
54
  *
@@ -126,7 +126,7 @@ export interface ProcessFileParams {
126
126
  *
127
127
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
128
128
  */
129
- cacheTtlNotFound?: number;
129
+ cacheTtl404?: number;
130
130
  /**
131
131
  * Parameters to submit to the File Processing API (e.g. the Image Processing API).
132
132
  *
@@ -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. 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.
60
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. 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. 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.
64
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. 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
  /**
@@ -343,9 +343,9 @@ export interface CopyFolderRequest {
343
343
  */
344
344
  copyOverriddenStorage?: boolean;
345
345
  /**
346
- * If `true` then copies virtual folders at the current path and below, else only files will be copied.
346
+ * If `true` then copies virtual folders at the current path and below (virtual folders are folders created using the PutFolder operation).
347
347
  *
348
- * Virtual folders are folders that have been created using the PutFolder operation.
348
+ * If `false` then virtual folders will not be copied, meaning no folder settings will be copied to the destination, but the files of any virtual folders will still be copied if `copyFiles` is set to `true`.
349
349
  *
350
350
  * Conditional: `copyVirtualFolders` and `copyOverriddenStorage` cannot both be `true`.
351
351
  *
@@ -536,7 +536,7 @@ export interface DeleteFolderBatchRequest {
536
536
  *
537
537
  * You can use ListFolder to preview the operation using the `dryRun` parameter.
538
538
  *
539
- * *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.
539
+ * *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed.
540
540
  * @export
541
541
  * @interface DeleteFolderRequest
542
542
  */
@@ -550,7 +550,7 @@ export interface DeleteFolderRequest {
550
550
  */
551
551
  deleteFiles?: boolean;
552
552
  /**
553
- * If `true` then deletes folder settings.
553
+ * If `true` then deletes virtual folders (virtual folders are folders created using the PutFolder operation).
554
554
  *
555
555
  * Default: true
556
556
  * @type {boolean}
@@ -890,7 +890,7 @@ export interface FileSummary {
890
890
  */
891
891
  export type FileSummaryTypeEnum = "File";
892
892
  /**
893
- *
893
+ * Full details of a given folder.
894
894
  * @export
895
895
  * @interface FolderDetails
896
896
  */
@@ -93,7 +93,9 @@ export declare class BytescaleApiError extends Error {
93
93
  readonly details: any | undefined;
94
94
  constructor(response: ErrorResponse);
95
95
  }
96
- export type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
96
+ export type FetchAPI = (input: RequestInfo | URL, init?: RequestInit & {
97
+ duplex: "half";
98
+ }) => Promise<Response>;
97
99
  export type Json = any;
98
100
  export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
99
101
  export type HTTPHeaders = {
@@ -520,7 +520,11 @@ var BaseAPI = /*#__PURE__*/function () {
520
520
  //
521
521
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
522
522
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
523
- cache: "no-store"
523
+ cache: "no-store",
524
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
525
+ // unless the following is set.
526
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
527
+ duplex: "half"
524
528
  })), function (_BytescaleApiClientCo) {
525
529
  response = _BytescaleApiClientCo;
526
530
  });
@@ -971,8 +975,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
975
  if (params.cacheTtl !== undefined) {
972
976
  query["cache_ttl"] = params.cacheTtl;
973
977
  }
974
- if (params.cacheTtlNotFound !== undefined) {
975
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
978
+ if (params.cacheTtl404 !== undefined) {
979
+ query["cache_ttl_404"] = params.cacheTtl404;
976
980
  }
977
981
  if (params.version !== undefined) {
978
982
  query["version"] = params.version;
@@ -1045,8 +1049,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1045
1049
  if (params.cacheTtl !== undefined) {
1046
1050
  query["cache_ttl"] = params.cacheTtl;
1047
1051
  }
1048
- if (params.cacheTtlNotFound !== undefined) {
1049
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1052
+ if (params.cacheTtl404 !== undefined) {
1053
+ query["cache_ttl_404"] = params.cacheTtl404;
1050
1054
  }
1051
1055
  if (params.transformationParams !== undefined) {
1052
1056
  query["transformationParams"] = params.transformationParams;
@@ -1206,7 +1210,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1206
1210
  }
1207
1211
  }
1208
1212
  /**
1209
- * 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.
1213
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1210
1214
  */
1211
1215
  }, {
1212
1216
  key: "deleteFolder",
@@ -1232,7 +1236,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1232
1236
  }
1233
1237
  }
1234
1238
  /**
1235
- * 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.
1239
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1236
1240
  */
1237
1241
  }, {
1238
1242
  key: "deleteFolderBatch",
@@ -1802,12 +1806,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1802
1806
  return this.makeQueryParams({
1803
1807
  cache: null,
1804
1808
  cacheTtl: null,
1805
- cacheTtlNotFound: null,
1809
+ cacheTtl404: null,
1806
1810
  version: null,
1807
1811
  forceDownloadPrompt: null
1808
1812
  }, {
1809
1813
  cacheTtl: "cache_ttl",
1810
- cacheTtlNotFound: "cache_ttl_not_found",
1814
+ cacheTtl404: "cache_ttl_404",
1811
1815
  forceDownloadPrompt: "download"
1812
1816
  })(params);
1813
1817
  }
@@ -2509,6 +2513,7 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2509
2513
  headers: headers,
2510
2514
  body: content,
2511
2515
  signal: signal,
2516
+ duplex: "half",
2512
2517
  cache: "no-store" // Required for Next.js's Fetch implementation, which caches POST/PUT requests by default.
2513
2518
  }), function (response) {
2514
2519
  return {
@@ -505,7 +505,11 @@ var BaseAPI = /*#__PURE__*/function () {
505
505
  //
506
506
  // However, this is probably a good idea, even for all GET requests, as if the user is refreshing a JWT
507
507
  // or downloading a file via 'FileApi.downloadFile', then they'll likely want the latest.
508
- cache: "no-store"
508
+ cache: "no-store",
509
+ // Node does not support full duplex, so default fetch implementations will fail with "RequestInit: duplex option is required when sending a body"
510
+ // unless the following is set.
511
+ // https://github.com/nodejs/node/issues/46221#issuecomment-1383246036
512
+ duplex: "half"
509
513
  })), function (_BytescaleApiClientCo) {
510
514
  response = _BytescaleApiClientCo;
511
515
  });
@@ -956,8 +960,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
956
960
  if (params.cacheTtl !== undefined) {
957
961
  query["cache_ttl"] = params.cacheTtl;
958
962
  }
959
- if (params.cacheTtlNotFound !== undefined) {
960
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
963
+ if (params.cacheTtl404 !== undefined) {
964
+ query["cache_ttl_404"] = params.cacheTtl404;
961
965
  }
962
966
  if (params.version !== undefined) {
963
967
  query["version"] = params.version;
@@ -1030,8 +1034,8 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1030
1034
  if (params.cacheTtl !== undefined) {
1031
1035
  query["cache_ttl"] = params.cacheTtl;
1032
1036
  }
1033
- if (params.cacheTtlNotFound !== undefined) {
1034
- query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1037
+ if (params.cacheTtl404 !== undefined) {
1038
+ query["cache_ttl_404"] = params.cacheTtl404;
1035
1039
  }
1036
1040
  if (params.transformationParams !== undefined) {
1037
1041
  query["transformationParams"] = params.transformationParams;
@@ -1191,7 +1195,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1191
1195
  }
1192
1196
  }
1193
1197
  /**
1194
- * 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.
1198
+ * Deletes a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1195
1199
  */
1196
1200
  }, {
1197
1201
  key: "deleteFolder",
@@ -1217,7 +1221,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1217
1221
  }
1218
1222
  }
1219
1223
  /**
1220
- * 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.
1224
+ * Deletes multiple folders asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter. *External storage:* external files are only deleted when you directly delete a file or subfolder of a folder that has external storage configured. If you delete the folder itself, only the mapping is removed. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.
1221
1225
  */
1222
1226
  }, {
1223
1227
  key: "deleteFolderBatch",
@@ -1787,12 +1791,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1787
1791
  return this.makeQueryParams({
1788
1792
  cache: null,
1789
1793
  cacheTtl: null,
1790
- cacheTtlNotFound: null,
1794
+ cacheTtl404: null,
1791
1795
  version: null,
1792
1796
  forceDownloadPrompt: null
1793
1797
  }, {
1794
1798
  cacheTtl: "cache_ttl",
1795
- cacheTtlNotFound: "cache_ttl_not_found",
1799
+ cacheTtl404: "cache_ttl_404",
1796
1800
  forceDownloadPrompt: "download"
1797
1801
  })(params);
1798
1802
  }
@@ -2494,6 +2498,7 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2494
2498
  headers: headers,
2495
2499
  body: content,
2496
2500
  signal: signal,
2501
+ duplex: "half",
2497
2502
  cache: "no-store" // Required for Next.js's Fetch implementation, which caches POST/PUT requests by default.
2498
2503
  }), function (response) {
2499
2504
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.44.0",
3
+ "version": "3.46.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",
@@ -110,7 +110,7 @@
110
110
  "ts-loader": "9.5.1",
111
111
  "tsc-alias": "1.2.10",
112
112
  "typescript": "4.9.5",
113
- "webpack": "5.90.3",
113
+ "webpack": "5.94.0",
114
114
  "webpack-cli": "4.10.0",
115
115
  "webpack-node-externals": "2.5.2",
116
116
  "webpack-shell-plugin-next": "2.3.1"