@membranehq/sdk 0.16.0 → 0.17.1

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.
Files changed (57) hide show
  1. package/dist/bundle.d.ts +90 -0
  2. package/dist/bundle.js +373 -297
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +2 -0
  5. package/dist/dts/accessors/external-event-subscriptions-accessors.d.ts +1 -0
  6. package/dist/dts/accessors/integrations-accessors.d.ts +1 -0
  7. package/dist/dts/agent/index.d.ts +1 -0
  8. package/dist/dts/agent/session.d.ts +2 -0
  9. package/dist/dts/agent/worker-contracts.d.ts +43 -0
  10. package/dist/dts/api-client.d.ts +1 -1
  11. package/dist/dts/client-tokens/index.d.ts +1 -0
  12. package/dist/dts/client-tokens/types.d.ts +57 -0
  13. package/dist/dts/client.d.ts +1 -1
  14. package/dist/dts/index.browser.d.ts +2 -0
  15. package/dist/dts/oauth/index.d.ts +1 -0
  16. package/dist/dts/oauth/types.d.ts +15 -0
  17. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +10 -0
  18. package/dist/dts/workspace-elements/api/actions-api.d.ts +24 -0
  19. package/dist/dts/workspace-elements/api/connections-api.d.ts +7 -2
  20. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +1 -0
  21. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +20 -0
  22. package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +1 -0
  23. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +1 -0
  24. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +1 -0
  25. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -0
  26. package/dist/dts/workspace-elements/api/external-events-api.d.ts +1 -0
  27. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +44 -0
  28. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +6 -0
  29. package/dist/dts/workspace-elements/api/flows-api.d.ts +20 -0
  30. package/dist/dts/workspace-elements/api/integrations-api.d.ts +7 -0
  31. package/dist/dts/workspace-elements/api/packages-api.d.ts +9 -0
  32. package/dist/dts/workspace-elements/base/action-instances/index.d.ts +2 -0
  33. package/dist/dts/workspace-elements/base/actions/index.d.ts +6 -0
  34. package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +39 -0
  35. package/dist/dts/workspace-elements/base/connections/index.d.ts +0 -15
  36. package/dist/dts/workspace-elements/base/connectors/auth-success-records.d.ts +13 -0
  37. package/dist/dts/workspace-elements/base/connectors/index.d.ts +51 -40
  38. package/dist/dts/workspace-elements/base/data-sources/index.d.ts +8 -0
  39. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +14 -0
  40. package/dist/dts/workspace-elements/base/flows/index.d.ts +6 -0
  41. package/dist/dts/workspace-elements/base/index.d.ts +1 -0
  42. package/dist/dts/workspace-elements/base/integrations/index.d.ts +9 -1
  43. package/dist/dts/workspace-elements/base/packages/index.d.ts +4 -0
  44. package/dist/dts/workspace-elements/types.d.ts +4 -0
  45. package/dist/index.browser.d.mts +427 -60
  46. package/dist/index.browser.d.ts +427 -60
  47. package/dist/index.browser.js +158 -20
  48. package/dist/index.browser.js.map +1 -1
  49. package/dist/index.browser.mjs +141 -20
  50. package/dist/index.browser.mjs.map +1 -1
  51. package/dist/index.node.d.mts +427 -60
  52. package/dist/index.node.d.ts +427 -60
  53. package/dist/index.node.js +158 -20
  54. package/dist/index.node.js.map +1 -1
  55. package/dist/index.node.mjs +141 -20
  56. package/dist/index.node.mjs.map +1 -1
  57. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -22230,12 +22230,18 @@
22230
22230
  integrationUuid: string$1()
22231
22231
  .optional()
22232
22232
  .describe('UUID of the integration; alternative to integrationId when creating from export. Resolved to integrationId by the API.'),
22233
+ integrationKey: string$1()
22234
+ .optional()
22235
+ .describe('Key of the integration; alternative to integrationId. Resolved to integrationId by the API.'),
22233
22236
  parentId: string$1()
22234
22237
  .optional()
22235
22238
  .describe('Internal ID of the parent workspace element. Used for hierarchy (e.g. integration-level under universal). Child key uniqueness is scoped by parent and integration.'),
22236
22239
  parentUuid: string$1()
22237
22240
  .optional()
22238
22241
  .describe('UUID of the parent element; alternative to parentId when creating (e.g. from export). Resolved to parentId by the API.'),
22242
+ parentKey: string$1()
22243
+ .optional()
22244
+ .describe('Key of the parent element; alternative to parentId. Resolved to parentId by the API.'),
22239
22245
  connectionId: string$1()
22240
22246
  .optional()
22241
22247
  .describe('Connection ID. Used when filtering by connection in list/selector queries, or when creating or identifying connection-level instances.'),
@@ -22876,7 +22882,7 @@
22876
22882
  }
22877
22883
  }
22878
22884
  async function createOrUpdateConnection(options) {
22879
- const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
22885
+ const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
22880
22886
  let connectionType = await detectConnectionType(options);
22881
22887
  if (redirectUri) {
22882
22888
  connectionType = ConnectionType.REDIRECT;
@@ -22896,6 +22902,7 @@
22896
22902
  name,
22897
22903
  authOptionKey,
22898
22904
  allowMultipleConnections,
22905
+ connectionRequestId,
22899
22906
  requestId,
22900
22907
  redirectUri,
22901
22908
  };
@@ -23446,6 +23453,9 @@
23446
23453
  async resubscribe() {
23447
23454
  await this.client.post(this.getPath('resubscribe'));
23448
23455
  }
23456
+ async refreshWebhook() {
23457
+ await this.client.post(this.getPath('refresh-webhook'));
23458
+ }
23449
23459
  async pullEvents() {
23450
23460
  await this.client.post(this.getPath('pull-events'));
23451
23461
  }
@@ -23478,14 +23488,6 @@
23478
23488
  connectorParameters: unknown().optional(),
23479
23489
  input: unknown().optional(),
23480
23490
  });
23481
- object({
23482
- path: any(),
23483
- method: _enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
23484
- pathParameters: record(string$1(), string$1()).optional(),
23485
- headers: record(string$1(), string$1()).optional(),
23486
- query: record(string$1(), string$1()).optional(),
23487
- data: any().optional(),
23488
- });
23489
23491
  const BaseConnection = BaseWorkspaceElement.extend({
23490
23492
  ...TenantLayerElement.shape,
23491
23493
  name: string$1(),
@@ -24484,25 +24486,28 @@
24484
24486
  hasGlobalWebhooks: boolean$1().optional(),
24485
24487
  hasUdm: boolean$1().optional(),
24486
24488
  isTest: boolean$1().optional(),
24487
- appUuid: string$1().optional(),
24489
+ externalAppId: string$1().optional(),
24490
+ appUuid: string$1().optional().describe('[INTERNAL] Deprecated: Use externalAppId instead'),
24488
24491
  isDeactivated: boolean$1().optional(),
24489
24492
  authType: _enum(CONNECTOR_AUTH_TYPES).optional(),
24490
24493
  optionsConfig: IntegrationOptions.optional(),
24491
24494
  });
