@bytescale/sdk
Advanced tools
Comparing version 3.37.0 to 3.38.0
@@ -20,5 +20,5 @@ /** | ||
/** | ||
* 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. | ||
* 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. | ||
*/ | ||
resetCache(params: ResetCacheOperationParams): Promise<AsyncResponse>; | ||
} |
@@ -47,2 +47,8 @@ /** | ||
/** | ||
* Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache. | ||
* | ||
* Default: Please refer to your account's default cache settings in the Bytescale Dashboard. | ||
*/ | ||
cacheTtlNotFound?: number; | ||
/** | ||
* Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value. | ||
@@ -120,2 +126,8 @@ * | ||
/** | ||
* Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache. | ||
* | ||
* Default: Please refer to your account's default cache settings in the Bytescale Dashboard. | ||
*/ | ||
cacheTtlNotFound?: number; | ||
/** | ||
* Parameters to submit to the File Processing API (e.g. the Image Processing API). | ||
@@ -122,0 +134,0 @@ * |
@@ -25,3 +25,3 @@ /** | ||
export type UrlBuilderTransformationOptions = UrlBuilderTransformationApiOptions | UrlBuilderOptionsPreset; | ||
export type UrlBuilderTransformationApiOptions = UrlBuilderOptionsImage | UrlBuilderOptionsVideo | UrlBuilderOptionsAudio | UrlBuilderOptionsArchive; | ||
export type UrlBuilderTransformationApiOptions = UrlBuilderOptionsImage | UrlBuilderOptionsVideo | UrlBuilderOptionsAudio | UrlBuilderOptionsArchive | UrlBuilderOptionsAntivirus; | ||
export interface UrlBuilderOptionsBase extends NonDeprecatedCommonQueryParams, DeprecatedCommonQueryParams { | ||
@@ -49,2 +49,8 @@ /** | ||
/** | ||
* Specifies the maximum amount of time, in seconds, that 404 responses will be cached in the Bytescale CDN's edge cache. | ||
* | ||
* Default: Please refer to your account's default cache settings in the Bytescale Dashboard. | ||
*/ | ||
cacheTtlNotFound?: number; | ||
/** | ||
* Forces the browser to display a download prompt for the file, instead of displaying the file in the browser. | ||
@@ -99,2 +105,10 @@ * | ||
} | ||
export interface UrlBuilderOptionsAntivirus extends UrlBuilderOptionsTransformationApi<ParameterGroup> { | ||
/** | ||
* Set to "antivirus" to use Bytescale's Antivirus API: | ||
* | ||
* https://www.bytescale.com/docs/antivirus-api | ||
*/ | ||
transformation: "antivirus"; | ||
} | ||
export interface UrlBuilderOptionsArchive extends UrlBuilderOptionsTransformationApi<ParameterGroup> { | ||
@@ -101,0 +115,0 @@ /** |
{ | ||
"name": "@bytescale/sdk", | ||
"version": "3.37.0", | ||
"version": "3.38.0", | ||
"description": "Bytescale JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)", |
@@ -539,2 +539,20 @@ <h1 align="center"> | ||
#### Antivirus | ||
To scan the file `document.docx` for viruses: | ||
```javascript | ||
// Returns: "https://upcdn.io/1234abc/antivirus/example.zip" | ||
UrlBuilder.url({ | ||
accountId: "1234abc", | ||
filePath: "/example.zip", | ||
options: { | ||
transformation: "antivirus", | ||
artifact: "/document.docx" | ||
} | ||
}); | ||
``` | ||
[Antivirus API Docs »](https://www.bytescale.com/docs/antivirus-api) | ||
## 🙋 Can I use my own storage? | ||
@@ -541,0 +559,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1089840
22228
574