rebilly-js-sdk 62.192.1 → 62.193.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 +4 -2
- package/dist/rebilly-js-sdk.d.cts +14 -0
- package/dist/rebilly-js-sdk.d.mts +14 -0
- package/dist/rebilly-js-sdk.d.ts +14 -0
- package/dist/rebilly-js-sdk.es.mjs +109 -100
- package/dist/rebilly-js-sdk.umd.js +2 -2
- package/package.json +1 -1
- package/src/resources/api-instance.js +4 -0
- package/src/resources/payout-request-batch-operations-resource.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
## 62.
|
|
1
|
+
## 62.193.0 (2026-10-01)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#27694](https://github.com/Rebilly/rebilly/pull/27694))
|
|
@@ -101584,6 +101584,15 @@ declare module "resources/payout-request-auto-allocations-resource" {
|
|
|
101584
101584
|
}): any;
|
|
101585
101585
|
};
|
|
101586
101586
|
}
|
|
101587
|
+
declare module "resources/payout-request-batch-operations-resource" {
|
|
101588
|
+
export default function PayoutRequestBatchOperationsResource({ apiHandler }: {
|
|
101589
|
+
apiHandler: any;
|
|
101590
|
+
}): {
|
|
101591
|
+
create({ data }: {
|
|
101592
|
+
data: any;
|
|
101593
|
+
}): any;
|
|
101594
|
+
};
|
|
101595
|
+
}
|
|
101587
101596
|
declare module "resources/payout-request-batch-previews-resource" {
|
|
101588
101597
|
export default function PayoutRequestBatchPreviewsResource({ apiHandler }: {
|
|
101589
101598
|
apiHandler: any;
|
|
@@ -103380,6 +103389,11 @@ declare module "resources/api-instance" {
|
|
|
103380
103389
|
data: any;
|
|
103381
103390
|
}): any;
|
|
103382
103391
|
};
|
|
103392
|
+
payoutRequestBatchOperations: {
|
|
103393
|
+
create({ data }: {
|
|
103394
|
+
data: any;
|
|
103395
|
+
}): any;
|
|
103396
|
+
};
|
|
103383
103397
|
payoutRequestBatchPreviews: {
|
|
103384
103398
|
create({ data }: {
|
|
103385
103399
|
data: any;
|
|
@@ -101584,6 +101584,15 @@ declare module "resources/payout-request-auto-allocations-resource" {
|
|
|
101584
101584
|
}): any;
|
|
101585
101585
|
};
|
|
101586
101586
|
}
|
|
101587
|
+
declare module "resources/payout-request-batch-operations-resource" {
|
|
101588
|
+
export default function PayoutRequestBatchOperationsResource({ apiHandler }: {
|
|
101589
|
+
apiHandler: any;
|
|
101590
|
+
}): {
|
|
101591
|
+
create({ data }: {
|
|
101592
|
+
data: any;
|
|
101593
|
+
}): any;
|
|
101594
|
+
};
|
|
101595
|
+
}
|
|
101587
101596
|
declare module "resources/payout-request-batch-previews-resource" {
|
|
101588
101597
|
export default function PayoutRequestBatchPreviewsResource({ apiHandler }: {
|
|
101589
101598
|
apiHandler: any;
|
|
@@ -103380,6 +103389,11 @@ declare module "resources/api-instance" {
|
|
|
103380
103389
|
data: any;
|
|
103381
103390
|
}): any;
|
|
103382
103391
|
};
|
|
103392
|
+
payoutRequestBatchOperations: {
|
|
103393
|
+
create({ data }: {
|
|
103394
|
+
data: any;
|
|
103395
|
+
}): any;
|
|
103396
|
+
};
|
|
103383
103397
|
payoutRequestBatchPreviews: {
|
|
103384
103398
|
create({ data }: {
|
|
103385
103399
|
data: any;
|
package/dist/rebilly-js-sdk.d.ts
CHANGED
|
@@ -101584,6 +101584,15 @@ declare module "resources/payout-request-auto-allocations-resource" {
|
|
|
101584
101584
|
}): any;
|
|
101585
101585
|
};
|
|
101586
101586
|
}
|
|
101587
|
+
declare module "resources/payout-request-batch-operations-resource" {
|
|
101588
|
+
export default function PayoutRequestBatchOperationsResource({ apiHandler }: {
|
|
101589
|
+
apiHandler: any;
|
|
101590
|
+
}): {
|
|
101591
|
+
create({ data }: {
|
|
101592
|
+
data: any;
|
|
101593
|
+
}): any;
|
|
101594
|
+
};
|
|
101595
|
+
}
|
|
101587
101596
|
declare module "resources/payout-request-batch-previews-resource" {
|
|
101588
101597
|
export default function PayoutRequestBatchPreviewsResource({ apiHandler }: {
|
|
101589
101598
|
apiHandler: any;
|
|
@@ -103380,6 +103389,11 @@ declare module "resources/api-instance" {
|
|
|
103380
103389
|
data: any;
|
|
103381
103390
|
}): any;
|
|
103382
103391
|
};
|
|
103392
|
+
payoutRequestBatchOperations: {
|
|
103393
|
+
create({ data }: {
|
|
103394
|
+
data: any;
|
|
103395
|
+
}): any;
|
|
103396
|
+
};
|
|
103383
103397
|
payoutRequestBatchPreviews: {
|
|
103384
103398
|
create({ data }: {
|
|
103385
103399
|
data: any;
|
|
@@ -455,7 +455,7 @@ E(I, "cancelAll", async (e) => {
|
|
|
455
455
|
for (const s of q.getAll())
|
|
456
456
|
await s.cancel(e), q.deleteById(s.id);
|
|
457
457
|
});
|
|
458
|
-
const
|
|
458
|
+
const ur = {
|
|
459
459
|
/**
|
|
460
460
|
* @type Cancellation.cancelAll
|
|
461
461
|
*/
|
|
@@ -489,7 +489,7 @@ function O({ options: t }) {
|
|
|
489
489
|
}
|
|
490
490
|
function o() {
|
|
491
491
|
const a = {
|
|
492
|
-
"REB-API-CONSUMER": `${["Rebilly", t.appName, "js-sdk"].filter((m) => m).join("/")}@
|
|
492
|
+
"REB-API-CONSUMER": `${["Rebilly", t.appName, "js-sdk"].filter((m) => m).join("/")}@f3eab18`
|
|
493
493
|
};
|
|
494
494
|
return t.apiKey && (a["REB-APIKEY"] = t.apiKey), a;
|
|
495
495
|
}
|
|
@@ -2937,11 +2937,18 @@ function Ot({ apiHandler: t }) {
|
|
|
2937
2937
|
function Ft({ apiHandler: t }) {
|
|
2938
2938
|
return {
|
|
2939
2939
|
create({ data: e }) {
|
|
2940
|
-
return t.post("payout-request-batch-
|
|
2940
|
+
return t.post("payout-request-batch-operations", e);
|
|
2941
2941
|
}
|
|
2942
2942
|
};
|
|
2943
2943
|
}
|
|
2944
2944
|
function Bt({ apiHandler: t }) {
|
|
2945
|
+
return {
|
|
2946
|
+
create({ data: e }) {
|
|
2947
|
+
return t.post("payout-request-batch-previews", e);
|
|
2948
|
+
}
|
|
2949
|
+
};
|
|
2950
|
+
}
|
|
2951
|
+
function Kt({ apiHandler: t }) {
|
|
2945
2952
|
return {
|
|
2946
2953
|
/**
|
|
2947
2954
|
* @param { rebilly.GetPayoutRequestBatchCollectionRequest } request
|
|
@@ -3005,14 +3012,14 @@ function Bt({ apiHandler: t }) {
|
|
|
3005
3012
|
}
|
|
3006
3013
|
};
|
|
3007
3014
|
}
|
|
3008
|
-
function
|
|
3015
|
+
function Nt({ apiHandler: t }) {
|
|
3009
3016
|
return {
|
|
3010
3017
|
create({ data: e }) {
|
|
3011
3018
|
return t.post("payout-request-splits", e);
|
|
3012
3019
|
}
|
|
3013
3020
|
};
|
|
3014
3021
|
}
|
|
3015
|
-
function
|
|
3022
|
+
function Lt({ apiHandler: t }) {
|
|
3016
3023
|
return {
|
|
3017
3024
|
/**
|
|
3018
3025
|
* @param { rebilly.GetPayoutRequestCollectionRequest } request
|
|
@@ -3079,14 +3086,14 @@ function Nt({ apiHandler: t }) {
|
|
|
3079
3086
|
}
|
|
3080
3087
|
};
|
|
3081
3088
|
}
|
|
3082
|
-
function
|
|
3089
|
+
function zt({ apiHandler: t }) {
|
|
3083
3090
|
return {
|
|
3084
3091
|
create({ data: e }) {
|
|
3085
3092
|
return t.post("payouts", e);
|
|
3086
3093
|
}
|
|
3087
3094
|
};
|
|
3088
3095
|
}
|
|
3089
|
-
function
|
|
3096
|
+
function Ut({ apiHandler: t }) {
|
|
3090
3097
|
return {
|
|
3091
3098
|
/**
|
|
3092
3099
|
* @param { rebilly.GetPlanCollectionRequest } request
|
|
@@ -3126,7 +3133,7 @@ function zt({ apiHandler: t }) {
|
|
|
3126
3133
|
}
|
|
3127
3134
|
};
|
|
3128
3135
|
}
|
|
3129
|
-
function
|
|
3136
|
+
function Vt({ apiHandler: t }) {
|
|
3130
3137
|
return {
|
|
3131
3138
|
order({ data: e }) {
|
|
3132
3139
|
return t.post("previews/orders", e);
|
|
@@ -3139,7 +3146,7 @@ function Ut({ apiHandler: t }) {
|
|
|
3139
3146
|
}
|
|
3140
3147
|
};
|
|
3141
3148
|
}
|
|
3142
|
-
function
|
|
3149
|
+
function Jt({ apiHandler: t }) {
|
|
3143
3150
|
return {
|
|
3144
3151
|
/**
|
|
3145
3152
|
* @param { rebilly.GetProductCollectionRequest } request
|
|
@@ -3179,7 +3186,7 @@ function Vt({ apiHandler: t }) {
|
|
|
3179
3186
|
}
|
|
3180
3187
|
};
|
|
3181
3188
|
}
|
|
3182
|
-
function
|
|
3189
|
+
function Wt({ apiHandler: t }) {
|
|
3183
3190
|
return {
|
|
3184
3191
|
startPermissionsEmulation({ data: e }) {
|
|
3185
3192
|
return t.post("permissions-emulation", e);
|
|
@@ -3220,14 +3227,14 @@ function Jt({ apiHandler: t }) {
|
|
|
3220
3227
|
}
|
|
3221
3228
|
};
|
|
3222
3229
|
}
|
|
3223
|
-
function
|
|
3230
|
+
function Gt({ apiHandler: t }) {
|
|
3224
3231
|
return {
|
|
3225
3232
|
readyToPay({ data: e }) {
|
|
3226
3233
|
return t.post("ready-to-pay", e);
|
|
3227
3234
|
}
|
|
3228
3235
|
};
|
|
3229
3236
|
}
|
|
3230
|
-
function
|
|
3237
|
+
function Yt({ apiHandler: t }) {
|
|
3231
3238
|
return {
|
|
3232
3239
|
/**
|
|
3233
3240
|
* @param { rebilly.GetQuoteCollectionRequest } request
|
|
@@ -3320,7 +3327,7 @@ function Gt({ apiHandler: t }) {
|
|
|
3320
3327
|
}
|
|
3321
3328
|
};
|
|
3322
3329
|
}
|
|
3323
|
-
function
|
|
3330
|
+
function Qt({ apiHandler: t }) {
|
|
3324
3331
|
return {
|
|
3325
3332
|
/**
|
|
3326
3333
|
* @returns { rebilly.GetReleaseFlagsResponsePromise } response
|
|
@@ -3330,7 +3337,7 @@ function Yt({ apiHandler: t }) {
|
|
|
3330
3337
|
}
|
|
3331
3338
|
};
|
|
3332
3339
|
}
|
|
3333
|
-
function
|
|
3340
|
+
function Xt({ apiHandler: t }) {
|
|
3334
3341
|
return {
|
|
3335
3342
|
/**
|
|
3336
3343
|
* @returns { rebilly.GetExternalIdentifierResponsePromise } response
|
|
@@ -3361,7 +3368,7 @@ function Qt({ apiHandler: t }) {
|
|
|
3361
3368
|
}
|
|
3362
3369
|
};
|
|
3363
3370
|
}
|
|
3364
|
-
function
|
|
3371
|
+
function Zt({ apiHandler: t }) {
|
|
3365
3372
|
return {
|
|
3366
3373
|
/**
|
|
3367
3374
|
* @returns { rebilly.GetRiskScoreRulesResponsePromise } response
|
|
@@ -3389,7 +3396,7 @@ function Xt({ apiHandler: t }) {
|
|
|
3389
3396
|
}
|
|
3390
3397
|
};
|
|
3391
3398
|
}
|
|
3392
|
-
function
|
|
3399
|
+
function _t({ apiHandler: t }) {
|
|
3393
3400
|
return {
|
|
3394
3401
|
/**
|
|
3395
3402
|
* @param { rebilly.GetRoleCollectionRequest } request
|
|
@@ -3431,7 +3438,7 @@ function Zt({ apiHandler: t }) {
|
|
|
3431
3438
|
}
|
|
3432
3439
|
};
|
|
3433
3440
|
}
|
|
3434
|
-
function
|
|
3441
|
+
function Ht({ apiHandler: t }) {
|
|
3435
3442
|
return {
|
|
3436
3443
|
/**
|
|
3437
3444
|
* @returns { rebilly.GetSearchResponsePromise } response
|
|
@@ -3442,7 +3449,7 @@ function _t({ apiHandler: t }) {
|
|
|
3442
3449
|
}
|
|
3443
3450
|
};
|
|
3444
3451
|
}
|
|
3445
|
-
function
|
|
3452
|
+
function es({ apiHandler: t }) {
|
|
3446
3453
|
return {
|
|
3447
3454
|
/**
|
|
3448
3455
|
* @param { rebilly.GetGridSegmentCollectionRequest } request
|
|
@@ -3482,7 +3489,7 @@ function Ht({ apiHandler: t }) {
|
|
|
3482
3489
|
}
|
|
3483
3490
|
};
|
|
3484
3491
|
}
|
|
3485
|
-
function
|
|
3492
|
+
function ts({ apiHandler: t }) {
|
|
3486
3493
|
return {
|
|
3487
3494
|
/**
|
|
3488
3495
|
* @returns { rebilly.GetSendThroughAttributionCollectionResponsePromise } response
|
|
@@ -3492,7 +3499,7 @@ function es({ apiHandler: t }) {
|
|
|
3492
3499
|
}
|
|
3493
3500
|
};
|
|
3494
3501
|
}
|
|
3495
|
-
function
|
|
3502
|
+
function ss({ apiHandler: t }) {
|
|
3496
3503
|
return {
|
|
3497
3504
|
/**
|
|
3498
3505
|
* @param { rebilly.GetServiceCredentialCollectionRequest } request
|
|
@@ -3543,7 +3550,7 @@ function ts({ apiHandler: t }) {
|
|
|
3543
3550
|
}
|
|
3544
3551
|
};
|
|
3545
3552
|
}
|
|
3546
|
-
function
|
|
3553
|
+
function rs({ apiHandler: t }) {
|
|
3547
3554
|
return {
|
|
3548
3555
|
/**
|
|
3549
3556
|
* @param { rebilly.GetShippingRateCollectionRequest } request
|
|
@@ -3583,7 +3590,7 @@ function ss({ apiHandler: t }) {
|
|
|
3583
3590
|
}
|
|
3584
3591
|
};
|
|
3585
3592
|
}
|
|
3586
|
-
function
|
|
3593
|
+
function ns({ apiHandler: t }) {
|
|
3587
3594
|
return {
|
|
3588
3595
|
/**
|
|
3589
3596
|
* @returns { rebilly.GetStatusResponsePromise } response
|
|
@@ -3593,7 +3600,7 @@ function rs({ apiHandler: t }) {
|
|
|
3593
3600
|
}
|
|
3594
3601
|
};
|
|
3595
3602
|
}
|
|
3596
|
-
function
|
|
3603
|
+
function us({ apiHandler: t }) {
|
|
3597
3604
|
return {
|
|
3598
3605
|
/**
|
|
3599
3606
|
* @param { rebilly.GetSubscriptionCancellationCollectionRequest } request
|
|
@@ -3624,7 +3631,7 @@ function ns({ apiHandler: t }) {
|
|
|
3624
3631
|
}
|
|
3625
3632
|
};
|
|
3626
3633
|
}
|
|
3627
|
-
function
|
|
3634
|
+
function os({ apiHandler: t }) {
|
|
3628
3635
|
return {
|
|
3629
3636
|
/**
|
|
3630
3637
|
* @param { rebilly.GetSubscriptionPauseCollectionRequest } request
|
|
@@ -3658,7 +3665,7 @@ function us({ apiHandler: t }) {
|
|
|
3658
3665
|
}
|
|
3659
3666
|
};
|
|
3660
3667
|
}
|
|
3661
|
-
function
|
|
3668
|
+
function ls({ apiHandler: t }) {
|
|
3662
3669
|
return {
|
|
3663
3670
|
/**
|
|
3664
3671
|
* @param { rebilly.GetSubscriptionReactivationCollectionRequest } request
|
|
@@ -3679,7 +3686,7 @@ function os({ apiHandler: t }) {
|
|
|
3679
3686
|
}
|
|
3680
3687
|
};
|
|
3681
3688
|
}
|
|
3682
|
-
function
|
|
3689
|
+
function cs({ apiHandler: t }) {
|
|
3683
3690
|
return {
|
|
3684
3691
|
/**
|
|
3685
3692
|
* @param { rebilly.GetSubscriptionCollectionRequest } request
|
|
@@ -3790,7 +3797,7 @@ function ls({ apiHandler: t }) {
|
|
|
3790
3797
|
}
|
|
3791
3798
|
};
|
|
3792
3799
|
}
|
|
3793
|
-
function
|
|
3800
|
+
function is({ apiHandler: t }) {
|
|
3794
3801
|
return {
|
|
3795
3802
|
/**
|
|
3796
3803
|
* @param { rebilly.GetTagCollectionRequest } request
|
|
@@ -3859,7 +3866,7 @@ function cs({ apiHandler: t }) {
|
|
|
3859
3866
|
}
|
|
3860
3867
|
};
|
|
3861
3868
|
}
|
|
3862
|
-
function
|
|
3869
|
+
function as({ apiHandler: t }) {
|
|
3863
3870
|
return {
|
|
3864
3871
|
/**
|
|
3865
3872
|
* @param { rebilly.GetTagRuleCollectionRequest } request
|
|
@@ -3899,7 +3906,7 @@ function is({ apiHandler: t }) {
|
|
|
3899
3906
|
}
|
|
3900
3907
|
};
|
|
3901
3908
|
}
|
|
3902
|
-
function
|
|
3909
|
+
function gs({ apiHandler: t }) {
|
|
3903
3910
|
return {
|
|
3904
3911
|
/**
|
|
3905
3912
|
* @param { rebilly.GetTrackingApiCollectionRequest } request
|
|
@@ -3981,7 +3988,7 @@ function as({ apiHandler: t }) {
|
|
|
3981
3988
|
}
|
|
3982
3989
|
};
|
|
3983
3990
|
}
|
|
3984
|
-
function
|
|
3991
|
+
function ms({ apiHandler: t }) {
|
|
3985
3992
|
return {
|
|
3986
3993
|
/**
|
|
3987
3994
|
* @param { rebilly.GetTransactionCollectionRequest } request
|
|
@@ -4058,7 +4065,7 @@ function gs({ apiHandler: t }) {
|
|
|
4058
4065
|
}
|
|
4059
4066
|
};
|
|
4060
4067
|
}
|
|
4061
|
-
function
|
|
4068
|
+
function fs({ apiHandler: t }) {
|
|
4062
4069
|
return {
|
|
4063
4070
|
/**
|
|
4064
4071
|
* @param { rebilly.GetUsageCollectionRequest } request
|
|
@@ -4088,7 +4095,7 @@ function ms({ apiHandler: t }) {
|
|
|
4088
4095
|
}
|
|
4089
4096
|
};
|
|
4090
4097
|
}
|
|
4091
|
-
function
|
|
4098
|
+
function ps({ apiHandler: t }) {
|
|
4092
4099
|
return {
|
|
4093
4100
|
deleteUserMembership({ organizationId: e, userId: s }) {
|
|
4094
4101
|
return t.delete(`memberships/${e}/${s}`);
|
|
@@ -4128,7 +4135,7 @@ function fs({ apiHandler: t }) {
|
|
|
4128
4135
|
}
|
|
4129
4136
|
};
|
|
4130
4137
|
}
|
|
4131
|
-
function
|
|
4138
|
+
function $s({ apiHandler: t }) {
|
|
4132
4139
|
return {
|
|
4133
4140
|
/**
|
|
4134
4141
|
* @param { rebilly.GetWebhookCollectionRequest } request
|
|
@@ -4162,7 +4169,7 @@ function ps({ apiHandler: t }) {
|
|
|
4162
4169
|
}
|
|
4163
4170
|
};
|
|
4164
4171
|
}
|
|
4165
|
-
function
|
|
4172
|
+
function hs({ apiHandler: t }) {
|
|
4166
4173
|
return {
|
|
4167
4174
|
/**
|
|
4168
4175
|
* @param { rebilly.GetWebsiteCollectionRequest } request
|
|
@@ -4202,7 +4209,7 @@ function $s({ apiHandler: t }) {
|
|
|
4202
4209
|
}
|
|
4203
4210
|
};
|
|
4204
4211
|
}
|
|
4205
|
-
class
|
|
4212
|
+
class ys {
|
|
4206
4213
|
constructor({ apiHandler: e }) {
|
|
4207
4214
|
this.account = Fe({ apiHandler: e }), this.allowlists = Be({ apiHandler: e }), this.amlChecks = Ke({ apiHandler: e }), this.amlSettings = Ne({ apiHandler: e }), this.apiKeys = Le({ apiHandler: e }), this.applicationInstances = ze({ apiHandler: e }), this.applications = Ue({ apiHandler: e }), this.balanceTransactions = Ve({ apiHandler: e }), this.billingPortals = Je({ apiHandler: e }), this.blocklists = We({ apiHandler: e }), this.broadcastMessages = Ge({ apiHandler: e }), this.cashiers = Ye({ apiHandler: e }), this.checkoutForms = Qe({ apiHandler: e }), this.coupons = Xe({ apiHandler: e }), this.creditMemos = Ze({ apiHandler: e }), this.customDomains = _e({ apiHandler: e }), this.customFields = He({ apiHandler: e }), this.customerAuthentication = et({ apiHandler: e }), this.customers = tt({ apiHandler: e }), this.depositCustomPropertySets = st({
|
|
4208
4215
|
apiHandler: e
|
|
@@ -4212,16 +4219,18 @@ class hs {
|
|
|
4212
4219
|
apiHandler: e
|
|
4213
4220
|
}), this.payoutRequestAutoAllocations = Ot({
|
|
4214
4221
|
apiHandler: e
|
|
4215
|
-
}), this.
|
|
4222
|
+
}), this.payoutRequestBatchOperations = Ft({
|
|
4223
|
+
apiHandler: e
|
|
4224
|
+
}), this.payoutRequestBatchPreviews = Bt({
|
|
4216
4225
|
apiHandler: e
|
|
4217
|
-
}), this.payoutRequestBatches =
|
|
4226
|
+
}), this.payoutRequestBatches = Kt({ apiHandler: e }), this.payoutRequestSplits = Nt({ apiHandler: e }), this.payoutRequests = Lt({ apiHandler: e }), this.payouts = zt({ apiHandler: e }), this.plans = Ut({ apiHandler: e }), this.previews = Vt({ apiHandler: e }), this.products = Jt({ apiHandler: e }), this.profile = Wt({ apiHandler: e }), this.purchase = Gt({ apiHandler: e }), this.quotes = Yt({ apiHandler: e }), this.releaseFlags = Qt({ apiHandler: e }), this.resource = Xt({ apiHandler: e }), this.riskScoreRules = Zt({ apiHandler: e }), this.roles = _t({ apiHandler: e }), this.search = Ht({ apiHandler: e }), this.segments = es({ apiHandler: e }), this.sendThroughAttribution = ts({ apiHandler: e }), this.serviceCredentials = ss({ apiHandler: e }), this.shippingRates = rs({ apiHandler: e }), this.status = ns({ apiHandler: e }), this.subscriptionCancellations = us({
|
|
4218
4227
|
apiHandler: e
|
|
4219
|
-
}), this.subscriptionPauses =
|
|
4228
|
+
}), this.subscriptionPauses = os({ apiHandler: e }), this.subscriptionReactivations = ls({
|
|
4220
4229
|
apiHandler: e
|
|
4221
|
-
}), this.subscriptions =
|
|
4230
|
+
}), this.subscriptions = cs({ apiHandler: e }), this.tags = is({ apiHandler: e }), this.tagsRules = as({ apiHandler: e }), this.tracking = gs({ apiHandler: e }), this.transactions = ms({ apiHandler: e }), this.usages = fs({ apiHandler: e }), this.users = ps({ apiHandler: e }), this.webhooks = $s({ apiHandler: e }), this.websites = hs({ 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;
|
|
4222
4231
|
}
|
|
4223
4232
|
}
|
|
4224
|
-
function
|
|
4233
|
+
function As({ apiHandler: t }) {
|
|
4225
4234
|
return {
|
|
4226
4235
|
/**
|
|
4227
4236
|
* @returns { rebilly.GetCustomerSummaryMetricReportResponsePromise } response
|
|
@@ -4231,7 +4240,7 @@ function ys({ apiHandler: t }) {
|
|
|
4231
4240
|
}
|
|
4232
4241
|
};
|
|
4233
4242
|
}
|
|
4234
|
-
function
|
|
4243
|
+
function Rs({ apiHandler: t }) {
|
|
4235
4244
|
return {
|
|
4236
4245
|
/**
|
|
4237
4246
|
* @param { rebilly.GetDataExportCollectionRequest } request
|
|
@@ -4276,7 +4285,7 @@ function As({ apiHandler: t }) {
|
|
|
4276
4285
|
}
|
|
4277
4286
|
};
|
|
4278
4287
|
}
|
|
4279
|
-
function
|
|
4288
|
+
function bs({ apiHandler: t }) {
|
|
4280
4289
|
return {
|
|
4281
4290
|
/**
|
|
4282
4291
|
* @returns { rebilly.GetHistogramAmlCheckReportResponsePromise } response
|
|
@@ -4320,7 +4329,7 @@ function Rs({ apiHandler: t }) {
|
|
|
4320
4329
|
}
|
|
4321
4330
|
};
|
|
4322
4331
|
}
|
|
4323
|
-
function
|
|
4332
|
+
function ws({ apiHandler: t }) {
|
|
4324
4333
|
return {
|
|
4325
4334
|
/**
|
|
4326
4335
|
* @returns { rebilly.GetApiLogSummaryReportResponsePromise } response
|
|
@@ -4819,7 +4828,7 @@ function bs({ apiHandler: t }) {
|
|
|
4819
4828
|
}
|
|
4820
4829
|
};
|
|
4821
4830
|
}
|
|
4822
|
-
function
|
|
4831
|
+
function ks({ apiHandler: t }) {
|
|
4823
4832
|
return {
|
|
4824
4833
|
/**
|
|
4825
4834
|
* @returns { rebilly.GetSubscriptionSummaryMetricReportResponsePromise } response
|
|
@@ -4829,7 +4838,7 @@ function ws({ apiHandler: t }) {
|
|
|
4829
4838
|
}
|
|
4830
4839
|
};
|
|
4831
4840
|
}
|
|
4832
|
-
function
|
|
4841
|
+
function vs({ apiHandler: t }) {
|
|
4833
4842
|
return {
|
|
4834
4843
|
getActivityFeed({ eventTypes: e = null, limit: s = 1e3, offset: r = 0 }) {
|
|
4835
4844
|
const n = {
|
|
@@ -4857,7 +4866,7 @@ function ks({ apiHandler: t }) {
|
|
|
4857
4866
|
}
|
|
4858
4867
|
};
|
|
4859
4868
|
}
|
|
4860
|
-
function
|
|
4869
|
+
function qs({ apiHandler: t }) {
|
|
4861
4870
|
return {
|
|
4862
4871
|
query() {
|
|
4863
4872
|
return t.get("location");
|
|
@@ -4865,15 +4874,15 @@ function vs({ apiHandler: t }) {
|
|
|
4865
4874
|
};
|
|
4866
4875
|
}
|
|
4867
4876
|
const b = {
|
|
4868
|
-
CustomersResource:
|
|
4869
|
-
DataExportsResource:
|
|
4870
|
-
HistogramsResource:
|
|
4871
|
-
ReportsResource:
|
|
4872
|
-
SubscriptionsResource:
|
|
4873
|
-
TimelinesResource:
|
|
4874
|
-
LocationResource:
|
|
4877
|
+
CustomersResource: As,
|
|
4878
|
+
DataExportsResource: Rs,
|
|
4879
|
+
HistogramsResource: bs,
|
|
4880
|
+
ReportsResource: ws,
|
|
4881
|
+
SubscriptionsResource: ks,
|
|
4882
|
+
TimelinesResource: vs,
|
|
4883
|
+
LocationResource: qs
|
|
4875
4884
|
};
|
|
4876
|
-
class
|
|
4885
|
+
class ds {
|
|
4877
4886
|
constructor({ apiHandler: e }) {
|
|
4878
4887
|
this.customers = b.CustomersResource({ apiHandler: e }), this.dataExports = b.DataExportsResource({
|
|
4879
4888
|
apiHandler: e
|
|
@@ -4882,7 +4891,7 @@ class qs {
|
|
|
4882
4891
|
}), this.timelines = b.TimelinesResource({ apiHandler: e }), this.location = b.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;
|
|
4883
4892
|
}
|
|
4884
4893
|
}
|
|
4885
|
-
function
|
|
4894
|
+
function Ts({ apiHandler: t }) {
|
|
4886
4895
|
return {
|
|
4887
4896
|
/**
|
|
4888
4897
|
* @returns { rebilly.StorefrontGetAccountResponsePromise } response
|
|
@@ -4914,7 +4923,7 @@ function ds({ apiHandler: t }) {
|
|
|
4914
4923
|
}
|
|
4915
4924
|
};
|
|
4916
4925
|
}
|
|
4917
|
-
function
|
|
4926
|
+
function Is({ apiHandler: t }) {
|
|
4918
4927
|
return {
|
|
4919
4928
|
login({ data: e }) {
|
|
4920
4929
|
return t.post("login", e);
|
|
@@ -4924,7 +4933,7 @@ function Ts({ apiHandler: t }) {
|
|
|
4924
4933
|
}
|
|
4925
4934
|
};
|
|
4926
4935
|
}
|
|
4927
|
-
function
|
|
4936
|
+
function Ss({ apiHandler: t }) {
|
|
4928
4937
|
return {
|
|
4929
4938
|
/**
|
|
4930
4939
|
* @returns { rebilly.StorefrontGetBillingPortalResponsePromise } response
|
|
@@ -4934,7 +4943,7 @@ function Is({ apiHandler: t }) {
|
|
|
4934
4943
|
}
|
|
4935
4944
|
};
|
|
4936
4945
|
}
|
|
4937
|
-
function
|
|
4946
|
+
function Es({ apiHandler: t }) {
|
|
4938
4947
|
return {
|
|
4939
4948
|
/**
|
|
4940
4949
|
* @returns { rebilly.StorefrontGetCashierResponsePromise } response
|
|
@@ -4944,7 +4953,7 @@ function Ss({ apiHandler: t }) {
|
|
|
4944
4953
|
}
|
|
4945
4954
|
};
|
|
4946
4955
|
}
|
|
4947
|
-
function
|
|
4956
|
+
function Ps({ apiHandler: t }) {
|
|
4948
4957
|
return {
|
|
4949
4958
|
/**
|
|
4950
4959
|
* @returns { rebilly.StorefrontGetCheckoutFormResponsePromise } response
|
|
@@ -4954,7 +4963,7 @@ function Es({ apiHandler: t }) {
|
|
|
4954
4963
|
}
|
|
4955
4964
|
};
|
|
4956
4965
|
}
|
|
4957
|
-
function
|
|
4966
|
+
function xs({ apiHandler: t }) {
|
|
4958
4967
|
return {
|
|
4959
4968
|
/**
|
|
4960
4969
|
* @param { rebilly.StorefrontGetCustomFieldCollectionRequest } request
|
|
@@ -4966,7 +4975,7 @@ function Ps({ apiHandler: t }) {
|
|
|
4966
4975
|
}
|
|
4967
4976
|
};
|
|
4968
4977
|
}
|
|
4969
|
-
function
|
|
4978
|
+
function Cs({ apiHandler: t }) {
|
|
4970
4979
|
return {
|
|
4971
4980
|
/**
|
|
4972
4981
|
* @returns { rebilly.StorefrontGetDepositRequestResponsePromise } response
|
|
@@ -4977,14 +4986,14 @@ function xs({ apiHandler: t }) {
|
|
|
4977
4986
|
}
|
|
4978
4987
|
};
|
|
4979
4988
|
}
|
|
4980
|
-
function
|
|
4989
|
+
function Ds({ apiHandler: t }) {
|
|
4981
4990
|
return {
|
|
4982
4991
|
create({ data: e }) {
|
|
4983
4992
|
return t.post("deposit", e);
|
|
4984
4993
|
}
|
|
4985
4994
|
};
|
|
4986
4995
|
}
|
|
4987
|
-
function
|
|
4996
|
+
function js({ apiHandler: t }) {
|
|
4988
4997
|
return {
|
|
4989
4998
|
/**
|
|
4990
4999
|
* @returns { rebilly.StorefrontGetDepositStrategyResponsePromise } response
|
|
@@ -4994,7 +5003,7 @@ function Ds({ apiHandler: t }) {
|
|
|
4994
5003
|
}
|
|
4995
5004
|
};
|
|
4996
5005
|
}
|
|
4997
|
-
function
|
|
5006
|
+
function Ms({ apiHandler: t }) {
|
|
4998
5007
|
return {
|
|
4999
5008
|
/**
|
|
5000
5009
|
* @param { rebilly.StorefrontGetInvoiceCollectionRequest } request
|
|
@@ -5030,7 +5039,7 @@ function js({ apiHandler: t }) {
|
|
|
5030
5039
|
}
|
|
5031
5040
|
};
|
|
5032
5041
|
}
|
|
5033
|
-
function
|
|
5042
|
+
function Os({ apiHandler: t }) {
|
|
5034
5043
|
return {
|
|
5035
5044
|
create({ data: e }) {
|
|
5036
5045
|
return t.post("kyc-documents", e);
|
|
@@ -5046,7 +5055,7 @@ function Ms({ apiHandler: t }) {
|
|
|
5046
5055
|
}
|
|
5047
5056
|
};
|
|
5048
5057
|
}
|
|
5049
|
-
function
|
|
5058
|
+
function Fs({ apiHandler: t }) {
|
|
5050
5059
|
return {
|
|
5051
5060
|
create({ data: e }) {
|
|
5052
5061
|
return t.post("kyc-liveness-sessions", e);
|
|
@@ -5062,7 +5071,7 @@ function Os({ apiHandler: t }) {
|
|
|
5062
5071
|
}
|
|
5063
5072
|
};
|
|
5064
5073
|
}
|
|
5065
|
-
function
|
|
5074
|
+
function Bs({ apiHandler: t }) {
|
|
5066
5075
|
return {
|
|
5067
5076
|
/**
|
|
5068
5077
|
* @returns { rebilly.StorefrontGetKycRequestResponsePromise } response
|
|
@@ -5073,7 +5082,7 @@ function Fs({ apiHandler: t }) {
|
|
|
5073
5082
|
}
|
|
5074
5083
|
};
|
|
5075
5084
|
}
|
|
5076
|
-
function
|
|
5085
|
+
function Ks({ apiHandler: t }) {
|
|
5077
5086
|
return {
|
|
5078
5087
|
/**
|
|
5079
5088
|
* @returns { rebilly.StorefrontGetOrderUpcomingInvoiceResponsePromise } response
|
|
@@ -5115,7 +5124,7 @@ function Bs({ apiHandler: t }) {
|
|
|
5115
5124
|
}
|
|
5116
5125
|
};
|
|
5117
5126
|
}
|
|
5118
|
-
function
|
|
5127
|
+
function Ns({ apiHandler: t }) {
|
|
5119
5128
|
return {
|
|
5120
5129
|
/**
|
|
5121
5130
|
* @param { rebilly.StorefrontGetPaymentInstrumentCollectionRequest } request
|
|
@@ -5158,14 +5167,14 @@ function Ks({ apiHandler: t }) {
|
|
|
5158
5167
|
}
|
|
5159
5168
|
};
|
|
5160
5169
|
}
|
|
5161
|
-
function
|
|
5170
|
+
function Ls({ apiHandler: t }) {
|
|
5162
5171
|
return {
|
|
5163
5172
|
create({ data: e }) {
|
|
5164
5173
|
return t.post("payout-request-cancellations", e);
|
|
5165
5174
|
}
|
|
5166
5175
|
};
|
|
5167
5176
|
}
|
|
5168
|
-
function
|
|
5177
|
+
function zs({ apiHandler: t }) {
|
|
5169
5178
|
return {
|
|
5170
5179
|
/**
|
|
5171
5180
|
* @param { rebilly.StorefrontGetPayoutRequestCollectionRequest } request
|
|
@@ -5195,7 +5204,7 @@ function Ls({ apiHandler: t }) {
|
|
|
5195
5204
|
}
|
|
5196
5205
|
};
|
|
5197
5206
|
}
|
|
5198
|
-
function
|
|
5207
|
+
function Us({ apiHandler: t }) {
|
|
5199
5208
|
return {
|
|
5200
5209
|
/**
|
|
5201
5210
|
* @param { rebilly.StorefrontGetPlanCollectionRequest } request
|
|
@@ -5221,7 +5230,7 @@ function zs({ apiHandler: t }) {
|
|
|
5221
5230
|
}
|
|
5222
5231
|
};
|
|
5223
5232
|
}
|
|
5224
|
-
function
|
|
5233
|
+
function Vs({ apiHandler: t }) {
|
|
5225
5234
|
return {
|
|
5226
5235
|
/**
|
|
5227
5236
|
* @param { rebilly.StorefrontGetProductCollectionRequest } request
|
|
@@ -5245,7 +5254,7 @@ function Us({ apiHandler: t }) {
|
|
|
5245
5254
|
}
|
|
5246
5255
|
};
|
|
5247
5256
|
}
|
|
5248
|
-
function
|
|
5257
|
+
function Js({ apiHandler: t }) {
|
|
5249
5258
|
return {
|
|
5250
5259
|
payment({ data: e }) {
|
|
5251
5260
|
return t.post("payment", e);
|
|
@@ -5261,7 +5270,7 @@ function Vs({ apiHandler: t }) {
|
|
|
5261
5270
|
}
|
|
5262
5271
|
};
|
|
5263
5272
|
}
|
|
5264
|
-
function
|
|
5273
|
+
function Ws({ apiHandler: t }) {
|
|
5265
5274
|
return {
|
|
5266
5275
|
/**
|
|
5267
5276
|
* @returns { rebilly.StorefrontGetQuoteResponsePromise } response
|
|
@@ -5285,21 +5294,21 @@ function Js({ apiHandler: t }) {
|
|
|
5285
5294
|
}
|
|
5286
5295
|
};
|
|
5287
5296
|
}
|
|
5288
|
-
function
|
|
5297
|
+
function Gs({ apiHandler: t }) {
|
|
5289
5298
|
return {
|
|
5290
5299
|
readyToPayout({ data: e }) {
|
|
5291
5300
|
return t.post("ready-to-payout", e);
|
|
5292
5301
|
}
|
|
5293
5302
|
};
|
|
5294
5303
|
}
|
|
5295
|
-
function
|
|
5304
|
+
function Ys({ apiHandler: t }) {
|
|
5296
5305
|
return {
|
|
5297
5306
|
reactivation({ data: e }) {
|
|
5298
5307
|
return t.post("subscription-reactivations", e);
|
|
5299
5308
|
}
|
|
5300
5309
|
};
|
|
5301
5310
|
}
|
|
5302
|
-
function
|
|
5311
|
+
function Qs({ apiHandler: t }) {
|
|
5303
5312
|
return {
|
|
5304
5313
|
changeItems({ id: e, data: s }) {
|
|
5305
5314
|
return t.post(`subscriptions/${e}/change-items`, s);
|
|
@@ -5309,7 +5318,7 @@ function Ys({ apiHandler: t }) {
|
|
|
5309
5318
|
}
|
|
5310
5319
|
};
|
|
5311
5320
|
}
|
|
5312
|
-
function
|
|
5321
|
+
function Xs({ apiHandler: t }) {
|
|
5313
5322
|
return {
|
|
5314
5323
|
/**
|
|
5315
5324
|
* @param { rebilly.StorefrontGetTransactionCollectionRequest } request
|
|
@@ -5358,7 +5367,7 @@ function Qs({ apiHandler: t }) {
|
|
|
5358
5367
|
}
|
|
5359
5368
|
};
|
|
5360
5369
|
}
|
|
5361
|
-
function
|
|
5370
|
+
function Zs({ apiHandler: t }) {
|
|
5362
5371
|
return {
|
|
5363
5372
|
/**
|
|
5364
5373
|
* @returns { rebilly.StorefrontGetWebsiteResponsePromise } response
|
|
@@ -5368,29 +5377,29 @@ function Xs({ apiHandler: t }) {
|
|
|
5368
5377
|
}
|
|
5369
5378
|
};
|
|
5370
5379
|
}
|
|
5371
|
-
class
|
|
5380
|
+
class _s {
|
|
5372
5381
|
constructor({ apiHandler: e }) {
|
|
5373
|
-
this.account =
|
|
5382
|
+
this.account = Ts({ apiHandler: e }), this.authorization = Is({ apiHandler: e }), this.billingPortals = Ss({ apiHandler: e }), this.cashiers = Es({ apiHandler: e }), this.checkoutForms = Ps({ apiHandler: e }), this.customFields = xs({ apiHandler: e }), this.depositRequests = Cs({ apiHandler: e }), this.deposit = Ds({ apiHandler: e }), this.depositStrategies = js({ apiHandler: e }), this.invoices = Ms({ apiHandler: e }), this.kycDocuments = Os({ apiHandler: e }), this.kycLivenessSessions = Fs({ apiHandler: e }), this.kycRequests = Bs({ apiHandler: e }), this.orders = Ks({ apiHandler: e }), this.paymentInstruments = Ns({ apiHandler: e }), this.payoutRequestCancellations = Ls({
|
|
5374
5383
|
apiHandler: e
|
|
5375
|
-
}), this.payoutRequests =
|
|
5384
|
+
}), this.payoutRequests = zs({ apiHandler: e }), this.plans = Us({ apiHandler: e }), this.products = Vs({ apiHandler: e }), this.purchase = Js({ apiHandler: e }), this.quotes = Ws({ apiHandler: e }), this.readyToPayout = Gs({ apiHandler: e }), this.subscriptionReactivations = Ys({
|
|
5376
5385
|
apiHandler: e
|
|
5377
|
-
}), this.subscriptions =
|
|
5386
|
+
}), this.subscriptions = Qs({ apiHandler: e }), this.transactions = Xs({ apiHandler: e }), this.websites = Zs({ 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;
|
|
5378
5387
|
}
|
|
5379
5388
|
}
|
|
5380
|
-
function _s({ apiHandler: t }) {
|
|
5381
|
-
return new hs({ apiHandler: t });
|
|
5382
|
-
}
|
|
5383
5389
|
function Hs({ apiHandler: t }) {
|
|
5384
|
-
return new
|
|
5390
|
+
return new ys({ apiHandler: t });
|
|
5385
5391
|
}
|
|
5386
5392
|
function er({ apiHandler: t }) {
|
|
5387
|
-
return new
|
|
5393
|
+
return new ds({ apiHandler: t });
|
|
5394
|
+
}
|
|
5395
|
+
function tr({ apiHandler: t }) {
|
|
5396
|
+
return new _s({ apiHandler: t });
|
|
5388
5397
|
}
|
|
5389
5398
|
const F = {
|
|
5390
5399
|
live: "https://api.rebilly.com",
|
|
5391
5400
|
sandbox: "https://api-sandbox.rebilly.com"
|
|
5392
5401
|
}, B = 6e3;
|
|
5393
|
-
function
|
|
5402
|
+
function or({
|
|
5394
5403
|
apiKey: t = null,
|
|
5395
5404
|
sandbox: e = !1,
|
|
5396
5405
|
timeout: s = B,
|
|
@@ -5416,9 +5425,9 @@ function ur({
|
|
|
5416
5425
|
organizationId: r,
|
|
5417
5426
|
appName: (u == null ? void 0 : u.appName) ?? null
|
|
5418
5427
|
}, l = O({ options: o });
|
|
5419
|
-
return
|
|
5428
|
+
return Hs({ apiHandler: l });
|
|
5420
5429
|
}
|
|
5421
|
-
function
|
|
5430
|
+
function lr({
|
|
5422
5431
|
apiKey: t = null,
|
|
5423
5432
|
sandbox: e = !1,
|
|
5424
5433
|
timeout: s = B,
|
|
@@ -5444,9 +5453,9 @@ function or({
|
|
|
5444
5453
|
organizationId: r,
|
|
5445
5454
|
appName: (u == null ? void 0 : u.appName) ?? null
|
|
5446
5455
|
}, l = O({ options: o });
|
|
5447
|
-
return
|
|
5456
|
+
return er({ apiHandler: l });
|
|
5448
5457
|
}
|
|
5449
|
-
function
|
|
5458
|
+
function cr({
|
|
5450
5459
|
publishableKey: t = null,
|
|
5451
5460
|
jwt: e = null,
|
|
5452
5461
|
sandbox: s = !1,
|
|
@@ -5473,13 +5482,13 @@ function lr({
|
|
|
5473
5482
|
organizationId: n,
|
|
5474
5483
|
appName: (o == null ? void 0 : o.appName) ?? null
|
|
5475
5484
|
}, i = O({ options: l });
|
|
5476
|
-
return i.setSessionToken(l.jwt),
|
|
5485
|
+
return i.setSessionToken(l.jwt), tr({ apiHandler: i });
|
|
5477
5486
|
}
|
|
5478
5487
|
export {
|
|
5479
|
-
|
|
5488
|
+
or as RebillyAPI,
|
|
5480
5489
|
y as RebillyErrors,
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5490
|
+
lr as RebillyExperimentalAPI,
|
|
5491
|
+
cr as RebillyStorefrontAPI,
|
|
5492
|
+
ur as cancellation,
|
|
5493
|
+
or as default
|
|
5485
5494
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(h,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],y):(h=typeof globalThis<"u"?globalThis:h||self,y(h["rebilly-js-sdk"]={},h.axios))})(this,(function(h,y){"use strict";var
|
|
1
|
+
(function(h,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],y):(h=typeof globalThis<"u"?globalThis:h||self,y(h["rebilly-js-sdk"]={},h.axios))})(this,(function(h,y){"use strict";var or=Object.defineProperty;var lr=(h,y,b)=>y in h?or(h,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[y]=b;var K=(h,y,b)=>lr(h,typeof y!="symbol"?y+"":y,b);function b(t,{exclude:e=[]}={}){Object.freeze(t);const s=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(r=>{(!s||r!=="caller"&&r!=="callee"&&r!=="arguments")&&t[r]!==null&&!e.includes(r)&&(typeof t[r]=="object"||typeof t[r]=="function")&&!Object.isFrozen(t[r])&&b(t[r],{exclude:e})}),t}class N{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.fields={...e},this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const L={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class ue{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(L).forEach(o=>{const l=n[L[o]];this[o]=l?Number(l):null}),this.response={status:s,statusText:r,headers:n},this.items=e.map(o=>new N({data:o,status:s,statusText:r,headers:n})),this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class oe{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.data=e,this.config=u}}class w extends Error{constructor({error:e,name:s=null}){let{config:r=null,response:n=null,request:u=null,message:o=null}=e||{},l=o||"Request Error";n&&n.data&&(n.data.error?l=n.data.error:n.data.detail?l=n.data.detail:n.data.title&&(l=n.data.title)),super(l),this.name=s||"RebillyError",this.response=n,this.request=u,this.config=r,this.status=n&&n.status?n.status:null,this.statusText=n&&n.statusText?n.statusText:null,this.details=n&&n.data&&n.data.details?n.data.details:null,this.invalidFields=n&&n.data&&n.data.invalidFields?n.data.invalidFields:null}}class le extends w{constructor(e){super({error:e,name:"RebillyRequestError"})}}class ce extends w{constructor(e){super({error:e,name:"RebillyValidationError"})}}class ie extends w{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ae extends w{constructor(e){super({error:e,name:"RebillyConflictError"})}}class ge extends w{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class me extends w{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class fe extends w{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class pe extends w{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const R={RebillyError:w,RebillyRequestError:le,RebillyValidationError:ce,RebillyNotFoundError:ie,RebillyConflictError:ae,RebillyForbiddenError:ge,RebillyMethodNotAllowedError:me,RebillyTimeoutError:fe,RebillyCanceledError:pe};function $e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var C,z;function U(){if(z)return C;z=1;var t=Object.prototype.toString;C=function($){if($===void 0)return"undefined";if($===null)return"null";var A=typeof $;if(A==="boolean")return"boolean";if(A==="string")return"string";if(A==="number")return"number";if(A==="symbol")return"symbol";if(A==="function")return o($)?"generatorfunction":"function";if(s($))return"array";if(f($))return"buffer";if(i($))return"arguments";if(n($))return"date";if(r($))return"error";if(u($))return"regexp";switch(e($)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(l($))return"generator";switch(A=t.call($),A){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return A.slice(8,-1).toLowerCase().replace(/\s/g,"")};function e(g){return typeof g.constructor=="function"?g.constructor.name:null}function s(g){return Array.isArray?Array.isArray(g):g instanceof Array}function r(g){return g instanceof Error||typeof g.message=="string"&&g.constructor&&typeof g.constructor.stackTraceLimit=="number"}function n(g){return g instanceof Date?!0:typeof g.toDateString=="function"&&typeof g.getDate=="function"&&typeof g.setDate=="function"}function u(g){return g instanceof RegExp?!0:typeof g.flags=="string"&&typeof g.ignoreCase=="boolean"&&typeof g.multiline=="boolean"&&typeof g.global=="boolean"}function o(g,$){return e(g)==="GeneratorFunction"}function l(g){return typeof g.throw=="function"&&typeof g.return=="function"&&typeof g.next=="function"}function i(g){try{if(typeof g.length=="number"&&typeof g.callee=="function")return!0}catch($){if($.message.indexOf("callee")!==-1)return!0}return!1}function f(g){return g.constructor&&typeof g.constructor.isBuffer=="function"?g.constructor.isBuffer(g):!1}return C}/*!
|
|
2
2
|
* shallow-clone <https://github.com/jonschlinkert/shallow-clone>
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
@@ -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("/")}@c19aa64`};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 Gs({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Ys(c){X(v.request,c)}function Qs({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function _s(c){X(v.response,c)}function I({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:nr}=T.save();p.cancelToken=nr;const ne=async function(){try{const S=await c(p);return Xs({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 Xs({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 Zs(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{...Zs(c)}}function ee(c,a={}){return I({request:m=>e.get(c,m),config:{params:a}})}function Hs(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 er(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 tr(c,a){return re(c,a)}async function sr(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 rr(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:Gs,removeRequestInterceptor:Ys,addResponseInterceptor:Qs,removeResponseInterceptor:_s,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:Hs,post:te,put:se,patch:er,delete:re,deleteAll:tr,create:sr,download:rr}}function Ie({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Se({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 Ee({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 Pe({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 xe({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 je({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 De({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 Me({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 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("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 Fe({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 Be({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Ke({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 Ne({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 Le({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 ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("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 Ue({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 Ve({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 Je({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 We({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 Ge({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 Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("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 Qe({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 _e({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 Xe({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 Ze({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 He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function et({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 tt({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 st({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function rt({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 nt({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 ut({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 ot({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 lt({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 ct({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 it({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 at({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 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("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 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-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 ft({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function pt({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 $t({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 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-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 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-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function At({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 Rt({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 bt({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 wt({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 kt({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 vt({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 qt({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 dt({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 Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function It({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",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 Ct({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function xt({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)},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`)},reissue({id:e,data:s}){return t.post(`quotes/${e}/reissue`,s)},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{getEnabled(){return t.get("release-flags")}}}function Kt({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 Nt({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 Lt({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 zt({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 Ut({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 Vt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Jt({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 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("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 Gt({apiHandler:t}){return{get(){return t.get("status")}}}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-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 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-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 _t({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 Xt({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 Zt({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 Ht({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 es({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 ts({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 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("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 rs({apiHandler:t}){return{deleteUserMembership({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)},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)}}}function ns({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 us({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 os{constructor({apiHandler:e}){this.account=Ie({apiHandler:e}),this.allowlists=Se({apiHandler:e}),this.amlChecks=Ee({apiHandler:e}),this.amlSettings=Pe({apiHandler:e}),this.apiKeys=Ce({apiHandler:e}),this.applicationInstances=xe({apiHandler:e}),this.applications=je({apiHandler:e}),this.balanceTransactions=De({apiHandler:e}),this.billingPortals=Me({apiHandler:e}),this.blocklists=Oe({apiHandler:e}),this.broadcastMessages=Fe({apiHandler:e}),this.cashiers=Be({apiHandler:e}),this.checkoutForms=Ke({apiHandler:e}),this.coupons=Ne({apiHandler:e}),this.creditMemos=Le({apiHandler:e}),this.customDomains=ze({apiHandler:e}),this.customFields=Ue({apiHandler:e}),this.customerAuthentication=Ve({apiHandler:e}),this.customers=Je({apiHandler:e}),this.depositCustomPropertySets=We({apiHandler:e}),this.depositRequests=Ge({apiHandler:e}),this.depositStrategies=Ye({apiHandler:e}),this.digitalWallets=Qe({apiHandler:e}),this.disputes=_e({apiHandler:e}),this.emailDeliverySettings=Xe({apiHandler:e}),this.emailMessages=Ze({apiHandler:e}),this.emailNotifications=He({apiHandler:e}),this.events=et({apiHandler:e}),this.externalIdentifiers=tt({apiHandler:e}),this.externalServicesSettings=st({apiHandler:e}),this.fees=rt({apiHandler:e}),this.files=nt({apiHandler:e}),this.gatewayAccounts=ut({apiHandler:e}),this.integrations=ot({apiHandler:e}),this.invoices=lt({apiHandler:e}),this.journalAccounts=ct({apiHandler:e}),this.journalEntries=it({apiHandler:e}),this.journalRecords=at({apiHandler:e}),this.kycDocuments=gt({apiHandler:e}),this.kycRequests=mt({apiHandler:e}),this.kycSettings=ft({apiHandler:e}),this.lists=pt({apiHandler:e}),this.orderCancellations=$t({apiHandler:e}),this.orderPauses=ht({apiHandler:e}),this.orderReactivations=yt({apiHandler:e}),this.orders=At({apiHandler:e}),this.organizationExports=Rt({apiHandler:e}),this.organizations=bt({apiHandler:e}),this.paymentCardsBankNames=wt({apiHandler:e}),this.paymentInstruments=kt({apiHandler:e}),this.paymentMethods=vt({apiHandler:e}),this.paymentTokens=qt({apiHandler:e}),this.payoutRequestAllocations=dt({apiHandler:e}),this.payoutRequestAutoAllocations=Tt({apiHandler:e}),this.payoutRequestBatchPreviews=It({apiHandler:e}),this.payoutRequestBatches=St({apiHandler:e}),this.payoutRequestSplits=Et({apiHandler:e}),this.payoutRequests=Pt({apiHandler:e}),this.payouts=Ct({apiHandler:e}),this.plans=xt({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.releaseFlags=Bt({apiHandler:e}),this.resource=Kt({apiHandler:e}),this.riskScoreRules=Nt({apiHandler:e}),this.roles=Lt({apiHandler:e}),this.search=zt({apiHandler:e}),this.segments=Ut({apiHandler:e}),this.sendThroughAttribution=Vt({apiHandler:e}),this.serviceCredentials=Jt({apiHandler:e}),this.shippingRates=Wt({apiHandler:e}),this.status=Gt({apiHandler:e}),this.subscriptionCancellations=Yt({apiHandler:e}),this.subscriptionPauses=Qt({apiHandler:e}),this.subscriptionReactivations=_t({apiHandler:e}),this.subscriptions=Xt({apiHandler:e}),this.tags=Zt({apiHandler:e}),this.tagsRules=Ht({apiHandler:e}),this.tracking=es({apiHandler:e}),this.transactions=ts({apiHandler:e}),this.usages=ss({apiHandler:e}),this.users=rs({apiHandler:e}),this.webhooks=ns({apiHandler:e}),this.websites=us({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 ls({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function cs({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 is({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 as({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 gs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function ms({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 fs({apiHandler:t}){return{query(){return t.get("location")}}}const d={CustomersResource:ls,DataExportsResource:cs,HistogramsResource:is,ReportsResource:as,SubscriptionsResource:gs,TimelinesResource:ms,LocationResource:fs};class ps{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 $s({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 hs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function ys({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function As({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function Rs({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function bs({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 ws({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function ks({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function vs({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function qs({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 ds({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 Ts({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 Is({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function Ss({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 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("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.get(`payment-instruments/${e}`,n)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function Ps({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}function Cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payout-requests",o)},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 xs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`plans/${e}`,r)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ds({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 Ms({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`quotes/${e}`,r)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Os({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Fs({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Bs({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 Ks({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 Ns({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ls{constructor({apiHandler:e}){this.account=$s({apiHandler:e}),this.authorization=hs({apiHandler:e}),this.billingPortals=ys({apiHandler:e}),this.cashiers=As({apiHandler:e}),this.checkoutForms=Rs({apiHandler:e}),this.customFields=bs({apiHandler:e}),this.depositRequests=ws({apiHandler:e}),this.deposit=ks({apiHandler:e}),this.depositStrategies=vs({apiHandler:e}),this.invoices=qs({apiHandler:e}),this.kycDocuments=ds({apiHandler:e}),this.kycLivenessSessions=Ts({apiHandler:e}),this.kycRequests=Is({apiHandler:e}),this.orders=Ss({apiHandler:e}),this.paymentInstruments=Es({apiHandler:e}),this.payoutRequestCancellations=Ps({apiHandler:e}),this.payoutRequests=Cs({apiHandler:e}),this.plans=xs({apiHandler:e}),this.products=js({apiHandler:e}),this.purchase=Ds({apiHandler:e}),this.quotes=Ms({apiHandler:e}),this.readyToPayout=Os({apiHandler:e}),this.subscriptionReactivations=Fs({apiHandler:e}),this.subscriptions=Bs({apiHandler:e}),this.transactions=Ks({apiHandler:e}),this.websites=Ns({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 zs({apiHandler:t}){return new os({apiHandler:t})}function Us({apiHandler:t}){return new ps({apiHandler:t})}function Vs({apiHandler:t}){return new Ls({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 zs({apiHandler:l})}function Js({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 Us({apiHandler:l})}function Ws({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),Vs({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Js,h.RebillyStorefrontAPI=Ws,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("/")}@f3eab18`};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 Ys({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Qs(c){X(v.request,c)}function _s({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function Xs(c){X(v.response,c)}function I({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:ur}=T.save();p.cancelToken=ur;const ne=async function(){try{const S=await c(p);return Zs({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 Zs({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 Hs(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{...Hs(c)}}function ee(c,a={}){return I({request:m=>e.get(c,m),config:{params:a}})}function er(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 tr(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 sr(c,a){return re(c,a)}async function rr(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 nr(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:Ys,removeRequestInterceptor:Qs,addResponseInterceptor:_s,removeResponseInterceptor:Xs,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:er,post:te,put:se,patch:tr,delete:re,deleteAll:sr,create:rr,download:nr}}function Ie({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function Se({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 Ee({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 Pe({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 xe({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 je({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 De({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 Me({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 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("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 Fe({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 Be({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function Ke({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 Ne({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 Le({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 ze({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("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 Ue({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 Ve({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 Je({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 We({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 Ge({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 Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("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 Qe({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 _e({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 Xe({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 Ze({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 He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("email-notifications",r)}}}function et({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 tt({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 st({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function rt({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 nt({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 ut({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 ot({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 lt({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 ct({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 it({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 at({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 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("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 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-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 ft({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function pt({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 $t({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 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-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 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-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function At({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 Rt({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 bt({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 wt({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 kt({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 vt({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 qt({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 dt({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 Tt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-auto-allocations",e)}}}function It({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-operations",e)}}}function St({apiHandler:t}){return{create({data:e}){return t.post("payout-request-batch-previews",e)}}}function Et({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 Pt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-splits",e)}}}function Ct({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 jt({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 Dt({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 Mt({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 Ot({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)},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 Ft({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Bt({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`)},reissue({id:e,data:s}){return t.post(`quotes/${e}/reissue`,s)},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 Kt({apiHandler:t}){return{getEnabled(){return t.get("release-flags")}}}function Nt({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 Lt({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 zt({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 Ut({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 Vt({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 Jt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function Wt({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 Gt({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 Yt({apiHandler:t}){return{get(){return t.get("status")}}}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-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 _t({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 Xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function Zt({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 Ht({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 es({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 ts({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 ss({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 rs({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 ns({apiHandler:t}){return{deleteUserMembership({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)},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)}}}function us({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 os({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 ls{constructor({apiHandler:e}){this.account=Ie({apiHandler:e}),this.allowlists=Se({apiHandler:e}),this.amlChecks=Ee({apiHandler:e}),this.amlSettings=Pe({apiHandler:e}),this.apiKeys=Ce({apiHandler:e}),this.applicationInstances=xe({apiHandler:e}),this.applications=je({apiHandler:e}),this.balanceTransactions=De({apiHandler:e}),this.billingPortals=Me({apiHandler:e}),this.blocklists=Oe({apiHandler:e}),this.broadcastMessages=Fe({apiHandler:e}),this.cashiers=Be({apiHandler:e}),this.checkoutForms=Ke({apiHandler:e}),this.coupons=Ne({apiHandler:e}),this.creditMemos=Le({apiHandler:e}),this.customDomains=ze({apiHandler:e}),this.customFields=Ue({apiHandler:e}),this.customerAuthentication=Ve({apiHandler:e}),this.customers=Je({apiHandler:e}),this.depositCustomPropertySets=We({apiHandler:e}),this.depositRequests=Ge({apiHandler:e}),this.depositStrategies=Ye({apiHandler:e}),this.digitalWallets=Qe({apiHandler:e}),this.disputes=_e({apiHandler:e}),this.emailDeliverySettings=Xe({apiHandler:e}),this.emailMessages=Ze({apiHandler:e}),this.emailNotifications=He({apiHandler:e}),this.events=et({apiHandler:e}),this.externalIdentifiers=tt({apiHandler:e}),this.externalServicesSettings=st({apiHandler:e}),this.fees=rt({apiHandler:e}),this.files=nt({apiHandler:e}),this.gatewayAccounts=ut({apiHandler:e}),this.integrations=ot({apiHandler:e}),this.invoices=lt({apiHandler:e}),this.journalAccounts=ct({apiHandler:e}),this.journalEntries=it({apiHandler:e}),this.journalRecords=at({apiHandler:e}),this.kycDocuments=gt({apiHandler:e}),this.kycRequests=mt({apiHandler:e}),this.kycSettings=ft({apiHandler:e}),this.lists=pt({apiHandler:e}),this.orderCancellations=$t({apiHandler:e}),this.orderPauses=ht({apiHandler:e}),this.orderReactivations=yt({apiHandler:e}),this.orders=At({apiHandler:e}),this.organizationExports=Rt({apiHandler:e}),this.organizations=bt({apiHandler:e}),this.paymentCardsBankNames=wt({apiHandler:e}),this.paymentInstruments=kt({apiHandler:e}),this.paymentMethods=vt({apiHandler:e}),this.paymentTokens=qt({apiHandler:e}),this.payoutRequestAllocations=dt({apiHandler:e}),this.payoutRequestAutoAllocations=Tt({apiHandler:e}),this.payoutRequestBatchOperations=It({apiHandler:e}),this.payoutRequestBatchPreviews=St({apiHandler:e}),this.payoutRequestBatches=Et({apiHandler:e}),this.payoutRequestSplits=Pt({apiHandler:e}),this.payoutRequests=Ct({apiHandler:e}),this.payouts=xt({apiHandler:e}),this.plans=jt({apiHandler:e}),this.previews=Dt({apiHandler:e}),this.products=Mt({apiHandler:e}),this.profile=Ot({apiHandler:e}),this.purchase=Ft({apiHandler:e}),this.quotes=Bt({apiHandler:e}),this.releaseFlags=Kt({apiHandler:e}),this.resource=Nt({apiHandler:e}),this.riskScoreRules=Lt({apiHandler:e}),this.roles=zt({apiHandler:e}),this.search=Ut({apiHandler:e}),this.segments=Vt({apiHandler:e}),this.sendThroughAttribution=Jt({apiHandler:e}),this.serviceCredentials=Wt({apiHandler:e}),this.shippingRates=Gt({apiHandler:e}),this.status=Yt({apiHandler:e}),this.subscriptionCancellations=Qt({apiHandler:e}),this.subscriptionPauses=_t({apiHandler:e}),this.subscriptionReactivations=Xt({apiHandler:e}),this.subscriptions=Zt({apiHandler:e}),this.tags=Ht({apiHandler:e}),this.tagsRules=es({apiHandler:e}),this.tracking=ts({apiHandler:e}),this.transactions=ss({apiHandler:e}),this.usages=rs({apiHandler:e}),this.users=ns({apiHandler:e}),this.webhooks=us({apiHandler:e}),this.websites=os({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 cs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function is({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 as({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 gs({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 ms({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function fs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:r=0}){const n={eventTypes:e,limit:s,offset:r};return t.getAll("activity-feed",n)},getTransaction({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return t.getAll(`customers/${e}/timeline`,u)}}}function ps({apiHandler:t}){return{query(){return t.get("location")}}}const d={CustomersResource:cs,DataExportsResource:is,HistogramsResource:as,ReportsResource:gs,SubscriptionsResource:ms,TimelinesResource:fs,LocationResource:ps};class $s{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 hs({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 ys({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function As({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function Rs({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)}}}function bs({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ws({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 ks({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function vs({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function qs({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function ds({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 Ts({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 Is({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 Ss({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function Es({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 Ps({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.get(`payment-instruments/${e}`,n)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:s}){return t.post(`payment-instruments/${e}/setup`,s)}}}function Cs({apiHandler:t}){return{create({data:e}){return t.post("payout-request-cancellations",e)}}}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("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 js({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 Ds({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ms({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Os({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 Fs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Bs({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Ks({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 Ns({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 Ls({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class zs{constructor({apiHandler:e}){this.account=hs({apiHandler:e}),this.authorization=ys({apiHandler:e}),this.billingPortals=As({apiHandler:e}),this.cashiers=Rs({apiHandler:e}),this.checkoutForms=bs({apiHandler:e}),this.customFields=ws({apiHandler:e}),this.depositRequests=ks({apiHandler:e}),this.deposit=vs({apiHandler:e}),this.depositStrategies=qs({apiHandler:e}),this.invoices=ds({apiHandler:e}),this.kycDocuments=Ts({apiHandler:e}),this.kycLivenessSessions=Is({apiHandler:e}),this.kycRequests=Ss({apiHandler:e}),this.orders=Es({apiHandler:e}),this.paymentInstruments=Ps({apiHandler:e}),this.payoutRequestCancellations=Cs({apiHandler:e}),this.payoutRequests=xs({apiHandler:e}),this.plans=js({apiHandler:e}),this.products=Ds({apiHandler:e}),this.purchase=Ms({apiHandler:e}),this.quotes=Os({apiHandler:e}),this.readyToPayout=Fs({apiHandler:e}),this.subscriptionReactivations=Bs({apiHandler:e}),this.subscriptions=Ks({apiHandler:e}),this.transactions=Ns({apiHandler:e}),this.websites=Ls({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 Us({apiHandler:t}){return new ls({apiHandler:t})}function Vs({apiHandler:t}){return new $s({apiHandler:t})}function Js({apiHandler:t}){return new zs({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 Us({apiHandler:l})}function Ws({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 Vs({apiHandler:l})}function Gs({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),Js({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Ws,h.RebillyStorefrontAPI=Gs,h.cancellation=Te,h.default=Q,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -57,6 +57,7 @@ import PaymentMethodsResource from './payment-methods-resource';
|
|
|
57
57
|
import PaymentTokensResource from './payment-tokens-resource';
|
|
58
58
|
import PayoutRequestAllocationsResource from './payout-request-allocations-resource';
|
|
59
59
|
import PayoutRequestAutoAllocationsResource from './payout-request-auto-allocations-resource';
|
|
60
|
+
import PayoutRequestBatchOperationsResource from './payout-request-batch-operations-resource';
|
|
60
61
|
import PayoutRequestBatchPreviewsResource from './payout-request-batch-previews-resource';
|
|
61
62
|
import PayoutRequestBatchesResource from './payout-request-batches-resource';
|
|
62
63
|
import PayoutRequestSplitsResource from './payout-request-splits-resource';
|
|
@@ -155,6 +156,9 @@ export class ApiInstance {
|
|
|
155
156
|
this.payoutRequestAutoAllocations = PayoutRequestAutoAllocationsResource({
|
|
156
157
|
apiHandler,
|
|
157
158
|
});
|
|
159
|
+
this.payoutRequestBatchOperations = PayoutRequestBatchOperationsResource({
|
|
160
|
+
apiHandler,
|
|
161
|
+
});
|
|
158
162
|
this.payoutRequestBatchPreviews = PayoutRequestBatchPreviewsResource({
|
|
159
163
|
apiHandler,
|
|
160
164
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by rebilly-sdk-generator.
|
|
3
|
+
* Do not make direct changes to this file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export default function PayoutRequestBatchOperationsResource({apiHandler}) {
|
|
7
|
+
return {
|
|
8
|
+
create({data}) {
|
|
9
|
+
return apiHandler.post(`payout-request-batch-operations`, data);
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}
|