rebilly-js-sdk 62.66.0 → 62.68.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.66.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.65.0...rebilly-js-sdk-v62.66.0) (2026-03-04)
1
+ ## [62.68.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.67.0...rebilly-js-sdk-v62.68.0) (2026-03-11)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#19278](https://github.com/Rebilly/rebilly/issues/19278)) ([8b8153c](https://github.com/Rebilly/rebilly/commit/8b8153c87f771a9f2cf3938bcef3a37ea0560744))
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#19477](https://github.com/Rebilly/rebilly/issues/19477)) ([8abe73e](https://github.com/Rebilly/rebilly/commit/8abe73e570106c22138b48fb91e5aa285271fa3f))
@@ -5509,10 +5509,9 @@ export interface corePaths {
5509
5509
  };
5510
5510
  "/payout-request-batches/preview": {
5511
5511
  /**
5512
- * Retrieves the total number of payout requests that match a specified filter or are associated with an existing batch.
5512
+ * Retrieves aggregate information for the payout requests that match a specified filter.
5513
5513
  *
5514
- * Use this operation to preview the number of payout requests that would be included in a batch before creating it,
5515
- * or to view aggregate information for an existing batch.
5514
+ * If more than 1000 payout requests match the filter, only the oldest 1000 are included in the preview.
5516
5515
  */
5517
5516
  get: operations["GetPayoutRequestBatchPreview"];
5518
5517
  };
