rebilly-js-sdk 54.2.2 → 54.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [54.3.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v54.2.2...rebilly-js-sdk-v54.3.0) (2023-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **rebilly-js-sdk:** Add patch method to quotes resource ([#1896](https://github.com/Rebilly/rebilly/issues/1896)) ([9670b45](https://github.com/Rebilly/rebilly/commit/9670b450e3700a272b45683c5e28c8e6c829e242))
|
|
7
|
+
|
|
1
8
|
## [54.2.2](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v54.2.1...rebilly-js-sdk-v54.2.2) (2023-10-16)
|
|
2
9
|
|
|
3
10
|
|
package/dist/rebilly-js-sdk.d.ts
CHANGED
|
@@ -594,6 +594,9 @@ declare module rebilly {
|
|
|
594
594
|
type PutQuoteRequest = operations['PutQuote']['requestBody']['content']['application/json']
|
|
595
595
|
type PutQuoteResponse = operations['PutQuote']['responses']['201']['content']['application/json']
|
|
596
596
|
type PutQuoteResponsePromise = Promise<{fields: PutQuoteResponse}>
|
|
597
|
+
type PatchQuoteRequest = operations['PatchQuote']['requestBody']['content']['application/json']
|
|
598
|
+
type PatchQuoteResponse = operations['PatchQuote']['responses']['200']['content']['application/json']
|
|
599
|
+
type PatchQuoteResponsePromise = Promise<{fields: PatchQuoteResponse}>
|
|
597
600
|
|
|
598
601
|
type PostQuoteAcceptanceResponse = operations['PostQuoteAcceptance']['responses']['200']['content']['application/json']
|
|
599
602
|
type PostQuoteAcceptanceResponsePromise = Promise<{fields: PostQuoteAcceptanceResponse}>
|
|
@@ -3172,6 +3175,12 @@ export interface corePaths {
|
|
|
3172
3175
|
* The update operation can only be used for quotes with a `status` of `draft`.
|
|
3173
3176
|
*/
|
|
3174
3177
|
put: operations["PutQuote"];
|
|
3178
|
+
/**
|
|
3179
|
+
* Partially updates a quote with a specified ID.
|
|
3180
|
+
*
|
|
3181
|
+
* The update operation can only be used for quotes with a `status` of `draft`.
|
|
3182
|
+
*/
|
|
3183
|
+
patch: operations["PatchQuote"];
|
|
3175
3184
|
parameters: {
|
|
3176
3185
|
path: {
|
|
3177
3186
|
/** ID of the resource. */
|
|
@@ -4754,6 +4763,15 @@ export interface coreComponents {
|
|
|
4754
4763
|
/** Customer IDs on which a coupon can be applied. */
|
|
4755
4764
|
customerIds: string[];
|
|
4756
4765
|
};
|
|
4766
|
+
/**
|
|
4767
|
+
* Restricts a coupon so that it cannot be used in combination with other coupons.
|
|
4768
|
+
* If more than one coupon is active, a coupon with this restriction is only applied if it provides a larger discount than the other coupons combined.
|
|
4769
|
+
* If a coupon with this restriction is applied, all other coupons are removed.
|
|
4770
|
+
*/
|
|
4771
|
+
CouponRestrictionExclusiveApplication: {
|
|
4772
|
+
/** Type of coupon restriction. */
|
|
4773
|
+
type: "restrict-to-exclusive-application";
|
|
4774
|
+
};
|
|
4757
4775
|
/** Restricts the number of times a coupon can be redeemed by different customers. */
|
|
4758
4776
|
CouponRestrictionTotalRedemptions: {
|
|
4759
4777
|
/** Type of coupon restriction. */
|
|
@@ -4789,11 +4807,13 @@ export interface coreComponents {
|
|
|
4789
4807
|
CouponRestriction: Partial<
|
|
4790
4808
|
coreComponents["schemas"]["CouponRestrictionDiscountPerRedemption"]
|
|
4791
4809
|
> &
|
|
4810
|
+
Partial<coreComponents["schemas"]["CouponRestrictionExclusiveApplication"]> &
|
|
4792
4811
|
Partial<coreComponents["schemas"]["CouponRestrictionMinimumOrderAmount"]> &
|
|
4793
4812
|
Partial<coreComponents["schemas"]["CouponRestrictionPaidByTime"]> &
|
|
4794
4813
|
Partial<
|
|
4795
4814
|
coreComponents["schemas"]["CouponRestrictionRedemptionsPerCustomer"]
|
|
4796
4815
|
> &
|
|
4816
|
+
Partial<coreComponents["schemas"]["CouponRestrictionRestrictToBxgy"]> &
|
|
4797
4817
|
Partial<coreComponents["schemas"]["CouponRestrictionRestrictToCountries"]> &
|
|
4798
4818
|
Partial<coreComponents["schemas"]["CouponRestrictionRestrictToCustomers"]> &
|
|
4799
4819
|
Partial<coreComponents["schemas"]["CouponRestrictionRestrictToInvoices"]> &
|
|
@@ -4802,8 +4822,7 @@ export interface coreComponents {
|
|
|
4802
4822
|
Partial<
|
|
4803
4823
|
coreComponents["schemas"]["CouponRestrictionRestrictToSubscriptions"]
|
|
4804
4824
|
> &
|
|
4805
|
-
Partial<coreComponents["schemas"]["CouponRestrictionTotalRedemptions"]
|
|
4806
|
-
Partial<coreComponents["schemas"]["CouponRestrictionRestrictToBxgy"]>;
|
|
4825
|
+
Partial<coreComponents["schemas"]["CouponRestrictionTotalRedemptions"]>;
|
|
4807
4826
|
/** Coupons and discounts. */
|
|
4808
4827
|
Coupon: {
|
|
4809
4828
|
/** ID of the coupon. This value is also known as the coupon redemption code. */
|
|
@@ -6162,52 +6181,35 @@ export interface coreComponents {
|
|
|
6162
6181
|
city?: string | null;
|
|
6163
6182
|
} | null;
|
|
6164
6183
|
};
|
|
6165
|
-
InvoiceTaxItem: {
|
|
6166
|
-
rate?: { [key: string]: any };
|
|
6167
|
-
stateAmount?: { [key: string]: any };
|
|
6168
|
-
countyAmount?: { [key: string]: any };
|
|
6169
|
-
cityAmount?: { [key: string]: any };
|
|
6170
|
-
specialDistrictAmount?: { [key: string]: any };
|
|
6171
|
-
stateRate?: { [key: string]: any };
|
|
6172
|
-
countyRate?: { [key: string]: any };
|
|
6173
|
-
cityRate?: { [key: string]: any };
|
|
6174
|
-
specialDistrictRate?: { [key: string]: any };
|
|
6175
|
-
jurisdictions?: {
|
|
6176
|
-
country?: { [key: string]: any };
|
|
6177
|
-
state?: { [key: string]: any };
|
|
6178
|
-
county?: { [key: string]: any };
|
|
6179
|
-
city?: { [key: string]: any };
|
|
6180
|
-
};
|
|
6181
|
-
} & coreComponents["schemas"]["TaxItem"];
|
|
6182
6184
|
/** Manual tax calculator. */
|
|
6183
6185
|
manual: {
|
|
6184
6186
|
/** Type of tax calculator. */
|
|
6185
6187
|
calculator: "manual";
|
|
6186
|
-
/** Total amount of
|
|
6188
|
+
/** Total amount of taxes. */
|
|
6187
6189
|
amount?: number;
|
|
6188
|
-
/** Taxes applied
|
|
6189
|
-
items: coreComponents["schemas"]["
|
|
6190
|
+
/** Taxes applied. */
|
|
6191
|
+
items: coreComponents["schemas"]["TaxItem"][];
|
|
6190
6192
|
};
|
|
6191
6193
|
/** TaxJar tax calculator. */
|
|
6192
6194
|
"rebilly-taxjar": {
|
|
6193
6195
|
/** Type of tax calculator. */
|
|
6194
6196
|
calculator: "rebilly-taxjar";
|
|
6195
|
-
/** Total amount of
|
|
6197
|
+
/** Total amount of taxes. */
|
|
6196
6198
|
amount?: number;
|
|
6197
|
-
/** Taxes
|
|
6198
|
-
items?: coreComponents["schemas"]["
|
|
6199
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
6200
|
+
items?: coreComponents["schemas"]["TaxItem"][];
|
|
6199
6201
|
};
|
|
6200
6202
|
/** Avalara tax calculator. */
|
|
6201
6203
|
"rebilly-avalara": {
|
|
6202
6204
|
/** Type of tax calculator. */
|
|
6203
6205
|
calculator: "rebilly-avalara";
|
|
6204
|
-
/** Total amount of
|
|
6206
|
+
/** Total amount of taxes. */
|
|
6205
6207
|
amount?: number;
|
|
6206
|
-
/** Taxes
|
|
6207
|
-
items?: coreComponents["schemas"]["
|
|
6208
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
6209
|
+
items?: coreComponents["schemas"]["TaxItem"][];
|
|
6208
6210
|
};
|
|
6209
|
-
/**
|
|
6210
|
-
|
|
6211
|
+
/** Taxes. */
|
|
6212
|
+
Taxes: Partial<coreComponents["schemas"]["manual"]> &
|
|
6211
6213
|
Partial<coreComponents["schemas"]["rebilly-taxjar"]> &
|
|
6212
6214
|
Partial<coreComponents["schemas"]["rebilly-avalara"]>;
|
|
6213
6215
|
InvoiceItem: {
|
|
@@ -6244,7 +6246,7 @@ export interface coreComponents {
|
|
|
6244
6246
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
6245
6247
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
6246
6248
|
/** Invoice item tax. */
|
|
6247
|
-
tax?: coreComponents["schemas"]["
|
|
6249
|
+
tax?: coreComponents["schemas"]["TaxItem"] | null;
|
|
6248
6250
|
/** Related links. */
|
|
6249
6251
|
_links?: {
|
|
6250
6252
|
/** Link URL. */
|
|
@@ -7243,7 +7245,7 @@ export interface coreComponents {
|
|
|
7243
7245
|
/** Discount amount that is applied to the invoice. */
|
|
7244
7246
|
discountAmount?: number;
|
|
7245
7247
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
7246
|
-
tax?: coreComponents["schemas"]["
|
|
7248
|
+
tax?: coreComponents["schemas"]["Taxes"];
|
|
7247
7249
|
/** Organization tax ID number that is displayed on the invoice. */
|
|
7248
7250
|
organizationTaxIdNumber?: {
|
|
7249
7251
|
/** Type of the tax ID number. */
|
|
@@ -7473,6 +7475,41 @@ export interface coreComponents {
|
|
|
7473
7475
|
occurredTime?: coreComponents["schemas"]["ServerTimestamp"];
|
|
7474
7476
|
_links?: coreComponents["schemas"]["SelfLink"];
|
|
7475
7477
|
};
|
|
7478
|
+
CreditMemoTaxItem: {
|
|
7479
|
+
/** Amount of the tax. */
|
|
7480
|
+
amount: number;
|
|
7481
|
+
/** Description of the tax. */
|
|
7482
|
+
description: string;
|
|
7483
|
+
/** Overall sales tax rate which includes state, county, city and district tax. */
|
|
7484
|
+
rate?: number | null;
|
|
7485
|
+
/** Amount of sales tax to collect for the state. */
|
|
7486
|
+
stateAmount?: number | null;
|
|
7487
|
+
/** Amount of sales tax to collect for the county. */
|
|
7488
|
+
countyAmount?: number | null;
|
|
7489
|
+
/** Amount of sales tax to collect for the city. */
|
|
7490
|
+
cityAmount?: number | null;
|
|
7491
|
+
/** Amount of sales tax to collect for the special district. */
|
|
7492
|
+
specialDistrictAmount?: number | null;
|
|
7493
|
+
/** State sales tax rate for given location. */
|
|
7494
|
+
stateRate?: number | null;
|
|
7495
|
+
/** County sales tax rate for given location. */
|
|
7496
|
+
countyRate?: number | null;
|
|
7497
|
+
/** City sales tax rate for given location. */
|
|
7498
|
+
cityRate?: number | null;
|
|
7499
|
+
/** Special district sales tax rate for given location. */
|
|
7500
|
+
specialDistrictRate?: number | null;
|
|
7501
|
+
/** Jurisdiction names for the invoice. */
|
|
7502
|
+
jurisdictions?: {
|
|
7503
|
+
/** Two-letter ISO country code for the provided location. */
|
|
7504
|
+
country?: string | null;
|
|
7505
|
+
/** Postal abbreviated state name for the provided location. */
|
|
7506
|
+
state?: string | null;
|
|
7507
|
+
/** County name for the provided location. */
|
|
7508
|
+
county?: string | null;
|
|
7509
|
+
/** City name for the provided location. */
|
|
7510
|
+
city?: string | null;
|
|
7511
|
+
} | null;
|
|
7512
|
+
};
|
|
7476
7513
|
/** Credit memo object. */
|
|
7477
7514
|
CreditMemo: {
|
|
7478
7515
|
/** ID of the credit memo. */
|
|
@@ -7546,7 +7583,7 @@ export interface coreComponents {
|
|
|
7546
7583
|
/** ID of the related plan. */
|
|
7547
7584
|
planId?: string | null;
|
|
7548
7585
|
/** Credit memo item tax. */
|
|
7549
|
-
tax?: coreComponents["schemas"]["
|
|
7586
|
+
tax?: coreComponents["schemas"]["CreditMemoTaxItem"] | null;
|
|
7550
7587
|
}[];
|
|
7551
7588
|
/** Status of the credit memo. */
|
|
7552
7589
|
status?: "issued" | "applied" | "partially-applied" | "voided";
|
|
@@ -7656,7 +7693,7 @@ export interface coreComponents {
|
|
|
7656
7693
|
/** ID of the related plan. */
|
|
7657
7694
|
planId?: string | null;
|
|
7658
7695
|
/** Credit memo item tax. */
|
|
7659
|
-
tax?: coreComponents["schemas"]["
|
|
7696
|
+
tax?: coreComponents["schemas"]["CreditMemoTaxItem"] | null;
|
|
7660
7697
|
}[];
|
|
7661
7698
|
/** Reason for the credit memo. */
|
|
7662
7699
|
reason?:
|
|
@@ -9733,6 +9770,7 @@ export interface coreComponents {
|
|
|
9733
9770
|
organizationPrintedName: string | null;
|
|
9734
9771
|
};
|
|
9735
9772
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
9773
|
+
tax?: coreComponents["schemas"]["Taxes"];
|
|
9736
9774
|
/**
|
|
9737
9775
|
* List of coupons to redeem on the customer and apply to the order when the quote is accepted.
|
|
9738
9776
|
*
|
|
@@ -9753,6 +9791,10 @@ export interface coreComponents {
|
|
|
9753
9791
|
order?: { [key: string]: any };
|
|
9754
9792
|
};
|
|
9755
9793
|
};
|
|
9794
|
+
/** Patch quote object. */
|
|
9795
|
+
PatchQuote: {
|
|
9796
|
+
tax?: coreComponents["schemas"]["Taxes"];
|
|
9797
|
+
};
|
|
9756
9798
|
QuoteTimeline: {
|
|
9757
9799
|
/** ID of the timeline message. */
|
|
9758
9800
|
id?: string;
|
|
@@ -10596,7 +10638,7 @@ export interface coreComponents {
|
|
|
10596
10638
|
createdTime?: coreComponents["schemas"]["CreatedTime"];
|
|
10597
10639
|
updatedTime?: coreComponents["schemas"]["UpdatedTime"];
|
|
10598
10640
|
/** Invoice item tax. */
|
|
10599
|
-
tax?: coreComponents["schemas"]["
|
|
10641
|
+
tax?: coreComponents["schemas"]["TaxItem"];
|
|
10600
10642
|
/** Related links. */
|
|
10601
10643
|
_links?: {
|
|
10602
10644
|
/** Link URL. */
|
|
@@ -10638,7 +10680,7 @@ export interface coreComponents {
|
|
|
10638
10680
|
/** Discount amount that is applied to the invoice. */
|
|
10639
10681
|
discountAmount?: number;
|
|
10640
10682
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
10641
|
-
tax?: coreComponents["schemas"]["
|
|
10683
|
+
tax?: coreComponents["schemas"]["Taxes"];
|
|
10642
10684
|
/** Organization tax ID number that is displayed on the invoice. */
|
|
10643
10685
|
organizationTaxIdNumber?: {
|
|
10644
10686
|
/** Type of the tax ID number. */
|
|
@@ -16879,6 +16921,36 @@ export interface operations {
|
|
|
16879
16921
|
};
|
|
16880
16922
|
};
|
|
16881
16923
|
};
|
|
16924
|
+
/**
|
|
16925
|
+
* Partially updates a quote with a specified ID.
|
|
16926
|
+
*
|
|
16927
|
+
* The update operation can only be used for quotes with a `status` of `draft`.
|
|
16928
|
+
*/
|
|
16929
|
+
PatchQuote: {
|
|
16930
|
+
parameters: {
|
|
16931
|
+
path: {
|
|
16932
|
+
/** ID of the resource. */
|
|
16933
|
+
id: coreComponents["parameters"]["resourceId"];
|
|
16934
|
+
};
|
|
16935
|
+
};
|
|
16936
|
+
responses: {
|
|
16937
|
+
/** Quote updated. */
|
|
16938
|
+
200: {
|
|
16939
|
+
content: {
|
|
16940
|
+
"application/json": coreComponents["schemas"]["Quote"];
|
|
16941
|
+
};
|
|
16942
|
+
};
|
|
16943
|
+
401: coreComponents["responses"]["Unauthorized"];
|
|
16944
|
+
403: coreComponents["responses"]["Forbidden"];
|
|
16945
|
+
404: coreComponents["responses"]["NotFound"];
|
|
16946
|
+
422: coreComponents["responses"]["ValidationError"];
|
|
16947
|
+
};
|
|
16948
|
+
requestBody: {
|
|
16949
|
+
content: {
|
|
16950
|
+
"application/json": coreComponents["schemas"]["PatchQuote"];
|
|
16951
|
+
};
|
|
16952
|
+
};
|
|
16953
|
+
};
|
|
16882
16954
|
/** Accepts an issued quote with a specified ID. */
|
|
16883
16955
|
PostQuoteAcceptance: {
|
|
16884
16956
|
parameters: {
|
|
@@ -22179,52 +22251,35 @@ export interface usersComponents {
|
|
|
22179
22251
|
city?: string | null;
|
|
22180
22252
|
} | null;
|
|
22181
22253
|
};
|
|
22182
|
-
InvoiceTaxItem: {
|
|
22183
|
-
rate?: { [key: string]: any };
|
|
22184
|
-
stateAmount?: { [key: string]: any };
|
|
22185
|
-
countyAmount?: { [key: string]: any };
|
|
22186
|
-
cityAmount?: { [key: string]: any };
|
|
22187
|
-
specialDistrictAmount?: { [key: string]: any };
|
|
22188
|
-
stateRate?: { [key: string]: any };
|
|
22189
|
-
countyRate?: { [key: string]: any };
|
|
22190
|
-
cityRate?: { [key: string]: any };
|
|
22191
|
-
specialDistrictRate?: { [key: string]: any };
|
|
22192
|
-
jurisdictions?: {
|
|
22193
|
-
country?: { [key: string]: any };
|
|
22194
|
-
state?: { [key: string]: any };
|
|
22195
|
-
county?: { [key: string]: any };
|
|
22196
|
-
city?: { [key: string]: any };
|
|
22197
|
-
};
|
|
22198
|
-
} & usersComponents["schemas"]["TaxItem"];
|
|
22199
22254
|
/** Manual tax calculator. */
|
|
22200
22255
|
manual: {
|
|
22201
22256
|
/** Type of tax calculator. */
|
|
22202
22257
|
calculator: "manual";
|
|
22203
|
-
/** Total amount of
|
|
22258
|
+
/** Total amount of taxes. */
|
|
22204
22259
|
amount?: number;
|
|
22205
|
-
/** Taxes applied
|
|
22206
|
-
items: usersComponents["schemas"]["
|
|
22260
|
+
/** Taxes applied. */
|
|
22261
|
+
items: usersComponents["schemas"]["TaxItem"][];
|
|
22207
22262
|
};
|
|
22208
22263
|
/** TaxJar tax calculator. */
|
|
22209
22264
|
"rebilly-taxjar": {
|
|
22210
22265
|
/** Type of tax calculator. */
|
|
22211
22266
|
calculator: "rebilly-taxjar";
|
|
22212
|
-
/** Total amount of
|
|
22267
|
+
/** Total amount of taxes. */
|
|
22213
22268
|
amount?: number;
|
|
22214
|
-
/** Taxes
|
|
22215
|
-
items?: usersComponents["schemas"]["
|
|
22269
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
22270
|
+
items?: usersComponents["schemas"]["TaxItem"][];
|
|
22216
22271
|
};
|
|
22217
22272
|
/** Avalara tax calculator. */
|
|
22218
22273
|
"rebilly-avalara": {
|
|
22219
22274
|
/** Type of tax calculator. */
|
|
22220
22275
|
calculator: "rebilly-avalara";
|
|
22221
|
-
/** Total amount of
|
|
22276
|
+
/** Total amount of taxes. */
|
|
22222
22277
|
amount?: number;
|
|
22223
|
-
/** Taxes
|
|
22224
|
-
items?: usersComponents["schemas"]["
|
|
22278
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
22279
|
+
items?: usersComponents["schemas"]["TaxItem"][];
|
|
22225
22280
|
};
|
|
22226
|
-
/**
|
|
22227
|
-
|
|
22281
|
+
/** Taxes. */
|
|
22282
|
+
Taxes: Partial<usersComponents["schemas"]["manual"]> &
|
|
22228
22283
|
Partial<usersComponents["schemas"]["rebilly-taxjar"]> &
|
|
22229
22284
|
Partial<usersComponents["schemas"]["rebilly-avalara"]>;
|
|
22230
22285
|
InvoiceItem: {
|
|
@@ -22261,7 +22316,7 @@ export interface usersComponents {
|
|
|
22261
22316
|
createdTime?: usersComponents["schemas"]["CreatedTime"];
|
|
22262
22317
|
updatedTime?: usersComponents["schemas"]["UpdatedTime"];
|
|
22263
22318
|
/** Invoice item tax. */
|
|
22264
|
-
tax?: usersComponents["schemas"]["
|
|
22319
|
+
tax?: usersComponents["schemas"]["TaxItem"] | null;
|
|
22265
22320
|
/** Related links. */
|
|
22266
22321
|
_links?: {
|
|
22267
22322
|
/** Link URL. */
|
|
@@ -23260,7 +23315,7 @@ export interface usersComponents {
|
|
|
23260
23315
|
/** Discount amount that is applied to the invoice. */
|
|
23261
23316
|
discountAmount?: number;
|
|
23262
23317
|
shipping?: usersComponents["schemas"]["Shipping"];
|
|
23263
|
-
tax?: usersComponents["schemas"]["
|
|
23318
|
+
tax?: usersComponents["schemas"]["Taxes"];
|
|
23264
23319
|
/** Organization tax ID number that is displayed on the invoice. */
|
|
23265
23320
|
organizationTaxIdNumber?: {
|
|
23266
23321
|
/** Type of the tax ID number. */
|
|
@@ -35348,52 +35403,35 @@ export interface storefrontComponents {
|
|
|
35348
35403
|
city?: string | null;
|
|
35349
35404
|
} | null;
|
|
35350
35405
|
};
|
|
35351
|
-
InvoiceTaxItem: {
|
|
35352
|
-
rate?: { [key: string]: any };
|
|
35353
|
-
stateAmount?: { [key: string]: any };
|
|
35354
|
-
countyAmount?: { [key: string]: any };
|
|
35355
|
-
cityAmount?: { [key: string]: any };
|
|
35356
|
-
specialDistrictAmount?: { [key: string]: any };
|
|
35357
|
-
stateRate?: { [key: string]: any };
|
|
35358
|
-
countyRate?: { [key: string]: any };
|
|
35359
|
-
cityRate?: { [key: string]: any };
|
|
35360
|
-
specialDistrictRate?: { [key: string]: any };
|
|
35361
|
-
jurisdictions?: {
|
|
35362
|
-
country?: { [key: string]: any };
|
|
35363
|
-
state?: { [key: string]: any };
|
|
35364
|
-
county?: { [key: string]: any };
|
|
35365
|
-
city?: { [key: string]: any };
|
|
35366
|
-
};
|
|
35367
|
-
} & storefrontComponents["schemas"]["TaxItem"];
|
|
35368
35406
|
/** Manual tax calculator. */
|
|
35369
35407
|
manual: {
|
|
35370
35408
|
/** Type of tax calculator. */
|
|
35371
35409
|
calculator: "manual";
|
|
35372
|
-
/** Total amount of
|
|
35410
|
+
/** Total amount of taxes. */
|
|
35373
35411
|
amount?: number;
|
|
35374
|
-
/** Taxes applied
|
|
35375
|
-
items: storefrontComponents["schemas"]["
|
|
35412
|
+
/** Taxes applied. */
|
|
35413
|
+
items: storefrontComponents["schemas"]["TaxItem"][];
|
|
35376
35414
|
};
|
|
35377
35415
|
/** TaxJar tax calculator. */
|
|
35378
35416
|
"rebilly-taxjar": {
|
|
35379
35417
|
/** Type of tax calculator. */
|
|
35380
35418
|
calculator: "rebilly-taxjar";
|
|
35381
|
-
/** Total amount of
|
|
35419
|
+
/** Total amount of taxes. */
|
|
35382
35420
|
amount?: number;
|
|
35383
|
-
/** Taxes
|
|
35384
|
-
items?: storefrontComponents["schemas"]["
|
|
35421
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
35422
|
+
items?: storefrontComponents["schemas"]["TaxItem"][];
|
|
35385
35423
|
};
|
|
35386
35424
|
/** Avalara tax calculator. */
|
|
35387
35425
|
"rebilly-avalara": {
|
|
35388
35426
|
/** Type of tax calculator. */
|
|
35389
35427
|
calculator: "rebilly-avalara";
|
|
35390
|
-
/** Total amount of
|
|
35428
|
+
/** Total amount of taxes. */
|
|
35391
35429
|
amount?: number;
|
|
35392
|
-
/** Taxes
|
|
35393
|
-
items?: storefrontComponents["schemas"]["
|
|
35430
|
+
/** Taxes applied and calculated based on the `taxCategoryId` of the related product. */
|
|
35431
|
+
items?: storefrontComponents["schemas"]["TaxItem"][];
|
|
35394
35432
|
};
|
|
35395
|
-
/**
|
|
35396
|
-
|
|
35433
|
+
/** Taxes. */
|
|
35434
|
+
Taxes: Partial<storefrontComponents["schemas"]["manual"]> &
|
|
35397
35435
|
Partial<storefrontComponents["schemas"]["rebilly-taxjar"]> &
|
|
35398
35436
|
Partial<storefrontComponents["schemas"]["rebilly-avalara"]>;
|
|
35399
35437
|
InvoiceItem: {
|
|
@@ -35430,7 +35468,7 @@ export interface storefrontComponents {
|
|
|
35430
35468
|
createdTime?: storefrontComponents["schemas"]["CreatedTime"];
|
|
35431
35469
|
updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
|
|
35432
35470
|
/** Invoice item tax. */
|
|
35433
|
-
tax?: storefrontComponents["schemas"]["
|
|
35471
|
+
tax?: storefrontComponents["schemas"]["TaxItem"] | null;
|
|
35434
35472
|
/** Related links. */
|
|
35435
35473
|
_links?: {
|
|
35436
35474
|
/** Link URL. */
|
|
@@ -37609,7 +37647,7 @@ export interface storefrontComponents {
|
|
|
37609
37647
|
/** Discount amount that is applied to the invoice. */
|
|
37610
37648
|
discountAmount?: number;
|
|
37611
37649
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
37612
|
-
tax?: storefrontComponents["schemas"]["
|
|
37650
|
+
tax?: storefrontComponents["schemas"]["Taxes"];
|
|
37613
37651
|
/** Billing address of the invoice. */
|
|
37614
37652
|
billingAddress?: storefrontComponents["schemas"]["ContactObject"];
|
|
37615
37653
|
/** Delivery address of the invoice. */
|
|
@@ -38848,6 +38886,7 @@ export interface storefrontComponents {
|
|
|
38848
38886
|
organizationPrintedName: string | null;
|
|
38849
38887
|
};
|
|
38850
38888
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
38889
|
+
tax?: storefrontComponents["schemas"]["Taxes"];
|
|
38851
38890
|
/** Related links. */
|
|
38852
38891
|
_links?: {
|
|
38853
38892
|
/** Link URL. */
|
|
@@ -44430,6 +44469,10 @@ declare module "resources/quotes-resource" {
|
|
|
44430
44469
|
id: any;
|
|
44431
44470
|
data: any;
|
|
44432
44471
|
}): rebilly.PutQuoteResponsePromise;
|
|
44472
|
+
patch({ id, data }: {
|
|
44473
|
+
id: any;
|
|
44474
|
+
data: any;
|
|
44475
|
+
}): any;
|
|
44433
44476
|
accept({ id }: {
|
|
44434
44477
|
id: any;
|
|
44435
44478
|
}): any;
|
|
@@ -46268,6 +46311,10 @@ declare module "resources/api-instance" {
|
|
|
46268
46311
|
id: any;
|
|
46269
46312
|
data: any;
|
|
46270
46313
|
}): rebilly.PutQuoteResponsePromise;
|
|
46314
|
+
patch({ id, data }: {
|
|
46315
|
+
id: any;
|
|
46316
|
+
data: any;
|
|
46317
|
+
}): any;
|
|
46271
46318
|
accept({ id }: {
|
|
46272
46319
|
id: any;
|
|
46273
46320
|
}): any;
|
|
@@ -388,7 +388,7 @@ function cloneArrayDeep(val, instanceClone) {
|
|
|
388
388
|
return res;
|
|
389
389
|
}
|
|
390
390
|
var cloneDeep_1 = cloneDeep;
|
|
391
|
-
const version = "54.2.
|
|
391
|
+
const version = "54.2.2";
|
|
392
392
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
393
393
|
let nanoid = (size = 21) => {
|
|
394
394
|
let id = "";
|
|
@@ -2315,6 +2315,9 @@ function QuotesResource$1({ apiHandler }) {
|
|
|
2315
2315
|
update({ id, data }) {
|
|
2316
2316
|
return apiHandler.put(`quotes/${id}`, data);
|
|
2317
2317
|
},
|
|
2318
|
+
patch({ id, data }) {
|
|
2319
|
+
return apiHandler.patch(`quotes/${id}`, data);
|
|
2320
|
+
},
|
|
2318
2321
|
accept({ id }) {
|
|
2319
2322
|
return apiHandler.post(`quotes/${id}/accept`);
|
|
2320
2323
|
},
|
|
@@ -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,Ce=L,Pe=qe;function C(t,e){switch(Ce(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||Pe(t)){const s=new t.constructor;for(let r in t)s[r]=C(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]=C(t[r],e);return s}var De=C;const Oe="54.2.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 P({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{getAllowlistCollection({filter:e=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:e,sort:s,limit:r,offset:n};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({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}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function 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}`)},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 Ct({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 Pt({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}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function 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.allowlists=ze({apiHandler:e}),this.amlChecks=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=Ct({apiHandler:e}),this.paymentMethods=Pt({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 Cs({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 Ps({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=Cs({apiHandler:e}),this.plans=Ps({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=P({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=P({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=P({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,Ce=L,Pe=qe;function C(t,e){switch(Ce(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||Pe(t)){const s=new t.constructor;for(let r in t)s[r]=C(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]=C(t[r],e);return s}var De=C;const Oe="54.2.2";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 P({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{getAllowlistCollection({filter:e=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:e,sort:s,limit:r,offset:n};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({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}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function 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}`)},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 Ct({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 Pt({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)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset: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}`)},tagAmlChecks({tag:e,data:s}){return t.post(`tags/${e}/aml-checks`,s)},untagAmlChecks({tag:e,data:s}){return t.delete(`tags/${e}/aml-checks`,s)},tagAmlCheck({tag:e,amlCheckId:s}){return t.post(`tags/${e}/aml-checks/${s}`)},untagAmlCheck({tag:e,amlCheckId:s}){return t.delete(`tags/${e}/aml-checks/${s}`)}}}function 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.allowlists=ze({apiHandler:e}),this.amlChecks=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=Ct({apiHandler:e}),this.paymentMethods=Pt({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 Cs({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 Ps({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=Cs({apiHandler:e}),this.plans=Ps({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=P({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=P({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=P({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"}})});
|
package/package.json
CHANGED
|
@@ -42,6 +42,9 @@ export default function QuotesResource({apiHandler}) {
|
|
|
42
42
|
update({id, data}) {
|
|
43
43
|
return apiHandler.put(`quotes/${id}`, data);
|
|
44
44
|
},
|
|
45
|
+
patch({id, data}) {
|
|
46
|
+
return apiHandler.patch(`quotes/${id}`, data);
|
|
47
|
+
},
|
|
45
48
|
accept({id}) {
|
|
46
49
|
return apiHandler.post(`quotes/${id}/accept`);
|
|
47
50
|
},
|