@bytescale/sdk 3.49.0 → 3.51.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.
@@ -1779,7 +1779,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1779
1779
  value: function getBaseUrl(params, prefix) {
1780
1780
  var _a, _b;
1781
1781
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1782
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1782
+ // To convert a Bytescale File Path into a Bytescale File URL:
1783
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1784
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1785
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1786
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1787
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1783
1788
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1784
1789
  }
1785
1790
  }, {
@@ -1764,7 +1764,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1764
1764
  value: function getBaseUrl(params, prefix) {
1765
1765
  var _a, _b;
1766
1766
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1767
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1767
+ // To convert a Bytescale File Path into a Bytescale File URL:
1768
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1769
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1770
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1771
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1772
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1768
1773
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1769
1774
  }
1770
1775
  }, {
@@ -1779,7 +1779,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1779
1779
  value: function getBaseUrl(params, prefix) {
1780
1780
  var _a, _b;
1781
1781
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1782
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1782
+ // To convert a Bytescale File Path into a Bytescale File URL:
1783
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1784
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1785
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1786
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1787
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1783
1788
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1784
1789
  }
1785
1790
  }, {
@@ -1766,7 +1766,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1766
1766
  value: function getBaseUrl(params, prefix) {
1767
1767
  var _a, _b;
1768
1768
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1769
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1769
+ // To convert a Bytescale File Path into a Bytescale File URL:
1770
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1771
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1772
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1773
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1774
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1770
1775
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1771
1776
  }
1772
1777
  }, {
@@ -1256,6 +1256,12 @@ export type JobSummaryJobDocsEnum = "https://www.bytescale.com/docs/job-api/GetJ
1256
1256
  * @interface JobSummaryError
1257
1257
  */
1258
1258
  export interface JobSummaryError {
1259
+ /**
1260
+ * Time the error occurred (UTC ISO 8601).
1261
+ * @type {string}
1262
+ * @memberof JobSummaryError
1263
+ */
1264
+ timestamp: string;
1259
1265
  /**
1260
1266
  * Human-readable error message.
1261
1267
  * @type {string}
@@ -1412,7 +1418,7 @@ export interface PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredent
1412
1418
  */
1413
1419
  containerName: string;
1414
1420
  /**
1415
- * Azure Storage BLOB name.
1421
+ * Azure Storage BLOB name prefix.
1416
1422
  * @type {string}
1417
1423
  * @memberof PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage
1418
1424
  */
@@ -2381,6 +2387,12 @@ export interface WebStorage {
2381
2387
  * @memberof WebStorage
2382
2388
  */
2383
2389
  baseUrl?: string;
2390
+ /**
2391
+ *
2392
+ * @type {WebStorageQueryStringForwarding}
2393
+ * @memberof WebStorage
2394
+ */
2395
+ queryStringForwarding?: WebStorageQueryStringForwarding;
2384
2396
  /**
2385
2397
  * The type of this storage layer.
2386
2398
  * @type {string}
@@ -2392,6 +2404,55 @@ export interface WebStorage {
2392
2404
  * @export
2393
2405
  */
2394
2406
  export type WebStorageTypeEnum = "Web";
2407
+ /**
2408
+ * This object is used for the value of the `queryStringForwarding` field on the `WebStorage` object, and defines how user-provided query strings are forwarded to the HTTP origin. If left unset, no user-provided query strings will be forwarded to the HTTP origin.
2409
+ *
2410
+ * *Instructions:*
2411
+ * - To *block all* query string parameters: use `"Whitelist"` with an empty `parameters` array (default if unset).
2412
+ * - To *allow all* query string parameters: use `"Blacklist"` with an empty `parameters` array.
2413
+ * - To *allow some* query string parameters: use either `"Blacklist"` or `"Whitelist"` with one or more `parameters`.
2414
+ * @export
2415
+ * @interface WebStorageQueryStringForwarding
2416
+ */
2417
+ export interface WebStorageQueryStringForwarding {
2418
+ /**
2419
+ * Determines which parameters to forward based on the `type` field:
2420
+ *
2421
+ * If `"Whitelist"` is set in the `type` field:
2422
+ * - Only parameters in this array will be forwarded.
2423
+ * - An empty array prevents all parameters from being forwarded.
2424
+ *
2425
+ * If `"Blacklist"` is set in the `type` field:
2426
+ * - Only parameters in this array will be blocked.
2427
+ * - An empty array allows all parameters to be forwarded.
2428
+ * @type {Array<WebStorageQueryStringParam>}
2429
+ * @memberof WebStorageQueryStringForwarding
2430
+ */
2431
+ parameters: Array<WebStorageQueryStringParam>;
2432
+ /**
2433
+ * Determines whether the `parameters` array is interpreted as a blacklist or a whitelist.
2434
+ * @type {string}
2435
+ * @memberof WebStorageQueryStringForwarding
2436
+ */
2437
+ type: WebStorageQueryStringForwardingTypeEnum;
2438
+ }
2439
+ /**
2440
+ * @export
2441
+ */
2442
+ export type WebStorageQueryStringForwardingTypeEnum = "Whitelist" | "Blacklist";
2443
+ /**
2444
+ * Matches exactly one query string parameter. The value of the `name` field must be URL encoded.
2445
+ * @export
2446
+ * @interface WebStorageQueryStringParam
2447
+ */
2448
+ export interface WebStorageQueryStringParam {
2449
+ /**
2450
+ * Query string parameter name. Must be URL-encoded.
2451
+ * @type {string}
2452
+ * @memberof WebStorageQueryStringParam
2453
+ */
2454
+ name: string;
2455
+ }
2395
2456
  /**
2396
2457
  *
2397
2458
  * @export
@@ -1779,7 +1779,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1779
1779
  value: function getBaseUrl(params, prefix) {
1780
1780
  var _a, _b;
1781
1781
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1782
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1782
+ // To convert a Bytescale File Path into a Bytescale File URL:
1783
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1784
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1785
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1786
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1787
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1783
1788
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1784
1789
  }
1785
1790
  }, {
@@ -1764,7 +1764,12 @@ var UrlBuilder = /*#__PURE__*/function () {
1764
1764
  value: function getBaseUrl(params, prefix) {
1765
1765
  var _a, _b;
1766
1766
  var cdnUrl = (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.cdnUrl) !== null && _b !== void 0 ? _b : BytescaleApiClientConfigUtils.defaultCdnUrl;
1767
- var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/");
1767
+ // To convert a Bytescale File Path into a Bytescale File URL:
1768
+ // a) Call encodeURIComponent() on the file path. (This allows file paths to contain ANY character.)
1769
+ // b) Replace all occurrences of "%2F" with "/". (Allows file paths to appear as hierarchical paths on the URL.)
1770
+ // c) Replace all occurrences of "!" with "%21". (Prevents file paths with "!" inside being treated as "query bangs".)
1771
+ // SYNC: FileUrlUtils.makeFileUrl (internal)
1772
+ var filePathEncoded = encodeURIComponent(params.filePath).replace(/%2F/g, "/").replace(/!/g, "%21");
1768
1773
  return "".concat(cdnUrl, "/").concat(params.accountId, "/").concat(prefix).concat(filePathEncoded);
1769
1774
  }
1770
1775
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.49.0",
3
+ "version": "3.51.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",