24492
- const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
24495
+ BaseMembraneInterfaceEditableProperties.extend({
24493
24496
  logoUri: string$1().optional(),
24494
- appUuid: string$1().optional(),
24497
+ externalAppId: string$1().optional(),
24498
+ externalAppUuid: string$1().optional(),
24499
+ appUuid: string$1().optional().describe('[INTERNAL] Deprecated: resolved to externalAppId'),
24495
24500
  oAuthCallbackUri: url().or(literal('')).optional(),
24496
24501
  logoBase64: string$1().optional(),
24497
24502
  connectorVersion: string$1().optional(),
24498
24503
  connectorId: string$1().optional(),
24499
24504
  connectorUuid: string$1().optional(),
24505
+ connectorKey: string$1()
24506
+ .optional()
24507
+ .describe('Key of the connector; alternative to connectorId. Resolved to connectorId by the API.'),
24500
24508
  parameters: record(string$1(), any()).optional(),
24501
24509
  optionsConfig: IntegrationOptions.optional(),
24502
24510
  });
24503
- IntegrationEditableProperties.extend({
24504
- connectorUuid: string$1().optional(),
24505
- });
24506
24511
 
24507
24512
  PaginationQuery.merge(SearchQuery)
24508
24513
  .merge(IncludeArchivedQuery)
@@ -24632,6 +24637,7 @@
24632
24637
  allowMultipleConnections: boolean$1().optional(),
24633
24638
  redirectUri: string$1().optional(),
24634
24639
  customState: string$1().optional(),
24640
+ connectionRequestId: string$1().optional(),
24635
24641
  });
24636
24642
  ConnectPayload.omit({ input: true, redirectUri: true }).extend({
24637
24643
  theme: _enum(['light', 'dark', 'auto']).optional(),
@@ -24656,7 +24662,7 @@
24656
24662
  }
24657
24663
  }
24658
24664
 
24659
- /*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors */
24665
+ /*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
24660
24666
  /**
24661
24667
  * Create a bound version of a function with a specified `this` context
24662
24668
  *
@@ -24672,30 +24678,30 @@
24672
24678
 
24673
24679
  // utils is a library of generic helper functions non-specific to axios
24674
24680
 
24675
- const {toString} = Object.prototype;
24676
- const {getPrototypeOf} = Object;
24677
- const {iterator, toStringTag} = Symbol;
24681
+ const { toString } = Object.prototype;
24682
+ const { getPrototypeOf } = Object;
24683
+ const { iterator, toStringTag } = Symbol;
24678
24684
 
24679
- const kindOf = (cache => thing => {
24680
- const str = toString.call(thing);
24681
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
24685
+ const kindOf = ((cache) => (thing) => {
24686
+ const str = toString.call(thing);
24687
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
24682
24688
  })(Object.create(null));
24683
24689
 
24684
24690
  const kindOfTest = (type) => {
24685
24691
  type = type.toLowerCase();
24686
- return (thing) => kindOf(thing) === type
24692
+ return (thing) => kindOf(thing) === type;
24687
24693
  };
24688
24694
 
24689
- const typeOfTest = type => thing => typeof thing === type;
24695
+ const typeOfTest = (type) => (thing) => typeof thing === type;
24690
24696
 
24691
24697
  /**
24692
- * Determine if a value is an Array
24698
+ * Determine if a value is a non-null object
24693
24699
  *
24694
24700
  * @param {Object} val The value to test
24695
24701
  *
24696
24702
  * @returns {boolean} True if value is an Array, otherwise false
24697
24703
  */
24698
- const {isArray} = Array;
24704
+ const { isArray } = Array;
24699
24705
 
24700
24706
  /**
24701
24707
  * Determine if a value is undefined
@@ -24704,7 +24710,7 @@
24704
24710
  *
24705
24711
  * @returns {boolean} True if the value is undefined, otherwise false
24706
24712
  */
24707
- const isUndefined = typeOfTest('undefined');
24713
+ const isUndefined = typeOfTest("undefined");
24708
24714
 
24709
24715
  /**
24710
24716
  * Determine if a value is a Buffer
@@ -24714,8 +24720,14 @@
24714
24720
  * @returns {boolean} True if value is a Buffer, otherwise false
24715
24721
  */
24716
24722
  function isBuffer(val) {
24717
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
24718
- && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
24723
+ return (
24724
+ val !== null &&
24725
+ !isUndefined(val) &&
24726
+ val.constructor !== null &&
24727
+ !isUndefined(val.constructor) &&
24728
+ isFunction$1(val.constructor.isBuffer) &&
24729
+ val.constructor.isBuffer(val)
24730
+ );
24719
24731
  }
24720
24732
 
24721
24733
  /**
@@ -24725,8 +24737,7 @@
24725
24737
  *
24726
24738
  * @returns {boolean} True if value is an ArrayBuffer, otherwise false
24727
24739
  */
24728
- const isArrayBuffer = kindOfTest('ArrayBuffer');
24729
-
24740
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
24730
24741
 
24731
24742
  /**
24732
24743
  * Determine if a value is a view on an ArrayBuffer
@@ -24737,10 +24748,10 @@
24737
24748
  */
24738
24749
  function isArrayBufferView(val) {
24739
24750
  let result;
24740
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
24751
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
24741
24752
  result = ArrayBuffer.isView(val);
24742
24753
  } else {
24743
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
24754
+ result = val && val.buffer && isArrayBuffer(val.buffer);
24744
24755
  }
24745
24756
  return result;
24746
24757
  }
@@ -24752,7 +24763,7 @@
24752
24763
  *
24753
24764
  * @returns {boolean} True if value is a String, otherwise false
24754
24765
  */
24755
- const isString = typeOfTest('string');
24766
+ const isString = typeOfTest("string");
24756
24767
 
24757
24768
  /**
24758
24769
  * Determine if a value is a Function
@@ -24760,7 +24771,7 @@
24760
24771
  * @param {*} val The value to test
24761
24772
  * @returns {boolean} True if value is a Function, otherwise false
24762
24773
  */
24763
- const isFunction$1 = typeOfTest('function');
24774
+ const isFunction$1 = typeOfTest("function");
24764
24775
 
24765
24776
  /**
24766
24777
  * Determine if a value is a Number
@@ -24769,7 +24780,7 @@
24769
24780
  *
24770
24781
  * @returns {boolean} True if value is a Number, otherwise false
24771
24782
  */
24772
- const isNumber = typeOfTest('number');
24783
+ const isNumber = typeOfTest("number");
24773
24784
 
24774
24785
  /**
24775
24786
  * Determine if a value is an Object
@@ -24778,7 +24789,7 @@
24778
24789
  *
24779
24790
  * @returns {boolean} True if value is an Object, otherwise false
24780
24791
  */
24781
- const isObject = (thing) => thing !== null && typeof thing === 'object';
24792
+ const isObject = (thing) => thing !== null && typeof thing === "object";
24782
24793
 
24783
24794
  /**
24784
24795
  * Determine if a value is a Boolean
@@ -24786,7 +24797,7 @@
24786
24797
  * @param {*} thing The value to test
24787
24798
  * @returns {boolean} True if value is a Boolean, otherwise false
24788
24799
  */
24789
- const isBoolean = thing => thing === true || thing === false;
24800
+ const isBoolean = (thing) => thing === true || thing === false;
24790
24801
 
24791
24802
  /**
24792
24803
  * Determine if a value is a plain Object
@@ -24796,12 +24807,18 @@
24796
24807
  * @returns {boolean} True if value is a plain Object, otherwise false
24797
24808
  */
