rebilly-js-sdk 47.13.1 → 47.13.2

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.
@@ -823,8 +823,8 @@ declare module rebilly {
823
823
  type PostEddTimelineResponse = operations['PostEddTimeline']['responses']['201']['content']['application/json']
824
824
  type PostEddTimelineResponsePromise = Promise<{fields: PostEddTimelineResponse}>
825
825
 
826
- type GetEddSearchResultsRequest = { id : String }
827
-
826
+ type GetEddSearchResultsRequest = operations['GetEddSearchResults']['parameters'] & { id : String }
827
+
828
828
  type GetEddSearchResultsResponse = operations['GetEddSearchResults']['responses']['200']['content']['application/json']
829
829
  type GetEddSearchResultsResponsePromise = Promise<{fields: GetEddSearchResultsResponse}>
830
830
 
@@ -852,8 +852,8 @@ declare module rebilly {
852
852
  type GetApplicationResponse = operations['GetApplication']['responses']['200']['content']['application/json']
853
853
  type GetApplicationResponsePromise = Promise<{fields: GetApplicationResponse}>
854
854
 
855
- type GetApplicationInstanceCollectionRequest = { id : String }
856
-
855
+ type GetApplicationInstanceCollectionRequest = operations['GetApplicationInstanceCollection']['parameters']["query"] & (operations['GetApplicationInstanceCollection']['parameters'] extends {path: {}} ? operations['GetApplicationInstanceCollection']['parameters']["path"] : {}) & { id : String }
856
+
857
857
  type GetApplicationInstanceCollectionResponse = operations['GetApplicationInstanceCollection']['responses']['200']['content']['application/json'][0]
858
858
  type GetApplicationInstanceCollectionResponsePromise = Promise<{ items: {fields: GetApplicationInstanceCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
859
859
 
@@ -1162,6 +1162,7 @@ declare module rebilly {
1162
1162
  type DeleteEmailMessageResponse = operations['DeleteEmailMessage']['responses']['204']
1163
1163
  type DeleteEmailMessageResponsePromise = Promise<{fields: DeleteEmailMessageResponse}>
1164
1164
 
1165
+ type GetEmailNotificationCollectionRequest = operations['GetEmailNotificationCollection']['parameters']["query"] & (operations['GetEmailNotificationCollection']['parameters'] extends {path: {}} ? operations['GetEmailNotificationCollection']['parameters']["path"] : {})
1165
1166
 
1166
1167
  type GetEmailNotificationCollectionResponse = operations['GetEmailNotificationCollection']['responses']['200']['content']['application/json'][0]
1167
1168
  type GetEmailNotificationCollectionResponsePromise = Promise<{ items: {fields: GetEmailNotificationCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
@@ -1354,6 +1355,7 @@ declare module rebilly {
1354
1355
  type DeleteGridSegmentResponse = operations['DeleteGridSegment']['responses']['204']
1355
1356
  type DeleteGridSegmentResponsePromise = Promise<{fields: DeleteGridSegmentResponse}>
1356
1357
 
1358
+ type GetIntegrationCollectionRequest = operations['GetIntegrationCollection']['parameters']["query"] & (operations['GetIntegrationCollection']['parameters'] extends {path: {}} ? operations['GetIntegrationCollection']['parameters']["path"] : {})
1357
1359
 
1358
1360
  type GetIntegrationCollectionResponse = operations['GetIntegrationCollection']['responses']['200']['content']['application/json'][0]
1359
1361
  type GetIntegrationCollectionResponsePromise = Promise<{ items: {fields: GetIntegrationCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
@@ -1427,6 +1429,7 @@ declare module rebilly {
1427
1429
  type GetPaymentCardBankNameCollectionResponse = operations['GetPaymentCardBankNameCollection']['responses']['200']['content']['application/json'][0]
1428
1430
  type GetPaymentCardBankNameCollectionResponsePromise = Promise<{ items: {fields: GetPaymentCardBankNameCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1429
1431
 
1432
+ type GetPaymentMethodCollectionRequest = operations['GetPaymentMethodCollection']['parameters']["query"] & (operations['GetPaymentMethodCollection']['parameters'] extends {path: {}} ? operations['GetPaymentMethodCollection']['parameters']["path"] : {})
1430
1433
 
1431
1434
  type GetPaymentMethodCollectionResponse = operations['GetPaymentMethodCollection']['responses']['200']['content']['application/json'][0]
1432
1435
  type GetPaymentMethodCollectionResponsePromise = Promise<{ items: {fields: GetPaymentMethodCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
@@ -1689,8 +1692,8 @@ declare module rebilly {
1689
1692
  type StorefrontGetInvoiceCollectionResponse = operations['StorefrontGetInvoiceCollection']['responses']['200']['content']['application/json'][0]
1690
1693
  type StorefrontGetInvoiceCollectionResponsePromise = Promise<{ items: {fields: StorefrontGetInvoiceCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1691
1694
 
1692
- type StorefrontGetInvoiceRequest = { id : String }
1693
-
1695
+ type StorefrontGetInvoiceRequest = operations['StorefrontGetInvoice']['parameters'] & { id : String }
1696
+
1694
1697
  type StorefrontGetInvoiceResponse = operations['StorefrontGetInvoice']['responses']['200']['content']['application/json']
1695
1698
  type StorefrontGetInvoiceResponsePromise = Promise<{fields: StorefrontGetInvoiceResponse}>
1696
1699
 
@@ -4538,6 +4541,7 @@ export interface coreComponents {
4538
4541
  | "Euteller"
4539
4542
  | "eMerchantPay"
4540
4543
  | "EMS"
4544
+ | "ePay"
4541
4545
  | "EPG"
4542
4546
  | "EPro"
4543
4547
  | "eZeeWallet"
@@ -4805,6 +4809,7 @@ export interface coreComponents {
4805
4809
  | "EcorePay"
4806
4810
  | "Elavon"
4807
4811
  | "EMS"
4812
+ | "ePay"
4808
4813
  | "EPG"
4809
4814
  | "Euteller"
4810
4815
  | "eZeeWallet"
@@ -6112,6 +6117,10 @@ export interface coreComponents {
6112
6117
  web_pay_login: string;
6113
6118
  /** Directa24 web pay status password. */
6114
6119
  web_pay_tran_key: string;
6120
+ /** Directa24 cashout login. */
6121
+ cashout_login?: string;
6122
+ /** Directa24 cashout password. */
6123
+ cashout_password?: string;
6115
6124
  };
6116
6125
  /** Directa24 settings object. */
6117
6126
  settings?: {
@@ -6211,6 +6220,14 @@ export interface coreComponents {
6211
6220
  };
6212
6221
  threeDSecureServer?: coreComponents["schemas"]["EMS3dsServers"];
6213
6222
  };
6223
+ /** ePay config. */
6224
+ ePay: coreComponents["schemas"]["GatewayAccount"] & {
6225
+ /** ePay credentials object. */
6226
+ credentials: {
6227
+ merchantId: string;
6228
+ secretKey: string;
6229
+ };
6230
+ };
6214
6231
  /** Euteller config. */
6215
6232
  Euteller: coreComponents["schemas"]["GatewayAccount"] & {
6216
6233
  /** Euteller credentials object. */
@@ -10319,6 +10336,9 @@ export interface coreComponents {
10319
10336
  CoreReadyToPay: {
10320
10337
  customerId?: coreComponents["schemas"]["CustomerId"];
10321
10338
  } & coreComponents["schemas"]["ReadyToPay"];
10339
+ ReadyToPayMethods: {
10340
+ method?: string;
10341
+ };
10322
10342
  /** The feature name. */
10323
10343
  ApplePayFeatureName: "Apple Pay";
10324
10344
  ApplePayFeature: {
@@ -10342,7 +10362,7 @@ export interface coreComponents {
10342
10362
  * If no filters are sent, then no restrictions applied. This follows our standard filter format.
10343
10363
  */
10344
10364
  ReadyToPayMethodFilters: string[];
10345
- ReadyToPayPaymentCardMethod: {
10365
+ ReadyToPayPaymentCardMethod: coreComponents["schemas"]["ReadyToPayMethods"] & {
10346
10366
  /** The payment method. */
10347
10367
  method: "payment-card";
10348
10368
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features - will be null. */
@@ -10365,14 +10385,14 @@ export interface coreComponents {
10365
10385
  /** The expiration time of a `linkToken`. */
10366
10386
  expirationTime?: string;
10367
10387
  };
10368
- ReadyToPayAchMethod: {
10388
+ ReadyToPayAchMethod: coreComponents["schemas"]["ReadyToPayMethods"] & {
10369
10389
  /** The payment method. */
10370
10390
  method: "ach";
10371
10391
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features it will be null. */
10372
10392
  feature?: coreComponents["schemas"]["AchPlaidFeature"] | null;
10373
10393
  filters?: coreComponents["schemas"]["ReadyToPayMethodFilters"];
10374
10394
  };
10375
- ReadyToPayGenericMethod: {
10395
+ ReadyToPayGenericMethod: coreComponents["schemas"]["ReadyToPayMethods"] & {
10376
10396
  /** The payment method. */
10377
10397
  method: coreComponents["schemas"]["AlternativePaymentMethods"];
10378
10398
  filters?: coreComponents["schemas"]["ReadyToPayMethodFilters"];
@@ -10388,7 +10408,7 @@ export interface coreComponents {
10388
10408
  /** The expiration time of a billing agreement token. */
10389
10409
  expirationTime: string;
10390
10410
  };
10391
- ReadyToPayPayPalMethod: {
10411
+ ReadyToPayPayPalMethod: coreComponents["schemas"]["ReadyToPayMethods"] & {
10392
10412
  /** The payment method. */
10393
10413
  method: "paypal";
10394
10414
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features it will be null. */
@@ -10403,20 +10423,13 @@ export interface coreComponents {
10403
10423
  /** Klarna session token. */
10404
10424
  sessionId: string;
10405
10425
  };
10406
- ReadyToPayKlarnaMethod: {
10426
+ ReadyToPayKlarnaMethod: coreComponents["schemas"]["ReadyToPayMethods"] & {
10407
10427
  /** The payment method. */
10408
10428
  method: "Klarna";
10409
10429
  /** The specific feature of this method. For example, a digital wallet or a processor. If the method does not have any features, this value will be null. */
10410
10430
  feature?: coreComponents["schemas"]["KlarnaFeature"] | null;
10411
10431
  filters?: coreComponents["schemas"]["ReadyToPayMethodFilters"];
10412
10432
  };
10413
- ReadyToPayMethods: (Partial<
10414
- coreComponents["schemas"]["ReadyToPayPaymentCardMethod"]
10415
- > &
10416
- Partial<coreComponents["schemas"]["ReadyToPayAchMethod"]> &
10417
- Partial<coreComponents["schemas"]["ReadyToPayGenericMethod"]> &
10418
- Partial<coreComponents["schemas"]["ReadyToPayPayPalMethod"]> &
10419
- Partial<coreComponents["schemas"]["ReadyToPayKlarnaMethod"]>)[];
10420
10433
  Subscription: {
10421
10434
  /** Specifies the type of order, a subscription or a one-time purchase. */
10422
10435
  orderType?: "subscription-order" | "one-time-order";
@@ -15375,7 +15388,7 @@ export interface operations {
15375
15388
  /** Payment methods retrieved. */
15376
15389
  200: {
15377
15390
  content: {
15378
- "application/json": coreComponents["schemas"]["ReadyToPayMethods"];
15391
+ "application/json": coreComponents["schemas"]["ReadyToPayMethods"][];
15379
15392
  };
15380
15393
  };
15381
15394
  401: coreComponents["responses"]["Unauthorized"];
@@ -17308,6 +17321,12 @@ export interface operations {
17308
17321
  /** The resource identifier string. */
17309
17322
  id: coreComponents["parameters"]["resourceId"];
17310
17323
  };
17324
+ query: {
17325
+ /** The collection items limit. */
17326
+ limit?: coreComponents["parameters"]["collectionLimit"];
17327
+ /** The collection items offset. */
17328
+ offset?: coreComponents["parameters"]["collectionOffset"];
17329
+ };
17311
17330
  };
17312
17331
  responses: {
17313
17332
  /** EDD search results were retrieved successfully. */
@@ -19101,6 +19120,7 @@ export interface usersComponents {
19101
19120
  | "Euteller"
19102
19121
  | "eMerchantPay"
19103
19122
  | "EMS"
19123
+ | "ePay"
19104
19124
  | "EPG"
19105
19125
  | "EPro"
19106
19126
  | "eZeeWallet"
@@ -19368,6 +19388,7 @@ export interface usersComponents {
19368
19388
  | "EcorePay"
19369
19389
  | "Elavon"
19370
19390
  | "EMS"
19391
+ | "ePay"
19371
19392
  | "EPG"
19372
19393
  | "Euteller"
19373
19394
  | "eZeeWallet"
@@ -20675,6 +20696,10 @@ export interface usersComponents {
20675
20696
  web_pay_login: string;
20676
20697
  /** Directa24 web pay status password. */
20677
20698
  web_pay_tran_key: string;
20699
+ /** Directa24 cashout login. */
20700
+ cashout_login?: string;
20701
+ /** Directa24 cashout password. */
20702
+ cashout_password?: string;
20678
20703
  };
20679
20704
  /** Directa24 settings object. */
20680
20705
  settings?: {
@@ -20774,6 +20799,14 @@ export interface usersComponents {
20774
20799
  };
20775
20800
  threeDSecureServer?: usersComponents["schemas"]["EMS3dsServers"];
20776
20801
  };
20802
+ /** ePay config. */
20803
+ ePay: usersComponents["schemas"]["GatewayAccount"] & {
20804
+ /** ePay credentials object. */
20805
+ credentials: {
20806
+ merchantId: string;
20807
+ secretKey: string;
20808
+ };
20809
+ };
20777
20810
  /** Euteller config. */
20778
20811
  Euteller: usersComponents["schemas"]["GatewayAccount"] & {
20779
20812
  /** Euteller credentials object. */
@@ -26429,6 +26462,12 @@ export interface operations {
26429
26462
  /** The resource identifier string. */
26430
26463
  id: usersComponents["parameters"]["resourceId"];
26431
26464
  };
26465
+ query: {
26466
+ /** The collection items limit. */
26467
+ limit?: usersComponents["parameters"]["collectionLimit"];
26468
+ /** The collection items offset. */
26469
+ offset?: usersComponents["parameters"]["collectionOffset"];
26470
+ };
26432
26471
  };
26433
26472
  responses: {
26434
26473
  /** Application instances were retrieved successfully. */
@@ -28247,6 +28286,14 @@ export interface operations {
28247
28286
  };
28248
28287
  };
28249
28288
  GetEmailNotificationCollection: {
28289
+ parameters: {
28290
+ query: {
28291
+ /** The collection items limit. */
28292
+ limit?: usersComponents["parameters"]["collectionLimit"];
28293
+ /** The collection items offset. */
28294
+ offset?: usersComponents["parameters"]["collectionOffset"];
28295
+ };
28296
+ };
28250
28297
  responses: {
28251
28298
  /** A list of email notification events was retrieved successfully. */
28252
28299
  200: {
@@ -29477,6 +29524,14 @@ export interface operations {
29477
29524
  };
29478
29525
  /** Retrieve a list of integrations. */
29479
29526
  GetIntegrationCollection: {
29527
+ parameters: {
29528
+ query: {
29529
+ /** The collection items limit. */
29530
+ limit?: usersComponents["parameters"]["collectionLimit"];
29531
+ /** The collection items offset. */
29532
+ offset?: usersComponents["parameters"]["collectionOffset"];
29533
+ };
29534
+ };
29480
29535
  responses: {
29481
29536
  /** A list of integrations was retrieved successfully. */
29482
29537
  200: {
@@ -29888,6 +29943,14 @@ export interface operations {
29888
29943
  };
29889
29944
  /** Retrieve payment methods metadata. */
29890
29945
  GetPaymentMethodCollection: {
29946
+ parameters: {
29947
+ query: {
29948
+ /** The collection items limit. */
29949
+ limit?: usersComponents["parameters"]["collectionLimit"];
29950
+ /** The collection items offset. */
29951
+ offset?: usersComponents["parameters"]["collectionOffset"];
29952
+ };
29953
+ };
29891
29954
  responses: {
29892
29955
  /** Payment methods metadata was received. */
29893
29956
  200: {
@@ -31681,6 +31744,7 @@ export interface storefrontComponents {
31681
31744
  | "Euteller"
31682
31745
  | "eMerchantPay"
31683
31746
  | "EMS"
31747
+ | "ePay"
31684
31748
  | "EPG"
31685
31749
  | "EPro"
31686
31750
  | "eZeeWallet"
@@ -33183,6 +33247,9 @@ export interface storefrontComponents {
33183
33247
  billingAddress?: storefrontComponents["schemas"]["ContactObject"];
33184
33248
  riskMetadata: storefrontComponents["schemas"]["RiskMetadata"];
33185
33249
  };
33250
+ ReadyToPayMethods: {
33251
+ method?: string;
33252
+ };
33186
33253
  /** The feature name. */
33187
33254
  ApplePayFeatureName: "Apple Pay";
33188
33255
  ApplePayFeature: {
@@ -33206,7 +33273,7 @@ export interface storefrontComponents {
33206
33273
  * If no filters are sent, then no restrictions applied. This follows our standard filter format.
33207
33274
  */
33208
33275
  ReadyToPayMethodFilters: string[];
33209
- ReadyToPayPaymentCardMethod: {
33276
+ ReadyToPayPaymentCardMethod: storefrontComponents["schemas"]["ReadyToPayMethods"] & {
33210
33277
  /** The payment method. */
33211
33278
  method: "payment-card";
33212
33279
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features - will be null. */
@@ -33229,14 +33296,14 @@ export interface storefrontComponents {
33229
33296
  /** The expiration time of a `linkToken`. */
33230
33297
  expirationTime?: string;
33231
33298
  };
33232
- ReadyToPayAchMethod: {
33299
+ ReadyToPayAchMethod: storefrontComponents["schemas"]["ReadyToPayMethods"] & {
33233
33300
  /** The payment method. */
33234
33301
  method: "ach";
33235
33302
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features it will be null. */
33236
33303
  feature?: storefrontComponents["schemas"]["AchPlaidFeature"] | null;
33237
33304
  filters?: storefrontComponents["schemas"]["ReadyToPayMethodFilters"];
33238
33305
  };
33239
- ReadyToPayGenericMethod: {
33306
+ ReadyToPayGenericMethod: storefrontComponents["schemas"]["ReadyToPayMethods"] & {
33240
33307
  /** The payment method. */
33241
33308
  method: storefrontComponents["schemas"]["AlternativePaymentMethods"];
33242
33309
  filters?: storefrontComponents["schemas"]["ReadyToPayMethodFilters"];
@@ -33252,7 +33319,7 @@ export interface storefrontComponents {
33252
33319
  /** The expiration time of a billing agreement token. */
33253
33320
  expirationTime: string;
33254
33321
  };
33255
- ReadyToPayPayPalMethod: {
33322
+ ReadyToPayPayPalMethod: storefrontComponents["schemas"]["ReadyToPayMethods"] & {
33256
33323
  /** The payment method. */
33257
33324
  method: "paypal";
33258
33325
  /** The specific feature (for example, digital wallet or a processor) of this method. If method doesn't have any features it will be null. */
@@ -33267,20 +33334,13 @@ export interface storefrontComponents {
33267
33334
  /** Klarna session token. */
33268
33335
  sessionId: string;
33269
33336
  };
33270
- ReadyToPayKlarnaMethod: {
33337
+ ReadyToPayKlarnaMethod: storefrontComponents["schemas"]["ReadyToPayMethods"] & {
33271
33338
  /** The payment method. */
33272
33339
  method: "Klarna";
33273
33340
  /** The specific feature of this method. For example, a digital wallet or a processor. If the method does not have any features, this value will be null. */
33274
33341
  feature?: storefrontComponents["schemas"]["KlarnaFeature"] | null;
33275
33342
  filters?: storefrontComponents["schemas"]["ReadyToPayMethodFilters"];
33276
33343
  };
33277
- ReadyToPayMethods: (Partial<
33278
- storefrontComponents["schemas"]["ReadyToPayPaymentCardMethod"]
33279
- > &
33280
- Partial<storefrontComponents["schemas"]["ReadyToPayAchMethod"]> &
33281
- Partial<storefrontComponents["schemas"]["ReadyToPayGenericMethod"]> &
33282
- Partial<storefrontComponents["schemas"]["ReadyToPayPayPalMethod"]> &
33283
- Partial<storefrontComponents["schemas"]["ReadyToPayKlarnaMethod"]>)[];
33284
33344
  /** Plan without changes. */
33285
33345
  OriginalPlan: {
33286
33346
  /** The ID of plan to use. */
@@ -34368,6 +34428,14 @@ export interface operations {
34368
34428
  /** The resource identifier string. */
34369
34429
  id: storefrontComponents["parameters"]["resourceId"];
34370
34430
  };
34431
+ query: {
34432
+ /**
34433
+ * Expand a response to get a full related object included inside of the `_embedded` path in the response.
34434
+ * It accepts a comma-separated list of objects to expand.
34435
+ * See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info.
34436
+ */
34437
+ expand?: storefrontComponents["parameters"]["collectionExpand"];
34438
+ };
34371
34439
  };
34372
34440
  responses: {
34373
34441
  /** Invoice was retrieved successfuly. */
@@ -35926,6 +35994,7 @@ export interface reportsComponents {
35926
35994
  planId?: reportsComponents["schemas"]["ResourceId"] | null;
35927
35995
  /** The product accounting code. */
35928
35996
  accountingCode?: string;
35997
+ currency?: reportsComponents["schemas"]["CurrencyCode"];
35929
35998
  /** The entry's recognition status. */
35930
35999
  status?: "scheduled" | "recognized";
35931
36000
  /** Estimated amount which will be recognized unless it is changed before recognition time. */
@@ -35934,6 +36003,8 @@ export interface reportsComponents {
35934
36003
  recognizedAmount?: number;
35935
36004
  /** Date and time at which the entry was created. */
35936
36005
  scheduledTime?: reportsComponents["schemas"]["ServerTimestamp"];
36006
+ /** Date and time at which the related invoice was issued. */
36007
+ issuedTime?: reportsComponents["schemas"]["ServerTimestamp"];
35937
36008
  /** Date and time at which the entry was recognized. */
35938
36009
  recognizedTime?: reportsComponents["schemas"]["ServerTimestamp"] | null;
35939
36010
  };
@@ -37472,7 +37543,7 @@ declare module "resources/applications-resource" {
37472
37543
  get({ id }: {
37473
37544
  id: any;
37474
37545
  }): rebilly.GetApplicationResponsePromise;
37475
- getInstances({ id }: rebilly.GetApplicationInstanceCollectionRequest): rebilly.GetApplicationInstanceCollectionResponsePromise;
37546
+ getInstances({ id, limit, offset }: rebilly.GetApplicationInstanceCollectionRequest): rebilly.GetApplicationInstanceCollectionResponsePromise;
37476
37547
  getInstance({ id, organizationId }: {
37477
37548
  id: any;
37478
37549
  organizationId: any;
@@ -37879,8 +37950,10 @@ declare module "resources/customers-resource" {
37879
37950
  id: any;
37880
37951
  data: any;
37881
37952
  }): any;
37882
- getAllEddSearchResults({ id }: {
37953
+ getAllEddSearchResults({ id, limit, offset }: {
37883
37954
  id: any;
37955
+ limit?: any;
37956
+ offset?: any;
37884
37957
  }): rebilly.GetEddSearchResultsResponsePromise;
37885
37958
  downloadCSV({ limit, offset, sort, expand, filter, q, }?: {
37886
37959
  limit?: any;
@@ -37980,7 +38053,7 @@ declare module "resources/email-notifications-resource" {
37980
38053
  export default function EmailNotificationsResource({ apiHandler }: {
37981
38054
  apiHandler: any;
37982
38055
  }): {
37983
- getAll(): rebilly.GetEmailNotificationCollectionResponsePromise;
38056
+ getAll({ limit, offset }?: rebilly.GetEmailNotificationCollectionRequest): rebilly.GetEmailNotificationCollectionResponsePromise;
37984
38057
  };
37985
38058
  }
37986
38059
  declare module "resources/events-resource" {
@@ -38278,7 +38351,7 @@ declare module "resources/integrations-resource" {
38278
38351
  export default function IntegrationsResource({ apiHandler }: {
38279
38352
  apiHandler: any;
38280
38353
  }): {
38281
- getAll(): rebilly.GetIntegrationCollectionResponsePromise;
38354
+ getAll({ limit, offset }?: rebilly.GetIntegrationCollectionRequest): rebilly.GetIntegrationCollectionResponsePromise;
38282
38355
  get({ label }: {
38283
38356
  label: any;
38284
38357
  }): rebilly.GetIntegrationResponsePromise;
@@ -38549,7 +38622,7 @@ declare module "resources/payment-methods-resource" {
38549
38622
  export default function PaymentMethodsResource({ apiHandler }: {
38550
38623
  apiHandler: any;
38551
38624
  }): {
38552
- getAll(): rebilly.GetPaymentMethodCollectionResponsePromise;
38625
+ getAll({ limit, offset }?: rebilly.GetPaymentMethodCollectionRequest): rebilly.GetPaymentMethodCollectionResponsePromise;
38553
38626
  get({ apiName }: {
38554
38627
  apiName: any;
38555
38628
  }): rebilly.GetPaymentMethodResponsePromise;
@@ -39126,7 +39199,7 @@ declare module "resources/api-instance" {
39126
39199
  get({ id }: {
39127
39200
  id: any;
39128
39201
  }): rebilly.GetApplicationResponsePromise;
39129
- getInstances({ id }: rebilly.GetApplicationInstanceCollectionRequest): rebilly.GetApplicationInstanceCollectionResponsePromise;
39202
+ getInstances({ id, limit, offset }: rebilly.GetApplicationInstanceCollectionRequest): rebilly.GetApplicationInstanceCollectionResponsePromise;
39130
39203
  getInstance({ id, organizationId }: {
39131
39204
  id: any;
39132
39205
  organizationId: any;
@@ -39577,8 +39650,10 @@ declare module "resources/api-instance" {
39577
39650
  id: any;
39578
39651
  data: any;
39579
39652
  }): any;
39580
- getAllEddSearchResults({ id }: {
39653
+ getAllEddSearchResults({ id, limit, offset }: {
39581
39654
  id: any;
39655
+ limit?: any;
39656
+ offset?: any;
39582
39657
  }): rebilly.GetEddSearchResultsResponsePromise;
39583
39658
  downloadCSV({ limit, offset, sort, expand, filter, q, }?: {
39584
39659
  limit?: any;
@@ -39677,7 +39752,10 @@ declare module "resources/api-instance" {
39677
39752
  }): any;
39678
39753
  };
39679
39754
  emailNotifications: {
39680
- getAll(): rebilly.GetEmailNotificationCollectionResponsePromise;
39755
+ getAll({ limit, offset }?: {
39756
+ limit?: number;
39757
+ offset?: number;
39758
+ }): rebilly.GetEmailNotificationCollectionResponsePromise;
39681
39759
  };
39682
39760
  events: {
39683
39761
  getAll(): rebilly.GetEventCollectionResponsePromise;
@@ -39981,7 +40059,10 @@ declare module "resources/api-instance" {
39981
40059
  }): rebilly.PutGatewayAccountFinancialSettingsResponsePromise;
39982
40060
  };
39983
40061
  integrations: {
39984
- getAll(): rebilly.GetIntegrationCollectionResponsePromise;
40062
+ getAll({ limit, offset }?: {
40063
+ limit?: number;
40064
+ offset?: number;
40065
+ }): rebilly.GetIntegrationCollectionResponsePromise;
39985
40066
  get({ label }: {
39986
40067
  label: any;
39987
40068
  }): rebilly.GetIntegrationResponsePromise;
@@ -40259,7 +40340,10 @@ declare module "resources/api-instance" {
40259
40340
  }): any;
40260
40341
  };
40261
40342
  paymentMethods: {
40262
- getAll(): rebilly.GetPaymentMethodCollectionResponsePromise;
40343
+ getAll({ limit, offset }?: {
40344
+ limit?: number;
40345
+ offset?: number;
40346
+ }): rebilly.GetPaymentMethodCollectionResponsePromise;
40263
40347
  get({ apiName }: {
40264
40348
  apiName: any;
40265
40349
  }): rebilly.GetPaymentMethodResponsePromise;
@@ -41341,8 +41425,9 @@ declare module "resources/storefront/invoices-resource" {
41341
41425
  apiHandler: any;
41342
41426
  }): {
41343
41427
  getAll({ filter, sort, limit, offset, q, }?: rebilly.StorefrontGetInvoiceCollectionRequest): rebilly.StorefrontGetInvoiceCollectionResponsePromise;
41344
- get({ id }: {
41428
+ get({ id, expand }: {
41345
41429
  id: any;
41430
+ expand?: any;
41346
41431
  }): rebilly.StorefrontGetInvoiceResponsePromise;
41347
41432
  downloadPDF({ id }: {
41348
41433
  id: any;
@@ -41539,8 +41624,9 @@ declare module "resources/storefront/storefront-api-instance" {
41539
41624
  offset?: number;
41540
41625
  q?: string;
41541
41626
  }): rebilly.StorefrontGetInvoiceCollectionResponsePromise;
41542
- get({ id }: {
41627
+ get({ id, expand }: {
41543
41628
  id: any;
41629
+ expand?: any;
41544
41630
  }): rebilly.StorefrontGetInvoiceResponsePromise;
41545
41631
  downloadPDF({ id }: {
41546
41632
  id: any;
@@ -1583,7 +1583,7 @@ function cloneArrayDeep(arr, instanceClone) {
1583
1583
  return res;
1584
1584
  }
1585
1585
  var cloneDeep_1 = cloneDeep;
1586
- const version = "47.13.1";
1586
+ const version = "47.13.2";
1587
1587
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1588
1588
  let nanoid = (size = 21) => {
1589
1589
  let id = "";
@@ -1991,8 +1991,9 @@ function ApplicationsResource({ apiHandler }) {
1991
1991
  get({ id }) {
1992
1992
  return apiHandler.get(`applications/${id}`);
1993
1993
  },
1994
- getInstances({ id }) {
1995
- return apiHandler.getAll(`applications/${id}/instances`);
1994
+ getInstances({ id, limit = null, offset = null }) {
1995
+ const params = { limit, offset };
1996
+ return apiHandler.getAll(`applications/${id}/instances`, params);
1996
1997
  },
1997
1998
  getInstance({ id, organizationId }) {
1998
1999
  return apiHandler.get(`applications/${id}/instances/${organizationId}`);
@@ -2529,8 +2530,9 @@ function CustomersResource$1({ apiHandler }) {
2529
2530
  createEddTimelineComment({ id, data: data2 }) {
2530
2531
  return apiHandler.post(`customers/${id}/edd-timeline`, data2);
2531
2532
  },
2532
- getAllEddSearchResults({ id }) {
2533
- return apiHandler.get(`customers/${id}/edd-search-results`);
2533
+ getAllEddSearchResults({ id, limit = null, offset = null }) {
2534
+ const params = { limit, offset };
2535
+ return apiHandler.get(`customers/${id}/edd-search-results`, params);
2534
2536
  },
2535
2537
  downloadCSV({
2536
2538
  limit = null,
@@ -2672,8 +2674,9 @@ function EmailMessagesResource({ apiHandler }) {
2672
2674
  }
2673
2675
  function EmailNotificationsResource({ apiHandler }) {
2674
2676
  return {
2675
- getAll() {
2676
- return apiHandler.getAll(`email-notifications`);
2677
+ getAll({ limit = null, offset = null } = {}) {
2678
+ const params = { limit, offset };
2679
+ return apiHandler.getAll(`email-notifications`, params);
2677
2680
  }
2678
2681
  };
2679
2682
  }
@@ -2989,8 +2992,9 @@ function GatewayAccountsResource({ apiHandler }) {
2989
2992
  }
2990
2993
  function IntegrationsResource({ apiHandler }) {
2991
2994
  return {
2992
- getAll() {
2993
- return apiHandler.getAll(`integrations`);
2995
+ getAll({ limit = null, offset = null } = {}) {
2996
+ const params = { limit, offset };
2997
+ return apiHandler.getAll(`integrations`, params);
2994
2998
  },
2995
2999
  get({ label }) {
2996
3000
  return apiHandler.get(`integrations/${label}`);
@@ -3316,8 +3320,9 @@ function PaymentInstrumentsResource$1({ apiHandler }) {
3316
3320
  }
3317
3321
  function PaymentMethodsResource({ apiHandler }) {
3318
3322
  return {
3319
- getAll() {
3320
- return apiHandler.getAll(`payment-methods`);
3323
+ getAll({ limit = null, offset = null } = {}) {
3324
+ const params = { limit, offset };
3325
+ return apiHandler.getAll(`payment-methods`, params);
3321
3326
  },
3322
3327
  get({ apiName }) {
3323
3328
  return apiHandler.get(`payment-methods/${apiName}`);
@@ -4517,8 +4522,9 @@ function InvoicesResource({ apiHandler }) {
4517
4522
  const params = { filter, sort, limit, offset, q };
4518
4523
  return apiHandler.getAll(`invoices`, params);
4519
4524
  },
4520
- get({ id }) {
4521
- return apiHandler.get(`invoices/${id}`);
4525
+ get({ id, expand = null }) {
4526
+ const params = { expand };
4527
+ return apiHandler.get(`invoices/${id}`, params);
4522
4528
  },
4523
4529
  downloadPDF({ id }) {
4524
4530
  const config = {
@@ -34,4 +34,4 @@ var Qs=Object.defineProperty;var ut=Object.getOwnPropertySymbols;var Zs=Object.p
34
34
  *
35
35
  * Copyright (c) 2014-2017, Jon Schlinkert.
36
36
  * Released under the MIT License.
37
- */var _r=Vr,Jr=Object.prototype.hasOwnProperty,Wr=function(e,t,n){_r(e,function(s,u){if(Jr.call(e,u))return t.call(n,e[u],u,e)})},Gr=Tr,Xr=Lr,Yr=Kr,Qr=Wr;function de(r,e){switch(Yr(r)){case"object":return Zr(r,e);case"array":return Hr(r,e);default:return Xr(r)}}function Zr(r,e){if(Gr(r)){var t={};return Qr(r,function(n,s){this[s]=de(n,e)},t),t}else return e?e(r):r}function Hr(r,e){for(var t=r.length,n=[],s=-1;++s<t;)n[s]=de(r[s],e);return n}var en=de;const tn="47.13.1";let rn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nn=(r=21)=>{let e="",t=r;for(;t--;)e+=rn[Math.random()*64|0];return e};class sn{constructor({id:e=null,created:t=null}={}){this.id=e||nn(),this.created=t||new Date().getTime(),this.cancelSource=pe.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,te(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class K{constructor(){if(K.instance)return K.instance;this.requests={},K.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 sn;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}var L=new K;class re{}ve(re,"cancelById",(e,t)=>{try{L.getById(e).cancel(t),L.deleteById(e)}catch{}}),ve(re,"cancelAll",e=>L.getAll().forEach(t=>{t.cancel(e),L.deleteById(t.id)}));var un={cancelAll:(...r)=>re.cancelAll(...r)};const q={request:"request",response:"response"},Ye=r=>{if(!Object.values(q).includes(r))throw new Error(`There is no such interceptor type as "${r}"`);return!0};function $e({options:r}){const e=t();function t(){return pe.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:r.requestTimeout,headers:o()}}function u(){let i=r.isSandbox?r.apiEndpoints.sandbox:r.apiEndpoints.live;return r.apiVersion&&(i=`${i}/${r.apiVersion}`),r.organizationId&&(i=`${i}/organizations/${r.organizationId}`),`${i}`}function o(){const i={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${tn}`};return r.apiKey&&(i["REB-APIKEY"]=r.apiKey),i}function l(){return en(e.defaults.headers)}function a(i){r.requestTimeout=Number(i),e.defaults.timeout=r.requestTimeout}function g(i=r.jwt){const m=l();r.apiKey=null,r.jwt=i,delete m.common["REB-APIKEY"],m.common.Authorization=`Bearer ${i}`,e.defaults.headers=m}function c(i=r.publishableKey){const m=l();r.publishableKey=i,m.common.Authorization=`${i}`,e.defaults.headers=m}function h({host:i,port:m,auth:f}){e.defaults.proxy={host:i,port:m,auth:f}}function w({live:i=null,sandbox:m=null}){i&&(r.apiEndpoints.live=i),m&&(r.apiEndpoints.sandbox=m),e.defaults.baseURL=u()}function b(i,{thenDelegate:m,catchDelegate:f=()=>{}}){return Ye(i)&&e.interceptors[q[i]].use(m,f)}function z(i,m){return Ye(i)&&e.interceptors[q[i]].eject(m)}function ne({thenDelegate:i,catchDelegate:m=()=>{}}){return b(q.request,{thenDelegate:i,catchDelegate:m})}function E(i){z(q.request,i)}function P({thenDelegate:i,catchDelegate:m=()=>{}}){return b(q.response,{thenDelegate:i,catchDelegate:m})}function T(i){z(q.response,i)}function x({request:i,isCollection:m,config:f}){const $=et(f),{id:O,cancelToken:Ys}=L.save();$.cancelToken=Ys;const st=async function(){try{const _=await i($);return V({response:_,isCollection:m,config:$})}catch(_){return He({error:_,config:$})}finally{L.deleteById(O)}}();return st.cancel=_=>re.cancelById(O,_),st}function V({response:i,isCollection:m,config:f}){return m?new dr(i,f):new _e(i,f)}function He({error:i}){if(pe.isCancel(i))throw new S.RebillyCanceledError(i);if(i.response)switch(Number(i.response.status)){case 401:throw new S.RebillyForbiddenError(i);case 404:throw new S.RebillyNotFoundError(i);case 405:throw new S.RebillyMethodNotAllowedError(i);case 409:throw new S.RebillyConflictError(i);case 422:throw new S.RebillyValidationError(i);default:throw new S.RebillyRequestError(i)}throw i.code==="ECONNABORTED"?new S.RebillyTimeoutError(i):new S.RebillyRequestError(i)}function zs(i){return i.params!==void 0&&(i.params=Object.keys(i.params).filter(m=>i.params[m]!==null&&i.params[m]!=="").reduce((m,f)=>(m[f]=i.params[f],m),{})),i}function et(i={}){const m=zs(i);return J({},m)}function tt(i,m={}){return x({request:f=>e.get(i,f),config:{params:m}})}function Vs(i,m){return x({request:f=>e.get(i,f),config:{params:m},isCollection:!0})}function rt(i,m,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params=J({},f.params)),x({request:O=>e.post(i,m,O),config:$})}function nt(i,m,f={}){return x({request:$=>e.put(i,m,$),config:{params:f}})}function _s(i,m){return x({request:f=>e.patch(i,m,f),config:{}})}function Js(i){return x({request:m=>e.delete(i,m),config:{}})}function Ws(i,m){return x({request:f=>e.delete(i,f),config:{data:J({},m)}})}async function Gs(i,m,f,$={}){if(m==="")return rt(i,f,{params:$});try{if((await tt(i)).response.status===200)throw new S.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(O){if(O.name==="RebillyNotFoundError")return nt(i,f,$);throw O}}async function Xs(i,m){const f=et(m);try{const $=await e.get(i,f);return new $r($,f)}catch($){return He({error:$,config:f})}}return{getInstance:n,addRequestInterceptor:ne,removeRequestInterceptor:E,addResponseInterceptor:P,removeResponseInterceptor:T,setTimeout:a,setProxyAgent:h,setSessionToken:g,setPublishableKey:c,setEndpoints:w,get:tt,getAll:Vs,post:rt,put:nt,patch:_s,delete:Js,deleteAll:Ws,create:Gs,download:Xs}}function on({apiHandler:r}){return{activate({token:e}){return r.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return r.post("forgot-password",e,{authenticate:!1})},logout(){return r.post("logout")},signIn({data:e}){return r.post("signin",e,{authenticate:!1})},signUp({data:e}){return r.post("signup",e,{authenticate:!1})}}}function ln({apiHandler:r}){return{getAll({firstName:e,lastName:t,dob:n=null,country:s=null}){const u={firstName:e,lastName:t,dob:n,country:s};return r.getAll("aml",u)}}}function cn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null}={}){const s={limit:e,offset:t,sort:n};return r.getAll("api-keys",s)},create({id:e="",data:t}){return r.create(`api-keys/${e}`,e,t)},get({id:e}){return r.get(`api-keys/${e}`)},update({id:e,data:t}){return r.put(`api-keys/${e}`,t)},delete({id:e}){return r.delete(`api-keys/${e}`)}}}function an({apiHandler:r}){return{get({applicationId:e}){return r.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return r.put(`application-instances/${e}`,t)},delete({applicationId:e}){return r.delete(`application-instances/${e}`)}}}function mn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("applications",a)},create({data:e}){return r.post("applications",e)},get({id:e}){return r.get(`applications/${e}`)},getInstances({id:e}){return r.getAll(`applications/${e}/instances`)},getInstance({id:e,organizationId:t}){return r.get(`applications/${e}/instances/${t}`)}}}function fn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("balance-transactions",n)},get({id:e}){return r.get(`balance-transactions/${e}`)}}}function gn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("billing-portals",o)},create({id:e="",data:t}){return r.create(`billing-portals/${e}`,e,t)},get({id:e}){return r.get(`billing-portals/${e}`)},update({id:e,data:t}){return r.put(`billing-portals/${e}`,t)},delete({id:e}){return r.delete(`billing-portals/${e}`)}}}function hn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("blocklists",o)},create({id:e="",data:t}){return r.create(`blocklists/${e}`,e,t)},get({id:e}){return r.get(`blocklists/${e}`)},delete({id:e}){return r.delete(`blocklists/${e}`)}}}function pn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:t,sort:n,filter:s};return r.getAll("broadcast-messages",u)},create({data:e}){return r.post("broadcast-messages",e)},get({id:e}){return r.get(`broadcast-messages/${e}`)},delete({id:e}){return r.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return r.patch(`broadcast-messages/${e}`,t)}}}function dn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("checkout-forms",o)},create({id:e="",data:t}){return r.create(`checkout-forms/${e}`,e,t)},get({id:e}){return r.get(`checkout-forms/${e}`)},update({id:e,data:t}){return r.put(`checkout-forms/${e}`,t)},delete({id:e}){return r.delete(`checkout-forms/${e}`)}}}function $n({apiHandler:r}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons-redemptions",o)},redeem({data:e}){return r.post("coupons-redemptions",e)},getRedemption({id:e}){return r.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return r.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons",o)},create({id:e="",data:t}){return r.create(`coupons/${e}`,e,t)},get({id:e}){return r.get(`coupons/${e}`)},update({id:e,data:t}){return r.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return r.post(`coupons/${e}/expiration`,t)}}}function yn({apiHandler:r}){return{createAWSSESCredential({data:e}){return r.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return r.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return r.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return r.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return r.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return r.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return r.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return r.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return r.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return r.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return r.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return r.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const a={limit:t,offset:n,filter:s,q:u,fields:o,sort:l};return r.getAll(`credential-hashes/oauth2/${e}/items`,a)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return r.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return r.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return r.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return r.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return r.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return r.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return r.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return r.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return r.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return r.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return r.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return r.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return r.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return r.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return r.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return r.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return r.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return r.patch(`credential-hashes/taxjar/${e}`,t)}}}function bn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("credit-memos",l)},create({id:e="",data:t}){return r.create(`credit-memos/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`credit-memos/${e}`,n)},update({id:e,data:t}){return r.put(`credit-memos/${e}`,t)},void({id:e}){return r.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`credit-memos/${e}/timeline/${t}`)}}}function An({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("custom-domains",o)},create({data:e}){return r.post("custom-domains",e)},get({domain:e}){return r.get(`custom-domains/${e}`)},delete({domain:e}){return r.delete(`custom-domains/${e}`)}}}function vn({apiHandler:r}){return{getAll({resource:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return r.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)},update({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)}}}function wn({apiHandler:r}){return{getAuthOptions(){return r.get("authentication-options")},updateAuthOptions({data:e}){return r.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("authentication-tokens",n)},login({data:e}){return r.post("authentication-tokens",e)},verify({token:e}){return r.get(`authentication-tokens/${e}`)},logout({token:e}){return r.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return r.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("credentials",n)},createCredential({id:e="",data:t}){return r.create(`credentials/${e}`,e,t)},getCredential({id:e}){return r.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return r.put(`credentials/${e}`,t)},deleteCredential({id:e}){return r.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return r.post("password-tokens",e)},getResetPasswordToken({id:e}){return r.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return r.delete(`password-tokens/${e}`)}}}const D={Accept:"text/csv"},Qe={Accept:"application/pdf"};function Rn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("customers",a)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:n=null}){const s={expand:t,fields:n};return r.get(`customers/${e}`,s)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return r.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return r.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return r.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return r.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/timeline/${t}`)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`customers/${e}/upcoming-invoices`,n)},getCustomerEddScore({id:e}){return r.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return r.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:t}){return r.post(`customers/${e}/edd-timeline`,t)},getAllEddSearchResults({id:e}){return r.get(`customers/${e}/edd-search-results`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("customers",l)}}}function En({apiHandler:r}){return{create({data:e}){return r.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return r.post("digital-wallets/validation",e)}}}function Sn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("disputes",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`disputes/${e}`,e,t,s)},get({id:e}){return r.get(`disputes/${e}`)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("disputes",l)}}}function kn({apiHandler:r}){return{verify({token:e}){return r.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("email-delivery-settings",o)},create({data:e}){return r.post("email-delivery-settings",e)},get({id:e}){return r.get(`email-delivery-settings/${e}`)},delete({id:e}){return r.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return r.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return r.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Cn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:t,q:n,sort:s,filter:u};return r.getAll("email-messages",o)},create({data:e}){return r.post("email-messages",e)},get({id:e}){return r.get(`email-messages/${e}`)},delete({id:e}){return r.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return r.patch(`email-messages/${e}`,t)}}}function Tn({apiHandler:r}){return{getAll(){return r.getAll("email-notifications")}}}function xn({apiHandler:r}){return{getAll(){return r.getAll("events")},get({eventType:e}){return r.get(`events/${e}`)},getRules({eventType:e}){return r.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:t}){return r.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return r.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return r.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const g={limit:t,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return r.getAll(`events/${e}/rules/history`,g)},getRulesVersionNumber({eventType:e,version:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/history/${t}`,u)},getRulesVersionDetail({eventType:e,version:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/versions/${t}`,u)},getAllDraftRulesets({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const g={limit:t,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return r.getAll(`events/${e}/rules/drafts`,g)},createDraftRuleset({eventType:e,data:t}){return r.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/drafts/${t}`,u)},updateDraftRuleset({eventType:e,id:t,data:n}){return r.put(`events/${e}/rules/drafts/${t}`,n)},deleteDraftRuleset({eventType:e,id:t}){return r.delete(`events/${e}/rules/drafts/${t}`)}}}function In({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("fees",n)},create({id:e="",data:t}){return r.create(`fees/${e}`,e,t)},get({id:e}){return r.get(`fees/${e}`)},upsert({id:e,data:t}){return r.put(`fees/${e}`,t)},patch({id:e,data:t}){return r.patch(`fees/${e}`,t)}}}function Pn({apiHandler:r}){return{getAllAttachments({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("attachments",a)},attach({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return r.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`attachments/${e}`,t,s)},detach({id:e}){return r.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("files",a)},upload({fileObject:e}){return r.post("files",e)},get({id:e}){return r.get(`files/${e}`)},update({id:e,data:t}){return r.put(`files/${e}`,t)},delete({id:e}){return r.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return r.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(t);n.push(o);const a=(await o).items.map(c=>this.detach({id:c.fields.id}));n=[...n,a],await Promise.all(a);const g=r.delete(`files/${e}`);return n.push(g),g})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:t.description,tags:t.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function On({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u,fields:o};return r.getAll("gateway-accounts",l)},create({id:e="",data:t}){return r.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return r.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return r.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return r.delete(`gateway-accounts/${e}`)},close({id:e}){return r.post(`gateway-accounts/${e}/close`)},disable({id:e}){return r.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null}){const o={limit:t,offset:n,filter:s,sort:u};return r.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:t}){return r.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return r.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:n}){return r.put(`gateway-accounts/${e}/downtime-schedules/${t}`,n)},deleteDowntimeSchedule({id:e,downtimeId:t}){return r.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return r.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return r.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return r.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:n}){return r.put(`gateway-accounts/${e}/limits/${t}`,n)},deleteVolumeLimit({id:e,limitId:t}){return r.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return r.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return r.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return r.put(`gateway-accounts/${e}/financial-settings`,t)}}}function jn({apiHandler:r}){return{getAll(){return r.getAll("integrations")},get({label:e}){return r.get(`integrations/${e}`)}}}function qn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("invoices",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`invoices/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:n=null,expand:s=null}){const u={limit:t,offset:n,expand:s};return r.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return r.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return r.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:n}){return r.put(`invoices/${e}/items/${t}`,n)},deleteInvoiceItem({id:e,itemId:t}){return r.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return r.post(`invoices/${e}/issue`,t)},abandon({id:e}){return r.post(`invoices/${e}/abandon`)},void({id:e}){return r.post(`invoices/${e}/void`)},recalculate({id:e}){return r.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return r.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return r.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`invoices/${e}/timeline/${t}`)},getAllCreditMemoAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/credit-memo-allocations`,s)},getCreditMemoAllocation({id:e,creditMemoId:t,limit:n=null,offset:s=null}){const u={limit:n,offset:s};return r.get(`invoices/${e}/credit-memo-allocations/${t}`,u)},applyCreditMemo({id:e,creditMemoId:t,data:n}){return r.put(`invoices/${e}/credit-memo-allocations/${t}`,n)},deleteCreditMemoAllocation({id:e,creditMemoId:t}){return r.delete(`invoices/${e}/credit-memo-allocations/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("invoices",l)},downloadPDF({id:e}){const t={headers:Qe,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Dn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,expand:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,expand:u};return r.getAll("kyc-documents",o)},create({id:e="",data:t}){return r.create(`kyc-documents/${e}`,e,t)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.put(`kyc-documents/${e}`,t)},accept({id:e}){return r.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return r.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return r.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return r.post(`kyc-documents/${e}/review`)},startReview({id:e}){return r.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return r.post(`kyc-documents/${e}/stop-review`)}}}function Mn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("kyc-requests",u)},create({data:e}){return r.post("kyc-requests",e)},get({id:e}){return r.get(`kyc-requests/${e}`)},delete({id:e}){return r.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return r.patch(`kyc-requests/${e}`,t)}}}function Nn({apiHandler:r}){return{getKycSettings(){return r.get("kyc-settings")},updateKycSettings({data:e}){return r.put("kyc-settings",e)}}}function Bn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:t,filter:n,sort:s,fields:u,q:o};return r.getAll("lists",l)},create({id:e="",data:t}){return r.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return r.get(`lists/${e}`)},update({id:e,data:t}){return r.put(`lists/${e}`,t)},delete({id:e}){return r.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return r.get(`lists/${e}/${t}`)}}}function Un({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("memberships",u)},get({organizationId:e,userId:t}){return r.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:n}){return r.put(`memberships/${e}/${t}`,n)},delete({organizationId:e,userId:t}){return r.delete(`memberships/${e}/${t}`)}}}function Ln({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("organization-exports",o)},create({data:e}){return r.post("organization-exports",e)},get({id:e}){return r.get(`organization-exports/${e}`)}}}function Fn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:t,filter:n,q:s};return r.getAll("organizations",u)},create({data:e}){return r.post("organizations",e)},get({id:e}){return r.get(`organizations/${e}`)},update({id:e,data:t}){return r.patch(`organizations/${e}`,t)}}}function Kn({apiHandler:r}){return{getAll({limit:e=null,q:t=null}={}){const n={limit:e,q:t};return r.getAll("payment-cards-bank-names",n)}}}function zn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("payment-instruments",l)},create({data:e}){return r.post("payment-instruments",e)},get({id:e}){return r.get(`payment-instruments/${e}`)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)}}}function Vn({apiHandler:r}){return{getAll(){return r.getAll("payment-methods")},get({apiName:e}){return r.get(`payment-methods/${e}`)}}}function _n({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("tokens",n)},create({data:e}){return r.post("tokens",e)},get({token:e}){return r.get(`tokens/${e}`)}}}function Jn({apiHandler:r}){return{create({data:e}){return r.post("payouts",e)}}}function Wn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("plans",o)},create({id:e="",data:t}){return r.create(`plans/${e}`,e,t)},get({id:e}){return r.get(`plans/${e}`)},update({id:e,data:t}){return r.put(`plans/${e}`,t)},delete({id:e}){return r.delete(`plans/${e}`)}}}function Gn({apiHandler:r}){return{sendEmailRuleAction({data:e}){return r.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return r.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return r.post("previews/webhooks",e)},order({data:e}){return r.post("previews/orders",e)}}}function Xn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",o)},create({id:e="",data:t}){return r.create(`products/${e}`,e,t)},get({id:e}){return r.get(`products/${e}`)},update({id:e,data:t}){return r.put(`products/${e}`,t)},delete({id:e}){return r.delete(`products/${e}`)}}}function Yn({apiHandler:r}){return{startPermissionsEmulation({data:e}){return r.post("permissions-emulation",e)},stopPermissionsEmulation(){return r.delete("permissions-emulation")},get(){return r.get("profile")},update({data:e}){return r.put("profile",e)},getMfa(){return r.get("profile/mfa")},updateMfa(){return r.post("profile/mfa")},deleteMfa(){return r.delete("profile/mfa")},updatePassword({data:e}){return r.post("profile/password",e)},resetTotp(){return r.post("profile/totp-reset")}}}function Qn({apiHandler:r}){return{readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Zn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u,expand:o};return r.getAll("roles",l)},create({id:e="",data:t}){return r.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`roles/${e}`,n)},update({id:e,data:t}){return r.put(`roles/${e}`,t)},delete({id:e}){return r.delete(`roles/${e}`)}}}function Hn({apiHandler:r}){return{get({sort:e=null,limit:t=null,offset:n=null,q:s=null}){const u={sort:e,limit:t,offset:n,q:s};return r.get("search",u)}}}function es({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("grid-segments",o)},create({id:e="",data:t}){return r.create(`grid-segments/${e}`,e,t)},get({id:e}){return r.get(`grid-segments/${e}`)},update({id:e,data:t}){return r.put(`grid-segments/${e}`,t)},delete({id:e}){return r.delete(`grid-segments/${e}`)}}}function ts({apiHandler:r}){return{getAll({eventType:e}){return r.getAll(`send-through-attribution/${e}`)}}}function rs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("shipping-rates",o)},create({id:e="",data:t}){return r.create(`shipping-rates/${e}`,e,t)},get({id:e}){return r.get(`shipping-rates/${e}`)},update({id:e,data:t}){return r.put(`shipping-rates/${e}`,t)},delete({id:e}){return r.delete(`shipping-rates/${e}`)}}}function ns({apiHandler:r}){return{get(){return r.get("status")}}}function ss({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return r.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return r.get(`subscription-cancellations/${e}`)},delete({id:e}){return r.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return r.patch(`subscription-cancellations/${e}`,t)}}}function us({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return r.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return r.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return r.put(`subscription-pauses/${e}`,t)},delete({id:e}){return r.delete(`subscription-pauses/${e}`)}}}function os({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-reactivations",u)},reactivate({data:e}){return r.post("subscription-reactivations",e)},get({id:e}){return r.get(`subscription-reactivations/${e}`)}}}function ls({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("subscriptions",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`subscriptions/${e}`,t,s)},delete({id:e}){return r.delete(`subscriptions/${e}`)},void({id:e}){return r.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return r.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return r.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`subscriptions/${e}/upcoming-invoices`,n)},issueUpcomingInvoice({id:e,invoiceId:t,data:n}){return r.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,n)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("subscriptions",l)}}}function is({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("tags",o)},create({data:e}){return r.post("tags",e)},get({tag:e}){return r.get(`tags/${e}`)},delete({tag:e}){return r.delete(`tags/${e}`)},update({tag:e,data:t}){return r.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return r.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return r.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return r.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return r.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return r.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return r.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return r.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return r.delete(`tags/${e}/kyc-documents/${t}`)}}}function cs({apiHandler:r}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/api",o)},getApiLog({id:e}){return r.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return r.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return r.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:t,sort:n,filter:s,q:u},headers:D};return r.download("tracking/api",o)}}}function as({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u,expand:o};return r.getAll("transactions",l)},create({data:e,expand:t=null}){const n={expand:t};return r.post("transactions",e,n)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`transactions/${e}`,n)},patch({id:e,data:t}){return r.patch(`transactions/${e}`,t)},query({id:e}){return r.post(`transactions/${e}/query`)},update({id:e,data:t}){return r.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return r.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null}){const u={limit:t,offset:n,filter:s};return r.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return r.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("transactions",l)}}}function ms({apiHandler:r}){return{getResetPasswordToken({token:e}){return r.get(`reset-password/${e}`)},resetPassword({token:e,data:t}){return r.post(`reset-password/${e}`,t)},getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("users",o)},create({id:e="",data:t}){return r.create(`users/${e}`,e,t)},get({id:e}){return r.get(`users/${e}`)},update({id:e,data:t}){return r.put(`users/${e}`,t)},getMfa({id:e}){return r.get(`users/${e}/mfa`)},updatePassword({id:e,data:t}){return r.post(`users/${e}/password`,t)},resetTotp({id:e}){return r.post(`users/${e}/totp-reset`)}}}function fs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null}={}){const s={limit:e,offset:t,filter:n};return r.getAll("webhooks",s)},create({id:e="",data:t}){return r.create(`webhooks/${e}`,e,t)},get({id:e}){return r.get(`webhooks/${e}`)},update({id:e,data:t}){return r.put(`webhooks/${e}`,t)}}}function gs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:t,q:n,filter:s,sort:u};return r.getAll("websites",o)},create({id:e="",data:t}){return r.create(`websites/${e}`,e,t)},get({id:e}){return r.get(`websites/${e}`)},update({id:e,data:t}){return r.put(`websites/${e}`,t)},delete({id:e}){return r.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("websites",l)}}}class hs{constructor({apiHandler:e}){this.account=on({apiHandler:e}),this.aml=ln({apiHandler:e}),this.apiKeys=cn({apiHandler:e}),this.applicationInstances=an({apiHandler:e}),this.applications=mn({apiHandler:e}),this.balanceTransactions=fn({apiHandler:e}),this.billingPortals=gn({apiHandler:e}),this.blocklists=hn({apiHandler:e}),this.broadcastMessages=pn({apiHandler:e}),this.checkoutForms=dn({apiHandler:e}),this.coupons=$n({apiHandler:e}),this.credentialHashes=yn({apiHandler:e}),this.creditMemos=bn({apiHandler:e}),this.customDomains=An({apiHandler:e}),this.customFields=vn({apiHandler:e}),this.customerAuthentication=wn({apiHandler:e}),this.customers=Rn({apiHandler:e}),this.digitalWallets=En({apiHandler:e}),this.disputes=Sn({apiHandler:e}),this.emailDeliverySettings=kn({apiHandler:e}),this.emailMessages=Cn({apiHandler:e}),this.emailNotifications=Tn({apiHandler:e}),this.events=xn({apiHandler:e}),this.fees=In({apiHandler:e}),this.files=Pn({apiHandler:e}),this.gatewayAccounts=On({apiHandler:e}),this.integrations=jn({apiHandler:e}),this.invoices=qn({apiHandler:e}),this.kycDocuments=Dn({apiHandler:e}),this.kycRequests=Mn({apiHandler:e}),this.kycSettings=Nn({apiHandler:e}),this.lists=Bn({apiHandler:e}),this.memberships=Un({apiHandler:e}),this.organizationExports=Ln({apiHandler:e}),this.organizations=Fn({apiHandler:e}),this.paymentCardsBankNames=Kn({apiHandler:e}),this.paymentInstruments=zn({apiHandler:e}),this.paymentMethods=Vn({apiHandler:e}),this.paymentTokens=_n({apiHandler:e}),this.payouts=Jn({apiHandler:e}),this.plans=Wn({apiHandler:e}),this.previews=Gn({apiHandler:e}),this.products=Xn({apiHandler:e}),this.profile=Yn({apiHandler:e}),this.purchase=Qn({apiHandler:e}),this.roles=Zn({apiHandler:e}),this.search=Hn({apiHandler:e}),this.segments=es({apiHandler:e}),this.sendThroughAttribution=ts({apiHandler:e}),this.shippingRates=rs({apiHandler:e}),this.status=ns({apiHandler:e}),this.subscriptionCancellations=ss({apiHandler:e}),this.subscriptionPauses=us({apiHandler:e}),this.subscriptionReactivations=os({apiHandler:e}),this.subscriptions=ls({apiHandler:e}),this.tags=is({apiHandler:e}),this.tracking=cs({apiHandler:e}),this.transactions=as({apiHandler:e}),this.users=ms({apiHandler:e}),this.webhooks=fs({apiHandler:e}),this.websites=gs({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 ps({apiHandler:r}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return r.get(`customers/${e}/summary-metrics`)}}}function ds({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:t,sort:n,expand:s,filter:u,q:o,criteria:l};return r.getAll("data-exports",a)},queue({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`data-exports/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`data-exports/${e}`,t,s)},delete({id:e}){return r.delete(`data-exports/${e}`)}}}function $s({apiHandler:r}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationField:n,aggregationPeriod:s,metric:u,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,aggregationPeriod:s,metric:u,filter:o};return r.get("histograms/transactions",l)}}}function ys({apiHandler:r}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:n,segments:s};return r.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:t,limit:n=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:t,limit:n,offset:s,filter:u};return r.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const o={periodStart:t,periodEnd:n,limit:s,offset:u};return r.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:n=null,recognizedAt:s,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const g={currency:e,bookedFrom:t,bookedTo:n,recognizedAt:s,aggregationField:u,limit:o,offset:l,filter:a};return r.get("reports/journal",g)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const o={currency:e,periodStart:t,periodEnd:n,limit:s,offset:u};return r.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:g=null}){const c={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:o,offset:l,filter:a,criteria:g};return r.get("reports/retention-percentage",c)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:g=null,sort:c=null,criteria:h=null}){const w={aggregationField:e,aggregationPeriod:t,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:a,filter:g,sort:c,criteria:h};return r.get("reports/retention-value",w)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s};return r.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:n=null,offset:s=null}){const u={filter:e,sort:t,limit:n,offset:s};return r.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:o};return r.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:n,periodEnd:s}){const u={type:e,subaggregate:t,periodStart:n,periodEnd:s};return r.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:o};return r.get("reports/transactions",l)}}}function bs({apiHandler:r}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return r.get(`subscriptions/${e}/summary-metrics`)}}}function As({apiHandler:r}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:n=0}){const s={eventTypes:e,limit:t,offset:n};return r.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`customers/${e}/timeline`,u)}}}function vs({apiHandler:r}){return{query(){return r.get("location")}}}const M={CustomersResource:ps,DataExportsResource:ds,HistogramsResource:$s,ReportsResource:ys,SubscriptionsResource:bs,TimelinesResource:As,LocationResource:vs};class ws{constructor({apiHandler:e}){this.customers=M.CustomersResource({apiHandler:e}),this.dataExports=M.DataExportsResource({apiHandler:e}),this.histograms=M.HistogramsResource({apiHandler:e}),this.reports=M.ReportsResource({apiHandler:e}),this.subscriptions=M.SubscriptionsResource({apiHandler:e}),this.timelines=M.TimelinesResource({apiHandler:e}),this.location=M.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 Rs({apiHandler:r}){return{get(){return r.get("account")},update({data:e}){return r.patch("account",e)},requestPasswordReset({data:e}){return r.post("account/forgot-password",e)},changePassword({data:e}){return r.patch("account/password",e)},resendEmailVerification({data:e}){return r.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return r.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return r.post(`account/verification/${e}`)},register({data:e}){return r.post("register",e)}}}function Es({apiHandler:r}){return{login({data:e}){return r.post("login",e)},logout(){return r.post("logout")}}}function Ss({apiHandler:r}){return{get({slug:e}){return r.get(`billing-portals/${e}`)}}}function ks({apiHandler:r}){return{get({id:e}){return r.get(`checkout-forms/${e}`)}}}function Cs({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("invoices",o)},get({id:e}){return r.get(`invoices/${e}`)},downloadPDF({id:e}){const t={headers:Qe,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Ts({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("kyc-documents",n)},create({data:e}){return r.post("kyc-documents",e)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.patch(`kyc-documents/${e}`,t)}}}function xs({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`kyc-requests/${e}`,n)}}}function Is({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("orders",o)},get({id:e}){return r.get(`orders/${e}`)},update({id:e,data:t}){return r.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return r.post(`orders/${e}/cancellation`,t)}}}function Ps({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payment-instruments",o)},create({data:e}){return r.post("payment-instruments",e)},get({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return r.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return r.post(`payment-instruments/${e}/setup`,t)}}}function Os({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("plans",l)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`plans/${e}`,n)}}}function js({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",o)},get({id:e}){return r.get(`products/${e}`)}}}function qs({apiHandler:r}){return{payment({data:e}){return r.post("payment",e)},purchase({data:e}){return r.post("purchase",e)},preview({data:e}){return r.post("preview-purchase",e)},readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Ds({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("transactions",o)},get({id:e}){return r.get(`transactions/${e}`)},update({id:e,data:t}){return r.patch(`transactions/${e}`,t)}}}function Ms({apiHandler:r}){return{get({id:e}){return r.get(`websites/${e}`)}}}class Ns{constructor({apiHandler:e}){this.account=Rs({apiHandler:e}),this.authorization=Es({apiHandler:e}),this.billingPortals=Ss({apiHandler:e}),this.checkoutForms=ks({apiHandler:e}),this.invoices=Cs({apiHandler:e}),this.kycDocuments=Ts({apiHandler:e}),this.kycRequests=xs({apiHandler:e}),this.orders=Is({apiHandler:e}),this.paymentInstruments=Ps({apiHandler:e}),this.plans=Os({apiHandler:e}),this.products=js({apiHandler:e}),this.purchase=qs({apiHandler:e}),this.transactions=Ds({apiHandler:e}),this.websites=Ms({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Bs({apiHandler:r}){return new hs({apiHandler:r})}function Us({apiHandler:r}){return new ws({apiHandler:r})}function Ls({apiHandler:r}){return new Ns({apiHandler:r})}const ye={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},be=6e3;function Ze({apiKey:r=null,sandbox:e=!1,timeout:t=be,organizationId:n=null,urls:s=ye}={}){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=$e({options:{apiEndpoints:s,apiKey:r,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Bs({apiHandler:o})}function Fs({apiKey:r=null,sandbox:e=!1,timeout:t=be,organizationId:n=null,urls:s=ye}={}){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=$e({options:{apiEndpoints:s,apiKey:r,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Us({apiHandler:o})}function Ks({publishableKey:r=null,jwt:e=null,sandbox:t=!1,timeout:n=be,organizationId:s=null,urls:u=ye}={}){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:r,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:n,organizationId:s},l=$e({options:o});return l.setSessionToken(o.jwt),Ls({apiHandler:l})}d.RebillyAPI=Ze,d.RebillyErrors=S,d.RebillyExperimentalAPI=Fs,d.RebillyStorefrontAPI=Ks,d.cancellation=un,d.default=Ze,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
37
+ */var _r=Vr,Jr=Object.prototype.hasOwnProperty,Wr=function(e,t,n){_r(e,function(s,u){if(Jr.call(e,u))return t.call(n,e[u],u,e)})},Gr=Tr,Xr=Lr,Yr=Kr,Qr=Wr;function de(r,e){switch(Yr(r)){case"object":return Zr(r,e);case"array":return Hr(r,e);default:return Xr(r)}}function Zr(r,e){if(Gr(r)){var t={};return Qr(r,function(n,s){this[s]=de(n,e)},t),t}else return e?e(r):r}function Hr(r,e){for(var t=r.length,n=[],s=-1;++s<t;)n[s]=de(r[s],e);return n}var en=de;const tn="47.13.2";let rn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nn=(r=21)=>{let e="",t=r;for(;t--;)e+=rn[Math.random()*64|0];return e};class sn{constructor({id:e=null,created:t=null}={}){this.id=e||nn(),this.created=t||new Date().getTime(),this.cancelSource=pe.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,te(this,{exclude:["cancelSource","cancelToken","cancel"]})}}class K{constructor(){if(K.instance)return K.instance;this.requests={},K.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 sn;return this.requests[e.id]=e,{id:e.id,cancelToken:e.cancelToken}}}var L=new K;class re{}ve(re,"cancelById",(e,t)=>{try{L.getById(e).cancel(t),L.deleteById(e)}catch{}}),ve(re,"cancelAll",e=>L.getAll().forEach(t=>{t.cancel(e),L.deleteById(t.id)}));var un={cancelAll:(...r)=>re.cancelAll(...r)};const q={request:"request",response:"response"},Ye=r=>{if(!Object.values(q).includes(r))throw new Error(`There is no such interceptor type as "${r}"`);return!0};function $e({options:r}){const e=t();function t(){return pe.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:r.requestTimeout,headers:o()}}function u(){let i=r.isSandbox?r.apiEndpoints.sandbox:r.apiEndpoints.live;return r.apiVersion&&(i=`${i}/${r.apiVersion}`),r.organizationId&&(i=`${i}/organizations/${r.organizationId}`),`${i}`}function o(){const i={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${tn}`};return r.apiKey&&(i["REB-APIKEY"]=r.apiKey),i}function l(){return en(e.defaults.headers)}function a(i){r.requestTimeout=Number(i),e.defaults.timeout=r.requestTimeout}function g(i=r.jwt){const m=l();r.apiKey=null,r.jwt=i,delete m.common["REB-APIKEY"],m.common.Authorization=`Bearer ${i}`,e.defaults.headers=m}function c(i=r.publishableKey){const m=l();r.publishableKey=i,m.common.Authorization=`${i}`,e.defaults.headers=m}function h({host:i,port:m,auth:f}){e.defaults.proxy={host:i,port:m,auth:f}}function w({live:i=null,sandbox:m=null}){i&&(r.apiEndpoints.live=i),m&&(r.apiEndpoints.sandbox=m),e.defaults.baseURL=u()}function b(i,{thenDelegate:m,catchDelegate:f=()=>{}}){return Ye(i)&&e.interceptors[q[i]].use(m,f)}function z(i,m){return Ye(i)&&e.interceptors[q[i]].eject(m)}function ne({thenDelegate:i,catchDelegate:m=()=>{}}){return b(q.request,{thenDelegate:i,catchDelegate:m})}function E(i){z(q.request,i)}function P({thenDelegate:i,catchDelegate:m=()=>{}}){return b(q.response,{thenDelegate:i,catchDelegate:m})}function T(i){z(q.response,i)}function x({request:i,isCollection:m,config:f}){const $=et(f),{id:O,cancelToken:Ys}=L.save();$.cancelToken=Ys;const st=async function(){try{const _=await i($);return V({response:_,isCollection:m,config:$})}catch(_){return He({error:_,config:$})}finally{L.deleteById(O)}}();return st.cancel=_=>re.cancelById(O,_),st}function V({response:i,isCollection:m,config:f}){return m?new dr(i,f):new _e(i,f)}function He({error:i}){if(pe.isCancel(i))throw new S.RebillyCanceledError(i);if(i.response)switch(Number(i.response.status)){case 401:throw new S.RebillyForbiddenError(i);case 404:throw new S.RebillyNotFoundError(i);case 405:throw new S.RebillyMethodNotAllowedError(i);case 409:throw new S.RebillyConflictError(i);case 422:throw new S.RebillyValidationError(i);default:throw new S.RebillyRequestError(i)}throw i.code==="ECONNABORTED"?new S.RebillyTimeoutError(i):new S.RebillyRequestError(i)}function zs(i){return i.params!==void 0&&(i.params=Object.keys(i.params).filter(m=>i.params[m]!==null&&i.params[m]!=="").reduce((m,f)=>(m[f]=i.params[f],m),{})),i}function et(i={}){const m=zs(i);return J({},m)}function tt(i,m={}){return x({request:f=>e.get(i,f),config:{params:m}})}function Vs(i,m){return x({request:f=>e.get(i,f),config:{params:m},isCollection:!0})}function rt(i,m,f={}){let $={};return f.authenticate===!1&&($={headers:l()},delete $.headers.common["REB-APIKEY"],delete $.headers.common.Authorization),f.params&&($.params=J({},f.params)),x({request:O=>e.post(i,m,O),config:$})}function nt(i,m,f={}){return x({request:$=>e.put(i,m,$),config:{params:f}})}function _s(i,m){return x({request:f=>e.patch(i,m,f),config:{}})}function Js(i){return x({request:m=>e.delete(i,m),config:{}})}function Ws(i,m){return x({request:f=>e.delete(i,f),config:{data:J({},m)}})}async function Gs(i,m,f,$={}){if(m==="")return rt(i,f,{params:$});try{if((await tt(i)).response.status===200)throw new S.RebillyConflictError({message:"Member already exists. Please use a different ID."})}catch(O){if(O.name==="RebillyNotFoundError")return nt(i,f,$);throw O}}async function Xs(i,m){const f=et(m);try{const $=await e.get(i,f);return new $r($,f)}catch($){return He({error:$,config:f})}}return{getInstance:n,addRequestInterceptor:ne,removeRequestInterceptor:E,addResponseInterceptor:P,removeResponseInterceptor:T,setTimeout:a,setProxyAgent:h,setSessionToken:g,setPublishableKey:c,setEndpoints:w,get:tt,getAll:Vs,post:rt,put:nt,patch:_s,delete:Js,deleteAll:Ws,create:Gs,download:Xs}}function on({apiHandler:r}){return{activate({token:e}){return r.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return r.post("forgot-password",e,{authenticate:!1})},logout(){return r.post("logout")},signIn({data:e}){return r.post("signin",e,{authenticate:!1})},signUp({data:e}){return r.post("signup",e,{authenticate:!1})}}}function ln({apiHandler:r}){return{getAll({firstName:e,lastName:t,dob:n=null,country:s=null}){const u={firstName:e,lastName:t,dob:n,country:s};return r.getAll("aml",u)}}}function cn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null}={}){const s={limit:e,offset:t,sort:n};return r.getAll("api-keys",s)},create({id:e="",data:t}){return r.create(`api-keys/${e}`,e,t)},get({id:e}){return r.get(`api-keys/${e}`)},update({id:e,data:t}){return r.put(`api-keys/${e}`,t)},delete({id:e}){return r.delete(`api-keys/${e}`)}}}function an({apiHandler:r}){return{get({applicationId:e}){return r.get(`application-instances/${e}`)},upsert({applicationId:e,data:t}){return r.put(`application-instances/${e}`,t)},delete({applicationId:e}){return r.delete(`application-instances/${e}`)}}}function mn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("applications",a)},create({data:e}){return r.post("applications",e)},get({id:e}){return r.get(`applications/${e}`)},getInstances({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`applications/${e}/instances`,s)},getInstance({id:e,organizationId:t}){return r.get(`applications/${e}/instances/${t}`)}}}function fn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("balance-transactions",n)},get({id:e}){return r.get(`balance-transactions/${e}`)}}}function gn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("billing-portals",o)},create({id:e="",data:t}){return r.create(`billing-portals/${e}`,e,t)},get({id:e}){return r.get(`billing-portals/${e}`)},update({id:e,data:t}){return r.put(`billing-portals/${e}`,t)},delete({id:e}){return r.delete(`billing-portals/${e}`)}}}function hn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("blocklists",o)},create({id:e="",data:t}){return r.create(`blocklists/${e}`,e,t)},get({id:e}){return r.get(`blocklists/${e}`)},delete({id:e}){return r.delete(`blocklists/${e}`)}}}function pn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:t,sort:n,filter:s};return r.getAll("broadcast-messages",u)},create({data:e}){return r.post("broadcast-messages",e)},get({id:e}){return r.get(`broadcast-messages/${e}`)},delete({id:e}){return r.delete(`broadcast-messages/${e}`)},update({id:e,data:t}){return r.patch(`broadcast-messages/${e}`,t)}}}function dn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("checkout-forms",o)},create({id:e="",data:t}){return r.create(`checkout-forms/${e}`,e,t)},get({id:e}){return r.get(`checkout-forms/${e}`)},update({id:e,data:t}){return r.put(`checkout-forms/${e}`,t)},delete({id:e}){return r.delete(`checkout-forms/${e}`)}}}function $n({apiHandler:r}){return{getAllRedemptions({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons-redemptions",o)},redeem({data:e}){return r.post("coupons-redemptions",e)},getRedemption({id:e}){return r.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return r.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("coupons",o)},create({id:e="",data:t}){return r.create(`coupons/${e}`,e,t)},get({id:e}){return r.get(`coupons/${e}`)},update({id:e,data:t}){return r.put(`coupons/${e}`,t)},setExpiration({id:e,data:t}){return r.post(`coupons/${e}/expiration`,t)}}}function yn({apiHandler:r}){return{createAWSSESCredential({data:e}){return r.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return r.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:t}){return r.patch(`credential-hashes/aws-ses/${e}`,t)},createEmailCredential({data:e}){return r.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return r.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:t}){return r.patch(`credential-hashes/emails/${e}`,t)},createMailgunCredential({data:e}){return r.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return r.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:t}){return r.patch(`credential-hashes/mailgun/${e}`,t)},getAllOAuth2Credentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return r.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return r.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:t}){return r.patch(`credential-hashes/oauth2/${e}`,t)},getOAuth2CredentialItems({hash:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const a={limit:t,offset:n,filter:s,q:u,fields:o,sort:l};return r.getAll(`credential-hashes/oauth2/${e}/items`,a)},getAllPlaidCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return r.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return r.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:t}){return r.patch(`credential-hashes/plaid/${e}`,t)},createPostmarkCredential({data:e}){return r.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return r.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:t}){return r.patch(`credential-hashes/postmark/${e}`,t)},createSendGridCredential({data:e}){return r.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return r.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:t}){return r.patch(`credential-hashes/sendgrid/${e}`,t)},createWebhookCredential({data:e}){return r.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return r.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:t}){return r.patch(`credential-hashes/webhooks/${e}`,t)},getAllExperianCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return r.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return r.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:t}){return r.patch(`credential-hashes/experian/${e}`,t)},getAllTaxJarCredentials({filter:e=null,limit:t=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:t,offset:n,sort:s,q:u};return r.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return r.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return r.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:t}){return r.patch(`credential-hashes/taxjar/${e}`,t)}}}function bn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("credit-memos",l)},create({id:e="",data:t}){return r.create(`credit-memos/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`credit-memos/${e}`,n)},update({id:e,data:t}){return r.put(`credit-memos/${e}`,t)},void({id:e}){return r.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`credit-memos/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`credit-memos/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`credit-memos/${e}/timeline/${t}`)}}}function An({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("custom-domains",o)},create({data:e}){return r.post("custom-domains",e)},get({domain:e}){return r.get(`custom-domains/${e}`)},delete({domain:e}){return r.delete(`custom-domains/${e}`)}}}function vn({apiHandler:r}){return{getAll({resource:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`custom-fields/${e}`,s)},get({resource:e,name:t}){return r.get(`custom-fields/${e}/${t}`)},create({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)},update({resource:e,name:t,data:n}){return r.put(`custom-fields/${e}/${t}`,n)}}}function wn({apiHandler:r}){return{getAuthOptions(){return r.get("authentication-options")},updateAuthOptions({data:e}){return r.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("authentication-tokens",n)},login({data:e}){return r.post("authentication-tokens",e)},verify({token:e}){return r.get(`authentication-tokens/${e}`)},logout({token:e}){return r.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:t}){return r.post(`authentication-tokens/${e}/exchange`,t)},getAllCredentials({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("credentials",n)},createCredential({id:e="",data:t}){return r.create(`credentials/${e}`,e,t)},getCredential({id:e}){return r.get(`credentials/${e}`)},updateCredential({id:e,data:t}){return r.put(`credentials/${e}`,t)},deleteCredential({id:e}){return r.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return r.post("password-tokens",e)},getResetPasswordToken({id:e}){return r.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return r.delete(`password-tokens/${e}`)}}}const D={Accept:"text/csv"},Qe={Accept:"application/pdf"};function Rn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("customers",a)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`customers/${e}`,e,t,s)},get({id:e,expand:t=null,fields:n=null}){const s={expand:t,fields:n};return r.get(`customers/${e}`,s)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`customers/${e}`,t,s)},merge({id:e,targetCustomerId:t}){return r.delete(`customers/${e}?targetCustomerId=${t}`)},getAml({id:e}){return r.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return r.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},updateLeadSource({id:e,data:t}){return r.put(`customers/${e}/lead-source`,t)},deleteLeadSource({id:e}){return r.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`customers/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`customers/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`customers/${e}/timeline/${t}`)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`customers/${e}/upcoming-invoices`,n)},getCustomerEddScore({id:e}){return r.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:t}){return r.patch(`customers/${e}/edd-score`,t)},getEddTimelineCollection({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:t}){return r.post(`customers/${e}/edd-timeline`,t)},getAllEddSearchResults({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.get(`customers/${e}/edd-search-results`,s)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("customers",l)}}}function En({apiHandler:r}){return{create({data:e}){return r.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return r.post("digital-wallets/validation",e)}}}function Sn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("disputes",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`disputes/${e}`,e,t,s)},get({id:e}){return r.get(`disputes/${e}`)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`disputes/${e}`,t,s)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("disputes",l)}}}function kn({apiHandler:r}){return{verify({token:e}){return r.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("email-delivery-settings",o)},create({data:e}){return r.post("email-delivery-settings",e)},get({id:e}){return r.get(`email-delivery-settings/${e}`)},delete({id:e}){return r.delete(`email-delivery-settings/${e}`)},update({id:e,data:t}){return r.patch(`email-delivery-settings/${e}`,t)},resendVerification({id:e}){return r.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Cn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:t,q:n,sort:s,filter:u};return r.getAll("email-messages",o)},create({data:e}){return r.post("email-messages",e)},get({id:e}){return r.get(`email-messages/${e}`)},delete({id:e}){return r.delete(`email-messages/${e}`)},send({id:e,data:t={status:"outbox"}}){return r.patch(`email-messages/${e}`,t)}}}function Tn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("email-notifications",n)}}}function xn({apiHandler:r}){return{getAll(){return r.getAll("events")},get({eventType:e}){return r.get(`events/${e}`)},getRules({eventType:e}){return r.get(`events/${e}/rules`)},createRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},updateRules({eventType:e,data:t}){return r.put(`events/${e}/rules`,t)},getAllTimelineMessages({eventType:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:t}){return r.post(`events/${e}/timeline`,t)},getTimelineMessage({eventType:e,messageId:t}){return r.get(`events/${e}/timeline/${t}`)},deleteTimelineMessage({eventType:e,messageId:t}){return r.delete(`events/${e}/timeline/${t}`)},getRulesHistory({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const g={limit:t,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return r.getAll(`events/${e}/rules/history`,g)},getRulesVersionNumber({eventType:e,version:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/history/${t}`,u)},getRulesVersionDetail({eventType:e,version:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/versions/${t}`,u)},getAllDraftRulesets({eventType:e,limit:t=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const g={limit:t,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return r.getAll(`events/${e}/rules/drafts`,g)},createDraftRuleset({eventType:e,data:t}){return r.post(`events/${e}/rules/drafts`,t)},getDraftRuleset({eventType:e,id:t,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return r.get(`events/${e}/rules/drafts/${t}`,u)},updateDraftRuleset({eventType:e,id:t,data:n}){return r.put(`events/${e}/rules/drafts/${t}`,n)},deleteDraftRuleset({eventType:e,id:t}){return r.delete(`events/${e}/rules/drafts/${t}`)}}}function In({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("fees",n)},create({id:e="",data:t}){return r.create(`fees/${e}`,e,t)},get({id:e}){return r.get(`fees/${e}`)},upsert({id:e,data:t}){return r.put(`fees/${e}`,t)},patch({id:e,data:t}){return r.patch(`fees/${e}`,t)}}}function Pn({apiHandler:r}){return{getAllAttachments({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("attachments",a)},attach({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`attachments/${e}`,e,t,s)},getAttachment({id:e}){return r.get(`attachments/${e}`)},updateAttachment({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`attachments/${e}`,t,s)},detach({id:e}){return r.delete(`attachments/${e}`)},getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:t,filter:n,q:s,expand:u,fields:o,sort:l};return r.getAll("files",a)},upload({fileObject:e}){return r.post("files",e)},get({id:e}){return r.get(`files/${e}`)},update({id:e,data:t}){return r.put(`files/${e}`,t)},delete({id:e}){return r.delete(`files/${e}`)},download({id:e}){const t={responseType:"arraybuffer"};return r.download(`files/${e}/download`,t)},detachAndDelete({id:e}){const t={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(t);n.push(o);const a=(await o).items.map(c=>this.detach({id:c.fields.id}));n=[...n,a],await Promise.all(a);const g=r.delete(`files/${e}`);return n.push(g),g})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:t={description:"",tags:[""]}}){const n=[],u=(async()=>{const o=this.upload({fileObject:e});n.push(o),await o;const l={name:o.name,extension:o.extension,description:t.description,tags:t.tags,url:""},a=this.update({id:o.fields.id,data:l});return n.push(a),a})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u}}}function On({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:t,sort:n,filter:s,q:u,fields:o};return r.getAll("gateway-accounts",l)},create({id:e="",data:t}){return r.create(`gateway-accounts/${e}`,e,t)},get({id:e}){return r.get(`gateway-accounts/${e}`)},update({id:e,data:t}){return r.patch(`gateway-accounts/${e}`,t)},delete({id:e}){return r.delete(`gateway-accounts/${e}`)},close({id:e}){return r.post(`gateway-accounts/${e}/close`)},disable({id:e}){return r.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null}){const o={limit:t,offset:n,filter:s,sort:u};return r.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:t}){return r.post(`gateway-accounts/${e}/downtime-schedules`,t)},getDowntimeSchedule({id:e,downtimeId:t}){return r.get(`gateway-accounts/${e}/downtime-schedules/${t}`)},updateDowntimeSchedule({id:e,downtimeId:t,data:n}){return r.put(`gateway-accounts/${e}/downtime-schedules/${t}`,n)},deleteDowntimeSchedule({id:e,downtimeId:t}){return r.delete(`gateway-accounts/${e}/downtime-schedules/${t}`)},enable({id:e}){return r.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return r.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:t}){return r.get(`gateway-accounts/${e}/limits/${t}`)},updateVolumeLimit({id:e,limitId:t,data:n}){return r.put(`gateway-accounts/${e}/limits/${t}`,n)},deleteVolumeLimit({id:e,limitId:t}){return r.delete(`gateway-accounts/${e}/limits/${t}`)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`gateway-accounts/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`gateway-accounts/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`gateway-accounts/${e}/timeline/${t}`)},checkCredentials({id:e}){return r.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return r.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:t}){return r.put(`gateway-accounts/${e}/financial-settings`,t)}}}function jn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("integrations",n)},get({label:e}){return r.get(`integrations/${e}`)}}}function qn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("invoices",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`invoices/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`invoices/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`invoices/${e}`,t,s)},getAllInvoiceItems({id:e,limit:t=null,offset:n=null,expand:s=null}){const u={limit:t,offset:n,expand:s};return r.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:t}){return r.post(`invoices/${e}/items`,t)},getInvoiceItem({id:e,itemId:t}){return r.get(`invoices/${e}/items/${t}`)},updateInvoiceItem({id:e,itemId:t,data:n}){return r.put(`invoices/${e}/items/${t}`,n)},deleteInvoiceItem({id:e,itemId:t}){return r.delete(`invoices/${e}/items/${t}`)},issue({id:e,data:t}){return r.post(`invoices/${e}/issue`,t)},abandon({id:e}){return r.post(`invoices/${e}/abandon`)},void({id:e}){return r.post(`invoices/${e}/void`)},recalculate({id:e}){return r.post(`invoices/${e}/recalculate`)},reissue({id:e,data:t}){return r.post(`invoices/${e}/reissue`,t)},getAllTransactionAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:t}){return r.post(`invoices/${e}/transaction`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`invoices/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`invoices/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`invoices/${e}/timeline/${t}`)},getAllCreditMemoAllocations({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.getAll(`invoices/${e}/credit-memo-allocations`,s)},getCreditMemoAllocation({id:e,creditMemoId:t,limit:n=null,offset:s=null}){const u={limit:n,offset:s};return r.get(`invoices/${e}/credit-memo-allocations/${t}`,u)},applyCreditMemo({id:e,creditMemoId:t,data:n}){return r.put(`invoices/${e}/credit-memo-allocations/${t}`,n)},deleteCreditMemoAllocation({id:e,creditMemoId:t}){return r.delete(`invoices/${e}/credit-memo-allocations/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("invoices",l)},downloadPDF({id:e}){const t={headers:Qe,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Dn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,expand:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,expand:u};return r.getAll("kyc-documents",o)},create({id:e="",data:t}){return r.create(`kyc-documents/${e}`,e,t)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.put(`kyc-documents/${e}`,t)},accept({id:e}){return r.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:t}){return r.post(`kyc-documents/${e}/matches`,t)},reject({id:e,data:t}){return r.post(`kyc-documents/${e}/rejection`,t)},review({id:e}){return r.post(`kyc-documents/${e}/review`)},startReview({id:e}){return r.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return r.post(`kyc-documents/${e}/stop-review`)}}}function Mn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("kyc-requests",u)},create({data:e}){return r.post("kyc-requests",e)},get({id:e}){return r.get(`kyc-requests/${e}`)},delete({id:e}){return r.delete(`kyc-requests/${e}`)},update({id:e,data:t}){return r.patch(`kyc-requests/${e}`,t)}}}function Nn({apiHandler:r}){return{getKycSettings(){return r.get("kyc-settings")},updateKycSettings({data:e}){return r.put("kyc-settings",e)}}}function Bn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:t,filter:n,sort:s,fields:u,q:o};return r.getAll("lists",l)},create({id:e="",data:t}){return r.create(`lists/${e}`,e,t)},getLatestVersion({id:e}){return r.get(`lists/${e}`)},update({id:e,data:t}){return r.put(`lists/${e}`,t)},delete({id:e}){return r.delete(`lists/${e}`)},getByVersion({id:e,version:t}){return r.get(`lists/${e}/${t}`)}}}function Un({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("memberships",u)},get({organizationId:e,userId:t}){return r.get(`memberships/${e}/${t}`)},update({organizationId:e,userId:t,data:n}){return r.put(`memberships/${e}/${t}`,n)},delete({organizationId:e,userId:t}){return r.delete(`memberships/${e}/${t}`)}}}function Ln({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("organization-exports",o)},create({data:e}){return r.post("organization-exports",e)},get({id:e}){return r.get(`organization-exports/${e}`)}}}function Fn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:t,filter:n,q:s};return r.getAll("organizations",u)},create({data:e}){return r.post("organizations",e)},get({id:e}){return r.get(`organizations/${e}`)},update({id:e,data:t}){return r.patch(`organizations/${e}`,t)}}}function Kn({apiHandler:r}){return{getAll({limit:e=null,q:t=null}={}){const n={limit:e,q:t};return r.getAll("payment-cards-bank-names",n)}}}function zn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("payment-instruments",l)},create({data:e}){return r.post("payment-instruments",e)},get({id:e}){return r.get(`payment-instruments/${e}`)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)}}}function Vn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("payment-methods",n)},get({apiName:e}){return r.get(`payment-methods/${e}`)}}}function _n({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("tokens",n)},create({data:e}){return r.post("tokens",e)},get({token:e}){return r.get(`tokens/${e}`)}}}function Jn({apiHandler:r}){return{create({data:e}){return r.post("payouts",e)}}}function Wn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("plans",o)},create({id:e="",data:t}){return r.create(`plans/${e}`,e,t)},get({id:e}){return r.get(`plans/${e}`)},update({id:e,data:t}){return r.put(`plans/${e}`,t)},delete({id:e}){return r.delete(`plans/${e}`)}}}function Gn({apiHandler:r}){return{sendEmailRuleAction({data:e}){return r.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return r.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return r.post("previews/webhooks",e)},order({data:e}){return r.post("previews/orders",e)}}}function Xn({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",o)},create({id:e="",data:t}){return r.create(`products/${e}`,e,t)},get({id:e}){return r.get(`products/${e}`)},update({id:e,data:t}){return r.put(`products/${e}`,t)},delete({id:e}){return r.delete(`products/${e}`)}}}function Yn({apiHandler:r}){return{startPermissionsEmulation({data:e}){return r.post("permissions-emulation",e)},stopPermissionsEmulation(){return r.delete("permissions-emulation")},get(){return r.get("profile")},update({data:e}){return r.put("profile",e)},getMfa(){return r.get("profile/mfa")},updateMfa(){return r.post("profile/mfa")},deleteMfa(){return r.delete("profile/mfa")},updatePassword({data:e}){return r.post("profile/password",e)},resetTotp(){return r.post("profile/totp-reset")}}}function Qn({apiHandler:r}){return{readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Zn({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:n,sort:s,q:u,expand:o};return r.getAll("roles",l)},create({id:e="",data:t}){return r.create(`roles/${e}`,e,t)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`roles/${e}`,n)},update({id:e,data:t}){return r.put(`roles/${e}`,t)},delete({id:e}){return r.delete(`roles/${e}`)}}}function Hn({apiHandler:r}){return{get({sort:e=null,limit:t=null,offset:n=null,q:s=null}){const u={sort:e,limit:t,offset:n,q:s};return r.get("search",u)}}}function es({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("grid-segments",o)},create({id:e="",data:t}){return r.create(`grid-segments/${e}`,e,t)},get({id:e}){return r.get(`grid-segments/${e}`)},update({id:e,data:t}){return r.put(`grid-segments/${e}`,t)},delete({id:e}){return r.delete(`grid-segments/${e}`)}}}function ts({apiHandler:r}){return{getAll({eventType:e}){return r.getAll(`send-through-attribution/${e}`)}}}function rs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:t,filter:n,sort:s,q:u};return r.getAll("shipping-rates",o)},create({id:e="",data:t}){return r.create(`shipping-rates/${e}`,e,t)},get({id:e}){return r.get(`shipping-rates/${e}`)},update({id:e,data:t}){return r.put(`shipping-rates/${e}`,t)},delete({id:e}){return r.delete(`shipping-rates/${e}`)}}}function ns({apiHandler:r}){return{get(){return r.get("status")}}}function ss({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-cancellations",u)},create({id:e="",data:t}){return r.create(`subscription-cancellations/${e}`,e,t)},get({id:e}){return r.get(`subscription-cancellations/${e}`)},delete({id:e}){return r.delete(`subscription-cancellations/${e}`)},patch({id:e,data:t}){return r.patch(`subscription-cancellations/${e}`,t)}}}function us({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-pauses",u)},pause({id:e="",data:t}){return r.create(`subscription-pauses/${e}`,e,t)},get({id:e}){return r.get(`subscription-pauses/${e}`)},update({id:e,data:t}){return r.put(`subscription-pauses/${e}`,t)},delete({id:e}){return r.delete(`subscription-pauses/${e}`)}}}function os({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:t,filter:n,sort:s};return r.getAll("subscription-reactivations",u)},reactivate({data:e}){return r.post("subscription-reactivations",e)},get({id:e}){return r.get(`subscription-reactivations/${e}`)}}}function ls({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("subscriptions",l)},create({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`subscriptions/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`subscriptions/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`subscriptions/${e}`,t,s)},delete({id:e}){return r.delete(`subscriptions/${e}`)},void({id:e}){return r.post(`subscriptions/${e}/void`)},changeItems({id:e,data:t}){return r.post(`subscriptions/${e}/change-items`,t)},createInterimInvoice({id:e,data:t}){return r.post(`subscriptions/${e}/interim-invoice`,t)},getAllUpcomingInvoices({id:e,expand:t=null}){const n={expand:t};return r.getAll(`subscriptions/${e}/upcoming-invoices`,n)},issueUpcomingInvoice({id:e,invoiceId:t,data:n}){return r.post(`subscriptions/${e}/upcoming-invoices/${t}/issue`,n)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:t,offset:n,filter:s,sort:u,q:o};return r.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:t}){return r.post(`subscriptions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`subscriptions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`subscriptions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("subscriptions",l)}}}function is({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("tags",o)},create({data:e}){return r.post("tags",e)},get({tag:e}){return r.get(`tags/${e}`)},delete({tag:e}){return r.delete(`tags/${e}`)},update({tag:e,data:t}){return r.patch(`tags/${e}`,t)},tagCustomers({tag:e,data:t}){return r.post(`tags/${e}/customers`,t)},untagCustomers({tag:e,data:t}){return r.delete(`tags/${e}/customers`,t)},tagCustomer({tag:e,customerId:t}){return r.post(`tags/${e}/customers/${t}`)},untagCustomer({tag:e,customerId:t}){return r.delete(`tags/${e}/customers/${t}`)},tagKycDocuments({tag:e,data:t}){return r.post(`tags/${e}/kyc-documents`,t)},untagKycDocuments({tag:e,data:t}){return r.delete(`tags/${e}/kyc-documents`,t)},tagKycDocument({tag:e,kycDocumentId:t}){return r.post(`tags/${e}/kyc-documents/${t}`)},untagKycDocument({tag:e,kycDocumentId:t}){return r.delete(`tags/${e}/kyc-documents/${t}`)}}}function cs({apiHandler:r}){return{getAllApiLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/api",o)},getApiLog({id:e}){return r.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return r.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return r.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:t,sort:n,filter:s,q:u},headers:D};return r.download("tracking/api",o)}}}function as({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:t,filter:n,q:s,sort:u,expand:o};return r.getAll("transactions",l)},create({data:e,expand:t=null}){const n={expand:t};return r.post("transactions",e,n)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`transactions/${e}`,n)},patch({id:e,data:t}){return r.patch(`transactions/${e}`,t)},query({id:e}){return r.post(`transactions/${e}/query`)},update({id:e,data:t}){return r.post(`transactions/${e}/update`,t)},refund({id:e,data:t}){return r.post(`transactions/${e}/refund`,t)},getAllTimelineMessages({id:e,limit:t=null,offset:n=null,filter:s=null}){const u={limit:t,offset:n,filter:s};return r.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:t}){return r.post(`transactions/${e}/timeline`,t)},getTimelineMessage({id:e,messageId:t}){return r.get(`transactions/${e}/timeline/${t}`)},deleteTimelineMessage({id:e,messageId:t}){return r.delete(`transactions/${e}/timeline/${t}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("transactions",l)}}}function ms({apiHandler:r}){return{getResetPasswordToken({token:e}){return r.get(`reset-password/${e}`)},resetPassword({token:e,data:t}){return r.post(`reset-password/${e}`,t)},getAll({limit:e=null,offset:t=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:t,sort:n,filter:s,q:u};return r.getAll("users",o)},create({id:e="",data:t}){return r.create(`users/${e}`,e,t)},get({id:e}){return r.get(`users/${e}`)},update({id:e,data:t}){return r.put(`users/${e}`,t)},getMfa({id:e}){return r.get(`users/${e}/mfa`)},updatePassword({id:e,data:t}){return r.post(`users/${e}/password`,t)},resetTotp({id:e}){return r.post(`users/${e}/totp-reset`)}}}function fs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null}={}){const s={limit:e,offset:t,filter:n};return r.getAll("webhooks",s)},create({id:e="",data:t}){return r.create(`webhooks/${e}`,e,t)},get({id:e}){return r.get(`webhooks/${e}`)},update({id:e,data:t}){return r.put(`webhooks/${e}`,t)}}}function gs({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,q:n=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:t,q:n,filter:s,sort:u};return r.getAll("websites",o)},create({id:e="",data:t}){return r.create(`websites/${e}`,e,t)},get({id:e}){return r.get(`websites/${e}`)},update({id:e,data:t}){return r.put(`websites/${e}`,t)},delete({id:e}){return r.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:t,sort:n,expand:s,filter:u,q:o},headers:D};return r.download("websites",l)}}}class hs{constructor({apiHandler:e}){this.account=on({apiHandler:e}),this.aml=ln({apiHandler:e}),this.apiKeys=cn({apiHandler:e}),this.applicationInstances=an({apiHandler:e}),this.applications=mn({apiHandler:e}),this.balanceTransactions=fn({apiHandler:e}),this.billingPortals=gn({apiHandler:e}),this.blocklists=hn({apiHandler:e}),this.broadcastMessages=pn({apiHandler:e}),this.checkoutForms=dn({apiHandler:e}),this.coupons=$n({apiHandler:e}),this.credentialHashes=yn({apiHandler:e}),this.creditMemos=bn({apiHandler:e}),this.customDomains=An({apiHandler:e}),this.customFields=vn({apiHandler:e}),this.customerAuthentication=wn({apiHandler:e}),this.customers=Rn({apiHandler:e}),this.digitalWallets=En({apiHandler:e}),this.disputes=Sn({apiHandler:e}),this.emailDeliverySettings=kn({apiHandler:e}),this.emailMessages=Cn({apiHandler:e}),this.emailNotifications=Tn({apiHandler:e}),this.events=xn({apiHandler:e}),this.fees=In({apiHandler:e}),this.files=Pn({apiHandler:e}),this.gatewayAccounts=On({apiHandler:e}),this.integrations=jn({apiHandler:e}),this.invoices=qn({apiHandler:e}),this.kycDocuments=Dn({apiHandler:e}),this.kycRequests=Mn({apiHandler:e}),this.kycSettings=Nn({apiHandler:e}),this.lists=Bn({apiHandler:e}),this.memberships=Un({apiHandler:e}),this.organizationExports=Ln({apiHandler:e}),this.organizations=Fn({apiHandler:e}),this.paymentCardsBankNames=Kn({apiHandler:e}),this.paymentInstruments=zn({apiHandler:e}),this.paymentMethods=Vn({apiHandler:e}),this.paymentTokens=_n({apiHandler:e}),this.payouts=Jn({apiHandler:e}),this.plans=Wn({apiHandler:e}),this.previews=Gn({apiHandler:e}),this.products=Xn({apiHandler:e}),this.profile=Yn({apiHandler:e}),this.purchase=Qn({apiHandler:e}),this.roles=Zn({apiHandler:e}),this.search=Hn({apiHandler:e}),this.segments=es({apiHandler:e}),this.sendThroughAttribution=ts({apiHandler:e}),this.shippingRates=rs({apiHandler:e}),this.status=ns({apiHandler:e}),this.subscriptionCancellations=ss({apiHandler:e}),this.subscriptionPauses=us({apiHandler:e}),this.subscriptionReactivations=os({apiHandler:e}),this.subscriptions=ls({apiHandler:e}),this.tags=is({apiHandler:e}),this.tracking=cs({apiHandler:e}),this.transactions=as({apiHandler:e}),this.users=ms({apiHandler:e}),this.webhooks=fs({apiHandler:e}),this.websites=gs({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 ps({apiHandler:r}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return r.get(`customers/${e}/summary-metrics`)}}}function ds({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,sort:n=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:t,sort:n,expand:s,filter:u,q:o,criteria:l};return r.getAll("data-exports",a)},queue({id:e="",data:t,expand:n=null}){const s={expand:n};return r.create(`data-exports/${e}`,e,t,s)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`data-exports/${e}`,n)},update({id:e,data:t,expand:n=null}){const s={expand:n};return r.put(`data-exports/${e}`,t,s)},delete({id:e}){return r.delete(`data-exports/${e}`)}}}function $s({apiHandler:r}){return{getTransactionHistogramReport({periodStart:e,periodEnd:t,aggregationField:n,aggregationPeriod:s,metric:u,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,aggregationPeriod:s,metric:u,filter:o};return r.get("histograms/transactions",l)}}}function ys({apiHandler:r}){return{getApiLogSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:t,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:t,metrics:n,segments:s};return r.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:t,limit:n=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:t,limit:n,offset:s,filter:u};return r.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const o={periodStart:t,periodEnd:n,limit:s,offset:u};return r.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/future-renewals",u)},getJournal({currency:e,bookedFrom:t=null,bookedTo:n=null,recognizedAt:s,aggregationField:u,limit:o=null,offset:l=null,filter:a=null}){const g={currency:e,bookedFrom:t,bookedTo:n,recognizedAt:s,aggregationField:u,limit:o,offset:l,filter:a};return r.get("reports/journal",g)},getKycAcceptanceSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:t}){const n={periodStart:e,periodEnd:t};return r.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null}){const o={currency:e,periodStart:t,periodEnd:n,limit:s,offset:u};return r.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:g=null}){const c={aggregationField:e,aggregationPeriod:t,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:o,offset:l,filter:a,criteria:g};return r.get("reports/retention-percentage",c)},getRetentionValue({aggregationField:e,aggregationPeriod:t,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:g=null,sort:c=null,criteria:h=null}){const w={aggregationField:e,aggregationPeriod:t,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:a,filter:g,sort:c,criteria:h};return r.get("reports/retention-value",w)},getRevenueWaterfall({currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:t,issuedTo:n,recognizedTo:s};return r.get("reports/revenue-waterfall",u)},getRevenueAudit({filter:e=null,sort:t=null,limit:n=null,offset:s=null}){const u={filter:e,sort:t,limit:n,offset:s};return r.get("reports/revenue-audit",u)},getSubscriptionCancellation({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:o};return r.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:t,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:t,limit:n,offset:s};return r.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:t,periodStart:n,periodEnd:s}){const u={type:e,subaggregate:t,periodStart:n,periodEnd:s};return r.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:t,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:t,periodEnd:n,limit:s,offset:u,filter:o};return r.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:t,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:t,aggregationField:n,limit:s,offset:u,filter:o};return r.get("reports/transactions",l)}}}function bs({apiHandler:r}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return r.get(`subscriptions/${e}/summary-metrics`)}}}function As({apiHandler:r}){return{getActivityFeed({eventTypes:e=null,limit:t=1e3,offset:n=0}){const s={eventTypes:e,limit:t,offset:n};return r.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:t=null,limit:n=1e3,offset:s=0}){const u={eventTypes:t,limit:n,offset:s};return r.getAll(`customers/${e}/timeline`,u)}}}function vs({apiHandler:r}){return{query(){return r.get("location")}}}const M={CustomersResource:ps,DataExportsResource:ds,HistogramsResource:$s,ReportsResource:ys,SubscriptionsResource:bs,TimelinesResource:As,LocationResource:vs};class ws{constructor({apiHandler:e}){this.customers=M.CustomersResource({apiHandler:e}),this.dataExports=M.DataExportsResource({apiHandler:e}),this.histograms=M.HistogramsResource({apiHandler:e}),this.reports=M.ReportsResource({apiHandler:e}),this.subscriptions=M.SubscriptionsResource({apiHandler:e}),this.timelines=M.TimelinesResource({apiHandler:e}),this.location=M.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 Rs({apiHandler:r}){return{get(){return r.get("account")},update({data:e}){return r.patch("account",e)},requestPasswordReset({data:e}){return r.post("account/forgot-password",e)},changePassword({data:e}){return r.patch("account/password",e)},resendEmailVerification({data:e}){return r.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:t}){return r.post(`account/reset-password/${e}`,t)},verifyEmail({token:e}){return r.post(`account/verification/${e}`)},register({data:e}){return r.post("register",e)}}}function Es({apiHandler:r}){return{login({data:e}){return r.post("login",e)},logout(){return r.post("logout")}}}function Ss({apiHandler:r}){return{get({slug:e}){return r.get(`billing-portals/${e}`)}}}function ks({apiHandler:r}){return{get({id:e}){return r.get(`checkout-forms/${e}`)}}}function Cs({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("invoices",o)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`invoices/${e}`,n)},downloadPDF({id:e}){const t={headers:Qe,responseType:"arraybuffer"};return r.download(`invoices/${e}`,t)}}}function Ts({apiHandler:r}){return{getAll({limit:e=null,offset:t=null}={}){const n={limit:e,offset:t};return r.getAll("kyc-documents",n)},create({data:e}){return r.post("kyc-documents",e)},get({id:e}){return r.get(`kyc-documents/${e}`)},update({id:e,data:t}){return r.patch(`kyc-documents/${e}`,t)}}}function xs({apiHandler:r}){return{get({id:e,expand:t=null}){const n={expand:t};return r.get(`kyc-requests/${e}`,n)}}}function Is({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("orders",o)},get({id:e}){return r.get(`orders/${e}`)},update({id:e,data:t}){return r.patch(`orders/${e}`,t)},cancel({id:e,data:t}){return r.post(`orders/${e}/cancellation`,t)}}}function Ps({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("payment-instruments",o)},create({data:e}){return r.post("payment-instruments",e)},get({id:e,limit:t=null,offset:n=null}){const s={limit:t,offset:n};return r.get(`payment-instruments/${e}`,s)},update({id:e,data:t}){return r.patch(`payment-instruments/${e}`,t)},deactivate({id:e}){return r.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return r.get(`payment-instruments/${e}/setup`)},setup({id:e,data:t}){return r.post(`payment-instruments/${e}/setup`,t)}}}function Os({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:t,limit:n,offset:s,q:u,expand:o};return r.getAll("plans",l)},get({id:e,expand:t=null}){const n={expand:t};return r.get(`plans/${e}`,n)}}}function js({apiHandler:r}){return{getAll({filter:e=null,sort:t=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:t,limit:n,offset:s,q:u};return r.getAll("products",o)},get({id:e}){return r.get(`products/${e}`)}}}function qs({apiHandler:r}){return{payment({data:e}){return r.post("payment",e)},purchase({data:e}){return r.post("purchase",e)},preview({data:e}){return r.post("preview-purchase",e)},readyToPay({data:e}){return r.post("ready-to-pay",e)}}}function Ds({apiHandler:r}){return{getAll({limit:e=null,offset:t=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:t,filter:n,q:s,sort:u};return r.getAll("transactions",o)},get({id:e}){return r.get(`transactions/${e}`)},update({id:e,data:t}){return r.patch(`transactions/${e}`,t)}}}function Ms({apiHandler:r}){return{get({id:e}){return r.get(`websites/${e}`)}}}class Ns{constructor({apiHandler:e}){this.account=Rs({apiHandler:e}),this.authorization=Es({apiHandler:e}),this.billingPortals=Ss({apiHandler:e}),this.checkoutForms=ks({apiHandler:e}),this.invoices=Cs({apiHandler:e}),this.kycDocuments=Ts({apiHandler:e}),this.kycRequests=xs({apiHandler:e}),this.orders=Is({apiHandler:e}),this.paymentInstruments=Ps({apiHandler:e}),this.plans=Os({apiHandler:e}),this.products=js({apiHandler:e}),this.purchase=qs({apiHandler:e}),this.transactions=Ds({apiHandler:e}),this.websites=Ms({apiHandler:e}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=e.addRequestInterceptor,this.removeRequestInterceptor=e.removeRequestInterceptor,this.addResponseInterceptor=e.addResponseInterceptor,this.removeResponseInterceptor=e.removeResponseInterceptor,this.setTimeout=e.setTimeout,this.setProxyAgent=e.setProxyAgent,this.setSessionToken=e.setSessionToken,this.setPublishableKey=e.setPublishableKey,this.setEndpoints=e.setEndpoints,this.getCancellationToken=e.getCancellationToken,this.generateSignature=e.generateSignature}}function Bs({apiHandler:r}){return new hs({apiHandler:r})}function Us({apiHandler:r}){return new ws({apiHandler:r})}function Ls({apiHandler:r}){return new Ns({apiHandler:r})}const ye={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},be=6e3;function Ze({apiKey:r=null,sandbox:e=!1,timeout:t=be,organizationId:n=null,urls:s=ye}={}){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=$e({options:{apiEndpoints:s,apiKey:r,apiVersion:"",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Bs({apiHandler:o})}function Fs({apiKey:r=null,sandbox:e=!1,timeout:t=be,organizationId:n=null,urls:s=ye}={}){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=$e({options:{apiEndpoints:s,apiKey:r,apiVersion:"experimental",isSandbox:e,requestTimeout:t,jwt:null,organizationId:n}});return Us({apiHandler:o})}function Ks({publishableKey:r=null,jwt:e=null,sandbox:t=!1,timeout:n=be,organizationId:s=null,urls:u=ye}={}){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:r,jwt:e,apiVersion:"storefront",isSandbox:t,requestTimeout:n,organizationId:s},l=$e({options:o});return l.setSessionToken(o.jwt),Ls({apiHandler:l})}d.RebillyAPI=Ze,d.RebillyErrors=S,d.RebillyExperimentalAPI=Fs,d.RebillyStorefrontAPI=Ks,d.cancellation=un,d.default=Ze,Object.defineProperties(d,{__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.13.1",
3
+ "version": "47.13.2",
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",