rebilly-js-sdk 47.17.0 → 47.17.1

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.
@@ -1180,6 +1180,23 @@ declare module rebilly {
1180
1180
  type PatchTaxJarCredentialHashResponse = operations['PatchTaxJarCredentialHash']['responses']['200']['content']['application/json']
1181
1181
  type PatchTaxJarCredentialHashResponsePromise = Promise<{fields: PatchTaxJarCredentialHashResponse}>
1182
1182
 
1183
+ type GetAvalaraCredentialHashCollectionRequest = operations['GetAvalaraCredentialHashCollection']['parameters']["query"] & (operations['GetAvalaraCredentialHashCollection']['parameters'] extends {path: {}} ? operations['GetAvalaraCredentialHashCollection']['parameters']["path"] : {})
1184
+
1185
+ type GetAvalaraCredentialHashCollectionResponse = operations['GetAvalaraCredentialHashCollection']['responses']['200']['content']['application/json'][0]
1186
+ type GetAvalaraCredentialHashCollectionResponsePromise = Promise<{ items: {fields: GetAvalaraCredentialHashCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1187
+ type PostAvalaraCredentialHashRequest = operations['PostAvalaraCredentialHash']['requestBody']['content']['application/json']
1188
+ type CreateAvalaraCredentialHashRequest = { id: String, data: PostAvalaraCredentialHashRequest, expand?: String }
1189
+ type PostAvalaraCredentialHashResponse = operations['PostAvalaraCredentialHash']['responses']['201']['content']['application/json']
1190
+ type PostAvalaraCredentialHashResponsePromise = Promise<{fields: PostAvalaraCredentialHashResponse}>
1191
+
1192
+ type GetAvalaraCredentialHashRequest = { hash : String }
1193
+
1194
+ type GetAvalaraCredentialHashResponse = operations['GetAvalaraCredentialHash']['responses']['200']['content']['application/json']
1195
+ type GetAvalaraCredentialHashResponsePromise = Promise<{fields: GetAvalaraCredentialHashResponse}>
1196
+ type PatchAvalaraCredentialHashRequest = operations['PatchAvalaraCredentialHash']['requestBody']['content']['application/json']
1197
+ type PatchAvalaraCredentialHashResponse = operations['PatchAvalaraCredentialHash']['responses']['200']['content']['application/json']
1198
+ type PatchAvalaraCredentialHashResponsePromise = Promise<{fields: PatchAvalaraCredentialHashResponse}>
1199
+
1183
1200
  type GetCustomDomainCollectionRequest = operations['GetCustomDomainCollection']['parameters']["query"] & (operations['GetCustomDomainCollection']['parameters'] extends {path: {}} ? operations['GetCustomDomainCollection']['parameters']["path"] : {})
1184
1201
 
1185
1202
  type GetCustomDomainCollectionResponse = operations['GetCustomDomainCollection']['responses']['200']['content']['application/json'][0]
@@ -3492,7 +3509,7 @@ export interface corePaths {
3492
3509
  /** Retrieves a list of cashier requests. */
3493
3510
  get: operations["GetCashierRequestCollection"];
3494
3511
  /**
3495
- * Creates a cashier request.
3512
+ * Creates a cashier deposit request.
3496
3513
  * To complete the deposit, the customer is redirected to the `cashier` link.
3497
3514
  * After the deposit, the customer is redirected to the `redirectUrl`.
3498
3515
  * Corresponding transaction webhooks are sent to webhooks subscribers.
@@ -3500,7 +3517,7 @@ export interface corePaths {
3500
3517
  post: operations["PostCashierRequest"];
3501
3518
  };
3502
3519
  "/cashier-requests/{id}": {
3503
- /** Retrieves a cashier request with a specified ID. */
3520
+ /** Retrieves a cashier deposit request with a specified ID. */
3504
3521
  get: operations["GetCashierRequest"];
3505
3522
  parameters: {
3506
3523
  path: {
@@ -4619,8 +4636,6 @@ export interface coreComponents {
4619
4636
  /** Average approved payment amount in USD. */
4620
4637
  amountUsd?: number;
4621
4638
  };
4622
- /** Read-only timestamp in ISO 8601 date-time format. */
4623
- ServerTimestamp: string;
4624
4639
  /** Customer's lifetime revenue. */
4625
4640
  CustomerLifetimeRevenue: {
4626
4641
  /** Merchant's reporting currency. */
@@ -4697,11 +4712,11 @@ export interface coreComponents {
4697
4712
  /** Unique customer identifier string. */
4698
4713
  id?: coreComponents["schemas"]["ResourceId"];
4699
4714
  /** Customer's email address. */
4700
- email?: string;
4715
+ email?: string | null;
4701
4716
  /** Customer's first name. */
4702
- firstName?: string;
4717
+ firstName?: string | null;
4703
4718
  /** Customer's last name. */
4704
- lastName?: string;
4719
+ lastName?: string | null;
4705
4720
  websiteId?: coreComponents["schemas"]["WebsiteId"];
4706
4721
  /**
4707
4722
  * Write-only payment token.
@@ -4710,16 +4725,19 @@ export interface coreComponents {
4710
4725
  * The token expires after first use.
4711
4726
  */
4712
4727
  paymentToken?: string;
4713
- defaultPaymentInstrument?: coreComponents["schemas"]["PaymentInstrumentValueObject"];
4728
+ defaultPaymentInstrument?:
4729
+ | coreComponents["schemas"]["PaymentInstrumentValueObject"]
4730
+ | null;
4714
4731
  createdTime?: coreComponents["schemas"]["CreatedTime"];
4715
4732
  updatedTime?: coreComponents["schemas"]["UpdatedTime"];
4716
4733
  customFields?: coreComponents["schemas"]["ResourceCustomFields"];
4717
- primaryAddress?: coreComponents["schemas"]["ContactObject"];
4734
+ /** Customer's primary address. */
4735
+ primaryAddress?: coreComponents["schemas"]["ContactObject"] | null;
4718
4736
  averageValue?: coreComponents["schemas"]["CustomerAverageValue"];
4719
4737
  /** Total number of approved payments made by the customer. */
4720
4738
  paymentCount?: number;
4721
4739
  /** Time and date of the customer's last approved payment. */
4722
- lastPaymentTime?: coreComponents["schemas"]["ServerTimestamp"];
4740
+ lastPaymentTime?: string | null;
4723
4741
  lifetimeRevenue?: coreComponents["schemas"]["CustomerLifetimeRevenue"];
4724
4742
  /**
4725
4743
  * Total number of invoices issued to the customer.
@@ -4855,6 +4873,8 @@ export interface coreComponents {
4855
4873
  externalUrl?: string;
4856
4874
  }[];
4857
4875
  };
4876
+ /** Read-only timestamp in ISO 8601 date-time format. */
4877
+ ServerTimestamp: string;
4858
4878
  CustomerTimeline: {
4859
4879
  /** ID of the customer timeline custom event. */
4860
4880
  id?: coreComponents["schemas"]["ResourceId"];
@@ -9105,13 +9125,6 @@ export interface coreComponents {
9105
9125
  /** Shipping amount which is calculated from [Shipping rates](https://api-reference.rebilly.com/tag/Shipping-rates). */
9106
9126
  amount?: number;
9107
9127
  };
9108
- /** Invoice taxes. */
9109
- InvoiceTax: {
9110
- /** Type of tax calculator. */
9111
- calculator: "manual" | "rebilly-taxjar";
9112
- /** Total amount of all invoice taxes. */
9113
- amount?: number;
9114
- };
9115
9128
  InvoiceTaxItem: {
9116
9129
  /** Amount of tax. */
9117
9130
  amount: number;
@@ -9147,16 +9160,34 @@ export interface coreComponents {
9147
9160
  city?: string | null;
9148
9161
  } | null;
9149
9162
  };
9150
- /** Manually set tax items. */
9151
- manual: coreComponents["schemas"]["InvoiceTax"] & {
9163
+ /** Manual tax calculator. */
9164
+ manual: {
9165
+ /** Type of tax calculator. */
9166
+ calculator: string;
9152
9167
  /** Taxes applied to this invoice. */
9153
9168
  items: coreComponents["schemas"]["InvoiceTaxItem"][];
9154
9169
  };
9155
- /** Taxjar-based taxes. */
9156
- "rebilly-taxjar": coreComponents["schemas"]["InvoiceTax"] & {
9157
- /** Taxes that are applied to this invoice and calculated based on the related product `taxCategoryId`. */
9170
+ /** TaxJar tax calculator. */
9171
+ "rebilly-taxjar": {
9172
+ /** Type of tax calculator. */
9173
+ calculator: string;
9174
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
9175
+ items?: coreComponents["schemas"]["InvoiceTaxItem"][];
9176
+ };
9177
+ /** Avalara tax calculator. */
9178
+ "rebilly-avalara": {
9179
+ /** Type of tax calculator. */
9180
+ calculator: string;
9181
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
9158
9182
  items?: coreComponents["schemas"]["InvoiceTaxItem"][];
9159
9183
  };
9184
+ /** Invoice taxes. */
9185
+ InvoiceTax: (Partial<coreComponents["schemas"]["manual"]> &
9186
+ Partial<coreComponents["schemas"]["rebilly-taxjar"]> &
9187
+ Partial<coreComponents["schemas"]["rebilly-avalara"]>) & {
9188
+ /** Total amount of all invoice taxes. */
9189
+ amount?: number;
9190
+ };
9160
9191
  ProductLink: coreComponents["schemas"]["Link"] & {
9161
9192
  /** Type of link. */
9162
9193
  rel: "product";
@@ -9777,7 +9808,7 @@ export interface coreComponents {
9777
9808
  /** Tax calculation settings. */
9778
9809
  defaultTaxCalculator?: {
9779
9810
  /** Type of tax calculator. */
9780
- type: "taxjar" | "flat";
9811
+ type: "taxjar" | "avalara" | "flat";
9781
9812
  /** Rate for flat tax calculation. */
9782
9813
  rate?: number | null;
9783
9814
  };
@@ -19098,7 +19129,7 @@ export interface operations {
19098
19129
  };
19099
19130
  };
19100
19131
  responses: {
19101
- /** List of cashier requests retrieved. */
19132
+ /** List of cashier deposit requests retrieved. */
19102
19133
  200: {
19103
19134
  headers: {};
19104
19135
  content: {
@@ -19110,7 +19141,7 @@ export interface operations {
19110
19141
  };
19111
19142
  };
19112
19143
  /**
19113
- * Creates a cashier request.
19144
+ * Creates a cashier deposit request.
19114
19145
  * To complete the deposit, the customer is redirected to the `cashier` link.
19115
19146
  * After the deposit, the customer is redirected to the `redirectUrl`.
19116
19147
  * Corresponding transaction webhooks are sent to webhooks subscribers.
@@ -19135,7 +19166,7 @@ export interface operations {
19135
19166
  };
19136
19167
  };
19137
19168
  };
19138
- /** Retrieves a cashier request with a specified ID. */
19169
+ /** Retrieves a cashier deposit request with a specified ID. */
19139
19170
  GetCashierRequest: {
19140
19171
  parameters: {
19141
19172
  path: {
@@ -19980,6 +20011,24 @@ export interface usersPaths {
19980
20011
  };
19981
20012
  };
19982
20013
  };
20014
+ "/credential-hashes/avalara": {
20015
+ /** Retrieves a list of Avalara credentials. */
20016
+ get: operations["GetAvalaraCredentialHashCollection"];
20017
+ /** Creates an Avalara credential. */
20018
+ post: operations["PostAvalaraCredentialHash"];
20019
+ };
20020
+ "/credential-hashes/avalara/{hash}": {
20021
+ /** Retrieves an Avalara credential with a specified token ID. */
20022
+ get: operations["GetAvalaraCredentialHash"];
20023
+ /** Updates an Avalara credential with a specified token ID. */
20024
+ patch: operations["PatchAvalaraCredentialHash"];
20025
+ parameters: {
20026
+ path: {
20027
+ /** ID of the token. */
20028
+ hash: usersComponents["parameters"]["hash"];
20029
+ };
20030
+ };
20031
+ };
19983
20032
  "/custom-domains": {
19984
20033
  /** Retrieve a list of custom domains. */
19985
20034
  get: operations["GetCustomDomainCollection"];
@@ -21242,8 +21291,6 @@ export interface usersComponents {
21242
21291
  /** Average approved payment amount in USD. */
21243
21292
  amountUsd?: number;
21244
21293
  };
21245
- /** Read-only timestamp in ISO 8601 date-time format. */
21246
- ServerTimestamp: string;
21247
21294
  /** Customer's lifetime revenue. */
21248
21295
  CustomerLifetimeRevenue: {
21249
21296
  /** Merchant's reporting currency. */
@@ -21320,11 +21367,11 @@ export interface usersComponents {
21320
21367
  /** Unique customer identifier string. */
21321
21368
  id?: usersComponents["schemas"]["ResourceId"];
21322
21369
  /** Customer's email address. */
21323
- email?: string;
21370
+ email?: string | null;
21324
21371
  /** Customer's first name. */
21325
- firstName?: string;
21372
+ firstName?: string | null;
21326
21373
  /** Customer's last name. */
21327
- lastName?: string;
21374
+ lastName?: string | null;
21328
21375
  websiteId?: usersComponents["schemas"]["WebsiteId"];
21329
21376
  /**
21330
21377
  * Write-only payment token.
@@ -21333,16 +21380,19 @@ export interface usersComponents {
21333
21380
  * The token expires after first use.
21334
21381
  */
21335
21382
  paymentToken?: string;
21336
- defaultPaymentInstrument?: usersComponents["schemas"]["PaymentInstrumentValueObject"];
21383
+ defaultPaymentInstrument?:
21384
+ | usersComponents["schemas"]["PaymentInstrumentValueObject"]
21385
+ | null;
21337
21386
  createdTime?: usersComponents["schemas"]["CreatedTime"];
21338
21387
  updatedTime?: usersComponents["schemas"]["UpdatedTime"];
21339
21388
  customFields?: usersComponents["schemas"]["ResourceCustomFields"];
21340
- primaryAddress?: usersComponents["schemas"]["ContactObject"];
21389
+ /** Customer's primary address. */
21390
+ primaryAddress?: usersComponents["schemas"]["ContactObject"] | null;
21341
21391
  averageValue?: usersComponents["schemas"]["CustomerAverageValue"];
21342
21392
  /** Total number of approved payments made by the customer. */
21343
21393
  paymentCount?: number;
21344
21394
  /** Time and date of the customer's last approved payment. */
21345
- lastPaymentTime?: usersComponents["schemas"]["ServerTimestamp"];
21395
+ lastPaymentTime?: string | null;
21346
21396
  lifetimeRevenue?: usersComponents["schemas"]["CustomerLifetimeRevenue"];
21347
21397
  /**
21348
21398
  * Total number of invoices issued to the customer.
@@ -21465,6 +21515,8 @@ export interface usersComponents {
21465
21515
  externalUrl?: string;
21466
21516
  }[];
21467
21517
  };
21518
+ /** Read-only timestamp in ISO 8601 date-time format. */
21519
+ ServerTimestamp: string;
21468
21520
  TransactionLink: usersComponents["schemas"]["Link"] & {
21469
21521
  /** Type of link. */
21470
21522
  rel: "transaction";
@@ -25612,13 +25664,6 @@ export interface usersComponents {
25612
25664
  /** Shipping amount which is calculated from [Shipping rates](https://api-reference.rebilly.com/tag/Shipping-rates). */
25613
25665
  amount?: number;
25614
25666
  };
25615
- /** Invoice taxes. */
25616
- InvoiceTax: {
25617
- /** Type of tax calculator. */
25618
- calculator: "manual" | "rebilly-taxjar";
25619
- /** Total amount of all invoice taxes. */
25620
- amount?: number;
25621
- };
25622
25667
  InvoiceTaxItem: {
25623
25668
  /** Amount of tax. */
25624
25669
  amount: number;
@@ -25654,16 +25699,34 @@ export interface usersComponents {
25654
25699
  city?: string | null;
25655
25700
  } | null;
25656
25701
  };
25657
- /** Manually set tax items. */
25658
- manual: usersComponents["schemas"]["InvoiceTax"] & {
25702
+ /** Manual tax calculator. */
25703
+ manual: {
25704
+ /** Type of tax calculator. */
25705
+ calculator: string;
25659
25706
  /** Taxes applied to this invoice. */
25660
25707
  items: usersComponents["schemas"]["InvoiceTaxItem"][];
25661
25708
  };
25662
- /** Taxjar-based taxes. */
25663
- "rebilly-taxjar": usersComponents["schemas"]["InvoiceTax"] & {
25664
- /** Taxes that are applied to this invoice and calculated based on the related product `taxCategoryId`. */
25709
+ /** TaxJar tax calculator. */
25710
+ "rebilly-taxjar": {
25711
+ /** Type of tax calculator. */
25712
+ calculator: string;
25713
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
25714
+ items?: usersComponents["schemas"]["InvoiceTaxItem"][];
25715
+ };
25716
+ /** Avalara tax calculator. */
25717
+ "rebilly-avalara": {
25718
+ /** Type of tax calculator. */
25719
+ calculator: string;
25720
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
25665
25721
  items?: usersComponents["schemas"]["InvoiceTaxItem"][];
25666
25722
  };
25723
+ /** Invoice taxes. */
25724
+ InvoiceTax: (Partial<usersComponents["schemas"]["manual"]> &
25725
+ Partial<usersComponents["schemas"]["rebilly-taxjar"]> &
25726
+ Partial<usersComponents["schemas"]["rebilly-avalara"]>) & {
25727
+ /** Total amount of all invoice taxes. */
25728
+ amount?: number;
25729
+ };
25667
25730
  ProductLink: usersComponents["schemas"]["Link"] & {
25668
25731
  /** Type of link. */
25669
25732
  rel: "product";
@@ -26284,7 +26347,7 @@ export interface usersComponents {
26284
26347
  /** Tax calculation settings. */
26285
26348
  defaultTaxCalculator?: {
26286
26349
  /** Type of tax calculator. */
26287
- type: "taxjar" | "flat";
26350
+ type: "taxjar" | "avalara" | "flat";
26288
26351
  /** Rate for flat tax calculation. */
26289
26352
  rate?: number | null;
26290
26353
  };
@@ -27300,6 +27363,14 @@ export interface usersComponents {
27300
27363
  /** Related resource links. */
27301
27364
  _links?: usersComponents["schemas"]["SelfLink"][];
27302
27365
  };
27366
+ AvalaraCredential: usersComponents["schemas"]["Credential"] & {
27367
+ /** Avalara license key. */
27368
+ licenseKey: string;
27369
+ /** Avalara account ID. */
27370
+ accountId: string;
27371
+ /** Related links. */
27372
+ _links?: usersComponents["schemas"]["SelfLink"][];
27373
+ };
27303
27374
  CustomDomain: {
27304
27375
  /** ID of the custom domain. */
27305
27376
  id?: string;
@@ -27665,28 +27736,28 @@ export interface usersComponents {
27665
27736
  /** List of contact attributes used during Keap Infusionsoft creation process. */
27666
27737
  contactBody: {
27667
27738
  /** Contact email addresses used during Keap Infusionsoft creation process. */
27668
- emailAddresses?: {
27739
+ email_addresses?: {
27669
27740
  /** Contact email address used during Keap Infusionsoft creation process. */
27670
27741
  email?: string;
27671
27742
  /** Contact email field type used during Keap Infusionsoft creation process. */
27672
27743
  field?: "EMAIL1" | "EMAIL2" | "EMAIL3";
27673
27744
  }[];
27674
27745
  /** Contact phone numbers used during Keap Infusionsoft creation process. */
27675
- phoneNumbers?: {
27746
+ phone_numbers?: {
27676
27747
  /** Contact phone number used during Keap Infusionsoft creation process. */
27677
27748
  number?: string;
27678
27749
  /** Contact phone field type used during Keap Infusionsoft creation process. */
27679
27750
  field?: "PHONE1" | "PHONE2" | "PHONE3" | "PHONE4" | "PHONE5";
27680
27751
  }[];
27681
27752
  };
27682
- /** List of order attributes used during Keap Infusionsoft creation process. */
27753
+ /** List of order attributes used during Keap Infusionsoft creation process except `contact_id`. */
27683
27754
  orderBody: {
27684
27755
  /** Order date used during Keap Infusionsoft creation process. */
27685
- orderDate: string;
27756
+ order_date: string;
27686
27757
  /** Order title used during Keap Infusionsoft creation process. */
27687
- orderTitle: string;
27758
+ order_title: string;
27688
27759
  /** Order type that used during Keap Infusionsoft creation process. */
27689
- orderType: "Offline" | "Online";
27760
+ order_type: "Offline" | "Online";
27690
27761
  };
27691
27762
  /** OAuth2 credential identifier string. */
27692
27763
  credentialHash: string;
@@ -31078,6 +31149,117 @@ export interface operations {
31078
31149
  };
31079
31150
  };
31080
31151
  };
31152
+ /** Retrieves a list of Avalara credentials. */
31153
+ GetAvalaraCredentialHashCollection: {
31154
+ parameters: {
31155
+ query: {
31156
+ /**
31157
+ * Filters the collection items. This field requires
31158
+ * a special format. Use `,` for multiple allowed values. Use `;` for multiple fields.
31159
+ *
31160
+ * For more information, see
31161
+ * [Using filter with collections](https://api-reference.rebilly.com/#section/Using-filter-with-collections).
31162
+ */
31163
+ filter?: usersComponents["parameters"]["collectionFilter"];
31164
+ /** Limits the number of collection items to be returned. */
31165
+ limit?: usersComponents["parameters"]["collectionLimit"];
31166
+ /** Specifies the starting point within the collection of items to be returned. */
31167
+ offset?: usersComponents["parameters"]["collectionOffset"];
31168
+ /**
31169
+ * Sorts and orders the collection of items. To sort in descending
31170
+ * order, prefix with `-`.
31171
+ */
31172
+ sort?: usersComponents["parameters"]["collectionSort"];
31173
+ /** Use this field to perform a partial search of text fields. */
31174
+ q?: usersComponents["parameters"]["collectionQuery"];
31175
+ };
31176
+ };
31177
+ responses: {
31178
+ /** List of Avalara credentials retrieved. */
31179
+ 200: {
31180
+ content: {
31181
+ "application/json": usersComponents["schemas"]["AvalaraCredential"][];
31182
+ };
31183
+ };
31184
+ 401: usersComponents["responses"]["Unauthorized"];
31185
+ 403: usersComponents["responses"]["Forbidden"];
31186
+ };
31187
+ };
31188
+ /** Creates an Avalara credential. */
31189
+ PostAvalaraCredentialHash: {
31190
+ responses: {
31191
+ /** Avalara credential created. */
31192
+ 201: {
31193
+ headers: {};
31194
+ content: {
31195
+ "application/json": usersComponents["schemas"]["AvalaraCredential"];
31196
+ };
31197
+ };
31198
+ /** Existing Avalara credential retrieved. */
31199
+ 303: {
31200
+ headers: {};
31201
+ content: {
31202
+ "application/json": usersComponents["schemas"]["AvalaraCredential"];
31203
+ };
31204
+ };
31205
+ 401: usersComponents["responses"]["Unauthorized"];
31206
+ 403: usersComponents["responses"]["Forbidden"];
31207
+ 422: usersComponents["responses"]["ValidationError"];
31208
+ };
31209
+ /** Avalara credential resource. */
31210
+ requestBody: {
31211
+ content: {
31212
+ "application/json": usersComponents["schemas"]["AvalaraCredential"];
31213
+ };
31214
+ };
31215
+ };
31216
+ /** Retrieves an Avalara credential with a specified token ID. */
31217
+ GetAvalaraCredentialHash: {
31218
+ parameters: {
31219
+ path: {
31220
+ /** ID of the token. */
31221
+ hash: usersComponents["parameters"]["hash"];
31222
+ };
31223
+ };
31224
+ responses: {
31225
+ /** Avalara credential retrieved. */
31226
+ 200: {
31227
+ content: {
31228
+ "application/json": usersComponents["schemas"]["AvalaraCredential"];
31229
+ };
31230
+ };
31231
+ 401: usersComponents["responses"]["Unauthorized"];
31232
+ 403: usersComponents["responses"]["Forbidden"];
31233
+ 404: usersComponents["responses"]["NotFound"];
31234
+ };
31235
+ };
31236
+ /** Updates an Avalara credential with a specified token ID. */
31237
+ PatchAvalaraCredentialHash: {
31238
+ parameters: {
31239
+ path: {
31240
+ /** ID of the token. */
31241
+ hash: usersComponents["parameters"]["hash"];
31242
+ };
31243
+ };
31244
+ responses: {
31245
+ /** Avalara credential updated. */
31246
+ 200: {
31247
+ content: {
31248
+ "application/json": usersComponents["schemas"]["AvalaraCredential"];
31249
+ };
31250
+ };
31251
+ 401: usersComponents["responses"]["Unauthorized"];
31252
+ 403: usersComponents["responses"]["Forbidden"];
31253
+ 404: usersComponents["responses"]["NotFound"];
31254
+ 422: usersComponents["responses"]["ValidationError"];
31255
+ };
31256
+ /** Avalara credential resource. */
31257
+ requestBody: {
31258
+ content: {
31259
+ "application/json": usersComponents["schemas"]["PatchCredential"];
31260
+ };
31261
+ };
31262
+ };
31081
31263
  /** Retrieve a list of custom domains. */
31082
31264
  GetCustomDomainCollection: {
31083
31265
  parameters: {
@@ -34478,7 +34660,7 @@ export interface storefrontPaths {
34478
34660
  };
34479
34661
  };
34480
34662
  "/cashier-requests/{id}": {
34481
- /** Retrieves a cashier request with a specified ID. */
34663
+ /** Retrieves a cashier deposit request with a specified ID. */
34482
34664
  get: operations["StorefrontGetCashierRequest"];
34483
34665
  parameters: {
34484
34666
  path: {
@@ -35145,8 +35327,6 @@ export interface storefrontComponents {
35145
35327
  /** Average approved payment amount in USD. */
35146
35328
  amountUsd?: number;
35147
35329
  };
35148
- /** Read-only timestamp in ISO 8601 date-time format. */
35149
- ServerTimestamp: string;
35150
35330
  /** Customer's lifetime revenue. */
35151
35331
  CustomerLifetimeRevenue: {
35152
35332
  /** Merchant's reporting currency. */
@@ -35223,11 +35403,11 @@ export interface storefrontComponents {
35223
35403
  /** Unique customer identifier string. */
35224
35404
  id?: storefrontComponents["schemas"]["ResourceId"];
35225
35405
  /** Customer's email address. */
35226
- email?: string;
35406
+ email?: string | null;
35227
35407
  /** Customer's first name. */
35228
- firstName?: string;
35408
+ firstName?: string | null;
35229
35409
  /** Customer's last name. */
35230
- lastName?: string;
35410
+ lastName?: string | null;
35231
35411
  websiteId?: storefrontComponents["schemas"]["WebsiteId"];
35232
35412
  /**
35233
35413
  * Write-only payment token.
@@ -35236,16 +35416,19 @@ export interface storefrontComponents {
35236
35416
  * The token expires after first use.
35237
35417
  */
35238
35418
  paymentToken?: string;
35239
- defaultPaymentInstrument?: storefrontComponents["schemas"]["PaymentInstrumentValueObject"];
35419
+ defaultPaymentInstrument?:
35420
+ | storefrontComponents["schemas"]["PaymentInstrumentValueObject"]
35421
+ | null;
35240
35422
  createdTime?: storefrontComponents["schemas"]["CreatedTime"];
35241
35423
  updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
35242
35424
  customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
35243
- primaryAddress?: storefrontComponents["schemas"]["ContactObject"];
35425
+ /** Customer's primary address. */
35426
+ primaryAddress?: storefrontComponents["schemas"]["ContactObject"] | null;
35244
35427
  averageValue?: storefrontComponents["schemas"]["CustomerAverageValue"];
35245
35428
  /** Total number of approved payments made by the customer. */
35246
35429
  paymentCount?: number;
35247
35430
  /** Time and date of the customer's last approved payment. */
35248
- lastPaymentTime?: storefrontComponents["schemas"]["ServerTimestamp"];
35431
+ lastPaymentTime?: string | null;
35249
35432
  lifetimeRevenue?: storefrontComponents["schemas"]["CustomerLifetimeRevenue"];
35250
35433
  /**
35251
35434
  * Total number of invoices issued to the customer.
@@ -35278,6 +35461,8 @@ export interface storefrontComponents {
35278
35461
  /** Array of embedded objects that are requested using the `expand` query string parameter. */
35279
35462
  _embedded?: Partial<storefrontComponents["schemas"]["LeadSourceEmbed"]>[];
35280
35463
  };
35464
+ /** Read-only timestamp in ISO 8601 date-time format. */
35465
+ ServerTimestamp: string;
35281
35466
  TransactionLink: storefrontComponents["schemas"]["Link"] & {
35282
35467
  /** Type of link. */
35283
35468
  rel: "transaction";
@@ -39425,13 +39610,6 @@ export interface storefrontComponents {
39425
39610
  /** Shipping amount which is calculated from [Shipping rates](https://api-reference.rebilly.com/tag/Shipping-rates). */
39426
39611
  amount?: number;
39427
39612
  };
39428
- /** Invoice taxes. */
39429
- InvoiceTax: {
39430
- /** Type of tax calculator. */
39431
- calculator: "manual" | "rebilly-taxjar";
39432
- /** Total amount of all invoice taxes. */
39433
- amount?: number;
39434
- };
39435
39613
  InvoiceTaxItem: {
39436
39614
  /** Amount of tax. */
39437
39615
  amount: number;
@@ -39467,16 +39645,34 @@ export interface storefrontComponents {
39467
39645
  city?: string | null;
39468
39646
  } | null;
39469
39647
  };
39470
- /** Manually set tax items. */
39471
- manual: storefrontComponents["schemas"]["InvoiceTax"] & {
39648
+ /** Manual tax calculator. */
39649
+ manual: {
39650
+ /** Type of tax calculator. */
39651
+ calculator: string;
39472
39652
  /** Taxes applied to this invoice. */
39473
39653
  items: storefrontComponents["schemas"]["InvoiceTaxItem"][];
39474
39654
  };
39475
- /** Taxjar-based taxes. */
39476
- "rebilly-taxjar": storefrontComponents["schemas"]["InvoiceTax"] & {
39477
- /** Taxes that are applied to this invoice and calculated based on the related product `taxCategoryId`. */
39655
+ /** TaxJar tax calculator. */
39656
+ "rebilly-taxjar": {
39657
+ /** Type of tax calculator. */
39658
+ calculator: string;
39659
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
39478
39660
  items?: storefrontComponents["schemas"]["InvoiceTaxItem"][];
39479
39661
  };
39662
+ /** Avalara tax calculator. */
39663
+ "rebilly-avalara": {
39664
+ /** Type of tax calculator. */
39665
+ calculator: string;
39666
+ /** Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product. */
39667
+ items?: storefrontComponents["schemas"]["InvoiceTaxItem"][];
39668
+ };
39669
+ /** Invoice taxes. */
39670
+ InvoiceTax: (Partial<storefrontComponents["schemas"]["manual"]> &
39671
+ Partial<storefrontComponents["schemas"]["rebilly-taxjar"]> &
39672
+ Partial<storefrontComponents["schemas"]["rebilly-avalara"]>) & {
39673
+ /** Total amount of all invoice taxes. */
39674
+ amount?: number;
39675
+ };
39480
39676
  ProductLink: storefrontComponents["schemas"]["Link"] & {
39481
39677
  /** Type of link. */
39482
39678
  rel: "product";
@@ -40097,7 +40293,7 @@ export interface storefrontComponents {
40097
40293
  /** Tax calculation settings. */
40098
40294
  defaultTaxCalculator?: {
40099
40295
  /** Type of tax calculator. */
40100
- type: "taxjar" | "flat";
40296
+ type: "taxjar" | "avalara" | "flat";
40101
40297
  /** Rate for flat tax calculation. */
40102
40298
  rate?: number | null;
40103
40299
  };
@@ -42227,7 +42423,7 @@ export interface operations {
42227
42423
  404: storefrontComponents["responses"]["NotFound"];
42228
42424
  };
42229
42425
  };
42230
- /** Retrieves a cashier request with a specified ID. */
42426
+ /** Retrieves a cashier deposit request with a specified ID. */
42231
42427
  StorefrontGetCashierRequest: {
42232
42428
  parameters: {
42233
42429
  path: {
@@ -42246,7 +42442,7 @@ export interface operations {
42246
42442
  };
42247
42443
  };
42248
42444
  responses: {
42249
- /** Cashier request retrieved. */
42445
+ /** Cashier deposit request retrieved. */
42250
42446
  200: {
42251
42447
  content: {
42252
42448
  "application/json": storefrontComponents["schemas"]["CashierRequest"];
@@ -45996,6 +46192,17 @@ declare module "resources/credential-hashes-resource" {
45996
46192
  hash: any;
45997
46193
  data: any;
45998
46194
  }): any;
46195
+ getAllAvalaraCredentials({ filter, limit, offset, sort, q, }?: rebilly.GetAvalaraCredentialHashCollectionRequest): rebilly.GetAvalaraCredentialHashCollectionResponsePromise;
46196
+ createAvalaraCredential({ data }: {
46197
+ data: any;
46198
+ }): any;
46199
+ getAvalaraCredential({ hash }: {
46200
+ hash: any;
46201
+ }): rebilly.GetAvalaraCredentialHashResponsePromise;
46202
+ updateAvalaraCredential({ hash, data }: {
46203
+ hash: any;
46204
+ data: any;
46205
+ }): any;
45999
46206
  };
46000
46207
  }
46001
46208
  declare module "resources/credit-memos-resource" {
@@ -47766,6 +47973,23 @@ declare module "resources/api-instance" {
47766
47973
  hash: any;
47767
47974
  data: any;
47768
47975
  }): any;
47976
+ getAllAvalaraCredentials({ filter, limit, offset, sort, q, }?: {
47977
+ filter?: string;
47978
+ limit?: number;
47979
+ offset?: number;
47980
+ sort?: string[];
47981
+ q?: string;
47982
+ }): rebilly.GetAvalaraCredentialHashCollectionResponsePromise;
47983
+ createAvalaraCredential({ data }: {
47984
+ data: any;
47985
+ }): any;
47986
+ getAvalaraCredential({ hash }: {
47987
+ hash: any;
47988
+ }): rebilly.GetAvalaraCredentialHashResponsePromise;
47989
+ updateAvalaraCredential({ hash, data }: {
47990
+ hash: any;
47991
+ data: any;
47992
+ }): any;
47769
47993
  };
47770
47994
  creditMemos: {
47771
47995
  getAll({ filter, sort, limit, offset, q, expand, }?: {
@@ -538,7 +538,7 @@ function cloneArrayDeep(arr, instanceClone) {
538
538
  return res;
539
539
  }
540
540
  var cloneDeep_1 = cloneDeep;
541
- const version = "47.17.0";
541
+ const version = "47.17.1";
542
542
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
543
543
  let nanoid = (size = 21) => {
544
544
  let id = "";
@@ -1304,6 +1304,25 @@ function CredentialHashesResource({ apiHandler }) {
1304
1304
  },
1305
1305
  updateTaxJarCredential({ hash, data }) {
1306
1306
  return apiHandler.patch(`credential-hashes/taxjar/${hash}`, data);
1307
+ },
1308
+ getAllAvalaraCredentials({
1309
+ filter = null,
1310
+ limit = null,
1311
+ offset = null,
1312
+ sort = null,
1313
+ q = null
1314
+ } = {}) {
1315
+ const params = { filter, limit, offset, sort, q };
1316
+ return apiHandler.getAll(`credential-hashes/avalara`, params);
1317
+ },
1318
+ createAvalaraCredential({ data }) {
1319
+ return apiHandler.post(`credential-hashes/avalara`, data);
1320
+ },
1321
+ getAvalaraCredential({ hash }) {
1322
+ return apiHandler.get(`credential-hashes/avalara/${hash}`);
1323
+ },
1324
+ updateAvalaraCredential({ hash, data }) {
1325
+ return apiHandler.patch(`credential-hashes/avalara/${hash}`, data);
1307
1326
  }
1308
1327
  };
1309
1328
  }
@@ -33,4 +33,4 @@ var Zn=Object.defineProperty;var re=Object.getOwnPropertySymbols;var Hn=Object.p
33
33
  *
34
34
  * Copyright (c) 2014-2017, Jon Schlinkert.
35
35
  * Released under the MIT License.
36
- */var je=qe,Oe=Object.prototype.hasOwnProperty,Me=function(e,t,r){je(e,function(s,u){if(Oe.call(e,u))return t.call(r,e[u],u,e)})},De=$e,Fe=Se,Ke=xe,Be=Me;function j(n,e){switch(Ke(n)){case"object":return Ne(n,e);case"array":return Ve(n,e);default:return Fe(n)}}function Ne(n,e){if(De(n)){var t={};return Be(n,function(r,s){this[s]=j(r,e)},t),t}else return e?e(n):n}function Ve(n,e){for(var t=n.length,r=[],s=-1;++s<t;)r[s]=j(n[s],e);return r}var ze=j;const Le="47.17.0";let Ue="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",We=(n=21)=>{let e="",t=n;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=q.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,x(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class E{constructor(){if(E.instance)return E.instance;this.requests={},E.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 I=new E;class P{}N(P,"cancelById",(e,t)=>{try{I.getById(e).cancel(t),I.deleteById(e)}catch{}}),N(P,"cancelAll",e=>I.getAll().forEach(t=>{t.cancel(e),I.deleteById(t.id)}));var Ge={cancelAll:(...n)=>P.cancelAll(...n)};const d={request:"request",response:"response"},J=n=>{if(!Object.values(d).includes(n))throw new Error(`There is no such interceptor type as "${n}"`);return!0};function O({options:n}){const e=t();function t(){return q.default.create(s())}function r(){return e}function s(){return{baseURL:u(),timeout:n.requestTimeout,headers:o()}}function u(){let c=n.isSandbox?n.apiEndpoints.sandbox:n.apiEndpoints.live;return n.apiVersion&&(c=`${c}/${n.apiVersion}`),n.organizationId&&(c=`${c}/organizations/${n.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Le}`};return n.apiKey&&(c["REB-APIKEY"]=n.apiKey),c}function l(){return ze(e.defaults.headers)}function g(c){n.requestTimeout=Number(c),e.defaults.timeout=n.requestTimeout}function $(c=n.jwt){const i=l();n.apiKey=null,n.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=n.publishableKey){const i=l();n.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&&(n.apiEndpoints.live=c),i&&(n.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 Bn({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.request,{thenDelegate:c,catchDelegate:i})}function Nn(c){Q(d.request,c)}function Vn({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.response,{thenDelegate:c,catchDelegate:i})}function zn(c){Q(d.response,c)}function T({request:c,isCollection:i,config:a}){const h=Z(a),{id:A,cancelToken:Xn}=I.save();h.cancelToken=Xn;const ne=async function(){try{const S=await c(h);return Ln({response:S,isCollection:i,config:h})}catch(S){return X({error:S,config:h})}finally{I.deleteById(A)}}();return ne.cancel=S=>P.cancelById(A,S),ne}function Ln({response:c,isCollection:i,config:a}){return i?new se(c,a):new V(c,a)}function X({error:c}){if(q.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 Un(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=Un(c);return C({},i)}function H(c,i={}){return T({request:a=>e.get(c,a),config:{params:i}})}function Wn(c,i){return T({request:a=>e.get(c,a),config:{params:i},isCollection:!0})}function ee(c,i,a={}){let h={};return a.authenticate===!1&&(h={headers:l()},delete h.headers.common["REB-APIKEY"],delete h.headers.common.Authorization),a.params&&(h.params=C({},a.params)),T({request:A=>e.post(c,i,A),config:h})}function te(c,i,a={}){return T({request:h=>e.put(c,i,h),config:{params:a}})}function Jn(c,i){return T({request:a=>e.patch(c,i,a),config:{}})}function Gn(c){return T({request:i=>e.delete(c,i),config:{}})}function Yn(c,i){return T({request:a=>e.delete(c,a),config:{data:C({},i)}})}async function _n(c,i,a,h={}){if(i==="")return ee(c,a,{params:h});try{if((await H(c)).response.status===200)throw new y.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(A){if(A.name==="RebillyNotFoundError")return te(c,a,h);throw A}}async function Qn(c,i){const a=Z(i);try{const h=await e.get(c,a);return new ue(h,a)}catch(h){return X({error:h,config:a})}}return{getInstance:r,addRequestInterceptor:Bn,removeRequestInterceptor:Nn,addResponseInterceptor:Vn,removeResponseInterceptor:zn,setTimeout:g,setProxyAgent:F,setSessionToken:$,setPublishableKey:k,setEndpoints:K,get:H,getAll:Wn,post:ee,put:te,patch:Jn,delete:Gn,deleteAll:Yn,create:_n,download:Qn}}function Ye({apiHandler:n}){return{activate({token:e}){return n.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return n.post("forgot-password",e,{authenticate:!1})},logout(){return n.post("logout")},signIn({data:e}){return n.post("signin",e,{authenticate:!1})},signUp({data:e}){return n.post("signup",e,{authenticate:!1})}}}function _e({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("aml-checks",o)},get({id:e}){return n.get(`aml-checks/${e}`)},review({id:e,data:t}){return n.post(`aml-checks/${e}/review`,t)}}}function Qe({apiHandler:n}){return{getAll({firstName:e,lastName:t,dob:r=null,country:s=null}){const u={firstName:e,lastName:t,dob:r,country:s};return n.get("aml",u)}}}function Xe({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null}={}){const s={limit:e,offset:t,sort:r};return n.getAll("api-keys",s)},create({id:e="",data:t}){return n.create(`api-keys/${e}`,e,t)},get({id:e}){return n.get(`api-keys/${e}`)},update({id:e,data:t}){return n.put(`api-keys/${e}`,t)},delete({id:e}){return n.delete(`api-keys/${e}`)}}}function Ze({apiHandler:n}){return{get({applicationId:e}){return n.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return n.put(`application-instances/${e}`,t)},delete({applicationId:e}){return n.delete(`application-instances/${e}`)}}}function He({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("applications",g)},create({data:e}){return n.post("applications",e)},get({id:e}){return n.get(`applications/${e}`)},getInstances({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`applications/${e}/instances`,s)},getInstance({id:e,organizationId:t}){return n.get(`applications/${e}/instances/${t}`)}}}function et({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("balance-transactions",r)},get({id:e}){return n.get(`balance-transactions/${e}`)}}}function tt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("billing-portals",o)},create({id:e="",data:t}){return n.create(`billing-portals/${e}`,e,t)},get({id:e}){return n.get(`billing-portals/${e}`)},update({id:e,data:t}){return n.put(`billing-portals/${e}`,t)},delete({id:e}){return n.delete(`billing-portals/${e}`)}}}function nt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("blocklists",o)},create({id:e="",data:t}){return n.create(`blocklists/${e}`,e,t)},get({id:e}){return n.get(`blocklists/${e}`)},delete({id:e}){return n.delete(`blocklists/${e}`)}}}function rt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null}={}){const u={limit:e,offset:t,sort:r,filter:s};return n.getAll("broadcast-messages",u)},create({data:e}){return n.post("broadcast-messages",e)},get({id:e}){return n.get(`broadcast-messages/${e}`)},delete({id:e}){return n.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return n.patch(`broadcast-messages/${e}`,t)}}}function st({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("cashier-requests",u)},create({data:e}){return n.post("cashier-requests",e)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`cashier-requests/${e}`,r)}}}function ut({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("cashier-strategies",u)},create({id:e="",data:t}){return n.create(`cashier-strategies/${e}`,e,t)},get({id:e}){return n.get(`cashier-strategies/${e}`)},update({id:e,data:t}){return n.put(`cashier-strategies/${e}`,t)},delete({id:e}){return n.delete(`cashier-strategies/${e}`)}}}function ot({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("checkout-forms",o)},create({id:e="",data:t}){return n.create(`checkout-forms/${e}`,e,t)},get({id:e}){return n.get(`checkout-forms/${e}`)},update({id:e,data:t}){return n.put(`checkout-forms/${e}`,t)},delete({id:e}){return n.delete(`checkout-forms/${e}`)}}}function lt({apiHandler:n}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("coupons-redemptions",o)},redeem({data:e}){return n.post("coupons-redemptions",e)},getRedemption({id:e}){return n.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return n.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("coupons",o)},create({id:e="",data:t}){return n.create(`coupons/${e}`,e,t)},get({id:e}){return n.get(`coupons/${e}`)},update({id:e,data:t}){return n.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return n.post(`coupons/${e}/expiration`,t)}}}function ct({apiHandler:n}){return{createAWSSESCredential({data:e}){return n.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return n.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return n.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return n.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return n.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return n.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return n.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return n.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return n.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return n.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return n.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return n.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const g={limit:t,offset:r,filter:s,q:u,fields:o,sort:l};return n.getAll(`credential-hashes/oauth2/${e}/items`,g)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return n.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return n.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return n.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return n.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return n.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return n.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return n.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return n.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return n.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return n.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return n.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return n.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return n.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return n.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return n.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return n.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return n.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return n.patch(`credential-hashes/taxjar/${e}`,t)}}}function it({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("credit-memos",l)},create({id:e="",data:t}){return n.create(`credit-memos/${e}`,e,t)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`credit-memos/${e}`,r)},update({id:e,data:t}){return n.put(`credit-memos/${e}`,t)},patch({id:e,data:t}){return n.patch(`credit-memos/${e}`,t)},void({id:e}){return n.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`credit-memos/${e}/timeline/${t}`)}}}function at({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("custom-domains",o)},create({data:e}){return n.post("custom-domains",e)},get({domain:e}){return n.get(`custom-domains/${e}`)},delete({domain:e}){return n.delete(`custom-domains/${e}`)}}}function gt({apiHandler:n}){return{getAll({resource:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return n.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:r}){return n.put(`custom-fields/${e}/${t}`,r)},update({resource:e,name:t,data:r}){return n.put(`custom-fields/${e}/${t}`,r)}}}function mt({apiHandler:n}){return{getAuthOptions(){return n.get("authentication-options")},updateAuthOptions({data:e}){return n.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("authentication-tokens",r)},login({data:e}){return n.post("authentication-tokens",e)},verify({token:e}){return n.get(`authentication-tokens/${e}`)},logout({token:e}){return n.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return n.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("credentials",r)},createCredential({id:e="",data:t}){return n.create(`credentials/${e}`,e,t)},getCredential({id:e}){return n.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return n.put(`credentials/${e}`,t)},deleteCredential({id:e}){return n.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("password-tokens",r)},createResetPasswordToken({data:e}){return n.post("password-tokens",e)},getResetPasswordToken({id:e}){return n.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return n.delete(`password-tokens/${e}`)}}}const w={Accept:"text/csv"},G={Accept:"application/pdf"};function ft({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("customers",g)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:r=null}){const s={expand:t,fields:r};return n.get(`customers/${e}`,s)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return n.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return n.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return n.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return n.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return n.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return n.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`customers/${e}/timeline/${t}`)},getCustomerEddScore({id:e}){return n.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return n.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:t}){return n.post(`customers/${e}/edd-timeline`,t)},getAllEddSearchResults({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.get(`customers/${e}/edd-search-results`,s)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("customers",l)}}}function ht({apiHandler:n}){return{create({data:e}){return n.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return n.post("digital-wallets/validation",e)}}}function pt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("disputes",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`disputes/${e}`,e,t,s)},get({id:e}){return n.get(`disputes/${e}`)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("disputes",l)}}}function $t({apiHandler:n}){return{verify({token:e}){return n.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,q:u};return n.getAll("email-delivery-settings",o)},create({data:e}){return n.post("email-delivery-settings",e)},get({id:e}){return n.get(`email-delivery-settings/${e}`)},delete({id:e}){return n.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return n.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return n.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function yt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,q:r=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:t,q:r,sort:s,filter:u};return n.getAll("email-messages",o)},create({data:e}){return n.post("email-messages",e)},get({id:e}){return n.get(`email-messages/${e}`)},delete({id:e}){return n.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return n.patch(`email-messages/${e}`,t)}}}function bt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("email-notifications",r)}}}function At({apiHandler:n}){return{getAll(){return n.getAll("events")},get({eventType:e}){return n.get(`events/${e}`)},getRules({eventType:e}){return n.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return n.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return n.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:t}){return n.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return n.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return n.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:g=null}){const $={limit:t,offset:r,filter:s,q:u,sort:o,fields:l,expand:g};return n.getAll(`events/${e}/rules/history`,$)},getRulesVersionNumber({eventType:e,version:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/history/${t}`,u)},getRulesVersionDetail({eventType:e,version:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/versions/${t}`,u)},getAllDraftRulesets({eventType:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:g=null}){const $={limit:t,offset:r,filter:s,q:u,sort:o,fields:l,expand:g};return n.getAll(`events/${e}/rules/drafts`,$)},createDraftRuleset({eventType:e,data:t}){return n.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/drafts/${t}`,u)},updateDraftRuleset({eventType:e,id:t,data:r}){return n.put(`events/${e}/rules/drafts/${t}`,r)},deleteDraftRuleset({eventType:e,id:t}){return n.delete(`events/${e}/rules/drafts/${t}`)}}}function Rt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("fees",r)},create({id:e="",data:t}){return n.create(`fees/${e}`,e,t)},get({id:e}){return n.get(`fees/${e}`)},upsert({id:e,data:t}){return n.put(`fees/${e}`,t)},patch({id:e,data:t}){return n.patch(`fees/${e}`,t)}}}function dt({apiHandler:n}){return{getAllAttachments({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("attachments",g)},attach({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return n.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`attachments/${e}`,t,s)},detach({id:e}){return n.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("files",g)},upload({fileObject:e}){return n.post("files",e)},get({id:e}){return n.get(`files/${e}`)},update({id:e,data:t}){return n.put(`files/${e}`,t)},delete({id:e}){return n.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return n.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(t);r.push(o);const g=(await o).items.map(k=>this.detach({id:k.fields.id}));r=[...r,g],await Promise.all(g);const $=n.delete(`files/${e}`);return r.push($),$})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:e});r.push(o),await o;const l={name:o.name,extension:o.extension,description:t.description,tags:t.tags,url:""},g=this.update({id:o.fields.id,data:l});return r.push(g),g})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function wt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:t,sort:r,filter:s,q:u,fields:o};return n.getAll("gateway-accounts",l)},create({id:e="",data:t}){return n.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return n.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return n.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return n.delete(`gateway-accounts/${e}`)},close({id:e}){return n.post(`gateway-accounts/${e}/close`)},disable({id:e}){return n.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null}){const o={limit:t,offset:r,filter:s,sort:u};return n.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:t}){return n.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return n.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:r}){return n.put(`gateway-accounts/${e}/downtime-schedules/${t}`,r)},deleteDowntimeSchedule({id:e,downtimeId:t}){return n.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return n.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return n.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return n.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:r}){return n.put(`gateway-accounts/${e}/limits/${t}`,r)},deleteVolumeLimit({id:e,limitId:t}){return n.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return n.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return n.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return n.put(`gateway-accounts/${e}/financial-settings`,t)}}}function vt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("integrations",r)},get({label:e}){return n.get(`integrations/${e}`)}}}function kt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("invoices",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`invoices/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:r=null,expand:s=null}){const u={limit:t,offset:r,expand:s};return n.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return n.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return n.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:r}){return n.put(`invoices/${e}/items/${t}`,r)},deleteInvoiceItem({id:e,itemId:t}){return n.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return n.post(`invoices/${e}/issue`,t)},abandon({id:e}){return n.post(`invoices/${e}/abandon`)},void({id:e}){return n.post(`invoices/${e}/void`)},recalculate({id:e}){return n.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return n.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return n.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`invoices/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("invoices",l)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return n.download(`invoices/${e}`,t)}}}function Tt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,expand:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,expand:u};return n.getAll("kyc-documents",o)},create({id:e="",data:t}){return n.create(`kyc-documents/${e}`,e,t)},get({id:e}){return n.get(`kyc-documents/${e}`)},update({id:e,data:t}){return n.put(`kyc-documents/${e}`,t)},accept({id:e}){return n.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return n.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return n.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return n.post(`kyc-documents/${e}/review`)},startReview({id:e}){return n.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return n.post(`kyc-documents/${e}/stop-review`)}}}function It({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("kyc-requests",u)},create({data:e}){return n.post("kyc-requests",e)},get({id:e}){return n.get(`kyc-requests/${e}`)},delete({id:e}){return n.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return n.patch(`kyc-requests/${e}`,t)}}}function Et({apiHandler:n}){return{getKycSettings(){return n.get("kyc-settings")},updateKycSettings({data:e}){return n.put("kyc-settings",e)}}}function St({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:t,filter:r,sort:s,fields:u,q:o};return n.getAll("lists",l)},create({id:e="",data:t}){return n.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return n.get(`lists/${e}`)},update({id:e,data:t}){return n.put(`lists/${e}`,t)},delete({id:e}){return n.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return n.get(`lists/${e}/${t}`)}}}function Ct({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("memberships",u)},get({organizationId:e,userId:t}){return n.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:r}){return n.put(`memberships/${e}/${t}`,r)},delete({organizationId:e,userId:t}){return n.delete(`memberships/${e}/${t}`)}}}function xt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("organization-exports",o)},create({data:e}){return n.post("organization-exports",e)},get({id:e}){return n.get(`organization-exports/${e}`)}}}function Pt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null}={}){const u={limit:e,offset:t,filter:r,q:s};return n.getAll("organizations",u)},create({data:e}){return n.post("organizations",e)},get({id:e}){return n.get(`organizations/${e}`)},update({id:e,data:t}){return n.patch(`organizations/${e}`,t)}}}function qt({apiHandler:n}){return{getAll({limit:e=null,q:t=null}={}){const r={limit:e,q:t};return n.getAll("payment-cards-bank-names",r)}}}function jt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("payment-instruments",l)},create({data:e}){return n.post("payment-instruments",e)},get({id:e}){return n.get(`payment-instruments/${e}`)},update({id:e,data:t}){return n.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return n.post(`payment-instruments/${e}/deactivation`)}}}function Ot({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("payment-methods",r)},get({apiName:e}){return n.get(`payment-methods/${e}`)}}}function Mt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("tokens",r)},create({data:e}){return n.post("tokens",e)},get({token:e}){return n.get(`tokens/${e}`)}}}function Dt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("payout-requests",u)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`payout-requests/${e}`,r)},accept({id:e}){return n.post(`payout-requests/${e}/accept`)},reject({id:e,data:t}){return n.post(`payout-requests/${e}/reject`,t)},getPaymentInstruments({id:e}){return n.get(`payout-requests/${e}/payment-instruments`)}}}function Ft({apiHandler:n}){return{create({data:e}){return n.post("payouts",e)}}}function Kt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("plans",o)},create({id:e="",data:t}){return n.create(`plans/${e}`,e,t)},get({id:e}){return n.get(`plans/${e}`)},update({id:e,data:t}){return n.put(`plans/${e}`,t)},delete({id:e}){return n.delete(`plans/${e}`)}}}function Bt({apiHandler:n}){return{sendEmailRuleAction({data:e}){return n.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return n.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return n.post("previews/webhooks",e)},order({data:e}){return n.post("previews/orders",e)}}}function Nt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("products",o)},create({id:e="",data:t}){return n.create(`products/${e}`,e,t)},get({id:e}){return n.get(`products/${e}`)},update({id:e,data:t}){return n.put(`products/${e}`,t)},delete({id:e}){return n.delete(`products/${e}`)}}}function Vt({apiHandler:n}){return{startPermissionsEmulation({data:e}){return n.post("permissions-emulation",e)},stopPermissionsEmulation(){return n.delete("permissions-emulation")},get(){return n.get("profile")},update({data:e}){return n.put("profile",e)},getMfa(){return n.get("profile/mfa")},updateMfa(){return n.post("profile/mfa")},deleteMfa(){return n.delete("profile/mfa")},updatePassword({data:e}){return n.post("profile/password",e)},resetTotp(){return n.post("profile/totp-reset")}}}function zt({apiHandler:n}){return{readyToPay({data:e}){return n.post("ready-to-pay",e)}}}function Lt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:r,sort:s,q:u,expand:o};return n.getAll("roles",l)},create({id:e="",data:t}){return n.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`roles/${e}`,r)},update({id:e,data:t}){return n.put(`roles/${e}`,t)},delete({id:e}){return n.delete(`roles/${e}`)}}}function Ut({apiHandler:n}){return{get({sort:e=null,limit:t=null,offset:r=null,q:s=null}){const u={sort:e,limit:t,offset:r,q:s};return n.get("search",u)}}}function Wt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("grid-segments",o)},create({id:e="",data:t}){return n.create(`grid-segments/${e}`,e,t)},get({id:e}){return n.get(`grid-segments/${e}`)},update({id:e,data:t}){return n.put(`grid-segments/${e}`,t)},delete({id:e}){return n.delete(`grid-segments/${e}`)}}}function Jt({apiHandler:n}){return{getAll({eventType:e}){return n.getAll(`send-through-attribution/${e}`)}}}function Gt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,q:u};return n.getAll("shipping-rates",o)},create({id:e="",data:t}){return n.create(`shipping-rates/${e}`,e,t)},get({id:e}){return n.get(`shipping-rates/${e}`)},update({id:e,data:t}){return n.put(`shipping-rates/${e}`,t)},delete({id:e}){return n.delete(`shipping-rates/${e}`)}}}function Yt({apiHandler:n}){return{get(){return n.get("status")}}}function _t({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return n.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return n.get(`subscription-cancellations/${e}`)},delete({id:e}){return n.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return n.patch(`subscription-cancellations/${e}`,t)}}}function Qt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return n.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return n.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return n.put(`subscription-pauses/${e}`,t)},delete({id:e}){return n.delete(`subscription-pauses/${e}`)}}}function Xt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-reactivations",u)},reactivate({data:e}){return n.post("subscription-reactivations",e)},get({id:e}){return n.get(`subscription-reactivations/${e}`)}}}function Zt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("subscriptions",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`subscriptions/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`subscriptions/${e}`,t,s)},delete({id:e}){return n.delete(`subscriptions/${e}`)},void({id:e}){return n.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return n.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return n.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const r={expand:t};return n.getAll(`subscriptions/${e}/upcoming-invoices`,r)},getUpcomingInvoice({id:e,expand:t=null}){const r={expand:t};return n.get(`subscriptions/${e}/upcoming-invoice`,r)},issueUpcomingInvoice({id:e,invoiceId:t,data:r}){return n.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,r)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("subscriptions",l)}}}function Ht({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("tags",o)},create({data:e}){return n.post("tags",e)},get({tag:e}){return n.get(`tags/${e}`)},delete({tag:e}){return n.delete(`tags/${e}`)},update({tag:e,data:t}){return n.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return n.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return n.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return n.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return n.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return n.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return n.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return n.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return n.delete(`tags/${e}/kyc-documents/${t}`)}}}function en({apiHandler:n}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/api",o)},getApiLog({id:e}){return n.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return n.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return n.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:t,sort:r,filter:s,q:u},headers:w};return n.download("tracking/api",o)}}}function tn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:r,q:s,sort:u,expand:o};return n.getAll("transactions",l)},create({data:e,expand:t=null}){const r={expand:t};return n.post("transactions",e,r)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`transactions/${e}`,r)},patch({id:e,data:t}){return n.patch(`transactions/${e}`,t)},query({id:e}){return n.post(`transactions/${e}/query`)},update({id:e,data:t}){return n.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return n.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null}){const u={limit:t,offset:r,filter:s};return n.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return n.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("transactions",l)}}}function nn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("usages",o)},create({id:e="",data:t}){return n.create(`usages/${e}`,e,t)},get({id:e}){return n.get(`usages/${e}`)},update({id:e,data:t}){return n.put(`usages/${e}`,t)},delete({id:e}){return n.delete(`usages/${e}`)}}}function rn({apiHandler:n}){return{getResetPasswordToken({token:e}){return n.get(`reset-password/${e}`)},resetPassword({token:e,data:t}){return n.post(`reset-password/${e}`,t)},getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("users",o)},create({id:e="",data:t}){return n.create(`users/${e}`,e,t)},get({id:e}){return n.get(`users/${e}`)},update({id:e,data:t}){return n.put(`users/${e}`,t)},getMfa({id:e}){return n.get(`users/${e}/mfa`)},updatePassword({id:e,data:t}){return n.post(`users/${e}/password`,t)},resetTotp({id:e}){return n.post(`users/${e}/totp-reset`)}}}function sn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null}={}){const s={limit:e,offset:t,filter:r};return n.getAll("webhooks",s)},create({id:e="",data:t}){return n.create(`webhooks/${e}`,e,t)},get({id:e}){return n.get(`webhooks/${e}`)},update({id:e,data:t}){return n.put(`webhooks/${e}`,t)}}}function un({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,q:r=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:t,q:r,filter:s,sort:u};return n.getAll("websites",o)},create({id:e="",data:t}){return n.create(`websites/${e}`,e,t)},get({id:e}){return n.get(`websites/${e}`)},update({id:e,data:t}){return n.put(`websites/${e}`,t)},delete({id:e}){return n.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("websites",l)}}}class on{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=nt({apiHandler:e}),this.broadcastMessages=rt({apiHandler:e}),this.cashierRequests=st({apiHandler:e}),this.cashierStrategies=ut({apiHandler:e}),this.checkoutForms=ot({apiHandler:e}),this.coupons=lt({apiHandler:e}),this.credentialHashes=ct({apiHandler:e}),this.creditMemos=it({apiHandler:e}),this.customDomains=at({apiHandler:e}),this.customFields=gt({apiHandler:e}),this.customerAuthentication=mt({apiHandler:e}),this.customers=ft({apiHandler:e}),this.digitalWallets=ht({apiHandler:e}),this.disputes=pt({apiHandler:e}),this.emailDeliverySettings=$t({apiHandler:e}),this.emailMessages=yt({apiHandler:e}),this.emailNotifications=bt({apiHandler:e}),this.events=At({apiHandler:e}),this.fees=Rt({apiHandler:e}),this.files=dt({apiHandler:e}),this.gatewayAccounts=wt({apiHandler:e}),this.integrations=vt({apiHandler:e}),this.invoices=kt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=It({apiHandler:e}),this.kycSettings=Et({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Ct({apiHandler:e}),this.organizationExports=xt({apiHandler:e}),this.organizations=Pt({apiHandler:e}),this.paymentCardsBankNames=qt({apiHandler:e}),this.paymentInstruments=jt({apiHandler:e}),this.paymentMethods=Ot({apiHandler:e}),this.paymentTokens=Mt({apiHandler:e}),this.payoutRequests=Dt({apiHandler:e}),this.payouts=Ft({apiHandler:e}),this.plans=Kt({apiHandler:e}),this.previews=Bt({apiHandler:e}),this.products=Nt({apiHandler:e}),this.profile=Vt({apiHandler:e}),this.purchase=zt({apiHandler:e}),this.roles=Lt({apiHandler:e}),this.search=Ut({apiHandler:e}),this.segments=Wt({apiHandler:e}),this.sendThroughAttribution=Jt({apiHandler:e}),this.shippingRates=Gt({apiHandler:e}),this.status=Yt({apiHandler:e}),this.subscriptionCancellations=_t({apiHandler:e}),this.subscriptionPauses=Qt({apiHandler:e}),this.subscriptionReactivations=Xt({apiHandler:e}),this.subscriptions=Zt({apiHandler:e}),this.tags=Ht({apiHandler:e}),this.tracking=en({apiHandler:e}),this.transactions=tn({apiHandler:e}),this.usages=nn({apiHandler:e}),this.users=rn({apiHandler:e}),this.webhooks=sn({apiHandler:e}),this.websites=un({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 ln({apiHandler:n}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return n.get(`customers/${e}/summary-metrics`)}}}function cn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const g={limit:e,offset:t,sort:r,expand:s,filter:u,q:o,criteria:l};return n.getAll("data-exports",g)},queue({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`data-exports/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`data-exports/${e}`,t,s)},delete({id:e}){return n.delete(`data-exports/${e}`)}}}function an({apiHandler:n}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationPeriod:r,metric:s,filter:u=null}){const o={periodStart:e,periodEnd:t,aggregationPeriod:r,metric:s,filter:u};return n.get("histograms/transactions",o)}}}function gn({apiHandler:n}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:r=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:r,segments:s};return n.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:t,limit:r=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:t,limit:r,offset:s,filter:u};return n.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null}){const o={periodStart:t,periodEnd:r,limit:s,offset:u};return n.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:r=null,recognizedAt:s,aggregationField:u,limit:o=null,offset:l=null,filter:g=null}){const $={currency:e,bookedFrom:t,bookedTo:r,recognizedAt:s,aggregationField:u,limit:o,offset:l,filter:g};return n.get("reports/journal",$)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null}){const o={currency:e,periodStart:t,periodEnd:r,limit:s,offset:u};return n.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:r=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:g=null,criteria:$=null}){const k={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:r,periodStart:s,periodEnd:u,limit:o,offset:l,filter:g,criteria:$};return n.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:r=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:g=null,filter:$=null,sort:k=null,criteria:F=null}){const K={aggregationField:e,aggregationPeriod:t,includeRefunds:r,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:g,filter:$,sort:k,criteria:F};return n.get("reports/retention-value",K)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:r,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:r,recognizedTo:s};return n.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:r=null,offset:s=null}){const u={filter:e,sort:t,limit:r,offset:s};return n.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:r,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:r,limit:s,offset:u,filter:o};return n.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:r,periodEnd:s}){const u={type:e,subaggregate:t,periodStart:r,periodEnd:s};return n.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:t,aggregationField:r,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:r,limit:s,offset:u,filter:o};return n.get("reports/transactions",l)}}}function mn({apiHandler:n}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return n.get(`subscriptions/${e}/summary-metrics`)}}}function fn({apiHandler:n}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:r=0}){const s={eventTypes:e,limit:t,offset:r};return n.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:r=1e3,offset:s=0}){const u={eventTypes:t,limit:r,offset:s};return n.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:r=1e3,offset:s=0}){const u={eventTypes:t,limit:r,offset:s};return n.getAll(`customers/${e}/timeline`,u)}}}function hn({apiHandler:n}){return{query(){return n.get("location")}}}const v={CustomersResource:ln,DataExportsResource:cn,HistogramsResource:an,ReportsResource:gn,SubscriptionsResource:mn,TimelinesResource:fn,LocationResource:hn};class pn{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 $n({apiHandler:n}){return{get({expand:e=null}={}){const t={expand:e};return n.get("account",t)},update({data:e}){return n.patch("account",e)},requestPasswordReset({data:e}){return n.post("account/forgot-password",e)},changePassword({data:e}){return n.patch("account/password",e)},resendEmailVerification({data:e}){return n.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return n.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return n.post(`account/verification/${e}`)},register({data:e}){return n.post("register",e)}}}function yn({apiHandler:n}){return{login({data:e}){return n.post("login",e)},logout(){return n.post("logout")}}}function bn({apiHandler:n}){return{get({slug:e}){return n.get(`billing-portals/${e}`)}}}function An({apiHandler:n}){return{create({data:e}){return n.post("cashier-deposit",e)}}}function Rn({apiHandler:n}){return{get({id:e,expand:t=null}){const r={expand:t};return n.get(`cashier-requests/${e}`,r)}}}function dn({apiHandler:n}){return{get({id:e}){return n.get(`checkout-forms/${e}`)}}}function wn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("invoices",o)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`invoices/${e}`,r)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return n.download(`invoices/${e}`,t)}}}function vn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("kyc-documents",r)},create({data:e}){return n.post("kyc-documents",e)},get({id:e}){return n.get(`kyc-documents/${e}`)},update({id:e,data:t}){return n.patch(`kyc-documents/${e}`,t)}}}function kn({apiHandler:n}){return{get({id:e,expand:t=null}){const r={expand:t};return n.get(`kyc-requests/${e}`,r)}}}function Tn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("orders",o)},get({id:e}){return n.get(`orders/${e}`)},update({id:e,data:t}){return n.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return n.post(`orders/${e}/cancellation`,t)}}}function In({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("payment-instruments",o)},create({data:e}){return n.post("payment-instruments",e)},get({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return n.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return n.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return n.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return n.post(`payment-instruments/${e}/setup`,t)}}}function En({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("payout-requests",o)},create({data:e}){return n.post("payout-requests",e)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`payout-requests/${e}`,r)},cancel({id:e,data:t}){return n.post(`payout-requests/${e}/cancel`,t)}}}function Sn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("plans",l)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`plans/${e}`,r)}}}function Cn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("products",o)},get({id:e}){return n.get(`products/${e}`)}}}function xn({apiHandler:n}){return{payment({data:e}){return n.post("payment",e)},purchase({data:e}){return n.post("purchase",e)},preview({data:e}){return n.post("preview-purchase",e)},readyToPay({data:e}){return n.post("ready-to-pay",e)}}}function Pn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("transactions",o)},get({id:e}){return n.get(`transactions/${e}`)},update({id:e,data:t}){return n.patch(`transactions/${e}`,t)}}}function qn({apiHandler:n}){return{get({id:e}){return n.get(`websites/${e}`)}}}class jn{constructor({apiHandler:e}){this.account=$n({apiHandler:e}),this.authorization=yn({apiHandler:e}),this.billingPortals=bn({apiHandler:e}),this.cashierDeposit=An({apiHandler:e}),this.cashierRequests=Rn({apiHandler:e}),this.checkoutForms=dn({apiHandler:e}),this.invoices=wn({apiHandler:e}),this.kycDocuments=vn({apiHandler:e}),this.kycRequests=kn({apiHandler:e}),this.orders=Tn({apiHandler:e}),this.paymentInstruments=In({apiHandler:e}),this.payoutRequests=En({apiHandler:e}),this.plans=Sn({apiHandler:e}),this.products=Cn({apiHandler:e}),this.purchase=xn({apiHandler:e}),this.transactions=Pn({apiHandler:e}),this.websites=qn({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 On({apiHandler:n}){return new on({apiHandler:n})}function Mn({apiHandler:n}){return new pn({apiHandler:n})}function Dn({apiHandler:n}){return new jn({apiHandler:n})}const M={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},D=6e3;function Y({apiKey:n=null,sandbox:e=!1,timeout:t=D,organizationId:r=null,urls:s=M}={}){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 o=O({options:{apiEndpoints:s,apiKey:n,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:r}});return On({apiHandler:o})}function Fn({apiKey:n=null,sandbox:e=!1,timeout:t=D,organizationId:r=null,urls:s=M}={}){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 o=O({options:{apiEndpoints:s,apiKey:n,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:r}});return Mn({apiHandler:o})}function Kn({publishableKey:n=null,jwt:e=null,sandbox:t=!1,timeout:r=D,organizationId:s=null,urls:u=M}={}){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 o={apiEndpoints:u,publishableKey:n,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:r,organizationId:s},l=O({options:o});return l.setSessionToken(o.jwt),Dn({apiHandler:l})}m.RebillyAPI=Y,m.RebillyErrors=y,m.RebillyExperimentalAPI=Fn,m.RebillyStorefrontAPI=Kn,m.cancellation=Ge,m.default=Y,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
36
+ */var je=qe,Oe=Object.prototype.hasOwnProperty,Me=function(e,t,r){je(e,function(s,u){if(Oe.call(e,u))return t.call(r,e[u],u,e)})},De=$e,Fe=Se,Ke=xe,Be=Me;function j(n,e){switch(Ke(n)){case"object":return Ne(n,e);case"array":return Ve(n,e);default:return Fe(n)}}function Ne(n,e){if(De(n)){var t={};return Be(n,function(r,s){this[s]=j(r,e)},t),t}else return e?e(n):n}function Ve(n,e){for(var t=n.length,r=[],s=-1;++s<t;)r[s]=j(n[s],e);return r}var ze=j;const Le="47.17.1";let Ue="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",We=(n=21)=>{let e="",t=n;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=q.default.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,x(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class E{constructor(){if(E.instance)return E.instance;this.requests={},E.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 I=new E;class P{}N(P,"cancelById",(e,t)=>{try{I.getById(e).cancel(t),I.deleteById(e)}catch{}}),N(P,"cancelAll",e=>I.getAll().forEach(t=>{t.cancel(e),I.deleteById(t.id)}));var Ge={cancelAll:(...n)=>P.cancelAll(...n)};const d={request:"request",response:"response"},J=n=>{if(!Object.values(d).includes(n))throw new Error(`There is no such interceptor type as "${n}"`);return!0};function O({options:n}){const e=t();function t(){return q.default.create(s())}function r(){return e}function s(){return{baseURL:u(),timeout:n.requestTimeout,headers:o()}}function u(){let c=n.isSandbox?n.apiEndpoints.sandbox:n.apiEndpoints.live;return n.apiVersion&&(c=`${c}/${n.apiVersion}`),n.organizationId&&(c=`${c}/organizations/${n.organizationId}`),`${c}`}function o(){const c={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${Le}`};return n.apiKey&&(c["REB-APIKEY"]=n.apiKey),c}function l(){return ze(e.defaults.headers)}function g(c){n.requestTimeout=Number(c),e.defaults.timeout=n.requestTimeout}function $(c=n.jwt){const i=l();n.apiKey=null,n.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,e.defaults.headers=i}function k(c=n.publishableKey){const i=l();n.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&&(n.apiEndpoints.live=c),i&&(n.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 Bn({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.request,{thenDelegate:c,catchDelegate:i})}function Nn(c){Q(d.request,c)}function Vn({thenDelegate:c,catchDelegate:i=()=>{}}){return _(d.response,{thenDelegate:c,catchDelegate:i})}function zn(c){Q(d.response,c)}function T({request:c,isCollection:i,config:a}){const h=Z(a),{id:A,cancelToken:Xn}=I.save();h.cancelToken=Xn;const ne=async function(){try{const S=await c(h);return Ln({response:S,isCollection:i,config:h})}catch(S){return X({error:S,config:h})}finally{I.deleteById(A)}}();return ne.cancel=S=>P.cancelById(A,S),ne}function Ln({response:c,isCollection:i,config:a}){return i?new se(c,a):new V(c,a)}function X({error:c}){if(q.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 Un(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=Un(c);return C({},i)}function H(c,i={}){return T({request:a=>e.get(c,a),config:{params:i}})}function Wn(c,i){return T({request:a=>e.get(c,a),config:{params:i},isCollection:!0})}function ee(c,i,a={}){let h={};return a.authenticate===!1&&(h={headers:l()},delete h.headers.common["REB-APIKEY"],delete h.headers.common.Authorization),a.params&&(h.params=C({},a.params)),T({request:A=>e.post(c,i,A),config:h})}function te(c,i,a={}){return T({request:h=>e.put(c,i,h),config:{params:a}})}function Jn(c,i){return T({request:a=>e.patch(c,i,a),config:{}})}function Gn(c){return T({request:i=>e.delete(c,i),config:{}})}function Yn(c,i){return T({request:a=>e.delete(c,a),config:{data:C({},i)}})}async function _n(c,i,a,h={}){if(i==="")return ee(c,a,{params:h});try{if((await H(c)).response.status===200)throw new y.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(A){if(A.name==="RebillyNotFoundError")return te(c,a,h);throw A}}async function Qn(c,i){const a=Z(i);try{const h=await e.get(c,a);return new ue(h,a)}catch(h){return X({error:h,config:a})}}return{getInstance:r,addRequestInterceptor:Bn,removeRequestInterceptor:Nn,addResponseInterceptor:Vn,removeResponseInterceptor:zn,setTimeout:g,setProxyAgent:F,setSessionToken:$,setPublishableKey:k,setEndpoints:K,get:H,getAll:Wn,post:ee,put:te,patch:Jn,delete:Gn,deleteAll:Yn,create:_n,download:Qn}}function Ye({apiHandler:n}){return{activate({token:e}){return n.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return n.post("forgot-password",e,{authenticate:!1})},logout(){return n.post("logout")},signIn({data:e}){return n.post("signin",e,{authenticate:!1})},signUp({data:e}){return n.post("signup",e,{authenticate:!1})}}}function _e({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("aml-checks",o)},get({id:e}){return n.get(`aml-checks/${e}`)},review({id:e,data:t}){return n.post(`aml-checks/${e}/review`,t)}}}function Qe({apiHandler:n}){return{getAll({firstName:e,lastName:t,dob:r=null,country:s=null}){const u={firstName:e,lastName:t,dob:r,country:s};return n.get("aml",u)}}}function Xe({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null}={}){const s={limit:e,offset:t,sort:r};return n.getAll("api-keys",s)},create({id:e="",data:t}){return n.create(`api-keys/${e}`,e,t)},get({id:e}){return n.get(`api-keys/${e}`)},update({id:e,data:t}){return n.put(`api-keys/${e}`,t)},delete({id:e}){return n.delete(`api-keys/${e}`)}}}function Ze({apiHandler:n}){return{get({applicationId:e}){return n.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return n.put(`application-instances/${e}`,t)},delete({applicationId:e}){return n.delete(`application-instances/${e}`)}}}function He({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("applications",g)},create({data:e}){return n.post("applications",e)},get({id:e}){return n.get(`applications/${e}`)},getInstances({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`applications/${e}/instances`,s)},getInstance({id:e,organizationId:t}){return n.get(`applications/${e}/instances/${t}`)}}}function et({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("balance-transactions",r)},get({id:e}){return n.get(`balance-transactions/${e}`)}}}function tt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("billing-portals",o)},create({id:e="",data:t}){return n.create(`billing-portals/${e}`,e,t)},get({id:e}){return n.get(`billing-portals/${e}`)},update({id:e,data:t}){return n.put(`billing-portals/${e}`,t)},delete({id:e}){return n.delete(`billing-portals/${e}`)}}}function nt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("blocklists",o)},create({id:e="",data:t}){return n.create(`blocklists/${e}`,e,t)},get({id:e}){return n.get(`blocklists/${e}`)},delete({id:e}){return n.delete(`blocklists/${e}`)}}}function rt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null}={}){const u={limit:e,offset:t,sort:r,filter:s};return n.getAll("broadcast-messages",u)},create({data:e}){return n.post("broadcast-messages",e)},get({id:e}){return n.get(`broadcast-messages/${e}`)},delete({id:e}){return n.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return n.patch(`broadcast-messages/${e}`,t)}}}function st({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("cashier-requests",u)},create({data:e}){return n.post("cashier-requests",e)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`cashier-requests/${e}`,r)}}}function ut({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("cashier-strategies",u)},create({id:e="",data:t}){return n.create(`cashier-strategies/${e}`,e,t)},get({id:e}){return n.get(`cashier-strategies/${e}`)},update({id:e,data:t}){return n.put(`cashier-strategies/${e}`,t)},delete({id:e}){return n.delete(`cashier-strategies/${e}`)}}}function ot({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("checkout-forms",o)},create({id:e="",data:t}){return n.create(`checkout-forms/${e}`,e,t)},get({id:e}){return n.get(`checkout-forms/${e}`)},update({id:e,data:t}){return n.put(`checkout-forms/${e}`,t)},delete({id:e}){return n.delete(`checkout-forms/${e}`)}}}function lt({apiHandler:n}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("coupons-redemptions",o)},redeem({data:e}){return n.post("coupons-redemptions",e)},getRedemption({id:e}){return n.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return n.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("coupons",o)},create({id:e="",data:t}){return n.create(`coupons/${e}`,e,t)},get({id:e}){return n.get(`coupons/${e}`)},update({id:e,data:t}){return n.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return n.post(`coupons/${e}/expiration`,t)}}}function ct({apiHandler:n}){return{createAWSSESCredential({data:e}){return n.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return n.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return n.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return n.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return n.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return n.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return n.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return n.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return n.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return n.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return n.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return n.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const g={limit:t,offset:r,filter:s,q:u,fields:o,sort:l};return n.getAll(`credential-hashes/oauth2/${e}/items`,g)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return n.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return n.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return n.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return n.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return n.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return n.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return n.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return n.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return n.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return n.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return n.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return n.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return n.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return n.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return n.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return n.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return n.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return n.patch(`credential-hashes/taxjar/${e}`,t)},getAllAvalaraCredentials({filter:e=null,limit:t=null,offset:r=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:r,sort:s,q:u};return n.getAll("credential-hashes/avalara",o)},createAvalaraCredential({data:e}){return n.post("credential-hashes/avalara",e)},getAvalaraCredential({hash:e}){return n.get(`credential-hashes/avalara/${e}`)},updateAvalaraCredential({hash:e,data:t}){return n.patch(`credential-hashes/avalara/${e}`,t)}}}function it({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("credit-memos",l)},create({id:e="",data:t}){return n.create(`credit-memos/${e}`,e,t)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`credit-memos/${e}`,r)},update({id:e,data:t}){return n.put(`credit-memos/${e}`,t)},patch({id:e,data:t}){return n.patch(`credit-memos/${e}`,t)},void({id:e}){return n.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`credit-memos/${e}/timeline/${t}`)}}}function at({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("custom-domains",o)},create({data:e}){return n.post("custom-domains",e)},get({domain:e}){return n.get(`custom-domains/${e}`)},delete({domain:e}){return n.delete(`custom-domains/${e}`)}}}function gt({apiHandler:n}){return{getAll({resource:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return n.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:r}){return n.put(`custom-fields/${e}/${t}`,r)},update({resource:e,name:t,data:r}){return n.put(`custom-fields/${e}/${t}`,r)}}}function mt({apiHandler:n}){return{getAuthOptions(){return n.get("authentication-options")},updateAuthOptions({data:e}){return n.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("authentication-tokens",r)},login({data:e}){return n.post("authentication-tokens",e)},verify({token:e}){return n.get(`authentication-tokens/${e}`)},logout({token:e}){return n.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return n.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("credentials",r)},createCredential({id:e="",data:t}){return n.create(`credentials/${e}`,e,t)},getCredential({id:e}){return n.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return n.put(`credentials/${e}`,t)},deleteCredential({id:e}){return n.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("password-tokens",r)},createResetPasswordToken({data:e}){return n.post("password-tokens",e)},getResetPasswordToken({id:e}){return n.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return n.delete(`password-tokens/${e}`)}}}const w={Accept:"text/csv"},G={Accept:"application/pdf"};function ft({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("customers",g)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:r=null}){const s={expand:t,fields:r};return n.get(`customers/${e}`,s)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return n.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return n.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return n.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return n.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return n.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return n.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`customers/${e}/timeline/${t}`)},getCustomerEddScore({id:e}){return n.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return n.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:t}){return n.post(`customers/${e}/edd-timeline`,t)},getAllEddSearchResults({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.get(`customers/${e}/edd-search-results`,s)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("customers",l)}}}function ht({apiHandler:n}){return{create({data:e}){return n.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return n.post("digital-wallets/validation",e)}}}function pt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("disputes",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`disputes/${e}`,e,t,s)},get({id:e}){return n.get(`disputes/${e}`)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("disputes",l)}}}function $t({apiHandler:n}){return{verify({token:e}){return n.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,q:u};return n.getAll("email-delivery-settings",o)},create({data:e}){return n.post("email-delivery-settings",e)},get({id:e}){return n.get(`email-delivery-settings/${e}`)},delete({id:e}){return n.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return n.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return n.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function yt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,q:r=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:t,q:r,sort:s,filter:u};return n.getAll("email-messages",o)},create({data:e}){return n.post("email-messages",e)},get({id:e}){return n.get(`email-messages/${e}`)},delete({id:e}){return n.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return n.patch(`email-messages/${e}`,t)}}}function bt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("email-notifications",r)}}}function At({apiHandler:n}){return{getAll(){return n.getAll("events")},get({eventType:e}){return n.get(`events/${e}`)},getRules({eventType:e}){return n.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return n.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return n.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:t}){return n.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return n.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return n.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:g=null}){const $={limit:t,offset:r,filter:s,q:u,sort:o,fields:l,expand:g};return n.getAll(`events/${e}/rules/history`,$)},getRulesVersionNumber({eventType:e,version:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/history/${t}`,u)},getRulesVersionDetail({eventType:e,version:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/versions/${t}`,u)},getAllDraftRulesets({eventType:e,limit:t=null,offset:r=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:g=null}){const $={limit:t,offset:r,filter:s,q:u,sort:o,fields:l,expand:g};return n.getAll(`events/${e}/rules/drafts`,$)},createDraftRuleset({eventType:e,data:t}){return n.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:r=null,expand:s=null}){const u={fields:r,expand:s};return n.get(`events/${e}/rules/drafts/${t}`,u)},updateDraftRuleset({eventType:e,id:t,data:r}){return n.put(`events/${e}/rules/drafts/${t}`,r)},deleteDraftRuleset({eventType:e,id:t}){return n.delete(`events/${e}/rules/drafts/${t}`)}}}function Rt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("fees",r)},create({id:e="",data:t}){return n.create(`fees/${e}`,e,t)},get({id:e}){return n.get(`fees/${e}`)},upsert({id:e,data:t}){return n.put(`fees/${e}`,t)},patch({id:e,data:t}){return n.patch(`fees/${e}`,t)}}}function dt({apiHandler:n}){return{getAllAttachments({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("attachments",g)},attach({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return n.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`attachments/${e}`,t,s)},detach({id:e}){return n.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const g={limit:e,offset:t,filter:r,q:s,expand:u,fields:o,sort:l};return n.getAll("files",g)},upload({fileObject:e}){return n.post("files",e)},get({id:e}){return n.get(`files/${e}`)},update({id:e,data:t}){return n.put(`files/${e}`,t)},delete({id:e}){return n.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return n.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(t);r.push(o);const g=(await o).items.map(k=>this.detach({id:k.fields.id}));r=[...r,g],await Promise.all(g);const $=n.delete(`files/${e}`);return r.push($),$})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:e});r.push(o),await o;const l={name:o.name,extension:o.extension,description:t.description,tags:t.tags,url:""},g=this.update({id:o.fields.id,data:l});return r.push(g),g})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function wt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:t,sort:r,filter:s,q:u,fields:o};return n.getAll("gateway-accounts",l)},create({id:e="",data:t}){return n.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return n.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return n.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return n.delete(`gateway-accounts/${e}`)},close({id:e}){return n.post(`gateway-accounts/${e}/close`)},disable({id:e}){return n.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null}){const o={limit:t,offset:r,filter:s,sort:u};return n.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:t}){return n.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return n.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:r}){return n.put(`gateway-accounts/${e}/downtime-schedules/${t}`,r)},deleteDowntimeSchedule({id:e,downtimeId:t}){return n.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return n.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return n.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return n.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:r}){return n.put(`gateway-accounts/${e}/limits/${t}`,r)},deleteVolumeLimit({id:e,limitId:t}){return n.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return n.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return n.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return n.put(`gateway-accounts/${e}/financial-settings`,t)}}}function vt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("integrations",r)},get({label:e}){return n.get(`integrations/${e}`)}}}function kt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("invoices",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`invoices/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:r=null,expand:s=null}){const u={limit:t,offset:r,expand:s};return n.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return n.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return n.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:r}){return n.put(`invoices/${e}/items/${t}`,r)},deleteInvoiceItem({id:e,itemId:t}){return n.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return n.post(`invoices/${e}/issue`,t)},abandon({id:e}){return n.post(`invoices/${e}/abandon`)},void({id:e}){return n.post(`invoices/${e}/void`)},recalculate({id:e}){return n.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return n.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return n.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`invoices/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("invoices",l)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return n.download(`invoices/${e}`,t)}}}function Tt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,expand:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,expand:u};return n.getAll("kyc-documents",o)},create({id:e="",data:t}){return n.create(`kyc-documents/${e}`,e,t)},get({id:e}){return n.get(`kyc-documents/${e}`)},update({id:e,data:t}){return n.put(`kyc-documents/${e}`,t)},accept({id:e}){return n.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return n.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return n.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return n.post(`kyc-documents/${e}/review`)},startReview({id:e}){return n.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return n.post(`kyc-documents/${e}/stop-review`)}}}function It({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("kyc-requests",u)},create({data:e}){return n.post("kyc-requests",e)},get({id:e}){return n.get(`kyc-requests/${e}`)},delete({id:e}){return n.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return n.patch(`kyc-requests/${e}`,t)}}}function Et({apiHandler:n}){return{getKycSettings(){return n.get("kyc-settings")},updateKycSettings({data:e}){return n.put("kyc-settings",e)}}}function St({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:t,filter:r,sort:s,fields:u,q:o};return n.getAll("lists",l)},create({id:e="",data:t}){return n.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return n.get(`lists/${e}`)},update({id:e,data:t}){return n.put(`lists/${e}`,t)},delete({id:e}){return n.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return n.get(`lists/${e}/${t}`)}}}function Ct({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("memberships",u)},get({organizationId:e,userId:t}){return n.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:r}){return n.put(`memberships/${e}/${t}`,r)},delete({organizationId:e,userId:t}){return n.delete(`memberships/${e}/${t}`)}}}function xt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("organization-exports",o)},create({data:e}){return n.post("organization-exports",e)},get({id:e}){return n.get(`organization-exports/${e}`)}}}function Pt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null}={}){const u={limit:e,offset:t,filter:r,q:s};return n.getAll("organizations",u)},create({data:e}){return n.post("organizations",e)},get({id:e}){return n.get(`organizations/${e}`)},update({id:e,data:t}){return n.patch(`organizations/${e}`,t)}}}function qt({apiHandler:n}){return{getAll({limit:e=null,q:t=null}={}){const r={limit:e,q:t};return n.getAll("payment-cards-bank-names",r)}}}function jt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("payment-instruments",l)},create({data:e}){return n.post("payment-instruments",e)},get({id:e}){return n.get(`payment-instruments/${e}`)},update({id:e,data:t}){return n.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return n.post(`payment-instruments/${e}/deactivation`)}}}function Ot({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("payment-methods",r)},get({apiName:e}){return n.get(`payment-methods/${e}`)}}}function Mt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("tokens",r)},create({data:e}){return n.post("tokens",e)},get({token:e}){return n.get(`tokens/${e}`)}}}function Dt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("payout-requests",u)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`payout-requests/${e}`,r)},accept({id:e}){return n.post(`payout-requests/${e}/accept`)},reject({id:e,data:t}){return n.post(`payout-requests/${e}/reject`,t)},getPaymentInstruments({id:e}){return n.get(`payout-requests/${e}/payment-instruments`)}}}function Ft({apiHandler:n}){return{create({data:e}){return n.post("payouts",e)}}}function Kt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("plans",o)},create({id:e="",data:t}){return n.create(`plans/${e}`,e,t)},get({id:e}){return n.get(`plans/${e}`)},update({id:e,data:t}){return n.put(`plans/${e}`,t)},delete({id:e}){return n.delete(`plans/${e}`)}}}function Bt({apiHandler:n}){return{sendEmailRuleAction({data:e}){return n.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return n.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return n.post("previews/webhooks",e)},order({data:e}){return n.post("previews/orders",e)}}}function Nt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("products",o)},create({id:e="",data:t}){return n.create(`products/${e}`,e,t)},get({id:e}){return n.get(`products/${e}`)},update({id:e,data:t}){return n.put(`products/${e}`,t)},delete({id:e}){return n.delete(`products/${e}`)}}}function Vt({apiHandler:n}){return{startPermissionsEmulation({data:e}){return n.post("permissions-emulation",e)},stopPermissionsEmulation(){return n.delete("permissions-emulation")},get(){return n.get("profile")},update({data:e}){return n.put("profile",e)},getMfa(){return n.get("profile/mfa")},updateMfa(){return n.post("profile/mfa")},deleteMfa(){return n.delete("profile/mfa")},updatePassword({data:e}){return n.post("profile/password",e)},resetTotp(){return n.post("profile/totp-reset")}}}function zt({apiHandler:n}){return{readyToPay({data:e}){return n.post("ready-to-pay",e)}}}function Lt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:r,sort:s,q:u,expand:o};return n.getAll("roles",l)},create({id:e="",data:t}){return n.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`roles/${e}`,r)},update({id:e,data:t}){return n.put(`roles/${e}`,t)},delete({id:e}){return n.delete(`roles/${e}`)}}}function Ut({apiHandler:n}){return{get({sort:e=null,limit:t=null,offset:r=null,q:s=null}){const u={sort:e,limit:t,offset:r,q:s};return n.get("search",u)}}}function Wt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("grid-segments",o)},create({id:e="",data:t}){return n.create(`grid-segments/${e}`,e,t)},get({id:e}){return n.get(`grid-segments/${e}`)},update({id:e,data:t}){return n.put(`grid-segments/${e}`,t)},delete({id:e}){return n.delete(`grid-segments/${e}`)}}}function Jt({apiHandler:n}){return{getAll({eventType:e}){return n.getAll(`send-through-attribution/${e}`)}}}function Gt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:r,sort:s,q:u};return n.getAll("shipping-rates",o)},create({id:e="",data:t}){return n.create(`shipping-rates/${e}`,e,t)},get({id:e}){return n.get(`shipping-rates/${e}`)},update({id:e,data:t}){return n.put(`shipping-rates/${e}`,t)},delete({id:e}){return n.delete(`shipping-rates/${e}`)}}}function Yt({apiHandler:n}){return{get(){return n.get("status")}}}function _t({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return n.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return n.get(`subscription-cancellations/${e}`)},delete({id:e}){return n.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return n.patch(`subscription-cancellations/${e}`,t)}}}function Qt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return n.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return n.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return n.put(`subscription-pauses/${e}`,t)},delete({id:e}){return n.delete(`subscription-pauses/${e}`)}}}function Xt({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,sort:s=null}={}){const u={limit:e,offset:t,filter:r,sort:s};return n.getAll("subscription-reactivations",u)},reactivate({data:e}){return n.post("subscription-reactivations",e)},get({id:e}){return n.get(`subscription-reactivations/${e}`)}}}function Zt({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("subscriptions",l)},create({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`subscriptions/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`subscriptions/${e}`,t,s)},delete({id:e}){return n.delete(`subscriptions/${e}`)},void({id:e}){return n.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return n.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return n.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const r={expand:t};return n.getAll(`subscriptions/${e}/upcoming-invoices`,r)},getUpcomingInvoice({id:e,expand:t=null}){const r={expand:t};return n.get(`subscriptions/${e}/upcoming-invoice`,r)},issueUpcomingInvoice({id:e,invoiceId:t,data:r}){return n.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,r)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:r,filter:s,sort:u,q:o};return n.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return n.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("subscriptions",l)}}}function Ht({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("tags",o)},create({data:e}){return n.post("tags",e)},get({tag:e}){return n.get(`tags/${e}`)},delete({tag:e}){return n.delete(`tags/${e}`)},update({tag:e,data:t}){return n.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return n.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return n.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return n.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return n.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return n.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return n.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return n.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return n.delete(`tags/${e}/kyc-documents/${t}`)}}}function en({apiHandler:n}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/api",o)},getApiLog({id:e}){return n.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return n.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return n.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:t,sort:r,filter:s,q:u},headers:w};return n.download("tracking/api",o)}}}function tn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:r,q:s,sort:u,expand:o};return n.getAll("transactions",l)},create({data:e,expand:t=null}){const r={expand:t};return n.post("transactions",e,r)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`transactions/${e}`,r)},patch({id:e,data:t}){return n.patch(`transactions/${e}`,t)},query({id:e}){return n.post(`transactions/${e}/query`)},update({id:e,data:t}){return n.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return n.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:r=null,filter:s=null}){const u={limit:t,offset:r,filter:s};return n.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return n.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return n.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return n.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("transactions",l)}}}function nn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("usages",o)},create({id:e="",data:t}){return n.create(`usages/${e}`,e,t)},get({id:e}){return n.get(`usages/${e}`)},update({id:e,data:t}){return n.put(`usages/${e}`,t)},delete({id:e}){return n.delete(`usages/${e}`)}}}function rn({apiHandler:n}){return{getResetPasswordToken({token:e}){return n.get(`reset-password/${e}`)},resetPassword({token:e,data:t}){return n.post(`reset-password/${e}`,t)},getAll({limit:e=null,offset:t=null,sort:r=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:r,filter:s,q:u};return n.getAll("users",o)},create({id:e="",data:t}){return n.create(`users/${e}`,e,t)},get({id:e}){return n.get(`users/${e}`)},update({id:e,data:t}){return n.put(`users/${e}`,t)},getMfa({id:e}){return n.get(`users/${e}/mfa`)},updatePassword({id:e,data:t}){return n.post(`users/${e}/password`,t)},resetTotp({id:e}){return n.post(`users/${e}/totp-reset`)}}}function sn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null}={}){const s={limit:e,offset:t,filter:r};return n.getAll("webhooks",s)},create({id:e="",data:t}){return n.create(`webhooks/${e}`,e,t)},get({id:e}){return n.get(`webhooks/${e}`)},update({id:e,data:t}){return n.put(`webhooks/${e}`,t)}}}function un({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,q:r=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:t,q:r,filter:s,sort:u};return n.getAll("websites",o)},create({id:e="",data:t}){return n.create(`websites/${e}`,e,t)},get({id:e}){return n.get(`websites/${e}`)},update({id:e,data:t}){return n.put(`websites/${e}`,t)},delete({id:e}){return n.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:r,expand:s,filter:u,q:o},headers:w};return n.download("websites",l)}}}class on{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=nt({apiHandler:e}),this.broadcastMessages=rt({apiHandler:e}),this.cashierRequests=st({apiHandler:e}),this.cashierStrategies=ut({apiHandler:e}),this.checkoutForms=ot({apiHandler:e}),this.coupons=lt({apiHandler:e}),this.credentialHashes=ct({apiHandler:e}),this.creditMemos=it({apiHandler:e}),this.customDomains=at({apiHandler:e}),this.customFields=gt({apiHandler:e}),this.customerAuthentication=mt({apiHandler:e}),this.customers=ft({apiHandler:e}),this.digitalWallets=ht({apiHandler:e}),this.disputes=pt({apiHandler:e}),this.emailDeliverySettings=$t({apiHandler:e}),this.emailMessages=yt({apiHandler:e}),this.emailNotifications=bt({apiHandler:e}),this.events=At({apiHandler:e}),this.fees=Rt({apiHandler:e}),this.files=dt({apiHandler:e}),this.gatewayAccounts=wt({apiHandler:e}),this.integrations=vt({apiHandler:e}),this.invoices=kt({apiHandler:e}),this.kycDocuments=Tt({apiHandler:e}),this.kycRequests=It({apiHandler:e}),this.kycSettings=Et({apiHandler:e}),this.lists=St({apiHandler:e}),this.memberships=Ct({apiHandler:e}),this.organizationExports=xt({apiHandler:e}),this.organizations=Pt({apiHandler:e}),this.paymentCardsBankNames=qt({apiHandler:e}),this.paymentInstruments=jt({apiHandler:e}),this.paymentMethods=Ot({apiHandler:e}),this.paymentTokens=Mt({apiHandler:e}),this.payoutRequests=Dt({apiHandler:e}),this.payouts=Ft({apiHandler:e}),this.plans=Kt({apiHandler:e}),this.previews=Bt({apiHandler:e}),this.products=Nt({apiHandler:e}),this.profile=Vt({apiHandler:e}),this.purchase=zt({apiHandler:e}),this.roles=Lt({apiHandler:e}),this.search=Ut({apiHandler:e}),this.segments=Wt({apiHandler:e}),this.sendThroughAttribution=Jt({apiHandler:e}),this.shippingRates=Gt({apiHandler:e}),this.status=Yt({apiHandler:e}),this.subscriptionCancellations=_t({apiHandler:e}),this.subscriptionPauses=Qt({apiHandler:e}),this.subscriptionReactivations=Xt({apiHandler:e}),this.subscriptions=Zt({apiHandler:e}),this.tags=Ht({apiHandler:e}),this.tracking=en({apiHandler:e}),this.transactions=tn({apiHandler:e}),this.usages=nn({apiHandler:e}),this.users=rn({apiHandler:e}),this.webhooks=sn({apiHandler:e}),this.websites=un({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 ln({apiHandler:n}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return n.get(`customers/${e}/summary-metrics`)}}}function cn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,sort:r=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const g={limit:e,offset:t,sort:r,expand:s,filter:u,q:o,criteria:l};return n.getAll("data-exports",g)},queue({id:e="",data:t,expand:r=null}){const s={expand:r};return n.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`data-exports/${e}`,r)},update({id:e,data:t,expand:r=null}){const s={expand:r};return n.put(`data-exports/${e}`,t,s)},delete({id:e}){return n.delete(`data-exports/${e}`)}}}function an({apiHandler:n}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationPeriod:r,metric:s,filter:u=null}){const o={periodStart:e,periodEnd:t,aggregationPeriod:r,metric:s,filter:u};return n.get("histograms/transactions",o)}}}function gn({apiHandler:n}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:r=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:r,segments:s};return n.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:t,limit:r=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:t,limit:r,offset:s,filter:u};return n.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null}){const o={periodStart:t,periodEnd:r,limit:s,offset:u};return n.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:r=null,recognizedAt:s,aggregationField:u,limit:o=null,offset:l=null,filter:g=null}){const $={currency:e,bookedFrom:t,bookedTo:r,recognizedAt:s,aggregationField:u,limit:o,offset:l,filter:g};return n.get("reports/journal",$)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:e,periodEnd:t}){const r={periodStart:e,periodEnd:t};return n.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null}){const o={currency:e,periodStart:t,periodEnd:r,limit:s,offset:u};return n.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:r=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:g=null,criteria:$=null}){const k={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:r,periodStart:s,periodEnd:u,limit:o,offset:l,filter:g,criteria:$};return n.get("reports/retention-percentage",k)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:r=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:g=null,filter:$=null,sort:k=null,criteria:F=null}){const K={aggregationField:e,aggregationPeriod:t,includeRefunds:r,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:g,filter:$,sort:k,criteria:F};return n.get("reports/retention-value",K)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:r,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:r,recognizedTo:s};return n.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:r=null,offset:s=null}){const u={filter:e,sort:t,limit:r,offset:s};return n.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:r,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:r,limit:s,offset:u,filter:o};return n.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:r=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:r,offset:s};return n.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:r,periodEnd:s}){const u={type:e,subaggregate:t,periodStart:r,periodEnd:s};return n.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:r,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:r,limit:s,offset:u,filter:o};return n.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:t,aggregationField:r,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:r,limit:s,offset:u,filter:o};return n.get("reports/transactions",l)}}}function mn({apiHandler:n}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return n.get(`subscriptions/${e}/summary-metrics`)}}}function fn({apiHandler:n}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:r=0}){const s={eventTypes:e,limit:t,offset:r};return n.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:r=1e3,offset:s=0}){const u={eventTypes:t,limit:r,offset:s};return n.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:r=1e3,offset:s=0}){const u={eventTypes:t,limit:r,offset:s};return n.getAll(`customers/${e}/timeline`,u)}}}function hn({apiHandler:n}){return{query(){return n.get("location")}}}const v={CustomersResource:ln,DataExportsResource:cn,HistogramsResource:an,ReportsResource:gn,SubscriptionsResource:mn,TimelinesResource:fn,LocationResource:hn};class pn{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 $n({apiHandler:n}){return{get({expand:e=null}={}){const t={expand:e};return n.get("account",t)},update({data:e}){return n.patch("account",e)},requestPasswordReset({data:e}){return n.post("account/forgot-password",e)},changePassword({data:e}){return n.patch("account/password",e)},resendEmailVerification({data:e}){return n.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return n.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return n.post(`account/verification/${e}`)},register({data:e}){return n.post("register",e)}}}function yn({apiHandler:n}){return{login({data:e}){return n.post("login",e)},logout(){return n.post("logout")}}}function bn({apiHandler:n}){return{get({slug:e}){return n.get(`billing-portals/${e}`)}}}function An({apiHandler:n}){return{create({data:e}){return n.post("cashier-deposit",e)}}}function Rn({apiHandler:n}){return{get({id:e,expand:t=null}){const r={expand:t};return n.get(`cashier-requests/${e}`,r)}}}function dn({apiHandler:n}){return{get({id:e}){return n.get(`checkout-forms/${e}`)}}}function wn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("invoices",o)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`invoices/${e}`,r)},downloadPDF({id:e}){const t={headers:G,responseType:"arraybuffer"};return n.download(`invoices/${e}`,t)}}}function vn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null}={}){const r={limit:e,offset:t};return n.getAll("kyc-documents",r)},create({data:e}){return n.post("kyc-documents",e)},get({id:e}){return n.get(`kyc-documents/${e}`)},update({id:e,data:t}){return n.patch(`kyc-documents/${e}`,t)}}}function kn({apiHandler:n}){return{get({id:e,expand:t=null}){const r={expand:t};return n.get(`kyc-requests/${e}`,r)}}}function Tn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("orders",o)},get({id:e}){return n.get(`orders/${e}`)},update({id:e,data:t}){return n.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return n.post(`orders/${e}/cancellation`,t)}}}function In({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("payment-instruments",o)},create({data:e}){return n.post("payment-instruments",e)},get({id:e,limit:t=null,offset:r=null}){const s={limit:t,offset:r};return n.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return n.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return n.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return n.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return n.post(`payment-instruments/${e}/setup`,t)}}}function En({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("payout-requests",o)},create({data:e}){return n.post("payout-requests",e)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`payout-requests/${e}`,r)},cancel({id:e,data:t}){return n.post(`payout-requests/${e}/cancel`,t)}}}function Sn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:r,offset:s,q:u,expand:o};return n.getAll("plans",l)},get({id:e,expand:t=null}){const r={expand:t};return n.get(`plans/${e}`,r)}}}function Cn({apiHandler:n}){return{getAll({filter:e=null,sort:t=null,limit:r=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:r,offset:s,q:u};return n.getAll("products",o)},get({id:e}){return n.get(`products/${e}`)}}}function xn({apiHandler:n}){return{payment({data:e}){return n.post("payment",e)},purchase({data:e}){return n.post("purchase",e)},preview({data:e}){return n.post("preview-purchase",e)},readyToPay({data:e}){return n.post("ready-to-pay",e)}}}function Pn({apiHandler:n}){return{getAll({limit:e=null,offset:t=null,filter:r=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:r,q:s,sort:u};return n.getAll("transactions",o)},get({id:e}){return n.get(`transactions/${e}`)},update({id:e,data:t}){return n.patch(`transactions/${e}`,t)}}}function qn({apiHandler:n}){return{get({id:e}){return n.get(`websites/${e}`)}}}class jn{constructor({apiHandler:e}){this.account=$n({apiHandler:e}),this.authorization=yn({apiHandler:e}),this.billingPortals=bn({apiHandler:e}),this.cashierDeposit=An({apiHandler:e}),this.cashierRequests=Rn({apiHandler:e}),this.checkoutForms=dn({apiHandler:e}),this.invoices=wn({apiHandler:e}),this.kycDocuments=vn({apiHandler:e}),this.kycRequests=kn({apiHandler:e}),this.orders=Tn({apiHandler:e}),this.paymentInstruments=In({apiHandler:e}),this.payoutRequests=En({apiHandler:e}),this.plans=Sn({apiHandler:e}),this.products=Cn({apiHandler:e}),this.purchase=xn({apiHandler:e}),this.transactions=Pn({apiHandler:e}),this.websites=qn({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 On({apiHandler:n}){return new on({apiHandler:n})}function Mn({apiHandler:n}){return new pn({apiHandler:n})}function Dn({apiHandler:n}){return new jn({apiHandler:n})}const M={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},D=6e3;function Y({apiKey:n=null,sandbox:e=!1,timeout:t=D,organizationId:r=null,urls:s=M}={}){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 o=O({options:{apiEndpoints:s,apiKey:n,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:r}});return On({apiHandler:o})}function Fn({apiKey:n=null,sandbox:e=!1,timeout:t=D,organizationId:r=null,urls:s=M}={}){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 o=O({options:{apiEndpoints:s,apiKey:n,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:r}});return Mn({apiHandler:o})}function Kn({publishableKey:n=null,jwt:e=null,sandbox:t=!1,timeout:r=D,organizationId:s=null,urls:u=M}={}){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 o={apiEndpoints:u,publishableKey:n,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:r,organizationId:s},l=O({options:o});return l.setSessionToken(o.jwt),Dn({apiHandler:l})}m.RebillyAPI=Y,m.RebillyErrors=y,m.RebillyExperimentalAPI=Fn,m.RebillyStorefrontAPI=Kn,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": "47.17.0",
3
+ "version": "47.17.1",
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",