rebilly-js-sdk 48.4.0 → 48.6.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.
@@ -1766,6 +1766,16 @@ declare module rebilly {
1766
1766
  type GetTrackingApiResponse = operations['GetTrackingApi']['responses']['200']['content']['application/json']
1767
1767
  type GetTrackingApiResponsePromise = Promise<{fields: GetTrackingApiResponse}>
1768
1768
 
1769
+ type GetTrackingTaxCollectionRequest = operations['GetTrackingTaxCollection']['parameters']["query"] & (operations['GetTrackingTaxCollection']['parameters'] extends {path: {}} ? operations['GetTrackingTaxCollection']['parameters']["path"] : {})
1770
+
1771
+ type GetTrackingTaxCollectionResponse = operations['GetTrackingTaxCollection']['responses']['200']['content']['application/json'][0]
1772
+ type GetTrackingTaxCollectionResponsePromise = Promise<{ items: {fields: GetTrackingTaxCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1773
+
1774
+ type GetTrackingTaxRequest = { id : String }
1775
+
1776
+ type GetTrackingTaxResponse = operations['GetTrackingTax']['responses']['200']['content']['application/json']
1777
+ type GetTrackingTaxResponsePromise = Promise<{fields: GetTrackingTaxResponse}>
1778
+
1769
1779
  type GetTrackingListCollectionRequest = operations['GetTrackingListCollection']['parameters']["query"] & (operations['GetTrackingListCollection']['parameters'] extends {path: {}} ? operations['GetTrackingListCollection']['parameters']["path"] : {})
1770
1780
 
1771
1781
  type GetTrackingListCollectionResponse = operations['GetTrackingListCollection']['responses']['200']['content']['application/json'][0]
@@ -3988,12 +3998,12 @@ export interface coreComponents {
3988
3998
  comments?: string | null;
3989
3999
  _links?: coreComponents["schemas"]["SelfLink"];
3990
4000
  };
3991
- /** Unique resource ID. Defaults to UUID v4. */
3992
- ResourceId: string;
3993
4001
  /** Date and time which is set automatically when the resource is created. */
3994
4002
  CreatedTime: string;
3995
4003
  /** Date and time which updates automatically when the resource is updated. */
3996
4004
  UpdatedTime: string;
4005
+ /** Unique resource ID. Defaults to UUID v4. */
4006
+ ResourceId: string;
3997
4007
  /**
3998
4008
  * Use tags to organize and categorize customers or KYC documents based on keywords.
3999
4009
  * For more information, see [Tags](https://www.rebilly.com/docs/dev-docs/api/tag/Tags/).
@@ -4018,7 +4028,8 @@ export interface coreComponents {
4018
4028
  };
4019
4029
  /** AML check result. */
4020
4030
  AmlCheck: {
4021
- id?: coreComponents["schemas"]["ResourceId"];
4031
+ /** Unique resource ID. */
4032
+ id?: string;
4022
4033
  createdTime?: coreComponents["schemas"]["CreatedTime"];
4023
4034
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
4024
4035
  /** Website ID associated with the customer. */
@@ -4276,7 +4287,7 @@ export interface coreComponents {
4276
4287
  };
4277
4288
  Blocklist: {
4278
4289
  /** ID of the blocklist. */
4279
- id?: coreComponents["schemas"]["ResourceId"];
4290
+ id?: string;
4280
4291
  /** Type of blocklist. */
4281
4292
  type:
4282
4293
  | "payment-card"
@@ -4530,7 +4541,7 @@ export interface coreComponents {
4530
4541
  };
4531
4542
  CustomerCredential: {
4532
4543
  /** ID of the credential. */
4533
- id?: coreComponents["schemas"]["ResourceId"];
4544
+ id?: string;
4534
4545
  /** Username associated with the credential. */
4535
4546
  username: string;
4536
4547
  /** Password associated with the credential. */
@@ -5896,6 +5907,7 @@ export interface coreComponents {
5896
5907
  | "PayPal"
5897
5908
  | "Payper"
5898
5909
  | "Payr"
5910
+ | "PayRetailers"
5899
5911
  | "Paysafe"
5900
5912
  | "Paysafecard"
5901
5913
  | "Paysafecash"
@@ -6207,6 +6219,7 @@ export interface coreComponents {
6207
6219
  | "PayPal"
6208
6220
  | "Payper"
6209
6221
  | "Payr"
6222
+ | "PayRetailers"
6210
6223
  | "PayTabs"
6211
6224
  | "PayULatam"
6212
6225
  | "Payvision"
@@ -6392,7 +6405,7 @@ export interface coreComponents {
6392
6405
  } | null;
6393
6406
  Transaction: coreComponents["schemas"]["CommonTransaction"] & {
6394
6407
  /** ID of the gateway account that processed the transaction. */
6395
- gatewayAccountId?: coreComponents["schemas"]["ResourceId"];
6408
+ gatewayAccountId?: string;
6396
6409
  /** ID of the gateway transaction. */
6397
6410
  gatewayTransactionId?: coreComponents["schemas"]["ResourceId"];
6398
6411
  /** Related gateway information. */
@@ -6983,7 +6996,7 @@ export interface coreComponents {
6983
6996
  };
6984
6997
  JournalAccount: {
6985
6998
  /** ID of the journal account. */
6986
- id?: coreComponents["schemas"]["ResourceId"];
6999
+ id?: string;
6987
7000
  /** Name of the journal account. */
6988
7001
  name: string;
6989
7002
  description?: string | null;
@@ -6993,7 +7006,7 @@ export interface coreComponents {
6993
7006
  };
6994
7007
  JournalEntry: {
6995
7008
  /** ID of the journal entry. */
6996
- id?: coreComponents["schemas"]["ResourceId"];
7009
+ id?: string;
6997
7010
  period: {
6998
7011
  startDate?: string;
6999
7012
  endDate?: string;
@@ -7005,7 +7018,8 @@ export interface coreComponents {
7005
7018
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
7006
7019
  };
7007
7020
  JournalRecord: {
7008
- id?: coreComponents["schemas"]["ResourceId"];
7021
+ /** Unique resource ID. */
7022
+ id?: string;
7009
7023
  /** ID of the journal entry. */
7010
7024
  journalEntryId: string;
7011
7025
  /** ID of the customer. */
@@ -19311,6 +19325,20 @@ export interface usersPaths {
19311
19325
  };
19312
19326
  };
19313
19327
  };
19328
+ "/tracking/taxes": {
19329
+ /** Retrieves a collection of tax service tracking logs. */
19330
+ get: operations["GetTrackingTaxCollection"];
19331
+ };
19332
+ "/tracking/taxes/{id}": {
19333
+ /** Retrieves a tax service tracking log with a specified ID. */
19334
+ get: operations["GetTrackingTax"];
19335
+ parameters: {
19336
+ path: {
19337
+ /** ID of the resource. */
19338
+ id: usersComponents["parameters"]["resourceId"];
19339
+ };
19340
+ };
19341
+ };
19314
19342
  "/tracking/lists": {
19315
19343
  /** Retrieves the change history of value lists. */
19316
19344
  get: operations["GetTrackingListCollection"];
@@ -19440,12 +19468,12 @@ export interface usersComponents {
19440
19468
  /** Type of link. */
19441
19469
  rel?: "self";
19442
19470
  }[];
19443
- /** Unique resource ID. Defaults to UUID v4. */
19444
- ResourceId: string;
19445
19471
  /** Date and time which is set automatically when the resource is created. */
19446
19472
  CreatedTime: string;
19447
19473
  /** Date and time which updates automatically when the resource is updated. */
19448
19474
  UpdatedTime: string;
19475
+ /** Unique resource ID. Defaults to UUID v4. */
19476
+ ResourceId: string;
19449
19477
  /** RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object. */
19450
19478
  BaseProblem: {
19451
19479
  /**
@@ -20388,6 +20416,7 @@ export interface usersComponents {
20388
20416
  | "PayPal"
20389
20417
  | "Payper"
20390
20418
  | "Payr"
20419
+ | "PayRetailers"
20391
20420
  | "Paysafe"
20392
20421
  | "Paysafecard"
20393
20422
  | "Paysafecash"
@@ -20699,6 +20728,7 @@ export interface usersComponents {
20699
20728
  | "PayPal"
20700
20729
  | "Payper"
20701
20730
  | "Payr"
20731
+ | "PayRetailers"
20702
20732
  | "PayTabs"
20703
20733
  | "PayULatam"
20704
20734
  | "Payvision"
@@ -20884,7 +20914,7 @@ export interface usersComponents {
20884
20914
  } | null;
20885
20915
  Transaction: usersComponents["schemas"]["CommonTransaction"] & {
20886
20916
  /** ID of the gateway account that processed the transaction. */
20887
- gatewayAccountId?: usersComponents["schemas"]["ResourceId"];
20917
+ gatewayAccountId?: string;
20888
20918
  /** ID of the gateway transaction. */
20889
20919
  gatewayTransactionId?: usersComponents["schemas"]["ResourceId"];
20890
20920
  /** Related gateway information. */
@@ -21633,7 +21663,7 @@ export interface usersComponents {
21633
21663
  };
21634
21664
  BroadcastMessage: {
21635
21665
  /** ID of the broadcast message. */
21636
- id?: usersComponents["schemas"]["ResourceId"];
21666
+ id?: string;
21637
21667
  /**
21638
21668
  * Use this filter to select customers during broadcast message processing.
21639
21669
  *
@@ -21751,7 +21781,7 @@ export interface usersComponents {
21751
21781
  CheckoutFormPlans: usersComponents["schemas"]["CheckoutFormPlan"][];
21752
21782
  CommonCheckoutForm: {
21753
21783
  /** ID of the checkout form. */
21754
- id?: usersComponents["schemas"]["ResourceId"];
21784
+ id?: string;
21755
21785
  websiteId: usersComponents["schemas"]["WebsiteId"];
21756
21786
  /** Custom domain for the checkout form. */
21757
21787
  customDomain?: string | null;
@@ -21956,7 +21986,6 @@ export interface usersComponents {
21956
21986
  MailgunCredential: usersComponents["schemas"]["Credential"] & {
21957
21987
  /** Type of credential. */
21958
21988
  type?: "mailgun";
21959
- hash?: usersComponents["schemas"]["ResourceId"];
21960
21989
  /** Address from which emails are sent. */
21961
21990
  emailFrom: string;
21962
21991
  /** Mailgun API key. */
@@ -22547,7 +22576,8 @@ export interface usersComponents {
22547
22576
  };
22548
22577
  "gateway-account-weights": usersComponents["schemas"]["GatewayAccountPickInstruction"] & {
22549
22578
  weightedList: {
22550
- gatewayAccountId: usersComponents["schemas"]["ResourceId"];
22579
+ /** Unique resource ID. */
22580
+ gatewayAccountId: string;
22551
22581
  weight: number;
22552
22582
  }[];
22553
22583
  };
@@ -22937,7 +22967,7 @@ export interface usersComponents {
22937
22967
  /** Gateway account details. */
22938
22968
  GatewayAccount: {
22939
22969
  /** ID of the payment gateway account. */
22940
- id?: usersComponents["schemas"]["ResourceId"];
22970
+ id?: string;
22941
22971
  gatewayName: usersComponents["schemas"]["GatewayName"];
22942
22972
  acquirerName: usersComponents["schemas"]["AcquirerName"];
22943
22973
  method: usersComponents["schemas"]["PaymentMethod"];
@@ -24945,6 +24975,16 @@ export interface usersComponents {
24945
24975
  apiSecurityToken?: string;
24946
24976
  };
24947
24977
  };
24978
+ /** PayRetailers gateway configuration. */
24979
+ PayRetailers: usersComponents["schemas"]["GatewayAccount"] & {
24980
+ /** PayRetailers credentials object. */
24981
+ credentials: {
24982
+ /** ID of the PayRetailers shop. */
24983
+ shopId: string;
24984
+ /** Secret key value of the PayRetailers API. */
24985
+ secretKey: string;
24986
+ };
24987
+ };
24948
24988
  /** Paysafe 3DS servers. */
24949
24989
  Paysafe3dsServers: {
24950
24990
  name: "Paysafe3dsServer";
@@ -26031,7 +26071,7 @@ export interface usersComponents {
26031
26071
  usersComponents["schemas"]["ValidationErrorExtensions"];
26032
26072
  GatewayAccountDowntimeSchedule: {
26033
26073
  /** ID of the gateway account downtime schedule. */
26034
- id?: usersComponents["schemas"]["ResourceId"];
26074
+ id?: string;
26035
26075
  /** Status of the gateway account downtime schedule. */
26036
26076
  status?: "pending" | "ongoing" | "finished";
26037
26077
  /** Reason for the gateway account downtime schedule. */
@@ -26239,7 +26279,7 @@ export interface usersComponents {
26239
26279
  };
26240
26280
  ValueList: {
26241
26281
  /** ID of the list. */
26242
- id?: usersComponents["schemas"]["ResourceId"];
26282
+ id?: string;
26243
26283
  /** Version of the list. */
26244
26284
  version?: number;
26245
26285
  /** Description of the list. */
@@ -26909,17 +26949,17 @@ export interface usersComponents {
26909
26949
  /** API request tracking. */
26910
26950
  ApiTracking: {
26911
26951
  id?: usersComponents["schemas"]["ResourceId"];
26912
- /** HTTP response code. */
26952
+ /** Response code of the HTTP request. */
26913
26953
  status?: number;
26914
- /** Address of the API request. */
26954
+ /** URL of the HTTP request. */
26915
26955
  url?: string;
26916
26956
  /** API request route. */
26917
26957
  route?: string;
26918
26958
  /** HTTP method of the API request. */
26919
26959
  method?: "HEAD" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
26920
- /** Request JSON-string. */
26960
+ /** Request body of the HTTP request. */
26921
26961
  request?: string;
26922
- /** Response JSON-string. */
26962
+ /** Response body of the HTTP request. */
26923
26963
  response?: string;
26924
26964
  requestHeaders?: usersComponents["schemas"]["HttpHeaders"];
26925
26965
  responseHeaders?: usersComponents["schemas"]["HttpHeaders"];
@@ -26961,6 +27001,46 @@ export interface usersComponents {
26961
27001
  createdTime?: usersComponents["schemas"]["CreatedTime"];
26962
27002
  updatedTime?: usersComponents["schemas"]["UpdatedTime"];
26963
27003
  _links?: usersComponents["schemas"]["SelfLink"];
27004
+ /** Embedded objects that are requested by the `expand` query parameter. */
27005
+ _embedded?: {
27006
+ organization?: { [key: string]: any };
27007
+ };
27008
+ };
27009
+ /** Tax service tracking logs. */
27010
+ TaxTracking: {
27011
+ id?: usersComponents["schemas"]["ResourceId"];
27012
+ /** Response code of the HTTP request. */
27013
+ status?: number;
27014
+ /** Duration of the HTTP request in milliseconds. */
27015
+ duration?: number;
27016
+ /** Date and time the HTTP request is initiated. */
27017
+ initiatedTime?: usersComponents["schemas"]["ServerTimestamp"];
27018
+ /** URL of the tax service endpoint. */
27019
+ url?: string;
27020
+ /** Method of the HTTP request. */
27021
+ method?: string;
27022
+ /** Request body of the HTTP request. */
27023
+ request?: string;
27024
+ /** Response body of the HTTP request. */
27025
+ response?: string;
27026
+ requestHeaders?: usersComponents["schemas"]["HttpHeaders"];
27027
+ responseHeaders?: usersComponents["schemas"]["HttpHeaders"];
27028
+ /** Name of the tax service used for the request. */
27029
+ taxService?: "taxjar" | "avalara";
27030
+ /** Source of the credentials that are used to send or retrieve data. */
27031
+ taxServiceCredentialSource?: "default" | "merchant";
27032
+ /** ID of the resource associated with the tax service request. */
27033
+ entityId?: string;
27034
+ /** ID of the customer associated with the tax service request. */
27035
+ customerId?: string;
27036
+ organizationId?: usersComponents["schemas"]["OrganizationId"];
27037
+ /** Related links. */
27038
+ _links?: {
27039
+ /** Link URL. */
27040
+ href?: string;
27041
+ /** Type of link. */
27042
+ rel?: "self" | "invoice";
27043
+ }[];
26964
27044
  };
26965
27045
  /**
26966
27046
  * Webhook tracking lists up to the 1,000 most-recently delivered webhooks.
@@ -32043,10 +32123,14 @@ export interface operations {
32043
32123
  filter?: usersComponents["parameters"]["collectionFilter"];
32044
32124
  /** Use this field to perform a partial search of text fields. */
32045
32125
  q?: usersComponents["parameters"]["collectionQuery"];
32046
- };
32047
- header: {
32048
- /** Response media type. */
32049
- Accept?: "application/json" | "text/csv";
32126
+ /**
32127
+ * Expands a request to include embedded objects within the `_embedded`
32128
+ * property of the response. This field accepts a comma-separated list of objects.
32129
+ *
32130
+ * For more information, see
32131
+ * [Expand to include embedded objects](https://all-rebilly.redoc.ly/#section/Expand-to-include-embedded-objects).
32132
+ */
32133
+ expand?: usersComponents["parameters"]["collectionExpand"];
32050
32134
  };
32051
32135
  };
32052
32136
  responses: {
@@ -32081,6 +32165,63 @@ export interface operations {
32081
32165
  404: usersComponents["responses"]["NotFound"];
32082
32166
  };
32083
32167
  };
32168
+ /** Retrieves a collection of tax service tracking logs. */
32169
+ GetTrackingTaxCollection: {
32170
+ parameters: {
32171
+ query: {
32172
+ /** Limits the number of collection items to be returned. */
32173
+ limit?: usersComponents["parameters"]["collectionLimit"];
32174
+ /** Specifies the starting point within the collection of items to be returned. */
32175
+ offset?: usersComponents["parameters"]["collectionOffset"];
32176
+ /**
32177
+ * Sorts and orders the collection of items. To sort in descending
32178
+ * order, prefix with `-`.
32179
+ */
32180
+ sort?: usersComponents["parameters"]["collectionSort"];
32181
+ /**
32182
+ * Filters the collection items. This field requires
32183
+ * a special format. Use `,` for multiple allowed values. Use `;` for multiple fields.
32184
+ *
32185
+ * For more information, see
32186
+ * [Using filter with collections](https://all-rebilly.redoc.ly/#section/Using-filter-with-collections).
32187
+ */
32188
+ filter?: usersComponents["parameters"]["collectionFilter"];
32189
+ /** Use this field to perform a partial search of text fields. */
32190
+ q?: usersComponents["parameters"]["collectionQuery"];
32191
+ };
32192
+ };
32193
+ responses: {
32194
+ /** Tax logs retrieved. */
32195
+ 200: {
32196
+ headers: {};
32197
+ content: {
32198
+ "application/json": usersComponents["schemas"]["TaxTracking"][];
32199
+ };
32200
+ };
32201
+ 401: usersComponents["responses"]["Unauthorized"];
32202
+ 403: usersComponents["responses"]["Forbidden"];
32203
+ };
32204
+ };
32205
+ /** Retrieves a tax service tracking log with a specified ID. */
32206
+ GetTrackingTax: {
32207
+ parameters: {
32208
+ path: {
32209
+ /** ID of the resource. */
32210
+ id: usersComponents["parameters"]["resourceId"];
32211
+ };
32212
+ };
32213
+ responses: {
32214
+ /** Tax log retrieved. */
32215
+ 200: {
32216
+ content: {
32217
+ "application/json": usersComponents["schemas"]["TaxTracking"];
32218
+ };
32219
+ };
32220
+ 401: usersComponents["responses"]["Unauthorized"];
32221
+ 403: usersComponents["responses"]["Forbidden"];
32222
+ 404: usersComponents["responses"]["NotFound"];
32223
+ };
32224
+ };
32084
32225
  /** Retrieves the change history of value lists. */
32085
32226
  GetTrackingListCollection: {
32086
32227
  parameters: {
@@ -33016,12 +33157,12 @@ export interface storefrontComponents {
33016
33157
  /** Type of link. */
33017
33158
  rel?: "self";
33018
33159
  }[];
33019
- /** Unique resource ID. Defaults to UUID v4. */
33020
- ResourceId: string;
33021
33160
  /** Date and time which is set automatically when the resource is created. */
33022
33161
  CreatedTime: string;
33023
33162
  /** Date and time which updates automatically when the resource is updated. */
33024
33163
  UpdatedTime: string;
33164
+ /** Unique resource ID. Defaults to UUID v4. */
33165
+ ResourceId: string;
33025
33166
  /** RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object. */
33026
33167
  BaseProblem: {
33027
33168
  /**
@@ -33740,6 +33881,7 @@ export interface storefrontComponents {
33740
33881
  | "PayPal"
33741
33882
  | "Payper"
33742
33883
  | "Payr"
33884
+ | "PayRetailers"
33743
33885
  | "Paysafe"
33744
33886
  | "Paysafecard"
33745
33887
  | "Paysafecash"
@@ -35333,7 +35475,7 @@ export interface storefrontComponents {
35333
35475
  CheckoutFormPlans: storefrontComponents["schemas"]["CheckoutFormPlan"][];
35334
35476
  CommonCheckoutForm: {
35335
35477
  /** ID of the checkout form. */
35336
- id?: storefrontComponents["schemas"]["ResourceId"];
35478
+ id?: string;
35337
35479
  websiteId: storefrontComponents["schemas"]["WebsiteId"];
35338
35480
  /** Custom domain for the checkout form. */
35339
35481
  customDomain?: string | null;
@@ -37986,12 +38128,12 @@ export interface reportsPaths {
37986
38128
 
37987
38129
  export interface reportsComponents {
37988
38130
  schemas: {
37989
- /** Unique resource ID. Defaults to UUID v4. */
37990
- ResourceId: string;
37991
38131
  /** Date and time which is set automatically when the resource is created. */
37992
38132
  CreatedTime: string;
37993
38133
  /** Date and time which updates automatically when the resource is updated. */
37994
38134
  UpdatedTime: string;
38135
+ /** Unique resource ID. Defaults to UUID v4. */
38136
+ ResourceId: string;
37995
38137
  /** RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object. */
37996
38138
  BaseProblem: {
37997
38139
  /**
@@ -42026,10 +42168,14 @@ declare module "resources/tracking-resource" {
42026
42168
  export default function TrackingResource({ apiHandler }: {
42027
42169
  apiHandler: any;
42028
42170
  }): {
42029
- getAllApiLogs({ limit, offset, sort, filter, q, }?: rebilly.GetTrackingApiCollectionRequest): rebilly.GetTrackingApiCollectionResponsePromise;
42171
+ getAllApiLogs({ limit, offset, sort, filter, q, expand, }?: rebilly.GetTrackingApiCollectionRequest): rebilly.GetTrackingApiCollectionResponsePromise;
42030
42172
  getApiLog({ id }: {
42031
42173
  id: any;
42032
42174
  }): rebilly.GetTrackingApiResponsePromise;
42175
+ getAllTaxTrackingLogs({ limit, offset, sort, filter, q, }?: rebilly.GetTrackingTaxCollectionRequest): rebilly.GetTrackingTaxCollectionResponsePromise;
42176
+ getTaxTrackingLog({ id }: {
42177
+ id: any;
42178
+ }): rebilly.GetTrackingTaxResponsePromise;
42033
42179
  getAllListsChangesHistory({ limit, offset, sort, filter, q, }?: rebilly.GetTrackingListCollectionRequest): rebilly.GetTrackingListCollectionResponsePromise;
42034
42180
  getAllWebhookTrackingLogs({ limit, offset, sort, filter, q, }?: rebilly.GetTrackingWebhookCollectionRequest): rebilly.GetTrackingWebhookCollectionResponsePromise;
42035
42181
  getWebhookTrackingLog({ id }: {
@@ -43909,16 +44055,27 @@ declare module "resources/api-instance" {
43909
44055
  }): any;
43910
44056
  };
43911
44057
  tracking: {
43912
- getAllApiLogs({ limit, offset, sort, filter, q, }?: {
44058
+ getAllApiLogs({ limit, offset, sort, filter, q, expand, }?: {
43913
44059
  limit?: number;
43914
44060
  offset?: number;
43915
44061
  sort?: string[];
43916
44062
  filter?: string;
43917
44063
  q?: string;
44064
+ expand?: string;
43918
44065
  }): rebilly.GetTrackingApiCollectionResponsePromise;
43919
44066
  getApiLog({ id }: {
43920
44067
  id: any;
43921
44068
  }): rebilly.GetTrackingApiResponsePromise;
44069
+ getAllTaxTrackingLogs({ limit, offset, sort, filter, q, }?: {
44070
+ limit?: number;
44071
+ offset?: number;
44072
+ sort?: string[];
44073
+ filter?: string;
44074
+ q?: string;
44075
+ }): rebilly.GetTrackingTaxCollectionResponsePromise;
44076
+ getTaxTrackingLog({ id }: {
44077
+ id: any;
44078
+ }): rebilly.GetTrackingTaxResponsePromise;
43922
44079
  getAllListsChangesHistory({ limit, offset, sort, filter, q, }?: {
43923
44080
  limit?: number;
43924
44081
  offset?: number;
@@ -538,7 +538,7 @@ function cloneArrayDeep(arr, instanceClone) {
538
538
  return res;
539
539
  }
540
540
  var cloneDeep_1 = cloneDeep;
541
- const version = "48.4.0";
541
+ const version = "48.6.0";
542
542
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
543
543
  let nanoid = (size = 21) => {
544
544
  let id = "";
@@ -2958,14 +2958,28 @@ function TrackingResource({ apiHandler }) {
2958
2958
  offset = null,
2959
2959
  sort = null,
2960
2960
  filter = null,
2961
- q = null
2961
+ q = null,
2962
+ expand = null
2962
2963
  } = {}) {
2963
- const params = { limit, offset, sort, filter, q };
2964
+ const params = { limit, offset, sort, filter, q, expand };
2964
2965
  return apiHandler.getAll(`tracking/api`, params);
2965
2966
  },
2966
2967
  getApiLog({ id }) {
2967
2968
  return apiHandler.get(`tracking/api/${id}`);
2968
2969
  },
2970
+ getAllTaxTrackingLogs({
2971
+ limit = null,
2972
+ offset = null,
2973
+ sort = null,
2974
+ filter = null,
2975
+ q = null
2976
+ } = {}) {
2977
+ const params = { limit, offset, sort, filter, q };
2978
+ return apiHandler.getAll(`tracking/taxes`, params);
2979
+ },
2980
+ getTaxTrackingLog({ id }) {
2981
+ return apiHandler.get(`tracking/taxes/${id}`);
2982
+ },
2969
2983
  getAllListsChangesHistory({
2970
2984
  limit = null,
2971
2985
  offset = null,
@@ -1,4 +1,4 @@
1
- var nn=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var sn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable;var B=(m,h,$)=>h in m?nn(m,h,{enumerable:!0,configurable:!0,writable:!0,value:$}):m[h]=$,C=(m,h)=>{for(var $ in h||(h={}))sn.call(h,$)&&B(m,$,h[$]);if(ne)for(var $ of ne(h))un.call(h,$)&&B(m,$,h[$]);return m};var N=(m,h,$)=>(B(m,typeof h!="symbol"?h+"":h,$),$);(function(m,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],h):(m=typeof globalThis!="undefined"?globalThis:m||self,h(m["rebilly-js-sdk"]={},m.axios))})(this,function(m,h){"use strict";function $(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var P=$(h);function x(r,{exclude:e=[]}={}){Object.freeze(r);const t=typeof r=="function";return Object.getOwnPropertyNames(r).forEach(n=>{(t?n!=="caller"&&n!=="callee"&&n!=="arguments":!0)&&r[n]!==null&&!e.includes(n)&&(typeof r[n]=="object"||typeof r[n]=="function")&&!Object.isFrozen(r[n])&&x(r[n],{exclude:e})}),r}class V{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.response={status:t,statusText:n,headers:s},this.fields=C({},e),this.config=u,x(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const z={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class se{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(z).forEach(l=>{const o=s[z[l]];this[l]=o?Number(o):null}),this.response={status:t,statusText:n,headers:s},this.items=e.map(l=>new V({data:l,status:t,statusText:n,headers:s})),this.config=u,x(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class ue{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.response={status:t,statusText:n,headers:s},this.data=e,this.config=u}}class A extends Error{constructor({error:e,name:t=null}){let{config:n=null,response:s=null,request:u=null,message:l=null}=e,o=l||"Request Error";s&&s.data&&s.data.error&&(o=s.data.error);super(o);this.name=t||"RebillyError",this.response=s,this.request=u,this.config=n,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}}class le extends A{constructor(e){super({error:e,name:"RebillyRequestError"})}}class oe extends A{constructor(e){super({error:e,name:"RebillyValidationError"})}}class ce extends A{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ie extends A{constructor(e){super({error:e,name:"RebillyConflictError"})}}class ae extends A{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ge extends A{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class me extends A{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class he extends A{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const y={RebillyError:A,RebillyRequestError:le,RebillyValidationError:oe,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ae,RebillyMethodNotAllowedError:ge,RebillyTimeoutError:me,RebillyCanceledError:he};/*!
1
+ var nn=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var sn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable;var B=(m,h,$)=>h in m?nn(m,h,{enumerable:!0,configurable:!0,writable:!0,value:$}):m[h]=$,C=(m,h)=>{for(var $ in h||(h={}))sn.call(h,$)&&B(m,$,h[$]);if(ne)for(var $ of ne(h))un.call(h,$)&&B(m,$,h[$]);return m};var N=(m,h,$)=>(B(m,typeof h!="symbol"?h+"":h,$),$);(function(m,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],h):(m=typeof globalThis!="undefined"?globalThis:m||self,h(m["rebilly-js-sdk"]={},m.axios))})(this,function(m,h){"use strict";function $(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var P=$(h);function x(r,{exclude:e=[]}={}){Object.freeze(r);const t=typeof r=="function";return Object.getOwnPropertyNames(r).forEach(n=>{(t?n!=="caller"&&n!=="callee"&&n!=="arguments":!0)&&r[n]!==null&&!e.includes(n)&&(typeof r[n]=="object"||typeof r[n]=="function")&&!Object.isFrozen(r[n])&&x(r[n],{exclude:e})}),r}class L{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.response={status:t,statusText:n,headers:s},this.fields=C({},e),this.config=u,x(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const V={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class se{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(V).forEach(l=>{const o=s[V[l]];this[l]=o?Number(o):null}),this.response={status:t,statusText:n,headers:s},this.items=e.map(l=>new L({data:l,status:t,statusText:n,headers:s})),this.config=u,x(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class ue{constructor({data:e,status:t,statusText:n,headers:s},u={}){this.response={status:t,statusText:n,headers:s},this.data=e,this.config=u}}class A extends Error{constructor({error:e,name:t=null}){let{config:n=null,response:s=null,request:u=null,message:l=null}=e,o=l||"Request Error";s&&s.data&&s.data.error&&(o=s.data.error);super(o);this.name=t||"RebillyError",this.response=s,this.request=u,this.config=n,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}}class le extends A{constructor(e){super({error:e,name:"RebillyRequestError"})}}class oe extends A{constructor(e){super({error:e,name:"RebillyValidationError"})}}class ce extends A{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class ie extends A{constructor(e){super({error:e,name:"RebillyConflictError"})}}class ae extends A{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class ge extends A{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class me extends A{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class he extends A{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const y={RebillyError:A,RebillyRequestError:le,RebillyValidationError:oe,RebillyNotFoundError:ce,RebillyConflictError:ie,RebillyForbiddenError:ae,RebillyMethodNotAllowedError:ge,RebillyTimeoutError:me,RebillyCanceledError:he};/*!
2
2
  * isobject <https://github.com/jonschlinkert/isobject>
3
3
  *
4
4
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -8,7 +8,7 @@ var nn=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var sn=Object.p
8
8
  *
9
9
  * Copyright (c) 2014-2017, Jon Schlinkert.
10
10
  * Released under the MIT License.
11
- */var $e=fe;function L(r){return $e(r)===!0&&Object.prototype.toString.call(r)==="[object Object]"}var pe=function(e){var t,n;return!(L(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,L(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*!
11
+ */var $e=fe;function z(r){return $e(r)===!0&&Object.prototype.toString.call(r)==="[object Object]"}var pe=function(e){var t,n;return!(z(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,z(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*!
12
12
  * is-extendable <https://github.com/jonschlinkert/is-extendable>
13
13
  *
14
14
  * Copyright (c) 2015, Jon Schlinkert.
@@ -33,4 +33,4 @@ var nn=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var sn=Object.p
33
33
  *
34
34
  * Copyright (c) 2014-2017, Jon Schlinkert.
35
35
  * Released under the MIT License.
36
- */var qe=Pe,Me=Object.prototype.hasOwnProperty,Oe=function(e,t,n){qe(e,function(s,u){if(Me.call(e,u))return t.call(n,e[u],u,e)})},De=pe,Fe=Ie,Ke=xe,Be=Oe;function q(r,e){switch(Ke(r)){case"object":return Ne(r,e);case"array":return Ve(r,e);default:return Fe(r)}}function Ne(r,e){if(De(r)){var t={};return Be(r,function(n,s){this[s]=q(n,e)},t),t}else return e?e(r):r}function Ve(r,e){for(var t=r.length,n=[],s=-1;++s<t;)n[s]=q(r[s],e);return n}var ze=q;const Le="48.4.0";let Ue="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",We=(r=21)=>{let e="",t=r;for(;t--;)e+=Ue[Math.random()*64|0];return e};class Je{constructor({id:e=null,created:t=null}={}){this.id=e||We(),this.created=t||new Date().getTime(),this.cancelSource=P.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,x(this,{exclude:["cancelSource","cancelToken","cancel"]})}}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 Je;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}var E=new S;class j{}N(j,"cancelById",(e,t)=>{try{E.getById(e).cancel(t),E.deleteById(e)}catch{}}),N(j,"cancelAll",e=>E.getAll().forEach(t=>{t.cancel(e),E.deleteById(t.id)}));var Ge={cancelAll:(...r)=>j.cancelAll(...r)};const d={request:"request",response:"response"},J=r=>{if(!Object.values(d).includes(r))throw new Error(`There is no such interceptor type as "${r}"`);return!0};function M({options:r}){const e=t();function t(){return P.default.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:r.requestTimeout,headers:l()}}function u(){let c=r.isSandbox?r.apiEndpoints.sandbox:r.apiEndpoints.live;return r.apiVersion&&(c=`${c}/${r.apiVersion}`),r.organizationId&&(c=`${c}/organizations/${r.organizationId}`),`${c}`}function l(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Le}`};return r.apiKey&&(c["REB-APIKEY"]=r.apiKey),c}function o(){return ze(e.defaults.headers)}function g(c){r.requestTimeout=Number(c),e.defaults.timeout=r.requestTimeout}function p(c=r.jwt){const i=o();r.apiKey=null,r.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=r.publishableKey){const i=o();r.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function F({host:c,port:i,auth:a}){e.defaults.proxy={host:c,port:i,auth:a}}function K({live:c=null,sandbox:i=null}){c&&(r.apiEndpoints.live=c),i&&(r.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function _(c,{thenDelegate:i,catchDelegate:a=()=>{}}){return J(c)&&e.interceptors[d[c]].use(i,a)}function Q(c,i){return J(c)&&e.interceptors[d[c]].eject(i)}function Ur({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.request,{thenDelegate:c,catchDelegate:i})}function Wr(c){Q(d.request,c)}function Jr({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.response,{thenDelegate:c,catchDelegate:i})}function Gr(c){Q(d.response,c)}function T({request:c,isCollection:i,config:a}){const f=Z(a),{id:b,cancelToken:rn}=E.save();f.cancelToken=rn;const re=async function(){try{const I=await c(f);return Yr({response:I,isCollection:i,config:f})}catch(I){return X({error:I,config:f})}finally{E.deleteById(b)}}();return re.cancel=I=>j.cancelById(b,I),re}function Yr({response:c,isCollection:i,config:a}){return i?new se(c,a):new V(c,a)}function X({error:c}){if(P.default.isCancel(c))throw new y.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new y.RebillyForbiddenError(c);case 404:throw new y.RebillyNotFoundError(c);case 405:throw new y.RebillyMethodNotAllowedError(c);case 409:throw new y.RebillyConflictError(c);case 422:throw new y.RebillyValidationError(c);default:throw new y.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new y.RebillyTimeoutError(c):new y.RebillyRequestError(c)}function _r(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,a)=>(i[a]=c.params[a],i),{})),c}function Z(c={}){const i=_r(c);return C({},i)}function H(c,i={}){return T({request:a=>e.get(c,a),config:{params:i}})}function Qr(c,i){return T({request:a=>e.get(c,a),config:{params:i},isCollection:!0})}function ee(c,i,a={}){let f={};return a.authenticate===!1&&(f={headers:o()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),a.params&&(f.params=C({},a.params)),T({request:b=>e.post(c,i,b),config:f})}function te(c,i,a={}){return T({request:f=>e.put(c,i,f),config:{params:a}})}function Xr(c,i){return T({request:a=>e.patch(c,i,a),config:{}})}function Zr(c){return T({request:i=>e.delete(c,i),config:{}})}function Hr(c,i){return T({request:a=>e.delete(c,a),config:{data:C({},i)}})}async function en(c,i,a,f={}){if(i==="")return ee(c,a,{params:f});try{if((await H(c)).response.status===200)throw new y.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(b){if(b.name==="RebillyNotFoundError")return te(c,a,f);throw b}}async function tn(c,i){const a=Z(i);try{const f=await e.get(c,a);return new ue(f,a)}catch(f){return X({error:f,config:a})}}return{getInstance:n,addRequestInterceptor:Ur,removeRequestInterceptor:Wr,addResponseInterceptor:Jr,removeResponseInterceptor:Gr,setTimeout:g,setProxyAgent:F,setSessionToken:p,setPublishableKey:k,setEndpoints:K,get:H,getAll:Qr,post:ee,put:te,patch:Xr,delete:Zr,deleteAll:Hr,create:en,download:tn}}function Ye({apiHandler:r}){return{activate({token:e}){return r.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return r.post("forgot-password",e,{authenticate:!1})},logout(){return r.post("logout")},signIn({data:e}){return r.post("signin",e,{authenticate:!1})},signUp({data:e}){return r.post("signup",e,{authenticate:!1})}}}function _e({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("aml-checks",l)},get({id:e}){return r.get(`aml-checks/${e}`)},review({id:e,data:t}){return r.post(`aml-checks/${e}/review`,t)}}}function Qe({apiHandler:r}){return{getAll({firstName:e,lastName:t,dob:n=null,country:s=null}){const u={firstName:e,lastName:t,dob:n,country:s};return r.get("aml",u)}}}function Xe({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null}={}){const s={limit:e,offset:t,sort:n};return r.getAll("api-keys",s)},create({id:e="",data:t}){return r.create(`api-keys/${e}`,e,t)},get({id:e}){return r.get(`api-keys/${e}`)},update({id:e,data:t}){return r.put(`api-keys/${e}`,t)},delete({id:e}){return r.delete(`api-keys/${e}`)}}}function Ze({apiHandler:r}){return{get({applicationId:e}){return r.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return r.put(`application-instances/${e}`,t)},delete({applicationId:e}){return r.delete(`application-instances/${e}`)}}}function He({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("applications",g)},create({data:e}){return r.post("applications",e)},get({id:e}){return r.get(`applications/${e}`)},getInstances({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`applications/${e}/instances`,s)},getInstance({id:e,organizationId:t}){return r.get(`applications/${e}/instances/${t}`)}}}function et({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("balance-transactions",n)},get({id:e}){return r.get(`balance-transactions/${e}`)}}}function tt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("billing-portals",l)},create({id:e="",data:t}){return r.create(`billing-portals/${e}`,e,t)},get({id:e}){return r.get(`billing-portals/${e}`)},update({id:e,data:t}){return r.put(`billing-portals/${e}`,t)},delete({id:e}){return r.delete(`billing-portals/${e}`)}}}function rt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("blocklists",l)},create({id:e="",data:t}){return r.create(`blocklists/${e}`,e,t)},get({id:e}){return r.get(`blocklists/${e}`)},delete({id:e}){return r.delete(`blocklists/${e}`)}}}function nt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:t,sort:n,filter:s};return r.getAll("broadcast-messages",u)},create({data:e}){return r.post("broadcast-messages",e)},get({id:e}){return r.get(`broadcast-messages/${e}`)},delete({id:e}){return r.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return r.patch(`broadcast-messages/${e}`,t)}}}function st({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-custom-property-sets",u)},create({id:e="",data:t}){return r.create(`cashier-custom-property-sets/${e}`,e,t)},get({id:e}){return r.get(`cashier-custom-property-sets/${e}`)},update({id:e,data:t}){return r.put(`cashier-custom-property-sets/${e}`,t)},delete({id:e}){return r.delete(`cashier-custom-property-sets/${e}`)}}}function ut({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-requests",u)},create({data:e}){return r.post("cashier-requests",e)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`cashier-requests/${e}`,n)}}}function lt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-strategies",u)},create({id:e="",data:t}){return r.create(`cashier-strategies/${e}`,e,t)},get({id:e}){return r.get(`cashier-strategies/${e}`)},update({id:e,data:t}){return r.put(`cashier-strategies/${e}`,t)},delete({id:e}){return r.delete(`cashier-strategies/${e}`)}}}function ot({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("checkout-forms",l)},create({id:e="",data:t}){return r.create(`checkout-forms/${e}`,e,t)},get({id:e}){return r.get(`checkout-forms/${e}`)},update({id:e,data:t}){return r.put(`checkout-forms/${e}`,t)},delete({id:e}){return r.delete(`checkout-forms/${e}`)}}}function ct({apiHandler:r}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons-redemptions",l)},redeem({data:e}){return r.post("coupons-redemptions",e)},getRedemption({id:e}){return r.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return r.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons",l)},create({id:e="",data:t}){return r.create(`coupons/${e}`,e,t)},get({id:e}){return r.get(`coupons/${e}`)},update({id:e,data:t}){return r.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return r.post(`coupons/${e}/expiration`,t)}}}function it({apiHandler:r}){return{createAWSSESCredential({data:e}){return r.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return r.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return r.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return r.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return r.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return r.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return r.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return r.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return r.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/oauth2",l)},createOAuth2Credential({data:e}){return r.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return r.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return r.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,fields:l=null,sort:o=null}){const g={limit:t,offset:n,filter:s,q:u,fields:l,sort:o};return r.getAll(`credential-hashes/oauth2/${e}/items`,g)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/plaid",l)},createPlaidCredential({data:e}){return r.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return r.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return r.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return r.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return r.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return r.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return r.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return r.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return r.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return r.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return r.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return r.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/experian",l)},createExperianCredential({data:e}){return r.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return r.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return r.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/taxjar",l)},createTaxJarCredential({data:e}){return r.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return r.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return r.patch(`credential-hashes/taxjar/${e}`,t)},getAllAvalaraCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/avalara",l)},createAvalaraCredential({data:e}){return r.post("credential-hashes/avalara",e)},getAvalaraCredential({hash:e}){return r.get(`credential-hashes/avalara/${e}`)},updateAvalaraCredential({hash:e,data:t}){return r.patch(`credential-hashes/avalara/${e}`,t)}}}function at({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("credit-memos",l)},create({id:e="",data:t}){return r.create(`credit-memos/${e}`,e,t)},get({id:e}){return r.get(`credit-memos/${e}`)},update({id:e,data:t}){return r.put(`credit-memos/${e}`,t)},patch({id:e,data:t}){return r.patch(`credit-memos/${e}`,t)},void({id:e}){return r.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`credit-memos/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`credit-memos/${e}/timeline/${t}`)}}}function gt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("custom-domains",l)},create({data:e}){return r.post("custom-domains",e)},get({domain:e}){return r.get(`custom-domains/${e}`)},delete({domain:e}){return r.delete(`custom-domains/${e}`)}}}function mt({apiHandler:r}){return{getAll({resource:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return r.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)},update({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)}}}function ht({apiHandler:r}){return{getAuthOptions(){return r.get("authentication-options")},updateAuthOptions({data:e}){return r.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("authentication-tokens",n)},login({data:e}){return r.post("authentication-tokens",e)},verify({token:e}){return r.get(`authentication-tokens/${e}`)},logout({token:e}){return r.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return r.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("credentials",n)},createCredential({id:e="",data:t}){return r.create(`credentials/${e}`,e,t)},getCredential({id:e}){return r.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return r.put(`credentials/${e}`,t)},deleteCredential({id:e}){return r.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return r.post("password-tokens",e)},getResetPasswordToken({id:e}){return r.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return r.delete(`password-tokens/${e}`)}}}const w={Accept:"text/csv"},G={Accept:"application/pdf"};function ft({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("customers",g)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:n=null}){const s={expand:t,fields:n};return r.get(`customers/${e}`,s)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return r.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return r.get(`customers/${e}/aml`)},getLeadSource({id:e}){return r.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return r.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`customers/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/timeline/${t}`)},getCustomerEddScore({id:e}){return r.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return r.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`customers/${e}/edd-timeline`,o)},createEddTimelineComment({id:e,data:t}){return r.post(`customers/${e}/edd-timeline`,t)},getEddTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/edd-timeline/${t}`)},deleteEddTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/edd-timeline/${t}`)},getAllEddSearchResults({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`customers/${e}/edd-search-results`,s)},getEddSearchResult({id:e,searchResultId:t}){return r.get(`customers/${e}/edd-search-results/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("customers",o)}}}function $t({apiHandler:r}){return{create({data:e}){return r.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return r.post("digital-wallets/validation",e)}}}function pt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("disputes",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`disputes/${e}`,e,t,s)},get({id:e}){return r.get(`disputes/${e}`)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("disputes",o)}}}function yt({apiHandler:r}){return{verify({token:e}){return r.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("email-delivery-settings",l)},create({data:e}){return r.post("email-delivery-settings",e)},get({id:e}){return r.get(`email-delivery-settings/${e}`)},delete({id:e}){return r.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return r.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return r.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function At({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,sort:s=null,filter:u=null}={}){const l={limit:e,offset:t,q:n,sort:s,filter:u};return r.getAll("email-messages",l)},create({data:e}){return r.post("email-messages",e)},get({id:e}){return r.get(`email-messages/${e}`)},delete({id:e}){return r.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return r.patch(`email-messages/${e}`,t)}}}function bt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("email-notifications",n)}}}function Rt({apiHandler:r}){return{getAll(){return r.getAll("events")},get({eventType:e}){return r.get(`events/${e}`)},getRules({eventType:e}){return r.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`events/${e}/timeline`,o)},createTimelineComment({eventType:e,data:t}){return r.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return r.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return r.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:l=null,fields:o=null}){const g={limit:t,offset:n,filter:s,q:u,sort:l,fields:o};return r.getAll(`events/${e}/rules/history`,g)},getRulesVersionNumber({eventType:e,version:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/history/${t}`,s)},getRulesVersionDetail({eventType:e,version:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/versions/${t}`,s)},getAllDraftRulesets({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:l=null,fields:o=null}){const g={limit:t,offset:n,filter:s,q:u,sort:l,fields:o};return r.getAll(`events/${e}/rules/drafts`,g)},createDraftRuleset({eventType:e,data:t}){return r.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/drafts/${t}`,s)},updateDraftRuleset({eventType:e,id:t,data:n}){return r.put(`events/${e}/rules/drafts/${t}`,n)},deleteDraftRuleset({eventType:e,id:t}){return r.delete(`events/${e}/rules/drafts/${t}`)}}}function dt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("fees",n)},create({id:e="",data:t}){return r.create(`fees/${e}`,e,t)},get({id:e}){return r.get(`fees/${e}`)},upsert({id:e,data:t}){return r.put(`fees/${e}`,t)},patch({id:e,data:t}){return r.patch(`fees/${e}`,t)}}}function wt({apiHandler:r}){return{getAllAttachments({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("attachments",g)},attach({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return r.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`attachments/${e}`,t,s)},detach({id:e}){return r.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,fields:u=null,sort:l=null}={}){const o={limit:e,offset:t,filter:n,q:s,fields:u,sort:l};return r.getAll("files",o)},upload({fileObject:e}){return r.post("files",e)},get({id:e}){return r.get(`files/${e}`)},update({id:e,data:t}){return r.put(`files/${e}`,t)},delete({id:e}){return r.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return r.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let n=[];const u=(async()=>{const l=this.getAllAttachments(t);n.push(l);const g=(await l).items.map(k=>this.detach({id:k.fields.id}));n=[...n,g],await Promise.all(g);const p=r.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(l=>l.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const n=[],u=(async()=>{const l=this.upload({fileObject:e});n.push(l),await l;const o={name:l.name,extension:l.extension,description:t.description,tags:t.tags,url:""},g=this.update({id:l.fields.id,data:o});return n.push(g),g})();return u.cancel=()=>{n.forEach(l=>l.cancel())},u}}}function vt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null,fields:l=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u,fields:l};return r.getAll("gateway-accounts",o)},create({id:e="",data:t}){return r.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return r.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return r.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return r.delete(`gateway-accounts/${e}`)},close({id:e}){return r.post(`gateway-accounts/${e}/close`)},disable({id:e}){return r.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null}){const l={limit:t,offset:n,filter:s,sort:u};return r.getAll(`gateway-accounts/${e}/downtime-schedules`,l)},createDowntimeSchedule({id:e,data:t}){return r.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return r.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:n}){return r.put(`gateway-accounts/${e}/downtime-schedules/${t}`,n)},deleteDowntimeSchedule({id:e,downtimeId:t}){return r.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return r.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return r.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return r.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:n}){return r.put(`gateway-accounts/${e}/limits/${t}`,n)},deleteVolumeLimit({id:e,limitId:t}){return r.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`gateway-accounts/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return r.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return r.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return r.put(`gateway-accounts/${e}/financial-settings`,t)}}}function kt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("integrations",n)},get({label:e}){return r.get(`integrations/${e}`)}}}function Tt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("invoices",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`invoices/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:n=null,expand:s=null}){const u={limit:t,offset:n,expand:s};return r.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return r.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return r.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:n}){return r.put(`invoices/${e}/items/${t}`,n)},deleteInvoiceItem({id:e,itemId:t}){return r.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return r.post(`invoices/${e}/issue`,t)},abandon({id:e}){return r.post(`invoices/${e}/abandon`)},void({id:e}){return r.post(`invoices/${e}/void`)},recalculate({id:e}){return r.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return r.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return r.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`invoices/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`invoices/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("invoices",o)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Et({apiHandler:r}){return{getAllAccounts({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("journal-accounts",u)},createAccount({id:e="",data:t}){return r.create(`journal-accounts/${e}`,e,t)},getAccount({id:e}){return r.get(`journal-accounts/${e}`)},updateAccount({id:e,data:t}){return r.put(`journal-accounts/${e}`,t)}}}function St({apiHandler:r}){return{getAllEntries({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("journal-entries",u)},createEntry({id:e="",data:t}){return r.create(`journal-entries/${e}`,e,t)},getEntry({id:e}){return r.get(`journal-entries/${e}`)},updateEntry({id:e,data:t}){return r.put(`journal-entries/${e}`,t)},getAllRecords({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,expand:l=null}){const o={limit:t,offset:n,filter:s,sort:u,expand:l};return r.getAll(`journal-entries/${e}/records`,o)},createRecord({id:e,data:t}){return r.post(`journal-entries/${e}/records`,t)},getRecord({id:e,journalRecordId:t}){return r.get(`journal-entries/${e}/records/${t}`)},updateRecord({id:e,journalRecordId:t,data:n}){return r.put(`journal-entries/${e}/records/${t}`,n)},deleteRecord({id:e,journalRecordId:t}){return r.delete(`journal-entries/${e}/records/${t}`)}}}function It({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,expand:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,expand:u};return r.getAll("kyc-documents",l)},create({id:e="",data:t}){return r.create(`kyc-documents/${e}`,e,t)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.put(`kyc-documents/${e}`,t)},accept({id:e}){return r.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return r.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return r.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return r.post(`kyc-documents/${e}/review`)},startReview({id:e}){return r.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return r.post(`kyc-documents/${e}/stop-review`)}}}function Ct({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("kyc-requests",u)},create({data:e}){return r.post("kyc-requests",e)},get({id:e}){return r.get(`kyc-requests/${e}`)},delete({id:e}){return r.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return r.patch(`kyc-requests/${e}`,t)}}}function xt({apiHandler:r}){return{getKycSettings(){return r.get("kyc-settings")},updateKycSettings({data:e}){return r.put("kyc-settings",e)}}}function jt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,fields:u=null,q:l=null}={}){const o={limit:e,offset:t,filter:n,sort:s,fields:u,q:l};return r.getAll("lists",o)},create({id:e="",data:t}){return r.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return r.get(`lists/${e}`)},update({id:e,data:t}){return r.put(`lists/${e}`,t)},delete({id:e}){return r.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return r.get(`lists/${e}/${t}`)}}}function Pt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("memberships",u)},get({organizationId:e,userId:t}){return r.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:n}){return r.put(`memberships/${e}/${t}`,n)},delete({organizationId:e,userId:t}){return r.delete(`memberships/${e}/${t}`)}}}function qt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("organization-exports",l)},create({data:e}){return r.post("organization-exports",e)},get({id:e}){return r.get(`organization-exports/${e}`)}}}function Mt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:t,filter:n,q:s};return r.getAll("organizations",u)},create({data:e}){return r.post("organizations",e)},get({id:e}){return r.get(`organizations/${e}`)},update({id:e,data:t}){return r.patch(`organizations/${e}`,t)}}}function Ot({apiHandler:r}){return{getAll({limit:e=null,q:t=null}={}){const n={limit:e,q:t};return r.getAll("payment-cards-bank-names",n)}}}function Dt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("payment-instruments",o)},create({data:e}){return r.post("payment-instruments",e)},get({id:e}){return r.get(`payment-instruments/${e}`)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)}}}function Ft({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("payment-methods",n)},get({apiName:e}){return r.get(`payment-methods/${e}`)}}}function Kt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("tokens",n)},create({data:e}){return r.post("tokens",e)},get({token:e}){return r.get(`tokens/${e}`)}}}function Bt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("payout-requests",u)},create({id:e="",data:t}){return r.create(`payout-requests/${e}`,e,t)},get({id:e}){return r.get(`payout-requests/${e}`)},update({id:e,data:t}){return r.put(`payout-requests/${e}`,t)},getPaymentInstruments({id:e}){return r.get(`payout-requests/${e}/payment-instruments`)}}}function Nt({apiHandler:r}){return{create({data:e}){return r.post("payouts",e)}}}function Vt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("plans",l)},create({id:e="",data:t}){return r.create(`plans/${e}`,e,t)},get({id:e}){return r.get(`plans/${e}`)},update({id:e,data:t}){return r.put(`plans/${e}`,t)},delete({id:e}){return r.delete(`plans/${e}`)}}}function zt({apiHandler:r}){return{sendEmailRuleAction({data:e}){return r.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return r.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return r.post("previews/webhooks",e)},order({data:e}){return r.post("previews/orders",e)}}}function Lt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",l)},create({id:e="",data:t}){return r.create(`products/${e}`,e,t)},get({id:e}){return r.get(`products/${e}`)},update({id:e,data:t}){return r.put(`products/${e}`,t)},delete({id:e}){return r.delete(`products/${e}`)}}}function Ut({apiHandler:r}){return{startPermissionsEmulation({data:e}){return r.post("permissions-emulation",e)},stopPermissionsEmulation(){return r.delete("permissions-emulation")},get(){return r.get("profile")},update({data:e}){return r.put("profile",e)},getMfa(){return r.get("profile/mfa")},updateMfa(){return r.post("profile/mfa")},deleteMfa(){return r.delete("profile/mfa")}}}function Wt({apiHandler:r}){return{readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Jt({apiHandler:r}){return{getAll(){return r.get("risk-score-rules")},updateRiskScoreRules({data:e}){return r.put("risk-score-rules",e)},getAllBlocklistRules(){return r.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return r.put("risk-score-rules/blocklists",e)}}}function Gt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null,expand:l=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u,expand:l};return r.getAll("roles",o)},create({id:e="",data:t}){return r.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`roles/${e}`,n)},update({id:e,data:t}){return r.put(`roles/${e}`,t)},delete({id:e}){return r.delete(`roles/${e}`)}}}function Yt({apiHandler:r}){return{get({sort:e=null,limit:t=null,offset:n=null,q:s=null}){const u={sort:e,limit:t,offset:n,q:s};return r.get("search",u)}}}function _t({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("grid-segments",l)},create({id:e="",data:t}){return r.create(`grid-segments/${e}`,e,t)},get({id:e}){return r.get(`grid-segments/${e}`)},update({id:e,data:t}){return r.put(`grid-segments/${e}`,t)},delete({id:e}){return r.delete(`grid-segments/${e}`)}}}function Qt({apiHandler:r}){return{getAll({eventType:e}){return r.getAll(`send-through-attribution/${e}`)}}}function Xt({apiHandler:r}){return{getAll({type:e,filter:t=null,limit:n=null,offset:s=null,sort:u=null,q:l=null}){const o={filter:t,limit:n,offset:s,sort:u,q:l};return r.getAll(`service-credentials/${e}`,o)},create({type:e,data:t}){return r.post(`service-credentials/${e}`,t)},get({type:e,id:t}){return r.get(`service-credentials/${e}/${t}`)},update({type:e,id:t,data:n}){return r.patch(`service-credentials/${e}/${t}`,n)},getItems({type:e,id:t,limit:n=null,offset:s=null,filter:u=null,q:l=null,fields:o=null,sort:g=null}){const p={limit:n,offset:s,filter:u,q:l,fields:o,sort:g};return r.getAll(`service-credentials/${e}/${t}/items`,p)}}}function Zt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("shipping-rates",l)},create({id:e="",data:t}){return r.create(`shipping-rates/${e}`,e,t)},get({id:e}){return r.get(`shipping-rates/${e}`)},update({id:e,data:t}){return r.put(`shipping-rates/${e}`,t)},delete({id:e}){return r.delete(`shipping-rates/${e}`)}}}function Ht({apiHandler:r}){return{get(){return r.get("status")}}}function er({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return r.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return r.get(`subscription-cancellations/${e}`)},delete({id:e}){return r.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return r.patch(`subscription-cancellations/${e}`,t)}}}function tr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return r.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return r.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return r.put(`subscription-pauses/${e}`,t)},delete({id:e}){return r.delete(`subscription-pauses/${e}`)}}}function rr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-reactivations",u)},reactivate({data:e}){return r.post("subscription-reactivations",e)},get({id:e}){return r.get(`subscription-reactivations/${e}`)}}}function nr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("subscriptions",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`subscriptions/${e}`,t,s)},delete({id:e}){return r.delete(`subscriptions/${e}`)},void({id:e}){return r.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return r.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return r.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}/upcoming-invoice`,n)},issueUpcomingInvoice({id:e,invoiceId:t,data:n}){return r.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,n)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`subscriptions/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("subscriptions",o)}}}function sr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("tags",l)},create({data:e}){return r.post("tags",e)},get({tag:e}){return r.get(`tags/${e}`)},delete({tag:e}){return r.delete(`tags/${e}`)},update({tag:e,data:t}){return r.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return r.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return r.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return r.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return r.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return r.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return r.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return r.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return r.delete(`tags/${e}/kyc-documents/${t}`)}}}function ur({apiHandler:r}){return{getAllTagsRules({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tags-rules",l)},createTagsRule({id:e="",data:t}){return r.create(`tags-rules/${e}`,e,t)},getTagsRule({id:e}){return r.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:t}){return r.put(`tags-rules/${e}`,t)},deleteTagsRule({id:e}){return r.delete(`tags-rules/${e}`)}}}function lr({apiHandler:r}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/api",l)},getApiLog({id:e}){return r.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/lists",l)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/webhooks",l)},getWebhookTrackingLog({id:e}){return r.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return r.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={params:{limit:e,offset:t,sort:n,filter:s,q:u},headers:w};return r.download("tracking/api",l)}}}function or({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null,expand:l=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u,expand:l};return r.getAll("transactions",o)},create({data:e,expand:t=null}){const n={expand:t};return r.post("transactions",e,n)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`transactions/${e}`,n)},patch({id:e,data:t}){return r.patch(`transactions/${e}`,t)},query({id:e}){return r.post(`transactions/${e}/query`)},update({id:e,data:t}){return r.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return r.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null}){const u={limit:t,offset:n,filter:s};return r.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return r.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("transactions",o)}}}function cr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("usages",l)},create({id:e="",data:t}){return r.create(`usages/${e}`,e,t)},get({id:e}){return r.get(`usages/${e}`)},update({id:e,data:t}){return r.put(`usages/${e}`,t)},delete({id:e}){return r.delete(`usages/${e}`)}}}function ir({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("users",l)},create({id:e="",data:t}){return r.create(`users/${e}`,e,t)},get({id:e}){return r.get(`users/${e}`)},update({id:e,data:t}){return r.put(`users/${e}`,t)},getMfa({id:e}){return r.get(`users/${e}/mfa`)}}}function ar({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null}={}){const s={limit:e,offset:t,filter:n};return r.getAll("webhooks",s)},create({id:e="",data:t}){return r.create(`webhooks/${e}`,e,t)},get({id:e}){return r.get(`webhooks/${e}`)},update({id:e,data:t}){return r.put(`webhooks/${e}`,t)}}}function gr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,filter:s=null,sort:u=null}={}){const l={limit:e,offset:t,q:n,filter:s,sort:u};return r.getAll("websites",l)},create({id:e="",data:t}){return r.create(`websites/${e}`,e,t)},get({id:e}){return r.get(`websites/${e}`)},update({id:e,data:t}){return r.put(`websites/${e}`,t)},delete({id:e}){return r.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("websites",o)}}}class mr{constructor({apiHandler:e}){this.account=Ye({apiHandler:e}),this.amlChecks=_e({apiHandler:e}),this.aml=Qe({apiHandler:e}),this.apiKeys=Xe({apiHandler:e}),this.applicationInstances=Ze({apiHandler:e}),this.applications=He({apiHandler:e}),this.balanceTransactions=et({apiHandler:e}),this.billingPortals=tt({apiHandler:e}),this.blocklists=rt({apiHandler:e}),this.broadcastMessages=nt({apiHandler:e}),this.cashierCustomPropertySets=st({apiHandler:e}),this.cashierRequests=ut({apiHandler:e}),this.cashierStrategies=lt({apiHandler:e}),this.checkoutForms=ot({apiHandler:e}),this.coupons=ct({apiHandler:e}),this.credentialHashes=it({apiHandler:e}),this.creditMemos=at({apiHandler:e}),this.customDomains=gt({apiHandler:e}),this.customFields=mt({apiHandler:e}),this.customerAuthentication=ht({apiHandler:e}),this.customers=ft({apiHandler:e}),this.digitalWallets=$t({apiHandler:e}),this.disputes=pt({apiHandler:e}),this.emailDeliverySettings=yt({apiHandler:e}),this.emailMessages=At({apiHandler:e}),this.emailNotifications=bt({apiHandler:e}),this.events=Rt({apiHandler:e}),this.fees=dt({apiHandler:e}),this.files=wt({apiHandler:e}),this.gatewayAccounts=vt({apiHandler:e}),this.integrations=kt({apiHandler:e}),this.invoices=Tt({apiHandler:e}),this.journalAccounts=Et({apiHandler:e}),this.journalEntries=St({apiHandler:e}),this.kycDocuments=It({apiHandler:e}),this.kycRequests=Ct({apiHandler:e}),this.kycSettings=xt({apiHandler:e}),this.lists=jt({apiHandler:e}),this.memberships=Pt({apiHandler:e}),this.organizationExports=qt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Dt({apiHandler:e}),this.paymentMethods=Ft({apiHandler:e}),this.paymentTokens=Kt({apiHandler:e}),this.payoutRequests=Bt({apiHandler:e}),this.payouts=Nt({apiHandler:e}),this.plans=Vt({apiHandler:e}),this.previews=zt({apiHandler:e}),this.products=Lt({apiHandler:e}),this.profile=Ut({apiHandler:e}),this.purchase=Wt({apiHandler:e}),this.riskScoreRules=Jt({apiHandler:e}),this.roles=Gt({apiHandler:e}),this.search=Yt({apiHandler:e}),this.segments=_t({apiHandler:e}),this.sendThroughAttribution=Qt({apiHandler:e}),this.serviceCredentials=Xt({apiHandler:e}),this.shippingRates=Zt({apiHandler:e}),this.status=Ht({apiHandler:e}),this.subscriptionCancellations=er({apiHandler:e}),this.subscriptionPauses=tr({apiHandler:e}),this.subscriptionReactivations=rr({apiHandler:e}),this.subscriptions=nr({apiHandler:e}),this.tags=sr({apiHandler:e}),this.tagsRules=ur({apiHandler:e}),this.tracking=lr({apiHandler:e}),this.transactions=or({apiHandler:e}),this.usages=cr({apiHandler:e}),this.users=ir({apiHandler:e}),this.webhooks=ar({apiHandler:e}),this.websites=gr({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 hr({apiHandler:r}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return r.get(`customers/${e}/summary-metrics`)}}}function fr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null,criteria:o=null}={}){const g={limit:e,offset:t,sort:n,expand:s,filter:u,q:l,criteria:o};return r.getAll("data-exports",g)},queue({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`data-exports/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`data-exports/${e}`,t,s)},delete({id:e}){return r.delete(`data-exports/${e}`)}}}function $r({apiHandler:r}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationPeriod:n,metric:s,filter:u=null}){const l={periodStart:e,periodEnd:t,aggregationPeriod:n,metric:s,filter:u};return r.get("histograms/transactions",l)}}}function pr({apiHandler:r}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/cumulative-subscriptions",o)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:n,segments:s};return r.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/dcc-markup",o)},getDisputes({aggregationField:e,periodMonth:t,limit:n=null,offset:s=null,filter:u=null}){const l={aggregationField:e,periodMonth:t,limit:n,offset:s,filter:u};return r.get("reports/disputes",l)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const l={periodStart:t,periodEnd:n,limit:s,offset:u};return r.get(`reports/events-triggered/${e}/rules`,l)},getFutureRenewals({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:n=null,recognizedAt:s,aggregationField:u,limit:l=null,offset:o=null,filter:g=null}){const p={currency:e,bookedFrom:t,bookedTo:n,recognizedAt:s,aggregationField:u,limit:l,offset:o,filter:g};return r.get("reports/journal",p)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const l={currency:e,periodStart:t,periodEnd:n,limit:s,offset:u};return r.get("reports/monthly-recurring-revenue",l)},getRenewalSales({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:l=null,offset:o=null,filter:g=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:l,offset:o,filter:g,criteria:p};return r.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:l,limit:o=null,offset:g=null,filter:p=null,sort:k=null,criteria:F=null}){const K={aggregationField:e,aggregationPeriod:t,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:l,limit:o,offset:g,filter:p,sort:k,criteria:F};return r.get("reports/retention-value",K)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s};return r.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:n=null,offset:s=null}){const u={filter:e,sort:t,limit:n,offset:s};return r.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:l=null}){const o={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:l};return r.get("reports/subscription-cancellation",o)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:n,periodEnd:s,limit:u=null,offset:l=null}){const o={type:e,subaggregate:t,periodStart:n,periodEnd:s,limit:u,offset:l};return r.get("reports/time-series-transaction",o)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/transactions-time-dispute",o)},getTransactions({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:l=null}){const o={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:l};return r.get("reports/transactions",o)}}}function yr({apiHandler:r}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return r.get(`subscriptions/${e}/summary-metrics`)}}}function Ar({apiHandler:r}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:n=0}){const s={eventTypes:e,limit:t,offset:n};return r.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`customers/${e}/timeline`,u)}}}function br({apiHandler:r}){return{query(){return r.get("location")}}}const v={CustomersResource:hr,DataExportsResource:fr,HistogramsResource:$r,ReportsResource:pr,SubscriptionsResource:yr,TimelinesResource:Ar,LocationResource:br};class Rr{constructor({apiHandler:e}){this.customers=v.CustomersResource({apiHandler:e}),this.dataExports=v.DataExportsResource({apiHandler:e}),this.histograms=v.HistogramsResource({apiHandler:e}),this.reports=v.ReportsResource({apiHandler:e}),this.subscriptions=v.SubscriptionsResource({apiHandler:e}),this.timelines=v.TimelinesResource({apiHandler:e}),this.location=v.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 dr({apiHandler:r}){return{get({expand:e=null}={}){const t={expand:e};return r.get("account",t)},update({data:e}){return r.patch("account",e)},requestPasswordReset({data:e}){return r.post("account/forgot-password",e)},changePassword({data:e}){return r.patch("account/password",e)},resendEmailVerification({data:e}){return r.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return r.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return r.post(`account/verification/${e}`)},register({data:e}){return r.post("register",e)}}}function wr({apiHandler:r}){return{login({data:e}){return r.post("login",e)},logout(){return r.post("logout")}}}function vr({apiHandler:r}){return{get({slug:e}){return r.get(`billing-portals/${e}`)}}}function kr({apiHandler:r}){return{create({data:e}){return r.post("cashier-deposit",e)}}}function Tr({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`cashier-requests/${e}`,n)}}}function Er({apiHandler:r}){return{get({id:e}){return r.get(`checkout-forms/${e}`)}}}function Sr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("invoices",l)},get({id:e}){return r.get(`invoices/${e}`)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Ir({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("kyc-documents",n)},create({data:e}){return r.post("kyc-documents",e)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.patch(`kyc-documents/${e}`,t)}}}function Cr({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`kyc-requests/${e}`,n)}}}function xr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("orders",l)},get({id:e}){return r.get(`orders/${e}`)},update({id:e,data:t}){return r.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return r.post(`orders/${e}/cancellation`,t)},pause({id:e,data:t}){return r.post(`orders/${e}/pause`,t)}}}function jr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payment-instruments",l)},create({data:e}){return r.post("payment-instruments",e)},get({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return r.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return r.post(`payment-instruments/${e}/setup`,t)}}}function Pr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payout-requests",l)},get({id:e}){return r.get(`payout-requests/${e}`)},update({id:e,data:t}){return r.patch(`payout-requests/${e}`,t)}}}function qr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("plans",o)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`plans/${e}`,n)}}}function Mr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",l)},get({id:e}){return r.get(`products/${e}`)}}}function Or({apiHandler:r}){return{payment({data:e}){return r.post("payment",e)},purchase({data:e}){return r.post("purchase",e)},preview({data:e}){return r.post("preview-purchase",e)},readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Dr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("transactions",l)},get({id:e}){return r.get(`transactions/${e}`)},finishKyc({id:e,token:t}){return r.post(`transactions/${e}/${t}/continue`)},skipKyc({id:e,token:t}){return r.post(`transactions/${e}/${t}/bypass`)},update({id:e,data:t}){return r.patch(`transactions/${e}`,t)}}}function Fr({apiHandler:r}){return{get({id:e}){return r.get(`websites/${e}`)}}}class Kr{constructor({apiHandler:e}){this.account=dr({apiHandler:e}),this.authorization=wr({apiHandler:e}),this.billingPortals=vr({apiHandler:e}),this.cashierDeposit=kr({apiHandler:e}),this.cashierRequests=Tr({apiHandler:e}),this.checkoutForms=Er({apiHandler:e}),this.invoices=Sr({apiHandler:e}),this.kycDocuments=Ir({apiHandler:e}),this.kycRequests=Cr({apiHandler:e}),this.orders=xr({apiHandler:e}),this.paymentInstruments=jr({apiHandler:e}),this.payoutRequests=Pr({apiHandler:e}),this.plans=qr({apiHandler:e}),this.products=Mr({apiHandler:e}),this.purchase=Or({apiHandler:e}),this.transactions=Dr({apiHandler:e}),this.websites=Fr({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 Br({apiHandler:r}){return new mr({apiHandler:r})}function Nr({apiHandler:r}){return new Rr({apiHandler:r})}function Vr({apiHandler:r}){return new Kr({apiHandler:r})}const O={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},D=6e3;function Y({apiKey:r=null,sandbox:e=!1,timeout:t=D,organizationId:n=null,urls:s=O}={}){if(!s.live||!s.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof s.live!="string"||typeof s.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l=M({options:{apiEndpoints:s,apiKey:r,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Br({apiHandler:l})}function zr({apiKey:r=null,sandbox:e=!1,timeout:t=D,organizationId:n=null,urls:s=O}={}){if(!s.live||!s.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof s.live!="string"||typeof s.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l=M({options:{apiEndpoints:s,apiKey:r,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Nr({apiHandler:l})}function Lr({publishableKey:r=null,jwt:e=null,sandbox:t=!1,timeout:n=D,organizationId:s=null,urls:u=O}={}){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:r,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:n,organizationId:s},o=M({options:l});return o.setSessionToken(l.jwt),Vr({apiHandler:o})}m.RebillyAPI=Y,m.RebillyErrors=y,m.RebillyExperimentalAPI=zr,m.RebillyStorefrontAPI=Lr,m.cancellation=Ge,m.default=Y,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
36
+ */var qe=Pe,Me=Object.prototype.hasOwnProperty,Oe=function(e,t,n){qe(e,function(s,u){if(Me.call(e,u))return t.call(n,e[u],u,e)})},De=pe,Fe=Ie,Ke=xe,Be=Oe;function q(r,e){switch(Ke(r)){case"object":return Ne(r,e);case"array":return Le(r,e);default:return Fe(r)}}function Ne(r,e){if(De(r)){var t={};return Be(r,function(n,s){this[s]=q(n,e)},t),t}else return e?e(r):r}function Le(r,e){for(var t=r.length,n=[],s=-1;++s<t;)n[s]=q(r[s],e);return n}var Ve=q;const ze="48.6.0";let Ue="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",We=(r=21)=>{let e="",t=r;for(;t--;)e+=Ue[Math.random()*64|0];return e};class Je{constructor({id:e=null,created:t=null}={}){this.id=e||We(),this.created=t||new Date().getTime(),this.cancelSource=P.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,x(this,{exclude:["cancelSource","cancelToken","cancel"]})}}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 Je;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}var E=new S;class j{}N(j,"cancelById",(e,t)=>{try{E.getById(e).cancel(t),E.deleteById(e)}catch{}}),N(j,"cancelAll",e=>E.getAll().forEach(t=>{t.cancel(e),E.deleteById(t.id)}));var Ge={cancelAll:(...r)=>j.cancelAll(...r)};const d={request:"request",response:"response"},J=r=>{if(!Object.values(d).includes(r))throw new Error(`There is no such interceptor type as "${r}"`);return!0};function M({options:r}){const e=t();function t(){return P.default.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:r.requestTimeout,headers:l()}}function u(){let c=r.isSandbox?r.apiEndpoints.sandbox:r.apiEndpoints.live;return r.apiVersion&&(c=`${c}/${r.apiVersion}`),r.organizationId&&(c=`${c}/organizations/${r.organizationId}`),`${c}`}function l(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${ze}`};return r.apiKey&&(c["REB-APIKEY"]=r.apiKey),c}function o(){return Ve(e.defaults.headers)}function g(c){r.requestTimeout=Number(c),e.defaults.timeout=r.requestTimeout}function p(c=r.jwt){const i=o();r.apiKey=null,r.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=r.publishableKey){const i=o();r.publishableKey=c,i.common.Authorization=`${c}`,e.defaults.headers=i}function F({host:c,port:i,auth:a}){e.defaults.proxy={host:c,port:i,auth:a}}function K({live:c=null,sandbox:i=null}){c&&(r.apiEndpoints.live=c),i&&(r.apiEndpoints.sandbox=i),e.defaults.baseURL=u()}function _(c,{thenDelegate:i,catchDelegate:a=()=>{}}){return J(c)&&e.interceptors[d[c]].use(i,a)}function Q(c,i){return J(c)&&e.interceptors[d[c]].eject(i)}function Ur({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.request,{thenDelegate:c,catchDelegate:i})}function Wr(c){Q(d.request,c)}function Jr({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.response,{thenDelegate:c,catchDelegate:i})}function Gr(c){Q(d.response,c)}function T({request:c,isCollection:i,config:a}){const f=Z(a),{id:b,cancelToken:rn}=E.save();f.cancelToken=rn;const re=async function(){try{const I=await c(f);return Yr({response:I,isCollection:i,config:f})}catch(I){return X({error:I,config:f})}finally{E.deleteById(b)}}();return re.cancel=I=>j.cancelById(b,I),re}function Yr({response:c,isCollection:i,config:a}){return i?new se(c,a):new L(c,a)}function X({error:c}){if(P.default.isCancel(c))throw new y.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new y.RebillyForbiddenError(c);case 404:throw new y.RebillyNotFoundError(c);case 405:throw new y.RebillyMethodNotAllowedError(c);case 409:throw new y.RebillyConflictError(c);case 422:throw new y.RebillyValidationError(c);default:throw new y.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new y.RebillyTimeoutError(c):new y.RebillyRequestError(c)}function _r(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,a)=>(i[a]=c.params[a],i),{})),c}function Z(c={}){const i=_r(c);return C({},i)}function H(c,i={}){return T({request:a=>e.get(c,a),config:{params:i}})}function Qr(c,i){return T({request:a=>e.get(c,a),config:{params:i},isCollection:!0})}function ee(c,i,a={}){let f={};return a.authenticate===!1&&(f={headers:o()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),a.params&&(f.params=C({},a.params)),T({request:b=>e.post(c,i,b),config:f})}function te(c,i,a={}){return T({request:f=>e.put(c,i,f),config:{params:a}})}function Xr(c,i){return T({request:a=>e.patch(c,i,a),config:{}})}function Zr(c){return T({request:i=>e.delete(c,i),config:{}})}function Hr(c,i){return T({request:a=>e.delete(c,a),config:{data:C({},i)}})}async function en(c,i,a,f={}){if(i==="")return ee(c,a,{params:f});try{if((await H(c)).response.status===200)throw new y.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(b){if(b.name==="RebillyNotFoundError")return te(c,a,f);throw b}}async function tn(c,i){const a=Z(i);try{const f=await e.get(c,a);return new ue(f,a)}catch(f){return X({error:f,config:a})}}return{getInstance:n,addRequestInterceptor:Ur,removeRequestInterceptor:Wr,addResponseInterceptor:Jr,removeResponseInterceptor:Gr,setTimeout:g,setProxyAgent:F,setSessionToken:p,setPublishableKey:k,setEndpoints:K,get:H,getAll:Qr,post:ee,put:te,patch:Xr,delete:Zr,deleteAll:Hr,create:en,download:tn}}function Ye({apiHandler:r}){return{activate({token:e}){return r.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return r.post("forgot-password",e,{authenticate:!1})},logout(){return r.post("logout")},signIn({data:e}){return r.post("signin",e,{authenticate:!1})},signUp({data:e}){return r.post("signup",e,{authenticate:!1})}}}function _e({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("aml-checks",l)},get({id:e}){return r.get(`aml-checks/${e}`)},review({id:e,data:t}){return r.post(`aml-checks/${e}/review`,t)}}}function Qe({apiHandler:r}){return{getAll({firstName:e,lastName:t,dob:n=null,country:s=null}){const u={firstName:e,lastName:t,dob:n,country:s};return r.get("aml",u)}}}function Xe({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null}={}){const s={limit:e,offset:t,sort:n};return r.getAll("api-keys",s)},create({id:e="",data:t}){return r.create(`api-keys/${e}`,e,t)},get({id:e}){return r.get(`api-keys/${e}`)},update({id:e,data:t}){return r.put(`api-keys/${e}`,t)},delete({id:e}){return r.delete(`api-keys/${e}`)}}}function Ze({apiHandler:r}){return{get({applicationId:e}){return r.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return r.put(`application-instances/${e}`,t)},delete({applicationId:e}){return r.delete(`application-instances/${e}`)}}}function He({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("applications",g)},create({data:e}){return r.post("applications",e)},get({id:e}){return r.get(`applications/${e}`)},getInstances({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`applications/${e}/instances`,s)},getInstance({id:e,organizationId:t}){return r.get(`applications/${e}/instances/${t}`)}}}function et({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("balance-transactions",n)},get({id:e}){return r.get(`balance-transactions/${e}`)}}}function tt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("billing-portals",l)},create({id:e="",data:t}){return r.create(`billing-portals/${e}`,e,t)},get({id:e}){return r.get(`billing-portals/${e}`)},update({id:e,data:t}){return r.put(`billing-portals/${e}`,t)},delete({id:e}){return r.delete(`billing-portals/${e}`)}}}function rt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("blocklists",l)},create({id:e="",data:t}){return r.create(`blocklists/${e}`,e,t)},get({id:e}){return r.get(`blocklists/${e}`)},delete({id:e}){return r.delete(`blocklists/${e}`)}}}function nt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:t,sort:n,filter:s};return r.getAll("broadcast-messages",u)},create({data:e}){return r.post("broadcast-messages",e)},get({id:e}){return r.get(`broadcast-messages/${e}`)},delete({id:e}){return r.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return r.patch(`broadcast-messages/${e}`,t)}}}function st({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-custom-property-sets",u)},create({id:e="",data:t}){return r.create(`cashier-custom-property-sets/${e}`,e,t)},get({id:e}){return r.get(`cashier-custom-property-sets/${e}`)},update({id:e,data:t}){return r.put(`cashier-custom-property-sets/${e}`,t)},delete({id:e}){return r.delete(`cashier-custom-property-sets/${e}`)}}}function ut({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-requests",u)},create({data:e}){return r.post("cashier-requests",e)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`cashier-requests/${e}`,n)}}}function lt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("cashier-strategies",u)},create({id:e="",data:t}){return r.create(`cashier-strategies/${e}`,e,t)},get({id:e}){return r.get(`cashier-strategies/${e}`)},update({id:e,data:t}){return r.put(`cashier-strategies/${e}`,t)},delete({id:e}){return r.delete(`cashier-strategies/${e}`)}}}function ot({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("checkout-forms",l)},create({id:e="",data:t}){return r.create(`checkout-forms/${e}`,e,t)},get({id:e}){return r.get(`checkout-forms/${e}`)},update({id:e,data:t}){return r.put(`checkout-forms/${e}`,t)},delete({id:e}){return r.delete(`checkout-forms/${e}`)}}}function ct({apiHandler:r}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons-redemptions",l)},redeem({data:e}){return r.post("coupons-redemptions",e)},getRedemption({id:e}){return r.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return r.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons",l)},create({id:e="",data:t}){return r.create(`coupons/${e}`,e,t)},get({id:e}){return r.get(`coupons/${e}`)},update({id:e,data:t}){return r.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return r.post(`coupons/${e}/expiration`,t)}}}function it({apiHandler:r}){return{createAWSSESCredential({data:e}){return r.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return r.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return r.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return r.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return r.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return r.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return r.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return r.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return r.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/oauth2",l)},createOAuth2Credential({data:e}){return r.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return r.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return r.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,fields:l=null,sort:o=null}){const g={limit:t,offset:n,filter:s,q:u,fields:l,sort:o};return r.getAll(`credential-hashes/oauth2/${e}/items`,g)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/plaid",l)},createPlaidCredential({data:e}){return r.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return r.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return r.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return r.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return r.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return r.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return r.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return r.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return r.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return r.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return r.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return r.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/experian",l)},createExperianCredential({data:e}){return r.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return r.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return r.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/taxjar",l)},createTaxJarCredential({data:e}){return r.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return r.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return r.patch(`credential-hashes/taxjar/${e}`,t)},getAllAvalaraCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const l={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/avalara",l)},createAvalaraCredential({data:e}){return r.post("credential-hashes/avalara",e)},getAvalaraCredential({hash:e}){return r.get(`credential-hashes/avalara/${e}`)},updateAvalaraCredential({hash:e,data:t}){return r.patch(`credential-hashes/avalara/${e}`,t)}}}function at({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("credit-memos",l)},create({id:e="",data:t}){return r.create(`credit-memos/${e}`,e,t)},get({id:e}){return r.get(`credit-memos/${e}`)},update({id:e,data:t}){return r.put(`credit-memos/${e}`,t)},patch({id:e,data:t}){return r.patch(`credit-memos/${e}`,t)},void({id:e}){return r.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`credit-memos/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`credit-memos/${e}/timeline/${t}`)}}}function gt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("custom-domains",l)},create({data:e}){return r.post("custom-domains",e)},get({domain:e}){return r.get(`custom-domains/${e}`)},delete({domain:e}){return r.delete(`custom-domains/${e}`)}}}function mt({apiHandler:r}){return{getAll({resource:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return r.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)},update({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)}}}function ht({apiHandler:r}){return{getAuthOptions(){return r.get("authentication-options")},updateAuthOptions({data:e}){return r.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("authentication-tokens",n)},login({data:e}){return r.post("authentication-tokens",e)},verify({token:e}){return r.get(`authentication-tokens/${e}`)},logout({token:e}){return r.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return r.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("credentials",n)},createCredential({id:e="",data:t}){return r.create(`credentials/${e}`,e,t)},getCredential({id:e}){return r.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return r.put(`credentials/${e}`,t)},deleteCredential({id:e}){return r.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return r.post("password-tokens",e)},getResetPasswordToken({id:e}){return r.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return r.delete(`password-tokens/${e}`)}}}const w={Accept:"text/csv"},G={Accept:"application/pdf"};function ft({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("customers",g)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:n=null}){const s={expand:t,fields:n};return r.get(`customers/${e}`,s)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return r.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return r.get(`customers/${e}/aml`)},getLeadSource({id:e}){return r.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return r.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`customers/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/timeline/${t}`)},getCustomerEddScore({id:e}){return r.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return r.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`customers/${e}/edd-timeline`,o)},createEddTimelineComment({id:e,data:t}){return r.post(`customers/${e}/edd-timeline`,t)},getEddTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/edd-timeline/${t}`)},deleteEddTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/edd-timeline/${t}`)},getAllEddSearchResults({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`customers/${e}/edd-search-results`,s)},getEddSearchResult({id:e,searchResultId:t}){return r.get(`customers/${e}/edd-search-results/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("customers",o)}}}function $t({apiHandler:r}){return{create({data:e}){return r.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return r.post("digital-wallets/validation",e)}}}function pt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("disputes",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`disputes/${e}`,e,t,s)},get({id:e}){return r.get(`disputes/${e}`)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("disputes",o)}}}function yt({apiHandler:r}){return{verify({token:e}){return r.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("email-delivery-settings",l)},create({data:e}){return r.post("email-delivery-settings",e)},get({id:e}){return r.get(`email-delivery-settings/${e}`)},delete({id:e}){return r.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return r.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return r.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function At({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,sort:s=null,filter:u=null}={}){const l={limit:e,offset:t,q:n,sort:s,filter:u};return r.getAll("email-messages",l)},create({data:e}){return r.post("email-messages",e)},get({id:e}){return r.get(`email-messages/${e}`)},delete({id:e}){return r.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return r.patch(`email-messages/${e}`,t)}}}function bt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("email-notifications",n)}}}function Rt({apiHandler:r}){return{getAll(){return r.getAll("events")},get({eventType:e}){return r.get(`events/${e}`)},getRules({eventType:e}){return r.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`events/${e}/timeline`,o)},createTimelineComment({eventType:e,data:t}){return r.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return r.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return r.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:l=null,fields:o=null}){const g={limit:t,offset:n,filter:s,q:u,sort:l,fields:o};return r.getAll(`events/${e}/rules/history`,g)},getRulesVersionNumber({eventType:e,version:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/history/${t}`,s)},getRulesVersionDetail({eventType:e,version:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/versions/${t}`,s)},getAllDraftRulesets({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:l=null,fields:o=null}){const g={limit:t,offset:n,filter:s,q:u,sort:l,fields:o};return r.getAll(`events/${e}/rules/drafts`,g)},createDraftRuleset({eventType:e,data:t}){return r.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:n=null}){const s={fields:n};return r.get(`events/${e}/rules/drafts/${t}`,s)},updateDraftRuleset({eventType:e,id:t,data:n}){return r.put(`events/${e}/rules/drafts/${t}`,n)},deleteDraftRuleset({eventType:e,id:t}){return r.delete(`events/${e}/rules/drafts/${t}`)}}}function dt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("fees",n)},create({id:e="",data:t}){return r.create(`fees/${e}`,e,t)},get({id:e}){return r.get(`fees/${e}`)},upsert({id:e,data:t}){return r.put(`fees/${e}`,t)},patch({id:e,data:t}){return r.patch(`fees/${e}`,t)}}}function wt({apiHandler:r}){return{getAllAttachments({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:l=null,sort:o=null}={}){const g={limit:e,offset:t,filter:n,q:s,expand:u,fields:l,sort:o};return r.getAll("attachments",g)},attach({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return r.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`attachments/${e}`,t,s)},detach({id:e}){return r.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,fields:u=null,sort:l=null}={}){const o={limit:e,offset:t,filter:n,q:s,fields:u,sort:l};return r.getAll("files",o)},upload({fileObject:e}){return r.post("files",e)},get({id:e}){return r.get(`files/${e}`)},update({id:e,data:t}){return r.put(`files/${e}`,t)},delete({id:e}){return r.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return r.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let n=[];const u=(async()=>{const l=this.getAllAttachments(t);n.push(l);const g=(await l).items.map(k=>this.detach({id:k.fields.id}));n=[...n,g],await Promise.all(g);const p=r.delete(`files/${e}`);return n.push(p),p})();return u.cancel=()=>{n.forEach(l=>l.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const n=[],u=(async()=>{const l=this.upload({fileObject:e});n.push(l),await l;const o={name:l.name,extension:l.extension,description:t.description,tags:t.tags,url:""},g=this.update({id:l.fields.id,data:o});return n.push(g),g})();return u.cancel=()=>{n.forEach(l=>l.cancel())},u}}}function vt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null,fields:l=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u,fields:l};return r.getAll("gateway-accounts",o)},create({id:e="",data:t}){return r.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return r.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return r.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return r.delete(`gateway-accounts/${e}`)},close({id:e}){return r.post(`gateway-accounts/${e}/close`)},disable({id:e}){return r.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null}){const l={limit:t,offset:n,filter:s,sort:u};return r.getAll(`gateway-accounts/${e}/downtime-schedules`,l)},createDowntimeSchedule({id:e,data:t}){return r.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return r.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:n}){return r.put(`gateway-accounts/${e}/downtime-schedules/${t}`,n)},deleteDowntimeSchedule({id:e,downtimeId:t}){return r.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return r.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return r.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return r.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:n}){return r.put(`gateway-accounts/${e}/limits/${t}`,n)},deleteVolumeLimit({id:e,limitId:t}){return r.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`gateway-accounts/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return r.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return r.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return r.put(`gateway-accounts/${e}/financial-settings`,t)}}}function kt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("integrations",n)},get({label:e}){return r.get(`integrations/${e}`)}}}function Tt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("invoices",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`invoices/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:n=null,expand:s=null}){const u={limit:t,offset:n,expand:s};return r.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return r.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return r.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:n}){return r.put(`invoices/${e}/items/${t}`,n)},deleteInvoiceItem({id:e,itemId:t}){return r.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return r.post(`invoices/${e}/issue`,t)},abandon({id:e}){return r.post(`invoices/${e}/abandon`)},void({id:e}){return r.post(`invoices/${e}/void`)},recalculate({id:e}){return r.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return r.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return r.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`invoices/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`invoices/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("invoices",o)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Et({apiHandler:r}){return{getAllAccounts({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("journal-accounts",u)},createAccount({id:e="",data:t}){return r.create(`journal-accounts/${e}`,e,t)},getAccount({id:e}){return r.get(`journal-accounts/${e}`)},updateAccount({id:e,data:t}){return r.put(`journal-accounts/${e}`,t)}}}function St({apiHandler:r}){return{getAllEntries({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("journal-entries",u)},createEntry({id:e="",data:t}){return r.create(`journal-entries/${e}`,e,t)},getEntry({id:e}){return r.get(`journal-entries/${e}`)},updateEntry({id:e,data:t}){return r.put(`journal-entries/${e}`,t)},getAllRecords({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,expand:l=null}){const o={limit:t,offset:n,filter:s,sort:u,expand:l};return r.getAll(`journal-entries/${e}/records`,o)},createRecord({id:e,data:t}){return r.post(`journal-entries/${e}/records`,t)},getRecord({id:e,journalRecordId:t}){return r.get(`journal-entries/${e}/records/${t}`)},updateRecord({id:e,journalRecordId:t,data:n}){return r.put(`journal-entries/${e}/records/${t}`,n)},deleteRecord({id:e,journalRecordId:t}){return r.delete(`journal-entries/${e}/records/${t}`)}}}function It({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,expand:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,expand:u};return r.getAll("kyc-documents",l)},create({id:e="",data:t}){return r.create(`kyc-documents/${e}`,e,t)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.put(`kyc-documents/${e}`,t)},accept({id:e}){return r.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return r.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return r.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return r.post(`kyc-documents/${e}/review`)},startReview({id:e}){return r.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return r.post(`kyc-documents/${e}/stop-review`)}}}function Ct({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("kyc-requests",u)},create({data:e}){return r.post("kyc-requests",e)},get({id:e}){return r.get(`kyc-requests/${e}`)},delete({id:e}){return r.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return r.patch(`kyc-requests/${e}`,t)}}}function xt({apiHandler:r}){return{getKycSettings(){return r.get("kyc-settings")},updateKycSettings({data:e}){return r.put("kyc-settings",e)}}}function jt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,fields:u=null,q:l=null}={}){const o={limit:e,offset:t,filter:n,sort:s,fields:u,q:l};return r.getAll("lists",o)},create({id:e="",data:t}){return r.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return r.get(`lists/${e}`)},update({id:e,data:t}){return r.put(`lists/${e}`,t)},delete({id:e}){return r.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return r.get(`lists/${e}/${t}`)}}}function Pt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("memberships",u)},get({organizationId:e,userId:t}){return r.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:n}){return r.put(`memberships/${e}/${t}`,n)},delete({organizationId:e,userId:t}){return r.delete(`memberships/${e}/${t}`)}}}function qt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("organization-exports",l)},create({data:e}){return r.post("organization-exports",e)},get({id:e}){return r.get(`organization-exports/${e}`)}}}function Mt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:t,filter:n,q:s};return r.getAll("organizations",u)},create({data:e}){return r.post("organizations",e)},get({id:e}){return r.get(`organizations/${e}`)},update({id:e,data:t}){return r.patch(`organizations/${e}`,t)}}}function Ot({apiHandler:r}){return{getAll({limit:e=null,q:t=null}={}){const n={limit:e,q:t};return r.getAll("payment-cards-bank-names",n)}}}function Dt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("payment-instruments",o)},create({data:e}){return r.post("payment-instruments",e)},get({id:e}){return r.get(`payment-instruments/${e}`)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)}}}function Ft({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("payment-methods",n)},get({apiName:e}){return r.get(`payment-methods/${e}`)}}}function Kt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("tokens",n)},create({data:e}){return r.post("tokens",e)},get({token:e}){return r.get(`tokens/${e}`)}}}function Bt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("payout-requests",u)},create({id:e="",data:t}){return r.create(`payout-requests/${e}`,e,t)},get({id:e}){return r.get(`payout-requests/${e}`)},update({id:e,data:t}){return r.put(`payout-requests/${e}`,t)},getPaymentInstruments({id:e}){return r.get(`payout-requests/${e}/payment-instruments`)}}}function Nt({apiHandler:r}){return{create({data:e}){return r.post("payouts",e)}}}function Lt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("plans",l)},create({id:e="",data:t}){return r.create(`plans/${e}`,e,t)},get({id:e}){return r.get(`plans/${e}`)},update({id:e,data:t}){return r.put(`plans/${e}`,t)},delete({id:e}){return r.delete(`plans/${e}`)}}}function Vt({apiHandler:r}){return{sendEmailRuleAction({data:e}){return r.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return r.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return r.post("previews/webhooks",e)},order({data:e}){return r.post("previews/orders",e)}}}function zt({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",l)},create({id:e="",data:t}){return r.create(`products/${e}`,e,t)},get({id:e}){return r.get(`products/${e}`)},update({id:e,data:t}){return r.put(`products/${e}`,t)},delete({id:e}){return r.delete(`products/${e}`)}}}function Ut({apiHandler:r}){return{startPermissionsEmulation({data:e}){return r.post("permissions-emulation",e)},stopPermissionsEmulation(){return r.delete("permissions-emulation")},get(){return r.get("profile")},update({data:e}){return r.put("profile",e)},getMfa(){return r.get("profile/mfa")},updateMfa(){return r.post("profile/mfa")},deleteMfa(){return r.delete("profile/mfa")}}}function Wt({apiHandler:r}){return{readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Jt({apiHandler:r}){return{getAll(){return r.get("risk-score-rules")},updateRiskScoreRules({data:e}){return r.put("risk-score-rules",e)},getAllBlocklistRules(){return r.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:e}){return r.put("risk-score-rules/blocklists",e)}}}function Gt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null,expand:l=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u,expand:l};return r.getAll("roles",o)},create({id:e="",data:t}){return r.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`roles/${e}`,n)},update({id:e,data:t}){return r.put(`roles/${e}`,t)},delete({id:e}){return r.delete(`roles/${e}`)}}}function Yt({apiHandler:r}){return{get({sort:e=null,limit:t=null,offset:n=null,q:s=null}){const u={sort:e,limit:t,offset:n,q:s};return r.get("search",u)}}}function _t({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("grid-segments",l)},create({id:e="",data:t}){return r.create(`grid-segments/${e}`,e,t)},get({id:e}){return r.get(`grid-segments/${e}`)},update({id:e,data:t}){return r.put(`grid-segments/${e}`,t)},delete({id:e}){return r.delete(`grid-segments/${e}`)}}}function Qt({apiHandler:r}){return{getAll({eventType:e}){return r.getAll(`send-through-attribution/${e}`)}}}function Xt({apiHandler:r}){return{getAll({type:e,filter:t=null,limit:n=null,offset:s=null,sort:u=null,q:l=null}){const o={filter:t,limit:n,offset:s,sort:u,q:l};return r.getAll(`service-credentials/${e}`,o)},create({type:e,data:t}){return r.post(`service-credentials/${e}`,t)},get({type:e,id:t}){return r.get(`service-credentials/${e}/${t}`)},update({type:e,id:t,data:n}){return r.patch(`service-credentials/${e}/${t}`,n)},getItems({type:e,id:t,limit:n=null,offset:s=null,filter:u=null,q:l=null,fields:o=null,sort:g=null}){const p={limit:n,offset:s,filter:u,q:l,fields:o,sort:g};return r.getAll(`service-credentials/${e}/${t}/items`,p)}}}function Zt({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("shipping-rates",l)},create({id:e="",data:t}){return r.create(`shipping-rates/${e}`,e,t)},get({id:e}){return r.get(`shipping-rates/${e}`)},update({id:e,data:t}){return r.put(`shipping-rates/${e}`,t)},delete({id:e}){return r.delete(`shipping-rates/${e}`)}}}function Ht({apiHandler:r}){return{get(){return r.get("status")}}}function er({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return r.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return r.get(`subscription-cancellations/${e}`)},delete({id:e}){return r.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return r.patch(`subscription-cancellations/${e}`,t)}}}function tr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return r.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return r.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return r.put(`subscription-pauses/${e}`,t)},delete({id:e}){return r.delete(`subscription-pauses/${e}`)}}}function rr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-reactivations",u)},reactivate({data:e}){return r.post("subscription-reactivations",e)},get({id:e}){return r.get(`subscription-reactivations/${e}`)}}}function nr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("subscriptions",o)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`subscriptions/${e}`,t,s)},delete({id:e}){return r.delete(`subscriptions/${e}`)},void({id:e}){return r.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return r.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return r.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`subscriptions/${e}/upcoming-invoices`,n)},getUpcomingInvoice({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}/upcoming-invoice`,n)},issueUpcomingInvoice({id:e,invoiceId:t,data:n}){return r.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,n)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:l=null}){const o={limit:t,offset:n,filter:s,sort:u,q:l};return r.getAll(`subscriptions/${e}/timeline`,o)},createTimelineComment({id:e,data:t}){return r.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("subscriptions",o)}}}function sr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("tags",l)},create({data:e}){return r.post("tags",e)},get({tag:e}){return r.get(`tags/${e}`)},delete({tag:e}){return r.delete(`tags/${e}`)},update({tag:e,data:t}){return r.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return r.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return r.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return r.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return r.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return r.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return r.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return r.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return r.delete(`tags/${e}/kyc-documents/${t}`)}}}function ur({apiHandler:r}){return{getAllTagsRules({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tags-rules",l)},createTagsRule({id:e="",data:t}){return r.create(`tags-rules/${e}`,e,t)},getTagsRule({id:e}){return r.get(`tags-rules/${e}`)},updateTagsRule({id:e,data:t}){return r.put(`tags-rules/${e}`,t)},deleteTagsRule({id:e}){return r.delete(`tags-rules/${e}`)}}}function lr({apiHandler:r}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null,expand:l=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u,expand:l};return r.getAll("tracking/api",o)},getApiLog({id:e}){return r.get(`tracking/api/${e}`)},getAllTaxTrackingLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/taxes",l)},getTaxTrackingLog({id:e}){return r.get(`tracking/taxes/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/lists",l)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/webhooks",l)},getWebhookTrackingLog({id:e}){return r.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return r.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={params:{limit:e,offset:t,sort:n,filter:s,q:u},headers:w};return r.download("tracking/api",l)}}}function or({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null,expand:l=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u,expand:l};return r.getAll("transactions",o)},create({data:e,expand:t=null}){const n={expand:t};return r.post("transactions",e,n)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`transactions/${e}`,n)},patch({id:e,data:t}){return r.patch(`transactions/${e}`,t)},query({id:e}){return r.post(`transactions/${e}/query`)},update({id:e,data:t}){return r.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return r.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null}){const u={limit:t,offset:n,filter:s};return r.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return r.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("transactions",o)}}}function cr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("usages",l)},create({id:e="",data:t}){return r.create(`usages/${e}`,e,t)},get({id:e}){return r.get(`usages/${e}`)},update({id:e,data:t}){return r.put(`usages/${e}`,t)},delete({id:e}){return r.delete(`usages/${e}`)}}}function ir({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("users",l)},create({id:e="",data:t}){return r.create(`users/${e}`,e,t)},get({id:e}){return r.get(`users/${e}`)},update({id:e,data:t}){return r.put(`users/${e}`,t)},getMfa({id:e}){return r.get(`users/${e}/mfa`)}}}function ar({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null}={}){const s={limit:e,offset:t,filter:n};return r.getAll("webhooks",s)},create({id:e="",data:t}){return r.create(`webhooks/${e}`,e,t)},get({id:e}){return r.get(`webhooks/${e}`)},update({id:e,data:t}){return r.put(`webhooks/${e}`,t)}}}function gr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,filter:s=null,sort:u=null}={}){const l={limit:e,offset:t,q:n,filter:s,sort:u};return r.getAll("websites",l)},create({id:e="",data:t}){return r.create(`websites/${e}`,e,t)},get({id:e}){return r.get(`websites/${e}`)},update({id:e,data:t}){return r.put(`websites/${e}`,t)},delete({id:e}){return r.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null}={}){const o={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:l},headers:w};return r.download("websites",o)}}}class mr{constructor({apiHandler:e}){this.account=Ye({apiHandler:e}),this.amlChecks=_e({apiHandler:e}),this.aml=Qe({apiHandler:e}),this.apiKeys=Xe({apiHandler:e}),this.applicationInstances=Ze({apiHandler:e}),this.applications=He({apiHandler:e}),this.balanceTransactions=et({apiHandler:e}),this.billingPortals=tt({apiHandler:e}),this.blocklists=rt({apiHandler:e}),this.broadcastMessages=nt({apiHandler:e}),this.cashierCustomPropertySets=st({apiHandler:e}),this.cashierRequests=ut({apiHandler:e}),this.cashierStrategies=lt({apiHandler:e}),this.checkoutForms=ot({apiHandler:e}),this.coupons=ct({apiHandler:e}),this.credentialHashes=it({apiHandler:e}),this.creditMemos=at({apiHandler:e}),this.customDomains=gt({apiHandler:e}),this.customFields=mt({apiHandler:e}),this.customerAuthentication=ht({apiHandler:e}),this.customers=ft({apiHandler:e}),this.digitalWallets=$t({apiHandler:e}),this.disputes=pt({apiHandler:e}),this.emailDeliverySettings=yt({apiHandler:e}),this.emailMessages=At({apiHandler:e}),this.emailNotifications=bt({apiHandler:e}),this.events=Rt({apiHandler:e}),this.fees=dt({apiHandler:e}),this.files=wt({apiHandler:e}),this.gatewayAccounts=vt({apiHandler:e}),this.integrations=kt({apiHandler:e}),this.invoices=Tt({apiHandler:e}),this.journalAccounts=Et({apiHandler:e}),this.journalEntries=St({apiHandler:e}),this.kycDocuments=It({apiHandler:e}),this.kycRequests=Ct({apiHandler:e}),this.kycSettings=xt({apiHandler:e}),this.lists=jt({apiHandler:e}),this.memberships=Pt({apiHandler:e}),this.organizationExports=qt({apiHandler:e}),this.organizations=Mt({apiHandler:e}),this.paymentCardsBankNames=Ot({apiHandler:e}),this.paymentInstruments=Dt({apiHandler:e}),this.paymentMethods=Ft({apiHandler:e}),this.paymentTokens=Kt({apiHandler:e}),this.payoutRequests=Bt({apiHandler:e}),this.payouts=Nt({apiHandler:e}),this.plans=Lt({apiHandler:e}),this.previews=Vt({apiHandler:e}),this.products=zt({apiHandler:e}),this.profile=Ut({apiHandler:e}),this.purchase=Wt({apiHandler:e}),this.riskScoreRules=Jt({apiHandler:e}),this.roles=Gt({apiHandler:e}),this.search=Yt({apiHandler:e}),this.segments=_t({apiHandler:e}),this.sendThroughAttribution=Qt({apiHandler:e}),this.serviceCredentials=Xt({apiHandler:e}),this.shippingRates=Zt({apiHandler:e}),this.status=Ht({apiHandler:e}),this.subscriptionCancellations=er({apiHandler:e}),this.subscriptionPauses=tr({apiHandler:e}),this.subscriptionReactivations=rr({apiHandler:e}),this.subscriptions=nr({apiHandler:e}),this.tags=sr({apiHandler:e}),this.tagsRules=ur({apiHandler:e}),this.tracking=lr({apiHandler:e}),this.transactions=or({apiHandler:e}),this.usages=cr({apiHandler:e}),this.users=ir({apiHandler:e}),this.webhooks=ar({apiHandler:e}),this.websites=gr({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 hr({apiHandler:r}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return r.get(`customers/${e}/summary-metrics`)}}}function fr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:l=null,criteria:o=null}={}){const g={limit:e,offset:t,sort:n,expand:s,filter:u,q:l,criteria:o};return r.getAll("data-exports",g)},queue({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`data-exports/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`data-exports/${e}`,t,s)},delete({id:e}){return r.delete(`data-exports/${e}`)}}}function $r({apiHandler:r}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationPeriod:n,metric:s,filter:u=null}){const l={periodStart:e,periodEnd:t,aggregationPeriod:n,metric:s,filter:u};return r.get("histograms/transactions",l)}}}function pr({apiHandler:r}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/cumulative-subscriptions",o)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:n,segments:s};return r.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/dcc-markup",o)},getDisputes({aggregationField:e,periodMonth:t,limit:n=null,offset:s=null,filter:u=null}){const l={aggregationField:e,periodMonth:t,limit:n,offset:s,filter:u};return r.get("reports/disputes",l)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const l={periodStart:t,periodEnd:n,limit:s,offset:u};return r.get(`reports/events-triggered/${e}/rules`,l)},getFutureRenewals({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:n=null,recognizedAt:s,aggregationField:u,limit:l=null,offset:o=null,filter:g=null}){const p={currency:e,bookedFrom:t,bookedTo:n,recognizedAt:s,aggregationField:u,limit:l,offset:o,filter:g};return r.get("reports/journal",p)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const l={currency:e,periodStart:t,periodEnd:n,limit:s,offset:u};return r.get("reports/monthly-recurring-revenue",l)},getRenewalSales({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:l=null,offset:o=null,filter:g=null,criteria:p=null}){const k={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:l,offset:o,filter:g,criteria:p};return r.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:l,limit:o=null,offset:g=null,filter:p=null,sort:k=null,criteria:F=null}){const K={aggregationField:e,aggregationPeriod:t,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:l,limit:o,offset:g,filter:p,sort:k,criteria:F};return r.get("reports/retention-value",K)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s};return r.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:n=null,offset:s=null}){const u={filter:e,sort:t,limit:n,offset:s};return r.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:l=null}){const o={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:l};return r.get("reports/subscription-cancellation",o)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:n,periodEnd:s,limit:u=null,offset:l=null}){const o={type:e,subaggregate:t,periodStart:n,periodEnd:s,limit:u,offset:l};return r.get("reports/time-series-transaction",o)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:l=null}){const o={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:l};return r.get("reports/transactions-time-dispute",o)},getTransactions({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:l=null}){const o={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:l};return r.get("reports/transactions",o)}}}function yr({apiHandler:r}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return r.get(`subscriptions/${e}/summary-metrics`)}}}function Ar({apiHandler:r}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:n=0}){const s={eventTypes:e,limit:t,offset:n};return r.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`customers/${e}/timeline`,u)}}}function br({apiHandler:r}){return{query(){return r.get("location")}}}const v={CustomersResource:hr,DataExportsResource:fr,HistogramsResource:$r,ReportsResource:pr,SubscriptionsResource:yr,TimelinesResource:Ar,LocationResource:br};class Rr{constructor({apiHandler:e}){this.customers=v.CustomersResource({apiHandler:e}),this.dataExports=v.DataExportsResource({apiHandler:e}),this.histograms=v.HistogramsResource({apiHandler:e}),this.reports=v.ReportsResource({apiHandler:e}),this.subscriptions=v.SubscriptionsResource({apiHandler:e}),this.timelines=v.TimelinesResource({apiHandler:e}),this.location=v.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 dr({apiHandler:r}){return{get({expand:e=null}={}){const t={expand:e};return r.get("account",t)},update({data:e}){return r.patch("account",e)},requestPasswordReset({data:e}){return r.post("account/forgot-password",e)},changePassword({data:e}){return r.patch("account/password",e)},resendEmailVerification({data:e}){return r.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return r.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return r.post(`account/verification/${e}`)},register({data:e}){return r.post("register",e)}}}function wr({apiHandler:r}){return{login({data:e}){return r.post("login",e)},logout(){return r.post("logout")}}}function vr({apiHandler:r}){return{get({slug:e}){return r.get(`billing-portals/${e}`)}}}function kr({apiHandler:r}){return{create({data:e}){return r.post("cashier-deposit",e)}}}function Tr({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`cashier-requests/${e}`,n)}}}function Er({apiHandler:r}){return{get({id:e}){return r.get(`checkout-forms/${e}`)}}}function Sr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("invoices",l)},get({id:e}){return r.get(`invoices/${e}`)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Ir({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("kyc-documents",n)},create({data:e}){return r.post("kyc-documents",e)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.patch(`kyc-documents/${e}`,t)}}}function Cr({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`kyc-requests/${e}`,n)}}}function xr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("orders",l)},get({id:e}){return r.get(`orders/${e}`)},update({id:e,data:t}){return r.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return r.post(`orders/${e}/cancellation`,t)},pause({id:e,data:t}){return r.post(`orders/${e}/pause`,t)}}}function jr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payment-instruments",l)},create({data:e}){return r.post("payment-instruments",e)},get({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return r.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return r.post(`payment-instruments/${e}/setup`,t)}}}function Pr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payout-requests",l)},get({id:e}){return r.get(`payout-requests/${e}`)},update({id:e,data:t}){return r.patch(`payout-requests/${e}`,t)}}}function qr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:l=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u,expand:l};return r.getAll("plans",o)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`plans/${e}`,n)}}}function Mr({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",l)},get({id:e}){return r.get(`products/${e}`)}}}function Or({apiHandler:r}){return{payment({data:e}){return r.post("payment",e)},purchase({data:e}){return r.post("purchase",e)},preview({data:e}){return r.post("preview-purchase",e)},readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Dr({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("transactions",l)},get({id:e}){return r.get(`transactions/${e}`)},finishKyc({id:e,token:t}){return r.post(`transactions/${e}/${t}/continue`)},skipKyc({id:e,token:t}){return r.post(`transactions/${e}/${t}/bypass`)},update({id:e,data:t}){return r.patch(`transactions/${e}`,t)}}}function Fr({apiHandler:r}){return{get({id:e}){return r.get(`websites/${e}`)}}}class Kr{constructor({apiHandler:e}){this.account=dr({apiHandler:e}),this.authorization=wr({apiHandler:e}),this.billingPortals=vr({apiHandler:e}),this.cashierDeposit=kr({apiHandler:e}),this.cashierRequests=Tr({apiHandler:e}),this.checkoutForms=Er({apiHandler:e}),this.invoices=Sr({apiHandler:e}),this.kycDocuments=Ir({apiHandler:e}),this.kycRequests=Cr({apiHandler:e}),this.orders=xr({apiHandler:e}),this.paymentInstruments=jr({apiHandler:e}),this.payoutRequests=Pr({apiHandler:e}),this.plans=qr({apiHandler:e}),this.products=Mr({apiHandler:e}),this.purchase=Or({apiHandler:e}),this.transactions=Dr({apiHandler:e}),this.websites=Fr({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 Br({apiHandler:r}){return new mr({apiHandler:r})}function Nr({apiHandler:r}){return new Rr({apiHandler:r})}function Lr({apiHandler:r}){return new Kr({apiHandler:r})}const O={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},D=6e3;function Y({apiKey:r=null,sandbox:e=!1,timeout:t=D,organizationId:n=null,urls:s=O}={}){if(!s.live||!s.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof s.live!="string"||typeof s.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l=M({options:{apiEndpoints:s,apiKey:r,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Br({apiHandler:l})}function Vr({apiKey:r=null,sandbox:e=!1,timeout:t=D,organizationId:n=null,urls:s=O}={}){if(!s.live||!s.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof s.live!="string"||typeof s.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l=M({options:{apiEndpoints:s,apiKey:r,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Nr({apiHandler:l})}function zr({publishableKey:r=null,jwt:e=null,sandbox:t=!1,timeout:n=D,organizationId:s=null,urls:u=O}={}){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:r,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:n,organizationId:s},o=M({options:l});return o.setSessionToken(l.jwt),Lr({apiHandler:o})}m.RebillyAPI=Y,m.RebillyErrors=y,m.RebillyExperimentalAPI=Vr,m.RebillyStorefrontAPI=zr,m.cancellation=Ge,m.default=Y,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": "48.4.0",
3
+ "version": "48.6.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",