rebilly-js-sdk 51.1.0 → 51.2.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 +14 -0
- package/dist/rebilly-js-sdk.d.ts +208 -177
- package/dist/rebilly-js-sdk.es.js +1 -1
- package/dist/rebilly-js-sdk.umd.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [51.2.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v51.1.1...rebilly-js-sdk-v51.2.0) (2023-08-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **storefront-payment-form:** TypeScript migration ([#609](https://github.com/Rebilly/rebilly/issues/609)) ([5327323](https://github.com/Rebilly/rebilly/commit/5327323f8bf57779f019c163fccf52104d3da5fd))
|
|
7
|
+
|
|
8
|
+
## [51.1.1](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v51.1.0...rebilly-js-sdk-v51.1.1) (2023-08-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **revel:** replace npm-run-all with concurrently ([#850](https://github.com/Rebilly/rebilly/issues/850)) ([dea3d8e](https://github.com/Rebilly/rebilly/commit/dea3d8e71974162aba56fe9f4bff4072ed94bdf9))
|
|
14
|
+
|
|
1
15
|
## [51.1.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v51.0.0...rebilly-js-sdk-v51.1.0) (2023-08-08)
|
|
2
16
|
|
|
3
17
|
|
package/dist/rebilly-js-sdk.d.ts
CHANGED
|
@@ -4381,46 +4381,51 @@ export interface coreComponents {
|
|
|
4381
4381
|
expiredTime?: string | null;
|
|
4382
4382
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
4383
4383
|
};
|
|
4384
|
-
|
|
4384
|
+
AuthenticationTokenPasswordMode: {
|
|
4385
|
+
/** Username associated with the authentication token. */
|
|
4386
|
+
username: string;
|
|
4387
|
+
/** Password associated with the authentication token. */
|
|
4388
|
+
password: string;
|
|
4385
4389
|
/**
|
|
4386
4390
|
* Specifies the authentication verification method.
|
|
4387
4391
|
* The `password` token requires the user to enter a password to log in.
|
|
4388
4392
|
* The `passwordless` token, requires a secret API key to log in.
|
|
4389
4393
|
* To obtain an API key, see [Manage API keys](https://www.rebilly.com/docs/dev-docs/api-keys/#manage-api-keys).
|
|
4390
4394
|
*/
|
|
4391
|
-
mode
|
|
4395
|
+
mode?: "password";
|
|
4396
|
+
customerId?: coreComponents["schemas"]["CustomerId"];
|
|
4397
|
+
/** ID of the authentication token. */
|
|
4398
|
+
token?: string;
|
|
4399
|
+
/** Specifies if a One-Time Password (OTP) is required to exchange the authentication token. */
|
|
4400
|
+
otpRequired?: boolean;
|
|
4401
|
+
/** ID of the user associated with the authentication token. */
|
|
4402
|
+
credentialId?: coreComponents["schemas"]["ResourceId"];
|
|
4403
|
+
/** Date and time when the token expired. */
|
|
4404
|
+
expiredTime?: string;
|
|
4405
|
+
_links?: coreComponents["schemas"]["SelfLink"];
|
|
4392
4406
|
};
|
|
4393
|
-
|
|
4407
|
+
AuthenticationTokenPasswordlessMode: {
|
|
4408
|
+
customerId: coreComponents["schemas"]["CustomerId"];
|
|
4409
|
+
/**
|
|
4410
|
+
* Specifies the authentication verification method.
|
|
4411
|
+
* The `password` token requires the user to enter a password to log in.
|
|
4412
|
+
* The `passwordless` token, requires a secret API key to log in.
|
|
4413
|
+
* To obtain an API key, see [Manage API keys](https://www.rebilly.com/docs/dev-docs/api-keys/#manage-api-keys).
|
|
4414
|
+
*/
|
|
4415
|
+
mode?: "passwordless";
|
|
4416
|
+
/** ID of the authentication token. */
|
|
4417
|
+
token?: string;
|
|
4418
|
+
/** Specifies if a One-Time Password (OTP) is required to exchange the authentication token. */
|
|
4419
|
+
otpRequired?: boolean;
|
|
4420
|
+
/** ID of the user associated with the authentication token. */
|
|
4421
|
+
credentialId?: coreComponents["schemas"]["ResourceId"];
|
|
4394
4422
|
/** Date and time when the token expired. */
|
|
4395
4423
|
expiredTime?: string;
|
|
4396
4424
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
4397
4425
|
};
|
|
4398
|
-
|
|
4399
|
-
coreComponents["schemas"]["
|
|
4400
|
-
|
|
4401
|
-
username: string;
|
|
4402
|
-
/** Password associated with the authentication token. */
|
|
4403
|
-
password: string;
|
|
4404
|
-
mode?: "password";
|
|
4405
|
-
customerId?: coreComponents["schemas"]["CustomerId"];
|
|
4406
|
-
/** ID of the authentication token. */
|
|
4407
|
-
token?: string;
|
|
4408
|
-
/** Specifies if a One-Time Password (OTP) is required to exchange the authentication token. */
|
|
4409
|
-
otpRequired?: boolean;
|
|
4410
|
-
/** ID of the user associated with the authentication token. */
|
|
4411
|
-
credentialId?: coreComponents["schemas"]["ResourceId"];
|
|
4412
|
-
};
|
|
4413
|
-
passwordless: coreComponents["schemas"]["AuthenticationToken"] &
|
|
4414
|
-
coreComponents["schemas"]["AuthenticationTokenMetadata"] & {
|
|
4415
|
-
customerId: coreComponents["schemas"]["CustomerId"];
|
|
4416
|
-
mode?: "passwordless";
|
|
4417
|
-
/** ID of the authentication token. */
|
|
4418
|
-
token?: string;
|
|
4419
|
-
/** Specifies if a One-Time Password (OTP) is required to exchange the authentication token. */
|
|
4420
|
-
otpRequired?: boolean;
|
|
4421
|
-
/** ID of the user associated with the authentication token. */
|
|
4422
|
-
credentialId?: coreComponents["schemas"]["ResourceId"];
|
|
4423
|
-
};
|
|
4426
|
+
AuthenticationToken:
|
|
4427
|
+
| coreComponents["schemas"]["AuthenticationTokenPasswordMode"]
|
|
4428
|
+
| coreComponents["schemas"]["AuthenticationTokenPasswordlessMode"];
|
|
4424
4429
|
ApiKeyScope: {
|
|
4425
4430
|
/** Array of account IDs. */
|
|
4426
4431
|
organizationId?: coreComponents["schemas"]["ResourceId"][];
|
|
@@ -4829,6 +4834,7 @@ export interface coreComponents {
|
|
|
4829
4834
|
| "check"
|
|
4830
4835
|
| "paypal"
|
|
4831
4836
|
| "AdvCash"
|
|
4837
|
+
| "Aircash"
|
|
4832
4838
|
| "Airpay"
|
|
4833
4839
|
| "Alfa-click"
|
|
4834
4840
|
| "Alipay"
|
|
@@ -5972,6 +5978,7 @@ export interface coreComponents {
|
|
|
5972
5978
|
| "A1Gateway"
|
|
5973
5979
|
| "ACI"
|
|
5974
5980
|
| "Adyen"
|
|
5981
|
+
| "Aircash"
|
|
5975
5982
|
| "Airpay"
|
|
5976
5983
|
| "Airwallex"
|
|
5977
5984
|
| "AmazonPay"
|
|
@@ -6172,6 +6179,7 @@ export interface coreComponents {
|
|
|
6172
6179
|
| "ACI"
|
|
6173
6180
|
| "Alipay"
|
|
6174
6181
|
| "AIB"
|
|
6182
|
+
| "Aircash"
|
|
6175
6183
|
| "Airpay"
|
|
6176
6184
|
| "AmazonPay"
|
|
6177
6185
|
| "ApcoPay"
|
|
@@ -8341,6 +8349,7 @@ export interface coreComponents {
|
|
|
8341
8349
|
| "check"
|
|
8342
8350
|
| "paypal"
|
|
8343
8351
|
| "AdvCash"
|
|
8352
|
+
| "Aircash"
|
|
8344
8353
|
| "Alfa-click"
|
|
8345
8354
|
| "Alipay"
|
|
8346
8355
|
| "AstroPay Card"
|
|
@@ -10222,7 +10231,7 @@ export interface coreComponents {
|
|
|
10222
10231
|
*/
|
|
10223
10232
|
revision?: number;
|
|
10224
10233
|
organizationId?: coreComponents["schemas"]["OrganizationId"];
|
|
10225
|
-
/** Upcoming
|
|
10234
|
+
/** Upcoming invoice items array. */
|
|
10226
10235
|
items?: coreComponents["schemas"]["UpcomingInvoiceItem"][];
|
|
10227
10236
|
/** Amount of the invoice. */
|
|
10228
10237
|
amount?: number;
|
|
@@ -10395,9 +10404,9 @@ export interface coreComponents {
|
|
|
10395
10404
|
* Bank Identification Number (BIN) of the payment card.
|
|
10396
10405
|
* This value is the first 6 digits of the payment card number.
|
|
10397
10406
|
*/
|
|
10398
|
-
bin?: string;
|
|
10407
|
+
bin?: string | null;
|
|
10399
10408
|
/** Last 4 digits of the Primary Account Number (PAN) of the payment card. */
|
|
10400
|
-
last4?: string;
|
|
10409
|
+
last4?: string | null;
|
|
10401
10410
|
brand?: coreComponents["schemas"]["PaymentCardBrand"];
|
|
10402
10411
|
};
|
|
10403
10412
|
/**
|
|
@@ -10410,14 +10419,14 @@ export interface coreComponents {
|
|
|
10410
10419
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10411
10420
|
/** Specifies if the token has been used. */
|
|
10412
10421
|
isUsed: boolean;
|
|
10413
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10422
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10414
10423
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10415
10424
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10416
10425
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10417
10426
|
/** Date and time when the token is used. */
|
|
10418
|
-
usageTime?:
|
|
10427
|
+
usageTime?: string | null;
|
|
10419
10428
|
/** Date and time when the token expired. */
|
|
10420
|
-
expirationTime?:
|
|
10429
|
+
expirationTime?: string | null;
|
|
10421
10430
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10422
10431
|
};
|
|
10423
10432
|
PayPalToken: {
|
|
@@ -10436,14 +10445,14 @@ export interface coreComponents {
|
|
|
10436
10445
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10437
10446
|
/** Specifies if the token is already used. */
|
|
10438
10447
|
isUsed: boolean;
|
|
10439
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10448
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10440
10449
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10441
10450
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10442
10451
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10443
10452
|
/** Date and time when the token is used. */
|
|
10444
|
-
usageTime?:
|
|
10453
|
+
usageTime?: string | null;
|
|
10445
10454
|
/** Date and time when the token expires. */
|
|
10446
|
-
expirationTime?:
|
|
10455
|
+
expirationTime?: string | null;
|
|
10447
10456
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10448
10457
|
};
|
|
10449
10458
|
/** Bank account BBAN instrument. */
|
|
@@ -10498,14 +10507,14 @@ export interface coreComponents {
|
|
|
10498
10507
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10499
10508
|
/** Specifies if the token is already used. */
|
|
10500
10509
|
isUsed: boolean;
|
|
10501
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10510
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10502
10511
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10503
10512
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10504
10513
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10505
10514
|
/** Date and time when the token is used. */
|
|
10506
|
-
usageTime?:
|
|
10515
|
+
usageTime?: string | null;
|
|
10507
10516
|
/** Date and time when the token expired. */
|
|
10508
|
-
expirationTime?:
|
|
10517
|
+
expirationTime?: string | null;
|
|
10509
10518
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10510
10519
|
};
|
|
10511
10520
|
DigitalWalletToken: {
|
|
@@ -10525,7 +10534,7 @@ export interface coreComponents {
|
|
|
10525
10534
|
* Bank Identification Number (BIN) of the payment card.
|
|
10526
10535
|
* This value is the same as the first 6 digits of the associated Primary Account Number (PAN).
|
|
10527
10536
|
*/
|
|
10528
|
-
bin?: string;
|
|
10537
|
+
bin?: string | null;
|
|
10529
10538
|
/** Last 4 digits of the Primary Account Number (PAN) of the payment card. */
|
|
10530
10539
|
last4?: string;
|
|
10531
10540
|
brand?: coreComponents["schemas"]["PaymentCardBrand"];
|
|
@@ -10545,14 +10554,14 @@ export interface coreComponents {
|
|
|
10545
10554
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10546
10555
|
/** Specifies if the token is already used. */
|
|
10547
10556
|
isUsed: boolean;
|
|
10548
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10557
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10549
10558
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10550
10559
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10551
10560
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10552
10561
|
/** Date and time when the token is used. */
|
|
10553
|
-
usageTime?:
|
|
10562
|
+
usageTime?: string | null;
|
|
10554
10563
|
/** Date and time when the token expired. */
|
|
10555
|
-
expirationTime?:
|
|
10564
|
+
expirationTime?: string | null;
|
|
10556
10565
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10557
10566
|
};
|
|
10558
10567
|
PlaidAccountToken: {
|
|
@@ -10573,14 +10582,14 @@ export interface coreComponents {
|
|
|
10573
10582
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10574
10583
|
/** Specifies if the token is already used. */
|
|
10575
10584
|
isUsed: boolean;
|
|
10576
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10585
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10577
10586
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10578
10587
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10579
10588
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10580
10589
|
/** Date and time when the token is used. */
|
|
10581
|
-
usageTime?:
|
|
10590
|
+
usageTime?: string | null;
|
|
10582
10591
|
/** Date and time when the token expired. */
|
|
10583
|
-
expirationTime?:
|
|
10592
|
+
expirationTime?: string | null;
|
|
10584
10593
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10585
10594
|
};
|
|
10586
10595
|
KhelocardCardToken: {
|
|
@@ -10605,14 +10614,14 @@ export interface coreComponents {
|
|
|
10605
10614
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10606
10615
|
/** Specifies if the token is already used. */
|
|
10607
10616
|
isUsed: boolean;
|
|
10608
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10617
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10609
10618
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10610
10619
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10611
10620
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10612
10621
|
/** Date and time when the token is used. */
|
|
10613
|
-
usageTime?:
|
|
10622
|
+
usageTime?: string | null;
|
|
10614
10623
|
/** Date and time when the token expired. */
|
|
10615
|
-
expirationTime?:
|
|
10624
|
+
expirationTime?: string | null;
|
|
10616
10625
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10617
10626
|
};
|
|
10618
10627
|
KlarnaToken: {
|
|
@@ -10631,14 +10640,14 @@ export interface coreComponents {
|
|
|
10631
10640
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10632
10641
|
/** Specifies if the token is already used. */
|
|
10633
10642
|
isUsed: boolean;
|
|
10634
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10643
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10635
10644
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10636
10645
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10637
10646
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10638
10647
|
/** Date and time when the token is used. */
|
|
10639
|
-
usageTime?:
|
|
10648
|
+
usageTime?: string | null;
|
|
10640
10649
|
/** Date and time when the token expired. */
|
|
10641
|
-
expirationTime?:
|
|
10650
|
+
expirationTime?: string | null;
|
|
10642
10651
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10643
10652
|
};
|
|
10644
10653
|
AlternativePaymentToken: {
|
|
@@ -10650,14 +10659,14 @@ export interface coreComponents {
|
|
|
10650
10659
|
id?: coreComponents["schemas"]["ResourceId"];
|
|
10651
10660
|
/** Specifies if the token is already used. */
|
|
10652
10661
|
isUsed: boolean;
|
|
10653
|
-
riskMetadata?: coreComponents["schemas"]["RiskMetadata"];
|
|
10662
|
+
riskMetadata?: coreComponents["schemas"]["RiskMetadata"] | null;
|
|
10654
10663
|
leadSource?: coreComponents["schemas"]["LeadSource"];
|
|
10655
10664
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10656
10665
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10657
10666
|
/** Date and time when the token is used. */
|
|
10658
|
-
usageTime?:
|
|
10667
|
+
usageTime?: string | null;
|
|
10659
10668
|
/** Date and time when the token expired. */
|
|
10660
|
-
expirationTime?:
|
|
10669
|
+
expirationTime?: string | null;
|
|
10661
10670
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
10662
10671
|
};
|
|
10663
10672
|
CompositeToken: Partial<coreComponents["schemas"]["PaymentCardToken"]> &
|
|
@@ -20865,6 +20874,7 @@ export interface usersComponents {
|
|
|
20865
20874
|
| "check"
|
|
20866
20875
|
| "paypal"
|
|
20867
20876
|
| "AdvCash"
|
|
20877
|
+
| "Aircash"
|
|
20868
20878
|
| "Airpay"
|
|
20869
20879
|
| "Alfa-click"
|
|
20870
20880
|
| "Alipay"
|
|
@@ -21599,6 +21609,7 @@ export interface usersComponents {
|
|
|
21599
21609
|
| "A1Gateway"
|
|
21600
21610
|
| "ACI"
|
|
21601
21611
|
| "Adyen"
|
|
21612
|
+
| "Aircash"
|
|
21602
21613
|
| "Airpay"
|
|
21603
21614
|
| "Airwallex"
|
|
21604
21615
|
| "AmazonPay"
|
|
@@ -21799,6 +21810,7 @@ export interface usersComponents {
|
|
|
21799
21810
|
| "ACI"
|
|
21800
21811
|
| "Alipay"
|
|
21801
21812
|
| "AIB"
|
|
21813
|
+
| "Aircash"
|
|
21802
21814
|
| "Airpay"
|
|
21803
21815
|
| "AmazonPay"
|
|
21804
21816
|
| "ApcoPay"
|
|
@@ -22777,6 +22789,7 @@ export interface usersComponents {
|
|
|
22777
22789
|
| "check"
|
|
22778
22790
|
| "paypal"
|
|
22779
22791
|
| "AdvCash"
|
|
22792
|
+
| "Aircash"
|
|
22780
22793
|
| "Alfa-click"
|
|
22781
22794
|
| "Alipay"
|
|
22782
22795
|
| "AstroPay Card"
|
|
@@ -23826,7 +23839,17 @@ export interface usersComponents {
|
|
|
23826
23839
|
Partial<usersComponents["schemas"]["PlaidCredential"]>;
|
|
23827
23840
|
PatchCredential: {
|
|
23828
23841
|
/** Status of the credential. */
|
|
23829
|
-
status: "deactivated";
|
|
23842
|
+
status: "active" | "inactive" | "deactivated";
|
|
23843
|
+
};
|
|
23844
|
+
/** TaxJar credential. */
|
|
23845
|
+
PatchTaxJarCredential: {
|
|
23846
|
+
/** Status of the credential. */
|
|
23847
|
+
status: "active" | "inactive" | "deactivated";
|
|
23848
|
+
/**
|
|
23849
|
+
* Specifies if `from_` address fields must be omitted in TaxJar request.
|
|
23850
|
+
* For more information, see [TaxJar API guide](https://developers.taxjar.com/api/guides/#when-to-use-from_-address-information).
|
|
23851
|
+
*/
|
|
23852
|
+
omitFromAddress?: boolean;
|
|
23830
23853
|
};
|
|
23831
23854
|
/** Plaid credential. */
|
|
23832
23855
|
PatchPlaidCredential: {
|
|
@@ -24294,26 +24317,23 @@ export interface usersComponents {
|
|
|
24294
24317
|
}[];
|
|
24295
24318
|
};
|
|
24296
24319
|
"guess-payment-card-expiration": usersComponents["schemas"]["RuleAction"];
|
|
24297
|
-
|
|
24298
|
-
|
|
24299
|
-
|
|
24300
|
-
|
|
24301
|
-
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24306
|
-
|
|
24307
|
-
|
|
24308
|
-
|
|
24320
|
+
/** Offer Purchase Bump. */
|
|
24321
|
+
"offer-purchase-bump": usersComponents["schemas"]["RuleAction"] & {
|
|
24322
|
+
bumpOffers: {
|
|
24323
|
+
/**
|
|
24324
|
+
* Name of the bump offer version.
|
|
24325
|
+
* This field is useful when measuring split tests.
|
|
24326
|
+
*/
|
|
24327
|
+
name: string;
|
|
24328
|
+
/** Weight of the bump offer. */
|
|
24329
|
+
weight: number;
|
|
24330
|
+
offers: usersComponents["schemas"]["PurchaseBumpOffer"][];
|
|
24331
|
+
choices: {
|
|
24332
|
+
langIso: usersComponents["schemas"]["LanguageIsoCode"];
|
|
24333
|
+
content: string;
|
|
24334
|
+
}[];
|
|
24309
24335
|
}[];
|
|
24310
24336
|
};
|
|
24311
|
-
PurchaseBump: {
|
|
24312
|
-
bumpOffers?: usersComponents["schemas"]["PurchaseBumpSplitVersion"][];
|
|
24313
|
-
};
|
|
24314
|
-
/** Offer Purchase Bump. */
|
|
24315
|
-
"offer-purchase-bump": usersComponents["schemas"]["RuleAction"] &
|
|
24316
|
-
usersComponents["schemas"]["PurchaseBump"] & { [key: string]: any };
|
|
24317
24337
|
/** Perform Experian ProveID check on the customer. */
|
|
24318
24338
|
"perform-experian-check": usersComponents["schemas"]["RuleAction"] & {
|
|
24319
24339
|
/** Hash of the Experian credential to use for performing the check. */
|
|
@@ -24890,6 +24910,18 @@ export interface usersComponents {
|
|
|
24890
24910
|
};
|
|
24891
24911
|
threeDSecureServer?: usersComponents["schemas"]["ThreeDSecureIO3dsServer"];
|
|
24892
24912
|
};
|
|
24913
|
+
/** Aircash gateway configuration. */
|
|
24914
|
+
Aircash: usersComponents["schemas"]["GatewayAccount"] & {
|
|
24915
|
+
/** Aircash credentials object. */
|
|
24916
|
+
credentials: {
|
|
24917
|
+
/** ID of the Aircash partner. */
|
|
24918
|
+
partnerId: string;
|
|
24919
|
+
/** Private key of the Aircash partner. */
|
|
24920
|
+
privateKey: string;
|
|
24921
|
+
/** Private key password of the Aircash partner. */
|
|
24922
|
+
privateKeyPassword: string;
|
|
24923
|
+
};
|
|
24924
|
+
};
|
|
24893
24925
|
/** Airpay gateway configuration. */
|
|
24894
24926
|
Airpay: usersComponents["schemas"]["GatewayAccount"] & {
|
|
24895
24927
|
/** Airpay credentials object. */
|
|
@@ -27942,61 +27974,6 @@ export interface usersComponents {
|
|
|
27942
27974
|
roles?: any[];
|
|
27943
27975
|
};
|
|
27944
27976
|
};
|
|
27945
|
-
/** Organization questionnaire. */
|
|
27946
|
-
OrganizationQuestionnaire: {
|
|
27947
|
-
/** Role of the owner. */
|
|
27948
|
-
role?: string | null;
|
|
27949
|
-
/** Amount of monthly processed transaction. */
|
|
27950
|
-
monthlyTransactions?: string | null;
|
|
27951
|
-
/** List of products the organization is interested in. */
|
|
27952
|
-
products?: string[] | null;
|
|
27953
|
-
/** Type of integration the organization would like. */
|
|
27954
|
-
integrationType?: string | null;
|
|
27955
|
-
/** When the organization would like to go live. */
|
|
27956
|
-
launchTiming?: string | null;
|
|
27957
|
-
} | null;
|
|
27958
|
-
TaxLocation: {
|
|
27959
|
-
/** Street address of the tax location. */
|
|
27960
|
-
address?: string | null;
|
|
27961
|
-
/** City of the tax location. */
|
|
27962
|
-
city?: string | null;
|
|
27963
|
-
/** Region or state of the tax location. */
|
|
27964
|
-
region?: string | null;
|
|
27965
|
-
/** Country of the tax location, in [ISO Alpha-2 code format](https://www.iso.org/obp/ui/#search/code/). */
|
|
27966
|
-
country: string;
|
|
27967
|
-
/** Postal code of the tax location. */
|
|
27968
|
-
postalCode?: string | null;
|
|
27969
|
-
};
|
|
27970
|
-
/** Organization settings. */
|
|
27971
|
-
OrganizationSettings: {
|
|
27972
|
-
/** Tax calculation settings. */
|
|
27973
|
-
defaultTaxCalculator?: {
|
|
27974
|
-
/** Type of tax calculator. */
|
|
27975
|
-
type: "taxjar" | "avalara" | "flat";
|
|
27976
|
-
/** Rate for flat tax calculation. */
|
|
27977
|
-
rate?: number | null;
|
|
27978
|
-
};
|
|
27979
|
-
/** Global organization settings for billing. */
|
|
27980
|
-
billing?: {
|
|
27981
|
-
/** Length of time, in ISO-8601 durations format, before which a pending order is automatically abandoned. */
|
|
27982
|
-
pendingOrderTtl: string | null;
|
|
27983
|
-
};
|
|
27984
|
-
/**
|
|
27985
|
-
* Additional organization addresses where a merchant may want to collect taxes using the `taxjar` tax calculator.
|
|
27986
|
-
*
|
|
27987
|
-
* Available only for US-based organizations.
|
|
27988
|
-
*/
|
|
27989
|
-
taxLocations?: usersComponents["schemas"]["TaxLocation"][];
|
|
27990
|
-
/** Organization access-related notification settings. */
|
|
27991
|
-
notifications?: {
|
|
27992
|
-
/** Specifies whether to send notifications when users are created or updated. */
|
|
27993
|
-
notifyOnUserAccessChanges: boolean;
|
|
27994
|
-
/** Specifies whether to send notifications when API keys are created or updated. */
|
|
27995
|
-
notifyOnApiKeyAccessChanges: boolean;
|
|
27996
|
-
/** List of email addresses to send notifications to. */
|
|
27997
|
-
notificationEmailAddresses: string[];
|
|
27998
|
-
};
|
|
27999
|
-
};
|
|
28000
27977
|
Organization: {
|
|
28001
27978
|
/**
|
|
28002
27979
|
* Unique organization identifier.
|
|
@@ -28034,8 +28011,60 @@ export interface usersComponents {
|
|
|
28034
28011
|
* This value cannot be changed.
|
|
28035
28012
|
*/
|
|
28036
28013
|
reportCurrency?: string;
|
|
28037
|
-
questionnaire
|
|
28038
|
-
|
|
28014
|
+
/** Organization questionnaire. */
|
|
28015
|
+
questionnaire?: {
|
|
28016
|
+
/** Role of the owner. */
|
|
28017
|
+
role?: string | null;
|
|
28018
|
+
/** Amount of monthly processed transactions. */
|
|
28019
|
+
monthlyTransactions?: string | null;
|
|
28020
|
+
/** List of products the organization is interested in. */
|
|
28021
|
+
products?: string[] | null;
|
|
28022
|
+
/** Type of integration the organization would like. */
|
|
28023
|
+
integrationType?: string | null;
|
|
28024
|
+
/** When the organization would like to go live. */
|
|
28025
|
+
launchTiming?: string | null;
|
|
28026
|
+
} | null;
|
|
28027
|
+
/** Organization settings. */
|
|
28028
|
+
settings?: {
|
|
28029
|
+
/** Tax calculation settings. */
|
|
28030
|
+
defaultTaxCalculator?: {
|
|
28031
|
+
/** Type of tax calculator. */
|
|
28032
|
+
type: "taxjar" | "avalara" | "flat";
|
|
28033
|
+
/** Rate for flat tax calculation. */
|
|
28034
|
+
rate?: number | null;
|
|
28035
|
+
};
|
|
28036
|
+
/** Global organization settings for billing. */
|
|
28037
|
+
billing?: {
|
|
28038
|
+
/** Length of time, in ISO-8601 durations format, before which a pending order is automatically abandoned. */
|
|
28039
|
+
pendingOrderTtl: string | null;
|
|
28040
|
+
} | null;
|
|
28041
|
+
/**
|
|
28042
|
+
* Additional organization addresses where a merchant may want to collect taxes using the `taxjar` tax calculator.
|
|
28043
|
+
*
|
|
28044
|
+
* Available only for US-based organizations.
|
|
28045
|
+
*/
|
|
28046
|
+
taxLocations?: {
|
|
28047
|
+
/** Street address of the tax location. */
|
|
28048
|
+
address?: string | null;
|
|
28049
|
+
/** City of the tax location. */
|
|
28050
|
+
city?: string | null;
|
|
28051
|
+
/** Region or state of the tax location. */
|
|
28052
|
+
region?: string | null;
|
|
28053
|
+
/** Country of the tax location, in [ISO Alpha-2 code format](https://www.iso.org/obp/ui/#search/code/). */
|
|
28054
|
+
country: string;
|
|
28055
|
+
/** Postal code of the tax location. */
|
|
28056
|
+
postalCode?: string | null;
|
|
28057
|
+
}[];
|
|
28058
|
+
/** Organization access-related notification settings. */
|
|
28059
|
+
notifications?: {
|
|
28060
|
+
/** Specifies whether to send notifications when users are created or updated. */
|
|
28061
|
+
notifyOnUserAccessChanges: boolean;
|
|
28062
|
+
/** Specifies whether to send notifications when API keys are created or updated. */
|
|
28063
|
+
notifyOnApiKeyAccessChanges: boolean;
|
|
28064
|
+
/** List of email addresses to send notifications to. */
|
|
28065
|
+
notificationEmailAddresses: string[];
|
|
28066
|
+
};
|
|
28067
|
+
};
|
|
28039
28068
|
/** Tax numbers of the organization. */
|
|
28040
28069
|
taxNumbers?: usersComponents["schemas"]["TaxNumber"][] | null;
|
|
28041
28070
|
/** Organization features. */
|
|
@@ -28093,20 +28122,6 @@ export interface usersComponents {
|
|
|
28093
28122
|
storefrontEnabled: boolean;
|
|
28094
28123
|
_links?: usersComponents["schemas"]["SelfLink"];
|
|
28095
28124
|
};
|
|
28096
|
-
/** Currencies metadata. */
|
|
28097
|
-
CurrenciesMetadata: (
|
|
28098
|
-
| {
|
|
28099
|
-
mode?: "unknown" | "all";
|
|
28100
|
-
}
|
|
28101
|
-
| {
|
|
28102
|
-
mode?: "subset";
|
|
28103
|
-
/** List of supported countries. */
|
|
28104
|
-
values: usersComponents["schemas"]["CurrencyCode"][];
|
|
28105
|
-
}
|
|
28106
|
-
) & {
|
|
28107
|
-
/** Specifies how the currencies are compared. */
|
|
28108
|
-
mode: "unknown" | "all" | "subset";
|
|
28109
|
-
};
|
|
28110
28125
|
PaymentGatewayMetadata: {
|
|
28111
28126
|
/** Name of the payment gateway returned in the API response. */
|
|
28112
28127
|
apiName: string;
|
|
@@ -28129,9 +28144,9 @@ export interface usersComponents {
|
|
|
28129
28144
|
* Short description of the payment gateway.
|
|
28130
28145
|
* This field supports Markdown.
|
|
28131
28146
|
*/
|
|
28132
|
-
summary?: string;
|
|
28147
|
+
summary?: string | null;
|
|
28133
28148
|
/** URL of the payment gateway home page. */
|
|
28134
|
-
homepage?: string;
|
|
28149
|
+
homepage?: string | null;
|
|
28135
28150
|
/**
|
|
28136
28151
|
* List of links to the documentation of the payment gateway.
|
|
28137
28152
|
* For example, online API guides provided by gateways or a link to the documents in Google Drive.
|
|
@@ -28146,13 +28161,13 @@ export interface usersComponents {
|
|
|
28146
28161
|
description?: string;
|
|
28147
28162
|
}[];
|
|
28148
28163
|
/** Pricing description for the payment gateway, if pricing is published. */
|
|
28149
|
-
publishedPricing?: string;
|
|
28164
|
+
publishedPricing?: string | null;
|
|
28150
28165
|
/**
|
|
28151
28166
|
* Special gateway account set up instructions for merchants.
|
|
28152
28167
|
* For example: After adding this gateway account,
|
|
28153
28168
|
* set the IPN to `//example.com/ipns/{gateway-name}/{organization-id}` by contacting your account rep.
|
|
28154
28169
|
*/
|
|
28155
|
-
setupInstructions?: string;
|
|
28170
|
+
setupInstructions?: string | null;
|
|
28156
28171
|
/** Array of supported payment methods. For example, `payment-card` and `bitcoin`. */
|
|
28157
28172
|
paymentMethods: string[];
|
|
28158
28173
|
/**
|
|
@@ -28161,7 +28176,18 @@ export interface usersComponents {
|
|
|
28161
28176
|
*/
|
|
28162
28177
|
cardBrands?: usersComponents["schemas"]["PaymentCardBrand"][];
|
|
28163
28178
|
merchantCountries: usersComponents["schemas"]["CountriesMetadata"];
|
|
28164
|
-
|
|
28179
|
+
/** Currencies metadata. */
|
|
28180
|
+
currencies:
|
|
28181
|
+
| {
|
|
28182
|
+
/** Specifies how the currencies are compared. */
|
|
28183
|
+
mode?: "unknown" | "all";
|
|
28184
|
+
}
|
|
28185
|
+
| {
|
|
28186
|
+
/** Specifies how the currencies are compared. */
|
|
28187
|
+
mode?: "subset";
|
|
28188
|
+
/** List of supported currencies. */
|
|
28189
|
+
values: usersComponents["schemas"]["CurrencyCode"][];
|
|
28190
|
+
};
|
|
28165
28191
|
/** Array of operations that are supported by the payment gateway. */
|
|
28166
28192
|
operations?: (
|
|
28167
28193
|
| "verify"
|
|
@@ -28208,7 +28234,7 @@ export interface usersComponents {
|
|
|
28208
28234
|
type: "static" | "dynamic";
|
|
28209
28235
|
/** Method used to verify that the data in the IPN call can be trusted. */
|
|
28210
28236
|
verificationMethod: "query" | "signature";
|
|
28211
|
-
};
|
|
28237
|
+
} | null;
|
|
28212
28238
|
/** Recommended Time To Live (TTL) before abandoning the transaction. */
|
|
28213
28239
|
recommendedWaitingApprovalTtl: number;
|
|
28214
28240
|
_links?: usersComponents["schemas"]["SelfLink"];
|
|
@@ -28751,29 +28777,6 @@ export interface usersComponents {
|
|
|
28751
28777
|
rel?: "self" | "logoUrl";
|
|
28752
28778
|
}[];
|
|
28753
28779
|
};
|
|
28754
|
-
OrganizationExportResource: {
|
|
28755
|
-
/** Exported resource. */
|
|
28756
|
-
type?:
|
|
28757
|
-
| "customers"
|
|
28758
|
-
| "users"
|
|
28759
|
-
| "payment-instruments"
|
|
28760
|
-
| "invoices"
|
|
28761
|
-
| "orders"
|
|
28762
|
-
| "transactions"
|
|
28763
|
-
| "disputes"
|
|
28764
|
-
| "gateway-accounts"
|
|
28765
|
-
| "blocklists"
|
|
28766
|
-
| "lists"
|
|
28767
|
-
| "webhooks"
|
|
28768
|
-
| "products"
|
|
28769
|
-
| "websites"
|
|
28770
|
-
| "plans"
|
|
28771
|
-
| "credit-memos"
|
|
28772
|
-
| "files"
|
|
28773
|
-
| "email-notifications";
|
|
28774
|
-
/** Number of exported resources. */
|
|
28775
|
-
recordCount?: number;
|
|
28776
|
-
};
|
|
28777
28780
|
OrganizationExport: {
|
|
28778
28781
|
/** Unique resource ID. */
|
|
28779
28782
|
id?: string;
|
|
@@ -28790,7 +28793,29 @@ export interface usersComponents {
|
|
|
28790
28793
|
| "failed"
|
|
28791
28794
|
| "expired";
|
|
28792
28795
|
/** Organization data export resources array. */
|
|
28793
|
-
resources?:
|
|
28796
|
+
resources?: {
|
|
28797
|
+
/** Exported resource. */
|
|
28798
|
+
type?:
|
|
28799
|
+
| "customers"
|
|
28800
|
+
| "users"
|
|
28801
|
+
| "payment-instruments"
|
|
28802
|
+
| "invoices"
|
|
28803
|
+
| "orders"
|
|
28804
|
+
| "transactions"
|
|
28805
|
+
| "disputes"
|
|
28806
|
+
| "gateway-accounts"
|
|
28807
|
+
| "blocklists"
|
|
28808
|
+
| "lists"
|
|
28809
|
+
| "webhooks"
|
|
28810
|
+
| "products"
|
|
28811
|
+
| "websites"
|
|
28812
|
+
| "plans"
|
|
28813
|
+
| "credit-memos"
|
|
28814
|
+
| "files"
|
|
28815
|
+
| "email-notifications";
|
|
28816
|
+
/** Number of exported resources. */
|
|
28817
|
+
recordCount?: number;
|
|
28818
|
+
}[];
|
|
28794
28819
|
createdTime?: usersComponents["schemas"]["CreatedTime"];
|
|
28795
28820
|
updatedTime?: usersComponents["schemas"]["UpdatedTime"];
|
|
28796
28821
|
/**
|
|
@@ -28948,6 +28973,7 @@ export interface usersComponents {
|
|
|
28948
28973
|
PatchServiceCredential: {
|
|
28949
28974
|
content: {
|
|
28950
28975
|
"application/json": Partial<usersComponents["schemas"]["PatchCredential"]> &
|
|
28976
|
+
Partial<usersComponents["schemas"]["PatchTaxJarCredential"]> &
|
|
28951
28977
|
Partial<usersComponents["schemas"]["PatchPlaidCredential"]>;
|
|
28952
28978
|
};
|
|
28953
28979
|
};
|
|
@@ -34082,6 +34108,7 @@ export interface storefrontComponents {
|
|
|
34082
34108
|
| "check"
|
|
34083
34109
|
| "paypal"
|
|
34084
34110
|
| "AdvCash"
|
|
34111
|
+
| "Aircash"
|
|
34085
34112
|
| "Airpay"
|
|
34086
34113
|
| "Alfa-click"
|
|
34087
34114
|
| "Alipay"
|
|
@@ -34536,6 +34563,7 @@ export interface storefrontComponents {
|
|
|
34536
34563
|
| "A1Gateway"
|
|
34537
34564
|
| "ACI"
|
|
34538
34565
|
| "Adyen"
|
|
34566
|
+
| "Aircash"
|
|
34539
34567
|
| "Airpay"
|
|
34540
34568
|
| "Airwallex"
|
|
34541
34569
|
| "AmazonPay"
|
|
@@ -35158,6 +35186,7 @@ export interface storefrontComponents {
|
|
|
35158
35186
|
| "check"
|
|
35159
35187
|
| "paypal"
|
|
35160
35188
|
| "AdvCash"
|
|
35189
|
+
| "Aircash"
|
|
35161
35190
|
| "Alfa-click"
|
|
35162
35191
|
| "Alipay"
|
|
35163
35192
|
| "AstroPay Card"
|
|
@@ -39882,6 +39911,8 @@ export interface reportsComponents {
|
|
|
39882
39911
|
};
|
|
39883
39912
|
/** ID of the user who requested the data export. */
|
|
39884
39913
|
userId?: string;
|
|
39914
|
+
/** ID of the data export file. */
|
|
39915
|
+
fileId?: string | null;
|
|
39885
39916
|
/** Total number of records in the export, excluding the header row. */
|
|
39886
39917
|
recordCount?: number;
|
|
39887
39918
|
/** Date and time when the data export is scheduled to generate a file. */
|
|
@@ -388,7 +388,7 @@ function cloneArrayDeep(val, instanceClone) {
|
|
|
388
388
|
return res;
|
|
389
389
|
}
|
|
390
390
|
var cloneDeep_1 = cloneDeep;
|
|
391
|
-
const version = "51.
|
|
391
|
+
const version = "51.1.1";
|
|
392
392
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
393
393
|
let nanoid = (size = 21) => {
|
|
394
394
|
let id = "";
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
15
15
|
* Released under the MIT License.
|
|
16
|
-
*/var Ie=Se;function U(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var qe=function(e){var s,r;return!(U(e)===!1||(s=e.constructor,typeof s!="function")||(r=s.prototype,U(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const xe=Ee,Pe=L,Ce=qe;function P(t,e){switch(Pe(t)){case"object":return je(t,e);case"array":return Me(t,e);default:return xe(t)}}function je(t,e){if(typeof e=="function")return e(t);if(e||Ce(t)){const s=new t.constructor;for(let r in t)s[r]=P(t[r],e);return s}return t}function Me(t,e){const s=new t.constructor(t.length);for(let r=0;r<t.length;r++)s[r]=P(t[r],e);return s}var De=P;const Oe="51.0.0";let Fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ke=(t=21)=>{let e="",s=t;for(;s--;)e+=Fe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Ke(),this.created=s||new Date().getTime(),this.cancelSource=x.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,S(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class v{constructor(){if(v.instance)return v.instance;this.requests={},v.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}}}var T=new v;class I{}F(I,"cancelById",(e,s)=>{try{T.getById(e).cancel(s),T.deleteById(e)}catch{}}),F(I,"cancelAll",e=>T.getAll().forEach(s=>{s.cancel(e),T.deleteById(s.id)}));var Le={cancelAll:(...t)=>I.cancelAll(...t)};const b={request:"request",response:"response"},V=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function C({options:t}){const e=s();function s(){return x.default.create(n())}function r(){return e}function n(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Oe}`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return De(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function h(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 D({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function O({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function J(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return V(c)&&e.interceptors[b[c]].use(i,g)}function G(c,i){return V(c)&&e.interceptors[b[c]].eject(i)}function Vs({thenDelegate:c,catchDelegate:i=()=>{}}){return J(b.request,{thenDelegate:c,catchDelegate:i})}function Ws(c){G(b.request,c)}function Js({thenDelegate:c,catchDelegate:i=()=>{}}){return J(b.response,{thenDelegate:c,catchDelegate:i})}function Gs(c){G(b.response,c)}function d({request:c,isCollection:i,config:g}){const m=_(g),{id:A,cancelToken:sr}=T.save();m.cancelToken=sr;const H=async function(){try{const E=await c(m);return Ys({response:E,isCollection:i,config:m})}catch(E){return Y({error:E,config:m})}finally{T.deleteById(A)}}();return H.cancel=E=>I.cancelById(A,E),H}function Ys({response:c,isCollection:i,config:g}){return i?new ee(c,g):new K(c,g)}function Y({error:c}){if(x.default.isCancel(c))throw new p.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new p.RebillyForbiddenError(c);case 404:throw new p.RebillyNotFoundError(c);case 405:throw new p.RebillyMethodNotAllowedError(c);case 409:throw new p.RebillyConflictError(c);case 422:throw new p.RebillyValidationError(c);default:throw new p.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new p.RebillyTimeoutError(c):new p.RebillyRequestError(c)}function _s(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 _(c={}){return{..._s(c)}}function Q(c,i={}){return d({request:g=>e.get(c,g),config:{params:i}})}function Qs(c,i){return d({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function X(c,i,g={}){let m={};return g.authenticate===!1&&(m={headers:l()},delete m.headers.common["REB-APIKEY"],delete m.headers.common.Authorization),g.params&&(m.params={...g.params}),d({request:A=>e.post(c,i,A),config:m})}function Z(c,i,g={}){return d({request:m=>e.put(c,i,m),config:{params:g}})}function Xs(c,i){return d({request:g=>e.patch(c,i,g),config:{}})}function Zs(c){return d({request:i=>e.delete(c,i),config:{}})}function Hs(c,i){return d({request:g=>e.delete(c,g),config:{data:{...i}}})}async function er(c,i,g,m={}){if(i==="")return X(c,g,{params:m});try{if((await Q(c)).response.status===200)throw new p.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(A){if(A.name==="RebillyNotFoundError")return Z(c,g,m);throw A}}async function tr(c,i){const g=_(i);try{const m=await e.get(c,g);return new te(m,g)}catch(m){return Y({error:m,config:g})}}return{getInstance:r,addRequestInterceptor:Vs,removeRequestInterceptor:Ws,addResponseInterceptor:Js,removeResponseInterceptor:Gs,setTimeout:a,setProxyAgent:D,setSessionToken:h,setPublishableKey:k,setEndpoints:O,get:Q,getAll:Qs,post:X,put:Z,patch:Xs,delete:Zs,deleteAll:Hs,create:er,download:tr}}function Ne({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ue({apiHandler:t}){return{getAll({firstName:e,lastName:s,dob:r=null,country:n=null}){const u={firstName:e,lastName:s,dob:r,country:n};return t.get("aml",u)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function We({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null}={}){const n={limit:e,offset:s,sort:r};return t.getAll("api-keys",n)},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 Je({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:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,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:r=null}){const n={limit:s,offset:r};return t.getAll(`applications/${e}/instances`,n)},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:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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:r=null,filter:n=null}={}){const u={limit:e,offset:s,sort:r,filter:n};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`cashier-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`cashier-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`cashier-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`cashier-custom-property-sets/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-requests",u)},create({data:e}){return t.post("cashier-requests",e)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`cashier-requests/${e}`,r)}}}function et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-strategies",u)},create({id:e="",data:s}){return t.create(`cashier-strategies/${e}`,e,s)},get({id:e}){return t.get(`cashier-strategies/${e}`)},update({id:e,data:s}){return t.put(`cashier-strategies/${e}`,s)},delete({id:e}){return t.delete(`cashier-strategies/${e}`)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 st({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,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 rt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("credit-memos",o)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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 nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function ut({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`custom-fields/${e}`,n)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:r}){return t.put(`custom-fields/${e}/${s}`,r)},update({resource:e,name:s,data:r}){return t.put(`custom-fields/${e}/${s}`,r)}}}function ot({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 r={limit:e,offset:s};return t.getAll("authentication-tokens",r)},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 r={limit:e,offset:s};return t.getAll("credentials",r)},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 r={limit:e,offset:s};return t.getAll("password-tokens",r)},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 lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`customers/${e}`,e,s,n)},get({id:e,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return t.get(`customers/${e}`,n)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`customers/${e}`,s,n)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getAml({id:e}){return t.get(`customers/${e}/aml`)},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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:s}){return t.patch(`customers/${e}/edd-score`,s)},getEddTimelineCollection({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:s}){return t.post(`customers/${e}/edd-timeline`,s)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},deleteEddTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`customers/${e}/edd-search-results`,n)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ct({apiHandler:t}){return{create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return t.post("digital-wallets/validation",e)}}}function it({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`disputes/${e}`,e,s,n)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`disputes/${e}`,s,n)}}}function gt({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function at({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:e,offset:s,q:r,sort:n,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function ft({apiHandler:t}){return{getAll(){return t.getAll("events")},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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:r=null}){const n={fields:r};return t.get(`events/${e}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:e,version:s,fields:r=null}){const n={fields:r};return t.get(`events/${e}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:e,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return 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:r=null}){const n={fields:r};return t.get(`events/${e}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:e,id:s,data:r}){return t.put(`events/${e}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function $t({apiHandler:t}){return{get({resource:e,resourceId:s,service:r}){return t.get(`${e}/${s}/external-identifiers/${r}`)},sync({resource:e,resourceId:s,service:r}){return t.post(`${e}/${s}/external-identifiers/${r}`)},update({resource:e,resourceId:s,service:r,data:n}){return t.put(`${e}/${s}/external-identifiers/${r}`,n)},delete({resource:e,resourceId:s,service:r}){return t.delete(`${e}/${s}/external-identifiers/${r}`)}}}function ht({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function yt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`attachments/${e}`,e,s,n)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`attachments/${e}`,s,n)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:r,q:n,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data: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 r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));r=[...r,a],await Promise.all(a);const h=t.delete(`files/${e}`);return r.push(h),h})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:e});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,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}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},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:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,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:r}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,r)},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:r}){return t.put(`gateway-accounts/${e}/limits/${s}`,r)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("integrations",r)},get({label:e}){return t.get(`integrations/${e}`)}}}const q={Accept:"application/pdf"};function bt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,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 r={expand:s};return t.get(`invoices/${e}`,r)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};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:r}){return t.put(`invoices/${e}/items/${s}`,r)},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:r=null}){const n={limit:s,offset:r};return t.getAll(`invoices/${e}/transaction-allocations`,n)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return 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:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function wt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function kt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)},getAllRecords({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,expand:o=null}){const l={limit:s,offset:r,filter:n,sort:u,expand:o};return t.getAll(`journal-entries/${e}/records`,l)},createRecord({id:e,data:s}){return t.post(`journal-entries/${e}/records`,s)},getRecord({id:e,journalRecordId:s}){return t.get(`journal-entries/${e}/records/${s}`)},updateRecord({id:e,journalRecordId:s,data:r}){return t.put(`journal-entries/${e}/records/${s}`,r)},deleteRecord({id:e,journalRecordId:s}){return t.delete(`journal-entries/${e}/records/${s}`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,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 Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function vt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,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 St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:r}){return t.put(`memberships/${e}/${s}`,r)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const r={limit:e,q:s};return t.getAll("payment-cards-bank-names",r)}}}function Pt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("payment-methods",r)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("tokens",r)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)}}}function Dt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ot({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Ft({apiHandler:t}){return{sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)},order({data:e}){return t.post("previews/orders",e)}}}function Kt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Bt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Lt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Nt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,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 r={expand:s};return t.get(`quotes/${e}`,r)},update({id:e,data:s}){return t.put(`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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function zt({apiHandler:t}){return{get({resource:e,resourceId:s,service:r}){return t.get(`${e}/${s}/external-identifiers/${r}`)},sync({resource:e,resourceId:s,service:r}){return t.post(`${e}/${s}/external-identifiers/${r}`)},update({resource:e,resourceId:s,service:r,data:n}){return t.put(`${e}/${s}/external-identifiers/${r}`,n)},delete({resource:e,resourceId:s,service:r}){return t.delete(`${e}/${s}/external-identifiers/${r}`)}}}function Ut({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Vt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,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 r={expand:s};return t.get(`roles/${e}`,r)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Wt({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:e,limit:s,offset:r,q:n};return t.get("search",u)}}}function Jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 Gt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Yt({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return 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:r}){return t.patch(`service-credentials/${e}/${s}`,r)},getItems({type:e,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const h={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,h)}}}function _t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,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 Qt({apiHandler:t}){return{get(){return t.get("status")}}}function Xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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 Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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 Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function es({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`subscriptions/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`subscriptions/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`subscriptions/${e}`,s,n)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const r={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,r)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:r}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return 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 ts({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data: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}`)}}}function ss({apiHandler:t}){return{getAllTagsRules({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tags-rules",o)},createTagsRule({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},getTagsRule({id:e}){return t.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},deleteTagsRule({id:e}){return t.delete(`tags-rules/${e}`)}}}function rs({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function ns({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:r,q:n,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const r={expand:s};return t.post("transactions",e,r)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`transactions/${e}`,r)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s}){return t.post(`transactions/${e}/refund`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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 us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("usages",o)},create({id:e="",data:s}){return t.create(`usages/${e}`,e,s)},get({id:e}){return t.get(`usages/${e}`)},update({id:e,data:s}){return t.put(`usages/${e}`,s)},delete({id:e}){return t.delete(`usages/${e}`)}}}function os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null}={}){const n={limit:e,offset:s,filter:r};return t.getAll("webhooks",n)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:s,q:r,filter:n,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 is{constructor({apiHandler:e}){this.account=Ne({apiHandler:e}),this.amlChecks=ze({apiHandler:e}),this.aml=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=We({apiHandler:e}),this.applicationInstances=Je({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=_e({apiHandler:e}),this.blocklists=Qe({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashierCustomPropertySets=Ze({apiHandler:e}),this.cashierRequests=He({apiHandler:e}),this.cashierStrategies=et({apiHandler:e}),this.checkoutForms=tt({apiHandler:e}),this.coupons=st({apiHandler:e}),this.creditMemos=rt({apiHandler:e}),this.customDomains=nt({apiHandler:e}),this.customFields=ut({apiHandler:e}),this.customerAuthentication=ot({apiHandler:e}),this.customers=lt({apiHandler:e}),this.digitalWallets=ct({apiHandler:e}),this.disputes=it({apiHandler:e}),this.emailDeliverySettings=gt({apiHandler:e}),this.emailMessages=at({apiHandler:e}),this.emailNotifications=mt({apiHandler:e}),this.events=ft({apiHandler:e}),this.externalIdentifiers=$t({apiHandler:e}),this.externalServicesSettings=ht({apiHandler:e}),this.fees=pt({apiHandler:e}),this.files=yt({apiHandler:e}),this.gatewayAccounts=At({apiHandler:e}),this.integrations=Rt({apiHandler:e}),this.invoices=bt({apiHandler:e}),this.journalAccounts=wt({apiHandler:e}),this.journalEntries=kt({apiHandler:e}),this.kycDocuments=dt({apiHandler:e}),this.kycRequests=Tt({apiHandler:e}),this.kycSettings=vt({apiHandler:e}),this.lists=Et({apiHandler:e}),this.memberships=St({apiHandler:e}),this.organizationExports=It({apiHandler:e}),this.organizations=qt({apiHandler:e}),this.paymentCardsBankNames=xt({apiHandler:e}),this.paymentInstruments=Pt({apiHandler:e}),this.paymentMethods=Ct({apiHandler:e}),this.paymentTokens=jt({apiHandler:e}),this.payoutRequests=Mt({apiHandler:e}),this.payouts=Dt({apiHandler:e}),this.plans=Ot({apiHandler:e}),this.previews=Ft({apiHandler:e}),this.products=Kt({apiHandler:e}),this.profile=Bt({apiHandler:e}),this.purchase=Lt({apiHandler:e}),this.quotes=Nt({apiHandler:e}),this.resource=zt({apiHandler:e}),this.riskScoreRules=Ut({apiHandler:e}),this.roles=Vt({apiHandler:e}),this.search=Wt({apiHandler:e}),this.segments=Jt({apiHandler:e}),this.sendThroughAttribution=Gt({apiHandler:e}),this.serviceCredentials=Yt({apiHandler:e}),this.shippingRates=_t({apiHandler:e}),this.status=Qt({apiHandler:e}),this.subscriptionCancellations=Xt({apiHandler:e}),this.subscriptionPauses=Zt({apiHandler:e}),this.subscriptionReactivations=Ht({apiHandler:e}),this.subscriptions=es({apiHandler:e}),this.tags=ts({apiHandler:e}),this.tagsRules=ss({apiHandler:e}),this.tracking=rs({apiHandler:e}),this.transactions=ns({apiHandler:e}),this.usages=us({apiHandler:e}),this.users=os({apiHandler:e}),this.webhooks=ls({apiHandler:e}),this.websites=cs({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 gs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function as({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`data-exports/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`data-exports/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`data-exports/${e}`,s,n)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function ms({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function fs({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:s,metrics:r=null,segments:n=null}){const u={periodStart:e,periodEnd:s,metrics:r,segments:n};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:s,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:r,offset:n,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const h={currency:e,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",h)},getKycAcceptanceSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:r,limit:n,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r=null,periodStart:n,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:s,includeRefunds:r=null,includeDisputes:n=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:h=null,sort:k=null,criteria:D=null}){const O={aggregationField:e,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:k,criteria:D};return t.get("reports/retention-value",O)},getRevenueWaterfall({currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n}){const u={currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:s=null,limit:r=null,offset:n=null}){const u={filter:e,sort:s,limit:r,offset:n};return t.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:s,aggregationField:r,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e,periodEnd:s,accountingMethod:r,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:r,limit:n,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e,subaggregate:s,periodStart:r,periodEnd:n,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:s,aggregationField:r,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return t.get("reports/transactions",l)}}}function $s({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function hs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:r=0}){const n={eventTypes:e,limit:s,offset:r};return t.getAll("activity-feed",n)},getTransaction({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`customers/${e}/timeline`,u)}}}function ps({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:gs,DataExportsResource:as,HistogramsResource:ms,ReportsResource:fs,SubscriptionsResource:$s,TimelinesResource:hs,LocationResource:ps};class ys{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 As({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 Rs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function bs({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ws({apiHandler:t}){return{create({data:e}){return t.post("cashier-deposit",e)}}}function ks({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`cashier-requests/${e}`,r)}}}function ds({apiHandler:t}){return{get({id:e}){return t.get(`cashier-strategies/${e}`)}}}function Ts({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function vs({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`custom-fields/${e}`,n)}}}function Es({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("invoices",o)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Ss({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("kyc-documents",r)},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 Is({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function qs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("orders",o)},get({id:e}){return t.get(`orders/${e}`)},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 xs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.get(`payment-instruments/${e}`,n)},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 Ps({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payout-requests",o)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`plans/${e}`,r)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ms({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 Ds({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`quotes/${e}`,r)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Fs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ks{constructor({apiHandler:e}){this.account=As({apiHandler:e}),this.authorization=Rs({apiHandler:e}),this.billingPortals=bs({apiHandler:e}),this.cashierDeposit=ws({apiHandler:e}),this.cashierRequests=ks({apiHandler:e}),this.cashierStrategies=ds({apiHandler:e}),this.checkoutForms=Ts({apiHandler:e}),this.customFields=vs({apiHandler:e}),this.invoices=Es({apiHandler:e}),this.kycDocuments=Ss({apiHandler:e}),this.kycRequests=Is({apiHandler:e}),this.orders=qs({apiHandler:e}),this.paymentInstruments=xs({apiHandler:e}),this.payoutRequests=Ps({apiHandler:e}),this.plans=Cs({apiHandler:e}),this.products=js({apiHandler:e}),this.purchase=Ms({apiHandler:e}),this.quotes=Ds({apiHandler:e}),this.transactions=Os({apiHandler:e}),this.websites=Fs({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 Bs({apiHandler:t}){return new is({apiHandler:t})}function Ls({apiHandler:t}){return new ys({apiHandler:t})}function Ns({apiHandler:t}){return new Ks({apiHandler:t})}const j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},M=6e3;function W({apiKey:t=null,sandbox:e=!1,timeout:s=M,organizationId:r=null,urls:n=j}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=C({options:{apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r}});return Bs({apiHandler:o})}function zs({apiKey:t=null,sandbox:e=!1,timeout:s=M,organizationId:r=null,urls:n=j}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=C({options:{apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r}});return Ls({apiHandler:o})}function Us({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:r=M,organizationId:n=null,urls:u=j}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n},l=C({options:o});return l.setSessionToken(o.jwt),Ns({apiHandler:l})}f.RebillyAPI=W,f.RebillyErrors=p,f.RebillyExperimentalAPI=zs,f.RebillyStorefrontAPI=Us,f.cancellation=Le,f.default=W,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
16
|
+
*/var Ie=Se;function U(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var qe=function(e){var s,r;return!(U(e)===!1||(s=e.constructor,typeof s!="function")||(r=s.prototype,U(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const xe=Ee,Pe=L,Ce=qe;function P(t,e){switch(Pe(t)){case"object":return je(t,e);case"array":return Me(t,e);default:return xe(t)}}function je(t,e){if(typeof e=="function")return e(t);if(e||Ce(t)){const s=new t.constructor;for(let r in t)s[r]=P(t[r],e);return s}return t}function Me(t,e){const s=new t.constructor(t.length);for(let r=0;r<t.length;r++)s[r]=P(t[r],e);return s}var De=P;const Oe="51.1.1";let Fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ke=(t=21)=>{let e="",s=t;for(;s--;)e+=Fe[Math.random()*64|0];return e};class Be{constructor({id:e=null,created:s=null}={}){this.id=e||Ke(),this.created=s||new Date().getTime(),this.cancelSource=x.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,S(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class v{constructor(){if(v.instance)return v.instance;this.requests={},v.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}}}var T=new v;class I{}F(I,"cancelById",(e,s)=>{try{T.getById(e).cancel(s),T.deleteById(e)}catch{}}),F(I,"cancelAll",e=>T.getAll().forEach(s=>{s.cancel(e),T.deleteById(s.id)}));var Le={cancelAll:(...t)=>I.cancelAll(...t)};const b={request:"request",response:"response"},V=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function C({options:t}){const e=s();function s(){return x.default.create(n())}function r(){return e}function n(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let c=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(c=`${c}/${t.apiVersion}`),t.organizationId&&(c=`${c}/organizations/${t.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Oe}`};return t.apiKey&&(c["REB-APIKEY"]=t.apiKey),c}function l(){return De(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function h(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 D({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function O({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function J(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return V(c)&&e.interceptors[b[c]].use(i,g)}function G(c,i){return V(c)&&e.interceptors[b[c]].eject(i)}function Vs({thenDelegate:c,catchDelegate:i=()=>{}}){return J(b.request,{thenDelegate:c,catchDelegate:i})}function Ws(c){G(b.request,c)}function Js({thenDelegate:c,catchDelegate:i=()=>{}}){return J(b.response,{thenDelegate:c,catchDelegate:i})}function Gs(c){G(b.response,c)}function d({request:c,isCollection:i,config:g}){const m=_(g),{id:A,cancelToken:sr}=T.save();m.cancelToken=sr;const H=async function(){try{const E=await c(m);return Ys({response:E,isCollection:i,config:m})}catch(E){return Y({error:E,config:m})}finally{T.deleteById(A)}}();return H.cancel=E=>I.cancelById(A,E),H}function Ys({response:c,isCollection:i,config:g}){return i?new ee(c,g):new K(c,g)}function Y({error:c}){if(x.default.isCancel(c))throw new p.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new p.RebillyForbiddenError(c);case 404:throw new p.RebillyNotFoundError(c);case 405:throw new p.RebillyMethodNotAllowedError(c);case 409:throw new p.RebillyConflictError(c);case 422:throw new p.RebillyValidationError(c);default:throw new p.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new p.RebillyTimeoutError(c):new p.RebillyRequestError(c)}function _s(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 _(c={}){return{..._s(c)}}function Q(c,i={}){return d({request:g=>e.get(c,g),config:{params:i}})}function Qs(c,i){return d({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function X(c,i,g={}){let m={};return g.authenticate===!1&&(m={headers:l()},delete m.headers.common["REB-APIKEY"],delete m.headers.common.Authorization),g.params&&(m.params={...g.params}),d({request:A=>e.post(c,i,A),config:m})}function Z(c,i,g={}){return d({request:m=>e.put(c,i,m),config:{params:g}})}function Xs(c,i){return d({request:g=>e.patch(c,i,g),config:{}})}function Zs(c){return d({request:i=>e.delete(c,i),config:{}})}function Hs(c,i){return d({request:g=>e.delete(c,g),config:{data:{...i}}})}async function er(c,i,g,m={}){if(i==="")return X(c,g,{params:m});try{if((await Q(c)).response.status===200)throw new p.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(A){if(A.name==="RebillyNotFoundError")return Z(c,g,m);throw A}}async function tr(c,i){const g=_(i);try{const m=await e.get(c,g);return new te(m,g)}catch(m){return Y({error:m,config:g})}}return{getInstance:r,addRequestInterceptor:Vs,removeRequestInterceptor:Ws,addResponseInterceptor:Js,removeResponseInterceptor:Gs,setTimeout:a,setProxyAgent:D,setSessionToken:h,setPublishableKey:k,setEndpoints:O,get:Q,getAll:Qs,post:X,put:Z,patch:Xs,delete:Zs,deleteAll:Hs,create:er,download:tr}}function Ne({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ue({apiHandler:t}){return{getAll({firstName:e,lastName:s,dob:r=null,country:n=null}){const u={firstName:e,lastName:s,dob:r,country:n};return t.get("aml",u)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function We({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null}={}){const n={limit:e,offset:s,sort:r};return t.getAll("api-keys",n)},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 Je({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:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,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:r=null}){const n={limit:s,offset:r};return t.getAll(`applications/${e}/instances`,n)},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:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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:r=null,filter:n=null}={}){const u={limit:e,offset:s,sort:r,filter:n};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`cashier-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`cashier-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`cashier-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`cashier-custom-property-sets/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-requests",u)},create({data:e}){return t.post("cashier-requests",e)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`cashier-requests/${e}`,r)}}}function et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("cashier-strategies",u)},create({id:e="",data:s}){return t.create(`cashier-strategies/${e}`,e,s)},get({id:e}){return t.get(`cashier-strategies/${e}`)},update({id:e,data:s}){return t.put(`cashier-strategies/${e}`,s)},delete({id:e}){return t.delete(`cashier-strategies/${e}`)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 st({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,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 rt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("credit-memos",o)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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 nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function ut({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`custom-fields/${e}`,n)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:r}){return t.put(`custom-fields/${e}/${s}`,r)},update({resource:e,name:s,data:r}){return t.put(`custom-fields/${e}/${s}`,r)}}}function ot({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 r={limit:e,offset:s};return t.getAll("authentication-tokens",r)},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 r={limit:e,offset:s};return t.getAll("credentials",r)},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 r={limit:e,offset:s};return t.getAll("password-tokens",r)},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 lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`customers/${e}`,e,s,n)},get({id:e,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return t.get(`customers/${e}`,n)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`customers/${e}`,s,n)},merge({id:e,targetCustomerId:s}){return t.delete(`customers/${e}?targetCustomerId=${s}`)},getAml({id:e}){return t.get(`customers/${e}/aml`)},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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:s}){return t.patch(`customers/${e}/edd-score`,s)},getEddTimelineCollection({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:s}){return t.post(`customers/${e}/edd-timeline`,s)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},deleteEddTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`customers/${e}/edd-search-results`,n)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ct({apiHandler:t}){return{create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return t.post("digital-wallets/validation",e)}}}function it({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`disputes/${e}`,e,s,n)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`disputes/${e}`,s,n)}}}function gt({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:s}){return t.patch(`email-delivery-settings/${e}`,s)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function at({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:e,offset:s,q:r,sort:n,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:s={status:"outbox"}}){return t.patch(`email-messages/${e}`,s)}}}function mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function ft({apiHandler:t}){return{getAll(){return t.getAll("events")},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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:r=null}){const n={fields:r};return t.get(`events/${e}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:e,version:s,fields:r=null}){const n={fields:r};return t.get(`events/${e}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:e,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return 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:r=null}){const n={fields:r};return t.get(`events/${e}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:e,id:s,data:r}){return t.put(`events/${e}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function $t({apiHandler:t}){return{get({resource:e,resourceId:s,service:r}){return t.get(`${e}/${s}/external-identifiers/${r}`)},sync({resource:e,resourceId:s,service:r}){return t.post(`${e}/${s}/external-identifiers/${r}`)},update({resource:e,resourceId:s,service:r,data:n}){return t.put(`${e}/${s}/external-identifiers/${r}`,n)},delete({resource:e,resourceId:s,service:r}){return t.delete(`${e}/${s}/external-identifiers/${r}`)}}}function ht({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("fees",u)},create({id:e="",data:s}){return t.create(`fees/${e}`,e,s)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:s}){return t.put(`fees/${e}`,s)},delete({id:e}){return t.delete(`fees/${e}`)},patch({id:e,data:s}){return t.patch(`fees/${e}`,s)}}}function yt({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`attachments/${e}`,e,s,n)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`attachments/${e}`,s,n)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:r,q:n,fields:u,sort:o};return t.getAll("files",l)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data: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 r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));r=[...r,a],await Promise.all(a);const h=t.delete(`files/${e}`);return r.push(h),h})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:e});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,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}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},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:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,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:r}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,r)},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:r}){return t.put(`gateway-accounts/${e}/limits/${s}`,r)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`gateway-accounts/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`gateway-accounts/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`gateway-accounts/${e}/timeline/${s}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:s}){return t.put(`gateway-accounts/${e}/financial-settings`,s)}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("integrations",r)},get({label:e}){return t.get(`integrations/${e}`)}}}const q={Accept:"application/pdf"};function bt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,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 r={expand:s};return t.get(`invoices/${e}`,r)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};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:r}){return t.put(`invoices/${e}/items/${s}`,r)},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:r=null}){const n={limit:s,offset:r};return t.getAll(`invoices/${e}/transaction-allocations`,n)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return 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:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function wt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("journal-accounts",u)},createAccount({id:e="",data:s}){return t.create(`journal-accounts/${e}`,e,s)},getAccount({id:e}){return t.get(`journal-accounts/${e}`)},updateAccount({id:e,data:s}){return t.put(`journal-accounts/${e}`,s)}}}function kt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("journal-entries",u)},createEntry({id:e="",data:s}){return t.create(`journal-entries/${e}`,e,s)},getEntry({id:e}){return t.get(`journal-entries/${e}`)},updateEntry({id:e,data:s}){return t.put(`journal-entries/${e}`,s)},getAllRecords({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,expand:o=null}){const l={limit:s,offset:r,filter:n,sort:u,expand:o};return t.getAll(`journal-entries/${e}/records`,l)},createRecord({id:e,data:s}){return t.post(`journal-entries/${e}/records`,s)},getRecord({id:e,journalRecordId:s}){return t.get(`journal-entries/${e}/records/${s}`)},updateRecord({id:e,journalRecordId:s,data:r}){return t.put(`journal-entries/${e}/records/${s}`,r)},deleteRecord({id:e,journalRecordId:s}){return t.delete(`journal-entries/${e}/records/${s}`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,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 Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function vt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,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 St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:r}){return t.put(`memberships/${e}/${s}`,r)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function It({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const r={limit:e,q:s};return t.getAll("payment-cards-bank-names",r)}}}function Pt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("payment-methods",r)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("tokens",r)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)}}}function Dt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ot({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Ft({apiHandler:t}){return{sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)},order({data:e}){return t.post("previews/orders",e)}}}function Kt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},create({id:e="",data:s}){return t.create(`products/${e}`,e,s)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:s}){return t.put(`products/${e}`,s)},delete({id:e}){return t.delete(`products/${e}`)}}}function Bt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Lt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Nt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,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 r={expand:s};return t.get(`quotes/${e}`,r)},update({id:e,data:s}){return t.put(`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:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function zt({apiHandler:t}){return{get({resource:e,resourceId:s,service:r}){return t.get(`${e}/${s}/external-identifiers/${r}`)},sync({resource:e,resourceId:s,service:r}){return t.post(`${e}/${s}/external-identifiers/${r}`)},update({resource:e,resourceId:s,service:r,data:n}){return t.put(`${e}/${s}/external-identifiers/${r}`,n)},delete({resource:e,resourceId:s,service:r}){return t.delete(`${e}/${s}/external-identifiers/${r}`)}}}function Ut({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Vt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,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 r={expand:s};return t.get(`roles/${e}`,r)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Wt({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:e,limit:s,offset:r,q:n};return t.get("search",u)}}}function Jt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 Gt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Yt({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return 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:r}){return t.patch(`service-credentials/${e}/${s}`,r)},getItems({type:e,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const h={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,h)}}}function _t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,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 Qt({apiHandler:t}){return{get(){return t.get("status")}}}function Xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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 Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};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 Ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function es({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`subscriptions/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`subscriptions/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`subscriptions/${e}`,s,n)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const r={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,r)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:r}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return 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 ts({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data: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}`)}}}function ss({apiHandler:t}){return{getAllTagsRules({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tags-rules",o)},createTagsRule({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},getTagsRule({id:e}){return t.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},deleteTagsRule({id:e}){return t.delete(`tags-rules/${e}`)}}}function rs({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,q:u,expand:o};return t.getAll("tracking/api",l)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)}}}function ns({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:r,q:n,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const r={expand:s};return t.post("transactions",e,r)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`transactions/${e}`,r)},patch({id:e,data:s}){return t.patch(`transactions/${e}`,s)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:s}){return t.post(`transactions/${e}/update`,s)},refund({id:e,data:s}){return t.post(`transactions/${e}/refund`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,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 us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("usages",o)},create({id:e="",data:s}){return t.create(`usages/${e}`,e,s)},get({id:e}){return t.get(`usages/${e}`)},update({id:e,data:s}){return t.put(`usages/${e}`,s)},delete({id:e}){return t.delete(`usages/${e}`)}}}function os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,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 ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null}={}){const n={limit:e,offset:s,filter:r};return t.getAll("webhooks",n)},create({id:e="",data:s}){return t.create(`webhooks/${e}`,e,s)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:s}){return t.put(`webhooks/${e}`,s)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:e,offset:s,q:r,filter:n,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 is{constructor({apiHandler:e}){this.account=Ne({apiHandler:e}),this.amlChecks=ze({apiHandler:e}),this.aml=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=We({apiHandler:e}),this.applicationInstances=Je({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=_e({apiHandler:e}),this.blocklists=Qe({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashierCustomPropertySets=Ze({apiHandler:e}),this.cashierRequests=He({apiHandler:e}),this.cashierStrategies=et({apiHandler:e}),this.checkoutForms=tt({apiHandler:e}),this.coupons=st({apiHandler:e}),this.creditMemos=rt({apiHandler:e}),this.customDomains=nt({apiHandler:e}),this.customFields=ut({apiHandler:e}),this.customerAuthentication=ot({apiHandler:e}),this.customers=lt({apiHandler:e}),this.digitalWallets=ct({apiHandler:e}),this.disputes=it({apiHandler:e}),this.emailDeliverySettings=gt({apiHandler:e}),this.emailMessages=at({apiHandler:e}),this.emailNotifications=mt({apiHandler:e}),this.events=ft({apiHandler:e}),this.externalIdentifiers=$t({apiHandler:e}),this.externalServicesSettings=ht({apiHandler:e}),this.fees=pt({apiHandler:e}),this.files=yt({apiHandler:e}),this.gatewayAccounts=At({apiHandler:e}),this.integrations=Rt({apiHandler:e}),this.invoices=bt({apiHandler:e}),this.journalAccounts=wt({apiHandler:e}),this.journalEntries=kt({apiHandler:e}),this.kycDocuments=dt({apiHandler:e}),this.kycRequests=Tt({apiHandler:e}),this.kycSettings=vt({apiHandler:e}),this.lists=Et({apiHandler:e}),this.memberships=St({apiHandler:e}),this.organizationExports=It({apiHandler:e}),this.organizations=qt({apiHandler:e}),this.paymentCardsBankNames=xt({apiHandler:e}),this.paymentInstruments=Pt({apiHandler:e}),this.paymentMethods=Ct({apiHandler:e}),this.paymentTokens=jt({apiHandler:e}),this.payoutRequests=Mt({apiHandler:e}),this.payouts=Dt({apiHandler:e}),this.plans=Ot({apiHandler:e}),this.previews=Ft({apiHandler:e}),this.products=Kt({apiHandler:e}),this.profile=Bt({apiHandler:e}),this.purchase=Lt({apiHandler:e}),this.quotes=Nt({apiHandler:e}),this.resource=zt({apiHandler:e}),this.riskScoreRules=Ut({apiHandler:e}),this.roles=Vt({apiHandler:e}),this.search=Wt({apiHandler:e}),this.segments=Jt({apiHandler:e}),this.sendThroughAttribution=Gt({apiHandler:e}),this.serviceCredentials=Yt({apiHandler:e}),this.shippingRates=_t({apiHandler:e}),this.status=Qt({apiHandler:e}),this.subscriptionCancellations=Xt({apiHandler:e}),this.subscriptionPauses=Zt({apiHandler:e}),this.subscriptionReactivations=Ht({apiHandler:e}),this.subscriptions=es({apiHandler:e}),this.tags=ts({apiHandler:e}),this.tagsRules=ss({apiHandler:e}),this.tracking=rs({apiHandler:e}),this.transactions=ns({apiHandler:e}),this.usages=us({apiHandler:e}),this.users=os({apiHandler:e}),this.webhooks=ls({apiHandler:e}),this.websites=cs({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 gs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function as({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`data-exports/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`data-exports/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`data-exports/${e}`,s,n)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function ms({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function fs({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:s,metrics:r=null,segments:n=null}){const u={periodStart:e,periodEnd:s,metrics:r,segments:n};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:s,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:r,offset:n,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const h={currency:e,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",h)},getKycAcceptanceSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e,periodEnd:s}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:r,limit:n,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r=null,periodStart:n,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:s,includeRefunds:r=null,includeDisputes:n=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:h=null,sort:k=null,criteria:D=null}){const O={aggregationField:e,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:k,criteria:D};return t.get("reports/retention-value",O)},getRevenueWaterfall({currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n}){const u={currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:s=null,limit:r=null,offset:n=null}){const u={filter:e,sort:s,limit:r,offset:n};return t.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:s,aggregationField:r,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:s,limit:r=null,offset:n=null}){const u={periodStart:e,periodEnd:s,limit:r,offset:n};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e,periodEnd:s,accountingMethod:r,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:r,limit:n,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e,subaggregate:s,periodStart:r,periodEnd:n,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e,periodStart:s,periodEnd:r,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:s,aggregationField:r,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return t.get("reports/transactions",l)}}}function $s({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function hs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:r=0}){const n={eventTypes:e,limit:s,offset:r};return t.getAll("activity-feed",n)},getTransaction({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`customers/${e}/timeline`,u)}}}function ps({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:gs,DataExportsResource:as,HistogramsResource:ms,ReportsResource:fs,SubscriptionsResource:$s,TimelinesResource:hs,LocationResource:ps};class ys{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 As({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 Rs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function bs({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ws({apiHandler:t}){return{create({data:e}){return t.post("cashier-deposit",e)}}}function ks({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`cashier-requests/${e}`,r)}}}function ds({apiHandler:t}){return{get({id:e}){return t.get(`cashier-strategies/${e}`)}}}function Ts({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function vs({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`custom-fields/${e}`,n)}}}function Es({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("invoices",o)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Ss({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("kyc-documents",r)},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 Is({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function qs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("orders",o)},get({id:e}){return t.get(`orders/${e}`)},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 xs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.get(`payment-instruments/${e}`,n)},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 Ps({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payout-requests",o)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function Cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`plans/${e}`,r)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ms({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 Ds({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`quotes/${e}`,r)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Fs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ks{constructor({apiHandler:e}){this.account=As({apiHandler:e}),this.authorization=Rs({apiHandler:e}),this.billingPortals=bs({apiHandler:e}),this.cashierDeposit=ws({apiHandler:e}),this.cashierRequests=ks({apiHandler:e}),this.cashierStrategies=ds({apiHandler:e}),this.checkoutForms=Ts({apiHandler:e}),this.customFields=vs({apiHandler:e}),this.invoices=Es({apiHandler:e}),this.kycDocuments=Ss({apiHandler:e}),this.kycRequests=Is({apiHandler:e}),this.orders=qs({apiHandler:e}),this.paymentInstruments=xs({apiHandler:e}),this.payoutRequests=Ps({apiHandler:e}),this.plans=Cs({apiHandler:e}),this.products=js({apiHandler:e}),this.purchase=Ms({apiHandler:e}),this.quotes=Ds({apiHandler:e}),this.transactions=Os({apiHandler:e}),this.websites=Fs({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 Bs({apiHandler:t}){return new is({apiHandler:t})}function Ls({apiHandler:t}){return new ys({apiHandler:t})}function Ns({apiHandler:t}){return new Ks({apiHandler:t})}const j={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},M=6e3;function W({apiKey:t=null,sandbox:e=!1,timeout:s=M,organizationId:r=null,urls:n=j}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=C({options:{apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r}});return Bs({apiHandler:o})}function zs({apiKey:t=null,sandbox:e=!1,timeout:s=M,organizationId:r=null,urls:n=j}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o=C({options:{apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r}});return Ls({apiHandler:o})}function Us({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:r=M,organizationId:n=null,urls:u=j}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n},l=C({options:o});return l.setSessionToken(o.jwt),Ns({apiHandler:l})}f.RebillyAPI=W,f.RebillyErrors=p,f.RebillyExperimentalAPI=zs,f.RebillyStorefrontAPI=Us,f.cancellation=Le,f.default=W,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|