rebilly-js-sdk 62.207.9 → 62.208.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.207.9 (2026-10-08)
1
+ ## 62.208.1 (2026-10-08)
2
2
 
3
- ### 🧱 Updated Dependencies
4
-
5
- - Updated eslint-config to 4.32.3
3
+ This was a version bump only for rebilly-js-sdk to align it with other projects, there were no code changes.
@@ -14065,6 +14065,11 @@ export interface coreComponents {
14065
14065
  servicePhone: string;
14066
14066
  /** Customer service email address of the website. */
14067
14067
  serviceEmail: string;
14068
+ /**
14069
+ * Website ID assigned by the gaming regulator for this website.
14070
+ * This field is used in regulatory reports and requires the Replay add-on.
14071
+ */
14072
+ regulatorSiteId?: string | null;
14068
14073
  createdTime?: coreComponents["schemas"]["CreatedTime"];
14069
14074
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
14070
14075
  customFields?: coreComponents["schemas"]["ResourceCustomFields"];
@@ -22424,6 +22429,14 @@ export interface coreComponents {
22424
22429
  * This information is displayed on the invoice.
22425
22430
  */
22426
22431
  taxDescriptor?: string | null;
22432
+ /**
22433
+ * Operator ID assigned by the gaming regulator.
22434
+ * This field is used in regulatory reports and requires the Replay add-on.
22435
+ * When you create an organization, this value must be null.
22436
+ * To set the operator ID after Replay is active,
22437
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
22438
+ */
22439
+ regulatorOperatorId?: string | null;
22427
22440
  /**
22428
22441
  * Specifies the time zone to display on an invoice.
22429
22442
  * UTC is used by default.
@@ -27048,8 +27061,9 @@ export interface coreComponents {
27048
27061
  usageLimits?: coreComponents["schemas"]["UsageLimits"] | null;
27049
27062
  }[];
27050
27063
  /**
27051
- * Specifies if the quote must be previewed before it is created.
27052
- * Subscriptions cannot be reactivated in the preview.
27064
+ * Specifies if a preview of the quote is returned instead of creating the quote.
27065
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
27066
+ * The preview invoice has the `draft` status and no payment form URL.
27053
27067
  */
27054
27068
  preview?: boolean;
27055
27069
  };
@@ -53847,6 +53861,11 @@ export interface storefrontComponents {
53847
53861
  servicePhone: string;
53848
53862
  /** Customer service email address of the website. */
53849
53863
  serviceEmail: string;
53864
+ /**
53865
+ * Website ID assigned by the gaming regulator for this website.
53866
+ * This field is used in regulatory reports and requires the Replay add-on.
53867
+ */
53868
+ regulatorSiteId?: string | null;
53850
53869
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
53851
53870
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
53852
53871
  customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
@@ -62206,6 +62225,14 @@ export interface storefrontComponents {
62206
62225
  * This information is displayed on the invoice.
62207
62226
  */
62208
62227
  taxDescriptor?: string | null;
62228
+ /**
62229
+ * Operator ID assigned by the gaming regulator.
62230
+ * This field is used in regulatory reports and requires the Replay add-on.
62231
+ * When you create an organization, this value must be null.
62232
+ * To set the operator ID after Replay is active,
62233
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
62234
+ */
62235
+ regulatorOperatorId?: string | null;
62209
62236
  /**
62210
62237
  * Specifies the time zone to display on an invoice.
62211
62238
  * UTC is used by default.
@@ -66830,8 +66857,9 @@ export interface storefrontComponents {
66830
66857
  usageLimits?: storefrontComponents["schemas"]["UsageLimits"] | null;
66831
66858
  }[];
66832
66859
  /**
66833
- * Specifies if the quote must be previewed before it is created.
66834
- * Subscriptions cannot be reactivated in the preview.
66860
+ * Specifies if a preview of the quote is returned instead of creating the quote.
66861
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
66862
+ * The preview invoice has the `draft` status and no payment form URL.
66835
66863
  */
66836
66864
  preview?: boolean;
66837
66865
  };
@@ -71555,6 +71583,12 @@ export interface operations {
71555
71583
  */
71556
71584
  StorefrontPostSubscriptionReactivation: {
71557
71585
  responses: {
71586
+ /** Quote preview retrieved. */
71587
+ 200: {
71588
+ content: {
71589
+ "application/json": storefrontComponents["schemas"]["StorefrontReactivationQuote"];
71590
+ };
71591
+ };
71558
71592
  /** Quote for requested reactivation is created and issued. */
71559
71593
  201: {
71560
71594
  headers: {};
@@ -80908,6 +80942,11 @@ export interface reportsComponents {
80908
80942
  servicePhone: string;
80909
80943
  /** Customer service email address of the website. */
80910
80944
  serviceEmail: string;
80945
+ /**
80946
+ * Website ID assigned by the gaming regulator for this website.
80947
+ * This field is used in regulatory reports and requires the Replay add-on.
80948
+ */
80949
+ regulatorSiteId?: string | null;
80911
80950
  createdTime?: reportsComponents["schemas"]["CreatedTime"];
80912
80951
  updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
80913
80952
  customFields?: reportsComponents["schemas"]["ResourceCustomFields"];
@@ -89267,6 +89306,14 @@ export interface reportsComponents {
89267
89306
  * This information is displayed on the invoice.
89268
89307
  */
89269
89308
  taxDescriptor?: string | null;
89309
+ /**
89310
+ * Operator ID assigned by the gaming regulator.
89311
+ * This field is used in regulatory reports and requires the Replay add-on.
89312
+ * When you create an organization, this value must be null.
89313
+ * To set the operator ID after Replay is active,
89314
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
89315
+ */
89316
+ regulatorOperatorId?: string | null;
89270
89317
  /**
89271
89318
  * Specifies the time zone to display on an invoice.
89272
89319
  * UTC is used by default.
@@ -93891,8 +93938,9 @@ export interface reportsComponents {
93891
93938
  usageLimits?: reportsComponents["schemas"]["UsageLimits"] | null;
93892
93939
  }[];
93893
93940
  /**
93894
- * Specifies if the quote must be previewed before it is created.
93895
- * Subscriptions cannot be reactivated in the preview.
93941
+ * Specifies if a preview of the quote is returned instead of creating the quote.
93942
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
93943
+ * The preview invoice has the `draft` status and no payment form URL.
93896
93944
  */
93897
93945
  preview?: boolean;
93898
93946
  };
@@ -14065,6 +14065,11 @@ export interface coreComponents {
14065
14065
  servicePhone: string;
14066
14066
  /** Customer service email address of the website. */
14067
14067
  serviceEmail: string;
14068
+ /**
14069
+ * Website ID assigned by the gaming regulator for this website.
14070
+ * This field is used in regulatory reports and requires the Replay add-on.
14071
+ */
14072
+ regulatorSiteId?: string | null;
14068
14073
  createdTime?: coreComponents["schemas"]["CreatedTime"];
14069
14074
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
14070
14075
  customFields?: coreComponents["schemas"]["ResourceCustomFields"];
@@ -22424,6 +22429,14 @@ export interface coreComponents {
22424
22429
  * This information is displayed on the invoice.
22425
22430
  */
22426
22431
  taxDescriptor?: string | null;
22432
+ /**
22433
+ * Operator ID assigned by the gaming regulator.
22434
+ * This field is used in regulatory reports and requires the Replay add-on.
22435
+ * When you create an organization, this value must be null.
22436
+ * To set the operator ID after Replay is active,
22437
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
22438
+ */
22439
+ regulatorOperatorId?: string | null;
22427
22440
  /**
22428
22441
  * Specifies the time zone to display on an invoice.
22429
22442
  * UTC is used by default.
@@ -27048,8 +27061,9 @@ export interface coreComponents {
27048
27061
  usageLimits?: coreComponents["schemas"]["UsageLimits"] | null;
27049
27062
  }[];
27050
27063
  /**
27051
- * Specifies if the quote must be previewed before it is created.
27052
- * Subscriptions cannot be reactivated in the preview.
27064
+ * Specifies if a preview of the quote is returned instead of creating the quote.
27065
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
27066
+ * The preview invoice has the `draft` status and no payment form URL.
27053
27067
  */
27054
27068
  preview?: boolean;
27055
27069
  };
@@ -53847,6 +53861,11 @@ export interface storefrontComponents {
53847
53861
  servicePhone: string;
53848
53862
  /** Customer service email address of the website. */
53849
53863
  serviceEmail: string;
53864
+ /**
53865
+ * Website ID assigned by the gaming regulator for this website.
53866
+ * This field is used in regulatory reports and requires the Replay add-on.
53867
+ */
53868
+ regulatorSiteId?: string | null;
53850
53869
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
53851
53870
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
53852
53871
  customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
@@ -62206,6 +62225,14 @@ export interface storefrontComponents {
62206
62225
  * This information is displayed on the invoice.
62207
62226
  */
62208
62227
  taxDescriptor?: string | null;
62228
+ /**
62229
+ * Operator ID assigned by the gaming regulator.
62230
+ * This field is used in regulatory reports and requires the Replay add-on.
62231
+ * When you create an organization, this value must be null.
62232
+ * To set the operator ID after Replay is active,
62233
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
62234
+ */
62235
+ regulatorOperatorId?: string | null;
62209
62236
  /**
62210
62237
  * Specifies the time zone to display on an invoice.
62211
62238
  * UTC is used by default.
@@ -66830,8 +66857,9 @@ export interface storefrontComponents {
66830
66857
  usageLimits?: storefrontComponents["schemas"]["UsageLimits"] | null;
66831
66858
  }[];
66832
66859
  /**
66833
- * Specifies if the quote must be previewed before it is created.
66834
- * Subscriptions cannot be reactivated in the preview.
66860
+ * Specifies if a preview of the quote is returned instead of creating the quote.
66861
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
66862
+ * The preview invoice has the `draft` status and no payment form URL.
66835
66863
  */
66836
66864
  preview?: boolean;
66837
66865
  };
@@ -71555,6 +71583,12 @@ export interface operations {
71555
71583
  */
71556
71584
  StorefrontPostSubscriptionReactivation: {
71557
71585
  responses: {
71586
+ /** Quote preview retrieved. */
71587
+ 200: {
71588
+ content: {
71589
+ "application/json": storefrontComponents["schemas"]["StorefrontReactivationQuote"];
71590
+ };
71591
+ };
71558
71592
  /** Quote for requested reactivation is created and issued. */
71559
71593
  201: {
71560
71594
  headers: {};
@@ -80908,6 +80942,11 @@ export interface reportsComponents {
80908
80942
  servicePhone: string;
80909
80943
  /** Customer service email address of the website. */
80910
80944
  serviceEmail: string;
80945
+ /**
80946
+ * Website ID assigned by the gaming regulator for this website.
80947
+ * This field is used in regulatory reports and requires the Replay add-on.
80948
+ */
80949
+ regulatorSiteId?: string | null;
80911
80950
  createdTime?: reportsComponents["schemas"]["CreatedTime"];
80912
80951
  updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
80913
80952
  customFields?: reportsComponents["schemas"]["ResourceCustomFields"];
@@ -89267,6 +89306,14 @@ export interface reportsComponents {
89267
89306
  * This information is displayed on the invoice.
89268
89307
  */
89269
89308
  taxDescriptor?: string | null;
89309
+ /**
89310
+ * Operator ID assigned by the gaming regulator.
89311
+ * This field is used in regulatory reports and requires the Replay add-on.
89312
+ * When you create an organization, this value must be null.
89313
+ * To set the operator ID after Replay is active,
89314
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
89315
+ */
89316
+ regulatorOperatorId?: string | null;
89270
89317
  /**
89271
89318
  * Specifies the time zone to display on an invoice.
89272
89319
  * UTC is used by default.
@@ -93891,8 +93938,9 @@ export interface reportsComponents {
93891
93938
  usageLimits?: reportsComponents["schemas"]["UsageLimits"] | null;
93892
93939
  }[];
93893
93940
  /**
93894
- * Specifies if the quote must be previewed before it is created.
93895
- * Subscriptions cannot be reactivated in the preview.
93941
+ * Specifies if a preview of the quote is returned instead of creating the quote.
93942
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
93943
+ * The preview invoice has the `draft` status and no payment form URL.
93896
93944
  */
93897
93945
  preview?: boolean;
93898
93946
  };
@@ -14065,6 +14065,11 @@ export interface coreComponents {
14065
14065
  servicePhone: string;
14066
14066
  /** Customer service email address of the website. */
14067
14067
  serviceEmail: string;
14068
+ /**
14069
+ * Website ID assigned by the gaming regulator for this website.
14070
+ * This field is used in regulatory reports and requires the Replay add-on.
14071
+ */
14072
+ regulatorSiteId?: string | null;
14068
14073
  createdTime?: coreComponents["schemas"]["CreatedTime"];
14069
14074
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
14070
14075
  customFields?: coreComponents["schemas"]["ResourceCustomFields"];
@@ -22424,6 +22429,14 @@ export interface coreComponents {
22424
22429
  * This information is displayed on the invoice.
22425
22430
  */
22426
22431
  taxDescriptor?: string | null;
22432
+ /**
22433
+ * Operator ID assigned by the gaming regulator.
22434
+ * This field is used in regulatory reports and requires the Replay add-on.
22435
+ * When you create an organization, this value must be null.
22436
+ * To set the operator ID after Replay is active,
22437
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
22438
+ */
22439
+ regulatorOperatorId?: string | null;
22427
22440
  /**
22428
22441
  * Specifies the time zone to display on an invoice.
22429
22442
  * UTC is used by default.
@@ -27048,8 +27061,9 @@ export interface coreComponents {
27048
27061
  usageLimits?: coreComponents["schemas"]["UsageLimits"] | null;
27049
27062
  }[];
27050
27063
  /**
27051
- * Specifies if the quote must be previewed before it is created.
27052
- * Subscriptions cannot be reactivated in the preview.
27064
+ * Specifies if a preview of the quote is returned instead of creating the quote.
27065
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
27066
+ * The preview invoice has the `draft` status and no payment form URL.
27053
27067
  */
27054
27068
  preview?: boolean;
27055
27069
  };
@@ -53847,6 +53861,11 @@ export interface storefrontComponents {
53847
53861
  servicePhone: string;
53848
53862
  /** Customer service email address of the website. */
53849
53863
  serviceEmail: string;
53864
+ /**
53865
+ * Website ID assigned by the gaming regulator for this website.
53866
+ * This field is used in regulatory reports and requires the Replay add-on.
53867
+ */
53868
+ regulatorSiteId?: string | null;
53850
53869
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
53851
53870
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
53852
53871
  customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
@@ -62206,6 +62225,14 @@ export interface storefrontComponents {
62206
62225
  * This information is displayed on the invoice.
62207
62226
  */
62208
62227
  taxDescriptor?: string | null;
62228
+ /**
62229
+ * Operator ID assigned by the gaming regulator.
62230
+ * This field is used in regulatory reports and requires the Replay add-on.
62231
+ * When you create an organization, this value must be null.
62232
+ * To set the operator ID after Replay is active,
62233
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
62234
+ */
62235
+ regulatorOperatorId?: string | null;
62209
62236
  /**
62210
62237
  * Specifies the time zone to display on an invoice.
62211
62238
  * UTC is used by default.
@@ -66830,8 +66857,9 @@ export interface storefrontComponents {
66830
66857
  usageLimits?: storefrontComponents["schemas"]["UsageLimits"] | null;
66831
66858
  }[];
66832
66859
  /**
66833
- * Specifies if the quote must be previewed before it is created.
66834
- * Subscriptions cannot be reactivated in the preview.
66860
+ * Specifies if a preview of the quote is returned instead of creating the quote.
66861
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
66862
+ * The preview invoice has the `draft` status and no payment form URL.
66835
66863
  */
66836
66864
  preview?: boolean;
66837
66865
  };
@@ -71555,6 +71583,12 @@ export interface operations {
71555
71583
  */
71556
71584
  StorefrontPostSubscriptionReactivation: {
71557
71585
  responses: {
71586
+ /** Quote preview retrieved. */
71587
+ 200: {
71588
+ content: {
71589
+ "application/json": storefrontComponents["schemas"]["StorefrontReactivationQuote"];
71590
+ };
71591
+ };
71558
71592
  /** Quote for requested reactivation is created and issued. */
71559
71593
  201: {
71560
71594
  headers: {};
@@ -80908,6 +80942,11 @@ export interface reportsComponents {
80908
80942
  servicePhone: string;
80909
80943
  /** Customer service email address of the website. */
80910
80944
  serviceEmail: string;
80945
+ /**
80946
+ * Website ID assigned by the gaming regulator for this website.
80947
+ * This field is used in regulatory reports and requires the Replay add-on.
80948
+ */
80949
+ regulatorSiteId?: string | null;
80911
80950
  createdTime?: reportsComponents["schemas"]["CreatedTime"];
80912
80951
  updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
80913
80952
  customFields?: reportsComponents["schemas"]["ResourceCustomFields"];
@@ -89267,6 +89306,14 @@ export interface reportsComponents {
89267
89306
  * This information is displayed on the invoice.
89268
89307
  */
89269
89308
  taxDescriptor?: string | null;
89309
+ /**
89310
+ * Operator ID assigned by the gaming regulator.
89311
+ * This field is used in regulatory reports and requires the Replay add-on.
89312
+ * When you create an organization, this value must be null.
89313
+ * To set the operator ID after Replay is active,
89314
+ * use the [Update an organization](https://www.rebilly.com/catalog/all/organizations/patchorganization) operation.
89315
+ */
89316
+ regulatorOperatorId?: string | null;
89270
89317
  /**
89271
89318
  * Specifies the time zone to display on an invoice.
89272
89319
  * UTC is used by default.
@@ -93891,8 +93938,9 @@ export interface reportsComponents {
93891
93938
  usageLimits?: reportsComponents["schemas"]["UsageLimits"] | null;
93892
93939
  }[];
93893
93940
  /**
93894
- * Specifies if the quote must be previewed before it is created.
93895
- * Subscriptions cannot be reactivated in the preview.
93941
+ * Specifies if a preview of the quote is returned instead of creating the quote.
93942
+ * When a preview is returned, the quote and invoice are not saved, and other quotes for the order are not canceled.
93943
+ * The preview invoice has the `draft` status and no payment form URL.
93896
93944
  */
93897
93945
  preview?: boolean;
93898
93946
  };
@@ -399,7 +399,7 @@ function C({ options: t }) {
399
399
  "Rebilly",
400
400
  t.appName,
401
401
  "js-sdk"
402
- ].filter((a) => a).join("/")}@828df25` };
402
+ ].filter((a) => a).join("/")}@66394c4` };
403
403
  return t.apiKey && (c["REB-APIKEY"] = t.apiKey), c;
404
404
  }
405
405
  function l() {
@@ -1 +1 @@
1
- (function(A,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],w):(A=typeof globalThis<"u"?globalThis:A||self,w(A["rebilly-js-sdk"]={},A.axios))})(this,function(A,w){Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Z=Object.create,M=Object.defineProperty,H=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,E=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),re=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=ee(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=H(e,l))||s.enumerable});return t},B=(t,e,r)=>(r=t!=null?Z(te(t)):{},re(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 N=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}))}},_={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"},se=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.limit=null,this.offset=null,this.total=null,Object.keys(_).forEach(u=>{const o=s[_[u]];this[u]=o?Number(o):null}),this.response={status:e,statusText:r,headers:s},this.items=t.map(u=>new N({data:u,status:e,statusText:r,headers:s})),this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}},ne=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}},ue=class extends v{constructor(t){super({error:t,name:"RebillyRequestError"})}},oe=class extends v{constructor(t){super({error:t,name:"RebillyValidationError"})}},le=class extends v{constructor(t){super({error:t,name:"RebillyNotFoundError"})}},ce=class extends v{constructor(t){super({error:t,name:"RebillyConflictError"})}},ie=class extends v{constructor(t){super({error:t,name:"RebillyForbiddenError"})}},ae=class extends v{constructor(t){super({error:t,name:"RebillyMethodNotAllowedError"})}},ge=class extends v{constructor(t){super({error:t,name:"RebillyTimeoutError"})}},me=class extends v{constructor(t){super({error:t,name:"RebillyCanceledError"})}},R={RebillyError:v,RebillyRequestError:ue,RebillyValidationError:oe,RebillyNotFoundError:le,RebillyConflictError:ce,RebillyForbiddenError:ie,RebillyMethodNotAllowedError:ae,RebillyTimeoutError:ge,RebillyCanceledError:me},K=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}})),fe=E(((t,e)=>{var r=Symbol.prototype.valueOf,s=K();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})),pe=E(((t,e)=>{e.exports=function(s){return s!=null&&typeof s=="object"&&Array.isArray(s)===!1}})),he=E(((t,e)=>{var r=pe();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)}})),$e=E(((t,e)=>{var r=fe(),s=K(),n=he();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})),ye=B($e()),Ae="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Re=(t=21)=>{let e="",r=t|0;for(;r-- >0;)e+=Ae[Math.random()*64|0];return e},be=class{constructor({id:t=null,created:e=null}={}){this.id=t||Re(),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"]})}},we=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 be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}},I=new we,L=class{static cancelById=(t,e)=>{try{I.getById(t).cancel(e),I.deleteById(t)}catch{}};static cancelAll=async t=>{for(const e of I.getAll())await e.cancel(t),I.deleteById(e.id)}},ve={cancelAll:async(...t)=>await L.cancelAll(...t)},k={request:"request",response:"response"},U=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("/")}@828df25`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return(0,ye.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 U(c)&&e.interceptors[k[c]].use(a,f)}function b(c,a){return U(c)&&e.interceptors[k[c]].eject(a)}function Vr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.request,{thenDelegate:c,catchDelegate:a})}function Jr(c){b(k.request,c)}function Wr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.response,{thenDelegate:c,catchDelegate:a})}function Gr(c){b(k.response,c)}function S({request:c,isCollection:a,config:f}){const $=J(f),{id:T,cancelToken:rs}=I.save();$.cancelToken=rs;const X=async function(){try{return Yr({response:await c($),isCollection:a,config:$})}catch(D){return V({error:D,config:$})}finally{I.deleteById(T)}}();return X.cancel=D=>L.cancelById(T,D),X}function Yr({response:c,isCollection:a,config:f}){return a?new se(c,f):new N(c,f)}function V({error:c}){if(w.default.isCancel(c))throw new R.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new R.RebillyForbiddenError(c);case 404:throw new R.RebillyNotFoundError(c);case 405:throw new R.RebillyMethodNotAllowedError(c);case 409:throw new R.RebillyConflictError(c);case 422:throw new R.RebillyValidationError(c);default:throw new R.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new R.RebillyTimeoutError(c):new R.RebillyRequestError(c)}function Qr(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&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 J(c={}){return{...Qr(c)}}function W(c,a={}){return S({request:f=>e.get(c,f),config:{params:a}})}function Xr(c,a){return S({request:f=>e.get(c,f),config:{params:a},isCollection:!0})}function G(c,a,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params={...f.params}),S({request:T=>e.post(c,a,T),config:$})}function Y(c,a,f={}){return S({request:$=>e.put(c,a,$),config:{params:f}})}function Zr(c,a){return S({request:f=>e.patch(c,a,f),config:{}})}function Q(c,a=null){return S({request:f=>e.delete(c,f),config:a!=null?{data:a}:{}})}function Hr(c,a){return Q(c,a)}async function es(c,a,f,$={}){if(a==="")return G(c,f,{params:$});try{if((await W(c)).response.status===200)throw new R.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(T){if(T.name==="RebillyNotFoundError")return Y(c,f,$);throw T}}async function ts(c,a){const f=J(a);try{const $=await e.get(c,f);return new ne($,f)}catch($){return V({error:$,config:f})}}return{getInstance:s,addRequestInterceptor:Vr,removeRequestInterceptor:Jr,addResponseInterceptor:Wr,removeResponseInterceptor:Gr,setTimeout:i,setProxyAgent:h,setSessionToken:p,setPublishableKey:g,setEndpoints:m,get:W,getAll:Xr,post:G,put:Y,patch:Zr,delete:Q,deleteAll:Hr,create:es,download:ts}}function ke({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function de({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 qe({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 Te({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ie({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 Se({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 Ee({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 Pe({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 xe({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 Ce({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 je({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 Oe({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function De({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 Me({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 Fe({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 Be({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 Ne({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 _e({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 Ke({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 Le({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 Ue({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 ze({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function Ve({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 Je({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 We({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 Ge({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("email-notifications",s)}}}function Ye({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 Qe({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 Xe({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function Ze({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 He({apiHandler:t}){return{getAllAttachments({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("attachments",i)},attach({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`attachments/${e}`,e,r,n)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`attachments/${e}`,r,n)},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 et({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 tt({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 rt({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 st({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 nt({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 ut({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 ot({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 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("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 ct({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function it({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 at({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 gt({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 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-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 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-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function pt({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 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("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function $t({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 yt({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 At({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 Rt({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 bt({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 wt({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)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function vt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function kt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-operations",e)}}}function dt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",e)}}}function qt({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)},addPayoutRequests({id:e,data:r}){return t.post(`payout-request-batches/${e}/payout-requests`,r)},removePayoutRequests({id:e,data:r}){return t.post(`payout-request-batches/${e}/payout-requests/remove`,r)}}}function Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",e)}}}function It({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 St({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Et({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 Pt({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 xt({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 Ct({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 jt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ot({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 Dt({apiHandler:t}){return{getEnabled(){return t.get("release-flags")}}}function Mt({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 Ft({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 Bt({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 Nt({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 _t({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 Kt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Lt({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 Ut({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 zt({apiHandler:t}){return{get(){return t.get("status")}}}function Vt({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 Jt({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 Wt({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 Gt({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 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("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 Qt({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 Xt({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,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/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function Zt({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}={}){const i={limit:e,offset:r,filter:s,q:n,sort:u,expand:o,fields:l};return t.getAll("transactions",i)},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 Ht({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 er({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 tr({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 rr({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 sr=class{constructor({apiHandler:t}){this.account=ke({apiHandler:t}),this.allowlists=de({apiHandler:t}),this.amlChecks=qe({apiHandler:t}),this.amlSettings=Te({apiHandler:t}),this.apiKeys=Ie({apiHandler:t}),this.applicationInstances=Se({apiHandler:t}),this.applications=Ee({apiHandler:t}),this.balanceTransactions=Pe({apiHandler:t}),this.billingPortals=xe({apiHandler:t}),this.blocklists=Ce({apiHandler:t}),this.broadcastMessages=je({apiHandler:t}),this.cashiers=Oe({apiHandler:t}),this.checkoutForms=De({apiHandler:t}),this.coupons=Me({apiHandler:t}),this.creditMemos=Fe({apiHandler:t}),this.customDomains=Be({apiHandler:t}),this.customFields=Ne({apiHandler:t}),this.customerAuthentication=_e({apiHandler:t}),this.customers=Ke({apiHandler:t}),this.depositRequests=Le({apiHandler:t}),this.depositStrategies=Ue({apiHandler:t}),this.digitalWallets=ze({apiHandler:t}),this.disputes=Ve({apiHandler:t}),this.emailDeliverySettings=Je({apiHandler:t}),this.emailMessages=We({apiHandler:t}),this.emailNotifications=Ge({apiHandler:t}),this.events=Ye({apiHandler:t}),this.externalIdentifiers=Qe({apiHandler:t}),this.externalServicesSettings=Xe({apiHandler:t}),this.fees=Ze({apiHandler:t}),this.files=He({apiHandler:t}),this.gatewayAccounts=et({apiHandler:t}),this.integrations=tt({apiHandler:t}),this.invoices=rt({apiHandler:t}),this.journalAccounts=st({apiHandler:t}),this.journalEntries=nt({apiHandler:t}),this.journalRecords=ut({apiHandler:t}),this.kycDocuments=ot({apiHandler:t}),this.kycRequests=lt({apiHandler:t}),this.kycSettings=ct({apiHandler:t}),this.lists=it({apiHandler:t}),this.orderCancellations=at({apiHandler:t}),this.orderChanges=gt({apiHandler:t}),this.orderPauses=mt({apiHandler:t}),this.orderReactivations=ft({apiHandler:t}),this.orders=pt({apiHandler:t}),this.organizationExports=ht({apiHandler:t}),this.organizations=$t({apiHandler:t}),this.paymentCardsBankNames=yt({apiHandler:t}),this.paymentInstruments=At({apiHandler:t}),this.paymentMethods=Rt({apiHandler:t}),this.paymentTokens=bt({apiHandler:t}),this.payoutRequestAllocations=wt({apiHandler:t}),this.payoutRequestAutoAllocations=vt({apiHandler:t}),this.payoutRequestBatchOperations=kt({apiHandler:t}),this.payoutRequestBatchPreviews=dt({apiHandler:t}),this.payoutRequestBatches=qt({apiHandler:t}),this.payoutRequestSplits=Tt({apiHandler:t}),this.payoutRequests=It({apiHandler:t}),this.payouts=St({apiHandler:t}),this.plans=Et({apiHandler:t}),this.previews=Pt({apiHandler:t}),this.products=xt({apiHandler:t}),this.profile=Ct({apiHandler:t}),this.purchase=jt({apiHandler:t}),this.quotes=Ot({apiHandler:t}),this.releaseFlags=Dt({apiHandler:t}),this.resource=Mt({apiHandler:t}),this.riskScoreRules=Ft({apiHandler:t}),this.roles=Bt({apiHandler:t}),this.search=Nt({apiHandler:t}),this.segments=_t({apiHandler:t}),this.sendThroughAttribution=Kt({apiHandler:t}),this.serviceCredentials=Lt({apiHandler:t}),this.shippingRates=Ut({apiHandler:t}),this.status=zt({apiHandler:t}),this.subscriptionCancellations=Vt({apiHandler:t}),this.subscriptionPauses=Jt({apiHandler:t}),this.subscriptionReactivations=Wt({apiHandler:t}),this.subscriptions=Gt({apiHandler:t}),this.tags=Yt({apiHandler:t}),this.tagsRules=Qt({apiHandler:t}),this.tracking=Xt({apiHandler:t}),this.transactions=Zt({apiHandler:t}),this.usages=Ht({apiHandler:t}),this.users=er({apiHandler:t}),this.webhooks=tr({apiHandler:t}),this.websites=rr({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 nr({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ur({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 or({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 lr({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 cr({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function ir({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 ar({apiHandler:t}){return{query(){return t.get("location")}}}var q={CustomersResource:nr,DataExportsResource:ur,HistogramsResource:or,ReportsResource:lr,SubscriptionsResource:cr,TimelinesResource:ir,LocationResource:ar},gr=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 mr({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 fr({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function pr({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function hr({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function $r({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function yr({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 Ar({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function Rr({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function br({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function wr({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 vr({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 kr({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 dr({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`kyc-requests/${e}`,s)}}}function qr({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 Tr({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 Ir({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 Sr({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}function Er({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 Pr({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 xr({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 Cr({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 jr({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 Or({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Dr({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Mr({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 Fr({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 Br({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}var Nr=class{constructor({apiHandler:t}){this.account=mr({apiHandler:t}),this.authorization=fr({apiHandler:t}),this.billingPortals=pr({apiHandler:t}),this.cashiers=hr({apiHandler:t}),this.checkoutForms=$r({apiHandler:t}),this.customFields=yr({apiHandler:t}),this.depositRequests=Ar({apiHandler:t}),this.deposit=Rr({apiHandler:t}),this.depositStrategies=br({apiHandler:t}),this.invoices=wr({apiHandler:t}),this.kycDocuments=vr({apiHandler:t}),this.kycLivenessSessions=kr({apiHandler:t}),this.kycRequests=dr({apiHandler:t}),this.orderChanges=qr({apiHandler:t}),this.orders=Tr({apiHandler:t}),this.paymentInstruments=Ir({apiHandler:t}),this.payoutRequestCancellations=Sr({apiHandler:t}),this.payoutRequests=Er({apiHandler:t}),this.plans=Pr({apiHandler:t}),this.products=xr({apiHandler:t}),this.purchase=Cr({apiHandler:t}),this.quotes=jr({apiHandler:t}),this.readyToPayout=Or({apiHandler:t}),this.subscriptionReactivations=Dr({apiHandler:t}),this.subscriptions=Mr({apiHandler:t}),this.transactions=Fr({apiHandler:t}),this.websites=Br({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 _r({apiHandler:t}){return new sr({apiHandler:t})}function Kr({apiHandler:t}){return new gr({apiHandler:t})}function Lr({apiHandler:t}){return new Nr({apiHandler:t})}var j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},O=6e3;function z({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 _r({apiHandler:l})}function Ur({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 Kr({apiHandler:l})}function zr({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),Lr({apiHandler:i})}A.RebillyAPI=z,A.default=z,A.RebillyErrors=R,A.RebillyExperimentalAPI=Ur,A.RebillyStorefrontAPI=zr,A.cancellation=ve});
1
+ (function(A,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],w):(A=typeof globalThis<"u"?globalThis:A||self,w(A["rebilly-js-sdk"]={},A.axios))})(this,function(A,w){Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Z=Object.create,M=Object.defineProperty,H=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,E=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),re=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=ee(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=H(e,l))||s.enumerable});return t},B=(t,e,r)=>(r=t!=null?Z(te(t)):{},re(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 N=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}))}},_={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"},se=class{constructor({data:t,status:e,statusText:r,headers:s},n={}){this.limit=null,this.offset=null,this.total=null,Object.keys(_).forEach(u=>{const o=s[_[u]];this[u]=o?Number(o):null}),this.response={status:e,statusText:r,headers:s},this.items=t.map(u=>new N({data:u,status:e,statusText:r,headers:s})),this.config=n,P(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}},ne=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}},ue=class extends v{constructor(t){super({error:t,name:"RebillyRequestError"})}},oe=class extends v{constructor(t){super({error:t,name:"RebillyValidationError"})}},le=class extends v{constructor(t){super({error:t,name:"RebillyNotFoundError"})}},ce=class extends v{constructor(t){super({error:t,name:"RebillyConflictError"})}},ie=class extends v{constructor(t){super({error:t,name:"RebillyForbiddenError"})}},ae=class extends v{constructor(t){super({error:t,name:"RebillyMethodNotAllowedError"})}},ge=class extends v{constructor(t){super({error:t,name:"RebillyTimeoutError"})}},me=class extends v{constructor(t){super({error:t,name:"RebillyCanceledError"})}},R={RebillyError:v,RebillyRequestError:ue,RebillyValidationError:oe,RebillyNotFoundError:le,RebillyConflictError:ce,RebillyForbiddenError:ie,RebillyMethodNotAllowedError:ae,RebillyTimeoutError:ge,RebillyCanceledError:me},K=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}})),fe=E(((t,e)=>{var r=Symbol.prototype.valueOf,s=K();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})),pe=E(((t,e)=>{e.exports=function(s){return s!=null&&typeof s=="object"&&Array.isArray(s)===!1}})),he=E(((t,e)=>{var r=pe();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)}})),$e=E(((t,e)=>{var r=fe(),s=K(),n=he();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})),ye=B($e()),Ae="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Re=(t=21)=>{let e="",r=t|0;for(;r-- >0;)e+=Ae[Math.random()*64|0];return e},be=class{constructor({id:t=null,created:e=null}={}){this.id=t||Re(),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"]})}},we=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 be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}},I=new we,L=class{static cancelById=(t,e)=>{try{I.getById(t).cancel(e),I.deleteById(t)}catch{}};static cancelAll=async t=>{for(const e of I.getAll())await e.cancel(t),I.deleteById(e.id)}},ve={cancelAll:async(...t)=>await L.cancelAll(...t)},k={request:"request",response:"response"},U=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("/")}@66394c4`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return(0,ye.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 U(c)&&e.interceptors[k[c]].use(a,f)}function b(c,a){return U(c)&&e.interceptors[k[c]].eject(a)}function Vr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.request,{thenDelegate:c,catchDelegate:a})}function Jr(c){b(k.request,c)}function Wr({thenDelegate:c,catchDelegate:a=()=>{}}){return y(k.response,{thenDelegate:c,catchDelegate:a})}function Gr(c){b(k.response,c)}function S({request:c,isCollection:a,config:f}){const $=J(f),{id:T,cancelToken:rs}=I.save();$.cancelToken=rs;const X=async function(){try{return Yr({response:await c($),isCollection:a,config:$})}catch(D){return V({error:D,config:$})}finally{I.deleteById(T)}}();return X.cancel=D=>L.cancelById(T,D),X}function Yr({response:c,isCollection:a,config:f}){return a?new se(c,f):new N(c,f)}function V({error:c}){if(w.default.isCancel(c))throw new R.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new R.RebillyForbiddenError(c);case 404:throw new R.RebillyNotFoundError(c);case 405:throw new R.RebillyMethodNotAllowedError(c);case 409:throw new R.RebillyConflictError(c);case 422:throw new R.RebillyValidationError(c);default:throw new R.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new R.RebillyTimeoutError(c):new R.RebillyRequestError(c)}function Qr(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&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 J(c={}){return{...Qr(c)}}function W(c,a={}){return S({request:f=>e.get(c,f),config:{params:a}})}function Xr(c,a){return S({request:f=>e.get(c,f),config:{params:a},isCollection:!0})}function G(c,a,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params={...f.params}),S({request:T=>e.post(c,a,T),config:$})}function Y(c,a,f={}){return S({request:$=>e.put(c,a,$),config:{params:f}})}function Zr(c,a){return S({request:f=>e.patch(c,a,f),config:{}})}function Q(c,a=null){return S({request:f=>e.delete(c,f),config:a!=null?{data:a}:{}})}function Hr(c,a){return Q(c,a)}async function es(c,a,f,$={}){if(a==="")return G(c,f,{params:$});try{if((await W(c)).response.status===200)throw new R.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(T){if(T.name==="RebillyNotFoundError")return Y(c,f,$);throw T}}async function ts(c,a){const f=J(a);try{const $=await e.get(c,f);return new ne($,f)}catch($){return V({error:$,config:f})}}return{getInstance:s,addRequestInterceptor:Vr,removeRequestInterceptor:Jr,addResponseInterceptor:Wr,removeResponseInterceptor:Gr,setTimeout:i,setProxyAgent:h,setSessionToken:p,setPublishableKey:g,setEndpoints:m,get:W,getAll:Xr,post:G,put:Y,patch:Zr,delete:Q,deleteAll:Hr,create:es,download:ts}}function ke({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function de({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 qe({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 Te({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ie({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 Se({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 Ee({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 Pe({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 xe({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 Ce({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 je({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 Oe({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function De({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 Me({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 Fe({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 Be({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 Ne({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 _e({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 Ke({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 Le({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 Ue({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 ze({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function Ve({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 Je({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 We({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 Ge({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const s={limit:e,offset:r};return t.getAll("email-notifications",s)}}}function Ye({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 Qe({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 Xe({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function Ze({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 He({apiHandler:t}){return{getAllAttachments({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("attachments",i)},attach({id:e="",data:r,expand:s=null}){const n={expand:s};return t.create(`attachments/${e}`,e,r,n)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r,expand:s=null}){const n={expand:s};return t.put(`attachments/${e}`,r,n)},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 et({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 tt({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 rt({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 st({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 nt({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 ut({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 ot({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 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("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 ct({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function it({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 at({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 gt({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 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-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 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-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function pt({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 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("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function $t({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 yt({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 At({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 Rt({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 bt({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 wt({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)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function vt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function kt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-operations",e)}}}function dt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",e)}}}function qt({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)},addPayoutRequests({id:e,data:r}){return t.post(`payout-request-batches/${e}/payout-requests`,r)},removePayoutRequests({id:e,data:r}){return t.post(`payout-request-batches/${e}/payout-requests/remove`,r)}}}function Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",e)}}}function It({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 St({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Et({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 Pt({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 xt({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 Ct({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 jt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ot({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 Dt({apiHandler:t}){return{getEnabled(){return t.get("release-flags")}}}function Mt({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 Ft({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 Bt({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 Nt({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 _t({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 Kt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Lt({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 Ut({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 zt({apiHandler:t}){return{get(){return t.get("status")}}}function Vt({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 Jt({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 Wt({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 Gt({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 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("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 Qt({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 Xt({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,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/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function Zt({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}={}){const i={limit:e,offset:r,filter:s,q:n,sort:u,expand:o,fields:l};return t.getAll("transactions",i)},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 Ht({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 er({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 tr({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 rr({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 sr=class{constructor({apiHandler:t}){this.account=ke({apiHandler:t}),this.allowlists=de({apiHandler:t}),this.amlChecks=qe({apiHandler:t}),this.amlSettings=Te({apiHandler:t}),this.apiKeys=Ie({apiHandler:t}),this.applicationInstances=Se({apiHandler:t}),this.applications=Ee({apiHandler:t}),this.balanceTransactions=Pe({apiHandler:t}),this.billingPortals=xe({apiHandler:t}),this.blocklists=Ce({apiHandler:t}),this.broadcastMessages=je({apiHandler:t}),this.cashiers=Oe({apiHandler:t}),this.checkoutForms=De({apiHandler:t}),this.coupons=Me({apiHandler:t}),this.creditMemos=Fe({apiHandler:t}),this.customDomains=Be({apiHandler:t}),this.customFields=Ne({apiHandler:t}),this.customerAuthentication=_e({apiHandler:t}),this.customers=Ke({apiHandler:t}),this.depositRequests=Le({apiHandler:t}),this.depositStrategies=Ue({apiHandler:t}),this.digitalWallets=ze({apiHandler:t}),this.disputes=Ve({apiHandler:t}),this.emailDeliverySettings=Je({apiHandler:t}),this.emailMessages=We({apiHandler:t}),this.emailNotifications=Ge({apiHandler:t}),this.events=Ye({apiHandler:t}),this.externalIdentifiers=Qe({apiHandler:t}),this.externalServicesSettings=Xe({apiHandler:t}),this.fees=Ze({apiHandler:t}),this.files=He({apiHandler:t}),this.gatewayAccounts=et({apiHandler:t}),this.integrations=tt({apiHandler:t}),this.invoices=rt({apiHandler:t}),this.journalAccounts=st({apiHandler:t}),this.journalEntries=nt({apiHandler:t}),this.journalRecords=ut({apiHandler:t}),this.kycDocuments=ot({apiHandler:t}),this.kycRequests=lt({apiHandler:t}),this.kycSettings=ct({apiHandler:t}),this.lists=it({apiHandler:t}),this.orderCancellations=at({apiHandler:t}),this.orderChanges=gt({apiHandler:t}),this.orderPauses=mt({apiHandler:t}),this.orderReactivations=ft({apiHandler:t}),this.orders=pt({apiHandler:t}),this.organizationExports=ht({apiHandler:t}),this.organizations=$t({apiHandler:t}),this.paymentCardsBankNames=yt({apiHandler:t}),this.paymentInstruments=At({apiHandler:t}),this.paymentMethods=Rt({apiHandler:t}),this.paymentTokens=bt({apiHandler:t}),this.payoutRequestAllocations=wt({apiHandler:t}),this.payoutRequestAutoAllocations=vt({apiHandler:t}),this.payoutRequestBatchOperations=kt({apiHandler:t}),this.payoutRequestBatchPreviews=dt({apiHandler:t}),this.payoutRequestBatches=qt({apiHandler:t}),this.payoutRequestSplits=Tt({apiHandler:t}),this.payoutRequests=It({apiHandler:t}),this.payouts=St({apiHandler:t}),this.plans=Et({apiHandler:t}),this.previews=Pt({apiHandler:t}),this.products=xt({apiHandler:t}),this.profile=Ct({apiHandler:t}),this.purchase=jt({apiHandler:t}),this.quotes=Ot({apiHandler:t}),this.releaseFlags=Dt({apiHandler:t}),this.resource=Mt({apiHandler:t}),this.riskScoreRules=Ft({apiHandler:t}),this.roles=Bt({apiHandler:t}),this.search=Nt({apiHandler:t}),this.segments=_t({apiHandler:t}),this.sendThroughAttribution=Kt({apiHandler:t}),this.serviceCredentials=Lt({apiHandler:t}),this.shippingRates=Ut({apiHandler:t}),this.status=zt({apiHandler:t}),this.subscriptionCancellations=Vt({apiHandler:t}),this.subscriptionPauses=Jt({apiHandler:t}),this.subscriptionReactivations=Wt({apiHandler:t}),this.subscriptions=Gt({apiHandler:t}),this.tags=Yt({apiHandler:t}),this.tagsRules=Qt({apiHandler:t}),this.tracking=Xt({apiHandler:t}),this.transactions=Zt({apiHandler:t}),this.usages=Ht({apiHandler:t}),this.users=er({apiHandler:t}),this.webhooks=tr({apiHandler:t}),this.websites=rr({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 nr({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ur({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 or({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 lr({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 cr({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function ir({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 ar({apiHandler:t}){return{query(){return t.get("location")}}}var q={CustomersResource:nr,DataExportsResource:ur,HistogramsResource:or,ReportsResource:lr,SubscriptionsResource:cr,TimelinesResource:ir,LocationResource:ar},gr=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 mr({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 fr({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function pr({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function hr({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function $r({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function yr({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 Ar({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`deposit-requests/${e}`,s)}}}function Rr({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function br({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function wr({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 vr({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 kr({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 dr({apiHandler:t}){return{get({id:e,expand:r=null}){const s={expand:r};return t.get(`kyc-requests/${e}`,s)}}}function qr({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 Tr({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 Ir({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 Sr({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}function Er({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 Pr({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 xr({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 Cr({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 jr({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 Or({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Dr({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Mr({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 Fr({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 Br({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}var Nr=class{constructor({apiHandler:t}){this.account=mr({apiHandler:t}),this.authorization=fr({apiHandler:t}),this.billingPortals=pr({apiHandler:t}),this.cashiers=hr({apiHandler:t}),this.checkoutForms=$r({apiHandler:t}),this.customFields=yr({apiHandler:t}),this.depositRequests=Ar({apiHandler:t}),this.deposit=Rr({apiHandler:t}),this.depositStrategies=br({apiHandler:t}),this.invoices=wr({apiHandler:t}),this.kycDocuments=vr({apiHandler:t}),this.kycLivenessSessions=kr({apiHandler:t}),this.kycRequests=dr({apiHandler:t}),this.orderChanges=qr({apiHandler:t}),this.orders=Tr({apiHandler:t}),this.paymentInstruments=Ir({apiHandler:t}),this.payoutRequestCancellations=Sr({apiHandler:t}),this.payoutRequests=Er({apiHandler:t}),this.plans=Pr({apiHandler:t}),this.products=xr({apiHandler:t}),this.purchase=Cr({apiHandler:t}),this.quotes=jr({apiHandler:t}),this.readyToPayout=Or({apiHandler:t}),this.subscriptionReactivations=Dr({apiHandler:t}),this.subscriptions=Mr({apiHandler:t}),this.transactions=Fr({apiHandler:t}),this.websites=Br({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 _r({apiHandler:t}){return new sr({apiHandler:t})}function Kr({apiHandler:t}){return new gr({apiHandler:t})}function Lr({apiHandler:t}){return new Nr({apiHandler:t})}var j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},O=6e3;function z({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 _r({apiHandler:l})}function Ur({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 Kr({apiHandler:l})}function zr({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),Lr({apiHandler:i})}A.RebillyAPI=z,A.default=z,A.RebillyErrors=R,A.RebillyExperimentalAPI=Ur,A.RebillyStorefrontAPI=zr,A.cancellation=ve});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebilly-js-sdk",
3
- "version": "62.207.9",
3
+ "version": "62.208.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",