rebilly-js-sdk 62.177.0 → 62.178.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 +1 -1
- package/dist/rebilly-js-sdk.d.cts +135 -0
- package/dist/rebilly-js-sdk.d.mts +135 -0
- package/dist/rebilly-js-sdk.d.ts +135 -0
- package/dist/rebilly-js-sdk.es.mjs +1 -1
- package/dist/rebilly-js-sdk.umd.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13770,6 +13770,12 @@ export interface coreComponents {
|
|
|
13770
13770
|
couponIds?: string[] | null;
|
|
13771
13771
|
/** Purchase order number displayed on the issued invoices. */
|
|
13772
13772
|
poNumber?: string | null;
|
|
13773
|
+
/**
|
|
13774
|
+
* Shipping settings of the order.
|
|
13775
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
13776
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
13777
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
13778
|
+
*/
|
|
13773
13779
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
13774
13780
|
/** Notes for the customer displayed on the order invoice. */
|
|
13775
13781
|
notes?: string;
|
|
@@ -14388,6 +14394,12 @@ export interface coreComponents {
|
|
|
14388
14394
|
activationTime?: string | null;
|
|
14389
14395
|
/** Currency of the order. */
|
|
14390
14396
|
currency?: coreComponents["schemas"]["CurrencyCode"];
|
|
14397
|
+
/**
|
|
14398
|
+
* Shipping settings of the order.
|
|
14399
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
14400
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
14401
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
14402
|
+
*/
|
|
14391
14403
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
14392
14404
|
/**
|
|
14393
14405
|
* Specifies if payment attempts are made automatically.
|
|
@@ -17597,6 +17609,9 @@ export interface coreComponents {
|
|
|
17597
17609
|
| "subscription-quantity-filled-limit-reached"
|
|
17598
17610
|
| "subscription-reactivated"
|
|
17599
17611
|
| "subscription-renewal-reminder"
|
|
17612
|
+
| "subscription-renewal-reminder-1-day"
|
|
17613
|
+
| "subscription-renewal-reminder-30-days"
|
|
17614
|
+
| "subscription-renewal-reminder-7-days"
|
|
17600
17615
|
| "subscription-renewed"
|
|
17601
17616
|
| "subscription-resumed"
|
|
17602
17617
|
| "subscription-trial-converted"
|
|
@@ -23235,6 +23250,9 @@ export interface coreComponents {
|
|
|
23235
23250
|
| "subscription-quantity-filled-limit-reached"
|
|
23236
23251
|
| "subscription-reactivated"
|
|
23237
23252
|
| "subscription-renewal-reminder"
|
|
23253
|
+
| "subscription-renewal-reminder-1-day"
|
|
23254
|
+
| "subscription-renewal-reminder-30-days"
|
|
23255
|
+
| "subscription-renewal-reminder-7-days"
|
|
23238
23256
|
| "subscription-renewed"
|
|
23239
23257
|
| "subscription-resumed"
|
|
23240
23258
|
| "subscription-trial-converted"
|
|
@@ -30322,6 +30340,33 @@ export interface coreComponents {
|
|
|
30322
30340
|
};
|
|
30323
30341
|
};
|
|
30324
30342
|
};
|
|
30343
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
30344
|
+
SubscriptionRenewalReminder: {
|
|
30345
|
+
content: {
|
|
30346
|
+
"application/json": {
|
|
30347
|
+
/** ID of the order. */
|
|
30348
|
+
subscriptionId?: string;
|
|
30349
|
+
/** Date and time when the subscription renews. */
|
|
30350
|
+
renewalTime?: string;
|
|
30351
|
+
/** Type of event that triggered the webhook. */
|
|
30352
|
+
eventType?:
|
|
30353
|
+
| "subscription-renewal-reminder-30-days"
|
|
30354
|
+
| "subscription-renewal-reminder-7-days"
|
|
30355
|
+
| "subscription-renewal-reminder-1-day";
|
|
30356
|
+
/** Embedded objects related to the order event. */
|
|
30357
|
+
_embedded?: {
|
|
30358
|
+
subscription?: coreComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
30359
|
+
};
|
|
30360
|
+
/** Links to related resources. */
|
|
30361
|
+
_links?: {
|
|
30362
|
+
/** URL of the link. */
|
|
30363
|
+
href?: string;
|
|
30364
|
+
/** Relationship type of the link. */
|
|
30365
|
+
rel?: "subscription";
|
|
30366
|
+
}[];
|
|
30367
|
+
};
|
|
30368
|
+
};
|
|
30369
|
+
};
|
|
30325
30370
|
/** Payload of subscription pause-related webhook event. */
|
|
30326
30371
|
SubscriptionAndSubscriptionPause: {
|
|
30327
30372
|
content: {
|
|
@@ -53218,6 +53263,12 @@ export interface storefrontComponents {
|
|
|
53218
53263
|
couponIds?: string[] | null;
|
|
53219
53264
|
/** Purchase order number displayed on the issued invoices. */
|
|
53220
53265
|
poNumber?: string | null;
|
|
53266
|
+
/**
|
|
53267
|
+
* Shipping settings of the order.
|
|
53268
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53269
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53270
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53271
|
+
*/
|
|
53221
53272
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53222
53273
|
/** Notes for the customer displayed on the order invoice. */
|
|
53223
53274
|
notes?: string;
|
|
@@ -53836,6 +53887,12 @@ export interface storefrontComponents {
|
|
|
53836
53887
|
activationTime?: string | null;
|
|
53837
53888
|
/** Currency of the order. */
|
|
53838
53889
|
currency?: storefrontComponents["schemas"]["CurrencyCode"];
|
|
53890
|
+
/**
|
|
53891
|
+
* Shipping settings of the order.
|
|
53892
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53893
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53894
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53895
|
+
*/
|
|
53839
53896
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53840
53897
|
/**
|
|
53841
53898
|
* Specifies if payment attempts are made automatically.
|
|
@@ -57045,6 +57102,9 @@ export interface storefrontComponents {
|
|
|
57045
57102
|
| "subscription-quantity-filled-limit-reached"
|
|
57046
57103
|
| "subscription-reactivated"
|
|
57047
57104
|
| "subscription-renewal-reminder"
|
|
57105
|
+
| "subscription-renewal-reminder-1-day"
|
|
57106
|
+
| "subscription-renewal-reminder-30-days"
|
|
57107
|
+
| "subscription-renewal-reminder-7-days"
|
|
57048
57108
|
| "subscription-renewed"
|
|
57049
57109
|
| "subscription-resumed"
|
|
57050
57110
|
| "subscription-trial-converted"
|
|
@@ -62683,6 +62743,9 @@ export interface storefrontComponents {
|
|
|
62683
62743
|
| "subscription-quantity-filled-limit-reached"
|
|
62684
62744
|
| "subscription-reactivated"
|
|
62685
62745
|
| "subscription-renewal-reminder"
|
|
62746
|
+
| "subscription-renewal-reminder-1-day"
|
|
62747
|
+
| "subscription-renewal-reminder-30-days"
|
|
62748
|
+
| "subscription-renewal-reminder-7-days"
|
|
62686
62749
|
| "subscription-renewed"
|
|
62687
62750
|
| "subscription-resumed"
|
|
62688
62751
|
| "subscription-trial-converted"
|
|
@@ -69770,6 +69833,33 @@ export interface storefrontComponents {
|
|
|
69770
69833
|
};
|
|
69771
69834
|
};
|
|
69772
69835
|
};
|
|
69836
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
69837
|
+
SubscriptionRenewalReminder: {
|
|
69838
|
+
content: {
|
|
69839
|
+
"application/json": {
|
|
69840
|
+
/** ID of the order. */
|
|
69841
|
+
subscriptionId?: string;
|
|
69842
|
+
/** Date and time when the subscription renews. */
|
|
69843
|
+
renewalTime?: string;
|
|
69844
|
+
/** Type of event that triggered the webhook. */
|
|
69845
|
+
eventType?:
|
|
69846
|
+
| "subscription-renewal-reminder-30-days"
|
|
69847
|
+
| "subscription-renewal-reminder-7-days"
|
|
69848
|
+
| "subscription-renewal-reminder-1-day";
|
|
69849
|
+
/** Embedded objects related to the order event. */
|
|
69850
|
+
_embedded?: {
|
|
69851
|
+
subscription?: storefrontComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
69852
|
+
};
|
|
69853
|
+
/** Links to related resources. */
|
|
69854
|
+
_links?: {
|
|
69855
|
+
/** URL of the link. */
|
|
69856
|
+
href?: string;
|
|
69857
|
+
/** Relationship type of the link. */
|
|
69858
|
+
rel?: "subscription";
|
|
69859
|
+
}[];
|
|
69860
|
+
};
|
|
69861
|
+
};
|
|
69862
|
+
};
|
|
69773
69863
|
/** Payload of subscription pause-related webhook event. */
|
|
69774
69864
|
SubscriptionAndSubscriptionPause: {
|
|
69775
69865
|
content: {
|
|
@@ -79787,6 +79877,12 @@ export interface reportsComponents {
|
|
|
79787
79877
|
couponIds?: string[] | null;
|
|
79788
79878
|
/** Purchase order number displayed on the issued invoices. */
|
|
79789
79879
|
poNumber?: string | null;
|
|
79880
|
+
/**
|
|
79881
|
+
* Shipping settings of the order.
|
|
79882
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
79883
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
79884
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
79885
|
+
*/
|
|
79790
79886
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
79791
79887
|
/** Notes for the customer displayed on the order invoice. */
|
|
79792
79888
|
notes?: string;
|
|
@@ -80405,6 +80501,12 @@ export interface reportsComponents {
|
|
|
80405
80501
|
activationTime?: string | null;
|
|
80406
80502
|
/** Currency of the order. */
|
|
80407
80503
|
currency?: reportsComponents["schemas"]["CurrencyCode"];
|
|
80504
|
+
/**
|
|
80505
|
+
* Shipping settings of the order.
|
|
80506
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
80507
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
80508
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
80509
|
+
*/
|
|
80408
80510
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
80409
80511
|
/**
|
|
80410
80512
|
* Specifies if payment attempts are made automatically.
|
|
@@ -83614,6 +83716,9 @@ export interface reportsComponents {
|
|
|
83614
83716
|
| "subscription-quantity-filled-limit-reached"
|
|
83615
83717
|
| "subscription-reactivated"
|
|
83616
83718
|
| "subscription-renewal-reminder"
|
|
83719
|
+
| "subscription-renewal-reminder-1-day"
|
|
83720
|
+
| "subscription-renewal-reminder-30-days"
|
|
83721
|
+
| "subscription-renewal-reminder-7-days"
|
|
83617
83722
|
| "subscription-renewed"
|
|
83618
83723
|
| "subscription-resumed"
|
|
83619
83724
|
| "subscription-trial-converted"
|
|
@@ -89252,6 +89357,9 @@ export interface reportsComponents {
|
|
|
89252
89357
|
| "subscription-quantity-filled-limit-reached"
|
|
89253
89358
|
| "subscription-reactivated"
|
|
89254
89359
|
| "subscription-renewal-reminder"
|
|
89360
|
+
| "subscription-renewal-reminder-1-day"
|
|
89361
|
+
| "subscription-renewal-reminder-30-days"
|
|
89362
|
+
| "subscription-renewal-reminder-7-days"
|
|
89255
89363
|
| "subscription-renewed"
|
|
89256
89364
|
| "subscription-resumed"
|
|
89257
89365
|
| "subscription-trial-converted"
|
|
@@ -96339,6 +96447,33 @@ export interface reportsComponents {
|
|
|
96339
96447
|
};
|
|
96340
96448
|
};
|
|
96341
96449
|
};
|
|
96450
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
96451
|
+
SubscriptionRenewalReminder: {
|
|
96452
|
+
content: {
|
|
96453
|
+
"application/json": {
|
|
96454
|
+
/** ID of the order. */
|
|
96455
|
+
subscriptionId?: string;
|
|
96456
|
+
/** Date and time when the subscription renews. */
|
|
96457
|
+
renewalTime?: string;
|
|
96458
|
+
/** Type of event that triggered the webhook. */
|
|
96459
|
+
eventType?:
|
|
96460
|
+
| "subscription-renewal-reminder-30-days"
|
|
96461
|
+
| "subscription-renewal-reminder-7-days"
|
|
96462
|
+
| "subscription-renewal-reminder-1-day";
|
|
96463
|
+
/** Embedded objects related to the order event. */
|
|
96464
|
+
_embedded?: {
|
|
96465
|
+
subscription?: reportsComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
96466
|
+
};
|
|
96467
|
+
/** Links to related resources. */
|
|
96468
|
+
_links?: {
|
|
96469
|
+
/** URL of the link. */
|
|
96470
|
+
href?: string;
|
|
96471
|
+
/** Relationship type of the link. */
|
|
96472
|
+
rel?: "subscription";
|
|
96473
|
+
}[];
|
|
96474
|
+
};
|
|
96475
|
+
};
|
|
96476
|
+
};
|
|
96342
96477
|
/** Payload of subscription pause-related webhook event. */
|
|
96343
96478
|
SubscriptionAndSubscriptionPause: {
|
|
96344
96479
|
content: {
|
|
@@ -13770,6 +13770,12 @@ export interface coreComponents {
|
|
|
13770
13770
|
couponIds?: string[] | null;
|
|
13771
13771
|
/** Purchase order number displayed on the issued invoices. */
|
|
13772
13772
|
poNumber?: string | null;
|
|
13773
|
+
/**
|
|
13774
|
+
* Shipping settings of the order.
|
|
13775
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
13776
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
13777
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
13778
|
+
*/
|
|
13773
13779
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
13774
13780
|
/** Notes for the customer displayed on the order invoice. */
|
|
13775
13781
|
notes?: string;
|
|
@@ -14388,6 +14394,12 @@ export interface coreComponents {
|
|
|
14388
14394
|
activationTime?: string | null;
|
|
14389
14395
|
/** Currency of the order. */
|
|
14390
14396
|
currency?: coreComponents["schemas"]["CurrencyCode"];
|
|
14397
|
+
/**
|
|
14398
|
+
* Shipping settings of the order.
|
|
14399
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
14400
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
14401
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
14402
|
+
*/
|
|
14391
14403
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
14392
14404
|
/**
|
|
14393
14405
|
* Specifies if payment attempts are made automatically.
|
|
@@ -17597,6 +17609,9 @@ export interface coreComponents {
|
|
|
17597
17609
|
| "subscription-quantity-filled-limit-reached"
|
|
17598
17610
|
| "subscription-reactivated"
|
|
17599
17611
|
| "subscription-renewal-reminder"
|
|
17612
|
+
| "subscription-renewal-reminder-1-day"
|
|
17613
|
+
| "subscription-renewal-reminder-30-days"
|
|
17614
|
+
| "subscription-renewal-reminder-7-days"
|
|
17600
17615
|
| "subscription-renewed"
|
|
17601
17616
|
| "subscription-resumed"
|
|
17602
17617
|
| "subscription-trial-converted"
|
|
@@ -23235,6 +23250,9 @@ export interface coreComponents {
|
|
|
23235
23250
|
| "subscription-quantity-filled-limit-reached"
|
|
23236
23251
|
| "subscription-reactivated"
|
|
23237
23252
|
| "subscription-renewal-reminder"
|
|
23253
|
+
| "subscription-renewal-reminder-1-day"
|
|
23254
|
+
| "subscription-renewal-reminder-30-days"
|
|
23255
|
+
| "subscription-renewal-reminder-7-days"
|
|
23238
23256
|
| "subscription-renewed"
|
|
23239
23257
|
| "subscription-resumed"
|
|
23240
23258
|
| "subscription-trial-converted"
|
|
@@ -30322,6 +30340,33 @@ export interface coreComponents {
|
|
|
30322
30340
|
};
|
|
30323
30341
|
};
|
|
30324
30342
|
};
|
|
30343
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
30344
|
+
SubscriptionRenewalReminder: {
|
|
30345
|
+
content: {
|
|
30346
|
+
"application/json": {
|
|
30347
|
+
/** ID of the order. */
|
|
30348
|
+
subscriptionId?: string;
|
|
30349
|
+
/** Date and time when the subscription renews. */
|
|
30350
|
+
renewalTime?: string;
|
|
30351
|
+
/** Type of event that triggered the webhook. */
|
|
30352
|
+
eventType?:
|
|
30353
|
+
| "subscription-renewal-reminder-30-days"
|
|
30354
|
+
| "subscription-renewal-reminder-7-days"
|
|
30355
|
+
| "subscription-renewal-reminder-1-day";
|
|
30356
|
+
/** Embedded objects related to the order event. */
|
|
30357
|
+
_embedded?: {
|
|
30358
|
+
subscription?: coreComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
30359
|
+
};
|
|
30360
|
+
/** Links to related resources. */
|
|
30361
|
+
_links?: {
|
|
30362
|
+
/** URL of the link. */
|
|
30363
|
+
href?: string;
|
|
30364
|
+
/** Relationship type of the link. */
|
|
30365
|
+
rel?: "subscription";
|
|
30366
|
+
}[];
|
|
30367
|
+
};
|
|
30368
|
+
};
|
|
30369
|
+
};
|
|
30325
30370
|
/** Payload of subscription pause-related webhook event. */
|
|
30326
30371
|
SubscriptionAndSubscriptionPause: {
|
|
30327
30372
|
content: {
|
|
@@ -53218,6 +53263,12 @@ export interface storefrontComponents {
|
|
|
53218
53263
|
couponIds?: string[] | null;
|
|
53219
53264
|
/** Purchase order number displayed on the issued invoices. */
|
|
53220
53265
|
poNumber?: string | null;
|
|
53266
|
+
/**
|
|
53267
|
+
* Shipping settings of the order.
|
|
53268
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53269
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53270
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53271
|
+
*/
|
|
53221
53272
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53222
53273
|
/** Notes for the customer displayed on the order invoice. */
|
|
53223
53274
|
notes?: string;
|
|
@@ -53836,6 +53887,12 @@ export interface storefrontComponents {
|
|
|
53836
53887
|
activationTime?: string | null;
|
|
53837
53888
|
/** Currency of the order. */
|
|
53838
53889
|
currency?: storefrontComponents["schemas"]["CurrencyCode"];
|
|
53890
|
+
/**
|
|
53891
|
+
* Shipping settings of the order.
|
|
53892
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53893
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53894
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53895
|
+
*/
|
|
53839
53896
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53840
53897
|
/**
|
|
53841
53898
|
* Specifies if payment attempts are made automatically.
|
|
@@ -57045,6 +57102,9 @@ export interface storefrontComponents {
|
|
|
57045
57102
|
| "subscription-quantity-filled-limit-reached"
|
|
57046
57103
|
| "subscription-reactivated"
|
|
57047
57104
|
| "subscription-renewal-reminder"
|
|
57105
|
+
| "subscription-renewal-reminder-1-day"
|
|
57106
|
+
| "subscription-renewal-reminder-30-days"
|
|
57107
|
+
| "subscription-renewal-reminder-7-days"
|
|
57048
57108
|
| "subscription-renewed"
|
|
57049
57109
|
| "subscription-resumed"
|
|
57050
57110
|
| "subscription-trial-converted"
|
|
@@ -62683,6 +62743,9 @@ export interface storefrontComponents {
|
|
|
62683
62743
|
| "subscription-quantity-filled-limit-reached"
|
|
62684
62744
|
| "subscription-reactivated"
|
|
62685
62745
|
| "subscription-renewal-reminder"
|
|
62746
|
+
| "subscription-renewal-reminder-1-day"
|
|
62747
|
+
| "subscription-renewal-reminder-30-days"
|
|
62748
|
+
| "subscription-renewal-reminder-7-days"
|
|
62686
62749
|
| "subscription-renewed"
|
|
62687
62750
|
| "subscription-resumed"
|
|
62688
62751
|
| "subscription-trial-converted"
|
|
@@ -69770,6 +69833,33 @@ export interface storefrontComponents {
|
|
|
69770
69833
|
};
|
|
69771
69834
|
};
|
|
69772
69835
|
};
|
|
69836
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
69837
|
+
SubscriptionRenewalReminder: {
|
|
69838
|
+
content: {
|
|
69839
|
+
"application/json": {
|
|
69840
|
+
/** ID of the order. */
|
|
69841
|
+
subscriptionId?: string;
|
|
69842
|
+
/** Date and time when the subscription renews. */
|
|
69843
|
+
renewalTime?: string;
|
|
69844
|
+
/** Type of event that triggered the webhook. */
|
|
69845
|
+
eventType?:
|
|
69846
|
+
| "subscription-renewal-reminder-30-days"
|
|
69847
|
+
| "subscription-renewal-reminder-7-days"
|
|
69848
|
+
| "subscription-renewal-reminder-1-day";
|
|
69849
|
+
/** Embedded objects related to the order event. */
|
|
69850
|
+
_embedded?: {
|
|
69851
|
+
subscription?: storefrontComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
69852
|
+
};
|
|
69853
|
+
/** Links to related resources. */
|
|
69854
|
+
_links?: {
|
|
69855
|
+
/** URL of the link. */
|
|
69856
|
+
href?: string;
|
|
69857
|
+
/** Relationship type of the link. */
|
|
69858
|
+
rel?: "subscription";
|
|
69859
|
+
}[];
|
|
69860
|
+
};
|
|
69861
|
+
};
|
|
69862
|
+
};
|
|
69773
69863
|
/** Payload of subscription pause-related webhook event. */
|
|
69774
69864
|
SubscriptionAndSubscriptionPause: {
|
|
69775
69865
|
content: {
|
|
@@ -79787,6 +79877,12 @@ export interface reportsComponents {
|
|
|
79787
79877
|
couponIds?: string[] | null;
|
|
79788
79878
|
/** Purchase order number displayed on the issued invoices. */
|
|
79789
79879
|
poNumber?: string | null;
|
|
79880
|
+
/**
|
|
79881
|
+
* Shipping settings of the order.
|
|
79882
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
79883
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
79884
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
79885
|
+
*/
|
|
79790
79886
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
79791
79887
|
/** Notes for the customer displayed on the order invoice. */
|
|
79792
79888
|
notes?: string;
|
|
@@ -80405,6 +80501,12 @@ export interface reportsComponents {
|
|
|
80405
80501
|
activationTime?: string | null;
|
|
80406
80502
|
/** Currency of the order. */
|
|
80407
80503
|
currency?: reportsComponents["schemas"]["CurrencyCode"];
|
|
80504
|
+
/**
|
|
80505
|
+
* Shipping settings of the order.
|
|
80506
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
80507
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
80508
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
80509
|
+
*/
|
|
80408
80510
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
80409
80511
|
/**
|
|
80410
80512
|
* Specifies if payment attempts are made automatically.
|
|
@@ -83614,6 +83716,9 @@ export interface reportsComponents {
|
|
|
83614
83716
|
| "subscription-quantity-filled-limit-reached"
|
|
83615
83717
|
| "subscription-reactivated"
|
|
83616
83718
|
| "subscription-renewal-reminder"
|
|
83719
|
+
| "subscription-renewal-reminder-1-day"
|
|
83720
|
+
| "subscription-renewal-reminder-30-days"
|
|
83721
|
+
| "subscription-renewal-reminder-7-days"
|
|
83617
83722
|
| "subscription-renewed"
|
|
83618
83723
|
| "subscription-resumed"
|
|
83619
83724
|
| "subscription-trial-converted"
|
|
@@ -89252,6 +89357,9 @@ export interface reportsComponents {
|
|
|
89252
89357
|
| "subscription-quantity-filled-limit-reached"
|
|
89253
89358
|
| "subscription-reactivated"
|
|
89254
89359
|
| "subscription-renewal-reminder"
|
|
89360
|
+
| "subscription-renewal-reminder-1-day"
|
|
89361
|
+
| "subscription-renewal-reminder-30-days"
|
|
89362
|
+
| "subscription-renewal-reminder-7-days"
|
|
89255
89363
|
| "subscription-renewed"
|
|
89256
89364
|
| "subscription-resumed"
|
|
89257
89365
|
| "subscription-trial-converted"
|
|
@@ -96339,6 +96447,33 @@ export interface reportsComponents {
|
|
|
96339
96447
|
};
|
|
96340
96448
|
};
|
|
96341
96449
|
};
|
|
96450
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
96451
|
+
SubscriptionRenewalReminder: {
|
|
96452
|
+
content: {
|
|
96453
|
+
"application/json": {
|
|
96454
|
+
/** ID of the order. */
|
|
96455
|
+
subscriptionId?: string;
|
|
96456
|
+
/** Date and time when the subscription renews. */
|
|
96457
|
+
renewalTime?: string;
|
|
96458
|
+
/** Type of event that triggered the webhook. */
|
|
96459
|
+
eventType?:
|
|
96460
|
+
| "subscription-renewal-reminder-30-days"
|
|
96461
|
+
| "subscription-renewal-reminder-7-days"
|
|
96462
|
+
| "subscription-renewal-reminder-1-day";
|
|
96463
|
+
/** Embedded objects related to the order event. */
|
|
96464
|
+
_embedded?: {
|
|
96465
|
+
subscription?: reportsComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
96466
|
+
};
|
|
96467
|
+
/** Links to related resources. */
|
|
96468
|
+
_links?: {
|
|
96469
|
+
/** URL of the link. */
|
|
96470
|
+
href?: string;
|
|
96471
|
+
/** Relationship type of the link. */
|
|
96472
|
+
rel?: "subscription";
|
|
96473
|
+
}[];
|
|
96474
|
+
};
|
|
96475
|
+
};
|
|
96476
|
+
};
|
|
96342
96477
|
/** Payload of subscription pause-related webhook event. */
|
|
96343
96478
|
SubscriptionAndSubscriptionPause: {
|
|
96344
96479
|
content: {
|
package/dist/rebilly-js-sdk.d.ts
CHANGED
|
@@ -13770,6 +13770,12 @@ export interface coreComponents {
|
|
|
13770
13770
|
couponIds?: string[] | null;
|
|
13771
13771
|
/** Purchase order number displayed on the issued invoices. */
|
|
13772
13772
|
poNumber?: string | null;
|
|
13773
|
+
/**
|
|
13774
|
+
* Shipping settings of the order.
|
|
13775
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
13776
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
13777
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
13778
|
+
*/
|
|
13773
13779
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
13774
13780
|
/** Notes for the customer displayed on the order invoice. */
|
|
13775
13781
|
notes?: string;
|
|
@@ -14388,6 +14394,12 @@ export interface coreComponents {
|
|
|
14388
14394
|
activationTime?: string | null;
|
|
14389
14395
|
/** Currency of the order. */
|
|
14390
14396
|
currency?: coreComponents["schemas"]["CurrencyCode"];
|
|
14397
|
+
/**
|
|
14398
|
+
* Shipping settings of the order.
|
|
14399
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
14400
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
14401
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
14402
|
+
*/
|
|
14391
14403
|
shipping?: coreComponents["schemas"]["Shipping"];
|
|
14392
14404
|
/**
|
|
14393
14405
|
* Specifies if payment attempts are made automatically.
|
|
@@ -17597,6 +17609,9 @@ export interface coreComponents {
|
|
|
17597
17609
|
| "subscription-quantity-filled-limit-reached"
|
|
17598
17610
|
| "subscription-reactivated"
|
|
17599
17611
|
| "subscription-renewal-reminder"
|
|
17612
|
+
| "subscription-renewal-reminder-1-day"
|
|
17613
|
+
| "subscription-renewal-reminder-30-days"
|
|
17614
|
+
| "subscription-renewal-reminder-7-days"
|
|
17600
17615
|
| "subscription-renewed"
|
|
17601
17616
|
| "subscription-resumed"
|
|
17602
17617
|
| "subscription-trial-converted"
|
|
@@ -23235,6 +23250,9 @@ export interface coreComponents {
|
|
|
23235
23250
|
| "subscription-quantity-filled-limit-reached"
|
|
23236
23251
|
| "subscription-reactivated"
|
|
23237
23252
|
| "subscription-renewal-reminder"
|
|
23253
|
+
| "subscription-renewal-reminder-1-day"
|
|
23254
|
+
| "subscription-renewal-reminder-30-days"
|
|
23255
|
+
| "subscription-renewal-reminder-7-days"
|
|
23238
23256
|
| "subscription-renewed"
|
|
23239
23257
|
| "subscription-resumed"
|
|
23240
23258
|
| "subscription-trial-converted"
|
|
@@ -30322,6 +30340,33 @@ export interface coreComponents {
|
|
|
30322
30340
|
};
|
|
30323
30341
|
};
|
|
30324
30342
|
};
|
|
30343
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
30344
|
+
SubscriptionRenewalReminder: {
|
|
30345
|
+
content: {
|
|
30346
|
+
"application/json": {
|
|
30347
|
+
/** ID of the order. */
|
|
30348
|
+
subscriptionId?: string;
|
|
30349
|
+
/** Date and time when the subscription renews. */
|
|
30350
|
+
renewalTime?: string;
|
|
30351
|
+
/** Type of event that triggered the webhook. */
|
|
30352
|
+
eventType?:
|
|
30353
|
+
| "subscription-renewal-reminder-30-days"
|
|
30354
|
+
| "subscription-renewal-reminder-7-days"
|
|
30355
|
+
| "subscription-renewal-reminder-1-day";
|
|
30356
|
+
/** Embedded objects related to the order event. */
|
|
30357
|
+
_embedded?: {
|
|
30358
|
+
subscription?: coreComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
30359
|
+
};
|
|
30360
|
+
/** Links to related resources. */
|
|
30361
|
+
_links?: {
|
|
30362
|
+
/** URL of the link. */
|
|
30363
|
+
href?: string;
|
|
30364
|
+
/** Relationship type of the link. */
|
|
30365
|
+
rel?: "subscription";
|
|
30366
|
+
}[];
|
|
30367
|
+
};
|
|
30368
|
+
};
|
|
30369
|
+
};
|
|
30325
30370
|
/** Payload of subscription pause-related webhook event. */
|
|
30326
30371
|
SubscriptionAndSubscriptionPause: {
|
|
30327
30372
|
content: {
|
|
@@ -53218,6 +53263,12 @@ export interface storefrontComponents {
|
|
|
53218
53263
|
couponIds?: string[] | null;
|
|
53219
53264
|
/** Purchase order number displayed on the issued invoices. */
|
|
53220
53265
|
poNumber?: string | null;
|
|
53266
|
+
/**
|
|
53267
|
+
* Shipping settings of the order.
|
|
53268
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53269
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53270
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53271
|
+
*/
|
|
53221
53272
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53222
53273
|
/** Notes for the customer displayed on the order invoice. */
|
|
53223
53274
|
notes?: string;
|
|
@@ -53836,6 +53887,12 @@ export interface storefrontComponents {
|
|
|
53836
53887
|
activationTime?: string | null;
|
|
53837
53888
|
/** Currency of the order. */
|
|
53838
53889
|
currency?: storefrontComponents["schemas"]["CurrencyCode"];
|
|
53890
|
+
/**
|
|
53891
|
+
* Shipping settings of the order.
|
|
53892
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
53893
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
53894
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
53895
|
+
*/
|
|
53839
53896
|
shipping?: storefrontComponents["schemas"]["Shipping"];
|
|
53840
53897
|
/**
|
|
53841
53898
|
* Specifies if payment attempts are made automatically.
|
|
@@ -57045,6 +57102,9 @@ export interface storefrontComponents {
|
|
|
57045
57102
|
| "subscription-quantity-filled-limit-reached"
|
|
57046
57103
|
| "subscription-reactivated"
|
|
57047
57104
|
| "subscription-renewal-reminder"
|
|
57105
|
+
| "subscription-renewal-reminder-1-day"
|
|
57106
|
+
| "subscription-renewal-reminder-30-days"
|
|
57107
|
+
| "subscription-renewal-reminder-7-days"
|
|
57048
57108
|
| "subscription-renewed"
|
|
57049
57109
|
| "subscription-resumed"
|
|
57050
57110
|
| "subscription-trial-converted"
|
|
@@ -62683,6 +62743,9 @@ export interface storefrontComponents {
|
|
|
62683
62743
|
| "subscription-quantity-filled-limit-reached"
|
|
62684
62744
|
| "subscription-reactivated"
|
|
62685
62745
|
| "subscription-renewal-reminder"
|
|
62746
|
+
| "subscription-renewal-reminder-1-day"
|
|
62747
|
+
| "subscription-renewal-reminder-30-days"
|
|
62748
|
+
| "subscription-renewal-reminder-7-days"
|
|
62686
62749
|
| "subscription-renewed"
|
|
62687
62750
|
| "subscription-resumed"
|
|
62688
62751
|
| "subscription-trial-converted"
|
|
@@ -69770,6 +69833,33 @@ export interface storefrontComponents {
|
|
|
69770
69833
|
};
|
|
69771
69834
|
};
|
|
69772
69835
|
};
|
|
69836
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
69837
|
+
SubscriptionRenewalReminder: {
|
|
69838
|
+
content: {
|
|
69839
|
+
"application/json": {
|
|
69840
|
+
/** ID of the order. */
|
|
69841
|
+
subscriptionId?: string;
|
|
69842
|
+
/** Date and time when the subscription renews. */
|
|
69843
|
+
renewalTime?: string;
|
|
69844
|
+
/** Type of event that triggered the webhook. */
|
|
69845
|
+
eventType?:
|
|
69846
|
+
| "subscription-renewal-reminder-30-days"
|
|
69847
|
+
| "subscription-renewal-reminder-7-days"
|
|
69848
|
+
| "subscription-renewal-reminder-1-day";
|
|
69849
|
+
/** Embedded objects related to the order event. */
|
|
69850
|
+
_embedded?: {
|
|
69851
|
+
subscription?: storefrontComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
69852
|
+
};
|
|
69853
|
+
/** Links to related resources. */
|
|
69854
|
+
_links?: {
|
|
69855
|
+
/** URL of the link. */
|
|
69856
|
+
href?: string;
|
|
69857
|
+
/** Relationship type of the link. */
|
|
69858
|
+
rel?: "subscription";
|
|
69859
|
+
}[];
|
|
69860
|
+
};
|
|
69861
|
+
};
|
|
69862
|
+
};
|
|
69773
69863
|
/** Payload of subscription pause-related webhook event. */
|
|
69774
69864
|
SubscriptionAndSubscriptionPause: {
|
|
69775
69865
|
content: {
|
|
@@ -79787,6 +79877,12 @@ export interface reportsComponents {
|
|
|
79787
79877
|
couponIds?: string[] | null;
|
|
79788
79878
|
/** Purchase order number displayed on the issued invoices. */
|
|
79789
79879
|
poNumber?: string | null;
|
|
79880
|
+
/**
|
|
79881
|
+
* Shipping settings of the order.
|
|
79882
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
79883
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
79884
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
79885
|
+
*/
|
|
79790
79886
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
79791
79887
|
/** Notes for the customer displayed on the order invoice. */
|
|
79792
79888
|
notes?: string;
|
|
@@ -80405,6 +80501,12 @@ export interface reportsComponents {
|
|
|
80405
80501
|
activationTime?: string | null;
|
|
80406
80502
|
/** Currency of the order. */
|
|
80407
80503
|
currency?: reportsComponents["schemas"]["CurrencyCode"];
|
|
80504
|
+
/**
|
|
80505
|
+
* Shipping settings of the order.
|
|
80506
|
+
* Changes to shipping apply to the upcoming invoice and to invoices created after the change.
|
|
80507
|
+
* Issued invoices are not updated unless the order is `pending`.
|
|
80508
|
+
* To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
|
|
80509
|
+
*/
|
|
80408
80510
|
shipping?: reportsComponents["schemas"]["Shipping"];
|
|
80409
80511
|
/**
|
|
80410
80512
|
* Specifies if payment attempts are made automatically.
|
|
@@ -83614,6 +83716,9 @@ export interface reportsComponents {
|
|
|
83614
83716
|
| "subscription-quantity-filled-limit-reached"
|
|
83615
83717
|
| "subscription-reactivated"
|
|
83616
83718
|
| "subscription-renewal-reminder"
|
|
83719
|
+
| "subscription-renewal-reminder-1-day"
|
|
83720
|
+
| "subscription-renewal-reminder-30-days"
|
|
83721
|
+
| "subscription-renewal-reminder-7-days"
|
|
83617
83722
|
| "subscription-renewed"
|
|
83618
83723
|
| "subscription-resumed"
|
|
83619
83724
|
| "subscription-trial-converted"
|
|
@@ -89252,6 +89357,9 @@ export interface reportsComponents {
|
|
|
89252
89357
|
| "subscription-quantity-filled-limit-reached"
|
|
89253
89358
|
| "subscription-reactivated"
|
|
89254
89359
|
| "subscription-renewal-reminder"
|
|
89360
|
+
| "subscription-renewal-reminder-1-day"
|
|
89361
|
+
| "subscription-renewal-reminder-30-days"
|
|
89362
|
+
| "subscription-renewal-reminder-7-days"
|
|
89255
89363
|
| "subscription-renewed"
|
|
89256
89364
|
| "subscription-resumed"
|
|
89257
89365
|
| "subscription-trial-converted"
|
|
@@ -96339,6 +96447,33 @@ export interface reportsComponents {
|
|
|
96339
96447
|
};
|
|
96340
96448
|
};
|
|
96341
96449
|
};
|
|
96450
|
+
/** Payload of the subscription renewal reminder webhook event. */
|
|
96451
|
+
SubscriptionRenewalReminder: {
|
|
96452
|
+
content: {
|
|
96453
|
+
"application/json": {
|
|
96454
|
+
/** ID of the order. */
|
|
96455
|
+
subscriptionId?: string;
|
|
96456
|
+
/** Date and time when the subscription renews. */
|
|
96457
|
+
renewalTime?: string;
|
|
96458
|
+
/** Type of event that triggered the webhook. */
|
|
96459
|
+
eventType?:
|
|
96460
|
+
| "subscription-renewal-reminder-30-days"
|
|
96461
|
+
| "subscription-renewal-reminder-7-days"
|
|
96462
|
+
| "subscription-renewal-reminder-1-day";
|
|
96463
|
+
/** Embedded objects related to the order event. */
|
|
96464
|
+
_embedded?: {
|
|
96465
|
+
subscription?: reportsComponents["schemas"]["SubscriptionOrOneTimeSale"];
|
|
96466
|
+
};
|
|
96467
|
+
/** Links to related resources. */
|
|
96468
|
+
_links?: {
|
|
96469
|
+
/** URL of the link. */
|
|
96470
|
+
href?: string;
|
|
96471
|
+
/** Relationship type of the link. */
|
|
96472
|
+
rel?: "subscription";
|
|
96473
|
+
}[];
|
|
96474
|
+
};
|
|
96475
|
+
};
|
|
96476
|
+
};
|
|
96342
96477
|
/** Payload of subscription pause-related webhook event. */
|
|
96343
96478
|
SubscriptionAndSubscriptionPause: {
|
|
96344
96479
|
content: {
|
|
@@ -489,7 +489,7 @@ function O({ options: e }) {
|
|
|
489
489
|
}
|
|
490
490
|
function o() {
|
|
491
491
|
const a = {
|
|
492
|
-
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@
|
|
492
|
+
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@3e79246`
|
|
493
493
|
};
|
|
494
494
|
return e.apiKey && (a["REB-APIKEY"] = e.apiKey), a;
|
|
495
495
|
}
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
15
15
|
* Released under the MIT License.
|
|
16
|
-
*/var D,W;function Ae(){if(W)return D;W=1;var t=ye();function e(s){return t(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}return D=function(r){var n,u;return!(e(r)===!1||(n=r.constructor,typeof n!="function")||(u=n.prototype,e(u)===!1)||u.hasOwnProperty("isPrototypeOf")===!1)},D}var M,G;function Re(){if(G)return M;G=1;const t=he(),e=U(),s=Ae();function r(o,l){switch(e(o)){case"object":return n(o,l);case"array":return u(o,l);default:return t(o)}}function n(o,l){if(typeof l=="function")return l(o);if(l||s(o)){const i=new o.constructor;for(let f in o)i[f]=r(o[f],l);return i}return o}function u(o,l){const i=new o.constructor(o.length);for(let f=0;f<o.length;f++)i[f]=r(o[f],l);return i}return M=r,M}var be=Re();const we=$e(be);let ke="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ve=(t=21)=>{let e="",s=t|0;for(;s-- >0;)e+=ke[Math.random()*64|0];return e};class qe{constructor({id:e=null,created:s=null}={}){this.id=e||ve(),this.created=s||new Date().getTime(),this.cancelSource=y.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,b(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let de=class P{constructor(){if(P.instance)return P.instance;this.requests={},P.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 qe;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const T=new de;class E{}K(E,"cancelById",(e,s)=>{try{T.getById(e).cancel(s),T.deleteById(e)}catch{}}),K(E,"cancelAll",async e=>{for(const s of T.getAll())await s.cancel(e),T.deleteById(s.id)});const Te={cancelAll:async(...t)=>await E.cancelAll(...t)},v={request:"request",response:"response"},Y=t=>{if(!Object.values(v).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function O({options:t}){const e=s();function s(){return y.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 a={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(m=>m).join("/")}@1b8bc3c`};return t.apiKey&&(a["REB-APIKEY"]=t.apiKey),a}function l(){return we(e.defaults.headers)}function i(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function f(c=t.jwt){const a=l();t.apiKey=null,t.jwt=c,delete a.common["REB-APIKEY"],a.common.Authorization=`Bearer ${c}`,e.defaults.headers=a}function g(c=t.publishableKey){const a=l();t.publishableKey=c,a.common.Authorization=`${c}`,e.defaults.headers=a}function $({host:c,port:a,auth:m}){e.defaults.proxy={host:c,port:a,auth:m}}function A({live:c=null,sandbox:a=null}){c&&(t.apiEndpoints.live=c),a&&(t.apiEndpoints.sandbox=a),e.defaults.baseURL=u()}function _(c,{thenDelegate:a,catchDelegate:m=()=>{}}){return Y(c)&&e.interceptors[v[c]].use(a,m)}function X(c,a){return Y(c)&&e.interceptors[v[c]].eject(a)}function Js({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Ws(c){X(v.request,c)}function Gs({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function Ys(c){X(v.response,c)}function I({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:sr}=T.save();p.cancelToken=sr;const ne=async function(){try{const S=await c(p);return Qs({response:S,isCollection:a,config:p})}catch(S){return Z({error:S})}finally{T.deleteById(k)}}();return ne.cancel=S=>E.cancelById(k,S),ne}function Qs({response:c,isCollection:a,config:m}){return a?new ue(c,m):new N(c,m)}function Z({error:c}){if(y.isCancel(c))throw new R.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new R.RebillyForbiddenError(c);case 404:throw new R.RebillyNotFoundError(c);case 405:throw new R.RebillyMethodNotAllowedError(c);case 409:throw new R.RebillyConflictError(c);case 422:throw new R.RebillyValidationError(c);default:throw new R.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new R.RebillyTimeoutError(c):new R.RebillyRequestError(c)}function _s(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>{var m;return c.params[a]!==null&&c.params[a]!==""&&!(a==="sort"&&((m=c.params[a])==null?void 0:m.length)===0)}).reduce((a,m)=>{const p=c.params[m];return a[m]=m==="sort"&&Array.isArray(p)?p.join(","):p,a},{})),c}function H(c={}){return{..._s(c)}}function ee(c,a={}){return I({request:m=>e.get(c,m),config:{params:a}})}function Xs(c,a){return I({request:m=>e.get(c,m),config:{params:a},isCollection:!0})}function te(c,a,m={}){let p={};return m.authenticate===!1&&(p={headers:l()},delete p.headers.common["REB-APIKEY"],delete p.headers.common.Authorization),m.params&&(p.params={...m.params}),I({request:k=>e.post(c,a,k),config:p})}function se(c,a,m={}){return I({request:p=>e.put(c,a,p),config:{params:m}})}function Zs(c,a){return I({request:m=>e.patch(c,a,m),config:{}})}function re(c,a=null){return I({request:m=>e.delete(c,m),config:a!=null?{data:a}:{}})}function Hs(c,a){return re(c,a)}async function er(c,a,m,p={}){if(a==="")return te(c,m,{params:p});try{if((await ee(c)).response.status===200)throw new R.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(k){if(k.name==="RebillyNotFoundError")return se(c,m,p);throw k}}async function tr(c,a){const m=H(a);try{const p=await e.get(c,m);return new oe(p,m)}catch(p){return Z({error:p})}}return{getInstance:r,addRequestInterceptor:Js,removeRequestInterceptor:Ws,addResponseInterceptor:Gs,removeResponseInterceptor:Ys,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:Xs,post:te,put:se,patch:Zs,delete:re,deleteAll:Hs,create:er,download:tr}}function Ie({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("account-registration-settings",r)},create({id:e="",data:s}){return t.create(`account-registration-settings/${e}`,e,s)},get({id:e}){return t.get(`account-registration-settings/${e}`)},update({id:e,data:s}){return t.put(`account-registration-settings/${e}`,s)},delete({id:e}){return t.delete(`account-registration-settings/${e}`)}}}function Se({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Ee({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 Pe({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 xe({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ce({apiHandler:t}){return{getAll({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("api-keys",u)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function 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 De({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit: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 Me({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 Oe({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 Fe({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 Be({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 Ke({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Ne({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 Le({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)}}}const q={Accept:"application/pdf"};function ze({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("credit-memos",l)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},refund({id:e}){return t.post(`credit-memos/${e}/refund`)},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}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`credit-memos/${e}`,s)}}}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("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 Ve({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 Je({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 We({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",i)},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}`)},getCustomerCreditBalance({id:e}){return t.get(`customers/${e}/credit-balance`)},generateComplianceScreeningReport({id:e}){return t.post(`customers/${e}/compliance-screening-report`)}}}function Ge({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("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function Ye({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("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function Qe({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("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function _e({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function Xe({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 Ze({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 He({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 et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:e,offset:s,filter:r,q:n};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data: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 i={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,i)},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 i={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,i)},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 st({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 rt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function nt({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 ut({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("attachments",i)},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 i=(await o).items.map(g=>this.detach({id:g.fields.id}));r=[...r,i],await Promise.all(i);const f=t.delete(`files/${e}`);return r.push(f),f})();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:""},i=this.update({id:o.fields.id,data:l});return r.push(i),i})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function ot({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}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset: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 lt({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}`)}}}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("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)},allocateCreditBalance({id:e,data:s}){return t.post(`invoices/${e}/allocate-credit-balance`,s)},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 it({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 at({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)}}}function gt({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("journal-records",o)},create({id:e="",data:s}){return t.create(`journal-records/${e}`,e,s)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:s}){return t.put(`journal-records/${e}`,s)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function mt({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 ft({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-requests",o)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function pt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function $t({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 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("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function yt({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("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function At({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("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function Rt({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("orders",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`orders/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`orders/${e}`,s,n)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:r=null}){const n={expand:r};return t.post(`orders/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`orders/${e}/items/${s}`,r)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function bt({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 wt({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 kt({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 vt({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`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function qt({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 dt({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 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("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function It({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function St({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("payout-request-batches",o)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},delete({id:e}){return t.delete(`payout-request-batches/${e}`)},patch({id:e,data:s}){return t.patch(`payout-request-batches/${e}`,s)},autoAllocate({id:e}){return t.post(`payout-request-batches/${e}/auto-allocate`)},approve({id:e}){return t.post(`payout-request-batches/${e}/approve`)},block({id:e,data:s}){return t.post(`payout-request-batches/${e}/block`,s)},addPayoutRequests({id:e,data:s}){return t.post(`payout-request-batches/${e}/payout-requests`,s)},removePayoutRequests({id:e,data:s}){return t.post(`payout-request-batches/${e}/payout-requests/remove`,s)},unblock({id:e}){return t.post(`payout-request-batches/${e}/unblock`)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function Et({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",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("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},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(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`payout-requests/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`payout-requests/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`payout-requests/${e}/timeline/${s}`)}}}function xt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ct({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 jt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Dt({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 Mt({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")},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function Ot({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ft({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 Bt({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 Kt({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 Nt({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 Lt({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 zt({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 Ut({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Vt({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:i=null}){const f={limit:r,offset:n,filter:u,q:o,fields:l,sort:i};return t.getAll(`service-credentials/${e}/${s}/items`,f)}}}function Jt({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 Wt({apiHandler:t}){return{get(){return t.get("status")}}}function Gt({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 Yt({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 Qt({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 _t({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,expand:r=null}){const n={expand:r};return t.post(`subscriptions/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`subscriptions/${e}/items/${s}`,r)},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 Xt({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 Zt({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("tags-rules",o)},create({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function Ht({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 es({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,expand:r=null}){const n={expand:r};return t.post(`transactions/${e}/refund`,s,n)},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}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)}}}function ts({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({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ss({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)},deleteUserMembership({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function rs({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)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function ns({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 us{constructor({apiHandler:e}){this.accountRegistrationSettings=Ie({apiHandler:e}),this.account=Se({apiHandler:e}),this.allowlists=Ee({apiHandler:e}),this.amlChecks=Pe({apiHandler:e}),this.amlSettings=xe({apiHandler:e}),this.apiKeys=Ce({apiHandler:e}),this.applicationInstances=je({apiHandler:e}),this.applications=De({apiHandler:e}),this.balanceTransactions=Me({apiHandler:e}),this.billingPortals=Oe({apiHandler:e}),this.blocklists=Fe({apiHandler:e}),this.broadcastMessages=Be({apiHandler:e}),this.cashiers=Ke({apiHandler:e}),this.checkoutForms=Ne({apiHandler:e}),this.coupons=Le({apiHandler:e}),this.creditMemos=ze({apiHandler:e}),this.customDomains=Ue({apiHandler:e}),this.customFields=Ve({apiHandler:e}),this.customerAuthentication=Je({apiHandler:e}),this.customers=We({apiHandler:e}),this.depositCustomPropertySets=Ge({apiHandler:e}),this.depositRequests=Ye({apiHandler:e}),this.depositStrategies=Qe({apiHandler:e}),this.digitalWallets=_e({apiHandler:e}),this.disputes=Xe({apiHandler:e}),this.emailDeliverySettings=Ze({apiHandler:e}),this.emailMessages=He({apiHandler:e}),this.emailNotifications=et({apiHandler:e}),this.events=tt({apiHandler:e}),this.externalIdentifiers=st({apiHandler:e}),this.externalServicesSettings=rt({apiHandler:e}),this.fees=nt({apiHandler:e}),this.files=ut({apiHandler:e}),this.gatewayAccounts=ot({apiHandler:e}),this.integrations=lt({apiHandler:e}),this.invoices=ct({apiHandler:e}),this.journalAccounts=it({apiHandler:e}),this.journalEntries=at({apiHandler:e}),this.journalRecords=gt({apiHandler:e}),this.kycDocuments=mt({apiHandler:e}),this.kycRequests=ft({apiHandler:e}),this.kycSettings=pt({apiHandler:e}),this.lists=$t({apiHandler:e}),this.orderCancellations=ht({apiHandler:e}),this.orderPauses=yt({apiHandler:e}),this.orderReactivations=At({apiHandler:e}),this.orders=Rt({apiHandler:e}),this.organizationExports=bt({apiHandler:e}),this.organizations=wt({apiHandler:e}),this.paymentCardsBankNames=kt({apiHandler:e}),this.paymentInstruments=vt({apiHandler:e}),this.paymentMethods=qt({apiHandler:e}),this.paymentTokens=dt({apiHandler:e}),this.payoutRequestAllocations=Tt({apiHandler:e}),this.payoutRequestAutoAllocations=It({apiHandler:e}),this.payoutRequestBatches=St({apiHandler:e}),this.payoutRequestSplits=Et({apiHandler:e}),this.payoutRequests=Pt({apiHandler:e}),this.payouts=xt({apiHandler:e}),this.plans=Ct({apiHandler:e}),this.previews=jt({apiHandler:e}),this.products=Dt({apiHandler:e}),this.profile=Mt({apiHandler:e}),this.purchase=Ot({apiHandler:e}),this.quotes=Ft({apiHandler:e}),this.resource=Bt({apiHandler:e}),this.riskScoreRules=Kt({apiHandler:e}),this.roles=Nt({apiHandler:e}),this.search=Lt({apiHandler:e}),this.segments=zt({apiHandler:e}),this.sendThroughAttribution=Ut({apiHandler:e}),this.serviceCredentials=Vt({apiHandler:e}),this.shippingRates=Jt({apiHandler:e}),this.status=Wt({apiHandler:e}),this.subscriptionCancellations=Gt({apiHandler:e}),this.subscriptionPauses=Yt({apiHandler:e}),this.subscriptionReactivations=Qt({apiHandler:e}),this.subscriptions=_t({apiHandler:e}),this.tags=Xt({apiHandler:e}),this.tagsRules=Zt({apiHandler:e}),this.tracking=Ht({apiHandler:e}),this.transactions=es({apiHandler:e}),this.usages=ts({apiHandler:e}),this.users=ss({apiHandler:e}),this.webhooks=rs({apiHandler:e}),this.websites=ns({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 os({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ls({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 i={limit:e,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",i)},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 cs({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function is({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:r,limit:n,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:e,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return t.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:e=null,periodEnd:s=null,filter:r=null}){const n={periodStart:e,periodEnd:s,filter:r};return t.get("reports/aml-checks-inherited-summary",n)},getAmlAuditReport({personId:e,periodStart:s=null,periodEnd:r=null,filter:n=null}){const u={personId:e,periodStart:s,periodEnd:r,filter:n};return t.get("reports/aml-audit-reports",u)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:r=null,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=null,periodEnd:s=null,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=null,periodStart:s=null,periodEnd:r=null,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)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:r=null,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/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:r,offset:n,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,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=null,periodEnd:s=null,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=null,periodEnd:r=null,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=null,periodEnd:s=null,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=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:i=null}){const f={currency:e,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:i};return t.get("reports/journal",f)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e=null,periodEnd:s=null}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e=null,periodEnd:s=null}){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)},getAnnualRecurringRevenue({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/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,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=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:i=null,criteria:f=null}){const g={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:i,criteria:f};return t.get("reports/retention-percentage",g)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:i=null,filter:f=null,sort:g=null,criteria:$=null}){const A={aggregationField:e,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:i,filter:f,sort:g,criteria:$};return t.get("reports/retention-value",A)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:r=null,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=null,periodEnd:s=null,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=null,periodEnd:s=null,accountingMethod:r=null,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=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,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=null,periodStart:s=null,periodEnd:r=null,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=null,periodEnd:s=null,aggregationField:r=null,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)},downloadAmlAuditReport({personId:e,periodStart:s=null,periodEnd:r=null,filter:n=null,accept:u="application/pdf"}){const o={params:{personId:e,periodStart:s,periodEnd:r,filter:n},headers:{Accept:u},responseType:u==="application/pdf"?"arraybuffer":"text"};return t.download("reports/aml-audit-reports",o)}}}function as({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function gs({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 ms({apiHandler:t}){return{query(){return t.get("location")}}}const d={CustomersResource:os,DataExportsResource:ls,HistogramsResource:cs,ReportsResource:is,SubscriptionsResource:as,TimelinesResource:gs,LocationResource:ms};class fs{constructor({apiHandler:e}){this.customers=d.CustomersResource({apiHandler:e}),this.dataExports=d.DataExportsResource({apiHandler:e}),this.histograms=d.HistogramsResource({apiHandler:e}),this.reports=d.ReportsResource({apiHandler:e}),this.subscriptions=d.SubscriptionsResource({apiHandler:e}),this.timelines=d.TimelinesResource({apiHandler:e}),this.location=d.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 ps({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 $s({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function hs({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ys({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function As({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Rs({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 bs({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function ws({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function ks({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function vs({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)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`invoices/${e}`,r)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function qs({apiHandler:t}){return{create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function ds({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function Ts({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function Is({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},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("orders",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},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 Ss({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 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("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function 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 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("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Cs({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 js({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 Ds({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ms({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Os({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function Fs({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}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:s}){return t.patch(`transactions/${e}/dcc`,s)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Bs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ks{constructor({apiHandler:e}){this.account=ps({apiHandler:e}),this.authorization=$s({apiHandler:e}),this.billingPortals=hs({apiHandler:e}),this.cashiers=ys({apiHandler:e}),this.checkoutForms=As({apiHandler:e}),this.customFields=Rs({apiHandler:e}),this.depositRequests=bs({apiHandler:e}),this.deposit=ws({apiHandler:e}),this.depositStrategies=ks({apiHandler:e}),this.invoices=vs({apiHandler:e}),this.kycDocuments=qs({apiHandler:e}),this.kycLivenessSessions=ds({apiHandler:e}),this.kycRequests=Ts({apiHandler:e}),this.orders=Is({apiHandler:e}),this.paymentInstruments=Ss({apiHandler:e}),this.payoutRequests=Es({apiHandler:e}),this.plans=Ps({apiHandler:e}),this.products=xs({apiHandler:e}),this.purchase=Cs({apiHandler:e}),this.quotes=js({apiHandler:e}),this.readyToPayout=Ds({apiHandler:e}),this.subscriptionReactivations=Ms({apiHandler:e}),this.subscriptions=Os({apiHandler:e}),this.transactions=Fs({apiHandler:e}),this.websites=Bs({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 Ns({apiHandler:t}){return new us({apiHandler:t})}function Ls({apiHandler:t}){return new fs({apiHandler:t})}function zs({apiHandler:t}){return new Ks({apiHandler:t})}const F={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},B=6e3;function Q({apiKey:t=null,sandbox:e=!1,timeout:s=B,organizationId:r=null,urls:n=F,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=O({options:o});return Ns({apiHandler:l})}function Us({apiKey:t=null,sandbox:e=!1,timeout:s=B,organizationId:r=null,urls:n=F,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=O({options:o});return Ls({apiHandler:l})}function Vs({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:r=B,organizationId:n=null,urls:u=F,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},i=O({options:l});return i.setSessionToken(l.jwt),zs({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Us,h.RebillyStorefrontAPI=Vs,h.cancellation=Te,h.default=Q,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
16
|
+
*/var D,W;function Ae(){if(W)return D;W=1;var t=ye();function e(s){return t(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}return D=function(r){var n,u;return!(e(r)===!1||(n=r.constructor,typeof n!="function")||(u=n.prototype,e(u)===!1)||u.hasOwnProperty("isPrototypeOf")===!1)},D}var M,G;function Re(){if(G)return M;G=1;const t=he(),e=U(),s=Ae();function r(o,l){switch(e(o)){case"object":return n(o,l);case"array":return u(o,l);default:return t(o)}}function n(o,l){if(typeof l=="function")return l(o);if(l||s(o)){const i=new o.constructor;for(let f in o)i[f]=r(o[f],l);return i}return o}function u(o,l){const i=new o.constructor(o.length);for(let f=0;f<o.length;f++)i[f]=r(o[f],l);return i}return M=r,M}var be=Re();const we=$e(be);let ke="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ve=(t=21)=>{let e="",s=t|0;for(;s-- >0;)e+=ke[Math.random()*64|0];return e};class qe{constructor({id:e=null,created:s=null}={}){this.id=e||ve(),this.created=s||new Date().getTime(),this.cancelSource=y.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,b(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let de=class P{constructor(){if(P.instance)return P.instance;this.requests={},P.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 qe;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const T=new de;class E{}K(E,"cancelById",(e,s)=>{try{T.getById(e).cancel(s),T.deleteById(e)}catch{}}),K(E,"cancelAll",async e=>{for(const s of T.getAll())await s.cancel(e),T.deleteById(s.id)});const Te={cancelAll:async(...t)=>await E.cancelAll(...t)},v={request:"request",response:"response"},Y=t=>{if(!Object.values(v).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function O({options:t}){const e=s();function s(){return y.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 a={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(m=>m).join("/")}@3e79246`};return t.apiKey&&(a["REB-APIKEY"]=t.apiKey),a}function l(){return we(e.defaults.headers)}function i(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function f(c=t.jwt){const a=l();t.apiKey=null,t.jwt=c,delete a.common["REB-APIKEY"],a.common.Authorization=`Bearer ${c}`,e.defaults.headers=a}function g(c=t.publishableKey){const a=l();t.publishableKey=c,a.common.Authorization=`${c}`,e.defaults.headers=a}function $({host:c,port:a,auth:m}){e.defaults.proxy={host:c,port:a,auth:m}}function A({live:c=null,sandbox:a=null}){c&&(t.apiEndpoints.live=c),a&&(t.apiEndpoints.sandbox=a),e.defaults.baseURL=u()}function _(c,{thenDelegate:a,catchDelegate:m=()=>{}}){return Y(c)&&e.interceptors[v[c]].use(a,m)}function X(c,a){return Y(c)&&e.interceptors[v[c]].eject(a)}function Js({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Ws(c){X(v.request,c)}function Gs({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function Ys(c){X(v.response,c)}function I({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:sr}=T.save();p.cancelToken=sr;const ne=async function(){try{const S=await c(p);return Qs({response:S,isCollection:a,config:p})}catch(S){return Z({error:S})}finally{T.deleteById(k)}}();return ne.cancel=S=>E.cancelById(k,S),ne}function Qs({response:c,isCollection:a,config:m}){return a?new ue(c,m):new N(c,m)}function Z({error:c}){if(y.isCancel(c))throw new R.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new R.RebillyForbiddenError(c);case 404:throw new R.RebillyNotFoundError(c);case 405:throw new R.RebillyMethodNotAllowedError(c);case 409:throw new R.RebillyConflictError(c);case 422:throw new R.RebillyValidationError(c);default:throw new R.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new R.RebillyTimeoutError(c):new R.RebillyRequestError(c)}function _s(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>{var m;return c.params[a]!==null&&c.params[a]!==""&&!(a==="sort"&&((m=c.params[a])==null?void 0:m.length)===0)}).reduce((a,m)=>{const p=c.params[m];return a[m]=m==="sort"&&Array.isArray(p)?p.join(","):p,a},{})),c}function H(c={}){return{..._s(c)}}function ee(c,a={}){return I({request:m=>e.get(c,m),config:{params:a}})}function Xs(c,a){return I({request:m=>e.get(c,m),config:{params:a},isCollection:!0})}function te(c,a,m={}){let p={};return m.authenticate===!1&&(p={headers:l()},delete p.headers.common["REB-APIKEY"],delete p.headers.common.Authorization),m.params&&(p.params={...m.params}),I({request:k=>e.post(c,a,k),config:p})}function se(c,a,m={}){return I({request:p=>e.put(c,a,p),config:{params:m}})}function Zs(c,a){return I({request:m=>e.patch(c,a,m),config:{}})}function re(c,a=null){return I({request:m=>e.delete(c,m),config:a!=null?{data:a}:{}})}function Hs(c,a){return re(c,a)}async function er(c,a,m,p={}){if(a==="")return te(c,m,{params:p});try{if((await ee(c)).response.status===200)throw new R.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(k){if(k.name==="RebillyNotFoundError")return se(c,m,p);throw k}}async function tr(c,a){const m=H(a);try{const p=await e.get(c,m);return new oe(p,m)}catch(p){return Z({error:p})}}return{getInstance:r,addRequestInterceptor:Js,removeRequestInterceptor:Ws,addResponseInterceptor:Gs,removeResponseInterceptor:Ys,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:Xs,post:te,put:se,patch:Zs,delete:re,deleteAll:Hs,create:er,download:tr}}function Ie({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("account-registration-settings",r)},create({id:e="",data:s}){return t.create(`account-registration-settings/${e}`,e,s)},get({id:e}){return t.get(`account-registration-settings/${e}`)},update({id:e,data:s}){return t.put(`account-registration-settings/${e}`,s)},delete({id:e}){return t.delete(`account-registration-settings/${e}`)}}}function Se({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Ee({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 Pe({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 xe({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Ce({apiHandler:t}){return{getAll({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("api-keys",u)},create({id:e="",data:s}){return t.create(`api-keys/${e}`,e,s)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:s}){return t.put(`api-keys/${e}`,s)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function 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 De({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit: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 Me({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 Oe({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 Fe({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 Be({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 Ke({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Ne({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 Le({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)}}}const q={Accept:"application/pdf"};function ze({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("credit-memos",l)},create({id:e="",data:s}){return t.create(`credit-memos/${e}`,e,s)},get({id:e}){return t.get(`credit-memos/${e}`)},update({id:e,data:s}){return t.put(`credit-memos/${e}`,s)},patch({id:e,data:s}){return t.patch(`credit-memos/${e}`,s)},void({id:e}){return t.post(`credit-memos/${e}/void`)},refund({id:e}){return t.post(`credit-memos/${e}/refund`)},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}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`credit-memos/${e}`,s)}}}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("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 Ve({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 Je({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 We({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("customers",i)},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}`)},getCustomerCreditBalance({id:e}){return t.get(`customers/${e}/credit-balance`)},generateComplianceScreeningReport({id:e}){return t.post(`customers/${e}/compliance-screening-report`)}}}function Ge({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("deposit-custom-property-sets",u)},create({id:e="",data:s}){return t.create(`deposit-custom-property-sets/${e}`,e,s)},get({id:e}){return t.get(`deposit-custom-property-sets/${e}`)},update({id:e,data:s}){return t.put(`deposit-custom-property-sets/${e}`,s)},delete({id:e}){return t.delete(`deposit-custom-property-sets/${e}`)}}}function Ye({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("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function Qe({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("deposit-strategies",u)},create({id:e="",data:s}){return t.create(`deposit-strategies/${e}`,e,s)},get({id:e}){return t.get(`deposit-strategies/${e}`)},update({id:e,data:s}){return t.put(`deposit-strategies/${e}`,s)},delete({id:e}){return t.delete(`deposit-strategies/${e}`)}}}function _e({apiHandler:t}){return{validate({data:e}){return t.post("digital-wallets/validation",e)},create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)}}}function Xe({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 Ze({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 He({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 et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:e,offset:s,filter:r,q:n};return t.getAll("events",u)},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data: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 i={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,i)},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 i={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,i)},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 st({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 rt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function nt({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 ut({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 i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("attachments",i)},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 i=(await o).items.map(g=>this.detach({id:g.fields.id}));r=[...r,i],await Promise.all(i);const f=t.delete(`files/${e}`);return r.push(f),f})();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:""},i=this.update({id:o.fields.id,data:l});return r.push(i),i})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function ot({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}`)},upsert({id:e,data:s}){return t.put(`gateway-accounts/${e}`,s)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},update({id:e,data:s}){return t.patch(`gateway-accounts/${e}`,s)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:s=null,offset: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 lt({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}`)}}}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("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)},allocateCreditBalance({id:e,data:s}){return t.post(`invoices/${e}/allocate-credit-balance`,s)},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 it({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 at({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)}}}function gt({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("journal-records",o)},create({id:e="",data:s}){return t.create(`journal-records/${e}`,e,s)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:s}){return t.put(`journal-records/${e}`,s)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function mt({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 ft({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-requests",o)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:s}){return t.patch(`kyc-requests/${e}`,s)}}}function pt({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function $t({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 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("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function yt({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("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function At({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("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function Rt({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("orders",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`orders/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`orders/${e}`,s,n)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:r=null}){const n={expand:r};return t.post(`orders/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`orders/${e}/items/${s}`,r)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function bt({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 wt({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 kt({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 vt({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`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function qt({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 dt({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 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("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function It({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function St({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("payout-request-batches",o)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`payout-request-batches/${e}`)},delete({id:e}){return t.delete(`payout-request-batches/${e}`)},patch({id:e,data:s}){return t.patch(`payout-request-batches/${e}`,s)},autoAllocate({id:e}){return t.post(`payout-request-batches/${e}/auto-allocate`)},approve({id:e}){return t.post(`payout-request-batches/${e}/approve`)},block({id:e,data:s}){return t.post(`payout-request-batches/${e}/block`,s)},addPayoutRequests({id:e,data:s}){return t.post(`payout-request-batches/${e}/payout-requests`,s)},removePayoutRequests({id:e,data:s}){return t.post(`payout-request-batches/${e}/payout-requests/remove`,s)},unblock({id:e}){return t.post(`payout-request-batches/${e}/unblock`)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function Et({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",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("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},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(`payout-requests/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`payout-requests/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`payout-requests/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`payout-requests/${e}/timeline/${s}`)}}}function xt({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Ct({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 jt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Dt({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 Mt({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")},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function Ot({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ft({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 Bt({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 Kt({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 Nt({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 Lt({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 zt({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 Ut({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Vt({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:i=null}){const f={limit:r,offset:n,filter:u,q:o,fields:l,sort:i};return t.getAll(`service-credentials/${e}/${s}/items`,f)}}}function Jt({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 Wt({apiHandler:t}){return{get(){return t.get("status")}}}function Gt({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 Yt({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 Qt({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 _t({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,expand:r=null}){const n={expand:r};return t.post(`subscriptions/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`subscriptions/${e}/items/${s}`,r)},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 Xt({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 Zt({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("tags-rules",o)},create({id:e="",data:s}){return t.create(`tags-rules/${e}`,e,s)},get({id:e}){return t.get(`tags-rules/${e}`)},update({id:e,data:s}){return t.put(`tags-rules/${e}`,s)},delete({id:e}){return t.delete(`tags-rules/${e}`)}}}function Ht({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 es({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,expand:r=null}){const n={expand:r};return t.post(`transactions/${e}/refund`,s,n)},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}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)}}}function ts({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({data:e}){return t.post("usages",e)},get({id:e}){return t.get(`usages/${e}`)},delete({id:e}){return t.delete(`usages/${e}`)}}}function ss({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)},deleteUserMembership({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function rs({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)},delete({id:e}){return t.delete(`webhooks/${e}`)}}}function ns({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 us{constructor({apiHandler:e}){this.accountRegistrationSettings=Ie({apiHandler:e}),this.account=Se({apiHandler:e}),this.allowlists=Ee({apiHandler:e}),this.amlChecks=Pe({apiHandler:e}),this.amlSettings=xe({apiHandler:e}),this.apiKeys=Ce({apiHandler:e}),this.applicationInstances=je({apiHandler:e}),this.applications=De({apiHandler:e}),this.balanceTransactions=Me({apiHandler:e}),this.billingPortals=Oe({apiHandler:e}),this.blocklists=Fe({apiHandler:e}),this.broadcastMessages=Be({apiHandler:e}),this.cashiers=Ke({apiHandler:e}),this.checkoutForms=Ne({apiHandler:e}),this.coupons=Le({apiHandler:e}),this.creditMemos=ze({apiHandler:e}),this.customDomains=Ue({apiHandler:e}),this.customFields=Ve({apiHandler:e}),this.customerAuthentication=Je({apiHandler:e}),this.customers=We({apiHandler:e}),this.depositCustomPropertySets=Ge({apiHandler:e}),this.depositRequests=Ye({apiHandler:e}),this.depositStrategies=Qe({apiHandler:e}),this.digitalWallets=_e({apiHandler:e}),this.disputes=Xe({apiHandler:e}),this.emailDeliverySettings=Ze({apiHandler:e}),this.emailMessages=He({apiHandler:e}),this.emailNotifications=et({apiHandler:e}),this.events=tt({apiHandler:e}),this.externalIdentifiers=st({apiHandler:e}),this.externalServicesSettings=rt({apiHandler:e}),this.fees=nt({apiHandler:e}),this.files=ut({apiHandler:e}),this.gatewayAccounts=ot({apiHandler:e}),this.integrations=lt({apiHandler:e}),this.invoices=ct({apiHandler:e}),this.journalAccounts=it({apiHandler:e}),this.journalEntries=at({apiHandler:e}),this.journalRecords=gt({apiHandler:e}),this.kycDocuments=mt({apiHandler:e}),this.kycRequests=ft({apiHandler:e}),this.kycSettings=pt({apiHandler:e}),this.lists=$t({apiHandler:e}),this.orderCancellations=ht({apiHandler:e}),this.orderPauses=yt({apiHandler:e}),this.orderReactivations=At({apiHandler:e}),this.orders=Rt({apiHandler:e}),this.organizationExports=bt({apiHandler:e}),this.organizations=wt({apiHandler:e}),this.paymentCardsBankNames=kt({apiHandler:e}),this.paymentInstruments=vt({apiHandler:e}),this.paymentMethods=qt({apiHandler:e}),this.paymentTokens=dt({apiHandler:e}),this.payoutRequestAllocations=Tt({apiHandler:e}),this.payoutRequestAutoAllocations=It({apiHandler:e}),this.payoutRequestBatches=St({apiHandler:e}),this.payoutRequestSplits=Et({apiHandler:e}),this.payoutRequests=Pt({apiHandler:e}),this.payouts=xt({apiHandler:e}),this.plans=Ct({apiHandler:e}),this.previews=jt({apiHandler:e}),this.products=Dt({apiHandler:e}),this.profile=Mt({apiHandler:e}),this.purchase=Ot({apiHandler:e}),this.quotes=Ft({apiHandler:e}),this.resource=Bt({apiHandler:e}),this.riskScoreRules=Kt({apiHandler:e}),this.roles=Nt({apiHandler:e}),this.search=Lt({apiHandler:e}),this.segments=zt({apiHandler:e}),this.sendThroughAttribution=Ut({apiHandler:e}),this.serviceCredentials=Vt({apiHandler:e}),this.shippingRates=Jt({apiHandler:e}),this.status=Wt({apiHandler:e}),this.subscriptionCancellations=Gt({apiHandler:e}),this.subscriptionPauses=Yt({apiHandler:e}),this.subscriptionReactivations=Qt({apiHandler:e}),this.subscriptions=_t({apiHandler:e}),this.tags=Xt({apiHandler:e}),this.tagsRules=Zt({apiHandler:e}),this.tracking=Ht({apiHandler:e}),this.transactions=es({apiHandler:e}),this.usages=ts({apiHandler:e}),this.users=ss({apiHandler:e}),this.webhooks=rs({apiHandler:e}),this.websites=ns({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 os({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ls({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 i={limit:e,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return t.getAll("data-exports",i)},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 cs({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return t.get("histograms/transactions",o)}}}function is({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:r,limit:n,offset:u};return t.get("reports/api-log-summary",o)},getAmlChecks({periodStart:e=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:e,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return t.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:e=null,periodEnd:s=null,filter:r=null}){const n={periodStart:e,periodEnd:s,filter:r};return t.get("reports/aml-checks-inherited-summary",n)},getAmlAuditReport({personId:e,periodStart:s=null,periodEnd:r=null,filter:n=null}){const u={personId:e,periodStart:s,periodEnd:r,filter:n};return t.get("reports/aml-audit-reports",u)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:r=null,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=null,periodEnd:s=null,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=null,periodStart:s=null,periodEnd:r=null,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)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:r=null,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/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:r,offset:n,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,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=null,periodEnd:s=null,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=null,periodEnd:r=null,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=null,periodEnd:s=null,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=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:i=null}){const f={currency:e,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:i};return t.get("reports/journal",f)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e=null,periodEnd:s=null}){const r={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e=null,periodEnd:s=null}){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)},getAnnualRecurringRevenue({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/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,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=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:i=null,criteria:f=null}){const g={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:i,criteria:f};return t.get("reports/retention-percentage",g)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:i=null,filter:f=null,sort:g=null,criteria:$=null}){const A={aggregationField:e,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:i,filter:f,sort:g,criteria:$};return t.get("reports/retention-value",A)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:e,issuedFrom:s,issuedTo:r,recognizedTo:n};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:r=null,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=null,periodEnd:s=null,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=null,periodEnd:s=null,accountingMethod:r=null,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=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,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=null,periodStart:s=null,periodEnd:r=null,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=null,periodEnd:s=null,aggregationField:r=null,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)},downloadAmlAuditReport({personId:e,periodStart:s=null,periodEnd:r=null,filter:n=null,accept:u="application/pdf"}){const o={params:{personId:e,periodStart:s,periodEnd:r,filter:n},headers:{Accept:u},responseType:u==="application/pdf"?"arraybuffer":"text"};return t.download("reports/aml-audit-reports",o)}}}function as({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function gs({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 ms({apiHandler:t}){return{query(){return t.get("location")}}}const d={CustomersResource:os,DataExportsResource:ls,HistogramsResource:cs,ReportsResource:is,SubscriptionsResource:as,TimelinesResource:gs,LocationResource:ms};class fs{constructor({apiHandler:e}){this.customers=d.CustomersResource({apiHandler:e}),this.dataExports=d.DataExportsResource({apiHandler:e}),this.histograms=d.HistogramsResource({apiHandler:e}),this.reports=d.ReportsResource({apiHandler:e}),this.subscriptions=d.SubscriptionsResource({apiHandler:e}),this.timelines=d.TimelinesResource({apiHandler:e}),this.location=d.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 ps({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 $s({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function hs({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ys({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function As({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Rs({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 bs({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function ws({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function ks({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function vs({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)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`invoices/${e}`,r)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function qs({apiHandler:t}){return{create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function ds({apiHandler:t}){return{create({data:e}){return t.post("kyc-liveness-sessions",e)},get({id:e}){return t.get(`kyc-liveness-sessions/${e}`)},finish({id:e}){return t.post(`kyc-liveness-sessions/${e}/finish`)}}}function Ts({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function Is({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},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("orders",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},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 Ss({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 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("payout-requests",o)},create({data:e}){return t.post("payout-requests",e)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)}}}function 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 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("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Cs({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 js({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 Ds({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ms({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Os({apiHandler:t}){return{changeItems({id:e,data:s}){return t.post(`subscriptions/${e}/change-items`,s)},create({data:e}){return t.post("subscriptions",e)}}}function Fs({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}`)},getDcc({id:e}){return t.get(`transactions/${e}/dcc`)},updateDcc({id:e,data:s}){return t.patch(`transactions/${e}/dcc`,s)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Bs({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ks{constructor({apiHandler:e}){this.account=ps({apiHandler:e}),this.authorization=$s({apiHandler:e}),this.billingPortals=hs({apiHandler:e}),this.cashiers=ys({apiHandler:e}),this.checkoutForms=As({apiHandler:e}),this.customFields=Rs({apiHandler:e}),this.depositRequests=bs({apiHandler:e}),this.deposit=ws({apiHandler:e}),this.depositStrategies=ks({apiHandler:e}),this.invoices=vs({apiHandler:e}),this.kycDocuments=qs({apiHandler:e}),this.kycLivenessSessions=ds({apiHandler:e}),this.kycRequests=Ts({apiHandler:e}),this.orders=Is({apiHandler:e}),this.paymentInstruments=Ss({apiHandler:e}),this.payoutRequests=Es({apiHandler:e}),this.plans=Ps({apiHandler:e}),this.products=xs({apiHandler:e}),this.purchase=Cs({apiHandler:e}),this.quotes=js({apiHandler:e}),this.readyToPayout=Ds({apiHandler:e}),this.subscriptionReactivations=Ms({apiHandler:e}),this.subscriptions=Os({apiHandler:e}),this.transactions=Fs({apiHandler:e}),this.websites=Bs({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 Ns({apiHandler:t}){return new us({apiHandler:t})}function Ls({apiHandler:t}){return new fs({apiHandler:t})}function zs({apiHandler:t}){return new Ks({apiHandler:t})}const F={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},B=6e3;function Q({apiKey:t=null,sandbox:e=!1,timeout:s=B,organizationId:r=null,urls:n=F,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=O({options:o});return Ns({apiHandler:l})}function Us({apiKey:t=null,sandbox:e=!1,timeout:s=B,organizationId:r=null,urls:n=F,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=O({options:o});return Ls({apiHandler:l})}function Vs({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:r=B,organizationId:n=null,urls:u=F,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:t,jwt:e,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},i=O({options:l});return i.setSessionToken(l.jwt),zs({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Us,h.RebillyStorefrontAPI=Vs,h.cancellation=Te,h.default=Q,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED