rebilly-js-sdk 62.222.0 → 62.222.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,3 @@
1
- ## 62.222.0 (2026-10-16)
1
+ ## 62.222.1 (2026-10-16)
2
2
 
3
- ### Features
4
-
5
- - **auth, recomm, be:** Add organization-level require MFA setting to rebilly ([#28408](https://github.com/Rebilly/rebilly/pull/28408))
3
+ This was a version bump only for rebilly-js-sdk to align it with other projects, there were no code changes.
@@ -12749,6 +12749,7 @@ export interface coreComponents {
12749
12749
  paymentTerms?: string;
12750
12750
  /**
12751
12751
  * Date and time when the quote expires.
12752
+ * A new or updated expiration time must be later than the current time.
12752
12753
  * The default expiration time is one month from the time the quote is issued.
12753
12754
  * In a `draft` state, this field may be `null`.
12754
12755
  */
@@ -13006,6 +13007,7 @@ export interface coreComponents {
13006
13007
  paymentTerms?: string;
13007
13008
  /**
13008
13009
  * Date and time when the quote expires.
13010
+ * A new or updated expiration time must be later than the current time.
13009
13011
  * The default expiration time is one month from the time the quote is issued.
13010
13012
  * In a `draft` state, this field may be `null`.
13011
13013
  */
@@ -13214,6 +13216,7 @@ export interface coreComponents {
13214
13216
  paymentTerms?: string;
13215
13217
  /**
13216
13218
  * Date and time when the quote expires.
13219
+ * A new or updated expiration time must be later than the current time.
13217
13220
  * The default expiration time is one month from the time the quote is issued.
13218
13221
  * In a `draft` state, this field may be `null`.
13219
13222
  */
@@ -13277,6 +13280,7 @@ export interface coreComponents {
13277
13280
  QuoteReissue: {
13278
13281
  /**
13279
13282
  * Date and time when the reissued quote expires.
13283
+ * A new expiration time must be later than the current time.
13280
13284
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
13281
13285
  * Otherwise, the quote expires one month after it is reissued.
13282
13286
  */
@@ -52846,6 +52850,7 @@ export interface storefrontComponents {
52846
52850
  paymentTerms?: string;
52847
52851
  /**
52848
52852
  * Date and time when the quote expires.
52853
+ * A new or updated expiration time must be later than the current time.
52849
52854
  * The default expiration time is one month from the time the quote is issued.
52850
52855
  * In a `draft` state, this field may be `null`.
52851
52856
  */
@@ -53103,6 +53108,7 @@ export interface storefrontComponents {
53103
53108
  paymentTerms?: string;
53104
53109
  /**
53105
53110
  * Date and time when the quote expires.
53111
+ * A new or updated expiration time must be later than the current time.
53106
53112
  * The default expiration time is one month from the time the quote is issued.
53107
53113
  * In a `draft` state, this field may be `null`.
53108
53114
  */
@@ -53311,6 +53317,7 @@ export interface storefrontComponents {
53311
53317
  paymentTerms?: string;
53312
53318
  /**
53313
53319
  * Date and time when the quote expires.
53320
+ * A new or updated expiration time must be later than the current time.
53314
53321
  * The default expiration time is one month from the time the quote is issued.
53315
53322
  * In a `draft` state, this field may be `null`.
53316
53323
  */
@@ -53374,6 +53381,7 @@ export interface storefrontComponents {
53374
53381
  QuoteReissue: {
53375
53382
  /**
53376
53383
  * Date and time when the reissued quote expires.
53384
+ * A new expiration time must be later than the current time.
53377
53385
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
53378
53386
  * Otherwise, the quote expires one month after it is reissued.
53379
53387
  */
@@ -80183,6 +80191,7 @@ export interface reportsComponents {
80183
80191
  paymentTerms?: string;
80184
80192
  /**
80185
80193
  * Date and time when the quote expires.
80194
+ * A new or updated expiration time must be later than the current time.
80186
80195
  * The default expiration time is one month from the time the quote is issued.
80187
80196
  * In a `draft` state, this field may be `null`.
80188
80197
  */
@@ -80440,6 +80449,7 @@ export interface reportsComponents {
80440
80449
  paymentTerms?: string;
80441
80450
  /**
80442
80451
  * Date and time when the quote expires.
80452
+ * A new or updated expiration time must be later than the current time.
80443
80453
  * The default expiration time is one month from the time the quote is issued.
80444
80454
  * In a `draft` state, this field may be `null`.
80445
80455
  */
@@ -80648,6 +80658,7 @@ export interface reportsComponents {
80648
80658
  paymentTerms?: string;
80649
80659
  /**
80650
80660
  * Date and time when the quote expires.
80661
+ * A new or updated expiration time must be later than the current time.
80651
80662
  * The default expiration time is one month from the time the quote is issued.
80652
80663
  * In a `draft` state, this field may be `null`.
80653
80664
  */
@@ -80711,6 +80722,7 @@ export interface reportsComponents {
80711
80722
  QuoteReissue: {
80712
80723
  /**
80713
80724
  * Date and time when the reissued quote expires.
80725
+ * A new expiration time must be later than the current time.
80714
80726
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
80715
80727
  * Otherwise, the quote expires one month after it is reissued.
80716
80728
  */
@@ -12749,6 +12749,7 @@ export interface coreComponents {
12749
12749
  paymentTerms?: string;
12750
12750
  /**
12751
12751
  * Date and time when the quote expires.
12752
+ * A new or updated expiration time must be later than the current time.
12752
12753
  * The default expiration time is one month from the time the quote is issued.
12753
12754
  * In a `draft` state, this field may be `null`.
12754
12755
  */
@@ -13006,6 +13007,7 @@ export interface coreComponents {
13006
13007
  paymentTerms?: string;
13007
13008
  /**
13008
13009
  * Date and time when the quote expires.
13010
+ * A new or updated expiration time must be later than the current time.
13009
13011
  * The default expiration time is one month from the time the quote is issued.
13010
13012
  * In a `draft` state, this field may be `null`.
13011
13013
  */
@@ -13214,6 +13216,7 @@ export interface coreComponents {
13214
13216
  paymentTerms?: string;
13215
13217
  /**
13216
13218
  * Date and time when the quote expires.
13219
+ * A new or updated expiration time must be later than the current time.
13217
13220
  * The default expiration time is one month from the time the quote is issued.
13218
13221
  * In a `draft` state, this field may be `null`.
13219
13222
  */
@@ -13277,6 +13280,7 @@ export interface coreComponents {
13277
13280
  QuoteReissue: {
13278
13281
  /**
13279
13282
  * Date and time when the reissued quote expires.
13283
+ * A new expiration time must be later than the current time.
13280
13284
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
13281
13285
  * Otherwise, the quote expires one month after it is reissued.
13282
13286
  */
@@ -52846,6 +52850,7 @@ export interface storefrontComponents {
52846
52850
  paymentTerms?: string;
52847
52851
  /**
52848
52852
  * Date and time when the quote expires.
52853
+ * A new or updated expiration time must be later than the current time.
52849
52854
  * The default expiration time is one month from the time the quote is issued.
52850
52855
  * In a `draft` state, this field may be `null`.
52851
52856
  */
@@ -53103,6 +53108,7 @@ export interface storefrontComponents {
53103
53108
  paymentTerms?: string;
53104
53109
  /**
53105
53110
  * Date and time when the quote expires.
53111
+ * A new or updated expiration time must be later than the current time.
53106
53112
  * The default expiration time is one month from the time the quote is issued.
53107
53113
  * In a `draft` state, this field may be `null`.
53108
53114
  */
@@ -53311,6 +53317,7 @@ export interface storefrontComponents {
53311
53317
  paymentTerms?: string;
53312
53318
  /**
53313
53319
  * Date and time when the quote expires.
53320
+ * A new or updated expiration time must be later than the current time.
53314
53321
  * The default expiration time is one month from the time the quote is issued.
53315
53322
  * In a `draft` state, this field may be `null`.
53316
53323
  */
@@ -53374,6 +53381,7 @@ export interface storefrontComponents {
53374
53381
  QuoteReissue: {
53375
53382
  /**
53376
53383
  * Date and time when the reissued quote expires.
53384
+ * A new expiration time must be later than the current time.
53377
53385
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
53378
53386
  * Otherwise, the quote expires one month after it is reissued.
53379
53387
  */
@@ -80183,6 +80191,7 @@ export interface reportsComponents {
80183
80191
  paymentTerms?: string;
80184
80192
  /**
80185
80193
  * Date and time when the quote expires.
80194
+ * A new or updated expiration time must be later than the current time.
80186
80195
  * The default expiration time is one month from the time the quote is issued.
80187
80196
  * In a `draft` state, this field may be `null`.
80188
80197
  */
@@ -80440,6 +80449,7 @@ export interface reportsComponents {
80440
80449
  paymentTerms?: string;
80441
80450
  /**
80442
80451
  * Date and time when the quote expires.
80452
+ * A new or updated expiration time must be later than the current time.
80443
80453
  * The default expiration time is one month from the time the quote is issued.
80444
80454
  * In a `draft` state, this field may be `null`.
80445
80455
  */
@@ -80648,6 +80658,7 @@ export interface reportsComponents {
80648
80658
  paymentTerms?: string;
80649
80659
  /**
80650
80660
  * Date and time when the quote expires.
80661
+ * A new or updated expiration time must be later than the current time.
80651
80662
  * The default expiration time is one month from the time the quote is issued.
80652
80663
  * In a `draft` state, this field may be `null`.
80653
80664
  */
@@ -80711,6 +80722,7 @@ export interface reportsComponents {
80711
80722
  QuoteReissue: {
80712
80723
  /**
80713
80724
  * Date and time when the reissued quote expires.
80725
+ * A new expiration time must be later than the current time.
80714
80726
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
80715
80727
  * Otherwise, the quote expires one month after it is reissued.
80716
80728
  */
@@ -12749,6 +12749,7 @@ export interface coreComponents {
12749
12749
  paymentTerms?: string;
12750
12750
  /**
12751
12751
  * Date and time when the quote expires.
12752
+ * A new or updated expiration time must be later than the current time.
12752
12753
  * The default expiration time is one month from the time the quote is issued.
12753
12754
  * In a `draft` state, this field may be `null`.
12754
12755
  */
@@ -13006,6 +13007,7 @@ export interface coreComponents {
13006
13007
  paymentTerms?: string;
13007
13008
  /**
13008
13009
  * Date and time when the quote expires.
13010
+ * A new or updated expiration time must be later than the current time.
13009
13011
  * The default expiration time is one month from the time the quote is issued.
13010
13012
  * In a `draft` state, this field may be `null`.
13011
13013
  */
@@ -13214,6 +13216,7 @@ export interface coreComponents {
13214
13216
  paymentTerms?: string;
13215
13217
  /**
13216
13218
  * Date and time when the quote expires.
13219
+ * A new or updated expiration time must be later than the current time.
13217
13220
  * The default expiration time is one month from the time the quote is issued.
13218
13221
  * In a `draft` state, this field may be `null`.
13219
13222
  */
@@ -13277,6 +13280,7 @@ export interface coreComponents {
13277
13280
  QuoteReissue: {
13278
13281
  /**
13279
13282
  * Date and time when the reissued quote expires.
13283
+ * A new expiration time must be later than the current time.
13280
13284
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
13281
13285
  * Otherwise, the quote expires one month after it is reissued.
13282
13286
  */
@@ -52846,6 +52850,7 @@ export interface storefrontComponents {
52846
52850
  paymentTerms?: string;
52847
52851
  /**
52848
52852
  * Date and time when the quote expires.
52853
+ * A new or updated expiration time must be later than the current time.
52849
52854
  * The default expiration time is one month from the time the quote is issued.
52850
52855
  * In a `draft` state, this field may be `null`.
52851
52856
  */
@@ -53103,6 +53108,7 @@ export interface storefrontComponents {
53103
53108
  paymentTerms?: string;
53104
53109
  /**
53105
53110
  * Date and time when the quote expires.
53111
+ * A new or updated expiration time must be later than the current time.
53106
53112
  * The default expiration time is one month from the time the quote is issued.
53107
53113
  * In a `draft` state, this field may be `null`.
53108
53114
  */
@@ -53311,6 +53317,7 @@ export interface storefrontComponents {
53311
53317
  paymentTerms?: string;
53312
53318
  /**
53313
53319
  * Date and time when the quote expires.
53320
+ * A new or updated expiration time must be later than the current time.
53314
53321
  * The default expiration time is one month from the time the quote is issued.
53315
53322
  * In a `draft` state, this field may be `null`.
53316
53323
  */
@@ -53374,6 +53381,7 @@ export interface storefrontComponents {
53374
53381
  QuoteReissue: {
53375
53382
  /**
53376
53383
  * Date and time when the reissued quote expires.
53384
+ * A new expiration time must be later than the current time.
53377
53385
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
53378
53386
  * Otherwise, the quote expires one month after it is reissued.
53379
53387
  */
@@ -80183,6 +80191,7 @@ export interface reportsComponents {
80183
80191
  paymentTerms?: string;
80184
80192
  /**
80185
80193
  * Date and time when the quote expires.
80194
+ * A new or updated expiration time must be later than the current time.
80186
80195
  * The default expiration time is one month from the time the quote is issued.
80187
80196
  * In a `draft` state, this field may be `null`.
80188
80197
  */
@@ -80440,6 +80449,7 @@ export interface reportsComponents {
80440
80449
  paymentTerms?: string;
80441
80450
  /**
80442
80451
  * Date and time when the quote expires.
80452
+ * A new or updated expiration time must be later than the current time.
80443
80453
  * The default expiration time is one month from the time the quote is issued.
80444
80454
  * In a `draft` state, this field may be `null`.
80445
80455
  */
@@ -80648,6 +80658,7 @@ export interface reportsComponents {
80648
80658
  paymentTerms?: string;
80649
80659
  /**
80650
80660
  * Date and time when the quote expires.
80661
+ * A new or updated expiration time must be later than the current time.
80651
80662
  * The default expiration time is one month from the time the quote is issued.
80652
80663
  * In a `draft` state, this field may be `null`.
80653
80664
  */
@@ -80711,6 +80722,7 @@ export interface reportsComponents {
80711
80722
  QuoteReissue: {
80712
80723
  /**
80713
80724
  * Date and time when the reissued quote expires.
80725
+ * A new expiration time must be later than the current time.
80714
80726
  * If this field is `null` or omitted, the quote keeps its expiration time when it has not passed.
80715
80727
  * Otherwise, the quote expires one month after it is reissued.
80716
80728
  */
@@ -404,7 +404,7 @@ function C({ options: t }) {
404
404
  "Rebilly",
405
405
  t.appName,
406
406
  "js-sdk"
407
- ].filter((a) => a).join("/")}@b03758c` };
407
+ ].filter((a) => a).join("/")}@c610bd6` };
408
408
  return t.apiKey && (c["REB-APIKEY"] = t.apiKey), c;
409
409
  }
410
410
  function l() {
@@ -1 +1 @@
1
- (function(R,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],w):(R=typeof globalThis<"u"?globalThis:R||self,w(R["rebilly-js-sdk"]={},R.axios))})(this,function(R,w){Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var H=Object.create,M=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,re=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,E=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),se=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=te(e),u=0,o=n.length,l;u<o;u++)l=n[u],!F.call(t,l)&&l!==r&&M(t,l,{get:(i=>e[i]).bind(null,l),enumerable:!(s=ee(e,l))||s.enumerable});return t},B=(t,e,r)=>(r=t!=null?H(re(t)):{},se(e||!t||!t.__esModule||!F.call(t,"default")?M(r,"default",{value:t,enumerable:!0}):r,t));w=B(w);function P(t,{exclude:e=[]}={}){Object.freeze(t);const r=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(s=>{(!r||s!=="caller"&&s!=="callee"&&s!=="arguments")&&t[s]!==null&&!e.includes(s)&&(typeof t[s]=="object"||typeof t[s]=="function")&&!Object.isFrozen(t[s])&&P(t[s],{exclude:e})}),t}var _=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.response={status:e,statusText:r,headers:s},this.fields={...t},this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}},N={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"},ne=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.limit=null,this.offset=null,this.total=null,Object.keys(N).forEach(u=>{const o=s[N[u]];this[u]=o?Number(o):null}),this.response={status:e,statusText:r,headers:s},this.items=t.map(u=>new _({data:u,status:e,statusText:r,headers:s})),this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}},ue=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.response={status:e,statusText:r,headers:s},this.data=t,this.config=n}},v=class extends Error{constructor({error:t,name:e=null}){let{config:r=null,response:s=null,request:n=null,message:u=null}=t||{},o=u||"Request Error";s&&s.data&&(s.data.error?o=s.data.error:s.data.detail?o=s.data.detail:s.data.title&&(o=s.data.title)),super(o),this.name=e||"RebillyError",this.response=s,this.request=n,this.config=r,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}},K=class extends v{constructor(t){super({error:t,name:"RebillyRequestError"})}},oe=class extends K{constructor(t){super(t),this.name="RebillyMfaRequiredError"}},le=class extends v{constructor(t){super({error:t,name:"RebillyValidationError"})}},ce=class extends v{constructor(t){super({error:t,name:"RebillyNotFoundError"})}},ie=class extends v{constructor(t){super({error:t,name:"RebillyConflictError"})}},ae=class extends v{constructor(t){super({error:t,name:"RebillyForbiddenError"})}},ge=class extends v{constructor(t){super({error:t,name:"RebillyMethodNotAllowedError"})}},me=class extends v{constructor(t){super({error:t,name:"RebillyTimeoutError"})}},fe=class extends v{constructor(t){super({error:t,name:"RebillyCanceledError"})}},A={RebillyError:v,RebillyRequestError:K,RebillyMfaRequiredError:oe,RebillyValidationError:le,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ae,RebillyMethodNotAllowedError:ge,RebillyTimeoutError:me,RebillyCanceledError:fe},L=E(((t,e)=>{var r=Object.prototype.toString;e.exports=function(y){if(y===void 0)return"undefined";if(y===null)return"null";var b=typeof y;if(b==="boolean")return"boolean";if(b==="string")return"string";if(b==="number")return"number";if(b==="symbol")return"symbol";if(b==="function")return i(y)?"generatorfunction":"function";if(n(y))return"array";if(h(y))return"buffer";if(g(y))return"arguments";if(o(y))return"date";if(u(y))return"error";if(l(y))return"regexp";switch(s(y)){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(p(y))return"generator";switch(b=r.call(y),b){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 b.slice(8,-1).toLowerCase().replace(/\s/g,"")};function s(m){return typeof m.constructor=="function"?m.constructor.name:null}function n(m){return Array.isArray?Array.isArray(m):m instanceof Array}function u(m){return m instanceof Error||typeof m.message=="string"&&m.constructor&&typeof m.constructor.stackTraceLimit=="number"}function o(m){return m instanceof Date?!0:typeof m.toDateString=="function"&&typeof m.getDate=="function"&&typeof m.setDate=="function"}function l(m){return m instanceof RegExp?!0:typeof m.flags=="string"&&typeof m.ignoreCase=="boolean"&&typeof m.multiline=="boolean"&&typeof m.global=="boolean"}function i(m,y){return s(m)==="GeneratorFunction"}function p(m){return typeof m.throw=="function"&&typeof m.return=="function"&&typeof m.next=="function"}function g(m){try{if(typeof m.length=="number"&&typeof m.callee=="function")return!0}catch(y){if(y.message.indexOf("callee")!==-1)return!0}return!1}function h(m){return m.constructor&&typeof m.constructor.isBuffer=="function"?m.constructor.isBuffer(m):!1}})),pe=E(((t,e)=>{var r=Symbol.prototype.valueOf,s=L();function n(g,h){switch(s(g)){case"array":return g.slice();case"object":return Object.assign({},g);case"date":return new g.constructor(Number(g));case"map":return new Map(g);case"set":return new Set(g);case"buffer":return i(g);case"symbol":return p(g);case"arraybuffer":return o(g);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return l(g);case"regexp":return u(g);case"error":return Object.create(g);default:return g}}function u(g){const h=g.flags!==void 0?g.flags:/\w+$/.exec(g)||void 0,m=new g.constructor(g.source,h);return m.lastIndex=g.lastIndex,m}function o(g){const h=new g.constructor(g.byteLength);return new Uint8Array(h).set(new Uint8Array(g)),h}function l(g,h){return new g.constructor(g.buffer,g.byteOffset,g.length)}function i(g){const h=g.length,m=Buffer.allocUnsafe?Buffer.allocUnsafe(h):Buffer.from(h);return g.copy(m),m}function p(g){return r?Object(r.call(g)):{}}e.exports=n})),he=E(((t,e)=>{e.exports=function(s){return s!=null&&typeof s=="object"&&Array.isArray(s)===!1}})),$e=E(((t,e)=>{var r=he();function s(n){return r(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}e.exports=function(u){var o,l;return!(s(u)===!1||(o=u.constructor,typeof o!="function")||(l=o.prototype,s(l)===!1)||l.hasOwnProperty("isPrototypeOf")===!1)}})),ye=E(((t,e)=>{var r=pe(),s=L(),n=$e();function u(i,p){switch(s(i)){case"object":return o(i,p);case"array":return l(i,p);default:return r(i)}}function o(i,p){if(typeof p=="function")return p(i);if(p||n(i)){const g=new i.constructor;for(let h in i)g[h]=u(i[h],p);return g}return i}function l(i,p){const g=new i.constructor(i.length);for(let h=0;h<i.length;h++)g[h]=u(i[h],p);return g}e.exports=u})),Ae=B(ye()),Re="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",be=(t=21)=>{let e="",r=t|0;for(;r-- >0;)e+=Re[Math.random()*64|0];return e},we=class{constructor({id:t=null,created:e=null}={}){this.id=t||be(),this.created=e||new Date().getTime(),this.cancelSource=w.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,P(this,{exclude:["cancelSource","cancelToken","cancel"]})}},ve=class x{constructor(){if(x.instance)return x.instance;this.requests={},x.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 we;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}},S=new ve,U=class{static cancelById=(t,e)=>{try{S.getById(t).cancel(e),S.deleteById(t)}catch{}};static cancelAll=async t=>{for(const e of S.getAll())await e.cancel(t),S.deleteById(e.id)}},ke={cancelAll:async(...t)=>await U.cancelAll(...t)},de=new Set(["links"]),k={request:"request",response:"response"},z=t=>{if(!Object.values(k).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function C({options:t}){const e=r();function r(){return w.default.create(n())}function s(){return e}function n(){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":`${["Rebilly",t.appName,"js-sdk"].filter(a=>a).join("/")}@b03758c`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return(0,Ae.default)(e.defaults.headers)}function i(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const a=l();t.apiKey=null,t.jwt=c,delete a.common["REB-APIKEY"],a.common.Authorization=`Bearer ${c}`,e.defaults.headers=a}function g(c=t.publishableKey){const a=l();t.publishableKey=c,a.common.Authorization=`${c}`,e.defaults.headers=a}function h({host:c,port:a,auth:f}){e.defaults.proxy={host:c,port:a,auth:f}}function m({live:c=null,sandbox:a=null}){c&&(t.apiEndpoints.live=c),a&&(t.apiEndpoints.sandbox=a),e.defaults.baseURL=u()}function y(c,{thenDelegate:a,catchDelegate:f=()=>{}}){return z(c)&&e.interceptors[k[c]].use(a,f)}function b(c,a){return z(c)&&e.interceptors[k[c]].eject(a)}function Qr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.request,{thenDelegate:c,catchDelegate:a})}function Xr(c){b(k.request,c)}function Zr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.response,{thenDelegate:c,catchDelegate:a})}function Hr(c){b(k.response,c)}function I({request:c,isCollection:a,config:f}){const $=W(f),{id:T,cancelToken:ls}=S.save();$.cancelToken=ls;const Z=async function(){try{return es({response:await c($),isCollection:a,config:$})}catch(D){return J({error:D,config:$})}finally{S.deleteById(T)}}();return Z.cancel=D=>U.cancelById(T,D),Z}function es({response:c,isCollection:a,config:f}){return a?new ne(c,f):new _(c,f)}function J({error:c}){if(w.default.isCancel(c))throw new A.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new A.RebillyForbiddenError(c);case 403:throw c.response.data?.error==="mfa_required"?new A.RebillyMfaRequiredError(c):new A.RebillyRequestError(c);case 404:throw new A.RebillyNotFoundError(c);case 405:throw new A.RebillyMethodNotAllowedError(c);case 409:throw new A.RebillyConflictError(c);case 422:throw new A.RebillyValidationError(c);default:throw new A.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new A.RebillyTimeoutError(c):new A.RebillyRequestError(c)}function ts(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&(de.has(a)||c.params[a]!=="")&&!(a==="sort"&&c.params[a]?.length===0)).reduce((a,f)=>{const $=c.params[f];return a[f]=f==="sort"&&Array.isArray($)?$.join(","):$,a},{})),c}function W(c={}){return{...ts(c)}}function G(c,a={}){return I({request:f=>e.get(c,f),config:{params:a}})}function rs(c,a){return I({request:f=>e.get(c,f),config:{params:a},isCollection:!0})}function Y(c,a,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params={...f.params}),I({request:T=>e.post(c,a,T),config:$})}function Q(c,a,f={}){return I({request:$=>e.put(c,a,$),config:{params:f}})}function ss(c,a){return I({request:f=>e.patch(c,a,f),config:{}})}function X(c,a=null){return I({request:f=>e.delete(c,f),config:a!=null?{data:a}:{}})}function ns(c,a){return X(c,a)}async function us(c,a,f,$={}){if(a==="")return Y(c,f,{params:$});try{if((await G(c)).response.status===200)throw new A.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(T){if(T.name==="RebillyNotFoundError")return Q(c,f,$);throw T}}async function os(c,a){const f=W(a);try{const $=await e.get(c,f);return new ue($,f)}catch($){return J({error:$,config:f})}}return{getInstance:s,addRequestInterceptor:Qr,removeRequestInterceptor:Xr,addResponseInterceptor:Zr,removeResponseInterceptor:Hr,setTimeout:i,setProxyAgent:h,setSessionToken:p,setPublishableKey:g,setEndpoints:m,get:G,getAll:rs,post:Y,put:Q,patch:ss,delete:X,deleteAll:ns,create:us,download:os}}function qe({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Te({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:r=null,limit:s=null,offset:n=null}={}){const u={filter:e,sort:r,limit:s,offset:n};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 Se({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,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:r}){return t.post(`aml-checks/${e}/review`,r)}}}function Ie({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ee({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null}={}){const u={filter:e,sort:r,limit:s,offset:n};return t.getAll("api-keys",u)},create({id:e="",data:r}){return t.create(`api-keys/${e}`,e,r)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:r}){return t.put(`api-keys/${e}`,r)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function Pe({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:r}){return t.put(`application-instances/${e}`,r)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:r}){return t.put(`application-instances/${e}/configuration`,r)}}}function xe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:r,filter:s,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`applications/${e}/instances`,n)},getInstance({id:e,organizationId:r}){return t.get(`applications/${e}/instances/${r}`)}}}function Ce({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function je({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:r}){return t.create(`billing-portals/${e}`,e,r)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:r}){return t.put(`billing-portals/${e}`,r)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function Oe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("blocklists",o)},create({id:e="",data:r}){return t.create(`blocklists/${e}`,e,r)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function De({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null}={}){const u={limit:e,offset:r,sort:s,filter:n};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:r}){return t.patch(`broadcast-messages/${e}`,r)}}}function Me({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Fe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:r}){return t.create(`checkout-forms/${e}`,e,r)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:r}){return t.put(`checkout-forms/${e}`,r)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function Be({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,sort:u};return t.getAll("coupons",o)},create({id:e="",data:r}){return t.create(`coupons/${e}`,e,r)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:r}){return t.put(`coupons/${e}`,r)},setExpiration({id:e,data:r}){return t.post(`coupons/${e}/expiration`,r)}}}var d={Accept:"application/pdf"};function _e({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:r}){return t.create(`credit-memos/${e}`,e,r)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:r}){return t.put(`credit-memos/${e}`,r)},patch({id:e,data:r}){return t.patch(`credit-memos/${e}`,r)},void({id:e}){return t.post(`credit-memos/${e}/void`)},refund({id:e}){return t.post(`credit-memos/${e}/refund`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`credit-memos/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`credit-memos/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`credit-memos/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`credit-memos/${e}`,r)}}}function Ne({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,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 Ke({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`custom-fields/${e}`,n)},get({resource:e,name:r}){return t.get(`custom-fields/${e}/${r}`)},create({resource:e,name:r,data:s}){return t.put(`custom-fields/${e}/${r}`,s)},update({resource:e,name:r,data:s}){return t.put(`custom-fields/${e}/${r}`,s)}}}function Le({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("authentication-tokens",s)},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:r}){return t.post(`authentication-tokens/${e}/exchange`,r)},getAllCredentials({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("credentials",s)},createCredential({id:e="",data:r}){return t.create(`credentials/${e}`,e,r)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:r}){return t.put(`credentials/${e}`,r)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("password-tokens",s)},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 Ue({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:r,filter:s,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",i)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`customers/${e}`,e,r,n)},get({id:e,expand:r=null,fields:s=null}){const n={expand:r,fields:s};return t.get(`customers/${e}`,n)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`customers/${e}`,r,n)},merge({id:e,targetCustomerId:r}){return t.delete(`customers/${e}?targetCustomerId=${r}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},updateLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`customers/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`customers/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`customers/${e}/timeline/${r}`)},getCustomerCreditBalance({id:e}){return t.get(`customers/${e}/credit-balance`)},generateComplianceScreeningReport({id:e}){return t.post(`customers/${e}/compliance-screening-report`)}}}function ze({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function Ve({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("deposit-strategies",u)},create({id:e="",data:r}){return t.create(`deposit-strategies/${e}`,e,r)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:r}){return t.put(`deposit-strategies/${e}`,r)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function Je({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},getApplePayDomains(){return t.get("digital-wallets/onboarding/apple-pay")},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},deleteApplePayDomain({domain:e}){return t.delete(`digital-wallets/onboarding/apple-pay/${e}`)}}}function We({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`disputes/${e}`,e,r,n)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`disputes/${e}`,r,n)}}}function Ge({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,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:r}){return t.patch(`email-delivery-settings/${e}`,r)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,sort:n=null,filter:u=null}={}){const o={limit:e,offset:r,q:s,sort:n,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:r={status:"outbox"}}){return t.patch(`email-messages/${e}`,r)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("email-notifications",s)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};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:r}){return t.put(`events/${e}/rules`,r)},updateRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},getAllTimelineMessages({eventType:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:r}){return t.post(`events/${e}/timeline`,r)},getTimelineMessage({eventType:e,messageId:r}){return t.get(`events/${e}/timeline/${r}`)},deleteTimelineMessage({eventType:e,messageId:r}){return t.delete(`events/${e}/timeline/${r}`)},getRulesHistory({eventType:e,limit:r=null,offset:s=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const i={limit:r,offset:s,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,i)},getRulesVersionNumber({eventType:e,version:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/history/${r}`,n)},getRulesVersionDetail({eventType:e,version:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/versions/${r}`,n)},getAllDraftRulesets({eventType:e,limit:r=null,offset:s=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const i={limit:r,offset:s,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,i)},createDraftRuleset({eventType:e,data:r}){return t.post(`events/${e}/rules/drafts`,r)},getDraftRuleset({eventType:e,id:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/drafts/${r}`,n)},updateDraftRuleset({eventType:e,id:r,data:s}){return t.put(`events/${e}/rules/drafts/${r}`,s)},deleteDraftRuleset({eventType:e,id:r}){return t.delete(`events/${e}/rules/drafts/${r}`)}}}function Ze({apiHandler:t}){return{get({resource:e,resourceId:r,service:s}){return t.get(`${e}/${r}/external-identifiers/${s}`)},sync({resource:e,resourceId:r,service:s}){return t.post(`${e}/${r}/external-identifiers/${s}`)},update({resource:e,resourceId:r,service:s,data:n}){return t.put(`${e}/${r}/external-identifiers/${s}`,n)},delete({resource:e,resourceId:r,service:s}){return t.delete(`${e}/${r}/external-identifiers/${s}`)}}}function He({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function et({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("fees",u)},create({id:e="",data:r}){return t.create(`fees/${e}`,e,r)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:r}){return t.put(`fees/${e}`,r)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:r}){return t.patch(`fees/${e}`,r)}}}function tt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:r=null,filter:s=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:r,filter:s,q:n,fields:u,sort:o};return t.getAll("attachments",l)},attach({id:e="",data:r}){return t.create(`attachments/${e}`,e,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r}){return t.put(`attachments/${e}`,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:r,filter:s,q:n,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:r}){return t.put(`files/${e}`,r)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){return t.download(`files/${e}/download`,{responseType:"arraybuffer"})},detachAndDelete({id:e}){const r={filter:`fileId:${e}`};let s=[];const u=(async()=>{const o=this.getAllAttachments(r);s.push(o);const l=(await o).items.map(p=>this.detach({id:p.fields.id}));s=[...s,l],await Promise.all(l);const i=t.delete(`files/${e}`);return s.push(i),i})();return u.cancel=()=>{s.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:r={description:"",tags:[""]}}){const s=[],u=(async()=>{const o=this.upload({fileObject:e});s.push(o),await o;const l={name:o.name,extension:o.extension,description:r.description,tags:r.tags,url:""},i=this.update({id:o.fields.id,data:l});return s.push(i),i})();return u.cancel=()=>{s.forEach(o=>o.cancel())},u}}}function rt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:r,sort:s,filter:n,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:r}){return t.create(`gateway-accounts/${e}`,e,r)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:r}){return t.put(`gateway-accounts/${e}`,r)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:r}){return t.patch(`gateway-accounts/${e}`,r)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null}){const o={limit:r,offset:s,filter:n,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:r}){return t.post(`gateway-accounts/${e}/downtime-schedules`,r)},getDowntimeSchedule({id:e,downtimeId:r}){return t.get(`gateway-accounts/${e}/downtime-schedules/${r}`)},updateDowntimeSchedule({id:e,downtimeId:r,data:s}){return t.put(`gateway-accounts/${e}/downtime-schedules/${r}`,s)},deleteDowntimeSchedule({id:e,downtimeId:r}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${r}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:r}){return t.get(`gateway-accounts/${e}/limits/${r}`)},updateVolumeLimit({id:e,limitId:r,data:s}){return t.put(`gateway-accounts/${e}/limits/${r}`,s)},deleteVolumeLimit({id:e,limitId:r}){return t.delete(`gateway-accounts/${e}/limits/${r}`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`gateway-accounts/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`gateway-accounts/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`gateway-accounts/${e}/timeline/${r}`)},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:r}){return t.put(`gateway-accounts/${e}/financial-settings`,r)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("integrations",s)},get({label:e}){return t.get(`integrations/${e}`)}}}function nt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:r}){return t.create(`invoices/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`invoices/${e}`,s)},update({id:e,data:r}){return t.put(`invoices/${e}`,r)},getAllInvoiceItems({id:e,limit:r=null,offset:s=null,expand:n=null}){const u={limit:r,offset:s,expand:n};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:r}){return t.post(`invoices/${e}/items`,r)},getInvoiceItem({id:e,itemId:r}){return t.get(`invoices/${e}/items/${r}`)},updateInvoiceItem({id:e,itemId:r,data:s}){return t.put(`invoices/${e}/items/${r}`,s)},deleteInvoiceItem({id:e,itemId:r}){return t.delete(`invoices/${e}/items/${r}`)},issue({id:e,data:r}){return t.post(`invoices/${e}/issue`,r)},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:r}){return t.post(`invoices/${e}/reissue`,r)},getAllTransactionAllocations({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`invoices/${e}/transaction-allocations`,n)},allocateCreditBalance({id:e,data:r}){return t.post(`invoices/${e}/allocate-credit-balance`,r)},applyTransaction({id:e,data:r}){return t.post(`invoices/${e}/transaction`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`invoices/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`invoices/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`invoices/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function ut({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:r}){return t.create(`journal-accounts/${e}`,e,r)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:r}){return t.put(`journal-accounts/${e}`,r)}}}function ot({apiHandler:t}){return{getAllEntries({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("journal-entries",u)},createEntry({id:e="",data:r}){return t.create(`journal-entries/${e}`,e,r)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:r}){return t.put(`journal-entries/${e}`,r)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("journal-records",o)},create({id:e="",data:r}){return t.create(`journal-records/${e}`,e,r)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:r}){return t.put(`journal-records/${e}`,r)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:r}){return t.create(`kyc-documents/${e}`,e,r)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.put(`kyc-documents/${e}`,r)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:r}){return t.post(`kyc-documents/${e}/matches`,r)},reject({id:e,data:r}){return t.post(`kyc-documents/${e}/rejection`,r)},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 it({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("kyc-requests",o)},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:r}){return t.patch(`kyc-requests/${e}`,r)}}}function at({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function gt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:r,filter:s,sort:n,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:r}){return t.create(`lists/${e}`,e,r)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:r}){return t.put(`lists/${e}`,r)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:r}){return t.get(`lists/${e}/${r}`)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-cancellations",u)},create({id:e="",data:r}){return t.create(`order-cancellations/${e}`,e,r)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:r}){return t.put(`order-cancellations/${e}`,r)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`order-cancellations/${e}`,r)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-changes",u)},create({id:e="",data:r}){return t.create(`order-changes/${e}`,e,r)},get({id:e}){return t.get(`order-changes/${e}`)},update({id:e,data:r}){return t.put(`order-changes/${e}`,r)},delete({id:e}){return t.delete(`order-changes/${e}`)}}}function pt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-pauses",u)},pause({id:e="",data:r}){return t.create(`order-pauses/${e}`,e,r)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:r}){return t.put(`order-pauses/${e}`,r)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function $t({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("orders",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`orders/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`orders/${e}`,r,n)},getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}/upcoming-invoice`,s)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`orders/${e}/change-items`,r,n)},updateItem({id:e,itemId:r,data:s}){return t.patch(`orders/${e}/items/${r}`,s)},createInterimInvoice({id:e,data:r}){return t.post(`orders/${e}/interim-invoice`,r)},issueEarlyUpcomingInvoice({id:e,data:r}){return t.post(`orders/${e}/upcoming-invoice/issue`,r)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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 At({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,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:r}){return t.patch(`organizations/${e}`,r)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,q:r=null}={}){const s={limit:e,q:r};return t.getAll("payment-cards-bank-names",s)}}}function bt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,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:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:r}){return t.post(`payment-instruments/${e}/name-inquiry`,r)}}}function wt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("payment-methods",s)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function vt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("tokens",s)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function kt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-allocation-operations",e)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:r}){return t.patch(`payout-request-allocations/${e}`,r)}}}function qt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-operations",e)}}}function St({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",e)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:r,q:s,filter:n,sort:u};return t.getAll("payout-request-batches",o)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},delete({id:e}){return t.delete(`payout-request-batches/${e}`)},patch({id:e,data:r}){return t.patch(`payout-request-batches/${e}`,r)}}}function Et({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",e)}}}function Pt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("payout-requests",u)},create({id:e="",data:r}){return t.create(`payout-requests/${e}`,e,r)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:r}){return t.put(`payout-requests/${e}`,r)},patch({id:e,data:r}){return t.patch(`payout-requests/${e}`,r)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`payout-requests/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`payout-requests/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`payout-requests/${e}/timeline/${r}`)}}}function xt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ct({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("plans",o)},create({id:e="",data:r}){return t.create(`plans/${e}`,e,r)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:r}){return t.put(`plans/${e}`,r)},delete({id:e}){return t.delete(`plans/${e}`)}}}function jt({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 Ot({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("products",o)},create({id:e="",data:r}){return t.create(`products/${e}`,e,r)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:r}){return t.put(`products/${e}`,r)},delete({id:e}){return t.delete(`products/${e}`)}}}function Dt({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)},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:r,periodEnd:s}){const n={periodStart:r,periodEnd:s};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function Mt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,expand:u};return t.getAll("quotes",o)},create({id:e="",data:r}){return t.create(`quotes/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`quotes/${e}`,s)},update({id:e,data:r}){return t.put(`quotes/${e}`,r)},patch({id:e,data:r}){return t.patch(`quotes/${e}`,r)},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`)},reissue({id:e,data:r}){return t.post(`quotes/${e}/reissue`,r)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`quotes/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`quotes/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`quotes/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,r)}}}function Bt({apiHandler:t}){return{getEnabled(){return t.get("release-flags")}}}function _t({apiHandler:t}){return{get({resource:e,resourceId:r,service:s}){return t.get(`${e}/${r}/external-identifiers/${s}`)},sync({resource:e,resourceId:r,service:s}){return t.post(`${e}/${r}/external-identifiers/${s}`)},update({resource:e,resourceId:r,service:s,data:n}){return t.put(`${e}/${r}/external-identifiers/${s}`,n)},delete({resource:e,resourceId:r,service:s}){return t.delete(`${e}/${r}/external-identifiers/${s}`)}}}function Nt({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 Kt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:s,sort:n,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:r}){return t.create(`roles/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`roles/${e}`,s)},update({id:e,data:r}){return t.put(`roles/${e}`,r)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Lt({apiHandler:t}){return{get({sort:e=null,limit:r=null,offset:s=null,q:n=null}){const u={sort:e,limit:r,offset:s,q:n};return t.get("search",u)}}}function Ut({apiHandler:t}){return{get(){return t.get("security-settings")},update({data:e}){return t.put("security-settings",e)}}}function zt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:r}){return t.create(`grid-segments/${e}`,e,r)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:r}){return t.put(`grid-segments/${e}`,r)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function Vt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Jt({apiHandler:t}){return{getAll({type:e,filter:r=null,limit:s=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:r,limit:s,offset:n,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:r}){return t.post(`service-credentials/${e}`,r)},get({type:e,id:r}){return t.get(`service-credentials/${e}/${r}`)},update({type:e,id:r,data:s}){return t.patch(`service-credentials/${e}/${r}`,s)},getItems({type:e,id:r,limit:s=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:i=null}){const p={limit:s,offset:n,filter:u,q:o,fields:l,sort:i};return t.getAll(`service-credentials/${e}/${r}/items`,p)}}}function Wt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:r}){return t.create(`shipping-rates/${e}`,e,r)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:r}){return t.put(`shipping-rates/${e}`,r)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function Gt({apiHandler:t}){return{get(){return t.get("status")}}}function Yt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("subscription-cancellations",u)},create({id:e="",data:r}){return t.create(`subscription-cancellations/${e}`,e,r)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`subscription-cancellations/${e}`,r)}}}function Qt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("subscription-pauses",u)},pause({id:e="",data:r}){return t.create(`subscription-pauses/${e}`,e,r)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:r}){return t.put(`subscription-pauses/${e}`,r)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function Xt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};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 Zt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`subscriptions/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`subscriptions/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`subscriptions/${e}`,r,n)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`subscriptions/${e}/change-items`,r,n)},updateItem({id:e,itemId:r,data:s}){return t.patch(`subscriptions/${e}/items/${r}`,s)},createInterimInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/interim-invoice`,r)},getAllUpcomingInvoices({id:e,expand:r=null}){const s={expand:r};return t.getAll(`subscriptions/${e}/upcoming-invoices`,s)},getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`subscriptions/${e}/upcoming-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,r)},issueUpcomingInvoice({id:e,invoiceId:r,data:s}){return t.post(`subscriptions/${e}/upcoming-invoices/${r}/issue`,s)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`subscriptions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`subscriptions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`subscriptions/${e}/timeline/${r}`)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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:r}){return t.patch(`tags/${e}`,r)},tagCustomers({tag:e,data:r}){return t.post(`tags/${e}/customers`,r)},untagCustomers({tag:e,data:r}){return t.delete(`tags/${e}/customers`,r)},tagCustomer({tag:e,customerId:r}){return t.post(`tags/${e}/customers/${r}`)},untagCustomer({tag:e,customerId:r}){return t.delete(`tags/${e}/customers/${r}`)},tagKycDocuments({tag:e,data:r}){return t.post(`tags/${e}/kyc-documents`,r)},untagKycDocuments({tag:e,data:r}){return t.delete(`tags/${e}/kyc-documents`,r)},tagKycDocument({tag:e,kycDocumentId:r}){return t.post(`tags/${e}/kyc-documents/${r}`)},untagKycDocument({tag:e,kycDocumentId:r}){return t.delete(`tags/${e}/kyc-documents/${r}`)},tagAmlChecks({tag:e,data:r}){return t.post(`tags/${e}/aml-checks`,r)},untagAmlChecks({tag:e,data:r}){return t.delete(`tags/${e}/aml-checks`,r)},tagAmlCheck({tag:e,amlCheckId:r}){return t.post(`tags/${e}/aml-checks/${r}`)},untagAmlCheck({tag:e,amlCheckId:r}){return t.delete(`tags/${e}/aml-checks/${r}`)}}}function er({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tags-rules",o)},create({id:e="",data:r}){return t.create(`tags-rules/${e}`,e,r)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:r}){return t.put(`tags-rules/${e}`,r)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function tr({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,sort:s,filter:n,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};return t.getAll("tracking/webhooks",u)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function rr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null,expand:o=null,fields:l=null,links:i=null}={}){const p={limit:e,offset:r,filter:s,q:n,sort:u,expand:o,fields:l,links:i};return t.getAll("transactions",p)},create({data:e,expand:r=null}){const s={expand:r};return t.post("transactions",e,s)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`transactions/${e}`,s)},patch({id:e,data:r}){return t.patch(`transactions/${e}`,r)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:r}){return t.post(`transactions/${e}/update`,r)},refund({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`transactions/${e}/refund`,r,n)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`transactions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`transactions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`transactions/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,r)}}}function sr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("usages",o)},create({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function nr({apiHandler:t}){return{deleteUserMembership({organizationId:e,userId:r}){return t.delete(`memberships/${e}/${r}`)},getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("users",o)},create({id:e="",data:r}){return t.create(`users/${e}`,e,r)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:r}){return t.put(`users/${e}`,r)}}}function ur({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};return t.getAll("webhook-events",u)}}}function or({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null}={}){const n={limit:e,offset:r,filter:s};return t.getAll("webhooks",n)},create({id:e="",data:r}){return t.create(`webhooks/${e}`,e,r)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:r}){return t.put(`webhooks/${e}`,r)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function lr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:r,q:s,filter:n,sort:u};return t.getAll("websites",o)},create({id:e="",data:r}){return t.create(`websites/${e}`,e,r)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:r}){return t.put(`websites/${e}`,r)},delete({id:e}){return t.delete(`websites/${e}`)}}}var cr=class{constructor({apiHandler:t}){this.account=qe({apiHandler:t}),this.allowlists=Te({apiHandler:t}),this.amlChecks=Se({apiHandler:t}),this.amlSettings=Ie({apiHandler:t}),this.apiKeys=Ee({apiHandler:t}),this.applicationInstances=Pe({apiHandler:t}),this.applications=xe({apiHandler:t}),this.balanceTransactions=Ce({apiHandler:t}),this.billingPortals=je({apiHandler:t}),this.blocklists=Oe({apiHandler:t}),this.broadcastMessages=De({apiHandler:t}),this.cashiers=Me({apiHandler:t}),this.checkoutForms=Fe({apiHandler:t}),this.coupons=Be({apiHandler:t}),this.creditMemos=_e({apiHandler:t}),this.customDomains=Ne({apiHandler:t}),this.customFields=Ke({apiHandler:t}),this.customerAuthentication=Le({apiHandler:t}),this.customers=Ue({apiHandler:t}),this.depositRequests=ze({apiHandler:t}),this.depositStrategies=Ve({apiHandler:t}),this.digitalWallets=Je({apiHandler:t}),this.disputes=We({apiHandler:t}),this.emailDeliverySettings=Ge({apiHandler:t}),this.emailMessages=Ye({apiHandler:t}),this.emailNotifications=Qe({apiHandler:t}),this.events=Xe({apiHandler:t}),this.externalIdentifiers=Ze({apiHandler:t}),this.externalServicesSettings=He({apiHandler:t}),this.fees=et({apiHandler:t}),this.files=tt({apiHandler:t}),this.gatewayAccounts=rt({apiHandler:t}),this.integrations=st({apiHandler:t}),this.invoices=nt({apiHandler:t}),this.journalAccounts=ut({apiHandler:t}),this.journalEntries=ot({apiHandler:t}),this.journalRecords=lt({apiHandler:t}),this.kycDocuments=ct({apiHandler:t}),this.kycRequests=it({apiHandler:t}),this.kycSettings=at({apiHandler:t}),this.lists=gt({apiHandler:t}),this.orderCancellations=mt({apiHandler:t}),this.orderChanges=ft({apiHandler:t}),this.orderPauses=pt({apiHandler:t}),this.orderReactivations=ht({apiHandler:t}),this.orders=$t({apiHandler:t}),this.organizationExports=yt({apiHandler:t}),this.organizations=At({apiHandler:t}),this.paymentCardsBankNames=Rt({apiHandler:t}),this.paymentInstruments=bt({apiHandler:t}),this.paymentMethods=wt({apiHandler:t}),this.paymentTokens=vt({apiHandler:t}),this.payoutRequestAllocationOperations=kt({apiHandler:t}),this.payoutRequestAllocations=dt({apiHandler:t}),this.payoutRequestAutoAllocations=qt({apiHandler:t}),this.payoutRequestBatchOperations=Tt({apiHandler:t}),this.payoutRequestBatchPreviews=St({apiHandler:t}),this.payoutRequestBatches=It({apiHandler:t}),this.payoutRequestSplits=Et({apiHandler:t}),this.payoutRequests=Pt({apiHandler:t}),this.payouts=xt({apiHandler:t}),this.plans=Ct({apiHandler:t}),this.previews=jt({apiHandler:t}),this.products=Ot({apiHandler:t}),this.profile=Dt({apiHandler:t}),this.purchase=Mt({apiHandler:t}),this.quotes=Ft({apiHandler:t}),this.releaseFlags=Bt({apiHandler:t}),this.resource=_t({apiHandler:t}),this.riskScoreRules=Nt({apiHandler:t}),this.roles=Kt({apiHandler:t}),this.search=Lt({apiHandler:t}),this.securitySettings=Ut({apiHandler:t}),this.segments=zt({apiHandler:t}),this.sendThroughAttribution=Vt({apiHandler:t}),this.serviceCredentials=Jt({apiHandler:t}),this.shippingRates=Wt({apiHandler:t}),this.status=Gt({apiHandler:t}),this.subscriptionCancellations=Yt({apiHandler:t}),this.subscriptionPauses=Qt({apiHandler:t}),this.subscriptionReactivations=Xt({apiHandler:t}),this.subscriptions=Zt({apiHandler:t}),this.tags=Ht({apiHandler:t}),this.tagsRules=er({apiHandler:t}),this.tracking=tr({apiHandler:t}),this.transactions=rr({apiHandler:t}),this.usages=sr({apiHandler:t}),this.users=nr({apiHandler:t}),this.webhookEvents=ur({apiHandler:t}),this.webhooks=or({apiHandler:t}),this.websites=lr({apiHandler:t}),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}};function ir({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ar({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const i={limit:e,offset:r,sort:s,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",i)},queue({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`data-exports/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`data-exports/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`data-exports/${e}`,r,n)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function gr({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:r=null,aggregationPeriod:s=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationPeriod:s,metric:n,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:r=null,aggregationPeriod:s=null,metric:n=null,filter:u=null}){const o={periodStart:e,periodEnd:r,aggregationPeriod:s,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function mr({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:r=null,filter:s=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:r,filter:s,limit:n,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:r=null,metric:s=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:e,periodEnd:r,metric:s,includePropagatedResults:n,filter:u};return t.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:e=null,periodEnd:r=null,filter:s=null}){const n={periodStart:e,periodEnd:r,filter:s};return t.get("reports/aml-checks-inherited-summary",n)},getAmlAuditReport({personId:e,periodStart:r=null,periodEnd:s=null,filter:n=null}){const u={personId:e,periodStart:r,periodEnd:s,filter:n};return t.get("reports/aml-audit-reports",u)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:r=null,metrics:s=null,segments:n=null}){const u={periodStart:e,periodEnd:r,metrics:s,segments:n};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:r=null,limit:s=null,offset:n=null,filter:u=null}){const o={currency:e,asOfDate:r,limit:s,offset:n,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:r=null,limit:s=null,offset:n=null,filter:u=null}){const o={aggregationField:e,periodMonth:r,limit:s,offset:n,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null}){const o={periodStart:r,periodEnd:s,limit:n,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:r=null,bookedTo:s=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:i=null}){const p={currency:e,bookedFrom:r,bookedTo:s,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:i};return t.get("reports/journal",p)},getJournalSummary({periodStart:e=null,periodEnd:r=null,currency:s=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:r,currency:s,aggregationField:n,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-acceptance-summary",s)},getKycRejectionSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-rejection-summary",s)},getKycRequestSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-request-summary",s)},getMonthlyRecurringRevenue({currency:e,periodStart:r,periodEnd:s,limit:n=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:s,limit:n,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:r,periodEnd:s,limit:n=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:s,limit:n,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:r=null,includeSwitchedSubscriptions:s=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:i=null,criteria:p=null}){const g={aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:s,periodStart:n,periodEnd:u,limit:o,offset:l,filter:i,criteria:p};return t.get("reports/retention-percentage",g)},getRetentionValue({aggregationField:e=null,aggregationPeriod:r=null,includeRefunds:s=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:i=null,filter:p=null,sort:g=null,criteria:h=null}){const m={aggregationField:e,aggregationPeriod:r,includeRefunds:s,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:i,filter:p,sort:g,criteria:h};return t.get("reports/retention-value",m)},getRevenueWaterfall({currency:e,issuedFrom:r=null,issuedTo:s=null,recognizedTo:n=null}){const u={currency:e,issuedFrom:r,issuedTo:s,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:r=null,aggregationField:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:s,limit:n,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:r=null,accountingMethod:s=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:r,accountingMethod:s,limit:n,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:r=null,periodStart:s=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:r,periodStart:s,periodEnd:n,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:r=null,aggregationField:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:s,limit:n,offset:u,filter:o};return t.get("reports/transactions",l)},downloadAmlAuditReport({personId:e,periodStart:r=null,periodEnd:s=null,filter:n=null,accept:u="application/pdf"}){const o={params:{personId:e,periodStart:r,periodEnd:s,filter:n},headers:{Accept:u},responseType:u==="application/pdf"?"arraybuffer":"text"};return t.download("reports/aml-audit-reports",o)}}}function fr({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function pr({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:r=1e3,offset:s=0}){const n={eventTypes:e,limit:r,offset:s};return t.getAll("activity-feed",n)},getTransaction({id:e="",eventTypes:r=null,limit:s=1e3,offset:n=0}){const u={eventTypes:r,limit:s,offset:n};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:r=null,limit:s=1e3,offset:n=0}){const u={eventTypes:r,limit:s,offset:n};return t.getAll(`customers/${e}/timeline`,u)}}}function hr({apiHandler:t}){return{query(){return t.get("location")}}}var q={CustomersResource:ir,DataExportsResource:ar,HistogramsResource:gr,ReportsResource:mr,SubscriptionsResource:fr,TimelinesResource:pr,LocationResource:hr},$r=class{constructor({apiHandler:t}){this.customers=q.CustomersResource({apiHandler:t}),this.dataExports=q.DataExportsResource({apiHandler:t}),this.histograms=q.HistogramsResource({apiHandler:t}),this.reports=q.ReportsResource({apiHandler:t}),this.subscriptions=q.SubscriptionsResource({apiHandler:t}),this.timelines=q.TimelinesResource({apiHandler:t}),this.location=q.LocationResource({apiHandler:t}),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.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken}};function yr({apiHandler:t}){return{get({expand:e=null}={}){const r={expand:e};return t.get("account",r)},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:r}){return t.post(`account/reset-password/${e}`,r)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Ar({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Rr({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function br({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function wr({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function vr({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`custom-fields/${e}`,n)}}}function kr({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function dr({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function qr({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Tr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`invoices/${e}`,s)},update({id:e,data:r}){return t.patch(`invoices/${e}`,r)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Sr({apiHandler:t}){return{create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.patch(`kyc-documents/${e}`,r)}}}function Ir({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 Er({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`kyc-requests/${e}`,s)}}}function Pr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null}={}){const n={limit:e,offset:r,filter:s};return t.getAll("order-changes",n)},delete({id:e}){return t.delete(`order-changes/${e}`)}}}function xr({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}/upcoming-invoice`,s)},getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}`,s)},update({id:e,data:r}){return t.patch(`orders/${e}`,r)},cancel({id:e,data:r}){return t.post(`orders/${e}/cancellation`,r)},pause({id:e,data:r}){return t.post(`orders/${e}/pause`,r)}}}function Cr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.get(`payment-instruments/${e}`,n)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:r}){return t.post(`payment-instruments/${e}/setup`,r)}}}function jr({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}function Or({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:r}){return t.patch(`payout-requests/${e}`,r)}}}function Dr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`plans/${e}`,s)}}}function Mr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Fr({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 Br({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,r)}}}function _r({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Nr({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Kr({apiHandler:t}){return{changeItems({id:e,data:r}){return t.post(`subscriptions/${e}/change-items`,r)},create({data:e}){return t.post("subscriptions",e)}}}function Lr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:r}){return t.patch(`transactions/${e}/dcc`,r)},finishKyc({id:e,token:r}){return t.post(`transactions/${e}/${r}/continue`)},skipKyc({id:e,token:r}){return t.post(`transactions/${e}/${r}/bypass`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,r)},update({id:e,data:r}){return t.patch(`transactions/${e}`,r)}}}function Ur({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}var zr=class{constructor({apiHandler:t}){this.account=yr({apiHandler:t}),this.authorization=Ar({apiHandler:t}),this.billingPortals=Rr({apiHandler:t}),this.cashiers=br({apiHandler:t}),this.checkoutForms=wr({apiHandler:t}),this.customFields=vr({apiHandler:t}),this.depositRequests=kr({apiHandler:t}),this.deposit=dr({apiHandler:t}),this.depositStrategies=qr({apiHandler:t}),this.invoices=Tr({apiHandler:t}),this.kycDocuments=Sr({apiHandler:t}),this.kycLivenessSessions=Ir({apiHandler:t}),this.kycRequests=Er({apiHandler:t}),this.orderChanges=Pr({apiHandler:t}),this.orders=xr({apiHandler:t}),this.paymentInstruments=Cr({apiHandler:t}),this.payoutRequestCancellations=jr({apiHandler:t}),this.payoutRequests=Or({apiHandler:t}),this.plans=Dr({apiHandler:t}),this.products=Mr({apiHandler:t}),this.purchase=Fr({apiHandler:t}),this.quotes=Br({apiHandler:t}),this.readyToPayout=_r({apiHandler:t}),this.subscriptionReactivations=Nr({apiHandler:t}),this.subscriptions=Kr({apiHandler:t}),this.transactions=Lr({apiHandler:t}),this.websites=Ur({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}};function Vr({apiHandler:t}){return new cr({apiHandler:t})}function Jr({apiHandler:t}){return new $r({apiHandler:t})}function Wr({apiHandler:t}){return new zr({apiHandler:t})}var j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},O=6e3;function V({apiKey:t=null,sandbox:e=!1,timeout:r=O,organizationId:s=null,urls:n=j,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:r,jwt:null,organizationId:s,appName:u?.appName??null},l=C({options:o});return Vr({apiHandler:l})}function Gr({apiKey:t=null,sandbox:e=!1,timeout:r=O,organizationId:s=null,urls:n=j,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:r,jwt:null,organizationId:s,appName:u?.appName??null},l=C({options:o});return Jr({apiHandler:l})}function Yr({publishableKey:t=null,jwt:e=null,sandbox:r=!1,timeout:s=O,organizationId:n=null,urls:u=j,internalOptions:o=null}={}){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 l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:r,requestTimeout:s,organizationId:n,appName:o?.appName??null},i=C({options:l});return i.setSessionToken(l.jwt),Wr({apiHandler:i})}R.RebillyAPI=V,R.default=V,R.RebillyErrors=A,R.RebillyExperimentalAPI=Gr,R.RebillyStorefrontAPI=Yr,R.cancellation=ke});
1
+ (function(R,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],w):(R=typeof globalThis<"u"?globalThis:R||self,w(R["rebilly-js-sdk"]={},R.axios))})(this,function(R,w){Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var H=Object.create,M=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,re=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,E=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),se=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=te(e),u=0,o=n.length,l;u<o;u++)l=n[u],!F.call(t,l)&&l!==r&&M(t,l,{get:(i=>e[i]).bind(null,l),enumerable:!(s=ee(e,l))||s.enumerable});return t},B=(t,e,r)=>(r=t!=null?H(re(t)):{},se(e||!t||!t.__esModule||!F.call(t,"default")?M(r,"default",{value:t,enumerable:!0}):r,t));w=B(w);function P(t,{exclude:e=[]}={}){Object.freeze(t);const r=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(s=>{(!r||s!=="caller"&&s!=="callee"&&s!=="arguments")&&t[s]!==null&&!e.includes(s)&&(typeof t[s]=="object"||typeof t[s]=="function")&&!Object.isFrozen(t[s])&&P(t[s],{exclude:e})}),t}var _=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.response={status:e,statusText:r,headers:s},this.fields={...t},this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}},N={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"},ne=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.limit=null,this.offset=null,this.total=null,Object.keys(N).forEach(u=>{const o=s[N[u]];this[u]=o?Number(o):null}),this.response={status:e,statusText:r,headers:s},this.items=t.map(u=>new _({data:u,status:e,statusText:r,headers:s})),this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}},ue=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.response={status:e,statusText:r,headers:s},this.data=t,this.config=n}},v=class extends Error{constructor({error:t,name:e=null}){let{config:r=null,response:s=null,request:n=null,message:u=null}=t||{},o=u||"Request Error";s&&s.data&&(s.data.error?o=s.data.error:s.data.detail?o=s.data.detail:s.data.title&&(o=s.data.title)),super(o),this.name=e||"RebillyError",this.response=s,this.request=n,this.config=r,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}},K=class extends v{constructor(t){super({error:t,name:"RebillyRequestError"})}},oe=class extends K{constructor(t){super(t),this.name="RebillyMfaRequiredError"}},le=class extends v{constructor(t){super({error:t,name:"RebillyValidationError"})}},ce=class extends v{constructor(t){super({error:t,name:"RebillyNotFoundError"})}},ie=class extends v{constructor(t){super({error:t,name:"RebillyConflictError"})}},ae=class extends v{constructor(t){super({error:t,name:"RebillyForbiddenError"})}},ge=class extends v{constructor(t){super({error:t,name:"RebillyMethodNotAllowedError"})}},me=class extends v{constructor(t){super({error:t,name:"RebillyTimeoutError"})}},fe=class extends v{constructor(t){super({error:t,name:"RebillyCanceledError"})}},A={RebillyError:v,RebillyRequestError:K,RebillyMfaRequiredError:oe,RebillyValidationError:le,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ae,RebillyMethodNotAllowedError:ge,RebillyTimeoutError:me,RebillyCanceledError:fe},L=E(((t,e)=>{var r=Object.prototype.toString;e.exports=function(y){if(y===void 0)return"undefined";if(y===null)return"null";var b=typeof y;if(b==="boolean")return"boolean";if(b==="string")return"string";if(b==="number")return"number";if(b==="symbol")return"symbol";if(b==="function")return i(y)?"generatorfunction":"function";if(n(y))return"array";if(h(y))return"buffer";if(g(y))return"arguments";if(o(y))return"date";if(u(y))return"error";if(l(y))return"regexp";switch(s(y)){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(p(y))return"generator";switch(b=r.call(y),b){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 b.slice(8,-1).toLowerCase().replace(/\s/g,"")};function s(m){return typeof m.constructor=="function"?m.constructor.name:null}function n(m){return Array.isArray?Array.isArray(m):m instanceof Array}function u(m){return m instanceof Error||typeof m.message=="string"&&m.constructor&&typeof m.constructor.stackTraceLimit=="number"}function o(m){return m instanceof Date?!0:typeof m.toDateString=="function"&&typeof m.getDate=="function"&&typeof m.setDate=="function"}function l(m){return m instanceof RegExp?!0:typeof m.flags=="string"&&typeof m.ignoreCase=="boolean"&&typeof m.multiline=="boolean"&&typeof m.global=="boolean"}function i(m,y){return s(m)==="GeneratorFunction"}function p(m){return typeof m.throw=="function"&&typeof m.return=="function"&&typeof m.next=="function"}function g(m){try{if(typeof m.length=="number"&&typeof m.callee=="function")return!0}catch(y){if(y.message.indexOf("callee")!==-1)return!0}return!1}function h(m){return m.constructor&&typeof m.constructor.isBuffer=="function"?m.constructor.isBuffer(m):!1}})),pe=E(((t,e)=>{var r=Symbol.prototype.valueOf,s=L();function n(g,h){switch(s(g)){case"array":return g.slice();case"object":return Object.assign({},g);case"date":return new g.constructor(Number(g));case"map":return new Map(g);case"set":return new Set(g);case"buffer":return i(g);case"symbol":return p(g);case"arraybuffer":return o(g);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return l(g);case"regexp":return u(g);case"error":return Object.create(g);default:return g}}function u(g){const h=g.flags!==void 0?g.flags:/\w+$/.exec(g)||void 0,m=new g.constructor(g.source,h);return m.lastIndex=g.lastIndex,m}function o(g){const h=new g.constructor(g.byteLength);return new Uint8Array(h).set(new Uint8Array(g)),h}function l(g,h){return new g.constructor(g.buffer,g.byteOffset,g.length)}function i(g){const h=g.length,m=Buffer.allocUnsafe?Buffer.allocUnsafe(h):Buffer.from(h);return g.copy(m),m}function p(g){return r?Object(r.call(g)):{}}e.exports=n})),he=E(((t,e)=>{e.exports=function(s){return s!=null&&typeof s=="object"&&Array.isArray(s)===!1}})),$e=E(((t,e)=>{var r=he();function s(n){return r(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}e.exports=function(u){var o,l;return!(s(u)===!1||(o=u.constructor,typeof o!="function")||(l=o.prototype,s(l)===!1)||l.hasOwnProperty("isPrototypeOf")===!1)}})),ye=E(((t,e)=>{var r=pe(),s=L(),n=$e();function u(i,p){switch(s(i)){case"object":return o(i,p);case"array":return l(i,p);default:return r(i)}}function o(i,p){if(typeof p=="function")return p(i);if(p||n(i)){const g=new i.constructor;for(let h in i)g[h]=u(i[h],p);return g}return i}function l(i,p){const g=new i.constructor(i.length);for(let h=0;h<i.length;h++)g[h]=u(i[h],p);return g}e.exports=u})),Ae=B(ye()),Re="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",be=(t=21)=>{let e="",r=t|0;for(;r-- >0;)e+=Re[Math.random()*64|0];return e},we=class{constructor({id:t=null,created:e=null}={}){this.id=t||be(),this.created=e||new Date().getTime(),this.cancelSource=w.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,P(this,{exclude:["cancelSource","cancelToken","cancel"]})}},ve=class x{constructor(){if(x.instance)return x.instance;this.requests={},x.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 we;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}},S=new ve,U=class{static cancelById=(t,e)=>{try{S.getById(t).cancel(e),S.deleteById(t)}catch{}};static cancelAll=async t=>{for(const e of S.getAll())await e.cancel(t),S.deleteById(e.id)}},ke={cancelAll:async(...t)=>await U.cancelAll(...t)},de=new Set(["links"]),k={request:"request",response:"response"},z=t=>{if(!Object.values(k).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function C({options:t}){const e=r();function r(){return w.default.create(n())}function s(){return e}function n(){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":`${["Rebilly",t.appName,"js-sdk"].filter(a=>a).join("/")}@c610bd6`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return(0,Ae.default)(e.defaults.headers)}function i(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const a=l();t.apiKey=null,t.jwt=c,delete a.common["REB-APIKEY"],a.common.Authorization=`Bearer ${c}`,e.defaults.headers=a}function g(c=t.publishableKey){const a=l();t.publishableKey=c,a.common.Authorization=`${c}`,e.defaults.headers=a}function h({host:c,port:a,auth:f}){e.defaults.proxy={host:c,port:a,auth:f}}function m({live:c=null,sandbox:a=null}){c&&(t.apiEndpoints.live=c),a&&(t.apiEndpoints.sandbox=a),e.defaults.baseURL=u()}function y(c,{thenDelegate:a,catchDelegate:f=()=>{}}){return z(c)&&e.interceptors[k[c]].use(a,f)}function b(c,a){return z(c)&&e.interceptors[k[c]].eject(a)}function Qr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.request,{thenDelegate:c,catchDelegate:a})}function Xr(c){b(k.request,c)}function Zr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.response,{thenDelegate:c,catchDelegate:a})}function Hr(c){b(k.response,c)}function I({request:c,isCollection:a,config:f}){const $=W(f),{id:T,cancelToken:ls}=S.save();$.cancelToken=ls;const Z=async function(){try{return es({response:await c($),isCollection:a,config:$})}catch(D){return J({error:D,config:$})}finally{S.deleteById(T)}}();return Z.cancel=D=>U.cancelById(T,D),Z}function es({response:c,isCollection:a,config:f}){return a?new ne(c,f):new _(c,f)}function J({error:c}){if(w.default.isCancel(c))throw new A.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new A.RebillyForbiddenError(c);case 403:throw c.response.data?.error==="mfa_required"?new A.RebillyMfaRequiredError(c):new A.RebillyRequestError(c);case 404:throw new A.RebillyNotFoundError(c);case 405:throw new A.RebillyMethodNotAllowedError(c);case 409:throw new A.RebillyConflictError(c);case 422:throw new A.RebillyValidationError(c);default:throw new A.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new A.RebillyTimeoutError(c):new A.RebillyRequestError(c)}function ts(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&(de.has(a)||c.params[a]!=="")&&!(a==="sort"&&c.params[a]?.length===0)).reduce((a,f)=>{const $=c.params[f];return a[f]=f==="sort"&&Array.isArray($)?$.join(","):$,a},{})),c}function W(c={}){return{...ts(c)}}function G(c,a={}){return I({request:f=>e.get(c,f),config:{params:a}})}function rs(c,a){return I({request:f=>e.get(c,f),config:{params:a},isCollection:!0})}function Y(c,a,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params={...f.params}),I({request:T=>e.post(c,a,T),config:$})}function Q(c,a,f={}){return I({request:$=>e.put(c,a,$),config:{params:f}})}function ss(c,a){return I({request:f=>e.patch(c,a,f),config:{}})}function X(c,a=null){return I({request:f=>e.delete(c,f),config:a!=null?{data:a}:{}})}function ns(c,a){return X(c,a)}async function us(c,a,f,$={}){if(a==="")return Y(c,f,{params:$});try{if((await G(c)).response.status===200)throw new A.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(T){if(T.name==="RebillyNotFoundError")return Q(c,f,$);throw T}}async function os(c,a){const f=W(a);try{const $=await e.get(c,f);return new ue($,f)}catch($){return J({error:$,config:f})}}return{getInstance:s,addRequestInterceptor:Qr,removeRequestInterceptor:Xr,addResponseInterceptor:Zr,removeResponseInterceptor:Hr,setTimeout:i,setProxyAgent:h,setSessionToken:p,setPublishableKey:g,setEndpoints:m,get:G,getAll:rs,post:Y,put:Q,patch:ss,delete:X,deleteAll:ns,create:us,download:os}}function qe({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Te({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:r=null,limit:s=null,offset:n=null}={}){const u={filter:e,sort:r,limit:s,offset:n};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 Se({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,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:r}){return t.post(`aml-checks/${e}/review`,r)}}}function Ie({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ee({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null}={}){const u={filter:e,sort:r,limit:s,offset:n};return t.getAll("api-keys",u)},create({id:e="",data:r}){return t.create(`api-keys/${e}`,e,r)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:r}){return t.put(`api-keys/${e}`,r)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function Pe({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:r}){return t.put(`application-instances/${e}`,r)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:r}){return t.put(`application-instances/${e}/configuration`,r)}}}function xe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:r,filter:s,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`applications/${e}/instances`,n)},getInstance({id:e,organizationId:r}){return t.get(`applications/${e}/instances/${r}`)}}}function Ce({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function je({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:r}){return t.create(`billing-portals/${e}`,e,r)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:r}){return t.put(`billing-portals/${e}`,r)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function Oe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("blocklists",o)},create({id:e="",data:r}){return t.create(`blocklists/${e}`,e,r)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function De({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null}={}){const u={limit:e,offset:r,sort:s,filter:n};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:r}){return t.patch(`broadcast-messages/${e}`,r)}}}function Me({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Fe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:r}){return t.create(`checkout-forms/${e}`,e,r)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:r}){return t.put(`checkout-forms/${e}`,r)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function Be({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,sort:u};return t.getAll("coupons",o)},create({id:e="",data:r}){return t.create(`coupons/${e}`,e,r)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:r}){return t.put(`coupons/${e}`,r)},setExpiration({id:e,data:r}){return t.post(`coupons/${e}/expiration`,r)}}}var d={Accept:"application/pdf"};function _e({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:r}){return t.create(`credit-memos/${e}`,e,r)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:r}){return t.put(`credit-memos/${e}`,r)},patch({id:e,data:r}){return t.patch(`credit-memos/${e}`,r)},void({id:e}){return t.post(`credit-memos/${e}/void`)},refund({id:e}){return t.post(`credit-memos/${e}/refund`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`credit-memos/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`credit-memos/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`credit-memos/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`credit-memos/${e}`,r)}}}function Ne({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,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 Ke({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`custom-fields/${e}`,n)},get({resource:e,name:r}){return t.get(`custom-fields/${e}/${r}`)},create({resource:e,name:r,data:s}){return t.put(`custom-fields/${e}/${r}`,s)},update({resource:e,name:r,data:s}){return t.put(`custom-fields/${e}/${r}`,s)}}}function Le({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("authentication-tokens",s)},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:r}){return t.post(`authentication-tokens/${e}/exchange`,r)},getAllCredentials({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("credentials",s)},createCredential({id:e="",data:r}){return t.create(`credentials/${e}`,e,r)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:r}){return t.put(`credentials/${e}`,r)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("password-tokens",s)},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 Ue({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:r,filter:s,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",i)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`customers/${e}`,e,r,n)},get({id:e,expand:r=null,fields:s=null}){const n={expand:r,fields:s};return t.get(`customers/${e}`,n)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`customers/${e}`,r,n)},merge({id:e,targetCustomerId:r}){return t.delete(`customers/${e}?targetCustomerId=${r}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},updateLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`customers/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`customers/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`customers/${e}/timeline/${r}`)},getCustomerCreditBalance({id:e}){return t.get(`customers/${e}/credit-balance`)},generateComplianceScreeningReport({id:e}){return t.post(`customers/${e}/compliance-screening-report`)}}}function ze({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function Ve({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("deposit-strategies",u)},create({id:e="",data:r}){return t.create(`deposit-strategies/${e}`,e,r)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:r}){return t.put(`deposit-strategies/${e}`,r)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function Je({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},getApplePayDomains(){return t.get("digital-wallets/onboarding/apple-pay")},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},deleteApplePayDomain({domain:e}){return t.delete(`digital-wallets/onboarding/apple-pay/${e}`)}}}function We({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`disputes/${e}`,e,r,n)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`disputes/${e}`,r,n)}}}function Ge({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,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:r}){return t.patch(`email-delivery-settings/${e}`,r)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,sort:n=null,filter:u=null}={}){const o={limit:e,offset:r,q:s,sort:n,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:r={status:"outbox"}}){return t.patch(`email-messages/${e}`,r)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("email-notifications",s)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};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:r}){return t.put(`events/${e}/rules`,r)},updateRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},getAllTimelineMessages({eventType:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:r}){return t.post(`events/${e}/timeline`,r)},getTimelineMessage({eventType:e,messageId:r}){return t.get(`events/${e}/timeline/${r}`)},deleteTimelineMessage({eventType:e,messageId:r}){return t.delete(`events/${e}/timeline/${r}`)},getRulesHistory({eventType:e,limit:r=null,offset:s=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const i={limit:r,offset:s,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,i)},getRulesVersionNumber({eventType:e,version:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/history/${r}`,n)},getRulesVersionDetail({eventType:e,version:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/versions/${r}`,n)},getAllDraftRulesets({eventType:e,limit:r=null,offset:s=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const i={limit:r,offset:s,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,i)},createDraftRuleset({eventType:e,data:r}){return t.post(`events/${e}/rules/drafts`,r)},getDraftRuleset({eventType:e,id:r,fields:s=null}){const n={fields:s};return t.get(`events/${e}/rules/drafts/${r}`,n)},updateDraftRuleset({eventType:e,id:r,data:s}){return t.put(`events/${e}/rules/drafts/${r}`,s)},deleteDraftRuleset({eventType:e,id:r}){return t.delete(`events/${e}/rules/drafts/${r}`)}}}function Ze({apiHandler:t}){return{get({resource:e,resourceId:r,service:s}){return t.get(`${e}/${r}/external-identifiers/${s}`)},sync({resource:e,resourceId:r,service:s}){return t.post(`${e}/${r}/external-identifiers/${s}`)},update({resource:e,resourceId:r,service:s,data:n}){return t.put(`${e}/${r}/external-identifiers/${s}`,n)},delete({resource:e,resourceId:r,service:s}){return t.delete(`${e}/${r}/external-identifiers/${s}`)}}}function He({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function et({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("fees",u)},create({id:e="",data:r}){return t.create(`fees/${e}`,e,r)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:r}){return t.put(`fees/${e}`,r)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:r}){return t.patch(`fees/${e}`,r)}}}function tt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:r=null,filter:s=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:r,filter:s,q:n,fields:u,sort:o};return t.getAll("attachments",l)},attach({id:e="",data:r}){return t.create(`attachments/${e}`,e,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r}){return t.put(`attachments/${e}`,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:r,filter:s,q:n,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:r}){return t.put(`files/${e}`,r)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){return t.download(`files/${e}/download`,{responseType:"arraybuffer"})},detachAndDelete({id:e}){const r={filter:`fileId:${e}`};let s=[];const u=(async()=>{const o=this.getAllAttachments(r);s.push(o);const l=(await o).items.map(p=>this.detach({id:p.fields.id}));s=[...s,l],await Promise.all(l);const i=t.delete(`files/${e}`);return s.push(i),i})();return u.cancel=()=>{s.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:r={description:"",tags:[""]}}){const s=[],u=(async()=>{const o=this.upload({fileObject:e});s.push(o),await o;const l={name:o.name,extension:o.extension,description:r.description,tags:r.tags,url:""},i=this.update({id:o.fields.id,data:l});return s.push(i),i})();return u.cancel=()=>{s.forEach(o=>o.cancel())},u}}}function rt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:r,sort:s,filter:n,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:r}){return t.create(`gateway-accounts/${e}`,e,r)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:r}){return t.put(`gateway-accounts/${e}`,r)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:r}){return t.patch(`gateway-accounts/${e}`,r)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null}){const o={limit:r,offset:s,filter:n,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:r}){return t.post(`gateway-accounts/${e}/downtime-schedules`,r)},getDowntimeSchedule({id:e,downtimeId:r}){return t.get(`gateway-accounts/${e}/downtime-schedules/${r}`)},updateDowntimeSchedule({id:e,downtimeId:r,data:s}){return t.put(`gateway-accounts/${e}/downtime-schedules/${r}`,s)},deleteDowntimeSchedule({id:e,downtimeId:r}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${r}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:r}){return t.get(`gateway-accounts/${e}/limits/${r}`)},updateVolumeLimit({id:e,limitId:r,data:s}){return t.put(`gateway-accounts/${e}/limits/${r}`,s)},deleteVolumeLimit({id:e,limitId:r}){return t.delete(`gateway-accounts/${e}/limits/${r}`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`gateway-accounts/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`gateway-accounts/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`gateway-accounts/${e}/timeline/${r}`)},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:r}){return t.put(`gateway-accounts/${e}/financial-settings`,r)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("integrations",s)},get({label:e}){return t.get(`integrations/${e}`)}}}function nt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:r}){return t.create(`invoices/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`invoices/${e}`,s)},update({id:e,data:r}){return t.put(`invoices/${e}`,r)},getAllInvoiceItems({id:e,limit:r=null,offset:s=null,expand:n=null}){const u={limit:r,offset:s,expand:n};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:r}){return t.post(`invoices/${e}/items`,r)},getInvoiceItem({id:e,itemId:r}){return t.get(`invoices/${e}/items/${r}`)},updateInvoiceItem({id:e,itemId:r,data:s}){return t.put(`invoices/${e}/items/${r}`,s)},deleteInvoiceItem({id:e,itemId:r}){return t.delete(`invoices/${e}/items/${r}`)},issue({id:e,data:r}){return t.post(`invoices/${e}/issue`,r)},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:r}){return t.post(`invoices/${e}/reissue`,r)},getAllTransactionAllocations({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`invoices/${e}/transaction-allocations`,n)},allocateCreditBalance({id:e,data:r}){return t.post(`invoices/${e}/allocate-credit-balance`,r)},applyTransaction({id:e,data:r}){return t.post(`invoices/${e}/transaction`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`invoices/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`invoices/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`invoices/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function ut({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:r}){return t.create(`journal-accounts/${e}`,e,r)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:r}){return t.put(`journal-accounts/${e}`,r)}}}function ot({apiHandler:t}){return{getAllEntries({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("journal-entries",u)},createEntry({id:e="",data:r}){return t.create(`journal-entries/${e}`,e,r)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:r}){return t.put(`journal-entries/${e}`,r)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("journal-records",o)},create({id:e="",data:r}){return t.create(`journal-records/${e}`,e,r)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:r}){return t.put(`journal-records/${e}`,r)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:r}){return t.create(`kyc-documents/${e}`,e,r)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.put(`kyc-documents/${e}`,r)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:r}){return t.post(`kyc-documents/${e}/matches`,r)},reject({id:e,data:r}){return t.post(`kyc-documents/${e}/rejection`,r)},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 it({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,expand:u};return t.getAll("kyc-requests",o)},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:r}){return t.patch(`kyc-requests/${e}`,r)}}}function at({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function gt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:r,filter:s,sort:n,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:r}){return t.create(`lists/${e}`,e,r)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:r}){return t.put(`lists/${e}`,r)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:r}){return t.get(`lists/${e}/${r}`)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-cancellations",u)},create({id:e="",data:r}){return t.create(`order-cancellations/${e}`,e,r)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:r}){return t.put(`order-cancellations/${e}`,r)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`order-cancellations/${e}`,r)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-changes",u)},create({id:e="",data:r}){return t.create(`order-changes/${e}`,e,r)},get({id:e}){return t.get(`order-changes/${e}`)},update({id:e,data:r}){return t.put(`order-changes/${e}`,r)},delete({id:e}){return t.delete(`order-changes/${e}`)}}}function pt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-pauses",u)},pause({id:e="",data:r}){return t.create(`order-pauses/${e}`,e,r)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:r}){return t.put(`order-pauses/${e}`,r)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function $t({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("orders",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`orders/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`orders/${e}`,r,n)},getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}/upcoming-invoice`,s)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`orders/${e}/change-items`,r,n)},updateItem({id:e,itemId:r,data:s}){return t.patch(`orders/${e}/items/${r}`,s)},createInterimInvoice({id:e,data:r}){return t.post(`orders/${e}/interim-invoice`,r)},issueEarlyUpcomingInvoice({id:e,data:r}){return t.post(`orders/${e}/upcoming-invoice/issue`,r)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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 At({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,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:r}){return t.patch(`organizations/${e}`,r)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,q:r=null}={}){const s={limit:e,q:r};return t.getAll("payment-cards-bank-names",s)}}}function bt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,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:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:r}){return t.post(`payment-instruments/${e}/name-inquiry`,r)}}}function wt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("payment-methods",s)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function vt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("tokens",s)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function kt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-allocation-operations",e)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:r}){return t.patch(`payout-request-allocations/${e}`,r)}}}function qt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-operations",e)}}}function St({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",e)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:r,q:s,filter:n,sort:u};return t.getAll("payout-request-batches",o)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},delete({id:e}){return t.delete(`payout-request-batches/${e}`)},patch({id:e,data:r}){return t.patch(`payout-request-batches/${e}`,r)}}}function Et({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",e)}}}function Pt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("payout-requests",u)},create({id:e="",data:r}){return t.create(`payout-requests/${e}`,e,r)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:r}){return t.put(`payout-requests/${e}`,r)},patch({id:e,data:r}){return t.patch(`payout-requests/${e}`,r)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`payout-requests/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`payout-requests/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`payout-requests/${e}/timeline/${r}`)}}}function xt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ct({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("plans",o)},create({id:e="",data:r}){return t.create(`plans/${e}`,e,r)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:r}){return t.put(`plans/${e}`,r)},delete({id:e}){return t.delete(`plans/${e}`)}}}function jt({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 Ot({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("products",o)},create({id:e="",data:r}){return t.create(`products/${e}`,e,r)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:r}){return t.put(`products/${e}`,r)},delete({id:e}){return t.delete(`products/${e}`)}}}function Dt({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)},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:r,periodEnd:s}){const n={periodStart:r,periodEnd:s};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function Mt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,expand:u};return t.getAll("quotes",o)},create({id:e="",data:r}){return t.create(`quotes/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`quotes/${e}`,s)},update({id:e,data:r}){return t.put(`quotes/${e}`,r)},patch({id:e,data:r}){return t.patch(`quotes/${e}`,r)},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`)},reissue({id:e,data:r}){return t.post(`quotes/${e}/reissue`,r)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`quotes/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`quotes/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`quotes/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,r)}}}function Bt({apiHandler:t}){return{getEnabled(){return t.get("release-flags")}}}function _t({apiHandler:t}){return{get({resource:e,resourceId:r,service:s}){return t.get(`${e}/${r}/external-identifiers/${s}`)},sync({resource:e,resourceId:r,service:s}){return t.post(`${e}/${r}/external-identifiers/${s}`)},update({resource:e,resourceId:r,service:s,data:n}){return t.put(`${e}/${r}/external-identifiers/${s}`,n)},delete({resource:e,resourceId:r,service:s}){return t.delete(`${e}/${r}/external-identifiers/${s}`)}}}function Nt({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 Kt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:s,sort:n,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:r}){return t.create(`roles/${e}`,e,r)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`roles/${e}`,s)},update({id:e,data:r}){return t.put(`roles/${e}`,r)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Lt({apiHandler:t}){return{get({sort:e=null,limit:r=null,offset:s=null,q:n=null}){const u={sort:e,limit:r,offset:s,q:n};return t.get("search",u)}}}function Ut({apiHandler:t}){return{get(){return t.get("security-settings")},update({data:e}){return t.put("security-settings",e)}}}function zt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:r}){return t.create(`grid-segments/${e}`,e,r)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:r}){return t.put(`grid-segments/${e}`,r)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function Vt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Jt({apiHandler:t}){return{getAll({type:e,filter:r=null,limit:s=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:r,limit:s,offset:n,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:r}){return t.post(`service-credentials/${e}`,r)},get({type:e,id:r}){return t.get(`service-credentials/${e}/${r}`)},update({type:e,id:r,data:s}){return t.patch(`service-credentials/${e}/${r}`,s)},getItems({type:e,id:r,limit:s=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:i=null}){const p={limit:s,offset:n,filter:u,q:o,fields:l,sort:i};return t.getAll(`service-credentials/${e}/${r}/items`,p)}}}function Wt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:r,filter:s,sort:n,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:r}){return t.create(`shipping-rates/${e}`,e,r)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:r}){return t.put(`shipping-rates/${e}`,r)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function Gt({apiHandler:t}){return{get(){return t.get("status")}}}function Yt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("subscription-cancellations",u)},create({id:e="",data:r}){return t.create(`subscription-cancellations/${e}`,e,r)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`subscription-cancellations/${e}`,r)}}}function Qt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};return t.getAll("subscription-pauses",u)},pause({id:e="",data:r}){return t.create(`subscription-pauses/${e}`,e,r)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:r}){return t.put(`subscription-pauses/${e}`,r)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function Xt({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,sort:n=null}={}){const u={limit:e,offset:r,filter:s,sort:n};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 Zt({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`subscriptions/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`subscriptions/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`subscriptions/${e}`,r,n)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`subscriptions/${e}/change-items`,r,n)},updateItem({id:e,itemId:r,data:s}){return t.patch(`subscriptions/${e}/items/${r}`,s)},createInterimInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/interim-invoice`,r)},getAllUpcomingInvoices({id:e,expand:r=null}){const s={expand:r};return t.getAll(`subscriptions/${e}/upcoming-invoices`,s)},getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`subscriptions/${e}/upcoming-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,r)},issueUpcomingInvoice({id:e,invoiceId:r,data:s}){return t.post(`subscriptions/${e}/upcoming-invoices/${r}/issue`,s)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`subscriptions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`subscriptions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`subscriptions/${e}/timeline/${r}`)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,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:r}){return t.patch(`tags/${e}`,r)},tagCustomers({tag:e,data:r}){return t.post(`tags/${e}/customers`,r)},untagCustomers({tag:e,data:r}){return t.delete(`tags/${e}/customers`,r)},tagCustomer({tag:e,customerId:r}){return t.post(`tags/${e}/customers/${r}`)},untagCustomer({tag:e,customerId:r}){return t.delete(`tags/${e}/customers/${r}`)},tagKycDocuments({tag:e,data:r}){return t.post(`tags/${e}/kyc-documents`,r)},untagKycDocuments({tag:e,data:r}){return t.delete(`tags/${e}/kyc-documents`,r)},tagKycDocument({tag:e,kycDocumentId:r}){return t.post(`tags/${e}/kyc-documents/${r}`)},untagKycDocument({tag:e,kycDocumentId:r}){return t.delete(`tags/${e}/kyc-documents/${r}`)},tagAmlChecks({tag:e,data:r}){return t.post(`tags/${e}/aml-checks`,r)},untagAmlChecks({tag:e,data:r}){return t.delete(`tags/${e}/aml-checks`,r)},tagAmlCheck({tag:e,amlCheckId:r}){return t.post(`tags/${e}/aml-checks/${r}`)},untagAmlCheck({tag:e,amlCheckId:r}){return t.delete(`tags/${e}/aml-checks/${r}`)}}}function er({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tags-rules",o)},create({id:e="",data:r}){return t.create(`tags-rules/${e}`,e,r)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:r}){return t.put(`tags-rules/${e}`,r)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function tr({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,sort:s,filter:n,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};return t.getAll("tracking/webhooks",u)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function rr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null,expand:o=null,fields:l=null,links:i=null}={}){const p={limit:e,offset:r,filter:s,q:n,sort:u,expand:o,fields:l,links:i};return t.getAll("transactions",p)},create({data:e,expand:r=null}){const s={expand:r};return t.post("transactions",e,s)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`transactions/${e}`,s)},patch({id:e,data:r}){return t.patch(`transactions/${e}`,r)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:r}){return t.post(`transactions/${e}/update`,r)},refund({id:e,data:r,expand:s=null}){const n={expand:s};return t.post(`transactions/${e}/refund`,r,n)},getAllTimelineMessages({id:e,limit:r=null,offset:s=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:r,offset:s,filter:n,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`transactions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`transactions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`transactions/${e}/timeline/${r}`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,r)}}}function sr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("usages",o)},create({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function nr({apiHandler:t}){return{deleteUserMembership({organizationId:e,userId:r}){return t.delete(`memberships/${e}/${r}`)},getAll({limit:e=null,offset:r=null,sort:s=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:r,sort:s,filter:n,q:u};return t.getAll("users",o)},create({id:e="",data:r}){return t.create(`users/${e}`,e,r)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:r}){return t.put(`users/${e}`,r)}}}function ur({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null}={}){const u={limit:e,offset:r,filter:s,q:n};return t.getAll("webhook-events",u)}}}function or({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null}={}){const n={limit:e,offset:r,filter:s};return t.getAll("webhooks",n)},create({id:e="",data:r}){return t.create(`webhooks/${e}`,e,r)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:r}){return t.put(`webhooks/${e}`,r)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function lr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:s=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:r,q:s,filter:n,sort:u};return t.getAll("websites",o)},create({id:e="",data:r}){return t.create(`websites/${e}`,e,r)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:r}){return t.put(`websites/${e}`,r)},delete({id:e}){return t.delete(`websites/${e}`)}}}var cr=class{constructor({apiHandler:t}){this.account=qe({apiHandler:t}),this.allowlists=Te({apiHandler:t}),this.amlChecks=Se({apiHandler:t}),this.amlSettings=Ie({apiHandler:t}),this.apiKeys=Ee({apiHandler:t}),this.applicationInstances=Pe({apiHandler:t}),this.applications=xe({apiHandler:t}),this.balanceTransactions=Ce({apiHandler:t}),this.billingPortals=je({apiHandler:t}),this.blocklists=Oe({apiHandler:t}),this.broadcastMessages=De({apiHandler:t}),this.cashiers=Me({apiHandler:t}),this.checkoutForms=Fe({apiHandler:t}),this.coupons=Be({apiHandler:t}),this.creditMemos=_e({apiHandler:t}),this.customDomains=Ne({apiHandler:t}),this.customFields=Ke({apiHandler:t}),this.customerAuthentication=Le({apiHandler:t}),this.customers=Ue({apiHandler:t}),this.depositRequests=ze({apiHandler:t}),this.depositStrategies=Ve({apiHandler:t}),this.digitalWallets=Je({apiHandler:t}),this.disputes=We({apiHandler:t}),this.emailDeliverySettings=Ge({apiHandler:t}),this.emailMessages=Ye({apiHandler:t}),this.emailNotifications=Qe({apiHandler:t}),this.events=Xe({apiHandler:t}),this.externalIdentifiers=Ze({apiHandler:t}),this.externalServicesSettings=He({apiHandler:t}),this.fees=et({apiHandler:t}),this.files=tt({apiHandler:t}),this.gatewayAccounts=rt({apiHandler:t}),this.integrations=st({apiHandler:t}),this.invoices=nt({apiHandler:t}),this.journalAccounts=ut({apiHandler:t}),this.journalEntries=ot({apiHandler:t}),this.journalRecords=lt({apiHandler:t}),this.kycDocuments=ct({apiHandler:t}),this.kycRequests=it({apiHandler:t}),this.kycSettings=at({apiHandler:t}),this.lists=gt({apiHandler:t}),this.orderCancellations=mt({apiHandler:t}),this.orderChanges=ft({apiHandler:t}),this.orderPauses=pt({apiHandler:t}),this.orderReactivations=ht({apiHandler:t}),this.orders=$t({apiHandler:t}),this.organizationExports=yt({apiHandler:t}),this.organizations=At({apiHandler:t}),this.paymentCardsBankNames=Rt({apiHandler:t}),this.paymentInstruments=bt({apiHandler:t}),this.paymentMethods=wt({apiHandler:t}),this.paymentTokens=vt({apiHandler:t}),this.payoutRequestAllocationOperations=kt({apiHandler:t}),this.payoutRequestAllocations=dt({apiHandler:t}),this.payoutRequestAutoAllocations=qt({apiHandler:t}),this.payoutRequestBatchOperations=Tt({apiHandler:t}),this.payoutRequestBatchPreviews=St({apiHandler:t}),this.payoutRequestBatches=It({apiHandler:t}),this.payoutRequestSplits=Et({apiHandler:t}),this.payoutRequests=Pt({apiHandler:t}),this.payouts=xt({apiHandler:t}),this.plans=Ct({apiHandler:t}),this.previews=jt({apiHandler:t}),this.products=Ot({apiHandler:t}),this.profile=Dt({apiHandler:t}),this.purchase=Mt({apiHandler:t}),this.quotes=Ft({apiHandler:t}),this.releaseFlags=Bt({apiHandler:t}),this.resource=_t({apiHandler:t}),this.riskScoreRules=Nt({apiHandler:t}),this.roles=Kt({apiHandler:t}),this.search=Lt({apiHandler:t}),this.securitySettings=Ut({apiHandler:t}),this.segments=zt({apiHandler:t}),this.sendThroughAttribution=Vt({apiHandler:t}),this.serviceCredentials=Jt({apiHandler:t}),this.shippingRates=Wt({apiHandler:t}),this.status=Gt({apiHandler:t}),this.subscriptionCancellations=Yt({apiHandler:t}),this.subscriptionPauses=Qt({apiHandler:t}),this.subscriptionReactivations=Xt({apiHandler:t}),this.subscriptions=Zt({apiHandler:t}),this.tags=Ht({apiHandler:t}),this.tagsRules=er({apiHandler:t}),this.tracking=tr({apiHandler:t}),this.transactions=rr({apiHandler:t}),this.usages=sr({apiHandler:t}),this.users=nr({apiHandler:t}),this.webhookEvents=ur({apiHandler:t}),this.webhooks=or({apiHandler:t}),this.websites=lr({apiHandler:t}),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}};function ir({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ar({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:s=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const i={limit:e,offset:r,sort:s,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",i)},queue({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`data-exports/${e}`,e,r,n)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`data-exports/${e}`,s)},update({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`data-exports/${e}`,r,n)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function gr({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:r=null,aggregationPeriod:s=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationPeriod:s,metric:n,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:r=null,aggregationPeriod:s=null,metric:n=null,filter:u=null}){const o={periodStart:e,periodEnd:r,aggregationPeriod:s,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function mr({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:r=null,filter:s=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:r,filter:s,limit:n,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:r=null,metric:s=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:e,periodEnd:r,metric:s,includePropagatedResults:n,filter:u};return t.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:e=null,periodEnd:r=null,filter:s=null}){const n={periodStart:e,periodEnd:r,filter:s};return t.get("reports/aml-checks-inherited-summary",n)},getAmlAuditReport({personId:e,periodStart:r=null,periodEnd:s=null,filter:n=null}){const u={personId:e,periodStart:r,periodEnd:s,filter:n};return t.get("reports/aml-audit-reports",u)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:r=null,metrics:s=null,segments:n=null}){const u={periodStart:e,periodEnd:r,metrics:s,segments:n};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:r=null,limit:s=null,offset:n=null,filter:u=null}){const o={currency:e,asOfDate:r,limit:s,offset:n,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:r=null,limit:s=null,offset:n=null,filter:u=null}){const o={aggregationField:e,periodMonth:r,limit:s,offset:n,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null}){const o={periodStart:r,periodEnd:s,limit:n,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:r=null,bookedTo:s=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:i=null}){const p={currency:e,bookedFrom:r,bookedTo:s,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:i};return t.get("reports/journal",p)},getJournalSummary({periodStart:e=null,periodEnd:r=null,currency:s=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:r,currency:s,aggregationField:n,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-acceptance-summary",s)},getKycRejectionSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-rejection-summary",s)},getKycRequestSummary({periodStart:e=null,periodEnd:r=null}){const s={periodStart:e,periodEnd:r};return t.get("reports/kyc-request-summary",s)},getMonthlyRecurringRevenue({currency:e,periodStart:r,periodEnd:s,limit:n=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:s,limit:n,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:r,periodEnd:s,limit:n=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:s,limit:n,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:r=null,includeSwitchedSubscriptions:s=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:i=null,criteria:p=null}){const g={aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:s,periodStart:n,periodEnd:u,limit:o,offset:l,filter:i,criteria:p};return t.get("reports/retention-percentage",g)},getRetentionValue({aggregationField:e=null,aggregationPeriod:r=null,includeRefunds:s=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:i=null,filter:p=null,sort:g=null,criteria:h=null}){const m={aggregationField:e,aggregationPeriod:r,includeRefunds:s,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:i,filter:p,sort:g,criteria:h};return t.get("reports/retention-value",m)},getRevenueWaterfall({currency:e,issuedFrom:r=null,issuedTo:s=null,recognizedTo:n=null}){const u={currency:e,issuedFrom:r,issuedTo:s,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:r=null,aggregationField:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:s,limit:n,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:r=null,limit:s=null,offset:n=null}){const u={periodStart:e,periodEnd:r,limit:s,offset:n};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:r=null,accountingMethod:s=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:r,accountingMethod:s,limit:n,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:r=null,periodStart:s=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:r,periodStart:s,periodEnd:n,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:r=null,periodEnd:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:s,limit:n,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:r=null,aggregationField:s=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:s,limit:n,offset:u,filter:o};return t.get("reports/transactions",l)},downloadAmlAuditReport({personId:e,periodStart:r=null,periodEnd:s=null,filter:n=null,accept:u="application/pdf"}){const o={params:{personId:e,periodStart:r,periodEnd:s,filter:n},headers:{Accept:u},responseType:u==="application/pdf"?"arraybuffer":"text"};return t.download("reports/aml-audit-reports",o)}}}function fr({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function pr({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:r=1e3,offset:s=0}){const n={eventTypes:e,limit:r,offset:s};return t.getAll("activity-feed",n)},getTransaction({id:e="",eventTypes:r=null,limit:s=1e3,offset:n=0}){const u={eventTypes:r,limit:s,offset:n};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:r=null,limit:s=1e3,offset:n=0}){const u={eventTypes:r,limit:s,offset:n};return t.getAll(`customers/${e}/timeline`,u)}}}function hr({apiHandler:t}){return{query(){return t.get("location")}}}var q={CustomersResource:ir,DataExportsResource:ar,HistogramsResource:gr,ReportsResource:mr,SubscriptionsResource:fr,TimelinesResource:pr,LocationResource:hr},$r=class{constructor({apiHandler:t}){this.customers=q.CustomersResource({apiHandler:t}),this.dataExports=q.DataExportsResource({apiHandler:t}),this.histograms=q.HistogramsResource({apiHandler:t}),this.reports=q.ReportsResource({apiHandler:t}),this.subscriptions=q.SubscriptionsResource({apiHandler:t}),this.timelines=q.TimelinesResource({apiHandler:t}),this.location=q.LocationResource({apiHandler:t}),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.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken}};function yr({apiHandler:t}){return{get({expand:e=null}={}){const r={expand:e};return t.get("account",r)},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:r}){return t.post(`account/reset-password/${e}`,r)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Ar({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Rr({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function br({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function wr({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function vr({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.getAll(`custom-fields/${e}`,n)}}}function kr({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function dr({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function qr({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Tr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`invoices/${e}`,s)},update({id:e,data:r}){return t.patch(`invoices/${e}`,r)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Sr({apiHandler:t}){return{create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.patch(`kyc-documents/${e}`,r)}}}function Ir({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 Er({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`kyc-requests/${e}`,s)}}}function Pr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null}={}){const n={limit:e,offset:r,filter:s};return t.getAll("order-changes",n)},delete({id:e}){return t.delete(`order-changes/${e}`)}}}function xr({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}/upcoming-invoice`,s)},getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`orders/${e}`,s)},update({id:e,data:r}){return t.patch(`orders/${e}`,r)},cancel({id:e,data:r}){return t.post(`orders/${e}/cancellation`,r)},pause({id:e,data:r}){return t.post(`orders/${e}/pause`,r)}}}function Cr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:r=null,offset:s=null}){const n={limit:r,offset:s};return t.get(`payment-instruments/${e}`,n)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:r}){return t.post(`payment-instruments/${e}/setup`,r)}}}function jr({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}function Or({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:r}){return t.patch(`payout-requests/${e}`,r)}}}function Dr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:s,offset:n,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:r=null}){const s={expand:r};return t.get(`plans/${e}`,s)}}}function Mr({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:s=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:r,limit:s,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Fr({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 Br({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,r)}}}function _r({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Nr({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Kr({apiHandler:t}){return{changeItems({id:e,data:r}){return t.post(`subscriptions/${e}/change-items`,r)},create({data:e}){return t.post("subscriptions",e)}}}function Lr({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:s=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:r,filter:s,q:n,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:r}){return t.patch(`transactions/${e}/dcc`,r)},finishKyc({id:e,token:r}){return t.post(`transactions/${e}/${r}/continue`)},skipKyc({id:e,token:r}){return t.post(`transactions/${e}/${r}/bypass`)},downloadPDF({id:e}){const r={headers:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,r)},update({id:e,data:r}){return t.patch(`transactions/${e}`,r)}}}function Ur({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}var zr=class{constructor({apiHandler:t}){this.account=yr({apiHandler:t}),this.authorization=Ar({apiHandler:t}),this.billingPortals=Rr({apiHandler:t}),this.cashiers=br({apiHandler:t}),this.checkoutForms=wr({apiHandler:t}),this.customFields=vr({apiHandler:t}),this.depositRequests=kr({apiHandler:t}),this.deposit=dr({apiHandler:t}),this.depositStrategies=qr({apiHandler:t}),this.invoices=Tr({apiHandler:t}),this.kycDocuments=Sr({apiHandler:t}),this.kycLivenessSessions=Ir({apiHandler:t}),this.kycRequests=Er({apiHandler:t}),this.orderChanges=Pr({apiHandler:t}),this.orders=xr({apiHandler:t}),this.paymentInstruments=Cr({apiHandler:t}),this.payoutRequestCancellations=jr({apiHandler:t}),this.payoutRequests=Or({apiHandler:t}),this.plans=Dr({apiHandler:t}),this.products=Mr({apiHandler:t}),this.purchase=Fr({apiHandler:t}),this.quotes=Br({apiHandler:t}),this.readyToPayout=_r({apiHandler:t}),this.subscriptionReactivations=Nr({apiHandler:t}),this.subscriptions=Kr({apiHandler:t}),this.transactions=Lr({apiHandler:t}),this.websites=Ur({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}};function Vr({apiHandler:t}){return new cr({apiHandler:t})}function Jr({apiHandler:t}){return new $r({apiHandler:t})}function Wr({apiHandler:t}){return new zr({apiHandler:t})}var j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},O=6e3;function V({apiKey:t=null,sandbox:e=!1,timeout:r=O,organizationId:s=null,urls:n=j,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:r,jwt:null,organizationId:s,appName:u?.appName??null},l=C({options:o});return Vr({apiHandler:l})}function Gr({apiKey:t=null,sandbox:e=!1,timeout:r=O,organizationId:s=null,urls:n=j,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:r,jwt:null,organizationId:s,appName:u?.appName??null},l=C({options:o});return Jr({apiHandler:l})}function Yr({publishableKey:t=null,jwt:e=null,sandbox:r=!1,timeout:s=O,organizationId:n=null,urls:u=j,internalOptions:o=null}={}){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 l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:r,requestTimeout:s,organizationId:n,appName:o?.appName??null},i=C({options:l});return i.setSessionToken(l.jwt),Wr({apiHandler:i})}R.RebillyAPI=V,R.default=V,R.RebillyErrors=A,R.RebillyExperimentalAPI=Gr,R.RebillyStorefrontAPI=Yr,R.cancellation=ke});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebilly-js-sdk",
3
- "version": "62.222.0",
3
+ "version": "62.222.1",
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",