rebilly-js-sdk 62.114.0 → 62.116.0

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,6 +1,6 @@
1
- ## [62.114.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.113.1...rebilly-js-sdk-v62.114.0) (2026-06-05)
1
+ ## [62.116.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.115.0...rebilly-js-sdk-v62.116.0) (2026-06-08)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#22287](https://github.com/Rebilly/rebilly/issues/22287)) ([3305978](https://github.com/Rebilly/rebilly/commit/330597836fdcf938ed8c2b5e7cbf5109c02756e1))
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#22370](https://github.com/Rebilly/rebilly/issues/22370)) ([671f655](https://github.com/Rebilly/rebilly/commit/671f6550c89b4973adb2c557b97844e52eebcdc7))
@@ -5900,6 +5900,7 @@ export interface coreComponents {
5900
5900
  /**
5901
5901
  * Attribute of the Keycloak user profile.
5902
5902
  * This value determines which user attribute the field maps to.
5903
+ * Use the `contentBlock` attribute for static text in the registration form that requires no user input.
5903
5904
  */
5904
5905
  attribute:
5905
5906
  | "username"
@@ -5920,7 +5921,8 @@ export interface coreComponents {
5920
5921
  | "occupation"
5921
5922
  | "marketingOptIn"
5922
5923
  | "termsAccepted"
5923
- | "passwordStep";
5924
+ | "passwordStep"
5925
+ | "contentBlock";
5924
5926
  /** Display name of the registration field. */
5925
5927
  displayName: string;
5926
5928
  /**
@@ -5944,12 +5946,32 @@ export interface coreComponents {
5944
5946
  * Only applicable when `validationType` is `regex`.
5945
5947
  */
5946
5948
  validationPattern?: string | null;
5947
- /** Minimum length of the field value. */
5949
+ /**
5950
+ * Minimum length of the field value.
5951
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
5952
+ */
5948
5953
  minLength?: number | null;
5949
- /** Maximum length of the field value. */
5954
+ /**
5955
+ * Maximum length of the field value.
5956
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
5957
+ */
5950
5958
  maxLength?: number | null;
5951
5959
  /** Help text displayed to the user for the field. */
5952
5960
  helpText?: string | null;
5961
+ /**
5962
+ * Minimum age in years for the registrant, calculated from their date of birth.
5963
+ * This field is only applicable when the `attribute` value is `dateOfBirth`.
5964
+ */
5965
+ minimumAge?: number | null;
5966
+ /** Type of input control for the field in the registration form. */
5967
+ inputType?: ("text" | "select" | "checkbox" | "date") | null;
5968
+ /** Placeholder text displayed in the input field before the user enters a value. */
5969
+ placeholder?: string | null;
5970
+ /**
5971
+ * Static informational text in the registration form.
5972
+ * This field is only applicable when the `attribute` value is `contentBlock`.
5973
+ */
5974
+ contentBlock?: string | null;
5953
5975
  /** Display order of the field within a registration step. */
5954
5976
  order: number;
5955
5977
  /** Registration step associated with the field. */
@@ -13529,6 +13551,8 @@ export interface coreComponents {
13529
13551
  shipping?: coreComponents["schemas"]["Shipping"];
13530
13552
  /** Notes for the customer displayed on the order invoice. */
13531
13553
  notes?: string;
13554
+ /** Date and time when a subscription is canceled. */
13555
+ canceledTime?: string | null;
13532
13556
  /** Specifies who initiated the cancellation. */
13533
13557
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
13534
13558
  /** Category of the cancellation. */
@@ -14150,7 +14174,7 @@ export interface coreComponents {
14150
14174
  voidTime?: string | null;
14151
14175
  /** Date and time when the order is deactivated. */
14152
14176
  churnTime?: string | null;
14153
- /** Date and time when a order is cancelled. */
14177
+ /** Date and time when an order is canceled. */
14154
14178
  cancellationTime?: string | null;
14155
14179
  /** Specifies who initiated the cancellation. */
14156
14180
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
@@ -14659,7 +14683,7 @@ export interface coreComponents {
14659
14683
  /** Status of the subscription order. */
14660
14684
  status?: "draft" | "confirmed" | "completed" | "revoked";
14661
14685
  /**
14662
- * Date and time when a subscription is cancelled.
14686
+ * Date and time when a subscription is canceled.
14663
14687
  * By default, this occurs when `status` is `confirmed`, unless `draft` is specified.
14664
14688
  */
14665
14689
  canceledTime?: string | null;
@@ -24284,7 +24308,7 @@ export interface coreComponents {
24284
24308
  * - `2`: Third period, and so on.
24285
24309
  */
24286
24310
  period?: number;
24287
- /** Ratio percentage of active, non-cancelled, subscriptions in the retention period versus all subscriptions created in the aggregation period. */
24311
+ /** Ratio percentage of active, non-canceled subscriptions in the retention period versus all subscriptions created in the aggregation period. */
24288
24312
  retentionRatio?: number;
24289
24313
  /** Number of canceled subscriptions within the specified retention period. */
24290
24314
  canceledSubscriptionsCount?: number;
@@ -24623,6 +24647,11 @@ export interface coreComponents {
24623
24647
  rel?: "self" | "logoUrl";
24624
24648
  }[];
24625
24649
  };
24650
+ /** Feature indicators for payout method behavior. */
24651
+ ReadyToPayoutFeature: {
24652
+ /** Specifies if the payout method requires a setup transaction for each payout. */
24653
+ requiresSetupTransaction?: boolean;
24654
+ };
24626
24655
  StorefrontCashier: {
24627
24656
  /** Unique identifier of the cashier resource. */
24628
24657
  id: string;
@@ -24647,7 +24676,7 @@ export interface coreComponents {
24647
24676
  })[];
24648
24677
  payoutMethods: {
24649
24678
  method: string;
24650
- brands?: string[];
24679
+ feature?: coreComponents["schemas"]["ReadyToPayoutFeature"];
24651
24680
  }[];
24652
24681
  /** List of predefined deposit amounts that the customer can choose from. */
24653
24682
  depositAmounts: number[];
@@ -24678,7 +24707,7 @@ export interface coreComponents {
24678
24707
  _links?: coreComponents["schemas"]["SelfLink"];
24679
24708
  };
24680
24709
  PostCashierPayoutRequestCancellation: {
24681
- /** Pending payout request amount to be cancelled. */
24710
+ /** Pending payout request amount to be canceled. */
24682
24711
  amount: number;
24683
24712
  };
24684
24713
  /**
@@ -26894,11 +26923,6 @@ export interface coreComponents {
26894
26923
  /** Amount to payout. */
26895
26924
  amount: number;
26896
26925
  };
26897
- /** Feature indicators for payout method behavior. */
26898
- ReadyToPayoutFeature: {
26899
- /** Specifies if the payout method requires a setup transaction for each payout. */
26900
- requiresSetupTransaction?: boolean;
26901
- };
26902
26926
  /**
26903
26927
  * For the method to be applicable, one or more of the following filters must match.
26904
26928
  * If no filters are sent, no restrictions are applied.
@@ -30267,7 +30291,7 @@ export interface operations {
30267
30291
  };
30268
30292
  };
30269
30293
  responses: {
30270
- /** Coupon redemption cancelled. */
30294
+ /** Coupon redemption canceled. */
30271
30295
  201: unknown;
30272
30296
  401: coreComponents["responses"]["Unauthorized"];
30273
30297
  403: coreComponents["responses"]["Forbidden"];
@@ -35097,7 +35121,7 @@ export interface operations {
35097
35121
  };
35098
35122
  };
35099
35123
  responses: {
35100
- /** List of cancelled orders retrieved. */
35124
+ /** List of canceled orders retrieved. */
35101
35125
  200: {
35102
35126
  headers: {};
35103
35127
  content: {
@@ -35984,7 +36008,7 @@ export interface operations {
35984
36008
  };
35985
36009
  };
35986
36010
  responses: {
35987
- /** List of cancelled subscription orders retrieved. */
36011
+ /** List of canceled subscription orders retrieved. */
35988
36012
  200: {
35989
36013
  headers: {};
35990
36014
  content: {
@@ -44013,6 +44037,7 @@ export interface storefrontComponents {
44013
44037
  /**
44014
44038
  * Attribute of the Keycloak user profile.
44015
44039
  * This value determines which user attribute the field maps to.
44040
+ * Use the `contentBlock` attribute for static text in the registration form that requires no user input.
44016
44041
  */
44017
44042
  attribute:
44018
44043
  | "username"
@@ -44033,7 +44058,8 @@ export interface storefrontComponents {
44033
44058
  | "occupation"
44034
44059
  | "marketingOptIn"
44035
44060
  | "termsAccepted"
44036
- | "passwordStep";
44061
+ | "passwordStep"
44062
+ | "contentBlock";
44037
44063
  /** Display name of the registration field. */
44038
44064
  displayName: string;
44039
44065
  /**
@@ -44057,12 +44083,32 @@ export interface storefrontComponents {
44057
44083
  * Only applicable when `validationType` is `regex`.
44058
44084
  */
44059
44085
  validationPattern?: string | null;
44060
- /** Minimum length of the field value. */
44086
+ /**
44087
+ * Minimum length of the field value.
44088
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
44089
+ */
44061
44090
  minLength?: number | null;
44062
- /** Maximum length of the field value. */
44091
+ /**
44092
+ * Maximum length of the field value.
44093
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
44094
+ */
44063
44095
  maxLength?: number | null;
44064
44096
  /** Help text displayed to the user for the field. */
44065
44097
  helpText?: string | null;
44098
+ /**
44099
+ * Minimum age in years for the registrant, calculated from their date of birth.
44100
+ * This field is only applicable when the `attribute` value is `dateOfBirth`.
44101
+ */
44102
+ minimumAge?: number | null;
44103
+ /** Type of input control for the field in the registration form. */
44104
+ inputType?: ("text" | "select" | "checkbox" | "date") | null;
44105
+ /** Placeholder text displayed in the input field before the user enters a value. */
44106
+ placeholder?: string | null;
44107
+ /**
44108
+ * Static informational text in the registration form.
44109
+ * This field is only applicable when the `attribute` value is `contentBlock`.
44110
+ */
44111
+ contentBlock?: string | null;
44066
44112
  /** Display order of the field within a registration step. */
44067
44113
  order: number;
44068
44114
  /** Registration step associated with the field. */
@@ -51642,6 +51688,8 @@ export interface storefrontComponents {
51642
51688
  shipping?: storefrontComponents["schemas"]["Shipping"];
51643
51689
  /** Notes for the customer displayed on the order invoice. */
51644
51690
  notes?: string;
51691
+ /** Date and time when a subscription is canceled. */
51692
+ canceledTime?: string | null;
51645
51693
  /** Specifies who initiated the cancellation. */
51646
51694
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
51647
51695
  /** Category of the cancellation. */
@@ -52263,7 +52311,7 @@ export interface storefrontComponents {
52263
52311
  voidTime?: string | null;
52264
52312
  /** Date and time when the order is deactivated. */
52265
52313
  churnTime?: string | null;
52266
- /** Date and time when a order is cancelled. */
52314
+ /** Date and time when an order is canceled. */
52267
52315
  cancellationTime?: string | null;
52268
52316
  /** Specifies who initiated the cancellation. */
52269
52317
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
@@ -52772,7 +52820,7 @@ export interface storefrontComponents {
52772
52820
  /** Status of the subscription order. */
52773
52821
  status?: "draft" | "confirmed" | "completed" | "revoked";
52774
52822
  /**
52775
- * Date and time when a subscription is cancelled.
52823
+ * Date and time when a subscription is canceled.
52776
52824
  * By default, this occurs when `status` is `confirmed`, unless `draft` is specified.
52777
52825
  */
52778
52826
  canceledTime?: string | null;
@@ -62397,7 +62445,7 @@ export interface storefrontComponents {
62397
62445
  * - `2`: Third period, and so on.
62398
62446
  */
62399
62447
  period?: number;
62400
- /** Ratio percentage of active, non-cancelled, subscriptions in the retention period versus all subscriptions created in the aggregation period. */
62448
+ /** Ratio percentage of active, non-canceled subscriptions in the retention period versus all subscriptions created in the aggregation period. */
62401
62449
  retentionRatio?: number;
62402
62450
  /** Number of canceled subscriptions within the specified retention period. */
62403
62451
  canceledSubscriptionsCount?: number;
@@ -62736,6 +62784,11 @@ export interface storefrontComponents {
62736
62784
  rel?: "self" | "logoUrl";
62737
62785
  }[];
62738
62786
  };
62787
+ /** Feature indicators for payout method behavior. */
62788
+ ReadyToPayoutFeature: {
62789
+ /** Specifies if the payout method requires a setup transaction for each payout. */
62790
+ requiresSetupTransaction?: boolean;
62791
+ };
62739
62792
  StorefrontCashier: {
62740
62793
  /** Unique identifier of the cashier resource. */
62741
62794
  id: string;
@@ -62760,7 +62813,7 @@ export interface storefrontComponents {
62760
62813
  })[];
62761
62814
  payoutMethods: {
62762
62815
  method: string;
62763
- brands?: string[];
62816
+ feature?: storefrontComponents["schemas"]["ReadyToPayoutFeature"];
62764
62817
  }[];
62765
62818
  /** List of predefined deposit amounts that the customer can choose from. */
62766
62819
  depositAmounts: number[];
@@ -62791,7 +62844,7 @@ export interface storefrontComponents {
62791
62844
  _links?: storefrontComponents["schemas"]["SelfLink"];
62792
62845
  };
62793
62846
  PostCashierPayoutRequestCancellation: {
62794
- /** Pending payout request amount to be cancelled. */
62847
+ /** Pending payout request amount to be canceled. */
62795
62848
  amount: number;
62796
62849
  };
62797
62850
  /**
@@ -65007,11 +65060,6 @@ export interface storefrontComponents {
65007
65060
  /** Amount to payout. */
65008
65061
  amount: number;
65009
65062
  };
65010
- /** Feature indicators for payout method behavior. */
65011
- ReadyToPayoutFeature: {
65012
- /** Specifies if the payout method requires a setup transaction for each payout. */
65013
- requiresSetupTransaction?: boolean;
65014
- };
65015
65063
  /**
65016
65064
  * For the method to be applicable, one or more of the following filters must match.
65017
65065
  * If no filters are sent, no restrictions are applied.
@@ -67821,7 +67869,7 @@ export interface operations {
67821
67869
  };
67822
67870
  };
67823
67871
  responses: {
67824
- /** Cancelled all applicable pending cashier payout requests. */
67872
+ /** Canceled all applicable pending cashier payout requests. */
67825
67873
  200: {
67826
67874
  content: {
67827
67875
  "application/json": storefrontComponents["schemas"]["Cashier"];
@@ -69604,6 +69652,7 @@ export interface reportsComponents {
69604
69652
  /**
69605
69653
  * Attribute of the Keycloak user profile.
69606
69654
  * This value determines which user attribute the field maps to.
69655
+ * Use the `contentBlock` attribute for static text in the registration form that requires no user input.
69607
69656
  */
69608
69657
  attribute:
69609
69658
  | "username"
@@ -69624,7 +69673,8 @@ export interface reportsComponents {
69624
69673
  | "occupation"
69625
69674
  | "marketingOptIn"
69626
69675
  | "termsAccepted"
69627
- | "passwordStep";
69676
+ | "passwordStep"
69677
+ | "contentBlock";
69628
69678
  /** Display name of the registration field. */
69629
69679
  displayName: string;
69630
69680
  /**
@@ -69648,12 +69698,32 @@ export interface reportsComponents {
69648
69698
  * Only applicable when `validationType` is `regex`.
69649
69699
  */
69650
69700
  validationPattern?: string | null;
69651
- /** Minimum length of the field value. */
69701
+ /**
69702
+ * Minimum length of the field value.
69703
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
69704
+ */
69652
69705
  minLength?: number | null;
69653
- /** Maximum length of the field value. */
69706
+ /**
69707
+ * Maximum length of the field value.
69708
+ * Not applicable when the `attribute` value is `dateOfBirth` or `contentBlock`.
69709
+ */
69654
69710
  maxLength?: number | null;
69655
69711
  /** Help text displayed to the user for the field. */
69656
69712
  helpText?: string | null;
69713
+ /**
69714
+ * Minimum age in years for the registrant, calculated from their date of birth.
69715
+ * This field is only applicable when the `attribute` value is `dateOfBirth`.
69716
+ */
69717
+ minimumAge?: number | null;
69718
+ /** Type of input control for the field in the registration form. */
69719
+ inputType?: ("text" | "select" | "checkbox" | "date") | null;
69720
+ /** Placeholder text displayed in the input field before the user enters a value. */
69721
+ placeholder?: string | null;
69722
+ /**
69723
+ * Static informational text in the registration form.
69724
+ * This field is only applicable when the `attribute` value is `contentBlock`.
69725
+ */
69726
+ contentBlock?: string | null;
69657
69727
  /** Display order of the field within a registration step. */
69658
69728
  order: number;
69659
69729
  /** Registration step associated with the field. */
@@ -77233,6 +77303,8 @@ export interface reportsComponents {
77233
77303
  shipping?: reportsComponents["schemas"]["Shipping"];
77234
77304
  /** Notes for the customer displayed on the order invoice. */
77235
77305
  notes?: string;
77306
+ /** Date and time when a subscription is canceled. */
77307
+ canceledTime?: string | null;
77236
77308
  /** Specifies who initiated the cancellation. */
77237
77309
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
77238
77310
  /** Category of the cancellation. */
@@ -77854,7 +77926,7 @@ export interface reportsComponents {
77854
77926
  voidTime?: string | null;
77855
77927
  /** Date and time when the order is deactivated. */
77856
77928
  churnTime?: string | null;
77857
- /** Date and time when a order is cancelled. */
77929
+ /** Date and time when an order is canceled. */
77858
77930
  cancellationTime?: string | null;
77859
77931
  /** Specifies who initiated the cancellation. */
77860
77932
  canceledBy?: ("merchant" | "customer" | "rebilly") | null;
@@ -78363,7 +78435,7 @@ export interface reportsComponents {
78363
78435
  /** Status of the subscription order. */
78364
78436
  status?: "draft" | "confirmed" | "completed" | "revoked";
78365
78437
  /**
78366
- * Date and time when a subscription is cancelled.
78438
+ * Date and time when a subscription is canceled.
78367
78439
  * By default, this occurs when `status` is `confirmed`, unless `draft` is specified.
78368
78440
  */
78369
78441
  canceledTime?: string | null;
@@ -87988,7 +88060,7 @@ export interface reportsComponents {
87988
88060
  * - `2`: Third period, and so on.
87989
88061
  */
87990
88062
  period?: number;
87991
- /** Ratio percentage of active, non-cancelled, subscriptions in the retention period versus all subscriptions created in the aggregation period. */
88063
+ /** Ratio percentage of active, non-canceled subscriptions in the retention period versus all subscriptions created in the aggregation period. */
87992
88064
  retentionRatio?: number;
87993
88065
  /** Number of canceled subscriptions within the specified retention period. */
87994
88066
  canceledSubscriptionsCount?: number;
@@ -88327,6 +88399,11 @@ export interface reportsComponents {
88327
88399
  rel?: "self" | "logoUrl";
88328
88400
  }[];
88329
88401
  };
88402
+ /** Feature indicators for payout method behavior. */
88403
+ ReadyToPayoutFeature: {
88404
+ /** Specifies if the payout method requires a setup transaction for each payout. */
88405
+ requiresSetupTransaction?: boolean;
88406
+ };
88330
88407
  StorefrontCashier: {
88331
88408
  /** Unique identifier of the cashier resource. */
88332
88409
  id: string;
@@ -88351,7 +88428,7 @@ export interface reportsComponents {
88351
88428
  })[];
88352
88429
  payoutMethods: {
88353
88430
  method: string;
88354
- brands?: string[];
88431
+ feature?: reportsComponents["schemas"]["ReadyToPayoutFeature"];
88355
88432
  }[];
88356
88433
  /** List of predefined deposit amounts that the customer can choose from. */
88357
88434
  depositAmounts: number[];
@@ -88382,7 +88459,7 @@ export interface reportsComponents {
88382
88459
  _links?: reportsComponents["schemas"]["SelfLink"];
88383
88460
  };
88384
88461
  PostCashierPayoutRequestCancellation: {
88385
- /** Pending payout request amount to be cancelled. */
88462
+ /** Pending payout request amount to be canceled. */
88386
88463
  amount: number;
88387
88464
  };
88388
88465
  /**
@@ -90598,11 +90675,6 @@ export interface reportsComponents {
90598
90675
  /** Amount to payout. */
90599
90676
  amount: number;
90600
90677
  };
90601
- /** Feature indicators for payout method behavior. */
90602
- ReadyToPayoutFeature: {
90603
- /** Specifies if the payout method requires a setup transaction for each payout. */
90604
- requiresSetupTransaction?: boolean;
90605
- };
90606
90678
  /**
90607
90679
  * For the method to be applicable, one or more of the following filters must match.
90608
90680
  * If no filters are sent, no restrictions are applied.
@@ -458,7 +458,7 @@ function C({ options: e }) {
458
458
  }
459
459
  function o() {
460
460
  const i = {
461
- "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((g) => g).join("/")}@3305978`
461
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((g) => g).join("/")}@671f655`
462
462
  };
463
463
  return e.apiKey && (i["REB-APIKEY"] = e.apiKey), i;
464
464
  }
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * Copyright (c) 2014-2017, Jon Schlinkert.
15
15
  * Released under the MIT License.
16
- */var It=Tt;function L(e){return It(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var St=function(t){var s,r;return!(L(t)===!1||(s=t.constructor,typeof s!="function")||(r=s.prototype,L(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const Et=qt,Pt=B,xt=St;function E(e,t){switch(Pt(e)){case"object":return Ct(e,t);case"array":return Dt(e,t);default:return Et(e)}}function Ct(e,t){if(typeof t=="function")return t(e);if(t||xt(e)){const s=new e.constructor;for(let r in e)s[r]=E(e[r],t);return s}return e}function Dt(e,t){const s=new e.constructor(e.length);for(let r=0;r<e.length;r++)s[r]=E(e[r],t);return s}var jt=E;const Mt=ct(jt);let Ot="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ft=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Ot[Math.random()*64|0];return t};class Bt{constructor({id:t=null,created:s=null}={}){this.id=t||Ft(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Kt=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(t){return this.requests[t]}deleteById(t){this.requests[t]&&delete this.requests[t]}save(){const t=new Bt;return this.requests[t.id]=t,{id:t.id,cancelToken:t.cancelToken}}};const q=new Kt;class I{}M(I,"cancelById",(t,s)=>{try{q.getById(t).cancel(s),q.deleteById(t)}catch{}}),M(I,"cancelAll",async t=>{for(const s of q.getAll())await s.cancel(t),q.deleteById(s.id)});const Nt={cancelAll:async(...e)=>await I.cancelAll(...e)},b={request:"request",response:"response"},z=e=>{if(!Object.values(b).includes(e))throw new Error(`There is no such interceptor type as "${e}"`);return!0};function P({options:e}){const t=s();function s(){return $.create(n())}function r(){return t}function n(){return{baseURL:u(),timeout:e.requestTimeout,headers:o()}}function u(){let c=e.isSandbox?e.apiEndpoints.sandbox:e.apiEndpoints.live;return e.apiVersion&&(c=`${c}/${e.apiVersion}`),e.organizationId&&(c=`${c}/organizations/${e.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",e.appName,"js-sdk"].filter(g=>g).join("/")}@3305978`};return e.apiKey&&(i["REB-APIKEY"]=e.apiKey),i}function l(){return Mt(t.defaults.headers)}function a(c){e.requestTimeout=Number(c),t.defaults.timeout=e.requestTimeout}function p(c=e.jwt){const i=l();e.apiKey=null,e.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,t.defaults.headers=i}function v(c=e.publishableKey){const i=l();e.publishableKey=c,i.common.Authorization=`${c}`,t.defaults.headers=i}function D({host:c,port:i,auth:g}){t.defaults.proxy={host:c,port:i,auth:g}}function j({live:c=null,sandbox:i=null}){c&&(e.apiEndpoints.live=c),i&&(e.apiEndpoints.sandbox=i),t.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&t.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&t.interceptors[b[c]].eject(i)}function nr({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function ur(c){J(b.request,c)}function or({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function lr(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:hr}=q.save();f.cancelToken=hr;const X=async function(){try{const T=await c(f);return cr({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>I.cancelById(R,T),X}function cr({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function ir(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...ir(c)}}function Y(c,i={}){return d({request:g=>t.get(c,g),config:{params:i}})}function gr(c,i){return d({request:g=>t.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),d({request:R=>t.post(c,i,R),config:f})}function _(c,i,g={}){return d({request:f=>t.put(c,i,f),config:{params:g}})}function ar(c,i){return d({request:g=>t.patch(c,i,g),config:{}})}function mr(c){return d({request:i=>t.delete(c,i),config:{}})}function fr(c,i){return d({request:g=>t.delete(c,g),config:{data:{...i}}})}async function $r(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function pr(c,i){const g=G(i);try{const f=await t.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:r,addRequestInterceptor:nr,removeRequestInterceptor:ur,addResponseInterceptor:or,removeResponseInterceptor:lr,setTimeout:a,setProxyAgent:D,setSessionToken:p,setPublishableKey:v,setEndpoints:j,get:Y,getAll:gr,post:Q,put:_,patch:ar,delete:mr,deleteAll:fr,create:$r,download:pr}}function Lt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("account-registration-settings",r)},create({id:t="",data:s}){return e.create(`account-registration-settings/${t}`,t,s)},get({id:t}){return e.get(`account-registration-settings/${t}`)},update({id:t,data:s}){return e.put(`account-registration-settings/${t}`,s)},delete({id:t}){return e.delete(`account-registration-settings/${t}`)}}}function zt({apiHandler:e}){return{forgotPassword({data:t}){return e.post("forgot-password",t,{authenticate:!1})}}}function Ut({apiHandler:e}){return{getAllowlistCollection({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("allowlists",u)},storeAllowlist({data:t}){return e.post("allowlists",t)},getAllowlist({id:t}){return e.get(`allowlists/${t}`)},delete({id:t}){return e.delete(`allowlists/${t}`)}}}function Vt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("aml-checks",o)},get({id:t}){return e.get(`aml-checks/${t}`)},startReview({id:t}){return e.post(`aml-checks/${t}/start-review`)},stopReview({id:t}){return e.post(`aml-checks/${t}/stop-review`)},review({id:t,data:s}){return e.post(`aml-checks/${t}/review`,s)}}}function Jt({apiHandler:e}){return{getAmlSettings(){return e.get("aml-settings")},putAmlSettings({data:t}){return e.put("aml-settings",t)}}}function Wt({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("api-keys",u)},create({id:t="",data:s}){return e.create(`api-keys/${t}`,t,s)},get({id:t}){return e.get(`api-keys/${t}`)},update({id:t,data:s}){return e.put(`api-keys/${t}`,s)},delete({id:t}){return e.delete(`api-keys/${t}`)}}}function Gt({apiHandler:e}){return{get({applicationId:t}){return e.get(`application-instances/${t}`)},upsert({applicationId:t,data:s}){return e.put(`application-instances/${t}`,s)},delete({applicationId:t}){return e.delete(`application-instances/${t}`)},getConfiguration({applicationId:t}){return e.get(`application-instances/${t}/configuration`)},upsertConfiguration({applicationId:t,data:s}){return e.put(`application-instances/${t}/configuration`,s)}}}function Yt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("applications",a)},create({data:t}){return e.post("applications",t)},get({id:t}){return e.get(`applications/${t}`)},getInstances({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`applications/${t}/instances`,n)},getInstance({id:t,organizationId:s}){return e.get(`applications/${t}/instances/${s}`)}}}function Qt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("balance-transactions",u)},get({id:t}){return e.get(`balance-transactions/${t}`)}}}function _t({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("billing-portals",o)},create({id:t="",data:s}){return e.create(`billing-portals/${t}`,t,s)},get({id:t}){return e.get(`billing-portals/${t}`)},update({id:t,data:s}){return e.put(`billing-portals/${t}`,s)},delete({id:t}){return e.delete(`billing-portals/${t}`)}}}function Xt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("blocklists",o)},create({id:t="",data:s}){return e.create(`blocklists/${t}`,t,s)},get({id:t}){return e.get(`blocklists/${t}`)},delete({id:t}){return e.delete(`blocklists/${t}`)}}}function Zt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null}={}){const u={limit:t,offset:s,sort:r,filter:n};return e.getAll("broadcast-messages",u)},create({data:t}){return e.post("broadcast-messages",t)},get({id:t}){return e.get(`broadcast-messages/${t}`)},delete({id:t}){return e.delete(`broadcast-messages/${t}`)},update({id:t,data:s}){return e.patch(`broadcast-messages/${t}`,s)}}}function Ht({apiHandler:e}){return{create({data:t}){return e.post("cashiers",t)},get({id:t}){return e.get(`cashiers/${t}`)}}}function te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("checkout-forms",o)},create({id:t="",data:s}){return e.create(`checkout-forms/${t}`,t,s)},get({id:t}){return e.get(`checkout-forms/${t}`)},update({id:t,data:s}){return e.put(`checkout-forms/${t}`,s)},delete({id:t}){return e.delete(`checkout-forms/${t}`)}}}function ee({apiHandler:e}){return{getAllRedemptions({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons-redemptions",o)},redeem({data:t}){return e.post("coupons-redemptions",t)},getRedemption({id:t}){return e.get(`coupons-redemptions/${t}`)},cancelRedemption({id:t}){return e.post(`coupons-redemptions/${t}/cancel`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons",o)},create({id:t="",data:s}){return e.create(`coupons/${t}`,t,s)},get({id:t}){return e.get(`coupons/${t}`)},update({id:t,data:s}){return e.put(`coupons/${t}`,s)},setExpiration({id:t,data:s}){return e.post(`coupons/${t}/expiration`,s)}}}const w={Accept:"application/pdf"};function se({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("credit-memos",l)},create({id:t="",data:s}){return e.create(`credit-memos/${t}`,t,s)},get({id:t}){return e.get(`credit-memos/${t}`)},update({id:t,data:s}){return e.put(`credit-memos/${t}`,s)},patch({id:t,data:s}){return e.patch(`credit-memos/${t}`,s)},void({id:t}){return e.post(`credit-memos/${t}/void`)},refund({id:t}){return e.post(`credit-memos/${t}/refund`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`credit-memos/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`credit-memos/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`credit-memos/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`credit-memos/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`credit-memos/${t}`,s)}}}function re({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("custom-domains",o)},create({data:t}){return e.post("custom-domains",t)},get({domain:t}){return e.get(`custom-domains/${t}`)},delete({domain:t}){return e.delete(`custom-domains/${t}`)}}}function ne({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)},get({resource:t,name:s}){return e.get(`custom-fields/${t}/${s}`)},create({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)},update({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)}}}function ue({apiHandler:e}){return{getAuthOptions(){return e.get("authentication-options")},updateAuthOptions({data:t}){return e.put("authentication-options",t)},getAllAuthTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("authentication-tokens",r)},login({data:t}){return e.post("authentication-tokens",t)},verify({token:t}){return e.get(`authentication-tokens/${t}`)},logout({token:t}){return e.delete(`authentication-tokens/${t}`)},exchangeToken({token:t,data:s}){return e.post(`authentication-tokens/${t}/exchange`,s)},getAllCredentials({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("credentials",r)},createCredential({id:t="",data:s}){return e.create(`credentials/${t}`,t,s)},getCredential({id:t}){return e.get(`credentials/${t}`)},updateCredential({id:t,data:s}){return e.put(`credentials/${t}`,s)},deleteCredential({id:t}){return e.delete(`credentials/${t}`)},getAllResetPasswordTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("password-tokens",r)},createResetPasswordToken({data:t}){return e.post("password-tokens",t)},getResetPasswordToken({id:t}){return e.get(`password-tokens/${t}`)},deleteResetPasswordToken({id:t}){return e.delete(`password-tokens/${t}`)}}}function oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("customers",a)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`customers/${t}`,t,s,n)},get({id:t,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return e.get(`customers/${t}`,n)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`customers/${t}`,s,n)},merge({id:t,targetCustomerId:s}){return e.delete(`customers/${t}?targetCustomerId=${s}`)},getLeadSource({id:t}){return e.get(`customers/${t}/lead-source`)},createLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},updateLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},deleteLeadSource({id:t}){return e.delete(`customers/${t}/lead-source`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`customers/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`customers/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`customers/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`customers/${t}/timeline/${s}`)},getCustomerCreditBalance({id:t}){return e.get(`customers/${t}/credit-balance`)}}}function le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-custom-property-sets",u)},create({id:t="",data:s}){return e.create(`deposit-custom-property-sets/${t}`,t,s)},get({id:t}){return e.get(`deposit-custom-property-sets/${t}`)},update({id:t,data:s}){return e.put(`deposit-custom-property-sets/${t}`,s)},delete({id:t}){return e.delete(`deposit-custom-property-sets/${t}`)}}}function ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("deposit-requests",o)},create({data:t}){return e.post("deposit-requests",t)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-strategies",u)},create({id:t="",data:s}){return e.create(`deposit-strategies/${t}`,t,s)},get({id:t}){return e.get(`deposit-strategies/${t}`)},update({id:t,data:s}){return e.put(`deposit-strategies/${t}`,s)},delete({id:t}){return e.delete(`deposit-strategies/${t}`)}}}function ge({apiHandler:e}){return{validate({data:t}){return e.post("digital-wallets/validation",t)},create({data:t}){return e.post("digital-wallets/onboarding/apple-pay",t)}}}function ae({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("disputes",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`disputes/${t}`,t,s,n)},get({id:t}){return e.get(`disputes/${t}`)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`disputes/${t}`,s,n)}}}function me({apiHandler:e}){return{verify({token:t}){return e.put(`email-delivery-setting-verifications/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("email-delivery-settings",o)},create({data:t}){return e.post("email-delivery-settings",t)},get({id:t}){return e.get(`email-delivery-settings/${t}`)},delete({id:t}){return e.delete(`email-delivery-settings/${t}`)},update({id:t,data:s}){return e.patch(`email-delivery-settings/${t}`,s)},resendVerification({id:t}){return e.post(`email-delivery-settings/${t}/resend-email-verification`)}}}function fe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:t,offset:s,q:r,sort:n,filter:u};return e.getAll("email-messages",o)},create({data:t}){return e.post("email-messages",t)},get({id:t}){return e.get(`email-messages/${t}`)},delete({id:t}){return e.delete(`email-messages/${t}`)},send({id:t,data:s={status:"outbox"}}){return e.patch(`email-messages/${t}`,s)}}}function $e({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("email-notifications",r)}}}function pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:t,offset:s,filter:r,q:n};return e.getAll("events",u)},get({eventType:t}){return e.get(`events/${t}`)},getRules({eventType:t}){return e.get(`events/${t}/rules`)},createRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},updateRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},getAllTimelineMessages({eventType:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`events/${t}/timeline`,l)},createTimelineComment({eventType:t,data:s}){return e.post(`events/${t}/timeline`,s)},getTimelineMessage({eventType:t,messageId:s}){return e.get(`events/${t}/timeline/${s}`)},deleteTimelineMessage({eventType:t,messageId:s}){return e.delete(`events/${t}/timeline/${s}`)},getRulesHistory({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/history`,a)},getRulesVersionNumber({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/drafts`,a)},createDraftRuleset({eventType:t,data:s}){return e.post(`events/${t}/rules/drafts`,s)},getDraftRuleset({eventType:t,id:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:t,id:s,data:r}){return e.put(`events/${t}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:t,id:s}){return e.delete(`events/${t}/rules/drafts/${s}`)}}}function he({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function ye({apiHandler:e}){return{getExternalServiceSettings(){return e.get("external-services-settings")},updateExternalServiceSettings({data:t}){return e.put("external-services-settings",t)}}}function Ae({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("fees",u)},create({id:t="",data:s}){return e.create(`fees/${t}`,t,s)},get({id:t}){return e.get(`fees/${t}`)},upsert({id:t,data:s}){return e.put(`fees/${t}`,s)},delete({id:t}){return e.delete(`fees/${t}`)},patch({id:t,data:s}){return e.patch(`fees/${t}`,s)}}}function Re({apiHandler:e}){return{getAllAttachments({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("attachments",a)},attach({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`attachments/${t}`,t,s,n)},getAttachment({id:t}){return e.get(`attachments/${t}`)},updateAttachment({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`attachments/${t}`,s,n)},detach({id:t}){return e.delete(`attachments/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,fields:u,sort:o};return e.getAll("files",l)},upload({fileObject:t}){return e.post("files",t)},get({id:t}){return e.get(`files/${t}`)},update({id:t,data:s}){return e.put(`files/${t}`,s)},delete({id:t}){return e.delete(`files/${t}`)},download({id:t}){const s={responseType:"arraybuffer"};return e.download(`files/${t}/download`,s)},detachAndDelete({id:t}){const s={filter:`fileId:${t}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(v=>this.detach({id:v.fields.id}));r=[...r,a],await Promise.all(a);const p=e.delete(`files/${t}`);return r.push(p),p})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:t,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:t});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function be({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,fields:o};return e.getAll("gateway-accounts",l)},create({id:t="",data:s}){return e.create(`gateway-accounts/${t}`,t,s)},get({id:t}){return e.get(`gateway-accounts/${t}`)},upsert({id:t,data:s}){return e.put(`gateway-accounts/${t}`,s)},delete({id:t}){return e.delete(`gateway-accounts/${t}`)},update({id:t,data:s}){return e.patch(`gateway-accounts/${t}`,s)},close({id:t}){return e.post(`gateway-accounts/${t}/close`)},disable({id:t}){return e.post(`gateway-accounts/${t}/disable`)},getAllDowntimeSchedules({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,sort:u};return e.getAll(`gateway-accounts/${t}/downtime-schedules`,o)},createDowntimeSchedule({id:t,data:s}){return e.post(`gateway-accounts/${t}/downtime-schedules`,s)},getDowntimeSchedule({id:t,downtimeId:s}){return e.get(`gateway-accounts/${t}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:t,downtimeId:s,data:r}){return e.put(`gateway-accounts/${t}/downtime-schedules/${s}`,r)},deleteDowntimeSchedule({id:t,downtimeId:s}){return e.delete(`gateway-accounts/${t}/downtime-schedules/${s}`)},enable({id:t}){return e.post(`gateway-accounts/${t}/enable`)},getAllVolumeLimits({id:t}){return e.getAll(`gateway-accounts/${t}/limits`)},getVolumeLimit({id:t,limitId:s}){return e.get(`gateway-accounts/${t}/limits/${s}`)},updateVolumeLimit({id:t,limitId:s,data:r}){return e.put(`gateway-accounts/${t}/limits/${s}`,r)},deleteVolumeLimit({id:t,limitId:s}){return e.delete(`gateway-accounts/${t}/limits/${s}`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`gateway-accounts/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`gateway-accounts/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`gateway-accounts/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`gateway-accounts/${t}/timeline/${s}`)},checkCredentials({id:t}){return e.post(`gateway-accounts/${t}/check-credentials`)},getFinancialSettings({id:t}){return e.get(`gateway-accounts/${t}/financial-settings`)},setFinancialSettings({id:t,data:s}){return e.put(`gateway-accounts/${t}/financial-settings`,s)}}}function we({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("integrations",r)},get({label:t}){return e.get(`integrations/${t}`)}}}function ke({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},create({id:t="",data:s}){return e.create(`invoices/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.put(`invoices/${t}`,s)},getAllInvoiceItems({id:t,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};return e.getAll(`invoices/${t}/items`,u)},createInvoiceItem({id:t,data:s}){return e.post(`invoices/${t}/items`,s)},getInvoiceItem({id:t,itemId:s}){return e.get(`invoices/${t}/items/${s}`)},updateInvoiceItem({id:t,itemId:s,data:r}){return e.put(`invoices/${t}/items/${s}`,r)},deleteInvoiceItem({id:t,itemId:s}){return e.delete(`invoices/${t}/items/${s}`)},issue({id:t,data:s}){return e.post(`invoices/${t}/issue`,s)},abandon({id:t}){return e.post(`invoices/${t}/abandon`)},void({id:t}){return e.post(`invoices/${t}/void`)},recalculate({id:t}){return e.post(`invoices/${t}/recalculate`)},reissue({id:t,data:s}){return e.post(`invoices/${t}/reissue`,s)},getAllTransactionAllocations({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`invoices/${t}/transaction-allocations`,n)},allocateCreditBalance({id:t,data:s}){return e.post(`invoices/${t}/allocate-credit-balance`,s)},applyTransaction({id:t,data:s}){return e.post(`invoices/${t}/transaction`,s)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`invoices/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`invoices/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`invoices/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`invoices/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function ve({apiHandler:e}){return{getAllAccounts({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-accounts",u)},createAccount({id:t="",data:s}){return e.create(`journal-accounts/${t}`,t,s)},getAccount({id:t}){return e.get(`journal-accounts/${t}`)},updateAccount({id:t,data:s}){return e.put(`journal-accounts/${t}`,s)}}}function de({apiHandler:e}){return{getAllEntries({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-entries",u)},createEntry({id:t="",data:s}){return e.create(`journal-entries/${t}`,t,s)},getEntry({id:t}){return e.get(`journal-entries/${t}`)},updateEntry({id:t,data:s}){return e.put(`journal-entries/${t}`,s)}}}function qe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("journal-records",o)},create({id:t="",data:s}){return e.create(`journal-records/${t}`,t,s)},get({id:t}){return e.get(`journal-records/${t}`)},update({id:t,data:s}){return e.put(`journal-records/${t}`,s)},delete({id:t}){return e.delete(`journal-records/${t}`)}}}function Te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-documents",o)},create({id:t="",data:s}){return e.create(`kyc-documents/${t}`,t,s)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.put(`kyc-documents/${t}`,s)},accept({id:t}){return e.post(`kyc-documents/${t}/acceptance`)},matches({id:t,data:s}){return e.post(`kyc-documents/${t}/matches`,s)},reject({id:t,data:s}){return e.post(`kyc-documents/${t}/rejection`,s)},review({id:t}){return e.post(`kyc-documents/${t}/review`)},startReview({id:t}){return e.post(`kyc-documents/${t}/start-review`)},stopReview({id:t}){return e.post(`kyc-documents/${t}/stop-review`)}}}function Ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-requests",o)},create({data:t}){return e.post("kyc-requests",t)},get({id:t}){return e.get(`kyc-requests/${t}`)},delete({id:t}){return e.delete(`kyc-requests/${t}`)},update({id:t,data:s}){return e.patch(`kyc-requests/${t}`,s)}}}function Se({apiHandler:e}){return{getKycSettings(){return e.get("kyc-settings")},updateKycSettings({data:t}){return e.put("kyc-settings",t)}}}function Ee({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,fields:u,q:o};return e.getAll("lists",l)},create({id:t="",data:s}){return e.create(`lists/${t}`,t,s)},getLatestVersion({id:t}){return e.get(`lists/${t}`)},update({id:t,data:s}){return e.put(`lists/${t}`,s)},delete({id:t}){return e.delete(`lists/${t}`)},getByVersion({id:t,version:s}){return e.get(`lists/${t}/${s}`)}}}function Pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("memberships",u)},get({organizationId:t,userId:s}){return e.get(`memberships/${t}/${s}`)},update({organizationId:t,userId:s,data:r}){return e.put(`memberships/${t}/${s}`,r)},delete({organizationId:t,userId:s}){return e.delete(`memberships/${t}/${s}`)}}}function xe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-cancellations",u)},create({id:t="",data:s}){return e.create(`order-cancellations/${t}`,t,s)},get({id:t}){return e.get(`order-cancellations/${t}`)},update({id:t,data:s}){return e.put(`order-cancellations/${t}`,s)},delete({id:t}){return e.delete(`order-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`order-cancellations/${t}`,s)}}}function Ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-pauses",u)},pause({id:t="",data:s}){return e.create(`order-pauses/${t}`,t,s)},get({id:t}){return e.get(`order-pauses/${t}`)},update({id:t,data:s}){return e.put(`order-pauses/${t}`,s)},delete({id:t}){return e.delete(`order-pauses/${t}`)}}}function De({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-reactivations",u)},reactivate({data:t}){return e.post("order-reactivations",t)},get({id:t}){return e.get(`order-reactivations/${t}`)}}}function je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`orders/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`orders/${t}`,s,n)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},void({id:t}){return e.post(`orders/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`orders/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`orders/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`orders/${t}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`orders/${t}/upcoming-invoice/issue`,s)}}}function Me({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("organization-exports",o)},create({data:t}){return e.post("organization-exports",t)},get({id:t}){return e.get(`organization-exports/${t}`)}}}function Oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("organizations",o)},create({data:t}){return e.post("organizations",t)},get({id:t}){return e.get(`organizations/${t}`)},update({id:t,data:s}){return e.patch(`organizations/${t}`,s)}}}function Fe({apiHandler:e}){return{getAll({limit:t=null,q:s=null}={}){const r={limit:t,q:s};return e.getAll("payment-cards-bank-names",r)}}}function Be({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("payment-instruments",l)},create({data:t}){return e.post("payment-instruments",t)},get({id:t}){return e.get(`payment-instruments/${t}`)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},nameInquiry({id:t,data:s}){return e.post(`payment-instruments/${t}/name-inquiry`,s)}}}function Ke({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("payment-methods",r)},get({apiName:t}){return e.get(`payment-methods/${t}`)}}}function Ne({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("tokens",r)},create({data:t}){return e.post("tokens",t)},get({token:t}){return e.get(`tokens/${t}`)}}}function Le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-allocations",u)},create({data:t}){return e.post("payout-request-allocations",t)},autoAllocate({data:t}){return e.post("payout-request-allocations/auto",t)},get({id:t}){return e.get(`payout-request-allocations/${t}`)},update({id:t,data:s}){return e.patch(`payout-request-allocations/${t}`,s)},process({data:t}){return e.post("payout-request-allocations/process",t)}}}function ze({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-batches",u)},create({data:t}){return e.post("payout-request-batches",t)},get({id:t}){return e.get(`payout-request-batches/${t}`)},patch({id:t,data:s}){return e.patch(`payout-request-batches/${t}`,s)},autoAllocate({id:t}){return e.post(`payout-request-batches/${t}/auto-allocate`)},approve({id:t}){return e.post(`payout-request-batches/${t}/approve`)},block({id:t,data:s}){return e.post(`payout-request-batches/${t}/block`,s)},preview({filter:t=null}){const s={filter:t};return e.get("payout-request-batches/preview",s)}}}function Ue({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-requests",u)},create({id:t="",data:s}){return e.create(`payout-requests/${t}`,t,s)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.put(`payout-requests/${t}`,s)},patch({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)},cancel({id:t,data:s}){return e.post(`payout-requests/${t}/cancel`,s)},split({id:t,data:s}){return e.post(`payout-requests/${t}/split`,s)},getPaymentInstruments({id:t}){return e.get(`payout-requests/${t}/payment-instruments`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`payout-requests/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`payout-requests/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`payout-requests/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`payout-requests/${t}/timeline/${s}`)}}}function Ve({apiHandler:e}){return{create({data:t}){return e.post("payouts",t)}}}function Je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("plans",o)},create({id:t="",data:s}){return e.create(`plans/${t}`,t,s)},get({id:t}){return e.get(`plans/${t}`)},update({id:t,data:s}){return e.put(`plans/${t}`,s)},delete({id:t}){return e.delete(`plans/${t}`)}}}function We({apiHandler:e}){return{order({data:t}){return e.post("previews/orders",t)},sendEmailRuleAction({data:t}){return e.post("previews/rule-actions/send-email",t)},webhook({data:t}){return e.post("previews/webhooks",t)}}}function Ge({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},create({id:t="",data:s}){return e.create(`products/${t}`,t,s)},get({id:t}){return e.get(`products/${t}`)},update({id:t,data:s}){return e.put(`products/${t}`,s)},delete({id:t}){return e.delete(`products/${t}`)}}}function Ye({apiHandler:e}){return{startPermissionsEmulation({data:t}){return e.post("permissions-emulation",t)},stopPermissionsEmulation(){return e.delete("permissions-emulation")},get(){return e.get("profile")},update({data:t}){return e.put("profile",t)},getMfa(){return e.get("profile/mfa")},updateMfa(){return e.post("profile/mfa")},deleteMfa(){return e.delete("profile/mfa")},getDashboard(){return e.get("profile/dashboard")},updateDashboard({data:t}){return e.put("profile/dashboard",t)},getDashboardMetricReport({metric:t,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return e.get(`profile/dashboard/metrics/${t}`,n)}}}function Qe({apiHandler:e}){return{readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function _e({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,expand:u};return e.getAll("quotes",o)},create({id:t="",data:s}){return e.create(`quotes/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},update({id:t,data:s}){return e.put(`quotes/${t}`,s)},patch({id:t,data:s}){return e.patch(`quotes/${t}`,s)},accept({id:t}){return e.post(`quotes/${t}/accept`)},cancel({id:t}){return e.post(`quotes/${t}/cancel`)},issue({id:t}){return e.post(`quotes/${t}/issue`)},recall({id:t}){return e.post(`quotes/${t}/recall`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`quotes/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`quotes/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`quotes/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`quotes/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Xe({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function Ze({apiHandler:e}){return{getAll(){return e.get("risk-score-rules")},updateRiskScoreRules({data:t}){return e.put("risk-score-rules",t)},getAllBlocklistRules(){return e.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:t}){return e.put("risk-score-rules/blocklists",t)}}}function He({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,q:u,expand:o};return e.getAll("roles",l)},create({id:t="",data:s}){return e.create(`roles/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`roles/${t}`,r)},update({id:t,data:s}){return e.put(`roles/${t}`,s)},delete({id:t}){return e.delete(`roles/${t}`)}}}function ts({apiHandler:e}){return{get({sort:t=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:t,limit:s,offset:r,q:n};return e.get("search",u)}}}function es({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("grid-segments",o)},create({id:t="",data:s}){return e.create(`grid-segments/${t}`,t,s)},get({id:t}){return e.get(`grid-segments/${t}`)},update({id:t,data:s}){return e.put(`grid-segments/${t}`,s)},delete({id:t}){return e.delete(`grid-segments/${t}`)}}}function ss({apiHandler:e}){return{getAll({eventType:t}){return e.getAll(`send-through-attribution/${t}`)}}}function rs({apiHandler:e}){return{getAll({type:t,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return e.getAll(`service-credentials/${t}`,l)},create({type:t,data:s}){return e.post(`service-credentials/${t}`,s)},get({type:t,id:s}){return e.get(`service-credentials/${t}/${s}`)},update({type:t,id:s,data:r}){return e.patch(`service-credentials/${t}/${s}`,r)},getItems({type:t,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return e.getAll(`service-credentials/${t}/${s}/items`,p)}}}function ns({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("shipping-rates",o)},create({id:t="",data:s}){return e.create(`shipping-rates/${t}`,t,s)},get({id:t}){return e.get(`shipping-rates/${t}`)},update({id:t,data:s}){return e.put(`shipping-rates/${t}`,s)},delete({id:t}){return e.delete(`shipping-rates/${t}`)}}}function us({apiHandler:e}){return{get(){return e.get("status")}}}function os({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-cancellations",u)},create({id:t="",data:s}){return e.create(`subscription-cancellations/${t}`,t,s)},get({id:t}){return e.get(`subscription-cancellations/${t}`)},delete({id:t}){return e.delete(`subscription-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`subscription-cancellations/${t}`,s)}}}function ls({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-pauses",u)},pause({id:t="",data:s}){return e.create(`subscription-pauses/${t}`,t,s)},get({id:t}){return e.get(`subscription-pauses/${t}`)},update({id:t,data:s}){return e.put(`subscription-pauses/${t}`,s)},delete({id:t}){return e.delete(`subscription-pauses/${t}`)}}}function cs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-reactivations",u)},reactivate({data:t}){return e.post("subscription-reactivations",t)},get({id:t}){return e.get(`subscription-reactivations/${t}`)}}}function is({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("subscriptions",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`subscriptions/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`subscriptions/${t}`,s,n)},delete({id:t}){return e.delete(`subscriptions/${t}`)},void({id:t}){return e.post(`subscriptions/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`subscriptions/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`subscriptions/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/interim-invoice`,s)},getAllUpcomingInvoices({id:t,expand:s=null}){const r={expand:s};return e.getAll(`subscriptions/${t}/upcoming-invoices`,r)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:t,invoiceId:s,data:r}){return e.post(`subscriptions/${t}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`subscriptions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`subscriptions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`subscriptions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`subscriptions/${t}/timeline/${s}`)}}}function gs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("tags",o)},create({data:t}){return e.post("tags",t)},get({tag:t}){return e.get(`tags/${t}`)},delete({tag:t}){return e.delete(`tags/${t}`)},update({tag:t,data:s}){return e.patch(`tags/${t}`,s)},tagCustomers({tag:t,data:s}){return e.post(`tags/${t}/customers`,s)},untagCustomers({tag:t,data:s}){return e.delete(`tags/${t}/customers`,s)},tagCustomer({tag:t,customerId:s}){return e.post(`tags/${t}/customers/${s}`)},untagCustomer({tag:t,customerId:s}){return e.delete(`tags/${t}/customers/${s}`)},tagKycDocuments({tag:t,data:s}){return e.post(`tags/${t}/kyc-documents`,s)},untagKycDocuments({tag:t,data:s}){return e.delete(`tags/${t}/kyc-documents`,s)},tagKycDocument({tag:t,kycDocumentId:s}){return e.post(`tags/${t}/kyc-documents/${s}`)},untagKycDocument({tag:t,kycDocumentId:s}){return e.delete(`tags/${t}/kyc-documents/${s}`)},tagAmlChecks({tag:t,data:s}){return e.post(`tags/${t}/aml-checks`,s)},untagAmlChecks({tag:t,data:s}){return e.delete(`tags/${t}/aml-checks`,s)},tagAmlCheck({tag:t,amlCheckId:s}){return e.post(`tags/${t}/aml-checks/${s}`)},untagAmlCheck({tag:t,amlCheckId:s}){return e.delete(`tags/${t}/aml-checks/${s}`)}}}function as({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tags-rules",o)},create({id:t="",data:s}){return e.create(`tags-rules/${t}`,t,s)},get({id:t}){return e.get(`tags-rules/${t}`)},update({id:t,data:s}){return e.put(`tags-rules/${t}`,s)},delete({id:t}){return e.delete(`tags-rules/${t}`)}}}function ms({apiHandler:e}){return{getAllApiLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,expand:o};return e.getAll("tracking/api",l)},getApiLog({id:t}){return e.get(`tracking/api/${t}`)},getAllTaxTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/taxes",o)},getTaxTrackingLog({id:t}){return e.get(`tracking/taxes/${t}`)},getAllListsChangesHistory({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:t}){return e.get(`tracking/webhooks/${t}`)},resendWebhook({id:t}){return e.post(`tracking/webhooks/${t}/resend`)}}}function fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,sort:u,expand:o};return e.getAll("transactions",l)},create({data:t,expand:s=null}){const r={expand:s};return e.post("transactions",t,r)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`transactions/${t}`,r)},patch({id:t,data:s}){return e.patch(`transactions/${t}`,s)},query({id:t}){return e.post(`transactions/${t}/query`)},update({id:t,data:s}){return e.post(`transactions/${t}/update`,s)},refund({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`transactions/${t}/refund`,s,n)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`transactions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`transactions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`transactions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`transactions/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)}}}function $s({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("usages",o)},create({data:t}){return e.post("usages",t)},get({id:t}){return e.get(`usages/${t}`)},delete({id:t}){return e.delete(`usages/${t}`)}}}function ps({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("users",o)},create({id:t="",data:s}){return e.create(`users/${t}`,t,s)},get({id:t}){return e.get(`users/${t}`)},update({id:t,data:s}){return e.put(`users/${t}`,s)},getMfa({id:t}){return e.get(`users/${t}/mfa`)}}}function hs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null}={}){const n={limit:t,offset:s,filter:r};return e.getAll("webhooks",n)},create({id:t="",data:s}){return e.create(`webhooks/${t}`,t,s)},get({id:t}){return e.get(`webhooks/${t}`)},update({id:t,data:s}){return e.put(`webhooks/${t}`,s)},delete({id:t}){return e.delete(`webhooks/${t}`)}}}function ys({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:t,offset:s,q:r,filter:n,sort:u};return e.getAll("websites",o)},create({id:t="",data:s}){return e.create(`websites/${t}`,t,s)},get({id:t}){return e.get(`websites/${t}`)},update({id:t,data:s}){return e.put(`websites/${t}`,s)},delete({id:t}){return e.delete(`websites/${t}`)}}}class As{constructor({apiHandler:t}){this.accountRegistrationSettings=Lt({apiHandler:t}),this.account=zt({apiHandler:t}),this.allowlists=Ut({apiHandler:t}),this.amlChecks=Vt({apiHandler:t}),this.amlSettings=Jt({apiHandler:t}),this.apiKeys=Wt({apiHandler:t}),this.applicationInstances=Gt({apiHandler:t}),this.applications=Yt({apiHandler:t}),this.balanceTransactions=Qt({apiHandler:t}),this.billingPortals=_t({apiHandler:t}),this.blocklists=Xt({apiHandler:t}),this.broadcastMessages=Zt({apiHandler:t}),this.cashiers=Ht({apiHandler:t}),this.checkoutForms=te({apiHandler:t}),this.coupons=ee({apiHandler:t}),this.creditMemos=se({apiHandler:t}),this.customDomains=re({apiHandler:t}),this.customFields=ne({apiHandler:t}),this.customerAuthentication=ue({apiHandler:t}),this.customers=oe({apiHandler:t}),this.depositCustomPropertySets=le({apiHandler:t}),this.depositRequests=ce({apiHandler:t}),this.depositStrategies=ie({apiHandler:t}),this.digitalWallets=ge({apiHandler:t}),this.disputes=ae({apiHandler:t}),this.emailDeliverySettings=me({apiHandler:t}),this.emailMessages=fe({apiHandler:t}),this.emailNotifications=$e({apiHandler:t}),this.events=pe({apiHandler:t}),this.externalIdentifiers=he({apiHandler:t}),this.externalServicesSettings=ye({apiHandler:t}),this.fees=Ae({apiHandler:t}),this.files=Re({apiHandler:t}),this.gatewayAccounts=be({apiHandler:t}),this.integrations=we({apiHandler:t}),this.invoices=ke({apiHandler:t}),this.journalAccounts=ve({apiHandler:t}),this.journalEntries=de({apiHandler:t}),this.journalRecords=qe({apiHandler:t}),this.kycDocuments=Te({apiHandler:t}),this.kycRequests=Ie({apiHandler:t}),this.kycSettings=Se({apiHandler:t}),this.lists=Ee({apiHandler:t}),this.memberships=Pe({apiHandler:t}),this.orderCancellations=xe({apiHandler:t}),this.orderPauses=Ce({apiHandler:t}),this.orderReactivations=De({apiHandler:t}),this.orders=je({apiHandler:t}),this.organizationExports=Me({apiHandler:t}),this.organizations=Oe({apiHandler:t}),this.paymentCardsBankNames=Fe({apiHandler:t}),this.paymentInstruments=Be({apiHandler:t}),this.paymentMethods=Ke({apiHandler:t}),this.paymentTokens=Ne({apiHandler:t}),this.payoutRequestAllocations=Le({apiHandler:t}),this.payoutRequestBatches=ze({apiHandler:t}),this.payoutRequests=Ue({apiHandler:t}),this.payouts=Ve({apiHandler:t}),this.plans=Je({apiHandler:t}),this.previews=We({apiHandler:t}),this.products=Ge({apiHandler:t}),this.profile=Ye({apiHandler:t}),this.purchase=Qe({apiHandler:t}),this.quotes=_e({apiHandler:t}),this.resource=Xe({apiHandler:t}),this.riskScoreRules=Ze({apiHandler:t}),this.roles=He({apiHandler:t}),this.search=ts({apiHandler:t}),this.segments=es({apiHandler:t}),this.sendThroughAttribution=ss({apiHandler:t}),this.serviceCredentials=rs({apiHandler:t}),this.shippingRates=ns({apiHandler:t}),this.status=us({apiHandler:t}),this.subscriptionCancellations=os({apiHandler:t}),this.subscriptionPauses=ls({apiHandler:t}),this.subscriptionReactivations=cs({apiHandler:t}),this.subscriptions=is({apiHandler:t}),this.tags=gs({apiHandler:t}),this.tagsRules=as({apiHandler:t}),this.tracking=ms({apiHandler:t}),this.transactions=fs({apiHandler:t}),this.usages=$s({apiHandler:t}),this.users=ps({apiHandler:t}),this.webhooks=hs({apiHandler:t}),this.websites=ys({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 Rs({apiHandler:e}){return{getCustomerLifetimeSummaryMetrics({customerId:t}){return e.get(`customers/${t}/summary-metrics`)}}}function bs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:t,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return e.getAll("data-exports",a)},queue({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`data-exports/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`data-exports/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`data-exports/${t}`,s,n)},delete({id:t}){return e.delete(`data-exports/${t}`)}}}function ws({apiHandler:e}){return{getAmlCheckHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return e.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return e.get("histograms/transactions",o)}}}function ks({apiHandler:e}){return{getApiLogSummary({periodStart:t=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,filter:r,limit:n,offset:u};return e.get("reports/api-log-summary",o)},getAmlChecks({periodStart:t=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return e.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:t=null,periodEnd:s=null,filter:r=null}){const n={periodStart:t,periodEnd:s,filter:r};return e.get("reports/aml-checks-inherited-summary",n)},getCumulativeSubscriptions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:t=null,periodEnd:s=null,metrics:r=null,segments:n=null}){const u={periodStart:t,periodEnd:s,metrics:r,segments:n};return e.get("reports/dashboard",u)},getDccMarkup({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/declined-transactions",l)},getDeferredRevenue({currency:t=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:t,asOfDate:s,limit:r,offset:n,filter:u};return e.get("reports/deferred-revenue",o)},getDisputes({aggregationField:t=null,periodMonth:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:t,periodMonth:s,limit:r,offset:n,filter:u};return e.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:t,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return e.get(`reports/events-triggered/${t}/rules`,o)},getFutureRenewals({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/future-renewals",u)},getJournal({currency:t=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:t,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return e.get("reports/journal",p)},getJournalSummary({periodStart:t=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:t,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return e.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:t=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const v={aggregationField:t,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return e.get("reports/retention-percentage",v)},getRetentionValue({aggregationField:t=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:v=null,criteria:D=null}){const j={aggregationField:t,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:v,criteria:D};return e.get("reports/retention-value",j)},getRevenueWaterfall({currency:t,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:t,issuedFrom:s,issuedTo:r,recognizedTo:n};return e.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/subscription-renewal",u)},getTax({periodStart:t=null,periodEnd:s=null,accountingMethod:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,accountingMethod:r,limit:n,offset:u};return e.get("reports/tax",o)},getTimeSeriesTransaction({type:t=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:t,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return e.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/transactions",l)}}}function vs({apiHandler:e}){return{getSubscriptionSummaryMetrics({subscriptionId:t}){return e.get(`subscriptions/${t}/summary-metrics`)}}}function ds({apiHandler:e}){return{getActivityFeed({eventTypes:t=null,limit:s=1e3,offset:r=0}){const n={eventTypes:t,limit:s,offset:r};return e.getAll("activity-feed",n)},getTransaction({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`transactions/${t}/timeline`,u)},getCustomer({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`customers/${t}/timeline`,u)}}}function qs({apiHandler:e}){return{query(){return e.get("location")}}}const k={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:ds,LocationResource:qs};class Ts{constructor({apiHandler:t}){this.customers=k.CustomersResource({apiHandler:t}),this.dataExports=k.DataExportsResource({apiHandler:t}),this.histograms=k.HistogramsResource({apiHandler:t}),this.reports=k.ReportsResource({apiHandler:t}),this.subscriptions=k.SubscriptionsResource({apiHandler:t}),this.timelines=k.TimelinesResource({apiHandler:t}),this.location=k.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 Is({apiHandler:e}){return{get({expand:t=null}={}){const s={expand:t};return e.get("account",s)},update({data:t}){return e.patch("account",t)},requestPasswordReset({data:t}){return e.post("account/forgot-password",t)},changePassword({data:t}){return e.patch("account/password",t)},resendEmailVerification({data:t}){return e.post("account/resend-verification",t)},confirmPasswordReset({token:t,data:s}){return e.post(`account/reset-password/${t}`,s)},verifyEmail({token:t}){return e.post(`account/verification/${t}`)},register({data:t}){return e.post("register",t)}}}function Ss({apiHandler:e}){return{login({data:t}){return e.post("login",t)},logout(){return e.post("logout")}}}function Es({apiHandler:e}){return{get({slug:t}){return e.get(`billing-portals/${t}`)}}}function Ps({apiHandler:e}){return{get({id:t}){return e.get(`cashiers/${t}`)},cancelPayoutRequests({id:t,data:s}){return e.post(`cashiers/${t}/cancel-payout-requests`,s)}}}function xs({apiHandler:e}){return{get({id:t}){return e.get(`checkout-forms/${t}`)}}}function Cs({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)}}}function Ds({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function js({apiHandler:e}){return{create({data:t}){return e.post("deposit",t)}}}function Ms({apiHandler:e}){return{get({id:t}){return e.get(`deposit-strategies/${t}`)}}}function Os({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.patch(`invoices/${t}`,s)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function Fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("kyc-documents",r)},create({data:t}){return e.post("kyc-documents",t)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.patch(`kyc-documents/${t}`,s)}}}function Bs({apiHandler:e}){return{create({data:t}){return e.post("kyc-liveness-sessions",t)},get({id:t}){return e.get(`kyc-liveness-sessions/${t}`)},finish({id:t}){return e.post(`kyc-liveness-sessions/${t}/finish`)}}}function Ks({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`kyc-requests/${t}`,r)}}}function Ns({apiHandler:e}){return{getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s}){return e.patch(`orders/${t}`,s)},cancel({id:t,data:s}){return e.post(`orders/${t}/cancellation`,s)},pause({id:t,data:s}){return e.post(`orders/${t}/pause`,s)}}}function Ls({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payment-instruments",o)},create({data:t}){return e.post("payment-instruments",t)},get({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.get(`payment-instruments/${t}`,n)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},getSetupTransaction({id:t}){return e.get(`payment-instruments/${t}/setup`)},setup({id:t,data:s}){return e.post(`payment-instruments/${t}/setup`,s)}}}function zs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payout-requests",o)},create({data:t}){return e.post("payout-requests",t)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)}}}function Us({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("plans",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`plans/${t}`,r)}}}function Vs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},get({id:t}){return e.get(`products/${t}`)}}}function Js({apiHandler:e}){return{payment({data:t}){return e.post("payment",t)},purchase({data:t}){return e.post("purchase",t)},preview({data:t}){return e.post("preview-purchase",t)},readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function Ws({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},accept({id:t}){return e.post(`quotes/${t}/accept`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Gs({apiHandler:e}){return{readyToPayout({data:t}){return e.post("ready-to-payout",t)}}}function Ys({apiHandler:e}){return{reactivation({data:t}){return e.post("subscription-reactivations",t)}}}function Qs({apiHandler:e}){return{changeItems({id:t,data:s}){return e.post(`subscriptions/${t}/change-items`,s)},create({data:t}){return e.post("subscriptions",t)}}}function _s({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("transactions",o)},get({id:t}){return e.get(`transactions/${t}`)},getDcc({id:t}){return e.get(`transactions/${t}/dcc`)},updateDcc({id:t,data:s}){return e.patch(`transactions/${t}/dcc`,s)},finishKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/continue`)},skipKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/bypass`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)},update({id:t,data:s}){return e.patch(`transactions/${t}`,s)}}}function Xs({apiHandler:e}){return{get({id:t}){return e.get(`websites/${t}`)}}}class Zs{constructor({apiHandler:t}){this.account=Is({apiHandler:t}),this.authorization=Ss({apiHandler:t}),this.billingPortals=Es({apiHandler:t}),this.cashiers=Ps({apiHandler:t}),this.checkoutForms=xs({apiHandler:t}),this.customFields=Cs({apiHandler:t}),this.depositRequests=Ds({apiHandler:t}),this.deposit=js({apiHandler:t}),this.depositStrategies=Ms({apiHandler:t}),this.invoices=Os({apiHandler:t}),this.kycDocuments=Fs({apiHandler:t}),this.kycLivenessSessions=Bs({apiHandler:t}),this.kycRequests=Ks({apiHandler:t}),this.orders=Ns({apiHandler:t}),this.paymentInstruments=Ls({apiHandler:t}),this.payoutRequests=zs({apiHandler:t}),this.plans=Us({apiHandler:t}),this.products=Vs({apiHandler:t}),this.purchase=Js({apiHandler:t}),this.quotes=Ws({apiHandler:t}),this.readyToPayout=Gs({apiHandler:t}),this.subscriptionReactivations=Ys({apiHandler:t}),this.subscriptions=Qs({apiHandler:t}),this.transactions=_s({apiHandler:t}),this.websites=Xs({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 Hs({apiHandler:e}){return new As({apiHandler:e})}function tr({apiHandler:e}){return new Ts({apiHandler:e})}function er({apiHandler:e}){return new Zs({apiHandler:e})}const x={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,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:e,apiVersion:"",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return Hs({apiHandler:l})}function sr({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,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:e,apiVersion:"experimental",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return tr({apiHandler:l})}function rr({publishableKey:e=null,jwt:t=null,sandbox:s=!1,timeout:r=C,organizationId:n=null,urls:u=x,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:e,jwt:t,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},a=P({options:l});return a.setSessionToken(l.jwt),er({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sr,m.RebillyStorefrontAPI=rr,m.cancellation=Nt,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */var It=Tt;function L(e){return It(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var St=function(t){var s,r;return!(L(t)===!1||(s=t.constructor,typeof s!="function")||(r=s.prototype,L(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const Et=qt,Pt=B,xt=St;function E(e,t){switch(Pt(e)){case"object":return Ct(e,t);case"array":return Dt(e,t);default:return Et(e)}}function Ct(e,t){if(typeof t=="function")return t(e);if(t||xt(e)){const s=new e.constructor;for(let r in e)s[r]=E(e[r],t);return s}return e}function Dt(e,t){const s=new e.constructor(e.length);for(let r=0;r<e.length;r++)s[r]=E(e[r],t);return s}var jt=E;const Mt=ct(jt);let Ot="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ft=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Ot[Math.random()*64|0];return t};class Bt{constructor({id:t=null,created:s=null}={}){this.id=t||Ft(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Kt=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(t){return this.requests[t]}deleteById(t){this.requests[t]&&delete this.requests[t]}save(){const t=new Bt;return this.requests[t.id]=t,{id:t.id,cancelToken:t.cancelToken}}};const q=new Kt;class I{}M(I,"cancelById",(t,s)=>{try{q.getById(t).cancel(s),q.deleteById(t)}catch{}}),M(I,"cancelAll",async t=>{for(const s of q.getAll())await s.cancel(t),q.deleteById(s.id)});const Nt={cancelAll:async(...e)=>await I.cancelAll(...e)},b={request:"request",response:"response"},z=e=>{if(!Object.values(b).includes(e))throw new Error(`There is no such interceptor type as "${e}"`);return!0};function P({options:e}){const t=s();function s(){return $.create(n())}function r(){return t}function n(){return{baseURL:u(),timeout:e.requestTimeout,headers:o()}}function u(){let c=e.isSandbox?e.apiEndpoints.sandbox:e.apiEndpoints.live;return e.apiVersion&&(c=`${c}/${e.apiVersion}`),e.organizationId&&(c=`${c}/organizations/${e.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",e.appName,"js-sdk"].filter(g=>g).join("/")}@671f655`};return e.apiKey&&(i["REB-APIKEY"]=e.apiKey),i}function l(){return Mt(t.defaults.headers)}function a(c){e.requestTimeout=Number(c),t.defaults.timeout=e.requestTimeout}function p(c=e.jwt){const i=l();e.apiKey=null,e.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,t.defaults.headers=i}function v(c=e.publishableKey){const i=l();e.publishableKey=c,i.common.Authorization=`${c}`,t.defaults.headers=i}function D({host:c,port:i,auth:g}){t.defaults.proxy={host:c,port:i,auth:g}}function j({live:c=null,sandbox:i=null}){c&&(e.apiEndpoints.live=c),i&&(e.apiEndpoints.sandbox=i),t.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&t.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&t.interceptors[b[c]].eject(i)}function nr({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function ur(c){J(b.request,c)}function or({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function lr(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:hr}=q.save();f.cancelToken=hr;const X=async function(){try{const T=await c(f);return cr({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>I.cancelById(R,T),X}function cr({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function ir(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...ir(c)}}function Y(c,i={}){return d({request:g=>t.get(c,g),config:{params:i}})}function gr(c,i){return d({request:g=>t.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),d({request:R=>t.post(c,i,R),config:f})}function _(c,i,g={}){return d({request:f=>t.put(c,i,f),config:{params:g}})}function ar(c,i){return d({request:g=>t.patch(c,i,g),config:{}})}function mr(c){return d({request:i=>t.delete(c,i),config:{}})}function fr(c,i){return d({request:g=>t.delete(c,g),config:{data:{...i}}})}async function $r(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function pr(c,i){const g=G(i);try{const f=await t.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:r,addRequestInterceptor:nr,removeRequestInterceptor:ur,addResponseInterceptor:or,removeResponseInterceptor:lr,setTimeout:a,setProxyAgent:D,setSessionToken:p,setPublishableKey:v,setEndpoints:j,get:Y,getAll:gr,post:Q,put:_,patch:ar,delete:mr,deleteAll:fr,create:$r,download:pr}}function Lt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("account-registration-settings",r)},create({id:t="",data:s}){return e.create(`account-registration-settings/${t}`,t,s)},get({id:t}){return e.get(`account-registration-settings/${t}`)},update({id:t,data:s}){return e.put(`account-registration-settings/${t}`,s)},delete({id:t}){return e.delete(`account-registration-settings/${t}`)}}}function zt({apiHandler:e}){return{forgotPassword({data:t}){return e.post("forgot-password",t,{authenticate:!1})}}}function Ut({apiHandler:e}){return{getAllowlistCollection({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("allowlists",u)},storeAllowlist({data:t}){return e.post("allowlists",t)},getAllowlist({id:t}){return e.get(`allowlists/${t}`)},delete({id:t}){return e.delete(`allowlists/${t}`)}}}function Vt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("aml-checks",o)},get({id:t}){return e.get(`aml-checks/${t}`)},startReview({id:t}){return e.post(`aml-checks/${t}/start-review`)},stopReview({id:t}){return e.post(`aml-checks/${t}/stop-review`)},review({id:t,data:s}){return e.post(`aml-checks/${t}/review`,s)}}}function Jt({apiHandler:e}){return{getAmlSettings(){return e.get("aml-settings")},putAmlSettings({data:t}){return e.put("aml-settings",t)}}}function Wt({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("api-keys",u)},create({id:t="",data:s}){return e.create(`api-keys/${t}`,t,s)},get({id:t}){return e.get(`api-keys/${t}`)},update({id:t,data:s}){return e.put(`api-keys/${t}`,s)},delete({id:t}){return e.delete(`api-keys/${t}`)}}}function Gt({apiHandler:e}){return{get({applicationId:t}){return e.get(`application-instances/${t}`)},upsert({applicationId:t,data:s}){return e.put(`application-instances/${t}`,s)},delete({applicationId:t}){return e.delete(`application-instances/${t}`)},getConfiguration({applicationId:t}){return e.get(`application-instances/${t}/configuration`)},upsertConfiguration({applicationId:t,data:s}){return e.put(`application-instances/${t}/configuration`,s)}}}function Yt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("applications",a)},create({data:t}){return e.post("applications",t)},get({id:t}){return e.get(`applications/${t}`)},getInstances({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`applications/${t}/instances`,n)},getInstance({id:t,organizationId:s}){return e.get(`applications/${t}/instances/${s}`)}}}function Qt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("balance-transactions",u)},get({id:t}){return e.get(`balance-transactions/${t}`)}}}function _t({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("billing-portals",o)},create({id:t="",data:s}){return e.create(`billing-portals/${t}`,t,s)},get({id:t}){return e.get(`billing-portals/${t}`)},update({id:t,data:s}){return e.put(`billing-portals/${t}`,s)},delete({id:t}){return e.delete(`billing-portals/${t}`)}}}function Xt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("blocklists",o)},create({id:t="",data:s}){return e.create(`blocklists/${t}`,t,s)},get({id:t}){return e.get(`blocklists/${t}`)},delete({id:t}){return e.delete(`blocklists/${t}`)}}}function Zt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null}={}){const u={limit:t,offset:s,sort:r,filter:n};return e.getAll("broadcast-messages",u)},create({data:t}){return e.post("broadcast-messages",t)},get({id:t}){return e.get(`broadcast-messages/${t}`)},delete({id:t}){return e.delete(`broadcast-messages/${t}`)},update({id:t,data:s}){return e.patch(`broadcast-messages/${t}`,s)}}}function Ht({apiHandler:e}){return{create({data:t}){return e.post("cashiers",t)},get({id:t}){return e.get(`cashiers/${t}`)}}}function te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("checkout-forms",o)},create({id:t="",data:s}){return e.create(`checkout-forms/${t}`,t,s)},get({id:t}){return e.get(`checkout-forms/${t}`)},update({id:t,data:s}){return e.put(`checkout-forms/${t}`,s)},delete({id:t}){return e.delete(`checkout-forms/${t}`)}}}function ee({apiHandler:e}){return{getAllRedemptions({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons-redemptions",o)},redeem({data:t}){return e.post("coupons-redemptions",t)},getRedemption({id:t}){return e.get(`coupons-redemptions/${t}`)},cancelRedemption({id:t}){return e.post(`coupons-redemptions/${t}/cancel`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons",o)},create({id:t="",data:s}){return e.create(`coupons/${t}`,t,s)},get({id:t}){return e.get(`coupons/${t}`)},update({id:t,data:s}){return e.put(`coupons/${t}`,s)},setExpiration({id:t,data:s}){return e.post(`coupons/${t}/expiration`,s)}}}const w={Accept:"application/pdf"};function se({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("credit-memos",l)},create({id:t="",data:s}){return e.create(`credit-memos/${t}`,t,s)},get({id:t}){return e.get(`credit-memos/${t}`)},update({id:t,data:s}){return e.put(`credit-memos/${t}`,s)},patch({id:t,data:s}){return e.patch(`credit-memos/${t}`,s)},void({id:t}){return e.post(`credit-memos/${t}/void`)},refund({id:t}){return e.post(`credit-memos/${t}/refund`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`credit-memos/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`credit-memos/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`credit-memos/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`credit-memos/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`credit-memos/${t}`,s)}}}function re({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("custom-domains",o)},create({data:t}){return e.post("custom-domains",t)},get({domain:t}){return e.get(`custom-domains/${t}`)},delete({domain:t}){return e.delete(`custom-domains/${t}`)}}}function ne({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)},get({resource:t,name:s}){return e.get(`custom-fields/${t}/${s}`)},create({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)},update({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)}}}function ue({apiHandler:e}){return{getAuthOptions(){return e.get("authentication-options")},updateAuthOptions({data:t}){return e.put("authentication-options",t)},getAllAuthTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("authentication-tokens",r)},login({data:t}){return e.post("authentication-tokens",t)},verify({token:t}){return e.get(`authentication-tokens/${t}`)},logout({token:t}){return e.delete(`authentication-tokens/${t}`)},exchangeToken({token:t,data:s}){return e.post(`authentication-tokens/${t}/exchange`,s)},getAllCredentials({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("credentials",r)},createCredential({id:t="",data:s}){return e.create(`credentials/${t}`,t,s)},getCredential({id:t}){return e.get(`credentials/${t}`)},updateCredential({id:t,data:s}){return e.put(`credentials/${t}`,s)},deleteCredential({id:t}){return e.delete(`credentials/${t}`)},getAllResetPasswordTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("password-tokens",r)},createResetPasswordToken({data:t}){return e.post("password-tokens",t)},getResetPasswordToken({id:t}){return e.get(`password-tokens/${t}`)},deleteResetPasswordToken({id:t}){return e.delete(`password-tokens/${t}`)}}}function oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("customers",a)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`customers/${t}`,t,s,n)},get({id:t,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return e.get(`customers/${t}`,n)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`customers/${t}`,s,n)},merge({id:t,targetCustomerId:s}){return e.delete(`customers/${t}?targetCustomerId=${s}`)},getLeadSource({id:t}){return e.get(`customers/${t}/lead-source`)},createLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},updateLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},deleteLeadSource({id:t}){return e.delete(`customers/${t}/lead-source`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`customers/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`customers/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`customers/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`customers/${t}/timeline/${s}`)},getCustomerCreditBalance({id:t}){return e.get(`customers/${t}/credit-balance`)}}}function le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-custom-property-sets",u)},create({id:t="",data:s}){return e.create(`deposit-custom-property-sets/${t}`,t,s)},get({id:t}){return e.get(`deposit-custom-property-sets/${t}`)},update({id:t,data:s}){return e.put(`deposit-custom-property-sets/${t}`,s)},delete({id:t}){return e.delete(`deposit-custom-property-sets/${t}`)}}}function ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("deposit-requests",o)},create({data:t}){return e.post("deposit-requests",t)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-strategies",u)},create({id:t="",data:s}){return e.create(`deposit-strategies/${t}`,t,s)},get({id:t}){return e.get(`deposit-strategies/${t}`)},update({id:t,data:s}){return e.put(`deposit-strategies/${t}`,s)},delete({id:t}){return e.delete(`deposit-strategies/${t}`)}}}function ge({apiHandler:e}){return{validate({data:t}){return e.post("digital-wallets/validation",t)},create({data:t}){return e.post("digital-wallets/onboarding/apple-pay",t)}}}function ae({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("disputes",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`disputes/${t}`,t,s,n)},get({id:t}){return e.get(`disputes/${t}`)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`disputes/${t}`,s,n)}}}function me({apiHandler:e}){return{verify({token:t}){return e.put(`email-delivery-setting-verifications/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("email-delivery-settings",o)},create({data:t}){return e.post("email-delivery-settings",t)},get({id:t}){return e.get(`email-delivery-settings/${t}`)},delete({id:t}){return e.delete(`email-delivery-settings/${t}`)},update({id:t,data:s}){return e.patch(`email-delivery-settings/${t}`,s)},resendVerification({id:t}){return e.post(`email-delivery-settings/${t}/resend-email-verification`)}}}function fe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:t,offset:s,q:r,sort:n,filter:u};return e.getAll("email-messages",o)},create({data:t}){return e.post("email-messages",t)},get({id:t}){return e.get(`email-messages/${t}`)},delete({id:t}){return e.delete(`email-messages/${t}`)},send({id:t,data:s={status:"outbox"}}){return e.patch(`email-messages/${t}`,s)}}}function $e({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("email-notifications",r)}}}function pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:t,offset:s,filter:r,q:n};return e.getAll("events",u)},get({eventType:t}){return e.get(`events/${t}`)},getRules({eventType:t}){return e.get(`events/${t}/rules`)},createRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},updateRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},getAllTimelineMessages({eventType:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`events/${t}/timeline`,l)},createTimelineComment({eventType:t,data:s}){return e.post(`events/${t}/timeline`,s)},getTimelineMessage({eventType:t,messageId:s}){return e.get(`events/${t}/timeline/${s}`)},deleteTimelineMessage({eventType:t,messageId:s}){return e.delete(`events/${t}/timeline/${s}`)},getRulesHistory({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/history`,a)},getRulesVersionNumber({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/drafts`,a)},createDraftRuleset({eventType:t,data:s}){return e.post(`events/${t}/rules/drafts`,s)},getDraftRuleset({eventType:t,id:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:t,id:s,data:r}){return e.put(`events/${t}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:t,id:s}){return e.delete(`events/${t}/rules/drafts/${s}`)}}}function he({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function ye({apiHandler:e}){return{getExternalServiceSettings(){return e.get("external-services-settings")},updateExternalServiceSettings({data:t}){return e.put("external-services-settings",t)}}}function Ae({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("fees",u)},create({id:t="",data:s}){return e.create(`fees/${t}`,t,s)},get({id:t}){return e.get(`fees/${t}`)},upsert({id:t,data:s}){return e.put(`fees/${t}`,s)},delete({id:t}){return e.delete(`fees/${t}`)},patch({id:t,data:s}){return e.patch(`fees/${t}`,s)}}}function Re({apiHandler:e}){return{getAllAttachments({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("attachments",a)},attach({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`attachments/${t}`,t,s,n)},getAttachment({id:t}){return e.get(`attachments/${t}`)},updateAttachment({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`attachments/${t}`,s,n)},detach({id:t}){return e.delete(`attachments/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,fields:u,sort:o};return e.getAll("files",l)},upload({fileObject:t}){return e.post("files",t)},get({id:t}){return e.get(`files/${t}`)},update({id:t,data:s}){return e.put(`files/${t}`,s)},delete({id:t}){return e.delete(`files/${t}`)},download({id:t}){const s={responseType:"arraybuffer"};return e.download(`files/${t}/download`,s)},detachAndDelete({id:t}){const s={filter:`fileId:${t}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(v=>this.detach({id:v.fields.id}));r=[...r,a],await Promise.all(a);const p=e.delete(`files/${t}`);return r.push(p),p})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:t,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:t});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function be({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,fields:o};return e.getAll("gateway-accounts",l)},create({id:t="",data:s}){return e.create(`gateway-accounts/${t}`,t,s)},get({id:t}){return e.get(`gateway-accounts/${t}`)},upsert({id:t,data:s}){return e.put(`gateway-accounts/${t}`,s)},delete({id:t}){return e.delete(`gateway-accounts/${t}`)},update({id:t,data:s}){return e.patch(`gateway-accounts/${t}`,s)},close({id:t}){return e.post(`gateway-accounts/${t}/close`)},disable({id:t}){return e.post(`gateway-accounts/${t}/disable`)},getAllDowntimeSchedules({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,sort:u};return e.getAll(`gateway-accounts/${t}/downtime-schedules`,o)},createDowntimeSchedule({id:t,data:s}){return e.post(`gateway-accounts/${t}/downtime-schedules`,s)},getDowntimeSchedule({id:t,downtimeId:s}){return e.get(`gateway-accounts/${t}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:t,downtimeId:s,data:r}){return e.put(`gateway-accounts/${t}/downtime-schedules/${s}`,r)},deleteDowntimeSchedule({id:t,downtimeId:s}){return e.delete(`gateway-accounts/${t}/downtime-schedules/${s}`)},enable({id:t}){return e.post(`gateway-accounts/${t}/enable`)},getAllVolumeLimits({id:t}){return e.getAll(`gateway-accounts/${t}/limits`)},getVolumeLimit({id:t,limitId:s}){return e.get(`gateway-accounts/${t}/limits/${s}`)},updateVolumeLimit({id:t,limitId:s,data:r}){return e.put(`gateway-accounts/${t}/limits/${s}`,r)},deleteVolumeLimit({id:t,limitId:s}){return e.delete(`gateway-accounts/${t}/limits/${s}`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`gateway-accounts/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`gateway-accounts/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`gateway-accounts/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`gateway-accounts/${t}/timeline/${s}`)},checkCredentials({id:t}){return e.post(`gateway-accounts/${t}/check-credentials`)},getFinancialSettings({id:t}){return e.get(`gateway-accounts/${t}/financial-settings`)},setFinancialSettings({id:t,data:s}){return e.put(`gateway-accounts/${t}/financial-settings`,s)}}}function we({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("integrations",r)},get({label:t}){return e.get(`integrations/${t}`)}}}function ke({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},create({id:t="",data:s}){return e.create(`invoices/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.put(`invoices/${t}`,s)},getAllInvoiceItems({id:t,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};return e.getAll(`invoices/${t}/items`,u)},createInvoiceItem({id:t,data:s}){return e.post(`invoices/${t}/items`,s)},getInvoiceItem({id:t,itemId:s}){return e.get(`invoices/${t}/items/${s}`)},updateInvoiceItem({id:t,itemId:s,data:r}){return e.put(`invoices/${t}/items/${s}`,r)},deleteInvoiceItem({id:t,itemId:s}){return e.delete(`invoices/${t}/items/${s}`)},issue({id:t,data:s}){return e.post(`invoices/${t}/issue`,s)},abandon({id:t}){return e.post(`invoices/${t}/abandon`)},void({id:t}){return e.post(`invoices/${t}/void`)},recalculate({id:t}){return e.post(`invoices/${t}/recalculate`)},reissue({id:t,data:s}){return e.post(`invoices/${t}/reissue`,s)},getAllTransactionAllocations({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`invoices/${t}/transaction-allocations`,n)},allocateCreditBalance({id:t,data:s}){return e.post(`invoices/${t}/allocate-credit-balance`,s)},applyTransaction({id:t,data:s}){return e.post(`invoices/${t}/transaction`,s)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`invoices/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`invoices/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`invoices/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`invoices/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function ve({apiHandler:e}){return{getAllAccounts({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-accounts",u)},createAccount({id:t="",data:s}){return e.create(`journal-accounts/${t}`,t,s)},getAccount({id:t}){return e.get(`journal-accounts/${t}`)},updateAccount({id:t,data:s}){return e.put(`journal-accounts/${t}`,s)}}}function de({apiHandler:e}){return{getAllEntries({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-entries",u)},createEntry({id:t="",data:s}){return e.create(`journal-entries/${t}`,t,s)},getEntry({id:t}){return e.get(`journal-entries/${t}`)},updateEntry({id:t,data:s}){return e.put(`journal-entries/${t}`,s)}}}function qe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("journal-records",o)},create({id:t="",data:s}){return e.create(`journal-records/${t}`,t,s)},get({id:t}){return e.get(`journal-records/${t}`)},update({id:t,data:s}){return e.put(`journal-records/${t}`,s)},delete({id:t}){return e.delete(`journal-records/${t}`)}}}function Te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-documents",o)},create({id:t="",data:s}){return e.create(`kyc-documents/${t}`,t,s)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.put(`kyc-documents/${t}`,s)},accept({id:t}){return e.post(`kyc-documents/${t}/acceptance`)},matches({id:t,data:s}){return e.post(`kyc-documents/${t}/matches`,s)},reject({id:t,data:s}){return e.post(`kyc-documents/${t}/rejection`,s)},review({id:t}){return e.post(`kyc-documents/${t}/review`)},startReview({id:t}){return e.post(`kyc-documents/${t}/start-review`)},stopReview({id:t}){return e.post(`kyc-documents/${t}/stop-review`)}}}function Ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-requests",o)},create({data:t}){return e.post("kyc-requests",t)},get({id:t}){return e.get(`kyc-requests/${t}`)},delete({id:t}){return e.delete(`kyc-requests/${t}`)},update({id:t,data:s}){return e.patch(`kyc-requests/${t}`,s)}}}function Se({apiHandler:e}){return{getKycSettings(){return e.get("kyc-settings")},updateKycSettings({data:t}){return e.put("kyc-settings",t)}}}function Ee({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,fields:u,q:o};return e.getAll("lists",l)},create({id:t="",data:s}){return e.create(`lists/${t}`,t,s)},getLatestVersion({id:t}){return e.get(`lists/${t}`)},update({id:t,data:s}){return e.put(`lists/${t}`,s)},delete({id:t}){return e.delete(`lists/${t}`)},getByVersion({id:t,version:s}){return e.get(`lists/${t}/${s}`)}}}function Pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("memberships",u)},get({organizationId:t,userId:s}){return e.get(`memberships/${t}/${s}`)},update({organizationId:t,userId:s,data:r}){return e.put(`memberships/${t}/${s}`,r)},delete({organizationId:t,userId:s}){return e.delete(`memberships/${t}/${s}`)}}}function xe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-cancellations",u)},create({id:t="",data:s}){return e.create(`order-cancellations/${t}`,t,s)},get({id:t}){return e.get(`order-cancellations/${t}`)},update({id:t,data:s}){return e.put(`order-cancellations/${t}`,s)},delete({id:t}){return e.delete(`order-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`order-cancellations/${t}`,s)}}}function Ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-pauses",u)},pause({id:t="",data:s}){return e.create(`order-pauses/${t}`,t,s)},get({id:t}){return e.get(`order-pauses/${t}`)},update({id:t,data:s}){return e.put(`order-pauses/${t}`,s)},delete({id:t}){return e.delete(`order-pauses/${t}`)}}}function De({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-reactivations",u)},reactivate({data:t}){return e.post("order-reactivations",t)},get({id:t}){return e.get(`order-reactivations/${t}`)}}}function je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`orders/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`orders/${t}`,s,n)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},void({id:t}){return e.post(`orders/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`orders/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`orders/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`orders/${t}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`orders/${t}/upcoming-invoice/issue`,s)}}}function Me({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("organization-exports",o)},create({data:t}){return e.post("organization-exports",t)},get({id:t}){return e.get(`organization-exports/${t}`)}}}function Oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("organizations",o)},create({data:t}){return e.post("organizations",t)},get({id:t}){return e.get(`organizations/${t}`)},update({id:t,data:s}){return e.patch(`organizations/${t}`,s)}}}function Fe({apiHandler:e}){return{getAll({limit:t=null,q:s=null}={}){const r={limit:t,q:s};return e.getAll("payment-cards-bank-names",r)}}}function Be({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("payment-instruments",l)},create({data:t}){return e.post("payment-instruments",t)},get({id:t}){return e.get(`payment-instruments/${t}`)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},nameInquiry({id:t,data:s}){return e.post(`payment-instruments/${t}/name-inquiry`,s)}}}function Ke({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("payment-methods",r)},get({apiName:t}){return e.get(`payment-methods/${t}`)}}}function Ne({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("tokens",r)},create({data:t}){return e.post("tokens",t)},get({token:t}){return e.get(`tokens/${t}`)}}}function Le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-allocations",u)},create({data:t}){return e.post("payout-request-allocations",t)},autoAllocate({data:t}){return e.post("payout-request-allocations/auto",t)},get({id:t}){return e.get(`payout-request-allocations/${t}`)},update({id:t,data:s}){return e.patch(`payout-request-allocations/${t}`,s)},process({data:t}){return e.post("payout-request-allocations/process",t)}}}function ze({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-batches",u)},create({data:t}){return e.post("payout-request-batches",t)},get({id:t}){return e.get(`payout-request-batches/${t}`)},patch({id:t,data:s}){return e.patch(`payout-request-batches/${t}`,s)},autoAllocate({id:t}){return e.post(`payout-request-batches/${t}/auto-allocate`)},approve({id:t}){return e.post(`payout-request-batches/${t}/approve`)},block({id:t,data:s}){return e.post(`payout-request-batches/${t}/block`,s)},preview({filter:t=null}){const s={filter:t};return e.get("payout-request-batches/preview",s)}}}function Ue({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-requests",u)},create({id:t="",data:s}){return e.create(`payout-requests/${t}`,t,s)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.put(`payout-requests/${t}`,s)},patch({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)},cancel({id:t,data:s}){return e.post(`payout-requests/${t}/cancel`,s)},split({id:t,data:s}){return e.post(`payout-requests/${t}/split`,s)},getPaymentInstruments({id:t}){return e.get(`payout-requests/${t}/payment-instruments`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`payout-requests/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`payout-requests/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`payout-requests/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`payout-requests/${t}/timeline/${s}`)}}}function Ve({apiHandler:e}){return{create({data:t}){return e.post("payouts",t)}}}function Je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("plans",o)},create({id:t="",data:s}){return e.create(`plans/${t}`,t,s)},get({id:t}){return e.get(`plans/${t}`)},update({id:t,data:s}){return e.put(`plans/${t}`,s)},delete({id:t}){return e.delete(`plans/${t}`)}}}function We({apiHandler:e}){return{order({data:t}){return e.post("previews/orders",t)},sendEmailRuleAction({data:t}){return e.post("previews/rule-actions/send-email",t)},webhook({data:t}){return e.post("previews/webhooks",t)}}}function Ge({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},create({id:t="",data:s}){return e.create(`products/${t}`,t,s)},get({id:t}){return e.get(`products/${t}`)},update({id:t,data:s}){return e.put(`products/${t}`,s)},delete({id:t}){return e.delete(`products/${t}`)}}}function Ye({apiHandler:e}){return{startPermissionsEmulation({data:t}){return e.post("permissions-emulation",t)},stopPermissionsEmulation(){return e.delete("permissions-emulation")},get(){return e.get("profile")},update({data:t}){return e.put("profile",t)},getMfa(){return e.get("profile/mfa")},updateMfa(){return e.post("profile/mfa")},deleteMfa(){return e.delete("profile/mfa")},getDashboard(){return e.get("profile/dashboard")},updateDashboard({data:t}){return e.put("profile/dashboard",t)},getDashboardMetricReport({metric:t,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return e.get(`profile/dashboard/metrics/${t}`,n)}}}function Qe({apiHandler:e}){return{readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function _e({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,expand:u};return e.getAll("quotes",o)},create({id:t="",data:s}){return e.create(`quotes/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},update({id:t,data:s}){return e.put(`quotes/${t}`,s)},patch({id:t,data:s}){return e.patch(`quotes/${t}`,s)},accept({id:t}){return e.post(`quotes/${t}/accept`)},cancel({id:t}){return e.post(`quotes/${t}/cancel`)},issue({id:t}){return e.post(`quotes/${t}/issue`)},recall({id:t}){return e.post(`quotes/${t}/recall`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`quotes/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`quotes/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`quotes/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`quotes/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Xe({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function Ze({apiHandler:e}){return{getAll(){return e.get("risk-score-rules")},updateRiskScoreRules({data:t}){return e.put("risk-score-rules",t)},getAllBlocklistRules(){return e.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:t}){return e.put("risk-score-rules/blocklists",t)}}}function He({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,q:u,expand:o};return e.getAll("roles",l)},create({id:t="",data:s}){return e.create(`roles/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`roles/${t}`,r)},update({id:t,data:s}){return e.put(`roles/${t}`,s)},delete({id:t}){return e.delete(`roles/${t}`)}}}function ts({apiHandler:e}){return{get({sort:t=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:t,limit:s,offset:r,q:n};return e.get("search",u)}}}function es({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("grid-segments",o)},create({id:t="",data:s}){return e.create(`grid-segments/${t}`,t,s)},get({id:t}){return e.get(`grid-segments/${t}`)},update({id:t,data:s}){return e.put(`grid-segments/${t}`,s)},delete({id:t}){return e.delete(`grid-segments/${t}`)}}}function ss({apiHandler:e}){return{getAll({eventType:t}){return e.getAll(`send-through-attribution/${t}`)}}}function rs({apiHandler:e}){return{getAll({type:t,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return e.getAll(`service-credentials/${t}`,l)},create({type:t,data:s}){return e.post(`service-credentials/${t}`,s)},get({type:t,id:s}){return e.get(`service-credentials/${t}/${s}`)},update({type:t,id:s,data:r}){return e.patch(`service-credentials/${t}/${s}`,r)},getItems({type:t,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return e.getAll(`service-credentials/${t}/${s}/items`,p)}}}function ns({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("shipping-rates",o)},create({id:t="",data:s}){return e.create(`shipping-rates/${t}`,t,s)},get({id:t}){return e.get(`shipping-rates/${t}`)},update({id:t,data:s}){return e.put(`shipping-rates/${t}`,s)},delete({id:t}){return e.delete(`shipping-rates/${t}`)}}}function us({apiHandler:e}){return{get(){return e.get("status")}}}function os({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-cancellations",u)},create({id:t="",data:s}){return e.create(`subscription-cancellations/${t}`,t,s)},get({id:t}){return e.get(`subscription-cancellations/${t}`)},delete({id:t}){return e.delete(`subscription-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`subscription-cancellations/${t}`,s)}}}function ls({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-pauses",u)},pause({id:t="",data:s}){return e.create(`subscription-pauses/${t}`,t,s)},get({id:t}){return e.get(`subscription-pauses/${t}`)},update({id:t,data:s}){return e.put(`subscription-pauses/${t}`,s)},delete({id:t}){return e.delete(`subscription-pauses/${t}`)}}}function cs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-reactivations",u)},reactivate({data:t}){return e.post("subscription-reactivations",t)},get({id:t}){return e.get(`subscription-reactivations/${t}`)}}}function is({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("subscriptions",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`subscriptions/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`subscriptions/${t}`,s,n)},delete({id:t}){return e.delete(`subscriptions/${t}`)},void({id:t}){return e.post(`subscriptions/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`subscriptions/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`subscriptions/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/interim-invoice`,s)},getAllUpcomingInvoices({id:t,expand:s=null}){const r={expand:s};return e.getAll(`subscriptions/${t}/upcoming-invoices`,r)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:t,invoiceId:s,data:r}){return e.post(`subscriptions/${t}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`subscriptions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`subscriptions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`subscriptions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`subscriptions/${t}/timeline/${s}`)}}}function gs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("tags",o)},create({data:t}){return e.post("tags",t)},get({tag:t}){return e.get(`tags/${t}`)},delete({tag:t}){return e.delete(`tags/${t}`)},update({tag:t,data:s}){return e.patch(`tags/${t}`,s)},tagCustomers({tag:t,data:s}){return e.post(`tags/${t}/customers`,s)},untagCustomers({tag:t,data:s}){return e.delete(`tags/${t}/customers`,s)},tagCustomer({tag:t,customerId:s}){return e.post(`tags/${t}/customers/${s}`)},untagCustomer({tag:t,customerId:s}){return e.delete(`tags/${t}/customers/${s}`)},tagKycDocuments({tag:t,data:s}){return e.post(`tags/${t}/kyc-documents`,s)},untagKycDocuments({tag:t,data:s}){return e.delete(`tags/${t}/kyc-documents`,s)},tagKycDocument({tag:t,kycDocumentId:s}){return e.post(`tags/${t}/kyc-documents/${s}`)},untagKycDocument({tag:t,kycDocumentId:s}){return e.delete(`tags/${t}/kyc-documents/${s}`)},tagAmlChecks({tag:t,data:s}){return e.post(`tags/${t}/aml-checks`,s)},untagAmlChecks({tag:t,data:s}){return e.delete(`tags/${t}/aml-checks`,s)},tagAmlCheck({tag:t,amlCheckId:s}){return e.post(`tags/${t}/aml-checks/${s}`)},untagAmlCheck({tag:t,amlCheckId:s}){return e.delete(`tags/${t}/aml-checks/${s}`)}}}function as({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tags-rules",o)},create({id:t="",data:s}){return e.create(`tags-rules/${t}`,t,s)},get({id:t}){return e.get(`tags-rules/${t}`)},update({id:t,data:s}){return e.put(`tags-rules/${t}`,s)},delete({id:t}){return e.delete(`tags-rules/${t}`)}}}function ms({apiHandler:e}){return{getAllApiLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,expand:o};return e.getAll("tracking/api",l)},getApiLog({id:t}){return e.get(`tracking/api/${t}`)},getAllTaxTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/taxes",o)},getTaxTrackingLog({id:t}){return e.get(`tracking/taxes/${t}`)},getAllListsChangesHistory({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:t}){return e.get(`tracking/webhooks/${t}`)},resendWebhook({id:t}){return e.post(`tracking/webhooks/${t}/resend`)}}}function fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,sort:u,expand:o};return e.getAll("transactions",l)},create({data:t,expand:s=null}){const r={expand:s};return e.post("transactions",t,r)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`transactions/${t}`,r)},patch({id:t,data:s}){return e.patch(`transactions/${t}`,s)},query({id:t}){return e.post(`transactions/${t}/query`)},update({id:t,data:s}){return e.post(`transactions/${t}/update`,s)},refund({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`transactions/${t}/refund`,s,n)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`transactions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`transactions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`transactions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`transactions/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)}}}function $s({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("usages",o)},create({data:t}){return e.post("usages",t)},get({id:t}){return e.get(`usages/${t}`)},delete({id:t}){return e.delete(`usages/${t}`)}}}function ps({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("users",o)},create({id:t="",data:s}){return e.create(`users/${t}`,t,s)},get({id:t}){return e.get(`users/${t}`)},update({id:t,data:s}){return e.put(`users/${t}`,s)},getMfa({id:t}){return e.get(`users/${t}/mfa`)}}}function hs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null}={}){const n={limit:t,offset:s,filter:r};return e.getAll("webhooks",n)},create({id:t="",data:s}){return e.create(`webhooks/${t}`,t,s)},get({id:t}){return e.get(`webhooks/${t}`)},update({id:t,data:s}){return e.put(`webhooks/${t}`,s)},delete({id:t}){return e.delete(`webhooks/${t}`)}}}function ys({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:t,offset:s,q:r,filter:n,sort:u};return e.getAll("websites",o)},create({id:t="",data:s}){return e.create(`websites/${t}`,t,s)},get({id:t}){return e.get(`websites/${t}`)},update({id:t,data:s}){return e.put(`websites/${t}`,s)},delete({id:t}){return e.delete(`websites/${t}`)}}}class As{constructor({apiHandler:t}){this.accountRegistrationSettings=Lt({apiHandler:t}),this.account=zt({apiHandler:t}),this.allowlists=Ut({apiHandler:t}),this.amlChecks=Vt({apiHandler:t}),this.amlSettings=Jt({apiHandler:t}),this.apiKeys=Wt({apiHandler:t}),this.applicationInstances=Gt({apiHandler:t}),this.applications=Yt({apiHandler:t}),this.balanceTransactions=Qt({apiHandler:t}),this.billingPortals=_t({apiHandler:t}),this.blocklists=Xt({apiHandler:t}),this.broadcastMessages=Zt({apiHandler:t}),this.cashiers=Ht({apiHandler:t}),this.checkoutForms=te({apiHandler:t}),this.coupons=ee({apiHandler:t}),this.creditMemos=se({apiHandler:t}),this.customDomains=re({apiHandler:t}),this.customFields=ne({apiHandler:t}),this.customerAuthentication=ue({apiHandler:t}),this.customers=oe({apiHandler:t}),this.depositCustomPropertySets=le({apiHandler:t}),this.depositRequests=ce({apiHandler:t}),this.depositStrategies=ie({apiHandler:t}),this.digitalWallets=ge({apiHandler:t}),this.disputes=ae({apiHandler:t}),this.emailDeliverySettings=me({apiHandler:t}),this.emailMessages=fe({apiHandler:t}),this.emailNotifications=$e({apiHandler:t}),this.events=pe({apiHandler:t}),this.externalIdentifiers=he({apiHandler:t}),this.externalServicesSettings=ye({apiHandler:t}),this.fees=Ae({apiHandler:t}),this.files=Re({apiHandler:t}),this.gatewayAccounts=be({apiHandler:t}),this.integrations=we({apiHandler:t}),this.invoices=ke({apiHandler:t}),this.journalAccounts=ve({apiHandler:t}),this.journalEntries=de({apiHandler:t}),this.journalRecords=qe({apiHandler:t}),this.kycDocuments=Te({apiHandler:t}),this.kycRequests=Ie({apiHandler:t}),this.kycSettings=Se({apiHandler:t}),this.lists=Ee({apiHandler:t}),this.memberships=Pe({apiHandler:t}),this.orderCancellations=xe({apiHandler:t}),this.orderPauses=Ce({apiHandler:t}),this.orderReactivations=De({apiHandler:t}),this.orders=je({apiHandler:t}),this.organizationExports=Me({apiHandler:t}),this.organizations=Oe({apiHandler:t}),this.paymentCardsBankNames=Fe({apiHandler:t}),this.paymentInstruments=Be({apiHandler:t}),this.paymentMethods=Ke({apiHandler:t}),this.paymentTokens=Ne({apiHandler:t}),this.payoutRequestAllocations=Le({apiHandler:t}),this.payoutRequestBatches=ze({apiHandler:t}),this.payoutRequests=Ue({apiHandler:t}),this.payouts=Ve({apiHandler:t}),this.plans=Je({apiHandler:t}),this.previews=We({apiHandler:t}),this.products=Ge({apiHandler:t}),this.profile=Ye({apiHandler:t}),this.purchase=Qe({apiHandler:t}),this.quotes=_e({apiHandler:t}),this.resource=Xe({apiHandler:t}),this.riskScoreRules=Ze({apiHandler:t}),this.roles=He({apiHandler:t}),this.search=ts({apiHandler:t}),this.segments=es({apiHandler:t}),this.sendThroughAttribution=ss({apiHandler:t}),this.serviceCredentials=rs({apiHandler:t}),this.shippingRates=ns({apiHandler:t}),this.status=us({apiHandler:t}),this.subscriptionCancellations=os({apiHandler:t}),this.subscriptionPauses=ls({apiHandler:t}),this.subscriptionReactivations=cs({apiHandler:t}),this.subscriptions=is({apiHandler:t}),this.tags=gs({apiHandler:t}),this.tagsRules=as({apiHandler:t}),this.tracking=ms({apiHandler:t}),this.transactions=fs({apiHandler:t}),this.usages=$s({apiHandler:t}),this.users=ps({apiHandler:t}),this.webhooks=hs({apiHandler:t}),this.websites=ys({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 Rs({apiHandler:e}){return{getCustomerLifetimeSummaryMetrics({customerId:t}){return e.get(`customers/${t}/summary-metrics`)}}}function bs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:t,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return e.getAll("data-exports",a)},queue({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`data-exports/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`data-exports/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`data-exports/${t}`,s,n)},delete({id:t}){return e.delete(`data-exports/${t}`)}}}function ws({apiHandler:e}){return{getAmlCheckHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return e.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return e.get("histograms/transactions",o)}}}function ks({apiHandler:e}){return{getApiLogSummary({periodStart:t=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,filter:r,limit:n,offset:u};return e.get("reports/api-log-summary",o)},getAmlChecks({periodStart:t=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return e.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:t=null,periodEnd:s=null,filter:r=null}){const n={periodStart:t,periodEnd:s,filter:r};return e.get("reports/aml-checks-inherited-summary",n)},getCumulativeSubscriptions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:t=null,periodEnd:s=null,metrics:r=null,segments:n=null}){const u={periodStart:t,periodEnd:s,metrics:r,segments:n};return e.get("reports/dashboard",u)},getDccMarkup({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/declined-transactions",l)},getDeferredRevenue({currency:t=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:t,asOfDate:s,limit:r,offset:n,filter:u};return e.get("reports/deferred-revenue",o)},getDisputes({aggregationField:t=null,periodMonth:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:t,periodMonth:s,limit:r,offset:n,filter:u};return e.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:t,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return e.get(`reports/events-triggered/${t}/rules`,o)},getFutureRenewals({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/future-renewals",u)},getJournal({currency:t=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:t,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return e.get("reports/journal",p)},getJournalSummary({periodStart:t=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:t,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return e.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:t=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const v={aggregationField:t,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return e.get("reports/retention-percentage",v)},getRetentionValue({aggregationField:t=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:v=null,criteria:D=null}){const j={aggregationField:t,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:v,criteria:D};return e.get("reports/retention-value",j)},getRevenueWaterfall({currency:t,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:t,issuedFrom:s,issuedTo:r,recognizedTo:n};return e.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/subscription-renewal",u)},getTax({periodStart:t=null,periodEnd:s=null,accountingMethod:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,accountingMethod:r,limit:n,offset:u};return e.get("reports/tax",o)},getTimeSeriesTransaction({type:t=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:t,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return e.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/transactions",l)}}}function vs({apiHandler:e}){return{getSubscriptionSummaryMetrics({subscriptionId:t}){return e.get(`subscriptions/${t}/summary-metrics`)}}}function ds({apiHandler:e}){return{getActivityFeed({eventTypes:t=null,limit:s=1e3,offset:r=0}){const n={eventTypes:t,limit:s,offset:r};return e.getAll("activity-feed",n)},getTransaction({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`transactions/${t}/timeline`,u)},getCustomer({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`customers/${t}/timeline`,u)}}}function qs({apiHandler:e}){return{query(){return e.get("location")}}}const k={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:ds,LocationResource:qs};class Ts{constructor({apiHandler:t}){this.customers=k.CustomersResource({apiHandler:t}),this.dataExports=k.DataExportsResource({apiHandler:t}),this.histograms=k.HistogramsResource({apiHandler:t}),this.reports=k.ReportsResource({apiHandler:t}),this.subscriptions=k.SubscriptionsResource({apiHandler:t}),this.timelines=k.TimelinesResource({apiHandler:t}),this.location=k.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 Is({apiHandler:e}){return{get({expand:t=null}={}){const s={expand:t};return e.get("account",s)},update({data:t}){return e.patch("account",t)},requestPasswordReset({data:t}){return e.post("account/forgot-password",t)},changePassword({data:t}){return e.patch("account/password",t)},resendEmailVerification({data:t}){return e.post("account/resend-verification",t)},confirmPasswordReset({token:t,data:s}){return e.post(`account/reset-password/${t}`,s)},verifyEmail({token:t}){return e.post(`account/verification/${t}`)},register({data:t}){return e.post("register",t)}}}function Ss({apiHandler:e}){return{login({data:t}){return e.post("login",t)},logout(){return e.post("logout")}}}function Es({apiHandler:e}){return{get({slug:t}){return e.get(`billing-portals/${t}`)}}}function Ps({apiHandler:e}){return{get({id:t}){return e.get(`cashiers/${t}`)},cancelPayoutRequests({id:t,data:s}){return e.post(`cashiers/${t}/cancel-payout-requests`,s)}}}function xs({apiHandler:e}){return{get({id:t}){return e.get(`checkout-forms/${t}`)}}}function Cs({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)}}}function Ds({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function js({apiHandler:e}){return{create({data:t}){return e.post("deposit",t)}}}function Ms({apiHandler:e}){return{get({id:t}){return e.get(`deposit-strategies/${t}`)}}}function Os({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.patch(`invoices/${t}`,s)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function Fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("kyc-documents",r)},create({data:t}){return e.post("kyc-documents",t)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.patch(`kyc-documents/${t}`,s)}}}function Bs({apiHandler:e}){return{create({data:t}){return e.post("kyc-liveness-sessions",t)},get({id:t}){return e.get(`kyc-liveness-sessions/${t}`)},finish({id:t}){return e.post(`kyc-liveness-sessions/${t}/finish`)}}}function Ks({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`kyc-requests/${t}`,r)}}}function Ns({apiHandler:e}){return{getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s}){return e.patch(`orders/${t}`,s)},cancel({id:t,data:s}){return e.post(`orders/${t}/cancellation`,s)},pause({id:t,data:s}){return e.post(`orders/${t}/pause`,s)}}}function Ls({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payment-instruments",o)},create({data:t}){return e.post("payment-instruments",t)},get({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.get(`payment-instruments/${t}`,n)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},getSetupTransaction({id:t}){return e.get(`payment-instruments/${t}/setup`)},setup({id:t,data:s}){return e.post(`payment-instruments/${t}/setup`,s)}}}function zs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payout-requests",o)},create({data:t}){return e.post("payout-requests",t)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)}}}function Us({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("plans",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`plans/${t}`,r)}}}function Vs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},get({id:t}){return e.get(`products/${t}`)}}}function Js({apiHandler:e}){return{payment({data:t}){return e.post("payment",t)},purchase({data:t}){return e.post("purchase",t)},preview({data:t}){return e.post("preview-purchase",t)},readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function Ws({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},accept({id:t}){return e.post(`quotes/${t}/accept`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Gs({apiHandler:e}){return{readyToPayout({data:t}){return e.post("ready-to-payout",t)}}}function Ys({apiHandler:e}){return{reactivation({data:t}){return e.post("subscription-reactivations",t)}}}function Qs({apiHandler:e}){return{changeItems({id:t,data:s}){return e.post(`subscriptions/${t}/change-items`,s)},create({data:t}){return e.post("subscriptions",t)}}}function _s({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("transactions",o)},get({id:t}){return e.get(`transactions/${t}`)},getDcc({id:t}){return e.get(`transactions/${t}/dcc`)},updateDcc({id:t,data:s}){return e.patch(`transactions/${t}/dcc`,s)},finishKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/continue`)},skipKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/bypass`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)},update({id:t,data:s}){return e.patch(`transactions/${t}`,s)}}}function Xs({apiHandler:e}){return{get({id:t}){return e.get(`websites/${t}`)}}}class Zs{constructor({apiHandler:t}){this.account=Is({apiHandler:t}),this.authorization=Ss({apiHandler:t}),this.billingPortals=Es({apiHandler:t}),this.cashiers=Ps({apiHandler:t}),this.checkoutForms=xs({apiHandler:t}),this.customFields=Cs({apiHandler:t}),this.depositRequests=Ds({apiHandler:t}),this.deposit=js({apiHandler:t}),this.depositStrategies=Ms({apiHandler:t}),this.invoices=Os({apiHandler:t}),this.kycDocuments=Fs({apiHandler:t}),this.kycLivenessSessions=Bs({apiHandler:t}),this.kycRequests=Ks({apiHandler:t}),this.orders=Ns({apiHandler:t}),this.paymentInstruments=Ls({apiHandler:t}),this.payoutRequests=zs({apiHandler:t}),this.plans=Us({apiHandler:t}),this.products=Vs({apiHandler:t}),this.purchase=Js({apiHandler:t}),this.quotes=Ws({apiHandler:t}),this.readyToPayout=Gs({apiHandler:t}),this.subscriptionReactivations=Ys({apiHandler:t}),this.subscriptions=Qs({apiHandler:t}),this.transactions=_s({apiHandler:t}),this.websites=Xs({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 Hs({apiHandler:e}){return new As({apiHandler:e})}function tr({apiHandler:e}){return new Ts({apiHandler:e})}function er({apiHandler:e}){return new Zs({apiHandler:e})}const x={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,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:e,apiVersion:"",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return Hs({apiHandler:l})}function sr({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,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:e,apiVersion:"experimental",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return tr({apiHandler:l})}function rr({publishableKey:e=null,jwt:t=null,sandbox:s=!1,timeout:r=C,organizationId:n=null,urls:u=x,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:e,jwt:t,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},a=P({options:l});return a.setSessionToken(l.jwt),er({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sr,m.RebillyStorefrontAPI=rr,m.cancellation=Nt,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebilly-js-sdk",
3
- "version": "62.114.0",
3
+ "version": "62.116.0",
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",