rebilly-js-sdk 56.34.1 → 56.34.2

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/CHANGELOG.md CHANGED
@@ -1 +1,6 @@
1
- ## [56.34.1](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v56.34.0...rebilly-js-sdk-v56.34.1) (2024-06-05)
1
+ ## [56.34.2](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v56.34.1...rebilly-js-sdk-v56.34.2) (2024-06-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **api-metadata, rebilly-js-sdk:** Remove experimental billing portal resource ([#5769](https://github.com/Rebilly/rebilly/issues/5769)) ([9f2687d](https://github.com/Rebilly/rebilly/commit/9f2687d8d81177aa1e9ab75d3863fbd1601a071d))
@@ -1867,11 +1867,6 @@ declare namespace rebilly {
1867
1867
  type StorefrontGetBillingPortalResponse = operations['StorefrontGetBillingPortal']['responses']['200']['content']['application/json']
1868
1868
  type StorefrontGetBillingPortalResponsePromise = Promise<{fields: StorefrontGetBillingPortalResponse}>
1869
1869
 
1870
- type StorefrontGetExperimentalBillingPortalRequest = { slug: string }
1871
-
1872
- type StorefrontGetExperimentalBillingPortalResponse = operations['StorefrontGetExperimentalBillingPortal']['responses']['200']['content']['application/json']
1873
- type StorefrontGetExperimentalBillingPortalResponsePromise = Promise<{fields: StorefrontGetExperimentalBillingPortalResponse}>
1874
-
1875
1870
  type StorefrontGetDepositStrategyRequest = { id: string }
1876
1871
 
1877
1872
  type StorefrontGetDepositStrategyResponse = operations['StorefrontGetDepositStrategy']['responses']['200']['content']['application/json']
@@ -38491,16 +38486,6 @@ export interface storefrontPaths {
38491
38486
  };
38492
38487
  };
38493
38488
  };
38494
- "/experimental/billing-portals/{slug}": {
38495
- /** Retrieve a billing portal with a specified slug. */
38496
- get: operations["StorefrontGetExperimentalBillingPortal"];
38497
- parameters: {
38498
- path: {
38499
- /** Resource slug. */
38500
- slug: string;
38501
- };
38502
- };
38503
- };
38504
38489
  "/deposit-strategies/{id}": {
38505
38490
  /** Retrieves a deposit strategy with a specified ID. */
38506
38491
  get: operations["StorefrontGetDepositStrategy"];
@@ -59928,26 +59913,6 @@ export interface operations {
59928
59913
  404: storefrontComponents["responses"]["NotFound"];
59929
59914
  };
59930
59915
  };
59931
- /** Retrieve a billing portal with a specified slug. */
59932
- StorefrontGetExperimentalBillingPortal: {
59933
- parameters: {
59934
- path: {
59935
- /** Resource slug. */
59936
- slug: string;
59937
- };
59938
- };
59939
- responses: {
59940
- /** Billing portal retrieved. */
59941
- 200: {
59942
- content: {
59943
- "application/json": storefrontComponents["schemas"]["StorefrontBillingPortal"];
59944
- };
59945
- };
59946
- 401: storefrontComponents["responses"]["Unauthorized"];
59947
- 403: storefrontComponents["responses"]["Forbidden"];
59948
- 404: storefrontComponents["responses"]["NotFound"];
59949
- };
59950
- };
59951
59916
  /** Retrieves a deposit strategy with a specified ID. */
59952
59917
  StorefrontGetDepositStrategy: {
59953
59918
  parameters: {
@@ -88175,15 +88140,6 @@ declare module "resources/storefront/deposit-strategies-resource" {
88175
88140
  }): rebilly.StorefrontGetDepositStrategyResponsePromise;
88176
88141
  };
88177
88142
  }
