rebilly-js-sdk 62.39.0 → 62.41.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.39.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.38.0...rebilly-js-sdk-v62.39.0) (2026-01-08)
1
+ ## [62.41.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.40.0...rebilly-js-sdk-v62.41.0) (2026-01-12)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * Upgrade ESLint and Prettier ([#17793](https://github.com/Rebilly/rebilly/issues/17793)) ([8883216](https://github.com/Rebilly/rebilly/commit/88832162761efa08569e6dcc03366f727eebd96a))
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#17921](https://github.com/Rebilly/rebilly/issues/17921)) ([f21ce24](https://github.com/Rebilly/rebilly/commit/f21ce24d1f6f8032ebb8f5dabbf9de747802733b))
@@ -1697,6 +1697,11 @@ declare namespace rebilly {
1697
1697
  type PostPayoutRequestAllocationResponse = operations['PostPayoutRequestAllocation']['responses']['201']['content']['application/json']
1698
1698
  type PostPayoutRequestAllocationResponsePromise = Promise<{fields: PostPayoutRequestAllocationResponse}>
1699
1699
 
1700
+ type PostPayoutRequestAutoAllocationRequest = operations['PostPayoutRequestAutoAllocation']['requestBody']['content']['application/json']
1701
+ type CreatePayoutRequestAutoAllocationRequest = { id?: string, data: PostPayoutRequestAutoAllocationRequest, expand?: string }
1702
+ type PostPayoutRequestAutoAllocationResponse = operations['PostPayoutRequestAutoAllocation']['responses']['204']
1703
+ type PostPayoutRequestAutoAllocationResponsePromise = Promise<{fields: PostPayoutRequestAutoAllocationResponse}>
1704
+
1700
1705
  type PatchPayoutRequestAllocationRequest = operations['PatchPayoutRequestAllocation']['requestBody']['content']['application/json']
1701
1706
  type PatchPayoutRequestAllocationResponse = operations['PatchPayoutRequestAllocation']['responses']['200']['content']['application/json']
1702
1707
  type PatchPayoutRequestAllocationResponsePromise = Promise<{fields: PatchPayoutRequestAllocationResponse}>
@@ -2273,6 +2278,11 @@ declare namespace rebilly {
2273
2278
  type DeleteDataExportResponse = operations['DeleteDataExport']['responses']['204']
2274
2279
  type DeleteDataExportResponsePromise = Promise<{fields: DeleteDataExportResponse}>
2275
2280
 
2281
+ type GetHistogramAmlCheckReportRequest = operations['GetHistogramAmlCheckReport']['parameters']
2282
+
2283
+ type GetHistogramAmlCheckReportResponse = operations['GetHistogramAmlCheckReport']['responses']['200']['content']['application/json']
2284
+ type GetHistogramAmlCheckReportResponsePromise = Promise<{fields: GetHistogramAmlCheckReportResponse}>
2285
+
2276
2286
  type GetHistogramTransactionReportRequest = operations['GetHistogramTransactionReport']['parameters']
2277
2287
 
2278
2288
  type GetHistogramTransactionReportResponse = operations['GetHistogramTransactionReport']['responses']['200']['content']['application/json']
@@ -5299,6 +5309,17 @@ export interface corePaths {
5299
5309
  */
5300
5310
  post: operations["PostPayoutRequestAllocation"];
5301
5311
  };
5312
+ "/payout-request-allocations/auto": {
5313
+ /**
5314
+ * Creates an automatic payout request allocation using system-selected parameters.
5315
+ * Only the payout request ID is required; all allocation details are determined automatically.
5316
+ *
5317
+ * When an allocation is created, the payout request transitions to the `in-progress` status,
5318
+ * and the allocation starts in the `pending` status.
5319
+ * The allocation transitions to the `processing` status when payment processing begins.
5320
+ */
5321
+ post: operations["PostPayoutRequestAutoAllocation"];
5322
+ };
5302
5323
  "/payout-request-allocations/{id}": {
5303
5324
  /**
5304
5325
  * Updates the status of a payout request allocation with a specified ID.
@@ -40200,6 +40221,35 @@ export interface operations {
40200
40221
  };
40201
40222
  };
40202
40223
  };
40224
+ /**
40225
+ * Creates an automatic payout request allocation using system-selected parameters.
40226
+ * Only the payout request ID is required; all allocation details are determined automatically.
40227
+ *
40228
+ * When an allocation is created, the payout request transitions to the `in-progress` status,
40229
+ * and the allocation starts in the `pending` status.
40230
+ * The allocation transitions to the `processing` status when payment processing begins.
40231
+ */
40232
+ PostPayoutRequestAutoAllocation: {
40233
+ responses: {
40234
+ /** Payout request auto-allocation completed. */
40235
+ 204: never;
40236
+ 401: coreComponents["responses"]["Unauthorized"];
40237
+ 403: coreComponents["responses"]["Forbidden"];
40238
+ 404: coreComponents["responses"]["NotFound"];
40239
+ 409: coreComponents["responses"]["Conflict"];
40240
+ 422: coreComponents["responses"]["ValidationError"];
40241
+ 429: coreComponents["responses"]["TooManyRequests"];
40242
+ };
40243
+ /** Payout request allocation resource. */
40244
+ requestBody: {
40245
+ content: {
40246
+ "application/json": {
40247
+ /** ID of the payout request to allocate. */
40248
+ payoutRequestId: string;
40249
+ };
40250
+ };
40251
+ };
40252
+ };
40203
40253
  /**
40204
40254
  * Updates the status of a payout request allocation with a specified ID.
40205
40255
  *
@@ -66765,6 +66815,10 @@ export interface reportsPaths {
66765
66815
  };
66766
66816
  };
66767
66817
  };
66818
+ "/histograms/aml-checks": {
66819
+ /** Retrieves AML check histogram report data. */
66820
+ get: operations["GetHistogramAmlCheckReport"];
66821
+ };
66768
66822
  "/histograms/transactions": {
66769
66823
  /** Retrieves transaction histogram report data. */
66770
66824
  get: operations["GetHistogramTransactionReport"];
@@ -89799,6 +89853,51 @@ export interface operations {
89799
89853
  429: reportsComponents["responses"]["TooManyRequests"];
89800
89854
  };
89801
89855
  };
89856
+ /** Retrieves AML check histogram report data. */
89857
+ GetHistogramAmlCheckReport: {
89858
+ parameters: {
89859
+ query: {
89860
+ /**
89861
+ * Date and time when the report starts.
89862
+ * The default value depends on the aggregation period:
89863
+ * - 24 hours ago for `minute` aggregation.
89864
+ * - First day of the current month for other aggregation periods.
89865
+ */
89866
+ periodStart?: string;
89867
+ /**
89868
+ * Date and time when the report ends.
89869
+ * The default value depends on the aggregation period:
89870
+ * - Current time for `minute` aggregation.
89871
+ * - Last day of the current month for other aggregation periods.
89872
+ */
89873
+ periodEnd?: string;
89874
+ /** Aggregation period of the report. */
89875
+ aggregationPeriod?: "minute" | "hour" | "day" | "month";
89876
+ /** Metric on which the report is based. */
89877
+ metric?: "aml_checks" | "aml_check_hits";
89878
+ /** Specifies if propagated AML checks are included. */
89879
+ includePropagatedResults?: boolean;
89880
+ /**
89881
+ * Criteria for filtering collection items.
89882
+ * This field requires a special format.
89883
+ * Use `,` to specify multiple allowed values.
89884
+ * Use `;` to specify multiple fields.
89885
+ *
89886
+ * For more information, see [Search filters](https://www.rebilly.com/docs/dev-docs/search-filters).
89887
+ */
89888
+ filter?: reportsComponents["parameters"]["collectionFilter"];
89889
+ };
89890
+ };
89891
+ responses: {
89892
+ /** AML check report retrieved. */
89893
+ 200: {
89894
+ content: {
89895
+ "application/json": reportsComponents["schemas"]["HistogramData"];
89896
+ };
89897
+ };
89898
+ 403: reportsComponents["responses"]["Forbidden"];
89899
+ };
89900
+ };
89802
89901
  /** Retrieves transaction histogram report data. */
89803
89902
  GetHistogramTransactionReport: {
89804
89903
  parameters: {
@@ -92587,6 +92686,9 @@ declare module "resources/payout-request-allocations-resource" {
92587
92686
  create({ data }: {
92588
92687
  data: any;
92589
92688
  }): any;
92689
+ autoAllocate({ data }: {
92690
+ data: any;
92691
+ }): any;
92590
92692
  update({ id, data }: {
92591
92693
  id: any;
92592
92694
  data: any;
@@ -94318,6 +94420,9 @@ declare module "resources/api-instance" {
94318
94420
  create({ data }: {
94319
94421
  data: any;
94320
94422
  }): any;
94423
+ autoAllocate({ data }: {
94424
+ data: any;
94425
+ }): any;
94321
94426
  update({ id, data }: {
94322
94427
  id: any;
94323
94428
  data: any;
@@ -94917,6 +95022,14 @@ declare module "resources/experimental/histograms-resource" {
94917
95022
  export default function HistogramsResource({ apiHandler }: {
94918
95023
  apiHandler: any;
94919
95024
  }): {
95025
+ getAmlCheckHistogramReport({ periodStart, periodEnd, aggregationPeriod, metric, includePropagatedResults, filter, }: {
95026
+ periodStart?: any;
95027
+ periodEnd?: any;
95028
+ aggregationPeriod?: any;
95029
+ metric?: any;
95030
+ includePropagatedResults?: any;
95031
+ filter?: any;
95032
+ }): rebilly.GetHistogramAmlCheckReportResponsePromise;
94920
95033
  getTransactionHistogramReport({ periodStart, periodEnd, aggregationPeriod, metric, filter, }: {
94921
95034
  periodStart?: any;
94922
95035
  periodEnd?: any;
@@ -95193,6 +95306,14 @@ declare module "resources/experimental/experimental-resources" {
95193
95306
  }): any;
95194
95307
  };
95195
95308
  histograms: {
95309
+ getAmlCheckHistogramReport({ periodStart, periodEnd, aggregationPeriod, metric, includePropagatedResults, filter, }: {
95310
+ periodStart?: any;
95311
+ periodEnd?: any;
95312
+ aggregationPeriod?: any;
95313
+ metric?: any;
95314
+ includePropagatedResults?: any;
95315
+ filter?: any;
95316
+ }): rebilly.GetHistogramAmlCheckReportResponsePromise;
95196
95317
  getTransactionHistogramReport({ periodStart, periodEnd, aggregationPeriod, metric, filter, }: {
95197
95318
  periodStart?: any;
95198
95319
  periodEnd?: any;
@@ -68,12 +68,12 @@ class p extends Error {
68
68
  r && r.data && r.data.error && (l = r.data.error), super(l), this.name = s || "RebillyError", this.response = r, this.request = u, this.config = n, this.status = r && r.status ? r.status : null, this.statusText = r && r.statusText ? r.statusText : null, this.details = r && r.data && r.data.details ? r.data.details : null, this.invalidFields = r && r.data && r.data.invalidFields ? r.data.invalidFields : null;
69
69
  }
70
70
  }
71
- class $e extends p {
71
+ class fe extends p {
72
72
  constructor(e) {
73
73
  super({ error: e, name: "RebillyRequestError" });
74
74
  }
75
75
  }
76
- class fe extends p {
76
+ class $e extends p {
77
77
  constructor(e) {
78
78
  super({ error: e, name: "RebillyValidationError" });
79
79
  }
@@ -108,10 +108,10 @@ class be extends p {
108
108
  super({ error: e, name: "RebillyCanceledError" });
109
109
  }
110
110
  }
111
- const f = {
111
+ const $ = {
112
112
  RebillyError: p,
113
- RebillyRequestError: $e,
114
- RebillyValidationError: fe,
113
+ RebillyRequestError: fe,
114
+ RebillyValidationError: $e,
115
115
  RebillyNotFoundError: pe,
116
116
  RebillyConflictError: he,
117
117
  RebillyForbiddenError: ye,
@@ -458,7 +458,7 @@ function C({ options: t }) {
458
458
  }
459
459
  function o() {
460
460
  const i = {
461
- "REB-API-CONSUMER": `${["Rebilly", t.appName, "js-sdk"].filter((g) => g).join("/")}@8883216`
461
+ "REB-API-CONSUMER": `${["Rebilly", t.appName, "js-sdk"].filter((g) => g).join("/")}@f21ce24`
462
462
  };
463
463
  return t.apiKey && (i["REB-APIKEY"] = t.apiKey), i;
464
464
  }
@@ -468,7 +468,7 @@ function C({ options: t }) {
468
468
  function a(c) {
469
469
  t.requestTimeout = Number(c), e.defaults.timeout = t.requestTimeout;
470
470
  }
471
- function $(c = t.jwt) {
471
+ function f(c = t.jwt) {
472
472
  const i = l();
473
473
  t.apiKey = null, t.jwt = c, delete i.common["REB-APIKEY"], i.common.Authorization = `Bearer ${c}`, e.defaults.headers = i;
474
474
  }
@@ -543,23 +543,23 @@ function C({ options: t }) {
543
543
  }
544
544
  function F({ error: c }) {
545
545
  if (x.isCancel(c))
546
- throw new f.RebillyCanceledError(c);
546
+ throw new $.RebillyCanceledError(c);
547
547
  if (c.response)
548
548
  switch (Number(c.response.status)) {
549
549
  case 401:
550
- throw new f.RebillyForbiddenError(c);
550
+ throw new $.RebillyForbiddenError(c);
551
551
  case 404:
552
- throw new f.RebillyNotFoundError(c);
552
+ throw new $.RebillyNotFoundError(c);
553
553
  case 405:
554
- throw new f.RebillyMethodNotAllowedError(c);
554
+ throw new $.RebillyMethodNotAllowedError(c);
555
555
  case 409:
556
- throw new f.RebillyConflictError(c);
556
+ throw new $.RebillyConflictError(c);
557
557
  case 422:
558
- throw new f.RebillyValidationError(c);
558
+ throw new $.RebillyValidationError(c);
559
559
  default:
560
- throw new f.RebillyRequestError(c);
560
+ throw new $.RebillyRequestError(c);
561
561
  }
562
- throw c.code === "ECONNABORTED" ? new f.RebillyTimeoutError(c) : new f.RebillyRequestError(c);
562
+ throw c.code === "ECONNABORTED" ? new $.RebillyTimeoutError(c) : new $.RebillyRequestError(c);
563
563
  }
564
564
  function te(c) {
565
565
  return c.params !== void 0 && (c.params = Object.keys(c.params).filter(
@@ -618,7 +618,7 @@ function C({ options: t }) {
618
618
  return B(c, g, { params: m });
619
619
  try {
620
620
  if ((await N(c)).response.status === 200)
621
- throw new f.RebillyConflictError({
621
+ throw new $.RebillyConflictError({
622
622
  message: "A resource already exists with this ID. Please use a different ID."
623
623
  });
624
624
  } catch (h) {
@@ -644,7 +644,7 @@ function C({ options: t }) {
644
644
  removeResponseInterceptor: H,
645
645
  setTimeout: a,
646
646
  setProxyAgent: I,
647
- setSessionToken: $,
647
+ setSessionToken: f,
648
648
  setPublishableKey: y,
649
649
  setEndpoints: S,
650
650
  get: N,
@@ -1165,7 +1165,7 @@ function mt({ apiHandler: t }) {
1165
1165
  }
1166
1166
  };
1167
1167
  }
1168
- function $t({ apiHandler: t }) {
1168
+ function ft({ apiHandler: t }) {
1169
1169
  return {
1170
1170
  /**
1171
1171
  * @param { rebilly.GetCustomDomainCollectionRequest } request
@@ -1195,7 +1195,7 @@ function $t({ apiHandler: t }) {
1195
1195
  }
1196
1196
  };
1197
1197
  }
1198
- function ft({ apiHandler: t }) {
1198
+ function $t({ apiHandler: t }) {
1199
1199
  return {
1200
1200
  /**
1201
1201
  * @returns { rebilly.GetCustomFieldCollectionResponsePromise } response
@@ -1994,8 +1994,8 @@ function Et({ apiHandler: t }) {
1994
1994
  (y) => this.detach({ id: y.fields.id })
1995
1995
  );
1996
1996
  n = [...n, a], await Promise.all(a);
1997
- const $ = t.delete(`files/${e}`);
1998
- return n.push($), $;
1997
+ const f = t.delete(`files/${e}`);
1998
+ return n.push(f), f;
1999
1999
  })();
2000
2000
  return u.cancel = () => {
2001
2001
  n.forEach((o) => o.cancel());
@@ -2918,6 +2918,9 @@ function Zt({ apiHandler: t }) {
2918
2918
  create({ data: e }) {
2919
2919
  return t.post("payout-request-allocations", e);
2920
2920
  },
2921
+ autoAllocate({ data: e }) {
2922
+ return t.post("payout-request-allocations/auto", e);
2923
+ },
2921
2924
  update({ id: e, data: s }) {
2922
2925
  return t.patch(`payout-request-allocations/${e}`, s);
2923
2926
  }
@@ -3402,7 +3405,7 @@ function ms({ apiHandler: t }) {
3402
3405
  }
3403
3406
  };
3404
3407
  }
3405
- function $s({ apiHandler: t }) {
3408
+ function fs({ apiHandler: t }) {
3406
3409
  return {
3407
3410
  /**
3408
3411
  * @param { rebilly.GetServiceCredentialCollectionRequest } request
@@ -3445,15 +3448,15 @@ function $s({ apiHandler: t }) {
3445
3448
  fields: l = null,
3446
3449
  sort: a = null
3447
3450
  }) {
3448
- const $ = { limit: n, offset: r, filter: u, q: o, fields: l, sort: a };
3451
+ const f = { limit: n, offset: r, filter: u, q: o, fields: l, sort: a };
3449
3452
  return t.getAll(
3450
3453
  `service-credentials/${e}/${s}/items`,
3451
- $
3454
+ f
3452
3455
  );
3453
3456
  }
3454
3457
  };
3455
3458
  }
3456
- function fs({ apiHandler: t }) {
3459
+ function $s({ apiHandler: t }) {
3457
3460
  return {
3458
3461
  /**
3459
3462
  * @param { rebilly.GetShippingRateCollectionRequest } request
@@ -4110,13 +4113,13 @@ function Is({ apiHandler: t }) {
4110
4113
  }
4111
4114
  class Ss {
4112
4115
  constructor({ apiHandler: e }) {
4113
- this.account = _e({ apiHandler: e }), this.allowlists = He({ apiHandler: e }), this.amlChecks = et({ apiHandler: e }), this.amlSettings = tt({ apiHandler: e }), this.apiKeys = st({ apiHandler: e }), this.applicationInstances = nt({ apiHandler: e }), this.applications = rt({ apiHandler: e }), this.balanceTransactions = ut({ apiHandler: e }), this.billingPortals = ot({ apiHandler: e }), this.blocklists = lt({ apiHandler: e }), this.broadcastMessages = ct({ apiHandler: e }), this.cashiers = it({ apiHandler: e }), this.checkoutForms = gt({ apiHandler: e }), this.coupons = at({ apiHandler: e }), this.creditMemos = mt({ apiHandler: e }), this.customDomains = $t({ apiHandler: e }), this.customFields = ft({ apiHandler: e }), this.customerAuthentication = pt({ apiHandler: e }), this.customers = ht({ apiHandler: e }), this.depositCustomPropertySets = yt({
4116
+ this.account = _e({ apiHandler: e }), this.allowlists = He({ apiHandler: e }), this.amlChecks = et({ apiHandler: e }), this.amlSettings = tt({ apiHandler: e }), this.apiKeys = st({ apiHandler: e }), this.applicationInstances = nt({ apiHandler: e }), this.applications = rt({ apiHandler: e }), this.balanceTransactions = ut({ apiHandler: e }), this.billingPortals = ot({ apiHandler: e }), this.blocklists = lt({ apiHandler: e }), this.broadcastMessages = ct({ apiHandler: e }), this.cashiers = it({ apiHandler: e }), this.checkoutForms = gt({ apiHandler: e }), this.coupons = at({ apiHandler: e }), this.creditMemos = mt({ apiHandler: e }), this.customDomains = ft({ apiHandler: e }), this.customFields = $t({ apiHandler: e }), this.customerAuthentication = pt({ apiHandler: e }), this.customers = ht({ apiHandler: e }), this.depositCustomPropertySets = yt({
4114
4117
  apiHandler: e
4115
4118
  }), this.depositRequests = At({ apiHandler: e }), this.depositStrategies = Rt({ apiHandler: e }), this.digitalWallets = bt({ apiHandler: e }), this.disputes = wt({ apiHandler: e }), this.emailDeliverySettings = kt({ apiHandler: e }), this.emailMessages = vt({ apiHandler: e }), this.emailNotifications = Tt({ apiHandler: e }), this.events = dt({ apiHandler: e }), this.externalIdentifiers = qt({ apiHandler: e }), this.externalServicesSettings = It({
4116
4119
  apiHandler: e
4117
4120
  }), this.fees = St({ apiHandler: e }), this.files = Et({ apiHandler: e }), this.gatewayAccounts = xt({ apiHandler: e }), this.integrations = Pt({ apiHandler: e }), this.invoices = Ct({ apiHandler: e }), this.journalAccounts = jt({ apiHandler: e }), this.journalEntries = Dt({ apiHandler: e }), this.journalRecords = Mt({ apiHandler: e }), this.kycDocuments = Ot({ apiHandler: e }), this.kycRequests = Ft({ apiHandler: e }), this.kycSettings = Kt({ apiHandler: e }), this.lists = Nt({ apiHandler: e }), this.memberships = Bt({ apiHandler: e }), this.orderCancellations = Lt({ apiHandler: e }), this.orderPauses = zt({ apiHandler: e }), this.orderReactivations = Ut({ apiHandler: e }), this.orders = Vt({ apiHandler: e }), this.organizationExports = Jt({ apiHandler: e }), this.organizations = Wt({ apiHandler: e }), this.paymentCardsBankNames = Gt({ apiHandler: e }), this.paymentInstruments = Yt({ apiHandler: e }), this.paymentMethods = Qt({ apiHandler: e }), this.paymentTokens = Xt({ apiHandler: e }), this.payoutRequestAllocations = Zt({
4118
4121
  apiHandler: e
4119
- }), this.payoutRequests = _t({ apiHandler: e }), this.payoutRequestsV2 = Ht({ apiHandler: e }), this.payouts = es({ apiHandler: e }), this.plans = ts({ apiHandler: e }), this.previews = ss({ apiHandler: e }), this.products = ns({ apiHandler: e }), this.profile = rs({ apiHandler: e }), this.purchase = us({ apiHandler: e }), this.quotes = os({ apiHandler: e }), this.resource = ls({ apiHandler: e }), this.riskScoreRules = cs({ apiHandler: e }), this.roles = is({ apiHandler: e }), this.search = gs({ apiHandler: e }), this.segments = as({ apiHandler: e }), this.sendThroughAttribution = ms({ apiHandler: e }), this.serviceCredentials = $s({ apiHandler: e }), this.shippingRates = fs({ apiHandler: e }), this.status = ps({ apiHandler: e }), this.subscriptionCancellations = hs({
4122
+ }), this.payoutRequests = _t({ apiHandler: e }), this.payoutRequestsV2 = Ht({ apiHandler: e }), this.payouts = es({ apiHandler: e }), this.plans = ts({ apiHandler: e }), this.previews = ss({ apiHandler: e }), this.products = ns({ apiHandler: e }), this.profile = rs({ apiHandler: e }), this.purchase = us({ apiHandler: e }), this.quotes = os({ apiHandler: e }), this.resource = ls({ apiHandler: e }), this.riskScoreRules = cs({ apiHandler: e }), this.roles = is({ apiHandler: e }), this.search = gs({ apiHandler: e }), this.segments = as({ apiHandler: e }), this.sendThroughAttribution = ms({ apiHandler: e }), this.serviceCredentials = fs({ apiHandler: e }), this.shippingRates = $s({ apiHandler: e }), this.status = ps({ apiHandler: e }), this.subscriptionCancellations = hs({
4120
4123
  apiHandler: e
4121
4124
  }), this.subscriptionPauses = ys({ apiHandler: e }), this.subscriptionReactivations = As({
4122
4125
  apiHandler: e
@@ -4180,6 +4183,27 @@ function xs({ apiHandler: t }) {
4180
4183
  }
4181
4184
  function Ps({ apiHandler: t }) {
4182
4185
  return {
4186
+ /**
4187
+ * @returns { rebilly.GetHistogramAmlCheckReportResponsePromise } response
4188
+ */
4189
+ getAmlCheckHistogramReport({
4190
+ periodStart: e = null,
4191
+ periodEnd: s = null,
4192
+ aggregationPeriod: n = null,
4193
+ metric: r = null,
4194
+ includePropagatedResults: u = null,
4195
+ filter: o = null
4196
+ }) {
4197
+ const l = {
4198
+ periodStart: e,
4199
+ periodEnd: s,
4200
+ aggregationPeriod: n,
4201
+ metric: r,
4202
+ includePropagatedResults: u,
4203
+ filter: o
4204
+ };
4205
+ return t.get("histograms/aml-checks", l);
4206
+ },
4183
4207
  /**
4184
4208
  * @returns { rebilly.GetHistogramTransactionReportResponsePromise } response
4185
4209
  */
@@ -4370,7 +4394,7 @@ function Cs({ apiHandler: t }) {
4370
4394
  offset: l = null,
4371
4395
  filter: a = null
4372
4396
  }) {
4373
- const $ = {
4397
+ const f = {
4374
4398
  currency: e,
4375
4399
  bookedFrom: s,
4376
4400
  bookedTo: n,
@@ -4380,7 +4404,7 @@ function Cs({ apiHandler: t }) {
4380
4404
  offset: l,
4381
4405
  filter: a
4382
4406
  };
4383
- return t.get("reports/journal", $);
4407
+ return t.get("reports/journal", f);
4384
4408
  },
4385
4409
  /**
4386
4410
  * @returns { rebilly.GetJournalSummaryReportResponsePromise } response
@@ -4474,7 +4498,7 @@ function Cs({ apiHandler: t }) {
4474
4498
  limit: o = null,
4475
4499
  offset: l = null,
4476
4500
  filter: a = null,
4477
- criteria: $ = null
4501
+ criteria: f = null
4478
4502
  }) {
4479
4503
  const y = {
4480
4504
  aggregationField: e,
@@ -4485,7 +4509,7 @@ function Cs({ apiHandler: t }) {
4485
4509
  limit: o,
4486
4510
  offset: l,
4487
4511
  filter: a,
4488
- criteria: $
4512
+ criteria: f
4489
4513
  };
4490
4514
  return t.get("reports/retention-percentage", y);
4491
4515
  },
@@ -4501,7 +4525,7 @@ function Cs({ apiHandler: t }) {
4501
4525
  periodEnd: o = null,
4502
4526
  limit: l = null,
4503
4527
  offset: a = null,
4504
- filter: $ = null,
4528
+ filter: f = null,
4505
4529
  sort: y = null,
4506
4530
  criteria: I = null
4507
4531
  }) {
@@ -4514,7 +4538,7 @@ function Cs({ apiHandler: t }) {
4514
4538
  periodEnd: o,
4515
4539
  limit: l,
4516
4540
  offset: a,
4517
- filter: $,
4541
+ filter: f,
4518
4542
  sort: y,
4519
4543
  criteria: I
4520
4544
  };
@@ -5287,7 +5311,7 @@ function Rn({
5287
5311
  }
5288
5312
  export {
5289
5313
  yn as RebillyAPI,
5290
- f as RebillyErrors,
5314
+ $ as RebillyErrors,
5291
5315
  An as RebillyExperimentalAPI,
5292
5316
  Rn as RebillyStorefrontAPI,
5293
5317
  hn as cancellation,
@@ -13,4 +13,4 @@
13
13
  *
14
14
  * Copyright (c) 2014-2017, Jon Schlinkert.
15
15
  * Released under the MIT License.
16
- */var Ie=qe;function L(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Se=function(e){var s,n;return!(L(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,L(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const Ee=Te,xe=K,Pe=Se;function E(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return Ee(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=E(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=E(t[n],e);return s}var De=E;const Me=ce(De);let Oe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fe=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Oe[Math.random()*64|0];return e};class Ke{constructor({id:e=null,created:s=null}={}){this.id=e||Fe(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Ne=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.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 Ke;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const d=new Ne;class q{}M(q,"cancelById",(e,s)=>{try{d.getById(e).cancel(s),d.deleteById(e)}catch{}}),M(q,"cancelAll",async e=>{for(const s of d.getAll())await s.cancel(e),d.deleteById(s.id)});const Be={cancelAll:async(...t)=>await q.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){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 i={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(g=>g).join("/")}@8883216`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function h(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function nn({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function rn(c){J(b.request,c)}function un({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function on(c){J(b.response,c)}function v({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:pn}=d.save();f.cancelToken=pn;const X=async function(){try{const T=await c(f);return ln({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{d.deleteById(R)}}();return X.cancel=T=>q.cancelById(R,T),X}function ln({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new p.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new p.RebillyForbiddenError(c);case 404:throw new p.RebillyNotFoundError(c);case 405:throw new p.RebillyMethodNotAllowedError(c);case 409:throw new p.RebillyConflictError(c);case 422:throw new p.RebillyValidationError(c);default:throw new p.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new p.RebillyTimeoutError(c):new p.RebillyRequestError(c)}function cn(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...cn(c)}}function Y(c,i={}){return v({request:g=>e.get(c,g),config:{params:i}})}function gn(c,i){return v({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),v({request:R=>e.post(c,i,R),config:f})}function _(c,i,g={}){return v({request:f=>e.put(c,i,f),config:{params:g}})}function an(c,i){return v({request:g=>e.patch(c,i,g),config:{}})}function mn(c){return v({request:i=>e.delete(c,i),config:{}})}function fn(c,i){return v({request:g=>e.delete(c,g),config:{data:{...i}}})}async function $n(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new p.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function hn(c,i){const g=G(i);try{const f=await e.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:n,addRequestInterceptor:nn,removeRequestInterceptor:rn,addResponseInterceptor:un,removeResponseInterceptor:on,setTimeout:a,setProxyAgent:j,setSessionToken:h,setPublishableKey:k,setEndpoints:D,get:Y,getAll:gn,post:Q,put:_,patch:an,delete:mn,deleteAll:fn,create:$n,download:hn}}function Le({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};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 We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 et({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function tt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 nt({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function rt({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 n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},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 n={limit:e,offset:s};return t.getAll("credentials",n)},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 n={limit:e,offset:s};return t.getAll("password-tokens",n)},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 ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 it({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 gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function at({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,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 ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function ht({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function pt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 At({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,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 n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const h=t.delete(`files/${e}`);return n.push(h),h})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,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:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},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:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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 n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};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:n}){return t.put(`invoices/${e}/items/${s}`,n)},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:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function kt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 vt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 It({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,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 Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 Pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("orders",o)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`orders/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`orders/${e}`,s,r)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`orders/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`orders/${e}/items/${s}`,n)},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 Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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 Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 Ot({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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 Kt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Bt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-allocations",e)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)}}}function Lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 zt({apiHandler:t}){return{getV2({id:e}){return t.get(`payout-requests-v2/${e}`)},getPaymentInstrumentsV2({id:e}){return t.get(`payout-requests-v2/${e}/payment-instruments`)}}}function Ut({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Jt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 Gt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Yt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Qt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 n={expand:s};return t.get(`quotes/${e}`,n)},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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function _t({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Xt({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,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 n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Ht({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function es({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 ts({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function ss({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,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:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const h={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,h)}}}function ns({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 rs({apiHandler:t}){return{get(){return t.get("status")}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 is({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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 gs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 as({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 ms({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},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:n=null}){const r={expand:n};return t.post(`transactions/${e}/refund`,s,r)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function fs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 $s({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 hs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},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 ps({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,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 ys{constructor({apiHandler:e}){this.account=Le({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashiers=Ze({apiHandler:e}),this.checkoutForms=He({apiHandler:e}),this.coupons=et({apiHandler:e}),this.creditMemos=tt({apiHandler:e}),this.customDomains=st({apiHandler:e}),this.customFields=nt({apiHandler:e}),this.customerAuthentication=rt({apiHandler:e}),this.customers=ut({apiHandler:e}),this.depositCustomPropertySets=ot({apiHandler:e}),this.depositRequests=lt({apiHandler:e}),this.depositStrategies=ct({apiHandler:e}),this.digitalWallets=it({apiHandler:e}),this.disputes=gt({apiHandler:e}),this.emailDeliverySettings=at({apiHandler:e}),this.emailMessages=mt({apiHandler:e}),this.emailNotifications=ft({apiHandler:e}),this.events=$t({apiHandler:e}),this.externalIdentifiers=ht({apiHandler:e}),this.externalServicesSettings=pt({apiHandler:e}),this.fees=yt({apiHandler:e}),this.files=At({apiHandler:e}),this.gatewayAccounts=Rt({apiHandler:e}),this.integrations=bt({apiHandler:e}),this.invoices=wt({apiHandler:e}),this.journalAccounts=kt({apiHandler:e}),this.journalEntries=vt({apiHandler:e}),this.journalRecords=dt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=qt({apiHandler:e}),this.kycSettings=It({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.orderCancellations=xt({apiHandler:e}),this.orderPauses=Pt({apiHandler:e}),this.orderReactivations=Ct({apiHandler:e}),this.orders=jt({apiHandler:e}),this.organizationExports=Dt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Ft({apiHandler:e}),this.paymentMethods=Kt({apiHandler:e}),this.paymentTokens=Nt({apiHandler:e}),this.payoutRequestAllocations=Bt({apiHandler:e}),this.payoutRequests=Lt({apiHandler:e}),this.payoutRequestsV2=zt({apiHandler:e}),this.payouts=Ut({apiHandler:e}),this.plans=Vt({apiHandler:e}),this.previews=Jt({apiHandler:e}),this.products=Wt({apiHandler:e}),this.profile=Gt({apiHandler:e}),this.purchase=Yt({apiHandler:e}),this.quotes=Qt({apiHandler:e}),this.resource=_t({apiHandler:e}),this.riskScoreRules=Xt({apiHandler:e}),this.roles=Zt({apiHandler:e}),this.search=Ht({apiHandler:e}),this.segments=es({apiHandler:e}),this.sendThroughAttribution=ts({apiHandler:e}),this.serviceCredentials=ss({apiHandler:e}),this.shippingRates=ns({apiHandler:e}),this.status=rs({apiHandler:e}),this.subscriptionCancellations=us({apiHandler:e}),this.subscriptionPauses=os({apiHandler:e}),this.subscriptionReactivations=ls({apiHandler:e}),this.subscriptions=cs({apiHandler:e}),this.tags=is({apiHandler:e}),this.tagsRules=gs({apiHandler:e}),this.tracking=as({apiHandler:e}),this.transactions=ms({apiHandler:e}),this.usages=fs({apiHandler:e}),this.users=$s({apiHandler:e}),this.webhooks=hs({apiHandler:e}),this.websites=ps({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 As({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function Rs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function bs({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function ws({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:n,limit:r,offset:u};return t.get("reports/api-log-summary",o)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:s=null,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:n,offset:r,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const h={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",h)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:n=null,aggregationField:r=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:n,aggregationField:r,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:n=null,periodStart:r=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:n=null,includeDisputes:r=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:h=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:n=null,recognizedTo:r=null}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:s=null,accountingMethod:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:s=null,periodStart:n=null,periodEnd:r=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function ks({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function vs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function ds({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:As,DataExportsResource:Rs,HistogramsResource:bs,ReportsResource:ws,SubscriptionsResource:ks,TimelinesResource:vs,LocationResource:ds};class Ts{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function qs({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 Is({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Ss({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function Es({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 xs({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Ps({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function Cs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function js({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ds({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Ms({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},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 Fs({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 Ks({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Ns({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},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 Bs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},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 Ls({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 zs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Vs({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Js({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Ws({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Gs({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Ys({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 Qs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function _s({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Xs{constructor({apiHandler:e}){this.account=qs({apiHandler:e}),this.authorization=Is({apiHandler:e}),this.billingPortals=Ss({apiHandler:e}),this.cashiers=Es({apiHandler:e}),this.checkoutForms=xs({apiHandler:e}),this.customFields=Ps({apiHandler:e}),this.depositRequests=Cs({apiHandler:e}),this.deposit=js({apiHandler:e}),this.depositStrategies=Ds({apiHandler:e}),this.invoices=Ms({apiHandler:e}),this.kycDocuments=Os({apiHandler:e}),this.kycLivenessSessions=Fs({apiHandler:e}),this.kycRequests=Ks({apiHandler:e}),this.orders=Ns({apiHandler:e}),this.paymentInstruments=Bs({apiHandler:e}),this.payoutRequests=Ls({apiHandler:e}),this.plans=zs({apiHandler:e}),this.products=Us({apiHandler:e}),this.purchase=Vs({apiHandler:e}),this.quotes=Js({apiHandler:e}),this.readyToPayout=Ws({apiHandler:e}),this.subscriptionReactivations=Gs({apiHandler:e}),this.subscriptions=Ys({apiHandler:e}),this.transactions=Qs({apiHandler:e}),this.websites=_s({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Zs({apiHandler:t}){return new ys({apiHandler:t})}function Hs({apiHandler:t}){return new Ts({apiHandler:t})}function en({apiHandler:t}){return new Xs({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Zs({apiHandler:l})}function tn({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Hs({apiHandler:l})}function sn({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P,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:n,organizationId:r,appName:(o==null?void 0:o.appName)??null},a=x({options:l});return a.setSessionToken(l.jwt),en({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=p,m.RebillyExperimentalAPI=tn,m.RebillyStorefrontAPI=sn,m.cancellation=Be,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */var Ie=qe;function L(t){return Ie(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var Se=function(e){var s,n;return!(L(e)===!1||(s=e.constructor,typeof s!="function")||(n=s.prototype,L(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};const Ee=Te,xe=K,Pe=Se;function E(t,e){switch(xe(t)){case"object":return Ce(t,e);case"array":return je(t,e);default:return Ee(t)}}function Ce(t,e){if(typeof e=="function")return e(t);if(e||Pe(t)){const s=new t.constructor;for(let n in t)s[n]=E(t[n],e);return s}return t}function je(t,e){const s=new t.constructor(t.length);for(let n=0;n<t.length;n++)s[n]=E(t[n],e);return s}var De=E;const Me=ce(De);let Oe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fe=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Oe[Math.random()*64|0];return e};class Ke{constructor({id:e=null,created:s=null}={}){this.id=e||Fe(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Ne=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.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 Ke;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}};const d=new Ne;class q{}M(q,"cancelById",(e,s)=>{try{d.getById(e).cancel(s),d.deleteById(e)}catch{}}),M(q,"cancelAll",async e=>{for(const s of d.getAll())await s.cancel(e),d.deleteById(s.id)});const Be={cancelAll:async(...t)=>await q.cancelAll(...t)},b={request:"request",response:"response"},z=t=>{if(!Object.values(b).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function x({options:t}){const e=s();function s(){return $.create(r())}function n(){return e}function r(){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 i={"REB-API-CONSUMER":`${["Rebilly",t.appName,"js-sdk"].filter(g=>g).join("/")}@f21ce24`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return Me(e.defaults.headers)}function a(c){t.requestTimeout=Number(c),e.defaults.timeout=t.requestTimeout}function h(c=t.jwt){const i=l();t.apiKey=null,t.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=t.publishableKey){const i=l();t.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function j({host:c,port:i,auth:g}){e.defaults.proxy={host:c,port:i,auth:g}}function D({live:c=null,sandbox:i=null}){c&&(t.apiEndpoints.live=c),i&&(t.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&e.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&e.interceptors[b[c]].eject(i)}function nn({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function rn(c){J(b.request,c)}function un({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function on(c){J(b.response,c)}function v({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:pn}=d.save();f.cancelToken=pn;const X=async function(){try{const T=await c(f);return ln({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{d.deleteById(R)}}();return X.cancel=T=>q.cancelById(R,T),X}function ln({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new p.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new p.RebillyForbiddenError(c);case 404:throw new p.RebillyNotFoundError(c);case 405:throw new p.RebillyMethodNotAllowedError(c);case 409:throw new p.RebillyConflictError(c);case 422:throw new p.RebillyValidationError(c);default:throw new p.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new p.RebillyTimeoutError(c):new p.RebillyRequestError(c)}function cn(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...cn(c)}}function Y(c,i={}){return v({request:g=>e.get(c,g),config:{params:i}})}function gn(c,i){return v({request:g=>e.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),v({request:R=>e.post(c,i,R),config:f})}function _(c,i,g={}){return v({request:f=>e.put(c,i,f),config:{params:g}})}function an(c,i){return v({request:g=>e.patch(c,i,g),config:{}})}function mn(c){return v({request:i=>e.delete(c,i),config:{}})}function fn(c,i){return v({request:g=>e.delete(c,g),config:{data:{...i}}})}async function $n(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new p.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function hn(c,i){const g=G(i);try{const f=await e.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:n,addRequestInterceptor:nn,removeRequestInterceptor:rn,addResponseInterceptor:un,removeResponseInterceptor:on,setTimeout:a,setProxyAgent:j,setSessionToken:h,setPublishableKey:k,setEndpoints:D,get:Y,getAll:gn,post:Q,put:_,patch:an,delete:mn,deleteAll:fn,create:$n,download:hn}}function Le({apiHandler:t}){return{forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})}}}function ze({apiHandler:t}){return{getAllowlistCollection({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};return t.getAll("allowlists",u)},storeAllowlist({data:e}){return t.post("allowlists",e)},getAllowlist({id:e}){return t.get(`allowlists/${e}`)},delete({id:e}){return t.delete(`allowlists/${e}`)}}}function Ue({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("aml-checks",o)},get({id:e}){return t.get(`aml-checks/${e}`)},startReview({id:e}){return t.post(`aml-checks/${e}/start-review`)},stopReview({id:e}){return t.post(`aml-checks/${e}/stop-review`)},review({id:e,data:s}){return t.post(`aml-checks/${e}/review`,s)}}}function Ve({apiHandler:t}){return{getAmlSettings(){return t.get("aml-settings")},putAmlSettings({data:e}){return t.put("aml-settings",e)}}}function Je({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null}={}){const u={filter:e,sort:s,limit:n,offset:r};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 We({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:s}){return t.put(`application-instances/${e}`,s)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)},getConfiguration({applicationId:e}){return t.get(`application-instances/${e}/configuration`)},upsertConfiguration({applicationId:e,data:s}){return t.put(`application-instances/${e}/configuration`,s)}}}function Ge({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`applications/${e}/instances`,r)},getInstance({id:e,organizationId:s}){return t.get(`applications/${e}/instances/${s}`)}}}function Ye({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("balance-transactions",u)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function Qe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 _e({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("blocklists",o)},create({id:e="",data:s}){return t.create(`blocklists/${e}`,e,s)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function Xe({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null}={}){const u={limit:e,offset:s,sort:n,filter:r};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:s}){return t.patch(`broadcast-messages/${e}`,s)}}}function Ze({apiHandler:t}){return{create({data:e}){return t.post("cashiers",e)},get({id:e}){return t.get(`cashiers/${e}`)}}}function He({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 et({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("coupons",o)},create({id:e="",data:s}){return t.create(`coupons/${e}`,e,s)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:s}){return t.put(`coupons/${e}`,s)},setExpiration({id:e,data:s}){return t.post(`coupons/${e}/expiration`,s)}}}function tt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`credit-memos/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`credit-memos/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`credit-memos/${e}/timeline/${s}`)}}}function st({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 nt({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)},get({resource:e,name:s}){return t.get(`custom-fields/${e}/${s}`)},create({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)},update({resource:e,name:s,data:n}){return t.put(`custom-fields/${e}/${s}`,n)}}}function rt({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 n={limit:e,offset:s};return t.getAll("authentication-tokens",n)},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 n={limit:e,offset:s};return t.getAll("credentials",n)},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 n={limit:e,offset:s};return t.getAll("password-tokens",n)},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 ut({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`customers/${e}`,e,s,r)},get({id:e,expand:s=null,fields:n=null}){const r={expand:s,fields:n};return t.get(`customers/${e}`,r)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`customers/${e}`,s,r)},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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`customers/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`customers/${e}/timeline/${s}`)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},getEddTimelineCollection({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},getEddTimelineMessage({id:e,messageId:s}){return t.get(`customers/${e}/edd-timeline/${s}`)},getAllEddSearchResults({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`customers/${e}/edd-search-results`,r)},getEddSearchResult({id:e,searchResultId:s}){return t.get(`customers/${e}/edd-search-results/${s}`)}}}function ot({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,expand:u};return t.getAll("deposit-requests",o)},create({data:e}){return t.post("deposit-requests",e)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 it({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 gt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`disputes/${e}`,e,s,r)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`disputes/${e}`,s,r)}}}function at({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,sort:r=null,filter:u=null}={}){const o={limit:e,offset:s,q:n,sort:r,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 ft({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("email-notifications",n)}}}function $t({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null}={}){const u={limit:e,offset:s,filter:n,q:r};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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/history`,a)},getRulesVersionNumber({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/history/${s}`,r)},getRulesVersionDetail({eventType:e,version:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/versions/${s}`,r)},getAllDraftRulesets({eventType:e,limit:s=null,offset:n=null,filter:r=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:n,filter:r,q:u,sort:o,fields:l};return t.getAll(`events/${e}/rules/drafts`,a)},createDraftRuleset({eventType:e,data:s}){return t.post(`events/${e}/rules/drafts`,s)},getDraftRuleset({eventType:e,id:s,fields:n=null}){const r={fields:n};return t.get(`events/${e}/rules/drafts/${s}`,r)},updateDraftRuleset({eventType:e,id:s,data:n}){return t.put(`events/${e}/rules/drafts/${s}`,n)},deleteDraftRuleset({eventType:e,id:s}){return t.delete(`events/${e}/rules/drafts/${s}`)}}}function ht({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function pt({apiHandler:t}){return{getExternalServiceSettings(){return t.get("external-services-settings")},updateExternalServiceSettings({data:e}){return t.put("external-services-settings",e)}}}function yt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 At({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:s=null,filter:n=null,q:r=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:s,filter:n,q:r,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`attachments/${e}`,e,s,r)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`attachments/${e}`,s,r)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,fields:u=null,sort:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,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 n=[];const u=(async()=>{const o=this.getAllAttachments(s);n.push(o);const a=(await o).items.map(k=>this.detach({id:k.fields.id}));n=[...n,a],await Promise.all(a);const h=t.delete(`files/${e}`);return n.push(h),h})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:s={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function Rt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,sort:u=null}){const o={limit:s,offset:n,filter:r,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:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${s}`,n)},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:n}){return t.put(`gateway-accounts/${e}/limits/${s}`,n)},deleteVolumeLimit({id:e,limitId:s}){return t.delete(`gateway-accounts/${e}/limits/${s}`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 bt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("integrations",n)},get({label:e}){return t.get(`integrations/${e}`)}}}const I={Accept:"application/pdf"};function wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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 n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.put(`invoices/${e}`,s)},getAllInvoiceItems({id:e,limit:s=null,offset:n=null,expand:r=null}){const u={limit:s,offset:n,expand:r};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:n}){return t.put(`invoices/${e}/items/${s}`,n)},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:n=null}){const r={limit:s,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,r)},applyTransaction({id:e,data:s}){return t.post(`invoices/${e}/transaction`,s)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function kt({apiHandler:t}){return{getAllAccounts({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 vt({apiHandler:t}){return{getAllEntries({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 Tt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 qt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,expand:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 It({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function St({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,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 Et({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};return t.getAll("memberships",u)},get({organizationId:e,userId:s}){return t.get(`memberships/${e}/${s}`)},update({organizationId:e,userId:s,data:n}){return t.put(`memberships/${e}/${s}`,n)},delete({organizationId:e,userId:s}){return t.delete(`memberships/${e}/${s}`)}}}function xt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 Pt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 Ct({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 jt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("orders",o)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`orders/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`orders/${e}`,s,r)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},void({id:e}){return t.post(`orders/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`orders/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`orders/${e}/items/${s}`,n)},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 Dt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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 Mt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 Ot({apiHandler:t}){return{getAll({limit:e=null,q:s=null}={}){const n={limit:e,q:s};return t.getAll("payment-cards-bank-names",n)}}}function Ft({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,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 Kt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("payment-methods",n)},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function Nt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Bt({apiHandler:t}){return{create({data:e}){return t.post("payout-request-allocations",e)},autoAllocate({data:e}){return t.post("payout-request-allocations/auto",e)},update({id:e,data:s}){return t.patch(`payout-request-allocations/${e}`,s)}}}function Lt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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)},getPaymentInstruments({id:e}){return t.get(`payout-requests/${e}/payment-instruments`)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 zt({apiHandler:t}){return{getV2({id:e}){return t.get(`payout-requests-v2/${e}`)},getPaymentInstrumentsV2({id:e}){return t.get(`payout-requests-v2/${e}/payment-instruments`)}}}function Ut({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Vt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("plans",o)},create({id:e="",data:s}){return t.create(`plans/${e}`,e,s)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:s}){return t.put(`plans/${e}`,s)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Jt({apiHandler:t}){return{order({data:e}){return t.post("previews/orders",e)},sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},webhook({data:e}){return t.post("previews/webhooks",e)}}}function Wt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 Gt({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")}}}function Yt({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Qt({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,expand:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 n={expand:s};return t.get(`quotes/${e}`,n)},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:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function _t({apiHandler:t}){return{get({resource:e,resourceId:s,service:n}){return t.get(`${e}/${s}/external-identifiers/${n}`)},sync({resource:e,resourceId:s,service:n}){return t.post(`${e}/${s}/external-identifiers/${n}`)},update({resource:e,resourceId:s,service:n,data:r}){return t.put(`${e}/${s}/external-identifiers/${n}`,r)},delete({resource:e,resourceId:s,service:n}){return t.delete(`${e}/${s}/external-identifiers/${n}`)}}}function Xt({apiHandler:t}){return{getAll(){return t.get("risk-score-rules")},updateRiskScoreRules({data:e}){return t.put("risk-score-rules",e)},getAllBlocklistRules(){return t.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return t.put("risk-score-rules/blocklists",e)}}}function Zt({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,sort:r,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 n={expand:s};return t.get(`roles/${e}`,n)},update({id:e,data:s}){return t.put(`roles/${e}`,s)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Ht({apiHandler:t}){return{get({sort:e=null,limit:s=null,offset:n=null,q:r=null}){const u={sort:e,limit:s,offset:n,q:r};return t.get("search",u)}}}function es({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 ts({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function ss({apiHandler:t}){return{getAll({type:e,filter:s=null,limit:n=null,offset:r=null,sort:u=null,q:o=null}){const l={filter:s,limit:n,offset:r,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:n}){return t.patch(`service-credentials/${e}/${s}`,n)},getItems({type:e,id:s,limit:n=null,offset:r=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const h={limit:n,offset:r,filter:u,q:o,fields:l,sort:a};return t.getAll(`service-credentials/${e}/${s}/items`,h)}}}function ns({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null,q:u=null}={}){const o={limit:e,offset:s,filter:n,sort:r,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 rs({apiHandler:t}){return{get(){return t.get("status")}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 ls({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,sort:r=null}={}){const u={limit:e,offset:s,filter:n,sort:r};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 cs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`subscriptions/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`subscriptions/${e}`,s,r)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:s,expand:n=null}){const r={expand:n};return t.post(`subscriptions/${e}/change-items`,s,r)},updateItem({id:e,itemId:s,data:n}){return t.patch(`subscriptions/${e}/items/${s}`,n)},createInterimInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/interim-invoice`,s)},getAllUpcomingInvoices({id:e,expand:s=null}){const n={expand:s};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`subscriptions/${e}/upcoming-invoice`,n)},issueEarlyUpcomingInvoice({id:e,data:s}){return t.post(`subscriptions/${e}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:e,invoiceId:s,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${s}/issue`,n)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,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 is({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,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 gs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 as({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 ms({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:s,filter:n,q:r,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:s=null}){const n={expand:s};return t.post("transactions",e,n)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`transactions/${e}`,n)},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:n=null}){const r={expand:n};return t.post(`transactions/${e}/refund`,s,r)},getAllTimelineMessages({id:e,limit:s=null,offset:n=null,filter:r=null,sort:u=null,q:o=null}){const l={limit:s,offset:n,filter:r,sort:u,q:o};return t.getAll(`transactions/${e}/timeline`,l)},createTimelineComment({id:e,data:s}){return t.post(`transactions/${e}/timeline`,s)},getTimelineMessage({id:e,messageId:s}){return t.get(`transactions/${e}/timeline/${s}`)},deleteTimelineMessage({id:e,messageId:s}){return t.delete(`transactions/${e}/timeline/${s}`)}}}function fs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 $s({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,filter:r=null,q:u=null}={}){const o={limit:e,offset:s,sort:n,filter:r,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 hs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null}={}){const r={limit:e,offset:s,filter:n};return t.getAll("webhooks",r)},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 ps({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,q:n=null,filter:r=null,sort:u=null}={}){const o={limit:e,offset:s,q:n,filter:r,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 ys{constructor({apiHandler:e}){this.account=Le({apiHandler:e}),this.allowlists=ze({apiHandler:e}),this.amlChecks=Ue({apiHandler:e}),this.amlSettings=Ve({apiHandler:e}),this.apiKeys=Je({apiHandler:e}),this.applicationInstances=We({apiHandler:e}),this.applications=Ge({apiHandler:e}),this.balanceTransactions=Ye({apiHandler:e}),this.billingPortals=Qe({apiHandler:e}),this.blocklists=_e({apiHandler:e}),this.broadcastMessages=Xe({apiHandler:e}),this.cashiers=Ze({apiHandler:e}),this.checkoutForms=He({apiHandler:e}),this.coupons=et({apiHandler:e}),this.creditMemos=tt({apiHandler:e}),this.customDomains=st({apiHandler:e}),this.customFields=nt({apiHandler:e}),this.customerAuthentication=rt({apiHandler:e}),this.customers=ut({apiHandler:e}),this.depositCustomPropertySets=ot({apiHandler:e}),this.depositRequests=lt({apiHandler:e}),this.depositStrategies=ct({apiHandler:e}),this.digitalWallets=it({apiHandler:e}),this.disputes=gt({apiHandler:e}),this.emailDeliverySettings=at({apiHandler:e}),this.emailMessages=mt({apiHandler:e}),this.emailNotifications=ft({apiHandler:e}),this.events=$t({apiHandler:e}),this.externalIdentifiers=ht({apiHandler:e}),this.externalServicesSettings=pt({apiHandler:e}),this.fees=yt({apiHandler:e}),this.files=At({apiHandler:e}),this.gatewayAccounts=Rt({apiHandler:e}),this.integrations=bt({apiHandler:e}),this.invoices=wt({apiHandler:e}),this.journalAccounts=kt({apiHandler:e}),this.journalEntries=vt({apiHandler:e}),this.journalRecords=dt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=qt({apiHandler:e}),this.kycSettings=It({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Et({apiHandler:e}),this.orderCancellations=xt({apiHandler:e}),this.orderPauses=Pt({apiHandler:e}),this.orderReactivations=Ct({apiHandler:e}),this.orders=jt({apiHandler:e}),this.organizationExports=Dt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Ft({apiHandler:e}),this.paymentMethods=Kt({apiHandler:e}),this.paymentTokens=Nt({apiHandler:e}),this.payoutRequestAllocations=Bt({apiHandler:e}),this.payoutRequests=Lt({apiHandler:e}),this.payoutRequestsV2=zt({apiHandler:e}),this.payouts=Ut({apiHandler:e}),this.plans=Vt({apiHandler:e}),this.previews=Jt({apiHandler:e}),this.products=Wt({apiHandler:e}),this.profile=Gt({apiHandler:e}),this.purchase=Yt({apiHandler:e}),this.quotes=Qt({apiHandler:e}),this.resource=_t({apiHandler:e}),this.riskScoreRules=Xt({apiHandler:e}),this.roles=Zt({apiHandler:e}),this.search=Ht({apiHandler:e}),this.segments=es({apiHandler:e}),this.sendThroughAttribution=ts({apiHandler:e}),this.serviceCredentials=ss({apiHandler:e}),this.shippingRates=ns({apiHandler:e}),this.status=rs({apiHandler:e}),this.subscriptionCancellations=us({apiHandler:e}),this.subscriptionPauses=os({apiHandler:e}),this.subscriptionReactivations=ls({apiHandler:e}),this.subscriptions=cs({apiHandler:e}),this.tags=is({apiHandler:e}),this.tagsRules=gs({apiHandler:e}),this.tracking=as({apiHandler:e}),this.transactions=ms({apiHandler:e}),this.usages=fs({apiHandler:e}),this.users=$s({apiHandler:e}),this.webhooks=hs({apiHandler:e}),this.websites=ps({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 As({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function Rs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,sort:n=null,expand:r=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:s,sort:n,expand:r,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:s,expand:n=null}){const r={expand:n};return t.create(`data-exports/${e}`,e,s,r)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`data-exports/${e}`,n)},update({id:e,data:s,expand:n=null}){const r={expand:n};return t.put(`data-exports/${e}`,s,r)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function bs({apiHandler:t}){return{getAmlCheckHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,includePropagatedResults:u,filter:o};return t.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:e=null,periodEnd:s=null,aggregationPeriod:n=null,metric:r=null,filter:u=null}){const o={periodStart:e,periodEnd:s,aggregationPeriod:n,metric:r,filter:u};return t.get("histograms/transactions",o)}}}function ws({apiHandler:t}){return{getApiLogSummary({periodStart:e=null,periodEnd:s=null,filter:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,filter:n,limit:r,offset:u};return t.get("reports/api-log-summary",o)},getCumulativeSubscriptions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e=null,periodEnd:s=null,metrics:n=null,segments:r=null}){const u={periodStart:e,periodEnd:s,metrics:n,segments:r};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/declined-transactions",l)},getDeferredRevenue({currency:e=null,asOfDate:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={currency:e,asOfDate:s,limit:n,offset:r,filter:u};return t.get("reports/deferred-revenue",o)},getDisputes({aggregationField:e=null,periodMonth:s=null,limit:n=null,offset:r=null,filter:u=null}){const o={aggregationField:e,periodMonth:s,limit:n,offset:r,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null}){const o={periodStart:s,periodEnd:n,limit:r,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/future-renewals",u)},getJournal({currency:e=null,bookedFrom:s=null,bookedTo:n=null,recognizedAt:r=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const h={currency:e,bookedFrom:s,bookedTo:n,recognizedAt:r,aggregationField:u,limit:o,offset:l,filter:a};return t.get("reports/journal",h)},getJournalSummary({periodStart:e=null,periodEnd:s=null,currency:n=null,aggregationField:r=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:e,periodEnd:s,currency:n,aggregationField:r,amountField:u,journalAccountIds:o};return t.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:e=null,periodEnd:s=null}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:s}){const n={periodStart:e,periodEnd:s};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:e,periodStart:s,periodEnd:n,limit:r=null,offset:u=null}){const o={currency:e,periodStart:s,periodEnd:n,limit:r,offset:u};return t.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:n=null,periodStart:r=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const k={aggregationField:e,aggregationPeriod:s,includeSwitchedSubscriptions:n,periodStart:r,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e=null,aggregationPeriod:s=null,includeRefunds:n=null,includeDisputes:r=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:h=null,sort:k=null,criteria:j=null}){const D={aggregationField:e,aggregationPeriod:s,includeRefunds:n,includeDisputes:r,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:k,criteria:j};return t.get("reports/retention-value",D)},getRevenueWaterfall({currency:e,issuedFrom:s=null,issuedTo:n=null,recognizedTo:r=null}){const u={currency:e,issuedFrom:s,issuedTo:n,recognizedTo:r};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e=null,periodEnd:s=null,limit:n=null,offset:r=null}){const u={periodStart:e,periodEnd:s,limit:n,offset:r};return t.get("reports/subscription-renewal",u)},getTax({periodStart:e=null,periodEnd:s=null,accountingMethod:n=null,limit:r=null,offset:u=null}){const o={periodStart:e,periodEnd:s,accountingMethod:n,limit:r,offset:u};return t.get("reports/tax",o)},getTimeSeriesTransaction({type:e=null,subaggregate:s=null,periodStart:n=null,periodEnd:r=null,limit:u=null,offset:o=null}){const l={type:e,subaggregate:s,periodStart:n,periodEnd:r,limit:u,offset:o};return t.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:e=null,periodStart:s=null,periodEnd:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:s,periodEnd:n,limit:r,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e=null,periodEnd:s=null,aggregationField:n=null,limit:r=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:s,aggregationField:n,limit:r,offset:u,filter:o};return t.get("reports/transactions",l)}}}function ks({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function vs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:s=1e3,offset:n=0}){const r={eventTypes:e,limit:s,offset:n};return t.getAll("activity-feed",r)},getTransaction({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:s=null,limit:n=1e3,offset:r=0}){const u={eventTypes:s,limit:n,offset:r};return t.getAll(`customers/${e}/timeline`,u)}}}function ds({apiHandler:t}){return{query(){return t.get("location")}}}const w={CustomersResource:As,DataExportsResource:Rs,HistogramsResource:bs,ReportsResource:ws,SubscriptionsResource:ks,TimelinesResource:vs,LocationResource:ds};class Ts{constructor({apiHandler:e}){this.customers=w.CustomersResource({apiHandler:e}),this.dataExports=w.DataExportsResource({apiHandler:e}),this.histograms=w.HistogramsResource({apiHandler:e}),this.reports=w.ReportsResource({apiHandler:e}),this.subscriptions=w.SubscriptionsResource({apiHandler:e}),this.timelines=w.TimelinesResource({apiHandler:e}),this.location=w.LocationResource({apiHandler:e}),this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken}}function qs({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 Is({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Ss({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function Es({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 xs({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Ps({apiHandler:t}){return{getAll({resource:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.getAll(`custom-fields/${e}`,r)}}}function Cs({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`deposit-requests/${e}`,n)}}}function js({apiHandler:t}){return{create({data:e}){return t.post("deposit",e)}}}function Ds({apiHandler:t}){return{get({id:e}){return t.get(`deposit-strategies/${e}`)}}}function Ms({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("invoices",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`invoices/${e}`,n)},update({id:e,data:s}){return t.patch(`invoices/${e}`,s)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`invoices/${e}`,s)}}}function Os({apiHandler:t}){return{getAll({limit:e=null,offset:s=null}={}){const n={limit:e,offset:s};return t.getAll("kyc-documents",n)},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 Fs({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 Ks({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`kyc-requests/${e}`,n)}}}function Ns({apiHandler:t}){return{getUpcomingInvoice({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}/upcoming-invoice`,n)},getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("orders",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`orders/${e}`,n)},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 Bs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:s=null,offset:n=null}){const r={limit:s,offset:n};return t.get(`payment-instruments/${e}`,r)},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 Ls({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,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 zs({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:s,limit:n,offset:r,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:s=null}){const n={expand:s};return t.get(`plans/${e}`,n)}}}function Us({apiHandler:t}){return{getAll({filter:e=null,sort:s=null,limit:n=null,offset:r=null,q:u=null}={}){const o={filter:e,sort:s,limit:n,offset:r,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function Vs({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Js({apiHandler:t}){return{get({id:e,expand:s=null}){const n={expand:s};return t.get(`quotes/${e}`,n)},accept({id:e}){return t.post(`quotes/${e}/accept`)},reject({id:e}){return t.post(`quotes/${e}/reject`)},downloadPDF({id:e}){const s={headers:I,responseType:"arraybuffer"};return t.download(`quotes/${e}`,s)}}}function Ws({apiHandler:t}){return{readyToPayout({data:e}){return t.post("ready-to-payout",e)}}}function Gs({apiHandler:t}){return{reactivation({data:e}){return t.post("subscription-reactivations",e)}}}function Ys({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 Qs({apiHandler:t}){return{getAll({limit:e=null,offset:s=null,filter:n=null,q:r=null,sort:u=null}={}){const o={limit:e,offset:s,filter:n,q:r,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},finishKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/continue`)},skipKyc({id:e,token:s}){return t.post(`transactions/${e}/${s}/bypass`)},update({id:e,data:s}){return t.patch(`transactions/${e}`,s)}}}function _s({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Xs{constructor({apiHandler:e}){this.account=qs({apiHandler:e}),this.authorization=Is({apiHandler:e}),this.billingPortals=Ss({apiHandler:e}),this.cashiers=Es({apiHandler:e}),this.checkoutForms=xs({apiHandler:e}),this.customFields=Ps({apiHandler:e}),this.depositRequests=Cs({apiHandler:e}),this.deposit=js({apiHandler:e}),this.depositStrategies=Ds({apiHandler:e}),this.invoices=Ms({apiHandler:e}),this.kycDocuments=Os({apiHandler:e}),this.kycLivenessSessions=Fs({apiHandler:e}),this.kycRequests=Ks({apiHandler:e}),this.orders=Ns({apiHandler:e}),this.paymentInstruments=Bs({apiHandler:e}),this.payoutRequests=Ls({apiHandler:e}),this.plans=zs({apiHandler:e}),this.products=Us({apiHandler:e}),this.purchase=Vs({apiHandler:e}),this.quotes=Js({apiHandler:e}),this.readyToPayout=Ws({apiHandler:e}),this.subscriptionReactivations=Gs({apiHandler:e}),this.subscriptions=Ys({apiHandler:e}),this.transactions=Qs({apiHandler:e}),this.websites=_s({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Zs({apiHandler:t}){return new ys({apiHandler:t})}function Hs({apiHandler:t}){return new Ts({apiHandler:t})}function en({apiHandler:t}){return new Xs({apiHandler:t})}const P={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Zs({apiHandler:l})}function tn({apiKey:t=null,sandbox:e=!1,timeout:s=C,organizationId:n=null,urls:r=P,internalOptions:u=null}={}){if(!r.live||!r.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof r.live!="string"||typeof r.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:r,apiKey:t,apiVersion:"experimental",isSandbox:e,requestTimeout:s,jwt:null,organizationId:n,appName:(u==null?void 0:u.appName)??null},l=x({options:o});return Hs({apiHandler:l})}function sn({publishableKey:t=null,jwt:e=null,sandbox:s=!1,timeout:n=C,organizationId:r=null,urls:u=P,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:n,organizationId:r,appName:(o==null?void 0:o.appName)??null},a=x({options:l});return a.setSessionToken(l.jwt),en({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=p,m.RebillyExperimentalAPI=tn,m.RebillyStorefrontAPI=sn,m.cancellation=Be,m.default=U,Object.defineProperties(m,{__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.39.0",
3
+ "version": "62.41.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",
@@ -25,7 +25,7 @@ export default function ApplicationInstancesResource({apiHandler}) {
25
25
  */
26
26
  getConfiguration({applicationId}) {
27
27
  return apiHandler.get(
28
- `application-instances/${applicationId}/configuration`
28
+ `application-instances/${applicationId}/configuration`,
29
29
  );
30
30
  },
31
31
  /**
@@ -34,7 +34,7 @@ export default function ApplicationInstancesResource({apiHandler}) {
34
34
  upsertConfiguration({applicationId, data}) {
35
35
  return apiHandler.put(
36
36
  `application-instances/${applicationId}/configuration`,
37
- data
37
+ data,
38
38
  );
39
39
  },
40
40
  };
@@ -45,7 +45,7 @@ export default function CustomersResource({apiHandler}) {
45
45
  },
46
46
  merge({id, targetCustomerId}) {
47
47
  return apiHandler.delete(
48
- `customers/${id}?targetCustomerId=${targetCustomerId}`
48
+ `customers/${id}?targetCustomerId=${targetCustomerId}`,
49
49
  );
50
50
  },
51
51
  /**
@@ -136,7 +136,7 @@ export default function CustomersResource({apiHandler}) {
136
136
  */
137
137
  getEddSearchResult({id, searchResultId}) {
138
138
  return apiHandler.get(
139
- `customers/${id}/edd-search-results/${searchResultId}`
139
+ `customers/${id}/edd-search-results/${searchResultId}`,
140
140
  );
141
141
  },
142
142
  };
@@ -42,7 +42,7 @@ export default function EmailDeliverySettingsResource({apiHandler}) {
42
42
  },
43
43
  resendVerification({id}) {
44
44
  return apiHandler.post(
45
- `email-delivery-settings/${id}/resend-email-verification`
45
+ `email-delivery-settings/${id}/resend-email-verification`,
46
46
  );
47
47
  },
48
48
  };
@@ -86,7 +86,7 @@ export default function EventsResource({apiHandler}) {
86
86
  const params = {fields};
87
87
  return apiHandler.get(
88
88
  `events/${eventType}/rules/history/${version}`,
89
- params
89
+ params,
90
90
  );
91
91
  },
92
92
  /**
@@ -96,7 +96,7 @@ export default function EventsResource({apiHandler}) {
96
96
  const params = {fields};
97
97
  return apiHandler.get(
98
98
  `events/${eventType}/rules/versions/${version}`,
99
- params
99
+ params,
100
100
  );
101
101
  },
102
102
  /**
@@ -5,6 +5,27 @@
5
5
 
6
6
  export default function HistogramsResource({apiHandler}) {
7
7
  return {
8
+ /**
9
+ * @returns { rebilly.GetHistogramAmlCheckReportResponsePromise } response
10
+ */
11
+ getAmlCheckHistogramReport({
12
+ periodStart = null,
13
+ periodEnd = null,
14
+ aggregationPeriod = null,
15
+ metric = null,
16
+ includePropagatedResults = null,
17
+ filter = null,
18
+ }) {
19
+ const params = {
20
+ periodStart,
21
+ periodEnd,
22
+ aggregationPeriod,
23
+ metric,
24
+ includePropagatedResults,
25
+ filter,
26
+ };
27
+ return apiHandler.get(`histograms/aml-checks`, params);
28
+ },
8
29
  /**
9
30
  * @returns { rebilly.GetHistogramTransactionReportResponsePromise } response
10
31
  */
@@ -144,7 +144,7 @@ export default function ReportsResource({apiHandler}) {
144
144
  const params = {periodStart, periodEnd, limit, offset};
145
145
  return apiHandler.get(
146
146
  `reports/events-triggered/${eventType}/rules`,
147
- params
147
+ params,
148
148
  );
149
149
  },
150
150
  /**
@@ -10,12 +10,12 @@ export default function ExternalIdentifiersResource({apiHandler}) {
10
10
  */
11
11
  get({resource, resourceId, service}) {
12
12
  return apiHandler.get(
13
- `${resource}/${resourceId}/external-identifiers/${service}`
13
+ `${resource}/${resourceId}/external-identifiers/${service}`,
14
14
  );
15
15
  },
16
16
  sync({resource, resourceId, service}) {
17
17
  return apiHandler.post(
18
- `${resource}/${resourceId}/external-identifiers/${service}`
18
+ `${resource}/${resourceId}/external-identifiers/${service}`,
19
19
  );
20
20
  },
21
21
  /**
@@ -24,12 +24,12 @@ export default function ExternalIdentifiersResource({apiHandler}) {
24
24
  update({resource, resourceId, service, data}) {
25
25
  return apiHandler.put(
26
26
  `${resource}/${resourceId}/external-identifiers/${service}`,
27
- data
27
+ data,
28
28
  );
29
29
  },
30
30
  delete({resource, resourceId, service}) {
31
31
  return apiHandler.delete(
32
- `${resource}/${resourceId}/external-identifiers/${service}`
32
+ `${resource}/${resourceId}/external-identifiers/${service}`,
33
33
  );
34
34
  },
35
35
  };
@@ -94,7 +94,7 @@ export default function FilesResource({apiHandler}) {
94
94
  const attachmentsResult = await attachments;
95
95
 
96
96
  const promises = attachmentsResult.items.map((attachment) =>
97
- this.detach({id: attachment.fields.id})
97
+ this.detach({id: attachment.fields.id}),
98
98
  );
99
99
  requests = [...requests, promises];
100
100
  await Promise.all(promises);
@@ -64,7 +64,7 @@ export default function GatewayAccountsResource({apiHandler}) {
64
64
  const params = {limit, offset, filter, sort};
65
65
  return apiHandler.getAll(
66
66
  `gateway-accounts/${id}/downtime-schedules`,
67
- params
67
+ params,
68
68
  );
69
69
  },
70
70
  createDowntimeSchedule({id, data}) {
@@ -75,7 +75,7 @@ export default function GatewayAccountsResource({apiHandler}) {
75
75
  */
76
76
  getDowntimeSchedule({id, downtimeId}) {
77
77
  return apiHandler.get(
78
- `gateway-accounts/${id}/downtime-schedules/${downtimeId}`
78
+ `gateway-accounts/${id}/downtime-schedules/${downtimeId}`,
79
79
  );
80
80
  },
81
81
  /**
@@ -84,12 +84,12 @@ export default function GatewayAccountsResource({apiHandler}) {
84
84
  updateDowntimeSchedule({id, downtimeId, data}) {
85
85
  return apiHandler.put(
86
86
  `gateway-accounts/${id}/downtime-schedules/${downtimeId}`,
87
- data
87
+ data,
88
88
  );
89
89
  },
90
90
  deleteDowntimeSchedule({id, downtimeId}) {
91
91
  return apiHandler.delete(
92
- `gateway-accounts/${id}/downtime-schedules/${downtimeId}`
92
+ `gateway-accounts/${id}/downtime-schedules/${downtimeId}`,
93
93
  );
94
94
  },
95
95
  enable({id}) {
@@ -92,7 +92,7 @@ export default function InvoicesResource({apiHandler}) {
92
92
  const params = {limit, offset};
93
93
  return apiHandler.getAll(
94
94
  `invoices/${id}/transaction-allocations`,
95
- params
95
+ params,
96
96
  );
97
97
  },
98
98
  applyTransaction({id, data}) {
@@ -8,6 +8,9 @@ export default function PayoutRequestAllocationsResource({apiHandler}) {
8
8
  create({data}) {
9
9
  return apiHandler.post(`payout-request-allocations`, data);
10
10
  },
11
+ autoAllocate({data}) {
12
+ return apiHandler.post(`payout-request-allocations/auto`, data);
13
+ },
11
14
  update({id, data}) {
12
15
  return apiHandler.patch(`payout-request-allocations/${id}`, data);
13
16
  },
@@ -10,12 +10,12 @@ export default function ResourceResource({apiHandler}) {
10
10
  */
11
11
  get({resource, resourceId, service}) {
12
12
  return apiHandler.get(
13
- `${resource}/${resourceId}/external-identifiers/${service}`
13
+ `${resource}/${resourceId}/external-identifiers/${service}`,
14
14
  );
15
15
  },
16
16
  sync({resource, resourceId, service}) {
17
17
  return apiHandler.post(
18
- `${resource}/${resourceId}/external-identifiers/${service}`
18
+ `${resource}/${resourceId}/external-identifiers/${service}`,
19
19
  );
20
20
  },
21
21
  /**
@@ -24,12 +24,12 @@ export default function ResourceResource({apiHandler}) {
24
24
  update({resource, resourceId, service, data}) {
25
25
  return apiHandler.put(
26
26
  `${resource}/${resourceId}/external-identifiers/${service}`,
27
- data
27
+ data,
28
28
  );
29
29
  },
30
30
  delete({resource, resourceId, service}) {
31
31
  return apiHandler.delete(
32
- `${resource}/${resourceId}/external-identifiers/${service}`
32
+ `${resource}/${resourceId}/external-identifiers/${service}`,
33
33
  );
34
34
  },
35
35
  };
@@ -49,7 +49,7 @@ export default function ServiceCredentialsResource({apiHandler}) {
49
49
  const params = {limit, offset, filter, q, fields, sort};
50
50
  return apiHandler.getAll(
51
51
  `service-credentials/${type}/${id}/items`,
52
- params
52
+ params,
53
53
  );
54
54
  },
55
55
  };
@@ -76,13 +76,13 @@ export default function SubscriptionsResource({apiHandler}) {
76
76
  issueEarlyUpcomingInvoice({id, data}) {
77
77
  return apiHandler.post(
78
78
  `subscriptions/${id}/upcoming-invoice/issue`,
79
- data
79
+ data,
80
80
  );
81
81
  },
82
82
  issueUpcomingInvoice({id, invoiceId, data}) {
83
83
  return apiHandler.post(
84
84
  `subscriptions/${id}/upcoming-invoices/${invoiceId}/issue`,
85
- data
85
+ data,
86
86
  );
87
87
  },
88
88
  /**