@bytescale/sdk 3.37.0 → 3.38.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.
package/README.md CHANGED
@@ -536,6 +536,23 @@ UrlBuilder.url({
536
536
 
537
537
  [Archive Processing API Docs »](https://www.bytescale.com/docs/archive-processing-api)
538
538
 
539
+ #### Antivirus
540
+
541
+ To scan the file `document.docx` for viruses:
542
+
543
+ ```javascript
544
+ // Returns: "https://upcdn.io/1234abc/antivirus/example.zip"
545
+ UrlBuilder.url({
546
+ accountId: "1234abc",
547
+ filePath: "/example.zip",
548
+ options: {
549
+ transformation: "antivirus"
550
+ }
551
+ });
552
+ ```
553
+
554
+ [Antivirus API Docs »](https://www.bytescale.com/docs/antivirus-api)
555
+
539
556
  ## 🙋 Can I use my own storage?
540
557
 
541
558
  Bytescale supports AWS S3, Cloudflare R2, Google Storage, DigitalOcean, and Bytescale Storage.
@@ -781,7 +781,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
781
781
  key: "resetCache",
782
782
  value:
783
783
  /**
784
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
784
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
785
785
  */
786
786
  function resetCache(params) {
787
787
  try {
@@ -971,6 +971,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
971
  if (params.cacheTtl !== undefined) {
972
972
  query["cache_ttl"] = params.cacheTtl;
973
973
  }
974
+ if (params.cacheTtlNotFound !== undefined) {
975
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
976
+ }
974
977
  if (params.version !== undefined) {
975
978
  query["version"] = params.version;
976
979
  }
@@ -1042,6 +1045,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1042
1045
  if (params.cacheTtl !== undefined) {
1043
1046
  query["cache_ttl"] = params.cacheTtl;
1044
1047
  }
1048
+ if (params.cacheTtlNotFound !== undefined) {
1049
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1050
+ }
1045
1051
  if (params.transformationParams !== undefined) {
1046
1052
  query["transformationParams"] = params.transformationParams;
1047
1053
  }
@@ -1796,10 +1802,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1796
1802
  return this.makeQueryParams({
1797
1803
  cache: null,
1798
1804
  cacheTtl: null,
1805
+ cacheTtlNotFound: null,
1799
1806
  version: null,
1800
1807
  forceDownloadPrompt: null
1801
1808
  }, {
1802
1809
  cacheTtl: "cache_ttl",
1810
+ cacheTtlNotFound: "cache_ttl_not_found",
1803
1811
  forceDownloadPrompt: "download"
1804
1812
  })(params);
1805
1813
  }
@@ -766,7 +766,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
766
766
  key: "resetCache",
767
767
  value:
768
768
  /**
769
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
769
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
770
770
  */
771
771
  function resetCache(params) {
772
772
  try {
@@ -956,6 +956,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
956
956
  if (params.cacheTtl !== undefined) {
957
957
  query["cache_ttl"] = params.cacheTtl;
958
958
  }
959
+ if (params.cacheTtlNotFound !== undefined) {
960
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
961
+ }
959
962
  if (params.version !== undefined) {
960
963
  query["version"] = params.version;
961
964
  }
@@ -1027,6 +1030,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1027
1030
  if (params.cacheTtl !== undefined) {
1028
1031
  query["cache_ttl"] = params.cacheTtl;
1029
1032
  }
1033
+ if (params.cacheTtlNotFound !== undefined) {
1034
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1035
+ }
1030
1036
  if (params.transformationParams !== undefined) {
1031
1037
  query["transformationParams"] = params.transformationParams;
1032
1038
  }
@@ -1781,10 +1787,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1781
1787
  return this.makeQueryParams({
1782
1788
  cache: null,
1783
1789
  cacheTtl: null,
1790
+ cacheTtlNotFound: null,
1784
1791
  version: null,
1785
1792
  forceDownloadPrompt: null
1786
1793
  }, {
1787
1794
  cacheTtl: "cache_ttl",
1795
+ cacheTtlNotFound: "cache_ttl_not_found",
1788
1796
  forceDownloadPrompt: "download"
1789
1797
  })(params);
1790
1798
  }
@@ -781,7 +781,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
781
781
  key: "resetCache",
782
782
  value:
783
783
  /**
784
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
784
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
785
785
  */
786
786
  function resetCache(params) {
787
787
  try {
@@ -971,6 +971,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
971
  if (params.cacheTtl !== undefined) {
972
972
  query["cache_ttl"] = params.cacheTtl;
973
973
  }
974
+ if (params.cacheTtlNotFound !== undefined) {
975
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
976
+ }
974
977
  if (params.version !== undefined) {
975
978
  query["version"] = params.version;
976
979
  }
@@ -1042,6 +1045,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1042
1045
  if (params.cacheTtl !== undefined) {
1043
1046
  query["cache_ttl"] = params.cacheTtl;
1044
1047
  }
1048
+ if (params.cacheTtlNotFound !== undefined) {
1049
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1050
+ }
1045
1051
  if (params.transformationParams !== undefined) {
1046
1052
  query["transformationParams"] = params.transformationParams;
1047
1053
  }
@@ -1796,10 +1802,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1796
1802
  return this.makeQueryParams({
1797
1803
  cache: null,
1798
1804
  cacheTtl: null,
1805
+ cacheTtlNotFound: null,
1799
1806
  version: null,
1800
1807
  forceDownloadPrompt: null
1801
1808
  }, {
1802
1809
  cacheTtl: "cache_ttl",
1810
+ cacheTtlNotFound: "cache_ttl_not_found",
1803
1811
  forceDownloadPrompt: "download"
1804
1812
  })(params);
1805
1813
  }
@@ -768,7 +768,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
768
768
  key: "resetCache",
769
769
  value:
770
770
  /**
771
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
771
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
772
772
  */
773
773
  function resetCache(params) {
774
774
  try {
@@ -958,6 +958,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
958
958
  if (params.cacheTtl !== undefined) {
959
959
  query["cache_ttl"] = params.cacheTtl;
960
960
  }
961
+ if (params.cacheTtlNotFound !== undefined) {
962
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
963
+ }
961
964
  if (params.version !== undefined) {
962
965
  query["version"] = params.version;
963
966
  }
@@ -1029,6 +1032,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1029
1032
  if (params.cacheTtl !== undefined) {
1030
1033
  query["cache_ttl"] = params.cacheTtl;
1031
1034
  }
1035
+ if (params.cacheTtlNotFound !== undefined) {
1036
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1037
+ }
1032
1038
  if (params.transformationParams !== undefined) {
1033
1039
  query["transformationParams"] = params.transformationParams;
1034
1040
  }
@@ -1783,10 +1789,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1783
1789
  return this.makeQueryParams({
1784
1790
  cache: null,
1785
1791
  cacheTtl: null,
1792
+ cacheTtlNotFound: null,
1786
1793
  version: null,
1787
1794
  forceDownloadPrompt: null
1788
1795
  }, {
1789
1796
  cacheTtl: "cache_ttl",
1797
+ cacheTtlNotFound: "cache_ttl_not_found",
1790
1798
  forceDownloadPrompt: "download"
1791
1799
  })(params);
1792
1800
  }
@@ -22,7 +22,7 @@ export interface UrlBuilderParams {
22
22
  }
23
23
  export type UrlBuilderOptions = UrlBuilderOptionsRaw | UrlBuilderTransformationOptions;
24
24
  export type UrlBuilderTransformationOptions = UrlBuilderTransformationApiOptions | UrlBuilderOptionsPreset;
25
- export type UrlBuilderTransformationApiOptions = UrlBuilderOptionsImage | UrlBuilderOptionsVideo | UrlBuilderOptionsAudio | UrlBuilderOptionsArchive;
25
+ export type UrlBuilderTransformationApiOptions = UrlBuilderOptionsImage | UrlBuilderOptionsVideo | UrlBuilderOptionsAudio | UrlBuilderOptionsArchive | UrlBuilderOptionsAntivirus;
26
26
  export interface UrlBuilderOptionsBase extends NonDeprecatedCommonQueryParams, DeprecatedCommonQueryParams {
27
27
  /**
28
28
  * The base URL of the Bytescale CDN. (Excludes trailing "/".)
@@ -44,6 +44,12 @@ export interface NonDeprecatedCommonQueryParams {
44
44
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
45
45
  */
46
46
  cacheTtl?: number;
47
+ /**
48
+ * Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache.
49
+ *
50
+ * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
51
+ */
52
+ cacheTtlNotFound?: number;
47
53
  /**
48
54
  * Forces the browser to display a download prompt for the file, instead of displaying the file in the browser.
49
55
  *
@@ -94,6 +100,14 @@ export interface UrlBuilderOptionsAudio extends UrlBuilderOptionsTransformationA
94
100
  */
95
101
  transformation: "audio";
96
102
  }
103
+ export interface UrlBuilderOptionsAntivirus extends UrlBuilderOptionsTransformationApi<ParameterGroup> {
104
+ /**
105
+ * Set to "antivirus" to use Bytescale's Antivirus API:
106
+ *
107
+ * https://www.bytescale.com/docs/antivirus-api
108
+ */
109
+ transformation: "antivirus";
110
+ }
97
111
  export interface UrlBuilderOptionsArchive extends UrlBuilderOptionsTransformationApi<ParameterGroup> {
98
112
  /**
99
113
  * Set to "archive" to use Bytescale's Archive Processing API:
@@ -17,7 +17,7 @@ export interface ResetCacheOperationParams {
17
17
  }
18
18
  export declare class CacheApi extends runtime.BaseAPI {
19
19
  /**
20
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
20
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
21
21
  */
22
22
  resetCache(params: ResetCacheOperationParams): Promise<AsyncResponse>;
23
23
  }
@@ -43,6 +43,12 @@ export interface DownloadFileParams {
43
43
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
44
44
  */
45
45
  cacheTtl?: number;
46
+ /**
47
+ * Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache.
48
+ *
49
+ * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
50
+ */
51
+ cacheTtlNotFound?: number;
46
52
  /**
47
53
  * Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value.
48
54
  *
@@ -115,6 +121,12 @@ export interface ProcessFileParams {
115
121
  * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
116
122
  */
117
123
  cacheTtl?: number;
124
+ /**
125
+ * Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache.
126
+ *
127
+ * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
128
+ */
129
+ cacheTtlNotFound?: number;
118
130
  /**
119
131
  * Parameters to submit to the File Processing API (e.g. the Image Processing API).
120
132
  *
@@ -1865,7 +1865,7 @@ export interface R2StorageCredentials {
1865
1865
  *
1866
1866
  * *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request.
1867
1867
  *
1868
- * *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations.
1868
+ * *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database.
1869
1869
  *
1870
1870
  * *Example patterns:*
1871
1871
  *
@@ -781,7 +781,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
781
781
  key: "resetCache",
782
782
  value:
783
783
  /**
784
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
784
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
785
785
  */
786
786
  function resetCache(params) {
787
787
  try {
@@ -971,6 +971,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
971
971
  if (params.cacheTtl !== undefined) {
972
972
  query["cache_ttl"] = params.cacheTtl;
973
973
  }
974
+ if (params.cacheTtlNotFound !== undefined) {
975
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
976
+ }
974
977
  if (params.version !== undefined) {
975
978
  query["version"] = params.version;
976
979
  }
@@ -1042,6 +1045,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1042
1045
  if (params.cacheTtl !== undefined) {
1043
1046
  query["cache_ttl"] = params.cacheTtl;
1044
1047
  }
1048
+ if (params.cacheTtlNotFound !== undefined) {
1049
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1050
+ }
1045
1051
  if (params.transformationParams !== undefined) {
1046
1052
  query["transformationParams"] = params.transformationParams;
1047
1053
  }
@@ -1796,10 +1802,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1796
1802
  return this.makeQueryParams({
1797
1803
  cache: null,
1798
1804
  cacheTtl: null,
1805
+ cacheTtlNotFound: null,
1799
1806
  version: null,
1800
1807
  forceDownloadPrompt: null
1801
1808
  }, {
1802
1809
  cacheTtl: "cache_ttl",
1810
+ cacheTtlNotFound: "cache_ttl_not_found",
1803
1811
  forceDownloadPrompt: "download"
1804
1812
  })(params);
1805
1813
  }
@@ -766,7 +766,7 @@ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
766
766
  key: "resetCache",
767
767
  value:
768
768
  /**
769
- * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
769
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations, and can be saved to your database. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
770
770
  */
771
771
  function resetCache(params) {
772
772
  try {
@@ -956,6 +956,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
956
956
  if (params.cacheTtl !== undefined) {
957
957
  query["cache_ttl"] = params.cacheTtl;
958
958
  }
959
+ if (params.cacheTtlNotFound !== undefined) {
960
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
961
+ }
959
962
  if (params.version !== undefined) {
960
963
  query["version"] = params.version;
961
964
  }
@@ -1027,6 +1030,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1027
1030
  if (params.cacheTtl !== undefined) {
1028
1031
  query["cache_ttl"] = params.cacheTtl;
1029
1032
  }
1033
+ if (params.cacheTtlNotFound !== undefined) {
1034
+ query["cache_ttl_not_found"] = params.cacheTtlNotFound;
1035
+ }
1030
1036
  if (params.transformationParams !== undefined) {
1031
1037
  query["transformationParams"] = params.transformationParams;
1032
1038
  }
@@ -1781,10 +1787,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1781
1787
  return this.makeQueryParams({
1782
1788
  cache: null,
1783
1789
  cacheTtl: null,
1790
+ cacheTtlNotFound: null,
1784
1791
  version: null,
1785
1792
  forceDownloadPrompt: null
1786
1793
  }, {
1787
1794
  cacheTtl: "cache_ttl",
1795
+ cacheTtlNotFound: "cache_ttl_not_found",
1788
1796
  forceDownloadPrompt: "download"
1789
1797
  })(params);
1790
1798
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.37.0",
3
+ "version": "3.38.1",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",