88178
- declare module "resources/storefront/experimental-resource" {
88179
- export default function ExperimentalResource({ apiHandler }: {
88180
- apiHandler: any;
88181
- }): {
88182
- get({ slug }: {
88183
- slug: any;
88184
- }): rebilly.StorefrontGetExperimentalBillingPortalResponsePromise;
88185
- };
88186
- }
88187
88143
  declare module "resources/storefront/invoices-resource" {
88188
88144
  export default function InvoicesResource({ apiHandler }: {
88189
88145
  apiHandler: any;
@@ -88495,11 +88451,6 @@ declare module "resources/storefront/storefront-api-instance" {
88495
88451
  id: any;
88496
88452
  }): rebilly.StorefrontGetDepositStrategyResponsePromise;
88497
88453
  };
88498
- experimental: {
88499
- get({ slug }: {
88500
- slug: any;
88501
- }): rebilly.StorefrontGetExperimentalBillingPortalResponsePromise;
88502
- };
88503
88454
  invoices: {
88504
88455
  getAll({ filter, sort, limit, offset, q, expand, }?: {
88505
88456
  filter?: string;
@@ -435,7 +435,7 @@ q(T, "cancelById", (t, s) => {
435
435
  q(T, "cancelAll", (t) => w.getAll().forEach((s) => {
436
436
  s.cancel(t), w.deleteById(s.id);
437
437
  }));
438
- const ir = {
438
+ const cr = {
439
439
  /**
440
440
  * @type Cancellation.cancelAll
441
441
  */
@@ -4570,16 +4570,6 @@ function Ks({ apiHandler: e }) {
4570
4570
  };
4571
4571
  }
4572
4572
  function Bs({ apiHandler: e }) {
4573
- return {
4574
- /**
4575
- * @returns { rebilly.StorefrontGetExperimentalBillingPortalResponsePromise } response
4576
- */
4577
- get({ slug: t }) {
4578
- return e.get(`experimental/billing-portals/${t}`);
4579
- }
4580
- };
4581
- }
4582
- function Ls({ apiHandler: e }) {
4583
4573
  return {
4584
4574
  /**
4585
4575
  * @param { rebilly.StorefrontGetInvoiceCollectionRequest } request
@@ -4611,7 +4601,7 @@ function Ls({ apiHandler: e }) {
4611
4601
  }
4612
4602
  };
4613
4603
  }
4614
- function Ns({ apiHandler: e }) {
4604
+ function Ls({ apiHandler: e }) {
4615
4605
  return {
4616
4606
  /**
4617
4607
  * @param { rebilly.StorefrontGetKycDocumentCollectionRequest } request
@@ -4635,7 +4625,7 @@ function Ns({ apiHandler: e }) {
4635
4625
  }
4636
4626
  };
4637
4627
  }
4638
- function zs({ apiHandler: e }) {
4628
+ function Ns({ apiHandler: e }) {
4639
4629
  return {
4640
4630
  create({ data: t }) {
4641
4631
  return e.post("kyc-liveness-sessions", t);
@@ -4651,7 +4641,7 @@ function zs({ apiHandler: e }) {
4651
4641
  }
4652
4642
  };
4653
4643
  }
4654
- function Us({ apiHandler: e }) {
4644
+ function zs({ apiHandler: e }) {
4655
4645
  return {
4656
4646
  /**
4657
4647
  * @returns { rebilly.StorefrontGetKycRequestResponsePromise } response
@@ -4662,7 +4652,7 @@ function Us({ apiHandler: e }) {
4662
4652
  }
4663
4653
  };
4664
4654
  }
4665
- function Vs({ apiHandler: e }) {
4655
+ function Us({ apiHandler: e }) {
4666
4656
  return {
4667
4657
  /**
4668
4658
  * @returns { rebilly.StorefrontGetOrderUpcomingInvoiceResponsePromise } response
@@ -4703,7 +4693,7 @@ function Vs({ apiHandler: e }) {
4703
4693
  }
4704
4694
  };
4705
4695
  }
4706
- function Js({ apiHandler: e }) {
4696
+ function Vs({ apiHandler: e }) {
4707
4697
  return {
4708
4698
  /**
4709
4699
  * @param { rebilly.StorefrontGetPaymentInstrumentCollectionRequest } request
@@ -4746,7 +4736,7 @@ function Js({ apiHandler: e }) {
4746
4736
  }
4747
4737
  };
4748
4738
  }
4749
- function Ws({ apiHandler: e }) {
4739
+ function Js({ apiHandler: e }) {
4750
4740
  return {
4751
4741
  /**
4752
4742
  * @param { rebilly.StorefrontGetPayoutRequestCollectionRequest } request
@@ -4773,7 +4763,7 @@ function Ws({ apiHandler: e }) {
4773
4763
  }
4774
4764
  };
4775
4765
  }
4776
- function Gs({ apiHandler: e }) {
4766
+ function Ws({ apiHandler: e }) {
4777
4767
  return {
4778
4768
  /**
4779
4769
  * @param { rebilly.StorefrontGetPlanCollectionRequest } request
@@ -4799,7 +4789,7 @@ function Gs({ apiHandler: e }) {
4799
4789
  }
4800
4790
  };
4801
4791
  }
4802
- function Ys({ apiHandler: e }) {
4792
+ function Gs({ apiHandler: e }) {
4803
4793
  return {
4804
4794
  /**
4805
4795
  * @param { rebilly.StorefrontGetProductCollectionRequest } request
@@ -4823,7 +4813,7 @@ function Ys({ apiHandler: e }) {
4823
4813
  }
4824
4814
  };
4825
4815
  }
4826
- function Qs({ apiHandler: e }) {
4816
+ function Ys({ apiHandler: e }) {
4827
4817
  return {
4828
4818
  payment({ data: t }) {
4829
4819
  return e.post("payment", t);
@@ -4839,7 +4829,7 @@ function Qs({ apiHandler: e }) {
4839
4829
  }
4840
4830
  };
4841
4831
  }
4842
- function Xs({ apiHandler: e }) {
4832
+ function Qs({ apiHandler: e }) {
4843
4833
  return {
4844
4834
  /**
4845
4835
  * @returns { rebilly.StorefrontGetQuoteResponsePromise } response
@@ -4863,21 +4853,21 @@ function Xs({ apiHandler: e }) {
4863
4853
  }
4864
4854
  };
4865
4855
  }
4866
- function Zs({ apiHandler: e }) {
4856
+ function Xs({ apiHandler: e }) {
4867
4857
  return {
4868
4858
  readyToPayout({ data: t }) {
4869
4859
  return e.post("ready-to-payout", t);
4870
4860
  }
4871
4861
  };
4872
4862
  }
4873
- function _s({ apiHandler: e }) {
4863
+ function Zs({ apiHandler: e }) {
4874
4864
  return {
4875
4865
  reactivation({ data: t }) {
4876
4866
  return e.post("subscription-reactivations", t);
4877
4867
  }
4878
4868
  };
4879
4869
  }
4880
- function Hs({ apiHandler: e }) {
4870
+ function _s({ apiHandler: e }) {
4881
4871
  return {
4882
4872
  changeItems({ id: t, data: s }) {
4883
4873
  return e.post(`subscriptions/${t}/change-items`, s);
@@ -4887,7 +4877,7 @@ function Hs({ apiHandler: e }) {
4887
4877
  }
4888
4878
  };
4889
4879
  }
4890
- function tr({ apiHandler: e }) {
4880
+ function Hs({ apiHandler: e }) {
4891
4881
  return {
4892
4882
  /**
4893
4883
  * @param { rebilly.StorefrontGetTransactionCollectionRequest } request
@@ -4920,7 +4910,7 @@ function tr({ apiHandler: e }) {
4920
4910
  }
4921
4911
  };
4922
4912
  }
4923
- function er({ apiHandler: e }) {
4913
+ function tr({ apiHandler: e }) {
4924
4914
  return {
4925
4915
  /**
4926
4916
  * @returns { rebilly.StorefrontGetWebsiteResponsePromise } response
@@ -4930,27 +4920,27 @@ function er({ apiHandler: e }) {
4930
4920
  }
4931
4921
  };
4932
4922
  }
4933
- class sr {
4923
+ class er {
4934
4924
  constructor({ apiHandler: t }) {
4935
- this.account = Ps({ apiHandler: t }), this.authorization = Cs({ apiHandler: t }), this.billingPortals = js({ apiHandler: t }), this.checkoutForms = Ds({ apiHandler: t }), this.customFields = Ms({ apiHandler: t }), this.depositRequests = Os({ apiHandler: t }), this.deposit = Fs({ apiHandler: t }), this.depositStrategies = Ks({ apiHandler: t }), this.experimental = Bs({ apiHandler: t }), this.invoices = Ls({ apiHandler: t }), this.kycDocuments = Ns({ apiHandler: t }), this.kycLivenessSessions = zs({ apiHandler: t }), this.kycRequests = Us({ apiHandler: t }), this.orders = Vs({ apiHandler: t }), this.paymentInstruments = Js({ apiHandler: t }), this.payoutRequests = Ws({ apiHandler: t }), this.plans = Gs({ apiHandler: t }), this.products = Ys({ apiHandler: t }), this.purchase = Qs({ apiHandler: t }), this.quotes = Xs({ apiHandler: t }), this.readyToPayout = Zs({ apiHandler: t }), this.subscriptionReactivations = _s({
4925
+ this.account = Ps({ apiHandler: t }), this.authorization = Cs({ apiHandler: t }), this.billingPortals = js({ apiHandler: t }), this.checkoutForms = Ds({ apiHandler: t }), this.customFields = Ms({ apiHandler: t }), this.depositRequests = Os({ apiHandler: t }), this.deposit = Fs({ apiHandler: t }), this.depositStrategies = Ks({ apiHandler: t }), this.invoices = Bs({ apiHandler: t }), this.kycDocuments = Ls({ apiHandler: t }), this.kycLivenessSessions = Ns({ apiHandler: t }), this.kycRequests = zs({ apiHandler: t }), this.orders = Us({ apiHandler: t }), this.paymentInstruments = Vs({ apiHandler: t }), this.payoutRequests = Js({ apiHandler: t }), this.plans = Ws({ apiHandler: t }), this.products = Gs({ apiHandler: t }), this.purchase = Ys({ apiHandler: t }), this.quotes = Qs({ apiHandler: t }), this.readyToPayout = Xs({ apiHandler: t }), this.subscriptionReactivations = Zs({
4936
4926
  apiHandler: t
4937
- }), this.subscriptions = Hs({ apiHandler: t }), this.transactions = tr({ apiHandler: t }), this.websites = er({ apiHandler: t }), this.checkoutForm = this.checkoutForms, this.billingPortal = this.billingPortals, this.addRequestInterceptor = t.addRequestInterceptor, this.removeRequestInterceptor = t.removeRequestInterceptor, this.addResponseInterceptor = t.addResponseInterceptor, this.removeResponseInterceptor = t.removeResponseInterceptor, this.setTimeout = t.setTimeout, this.setProxyAgent = t.setProxyAgent, this.setSessionToken = t.setSessionToken, this.setPublishableKey = t.setPublishableKey, this.setEndpoints = t.setEndpoints, this.getCancellationToken = t.getCancellationToken, this.generateSignature = t.generateSignature;
4927
+ }), this.subscriptions = _s({ apiHandler: t }), this.transactions = Hs({ apiHandler: t }), this.websites = tr({ apiHandler: t }), this.checkoutForm = this.checkoutForms, this.billingPortal = this.billingPortals, this.addRequestInterceptor = t.addRequestInterceptor, this.removeRequestInterceptor = t.removeRequestInterceptor, this.addResponseInterceptor = t.addResponseInterceptor, this.removeResponseInterceptor = t.removeResponseInterceptor, this.setTimeout = t.setTimeout, this.setProxyAgent = t.setProxyAgent, this.setSessionToken = t.setSessionToken, this.setPublishableKey = t.setPublishableKey, this.setEndpoints = t.setEndpoints, this.getCancellationToken = t.getCancellationToken, this.generateSignature = t.generateSignature;
4938
4928
  }
4939
4929
  }
4940
- function rr({ apiHandler: e }) {
4930
+ function sr({ apiHandler: e }) {
4941
4931
  return new ks({ apiHandler: e });
4942
4932
  }
4943
- function nr({ apiHandler: e }) {
4933
+ function rr({ apiHandler: e }) {
4944
4934
  return new xs({ apiHandler: e });
4945
4935
  }
4946
- function ur({ apiHandler: e }) {
4947
- return new sr({ apiHandler: e });
4936
+ function nr({ apiHandler: e }) {
4937
+ return new er({ apiHandler: e });
4948
4938
  }
4949
4939
  const j = {
4950
4940
  live: "https://api.rebilly.com",
4951
4941
  sandbox: "https://api-sandbox.rebilly.com"
4952
4942
  }, D = 6e3;
4953
- function gr({
4943
+ function ir({
4954
4944
  apiKey: e = null,
4955
4945
  sandbox: t = !1,
4956
4946
  timeout: s = D,
@@ -4974,9 +4964,9 @@ function gr({
4974
4964
  jwt: null,
4975
4965
  organizationId: r
4976
4966
  } });
4977
- return rr({ apiHandler: o });
4967
+ return sr({ apiHandler: o });
4978
4968
  }
4979
- function ar({
4969
+ function gr({
4980
4970
  apiKey: e = null,
4981
4971
  sandbox: t = !1,
4982
4972
  timeout: s = D,
@@ -5000,9 +4990,9 @@ function ar({
5000
4990
  jwt: null,
5001
4991
  organizationId: r
5002
4992
  } });
5003
- return nr({ apiHandler: o });
4993
+ return rr({ apiHandler: o });
5004
4994
  }
5005
- function mr({
4995
+ function ar({
5006
4996
  publishableKey: e = null,
5007
4997
  jwt: t = null,
5008
4998
  sandbox: s = !1,
@@ -5027,13 +5017,13 @@ function mr({
5027
5017
  requestTimeout: r,
5028
5018
  organizationId: n
5029
5019
  }, l = C({ options: o });
5030
- return l.setSessionToken(o.jwt), ur({ apiHandler: l });
5020
+ return l.setSessionToken(o.jwt), nr({ apiHandler: l });
5031
5021
  }
5032
5022
  export {
5033
- gr as RebillyAPI,
5023
+ ir as RebillyAPI,
5034
5024
  $ as RebillyErrors,
5035
- ar as RebillyExperimentalAPI,
5036
- mr as RebillyStorefrontAPI,
5037
- ir as cancellation,
5038
- gr as default
5025
+ gr as RebillyExperimentalAPI,
5026
+ ar as RebillyStorefrontAPI,
5027
+ cr as cancellation,
5028
+ ir as default
5039
5029
  };
@@ -1,4 +1,4 @@
1
- (function(f,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],$):(f=typeof globalThis<"u"?globalThis:f||self,$(f["rebilly-js-sdk"]={},f.axios))})(this,function(f,$){"use strict";var gn=Object.defineProperty;var an=(f,$,y)=>$ in f?gn(f,$,{enumerable:!0,configurable:!0,writable:!0,value:y}):f[$]=y;var M=(f,$,y)=>(an(f,typeof $!="symbol"?$+"":$,y),y);function y(t,{exclude:e=[]}={}){Object.freeze(t);const s=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(n=>{(!s||n!=="caller"&&n!=="callee"&&n!=="arguments")&&t[n]!==null&&!e.includes(n)&&(typeof t[n]=="object"||typeof t[n]=="function")&&!Object.isFrozen(t[n])&&y(t[n],{exclude:e})}),t}class O{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.response={status:s,statusText:n,headers:r},this.fields={...e},this.config=u,y(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const F={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class Z{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(F).forEach(o=>{const l=r[F[o]];this[o]=l?Number(l):null}),this.response={status:s,statusText:n,headers:r},this.items=e.map(o=>new O({data:o,status:s,statusText:n,headers:r})),this.config=u,y(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class H{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.response={status:s,statusText:n,headers:r},this.data=e,this.config=u}}class A extends Error{constructor({error:e,name:s=null}){let{config:n=null,response:r=null,request:u=null,message:o=null}=e,l=o||"Request Error";r&&r.data&&r.data.error&&(l=r.data.error),super(l),this.name=s||"RebillyError",this.response=r,this.request=u,this.config=n,this.status=r&&r.status?r.status:null,this.statusText=r&&r.statusText?r.statusText:null,this.details=r&&r.data&&r.data.details?r.data.details:null,this.invalidFields=r&&r.data&&r.data.invalidFields?r.data.invalidFields:null}}class ee extends A{constructor(e){super({error:e,name:"RebillyRequestError"})}}class te extends A{constructor(e){super({error:e,name:"RebillyValidationError"})}}class se extends A{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ne extends A{constructor(e){super({error:e,name:"RebillyConflictError"})}}class re extends A{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ue extends A{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class oe extends A{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class le extends A{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const h={RebillyError:A,RebillyRequestError:ee,RebillyValidationError:te,RebillyNotFoundError:se,RebillyConflictError:ne,RebillyForbiddenError:re,RebillyMethodNotAllowedError:ue,RebillyTimeoutError:oe,RebillyCanceledError:le};function ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie=Object.prototype.toString,K=function(e){if(e===void 0)return"undefined";if(e===null)return"null";var s=typeof e;if(s==="boolean")return"boolean";if(s==="string")return"string";if(s==="number")return"number";if(s==="symbol")return"symbol";if(s==="function")return $e(e)?"generatorfunction":"function";if(ge(e))return"array";if(ye(e))return"buffer";if(he(e))return"arguments";if(me(e))return"date";if(ae(e))return"error";if(fe(e))return"regexp";switch(B(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(pe(e))return"generator";switch(s=ie.call(e),s){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return s.slice(8,-1).toLowerCase().replace(/\s/g,"")};function B(t){return typeof t.constructor=="function"?t.constructor.name:null}function ge(t){return Array.isArray?Array.isArray(t):t instanceof Array}function ae(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function me(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function fe(t){return t instanceof RegExp?!0:typeof t.flags=="string"&&typeof t.ignoreCase=="boolean"&&typeof t.multiline=="boolean"&&typeof t.global=="boolean"}function $e(t,e){return B(t)==="GeneratorFunction"}function pe(t){return typeof t.throw=="function"&&typeof t.return=="function"&&typeof t.next=="function"}function he(t){try{if(typeof t.length=="number"&&typeof t.callee=="function")return!0}catch(e){if(e.message.indexOf("callee")!==-1)return!0}return!1}function ye(t){return t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}/*!
1
+ (function(f,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],$):(f=typeof globalThis<"u"?globalThis:f||self,$(f["rebilly-js-sdk"]={},f.axios))})(this,function(f,$){"use strict";var cn=Object.defineProperty;var gn=(f,$,y)=>$ in f?cn(f,$,{enumerable:!0,configurable:!0,writable:!0,value:y}):f[$]=y;var M=(f,$,y)=>(gn(f,typeof $!="symbol"?$+"":$,y),y);function y(t,{exclude:e=[]}={}){Object.freeze(t);const s=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(n=>{(!s||n!=="caller"&&n!=="callee"&&n!=="arguments")&&t[n]!==null&&!e.includes(n)&&(typeof t[n]=="object"||typeof t[n]=="function")&&!Object.isFrozen(t[n])&&y(t[n],{exclude:e})}),t}class O{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.response={status:s,statusText:n,headers:r},this.fields={...e},this.config=u,y(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const F={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class Z{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(F).forEach(o=>{const l=r[F[o]];this[o]=l?Number(l):null}),this.response={status:s,statusText:n,headers:r},this.items=e.map(o=>new O({data:o,status:s,statusText:n,headers:r})),this.config=u,y(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class H{constructor({data:e,status:s,statusText:n,headers:r},u={}){this.response={status:s,statusText:n,headers:r},this.data=e,this.config=u}}class A extends Error{constructor({error:e,name:s=null}){let{config:n=null,response:r=null,request:u=null,message:o=null}=e,l=o||"Request Error";r&&r.data&&r.data.error&&(l=r.data.error),super(l),this.name=s||"RebillyError",this.response=r,this.request=u,this.config=n,this.status=r&&r.status?r.status:null,this.statusText=r&&r.statusText?r.statusText:null,this.details=r&&r.data&&r.data.details?r.data.details:null,this.invalidFields=r&&r.data&&r.data.invalidFields?r.data.invalidFields:null}}class ee extends A{constructor(e){super({error:e,name:"RebillyRequestError"})}}class te extends A{constructor(e){super({error:e,name:"RebillyValidationError"})}}class se extends A{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ne extends A{constructor(e){super({error:e,name:"RebillyConflictError"})}}class re extends A{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ue extends A{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class oe extends A{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class le extends A{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const h={RebillyError:A,RebillyRequestError:ee,RebillyValidationError:te,RebillyNotFoundError:se,RebillyConflictError:ne,RebillyForbiddenError:re,RebillyMethodNotAllowedError:ue,RebillyTimeoutError:oe,RebillyCanceledError:le};function ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie=Object.prototype.toString,K=function(e){if(e===void 0)return"undefined";if(e===null)return"null";var s=typeof e;if(s==="boolean")return"boolean";if(s==="string")return"string";if(s==="number")return"number";if(s==="symbol")return"symbol";if(s==="function")return $e(e)?"generatorfunction":"function";if(ge(e))return"array";if(ye(e))return"buffer";if(he(e))return"arguments";if(me(e))return"date";if(ae(e))return"error";if(fe(e))return"regexp";switch(B(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(pe(e))return"generator";switch(s=ie.call(e),s){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return s.slice(8,-1).toLowerCase().replace(/\s/g,"")};function B(t){return typeof t.constructor=="function"?t.constructor.name:null}function ge(t){return Array.isArray?Array.isArray(t):t instanceof Array}function ae(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function me(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function fe(t){return t instanceof RegExp?!0:typeof t.flags=="string"&&typeof t.ignoreCase=="boolean"&&typeof t.multiline=="boolean"&&typeof t.global=="boolean"}function $e(t,e){return B(t)==="GeneratorFunction"}function pe(t){return typeof t.throw=="function"&&typeof t.return=="function"&&typeof t.next=="function"}function he(t){try{if(typeof t.length=="number"&&typeof t.callee=="function")return!0}catch(e){if(e.message.indexOf("callee")!==-1)return!0}return!1}function ye(t){return t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}/*!
2
2
  * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
3
3
  *
4
4
  * Copyright (c) 2015-present, Jon Schlinkert.
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * Copyright (c) 2014-2017, Jon Schlinkert.
15
15
  * Released under the MIT License.
16
- */var Ee=Se;function N(t){return Ee(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Ie=function(e){var s,n;return!(N(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,N(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const qe=Te,xe=K,Pe=Ie;function q(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return qe(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=q(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=q(t[n],e);return s}var De=q;const Me=ce(De),Oe="0.0.0";let Fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ke=(t=21)=>{let e="",s=t;for(;s--;)e+=Fe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Ke(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class T{constructor(){if(T.instance)return T.instance;this.requests={},T.instance=this}getAll(){return Object.values(this.requests)}getById(e){return this.requests[e]}deleteById(e){this.requests[e]&&delete this.requests[e]}save(){const e=new Be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}const v=new T;class E{}M(E,"cancelById",(e,s)=>{try{v.getById(e).cancel(s),v.deleteById(e)}catch{}}),M(E,"cancelAll",e=>v.getAll().forEach(s=>{s.cancel(e),v.deleteById(s.id)}));const Le={cancelAll:(...t)=>E.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Oe}`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function _s({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function Xs(c){J(b.request,c)}function Zs({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function Hs(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const m=G(g),{id:R,cancelToken:cn}=v.save();m.cancelToken=cn;const X=async function(){try{const S=await c(m);return en({response:S,isCollection:i,config:m})}catch(S){return W({error:S,config:m})}finally{v.deleteById(R)}}();return X.cancel=S=>E.cancelById(R,S),X}function en({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function tn(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...tn(c)}}function Y(c,i={}){return d({request:g=>e.get(c,g),config:{params:i}})}function sn(c,i){return d({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let m={};return g.authenticate===!1&&(m={headers:l()},delete m.headers.common["REB-APIKEY"],delete m.headers.common.Authorization),g.params&&(m.params={...g.params}),d({request:R=>e.post(c,i,R),config:m})}function _(c,i,g={}){return d({request:m=>e.put(c,i,m),config:{params:g}})}function nn(c,i){return d({request:g=>e.patch(c,i,g),config:{}})}function rn(c){return d({request:i=>e.delete(c,i),config:{}})}function un(c,i){return d({request:g=>e.delete(c,g),config:{data:{...i}}})}async function on(c,i,g,m={}){if(i==="")return Q(c,g,{params:m});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,m);throw R}}async function ln(c,i){const g=G(i);try{const m=await e.get(c,g);return new H(m,g)}catch(m){return W({error:m,config:g})}}return{getInstance:n,addRequestInterceptor:_s,removeRequestInterceptor:Xs,addResponseInterceptor:Zs,removeResponseInterceptor:Hs,setTimeout:a,setProxyAgent:j,setSessionToken:p,setPublishableKey:k,setEndpoints:D,get:Y,getAll:sn,post:Q,put:_,patch:nn,delete:rn,deleteAll:un,create:on,download:ln}}function Ne({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null}={}){const r={limit:e,offset:s,sort:n};return t.getAll("api-keys",r)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:s}){return t.create(`billing-portals/${e}`,e,s)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:s}){return t.put(`billing-portals/${e}`,s)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:s}){return t.create(`checkout-forms/${e}`,e,s)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:s}){return t.put(`checkout-forms/${e}`,s)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function He({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function et({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("credit-memos",o)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function st({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function nt({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:s}){return t.post(`authentication-tokens/${e}/exchange`,s)},getAllCredentials({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("credentials",n)},createCredential({id:e="",data:s}){return t.create(`credentials/${e}`,e,s)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:s}){return t.put(`credentials/${e}`,s)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}function rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},updateLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:s}){return t.patch(`customers/${e}/edd-score`,s)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:s}){return t.post(`customers/${e}/edd-timeline`,s)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},deleteEddTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-requests",u)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function ct({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function it({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function gt({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function at({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},updateRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},getAllTimelineMessages({eventType:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:s}){return t.post(`events/${e}/timeline`,s)},getTimelineMessage({eventType:e,messageId:s}){return t.get(`events/${e}/timeline/${s}`)},deleteTimelineMessage({eventType:e,messageId:s}){return t.delete(`events/${e}/timeline/${s}`)},getRulesHistory({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function $t({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function pt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function yt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:s}){return t.put(`files/${e}`,s)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const s={responseType:"arraybuffer"};return t.download(`files/${e}/download`,s)},detachAndDelete({id:e}){const s={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const p=t.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:s}){return t.create(`gateway-accounts/${e}`,e,s)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:s}){return t.post(`gateway-accounts/${e}/downtime-schedules`,s)},getDowntimeSchedule({id:e,downtimeId:s}){return t.get(`gateway-accounts/${e}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:e,downtimeId:s,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},deleteDowntimeSchedule({id:e,downtimeId:s}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${s}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:s}){return t.get(`gateway-accounts/${e}/limits/${s}`)},updateVolumeLimit({id:e,limitId:s,data:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function bt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:s}){return t.create(`invoices/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:s}){return t.post(`invoices/${e}/items`,s)},getInvoiceItem({id:e,itemId:s}){return t.get(`invoices/${e}/items/${s}`)},updateInvoiceItem({id:e,itemId:s,data:n}){return t.put(`invoices/${e}/items/${s}`,n)},deleteInvoiceItem({id:e,itemId:s}){return t.delete(`invoices/${e}/items/${s}`)},issue({id:e,data:s}){return t.post(`invoices/${e}/issue`,s)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:s}){return t.post(`invoices/${e}/reissue`,s)},getAllTransactionAllocations({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`invoices/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`invoices/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`invoices/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function wt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function kt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)},getAllRecords({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,expand:o=null}){const l={limit:s,offset:n,filter:r,sort:u,expand:o};return t.getAll(`journal-entries/${e}/records`,l)},createRecord({id:e,data:s}){return t.post(`journal-entries/${e}/records`,s)},getRecord({id:e,journalRecordId:s}){return t.get(`journal-entries/${e}/records/${s}`)},updateRecord({id:e,journalRecordId:s,data:n}){return t.put(`journal-entries/${e}/records/${s}`,n)},deleteRecord({id:e,journalRecordId:s}){return t.delete(`journal-entries/${e}/records/${s}`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:s}){return t.create(`kyc-documents/${e}`,e,s)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.put(`kyc-documents/${e}`,s)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:s}){return t.post(`kyc-documents/${e}/matches`,s)},reject({id:e,data:s}){return t.post(`kyc-documents/${e}/rejection`,s)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function vt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function Tt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Pt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)}}}function Mt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ot({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Ft({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Kt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Bt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Lt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Nt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function zt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Ut({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("risk-score-simulation-jobs",u)},create({data:e}){return t.post("risk-score-simulation-jobs",e)},get({id:e}){return t.get(`risk-score-simulation-jobs/${e}`)},stop({id:e}){return t.post(`risk-score-simulation-jobs/${e}/stop`)},getTransactions({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`risk-score-simulation-jobs/${e}/transactions`,r)}}}function Jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:s}){return t.create(`roles/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Wt({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function Gt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:s}){return t.create(`grid-segments/${e}`,e,s)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:s}){return t.put(`grid-segments/${e}`,s)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function Yt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Qt({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:s}){return t.post(`service-credentials/${e}`,s)},get({type:e,id:s}){return t.get(`service-credentials/${e}/${s}`)},update({type:e,id:s,data:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,p)}}}function _t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:s}){return t.create(`shipping-rates/${e}`,e,s)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:s}){return t.put(`shipping-rates/${e}`,s)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function Xt({apiHandler:t}){return{get(){return t.get("status")}}}function Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-cancellations",u)},create({id:e="",data:s}){return t.create(`subscription-cancellations/${e}`,e,s)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`subscription-cancellations/${e}`,s)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-pauses",u)},pause({id:e="",data:s}){return t.create(`subscription-pauses/${e}`,e,s)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:s}){return t.put(`subscription-pauses/${e}`,s)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function es({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function ts({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`subscriptions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`subscriptions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`subscriptions/${e}/timeline/${s}`)}}}function ss({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:s}){return t.patch(`tags/${e}`,s)},tagCustomers({tag:e,data:s}){return t.post(`tags/${e}/customers`,s)},untagCustomers({tag:e,data:s}){return t.delete(`tags/${e}/customers`,s)},tagCustomer({tag:e,customerId:s}){return t.post(`tags/${e}/customers/${s}`)},untagCustomer({tag:e,customerId:s}){return t.delete(`tags/${e}/customers/${s}`)},tagKycDocuments({tag:e,data:s}){return t.post(`tags/${e}/kyc-documents`,s)},untagKycDocuments({tag:e,data:s}){return t.delete(`tags/${e}/kyc-documents`,s)},tagKycDocument({tag:e,kycDocumentId:s}){return t.post(`tags/${e}/kyc-documents/${s}`)},untagKycDocument({tag:e,kycDocumentId:s}){return t.delete(`tags/${e}/kyc-documents/${s}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function ns({apiHandler:t}){return{getAllTagsRules({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tags-rules",o)},createTagsRule({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},getTagsRule({id:e}){return t.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},deleteTagsRule({id:e}){return t.delete(`tags-rules/${e}`)}}}function rs({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s}){return t.post(`transactions/${e}/refund`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function os({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("usages",o)},create({id:e="",data:s}){return t.create(`usages/${e}`,e,s)},get({id:e}){return t.get(`usages/${e}`)},update({id:e,data:s}){return t.put(`usages/${e}`,s)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)}}}function is({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,sort:u};return t.getAll("websites",o)},create({id:e="",data:s}){return t.create(`websites/${e}`,e,s)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:s}){return t.put(`websites/${e}`,s)},delete({id:e}){return t.delete(`websites/${e}`)}}}class gs{constructor({apiHandler:e}){this.account=Ne({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.checkoutForms=Ze({apiHandler:e}),this.coupons=He({apiHandler:e}),this.creditMemos=et({apiHandler:e}),this.customDomains=tt({apiHandler:e}),this.customFields=st({apiHandler:e}),this.customerAuthentication=nt({apiHandler:e}),this.customers=rt({apiHandler:e}),this.depositCustomPropertySets=ut({apiHandler:e}),this.depositRequests=ot({apiHandler:e}),this.depositStrategies=lt({apiHandler:e}),this.digitalWallets=ct({apiHandler:e}),this.disputes=it({apiHandler:e}),this.emailDeliverySettings=gt({apiHandler:e}),this.emailMessages=at({apiHandler:e}),this.emailNotifications=mt({apiHandler:e}),this.events=ft({apiHandler:e}),this.externalIdentifiers=$t({apiHandler:e}),this.externalServicesSettings=pt({apiHandler:e}),this.fees=ht({apiHandler:e}),this.files=yt({apiHandler:e}),this.gatewayAccounts=At({apiHandler:e}),this.integrations=Rt({apiHandler:e}),this.invoices=bt({apiHandler:e}),this.journalAccounts=wt({apiHandler:e}),this.journalEntries=kt({apiHandler:e}),this.kycDocuments=dt({apiHandler:e}),this.kycRequests=vt({apiHandler:e}),this.kycSettings=Tt({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.organizationExports=It({apiHandler:e}),this.organizations=qt({apiHandler:e}),this.paymentCardsBankNames=xt({apiHandler:e}),this.paymentInstruments=Pt({apiHandler:e}),this.paymentMethods=Ct({apiHandler:e}),this.paymentTokens=jt({apiHandler:e}),this.payoutRequests=Dt({apiHandler:e}),this.payouts=Mt({apiHandler:e}),this.plans=Ot({apiHandler:e}),this.previews=Ft({apiHandler:e}),this.products=Kt({apiHandler:e}),this.profile=Bt({apiHandler:e}),this.purchase=Lt({apiHandler:e}),this.quotes=Nt({apiHandler:e}),this.resource=zt({apiHandler:e}),this.riskScoreRules=Ut({apiHandler:e}),this.riskScoreSimulationJobs=Vt({apiHandler:e}),this.roles=Jt({apiHandler:e}),this.search=Wt({apiHandler:e}),this.segments=Gt({apiHandler:e}),this.sendThroughAttribution=Yt({apiHandler:e}),this.serviceCredentials=Qt({apiHandler:e}),this.shippingRates=_t({apiHandler:e}),this.status=Xt({apiHandler:e}),this.subscriptionCancellations=Zt({apiHandler:e}),this.subscriptionPauses=Ht({apiHandler:e}),this.subscriptionReactivations=es({apiHandler:e}),this.subscriptions=ts({apiHandler:e}),this.tags=ss({apiHandler:e}),this.tagsRules=ns({apiHandler:e}),this.tracking=rs({apiHandler:e}),this.transactions=us({apiHandler:e}),this.usages=os({apiHandler:e}),this.users=ls({apiHandler:e}),this.webhooks=cs({apiHandler:e}),this.websites=is({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function as({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ms({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function fs({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function $s({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:s,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDisputes({aggregationField:e,periodMonth:s,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const p={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",p)},getKycAcceptanceSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n=null,periodStart:r,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:s,includeRefunds:n=null,includeDisputes:r=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:p=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:s=null,limit:n=null,offset:r=null}){const u={filter:e,sort:s,limit:n,offset:r};return t.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:s,aggregationField:n,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e,periodEnd:s,accountingMethod:n,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:s,aggregationField:n,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function ps({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function hs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function ys({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:as,DataExportsResource:ms,HistogramsResource:fs,ReportsResource:$s,SubscriptionsResource:ps,TimelinesResource:hs,LocationResource:ys};class As{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function Rs({apiHandler:t}){return{get({expand:e=null}={}){const s={expand:e};return t.get("account",s)},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:s}){return t.post(`account/reset-password/${e}`,s)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function bs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function ws({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ks({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ds({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function vs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function Ts({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ss({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Es({apiHandler:t}){return{get({slug:e}){return t.get(`experimental/billing-portals/${e}`)}}}function Is({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function qs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function xs({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function Ps({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Cs({apiHandler:t}){return{getUpcomingInvoice({id:e}){return t.get(`orders/${e}/upcoming-invoice`)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s}){return t.patch(`orders/${e}`,s)},cancel({id:e,data:s}){return t.post(`orders/${e}/cancellation`,s)},pause({id:e,data:s}){return t.post(`orders/${e}/pause`,s)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function Ds({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payout-requests",o)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Ms({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Os({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Fs({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ks({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Bs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ls({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Ns({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function zs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Us({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Vs{constructor({apiHandler:e}){this.account=Rs({apiHandler:e}),this.authorization=bs({apiHandler:e}),this.billingPortals=ws({apiHandler:e}),this.checkoutForms=ks({apiHandler:e}),this.customFields=ds({apiHandler:e}),this.depositRequests=vs({apiHandler:e}),this.deposit=Ts({apiHandler:e}),this.depositStrategies=Ss({apiHandler:e}),this.experimental=Es({apiHandler:e}),this.invoices=Is({apiHandler:e}),this.kycDocuments=qs({apiHandler:e}),this.kycLivenessSessions=xs({apiHandler:e}),this.kycRequests=Ps({apiHandler:e}),this.orders=Cs({apiHandler:e}),this.paymentInstruments=js({apiHandler:e}),this.payoutRequests=Ds({apiHandler:e}),this.plans=Ms({apiHandler:e}),this.products=Os({apiHandler:e}),this.purchase=Fs({apiHandler:e}),this.quotes=Ks({apiHandler:e}),this.readyToPayout=Bs({apiHandler:e}),this.subscriptionReactivations=Ls({apiHandler:e}),this.subscriptions=Ns({apiHandler:e}),this.transactions=zs({apiHandler:e}),this.websites=Us({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Js({apiHandler:t}){return new gs({apiHandler:t})}function Ws({apiHandler:t}){return new As({apiHandler:t})}function Gs({apiHandler:t}){return new Vs({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=x({options:{apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n}});return Js({apiHandler:o})}function Ys({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=x({options:{apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n}});return Ws({apiHandler:o})}function Qs({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:n,organizationId:r},l=x({options:o});return l.setSessionToken(o.jwt),Gs({apiHandler:l})}f.RebillyAPI=U,f.RebillyErrors=h,f.RebillyExperimentalAPI=Ys,f.RebillyStorefrontAPI=Qs,f.cancellation=Le,f.default=U,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */var Ee=Se;function N(t){return Ee(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Ie=function(e){var s,n;return!(N(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,N(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const qe=Te,xe=K,Pe=Ie;function q(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return qe(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=q(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=q(t[n],e);return s}var De=q;const Me=ce(De),Oe="0.0.0";let Fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ke=(t=21)=>{let e="",s=t;for(;s--;)e+=Fe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Ke(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class T{constructor(){if(T.instance)return T.instance;this.requests={},T.instance=this}getAll(){return Object.values(this.requests)}getById(e){return this.requests[e]}deleteById(e){this.requests[e]&&delete this.requests[e]}save(){const e=new Be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}const v=new T;class E{}M(E,"cancelById",(e,s)=>{try{v.getById(e).cancel(s),v.deleteById(e)}catch{}}),M(E,"cancelAll",e=>v.getAll().forEach(s=>{s.cancel(e),v.deleteById(s.id)}));const Le={cancelAll:(...t)=>E.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Oe}`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function Qs({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function _s(c){J(b.request,c)}function Xs({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function Zs(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const m=G(g),{id:R,cancelToken:ln}=v.save();m.cancelToken=ln;const X=async function(){try{const S=await c(m);return Hs({response:S,isCollection:i,config:m})}catch(S){return W({error:S,config:m})}finally{v.deleteById(R)}}();return X.cancel=S=>E.cancelById(R,S),X}function Hs({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function en(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...en(c)}}function Y(c,i={}){return d({request:g=>e.get(c,g),config:{params:i}})}function tn(c,i){return d({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let m={};return g.authenticate===!1&&(m={headers:l()},delete m.headers.common["REB-APIKEY"],delete m.headers.common.Authorization),g.params&&(m.params={...g.params}),d({request:R=>e.post(c,i,R),config:m})}function _(c,i,g={}){return d({request:m=>e.put(c,i,m),config:{params:g}})}function sn(c,i){return d({request:g=>e.patch(c,i,g),config:{}})}function nn(c){return d({request:i=>e.delete(c,i),config:{}})}function rn(c,i){return d({request:g=>e.delete(c,g),config:{data:{...i}}})}async function un(c,i,g,m={}){if(i==="")return Q(c,g,{params:m});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,m);throw R}}async function on(c,i){const g=G(i);try{const m=await e.get(c,g);return new H(m,g)}catch(m){return W({error:m,config:g})}}return{getInstance:n,addRequestInterceptor:Qs,removeRequestInterceptor:_s,addResponseInterceptor:Xs,removeResponseInterceptor:Zs,setTimeout:a,setProxyAgent:j,setSessionToken:p,setPublishableKey:k,setEndpoints:D,get:Y,getAll:tn,post:Q,put:_,patch:sn,delete:nn,deleteAll:rn,create:un,download:on}}function Ne({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null}={}){const r={limit:e,offset:s,sort:n};return t.getAll("api-keys",r)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:s}){return t.create(`billing-portals/${e}`,e,s)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:s}){return t.put(`billing-portals/${e}`,s)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:s}){return t.create(`checkout-forms/${e}`,e,s)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:s}){return t.put(`checkout-forms/${e}`,s)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function He({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function et({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("credit-memos",o)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function st({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function nt({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:s}){return t.post(`authentication-tokens/${e}/exchange`,s)},getAllCredentials({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("credentials",n)},createCredential({id:e="",data:s}){return t.create(`credentials/${e}`,e,s)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:s}){return t.put(`credentials/${e}`,s)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}function rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},updateLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:s}){return t.patch(`customers/${e}/edd-score`,s)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:s}){return t.post(`customers/${e}/edd-timeline`,s)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},deleteEddTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-requests",u)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function ct({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function it({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function gt({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function at({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},updateRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},getAllTimelineMessages({eventType:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:s}){return t.post(`events/${e}/timeline`,s)},getTimelineMessage({eventType:e,messageId:s}){return t.get(`events/${e}/timeline/${s}`)},deleteTimelineMessage({eventType:e,messageId:s}){return t.delete(`events/${e}/timeline/${s}`)},getRulesHistory({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function $t({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function pt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function yt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:s}){return t.put(`files/${e}`,s)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const s={responseType:"arraybuffer"};return t.download(`files/${e}/download`,s)},detachAndDelete({id:e}){const s={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const p=t.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:s}){return t.create(`gateway-accounts/${e}`,e,s)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:s}){return t.post(`gateway-accounts/${e}/downtime-schedules`,s)},getDowntimeSchedule({id:e,downtimeId:s}){return t.get(`gateway-accounts/${e}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:e,downtimeId:s,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},deleteDowntimeSchedule({id:e,downtimeId:s}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${s}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:s}){return t.get(`gateway-accounts/${e}/limits/${s}`)},updateVolumeLimit({id:e,limitId:s,data:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function bt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:s}){return t.create(`invoices/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:s}){return t.post(`invoices/${e}/items`,s)},getInvoiceItem({id:e,itemId:s}){return t.get(`invoices/${e}/items/${s}`)},updateInvoiceItem({id:e,itemId:s,data:n}){return t.put(`invoices/${e}/items/${s}`,n)},deleteInvoiceItem({id:e,itemId:s}){return t.delete(`invoices/${e}/items/${s}`)},issue({id:e,data:s}){return t.post(`invoices/${e}/issue`,s)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:s}){return t.post(`invoices/${e}/reissue`,s)},getAllTransactionAllocations({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`invoices/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`invoices/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`invoices/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function wt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function kt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)},getAllRecords({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,expand:o=null}){const l={limit:s,offset:n,filter:r,sort:u,expand:o};return t.getAll(`journal-entries/${e}/records`,l)},createRecord({id:e,data:s}){return t.post(`journal-entries/${e}/records`,s)},getRecord({id:e,journalRecordId:s}){return t.get(`journal-entries/${e}/records/${s}`)},updateRecord({id:e,journalRecordId:s,data:n}){return t.put(`journal-entries/${e}/records/${s}`,n)},deleteRecord({id:e,journalRecordId:s}){return t.delete(`journal-entries/${e}/records/${s}`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:s}){return t.create(`kyc-documents/${e}`,e,s)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.put(`kyc-documents/${e}`,s)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:s}){return t.post(`kyc-documents/${e}/matches`,s)},reject({id:e,data:s}){return t.post(`kyc-documents/${e}/rejection`,s)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function vt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function Tt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Pt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)}}}function Mt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ot({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Ft({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Kt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Bt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Lt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Nt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function zt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Ut({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("risk-score-simulation-jobs",u)},create({data:e}){return t.post("risk-score-simulation-jobs",e)},get({id:e}){return t.get(`risk-score-simulation-jobs/${e}`)},stop({id:e}){return t.post(`risk-score-simulation-jobs/${e}/stop`)},getTransactions({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`risk-score-simulation-jobs/${e}/transactions`,r)}}}function Jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:s}){return t.create(`roles/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Wt({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function Gt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:s}){return t.create(`grid-segments/${e}`,e,s)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:s}){return t.put(`grid-segments/${e}`,s)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function Yt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Qt({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:s}){return t.post(`service-credentials/${e}`,s)},get({type:e,id:s}){return t.get(`service-credentials/${e}/${s}`)},update({type:e,id:s,data:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,p)}}}function _t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:s}){return t.create(`shipping-rates/${e}`,e,s)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:s}){return t.put(`shipping-rates/${e}`,s)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function Xt({apiHandler:t}){return{get(){return t.get("status")}}}function Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-cancellations",u)},create({id:e="",data:s}){return t.create(`subscription-cancellations/${e}`,e,s)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`subscription-cancellations/${e}`,s)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-pauses",u)},pause({id:e="",data:s}){return t.create(`subscription-pauses/${e}`,e,s)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:s}){return t.put(`subscription-pauses/${e}`,s)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function es({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function ts({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`subscriptions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`subscriptions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`subscriptions/${e}/timeline/${s}`)}}}function ss({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:s}){return t.patch(`tags/${e}`,s)},tagCustomers({tag:e,data:s}){return t.post(`tags/${e}/customers`,s)},untagCustomers({tag:e,data:s}){return t.delete(`tags/${e}/customers`,s)},tagCustomer({tag:e,customerId:s}){return t.post(`tags/${e}/customers/${s}`)},untagCustomer({tag:e,customerId:s}){return t.delete(`tags/${e}/customers/${s}`)},tagKycDocuments({tag:e,data:s}){return t.post(`tags/${e}/kyc-documents`,s)},untagKycDocuments({tag:e,data:s}){return t.delete(`tags/${e}/kyc-documents`,s)},tagKycDocument({tag:e,kycDocumentId:s}){return t.post(`tags/${e}/kyc-documents/${s}`)},untagKycDocument({tag:e,kycDocumentId:s}){return t.delete(`tags/${e}/kyc-documents/${s}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function ns({apiHandler:t}){return{getAllTagsRules({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tags-rules",o)},createTagsRule({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},getTagsRule({id:e}){return t.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},deleteTagsRule({id:e}){return t.delete(`tags-rules/${e}`)}}}function rs({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s}){return t.post(`transactions/${e}/refund`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function os({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("usages",o)},create({id:e="",data:s}){return t.create(`usages/${e}`,e,s)},get({id:e}){return t.get(`usages/${e}`)},update({id:e,data:s}){return t.put(`usages/${e}`,s)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)}}}function is({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,sort:u};return t.getAll("websites",o)},create({id:e="",data:s}){return t.create(`websites/${e}`,e,s)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:s}){return t.put(`websites/${e}`,s)},delete({id:e}){return t.delete(`websites/${e}`)}}}class gs{constructor({apiHandler:e}){this.account=Ne({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.checkoutForms=Ze({apiHandler:e}),this.coupons=He({apiHandler:e}),this.creditMemos=et({apiHandler:e}),this.customDomains=tt({apiHandler:e}),this.customFields=st({apiHandler:e}),this.customerAuthentication=nt({apiHandler:e}),this.customers=rt({apiHandler:e}),this.depositCustomPropertySets=ut({apiHandler:e}),this.depositRequests=ot({apiHandler:e}),this.depositStrategies=lt({apiHandler:e}),this.digitalWallets=ct({apiHandler:e}),this.disputes=it({apiHandler:e}),this.emailDeliverySettings=gt({apiHandler:e}),this.emailMessages=at({apiHandler:e}),this.emailNotifications=mt({apiHandler:e}),this.events=ft({apiHandler:e}),this.externalIdentifiers=$t({apiHandler:e}),this.externalServicesSettings=pt({apiHandler:e}),this.fees=ht({apiHandler:e}),this.files=yt({apiHandler:e}),this.gatewayAccounts=At({apiHandler:e}),this.integrations=Rt({apiHandler:e}),this.invoices=bt({apiHandler:e}),this.journalAccounts=wt({apiHandler:e}),this.journalEntries=kt({apiHandler:e}),this.kycDocuments=dt({apiHandler:e}),this.kycRequests=vt({apiHandler:e}),this.kycSettings=Tt({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.organizationExports=It({apiHandler:e}),this.organizations=qt({apiHandler:e}),this.paymentCardsBankNames=xt({apiHandler:e}),this.paymentInstruments=Pt({apiHandler:e}),this.paymentMethods=Ct({apiHandler:e}),this.paymentTokens=jt({apiHandler:e}),this.payoutRequests=Dt({apiHandler:e}),this.payouts=Mt({apiHandler:e}),this.plans=Ot({apiHandler:e}),this.previews=Ft({apiHandler:e}),this.products=Kt({apiHandler:e}),this.profile=Bt({apiHandler:e}),this.purchase=Lt({apiHandler:e}),this.quotes=Nt({apiHandler:e}),this.resource=zt({apiHandler:e}),this.riskScoreRules=Ut({apiHandler:e}),this.riskScoreSimulationJobs=Vt({apiHandler:e}),this.roles=Jt({apiHandler:e}),this.search=Wt({apiHandler:e}),this.segments=Gt({apiHandler:e}),this.sendThroughAttribution=Yt({apiHandler:e}),this.serviceCredentials=Qt({apiHandler:e}),this.shippingRates=_t({apiHandler:e}),this.status=Xt({apiHandler:e}),this.subscriptionCancellations=Zt({apiHandler:e}),this.subscriptionPauses=Ht({apiHandler:e}),this.subscriptionReactivations=es({apiHandler:e}),this.subscriptions=ts({apiHandler:e}),this.tags=ss({apiHandler:e}),this.tagsRules=ns({apiHandler:e}),this.tracking=rs({apiHandler:e}),this.transactions=us({apiHandler:e}),this.usages=os({apiHandler:e}),this.users=ls({apiHandler:e}),this.webhooks=cs({apiHandler:e}),this.websites=is({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function as({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ms({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function fs({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function $s({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:s,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDisputes({aggregationField:e,periodMonth:s,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const p={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",p)},getKycAcceptanceSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n=null,periodStart:r,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:s,includeRefunds:n=null,includeDisputes:r=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:p=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:s=null,limit:n=null,offset:r=null}){const u={filter:e,sort:s,limit:n,offset:r};return t.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:s,aggregationField:n,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:s,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e,periodEnd:s,accountingMethod:n,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:s,aggregationField:n,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function ps({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function hs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function ys({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:as,DataExportsResource:ms,HistogramsResource:fs,ReportsResource:$s,SubscriptionsResource:ps,TimelinesResource:hs,LocationResource:ys};class As{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function Rs({apiHandler:t}){return{get({expand:e=null}={}){const s={expand:e};return t.get("account",s)},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:s}){return t.post(`account/reset-password/${e}`,s)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function bs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function ws({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ks({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ds({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function vs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function Ts({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ss({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Es({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Is({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function qs({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function xs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Ps({apiHandler:t}){return{getUpcomingInvoice({id:e}){return t.get(`orders/${e}/upcoming-invoice`)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s}){return t.patch(`orders/${e}`,s)},cancel({id:e,data:s}){return t.post(`orders/${e}/cancellation`,s)},pause({id:e,data:s}){return t.post(`orders/${e}/pause`,s)}}}function Cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payout-requests",o)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Ds({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Ms({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Os({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Fs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Ks({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Bs({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Ls({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function Ns({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function zs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Us{constructor({apiHandler:e}){this.account=Rs({apiHandler:e}),this.authorization=bs({apiHandler:e}),this.billingPortals=ws({apiHandler:e}),this.checkoutForms=ks({apiHandler:e}),this.customFields=ds({apiHandler:e}),this.depositRequests=vs({apiHandler:e}),this.deposit=Ts({apiHandler:e}),this.depositStrategies=Ss({apiHandler:e}),this.invoices=Es({apiHandler:e}),this.kycDocuments=Is({apiHandler:e}),this.kycLivenessSessions=qs({apiHandler:e}),this.kycRequests=xs({apiHandler:e}),this.orders=Ps({apiHandler:e}),this.paymentInstruments=Cs({apiHandler:e}),this.payoutRequests=js({apiHandler:e}),this.plans=Ds({apiHandler:e}),this.products=Ms({apiHandler:e}),this.purchase=Os({apiHandler:e}),this.quotes=Fs({apiHandler:e}),this.readyToPayout=Ks({apiHandler:e}),this.subscriptionReactivations=Bs({apiHandler:e}),this.subscriptions=Ls({apiHandler:e}),this.transactions=Ns({apiHandler:e}),this.websites=zs({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Vs({apiHandler:t}){return new gs({apiHandler:t})}function Js({apiHandler:t}){return new As({apiHandler:t})}function Ws({apiHandler:t}){return new Us({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=x({options:{apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n}});return Vs({apiHandler:o})}function Gs({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=x({options:{apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n}});return Js({apiHandler:o})}function Ys({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:n,organizationId:r},l=x({options:o});return l.setSessionToken(o.jwt),Ws({apiHandler:l})}f.RebillyAPI=U,f.RebillyErrors=h,f.RebillyExperimentalAPI=Gs,f.RebillyStorefrontAPI=Ys,f.cancellation=Le,f.default=U,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebilly-js-sdk",
3
- "version": "56.34.1",
3
+ "version": "56.34.2",
4
4
  "description": "Official Rebilly API JS library for the browser and Node",
5
5
  "types": "./dist/rebilly-js-sdk.d.ts",
6
6
  "main": "./dist/rebilly-js-sdk.umd.js",
@@ -11,7 +11,6 @@ import CustomFieldsResource from './custom-fields-resource';
11
11
  import DepositRequestsResource from './deposit-requests-resource';
12
12
  import DepositResource from './deposit-resource';
13
13
  import DepositStrategiesResource from './deposit-strategies-resource';
14
- import ExperimentalResource from './experimental-resource';
15
14
  import InvoicesResource from './invoices-resource';
16
15
  import KycDocumentsResource from './kyc-documents-resource';
17
16
  import KycLivenessSessionsResource from './kyc-liveness-sessions-resource';
@@ -39,7 +38,6 @@ export class StorefrontApiInstance {
39
38
  this.depositRequests = DepositRequestsResource({apiHandler});
40
39
  this.deposit = DepositResource({apiHandler});
41
40
  this.depositStrategies = DepositStrategiesResource({apiHandler});
42
- this.experimental = ExperimentalResource({apiHandler});
43
41
  this.invoices = InvoicesResource({apiHandler});
44
42
  this.kycDocuments = KycDocumentsResource({apiHandler});
45
43
  this.kycLivenessSessions = KycLivenessSessionsResource({apiHandler});
@@ -1,15 +0,0 @@
1
- /**
2
- * This file was auto-generated by rebilly-sdk-generator.
3
- * Do not make direct changes to this file.
4
- */
5
-
6
- export default function ExperimentalResource({apiHandler}) {
7
- return {
8
- /**
9
- * @returns { rebilly.StorefrontGetExperimentalBillingPortalResponsePromise } response
10
- */
11
- get({slug}) {
12
- return apiHandler.get(`experimental/billing-portals/${slug}`);
13
- },
14
- };
15
- }