24798
24809
  const isPlainObject = (val) => {
24799
- if (kindOf(val) !== 'object') {
24810
+ if (kindOf(val) !== "object") {
24800
24811
  return false;
24801
24812
  }
24802
24813
 
24803
24814
  const prototype = getPrototypeOf(val);
24804
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
24815
+ return (
24816
+ (prototype === null ||
24817
+ prototype === Object.prototype ||
24818
+ Object.getPrototypeOf(prototype) === null) &&
24819
+ !(toStringTag in val) &&
24820
+ !(iterator in val)
24821
+ );
24805
24822
  };
24806
24823
 
24807
24824
  /**
@@ -24818,7 +24835,10 @@
24818
24835
  }
24819
24836
 
24820
24837
  try {
24821
- return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
24838
+ return (
24839
+ Object.keys(val).length === 0 &&
24840
+ Object.getPrototypeOf(val) === Object.prototype
24841
+ );
24822
24842
  } catch (e) {
24823
24843
  // Fallback for any other objects that might cause RangeError with Object.keys()
24824
24844
  return false;
@@ -24832,7 +24852,7 @@
24832
24852
  *
24833
24853
  * @returns {boolean} True if value is a Date, otherwise false
24834
24854
  */
24835
- const isDate = kindOfTest('Date');
24855
+ const isDate = kindOfTest("Date");
24836
24856
 
24837
24857
  /**
24838
24858
  * Determine if a value is a File
@@ -24841,7 +24861,7 @@
24841
24861
  *
24842
24862
  * @returns {boolean} True if value is a File, otherwise false
24843
24863
  */
24844
- const isFile = kindOfTest('File');
24864
+ const isFile = kindOfTest("File");
24845
24865
 
24846
24866
  /**
24847
24867
  * Determine if a value is a Blob
@@ -24850,7 +24870,7 @@
24850
24870
  *
24851
24871
  * @returns {boolean} True if value is a Blob, otherwise false
24852
24872
  */
24853
- const isBlob$1 = kindOfTest('Blob');
24873
+ const isBlob$1 = kindOfTest("Blob");
24854
24874
 
24855
24875
  /**
24856
24876
  * Determine if a value is a FileList
@@ -24859,7 +24879,7 @@
24859
24879
  *
24860
24880
  * @returns {boolean} True if value is a File, otherwise false
24861
24881
  */
24862
- const isFileList = kindOfTest('FileList');
24882
+ const isFileList = kindOfTest("FileList");
24863
24883
 
24864
24884
  /**
24865
24885
  * Determine if a value is a Stream
@@ -24879,15 +24899,16 @@
24879
24899
  */
24880
24900
  const isFormData = (thing) => {
24881
24901
  let kind;
24882
- return thing && (
24883
- (typeof FormData === 'function' && thing instanceof FormData) || (
24884
- isFunction$1(thing.append) && (
24885
- (kind = kindOf(thing)) === 'formdata' ||
24886
- // detect form-data instance
24887
- (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
24888
- )
24889
- )
24890
- )
24902
+ return (
24903
+ thing &&
24904
+ ((typeof FormData === "function" && thing instanceof FormData) ||
24905
+ (isFunction$1(thing.append) &&
24906
+ ((kind = kindOf(thing)) === "formdata" ||
24907
+ // detect form-data instance
24908
+ (kind === "object" &&
24909
+ isFunction$1(thing.toString) &&
24910
+ thing.toString() === "[object FormData]"))))
24911
+ );
24891
24912
  };
24892
24913
 
24893
24914
  /**
@@ -24897,9 +24918,14 @@
24897
24918
  *
24898
24919
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
24899
24920
  */
24900
- const isURLSearchParams = kindOfTest('URLSearchParams');
24921
+ const isURLSearchParams = kindOfTest("URLSearchParams");
24901
24922
 
24902
- const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
24923
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
24924
+ "ReadableStream",
24925
+ "Request",
24926
+ "Response",
24927
+ "Headers",
24928
+ ].map(kindOfTest);
24903
24929
 
24904
24930
  /**
24905
24931
  * Trim excess whitespace off the beginning and end of a string
@@ -24908,8 +24934,8 @@
24908
24934
  *
24909
24935
  * @returns {String} The String freed of excess whitespace
24910
24936
  */
24911
- const trim = (str) => str.trim ?
24912
- str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
24937
+ const trim = (str) =>
24938
+ str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
24913
24939
 
24914
24940
  /**
24915
24941
  * Iterate over an Array or an Object invoking a function for each item.
@@ -24920,15 +24946,16 @@
24920
24946
  * If 'obj' is an Object callback will be called passing
24921
24947
  * the value, key, and complete object for each property.
24922
24948
  *
24923
- * @param {Object|Array} obj The object to iterate
24949
+ * @param {Object|Array<unknown>} obj The object to iterate
24924
24950
  * @param {Function} fn The callback to invoke for each item
24925
24951
  *
24926
- * @param {Boolean} [allOwnKeys = false]
24952
+ * @param {Object} [options]
24953
+ * @param {Boolean} [options.allOwnKeys = false]
24927
24954
  * @returns {any}
24928
24955
  */
24929
- function forEach(obj, fn, {allOwnKeys = false} = {}) {
24956
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
24930
24957
  // Don't bother if no value provided
24931
- if (obj === null || typeof obj === 'undefined') {
24958
+ if (obj === null || typeof obj === "undefined") {
24932
24959
  return;
24933
24960
  }
24934
24961
 
@@ -24936,7 +24963,7 @@
24936
24963
  let l;
24937
24964
 
24938
24965
  // Force an array if not already something iterable
24939
- if (typeof obj !== 'object') {
24966
+ if (typeof obj !== "object") {
24940
24967
  /*eslint no-param-reassign:0*/
24941
24968
  obj = [obj];
24942
24969
  }
@@ -24953,7 +24980,9 @@
24953
24980
  }
24954
24981
 
24955
24982
  // Iterate over object keys
24956
- const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
24983
+ const keys = allOwnKeys
24984
+ ? Object.getOwnPropertyNames(obj)
24985
+ : Object.keys(obj);
24957
24986
  const len = keys.length;
24958
24987
  let key;
24959
24988
 
@@ -24965,7 +24994,7 @@
24965
24994
  }
24966
24995
 
24967
24996
  function findKey(obj, key) {
24968
- if (isBuffer(obj)){
24997
+ if (isBuffer(obj)) {
24969
24998
  return null;
24970
24999
  }
24971
25000
 
@@ -24985,10 +25014,15 @@
24985
25014
  const _global = (() => {
24986
25015
  /*eslint no-undef:0*/
24987
25016
  if (typeof globalThis !== "undefined") return globalThis;
24988
- return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
25017
+ return typeof self !== "undefined"
25018
+ ? self
25019
+ : typeof window !== "undefined"
25020
+ ? window
25021
+ : global;
24989
25022
  })();
24990
25023
 
24991
- const isContextDefined = (context) => !isUndefined(context) && context !== _global;
25024
+ const isContextDefined = (context) =>
25025
+ !isUndefined(context) && context !== _global;
24992
25026
 
24993
25027
  /**
24994
25028
  * Accepts varargs expecting each argument to be an object, then
@@ -25000,7 +25034,7 @@
25000
25034
  * Example:
25001
25035
  *
25002
25036
  * ```js
25003
- * var result = merge({foo: 123}, {foo: 456});
25037
+ * const result = merge({foo: 123}, {foo: 456});
25004
25038
  * console.log(result.foo); // outputs 456
25005
25039
  * ```
25006
25040
  *
@@ -25009,10 +25043,15 @@
25009
25043
  * @returns {Object} Result of all merge properties
25010
25044
  */
25011
25045
  function merge(/* obj1, obj2, obj3, ... */) {
25012
- const {caseless, skipUndefined} = isContextDefined(this) && this || {};
25046
+ const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
25013
25047
  const result = {};
25014
25048
  const assignValue = (val, key) => {
25015
- const targetKey = caseless && findKey(result, key) || key;
25049
+ // Skip dangerous property names to prevent prototype pollution
25050
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
25051
+ return;
25052
+ }
25053
+
25054
+ const targetKey = (caseless && findKey(result, key)) || key;
25016
25055
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
25017
25056
  result[targetKey] = merge(result[targetKey], val);
25018
25057
  } else if (isPlainObject(val)) {
@@ -25037,17 +25076,32 @@
25037
25076
  * @param {Object} b The object to copy properties from
25038
25077
  * @param {Object} thisArg The object to bind function to
25039
25078
  *
25040
- * @param {Boolean} [allOwnKeys]
25079
+ * @param {Object} [options]
25080
+ * @param {Boolean} [options.allOwnKeys]
25041
25081
  * @returns {Object} The resulting value of object a
25042
25082
  */
25043
- const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
25044
- forEach(b, (val, key) => {
25045
- if (thisArg && isFunction$1(val)) {
25046
- a[key] = bind(val, thisArg);
25047
- } else {
25048
- a[key] = val;
25049
- }
25050
- }, {allOwnKeys});
25083
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
25084
+ forEach(
25085
+ b,
25086
+ (val, key) => {
25087
+ if (thisArg && isFunction$1(val)) {
25088
+ Object.defineProperty(a, key, {
25089
+ value: bind(val, thisArg),
25090
+ writable: true,
25091
+ enumerable: true,
25092
+ configurable: true,
25093
+ });
25094
+ } else {
25095
+ Object.defineProperty(a, key, {
25096
+ value: val,
25097
+ writable: true,
25098
+ enumerable: true,
25099
+ configurable: true,
25100
+ });
25101
+ }
25102
+ },
25103
+ { allOwnKeys },
25104
+ );
25051
25105
  return a;
25052
25106
  };
25053
25107
 
@@ -25059,7 +25113,7 @@
25059
25113
  * @returns {string} content value without BOM
25060
25114
  */
25061
25115
  const stripBOM = (content) => {
25062
- if (content.charCodeAt(0) === 0xFEFF) {
25116
+ if (content.charCodeAt(0) === 0xfeff) {
25063
25117
  content = content.slice(1);
25064
25118
  }
25065
25119
  return content;
@@ -25075,10 +25129,18 @@
25075
25129
  * @returns {void}
25076
25130
  */
25077
25131
  const inherits = (constructor, superConstructor, props, descriptors) => {
25078
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
25079
- constructor.prototype.constructor = constructor;
25080
- Object.defineProperty(constructor, 'super', {
25081
- value: superConstructor.prototype
25132
+ constructor.prototype = Object.create(
25133
+ superConstructor.prototype,
25134
+ descriptors,
25135
+ );
25136
+ Object.defineProperty(constructor.prototype, "constructor", {
25137
+ value: constructor,
25138
+ writable: true,
25139
+ enumerable: false,
25140
+ configurable: true,
25141
+ });
25142
+ Object.defineProperty(constructor, "super", {
25143
+ value: superConstructor.prototype,
25082
25144
  });
25083
25145
  props && Object.assign(constructor.prototype, props);
25084
25146
  };
@@ -25107,13 +25169,20 @@
25107
25169
  i = props.length;
25108
25170
  while (i-- > 0) {
25109
25171
  prop = props[i];
25110
- if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
25172
+ if (
25173
+ (!propFilter || propFilter(prop, sourceObj, destObj)) &&
25174
+ !merged[prop]
25175
+ ) {
25111
25176
  destObj[prop] = sourceObj[prop];
25112
25177
  merged[prop] = true;
25113
25178
  }
25114
25179
  }
25115
25180
  sourceObj = filter !== false && getPrototypeOf(sourceObj);
25116
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
25181
+ } while (
25182
+ sourceObj &&
25183
+ (!filter || filter(sourceObj, destObj)) &&
25184
+ sourceObj !== Object.prototype
25185
+ );
25117
25186
 
25118
25187
  return destObj;
25119
25188
  };
@@ -25137,7 +25206,6 @@
25137
25206
  return lastIndex !== -1 && lastIndex === position;
25138
25207
  };
25139
25208
 
25140
-
25141
25209
  /**
25142
25210
  * Returns new array from array like object or null if failed
25143
25211
  *
@@ -25166,12 +25234,12 @@
25166
25234
  * @returns {Array}
25167
25235
  */
25168
25236
  // eslint-disable-next-line func-names
25169
- const isTypedArray = (TypedArray => {
25237
+ const isTypedArray = ((TypedArray) => {
25170
25238
  // eslint-disable-next-line func-names
25171
- return thing => {
25239
+ return (thing) => {
25172
25240
  return TypedArray && thing instanceof TypedArray;
25173
25241
  };
25174
- })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
25242
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
25175
25243
 
25176
25244
  /**
25177
25245
  * For each entry in the object, call the function with the key and value.
@@ -25214,18 +25282,22 @@
25214
25282
  };
25215
25283
 
25216
25284
  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
25217
- const isHTMLForm = kindOfTest('HTMLFormElement');
25285
+ const isHTMLForm = kindOfTest("HTMLFormElement");
25218
25286
 
25219
- const toCamelCase = str => {
25220
- return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
25221
- function replacer(m, p1, p2) {
25287
+ const toCamelCase = (str) => {
25288
+ return str
25289
+ .toLowerCase()
25290
+ .replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
25222
25291
  return p1.toUpperCase() + p2;
25223
- }
25224
- );
25292
+ });
25225
25293
  };
25226
25294
 
25227
25295
  /* Creating a function that will check if an object has a property. */
25228
- const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
25296
+ const hasOwnProperty = (
25297
+ ({ hasOwnProperty }) =>
25298
+ (obj, prop) =>
25299
+ hasOwnProperty.call(obj, prop)
25300
+ )(Object.prototype);
25229
25301
 
25230
25302
  /**
25231
25303
  * Determine if a value is a RegExp object
@@ -25234,7 +25306,7 @@
25234
25306
  *
25235
25307
  * @returns {boolean} True if value is a RegExp object, otherwise false
25236
25308
  */
25237
- const isRegExp = kindOfTest('RegExp');
25309
+ const isRegExp = kindOfTest("RegExp");
25238
25310
 
25239
25311
  const reduceDescriptors = (obj, reducer) => {
25240
25312
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -25258,7 +25330,10 @@
25258
25330
  const freezeMethods = (obj) => {
25259
25331
  reduceDescriptors(obj, (descriptor, name) => {
25260
25332
  // skip restricted props in strict mode
25261
- if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
25333
+ if (
25334
+ isFunction$1(obj) &&
25335
+ ["arguments", "caller", "callee"].indexOf(name) !== -1
25336
+ ) {
25262
25337
  return false;
25263
25338
  }
25264
25339
 
@@ -25268,14 +25343,14 @@
25268
25343
 
25269
25344
  descriptor.enumerable = false;
25270
25345
 
25271
- if ('writable' in descriptor) {
25346
+ if ("writable" in descriptor) {
25272
25347
  descriptor.writable = false;
25273
25348
  return;
25274
25349
  }
25275
25350
 
25276
25351
  if (!descriptor.set) {
25277
25352
  descriptor.set = () => {
25278
- throw Error('Can not rewrite read-only method \'' + name + '\'');
25353
+ throw Error("Can not rewrite read-only method '" + name + "'");
25279
25354
  };
25280
25355
  }
25281
25356
  });
@@ -25285,12 +25360,14 @@
25285
25360
  const obj = {};
25286
25361
 
25287
25362
  const define = (arr) => {
25288
- arr.forEach(value => {
25363
+ arr.forEach((value) => {
25289
25364
  obj[value] = true;
25290
25365
  });
25291
25366
  };
25292
25367
 
25293
- isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
25368
+ isArray(arrayOrString)
25369
+ ? define(arrayOrString)
25370
+ : define(String(arrayOrString).split(delimiter));
25294
25371
 
25295
25372
  return obj;
25296
25373
  };
@@ -25298,11 +25375,11 @@
25298
25375
  const noop = () => {};
25299
25376
 
25300
25377
  const toFiniteNumber = (value, defaultValue) => {
25301
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
25378
+ return value != null && Number.isFinite((value = +value))
25379
+ ? value
25380
+ : defaultValue;
25302
25381
  };
25303
25382
 
25304
-
25305
-
25306
25383
  /**
25307
25384
  * If the thing is a FormData object, return true, otherwise return false.
25308
25385
  *
@@ -25311,14 +25388,18 @@
25311
25388
  * @returns {boolean}
25312
25389
  */
25313
25390
  function isSpecCompliantForm(thing) {
25314
- return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
25391
+ return !!(
25392
+ thing &&
25393
+ isFunction$1(thing.append) &&
25394
+ thing[toStringTag] === "FormData" &&
25395
+ thing[iterator]
25396
+ );
25315
25397
  }
25316
25398
 
25317
25399
  const toJSONObject = (obj) => {
25318
25400
  const stack = new Array(10);
25319
25401
 
25320
25402
  const visit = (source, i) => {
25321
-
25322
25403
  if (isObject(source)) {
25323
25404
  if (stack.indexOf(source) >= 0) {
25324
25405
  return;
@@ -25329,7 +25410,7 @@
25329
25410
  return source;
25330
25411
  }
25331
25412
 
25332
- if(!('toJSON' in source)) {
25413
+ if (!("toJSON" in source)) {
25333
25414
  stack[i] = source;
25334
25415
  const target = isArray(source) ? [] : {};
25335
25416
 
@@ -25350,10 +25431,13 @@
25350
25431
  return visit(obj, 0);
25351
25432
  };
25352
25433
 
25353
- const isAsyncFn = kindOfTest('AsyncFunction');
25434
+ const isAsyncFn = kindOfTest("AsyncFunction");
25354
25435
 
25355
25436
  const isThenable = (thing) =>
25356
- thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
25437
+ thing &&
25438
+ (isObject(thing) || isFunction$1(thing)) &&
25439
+ isFunction$1(thing.then) &&
25440
+ isFunction$1(thing.catch);
25357
25441
 
25358
25442
  // original code
25359
25443
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -25363,32 +25447,35 @@
25363
25447
  return setImmediate;
25364
25448
  }
25365
25449
 
25366
- return postMessageSupported ? ((token, callbacks) => {
25367
- _global.addEventListener("message", ({source, data}) => {
25368
- if (source === _global && data === token) {
25369
- callbacks.length && callbacks.shift()();
25370
- }
25371
- }, false);
25450
+ return postMessageSupported
25451
+ ? ((token, callbacks) => {
25452
+ _global.addEventListener(
25453
+ "message",
25454
+ ({ source, data }) => {
25455
+ if (source === _global && data === token) {
25456
+ callbacks.length && callbacks.shift()();
25457
+ }
25458
+ },
25459
+ false,
25460
+ );
25372
25461
 
25373
- return (cb) => {
25374
- callbacks.push(cb);
25375
- _global.postMessage(token, "*");
25376
- }
25377
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
25378
- })(
25379
- typeof setImmediate === 'function',
25380
- isFunction$1(_global.postMessage)
25381
- );
25462
+ return (cb) => {
25463
+ callbacks.push(cb);
25464
+ _global.postMessage(token, "*");
25465
+ };
25466
+ })(`axios@${Math.random()}`, [])
25467
+ : (cb) => setTimeout(cb);
25468
+ })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
25382
25469
 
25383
- const asap = typeof queueMicrotask !== 'undefined' ?
25384
- queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
25470
+ const asap =
25471
+ typeof queueMicrotask !== "undefined"
25472
+ ? queueMicrotask.bind(_global)
25473
+ : (typeof process !== "undefined" && process.nextTick) || _setImmediate;
25385
25474
 
25386
25475
  // *********************
25387
25476
 
25388
-
25389
25477
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
25390
25478
 
25391
-
25392
25479
  const utils$1 = {
25393
25480
  isArray,
25394
25481
  isArrayBuffer,
@@ -25446,113 +25533,78 @@
25446
25533
  isThenable,
25447
25534
  setImmediate: _setImmediate,
25448
25535
  asap,
25449
- isIterable
25536
+ isIterable,
25450
25537
  };
25451
25538
 
25452
- /**
25453
- * Create an Error with the specified message, config, error code, request and response.
25454
- *
25455
- * @param {string} message The error message.
25456
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
25457
- * @param {Object} [config] The config.
25458
- * @param {Object} [request] The request.
25459
- * @param {Object} [response] The response.
25460
- *
25461
- * @returns {Error} The created error.
25462
- */
25463
- function AxiosError$1(message, code, config, request, response) {
25464
- Error.call(this);
25539
+ class AxiosError$1 extends Error {
25540
+ static from(error, code, config, request, response, customProps) {
25541
+ const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
25542
+ axiosError.cause = error;
25543
+ axiosError.name = error.name;
25544
+ customProps && Object.assign(axiosError, customProps);
25545
+ return axiosError;
25546
+ }
25465
25547
 
25466
- if (Error.captureStackTrace) {
25467
- Error.captureStackTrace(this, this.constructor);
25468
- } else {
25469
- this.stack = (new Error()).stack;
25470
- }
25548
+ /**
25549
+ * Create an Error with the specified message, config, error code, request and response.
25550
+ *
25551
+ * @param {string} message The error message.
25552
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
25553
+ * @param {Object} [config] The config.
25554
+ * @param {Object} [request] The request.
25555
+ * @param {Object} [response] The response.
25556
+ *
25557
+ * @returns {Error} The created error.
25558
+ */
25559
+ constructor(message, code, config, request, response) {
25560
+ super(message);
25561
+ this.name = 'AxiosError';
25562
+ this.isAxiosError = true;
25563
+ code && (this.code = code);
25564
+ config && (this.config = config);
25565
+ request && (this.request = request);
25566
+ if (response) {
25567
+ this.response = response;
25568
+ this.status = response.status;
25569
+ }
25570
+ }
25471
25571
 
25472
- this.message = message;
25473
- this.name = 'AxiosError';
25474
- code && (this.code = code);
25475
- config && (this.config = config);
25476
- request && (this.request = request);
25477
- if (response) {
25478
- this.response = response;
25479
- this.status = response.status ? response.status : null;
25480
- }
25572
+ toJSON() {
25573
+ return {
25574
+ // Standard
25575
+ message: this.message,
25576
+ name: this.name,
25577
+ // Microsoft
25578
+ description: this.description,
25579
+ number: this.number,
25580
+ // Mozilla
25581
+ fileName: this.fileName,
25582
+ lineNumber: this.lineNumber,
25583
+ columnNumber: this.columnNumber,
25584
+ stack: this.stack,
25585
+ // Axios
25586
+ config: utils$1.toJSONObject(this.config),
25587
+ code: this.code,
25588
+ status: this.status,
25589
+ };
25590
+ }
25481
25591
  }
25482
25592
 
25483
- utils$1.inherits(AxiosError$1, Error, {
25484
- toJSON: function toJSON() {
25485
- return {
25486
- // Standard
25487
- message: this.message,
25488
- name: this.name,
25489
- // Microsoft
25490
- description: this.description,
25491
- number: this.number,
25492
- // Mozilla
25493
- fileName: this.fileName,
25494
- lineNumber: this.lineNumber,
25495
- columnNumber: this.columnNumber,
25496
- stack: this.stack,
25497
- // Axios
25498
- config: utils$1.toJSONObject(this.config),
25499
- code: this.code,
25500
- status: this.status
25501
- };
25502
- }
25503
- });
25504
-
25505
- const prototype$1 = AxiosError$1.prototype;
25506
- const descriptors = {};
25507
-
25508
- [
25509
- 'ERR_BAD_OPTION_VALUE',
25510
- 'ERR_BAD_OPTION',
25511
- 'ECONNABORTED',
25512
- 'ETIMEDOUT',
25513
- 'ERR_NETWORK',
25514
- 'ERR_FR_TOO_MANY_REDIRECTS',
25515
- 'ERR_DEPRECATED',
25516
- 'ERR_BAD_RESPONSE',
25517
- 'ERR_BAD_REQUEST',
25518
- 'ERR_CANCELED',
25519
- 'ERR_NOT_SUPPORT',
25520
- 'ERR_INVALID_URL'
25521
- // eslint-disable-next-line func-names
25522
- ].forEach(code => {
25523
- descriptors[code] = {value: code};
25524
- });
25525
-
25526
- Object.defineProperties(AxiosError$1, descriptors);
25527
- Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
25528
-
25529
- // eslint-disable-next-line func-names
25530
- AxiosError$1.from = (error, code, config, request, response, customProps) => {
25531
- const axiosError = Object.create(prototype$1);
25532
-
25533
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
25534
- return obj !== Error.prototype;
25535
- }, prop => {
25536
- return prop !== 'isAxiosError';
25537
- });
25538
-
25539
- const msg = error && error.message ? error.message : 'Error';
25540
-
25541
- // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
25542
- const errCode = code == null && error ? error.code : code;
25543
- AxiosError$1.call(axiosError, msg, errCode, config, request, response);
25544
-
25545
- // Chain the original error on the standard field; non-enumerable to avoid JSON noise
25546
- if (error && axiosError.cause == null) {
25547
- Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
25548
- }
25549
-
25550
- axiosError.name = (error && error.name) || 'Error';
25551
-
25552
- customProps && Object.assign(axiosError, customProps);
25593
+ // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
25594
+ AxiosError$1.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
25595
+ AxiosError$1.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
25596
+ AxiosError$1.ECONNABORTED = 'ECONNABORTED';
25597
+ AxiosError$1.ETIMEDOUT = 'ETIMEDOUT';
25598
+ AxiosError$1.ERR_NETWORK = 'ERR_NETWORK';
25599
+ AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
25600
+ AxiosError$1.ERR_DEPRECATED = 'ERR_DEPRECATED';
25601
+ AxiosError$1.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
25602
+ AxiosError$1.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
25603
+ AxiosError$1.ERR_CANCELED = 'ERR_CANCELED';
25604
+ AxiosError$1.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
25605
+ AxiosError$1.ERR_INVALID_URL = 'ERR_INVALID_URL';
25553
25606
 
25554
- return axiosError;
25555
- };
25607
+ const AxiosError$2 = AxiosError$1;
25556
25608
 
25557
25609
  // eslint-disable-next-line strict
25558
25610
  const httpAdapter = null;
@@ -25677,7 +25729,7 @@
25677
25729
  }
25678
25730
 
25679
25731
  if (!useBlob && utils$1.isBlob(value)) {
25680
- throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
25732
+ throw new AxiosError$2('Blob is not supported. Use a Buffer instead.');
25681
25733
  }
25682
25734
 
25683
25735
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
@@ -25851,29 +25903,26 @@
25851
25903
  * @returns {string} The formatted url
25852
25904
  */
25853
25905
  function buildURL(url, params, options) {
25854
- /*eslint no-param-reassign:0*/
25855
25906
  if (!params) {
25856
25907
  return url;
25857
25908
  }
25858
-
25909
+
25859
25910
  const _encode = options && options.encode || encode;
25860
25911
 
25861
- if (utils$1.isFunction(options)) {
25862
- options = {
25863
- serialize: options
25864
- };
25865
- }
25912
+ const _options = utils$1.isFunction(options) ? {
25913
+ serialize: options
25914
+ } : options;
25866
25915
 
25867
- const serializeFn = options && options.serialize;
25916
+ const serializeFn = _options && _options.serialize;
25868
25917
 
25869
25918
  let serializedParams;
25870
25919
 
25871
25920
  if (serializeFn) {
25872
- serializedParams = serializeFn(params, options);
25921
+ serializedParams = serializeFn(params, _options);
25873
25922
  } else {
25874
25923
  serializedParams = utils$1.isURLSearchParams(params) ?
25875
25924
  params.toString() :
25876
- new AxiosURLSearchParams(params, options).toString(_encode);
25925
+ new AxiosURLSearchParams(params, _options).toString(_encode);
25877
25926
  }
25878
25927
 
25879
25928
  if (serializedParams) {
@@ -25898,6 +25947,7 @@
25898
25947
  *
25899
25948
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
25900
25949
  * @param {Function} rejected The function to handle `reject` for a `Promise`
25950
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
25901
25951
  *
25902
25952
  * @return {Number} An ID used to remove interceptor later
25903
25953
  */
@@ -25959,7 +26009,8 @@
25959
26009
  const transitionalDefaults = {
25960
26010
  silentJSONParsing: true,
25961
26011
  forcedJSONParsing: true,
25962
- clarifyTimeoutError: false
26012
+ clarifyTimeoutError: false,
26013
+ legacyInterceptorReqResOrdering: true
25963
26014
  };
25964
26015
 
25965
26016
  const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -26247,7 +26298,7 @@
26247
26298
  } catch (e) {
26248
26299
  if (strictJSONParsing) {
26249
26300
  if (e.name === 'SyntaxError') {
26250
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
26301
+ throw AxiosError$2.from(e, AxiosError$2.ERR_BAD_RESPONSE, this, null, this.response);
26251
26302
  }
26252
26303
  throw e;
26253
26304
  }
@@ -26681,24 +26732,24 @@
26681
26732
  return !!(value && value.__CANCEL__);
26682
26733
  }
26683
26734
 
26684
- /**
26685
- * A `CanceledError` is an object that is thrown when an operation is canceled.
26686
- *
26687
- * @param {string=} message The message.
26688
- * @param {Object=} config The config.
26689
- * @param {Object=} request The request.
26690
- *
26691
- * @returns {CanceledError} The created error.
26692
- */
26693
- function CanceledError$1(message, config, request) {
26694
- // eslint-disable-next-line no-eq-null,eqeqeq
26695
- AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
26696
- this.name = 'CanceledError';
26735
+ class CanceledError$1 extends AxiosError$2 {
26736
+ /**
26737
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
26738
+ *
26739
+ * @param {string=} message The message.
26740
+ * @param {Object=} config The config.
26741
+ * @param {Object=} request The request.
26742
+ *
26743
+ * @returns {CanceledError} The created error.
26744
+ */
26745
+ constructor(message, config, request) {
26746
+ super(message == null ? 'canceled' : message, AxiosError$2.ERR_CANCELED, config, request);
26747
+ this.name = 'CanceledError';
26748
+ this.__CANCEL__ = true;
26749
+ }
26697
26750
  }
26698
26751
 
26699
- utils$1.inherits(CanceledError$1, AxiosError$1, {
26700
- __CANCEL__: true
26701
- });
26752
+ const CanceledError$2 = CanceledError$1;
26702
26753
 
26703
26754
  /**
26704
26755
  * Resolve or reject a Promise based on response status.
@@ -26714,9 +26765,9 @@
26714
26765
  if (!response.status || !validateStatus || validateStatus(response.status)) {
26715
26766
  resolve(response);
26716
26767
  } else {
26717
- reject(new AxiosError$1(
26768
+ reject(new AxiosError$2(
26718
26769
  'Request failed with status code ' + response.status,
26719
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
26770
+ [AxiosError$2.ERR_BAD_REQUEST, AxiosError$2.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
26720
26771
  response.config,
26721
26772
  response.request,
26722
26773
  response
@@ -26939,6 +26990,10 @@
26939
26990
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
26940
26991
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
26941
26992
  // by any combination of letters, digits, plus, period, or hyphen.
26993
+ if (typeof url !== 'string') {
26994
+ return false;
26995
+ }
26996
+
26942
26997
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
26943
26998
  }
26944
26999
 
@@ -26974,7 +27029,8 @@
26974
27029
  return requestedURL;
26975
27030
  }
26976
27031
 
26977
- const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
27032
+ const headersToObject = (thing) =>
27033
+ thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
26978
27034
 
26979
27035
  /**
26980
27036
  * Config-specific merge-function which creates a new config-object
@@ -26992,7 +27048,7 @@
26992
27048
 
26993
27049
  function getMergedValue(target, source, prop, caseless) {
26994
27050
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
26995
- return utils$1.merge.call({caseless}, target, source);
27051
+ return utils$1.merge.call({ caseless }, target, source);
26996
27052
  } else if (utils$1.isPlainObject(source)) {
26997
27053
  return utils$1.merge({}, source);
26998
27054
  } else if (utils$1.isArray(source)) {
@@ -27001,7 +27057,6 @@
27001
27057
  return source;
27002
27058
  }
27003
27059
 
27004
- // eslint-disable-next-line consistent-return
27005
27060
  function mergeDeepProperties(a, b, prop, caseless) {
27006
27061
  if (!utils$1.isUndefined(b)) {
27007
27062
  return getMergedValue(a, b, prop, caseless);
@@ -27064,14 +27119,27 @@
27064
27119
  socketPath: defaultToConfig2,
27065
27120
  responseEncoding: defaultToConfig2,
27066
27121
  validateStatus: mergeDirectKeys,
27067
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
27122
+ headers: (a, b, prop) =>
27123
+ mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
27068
27124
  };
27069
27125
 
27070
- utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
27071
- const merge = mergeMap[prop] || mergeDeepProperties;
27072
- const configValue = merge(config1[prop], config2[prop], prop);
27073
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
27074
- });
27126
+ utils$1.forEach(
27127
+ Object.keys({ ...config1, ...config2 }),
27128
+ function computeConfigValue(prop) {
27129
+ if (
27130
+ prop === "__proto__" ||
27131
+ prop === "constructor" ||
27132
+ prop === "prototype"
27133
+ )
27134
+ return;
27135
+ const merge = utils$1.hasOwnProp(mergeMap, prop)
27136
+ ? mergeMap[prop]
27137
+ : mergeDeepProperties;
27138
+ const configValue = merge(config1[prop], config2[prop], prop);
27139
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
27140
+ (config[prop] = configValue);
27141
+ },
27142
+ );
27075
27143
 
27076
27144
  return config;
27077
27145
  }
@@ -27216,7 +27284,7 @@
27216
27284
  return;
27217
27285
  }
27218
27286
 
27219
- reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
27287
+ reject(new AxiosError$2('Request aborted', AxiosError$2.ECONNABORTED, config, request));
27220
27288
 
27221
27289
  // Clean up request
27222
27290
  request = null;
@@ -27228,7 +27296,7 @@
27228
27296
  // (message may be empty; when present, surface it)
27229
27297
  // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
27230
27298
  const msg = event && event.message ? event.message : 'Network Error';
27231
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
27299
+ const err = new AxiosError$2(msg, AxiosError$2.ERR_NETWORK, config, request);
27232
27300
  // attach the underlying event for consumers who want details
27233
27301
  err.event = event || null;
27234
27302
  reject(err);
@@ -27242,9 +27310,9 @@
27242
27310
  if (_config.timeoutErrorMessage) {
27243
27311
  timeoutErrorMessage = _config.timeoutErrorMessage;
27244
27312
  }
27245
- reject(new AxiosError$1(
27313
+ reject(new AxiosError$2(
27246
27314
  timeoutErrorMessage,
27247
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
27315
+ transitional.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED,
27248
27316
  config,
27249
27317
  request));
27250
27318
 
@@ -27294,7 +27362,7 @@
27294
27362
  if (!request) {
27295
27363
  return;
27296
27364
  }
27297
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
27365
+ reject(!cancel || cancel.type ? new CanceledError$2(null, config, request) : cancel);
27298
27366
  request.abort();
27299
27367
  request = null;
27300
27368
  };
@@ -27308,7 +27376,7 @@
27308
27376
  const protocol = parseProtocol(_config.url);
27309
27377
 
27310
27378
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
27311
- reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
27379
+ reject(new AxiosError$2('Unsupported protocol ' + protocol + ':', AxiosError$2.ERR_BAD_REQUEST, config));
27312
27380
  return;
27313
27381
  }
27314
27382
 
@@ -27331,13 +27399,13 @@
27331
27399
  aborted = true;
27332
27400
  unsubscribe();
27333
27401
  const err = reason instanceof Error ? reason : this.reason;
27334
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
27402
+ controller.abort(err instanceof AxiosError$2 ? err : new CanceledError$2(err instanceof Error ? err.message : err));
27335
27403
  }
27336
27404
  };
27337
27405
 
27338
27406
  let timer = timeout && setTimeout(() => {
27339
27407
  timer = null;
27340
- onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
27408
+ onabort(new AxiosError$2(`timeout of ${timeout}ms exceeded`, AxiosError$2.ETIMEDOUT));
27341
27409
  }, timeout);
27342
27410
 
27343
27411
  const unsubscribe = () => {
@@ -27523,7 +27591,7 @@
27523
27591
  return method.call(res);
27524
27592
  }
27525
27593
 
27526
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
27594
+ throw new AxiosError$2(`Response type '${type}' is not supported`, AxiosError$2.ERR_NOT_SUPPORT, config);
27527
27595
  });
27528
27596
  });
27529
27597
  })());
@@ -27689,14 +27757,14 @@
27689
27757
 
27690
27758
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
27691
27759
  throw Object.assign(
27692
- new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
27760
+ new AxiosError$2('Network Error', AxiosError$2.ERR_NETWORK, config, request, err && err.response),
27693
27761
  {
27694
27762
  cause: err.cause || err
27695
27763
  }
27696
27764
  )
27697
27765
  }
27698
27766
 
27699
- throw AxiosError$1.from(err, err && err.code, config, request);
27767
+ throw AxiosError$2.from(err, err && err.code, config, request, err && err.response);
27700
27768
  }
27701
27769
  }
27702
27770
  };
@@ -27801,7 +27869,7 @@
27801
27869
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
27802
27870
 
27803
27871
  if (adapter === undefined) {
27804
- throw new AxiosError$1(`Unknown adapter '${id}'`);
27872
+ throw new AxiosError$2(`Unknown adapter '${id}'`);
27805
27873
  }
27806
27874
  }
27807
27875
 
@@ -27822,7 +27890,7 @@
27822
27890
  (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
27823
27891
  'as no adapter specified';
27824
27892
 
27825
- throw new AxiosError$1(
27893
+ throw new AxiosError$2(
27826
27894
  `There is no suitable adapter to dispatch the request ` + s,
27827
27895
  'ERR_NOT_SUPPORT'
27828
27896
  );
@@ -27861,7 +27929,7 @@
27861
27929
  }
27862
27930
 
27863
27931
  if (config.signal && config.signal.aborted) {
27864
- throw new CanceledError$1(null, config);
27932
+ throw new CanceledError$2(null, config);
27865
27933
  }
27866
27934
  }
27867
27935
 
@@ -27921,7 +27989,7 @@
27921
27989
  });
27922
27990
  }
27923
27991
 
27924
- const VERSION$1 = "1.13.2";
27992
+ const VERSION$1 = "1.13.5";
27925
27993
 
27926
27994
  const validators$1 = {};
27927
27995
 
@@ -27951,9 +28019,9 @@
27951
28019
  // eslint-disable-next-line func-names
27952
28020
  return (value, opt, opts) => {
27953
28021
  if (validator === false) {
27954
- throw new AxiosError$1(
28022
+ throw new AxiosError$2(
27955
28023
  formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
27956
- AxiosError$1.ERR_DEPRECATED
28024
+ AxiosError$2.ERR_DEPRECATED
27957
28025
  );
27958
28026
  }
27959
28027
 
@@ -27992,7 +28060,7 @@
27992
28060
 
27993
28061
  function assertOptions(options, schema, allowUnknown) {
27994
28062
  if (typeof options !== 'object') {
27995
- throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
28063
+ throw new AxiosError$2('options must be an object', AxiosError$2.ERR_BAD_OPTION_VALUE);
27996
28064
  }
27997
28065
  const keys = Object.keys(options);
27998
28066
  let i = keys.length;
@@ -28003,12 +28071,12 @@
28003
28071
  const value = options[opt];
28004
28072
  const result = value === undefined || validator(value, opt, options);
28005
28073
  if (result !== true) {
28006
- throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
28074
+ throw new AxiosError$2('option ' + opt + ' must be ' + result, AxiosError$2.ERR_BAD_OPTION_VALUE);
28007
28075
  }
28008
28076
  continue;
28009
28077
  }
28010
28078
  if (allowUnknown !== true) {
28011
- throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
28079
+ throw new AxiosError$2('Unknown option ' + opt, AxiosError$2.ERR_BAD_OPTION);
28012
28080
  }
28013
28081
  }
28014
28082
  }
@@ -28089,7 +28157,8 @@
28089
28157
  validator.assertOptions(transitional, {
28090
28158
  silentJSONParsing: validators.transitional(validators.boolean),
28091
28159
  forcedJSONParsing: validators.transitional(validators.boolean),
28092
- clarifyTimeoutError: validators.transitional(validators.boolean)
28160
+ clarifyTimeoutError: validators.transitional(validators.boolean),
28161
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
28093
28162
  }, false);
28094
28163
  }
28095
28164
 
@@ -28146,7 +28215,14 @@
28146
28215
 
28147
28216
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
28148
28217
 
28149
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
28218
+ const transitional = config.transitional || transitionalDefaults;
28219
+ const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
28220
+
28221
+ if (legacyInterceptorReqResOrdering) {
28222
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
28223
+ } else {
28224
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
28225
+ }
28150
28226
  });
28151
28227
 
28152
28228
  const responseInterceptorChain = [];
@@ -28301,7 +28377,7 @@
28301
28377
  return;
28302
28378
  }
28303
28379
 
28304
- token.reason = new CanceledError$1(message, config, request);
28380
+ token.reason = new CanceledError$2(message, config, request);
28305
28381
  resolvePromise(token.reason);
28306
28382
  });
28307
28383
  }
@@ -28385,7 +28461,7 @@
28385
28461
  *
28386
28462
  * ```js
28387
28463
  * function f(x, y, z) {}
28388
- * var args = [1, 2, 3];
28464
+ * const args = [1, 2, 3];
28389
28465
  * f.apply(null, args);
28390
28466
  * ```
28391
28467
  *
@@ -28526,14 +28602,14 @@
28526
28602
  axios$1.Axios = Axios$2;
28527
28603
 
28528
28604
  // Expose Cancel & CancelToken
28529
- axios$1.CanceledError = CanceledError$1;
28605
+ axios$1.CanceledError = CanceledError$2;
28530
28606
  axios$1.CancelToken = CancelToken$2;
28531
28607
  axios$1.isCancel = isCancel$1;
28532
28608
  axios$1.VERSION = VERSION$1;
28533
28609
  axios$1.toFormData = toFormData$1;
28534
28610
 
28535
28611
  // Expose AxiosError class
28536
- axios$1.AxiosError = AxiosError$1;
28612
+ axios$1.AxiosError = AxiosError$2;
28537
28613
 
28538
28614
  // alias for CanceledError for backward compatibility
28539
28615
  axios$1.Cancel = axios$1.CanceledError;
@@ -28933,7 +29009,7 @@
28933
29009
  const axiosGlobal = ((axios$1$1 === null || axios$1$1 === void 0 ? void 0 : axios$1$1.default) || axios$1$1);
28934
29010
  const axios = axiosGlobal.create();
28935
29011
  const DEFAULT_API_URI = 'https://api.getmembrane.com';
28936
- const DEFAULT_UI_URI = 'https://console.getmembrane.com';
29012
+ const DEFAULT_UI_URI = 'https://ui.getmembrane.com';
28937
29013
  const membraneClientOptionsSchema = object({
28938
29014
  token: string$1().nullish(),
28939
29015
  fetchToken: _function().nullish(),