@bytescale/sdk 3.4.4 → 3.5.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.
- package/dist/browser/cjs/main.js +1 -4
- package/dist/browser/esm/main.mjs +1 -4
- package/dist/node/cjs/main.js +1 -4
- package/dist/node/esm/main.mjs +1 -4
- package/dist/types/public/shared/UrlBuilderTypes.d.ts +0 -12
- package/dist/types/public/shared/generated/apis/FileApi.d.ts +0 -12
- package/dist/types/public/shared/generated/models/index.d.ts +0 -2
- package/dist/worker/cjs/main.js +1 -4
- package/dist/worker/esm/main.mjs +1 -4
- package/package.json +1 -1
- package/tests/UrlBuilder.test.ts +3 -4
package/dist/browser/cjs/main.js
CHANGED
|
@@ -1004,9 +1004,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1004
1004
|
if (params.cacheTtl !== undefined) {
|
|
1005
1005
|
query["cache_ttl"] = params.cacheTtl;
|
|
1006
1006
|
}
|
|
1007
|
-
if (params.large !== undefined) {
|
|
1008
|
-
query["large"] = params.large;
|
|
1009
|
-
}
|
|
1010
1007
|
if (params.transformationParams !== undefined) {
|
|
1011
1008
|
query["transformationParams"] = params.transformationParams;
|
|
1012
1009
|
}
|
|
@@ -1744,7 +1741,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1744
1741
|
}, {
|
|
1745
1742
|
key: "getCommonTransformationQueryParams",
|
|
1746
1743
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1747
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1744
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1748
1745
|
cachePermanently: "cache_perm"
|
|
1749
1746
|
})(trans);
|
|
1750
1747
|
}
|
|
@@ -989,9 +989,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
989
989
|
if (params.cacheTtl !== undefined) {
|
|
990
990
|
query["cache_ttl"] = params.cacheTtl;
|
|
991
991
|
}
|
|
992
|
-
if (params.large !== undefined) {
|
|
993
|
-
query["large"] = params.large;
|
|
994
|
-
}
|
|
995
992
|
if (params.transformationParams !== undefined) {
|
|
996
993
|
query["transformationParams"] = params.transformationParams;
|
|
997
994
|
}
|
|
@@ -1729,7 +1726,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1729
1726
|
}, {
|
|
1730
1727
|
key: "getCommonTransformationQueryParams",
|
|
1731
1728
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1732
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1729
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1733
1730
|
cachePermanently: "cache_perm"
|
|
1734
1731
|
})(trans);
|
|
1735
1732
|
}
|
package/dist/node/cjs/main.js
CHANGED
|
@@ -1004,9 +1004,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1004
1004
|
if (params.cacheTtl !== undefined) {
|
|
1005
1005
|
query["cache_ttl"] = params.cacheTtl;
|
|
1006
1006
|
}
|
|
1007
|
-
if (params.large !== undefined) {
|
|
1008
|
-
query["large"] = params.large;
|
|
1009
|
-
}
|
|
1010
1007
|
if (params.transformationParams !== undefined) {
|
|
1011
1008
|
query["transformationParams"] = params.transformationParams;
|
|
1012
1009
|
}
|
|
@@ -1744,7 +1741,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1744
1741
|
}, {
|
|
1745
1742
|
key: "getCommonTransformationQueryParams",
|
|
1746
1743
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1747
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1744
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1748
1745
|
cachePermanently: "cache_perm"
|
|
1749
1746
|
})(trans);
|
|
1750
1747
|
}
|
package/dist/node/esm/main.mjs
CHANGED
|
@@ -991,9 +991,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
991
991
|
if (params.cacheTtl !== undefined) {
|
|
992
992
|
query["cache_ttl"] = params.cacheTtl;
|
|
993
993
|
}
|
|
994
|
-
if (params.large !== undefined) {
|
|
995
|
-
query["large"] = params.large;
|
|
996
|
-
}
|
|
997
994
|
if (params.transformationParams !== undefined) {
|
|
998
995
|
query["transformationParams"] = params.transformationParams;
|
|
999
996
|
}
|
|
@@ -1731,7 +1728,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1731
1728
|
}, {
|
|
1732
1729
|
key: "getCommonTransformationQueryParams",
|
|
1733
1730
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1734
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1731
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1735
1732
|
cachePermanently: "cache_perm"
|
|
1736
1733
|
})(trans);
|
|
1737
1734
|
}
|
|
@@ -152,16 +152,4 @@ export interface UrlBuilderOptionsTransformation extends UrlBuilderOptionsBase {
|
|
|
152
152
|
* Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
|
|
153
153
|
*/
|
|
154
154
|
cachePermanently?: "auto" | boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Only set this parameter to `true` if you expect the HTTP response body for the transformation request to be over 6MB.
|
|
157
|
-
*
|
|
158
|
-
* We recommend leaving this parameter unset (so it defaults to `false`) and controlling the HTTP response body size via transformation parameters. E.g. for Image Processing API requests, you can shrink the HTTP response body by reducing the output image's dimensions and/or quality.
|
|
159
|
-
*
|
|
160
|
-
* Setting this parameter to `true` will route the request via an alternative CDN path, which allows responses over 6MB, but incurs a ~200ms latency on all CDN edge cache misses for the URL.
|
|
161
|
-
*
|
|
162
|
-
* Setting this parameter to `false` (default) results in faster routing. If a response over 6MB is returned, the initial response will be a JSON error indicating the response was too large to return. All subsequent requests to the same URL will successfully return the transformed file (forever).
|
|
163
|
-
*
|
|
164
|
-
* Default: false
|
|
165
|
-
*/
|
|
166
|
-
large?: boolean;
|
|
167
155
|
}
|
|
@@ -104,18 +104,6 @@ export interface ProcessFileParams {
|
|
|
104
104
|
* Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
|
|
105
105
|
*/
|
|
106
106
|
cacheTtl?: number;
|
|
107
|
-
/**
|
|
108
|
-
* Only set this parameter to `true` if you expect the HTTP response body for the transformation request to be over 6MB.
|
|
109
|
-
*
|
|
110
|
-
* We recommend leaving this parameter unset (so it defaults to `false`) and controlling the HTTP response body size via transformation parameters. E.g. for Image Processing API requests, you can shrink the HTTP response body by reducing the output image's dimensions and/or quality.
|
|
111
|
-
*
|
|
112
|
-
* Setting this parameter to `true` will route the request via an alternative CDN path, which allows responses over 6MB, but incurs a ~200ms latency on all CDN edge cache misses for the URL.
|
|
113
|
-
*
|
|
114
|
-
* Setting this parameter to `false` (default) results in faster routing. If a response over 6MB is returned, the initial response will be a JSON error indicating the response was too large to return. All subsequent requests to the same URL will successfully return the transformed file (forever).
|
|
115
|
-
*
|
|
116
|
-
* Default: `false`
|
|
117
|
-
*/
|
|
118
|
-
large?: boolean;
|
|
119
107
|
/**
|
|
120
108
|
* Parameters to submit to the File Processing API (e.g. the Image Processing API).
|
|
121
109
|
*
|
|
@@ -259,8 +259,6 @@ export interface CopyFolderBatchRequest {
|
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Request body for CopyFolder.
|
|
262
|
-
*
|
|
263
|
-
* You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you're using here. Leave all other flags unset.
|
|
264
262
|
* @export
|
|
265
263
|
* @interface CopyFolderRequest
|
|
266
264
|
*/
|
package/dist/worker/cjs/main.js
CHANGED
|
@@ -1004,9 +1004,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1004
1004
|
if (params.cacheTtl !== undefined) {
|
|
1005
1005
|
query["cache_ttl"] = params.cacheTtl;
|
|
1006
1006
|
}
|
|
1007
|
-
if (params.large !== undefined) {
|
|
1008
|
-
query["large"] = params.large;
|
|
1009
|
-
}
|
|
1010
1007
|
if (params.transformationParams !== undefined) {
|
|
1011
1008
|
query["transformationParams"] = params.transformationParams;
|
|
1012
1009
|
}
|
|
@@ -1744,7 +1741,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1744
1741
|
}, {
|
|
1745
1742
|
key: "getCommonTransformationQueryParams",
|
|
1746
1743
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1747
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1744
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1748
1745
|
cachePermanently: "cache_perm"
|
|
1749
1746
|
})(trans);
|
|
1750
1747
|
}
|
package/dist/worker/esm/main.mjs
CHANGED
|
@@ -989,9 +989,6 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
989
989
|
if (params.cacheTtl !== undefined) {
|
|
990
990
|
query["cache_ttl"] = params.cacheTtl;
|
|
991
991
|
}
|
|
992
|
-
if (params.large !== undefined) {
|
|
993
|
-
query["large"] = params.large;
|
|
994
|
-
}
|
|
995
992
|
if (params.transformationParams !== undefined) {
|
|
996
993
|
query["transformationParams"] = params.transformationParams;
|
|
997
994
|
}
|
|
@@ -1729,7 +1726,7 @@ var UrlBuilder = /*#__PURE__*/function () {
|
|
|
1729
1726
|
}, {
|
|
1730
1727
|
key: "getCommonTransformationQueryParams",
|
|
1731
1728
|
value: function getCommonTransformationQueryParams(trans) {
|
|
1732
|
-
return this.makeQueryParams(["cachePermanently", "
|
|
1729
|
+
return this.makeQueryParams(["cachePermanently", "artifact"], {
|
|
1733
1730
|
cachePermanently: "cache_perm"
|
|
1734
1731
|
})(trans);
|
|
1735
1732
|
}
|
package/package.json
CHANGED
package/tests/UrlBuilder.test.ts
CHANGED
|
@@ -57,9 +57,9 @@ describe("UrlBuilder", () => {
|
|
|
57
57
|
const actual = UrlBuilder.url({
|
|
58
58
|
accountId: "1234abc",
|
|
59
59
|
filePath: "/example.jpg",
|
|
60
|
-
options: { transformation: "preset", transformationPreset: "thumbnail", artifact: "/foo"
|
|
60
|
+
options: { transformation: "preset", transformationPreset: "thumbnail", artifact: "/foo" }
|
|
61
61
|
});
|
|
62
|
-
const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?
|
|
62
|
+
const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?artifact=%2Ffoo";
|
|
63
63
|
expect(actual).toEqual(expected);
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -117,13 +117,12 @@ describe("UrlBuilder", () => {
|
|
|
117
117
|
},
|
|
118
118
|
cachePermanently: "auto",
|
|
119
119
|
artifact: "/foo",
|
|
120
|
-
large: true,
|
|
121
120
|
version: "50",
|
|
122
121
|
auth: true
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
124
|
const expected =
|
|
126
|
-
"https://upcdn.io/1234abc/image/example.jpg?w=42&h=50&auth=true&version=50&cache_perm=auto&
|
|
125
|
+
"https://upcdn.io/1234abc/image/example.jpg?w=42&h=50&auth=true&version=50&cache_perm=auto&artifact=%2Ffoo";
|
|
127
126
|
expect(actual).toEqual(expected);
|
|
128
127
|
});
|
|
129
128
|
|