@bytescale/sdk 3.46.0 → 3.48.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.
@@ -2394,34 +2394,32 @@ var StreamUtils = /*#__PURE__*/function () {
2394
2394
  return StreamUtils_createClass(StreamUtils, null, [{
2395
2395
  key: "create",
2396
2396
  value: function create() {
2397
- var readable = new external_stream_namespaceObject.Readable();
2398
- readable._read = function () {}; // _read is required but you can noop it
2399
- return readable;
2397
+ return new external_stream_namespaceObject.Readable({
2398
+ read: function read(_size) {
2399
+ // No implementation needed here.
2400
+ // The stream will wait for data to be pushed externally.
2401
+ }
2402
+ });
2400
2403
  }
2401
2404
  }, {
2402
- key: "empty",
2403
- value: function empty() {
2404
- var readable = StreamUtils.create();
2405
- StreamUtils.endStream(readable);
2406
- return readable;
2405
+ key: "endStream",
2406
+ value: function endStream(readable) {
2407
+ readable.push(null);
2407
2408
  }
2408
2409
  }, {
2409
- key: "fromArrayBuffer",
2410
- value: function fromArrayBuffer(buffer) {
2411
- return StreamUtils.fromBuffer(Buffer.from(buffer));
2410
+ key: "empty",
2411
+ value: function empty() {
2412
+ return external_stream_namespaceObject.Readable.from([]);
2412
2413
  }
2413
2414
  }, {
2414
2415
  key: "fromBuffer",
2415
2416
  value: function fromBuffer(buffer) {
2416
- var readable = StreamUtils.create();
2417
- readable.push(buffer);
2418
- StreamUtils.endStream(readable);
2419
- return readable;
2417
+ return external_stream_namespaceObject.Readable.from(buffer);
2420
2418
  }
2421
2419
  }, {
2422
- key: "endStream",
2423
- value: function endStream(readable) {
2424
- readable.push(null);
2420
+ key: "fromArrayBuffer",
2421
+ value: function fromArrayBuffer(buffer) {
2422
+ return StreamUtils.fromBuffer(Buffer.from(buffer));
2425
2423
  }
2426
2424
  }]);
2427
2425
  }();
@@ -2670,6 +2668,45 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2670
2668
  }
2671
2669
  }]);
2672
2670
  }();