@@ -7257,6 +7256,7 @@ export interface coreComponents {
7257
7256
  | "VCreditos"
7258
7257
  | "VegaWallet"
7259
7258
  | "VenusPoint"
7259
+ | "Viva"
7260
7260
  | "voucher"
7261
7261
  | "voucher-2"
7262
7262
  | "voucher-3"
@@ -8583,6 +8583,7 @@ export interface coreComponents {
8583
8583
  | "vegaaH"
8584
8584
  | "VCreditos"
8585
8585
  | "VegaWallet"
8586
+ | "Viva"
8586
8587
  | "Wallet88"
8587
8588
  | "Walpay"
8588
8589
  | "WesternUnion"
@@ -11304,6 +11305,7 @@ export interface coreComponents {
11304
11305
  | "USD-coin"
11305
11306
  | "VCreditos"
11306
11307
  | "VenusPoint"
11308
+ | "Viva"
11307
11309
  | "voucher"
11308
11310
  | "voucher-2"
11309
11311
  | "voucher-3"
@@ -14968,6 +14970,29 @@ export interface coreComponents {
14968
14970
  expirationTime?: string | null;
14969
14971
  _links?: coreComponents["schemas"]["SelfLink"];
14970
14972
  };
14973
+ CryptocurrencyToken: {
14974
+ /** Payment method of the token. */
14975
+ method: "cryptocurrency";
14976
+ /** Name of the crypto wallet. */
14977
+ walletName?: string | null;
14978
+ /** Address of the crypto wallet. */
14979
+ walletAddress?: string | null;
14980
+ /** Billing address object. */
14981
+ billingAddress?: coreComponents["schemas"]["ContactObject"] | null;
14982
+ /** ID of the token. */
14983
+ id?: coreComponents["schemas"]["ResourceId"];
14984
+ /** Specifies if the token is already used. */
14985
+ isUsed?: boolean;
14986
+ riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
14987
+ leadSource?: coreComponents["schemas"]["LeadSource"];
14988
+ createdTime?: coreComponents["schemas"]["CreatedTime"];
14989
+ updatedTime?: coreComponents["schemas"]["UpdatedTime"];
14990
+ /** Date and time when the token is used. */
14991
+ usageTime?: string | null;
14992
+ /** Date and time when the token expired. */
14993
+ expirationTime?: string | null;
14994
+ _links?: coreComponents["schemas"]["SelfLink"];
14995
+ };
14971
14996
  CompositeToken: Partial<coreComponents["schemas"]["PaymentCardToken"]> &
14972
14997
  Partial<coreComponents["schemas"]["PayPalToken"]> &
14973
14998
  Partial<coreComponents["schemas"]["BankAccountToken"]> &
@@ -14975,7 +15000,8 @@ export interface coreComponents {
14975
15000
  Partial<coreComponents["schemas"]["PlaidAccountToken"]> &
14976
15001
  Partial<coreComponents["schemas"]["KhelocardCardToken"]> &
14977
15002
  Partial<coreComponents["schemas"]["KlarnaToken"]> &
14978
- Partial<coreComponents["schemas"]["AlternativePaymentToken"]>;
15003
+ Partial<coreComponents["schemas"]["AlternativePaymentToken"]> &
15004
+ Partial<coreComponents["schemas"]["CryptocurrencyToken"]>;
14979
15005
  DigitalWalletValidation: {
14980
15006
  /** Type of digital wallet to validate. */
14981
15007
  type: "Apple Pay";
@@ -20788,6 +20814,20 @@ export interface coreComponents {
20788
20814
  password: string;
20789
20815
  };
20790
20816
  };
20817
+ /** Viva gateway configuration. */
20818
+ Viva: coreComponents["schemas"]["GatewayAccount"] & {
20819
+ /** Viva credentials object. */
20820
+ credentials: {
20821
+ /** ID of the Viva OAuth 2.0. */
20822
+ clientId: string;
20823
+ /** Secret of the Viva OAuth 2.0. */
20824
+ clientSecret: string;
20825
+ /** ID of the Viva basic authentication. */
20826
+ merchantId: string;
20827
+ /** API key for Viva basic authentication. */
20828
+ apiKey: string;
20829
+ };
20830
+ };
20791
20831
  /** Wallet88 gateway configuration. */
20792
20832
  Wallet88: coreComponents["schemas"]["GatewayAccount"] & {
20793
20833
  /** Wallet88 credentials object. */
@@ -21945,8 +21985,13 @@ export interface coreComponents {
21945
21985
  successCount?: number;
21946
21986
  /** Number of payout requests that failed to process. */
21947
21987
  failureCount?: number;
21948
- /** Array of payout request IDs in this batch. */
21949
- payoutRequestIds?: string[];
21988
+ /** Number of unique customers in the batch. */
21989
+ customerCount?: number;
21990
+ /** Total payout amount grouped by currency in the batch. */
21991
+ totalAmountByCurrency?: {
21992
+ currency: coreComponents["schemas"]["CurrencyCode"];
21993
+ amount: number;
21994
+ }[];
21950
21995
  /** Optional description of the batch. */
21951
21996
  description?: string | null;
21952
21997
  /** Date and time when the batch was created. */
@@ -31167,7 +31212,7 @@ export interface operations {
31167
31212
  200: {
31168
31213
  content: {
31169
31214
  "application/json": coreComponents["schemas"]["Invoice"];
31170
- "application/pdf": coreComponents["schemas"]["Invoice"];
31215
+ "application/pdf": string;
31171
31216
  };
31172
31217
  };
31173
31218
  401: coreComponents["responses"]["Unauthorized"];
@@ -33367,7 +33412,7 @@ export interface operations {
33367
33412
  200: {
33368
33413
  content: {
33369
33414
  "application/json": coreComponents["schemas"]["Quote"];
33370
- "application/pdf": coreComponents["schemas"]["Quote"];
33415
+ "application/pdf": string;
33371
33416
  };
33372
33417
  };
33373
33418
  401: coreComponents["responses"]["Unauthorized"];
@@ -40976,8 +41021,8 @@ export interface operations {
40976
41021
  *
40977
41022
  * Available filter fields: `id`, `status`, `websiteId`, `customerId`, `currency`, `amount`, `createdTime`, `updatedTime`.
40978
41023
  *
40979
- * The `batchId` filter is not supported.
40980
- * This prevents the addition of payout requests that are already included in a batch.
41024
+ * If a `batchId` filter is provided, it is ignored.
41025
+ * Payout requests that are already included in a batch are always excluded from the results.
40981
41026
  *
40982
41027
  * If more than 1000 payout requests match the filter, only the oldest 1000 are included in the batch, sorted by creation time.
40983
41028
  */
@@ -41105,10 +41150,9 @@ export interface operations {
41105
41150
  };
41106
41151
  };
41107
41152
  /**
41108
- * Retrieves the total number of payout requests that match a specified filter or are associated with an existing batch.
41153
+ * Retrieves aggregate information for the payout requests that match a specified filter.
41109
41154
  *
41110
- * Use this operation to preview the number of payout requests that would be included in a batch before creating it,
41111
- * or to view aggregate information for an existing batch.
41155
+ * If more than 1000 payout requests match the filter, only the oldest 1000 are included in the preview.
41112
41156
  */
41113
41157
  GetPayoutRequestBatchPreview: {
41114
41158
  parameters: {
@@ -41120,8 +41164,8 @@ export interface operations {
41120
41164
  * Use semicolons to separate multiple filter conditions.
41121
41165
  * Available filter fields: `id`, `status`, `websiteId`, `customerId`, `currency`, `amount`, `createdTime`, `updatedTime`.
41122
41166
  *
41123
- * The `batchId` filter is not supported.
41124
- * This prevents the addition of payout requests that are already included in a batch.
41167
+ * If a `batchId` filter is provided, it is ignored.
41168
+ * Payout requests that are already included in a batch are always excluded from the results.
41125
41169
  */
41126
41170
  filter?: string;
41127
41171
  };
@@ -41131,10 +41175,15 @@ export interface operations {
41131
41175
  200: {
41132
41176
  content: {
41133
41177
  "application/json": {
41134
- /** Filter string that adds payout requests to preview. */
41135
- filter?: string;
41136
- /** Number of matching payout requests. */
41178
+ /** Total number of matching payout requests, regardless of the preview limit. */
41137
41179
  matchingCount?: number;
41180
+ /** Number of unique customers in the matching payout requests. */
41181
+ customerCount?: number;
41182
+ /** Total amount grouped by currency for matching payout requests. */
41183
+ totalAmountByCurrency?: {
41184
+ currency: coreComponents["schemas"]["CurrencyCode"];
41185
+ amount: number;
41186
+ }[];
41138
41187
  };
41139
41188
  };
41140
41189
  };
@@ -44626,6 +44675,7 @@ export interface storefrontComponents {
44626
44675
  | "VCreditos"
44627
44676
  | "VegaWallet"
44628
44677
  | "VenusPoint"
44678
+ | "Viva"
44629
44679
  | "voucher"
44630
44680
  | "voucher-2"
44631
44681
  | "voucher-3"
@@ -45952,6 +46002,7 @@ export interface storefrontComponents {
45952
46002
  | "vegaaH"
45953
46003
  | "VCreditos"
45954
46004
  | "VegaWallet"
46005
+ | "Viva"
45955
46006
  | "Wallet88"
45956
46007
  | "Walpay"
45957
46008
  | "WesternUnion"
@@ -48673,6 +48724,7 @@ export interface storefrontComponents {
48673
48724
  | "USD-coin"
48674
48725
  | "VCreditos"
48675
48726
  | "VenusPoint"
48727
+ | "Viva"
48676
48728
  | "voucher"
48677
48729
  | "voucher-2"
48678
48730
  | "voucher-3"
@@ -52337,6 +52389,29 @@ export interface storefrontComponents {
52337
52389
  expirationTime?: string | null;
52338
52390
  _links?: storefrontComponents["schemas"]["SelfLink"];
52339
52391
  };
52392
+ CryptocurrencyToken: {
52393
+ /** Payment method of the token. */
52394
+ method: "cryptocurrency";
52395
+ /** Name of the crypto wallet. */
52396
+ walletName?: string | null;
52397
+ /** Address of the crypto wallet. */
52398
+ walletAddress?: string | null;
52399
+ /** Billing address object. */
52400
+ billingAddress?: storefrontComponents["schemas"]["ContactObject"] | null;
52401
+ /** ID of the token. */
52402
+ id?: storefrontComponents["schemas"]["ResourceId"];
52403
+ /** Specifies if the token is already used. */
52404
+ isUsed?: boolean;
52405
+ riskMetadata?: storefrontComponents["schemas"]["RiskMetadata"] | null;
52406
+ leadSource?: storefrontComponents["schemas"]["LeadSource"];
52407
+ createdTime?: storefrontComponents["schemas"]["CreatedTime"];
52408
+ updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
52409
+ /** Date and time when the token is used. */
52410
+ usageTime?: string | null;
52411
+ /** Date and time when the token expired. */
52412
+ expirationTime?: string | null;
52413
+ _links?: storefrontComponents["schemas"]["SelfLink"];
52414
+ };
52340
52415
  CompositeToken: Partial<storefrontComponents["schemas"]["PaymentCardToken"]> &
52341
52416
  Partial<storefrontComponents["schemas"]["PayPalToken"]> &
52342
52417
  Partial<storefrontComponents["schemas"]["BankAccountToken"]> &
@@ -52344,7 +52419,8 @@ export interface storefrontComponents {
52344
52419
  Partial<storefrontComponents["schemas"]["PlaidAccountToken"]> &
52345
52420
  Partial<storefrontComponents["schemas"]["KhelocardCardToken"]> &
52346
52421
  Partial<storefrontComponents["schemas"]["KlarnaToken"]> &
52347
- Partial<storefrontComponents["schemas"]["AlternativePaymentToken"]>;
52422
+ Partial<storefrontComponents["schemas"]["AlternativePaymentToken"]> &
52423
+ Partial<storefrontComponents["schemas"]["CryptocurrencyToken"]>;
52348
52424
  DigitalWalletValidation: {
52349
52425
  /** Type of digital wallet to validate. */
52350
52426
  type: "Apple Pay";
@@ -58157,6 +58233,20 @@ export interface storefrontComponents {
58157
58233
  password: string;
58158
58234
  };
58159
58235
  };
58236
+ /** Viva gateway configuration. */
58237
+ Viva: storefrontComponents["schemas"]["GatewayAccount"] & {
58238
+ /** Viva credentials object. */
58239
+ credentials: {
58240
+ /** ID of the Viva OAuth 2.0. */
58241
+ clientId: string;
58242
+ /** Secret of the Viva OAuth 2.0. */
58243
+ clientSecret: string;
58244
+ /** ID of the Viva basic authentication. */
58245
+ merchantId: string;
58246
+ /** API key for Viva basic authentication. */
58247
+ apiKey: string;
58248
+ };
58249
+ };
58160
58250
  /** Wallet88 gateway configuration. */
58161
58251
  Wallet88: storefrontComponents["schemas"]["GatewayAccount"] & {
58162
58252
  /** Wallet88 credentials object. */
@@ -59314,8 +59404,13 @@ export interface storefrontComponents {
59314
59404
  successCount?: number;
59315
59405
  /** Number of payout requests that failed to process. */
59316
59406
  failureCount?: number;
59317
- /** Array of payout request IDs in this batch. */
59318
- payoutRequestIds?: string[];
59407
+ /** Number of unique customers in the batch. */
59408
+ customerCount?: number;
59409
+ /** Total payout amount grouped by currency in the batch. */
59410
+ totalAmountByCurrency?: {
59411
+ currency: storefrontComponents["schemas"]["CurrencyCode"];
59412
+ amount: number;
59413
+ }[];
59319
59414
  /** Optional description of the batch. */
59320
59415
  description?: string | null;
59321
59416
  /** Date and time when the batch was created. */
@@ -67629,7 +67724,7 @@ export interface operations {
67629
67724
  200: {
67630
67725
  content: {
67631
67726
  "application/json": storefrontComponents["schemas"]["StorefrontQuote"];
67632
- "application/pdf": storefrontComponents["schemas"]["StorefrontQuote"];
67727
+ "application/pdf": string;
67633
67728
  };
67634
67729
  };
67635
67730
  401: storefrontComponents["responses"]["Unauthorized"];
@@ -69598,6 +69693,7 @@ export interface reportsComponents {
69598
69693
  | "VCreditos"
69599
69694
  | "VegaWallet"
69600
69695
  | "VenusPoint"
69696
+ | "Viva"
69601
69697
  | "voucher"
69602
69698
  | "voucher-2"
69603
69699
  | "voucher-3"
@@ -70924,6 +71020,7 @@ export interface reportsComponents {
70924
71020
  | "vegaaH"
70925
71021
  | "VCreditos"
70926
71022
  | "VegaWallet"
71023
+ | "Viva"
70927
71024
  | "Wallet88"
70928
71025
  | "Walpay"
70929
71026
  | "WesternUnion"
@@ -73645,6 +73742,7 @@ export interface reportsComponents {
73645
73742
  | "USD-coin"
73646
73743
  | "VCreditos"
73647
73744
  | "VenusPoint"
73745
+ | "Viva"
73648
73746
  | "voucher"
73649
73747
  | "voucher-2"
73650
73748
  | "voucher-3"
@@ -77309,6 +77407,29 @@ export interface reportsComponents {
77309
77407
  expirationTime?: string | null;
77310
77408
  _links?: reportsComponents["schemas"]["SelfLink"];
77311
77409
  };
77410
+ CryptocurrencyToken: {
77411
+ /** Payment method of the token. */
77412
+ method: "cryptocurrency";
77413
+ /** Name of the crypto wallet. */
77414
+ walletName?: string | null;
77415
+ /** Address of the crypto wallet. */
77416
+ walletAddress?: string | null;
77417
+ /** Billing address object. */
77418
+ billingAddress?: reportsComponents["schemas"]["ContactObject"] | null;
77419
+ /** ID of the token. */
77420
+ id?: reportsComponents["schemas"]["ResourceId"];
77421
+ /** Specifies if the token is already used. */
77422
+ isUsed?: boolean;
77423
+ riskMetadata?: reportsComponents["schemas"]["RiskMetadata"] | null;
77424
+ leadSource?: reportsComponents["schemas"]["LeadSource"];
77425
+ createdTime?: reportsComponents["schemas"]["CreatedTime"];
77426
+ updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
77427
+ /** Date and time when the token is used. */
77428
+ usageTime?: string | null;
77429
+ /** Date and time when the token expired. */
77430
+ expirationTime?: string | null;
77431
+ _links?: reportsComponents["schemas"]["SelfLink"];
77432
+ };
77312
77433
  CompositeToken: Partial<reportsComponents["schemas"]["PaymentCardToken"]> &
77313
77434
  Partial<reportsComponents["schemas"]["PayPalToken"]> &
77314
77435
  Partial<reportsComponents["schemas"]["BankAccountToken"]> &
@@ -77316,7 +77437,8 @@ export interface reportsComponents {
77316
77437
  Partial<reportsComponents["schemas"]["PlaidAccountToken"]> &
77317
77438
  Partial<reportsComponents["schemas"]["KhelocardCardToken"]> &
77318
77439
  Partial<reportsComponents["schemas"]["KlarnaToken"]> &
77319
- Partial<reportsComponents["schemas"]["AlternativePaymentToken"]>;
77440
+ Partial<reportsComponents["schemas"]["AlternativePaymentToken"]> &
77441
+ Partial<reportsComponents["schemas"]["CryptocurrencyToken"]>;
77320
77442
  DigitalWalletValidation: {
77321
77443
  /** Type of digital wallet to validate. */
77322
77444
  type: "Apple Pay";
@@ -83129,6 +83251,20 @@ export interface reportsComponents {
83129
83251
  password: string;
83130
83252
  };
83131
83253
  };
83254
+ /** Viva gateway configuration. */
83255
+ Viva: reportsComponents["schemas"]["GatewayAccount"] & {
83256
+ /** Viva credentials object. */
83257
+ credentials: {
83258
+ /** ID of the Viva OAuth 2.0. */
83259
+ clientId: string;
83260
+ /** Secret of the Viva OAuth 2.0. */
83261
+ clientSecret: string;
83262
+ /** ID of the Viva basic authentication. */
83263
+ merchantId: string;
83264
+ /** API key for Viva basic authentication. */
83265
+ apiKey: string;
83266
+ };
83267
+ };
83132
83268
  /** Wallet88 gateway configuration. */
83133
83269
  Wallet88: reportsComponents["schemas"]["GatewayAccount"] & {
83134
83270
  /** Wallet88 credentials object. */
@@ -84286,8 +84422,13 @@ export interface reportsComponents {
84286
84422
  successCount?: number;
84287
84423
  /** Number of payout requests that failed to process. */
84288
84424
  failureCount?: number;
84289
- /** Array of payout request IDs in this batch. */
84290
- payoutRequestIds?: string[];
84425
+ /** Number of unique customers in the batch. */
84426
+ customerCount?: number;
84427
+ /** Total payout amount grouped by currency in the batch. */
84428
+ totalAmountByCurrency?: {
84429
+ currency: reportsComponents["schemas"]["CurrencyCode"];
84430
+ amount: number;
84431
+ }[];
84291
84432
  /** Optional description of the batch. */
84292
84433
  description?: string | null;
84293
84434
  /** Date and time when the batch was created. */
@@ -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("/")}@8b8153c`
461
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((g) => g).join("/")}@8abe73e`
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 Ie=de;function L(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Se=function(e){var s,n;return!(L(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,L(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const Ee=Te,xe=B,Pe=Se;function E(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return Ee(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=E(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=E(t[n],e);return s}var De=E;const Me=ce(De);let Oe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fe=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Oe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Fe(),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 Ke=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(e){return this.requests[e]}deleteById(e){this.requests[e]&&delete this.requests[e]}save(){const e=new Be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const q=new Ke;class d{}M(d,"cancelById",(e,s)=>{try{q.getById(e).cancel(s),q.deleteById(e)}catch{}}),M(d,"cancelAll",async e=>{for(const s of q.getAll())await s.cancel(e),q.deleteById(s.id)});const Ne={cancelAll:async(...t)=>await d.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(g=>g).join("/")}@8b8153c`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function rn({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function un(c){J(b.request,c)}function on({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function ln(c){J(b.response,c)}function v({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:yn}=q.save();f.cancelToken=yn;const X=async function(){try{const T=await c(f);return cn({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>d.cancelById(R,T),X}function cn({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 gn(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{...gn(c)}}function Y(c,i={}){return v({request:g=>e.get(c,g),config:{params:i}})}function an(c,i){return v({request:g=>e.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}),v({request:R=>e.post(c,i,R),config:f})}function _(c,i,g={}){return v({request:f=>e.put(c,i,f),config:{params:g}})}function mn(c,i){return v({request:g=>e.patch(c,i,g),config:{}})}function fn(c){return v({request:i=>e.delete(c,i),config:{}})}function $n(c,i){return v({request:g=>e.delete(c,g),config:{data:{...i}}})}async function pn(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 hn(c,i){const g=G(i);try{const f=await e.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:n,addRequestInterceptor:rn,removeRequestInterceptor:un,addResponseInterceptor:on,removeResponseInterceptor:ln,setTimeout:a,setProxyAgent:j,setSessionToken:p,setPublishableKey:k,setEndpoints:D,get:Y,getAll:an,post:Q,put:_,patch:mn,delete:fn,deleteAll:$n,create:pn,download:hn}}function Le({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("api-keys",u)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:s}){return t.create(`billing-portals/${e}`,e,s)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:s}){return t.put(`billing-portals/${e}`,s)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:s}){return t.create(`checkout-forms/${e}`,e,s)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:s}){return t.put(`checkout-forms/${e}`,s)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function et({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function tt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function nt({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function rt({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:s}){return t.post(`authentication-tokens/${e}/exchange`,s)},getAllCredentials({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("credentials",n)},createCredential({id:e="",data:s}){return t.create(`credentials/${e}`,e,s)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:s}){return t.put(`credentials/${e}`,s)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}function ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},updateLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function it({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function at({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},updateRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},getAllTimelineMessages({eventType:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:s}){return t.post(`events/${e}/timeline`,s)},getTimelineMessage({eventType:e,messageId:s}){return t.get(`events/${e}/timeline/${s}`)},deleteTimelineMessage({eventType:e,messageId:s}){return t.delete(`events/${e}/timeline/${s}`)},getRulesHistory({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function pt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function ht({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function At({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:s}){return t.put(`files/${e}`,s)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const s={responseType:"arraybuffer"};return t.download(`files/${e}/download`,s)},detachAndDelete({id:e}){const s={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const p=t.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:s}){return t.create(`gateway-accounts/${e}`,e,s)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:s}){return t.post(`gateway-accounts/${e}/downtime-schedules`,s)},getDowntimeSchedule({id:e,downtimeId:s}){return t.get(`gateway-accounts/${e}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:e,downtimeId:s,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},deleteDowntimeSchedule({id:e,downtimeId:s}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${s}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:s}){return t.get(`gateway-accounts/${e}/limits/${s}`)},updateVolumeLimit({id:e,limitId:s,data:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:s}){return t.create(`invoices/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:s}){return t.post(`invoices/${e}/items`,s)},getInvoiceItem({id:e,itemId:s}){return t.get(`invoices/${e}/items/${s}`)},updateInvoiceItem({id:e,itemId:s,data:n}){return t.put(`invoices/${e}/items/${s}`,n)},deleteInvoiceItem({id:e,itemId:s}){return t.delete(`invoices/${e}/items/${s}`)},issue({id:e,data:s}){return t.post(`invoices/${e}/issue`,s)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:s}){return t.post(`invoices/${e}/reissue`,s)},getAllTransactionAllocations({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`invoices/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`invoices/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`invoices/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function kt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function vt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("journal-records",o)},create({id:e="",data:s}){return t.create(`journal-records/${e}`,e,s)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:s}){return t.put(`journal-records/${e}`,s)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:s}){return t.create(`kyc-documents/${e}`,e,s)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.put(`kyc-documents/${e}`,s)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:s}){return t.post(`kyc-documents/${e}/matches`,s)},reject({id:e,data:s}){return t.post(`kyc-documents/${e}/rejection`,s)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-requests",o)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function It({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function Pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("orders",o)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`orders/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`orders/${e}`,s,r)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`orders/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`orders/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function Ot({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function Bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function Kt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},autoAllocate({data:e}){return t.post("payout-request-allocations/auto",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function Lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-request-batches",u)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},autoAllocate({id:e}){return t.post(`payout-request-batches/${e}/auto-allocate`)},approve({id:e}){return t.post(`payout-request-batches/${e}/approve`)},block({id:e,data:s}){return t.post(`payout-request-batches/${e}/block`,s)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},split({id:e,data:s}){return t.post(`payout-requests/${e}/split`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`payout-requests/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`payout-requests/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`payout-requests/${e}/timeline/${s}`)}}}function Ut({apiHandler:t}){return{getV2({id:e}){return t.get(`payout-requests-v2/${e}`)},getPaymentInstrumentsV2({id:e}){return t.get(`payout-requests-v2/${e}/payment-instruments`)}}}function Vt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Wt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Yt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Qt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function _t({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Xt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Zt({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:s}){return t.create(`roles/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function es({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function ts({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:s}){return t.create(`grid-segments/${e}`,e,s)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:s}){return t.put(`grid-segments/${e}`,s)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function ss({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function ns({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:s}){return t.post(`service-credentials/${e}`,s)},get({type:e,id:s}){return t.get(`service-credentials/${e}/${s}`)},update({type:e,id:s,data:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,p)}}}function rs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:s}){return t.create(`shipping-rates/${e}`,e,s)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:s}){return t.put(`shipping-rates/${e}`,s)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function us({apiHandler:t}){return{get(){return t.get("status")}}}function os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-cancellations",u)},create({id:e="",data:s}){return t.create(`subscription-cancellations/${e}`,e,s)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`subscription-cancellations/${e}`,s)}}}function ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-pauses",u)},pause({id:e="",data:s}){return t.create(`subscription-pauses/${e}`,e,s)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:s}){return t.put(`subscription-pauses/${e}`,s)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function is({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`subscriptions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`subscriptions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`subscriptions/${e}/timeline/${s}`)}}}function gs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:s}){return t.patch(`tags/${e}`,s)},tagCustomers({tag:e,data:s}){return t.post(`tags/${e}/customers`,s)},untagCustomers({tag:e,data:s}){return t.delete(`tags/${e}/customers`,s)},tagCustomer({tag:e,customerId:s}){return t.post(`tags/${e}/customers/${s}`)},untagCustomer({tag:e,customerId:s}){return t.delete(`tags/${e}/customers/${s}`)},tagKycDocuments({tag:e,data:s}){return t.post(`tags/${e}/kyc-documents`,s)},untagKycDocuments({tag:e,data:s}){return t.delete(`tags/${e}/kyc-documents`,s)},tagKycDocument({tag:e,kycDocumentId:s}){return t.post(`tags/${e}/kyc-documents/${s}`)},untagKycDocument({tag:e,kycDocumentId:s}){return t.delete(`tags/${e}/kyc-documents/${s}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function as({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tags-rules",o)},create({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function ms({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function fs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`transactions/${e}/refund`,s,r)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function $s({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("usages",o)},create({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ps({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function hs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function ys({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,sort:u};return t.getAll("websites",o)},create({id:e="",data:s}){return t.create(`websites/${e}`,e,s)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:s}){return t.put(`websites/${e}`,s)},delete({id:e}){return t.delete(`websites/${e}`)}}}class As{constructor({apiHandler:e}){this.account=Le({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashiers=Ze({apiHandler:e}),this.checkoutForms=He({apiHandler:e}),this.coupons=et({apiHandler:e}),this.creditMemos=tt({apiHandler:e}),this.customDomains=st({apiHandler:e}),this.customFields=nt({apiHandler:e}),this.customerAuthentication=rt({apiHandler:e}),this.customers=ut({apiHandler:e}),this.depositCustomPropertySets=ot({apiHandler:e}),this.depositRequests=lt({apiHandler:e}),this.depositStrategies=ct({apiHandler:e}),this.digitalWallets=it({apiHandler:e}),this.disputes=gt({apiHandler:e}),this.emailDeliverySettings=at({apiHandler:e}),this.emailMessages=mt({apiHandler:e}),this.emailNotifications=ft({apiHandler:e}),this.events=$t({apiHandler:e}),this.externalIdentifiers=pt({apiHandler:e}),this.externalServicesSettings=ht({apiHandler:e}),this.fees=yt({apiHandler:e}),this.files=At({apiHandler:e}),this.gatewayAccounts=Rt({apiHandler:e}),this.integrations=bt({apiHandler:e}),this.invoices=wt({apiHandler:e}),this.journalAccounts=kt({apiHandler:e}),this.journalEntries=vt({apiHandler:e}),this.journalRecords=qt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=dt({apiHandler:e}),this.kycSettings=It({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.orderCancellations=xt({apiHandler:e}),this.orderPauses=Pt({apiHandler:e}),this.orderReactivations=Ct({apiHandler:e}),this.orders=jt({apiHandler:e}),this.organizationExports=Dt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Ft({apiHandler:e}),this.paymentMethods=Bt({apiHandler:e}),this.paymentTokens=Kt({apiHandler:e}),this.payoutRequestAllocations=Nt({apiHandler:e}),this.payoutRequestBatches=Lt({apiHandler:e}),this.payoutRequests=zt({apiHandler:e}),this.payoutRequestsV2=Ut({apiHandler:e}),this.payouts=Vt({apiHandler:e}),this.plans=Jt({apiHandler:e}),this.previews=Wt({apiHandler:e}),this.products=Gt({apiHandler:e}),this.profile=Yt({apiHandler:e}),this.purchase=Qt({apiHandler:e}),this.quotes=_t({apiHandler:e}),this.resource=Xt({apiHandler:e}),this.riskScoreRules=Zt({apiHandler:e}),this.roles=Ht({apiHandler:e}),this.search=es({apiHandler:e}),this.segments=ts({apiHandler:e}),this.sendThroughAttribution=ss({apiHandler:e}),this.serviceCredentials=ns({apiHandler:e}),this.shippingRates=rs({apiHandler:e}),this.status=us({apiHandler:e}),this.subscriptionCancellations=os({apiHandler:e}),this.subscriptionPauses=ls({apiHandler:e}),this.subscriptionReactivations=cs({apiHandler:e}),this.subscriptions=is({apiHandler:e}),this.tags=gs({apiHandler:e}),this.tagsRules=as({apiHandler:e}),this.tracking=ms({apiHandler:e}),this.transactions=fs({apiHandler:e}),this.usages=$s({apiHandler:e}),this.users=ps({apiHandler:e}),this.webhooks=hs({apiHandler:e}),this.websites=ys({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Rs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function bs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function ws({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function ks({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:n,limit:r,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:s=null,metric:n=null,includePropagatedResults:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,metric:n,includePropagatedResults:r,filter:u};return t.get("reports/aml-checks",o)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:s=null,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:n,offset:r,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",p)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:n=null,aggregationField:r=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:n,aggregationField:r,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:n=null,periodStart:r=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:n=null,includeDisputes:r=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:n=null,recognizedTo:r=null}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:s=null,accountingMethod:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:s=null,periodStart:n=null,periodEnd:r=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function vs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function qs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function Ts({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:qs,LocationResource:Ts};class ds{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function Is({apiHandler:t}){return{get({expand:e=null}={}){const s={expand:e};return t.get("account",s)},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:s}){return t.post(`account/reset-password/${e}`,s)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Ss({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Es({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function xs({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function Ps({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Cs({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function js({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function Ds({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ms({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Os({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Fs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function Bs({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function Ks({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Ns({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s}){return t.patch(`orders/${e}`,s)},cancel({id:e,data:s}){return t.post(`orders/${e}/cancellation`,s)},pause({id:e,data:s}){return t.post(`orders/${e}/pause`,s)}}}function Ls({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function zs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Vs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Js({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ws({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Gs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ys({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Qs({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function _s({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:s}){return t.patch(`transactions/${e}/dcc`,s)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Xs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Zs{constructor({apiHandler:e}){this.account=Is({apiHandler:e}),this.authorization=Ss({apiHandler:e}),this.billingPortals=Es({apiHandler:e}),this.cashiers=xs({apiHandler:e}),this.checkoutForms=Ps({apiHandler:e}),this.customFields=Cs({apiHandler:e}),this.depositRequests=js({apiHandler:e}),this.deposit=Ds({apiHandler:e}),this.depositStrategies=Ms({apiHandler:e}),this.invoices=Os({apiHandler:e}),this.kycDocuments=Fs({apiHandler:e}),this.kycLivenessSessions=Bs({apiHandler:e}),this.kycRequests=Ks({apiHandler:e}),this.orders=Ns({apiHandler:e}),this.paymentInstruments=Ls({apiHandler:e}),this.payoutRequests=zs({apiHandler:e}),this.plans=Us({apiHandler:e}),this.products=Vs({apiHandler:e}),this.purchase=Js({apiHandler:e}),this.quotes=Ws({apiHandler:e}),this.readyToPayout=Gs({apiHandler:e}),this.subscriptionReactivations=Ys({apiHandler:e}),this.subscriptions=Qs({apiHandler:e}),this.transactions=_s({apiHandler:e}),this.websites=Xs({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Hs({apiHandler:t}){return new As({apiHandler:t})}function en({apiHandler:t}){return new ds({apiHandler:t})}function tn({apiHandler:t}){return new Zs({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Hs({apiHandler:l})}function sn({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return en({apiHandler:l})}function nn({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:n,organizationId:r,appName:(o==null?void 0:o.appName)??null},a=x({options:l});return a.setSessionToken(l.jwt),tn({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sn,m.RebillyStorefrontAPI=nn,m.cancellation=Ne,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */var Ie=de;function L(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Se=function(e){var s,n;return!(L(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,L(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const Ee=Te,xe=B,Pe=Se;function E(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return Ee(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=E(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=E(t[n],e);return s}var De=E;const Me=ce(De);let Oe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fe=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Oe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Fe(),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 Ke=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(e){return this.requests[e]}deleteById(e){this.requests[e]&&delete this.requests[e]}save(){const e=new Be;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const q=new Ke;class d{}M(d,"cancelById",(e,s)=>{try{q.getById(e).cancel(s),q.deleteById(e)}catch{}}),M(d,"cancelAll",async e=>{for(const s of q.getAll())await s.cancel(e),q.deleteById(s.id)});const Ne={cancelAll:async(...t)=>await d.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(g=>g).join("/")}@8abe73e`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function p(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function rn({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function un(c){J(b.request,c)}function on({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function ln(c){J(b.response,c)}function v({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:yn}=q.save();f.cancelToken=yn;const X=async function(){try{const T=await c(f);return cn({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>d.cancelById(R,T),X}function cn({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 gn(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{...gn(c)}}function Y(c,i={}){return v({request:g=>e.get(c,g),config:{params:i}})}function an(c,i){return v({request:g=>e.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}),v({request:R=>e.post(c,i,R),config:f})}function _(c,i,g={}){return v({request:f=>e.put(c,i,f),config:{params:g}})}function mn(c,i){return v({request:g=>e.patch(c,i,g),config:{}})}function fn(c){return v({request:i=>e.delete(c,i),config:{}})}function $n(c,i){return v({request:g=>e.delete(c,g),config:{data:{...i}}})}async function pn(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 hn(c,i){const g=G(i);try{const f=await e.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:n,addRequestInterceptor:rn,removeRequestInterceptor:un,addResponseInterceptor:on,removeResponseInterceptor:ln,setTimeout:a,setProxyAgent:j,setSessionToken:p,setPublishableKey:k,setEndpoints:D,get:Y,getAll:an,post:Q,put:_,patch:mn,delete:fn,deleteAll:$n,create:pn,download:hn}}function Le({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("api-keys",u)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:s}){return t.create(`billing-portals/${e}`,e,s)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:s}){return t.put(`billing-portals/${e}`,s)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:s}){return t.create(`checkout-forms/${e}`,e,s)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:s}){return t.put(`checkout-forms/${e}`,s)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function et({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function tt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function nt({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function rt({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:s}){return t.post(`authentication-tokens/${e}/exchange`,s)},getAllCredentials({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("credentials",n)},createCredential({id:e="",data:s}){return t.create(`credentials/${e}`,e,s)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:s}){return t.put(`credentials/${e}`,s)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}function ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},updateLeadSource({id:e,data:s}){return t.put(`customers/${e}/lead-source`,s)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function it({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function at({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},updateRules({eventType:e,data:s}){return t.put(`events/${e}/rules`,s)},getAllTimelineMessages({eventType:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:s}){return t.post(`events/${e}/timeline`,s)},getTimelineMessage({eventType:e,messageId:s}){return t.get(`events/${e}/timeline/${s}`)},deleteTimelineMessage({eventType:e,messageId:s}){return t.delete(`events/${e}/timeline/${s}`)},getRulesHistory({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function pt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function ht({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function At({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:s}){return t.put(`files/${e}`,s)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const s={responseType:"arraybuffer"};return t.download(`files/${e}/download`,s)},detachAndDelete({id:e}){const s={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const p=t.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:s}){return t.create(`gateway-accounts/${e}`,e,s)},get({id:e}){return t.get(`gateway-accounts/${e}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:s}){return t.post(`gateway-accounts/${e}/downtime-schedules`,s)},getDowntimeSchedule({id:e,downtimeId:s}){return t.get(`gateway-accounts/${e}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:e,downtimeId:s,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},deleteDowntimeSchedule({id:e,downtimeId:s}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${s}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:s}){return t.get(`gateway-accounts/${e}/limits/${s}`)},updateVolumeLimit({id:e,limitId:s,data:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:s}){return t.create(`invoices/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:s}){return t.post(`invoices/${e}/items`,s)},getInvoiceItem({id:e,itemId:s}){return t.get(`invoices/${e}/items/${s}`)},updateInvoiceItem({id:e,itemId:s,data:n}){return t.put(`invoices/${e}/items/${s}`,n)},deleteInvoiceItem({id:e,itemId:s}){return t.delete(`invoices/${e}/items/${s}`)},issue({id:e,data:s}){return t.post(`invoices/${e}/issue`,s)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:s}){return t.post(`invoices/${e}/reissue`,s)},getAllTransactionAllocations({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`invoices/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`invoices/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`invoices/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function kt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function vt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("journal-records",o)},create({id:e="",data:s}){return t.create(`journal-records/${e}`,e,s)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:s}){return t.put(`journal-records/${e}`,s)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-documents",o)},create({id:e="",data:s}){return t.create(`kyc-documents/${e}`,e,s)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.put(`kyc-documents/${e}`,s)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:s}){return t.post(`kyc-documents/${e}/matches`,s)},reject({id:e,data:s}){return t.post(`kyc-documents/${e}/rejection`,s)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("kyc-requests",o)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function It({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function Pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("orders",o)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`orders/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`orders/${e}`,s,r)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`orders/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`orders/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function Ot({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function Bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function Kt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},autoAllocate({data:e}){return t.post("payout-request-allocations/auto",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function Lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-request-batches",u)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},autoAllocate({id:e}){return t.post(`payout-request-batches/${e}/auto-allocate`)},approve({id:e}){return t.post(`payout-request-batches/${e}/approve`)},block({id:e,data:s}){return t.post(`payout-request-batches/${e}/block`,s)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},split({id:e,data:s}){return t.post(`payout-requests/${e}/split`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`payout-requests/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`payout-requests/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`payout-requests/${e}/timeline/${s}`)}}}function Ut({apiHandler:t}){return{getV2({id:e}){return t.get(`payout-requests-v2/${e}`)},getPaymentInstrumentsV2({id:e}){return t.get(`payout-requests-v2/${e}/payment-instruments`)}}}function Vt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Wt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Yt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Qt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function _t({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Xt({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Zt({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:s}){return t.create(`roles/${e}`,e,s)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function es({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function ts({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:s}){return t.create(`grid-segments/${e}`,e,s)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:s}){return t.put(`grid-segments/${e}`,s)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function ss({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function ns({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,sort:u,q:o};return t.getAll(`service-credentials/${e}`,l)},create({type:e,data:s}){return t.post(`service-credentials/${e}`,s)},get({type:e,id:s}){return t.get(`service-credentials/${e}/${s}`)},update({type:e,id:s,data:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,p)}}}function rs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:s}){return t.create(`shipping-rates/${e}`,e,s)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:s}){return t.put(`shipping-rates/${e}`,s)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function us({apiHandler:t}){return{get(){return t.get("status")}}}function os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-cancellations",u)},create({id:e="",data:s}){return t.create(`subscription-cancellations/${e}`,e,s)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`subscription-cancellations/${e}`,s)}}}function ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-pauses",u)},pause({id:e="",data:s}){return t.create(`subscription-pauses/${e}`,e,s)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:s}){return t.put(`subscription-pauses/${e}`,s)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function is({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`subscriptions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`subscriptions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`subscriptions/${e}/timeline/${s}`)}}}function gs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:s}){return t.patch(`tags/${e}`,s)},tagCustomers({tag:e,data:s}){return t.post(`tags/${e}/customers`,s)},untagCustomers({tag:e,data:s}){return t.delete(`tags/${e}/customers`,s)},tagCustomer({tag:e,customerId:s}){return t.post(`tags/${e}/customers/${s}`)},untagCustomer({tag:e,customerId:s}){return t.delete(`tags/${e}/customers/${s}`)},tagKycDocuments({tag:e,data:s}){return t.post(`tags/${e}/kyc-documents`,s)},untagKycDocuments({tag:e,data:s}){return t.delete(`tags/${e}/kyc-documents`,s)},tagKycDocument({tag:e,kycDocumentId:s}){return t.post(`tags/${e}/kyc-documents/${s}`)},untagKycDocument({tag:e,kycDocumentId:s}){return t.delete(`tags/${e}/kyc-documents/${s}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function as({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tags-rules",o)},create({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function ms({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/taxes",o)},getTaxTrackingLog({id:e}){return t.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function fs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`transactions/${e}/refund`,s,r)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function $s({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("usages",o)},create({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ps({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function hs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function ys({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,sort:u};return t.getAll("websites",o)},create({id:e="",data:s}){return t.create(`websites/${e}`,e,s)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:s}){return t.put(`websites/${e}`,s)},delete({id:e}){return t.delete(`websites/${e}`)}}}class As{constructor({apiHandler:e}){this.account=Le({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashiers=Ze({apiHandler:e}),this.checkoutForms=He({apiHandler:e}),this.coupons=et({apiHandler:e}),this.creditMemos=tt({apiHandler:e}),this.customDomains=st({apiHandler:e}),this.customFields=nt({apiHandler:e}),this.customerAuthentication=rt({apiHandler:e}),this.customers=ut({apiHandler:e}),this.depositCustomPropertySets=ot({apiHandler:e}),this.depositRequests=lt({apiHandler:e}),this.depositStrategies=ct({apiHandler:e}),this.digitalWallets=it({apiHandler:e}),this.disputes=gt({apiHandler:e}),this.emailDeliverySettings=at({apiHandler:e}),this.emailMessages=mt({apiHandler:e}),this.emailNotifications=ft({apiHandler:e}),this.events=$t({apiHandler:e}),this.externalIdentifiers=pt({apiHandler:e}),this.externalServicesSettings=ht({apiHandler:e}),this.fees=yt({apiHandler:e}),this.files=At({apiHandler:e}),this.gatewayAccounts=Rt({apiHandler:e}),this.integrations=bt({apiHandler:e}),this.invoices=wt({apiHandler:e}),this.journalAccounts=kt({apiHandler:e}),this.journalEntries=vt({apiHandler:e}),this.journalRecords=qt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=dt({apiHandler:e}),this.kycSettings=It({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.orderCancellations=xt({apiHandler:e}),this.orderPauses=Pt({apiHandler:e}),this.orderReactivations=Ct({apiHandler:e}),this.orders=jt({apiHandler:e}),this.organizationExports=Dt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Ft({apiHandler:e}),this.paymentMethods=Bt({apiHandler:e}),this.paymentTokens=Kt({apiHandler:e}),this.payoutRequestAllocations=Nt({apiHandler:e}),this.payoutRequestBatches=Lt({apiHandler:e}),this.payoutRequests=zt({apiHandler:e}),this.payoutRequestsV2=Ut({apiHandler:e}),this.payouts=Vt({apiHandler:e}),this.plans=Jt({apiHandler:e}),this.previews=Wt({apiHandler:e}),this.products=Gt({apiHandler:e}),this.profile=Yt({apiHandler:e}),this.purchase=Qt({apiHandler:e}),this.quotes=_t({apiHandler:e}),this.resource=Xt({apiHandler:e}),this.riskScoreRules=Zt({apiHandler:e}),this.roles=Ht({apiHandler:e}),this.search=es({apiHandler:e}),this.segments=ts({apiHandler:e}),this.sendThroughAttribution=ss({apiHandler:e}),this.serviceCredentials=ns({apiHandler:e}),this.shippingRates=rs({apiHandler:e}),this.status=us({apiHandler:e}),this.subscriptionCancellations=os({apiHandler:e}),this.subscriptionPauses=ls({apiHandler:e}),this.subscriptionReactivations=cs({apiHandler:e}),this.subscriptions=is({apiHandler:e}),this.tags=gs({apiHandler:e}),this.tagsRules=as({apiHandler:e}),this.tracking=ms({apiHandler:e}),this.transactions=fs({apiHandler:e}),this.usages=$s({apiHandler:e}),this.users=ps({apiHandler:e}),this.webhooks=hs({apiHandler:e}),this.websites=ys({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Rs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function bs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function ws({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function ks({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:n,limit:r,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:s=null,metric:n=null,includePropagatedResults:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,metric:n,includePropagatedResults:r,filter:u};return t.get("reports/aml-checks",o)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:s=null,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:n,offset:r,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",p)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:n=null,aggregationField:r=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:n,aggregationField:r,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:n=null,periodStart:r=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:n=null,includeDisputes:r=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:n=null,recognizedTo:r=null}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:s=null,accountingMethod:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:s=null,periodStart:n=null,periodEnd:r=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function vs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function qs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function Ts({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:qs,LocationResource:Ts};class ds{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function Is({apiHandler:t}){return{get({expand:e=null}={}){const s={expand:e};return t.get("account",s)},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:s}){return t.post(`account/reset-password/${e}`,s)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Ss({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Es({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function xs({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function Ps({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Cs({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function js({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function Ds({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ms({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Os({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Fs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function Bs({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function Ks({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Ns({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s}){return t.patch(`orders/${e}`,s)},cancel({id:e,data:s}){return t.post(`orders/${e}/cancellation`,s)},pause({id:e,data:s}){return t.post(`orders/${e}/pause`,s)}}}function Ls({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function zs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Vs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Js({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ws({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Gs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ys({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Qs({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function _s({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:s}){return t.patch(`transactions/${e}/dcc`,s)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Xs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Zs{constructor({apiHandler:e}){this.account=Is({apiHandler:e}),this.authorization=Ss({apiHandler:e}),this.billingPortals=Es({apiHandler:e}),this.cashiers=xs({apiHandler:e}),this.checkoutForms=Ps({apiHandler:e}),this.customFields=Cs({apiHandler:e}),this.depositRequests=js({apiHandler:e}),this.deposit=Ds({apiHandler:e}),this.depositStrategies=Ms({apiHandler:e}),this.invoices=Os({apiHandler:e}),this.kycDocuments=Fs({apiHandler:e}),this.kycLivenessSessions=Bs({apiHandler:e}),this.kycRequests=Ks({apiHandler:e}),this.orders=Ns({apiHandler:e}),this.paymentInstruments=Ls({apiHandler:e}),this.payoutRequests=zs({apiHandler:e}),this.plans=Us({apiHandler:e}),this.products=Vs({apiHandler:e}),this.purchase=Js({apiHandler:e}),this.quotes=Ws({apiHandler:e}),this.readyToPayout=Gs({apiHandler:e}),this.subscriptionReactivations=Ys({apiHandler:e}),this.subscriptions=Qs({apiHandler:e}),this.transactions=_s({apiHandler:e}),this.websites=Xs({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Hs({apiHandler:t}){return new As({apiHandler:t})}function en({apiHandler:t}){return new ds({apiHandler:t})}function tn({apiHandler:t}){return new Zs({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Hs({apiHandler:l})}function sn({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return en({apiHandler:l})}function nn({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:n,organizationId:r,appName:(o==null?void 0:o.appName)??null},a=x({options:l});return a.setSessionToken(l.jwt),tn({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sn,m.RebillyStorefrontAPI=nn,m.cancellation=Ne,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.66.0",
3
+ "version": "62.68.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",