rebilly-js-sdk 62.126.0 → 62.128.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.126.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.125.0...rebilly-js-sdk-v62.126.0) (2026-06-23)
1
+ ## [62.128.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.127.0...rebilly-js-sdk-v62.128.0) (2026-06-29)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#22938](https://github.com/Rebilly/rebilly/issues/22938)) ([386de5e](https://github.com/Rebilly/rebilly/commit/386de5eb8e57408bd4049842d3fd401d030c6f16))
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#22984](https://github.com/Rebilly/rebilly/issues/22984)) ([b2250e6](https://github.com/Rebilly/rebilly/commit/b2250e63eeb14c491869c97d92030263a1e4fd43))
@@ -26,8 +26,8 @@ declare namespace rebilly {
26
26
  type GetAmlCheckCollectionResponse = operations['GetAmlCheckCollection']['responses']['200']['content']['application/json'][0]
27
27
  type GetAmlCheckCollectionResponsePromise = Promise<{ items: {fields: GetAmlCheckCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
28
28
 
29
- type GetAmlCheckRequest = { id: string }
30
-
29
+ type GetAmlCheckRequest = operations['GetAmlCheck']['parameters'] & { id: string }
30
+
31
31
  type GetAmlCheckResponse = operations['GetAmlCheck']['responses']['200']['content']['application/json']
32
32
  type GetAmlCheckResponsePromise = Promise<{fields: GetAmlCheckResponse}>
33
33
 
@@ -6345,6 +6345,10 @@ export interface coreComponents {
6345
6345
  /** Type of link. */
6346
6346
  rel?: "self" | "customer";
6347
6347
  }[];
6348
+ /** Embedded objects that are requested by the `expand` query parameter. */
6349
+ _embedded?: {
6350
+ customer?: { [key: string]: any };
6351
+ };
6348
6352
  };
6349
6353
  /** AML check review. */
6350
6354
  AmlCheckReview: {
@@ -12091,6 +12095,10 @@ export interface coreComponents {
12091
12095
  revision?: number;
12092
12096
  /** Specifies if a plan is a trial that does not have recurring instructions. */
12093
12097
  isTrialOnly?: boolean;
12098
+ /** Service interval settings. */
12099
+ recurringInterval?: { [key: string]: any };
12100
+ /** Trial configuration setting. */
12101
+ trial?: { [key: string]: any };
12094
12102
  createdTime?: coreComponents["schemas"]["CreatedTime"];
12095
12103
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
12096
12104
  /** Related links. */
@@ -12229,11 +12237,8 @@ export interface coreComponents {
12229
12237
  revision?: number;
12230
12238
  /** Specifies if a plan is a trial that does not have recurring instructions. */
12231
12239
  isTrialOnly?: boolean;
12232
- /**
12233
- * Service interval settings.
12234
- * For a one-time sale, set this value to `null`.
12235
- */
12236
- recurringInterval?: {
12240
+ /** Service interval settings. */
12241
+ recurringInterval: {
12237
12242
  periodAnchorInstruction?: coreComponents["schemas"]["ServicePeriodAnchorInstruction"];
12238
12243
  /** Unit of time. */
12239
12244
  unit: "day" | "week" | "month" | "year";
@@ -12329,6 +12334,8 @@ export interface coreComponents {
12329
12334
  revision?: number;
12330
12335
  /** Specifies if a plan is a trial that does not have recurring instructions. */
12331
12336
  isTrialOnly?: boolean;
12337
+ /** Service interval settings. */
12338
+ recurringInterval?: { [key: string]: any };
12332
12339
  /** Trial configuration settings. */
12333
12340
  trial: coreComponents["schemas"]["PlanTrial"];
12334
12341
  /**
@@ -12348,24 +12355,19 @@ export interface coreComponents {
12348
12355
  rel?: "self" | "attachments";
12349
12356
  }[];
12350
12357
  };
12351
- Plan: Partial<
12352
- {
12353
- /** ID of the plan. */
12354
- id: string;
12355
- } & coreComponents["schemas"]["OneTimeSalePlan"]
12356
- > &
12357
- Partial<
12358
- {
12358
+ Plan:
12359
+ | ({
12359
12360
  /** ID of the plan. */
12360
12361
  id: string;
12361
- } & coreComponents["schemas"]["SubscriptionPlan"]
12362
- > &
12363
- Partial<
12364
- {
12362
+ } & coreComponents["schemas"]["OneTimeSalePlan"])
12363
+ | ({
12365
12364
  /** ID of the plan. */
12366
12365
  id: string;
12367
- } & coreComponents["schemas"]["TrialOnlyPlan"]
12368
- >;
12366
+ } & coreComponents["schemas"]["SubscriptionPlan"])
12367
+ | ({
12368
+ /** ID of the plan. */
12369
+ id: string;
12370
+ } & coreComponents["schemas"]["TrialOnlyPlan"]);
12369
12371
  /**
12370
12372
  * Products are the items that your business sells.
12371
12373
  * Products include digital goods, services, and physical goods.
@@ -12423,24 +12425,19 @@ export interface coreComponents {
12423
12425
  /** ID of the plan. */
12424
12426
  id: coreComponents["schemas"]["ResourceId"];
12425
12427
  };
12426
- FlexiblePlan: Partial<
12427
- {
12428
- /** ID of the plan. */
12429
- id: string;
12430
- } & coreComponents["schemas"]["OneTimeSalePlan"]
12431
- > &
12432
- Partial<
12433
- {
12428
+ FlexiblePlan:
12429
+ | ({
12434
12430
  /** ID of the plan. */
12435
12431
  id: string;
12436
- } & coreComponents["schemas"]["SubscriptionPlan"]
12437
- > &
12438
- Partial<
12439
- {
12432
+ } & coreComponents["schemas"]["OneTimeSalePlan"])
12433
+ | ({
12440
12434
  /** ID of the plan. */
12441
12435
  id: string;
12442
- } & coreComponents["schemas"]["TrialOnlyPlan"]
12443
- >;
12436
+ } & coreComponents["schemas"]["SubscriptionPlan"])
12437
+ | ({
12438
+ /** ID of the plan. */
12439
+ id: string;
12440
+ } & coreComponents["schemas"]["TrialOnlyPlan"]);
12444
12441
  /**
12445
12442
  * Specifies the soft and hard usage limit thresholds for an item with a metered billing plan.
12446
12443
  * This value is ignored when the plan is not metered.
@@ -26349,6 +26346,12 @@ export interface coreComponents {
26349
26346
  bankCountry?: string;
26350
26347
  /** Bank name of the payment instrument. */
26351
26348
  bankName?: string;
26349
+ /**
26350
+ * Specifies if payouts are supported for cards with this BIN.
26351
+ * Defaults to `true`.
26352
+ * This value is `false` if the BIN does not support payouts.
26353
+ */
26354
+ isPayoutable?: boolean;
26352
26355
  /** Contact's billing address. */
26353
26356
  billingAddress?: coreComponents["schemas"]["ContactObject"];
26354
26357
  useAsBackup?: coreComponents["schemas"]["UseAsBackup"];
@@ -29727,6 +29730,14 @@ export interface operations {
29727
29730
  filter?: coreComponents["parameters"]["collectionFilter"];
29728
29731
  /** Use this field to perform a partial search of text fields. */
29729
29732
  q?: coreComponents["parameters"]["collectionQuery"];
29733
+ /**
29734
+ * Expands a request to include embedded objects within the `_embedded`
29735
+ * property of the response. This field accepts a comma-separated list of objects.
29736
+ *
29737
+ * For more information, see
29738
+ * [Embedded resources](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).
29739
+ */
29740
+ expand?: coreComponents["parameters"]["collectionExpand"];
29730
29741
  };
29731
29742
  };
29732
29743
  responses: {
@@ -29751,6 +29762,16 @@ export interface operations {
29751
29762
  /** ID of the resource. */
29752
29763
  id: coreComponents["parameters"]["resourceId"];
29753
29764
  };
29765
+ query: {
29766
+ /**
29767
+ * Expands a request to include embedded objects within the `_embedded`
29768
+ * property of the response. This field accepts a comma-separated list of objects.
29769
+ *
29770
+ * For more information, see
29771
+ * [Embedded resources](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).
29772
+ */
29773
+ expand?: coreComponents["parameters"]["collectionExpand"];
29774
+ };
29754
29775
  };
29755
29776
  responses: {
29756
29777
  /** AML check retrieved. */
@@ -44591,6 +44612,10 @@ export interface storefrontComponents {
44591
44612
  /** Type of link. */
44592
44613
  rel?: "self" | "customer";
44593
44614
  }[];
44615
+ /** Embedded objects that are requested by the `expand` query parameter. */
44616
+ _embedded?: {
44617
+ customer?: { [key: string]: any };
44618
+ };
44594
44619
  };
44595
44620
  /** AML check review. */
44596
44621
  AmlCheckReview: {
@@ -50337,6 +50362,10 @@ export interface storefrontComponents {
50337
50362
  revision?: number;
50338
50363
  /** Specifies if a plan is a trial that does not have recurring instructions. */
50339
50364
  isTrialOnly?: boolean;
50365
+ /** Service interval settings. */
50366
+ recurringInterval?: { [key: string]: any };
50367
+ /** Trial configuration setting. */
50368
+ trial?: { [key: string]: any };
50340
50369
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
50341
50370
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
50342
50371
  /** Related links. */
@@ -50475,11 +50504,8 @@ export interface storefrontComponents {
50475
50504
  revision?: number;
50476
50505
  /** Specifies if a plan is a trial that does not have recurring instructions. */
50477
50506
  isTrialOnly?: boolean;
50478
- /**
50479
- * Service interval settings.
50480
- * For a one-time sale, set this value to `null`.
50481
- */
50482
- recurringInterval?: {
50507
+ /** Service interval settings. */
50508
+ recurringInterval: {
50483
50509
  periodAnchorInstruction?: storefrontComponents["schemas"]["ServicePeriodAnchorInstruction"];
50484
50510
  /** Unit of time. */
50485
50511
  unit: "day" | "week" | "month" | "year";
@@ -50575,6 +50601,8 @@ export interface storefrontComponents {
50575
50601
  revision?: number;
50576
50602
  /** Specifies if a plan is a trial that does not have recurring instructions. */
50577
50603
  isTrialOnly?: boolean;
50604
+ /** Service interval settings. */
50605
+ recurringInterval?: { [key: string]: any };
50578
50606
  /** Trial configuration settings. */
50579
50607
  trial: storefrontComponents["schemas"]["PlanTrial"];
50580
50608
  /**
@@ -50594,24 +50622,19 @@ export interface storefrontComponents {
50594
50622
  rel?: "self" | "attachments";
50595
50623
  }[];
50596
50624
  };
50597
- Plan: Partial<
50598
- {
50599
- /** ID of the plan. */
50600
- id: string;
50601
- } & storefrontComponents["schemas"]["OneTimeSalePlan"]
50602
- > &
50603
- Partial<
50604
- {
50625
+ Plan:
50626
+ | ({
50605
50627
  /** ID of the plan. */
50606
50628
  id: string;
50607
- } & storefrontComponents["schemas"]["SubscriptionPlan"]
50608
- > &
50609
- Partial<
50610
- {
50629
+ } & storefrontComponents["schemas"]["OneTimeSalePlan"])
50630
+ | ({
50611
50631
  /** ID of the plan. */
50612
50632
  id: string;
50613
- } & storefrontComponents["schemas"]["TrialOnlyPlan"]
50614
- >;
50633
+ } & storefrontComponents["schemas"]["SubscriptionPlan"])
50634
+ | ({
50635
+ /** ID of the plan. */
50636
+ id: string;
50637
+ } & storefrontComponents["schemas"]["TrialOnlyPlan"]);
50615
50638
  /**
50616
50639
  * Products are the items that your business sells.
50617
50640
  * Products include digital goods, services, and physical goods.
@@ -50669,24 +50692,19 @@ export interface storefrontComponents {
50669
50692
  /** ID of the plan. */
50670
50693
  id: storefrontComponents["schemas"]["ResourceId"];
50671
50694
  };
50672
- FlexiblePlan: Partial<
50673
- {
50674
- /** ID of the plan. */
50675
- id: string;
50676
- } & storefrontComponents["schemas"]["OneTimeSalePlan"]
50677
- > &
50678
- Partial<
50679
- {
50695
+ FlexiblePlan:
50696
+ | ({
50697
+ /** ID of the plan. */
50698
+ id: string;
50699
+ } & storefrontComponents["schemas"]["OneTimeSalePlan"])
50700
+ | ({
50680
50701
  /** ID of the plan. */
50681
50702
  id: string;
50682
- } & storefrontComponents["schemas"]["SubscriptionPlan"]
50683
- > &
50684
- Partial<
50685
- {
50703
+ } & storefrontComponents["schemas"]["SubscriptionPlan"])
50704
+ | ({
50686
50705
  /** ID of the plan. */
50687
50706
  id: string;
50688
- } & storefrontComponents["schemas"]["TrialOnlyPlan"]
50689
- >;
50707
+ } & storefrontComponents["schemas"]["TrialOnlyPlan"]);
50690
50708
  /**
50691
50709
  * Specifies the soft and hard usage limit thresholds for an item with a metered billing plan.
50692
50710
  * This value is ignored when the plan is not metered.
@@ -64595,6 +64613,12 @@ export interface storefrontComponents {
64595
64613
  bankCountry?: string;
64596
64614
  /** Bank name of the payment instrument. */
64597
64615
  bankName?: string;
64616
+ /**
64617
+ * Specifies if payouts are supported for cards with this BIN.
64618
+ * Defaults to `true`.
64619
+ * This value is `false` if the BIN does not support payouts.
64620
+ */
64621
+ isPayoutable?: boolean;
64598
64622
  /** Contact's billing address. */
64599
64623
  billingAddress?: storefrontComponents["schemas"]["ContactObject"];
64600
64624
  useAsBackup?: storefrontComponents["schemas"]["UseAsBackup"];
@@ -70314,6 +70338,10 @@ export interface reportsComponents {
70314
70338
  /** Type of link. */
70315
70339
  rel?: "self" | "customer";
70316
70340
  }[];
70341
+ /** Embedded objects that are requested by the `expand` query parameter. */
70342
+ _embedded?: {
70343
+ customer?: { [key: string]: any };
70344
+ };
70317
70345
  };
70318
70346
  /** AML check review. */
70319
70347
  AmlCheckReview: {
@@ -76060,6 +76088,10 @@ export interface reportsComponents {
76060
76088
  revision?: number;
76061
76089
  /** Specifies if a plan is a trial that does not have recurring instructions. */
76062
76090
  isTrialOnly?: boolean;
76091
+ /** Service interval settings. */
76092
+ recurringInterval?: { [key: string]: any };
76093
+ /** Trial configuration setting. */
76094
+ trial?: { [key: string]: any };
76063
76095
  createdTime?: reportsComponents["schemas"]["CreatedTime"];
76064
76096
  updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
76065
76097
  /** Related links. */
@@ -76198,11 +76230,8 @@ export interface reportsComponents {
76198
76230
  revision?: number;
76199
76231
  /** Specifies if a plan is a trial that does not have recurring instructions. */
76200
76232
  isTrialOnly?: boolean;
76201
- /**
76202
- * Service interval settings.
76203
- * For a one-time sale, set this value to `null`.
76204
- */
76205
- recurringInterval?: {
76233
+ /** Service interval settings. */
76234
+ recurringInterval: {
76206
76235
  periodAnchorInstruction?: reportsComponents["schemas"]["ServicePeriodAnchorInstruction"];
76207
76236
  /** Unit of time. */
76208
76237
  unit: "day" | "week" | "month" | "year";
@@ -76298,6 +76327,8 @@ export interface reportsComponents {
76298
76327
  revision?: number;
76299
76328
  /** Specifies if a plan is a trial that does not have recurring instructions. */
76300
76329
  isTrialOnly?: boolean;
76330
+ /** Service interval settings. */
76331
+ recurringInterval?: { [key: string]: any };
76301
76332
  /** Trial configuration settings. */
76302
76333
  trial: reportsComponents["schemas"]["PlanTrial"];
76303
76334
  /**
@@ -76317,24 +76348,19 @@ export interface reportsComponents {
76317
76348
  rel?: "self" | "attachments";
76318
76349
  }[];
76319
76350
  };
76320
- Plan: Partial<
76321
- {
76322
- /** ID of the plan. */
76323
- id: string;
76324
- } & reportsComponents["schemas"]["OneTimeSalePlan"]
76325
- > &
76326
- Partial<
76327
- {
76351
+ Plan:
76352
+ | ({
76353
+ /** ID of the plan. */
76354
+ id: string;
76355
+ } & reportsComponents["schemas"]["OneTimeSalePlan"])
76356
+ | ({
76328
76357
  /** ID of the plan. */
76329
76358
  id: string;
76330
- } & reportsComponents["schemas"]["SubscriptionPlan"]
76331
- > &
76332
- Partial<
76333
- {
76359
+ } & reportsComponents["schemas"]["SubscriptionPlan"])
76360
+ | ({
76334
76361
  /** ID of the plan. */
76335
76362
  id: string;
76336
- } & reportsComponents["schemas"]["TrialOnlyPlan"]
76337
- >;
76363
+ } & reportsComponents["schemas"]["TrialOnlyPlan"]);
76338
76364
  /**
76339
76365
  * Products are the items that your business sells.
76340
76366
  * Products include digital goods, services, and physical goods.
@@ -76392,24 +76418,19 @@ export interface reportsComponents {
76392
76418
  /** ID of the plan. */
76393
76419
  id: reportsComponents["schemas"]["ResourceId"];
76394
76420
  };
76395
- FlexiblePlan: Partial<
76396
- {
76397
- /** ID of the plan. */
76398
- id: string;
76399
- } & reportsComponents["schemas"]["OneTimeSalePlan"]
76400
- > &
76401
- Partial<
76402
- {
76421
+ FlexiblePlan:
76422
+ | ({
76403
76423
  /** ID of the plan. */
76404
76424
  id: string;
76405
- } & reportsComponents["schemas"]["SubscriptionPlan"]
76406
- > &
76407
- Partial<
76408
- {
76425
+ } & reportsComponents["schemas"]["OneTimeSalePlan"])
76426
+ | ({
76409
76427
  /** ID of the plan. */
76410
76428
  id: string;
76411
- } & reportsComponents["schemas"]["TrialOnlyPlan"]
76412
- >;
76429
+ } & reportsComponents["schemas"]["SubscriptionPlan"])
76430
+ | ({
76431
+ /** ID of the plan. */
76432
+ id: string;
76433
+ } & reportsComponents["schemas"]["TrialOnlyPlan"]);
76413
76434
  /**
76414
76435
  * Specifies the soft and hard usage limit thresholds for an item with a metered billing plan.
76415
76436
  * This value is ignored when the plan is not metered.
@@ -90318,6 +90339,12 @@ export interface reportsComponents {
90318
90339
  bankCountry?: string;
90319
90340
  /** Bank name of the payment instrument. */
90320
90341
  bankName?: string;
90342
+ /**
90343
+ * Specifies if payouts are supported for cards with this BIN.
90344
+ * Defaults to `true`.
90345
+ * This value is `false` if the BIN does not support payouts.
90346
+ */
90347
+ isPayoutable?: boolean;
90321
90348
  /** Contact's billing address. */
90322
90349
  billingAddress?: reportsComponents["schemas"]["ContactObject"];
90323
90350
  useAsBackup?: reportsComponents["schemas"]["UseAsBackup"];
@@ -95491,9 +95518,10 @@ declare module "resources/aml-checks-resource" {
95491
95518
  export default function AmlChecksResource({ apiHandler }: {
95492
95519
  apiHandler: any;
95493
95520
  }): {
95494
- getAll({ limit, offset, sort, filter, q, }?: rebilly.GetAmlCheckCollectionRequest): rebilly.GetAmlCheckCollectionResponsePromise;
95495
- get({ id }: {
95521
+ getAll({ limit, offset, sort, filter, q, expand, }?: rebilly.GetAmlCheckCollectionRequest): rebilly.GetAmlCheckCollectionResponsePromise;
95522
+ get({ id, expand }: {
95496
95523
  id: any;
95524
+ expand?: any;
95497
95525
  }): rebilly.GetAmlCheckResponsePromise;
95498
95526
  startReview({ id }: {
95499
95527
  id: any;
@@ -97484,9 +97512,10 @@ declare module "resources/api-instance" {
97484
97512
  }): any;
97485
97513
  };
97486
97514
  amlChecks: {
97487
- getAll({ limit, offset, sort, filter, q, }?: rebilly.GetAmlCheckCollectionRequest): rebilly.GetAmlCheckCollectionResponsePromise;
97488
- get({ id }: {
97515
+ getAll({ limit, offset, sort, filter, q, expand, }?: rebilly.GetAmlCheckCollectionRequest): rebilly.GetAmlCheckCollectionResponsePromise;
97516
+ get({ id, expand }: {
97489
97517
  id: any;
97518
+ expand?: any;
97490
97519
  }): rebilly.GetAmlCheckResponsePromise;
97491
97520
  startReview({ id }: {
97492
97521
  id: any;
@@ -68,12 +68,12 @@ class A extends Error {
68
68
  n && n.data && (n.data.error ? l = n.data.error : n.data.detail ? l = n.data.detail : n.data.title && (l = n.data.title)), super(l), this.name = s || "RebillyError", this.response = n, this.request = u, this.config = r, this.status = n && n.status ? n.status : null, this.statusText = n && n.statusText ? n.statusText : null, this.details = n && n.data && n.data.details ? n.data.details : null, this.invalidFields = n && n.data && n.data.invalidFields ? n.data.invalidFields : null;
69
69
  }
70
70
  }
71
- class Rt extends A {
71
+ class bt extends A {
72
72
  constructor(t) {
73
73
  super({ error: t, name: "RebillyRequestError" });
74
74
  }
75
75
  }
76
- class bt extends A {
76
+ class Rt extends A {
77
77
  constructor(t) {
78
78
  super({ error: t, name: "RebillyValidationError" });
79
79
  }
@@ -110,8 +110,8 @@ class Tt extends A {
110
110
  }
111
111
  const y = {
112
112
  RebillyError: A,
113
- RebillyRequestError: Rt,
114
- RebillyValidationError: bt,
113
+ RebillyRequestError: bt,
114
+ RebillyValidationError: Rt,
115
115
  RebillyNotFoundError: wt,
116
116
  RebillyConflictError: kt,
117
117
  RebillyForbiddenError: vt,
@@ -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("/")}@386de5e`
492
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@b2250e6`
493
493
  };
494
494
  return e.apiKey && (g["REB-APIKEY"] = e.apiKey), g;
495
495
  }
@@ -550,8 +550,8 @@ function O({ options: e }) {
550
550
  function ut(c) {
551
551
  N(k.response, c);
552
552
  }
553
- function b({ request: c, isCollection: g, config: m }) {
554
- const p = z(m), { id: R, cancelToken: $t } = q.save();
553
+ function R({ request: c, isCollection: g, config: m }) {
554
+ const p = z(m), { id: b, cancelToken: $t } = q.save();
555
555
  p.cancelToken = $t;
556
556
  const W = async function() {
557
557
  try {
@@ -564,10 +564,10 @@ function O({ options: e }) {
564
564
  } catch (d) {
565
565
  return L({ error: d });
566
566
  } finally {
567
- q.deleteById(R);
567
+ q.deleteById(b);
568
568
  }
569
569
  }();
570
- return W.cancel = (d) => I.cancelById(R, d), W;
570
+ return W.cancel = (d) => I.cancelById(b, d), W;
571
571
  }
572
572
  function ot({ response: c, isCollection: g, config: m }) {
573
573
  return g ? new yt(c, m) : new tt(c, m);
@@ -601,13 +601,13 @@ function O({ options: e }) {
601
601
  return { ...lt(c) };
602
602
  }
603
603
  function U(c, g = {}) {
604
- return b({
604
+ return R({
605
605
  request: (m) => t.get(c, m),
606
606
  config: { params: g }
607
607
  });
608
608
  }
609
609
  function ct(c, g) {
610
- return b({
610
+ return R({
611
611
  request: (m) => t.get(c, m),
612
612
  config: { params: g },
613
613
  isCollection: !0
@@ -615,31 +615,31 @@ function O({ options: e }) {
615
615
  }
616
616
  function V(c, g, m = {}) {
617
617
  let p = {};
618
- return m.authenticate === !1 && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m.params && (p.params = { ...m.params }), b({
619
- request: (R) => t.post(c, g, R),
618
+ return m.authenticate === !1 && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m.params && (p.params = { ...m.params }), R({
619
+ request: (b) => t.post(c, g, b),
620
620
  config: p
621
621
  });
622
622
  }
623
623
  function J(c, g, m = {}) {
624
- return b({
624
+ return R({
625
625
  request: (p) => t.put(c, g, p),
626
626
  config: { params: m }
627
627
  });
628
628
  }
629
629
  function it(c, g) {
630
- return b({
630
+ return R({
631
631
  request: (m) => t.patch(c, g, m),
632
632
  config: {}
633
633
  });
634
634
  }
635
635
  function gt(c) {
636
- return b({
636
+ return R({
637
637
  request: (g) => t.delete(c, g),
638
638
  config: {}
639
639
  });
640
640
  }
641
641
  function at(c, g) {
642
- return b({
642
+ return R({
643
643
  request: (m) => t.delete(c, m),
644
644
  config: { data: { ...g } }
645
645
  });
@@ -652,10 +652,10 @@ function O({ options: e }) {
652
652
  throw new y.RebillyConflictError({
653
653
  message: "A resource already exists with this ID. Please use a different ID."
654
654
  });
655
- } catch (R) {
656
- if (R.name === "RebillyNotFoundError")
655
+ } catch (b) {
656
+ if (b.name === "RebillyNotFoundError")
657
657
  return J(c, m, p);
658
- throw R;
658
+ throw b;
659
659
  }
660
660
  }
661
661
  async function ft(c, g) {
@@ -770,16 +770,18 @@ function Nt({ apiHandler: e }) {
770
770
  offset: s = null,
771
771
  sort: r = null,
772
772
  filter: n = null,
773
- q: u = null
773
+ q: u = null,
774
+ expand: o = null
774
775
  } = {}) {
775
- const o = { limit: t, offset: s, sort: r, filter: n, q: u };
776
- return e.getAll("aml-checks", o);
776
+ const l = { limit: t, offset: s, sort: r, filter: n, q: u, expand: o };
777
+ return e.getAll("aml-checks", l);
777
778
  },
778
779
  /**
779
780
  * @returns { rebilly.GetAmlCheckResponsePromise } response
780
781
  */
781
- get({ id: t }) {
782
- return e.get(`aml-checks/${t}`);
782
+ get({ id: t, expand: s = null }) {
783
+ const r = { expand: s };
784
+ return e.get(`aml-checks/${t}`, r);
783
785
  },
784
786
  startReview({ id: t }) {
785
787
  return e.post(`aml-checks/${t}/start-review`);
@@ -2364,7 +2366,7 @@ function Ae({ apiHandler: e }) {
2364
2366
  }
2365
2367
  };
2366
2368
  }
2367
- function Re({ apiHandler: e }) {
2369
+ function be({ apiHandler: e }) {
2368
2370
  return {
2369
2371
  /**
2370
2372
  * @param { rebilly.GetJournalAccountCollectionRequest } request
@@ -2400,7 +2402,7 @@ function Re({ apiHandler: e }) {
2400
2402
  }
2401
2403
  };
2402
2404
  }
2403
- function be({ apiHandler: e }) {
2405
+ function Re({ apiHandler: e }) {
2404
2406
  return {
2405
2407
  /**
2406
2408
  * @param { rebilly.GetJournalEntryCollectionRequest } request
@@ -4231,7 +4233,7 @@ class $s {
4231
4233
  apiHandler: t
4232
4234
  }), this.depositRequests = ne({ apiHandler: t }), this.depositStrategies = ue({ apiHandler: t }), this.digitalWallets = oe({ apiHandler: t }), this.disputes = le({ apiHandler: t }), this.emailDeliverySettings = ce({ apiHandler: t }), this.emailMessages = ie({ apiHandler: t }), this.emailNotifications = ge({ apiHandler: t }), this.events = ae({ apiHandler: t }), this.externalIdentifiers = me({ apiHandler: t }), this.externalServicesSettings = fe({
4233
4235
  apiHandler: t
4234
- }), this.fees = $e({ apiHandler: t }), this.files = pe({ apiHandler: t }), this.gatewayAccounts = he({ apiHandler: t }), this.integrations = ye({ apiHandler: t }), this.invoices = Ae({ apiHandler: t }), this.journalAccounts = Re({ apiHandler: t }), this.journalEntries = be({ apiHandler: t }), this.journalRecords = we({ apiHandler: t }), this.kycDocuments = ke({ apiHandler: t }), this.kycRequests = ve({ apiHandler: t }), this.kycSettings = qe({ apiHandler: t }), this.lists = de({ apiHandler: t }), this.memberships = Te({ apiHandler: t }), this.orderCancellations = Ie({ apiHandler: t }), this.orderPauses = Se({ apiHandler: t }), this.orderReactivations = Ee({ apiHandler: t }), this.orders = xe({ apiHandler: t }), this.organizationExports = Pe({ apiHandler: t }), this.organizations = Ce({ apiHandler: t }), this.paymentCardsBankNames = De({ apiHandler: t }), this.paymentInstruments = je({ apiHandler: t }), this.paymentMethods = Me({ apiHandler: t }), this.paymentTokens = Oe({ apiHandler: t }), this.payoutRequestAllocations = Fe({
4236
+ }), this.fees = $e({ apiHandler: t }), this.files = pe({ apiHandler: t }), this.gatewayAccounts = he({ apiHandler: t }), this.integrations = ye({ apiHandler: t }), this.invoices = Ae({ apiHandler: t }), this.journalAccounts = be({ apiHandler: t }), this.journalEntries = Re({ apiHandler: t }), this.journalRecords = we({ apiHandler: t }), this.kycDocuments = ke({ apiHandler: t }), this.kycRequests = ve({ apiHandler: t }), this.kycSettings = qe({ apiHandler: t }), this.lists = de({ apiHandler: t }), this.memberships = Te({ apiHandler: t }), this.orderCancellations = Ie({ apiHandler: t }), this.orderPauses = Se({ apiHandler: t }), this.orderReactivations = Ee({ apiHandler: t }), this.orders = xe({ apiHandler: t }), this.organizationExports = Pe({ apiHandler: t }), this.organizations = Ce({ apiHandler: t }), this.paymentCardsBankNames = De({ apiHandler: t }), this.paymentInstruments = je({ apiHandler: t }), this.paymentMethods = Me({ apiHandler: t }), this.paymentTokens = Oe({ apiHandler: t }), this.payoutRequestAllocations = Fe({
4235
4237
  apiHandler: t
4236
4238
  }), this.payoutRequestBatches = Be({ apiHandler: t }), this.payoutRequests = Ke({ apiHandler: t }), this.payouts = Ne({ apiHandler: t }), this.plans = Le({ apiHandler: t }), this.previews = ze({ apiHandler: t }), this.products = Ue({ apiHandler: t }), this.profile = Ve({ apiHandler: t }), this.purchase = Je({ apiHandler: t }), this.quotes = We({ apiHandler: t }), this.resource = Ge({ apiHandler: t }), this.riskScoreRules = Ye({ apiHandler: t }), this.roles = Qe({ apiHandler: t }), this.search = Xe({ apiHandler: t }), this.segments = Ze({ apiHandler: t }), this.sendThroughAttribution = _e({ apiHandler: t }), this.serviceCredentials = He({ apiHandler: t }), this.shippingRates = ts({ apiHandler: t }), this.status = es({ apiHandler: t }), this.subscriptionCancellations = ss({
4237
4239
  apiHandler: t
@@ -4811,7 +4813,7 @@ function As({ apiHandler: e }) {
4811
4813
  }
4812
4814
  };
4813
4815
  }
4814
- function Rs({ apiHandler: e }) {
4816
+ function bs({ apiHandler: e }) {
4815
4817
  return {
4816
4818
  /**
4817
4819
  * @returns { rebilly.GetSubscriptionSummaryMetricReportResponsePromise } response
@@ -4821,7 +4823,7 @@ function Rs({ apiHandler: e }) {
4821
4823
  }
4822
4824
  };
4823
4825
  }
4824
- function bs({ apiHandler: e }) {
4826
+ function Rs({ apiHandler: e }) {
4825
4827
  return {
4826
4828
  getActivityFeed({ eventTypes: t = null, limit: s = 1e3, offset: r = 0 }) {
4827
4829
  const n = {
@@ -4861,8 +4863,8 @@ const w = {
4861
4863
  DataExportsResource: hs,
4862
4864
  HistogramsResource: ys,
4863
4865
  ReportsResource: As,
4864
- SubscriptionsResource: Rs,
4865
- TimelinesResource: bs,
4866
+ SubscriptionsResource: bs,
4867
+ TimelinesResource: Rs,
4866
4868
  LocationResource: ws
4867
4869
  };
4868
4870
  class ks {
@@ -1,9 +1,9 @@
1
- (function(h,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],y):(h=typeof globalThis<"u"?globalThis:h||self,y(h["rebilly-js-sdk"]={},h.axios))})(this,(function(h,y){"use strict";var sr=Object.defineProperty;var rr=(h,y,b)=>y in h?sr(h,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[y]=b;var K=(h,y,b)=>rr(h,typeof y!="symbol"?y+"":y,b);function b(t,{exclude:e=[]}={}){Object.freeze(t);const s=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(r=>{(!s||r!=="caller"&&r!=="callee"&&r!=="arguments")&&t[r]!==null&&!e.includes(r)&&(typeof t[r]=="object"||typeof t[r]=="function")&&!Object.isFrozen(t[r])&&b(t[r],{exclude:e})}),t}class N{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.fields={...e},this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const L={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class ne{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(L).forEach(o=>{const l=n[L[o]];this[o]=l?Number(l):null}),this.response={status:s,statusText:r,headers:n},this.items=e.map(o=>new N({data:o,status:s,statusText:r,headers:n})),this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class ue{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.data=e,this.config=u}}class w extends Error{constructor({error:e,name:s=null}){let{config:r=null,response:n=null,request:u=null,message:o=null}=e||{},l=o||"Request Error";n&&n.data&&(n.data.error?l=n.data.error:n.data.detail?l=n.data.detail:n.data.title&&(l=n.data.title)),super(l),this.name=s||"RebillyError",this.response=n,this.request=u,this.config=r,this.status=n&&n.status?n.status:null,this.statusText=n&&n.statusText?n.statusText:null,this.details=n&&n.data&&n.data.details?n.data.details:null,this.invalidFields=n&&n.data&&n.data.invalidFields?n.data.invalidFields:null}}class oe extends w{constructor(e){super({error:e,name:"RebillyRequestError"})}}class le extends w{constructor(e){super({error:e,name:"RebillyValidationError"})}}class ce extends w{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ie extends w{constructor(e){super({error:e,name:"RebillyConflictError"})}}class ge extends w{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ae extends w{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class me extends w{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class fe extends w{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const R={RebillyError:w,RebillyRequestError:oe,RebillyValidationError:le,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ge,RebillyMethodNotAllowedError:ae,RebillyTimeoutError:me,RebillyCanceledError:fe};function $e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var x,z;function U(){if(z)return x;z=1;var t=Object.prototype.toString;x=function($){if($===void 0)return"undefined";if($===null)return"null";var A=typeof $;if(A==="boolean")return"boolean";if(A==="string")return"string";if(A==="number")return"number";if(A==="symbol")return"symbol";if(A==="function")return o($)?"generatorfunction":"function";if(s($))return"array";if(f($))return"buffer";if(i($))return"arguments";if(n($))return"date";if(r($))return"error";if(u($))return"regexp";switch(e($)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(l($))return"generator";switch(A=t.call($),A){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return A.slice(8,-1).toLowerCase().replace(/\s/g,"")};function e(a){return typeof a.constructor=="function"?a.constructor.name:null}function s(a){return Array.isArray?Array.isArray(a):a instanceof Array}function r(a){return a instanceof Error||typeof a.message=="string"&&a.constructor&&typeof a.constructor.stackTraceLimit=="number"}function n(a){return a instanceof Date?!0:typeof a.toDateString=="function"&&typeof a.getDate=="function"&&typeof a.setDate=="function"}function u(a){return a instanceof RegExp?!0:typeof a.flags=="string"&&typeof a.ignoreCase=="boolean"&&typeof a.multiline=="boolean"&&typeof a.global=="boolean"}function o(a,$){return e(a)==="GeneratorFunction"}function l(a){return typeof a.throw=="function"&&typeof a.return=="function"&&typeof a.next=="function"}function i(a){try{if(typeof a.length=="number"&&typeof a.callee=="function")return!0}catch($){if($.message.indexOf("callee")!==-1)return!0}return!1}function f(a){return a.constructor&&typeof a.constructor.isBuffer=="function"?a.constructor.isBuffer(a):!1}return x}/*!
1
+ (function(h,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],y):(h=typeof globalThis<"u"?globalThis:h||self,y(h["rebilly-js-sdk"]={},h.axios))})(this,(function(h,y){"use strict";var sr=Object.defineProperty;var rr=(h,y,b)=>y in h?sr(h,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[y]=b;var K=(h,y,b)=>rr(h,typeof y!="symbol"?y+"":y,b);function b(t,{exclude:e=[]}={}){Object.freeze(t);const s=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(r=>{(!s||r!=="caller"&&r!=="callee"&&r!=="arguments")&&t[r]!==null&&!e.includes(r)&&(typeof t[r]=="object"||typeof t[r]=="function")&&!Object.isFrozen(t[r])&&b(t[r],{exclude:e})}),t}class N{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.fields={...e},this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const L={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class ne{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(L).forEach(o=>{const l=n[L[o]];this[o]=l?Number(l):null}),this.response={status:s,statusText:r,headers:n},this.items=e.map(o=>new N({data:o,status:s,statusText:r,headers:n})),this.config=u,b(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class ue{constructor({data:e,status:s,statusText:r,headers:n},u={}){this.response={status:s,statusText:r,headers:n},this.data=e,this.config=u}}class w extends Error{constructor({error:e,name:s=null}){let{config:r=null,response:n=null,request:u=null,message:o=null}=e||{},l=o||"Request Error";n&&n.data&&(n.data.error?l=n.data.error:n.data.detail?l=n.data.detail:n.data.title&&(l=n.data.title)),super(l),this.name=s||"RebillyError",this.response=n,this.request=u,this.config=r,this.status=n&&n.status?n.status:null,this.statusText=n&&n.statusText?n.statusText:null,this.details=n&&n.data&&n.data.details?n.data.details:null,this.invalidFields=n&&n.data&&n.data.invalidFields?n.data.invalidFields:null}}class oe extends w{constructor(e){super({error:e,name:"RebillyRequestError"})}}class le extends w{constructor(e){super({error:e,name:"RebillyValidationError"})}}class ce extends w{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ie extends w{constructor(e){super({error:e,name:"RebillyConflictError"})}}class ae extends w{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ge extends w{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class me extends w{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class fe extends w{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const R={RebillyError:w,RebillyRequestError:oe,RebillyValidationError:le,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ae,RebillyMethodNotAllowedError:ge,RebillyTimeoutError:me,RebillyCanceledError:fe};function $e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var x,z;function U(){if(z)return x;z=1;var t=Object.prototype.toString;x=function($){if($===void 0)return"undefined";if($===null)return"null";var A=typeof $;if(A==="boolean")return"boolean";if(A==="string")return"string";if(A==="number")return"number";if(A==="symbol")return"symbol";if(A==="function")return o($)?"generatorfunction":"function";if(s($))return"array";if(f($))return"buffer";if(i($))return"arguments";if(n($))return"date";if(r($))return"error";if(u($))return"regexp";switch(e($)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(l($))return"generator";switch(A=t.call($),A){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return A.slice(8,-1).toLowerCase().replace(/\s/g,"")};function e(g){return typeof g.constructor=="function"?g.constructor.name:null}function s(g){return Array.isArray?Array.isArray(g):g instanceof Array}function r(g){return g instanceof Error||typeof g.message=="string"&&g.constructor&&typeof g.constructor.stackTraceLimit=="number"}function n(g){return g instanceof Date?!0:typeof g.toDateString=="function"&&typeof g.getDate=="function"&&typeof g.setDate=="function"}function u(g){return g instanceof RegExp?!0:typeof g.flags=="string"&&typeof g.ignoreCase=="boolean"&&typeof g.multiline=="boolean"&&typeof g.global=="boolean"}function o(g,$){return e(g)==="GeneratorFunction"}function l(g){return typeof g.throw=="function"&&typeof g.return=="function"&&typeof g.next=="function"}function i(g){try{if(typeof g.length=="number"&&typeof g.callee=="function")return!0}catch($){if($.message.indexOf("callee")!==-1)return!0}return!1}function f(g){return g.constructor&&typeof g.constructor.isBuffer=="function"?g.constructor.isBuffer(g):!1}return x}/*!
2
2
  * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
3
3
  *
4
4
  * Copyright (c) 2015-present, Jon Schlinkert.
5
5
  * Released under the MIT License.
6
- */var C,V;function he(){if(V)return C;V=1;const t=Symbol.prototype.valueOf,e=U();function s(i,f){switch(e(i)){case"array":return i.slice();case"object":return Object.assign({},i);case"date":return new i.constructor(Number(i));case"map":return new Map(i);case"set":return new Set(i);case"buffer":return o(i);case"symbol":return l(i);case"arraybuffer":return n(i);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return u(i);case"regexp":return r(i);case"error":return Object.create(i);default:return i}}function r(i){const f=i.flags!==void 0?i.flags:/\w+$/.exec(i)||void 0,a=new i.constructor(i.source,f);return a.lastIndex=i.lastIndex,a}function n(i){const f=new i.constructor(i.byteLength);return new Uint8Array(f).set(new Uint8Array(i)),f}function u(i,f){return new i.constructor(i.buffer,i.byteOffset,i.length)}function o(i){const f=i.length,a=Buffer.allocUnsafe?Buffer.allocUnsafe(f):Buffer.from(f);return i.copy(a),a}function l(i){return t?Object(t.call(i)):{}}return C=s,C}/*!
6
+ */var C,V;function he(){if(V)return C;V=1;const t=Symbol.prototype.valueOf,e=U();function s(i,f){switch(e(i)){case"array":return i.slice();case"object":return Object.assign({},i);case"date":return new i.constructor(Number(i));case"map":return new Map(i);case"set":return new Set(i);case"buffer":return o(i);case"symbol":return l(i);case"arraybuffer":return n(i);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return u(i);case"regexp":return r(i);case"error":return Object.create(i);default:return i}}function r(i){const f=i.flags!==void 0?i.flags:/\w+$/.exec(i)||void 0,g=new i.constructor(i.source,f);return g.lastIndex=i.lastIndex,g}function n(i){const f=new i.constructor(i.byteLength);return new Uint8Array(f).set(new Uint8Array(i)),f}function u(i,f){return new i.constructor(i.buffer,i.byteOffset,i.length)}function o(i){const f=i.length,g=Buffer.allocUnsafe?Buffer.allocUnsafe(f):Buffer.from(f);return i.copy(g),g}function l(i){return t?Object(t.call(i)):{}}return C=s,C}/*!
7
7
  * isobject <https://github.com/jonschlinkert/isobject>
8
8
  *
9
9
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * Copyright (c) 2014-2017, Jon Schlinkert.
15
15
  * Released under the MIT License.
16
- */var 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 g={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(m=>m).join("/")}@386de5e`};return t.apiKey&&(g["REB-APIKEY"]=t.apiKey),g}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 g=l();t.apiKey=null,t.jwt=c,delete g.common["REB-APIKEY"],g.common.Authorization=`Bearer ${c}`,e.defaults.headers=g}function a(c=t.publishableKey){const g=l();t.publishableKey=c,g.common.Authorization=`${c}`,e.defaults.headers=g}function $({host:c,port:g,auth:m}){e.defaults.proxy={host:c,port:g,auth:m}}function A({live:c=null,sandbox:g=null}){c&&(t.apiEndpoints.live=c),g&&(t.apiEndpoints.sandbox=g),e.defaults.baseURL=u()}function _(c,{thenDelegate:g,catchDelegate:m=()=>{}}){return Y(c)&&e.interceptors[v[c]].use(g,m)}function X(c,g){return Y(c)&&e.interceptors[v[c]].eject(g)}function Us({thenDelegate:c,catchDelegate:g=()=>{}}){return _(v.request,{thenDelegate:c,catchDelegate:g})}function Vs(c){X(v.request,c)}function Js({thenDelegate:c,catchDelegate:g=()=>{}}){return _(v.response,{thenDelegate:c,catchDelegate:g})}function Ws(c){X(v.response,c)}function T({request:c,isCollection:g,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:g,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:g,config:m}){return g?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(g=>c.params[g]!==null&&c.params[g]!=="").reduce((g,m)=>(g[m]=c.params[m],g),{})),c}function H(c={}){return{...Ys(c)}}function ee(c,g={}){return T({request:m=>e.get(c,m),config:{params:g}})}function Qs(c,g){return T({request:m=>e.get(c,m),config:{params:g},isCollection:!0})}function te(c,g,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,g,k),config:p})}function se(c,g,m={}){return T({request:p=>e.put(c,g,p),config:{params:m}})}function _s(c,g){return T({request:m=>e.patch(c,g,m),config:{}})}function Xs(c){return T({request:g=>e.delete(c,g),config:{}})}function Zs(c,g){return T({request:m=>e.delete(c,m),config:{data:{...g}}})}async function Hs(c,g,m,p={}){if(g==="")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,g){const m=H(g);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:a,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}={}){const o={limit:e,offset:s,sort:r,filter:n,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Pe({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function 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(a=>this.detach({id:a.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 gt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:e,offset:s,filter:r,sort:n,expand:u};return t.getAll("journal-records",o)},create({id:e="",data:s}){return t.create(`journal-records/${e}`,e,s)},get({id:e}){return t.get(`journal-records/${e}`)},update({id:e,data:s}){return t.put(`journal-records/${e}`,s)},delete({id:e}){return t.delete(`journal-records/${e}`)}}}function 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("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=gt({apiHandler:e}),this.kycDocuments=at({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 a={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:i,criteria:f};return t.get("reports/retention-percentage",a)},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:a=null,criteria:$=null}){const A={aggregationField:e,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:i,filter:f,sort:a,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 gs({apiHandler:t}){return{query(){return t.get("location")}}}const q={CustomersResource:ns,DataExportsResource:us,HistogramsResource:os,ReportsResource:ls,SubscriptionsResource:cs,TimelinesResource:is,LocationResource:gs};class as{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 as({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("/")}@b2250e6`};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.126.0",
3
+ "version": "62.128.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",
@@ -15,15 +15,17 @@ export default function AmlChecksResource({apiHandler}) {
15
15
  sort = null,
16
16
  filter = null,
17
17
  q = null,
18
+ expand = null,
18
19
  } = {}) {
19
- const params = {limit, offset, sort, filter, q};
20
+ const params = {limit, offset, sort, filter, q, expand};
20
21
  return apiHandler.getAll(`aml-checks`, params);
21
22
  },
22
23
  /**
23
24
  * @returns { rebilly.GetAmlCheckResponsePromise } response
24
25
  */
25
- get({id}) {
26
- return apiHandler.get(`aml-checks/${id}`);
26
+ get({id, expand = null}) {
27
+ const params = {expand};
28
+ return apiHandler.get(`aml-checks/${id}`, params);
27
29
  },
28
30
  startReview({id}) {
29
31
  return apiHandler.post(`aml-checks/${id}/start-review`);