2671
+ ;// CONCATENATED MODULE: ./src/public/node/ProgressStream.ts
2672
+ function ProgressStream_typeof(o) { "@babel/helpers - typeof"; return ProgressStream_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, ProgressStream_typeof(o); }
2673
+ function ProgressStream_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2674
+ function ProgressStream_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, ProgressStream_toPropertyKey(descriptor.key), descriptor); } }
2675
+ function ProgressStream_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProgressStream_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProgressStream_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2676
+ function ProgressStream_toPropertyKey(t) { var i = ProgressStream_toPrimitive(t, "string"); return "symbol" == ProgressStream_typeof(i) ? i : i + ""; }
2677
+ function ProgressStream_toPrimitive(t, r) { if ("object" != ProgressStream_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != ProgressStream_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2678
+ function ProgressStream_callSuper(t, o, e) { return o = ProgressStream_getPrototypeOf(o), ProgressStream_possibleConstructorReturn(t, ProgressStream_isNativeReflectConstruct() ? Reflect.construct(o, e || [], ProgressStream_getPrototypeOf(t).constructor) : o.apply(t, e)); }
2679
+ function ProgressStream_possibleConstructorReturn(self, call) { if (call && (ProgressStream_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return ProgressStream_assertThisInitialized(self); }
2680
+ function ProgressStream_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2681
+ function ProgressStream_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (ProgressStream_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2682
+ function ProgressStream_getPrototypeOf(o) { ProgressStream_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProgressStream_getPrototypeOf(o); }
2683
+ function ProgressStream_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) ProgressStream_setPrototypeOf(subClass, superClass); }
2684
+ function ProgressStream_setPrototypeOf(o, p) { ProgressStream_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProgressStream_setPrototypeOf(o, p); }
2685
+
2686
+ var ProgressStream = /*#__PURE__*/function (_Transform) {
2687
+ function ProgressStream(options) {
2688
+ var _this;
2689
+ ProgressStream_classCallCheck(this, ProgressStream);
2690
+ _this = ProgressStream_callSuper(this, ProgressStream, [options]);
2691
+ _this.totalBytes = 0;
2692
+ _this.onProgress = options === null || options === void 0 ? void 0 : options.onProgress;
2693
+ return _this;
2694
+ }
2695
+ ProgressStream_inherits(ProgressStream, _Transform);
2696
+ return ProgressStream_createClass(ProgressStream, [{
2697
+ key: "_transform",
2698
+ value: function _transform(chunk, _encoding, callback) {
2699
+ this.totalBytes += chunk.length;
2700
+ // Invoke the progress callback if provided
2701
+ if (this.onProgress !== undefined) {
2702
+ this.onProgress(this.totalBytes);
2703
+ }
2704
+ // Pass the chunk along
2705
+ this.push(chunk);
2706
+ callback();
2707
+ }
2708
+ }]);
2709
+ }(external_stream_namespaceObject.Transform);
2673
2710
  ;// CONCATENATED MODULE: ./src/public/node/UploadManagerNode.ts
2674
2711
  function UploadManagerNode_typeof(o) { "@babel/helpers - typeof"; return UploadManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadManagerNode_typeof(o); }
2675
2712
  function UploadManagerNode_empty() {}
@@ -2870,6 +2907,7 @@ function UploadManagerNode_setPrototypeOf(o, p) { UploadManagerNode_setPrototype
2870
2907
 
2871
2908
 
2872
2909
 
2910
+
2873
2911
  var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2874
2912
  function UploadManager() {
2875
2913
  UploadManagerNode_classCallCheck(this, UploadManager);
@@ -2974,20 +3012,12 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2974
3012
  value: function doPutUploadPart(part, contentLength, source, onProgress, addCancellationHandler) {
2975
3013
  try {
2976
3014
  var _this = this;
2977
- // Report progress:
2978
- var hasWarned = false;
2979
- var bytesSent = 0;
2980
- return UploadManagerNode_await(_this.sliceDataForRequest(source, part), function (stream) {
2981
- var streamWithProgress = stream.on("data", function (data) {
2982
- if (data.byteLength !== undefined) {
2983
- bytesSent += data.byteLength;
2984
- onProgress(bytesSent);
2985
- } else if (!hasWarned) {
2986
- hasWarned = true;
2987
- console.warn("Expected stream to contain buffers, but it did not, so upload progress won't be reported.");
2988
- }
3015
+ return UploadManagerNode_await(_this.sliceDataForRequest(source, part), function (inputStream) {
3016
+ var progressStream = new ProgressStream({
3017
+ onProgress: onProgress
2989
3018
  });
2990
- return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this.config, part, _this.coerceRequestBody(streamWithProgress), contentLength, addCancellationHandler));
3019
+ inputStream.pipe(progressStream);
3020
+ return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this.config, part, _this.coerceRequestBody(progressStream), contentLength, addCancellationHandler));
2991
3021
  });
2992
3022
  } catch (e) {
2993
3023
  return Promise.reject(e);
@@ -2369,7 +2369,7 @@ var x = function(y) {
2369
2369
  var x = {}; __lib_require__.d(x, y); return x
2370
2370
  }
2371
2371
  var y = function(x) { return function() { return x; }; }
2372
- var external_stream_namespaceObject = x({ ["Readable"]: function() { return __WEBPACK_EXTERNAL_MODULE_stream__.Readable; } });
2372
+ var external_stream_namespaceObject = x({ ["Readable"]: function() { return __WEBPACK_EXTERNAL_MODULE_stream__.Readable; }, ["Transform"]: function() { return __WEBPACK_EXTERNAL_MODULE_stream__.Transform; } });
2373
2373
  ;// CONCATENATED MODULE: ./src/private/StreamUtils.ts
2374
2374
  function StreamUtils_typeof(o) { "@babel/helpers - typeof"; return StreamUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, StreamUtils_typeof(o); }
2375
2375
  function StreamUtils_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -2385,34 +2385,32 @@ var StreamUtils = /*#__PURE__*/function () {
2385
2385
  return StreamUtils_createClass(StreamUtils, null, [{
2386
2386
  key: "create",
2387
2387
  value: function create() {
2388
- var readable = new external_stream_namespaceObject.Readable();
2389
- readable._read = function () {}; // _read is required but you can noop it
2390
- return readable;
2388
+ return new external_stream_namespaceObject.Readable({
2389
+ read: function read(_size) {
2390
+ // No implementation needed here.
2391
+ // The stream will wait for data to be pushed externally.
2392
+ }
2393
+ });
2391
2394
  }
2392
2395
  }, {
2393
- key: "empty",
2394
- value: function empty() {
2395
- var readable = StreamUtils.create();
2396
- StreamUtils.endStream(readable);
2397
- return readable;
2396
+ key: "endStream",
2397
+ value: function endStream(readable) {
2398
+ readable.push(null);
2398
2399
  }
2399
2400
  }, {
2400
- key: "fromArrayBuffer",
2401
- value: function fromArrayBuffer(buffer) {
2402
- return StreamUtils.fromBuffer(Buffer.from(buffer));
2401
+ key: "empty",
2402
+ value: function empty() {
2403
+ return external_stream_namespaceObject.Readable.from([]);
2403
2404
  }
2404
2405
  }, {
2405
2406
  key: "fromBuffer",
2406
2407
  value: function fromBuffer(buffer) {
2407
- var readable = StreamUtils.create();
2408
- readable.push(buffer);
2409
- StreamUtils.endStream(readable);
2410
- return readable;
2408
+ return external_stream_namespaceObject.Readable.from(buffer);
2411
2409
  }
2412
2410
  }, {
2413
- key: "endStream",
2414
- value: function endStream(readable) {
2415
- readable.push(null);
2411
+ key: "fromArrayBuffer",
2412
+ value: function fromArrayBuffer(buffer) {
2413
+ return StreamUtils.fromBuffer(Buffer.from(buffer));
2416
2414
  }
2417
2415
  }]);
2418
2416
  }();
@@ -2665,6 +2663,45 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2665
2663
  }
2666
2664
  }]);
2667
2665
  }();
2666
+ ;// CONCATENATED MODULE: ./src/public/node/ProgressStream.ts
2667
+ function ProgressStream_typeof(o) { "@babel/helpers - typeof"; return ProgressStream_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, ProgressStream_typeof(o); }
2668
+ function ProgressStream_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2669
+ function ProgressStream_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, ProgressStream_toPropertyKey(descriptor.key), descriptor); } }
2670
+ function ProgressStream_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProgressStream_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProgressStream_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2671
+ function ProgressStream_toPropertyKey(t) { var i = ProgressStream_toPrimitive(t, "string"); return "symbol" == ProgressStream_typeof(i) ? i : i + ""; }
2672
+ function ProgressStream_toPrimitive(t, r) { if ("object" != ProgressStream_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != ProgressStream_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2673
+ function ProgressStream_callSuper(t, o, e) { return o = ProgressStream_getPrototypeOf(o), ProgressStream_possibleConstructorReturn(t, ProgressStream_isNativeReflectConstruct() ? Reflect.construct(o, e || [], ProgressStream_getPrototypeOf(t).constructor) : o.apply(t, e)); }
2674
+ function ProgressStream_possibleConstructorReturn(self, call) { if (call && (ProgressStream_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return ProgressStream_assertThisInitialized(self); }
2675
+ function ProgressStream_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2676
+ function ProgressStream_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (ProgressStream_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2677
+ function ProgressStream_getPrototypeOf(o) { ProgressStream_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProgressStream_getPrototypeOf(o); }
2678
+ function ProgressStream_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) ProgressStream_setPrototypeOf(subClass, superClass); }
2679
+ function ProgressStream_setPrototypeOf(o, p) { ProgressStream_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProgressStream_setPrototypeOf(o, p); }
2680
+
2681
+ var ProgressStream = /*#__PURE__*/function (_Transform) {
2682
+ function ProgressStream(options) {
2683
+ var _this;
2684
+ ProgressStream_classCallCheck(this, ProgressStream);
2685
+ _this = ProgressStream_callSuper(this, ProgressStream, [options]);
2686
+ _this.totalBytes = 0;
2687
+ _this.onProgress = options === null || options === void 0 ? void 0 : options.onProgress;
2688
+ return _this;
2689
+ }
2690
+ ProgressStream_inherits(ProgressStream, _Transform);
2691
+ return ProgressStream_createClass(ProgressStream, [{
2692
+ key: "_transform",
2693
+ value: function _transform(chunk, _encoding, callback) {
2694
+ this.totalBytes += chunk.length;
2695
+ // Invoke the progress callback if provided
2696
+ if (this.onProgress !== undefined) {
2697
+ this.onProgress(this.totalBytes);
2698
+ }
2699
+ // Pass the chunk along
2700
+ this.push(chunk);
2701
+ callback();
2702
+ }
2703
+ }]);
2704
+ }(external_stream_namespaceObject.Transform);
2668
2705
  ;// CONCATENATED MODULE: ./src/public/node/UploadManagerNode.ts
2669
2706
  function UploadManagerNode_typeof(o) { "@babel/helpers - typeof"; return UploadManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadManagerNode_typeof(o); }
2670
2707
  function UploadManagerNode_empty() {}
@@ -2865,6 +2902,7 @@ function UploadManagerNode_setPrototypeOf(o, p) { UploadManagerNode_setPrototype
2865
2902
 
2866
2903
 
2867
2904
 
2905
+
2868
2906
  var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2869
2907
  function UploadManager() {
2870
2908
  UploadManagerNode_classCallCheck(this, UploadManager);
@@ -2969,20 +3007,12 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2969
3007
  value: function doPutUploadPart(part, contentLength, source, onProgress, addCancellationHandler) {
2970
3008
  try {
2971
3009
  var _this = this;
2972
- // Report progress:
2973
- var hasWarned = false;
2974
- var bytesSent = 0;
2975
- return UploadManagerNode_await(_this.sliceDataForRequest(source, part), function (stream) {
2976
- var streamWithProgress = stream.on("data", function (data) {
2977
- if (data.byteLength !== undefined) {
2978
- bytesSent += data.byteLength;
2979
- onProgress(bytesSent);
2980
- } else if (!hasWarned) {
2981
- hasWarned = true;
2982
- console.warn("Expected stream to contain buffers, but it did not, so upload progress won't be reported.");
2983
- }
3010
+ return UploadManagerNode_await(_this.sliceDataForRequest(source, part), function (inputStream) {
3011
+ var progressStream = new ProgressStream({
3012
+ onProgress: onProgress
2984
3013
  });
2985
- return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this.config, part, _this.coerceRequestBody(streamWithProgress), contentLength, addCancellationHandler));
3014
+ inputStream.pipe(progressStream);
3015
+ return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this.config, part, _this.coerceRequestBody(progressStream), contentLength, addCancellationHandler));
2986
3016
  });
2987
3017
  } catch (e) {
2988
3018
  return Promise.reject(e);
@@ -4,8 +4,8 @@
4
4
  import type * as stream from "stream";
5
5
  export declare class StreamUtils {
6
6
  static create(): stream.Readable;
7
+ static endStream(readable: stream.Readable): void;
7
8
  static empty(): NodeJS.ReadableStream;
8
- static fromArrayBuffer(buffer: ArrayBuffer): NodeJS.ReadableStream;
9
9
  static fromBuffer(buffer: Buffer): NodeJS.ReadableStream;
10
- static endStream(readable: stream.Readable): void;
10
+ static fromArrayBuffer(buffer: ArrayBuffer): NodeJS.ReadableStream;
11
11
  }
@@ -26,7 +26,7 @@ export declare abstract class UploadManagerBase<TSource, TInit> implements Uploa
26
26
  };
27
27
  protected abstract preUpload(source: TSource): TInit;
28
28
  protected abstract postUpload(init: TInit): Promise<void>;
29
- protected abstract doPutUploadPart(part: UploadPart, contentLength: number, source: TSource, onProgress: (bytesSentDelta: number) => void, addCancellationHandler: AddCancellationHandler): Promise<PutUploadPartResult>;
29
+ protected abstract doPutUploadPart(part: UploadPart, contentLength: number, source: TSource, onProgress: (totalBytesTransferred: number) => void, addCancellationHandler: AddCancellationHandler): Promise<PutUploadPartResult>;
30
30
  private onIntervalTick;
31
31
  private makeCancellationMethods;
32
32
  /**
@@ -0,0 +1,17 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Transform, TransformCallback, TransformOptions } from "stream";
4
+ interface ProgressStreamOptions extends TransformOptions {
5
+ /**
6
+ * Optional callback to handle progress updates.
7
+ * @param totalBytesTransferred - The total number of bytes transferred so far.
8
+ */
9
+ onProgress?: (totalBytesTransferred: number) => void;
10
+ }
11
+ export declare class ProgressStream extends Transform {
12
+ private readonly onProgress;
13
+ private totalBytes;
14
+ constructor(options?: ProgressStreamOptions);
15
+ _transform(chunk: Buffer, _encoding: BufferEncoding, callback: TransformCallback): void;
16
+ }
17
+ export {};
@@ -16,7 +16,7 @@ export declare class UploadManager extends UploadManagerBase<UploadSourceProcess
16
16
  };
17
17
  protected preUpload(source: UploadSourceProcessedNode): UploadManagerNodeInit;
18
18
  protected postUpload(init: UploadManagerNodeInit): Promise<void>;
19
- protected doPutUploadPart(part: UploadPart, contentLength: number, source: UploadSourceProcessedNode, onProgress: (bytesSentDelta: number) => void, addCancellationHandler: AddCancellationHandler): Promise<{
19
+ protected doPutUploadPart(part: UploadPart, contentLength: number, source: UploadSourceProcessedNode, onProgress: (totalBytesTransferred: number) => void, addCancellationHandler: AddCancellationHandler): Promise<{
20
20
  etag: string | undefined;
21
21
  status: number;
22
22
  }>;
@@ -52,6 +52,48 @@ export type AsyncResponseJobDocsEnum = "https://www.bytescale.com/docs/job-api/G
52
52
  * @export
53
53
  */
54
54
  export type AwsRegion = "us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "ca-west-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-south-2" | "eu-north-1" | "eu-central-2" | "il-central-1" | "me-south-1" | "me-central-1" | "sa-east-1";
55
+ /**
56
+ *
57
+ * @export
58
+ * @interface AzureReadOnlyStorage
59
+ */
60
+ export interface AzureReadOnlyStorage {
61
+ /**
62
+ *
63
+ * @type {PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage}
64
+ * @memberof AzureReadOnlyStorage
65
+ */
66
+ azureStorage: PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage;
67
+ /**
68
+ *
69
+ * @type {AzureReadOnlyStorageCredentials}
70
+ * @memberof AzureReadOnlyStorage
71
+ */
72
+ credentials: AzureReadOnlyStorageCredentials;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof AzureReadOnlyStorage
77
+ */
78
+ type: AzureReadOnlyStorageTypeEnum;
79
+ }
80
+ /**
81
+ * @export
82
+ */
83
+ export type AzureReadOnlyStorageTypeEnum = "AzureReadOnly";
84
+ /**
85
+ *
86
+ * @export
87
+ * @interface AzureReadOnlyStorageCredentials
88
+ */
89
+ export interface AzureReadOnlyStorageCredentials {
90
+ /**
91
+ * Query string without the leading "?" character.
92
+ * @type {string}
93
+ * @memberof AzureReadOnlyStorageCredentials
94
+ */
95
+ sasToken: string;
96
+ }
55
97
  /**
56
98
  * Response body for BasicUpload.
57
99
  * @export
@@ -1322,6 +1364,48 @@ export interface PatchFolderSettings {
1322
1364
  * @export
1323
1365
  */
1324
1366
  export type PathPermissionScope = "Children" | "Grandchildren+" | "This";
1367
+ /**
1368
+ * From T, pick a set of properties whose keys are in the union K
1369
+ * @export
1370
+ * @interface PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials
1371
+ */
1372
+ export interface PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials {
1373
+ /**
1374
+ *
1375
+ * @type {string}
1376
+ * @memberof PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials
1377
+ */
1378
+ type: PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsTypeEnum;
1379
+ /**
1380
+ *
1381
+ * @type {PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage}
1382
+ * @memberof PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials
1383
+ */
1384
+ azureStorage: PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage;
1385
+ }
1386
+ /**
1387
+ * @export
1388
+ */
1389
+ export type PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsTypeEnum = "AzureReadOnly";
1390
+ /**
1391
+ *
1392
+ * @export
1393
+ * @interface PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage
1394
+ */
1395
+ export interface PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage {
1396
+ /**
1397
+ * Azure Storage container name.
1398
+ * @type {string}
1399
+ * @memberof PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage
1400
+ */
1401
+ containerName: string;
1402
+ /**
1403
+ * Azure Storage account name.
1404
+ * @type {string}
1405
+ * @memberof PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentialsAzureStorage
1406
+ */
1407
+ accountName: string;
1408
+ }
1325
1409
  /**
1326
1410
  * From T, pick a set of properties whose keys are in the union K
1327
1411
  * @export
@@ -2044,7 +2128,7 @@ export type SpecifiedFieldValueEmptiableStorageLayerUpdateSetEnum = true;
2044
2128
  * This data type does not contain credentials.
2045
2129
  * @export
2046
2130
  */
2047
- export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentials | PickGoogleStorageExcludeKeyofGoogleStorageCredentials | PickR2StorageExcludeKeyofR2StorageCredentials | PickS3StorageExcludeKeyofS3StorageCredentials | WebStorage;
2131
+ export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials | PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentials | PickGoogleStorageExcludeKeyofGoogleStorageCredentials | PickR2StorageExcludeKeyofR2StorageCredentials | PickS3StorageExcludeKeyofS3StorageCredentials | WebStorage;
2048
2132
  /**
2049
2133
  * @type StorageLayerUpdate
2050
2134
  * Data type used to update or create a folder's storage layer.
@@ -2052,7 +2136,7 @@ export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickDi
2052
2136
  * This data type may contain credentials.
2053
2137
  * @export
2054
2138
  */
2055
- export type StorageLayerUpdate = DigitalOceanStorage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
2139
+ export type StorageLayerUpdate = AzureReadOnlyStorage | DigitalOceanStorage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
2056
2140
  /**
2057
2141
  * @type TransformationParamValue
2058
2142
  * A single transformation parameter provided to a Bytescale File Processing API.
@@ -2267,6 +2351,12 @@ export interface UploadPartRange {
2267
2351
  * @interface WebStorage
2268
2352
  */
2269
2353
  export interface WebStorage {
2354
+ /**
2355
+ * Query string without the leading "?" character.
2356
+ * @type {string}
2357
+ * @memberof WebStorage
2358
+ */
2359
+ appendQueryString?: string;
2270
2360
  /**
2271
2361
  * URL for an http(s) resource.
2272
2362
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.46.0",
3
+ "version": "3.48.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",