@rebilly/instruments 16.168.3 → 16.168.4

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/index.js CHANGED
@@ -2266,6 +2266,23 @@ function bind(fn, thisArg) {
2266
2266
  const { toString } = Object.prototype;
2267
2267
  const { getPrototypeOf } = Object;
2268
2268
  const { iterator, toStringTag } = Symbol;
2269
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
2270
+ const hasOwnInPrototypeChain = (thing, prop) => {
2271
+ let obj = thing;
2272
+ const seen = [];
2273
+ while (obj != null && obj !== Object.prototype) {
2274
+ if (seen.indexOf(obj) !== -1) {
2275
+ return false;
2276
+ }
2277
+ seen.push(obj);
2278
+ if (hasOwnProperty(obj, prop)) {
2279
+ return true;
2280
+ }
2281
+ obj = getPrototypeOf(obj);
2282
+ }
2283
+ return false;
2284
+ };
2285
+ const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
2269
2286
  const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
2270
2287
  const str = toString.call(thing);
2271
2288
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -2296,11 +2313,14 @@ const isNumber = typeOfTest("number");
2296
2313
  const isObject$1 = (thing) => thing !== null && typeof thing === "object";
2297
2314
  const isBoolean = (thing) => thing === true || thing === false;
2298
2315
  const isPlainObject = (val) => {
2299
- if (kindOf(val) !== "object") {
2316
+ if (!isObject$1(val)) {
2300
2317
  return false;
2301
2318
  }
2302
2319
  const prototype2 = getPrototypeOf(val);
2303
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
2320
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
2321
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
2322
+ // than a plain object, while ignoring keys injected onto Object.prototype.
2323
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
2304
2324
  };
2305
2325
  const isEmptyObject = (val) => {
2306
2326
  if (!isObject$1(val) || isBuffer(val)) {
@@ -2553,7 +2573,6 @@ const toCamelCase = (str) => {
2553
2573
  return p1.toUpperCase() + p2;
2554
2574
  });
2555
2575
  };
2556
- const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
2557
2576
  const { propertyIsEnumerable } = Object.prototype;
2558
2577
  const isRegExp = kindOfTest("RegExp");
2559
2578
  const reduceDescriptors = (obj, reducer) => {
@@ -2653,6 +2672,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
2653
2672
  })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
2654
2673
  const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
2655
2674
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
2675
+ const isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
2656
2676
  const utils$1 = {
2657
2677
  isArray,
2658
2678
  isArrayBuffer,
@@ -2698,6 +2718,8 @@ const utils$1 = {
2698
2718
  hasOwnProperty,
2699
2719
  hasOwnProp: hasOwnProperty,
2700
2720
  // an alias to avoid ESLint no-prototype-builtins detection
2721
+ hasOwnInPrototypeChain,
2722
+ getSafeProp,
2701
2723
  reduceDescriptors,
2702
2724
  freezeMethods,
2703
2725
  toObjectSet,
@@ -2713,7 +2735,8 @@ const utils$1 = {
2713
2735
  isThenable,
2714
2736
  setImmediate: _setImmediate,
2715
2737
  asap,
2716
- isIterable
2738
+ isIterable,
2739
+ isSafeIterable
2717
2740
  };
2718
2741
  const ignoreDuplicateOf = utils$1.toObjectSet([
2719
2742
  "age",
@@ -2869,13 +2892,19 @@ let AxiosHeaders$1 = class AxiosHeaders {
2869
2892
  setHeaders(header, valueOrRewrite);
2870
2893
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2871
2894
  setHeaders(parseHeaders(header), valueOrRewrite);
2872
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
2873
- let obj = {}, dest, key;
2895
+ } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
2896
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
2874
2897
  for (const entry of header) {
2875
2898
  if (!utils$1.isArray(entry)) {
2876
2899
  throw new TypeError("Object iterator must return a key-value pair");
2877
2900
  }
2878
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
2901
+ key = entry[0];
2902
+ if (utils$1.hasOwnProp(obj, key)) {
2903
+ dest = obj[key];
2904
+ obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
2905
+ } else {
2906
+ obj[key] = entry[1];
2907
+ }
2879
2908
  }
2880
2909
  setHeaders(obj, valueOrRewrite);
2881
2910
  } else {
@@ -3163,6 +3192,7 @@ AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
3163
3192
  AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
3164
3193
  AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
3165
3194
  const httpAdapter = null;
3195
+ const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
3166
3196
  function isVisitable(thing) {
3167
3197
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
3168
3198
  }
@@ -3204,8 +3234,9 @@ function toFormData$1(obj, formData, options) {
3204
3234
  const dots = options.dots;
3205
3235
  const indexes = options.indexes;
3206
3236
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
3207
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
3237
+ const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
3208
3238
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
3239
+ const stack = [];
3209
3240
  if (!utils$1.isFunction(visitor)) {
3210
3241
  throw new TypeError("visitor must be a function");
3211
3242
  }
@@ -3225,6 +3256,31 @@ function toFormData$1(obj, formData, options) {
3225
3256
  }
3226
3257
  return value;
3227
3258
  }
3259
+ function throwIfMaxDepthExceeded(depth) {
3260
+ if (depth > maxDepth) {
3261
+ throw new AxiosError$1(
3262
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
3263
+ AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3264
+ );
3265
+ }
3266
+ }
3267
+ function stringifyWithDepthLimit(value, depth) {
3268
+ if (maxDepth === Infinity) {
3269
+ return JSON.stringify(value);
3270
+ }
3271
+ const ancestors = [];
3272
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
3273
+ if (!utils$1.isObject(currentValue)) {
3274
+ return currentValue;
3275
+ }
3276
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
3277
+ ancestors.pop();
3278
+ }
3279
+ ancestors.push(currentValue);
3280
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
3281
+ return currentValue;
3282
+ });
3283
+ }
3228
3284
  function defaultVisitor(value, key, path) {
3229
3285
  let arr = value;
3230
3286
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
@@ -3234,7 +3290,7 @@ function toFormData$1(obj, formData, options) {
3234
3290
  if (value && !path && typeof value === "object") {
3235
3291
  if (utils$1.endsWith(key, "{}")) {
3236
3292
  key = metaTokens ? key : key.slice(0, -2);
3237
- value = JSON.stringify(value);
3293
+ value = stringifyWithDepthLimit(value, 1);
3238
3294
  } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
3239
3295
  key = removeBrackets(key);
3240
3296
  arr.forEach(function each(el, index2) {
@@ -3253,7 +3309,6 @@ function toFormData$1(obj, formData, options) {
3253
3309
  formData.append(renderKey(path, key, dots), convertValue(value));
3254
3310
  return false;
3255
3311
  }
3256
- const stack = [];
3257
3312
  const exposedHelpers = Object.assign(predicates, {
3258
3313
  defaultVisitor,
3259
3314
  convertValue,
@@ -3261,12 +3316,7 @@ function toFormData$1(obj, formData, options) {
3261
3316
  });
3262
3317
  function build(value, path, depth = 0) {
3263
3318
  if (utils$1.isUndefined(value)) return;
3264
- if (depth > maxDepth) {
3265
- throw new AxiosError$1(
3266
- "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
3267
- AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3268
- );
3269
- }
3319
+ throwIfMaxDepthExceeded(depth);
3270
3320
  if (stack.indexOf(value) !== -1) {
3271
3321
  throw new Error("Circular reference detected in " + path.join("."));
3272
3322
  }
@@ -3321,11 +3371,11 @@ function buildURL(url, params, options) {
3321
3371
  if (!params) {
3322
3372
  return url;
3323
3373
  }
3324
- const _encode = options && options.encode || encode;
3325
3374
  const _options = utils$1.isFunction(options) ? {
3326
3375
  serialize: options
3327
3376
  } : options;
3328
- const serializeFn = _options && _options.serialize;
3377
+ const _encode = utils$1.getSafeProp(_options, "encode") || encode;
3378
+ const serializeFn = utils$1.getSafeProp(_options, "serialize");
3329
3379
  let serializedParams;
3330
3380
  if (serializeFn) {
3331
3381
  serializedParams = serializeFn(params, _options);
@@ -3408,7 +3458,8 @@ const transitionalDefaults = {
3408
3458
  forcedJSONParsing: true,
3409
3459
  clarifyTimeoutError: false,
3410
3460
  legacyInterceptorReqResOrdering: true,
3411
- advertiseZstdAcceptEncoding: false
3461
+ advertiseZstdAcceptEncoding: false,
3462
+ validateStatusUndefinedResolves: true
3412
3463
  };
3413
3464
  const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
3414
3465
  const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
@@ -3454,10 +3505,24 @@ function toURLEncodedForm(data, options) {
3454
3505
  ...options
3455
3506
  });
3456
3507
  }
3508
+ const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
3509
+ function throwIfDepthExceeded(index2) {
3510
+ if (index2 > MAX_DEPTH) {
3511
+ throw new AxiosError$1(
3512
+ "FormData field is too deeply nested (" + index2 + " levels). Max depth: " + MAX_DEPTH,
3513
+ AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3514
+ );
3515
+ }
3516
+ }
3457
3517
  function parsePropPath(name) {
3458
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
3459
- return match[0] === "[]" ? "" : match[1] || match[0];
3460
- });
3518
+ const path = [];
3519
+ const pattern2 = /\w+|\[(\w*)]/g;
3520
+ let match;
3521
+ while ((match = pattern2.exec(name)) !== null) {
3522
+ throwIfDepthExceeded(path.length);
3523
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
3524
+ }
3525
+ return path;
3461
3526
  }
3462
3527
  function arrayToObject(arr) {
3463
3528
  const obj = {};
@@ -3473,6 +3538,7 @@ function arrayToObject(arr) {
3473
3538
  }
3474
3539
  function formDataToJSON(formData) {
3475
3540
  function buildPath(path, value, target, index2) {
3541
+ throwIfDepthExceeded(index2);
3476
3542
  let name = path[index2++];
3477
3543
  if (name === "__proto__") return true;
3478
3544
  const isNumericKey = Number.isFinite(+name);
@@ -3837,9 +3903,32 @@ function isAbsoluteURL(url) {
3837
3903
  function combineURLs(baseURL, relativeURL) {
3838
3904
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
3839
3905
  }
3840
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
3906
+ const malformedHttpProtocol = /^https?:(?!\/\/)/i;
3907
+ const httpProtocolControlCharacters = /[\t\n\r]/g;
3908
+ function stripLeadingC0ControlOrSpace(url) {
3909
+ let i = 0;
3910
+ while (i < url.length && url.charCodeAt(i) <= 32) {
3911
+ i++;
3912
+ }
3913
+ return url.slice(i);
3914
+ }
3915
+ function normalizeURLForProtocolCheck(url) {
3916
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
3917
+ }
3918
+ function assertValidHttpProtocolURL(url, config) {
3919
+ if (typeof url === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
3920
+ throw new AxiosError$1(
3921
+ 'Invalid URL: missing "//" after protocol',
3922
+ AxiosError$1.ERR_INVALID_URL,
3923
+ config
3924
+ );
3925
+ }
3926
+ }
3927
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
3928
+ assertValidHttpProtocolURL(requestedURL, config);
3841
3929
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
3842
3930
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
3931
+ assertValidHttpProtocolURL(baseURL, config);
3843
3932
  return combineURLs(baseURL, requestedURL);
3844
3933
  }
3845
3934
  return requestedURL;
@@ -3886,6 +3975,23 @@ function mergeConfig$1(config1, config2) {
3886
3975
  return getMergedValue(void 0, a);
3887
3976
  }
3888
3977
  }
3978
+ function getMergedTransitionalOption(prop) {
3979
+ const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
3980
+ if (!utils$1.isUndefined(transitional2)) {
3981
+ if (utils$1.isPlainObject(transitional2)) {
3982
+ if (utils$1.hasOwnProp(transitional2, prop)) {
3983
+ return transitional2[prop];
3984
+ }
3985
+ } else {
3986
+ return void 0;
3987
+ }
3988
+ }
3989
+ const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
3990
+ if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
3991
+ return transitional1[prop];
3992
+ }
3993
+ return void 0;
3994
+ }
3889
3995
  function mergeDirectKeys(a, b, prop) {
3890
3996
  if (utils$1.hasOwnProp(config2, prop)) {
3891
3997
  return getMergedValue(a, b);
@@ -3933,6 +4039,13 @@ function mergeConfig$1(config1, config2) {
3933
4039
  const configValue = merge2(a, b, prop);
3934
4040
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
3935
4041
  });
4042
+ if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
4043
+ if (utils$1.hasOwnProp(config1, "validateStatus")) {
4044
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
4045
+ } else {
4046
+ delete config.validateStatus;
4047
+ }
4048
+ }
3936
4049
  return config;
3937
4050
  }
3938
4051
  const FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
@@ -3965,14 +4078,16 @@ function resolveConfig(config) {
3965
4078
  const url = own2("url");
3966
4079
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
3967
4080
  newConfig.url = buildURL(
3968
- buildFullPath(baseURL, url, allowAbsoluteUrls),
4081
+ buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),
3969
4082
  own2("params"),
3970
4083
  own2("paramsSerializer")
3971
4084
  );
3972
4085
  if (auth) {
4086
+ const username = utils$1.getSafeProp(auth, "username") || "";
4087
+ const password = utils$1.getSafeProp(auth, "password") || "";
3973
4088
  headers.set(
3974
4089
  "Authorization",
3975
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : ""))
4090
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : ""))
3976
4091
  );
3977
4092
  }
3978
4093
  if (utils$1.isFormData(data)) {
@@ -4255,6 +4370,8 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
4255
4370
  }
4256
4371
  );
4257
4372
  };
4373
+ const isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
4374
+ const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
4258
4375
  function estimateDataURLDecodedBytes(url) {
4259
4376
  if (!url || typeof url !== "string") return 0;
4260
4377
  if (!url.startsWith("data:")) return 0;
@@ -4270,7 +4387,7 @@ function estimateDataURLDecodedBytes(url) {
4270
4387
  if (body.charCodeAt(i) === 37 && i + 2 < len) {
4271
4388
  const a = body.charCodeAt(i + 1);
4272
4389
  const b = body.charCodeAt(i + 2);
4273
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
4390
+ const isHex = isHexDigit(a) && isHexDigit(b);
4274
4391
  if (isHex) {
4275
4392
  effectiveLen -= 2;
4276
4393
  i += 2;
@@ -4302,13 +4419,13 @@ function estimateDataURLDecodedBytes(url) {
4302
4419
  const bytes2 = groups * 3 - (pad || 0);
4303
4420
  return bytes2 > 0 ? bytes2 : 0;
4304
4421
  }
4305
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
4306
- return Buffer.byteLength(body, "utf8");
4307
- }
4308
4422
  let bytes = 0;
4309
4423
  for (let i = 0, len = body.length; i < len; i++) {
4310
4424
  const c = body.charCodeAt(i);
4311
- if (c < 128) {
4425
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
4426
+ bytes += 1;
4427
+ i += 2;
4428
+ } else if (c < 128) {
4312
4429
  bytes += 1;
4313
4430
  } else if (c < 2048) {
4314
4431
  bytes += 2;
@@ -4326,7 +4443,7 @@ function estimateDataURLDecodedBytes(url) {
4326
4443
  }
4327
4444
  return bytes;
4328
4445
  }
4329
- const VERSION$1 = "1.17.0";
4446
+ const VERSION$1 = "1.18.0";
4330
4447
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
4331
4448
  const { isFunction } = utils$1;
4332
4449
  const encodeUTF8 = (str) => encodeURIComponent(str).replace(
@@ -4474,12 +4591,19 @@ const factory = (env) => {
4474
4591
  composedSignal.unsubscribe();
4475
4592
  });
4476
4593
  let requestContentLength;
4594
+ let pendingBodyError = null;
4595
+ const maxBodyLengthError = () => new AxiosError$1(
4596
+ "Request body larger than maxBodyLength limit",
4597
+ AxiosError$1.ERR_BAD_REQUEST,
4598
+ config,
4599
+ request
4600
+ );
4477
4601
  try {
4478
4602
  let auth = void 0;
4479
4603
  const configAuth = own2("auth");
4480
4604
  if (configAuth) {
4481
- const username = configAuth.username || "";
4482
- const password = configAuth.password || "";
4605
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
4606
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
4483
4607
  auth = {
4484
4608
  username,
4485
4609
  password
@@ -4520,33 +4644,55 @@ const factory = (env) => {
4520
4644
  }
4521
4645
  }
4522
4646
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
4523
- const outboundLength = await resolveBodyLength(headers, data);
4524
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
4525
- throw new AxiosError$1(
4526
- "Request body larger than maxBodyLength limit",
4527
- AxiosError$1.ERR_BAD_REQUEST,
4528
- config,
4529
- request
4530
- );
4647
+ const outboundLength = await getBodyLength(data);
4648
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
4649
+ requestContentLength = outboundLength;
4650
+ if (outboundLength > maxBodyLength) {
4651
+ throw maxBodyLengthError();
4652
+ }
4531
4653
  }
4532
4654
  }
4533
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
4534
- let _request = new Request(url, {
4535
- method: "POST",
4536
- body: data,
4537
- duplex: "half"
4538
- });
4539
- let contentTypeHeader;
4540
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
4541
- headers.setContentType(contentTypeHeader);
4542
- }
4543
- if (_request.body) {
4544
- const [onProgress, flush] = progressEventDecorator(
4545
- requestContentLength,
4546
- progressEventReducer(asyncDecorator(onUploadProgress))
4547
- );
4548
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
4655
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
4656
+ const trackRequestStream = (stream, onProgress, flush) => trackStream(
4657
+ stream,
4658
+ DEFAULT_CHUNK_SIZE,
4659
+ (loadedBytes) => {
4660
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
4661
+ throw pendingBodyError = maxBodyLengthError();
4662
+ }
4663
+ onProgress && onProgress(loadedBytes);
4664
+ },
4665
+ flush
4666
+ );
4667
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
4668
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
4669
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
4670
+ let _request = new Request(url, {
4671
+ method: "POST",
4672
+ body: data,
4673
+ duplex: "half"
4674
+ });
4675
+ let contentTypeHeader;
4676
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
4677
+ headers.setContentType(contentTypeHeader);
4678
+ }
4679
+ if (_request.body) {
4680
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(
4681
+ requestContentLength,
4682
+ progressEventReducer(asyncDecorator(onUploadProgress))
4683
+ ) || [];
4684
+ data = trackRequestStream(_request.body, onProgress, flush);
4685
+ }
4549
4686
  }
4687
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
4688
+ data = trackRequestStream(data);
4689
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
4690
+ throw new AxiosError$1(
4691
+ "Stream request bodies are not supported by the current fetch implementation",
4692
+ AxiosError$1.ERR_NOT_SUPPORT,
4693
+ config,
4694
+ request
4695
+ );
4550
4696
  }
4551
4697
  if (!utils$1.isString(withCredentials)) {
4552
4698
  withCredentials = withCredentials ? "include" : "omit";
@@ -4570,8 +4716,9 @@ const factory = (env) => {
4570
4716
  };
4571
4717
  request = isRequestSupported && new Request(url, resolvedOptions);
4572
4718
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
4719
+ const responseHeaders = AxiosHeaders$1.from(response.headers);
4573
4720
  if (hasMaxContentLength) {
4574
- const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
4721
+ const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4575
4722
  if (declaredLength != null && declaredLength > maxContentLength) {
4576
4723
  throw new AxiosError$1(
4577
4724
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -4587,7 +4734,7 @@ const factory = (env) => {
4587
4734
  ["status", "statusText", "headers"].forEach((prop) => {
4588
4735
  options[prop] = response[prop];
4589
4736
  });
4590
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
4737
+ const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4591
4738
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
4592
4739
  responseContentLength,
4593
4740
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
@@ -4660,6 +4807,14 @@ const factory = (env) => {
4660
4807
  err !== canceledError && (canceledError.cause = err);
4661
4808
  throw canceledError;
4662
4809
  }
4810
+ if (pendingBodyError) {
4811
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
4812
+ throw pendingBodyError;
4813
+ }
4814
+ if (err instanceof AxiosError$1) {
4815
+ request && !err.request && (err.request = request);
4816
+ throw err;
4817
+ }
4663
4818
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
4664
4819
  throw Object.assign(
4665
4820
  new AxiosError$1(
@@ -4935,7 +5090,8 @@ let Axios$1 = class Axios {
4935
5090
  forcedJSONParsing: validators.transitional(validators.boolean),
4936
5091
  clarifyTimeoutError: validators.transitional(validators.boolean),
4937
5092
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
4938
- advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
5093
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
5094
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
4939
5095
  },
4940
5096
  false
4941
5097
  );
@@ -5035,7 +5191,7 @@ let Axios$1 = class Axios {
5035
5191
  }
5036
5192
  getUri(config) {
5037
5193
  config = mergeConfig$1(this.defaults, config);
5038
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
5194
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
5039
5195
  return buildURL(fullPath, config.params, config.paramsSerializer);
5040
5196
  }
5041
5197
  };
@@ -5045,7 +5201,7 @@ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
5045
5201
  mergeConfig$1(config || {}, {
5046
5202
  method,
5047
5203
  url,
5048
- data: (config || {}).data
5204
+ data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
5049
5205
  })
5050
5206
  );
5051
5207
  };
@@ -5493,30 +5649,30 @@ function se$1() {
5493
5649
  }
5494
5650
  return h2.slice(8, -1).toLowerCase().replace(/\s/g, "");
5495
5651
  };
5496
- function e2(g) {
5497
- return typeof g.constructor == "function" ? g.constructor.name : null;
5652
+ function e2(a) {
5653
+ return typeof a.constructor == "function" ? a.constructor.name : null;
5498
5654
  }
5499
- function s(g) {
5500
- return Array.isArray ? Array.isArray(g) : g instanceof Array;
5655
+ function s(a) {
5656
+ return Array.isArray ? Array.isArray(a) : a instanceof Array;
5501
5657
  }
5502
- function r2(g) {
5503
- return g instanceof Error || typeof g.message == "string" && g.constructor && typeof g.constructor.stackTraceLimit == "number";
5658
+ function r2(a) {
5659
+ return a instanceof Error || typeof a.message == "string" && a.constructor && typeof a.constructor.stackTraceLimit == "number";
5504
5660
  }
5505
- function n2(g) {
5506
- return g instanceof Date ? true : typeof g.toDateString == "function" && typeof g.getDate == "function" && typeof g.setDate == "function";
5661
+ function n2(a) {
5662
+ return a instanceof Date ? true : typeof a.toDateString == "function" && typeof a.getDate == "function" && typeof a.setDate == "function";
5507
5663
  }
5508
- function u(g) {
5509
- return g instanceof RegExp ? true : typeof g.flags == "string" && typeof g.ignoreCase == "boolean" && typeof g.multiline == "boolean" && typeof g.global == "boolean";
5664
+ function u(a) {
5665
+ return a instanceof RegExp ? true : typeof a.flags == "string" && typeof a.ignoreCase == "boolean" && typeof a.multiline == "boolean" && typeof a.global == "boolean";
5510
5666
  }
5511
- function o2(g, p) {
5512
- return e2(g) === "GeneratorFunction";
5667
+ function o2(a, p) {
5668
+ return e2(a) === "GeneratorFunction";
5513
5669
  }
5514
- function l(g) {
5515
- return typeof g.throw == "function" && typeof g.return == "function" && typeof g.next == "function";
5670
+ function l(a) {
5671
+ return typeof a.throw == "function" && typeof a.return == "function" && typeof a.next == "function";
5516
5672
  }
5517
- function i(g) {
5673
+ function i(a) {
5518
5674
  try {
5519
- if (typeof g.length == "number" && typeof g.callee == "function")
5675
+ if (typeof a.length == "number" && typeof a.callee == "function")
5520
5676
  return true;
5521
5677
  } catch (p) {
5522
5678
  if (p.message.indexOf("callee") !== -1)
@@ -5524,8 +5680,8 @@ function se$1() {
5524
5680
  }
5525
5681
  return false;
5526
5682
  }
5527
- function f(g) {
5528
- return g.constructor && typeof g.constructor.isBuffer == "function" ? g.constructor.isBuffer(g) : false;
5683
+ function f(a) {
5684
+ return a.constructor && typeof a.constructor.isBuffer == "function" ? a.constructor.isBuffer(a) : false;
5529
5685
  }
5530
5686
  return x$1;
5531
5687
  }
@@ -5577,8 +5733,8 @@ function Se$1() {
5577
5733
  }
5578
5734
  }
5579
5735
  function r2(i) {
5580
- const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, g = new i.constructor(i.source, f);
5581
- return g.lastIndex = i.lastIndex, g;
5736
+ const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, a = new i.constructor(i.source, f);
5737
+ return a.lastIndex = i.lastIndex, a;
5582
5738
  }
5583
5739
  function n2(i) {
5584
5740
  const f = new i.constructor(i.byteLength);
@@ -5588,8 +5744,8 @@ function Se$1() {
5588
5744
  return new i.constructor(i.buffer, i.byteOffset, i.length);
5589
5745
  }
5590
5746
  function o2(i) {
5591
- const f = i.length, g = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
5592
- return i.copy(g), g;
5747
+ const f = i.length, a = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
5748
+ return i.copy(a), a;
5593
5749
  }
5594
5750
  function l(i) {
5595
5751
  return t2 ? Object(t2.call(i)) : {};
@@ -5778,10 +5934,10 @@ function O$1({ options: t2 }) {
5778
5934
  return t2.apiVersion && (c = `${c}/${t2.apiVersion}`), t2.organizationId && (c = `${c}/organizations/${t2.organizationId}`), `${c}`;
5779
5935
  }
5780
5936
  function o2() {
5781
- const a = {
5782
- "REB-API-CONSUMER": `${["Rebilly", t2.appName, "js-sdk"].filter((m2) => m2).join("/")}@de265a6`
5937
+ const g = {
5938
+ "REB-API-CONSUMER": `${["Rebilly", t2.appName, "js-sdk"].filter((m2) => m2).join("/")}@1dd4e3f`
5783
5939
  };
5784
- return t2.apiKey && (a["REB-APIKEY"] = t2.apiKey), a;
5940
+ return t2.apiKey && (g["REB-APIKEY"] = t2.apiKey), g;
5785
5941
  }
5786
5942
  function l() {
5787
5943
  return De$1(e2.defaults.headers);
@@ -5790,38 +5946,38 @@ function O$1({ options: t2 }) {
5790
5946
  t2.requestTimeout = Number(c), e2.defaults.timeout = t2.requestTimeout;
5791
5947
  }
5792
5948
  function f(c = t2.jwt) {
5793
- const a = l();
5794
- t2.apiKey = null, t2.jwt = c, delete a.common["REB-APIKEY"], a.common.Authorization = `Bearer ${c}`, e2.defaults.headers = a;
5949
+ const g = l();
5950
+ t2.apiKey = null, t2.jwt = c, delete g.common["REB-APIKEY"], g.common.Authorization = `Bearer ${c}`, e2.defaults.headers = g;
5795
5951
  }
5796
- function g(c = t2.publishableKey) {
5797
- const a = l();
5798
- t2.publishableKey = c, a.common.Authorization = `${c}`, e2.defaults.headers = a;
5952
+ function a(c = t2.publishableKey) {
5953
+ const g = l();
5954
+ t2.publishableKey = c, g.common.Authorization = `${c}`, e2.defaults.headers = g;
5799
5955
  }
5800
- function p({ host: c, port: a, auth: m2 }) {
5956
+ function p({ host: c, port: g, auth: m2 }) {
5801
5957
  e2.defaults.proxy = {
5802
5958
  host: c,
5803
- port: a,
5959
+ port: g,
5804
5960
  auth: m2
5805
5961
  };
5806
5962
  }
5807
- function h2({ live: c = null, sandbox: a = null }) {
5808
- c && (t2.apiEndpoints.live = c), a && (t2.apiEndpoints.sandbox = a), e2.defaults.baseURL = u();
5963
+ function h2({ live: c = null, sandbox: g = null }) {
5964
+ c && (t2.apiEndpoints.live = c), g && (t2.apiEndpoints.sandbox = g), e2.defaults.baseURL = u();
5809
5965
  }
5810
- function K2(c, { thenDelegate: a, catchDelegate: m2 = () => {
5966
+ function K2(c, { thenDelegate: g, catchDelegate: m2 = () => {
5811
5967
  } }) {
5812
5968
  return ee$1(c) && e2.interceptors[k$1[c]].use(
5813
- a,
5969
+ g,
5814
5970
  m2
5815
5971
  );
5816
5972
  }
5817
- function N2(c, a) {
5818
- return ee$1(c) && e2.interceptors[k$1[c]].eject(a);
5973
+ function N2(c, g) {
5974
+ return ee$1(c) && e2.interceptors[k$1[c]].eject(g);
5819
5975
  }
5820
- function re2({ thenDelegate: c, catchDelegate: a = () => {
5976
+ function re2({ thenDelegate: c, catchDelegate: g = () => {
5821
5977
  } }) {
5822
5978
  return K2(k$1.request, {
5823
5979
  thenDelegate: c,
5824
- catchDelegate: a
5980
+ catchDelegate: g
5825
5981
  });
5826
5982
  }
5827
5983
  function ne2(c) {
@@ -5829,18 +5985,18 @@ function O$1({ options: t2 }) {
5829
5985
  }
5830
5986
  function ue2({
5831
5987
  thenDelegate: c,
5832
- catchDelegate: a = () => {
5988
+ catchDelegate: g = () => {
5833
5989
  }
5834
5990
  }) {
5835
5991
  return K2(k$1.response, {
5836
5992
  thenDelegate: c,
5837
- catchDelegate: a
5993
+ catchDelegate: g
5838
5994
  });
5839
5995
  }
5840
5996
  function oe2(c) {
5841
5997
  N2(k$1.response, c);
5842
5998
  }
5843
- function v({ request: c, isCollection: a, config: m2 }) {
5999
+ function v({ request: c, isCollection: g, config: m2 }) {
5844
6000
  const $2 = z2(m2), { id: b, cancelToken: $e2 } = q$1.save();
5845
6001
  $2.cancelToken = $e2;
5846
6002
  const G2 = (async function() {
@@ -5848,7 +6004,7 @@ function O$1({ options: t2 }) {
5848
6004
  const d = await c($2);
5849
6005
  return le2({
5850
6006
  response: d,
5851
- isCollection: a,
6007
+ isCollection: g,
5852
6008
  config: $2
5853
6009
  });
5854
6010
  } catch (d) {
@@ -5859,8 +6015,8 @@ function O$1({ options: t2 }) {
5859
6015
  })();
5860
6016
  return G2.cancel = (d) => I$1.cancelById(b, d), G2;
5861
6017
  }
5862
- function le2({ response: c, isCollection: a, config: m2 }) {
5863
- return a ? new ye$1(c, m2) : new te$1(c, m2);
6018
+ function le2({ response: c, isCollection: g, config: m2 }) {
6019
+ return g ? new ye$1(c, m2) : new te$1(c, m2);
5864
6020
  }
5865
6021
  function L2({ error: c }) {
5866
6022
  if (axios.isCancel(c))
@@ -5884,61 +6040,61 @@ function O$1({ options: t2 }) {
5884
6040
  }
5885
6041
  function ce2(c) {
5886
6042
  return c.params !== void 0 && (c.params = Object.keys(c.params).filter(
5887
- (a) => {
6043
+ (g) => {
5888
6044
  var m2;
5889
- return c.params[a] !== null && c.params[a] !== "" && !(a === "sort" && ((m2 = c.params[a]) == null ? void 0 : m2.length) === 0);
6045
+ return c.params[g] !== null && c.params[g] !== "" && !(g === "sort" && ((m2 = c.params[g]) == null ? void 0 : m2.length) === 0);
5890
6046
  }
5891
- ).reduce((a, m2) => {
6047
+ ).reduce((g, m2) => {
5892
6048
  const $2 = c.params[m2];
5893
- return a[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, a;
6049
+ return g[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, g;
5894
6050
  }, {})), c;
5895
6051
  }
5896
6052
  function z2(c = {}) {
5897
6053
  return { ...ce2(c) };
5898
6054
  }
5899
- function U2(c, a = {}) {
6055
+ function U2(c, g = {}) {
5900
6056
  return v({
5901
6057
  request: (m2) => e2.get(c, m2),
5902
- config: { params: a }
6058
+ config: { params: g }
5903
6059
  });
5904
6060
  }
5905
- function ie2(c, a) {
6061
+ function ie2(c, g) {
5906
6062
  return v({
5907
6063
  request: (m2) => e2.get(c, m2),
5908
- config: { params: a },
6064
+ config: { params: g },
5909
6065
  isCollection: true
5910
6066
  });
5911
6067
  }
5912
- function V2(c, a, m2 = {}) {
6068
+ function V2(c, g, m2 = {}) {
5913
6069
  let $2 = {};
5914
6070
  return m2.authenticate === false && ($2 = { headers: l() }, delete $2.headers.common["REB-APIKEY"], delete $2.headers.common.Authorization), m2.params && ($2.params = { ...m2.params }), v({
5915
- request: (b) => e2.post(c, a, b),
6071
+ request: (b) => e2.post(c, g, b),
5916
6072
  config: $2
5917
6073
  });
5918
6074
  }
5919
- function J2(c, a, m2 = {}) {
6075
+ function J2(c, g, m2 = {}) {
5920
6076
  return v({
5921
- request: ($2) => e2.put(c, a, $2),
6077
+ request: ($2) => e2.put(c, g, $2),
5922
6078
  config: { params: m2 }
5923
6079
  });
5924
6080
  }
5925
- function ae2(c, a) {
6081
+ function ge(c, g) {
5926
6082
  return v({
5927
- request: (m2) => e2.patch(c, a, m2),
6083
+ request: (m2) => e2.patch(c, g, m2),
5928
6084
  config: {}
5929
6085
  });
5930
6086
  }
5931
- function W2(c, a = null) {
6087
+ function W2(c, g = null) {
5932
6088
  return v({
5933
6089
  request: (m2) => e2.delete(c, m2),
5934
- config: a != null ? { data: a } : {}
6090
+ config: g != null ? { data: g } : {}
5935
6091
  });
5936
6092
  }
5937
- function ge(c, a) {
5938
- return W2(c, a);
6093
+ function ae2(c, g) {
6094
+ return W2(c, g);
5939
6095
  }
5940
- async function me2(c, a, m2, $2 = {}) {
5941
- if (a === "")
6096
+ async function me2(c, g, m2, $2 = {}) {
6097
+ if (g === "")
5942
6098
  return V2(c, m2, { params: $2 });
5943
6099
  try {
5944
6100
  if ((await U2(c)).response.status === 200)
@@ -5951,8 +6107,8 @@ function O$1({ options: t2 }) {
5951
6107
  throw b;
5952
6108
  }
5953
6109
  }
5954
- async function fe2(c, a) {
5955
- const m2 = z2(a);
6110
+ async function fe2(c, g) {
6111
+ const m2 = z2(g);
5956
6112
  try {
5957
6113
  const $2 = await e2.get(c, m2);
5958
6114
  return new Ae$1($2, m2);
@@ -5969,15 +6125,15 @@ function O$1({ options: t2 }) {
5969
6125
  setTimeout: i,
5970
6126
  setProxyAgent: p,
5971
6127
  setSessionToken: f,
5972
- setPublishableKey: g,
6128
+ setPublishableKey: a,
5973
6129
  setEndpoints: h2,
5974
6130
  get: U2,
5975
6131
  getAll: ie2,
5976
6132
  post: V2,
5977
6133
  put: J2,
5978
- patch: ae2,
6134
+ patch: ge,
5979
6135
  delete: W2,
5980
- deleteAll: ge,
6136
+ deleteAll: ae2,
5981
6137
  create: me2,
5982
6138
  download: fe2
5983
6139
  };
@@ -7019,7 +7175,7 @@ function it$1({ apiHandler: t2 }) {
7019
7175
  }
7020
7176
  };
7021
7177
  }
7022
- function at$1({ apiHandler: t2 }) {
7178
+ function gt$1({ apiHandler: t2 }) {
7023
7179
  return {
7024
7180
  /**
7025
7181
  * @param { rebilly.GetEmailNotificationCollectionRequest } request
@@ -7031,7 +7187,7 @@ function at$1({ apiHandler: t2 }) {
7031
7187
  }
7032
7188
  };
7033
7189
  }
7034
- function gt$1({ apiHandler: t2 }) {
7190
+ function at$1({ apiHandler: t2 }) {
7035
7191
  return {
7036
7192
  /**
7037
7193
  * @param { rebilly.GetEventCollectionRequest } request
@@ -7336,7 +7492,7 @@ function pt$1({ apiHandler: t2 }) {
7336
7492
  const o2 = this.getAllAttachments(s);
7337
7493
  r2.push(o2);
7338
7494
  const i = (await o2).items.map(
7339
- (g) => this.detach({ id: g.fields.id })
7495
+ (a) => this.detach({ id: a.fields.id })
7340
7496
  );
7341
7497
  r2 = [...r2, i], await Promise.all(i);
7342
7498
  const f = t2.delete(`files/${e2}`);
@@ -9406,7 +9562,7 @@ function is({ apiHandler: t2 }) {
9406
9562
  }
9407
9563
  };
9408
9564
  }
9409
- function as({ apiHandler: t2 }) {
9565
+ function gs({ apiHandler: t2 }) {
9410
9566
  return {
9411
9567
  /**
9412
9568
  * @param { rebilly.GetUsageCollectionRequest } request
@@ -9436,7 +9592,7 @@ function as({ apiHandler: t2 }) {
9436
9592
  }
9437
9593
  };
9438
9594
  }
9439
- function gs({ apiHandler: t2 }) {
9595
+ function as({ apiHandler: t2 }) {
9440
9596
  return {
9441
9597
  /**
9442
9598
  * @param { rebilly.GetUserCollectionRequest } request
@@ -9559,7 +9715,7 @@ class $s {
9559
9715
  apiHandler: e2
9560
9716
  }), this.account = Be$1({ apiHandler: e2 }), this.allowlists = Ke$1({ apiHandler: e2 }), this.amlChecks = Ne$1({ apiHandler: e2 }), this.amlSettings = Le$1({ apiHandler: e2 }), this.apiKeys = ze$1({ apiHandler: e2 }), this.applicationInstances = Ue$1({ apiHandler: e2 }), this.applications = Ve$1({ apiHandler: e2 }), this.balanceTransactions = Je$1({ apiHandler: e2 }), this.billingPortals = We$1({ apiHandler: e2 }), this.blocklists = Ge$1({ apiHandler: e2 }), this.broadcastMessages = Ye$1({ apiHandler: e2 }), this.cashiers = Qe$1({ apiHandler: e2 }), this.checkoutForms = Xe$1({ apiHandler: e2 }), this.coupons = Ze$1({ apiHandler: e2 }), this.creditMemos = _e$1({ apiHandler: e2 }), this.customDomains = He$1({ apiHandler: e2 }), this.customFields = et$1({ apiHandler: e2 }), this.customerAuthentication = tt$1({ apiHandler: e2 }), this.customers = st$1({ apiHandler: e2 }), this.depositCustomPropertySets = rt$1({
9561
9717
  apiHandler: e2
9562
- }), this.depositRequests = nt$1({ apiHandler: e2 }), this.depositStrategies = ut$1({ apiHandler: e2 }), this.digitalWallets = ot$1({ apiHandler: e2 }), this.disputes = lt$1({ apiHandler: e2 }), this.emailDeliverySettings = ct$1({ apiHandler: e2 }), this.emailMessages = it$1({ apiHandler: e2 }), this.emailNotifications = at$1({ apiHandler: e2 }), this.events = gt$1({ apiHandler: e2 }), this.externalIdentifiers = mt$1({ apiHandler: e2 }), this.externalServicesSettings = ft$1({
9718
+ }), this.depositRequests = nt$1({ apiHandler: e2 }), this.depositStrategies = ut$1({ apiHandler: e2 }), this.digitalWallets = ot$1({ apiHandler: e2 }), this.disputes = lt$1({ apiHandler: e2 }), this.emailDeliverySettings = ct$1({ apiHandler: e2 }), this.emailMessages = it$1({ apiHandler: e2 }), this.emailNotifications = gt$1({ apiHandler: e2 }), this.events = at$1({ apiHandler: e2 }), this.externalIdentifiers = mt$1({ apiHandler: e2 }), this.externalServicesSettings = ft$1({
9563
9719
  apiHandler: e2
9564
9720
  }), this.fees = $t$1({ apiHandler: e2 }), this.files = pt$1({ apiHandler: e2 }), this.gatewayAccounts = ht$1({ apiHandler: e2 }), this.integrations = yt$1({ apiHandler: e2 }), this.invoices = At$1({ apiHandler: e2 }), this.journalAccounts = bt$1({ apiHandler: e2 }), this.journalEntries = Rt$1({ apiHandler: e2 }), this.journalRecords = wt$1({ apiHandler: e2 }), this.kycDocuments = kt$1({ apiHandler: e2 }), this.kycRequests = vt$1({ apiHandler: e2 }), this.kycSettings = qt$1({ apiHandler: e2 }), this.lists = dt$1({ apiHandler: e2 }), this.memberships = Tt$1({ apiHandler: e2 }), this.orderCancellations = It$1({ apiHandler: e2 }), this.orderPauses = St$1({ apiHandler: e2 }), this.orderReactivations = Et$1({ apiHandler: e2 }), this.orders = xt$1({ apiHandler: e2 }), this.organizationExports = Pt$1({ apiHandler: e2 }), this.organizations = Ct$1({ apiHandler: e2 }), this.paymentCardsBankNames = Dt$1({ apiHandler: e2 }), this.paymentInstruments = jt$1({ apiHandler: e2 }), this.paymentMethods = Mt$1({ apiHandler: e2 }), this.paymentTokens = Ot$1({ apiHandler: e2 }), this.payoutRequestAllocations = Ft$1({
9565
9721
  apiHandler: e2
@@ -9567,7 +9723,7 @@ class $s {
9567
9723
  apiHandler: e2
9568
9724
  }), this.subscriptionPauses = rs({ apiHandler: e2 }), this.subscriptionReactivations = ns({
9569
9725
  apiHandler: e2
9570
- }), this.subscriptions = us({ apiHandler: e2 }), this.tags = os({ apiHandler: e2 }), this.tagsRules = ls({ apiHandler: e2 }), this.tracking = cs({ apiHandler: e2 }), this.transactions = is({ apiHandler: e2 }), this.usages = as({ apiHandler: e2 }), this.users = gs({ apiHandler: e2 }), this.webhooks = ms({ apiHandler: e2 }), this.websites = fs({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setPublishableKey = e2.setPublishableKey, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken, this.generateSignature = e2.generateSignature;
9726
+ }), this.subscriptions = us({ apiHandler: e2 }), this.tags = os({ apiHandler: e2 }), this.tagsRules = ls({ apiHandler: e2 }), this.tracking = cs({ apiHandler: e2 }), this.transactions = is({ apiHandler: e2 }), this.usages = gs({ apiHandler: e2 }), this.users = as({ apiHandler: e2 }), this.webhooks = ms({ apiHandler: e2 }), this.websites = fs({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setPublishableKey = e2.setPublishableKey, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken, this.generateSignature = e2.generateSignature;
9571
9727
  }
9572
9728
  }
9573
9729
  function ps({ apiHandler: t2 }) {
@@ -9974,7 +10130,7 @@ function As({ apiHandler: t2 }) {
9974
10130
  filter: i = null,
9975
10131
  criteria: f = null
9976
10132
  }) {
9977
- const g = {
10133
+ const a = {
9978
10134
  aggregationField: e2,
9979
10135
  aggregationPeriod: s,
9980
10136
  includeSwitchedSubscriptions: r2,
@@ -9985,7 +10141,7 @@ function As({ apiHandler: t2 }) {
9985
10141
  filter: i,
9986
10142
  criteria: f
9987
10143
  };
9988
- return t2.get("reports/retention-percentage", g);
10144
+ return t2.get("reports/retention-percentage", a);
9989
10145
  },
9990
10146
  /**
9991
10147
  * @returns { rebilly.GetRetentionValueReportResponsePromise } response
@@ -10000,7 +10156,7 @@ function As({ apiHandler: t2 }) {
10000
10156
  limit: l = null,
10001
10157
  offset: i = null,
10002
10158
  filter: f = null,
10003
- sort: g = null,
10159
+ sort: a = null,
10004
10160
  criteria: p = null
10005
10161
  }) {
10006
10162
  const h2 = {
@@ -10013,7 +10169,7 @@ function As({ apiHandler: t2 }) {
10013
10169
  limit: l,
10014
10170
  offset: i,
10015
10171
  filter: f,
10016
- sort: g,
10172
+ sort: a,
10017
10173
  criteria: p
10018
10174
  };
10019
10175
  return t2.get("reports/retention-value", h2);