rebilly-js-sdk 62.130.0 → 62.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [62.130.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.129.0...rebilly-js-sdk-v62.130.0) (2026-07-01)
1
+ ## [62.131.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.130.0...rebilly-js-sdk-v62.131.0) (2026-07-01)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **rebilly-js-sdk:** Add module-scoped type exports ([#23085](https://github.com/Rebilly/rebilly/issues/23085)) ([dec9dee](https://github.com/Rebilly/rebilly/commit/dec9dee6263cc3882a194ea96b2235eb04a32ac5))
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#23075](https://github.com/Rebilly/rebilly/issues/23075)) ([94294cf](https://github.com/Rebilly/rebilly/commit/94294cf4645a463c27696a5580386369adf99edf))
@@ -12753,11 +12753,21 @@ export interface coreComponents {
12753
12753
  id: string;
12754
12754
  /** Items included in the quote. */
12755
12755
  items: coreComponents["schemas"]["QuoteItem"][];
12756
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
12757
- renewalPolicy?: "reset" | "retain";
12756
+ /**
12757
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
12758
+ *
12759
+ * The `reset` and `retain` values are deprecated.
12760
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
12761
+ */
12762
+ renewalPolicy?:
12763
+ | "resetToRecurring"
12764
+ | "retainRecurring"
12765
+ | "retainTrialThenRecurring"
12766
+ | "reset"
12767
+ | "retain";
12758
12768
  /**
12759
12769
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
12760
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
12770
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
12761
12771
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
12762
12772
  */
12763
12773
  prorated?: boolean;
@@ -12767,8 +12777,11 @@ export interface coreComponents {
12767
12777
  */
12768
12778
  effectiveTime?: string | null;
12769
12779
  /**
12780
+ * Deprecated.
12781
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
12782
+ *
12770
12783
  * Specifies if the order must retain its active trial.
12771
- * This field is only applicable if `renewalPolicy` is set to `retain`.
12784
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
12772
12785
  */
12773
12786
  keepTrial?: boolean;
12774
12787
  /**
@@ -14552,12 +14565,23 @@ export interface coreComponents {
14552
14565
  quantity?: number;
14553
14566
  usageLimits?: coreComponents["schemas"]["UsageLimits"];
14554
14567
  }[];
14555
- /** Specifies if the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
14556
- renewalPolicy: "reset" | "retain";
14568
+ /**
14569
+ * How the service periods and trial state of the subscription order are managed when its items change.
14570
+ *
14571
+ * The `reset` and `retain` values are deprecated.
14572
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
14573
+ */
14574
+ renewalPolicy:
14575
+ | "resetToRecurring"
14576
+ | "retainRecurring"
14577
+ | "retainTrialThenRecurring"
14578
+ | "retainTrialOnly"
14579
+ | "reset"
14580
+ | "retain";
14557
14581
  /**
14558
14582
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
14559
14583
  *
14560
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
14584
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
14561
14585
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
14562
14586
  */
14563
14587
  prorated: boolean;
@@ -14572,14 +14596,20 @@ export interface coreComponents {
14572
14596
  */
14573
14597
  preview?: boolean;
14574
14598
  /**
14575
- * Specifies if the subscription order must retain its active trial.
14576
- * This field is only applicable if `renewalPolicy` is set to `retain`.
14599
+ * Deprecated.
14600
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
14601
+ *
14602
+ * Specifies if the order must retain its active trial.
14603
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
14577
14604
  */
14578
14605
  keepTrial?: boolean;
14579
14606
  /**
14580
- * Specifies if the subscription order must ignore the recurring settings of items in the order.
14581
- * This field is only applicable if the subscription is trial-only and the `keepTrial` value is `true`.
14582
- * For more information, see [Trial-only subscription](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
14607
+ * Deprecated.
14608
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
14609
+ *
14610
+ * Specifies if the order must ignore the recurring settings of its items.
14611
+ * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
14612
+ * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
14583
14613
  */
14584
14614
  ignoreRecurring?: boolean;
14585
14615
  };
@@ -14594,12 +14624,23 @@ export interface coreComponents {
14594
14624
  quantity?: number;
14595
14625
  usageLimits?: coreComponents["schemas"]["UsageLimits"];
14596
14626
  }[];
14597
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
14598
- renewalPolicy: "reset" | "retain";
14627
+ /**
14628
+ * How the service periods and trial state of the subscription order are managed when its items change.
14629
+ *
14630
+ * The `reset` and `retain` values are deprecated.
14631
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
14632
+ */
14633
+ renewalPolicy:
14634
+ | "resetToRecurring"
14635
+ | "retainRecurring"
14636
+ | "retainTrialThenRecurring"
14637
+ | "retainTrialOnly"
14638
+ | "reset"
14639
+ | "retain";
14599
14640
  /**
14600
14641
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
14601
14642
  *
14602
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
14643
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
14603
14644
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
14604
14645
  */
14605
14646
  prorated: boolean;
@@ -14614,11 +14655,17 @@ export interface coreComponents {
14614
14655
  */
14615
14656
  preview?: boolean;
14616
14657
  /**
14658
+ * Deprecated.
14659
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
14660
+ *
14617
14661
  * Specifies if the order must retain its active trial.
14618
- * This field is only applicable if `renewalPolicy` is set to `retain`.
14662
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
14619
14663
  */
14620
14664
  keepTrial?: boolean;
14621
14665
  /**
14666
+ * Deprecated.
14667
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
14668
+ *
14622
14669
  * Specifies if the order must ignore the recurring settings of its items.
14623
14670
  * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
14624
14671
  * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
@@ -16500,6 +16547,8 @@ export interface coreComponents {
16500
16547
  priority?: number;
16501
16548
  /** Specifies if the deposit amount strategy is active. */
16502
16549
  isActive?: boolean;
16550
+ /** Specifies if deposits created from this strategy are coin purchases that credit the coin balance instead of the cash balance. */
16551
+ coinPurchase?: boolean;
16503
16552
  createdTime?: coreComponents["schemas"]["CreatedTime"];
16504
16553
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
16505
16554
  _links?: coreComponents["schemas"]["SelfLink"];
@@ -25922,11 +25971,21 @@ export interface coreComponents {
25922
25971
  id?: string;
25923
25972
  /** Items included in the quote. */
25924
25973
  items?: coreComponents["schemas"]["QuoteItem"][];
25925
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
25926
- renewalPolicy?: "reset" | "retain";
25974
+ /**
25975
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
25976
+ *
25977
+ * The `reset` and `retain` values are deprecated.
25978
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
25979
+ */
25980
+ renewalPolicy?:
25981
+ | "resetToRecurring"
25982
+ | "retainRecurring"
25983
+ | "retainTrialThenRecurring"
25984
+ | "reset"
25985
+ | "retain";
25927
25986
  /**
25928
25987
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
25929
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
25988
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
25930
25989
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
25931
25990
  */
25932
25991
  prorated?: boolean;
@@ -25936,8 +25995,11 @@ export interface coreComponents {
25936
25995
  */
25937
25996
  effectiveTime?: string | null;
25938
25997
  /**
25998
+ * Deprecated.
25999
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
26000
+ *
25939
26001
  * Specifies if the order must retain its active trial.
25940
- * This field is only applicable if `renewalPolicy` is set to `retain`.
26002
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
25941
26003
  */
25942
26004
  keepTrial?: boolean;
25943
26005
  /**
@@ -51029,11 +51091,21 @@ export interface storefrontComponents {
51029
51091
  id: string;
51030
51092
  /** Items included in the quote. */
51031
51093
  items: storefrontComponents["schemas"]["QuoteItem"][];
51032
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
51033
- renewalPolicy?: "reset" | "retain";
51094
+ /**
51095
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
51096
+ *
51097
+ * The `reset` and `retain` values are deprecated.
51098
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
51099
+ */
51100
+ renewalPolicy?:
51101
+ | "resetToRecurring"
51102
+ | "retainRecurring"
51103
+ | "retainTrialThenRecurring"
51104
+ | "reset"
51105
+ | "retain";
51034
51106
  /**
51035
51107
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
51036
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
51108
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
51037
51109
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
51038
51110
  */
51039
51111
  prorated?: boolean;
@@ -51043,8 +51115,11 @@ export interface storefrontComponents {
51043
51115
  */
51044
51116
  effectiveTime?: string | null;
51045
51117
  /**
51118
+ * Deprecated.
51119
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
51120
+ *
51046
51121
  * Specifies if the order must retain its active trial.
51047
- * This field is only applicable if `renewalPolicy` is set to `retain`.
51122
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
51048
51123
  */
51049
51124
  keepTrial?: boolean;
51050
51125
  /**
@@ -52828,12 +52903,23 @@ export interface storefrontComponents {
52828
52903
  quantity?: number;
52829
52904
  usageLimits?: storefrontComponents["schemas"]["UsageLimits"];
52830
52905
  }[];
52831
- /** Specifies if the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
52832
- renewalPolicy: "reset" | "retain";
52906
+ /**
52907
+ * How the service periods and trial state of the subscription order are managed when its items change.
52908
+ *
52909
+ * The `reset` and `retain` values are deprecated.
52910
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
52911
+ */
52912
+ renewalPolicy:
52913
+ | "resetToRecurring"
52914
+ | "retainRecurring"
52915
+ | "retainTrialThenRecurring"
52916
+ | "retainTrialOnly"
52917
+ | "reset"
52918
+ | "retain";
52833
52919
  /**
52834
52920
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
52835
52921
  *
52836
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
52922
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
52837
52923
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
52838
52924
  */
52839
52925
  prorated: boolean;
@@ -52848,14 +52934,20 @@ export interface storefrontComponents {
52848
52934
  */
52849
52935
  preview?: boolean;
52850
52936
  /**
52851
- * Specifies if the subscription order must retain its active trial.
52852
- * This field is only applicable if `renewalPolicy` is set to `retain`.
52937
+ * Deprecated.
52938
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
52939
+ *
52940
+ * Specifies if the order must retain its active trial.
52941
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
52853
52942
  */
52854
52943
  keepTrial?: boolean;
52855
52944
  /**
52856
- * Specifies if the subscription order must ignore the recurring settings of items in the order.
52857
- * This field is only applicable if the subscription is trial-only and the `keepTrial` value is `true`.
52858
- * For more information, see [Trial-only subscription](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
52945
+ * Deprecated.
52946
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
52947
+ *
52948
+ * Specifies if the order must ignore the recurring settings of its items.
52949
+ * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
52950
+ * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
52859
52951
  */
52860
52952
  ignoreRecurring?: boolean;
52861
52953
  };
@@ -52870,12 +52962,23 @@ export interface storefrontComponents {
52870
52962
  quantity?: number;
52871
52963
  usageLimits?: storefrontComponents["schemas"]["UsageLimits"];
52872
52964
  }[];
52873
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
52874
- renewalPolicy: "reset" | "retain";
52965
+ /**
52966
+ * How the service periods and trial state of the subscription order are managed when its items change.
52967
+ *
52968
+ * The `reset` and `retain` values are deprecated.
52969
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
52970
+ */
52971
+ renewalPolicy:
52972
+ | "resetToRecurring"
52973
+ | "retainRecurring"
52974
+ | "retainTrialThenRecurring"
52975
+ | "retainTrialOnly"
52976
+ | "reset"
52977
+ | "retain";
52875
52978
  /**
52876
52979
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
52877
52980
  *
52878
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
52981
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
52879
52982
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
52880
52983
  */
52881
52984
  prorated: boolean;
@@ -52890,11 +52993,17 @@ export interface storefrontComponents {
52890
52993
  */
52891
52994
  preview?: boolean;
52892
52995
  /**
52996
+ * Deprecated.
52997
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
52998
+ *
52893
52999
  * Specifies if the order must retain its active trial.
52894
- * This field is only applicable if `renewalPolicy` is set to `retain`.
53000
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
52895
53001
  */
52896
53002
  keepTrial?: boolean;
52897
53003
  /**
53004
+ * Deprecated.
53005
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
53006
+ *
52898
53007
  * Specifies if the order must ignore the recurring settings of its items.
52899
53008
  * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
52900
53009
  * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
@@ -54776,6 +54885,8 @@ export interface storefrontComponents {
54776
54885
  priority?: number;
54777
54886
  /** Specifies if the deposit amount strategy is active. */
54778
54887
  isActive?: boolean;
54888
+ /** Specifies if deposits created from this strategy are coin purchases that credit the coin balance instead of the cash balance. */
54889
+ coinPurchase?: boolean;
54779
54890
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
54780
54891
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
54781
54892
  _links?: storefrontComponents["schemas"]["SelfLink"];
@@ -64198,11 +64309,21 @@ export interface storefrontComponents {
64198
64309
  id?: string;
64199
64310
  /** Items included in the quote. */
64200
64311
  items?: storefrontComponents["schemas"]["QuoteItem"][];
64201
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
64202
- renewalPolicy?: "reset" | "retain";
64312
+ /**
64313
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
64314
+ *
64315
+ * The `reset` and `retain` values are deprecated.
64316
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
64317
+ */
64318
+ renewalPolicy?:
64319
+ | "resetToRecurring"
64320
+ | "retainRecurring"
64321
+ | "retainTrialThenRecurring"
64322
+ | "reset"
64323
+ | "retain";
64203
64324
  /**
64204
64325
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
64205
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
64326
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
64206
64327
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
64207
64328
  */
64208
64329
  prorated?: boolean;
@@ -64212,8 +64333,11 @@ export interface storefrontComponents {
64212
64333
  */
64213
64334
  effectiveTime?: string | null;
64214
64335
  /**
64336
+ * Deprecated.
64337
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
64338
+ *
64215
64339
  * Specifies if the order must retain its active trial.
64216
- * This field is only applicable if `renewalPolicy` is set to `retain`.
64340
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
64217
64341
  */
64218
64342
  keepTrial?: boolean;
64219
64343
  /**
@@ -76764,11 +76888,21 @@ export interface reportsComponents {
76764
76888
  id: string;
76765
76889
  /** Items included in the quote. */
76766
76890
  items: reportsComponents["schemas"]["QuoteItem"][];
76767
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
76768
- renewalPolicy?: "reset" | "retain";
76891
+ /**
76892
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
76893
+ *
76894
+ * The `reset` and `retain` values are deprecated.
76895
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
76896
+ */
76897
+ renewalPolicy?:
76898
+ | "resetToRecurring"
76899
+ | "retainRecurring"
76900
+ | "retainTrialThenRecurring"
76901
+ | "reset"
76902
+ | "retain";
76769
76903
  /**
76770
76904
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
76771
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
76905
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
76772
76906
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
76773
76907
  */
76774
76908
  prorated?: boolean;
@@ -76778,8 +76912,11 @@ export interface reportsComponents {
76778
76912
  */
76779
76913
  effectiveTime?: string | null;
76780
76914
  /**
76915
+ * Deprecated.
76916
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
76917
+ *
76781
76918
  * Specifies if the order must retain its active trial.
76782
- * This field is only applicable if `renewalPolicy` is set to `retain`.
76919
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
76783
76920
  */
76784
76921
  keepTrial?: boolean;
76785
76922
  /**
@@ -78563,12 +78700,23 @@ export interface reportsComponents {
78563
78700
  quantity?: number;
78564
78701
  usageLimits?: reportsComponents["schemas"]["UsageLimits"];
78565
78702
  }[];
78566
- /** Specifies if the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
78567
- renewalPolicy: "reset" | "retain";
78703
+ /**
78704
+ * How the service periods and trial state of the subscription order are managed when its items change.
78705
+ *
78706
+ * The `reset` and `retain` values are deprecated.
78707
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
78708
+ */
78709
+ renewalPolicy:
78710
+ | "resetToRecurring"
78711
+ | "retainRecurring"
78712
+ | "retainTrialThenRecurring"
78713
+ | "retainTrialOnly"
78714
+ | "reset"
78715
+ | "retain";
78568
78716
  /**
78569
78717
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
78570
78718
  *
78571
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
78719
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
78572
78720
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
78573
78721
  */
78574
78722
  prorated: boolean;
@@ -78583,14 +78731,20 @@ export interface reportsComponents {
78583
78731
  */
78584
78732
  preview?: boolean;
78585
78733
  /**
78586
- * Specifies if the subscription order must retain its active trial.
78587
- * This field is only applicable if `renewalPolicy` is set to `retain`.
78734
+ * Deprecated.
78735
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
78736
+ *
78737
+ * Specifies if the order must retain its active trial.
78738
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
78588
78739
  */
78589
78740
  keepTrial?: boolean;
78590
78741
  /**
78591
- * Specifies if the subscription order must ignore the recurring settings of items in the order.
78592
- * This field is only applicable if the subscription is trial-only and the `keepTrial` value is `true`.
78593
- * For more information, see [Trial-only subscription](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
78742
+ * Deprecated.
78743
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
78744
+ *
78745
+ * Specifies if the order must ignore the recurring settings of its items.
78746
+ * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
78747
+ * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
78594
78748
  */
78595
78749
  ignoreRecurring?: boolean;
78596
78750
  };
@@ -78605,12 +78759,23 @@ export interface reportsComponents {
78605
78759
  quantity?: number;
78606
78760
  usageLimits?: reportsComponents["schemas"]["UsageLimits"];
78607
78761
  }[];
78608
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
78609
- renewalPolicy: "reset" | "retain";
78762
+ /**
78763
+ * How the service periods and trial state of the subscription order are managed when its items change.
78764
+ *
78765
+ * The `reset` and `retain` values are deprecated.
78766
+ * The deprecated `keepTrial` and `ignoreRecurring` are ignored unless `reset` or `retain` is used.
78767
+ */
78768
+ renewalPolicy:
78769
+ | "resetToRecurring"
78770
+ | "retainRecurring"
78771
+ | "retainTrialThenRecurring"
78772
+ | "retainTrialOnly"
78773
+ | "reset"
78774
+ | "retain";
78610
78775
  /**
78611
78776
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
78612
78777
  *
78613
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
78778
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring`, `retainTrialThenRecurring` or `retainTrialOnly`,
78614
78779
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.
78615
78780
  */
78616
78781
  prorated: boolean;
@@ -78625,11 +78790,17 @@ export interface reportsComponents {
78625
78790
  */
78626
78791
  preview?: boolean;
78627
78792
  /**
78793
+ * Deprecated.
78794
+ * Use the `retainTrialThenRecurring` or `retainTrialOnly` value of `renewalPolicy` instead.
78795
+ *
78628
78796
  * Specifies if the order must retain its active trial.
78629
- * This field is only applicable if `renewalPolicy` is set to `retain`.
78797
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
78630
78798
  */
78631
78799
  keepTrial?: boolean;
78632
78800
  /**
78801
+ * Deprecated.
78802
+ * Use the `retainTrialOnly` value of `renewalPolicy` instead.
78803
+ *
78633
78804
  * Specifies if the order must ignore the recurring settings of its items.
78634
78805
  * This field is only applicable if the order is trial-only and the `keepTrial` value is `true`.
78635
78806
  * For more information, see [Trial-only order](https://www.rebilly.com/docs/dev-docs/subscriptions#trial-only-subscription).
@@ -80511,6 +80682,8 @@ export interface reportsComponents {
80511
80682
  priority?: number;
80512
80683
  /** Specifies if the deposit amount strategy is active. */
80513
80684
  isActive?: boolean;
80685
+ /** Specifies if deposits created from this strategy are coin purchases that credit the coin balance instead of the cash balance. */
80686
+ coinPurchase?: boolean;
80514
80687
  createdTime?: reportsComponents["schemas"]["CreatedTime"];
80515
80688
  updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
80516
80689
  _links?: reportsComponents["schemas"]["SelfLink"];
@@ -89933,11 +90106,21 @@ export interface reportsComponents {
89933
90106
  id?: string;
89934
90107
  /** Items included in the quote. */
89935
90108
  items?: reportsComponents["schemas"]["QuoteItem"][];
89936
- /** Specifies if the order retains its current `renewalTime` or resets it to a newly calculated `renewalTime`. */
89937
- renewalPolicy?: "reset" | "retain";
90109
+ /**
90110
+ * How the service periods and trial state of the related order are managed when the quote is accepted.
90111
+ *
90112
+ * The `reset` and `retain` values are deprecated.
90113
+ * The deprecated `keepTrial` flag is ignored unless `reset` or `retain` is used.
90114
+ */
90115
+ renewalPolicy?:
90116
+ | "resetToRecurring"
90117
+ | "retainRecurring"
90118
+ | "retainTrialThenRecurring"
90119
+ | "reset"
90120
+ | "retain";
89938
90121
  /**
89939
90122
  * Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.
89940
- * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retain`,
90123
+ * In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`,
89941
90124
  * a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
89942
90125
  */
89943
90126
  prorated?: boolean;
@@ -89947,8 +90130,11 @@ export interface reportsComponents {
89947
90130
  */
89948
90131
  effectiveTime?: string | null;
89949
90132
  /**
90133
+ * Deprecated.
90134
+ * Use the `retainTrialThenRecurring` value of `renewalPolicy` instead.
90135
+ *
89950
90136
  * Specifies if the order must retain its active trial.
89951
- * This field is only applicable if `renewalPolicy` is set to `retain`.
90137
+ * This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`.
89952
90138
  */
89953
90139
  keepTrial?: boolean;
89954
90140
  /**
@@ -489,7 +489,7 @@ function O({ options: e }) {
489
489
  }
490
490
  function o() {
491
491
  const g = {
492
- "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@dec9dee`
492
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@94294cf`
493
493
  };
494
494
  return e.apiKey && (g["REB-APIKEY"] = e.apiKey), g;
495
495
  }
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * Copyright (c) 2014-2017, Jon Schlinkert.
15
15
  * Released under the MIT License.
16
- */var j,W;function ye(){if(W)return j;W=1;var t=pe();function e(s){return t(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}return j=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)},j}var M,G;function Ae(){if(G)return M;G=1;const t=he(),e=U(),s=ye();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 Re=Ae();const be=$e(Re);let we="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ke=(t=21)=>{let e="",s=t|0;for(;s--;)e+=we[Math.random()*64|0];return e};class ve{constructor({id:e=null,created:s=null}={}){this.id=e||ke(),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 ve;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const I=new de;class E{}K(E,"cancelById",(e,s)=>{try{I.getById(e).cancel(s),I.deleteById(e)}catch{}}),K(E,"cancelAll",async e=>{for(const s of I.getAll())await s.cancel(e),I.deleteById(s.id)});const qe={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("/")}@dec9dee`};return t.apiKey&&(a["REB-APIKEY"]=t.apiKey),a}function l(){return be(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 Us({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Vs(c){X(v.request,c)}function Js({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function Ws(c){X(v.response,c)}function T({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:tr}=I.save();p.cancelToken=tr;const re=async function(){try{const S=await c(p);return Gs({response:S,isCollection:a,config:p})}catch(S){return Z({error:S})}finally{I.deleteById(k)}}();return re.cancel=S=>E.cancelById(k,S),re}function Gs({response:c,isCollection:a,config:m}){return a?new ne(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 Ys(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&c.params[a]!=="").reduce((a,m)=>(a[m]=c.params[m],a),{})),c}function H(c={}){return{...Ys(c)}}function ee(c,a={}){return T({request:m=>e.get(c,m),config:{params:a}})}function Qs(c,a){return T({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}),T({request:k=>e.post(c,a,k),config:p})}function se(c,a,m={}){return T({request:p=>e.put(c,a,p),config:{params:m}})}function _s(c,a){return T({request:m=>e.patch(c,a,m),config:{}})}function Xs(c){return T({request:a=>e.delete(c,a),config:{}})}function Zs(c,a){return T({request:m=>e.delete(c,m),config:{data:{...a}}})}async function Hs(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 er(c,a){const m=H(a);try{const p=await e.get(c,m);return new ue(p,m)}catch(p){return Z({error:p})}}return{getInstance:r,addRequestInterceptor:Us,removeRequestInterceptor:Vs,addResponseInterceptor:Js,removeResponseInterceptor:Ws,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:Qs,post:te,put:se,patch:_s,delete:Xs,deleteAll:Zs,create:Hs,download:er}}function Te({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("account-registration-settings",r)},create({id:e="",data:s}){return t.create(`account-registration-settings/${e}`,e,s)},get({id:e}){return t.get(`account-registration-settings/${e}`)},update({id:e,data:s}){return t.put(`account-registration-settings/${e}`,s)},delete({id:e}){return t.delete(`account-registration-settings/${e}`)}}}function 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,expand:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,q:u,expand:o};return t.getAll("aml-checks",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`aml-checks/${e}`,r)},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 xe({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 Ce({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function De({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`applications/${e}/instances`,n)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function je({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 d={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:d,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`)}}}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:d,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 $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:r}){return t.put(`memberships/${e}/${s}`,r)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function 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("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function Rt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("orders",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`orders/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`orders/${e}`,s,n)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:r=null}){const n={expand:r};return t.post(`orders/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`orders/${e}/items/${s}`,r)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function wt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function kt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const r={limit:e,q:s};return t.getAll("payment-cards-bank-names",r)}}}function vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function dt({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 Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},autoAllocate({data:e}){return t.post("payout-request-allocations/auto",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function It({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-batches",u)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`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)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},split({id:e,data:s}){return t.post(`payout-requests/${e}/split`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset: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 Et({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Pt({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 xt({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 Ct({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("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 Dt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function jt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Mt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`quotes/${e}`,r)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Ot({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 Ft({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 Bt({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 Kt({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 Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("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 Lt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function zt({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 Ut({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 Vt({apiHandler:t}){return{get(){return t.get("status")}}}function Jt({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 Wt({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 Gt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function Yt({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 Qt({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 _t({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 Xt({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 Zt({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:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)}}}function Ht({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 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("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function ts({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 ss({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 rs{constructor({apiHandler:e}){this.accountRegistrationSettings=Te({apiHandler:e}),this.account=Ie({apiHandler:e}),this.allowlists=Se({apiHandler:e}),this.amlChecks=Ee({apiHandler:e}),this.amlSettings=Pe({apiHandler:e}),this.apiKeys=xe({apiHandler:e}),this.applicationInstances=Ce({apiHandler:e}),this.applications=De({apiHandler:e}),this.balanceTransactions=je({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=$t({apiHandler:e}),this.memberships=ht({apiHandler:e}),this.orderCancellations=pt({apiHandler:e}),this.orderPauses=yt({apiHandler:e}),this.orderReactivations=At({apiHandler:e}),this.orders=Rt({apiHandler:e}),this.organizationExports=bt({apiHandler:e}),this.organizations=wt({apiHandler:e}),this.paymentCardsBankNames=kt({apiHandler:e}),this.paymentInstruments=vt({apiHandler:e}),this.paymentMethods=dt({apiHandler:e}),this.paymentTokens=qt({apiHandler:e}),this.payoutRequestAllocations=Tt({apiHandler:e}),this.payoutRequestBatches=It({apiHandler:e}),this.payoutRequests=St({apiHandler:e}),this.payouts=Et({apiHandler:e}),this.plans=Pt({apiHandler:e}),this.previews=xt({apiHandler:e}),this.products=Ct({apiHandler:e}),this.profile=Dt({apiHandler:e}),this.purchase=jt({apiHandler:e}),this.quotes=Mt({apiHandler:e}),this.resource=Ot({apiHandler:e}),this.riskScoreRules=Ft({apiHandler:e}),this.roles=Bt({apiHandler:e}),this.search=Kt({apiHandler:e}),this.segments=Nt({apiHandler:e}),this.sendThroughAttribution=Lt({apiHandler:e}),this.serviceCredentials=zt({apiHandler:e}),this.shippingRates=Ut({apiHandler:e}),this.status=Vt({apiHandler:e}),this.subscriptionCancellations=Jt({apiHandler:e}),this.subscriptionPauses=Wt({apiHandler:e}),this.subscriptionReactivations=Gt({apiHandler:e}),this.subscriptions=Yt({apiHandler:e}),this.tags=Qt({apiHandler:e}),this.tagsRules=_t({apiHandler:e}),this.tracking=Xt({apiHandler:e}),this.transactions=Zt({apiHandler:e}),this.usages=Ht({apiHandler:e}),this.users=es({apiHandler:e}),this.webhooks=ts({apiHandler:e}),this.websites=ss({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 ns({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function us({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 os({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 ls({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)},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)}}}function cs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function is({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 as({apiHandler:t}){return{query(){return t.get("location")}}}const q={CustomersResource:ns,DataExportsResource:us,HistogramsResource:os,ReportsResource:ls,SubscriptionsResource:cs,TimelinesResource:is,LocationResource:as};class gs{constructor({apiHandler:e}){this.customers=q.CustomersResource({apiHandler:e}),this.dataExports=q.DataExportsResource({apiHandler:e}),this.histograms=q.HistogramsResource({apiHandler:e}),this.reports=q.ReportsResource({apiHandler:e}),this.subscriptions=q.SubscriptionsResource({apiHandler:e}),this.timelines=q.TimelinesResource({apiHandler:e}),this.location=q.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 ms({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 fs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function $s({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function hs({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function ps({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ys({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 As({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function Rs({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function bs({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function ws({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:d,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function ks({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("kyc-documents",r)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function vs({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 ds({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function qs({apiHandler:t}){return{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 Ts({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("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 Is({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 Ss({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 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("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ps({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 xs({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:d,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Cs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ds({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function js({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 Ms({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:d,responseType:"arraybuffer"};return t.download(`transactions/${e}`,s)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function Os({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Fs{constructor({apiHandler:e}){this.account=ms({apiHandler:e}),this.authorization=fs({apiHandler:e}),this.billingPortals=$s({apiHandler:e}),this.cashiers=hs({apiHandler:e}),this.checkoutForms=ps({apiHandler:e}),this.customFields=ys({apiHandler:e}),this.depositRequests=As({apiHandler:e}),this.deposit=Rs({apiHandler:e}),this.depositStrategies=bs({apiHandler:e}),this.invoices=ws({apiHandler:e}),this.kycDocuments=ks({apiHandler:e}),this.kycLivenessSessions=vs({apiHandler:e}),this.kycRequests=ds({apiHandler:e}),this.orders=qs({apiHandler:e}),this.paymentInstruments=Ts({apiHandler:e}),this.payoutRequests=Is({apiHandler:e}),this.plans=Ss({apiHandler:e}),this.products=Es({apiHandler:e}),this.purchase=Ps({apiHandler:e}),this.quotes=xs({apiHandler:e}),this.readyToPayout=Cs({apiHandler:e}),this.subscriptionReactivations=Ds({apiHandler:e}),this.subscriptions=js({apiHandler:e}),this.transactions=Ms({apiHandler:e}),this.websites=Os({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Bs({apiHandler:t}){return new rs({apiHandler:t})}function Ks({apiHandler:t}){return new gs({apiHandler:t})}function Ns({apiHandler:t}){return new Fs({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 Bs({apiHandler:l})}function Ls({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 Ks({apiHandler:l})}function zs({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),Ns({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Ls,h.RebillyStorefrontAPI=zs,h.cancellation=qe,h.default=Q,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
16
+ */var j,W;function ye(){if(W)return j;W=1;var t=pe();function e(s){return t(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}return j=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)},j}var M,G;function Ae(){if(G)return M;G=1;const t=he(),e=U(),s=ye();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 Re=Ae();const be=$e(Re);let we="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ke=(t=21)=>{let e="",s=t|0;for(;s--;)e+=we[Math.random()*64|0];return e};class ve{constructor({id:e=null,created:s=null}={}){this.id=e||ke(),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 qe=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 ve;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const I=new qe;class E{}K(E,"cancelById",(e,s)=>{try{I.getById(e).cancel(s),I.deleteById(e)}catch{}}),K(E,"cancelAll",async e=>{for(const s of I.getAll())await s.cancel(e),I.deleteById(s.id)});const de={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("/")}@94294cf`};return t.apiKey&&(a["REB-APIKEY"]=t.apiKey),a}function l(){return be(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 Us({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:a})}function Vs(c){X(v.request,c)}function Js({thenDelegate:c,catchDelegate:a=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:a})}function Ws(c){X(v.response,c)}function T({request:c,isCollection:a,config:m}){const p=H(m),{id:k,cancelToken:tr}=I.save();p.cancelToken=tr;const re=async function(){try{const S=await c(p);return Gs({response:S,isCollection:a,config:p})}catch(S){return Z({error:S})}finally{I.deleteById(k)}}();return re.cancel=S=>E.cancelById(k,S),re}function Gs({response:c,isCollection:a,config:m}){return a?new ne(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 Ys(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(a=>c.params[a]!==null&&c.params[a]!=="").reduce((a,m)=>(a[m]=c.params[m],a),{})),c}function H(c={}){return{...Ys(c)}}function ee(c,a={}){return T({request:m=>e.get(c,m),config:{params:a}})}function Qs(c,a){return T({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}),T({request:k=>e.post(c,a,k),config:p})}function se(c,a,m={}){return T({request:p=>e.put(c,a,p),config:{params:m}})}function _s(c,a){return T({request:m=>e.patch(c,a,m),config:{}})}function Xs(c){return T({request:a=>e.delete(c,a),config:{}})}function Zs(c,a){return T({request:m=>e.delete(c,m),config:{data:{...a}}})}async function Hs(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 er(c,a){const m=H(a);try{const p=await e.get(c,m);return new ue(p,m)}catch(p){return Z({error:p})}}return{getInstance:r,addRequestInterceptor:Us,removeRequestInterceptor:Vs,addResponseInterceptor:Js,removeResponseInterceptor:Ws,setTimeout:i,setProxyAgent:$,setSessionToken:f,setPublishableKey:g,setEndpoints:A,get:ee,getAll:Qs,post:te,put:se,patch:_s,delete:Xs,deleteAll:Zs,create:Hs,download:er}}function Te({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("account-registration-settings",r)},create({id:e="",data:s}){return t.create(`account-registration-settings/${e}`,e,s)},get({id:e}){return t.get(`account-registration-settings/${e}`)},update({id:e,data:s}){return t.put(`account-registration-settings/${e}`,s)},delete({id:e}){return t.delete(`account-registration-settings/${e}`)}}}function 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,expand:o=null}={}){const l={limit:e,offset:s,sort:r,filter:n,q:u,expand:o};return t.getAll("aml-checks",l)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`aml-checks/${e}`,r)},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 xe({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 Ce({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function De({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const i={limit:e,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return t.getAll("applications",i)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return t.getAll(`applications/${e}/instances`,n)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function je({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`)}}}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 $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:r,sort:n,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:s}){return t.create(`lists/${e}`,e,s)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:s}){return t.put(`lists/${e}`,s)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:s}){return t.get(`lists/${e}/${s}`)}}}function ht({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:r}){return t.put(`memberships/${e}/${s}`,r)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function 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("order-cancellations",u)},create({id:e="",data:s}){return t.create(`order-cancellations/${e}`,e,s)},get({id:e}){return t.get(`order-cancellations/${e}`)},update({id:e,data:s}){return t.put(`order-cancellations/${e}`,s)},delete({id:e}){return t.delete(`order-cancellations/${e}`)},patch({id:e,data:s}){return t.patch(`order-cancellations/${e}`,s)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("order-pauses",u)},pause({id:e="",data:s}){return t.create(`order-pauses/${e}`,e,s)},get({id:e}){return t.get(`order-pauses/${e}`)},update({id:e,data:s}){return t.put(`order-pauses/${e}`,s)},delete({id:e}){return t.delete(`order-pauses/${e}`)}}}function At({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("order-reactivations",u)},reactivate({data:e}){return t.post("order-reactivations",e)},get({id:e}){return t.get(`order-reactivations/${e}`)}}}function Rt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("orders",l)},create({id:e="",data:s,expand:r=null}){const n={expand:r};return t.create(`orders/${e}`,e,s,n)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}`,r)},update({id:e,data:s,expand:r=null}){const n={expand:r};return t.put(`orders/${e}`,s,n)},getUpcomingInvoice({id:e,expand:s=null}){const r={expand:s};return t.get(`orders/${e}/upcoming-invoice`,r)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:r=null}){const n={expand:r};return t.post(`orders/${e}/change-items`,s,n)},updateItem({id:e,itemId:s,data:r}){return t.patch(`orders/${e}/items/${s}`,r)},createInterimInvoice({id:e,data:s}){return t.post(`orders/${e}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`orders/${e}/upcoming-invoice/issue`,s)}}}function bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:e,offset:s,filter:r,q:n,sort:u};return t.getAll("organization-exports",o)},create({data:e}){return t.post("organization-exports",e)},get({id:e}){return t.get(`organization-exports/${e}`)}}}function wt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,q:u};return t.getAll("organizations",o)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:s}){return t.patch(`organizations/${e}`,s)}}}function kt({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const r={limit:e,q:s};return t.getAll("payment-cards-bank-names",r)}}}function vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:r,offset:n,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:s}){return t.patch(`payment-instruments/${e}`,s)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},nameInquiry({id:e,data:s}){return t.post(`payment-instruments/${e}/name-inquiry`,s)}}}function qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("payment-methods",r)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("tokens",r)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("payout-request-allocations",u)},create({data:e}){return t.post("payout-request-allocations",e)},autoAllocate({data:e}){return t.post("payout-request-allocations/auto",e)},get({id:e}){return t.get(`payout-request-allocations/${e}`)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)},process({data:e}){return t.post("payout-request-allocations/process",e)}}}function It({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-batches",u)},create({data:e}){return t.post("payout-request-batches",e)},get({id:e}){return t.get(`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)},preview({filter:e=null}){const s={filter:e};return t.get("payout-request-batches/preview",s)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("payout-requests",u)},create({id:e="",data:s}){return t.create(`payout-requests/${e}`,e,s)},get({id:e}){return t.get(`payout-requests/${e}`)},update({id:e,data:s}){return t.put(`payout-requests/${e}`,s)},patch({id:e,data:s}){return t.patch(`payout-requests/${e}`,s)},cancel({id:e,data:s}){return t.post(`payout-requests/${e}/cancel`,s)},split({id:e,data:s}){return t.post(`payout-requests/${e}/split`,s)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset: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 Et({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Pt({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 xt({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 Ct({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("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 Dt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")},getDashboard(){return t.get("profile/dashboard")},updateDashboard({data:e}){return t.put("profile/dashboard",e)},getDashboardMetricReport({metric:e,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return t.get(`profile/dashboard/metrics/${e}`,n)}}}function jt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Mt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,expand:u};return t.getAll("quotes",o)},create({id:e="",data:s}){return t.create(`quotes/${e}`,e,s)},get({id:e,expand:s=null}){const r={expand:s};return t.get(`quotes/${e}`,r)},update({id:e,data:s}){return t.put(`quotes/${e}`,s)},patch({id:e,data:s}){return t.patch(`quotes/${e}`,s)},accept({id:e}){return t.post(`quotes/${e}/accept`)},cancel({id:e}){return t.post(`quotes/${e}/cancel`)},issue({id:e}){return t.post(`quotes/${e}/issue`)},recall({id:e}){return t.post(`quotes/${e}/recall`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},getAllTimelineMessages({id:e,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return t.getAll(`quotes/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`quotes/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`quotes/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`quotes/${e}/timeline/${s}`)},downloadPDF({id:e}){const s={headers:q,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Ot({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 Ft({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 Bt({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 Kt({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 Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("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 Lt({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function zt({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 Ut({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 Vt({apiHandler:t}){return{get(){return t.get("status")}}}function Jt({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 Wt({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 Gt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:e,offset:s,filter:r,sort:n};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function Yt({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 Qt({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 _t({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 Xt({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 Zt({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 Ht({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 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("users",o)},create({id:e="",data:s}){return t.create(`users/${e}`,e,s)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:s}){return t.put(`users/${e}`,s)},getMfa({id:e}){return t.get(`users/${e}/mfa`)}}}function ts({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 ss({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 rs{constructor({apiHandler:e}){this.accountRegistrationSettings=Te({apiHandler:e}),this.account=Ie({apiHandler:e}),this.allowlists=Se({apiHandler:e}),this.amlChecks=Ee({apiHandler:e}),this.amlSettings=Pe({apiHandler:e}),this.apiKeys=xe({apiHandler:e}),this.applicationInstances=Ce({apiHandler:e}),this.applications=De({apiHandler:e}),this.balanceTransactions=je({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=$t({apiHandler:e}),this.memberships=ht({apiHandler:e}),this.orderCancellations=pt({apiHandler:e}),this.orderPauses=yt({apiHandler:e}),this.orderReactivations=At({apiHandler:e}),this.orders=Rt({apiHandler:e}),this.organizationExports=bt({apiHandler:e}),this.organizations=wt({apiHandler:e}),this.paymentCardsBankNames=kt({apiHandler:e}),this.paymentInstruments=vt({apiHandler:e}),this.paymentMethods=qt({apiHandler:e}),this.paymentTokens=dt({apiHandler:e}),this.payoutRequestAllocations=Tt({apiHandler:e}),this.payoutRequestBatches=It({apiHandler:e}),this.payoutRequests=St({apiHandler:e}),this.payouts=Et({apiHandler:e}),this.plans=Pt({apiHandler:e}),this.previews=xt({apiHandler:e}),this.products=Ct({apiHandler:e}),this.profile=Dt({apiHandler:e}),this.purchase=jt({apiHandler:e}),this.quotes=Mt({apiHandler:e}),this.resource=Ot({apiHandler:e}),this.riskScoreRules=Ft({apiHandler:e}),this.roles=Bt({apiHandler:e}),this.search=Kt({apiHandler:e}),this.segments=Nt({apiHandler:e}),this.sendThroughAttribution=Lt({apiHandler:e}),this.serviceCredentials=zt({apiHandler:e}),this.shippingRates=Ut({apiHandler:e}),this.status=Vt({apiHandler:e}),this.subscriptionCancellations=Jt({apiHandler:e}),this.subscriptionPauses=Wt({apiHandler:e}),this.subscriptionReactivations=Gt({apiHandler:e}),this.subscriptions=Yt({apiHandler:e}),this.tags=Qt({apiHandler:e}),this.tagsRules=_t({apiHandler:e}),this.tracking=Xt({apiHandler:e}),this.transactions=Zt({apiHandler:e}),this.usages=Ht({apiHandler:e}),this.users=es({apiHandler:e}),this.webhooks=ts({apiHandler:e}),this.websites=ss({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 ns({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function us({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 os({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 ls({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)},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)}}}function cs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function is({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 as({apiHandler:t}){return{query(){return t.get("location")}}}const d={CustomersResource:ns,DataExportsResource:us,HistogramsResource:os,ReportsResource:ls,SubscriptionsResource:cs,TimelinesResource:is,LocationResource:as};class gs{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 ms({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 fs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function $s({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function hs({apiHandler:t}){return{get({id:e}){return t.get(`cashiers/${e}`)},cancelPayoutRequests({id:e,data:s}){return t.post(`cashiers/${e}/cancel-payout-requests`,s)}}}function ps({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ys({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 As({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`deposit-requests/${e}`,r)}}}function Rs({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function bs({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function ws({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 ks({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const r={limit:e,offset:s};return t.getAll("kyc-documents",r)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:s}){return t.patch(`kyc-documents/${e}`,s)}}}function vs({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 qs({apiHandler:t}){return{get({id:e,expand:s=null}){const r={expand:s};return t.get(`kyc-requests/${e}`,r)}}}function ds({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 Ts({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:e,sort:s,limit:r,offset:n,q:u};return t.getAll("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 Is({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 Ss({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 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("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Ps({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 xs({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 Cs({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Ds({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function js({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 Ms({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 Os({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Fs{constructor({apiHandler:e}){this.account=ms({apiHandler:e}),this.authorization=fs({apiHandler:e}),this.billingPortals=$s({apiHandler:e}),this.cashiers=hs({apiHandler:e}),this.checkoutForms=ps({apiHandler:e}),this.customFields=ys({apiHandler:e}),this.depositRequests=As({apiHandler:e}),this.deposit=Rs({apiHandler:e}),this.depositStrategies=bs({apiHandler:e}),this.invoices=ws({apiHandler:e}),this.kycDocuments=ks({apiHandler:e}),this.kycLivenessSessions=vs({apiHandler:e}),this.kycRequests=qs({apiHandler:e}),this.orders=ds({apiHandler:e}),this.paymentInstruments=Ts({apiHandler:e}),this.payoutRequests=Is({apiHandler:e}),this.plans=Ss({apiHandler:e}),this.products=Es({apiHandler:e}),this.purchase=Ps({apiHandler:e}),this.quotes=xs({apiHandler:e}),this.readyToPayout=Cs({apiHandler:e}),this.subscriptionReactivations=Ds({apiHandler:e}),this.subscriptions=js({apiHandler:e}),this.transactions=Ms({apiHandler:e}),this.websites=Os({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Bs({apiHandler:t}){return new rs({apiHandler:t})}function Ks({apiHandler:t}){return new gs({apiHandler:t})}function Ns({apiHandler:t}){return new Fs({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 Bs({apiHandler:l})}function Ls({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 Ks({apiHandler:l})}function zs({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),Ns({apiHandler:i})}h.RebillyAPI=Q,h.RebillyErrors=R,h.RebillyExperimentalAPI=Ls,h.RebillyStorefrontAPI=zs,h.cancellation=de,h.default=Q,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebilly-js-sdk",
3
- "version": "62.130.0",
3
+ "version": "62.131.0",
4
4
  "description": "Official Rebilly API JS library for the browser and Node",
5
5
  "types": "./dist/rebilly-js-sdk.d.ts",
6
6
  "main": "./dist/rebilly-js-sdk.umd.js",