rebilly-js-sdk 47.9.0 → 47.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1636,6 +1636,18 @@ declare module rebilly {
1636
1636
  type DeleteWebsiteResponse = operations['DeleteWebsite']['responses']['204']
1637
1637
  type DeleteWebsiteResponsePromise = Promise<{fields: DeleteWebsiteResponse}>
1638
1638
 
1639
+ type GetOrganizationExportCollectionRequest = operations['GetOrganizationExportCollection']['parameters']["query"] & (operations['GetOrganizationExportCollection']['parameters'] extends {path: {}} ? operations['GetOrganizationExportCollection']['parameters']["path"] : {})
1640
+
1641
+ type GetOrganizationExportCollectionResponse = operations['GetOrganizationExportCollection']['responses']['200']['content']['application/json'][0]
1642
+ type GetOrganizationExportCollectionResponsePromise = Promise<{ items: {fields: GetOrganizationExportCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1643
+ type PostOrganizationExportResponse = operations['PostOrganizationExport']['responses']['201']['content']['application/json']
1644
+ type PostOrganizationExportResponsePromise = Promise<{fields: PostOrganizationExportResponse}>
1645
+
1646
+ type GetOrganizationExportRequest = { id : String }
1647
+
1648
+ type GetOrganizationExportResponse = operations['GetOrganizationExport']['responses']['200']['content']['application/json']
1649
+ type GetOrganizationExportResponsePromise = Promise<{fields: GetOrganizationExportResponse}>
1650
+
1639
1651
 
1640
1652
  type StorefrontGetAccountResponse = operations['StorefrontGetAccount']['responses']['200']['content']['application/json']
1641
1653
  type StorefrontGetAccountResponsePromise = Promise<{fields: StorefrontGetAccountResponse}>
@@ -1702,8 +1714,8 @@ declare module rebilly {
1702
1714
  type StorefrontPatchKycDocumentResponse = operations['StorefrontPatchKycDocument']['responses']['200']['content']['application/json']
1703
1715
  type StorefrontPatchKycDocumentResponsePromise = Promise<{fields: StorefrontPatchKycDocumentResponse}>
1704
1716
 
1705
- type StorefrontGetKycRequestRequest = { id : String }
1706
-
1717
+ type StorefrontGetKycRequestRequest = operations['StorefrontGetKycRequest']['parameters'] & { id : String }
1718
+
1707
1719
  type StorefrontGetKycRequestResponse = operations['StorefrontGetKycRequest']['responses']['200']['content']['application/json']
1708
1720
  type StorefrontGetKycRequestResponsePromise = Promise<{fields: StorefrontGetKycRequestResponse}>
1709
1721
 
@@ -1772,8 +1784,8 @@ declare module rebilly {
1772
1784
  type StorefrontGetPlanCollectionResponse = operations['StorefrontGetPlanCollection']['responses']['200']['content']['application/json'][0]
1773
1785
  type StorefrontGetPlanCollectionResponsePromise = Promise<{ items: {fields: StorefrontGetPlanCollectionResponse}[], getJSON: object, total?: number, offset?: number, limit?: number }>
1774
1786
 
1775
- type StorefrontGetPlanRequest = { id : String }
1776
-
1787
+ type StorefrontGetPlanRequest = operations['StorefrontGetPlan']['parameters'] & { id : String }
1788
+
1777
1789
  type StorefrontGetPlanResponse = operations['StorefrontGetPlan']['responses']['200']['content']['application/json']
1778
1790
  type StorefrontGetPlanResponsePromise = Promise<{fields: StorefrontGetPlanResponse}>
1779
1791
 
@@ -4582,6 +4594,7 @@ export interface coreComponents {
4582
4594
  | "PaymentsOS"
4583
4595
  | "Paymero"
4584
4596
  | "PayPal"
4597
+ | "Payper"
4585
4598
  | "Payr"
4586
4599
  | "Paysafe"
4587
4600
  | "Paysafecard"
@@ -4849,6 +4862,7 @@ export interface coreComponents {
4849
4862
  | "Paymero"
4850
4863
  | "Paynetics"
4851
4864
  | "PayPal"
4865
+ | "Payper"
4852
4866
  | "Payr"
4853
4867
  | "PayTabs"
4854
4868
  | "PayULatam"
@@ -5604,6 +5618,13 @@ export interface coreComponents {
5604
5618
  token: string;
5605
5619
  };
5606
5620
  };
5621
+ /** BlueSnap 3DS Servers. */
5622
+ BlueSnap3dsServers: {
5623
+ name: "ThreeDSecureIO3dsServer";
5624
+ };
5625
+ /** ThreeDSecureIO3dsServer. */
5626
+ BlueSnapThreeDSecureIOServer: coreComponents["schemas"]["BlueSnap3dsServers"] &
5627
+ coreComponents["schemas"]["ThreeDSecureIO3dsServer"];
5607
5628
  /** BlueSnap config. */
5608
5629
  BlueSnap: coreComponents["schemas"]["GatewayAccount"] & {
5609
5630
  /** BlueSnap credentials object. */
@@ -5623,6 +5644,7 @@ export interface coreComponents {
5623
5644
  /** The Rebilly custom field to use for sending transaction metadata. */
5624
5645
  metadataCustomField?: string;
5625
5646
  };
5647
+ threeDSecureServer?: coreComponents["schemas"]["BlueSnap3dsServers"];
5626
5648
  };
5627
5649
  /** BraintreePayments Gateway config. */
5628
5650
  BraintreePayments: coreComponents["schemas"]["GatewayAccount"] & {
@@ -9385,9 +9407,7 @@ export interface coreComponents {
9385
9407
  shippingAmount: number;
9386
9408
  /** The (invoice's) tax amount to credit. */
9387
9409
  taxAmount: number;
9388
- /** The (invoice's) discount amount to credit. */
9389
- discountAmount: number;
9390
- /** The sum of all credits in the credit memo (items, shipping, tax, discount). */
9410
+ /** The sum of all credits in the credit memo (items, shipping, tax). */
9391
9411
  totalAmount: number;
9392
9412
  /** The amount of `totalAmount` which hasn't been allocated anywhere yet. */
9393
9413
  unusedAmount: number;
@@ -18170,6 +18190,22 @@ export interface usersPaths {
18170
18190
  };
18171
18191
  };
18172
18192
  };
18193
+ "/organization-exports": {
18194
+ /** Retrieve a list of organization data exports. */
18195
+ get: operations["GetOrganizationExportCollection"];
18196
+ /** Request an organization data export. */
18197
+ post: operations["PostOrganizationExport"];
18198
+ };
18199
+ "/organization-exports/{id}": {
18200
+ /** Retrieve an organization data export request. */
18201
+ get: operations["GetOrganizationExport"];
18202
+ parameters: {
18203
+ path: {
18204
+ /** The resource identifier string. */
18205
+ id: usersComponents["parameters"]["resourceId"];
18206
+ };
18207
+ };
18208
+ };
18173
18209
  }
18174
18210
 
18175
18211
  export interface usersComponents {
@@ -18879,6 +18915,7 @@ export interface usersComponents {
18879
18915
  | "PaymentsOS"
18880
18916
  | "Paymero"
18881
18917
  | "PayPal"
18918
+ | "Payper"
18882
18919
  | "Payr"
18883
18920
  | "Paysafe"
18884
18921
  | "Paysafecard"
@@ -19146,6 +19183,7 @@ export interface usersComponents {
19146
19183
  | "Paymero"
19147
19184
  | "Paynetics"
19148
19185
  | "PayPal"
19186
+ | "Payper"
19149
19187
  | "Payr"
19150
19188
  | "PayTabs"
19151
19189
  | "PayULatam"
@@ -19901,6 +19939,13 @@ export interface usersComponents {
19901
19939
  token: string;
19902
19940
  };
19903
19941
  };
19942
+ /** BlueSnap 3DS Servers. */
19943
+ BlueSnap3dsServers: {
19944
+ name: "ThreeDSecureIO3dsServer";
19945
+ };
19946
+ /** ThreeDSecureIO3dsServer. */
19947
+ BlueSnapThreeDSecureIOServer: usersComponents["schemas"]["BlueSnap3dsServers"] &
19948
+ usersComponents["schemas"]["ThreeDSecureIO3dsServer"];
19904
19949
  /** BlueSnap config. */
19905
19950
  BlueSnap: usersComponents["schemas"]["GatewayAccount"] & {
19906
19951
  /** BlueSnap credentials object. */
@@ -19920,6 +19965,7 @@ export interface usersComponents {
19920
19965
  /** The Rebilly custom field to use for sending transaction metadata. */
19921
19966
  metadataCustomField?: string;
19922
19967
  };
19968
+ threeDSecureServer?: usersComponents["schemas"]["BlueSnap3dsServers"];
19923
19969
  };
19924
19970
  /** BraintreePayments Gateway config. */
19925
19971
  BraintreePayments: usersComponents["schemas"]["GatewayAccount"] & {
@@ -25628,6 +25674,55 @@ export interface usersComponents {
25628
25674
  _links?: (Partial<usersComponents["schemas"]["SelfLink"]> &
25629
25675
  Partial<usersComponents["schemas"]["OrganizationLink"]>)[];
25630
25676
  };
25677
+ LinkSignedLink: usersComponents["schemas"]["Link"] & {
25678
+ /** The link type. */
25679
+ rel: "signedLink";
25680
+ };
25681
+ OrganizationExportResource: {
25682
+ /** Exported resource. */
25683
+ name?:
25684
+ | "customers"
25685
+ | "users"
25686
+ | "payment-instruments"
25687
+ | "invoices"
25688
+ | "orders"
25689
+ | "transactions"
25690
+ | "disputes"
25691
+ | "gateway-accounts"
25692
+ | "webhooks"
25693
+ | "webhooks-tracking"
25694
+ | "blocklists"
25695
+ | "lists";
25696
+ /** Number of exported resources. */
25697
+ recordCount?: number;
25698
+ };
25699
+ OrganizationExport: {
25700
+ id?: usersComponents["schemas"]["ResourceId"];
25701
+ /** ID of the user who requested the organization data export. */
25702
+ userId?: string;
25703
+ /** Linked File object id. */
25704
+ fileId?: string | null;
25705
+ /** Status of organization data export request. */
25706
+ status?:
25707
+ | "pending"
25708
+ | "processing"
25709
+ | "completed"
25710
+ | "queued"
25711
+ | "failed"
25712
+ | "expired";
25713
+ /** Organization data export resources array. */
25714
+ items?: usersComponents["schemas"]["OrganizationExportResource"][];
25715
+ /** Time at which the organization data export was requested. */
25716
+ createdTime?: usersComponents["schemas"]["ServerTimestamp"];
25717
+ /** Time at which the organization data export is updated. */
25718
+ updatedTime?: usersComponents["schemas"]["ServerTimestamp"];
25719
+ /** Retention end date. After this date, files will be removed. */
25720
+ retentionTime?: string | null;
25721
+ /** Links related to the resource. */
25722
+ _links?: (Partial<usersComponents["schemas"]["LinkSelf"]> &
25723
+ Partial<usersComponents["schemas"]["LinkUser"]> &
25724
+ Partial<usersComponents["schemas"]["LinkSignedLink"]>)[];
25725
+ };
25631
25726
  ApplicationLink: usersComponents["schemas"]["Link"] & {
25632
25727
  /** The link type. */
25633
25728
  rel: "application";
@@ -30535,6 +30630,72 @@ export interface operations {
30535
30630
  409: usersComponents["responses"]["Conflict"];
30536
30631
  };
30537
30632
  };
30633
+ /** Retrieve a list of organization data exports. */
30634
+ GetOrganizationExportCollection: {
30635
+ parameters: {
30636
+ query: {
30637
+ /** The collection items limit. */
30638
+ limit?: usersComponents["parameters"]["collectionLimit"];
30639
+ /** The collection items offset. */
30640
+ offset?: usersComponents["parameters"]["collectionOffset"];
30641
+ /**
30642
+ * The collection items filter requires a special format.
30643
+ * Use "," for multiple allowed values. Use ";" for multiple fields.
30644
+ * See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format.
30645
+ */
30646
+ filter?: usersComponents["parameters"]["collectionFilter"];
30647
+ /** The partial search of the text fields. */
30648
+ q?: usersComponents["parameters"]["collectionQuery"];
30649
+ /** The collection items sort field and order (prefix with "-" for descending sort). */
30650
+ sort?: usersComponents["parameters"]["collectionSort"];
30651
+ };
30652
+ };
30653
+ responses: {
30654
+ /** A list of organization data exports is successfully retrieved. */
30655
+ 200: {
30656
+ headers: {};
30657
+ content: {
30658
+ "application/json": usersComponents["schemas"]["OrganizationExport"][];
30659
+ };
30660
+ };
30661
+ 401: usersComponents["responses"]["Unauthorized"];
30662
+ 403: usersComponents["responses"]["Forbidden"];
30663
+ };
30664
+ };
30665
+ /** Request an organization data export. */
30666
+ PostOrganizationExport: {
30667
+ responses: {
30668
+ /** Organization data export request received. */
30669
+ 201: {
30670
+ content: {
30671
+ "application/json": usersComponents["schemas"]["OrganizationExport"];
30672
+ };
30673
+ };
30674
+ 401: usersComponents["responses"]["Unauthorized"];
30675
+ 403: usersComponents["responses"]["Forbidden"];
30676
+ 422: usersComponents["responses"]["ValidationError"];
30677
+ };
30678
+ };
30679
+ /** Retrieve an organization data export request. */
30680
+ GetOrganizationExport: {
30681
+ parameters: {
30682
+ path: {
30683
+ /** The resource identifier string. */
30684
+ id: usersComponents["parameters"]["resourceId"];
30685
+ };
30686
+ };
30687
+ responses: {
30688
+ /** Organization data export request. */
30689
+ 200: {
30690
+ content: {
30691
+ "application/json": usersComponents["schemas"]["OrganizationExport"];
30692
+ };
30693
+ };
30694
+ 401: usersComponents["responses"]["Unauthorized"];
30695
+ 403: usersComponents["responses"]["Forbidden"];
30696
+ 404: usersComponents["responses"]["NotFound"];
30697
+ };
30698
+ };
30538
30699
  }
30539
30700
  /**
30540
30701
  * This file was auto-generated by openapi-typescript.
@@ -31285,6 +31446,7 @@ export interface storefrontComponents {
31285
31446
  | "PaymentsOS"
31286
31447
  | "Paymero"
31287
31448
  | "PayPal"
31449
+ | "Payper"
31288
31450
  | "Payr"
31289
31451
  | "Paysafe"
31290
31452
  | "Paysafecard"
@@ -33353,11 +33515,15 @@ export interface storefrontComponents {
33353
33515
  /** The links related to resource. */
33354
33516
  _links?: Partial<storefrontComponents["schemas"]["SelfLink"]>[];
33355
33517
  };
33356
- StorefrontPlan: storefrontComponents["schemas"]["CommonPlan"] & {
33518
+ StorefrontProduct: storefrontComponents["schemas"]["CommonProduct"] & {
33357
33519
  /** The links related to resource. */
33358
33520
  _links?: Partial<storefrontComponents["schemas"]["SelfLink"]>[];
33359
33521
  };
33360
- StorefrontProduct: storefrontComponents["schemas"]["CommonProduct"] & {
33522
+ StorefrontPlan: storefrontComponents["schemas"]["CommonPlan"] & {
33523
+ /** Any embedded objects available that are requested by the `expand` querystring parameter. */
33524
+ _embedded?: {
33525
+ product?: storefrontComponents["schemas"]["StorefrontProduct"];
33526
+ };
33361
33527
  /** The links related to resource. */
33362
33528
  _links?: Partial<storefrontComponents["schemas"]["SelfLink"]>[];
33363
33529
  };
@@ -33451,6 +33617,12 @@ export interface storefrontComponents {
33451
33617
  collectionFilter: string;
33452
33618
  /** The partial search of the text fields. */
33453
33619
  collectionQuery: string;
33620
+ /**
33621
+ * Expand a response to get a full related object included inside of the `_embedded` path in the response.
33622
+ * It accepts a comma-separated list of objects to expand.
33623
+ * See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info.
33624
+ */
33625
+ collectionExpand: string;
33454
33626
  /** The collection items sort field and order (prefix with "-" for descending sort). */
33455
33627
  collectionSort: string[];
33456
33628
  /** The resource identifier string. */
@@ -33916,6 +34088,14 @@ export interface operations {
33916
34088
  /** The resource identifier string. */
33917
34089
  id: storefrontComponents["parameters"]["resourceId"];
33918
34090
  };
34091
+ query: {
34092
+ /**
34093
+ * Expand a response to get a full related object included inside of the `_embedded` path in the response.
34094
+ * It accepts a comma-separated list of objects to expand.
34095
+ * See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info.
34096
+ */
34097
+ expand?: storefrontComponents["parameters"]["collectionExpand"];
34098
+ };
33919
34099
  };
33920
34100
  responses: {
33921
34101
  /** KYC request was retrieved successfully. */
@@ -34279,6 +34459,12 @@ export interface operations {
34279
34459
  offset?: storefrontComponents["parameters"]["collectionOffset"];
34280
34460
  /** The partial search of the text fields. */
34281
34461
  q?: storefrontComponents["parameters"]["collectionQuery"];
34462
+ /**
34463
+ * Expand a response to get a full related object included inside of the `_embedded` path in the response.
34464
+ * It accepts a comma-separated list of objects to expand.
34465
+ * See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info.
34466
+ */
34467
+ expand?: storefrontComponents["parameters"]["collectionExpand"];
34282
34468
  };
34283
34469
  };
34284
34470
  responses: {
@@ -34300,6 +34486,14 @@ export interface operations {
34300
34486
  /** The resource identifier string. */
34301
34487
  id: storefrontComponents["parameters"]["resourceId"];
34302
34488
  };
34489
+ query: {
34490
+ /**
34491
+ * Expand a response to get a full related object included inside of the `_embedded` path in the response.
34492
+ * It accepts a comma-separated list of objects to expand.
34493
+ * See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info.
34494
+ */
34495
+ expand?: storefrontComponents["parameters"]["collectionExpand"];
34496
+ };
34303
34497
  };
34304
34498
  responses: {
34305
34499
  /** Plan was retrieved successfully. */
@@ -34847,15 +35041,6 @@ export interface reportsComponents {
34847
35041
  /** The partial search of the text fields. */
34848
35042
  q?: string;
34849
35043
  };
34850
- /** The date range (can be in relative formats). If omitted, all time will be included. See the [Date Range guide](https://docs-reconciliation.rebilly.com/getting-started/date-range) for more options and examples. */
34851
- dateRange?: {
34852
- /** Any valid datetime arguments including [relative datetime arguments](http://php.net/manual/en/datetime.formats.php). */
34853
- start: string;
34854
- /** Any valid datetime arguments including [relative datetime arguments](http://php.net/manual/en/datetime.formats.php). */
34855
- end: string;
34856
- /** The field to apply date range to. */
34857
- field?: string;
34858
- };
34859
35044
  /** List of emails to be notified when export is completed. */
34860
35045
  emailNotification?: string[];
34861
35046
  /** List of fields to include in the export. See supporting documentation for more info. If omitted, default fields will be included. */
@@ -34885,33 +35070,42 @@ export interface reportsComponents {
34885
35070
  Partial<reportsComponents["schemas"]["LinkFileDownload"]> &
34886
35071
  Partial<reportsComponents["schemas"]["LinkSignedLink"]>)[];
34887
35072
  };
35073
+ /** The date range (can be in relative formats). If omitted, all time will be included. See the [Date Range guide](https://docs-reconciliation.rebilly.com/getting-started/date-range) for more options and examples. */
35074
+ DataExportDateRange: {
35075
+ /** Any valid datetime arguments including [relative datetime arguments](http://php.net/manual/en/datetime.formats.php). */
35076
+ start: string;
35077
+ /** Any valid datetime arguments including [relative datetime arguments](http://php.net/manual/en/datetime.formats.php). */
35078
+ end: string;
35079
+ /** The field to apply date range to. */
35080
+ field?: string;
35081
+ };
34888
35082
  /** Customers resource type to export. */
34889
35083
  customers: reportsComponents["schemas"]["DataExport"] & {
34890
- dateRange?: {
35084
+ dateRange?: reportsComponents["schemas"]["DataExportDateRange"] & {
34891
35085
  field: string;
34892
35086
  };
34893
35087
  };
34894
35088
  /** Orders resource type to export. */
34895
35089
  subscriptions: reportsComponents["schemas"]["DataExport"] & {
34896
- dateRange?: {
35090
+ dateRange?: reportsComponents["schemas"]["DataExportDateRange"] & {
34897
35091
  field: string;
34898
35092
  };
34899
35093
  };
34900
35094
  /** Transactions resource type to export. */
34901
35095
  transactions: reportsComponents["schemas"]["DataExport"] & {
34902
- dateRange?: {
35096
+ dateRange?: reportsComponents["schemas"]["DataExportDateRange"] & {
34903
35097
  field: string;
34904
35098
  };
34905
35099
  };
34906
35100
  /** Invoices resource type to export. */
34907
35101
  invoices: reportsComponents["schemas"]["DataExport"] & {
34908
- dateRange?: {
35102
+ dateRange?: reportsComponents["schemas"]["DataExportDateRange"] & {
34909
35103
  field: string;
34910
35104
  };
34911
35105
  };
34912
35106
  /** Invoice items resource type to export. */
34913
35107
  invoiceItems: reportsComponents["schemas"]["DataExport"] & {
34914
- dateRange?: {
35108
+ dateRange?: reportsComponents["schemas"]["DataExportDateRange"] & {
34915
35109
  field: string;
34916
35110
  };
34917
35111
  };
@@ -37708,6 +37902,17 @@ declare module "resources/memberships-resource" {
37708
37902
  }): any;
37709
37903
  };
37710
37904
  }
37905
+ declare module "resources/organization-exports-resource" {
37906
+ export default function OrganizationExportsResource({ apiHandler }: {
37907
+ apiHandler: any;
37908
+ }): {
37909
+ getAll({ limit, offset, filter, q, sort, }?: rebilly.GetOrganizationExportCollectionRequest): rebilly.GetOrganizationExportCollectionResponsePromise;
37910
+ create(): any;
37911
+ get({ id }: {
37912
+ id: any;
37913
+ }): rebilly.GetOrganizationExportResponsePromise;
37914
+ };
37915
+ }
37711
37916
  declare module "resources/organizations-resource" {
37712
37917
  export default function OrganizationsResource({ apiHandler }: {
37713
37918
  apiHandler: any;
@@ -39403,6 +39608,19 @@ declare module "resources/api-instance" {
39403
39608
  userId: any;
39404
39609
  }): any;
39405
39610
  };
39611
+ organizationExports: {
39612
+ getAll({ limit, offset, filter, q, sort, }?: {
39613
+ limit?: number;
39614
+ offset?: number;
39615
+ filter?: string;
39616
+ q?: string;
39617
+ sort?: string[];
39618
+ }): rebilly.GetOrganizationExportCollectionResponsePromise;
39619
+ create(): any;
39620
+ get({ id }: {
39621
+ id: any;
39622
+ }): rebilly.GetOrganizationExportResponsePromise;
39623
+ };
39406
39624
  organizations: {
39407
39625
  getAll({ limit, offset, filter, q }?: {
39408
39626
  limit?: number;
@@ -40530,8 +40748,9 @@ declare module "resources/storefront/kyc-requests-resource" {
40530
40748
  export default function KycRequestsResource({ apiHandler }: {
40531
40749
  apiHandler: any;
40532
40750
  }): {
40533
- get({ id }: {
40751
+ get({ id, expand }: {
40534
40752
  id: any;
40753
+ expand?: any;
40535
40754
  }): rebilly.StorefrontGetKycRequestResponsePromise;
40536
40755
  };
40537
40756
  }
@@ -40586,9 +40805,10 @@ declare module "resources/storefront/plans-resource" {
40586
40805
  export default function PlansResource({ apiHandler }: {
40587
40806
  apiHandler: any;
40588
40807
  }): {
40589
- getAll({ filter, sort, limit, offset, q, }?: rebilly.StorefrontGetPlanCollectionRequest): rebilly.StorefrontGetPlanCollectionResponsePromise;
40590
- get({ id }: {
40808
+ getAll({ filter, sort, limit, offset, q, expand, }?: rebilly.StorefrontGetPlanCollectionRequest): rebilly.StorefrontGetPlanCollectionResponsePromise;
40809
+ get({ id, expand }: {
40591
40810
  id: any;
40811
+ expand?: any;
40592
40812
  }): rebilly.StorefrontGetPlanResponsePromise;
40593
40813
  };
40594
40814
  }
@@ -40721,8 +40941,9 @@ declare module "resources/storefront/storefront-api-instance" {
40721
40941
  }): any;
40722
40942
  };
40723
40943
  kycRequests: {
40724
- get({ id }: {
40944
+ get({ id, expand }: {
40725
40945
  id: any;
40946
+ expand?: any;
40726
40947
  }): rebilly.StorefrontGetKycRequestResponsePromise;
40727
40948
  };
40728
40949
  orders: {
@@ -40777,15 +40998,17 @@ declare module "resources/storefront/storefront-api-instance" {
40777
40998
  }): any;
40778
40999
  };
40779
41000
  plans: {
40780
- getAll({ filter, sort, limit, offset, q, }?: {
41001
+ getAll({ filter, sort, limit, offset, q, expand, }?: {
40781
41002
  filter?: string;
40782
41003
  sort?: string[];
40783
41004
  limit?: number;
40784
41005
  offset?: number;
40785
41006
  q?: string;
41007
+ expand?: string;
40786
41008
  }): rebilly.StorefrontGetPlanCollectionResponsePromise;
40787
- get({ id }: {
41009
+ get({ id, expand }: {
40788
41010
  id: any;
41011
+ expand?: any;
40789
41012
  }): rebilly.StorefrontGetPlanResponsePromise;
40790
41013
  };
40791
41014
  products: {
@@ -1583,7 +1583,7 @@ function cloneArrayDeep(arr, instanceClone) {
1583
1583
  return res;
1584
1584
  }
1585
1585
  var cloneDeep_1 = cloneDeep;
1586
- const version = "47.9.0";
1586
+ const version = "47.11.1";
1587
1587
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1588
1588
  let nanoid = (size = 21) => {
1589
1589
  let id = "";
@@ -3236,6 +3236,26 @@ function MembershipsResource({ apiHandler }) {
3236
3236
  }
3237
3237
  };
3238
3238
  }
3239
+ function OrganizationExportsResource({ apiHandler }) {
3240
+ return {
3241
+ getAll({
3242
+ limit = null,
3243
+ offset = null,
3244
+ filter = null,
3245
+ q = null,
3246
+ sort = null
3247
+ } = {}) {
3248
+ const params = { limit, offset, filter, q, sort };
3249
+ return apiHandler.getAll(`organization-exports`, params);
3250
+ },
3251
+ create() {
3252
+ return apiHandler.post(`organization-exports`);
3253
+ },
3254
+ get({ id }) {
3255
+ return apiHandler.get(`organization-exports/${id}`);
3256
+ }
3257
+ };
3258
+ }
3239
3259
  function OrganizationsResource({ apiHandler }) {
3240
3260
  return {
3241
3261
  getAll({ limit = null, offset = null, filter = null, q = null } = {}) {
@@ -3986,6 +4006,7 @@ class ApiInstance {
3986
4006
  this.kycSettings = KycSettingsResource({ apiHandler });
3987
4007
  this.lists = ListsResource({ apiHandler });
3988
4008
  this.memberships = MembershipsResource({ apiHandler });
4009
+ this.organizationExports = OrganizationExportsResource({ apiHandler });
3989
4010
  this.organizations = OrganizationsResource({ apiHandler });
3990
4011
  this.paymentCardsBankNames = PaymentCardsBankNamesResource({ apiHandler });
3991
4012
  this.paymentInstruments = PaymentInstrumentsResource$1({ apiHandler });
@@ -4495,8 +4516,9 @@ function KycDocumentsResource({ apiHandler }) {
4495
4516
  }
4496
4517
  function KycRequestsResource({ apiHandler }) {
4497
4518
  return {
4498
- get({ id }) {
4499
- return apiHandler.get(`kyc-requests/${id}`);
4519
+ get({ id, expand = null }) {
4520
+ const params = { expand };
4521
+ return apiHandler.get(`kyc-requests/${id}`, params);
4500
4522
  }
4501
4523
  };
4502
4524
  }
@@ -4563,13 +4585,15 @@ function PlansResource({ apiHandler }) {
4563
4585
  sort = null,
4564
4586
  limit = null,
4565
4587
  offset = null,
4566
- q = null
4588
+ q = null,
4589
+ expand = null
4567
4590
  } = {}) {
4568
- const params = { filter, sort, limit, offset, q };
4591
+ const params = { filter, sort, limit, offset, q, expand };
4569
4592
  return apiHandler.getAll(`plans`, params);
4570
4593
  },
4571
- get({ id }) {
4572
- return apiHandler.get(`plans/${id}`);
4594
+ get({ id, expand = null }) {
4595
+ const params = { expand };
4596
+ return apiHandler.get(`plans/${id}`, params);
4573
4597
  }
4574
4598
  };
4575
4599
  }
@@ -1,5 +1,5 @@
1
- var Ys=Object.defineProperty;var ut=Object.getOwnPropertySymbols;var Qs=Object.prototype.hasOwnProperty,Zs=Object.prototype.propertyIsEnumerable;var Ae=(d,p,A)=>p in d?Ys(d,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):d[p]=A,J=(d,p)=>{for(var A in p||(p={}))Qs.call(p,A)&&Ae(d,A,p[A]);if(ut)for(var A of ut(p))Zs.call(p,A)&&Ae(d,A,p[A]);return d};var ve=(d,p,A)=>(Ae(d,typeof p!="symbol"?p+"":p,A),A);(function(d,p){typeof exports=="object"&&typeof module!="undefined"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(d=typeof globalThis!="undefined"?globalThis:d||self,p(d["rebilly-js-sdk"]={}))})(this,function(d){"use strict";var p={exports:{}},A=function(e,r){return function(){for(var s=new Array(arguments.length),u=0;u<s.length;u++)s[u]=arguments[u];return e.apply(r,s)}},ot=A,I=Object.prototype.toString;function se(t){return Array.isArray(t)}function ue(t){return typeof t=="undefined"}function lt(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function we(t){return I.call(t)==="[object ArrayBuffer]"}function it(t){return I.call(t)==="[object FormData]"}function ct(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&we(t.buffer),e}function at(t){return typeof t=="string"}function mt(t){return typeof t=="number"}function Re(t){return t!==null&&typeof t=="object"}function W(t){if(I.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ft(t){return I.call(t)==="[object Date]"}function gt(t){return I.call(t)==="[object File]"}function ht(t){return I.call(t)==="[object Blob]"}function Ee(t){return I.call(t)==="[object Function]"}function pt(t){return Re(t)&&Ee(t.pipe)}function dt(t){return I.call(t)==="[object URLSearchParams]"}function $t(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function yt(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function oe(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),se(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(null,t[s],s,t)}function le(){var t={};function e(s,u){W(t[u])&&W(s)?t[u]=le(t[u],s):W(s)?t[u]=le({},s):se(s)?t[u]=s.slice():t[u]=s}for(var r=0,n=arguments.length;r<n;r++)oe(arguments[r],e);return t}function bt(t,e,r){return oe(e,function(s,u){r&&typeof s=="function"?t[u]=ot(s,r):t[u]=s}),t}function At(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var v={isArray:se,isArrayBuffer:we,isBuffer:lt,isFormData:it,isArrayBufferView:ct,isString:at,isNumber:mt,isObject:Re,isPlainObject:W,isUndefined:ue,isDate:ft,isFile:gt,isBlob:ht,isFunction:Ee,isStream:pt,isURLSearchParams:dt,isStandardBrowserEnv:yt,forEach:oe,merge:le,extend:bt,trim:$t,stripBOM:At},N=v;function Se(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ke=function(e,r,n){if(!r)return e;var s;if(n)s=n(r);else if(N.isURLSearchParams(r))s=r.toString();else{var u=[];N.forEach(r,function(a,h){a===null||typeof a=="undefined"||(N.isArray(a)?h=h+"[]":a=[a],N.forEach(a,function(g){N.isDate(g)?g=g.toISOString():N.isObject(g)&&(g=JSON.stringify(g)),u.push(Se(h)+"="+Se(g))}))}),s=u.join("&")}if(s){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e},vt=v;function G(){this.handlers=[]}G.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},G.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},G.prototype.forEach=function(e){vt.forEach(this.handlers,function(n){n!==null&&e(n)})};var wt=G,Rt=v,Et=function(e,r){Rt.forEach(e,function(s,u){u!==r&&u.toUpperCase()===r.toUpperCase()&&(e[r]=s,delete e[u])})},Ce=function(e,r,n,s,u){return e.config=r,n&&(e.code=n),e.request=s,e.response=u,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},Te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},St=Ce,xe=function(e,r,n,s,u){var o=new Error(e);return St(o,r,n,s,u)},kt=xe,Ct=function(e,r,n){var s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):r(kt("Request failed with status code "+n.status,n.config,null,n.request,n))},X=v,Tt=X.isStandardBrowserEnv()?function(){return{write:function(r,n,s,u,o,l){var a=[];a.push(r+"="+encodeURIComponent(n)),X.isNumber(s)&&a.push("expires="+new Date(s).toGMTString()),X.isString(u)&&a.push("path="+u),X.isString(o)&&a.push("domain="+o),l===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),xt=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},It=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},Pt=xt,Ot=It,jt=function(e,r){return e&&!Pt(r)?Ot(e,r):r},ie=v,qt=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Dt=function(e){var r={},n,s,u;return e&&ie.forEach(e.split(`
2
- `),function(l){if(u=l.indexOf(":"),n=ie.trim(l.substr(0,u)).toLowerCase(),s=ie.trim(l.substr(u+1)),n){if(r[n]&&qt.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([s]):r[n]=r[n]?r[n]+", "+s:s}}),r},Ie=v,Mt=Ie.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function s(u){var o=u;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(o){var l=Ie.isString(o)?s(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();function ce(t){this.message=t}ce.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ce.prototype.__CANCEL__=!0;var Y=ce,Q=v,Nt=Ct,Bt=Tt,Ut=ke,Lt=jt,Ft=Dt,Kt=Mt,ae=xe,Vt=Te,zt=Y,Pe=function(e){return new Promise(function(n,s){var u=e.data,o=e.headers,l=e.responseType,a;function h(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Q.isFormData(u)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(g+":"+w)}var b=Lt(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ut(b,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function V(){if(!!c){var E="getAllResponseHeaders"in c?Ft(c.getAllResponseHeaders()):null,P=!l||l==="text"||l==="json"?c.responseText:c.response,T={data:P,status:c.status,statusText:c.statusText,headers:E,config:e,request:c};Nt(function(z){n(z),h()},function(z){s(z),h()},T),c=null}}if("onloadend"in c?c.onloadend=V:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(V)},c.onabort=function(){!c||(s(ae("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){s(ae("Network Error",e,null,c)),c=null},c.ontimeout=function(){var P=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",T=e.transitional||Vt;e.timeoutErrorMessage&&(P=e.timeoutErrorMessage),s(ae(P,e,T.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Q.isStandardBrowserEnv()){var ne=(e.withCredentials||Kt(b))&&e.xsrfCookieName?Bt.read(e.xsrfCookieName):void 0;ne&&(o[e.xsrfHeaderName]=ne)}"setRequestHeader"in c&&Q.forEach(o,function(P,T){typeof u=="undefined"&&T.toLowerCase()==="content-type"?delete o[T]:c.setRequestHeader(T,P)}),Q.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(a=function(E){!c||(s(!E||E&&E.type?new zt("canceled"):E),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a))),u||(u=null),c.send(u)})},y=v,Oe=Et,_t=Ce,Jt=Te,Wt={"Content-Type":"application/x-www-form-urlencoded"};function je(t,e){!y.isUndefined(t)&&y.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Gt(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=Pe),t}function Xt(t,e,r){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Z={transitional:Jt,adapter:Gt(),transformRequest:[function(e,r){return Oe(r,"Accept"),Oe(r,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)?e:y.isArrayBufferView(e)?e.buffer:y.isURLSearchParams(e)?(je(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)||r&&r["Content-Type"]==="application/json"?(je(r,"application/json"),Xt(e)):e}],transformResponse:[function(e){var r=this.transitional||Z.transitional,n=r&&r.silentJSONParsing,s=r&&r.forcedJSONParsing,u=!n&&this.responseType==="json";if(u||s&&y.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(u)throw o.name==="SyntaxError"?_t(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],function(e){Z.headers[e]={}}),y.forEach(["post","put","patch"],function(e){Z.headers[e]=y.merge(Wt)});var me=Z,Yt=v,Qt=me,Zt=function(e,r,n){var s=this||Qt;return Yt.forEach(n,function(o){e=o.call(s,e,r)}),e},qe=function(e){return!!(e&&e.__CANCEL__)},De=v,fe=Zt,Ht=qe,er=me,tr=Y;function ge(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new tr("canceled")}var rr=function(e){ge(e),e.headers=e.headers||{},e.data=fe.call(e,e.data,e.headers,e.transformRequest),e.headers=De.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),De.forEach(["delete","get","head","post","put","patch","common"],function(s){delete e.headers[s]});var r=e.adapter||er.adapter;return r(e).then(function(s){return ge(e),s.data=fe.call(e,s.data,s.headers,e.transformResponse),s},function(s){return Ht(s)||(ge(e),s&&s.response&&(s.response.data=fe.call(e,s.response.data,s.response.headers,e.transformResponse))),Promise.reject(s)})},R=v,Me=function(e,r){r=r||{};var n={};function s(c,g){return R.isPlainObject(c)&&R.isPlainObject(g)?R.merge(c,g):R.isPlainObject(g)?R.merge({},g):R.isArray(g)?g.slice():g}function u(c){if(R.isUndefined(r[c])){if(!R.isUndefined(e[c]))return s(void 0,e[c])}else return s(e[c],r[c])}function o(c){if(!R.isUndefined(r[c]))return s(void 0,r[c])}function l(c){if(R.isUndefined(r[c])){if(!R.isUndefined(e[c]))return s(void 0,e[c])}else return s(void 0,r[c])}function a(c){if(c in r)return s(e[c],r[c]);if(c in e)return s(void 0,e[c])}var h={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a};return R.forEach(Object.keys(e).concat(Object.keys(r)),function(g){var w=h[g]||u,b=w(g);R.isUndefined(b)&&w!==a||(n[g]=b)}),n},Ne={version:"0.26.1"},nr=Ne.version,he={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){he[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Be={};he.transitional=function(e,r,n){function s(u,o){return"[Axios v"+nr+"] Transitional option '"+u+"'"+o+(n?". "+n:"")}return function(u,o,l){if(e===!1)throw new Error(s(o," has been removed"+(r?" in "+r:"")));return r&&!Be[o]&&(Be[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(u,o,l):!0}};function sr(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),s=n.length;s-- >0;){var u=n[s],o=e[u];if(o){var l=t[u],a=l===void 0||o(l,u,t);if(a!==!0)throw new TypeError("option "+u+" must be "+a);continue}if(r!==!0)throw Error("Unknown option "+u)}}var ur={assertOptions:sr,validators:he},Ue=v,or=ke,Le=wt,Fe=rr,H=Me,Ke=ur,B=Ke.validators;function F(t){this.defaults=t,this.interceptors={request:new Le,response:new Le}}F.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=H(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Ke.assertOptions(n,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1);var s=[],u=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(u=u&&b.synchronous,s.unshift(b.fulfilled,b.rejected))});var o=[];this.interceptors.response.forEach(function(b){o.push(b.fulfilled,b.rejected)});var l;if(!u){var a=[Fe,void 0];for(Array.prototype.unshift.apply(a,s),a=a.concat(o),l=Promise.resolve(r);a.length;)l=l.then(a.shift(),a.shift());return l}for(var h=r;s.length;){var c=s.shift(),g=s.shift();try{h=c(h)}catch(w){g(w);break}}try{l=Fe(h)}catch(w){return Promise.reject(w)}for(;o.length;)l=l.then(o.shift(),o.shift());return l},F.prototype.getUri=function(e){return e=H(this.defaults,e),or(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ue.forEach(["delete","get","head","options"],function(e){F.prototype[e]=function(r,n){return this.request(H(n||{},{method:e,url:r,data:(n||{}).data}))}}),Ue.forEach(["post","put","patch"],function(e){F.prototype[e]=function(r,n,s){return this.request(H(s||{},{method:e,url:r,data:n}))}});var lr=F,ir=Y;function U(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(s){e=s});var r=this;this.promise.then(function(n){if(!!r._listeners){var s,u=r._listeners.length;for(s=0;s<u;s++)r._listeners[s](n);r._listeners=null}}),this.promise.then=function(n){var s,u=new Promise(function(o){r.subscribe(o),s=o}).then(n);return u.cancel=function(){r.unsubscribe(s)},u},t(function(s){r.reason||(r.reason=new ir(s),e(r.reason))})}U.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},U.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},U.prototype.unsubscribe=function(e){if(!!this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}},U.source=function(){var e,r=new U(function(s){e=s});return{token:r,cancel:e}};var cr=U,ar=function(e){return function(n){return e.apply(null,n)}},mr=v,fr=function(e){return mr.isObject(e)&&e.isAxiosError===!0},Ve=v,gr=A,ee=lr,hr=Me,pr=me;function ze(t){var e=new ee(t),r=gr(ee.prototype.request,e);return Ve.extend(r,ee.prototype,e),Ve.extend(r,e),r.create=function(s){return ze(hr(t,s))},r}var k=ze(pr);k.Axios=ee,k.Cancel=Y,k.CancelToken=cr,k.isCancel=qe,k.VERSION=Ne.version,k.all=function(e){return Promise.all(e)},k.spread=ar,k.isAxiosError=fr,p.exports=k,p.exports.default=k;var pe=p.exports;function te(t,{exclude:e=[]}={}){Object.freeze(t);const r=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(n=>{(r?n!=="caller"&&n!=="callee"&&n!=="arguments":!0)&&t[n]!==null&&!e.includes(n)&&(typeof t[n]=="object"||typeof t[n]=="function")&&!Object.isFrozen(t[n])&&te(t[n],{exclude:e})}),t}class _e{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.response={status:r,statusText:n,headers:s},this.fields=J({},e),this.config=u,te(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const Je={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class dr{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(Je).forEach(o=>{const l=s[Je[o]];this[o]=l?Number(l):null}),this.response={status:r,statusText:n,headers:s},this.items=e.map(o=>new _e({data:o,status:r,statusText:n,headers:s})),this.config=u,te(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class $r{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.response={status:r,statusText:n,headers:s},this.data=e,this.config=u}}class C extends Error{constructor({error:e,name:r=null}){let{config:n=null,response:s=null,request:u=null,message:o=null}=e,l=o||"Request Error";s&&s.data&&s.data.error&&(l=s.data.error);super(l);this.name=r||"RebillyError",this.response=s,this.request=u,this.config=n,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}}class yr extends C{constructor(e){super({error:e,name:"RebillyRequestError"})}}class br extends C{constructor(e){super({error:e,name:"RebillyValidationError"})}}class Ar extends C{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class vr extends C{constructor(e){super({error:e,name:"RebillyConflictError"})}}class wr extends C{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class Rr extends C{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class Er extends C{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class Sr extends C{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const S={RebillyError:C,RebillyRequestError:yr,RebillyValidationError:br,RebillyNotFoundError:Ar,RebillyConflictError:vr,RebillyForbiddenError:wr,RebillyMethodNotAllowedError:Rr,RebillyTimeoutError:Er,RebillyCanceledError:Sr};/*!
1
+ var Qs=Object.defineProperty;var ut=Object.getOwnPropertySymbols;var Zs=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable;var Ae=(d,p,A)=>p in d?Qs(d,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):d[p]=A,J=(d,p)=>{for(var A in p||(p={}))Zs.call(p,A)&&Ae(d,A,p[A]);if(ut)for(var A of ut(p))Hs.call(p,A)&&Ae(d,A,p[A]);return d};var ve=(d,p,A)=>(Ae(d,typeof p!="symbol"?p+"":p,A),A);(function(d,p){typeof exports=="object"&&typeof module!="undefined"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(d=typeof globalThis!="undefined"?globalThis:d||self,p(d["rebilly-js-sdk"]={}))})(this,function(d){"use strict";var p={exports:{}},A=function(e,r){return function(){for(var s=new Array(arguments.length),u=0;u<s.length;u++)s[u]=arguments[u];return e.apply(r,s)}},ot=A,I=Object.prototype.toString;function se(t){return Array.isArray(t)}function ue(t){return typeof t=="undefined"}function lt(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function we(t){return I.call(t)==="[object ArrayBuffer]"}function it(t){return I.call(t)==="[object FormData]"}function ct(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&we(t.buffer),e}function at(t){return typeof t=="string"}function mt(t){return typeof t=="number"}function Re(t){return t!==null&&typeof t=="object"}function W(t){if(I.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ft(t){return I.call(t)==="[object Date]"}function gt(t){return I.call(t)==="[object File]"}function ht(t){return I.call(t)==="[object Blob]"}function Ee(t){return I.call(t)==="[object Function]"}function pt(t){return Re(t)&&Ee(t.pipe)}function dt(t){return I.call(t)==="[object URLSearchParams]"}function $t(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function yt(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function oe(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),se(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(null,t[s],s,t)}function le(){var t={};function e(s,u){W(t[u])&&W(s)?t[u]=le(t[u],s):W(s)?t[u]=le({},s):se(s)?t[u]=s.slice():t[u]=s}for(var r=0,n=arguments.length;r<n;r++)oe(arguments[r],e);return t}function bt(t,e,r){return oe(e,function(s,u){r&&typeof s=="function"?t[u]=ot(s,r):t[u]=s}),t}function At(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var v={isArray:se,isArrayBuffer:we,isBuffer:lt,isFormData:it,isArrayBufferView:ct,isString:at,isNumber:mt,isObject:Re,isPlainObject:W,isUndefined:ue,isDate:ft,isFile:gt,isBlob:ht,isFunction:Ee,isStream:pt,isURLSearchParams:dt,isStandardBrowserEnv:yt,forEach:oe,merge:le,extend:bt,trim:$t,stripBOM:At},N=v;function Se(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ke=function(e,r,n){if(!r)return e;var s;if(n)s=n(r);else if(N.isURLSearchParams(r))s=r.toString();else{var u=[];N.forEach(r,function(a,h){a===null||typeof a=="undefined"||(N.isArray(a)?h=h+"[]":a=[a],N.forEach(a,function(g){N.isDate(g)?g=g.toISOString():N.isObject(g)&&(g=JSON.stringify(g)),u.push(Se(h)+"="+Se(g))}))}),s=u.join("&")}if(s){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e},vt=v;function G(){this.handlers=[]}G.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},G.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},G.prototype.forEach=function(e){vt.forEach(this.handlers,function(n){n!==null&&e(n)})};var wt=G,Rt=v,Et=function(e,r){Rt.forEach(e,function(s,u){u!==r&&u.toUpperCase()===r.toUpperCase()&&(e[r]=s,delete e[u])})},Ce=function(e,r,n,s,u){return e.config=r,n&&(e.code=n),e.request=s,e.response=u,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},Te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},St=Ce,xe=function(e,r,n,s,u){var o=new Error(e);return St(o,r,n,s,u)},kt=xe,Ct=function(e,r,n){var s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):r(kt("Request failed with status code "+n.status,n.config,null,n.request,n))},X=v,Tt=X.isStandardBrowserEnv()?function(){return{write:function(r,n,s,u,o,l){var a=[];a.push(r+"="+encodeURIComponent(n)),X.isNumber(s)&&a.push("expires="+new Date(s).toGMTString()),X.isString(u)&&a.push("path="+u),X.isString(o)&&a.push("domain="+o),l===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),xt=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},It=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},Pt=xt,Ot=It,jt=function(e,r){return e&&!Pt(r)?Ot(e,r):r},ie=v,qt=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Dt=function(e){var r={},n,s,u;return e&&ie.forEach(e.split(`
2
+ `),function(l){if(u=l.indexOf(":"),n=ie.trim(l.substr(0,u)).toLowerCase(),s=ie.trim(l.substr(u+1)),n){if(r[n]&&qt.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([s]):r[n]=r[n]?r[n]+", "+s:s}}),r},Ie=v,Mt=Ie.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function s(u){var o=u;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(o){var l=Ie.isString(o)?s(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();function ce(t){this.message=t}ce.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ce.prototype.__CANCEL__=!0;var Y=ce,Q=v,Nt=Ct,Bt=Tt,Ut=ke,Lt=jt,Ft=Dt,Kt=Mt,ae=xe,zt=Te,Vt=Y,Pe=function(e){return new Promise(function(n,s){var u=e.data,o=e.headers,l=e.responseType,a;function h(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Q.isFormData(u)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(g+":"+w)}var b=Lt(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ut(b,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function z(){if(!!c){var E="getAllResponseHeaders"in c?Ft(c.getAllResponseHeaders()):null,P=!l||l==="text"||l==="json"?c.responseText:c.response,T={data:P,status:c.status,statusText:c.statusText,headers:E,config:e,request:c};Nt(function(V){n(V),h()},function(V){s(V),h()},T),c=null}}if("onloadend"in c?c.onloadend=z:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(z)},c.onabort=function(){!c||(s(ae("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){s(ae("Network Error",e,null,c)),c=null},c.ontimeout=function(){var P=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",T=e.transitional||zt;e.timeoutErrorMessage&&(P=e.timeoutErrorMessage),s(ae(P,e,T.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Q.isStandardBrowserEnv()){var ne=(e.withCredentials||Kt(b))&&e.xsrfCookieName?Bt.read(e.xsrfCookieName):void 0;ne&&(o[e.xsrfHeaderName]=ne)}"setRequestHeader"in c&&Q.forEach(o,function(P,T){typeof u=="undefined"&&T.toLowerCase()==="content-type"?delete o[T]:c.setRequestHeader(T,P)}),Q.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(a=function(E){!c||(s(!E||E&&E.type?new Vt("canceled"):E),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a))),u||(u=null),c.send(u)})},y=v,Oe=Et,_t=Ce,Jt=Te,Wt={"Content-Type":"application/x-www-form-urlencoded"};function je(t,e){!y.isUndefined(t)&&y.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Gt(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=Pe),t}function Xt(t,e,r){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Z={transitional:Jt,adapter:Gt(),transformRequest:[function(e,r){return Oe(r,"Accept"),Oe(r,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)?e:y.isArrayBufferView(e)?e.buffer:y.isURLSearchParams(e)?(je(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)||r&&r["Content-Type"]==="application/json"?(je(r,"application/json"),Xt(e)):e}],transformResponse:[function(e){var r=this.transitional||Z.transitional,n=r&&r.silentJSONParsing,s=r&&r.forcedJSONParsing,u=!n&&this.responseType==="json";if(u||s&&y.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(u)throw o.name==="SyntaxError"?_t(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],function(e){Z.headers[e]={}}),y.forEach(["post","put","patch"],function(e){Z.headers[e]=y.merge(Wt)});var me=Z,Yt=v,Qt=me,Zt=function(e,r,n){var s=this||Qt;return Yt.forEach(n,function(o){e=o.call(s,e,r)}),e},qe=function(e){return!!(e&&e.__CANCEL__)},De=v,fe=Zt,Ht=qe,er=me,tr=Y;function ge(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new tr("canceled")}var rr=function(e){ge(e),e.headers=e.headers||{},e.data=fe.call(e,e.data,e.headers,e.transformRequest),e.headers=De.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),De.forEach(["delete","get","head","post","put","patch","common"],function(s){delete e.headers[s]});var r=e.adapter||er.adapter;return r(e).then(function(s){return ge(e),s.data=fe.call(e,s.data,s.headers,e.transformResponse),s},function(s){return Ht(s)||(ge(e),s&&s.response&&(s.response.data=fe.call(e,s.response.data,s.response.headers,e.transformResponse))),Promise.reject(s)})},R=v,Me=function(e,r){r=r||{};var n={};function s(c,g){return R.isPlainObject(c)&&R.isPlainObject(g)?R.merge(c,g):R.isPlainObject(g)?R.merge({},g):R.isArray(g)?g.slice():g}function u(c){if(R.isUndefined(r[c])){if(!R.isUndefined(e[c]))return s(void 0,e[c])}else return s(e[c],r[c])}function o(c){if(!R.isUndefined(r[c]))return s(void 0,r[c])}function l(c){if(R.isUndefined(r[c])){if(!R.isUndefined(e[c]))return s(void 0,e[c])}else return s(void 0,r[c])}function a(c){if(c in r)return s(e[c],r[c]);if(c in e)return s(void 0,e[c])}var h={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a};return R.forEach(Object.keys(e).concat(Object.keys(r)),function(g){var w=h[g]||u,b=w(g);R.isUndefined(b)&&w!==a||(n[g]=b)}),n},Ne={version:"0.26.1"},nr=Ne.version,he={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){he[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Be={};he.transitional=function(e,r,n){function s(u,o){return"[Axios v"+nr+"] Transitional option '"+u+"'"+o+(n?". "+n:"")}return function(u,o,l){if(e===!1)throw new Error(s(o," has been removed"+(r?" in "+r:"")));return r&&!Be[o]&&(Be[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(u,o,l):!0}};function sr(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),s=n.length;s-- >0;){var u=n[s],o=e[u];if(o){var l=t[u],a=l===void 0||o(l,u,t);if(a!==!0)throw new TypeError("option "+u+" must be "+a);continue}if(r!==!0)throw Error("Unknown option "+u)}}var ur={assertOptions:sr,validators:he},Ue=v,or=ke,Le=wt,Fe=rr,H=Me,Ke=ur,B=Ke.validators;function F(t){this.defaults=t,this.interceptors={request:new Le,response:new Le}}F.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=H(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Ke.assertOptions(n,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1);var s=[],u=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(u=u&&b.synchronous,s.unshift(b.fulfilled,b.rejected))});var o=[];this.interceptors.response.forEach(function(b){o.push(b.fulfilled,b.rejected)});var l;if(!u){var a=[Fe,void 0];for(Array.prototype.unshift.apply(a,s),a=a.concat(o),l=Promise.resolve(r);a.length;)l=l.then(a.shift(),a.shift());return l}for(var h=r;s.length;){var c=s.shift(),g=s.shift();try{h=c(h)}catch(w){g(w);break}}try{l=Fe(h)}catch(w){return Promise.reject(w)}for(;o.length;)l=l.then(o.shift(),o.shift());return l},F.prototype.getUri=function(e){return e=H(this.defaults,e),or(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ue.forEach(["delete","get","head","options"],function(e){F.prototype[e]=function(r,n){return this.request(H(n||{},{method:e,url:r,data:(n||{}).data}))}}),Ue.forEach(["post","put","patch"],function(e){F.prototype[e]=function(r,n,s){return this.request(H(s||{},{method:e,url:r,data:n}))}});var lr=F,ir=Y;function U(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(s){e=s});var r=this;this.promise.then(function(n){if(!!r._listeners){var s,u=r._listeners.length;for(s=0;s<u;s++)r._listeners[s](n);r._listeners=null}}),this.promise.then=function(n){var s,u=new Promise(function(o){r.subscribe(o),s=o}).then(n);return u.cancel=function(){r.unsubscribe(s)},u},t(function(s){r.reason||(r.reason=new ir(s),e(r.reason))})}U.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},U.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},U.prototype.unsubscribe=function(e){if(!!this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}},U.source=function(){var e,r=new U(function(s){e=s});return{token:r,cancel:e}};var cr=U,ar=function(e){return function(n){return e.apply(null,n)}},mr=v,fr=function(e){return mr.isObject(e)&&e.isAxiosError===!0},ze=v,gr=A,ee=lr,hr=Me,pr=me;function Ve(t){var e=new ee(t),r=gr(ee.prototype.request,e);return ze.extend(r,ee.prototype,e),ze.extend(r,e),r.create=function(s){return Ve(hr(t,s))},r}var k=Ve(pr);k.Axios=ee,k.Cancel=Y,k.CancelToken=cr,k.isCancel=qe,k.VERSION=Ne.version,k.all=function(e){return Promise.all(e)},k.spread=ar,k.isAxiosError=fr,p.exports=k,p.exports.default=k;var pe=p.exports;function te(t,{exclude:e=[]}={}){Object.freeze(t);const r=typeof t=="function";return Object.getOwnPropertyNames(t).forEach(n=>{(r?n!=="caller"&&n!=="callee"&&n!=="arguments":!0)&&t[n]!==null&&!e.includes(n)&&(typeof t[n]=="object"||typeof t[n]=="function")&&!Object.isFrozen(t[n])&&te(t[n],{exclude:e})}),t}class _e{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.response={status:r,statusText:n,headers:s},this.fields=J({},e),this.config=u,te(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({fields:this.fields}))}}const Je={limit:"pagination-limit",offset:"pagination-offset",total:"pagination-total"};class dr{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.limit=null,this.offset=null,this.total=null,Object.keys(Je).forEach(o=>{const l=s[Je[o]];this[o]=l?Number(l):null}),this.response={status:r,statusText:n,headers:s},this.items=e.map(o=>new _e({data:o,status:r,statusText:n,headers:s})),this.config=u,te(this,{exclude:["cancelToken"]})}getJSON(){return JSON.parse(JSON.stringify({items:this.items}))}}class $r{constructor({data:e,status:r,statusText:n,headers:s},u={}){this.response={status:r,statusText:n,headers:s},this.data=e,this.config=u}}class C extends Error{constructor({error:e,name:r=null}){let{config:n=null,response:s=null,request:u=null,message:o=null}=e,l=o||"Request Error";s&&s.data&&s.data.error&&(l=s.data.error);super(l);this.name=r||"RebillyError",this.response=s,this.request=u,this.config=n,this.status=s&&s.status?s.status:null,this.statusText=s&&s.statusText?s.statusText:null,this.details=s&&s.data&&s.data.details?s.data.details:null,this.invalidFields=s&&s.data&&s.data.invalidFields?s.data.invalidFields:null}}class yr extends C{constructor(e){super({error:e,name:"RebillyRequestError"})}}class br extends C{constructor(e){super({error:e,name:"RebillyValidationError"})}}class Ar extends C{constructor(e){super({error:e,name:"RebillyNotFoundError"})}}class vr extends C{constructor(e){super({error:e,name:"RebillyConflictError"})}}class wr extends C{constructor(e){super({error:e,name:"RebillyForbiddenError"})}}class Rr extends C{constructor(e){super({error:e,name:"RebillyMethodNotAllowedError"})}}class Er extends C{constructor(e){super({error:e,name:"RebillyTimeoutError"})}}class Sr extends C{constructor(e){super({error:e,name:"RebillyCanceledError"})}}const S={RebillyError:C,RebillyRequestError:yr,RebillyValidationError:br,RebillyNotFoundError:Ar,RebillyConflictError:vr,RebillyForbiddenError:wr,RebillyMethodNotAllowedError:Rr,RebillyTimeoutError:Er,RebillyCanceledError:Sr};/*!
3
3
  * isobject <https://github.com/jonschlinkert/isobject>
4
4
  *
5
5
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -24,14 +24,14 @@ var Ys=Object.defineProperty;var ut=Object.getOwnPropertySymbols;var Qs=Object.p
24
24
  *
25
25
  * Copyright (c) 2015-2017, Jon Schlinkert.
26
26
  * Released under the MIT License.
27
- */var Nr=Ge,Br=jr,Ur=Dr;function j(t){var e=Ur(t);return j.hasOwnProperty(e)?j[e](t):t}j.array=function(e){return e.slice()},j.date=function(e){return new Date(+e)},j.object=function(e){return Nr(e)?Br({},e):e},j.regexp=function(e){var r="";return r+=e.multiline?"m":"",r+=e.global?"g":"",r+=e.ignorecase?"i":"",new RegExp(e.source,r)};var Lr=j,Fr=Object.prototype.toString,Kr=function(e){var r=typeof e;return r==="undefined"?"undefined":e===null?"null":e===!0||e===!1||e instanceof Boolean?"boolean":r==="string"||e instanceof String?"string":r==="number"||e instanceof Number?"number":r==="function"||e instanceof Function?typeof e.constructor.name!="undefined"&&e.constructor.name.slice(0,9)==="Generator"?"generatorfunction":"function":typeof Array.isArray!="undefined"&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":(r=Fr.call(e),r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":r==="[object Promise]"?"promise":Vr(e)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Map Iterator]"?"mapiterator":r==="[object Set Iterator]"?"setiterator":r==="[object String Iterator]"?"stringiterator":r==="[object Array Iterator]"?"arrayiterator":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object")};function Vr(t){return t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}/*!
27
+ */var Nr=Ge,Br=jr,Ur=Dr;function j(t){var e=Ur(t);return j.hasOwnProperty(e)?j[e](t):t}j.array=function(e){return e.slice()},j.date=function(e){return new Date(+e)},j.object=function(e){return Nr(e)?Br({},e):e},j.regexp=function(e){var r="";return r+=e.multiline?"m":"",r+=e.global?"g":"",r+=e.ignorecase?"i":"",new RegExp(e.source,r)};var Lr=j,Fr=Object.prototype.toString,Kr=function(e){var r=typeof e;return r==="undefined"?"undefined":e===null?"null":e===!0||e===!1||e instanceof Boolean?"boolean":r==="string"||e instanceof String?"string":r==="number"||e instanceof Number?"number":r==="function"||e instanceof Function?typeof e.constructor.name!="undefined"&&e.constructor.name.slice(0,9)==="Generator"?"generatorfunction":"function":typeof Array.isArray!="undefined"&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":(r=Fr.call(e),r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":r==="[object Promise]"?"promise":zr(e)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Map Iterator]"?"mapiterator":r==="[object Set Iterator]"?"setiterator":r==="[object String Iterator]"?"stringiterator":r==="[object Array Iterator]"?"arrayiterator":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object")};function zr(t){return t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}/*!
28
28
  * for-in <https://github.com/jonschlinkert/for-in>
29
29
  *
30
30
  * Copyright (c) 2014-2017, Jon Schlinkert.
31
31
  * Released under the MIT License.
32
- */var zr=function(e,r,n){for(var s in e)if(r.call(n,e[s],s,e)===!1)break};/*!
32
+ */var Vr=function(e,r,n){for(var s in e)if(r.call(n,e[s],s,e)===!1)break};/*!
33
33
  * for-own <https://github.com/jonschlinkert/for-own>
34
34
  *
35
35
  * Copyright (c) 2014-2017, Jon Schlinkert.
36
36
  * Released under the MIT License.
37
- */var _r=zr,Jr=Object.prototype.hasOwnProperty,Wr=function(e,r,n){_r(e,function(s,u){if(Jr.call(e,u))return r.call(n,e[u],u,e)})},Gr=Tr,Xr=Lr,Yr=Kr,Qr=Wr;function de(t,e){switch(Yr(t)){case"object":return Zr(t,e);case"array":return Hr(t,e);default:return Xr(t)}}function Zr(t,e){if(Gr(t)){var r={};return Qr(t,function(n,s){this[s]=de(n,e)},r),r}else return e?e(t):t}function Hr(t,e){for(var r=t.length,n=[],s=-1;++s<r;)n[s]=de(t[s],e);return n}var en=de;const tn="47.9.0";let rn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nn=(t=21)=>{let e="",r=t;for(;r--;)e+=rn[Math.random()*64|0];return e};class sn{constructor({id:e=null,created:r=null}={}){this.id=e||nn(),this.created=r||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,r)=>{try{L.getById(e).cancel(r),L.deleteById(e)}catch{}}),ve(re,"cancelAll",e=>L.getAll().forEach(r=>{r.cancel(e),L.deleteById(r.id)}));var un={cancelAll:(...t)=>re.cancelAll(...t)};const q={request:"request",response:"response"},Ye=t=>{if(!Object.values(q).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function $e({options:t}){const e=r();function r(){return pe.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let i=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(i=`${i}/${t.apiVersion}`),t.organizationId&&(i=`${i}/organizations/${t.organizationId}`),`${i}`}function o(){const i={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${tn}`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return en(e.defaults.headers)}function a(i){t.requestTimeout=Number(i),e.defaults.timeout=t.requestTimeout}function h(i=t.jwt){const m=l();t.apiKey=null,t.jwt=i,delete m.common["REB-APIKEY"],m.common.Authorization=`Bearer ${i}`,e.defaults.headers=m}function c(i=t.publishableKey){const m=l();t.publishableKey=i,m.common.Authorization=`${i}`,e.defaults.headers=m}function g({host:i,port:m,auth:f}){e.defaults.proxy={host:i,port:m,auth:f}}function w({live:i=null,sandbox:m=null}){i&&(t.apiEndpoints.live=i),m&&(t.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 V(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){V(q.request,i)}function P({thenDelegate:i,catchDelegate:m=()=>{}}){return b(q.response,{thenDelegate:i,catchDelegate:m})}function T(i){V(q.response,i)}function x({request:i,isCollection:m,config:f}){const $=et(f),{id:O,cancelToken:Xs}=L.save();$.cancelToken=Xs;const st=async function(){try{const _=await i($);return z({response:_,isCollection:m,config:$})}catch(_){return He({error:_,config:$})}finally{L.deleteById(O)}}();return st.cancel=_=>re.cancelById(O,_),st}function z({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 Ks(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=Ks(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 zs(i,m){return x({request:f=>e.patch(i,m,f),config:{}})}function _s(i){return x({request:m=>e.delete(i,m),config:{}})}function Js(i,m){return x({request:f=>e.delete(i,f),config:{data:J({},m)}})}async function Ws(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 Gs(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:g,setSessionToken:h,setPublishableKey:c,setEndpoints:w,get:tt,getAll:Vs,post:rt,put:nt,patch:zs,delete:_s,deleteAll:Js,create:Ws,download:Gs}}function on({apiHandler:t}){return{activate({token:e}){return t.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})},logout(){return t.post("logout")},signIn({data:e}){return t.post("signin",e,{authenticate:!1})},signUp({data:e}){return t.post("signup",e,{authenticate:!1})}}}function ln({apiHandler:t}){return{getAll({firstName:e,lastName:r,dob:n=null,country:s=null}){const u={firstName:e,lastName:r,dob:n,country:s};return t.getAll("aml",u)}}}function cn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null}={}){const s={limit:e,offset:r,sort:n};return t.getAll("api-keys",s)},create({id:e="",data:r}){return t.create(`api-keys/${e}`,e,r)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:r}){return t.put(`api-keys/${e}`,r)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function an({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:r}){return t.put(`application-instances/${e}`,r)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)}}}function mn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e}){return t.getAll(`applications/${e}/instances`)},getInstance({id:e,organizationId:r}){return t.get(`applications/${e}/instances/${r}`)}}}function fn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("balance-transactions",n)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function gn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:r}){return t.create(`billing-portals/${e}`,e,r)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:r}){return t.put(`billing-portals/${e}`,r)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function hn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("blocklists",o)},create({id:e="",data:r}){return t.create(`blocklists/${e}`,e,r)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function pn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:r,sort:n,filter:s};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:r}){return t.patch(`broadcast-messages/${e}`,r)}}}function dn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:r}){return t.create(`checkout-forms/${e}`,e,r)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:r}){return t.put(`checkout-forms/${e}`,r)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function $n({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("coupons",o)},create({id:e="",data:r}){return t.create(`coupons/${e}`,e,r)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:r}){return t.put(`coupons/${e}`,r)},setExpiration({id:e,data:r}){return t.post(`coupons/${e}/expiration`,r)}}}function yn({apiHandler:t}){return{createAWSSESCredential({data:e}){return t.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return t.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:r}){return t.patch(`credential-hashes/aws-ses/${e}`,r)},createEmailCredential({data:e}){return t.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return t.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:r}){return t.patch(`credential-hashes/emails/${e}`,r)},createMailgunCredential({data:e}){return t.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return t.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:r}){return t.patch(`credential-hashes/mailgun/${e}`,r)},getAllOAuth2Credentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return t.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return t.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:r}){return t.patch(`credential-hashes/oauth2/${e}`,r)},getOAuth2CredentialItems({hash:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const a={limit:r,offset:n,filter:s,q:u,fields:o,sort:l};return t.getAll(`credential-hashes/oauth2/${e}/items`,a)},getAllPlaidCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return t.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return t.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:r}){return t.patch(`credential-hashes/plaid/${e}`,r)},createPostmarkCredential({data:e}){return t.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return t.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:r}){return t.patch(`credential-hashes/postmark/${e}`,r)},createSendGridCredential({data:e}){return t.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return t.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:r}){return t.patch(`credential-hashes/sendgrid/${e}`,r)},createWebhookCredential({data:e}){return t.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return t.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:r}){return t.patch(`credential-hashes/webhooks/${e}`,r)},getAllExperianCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return t.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return t.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:r}){return t.patch(`credential-hashes/experian/${e}`,r)},getAllTaxJarCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return t.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return t.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:r}){return t.patch(`credential-hashes/taxjar/${e}`,r)}}}function bn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:r}){return t.create(`credit-memos/${e}`,e,r)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`credit-memos/${e}`,n)},update({id:e,data:r}){return t.put(`credit-memos/${e}`,r)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`credit-memos/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`credit-memos/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`credit-memos/${e}/timeline/${r}`)}}}function An({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function vn({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`custom-fields/${e}`,s)},get({resource:e,name:r}){return t.get(`custom-fields/${e}/${r}`)},create({resource:e,name:r,data:n}){return t.put(`custom-fields/${e}/${r}`,n)},update({resource:e,name:r,data:n}){return t.put(`custom-fields/${e}/${r}`,n)}}}function wn({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:r}){return t.post(`authentication-tokens/${e}/exchange`,r)},getAllCredentials({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("credentials",n)},createCredential({id:e="",data:r}){return t.create(`credentials/${e}`,e,r)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:r}){return t.put(`credentials/${e}`,r)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}const D={Accept:"text/csv"},Qe={Accept:"application/pdf"};function Rn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`customers/${e}`,e,r,s)},get({id:e,expand:r=null,fields:n=null}){const s={expand:r,fields:n};return t.get(`customers/${e}`,s)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`customers/${e}`,r,s)},merge({id:e,targetCustomerId:r}){return t.delete(`customers/${e}?targetCustomerId=${r}`)},getAml({id:e}){return t.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},updateLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`customers/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`customers/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`customers/${e}/timeline/${r}`)},getAllUpcomingInvoices({id:e,expand:r=null}){const n={expand:r};return t.getAll(`customers/${e}/upcoming-invoices`,n)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:r}){return t.patch(`customers/${e}/edd-score`,r)},getEddTimelineCollection({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:r}){return t.post(`customers/${e}/edd-timeline`,r)},GetEddSearchResults({id:e}){return t.get(`customers/${e}/edd-search-results`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("customers",l)}}}function En({apiHandler:t}){return{create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return t.post("digital-wallets/validation",e)}}}function Sn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`disputes/${e}`,e,r,s)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`disputes/${e}`,r,s)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("disputes",l)}}}function kn({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:r,filter:n,sort:s,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:r}){return t.patch(`email-delivery-settings/${e}`,r)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Cn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:n=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:r,q:n,sort:s,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:r={status:"outbox"}}){return t.patch(`email-messages/${e}`,r)}}}function Tn({apiHandler:t}){return{getAll(){return t.getAll("email-notifications")}}}function xn({apiHandler:t}){return{getAll(){return t.getAll("events")},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},updateRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},getAllTimelineMessages({eventType:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:r}){return t.post(`events/${e}/timeline`,r)},getTimelineMessage({eventType:e,messageId:r}){return t.get(`events/${e}/timeline/${r}`)},deleteTimelineMessage({eventType:e,messageId:r}){return t.delete(`events/${e}/timeline/${r}`)},getRulesHistory({eventType:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const h={limit:r,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return t.getAll(`events/${e}/rules/history`,h)},getRulesVersionNumber({eventType:e,version:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/history/${r}`,u)},getRulesVersionDetail({eventType:e,version:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/versions/${r}`,u)},getAllDraftRulesets({eventType:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const h={limit:r,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return t.getAll(`events/${e}/rules/drafts`,h)},createDraftRuleset({eventType:e,data:r}){return t.post(`events/${e}/rules/drafts`,r)},getDraftRuleset({eventType:e,id:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/drafts/${r}`,u)},updateDraftRuleset({eventType:e,id:r,data:n}){return t.put(`events/${e}/rules/drafts/${r}`,n)},deleteDraftRuleset({eventType:e,id:r}){return t.delete(`events/${e}/rules/drafts/${r}`)}}}function In({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("fees",n)},create({id:e="",data:r}){return t.create(`fees/${e}`,e,r)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:r}){return t.put(`fees/${e}`,r)},patch({id:e,data:r}){return t.patch(`fees/${e}`,r)}}}function Pn({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`attachments/${e}`,e,r,s)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`attachments/${e}`,r,s)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("files",a)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:r}){return t.put(`files/${e}`,r)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const r={responseType:"arraybuffer"};return t.download(`files/${e}/download`,r)},detachAndDelete({id:e}){const r={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(r);n.push(o);const a=(await o).items.map(c=>this.detach({id:c.fields.id}));n=[...n,a],await Promise.all(a);const h=t.delete(`files/${e}`);return n.push(h),h})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:r={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:r.description,tags:r.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:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:r,sort:n,filter:s,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:r}){return t.create(`gateway-accounts/${e}`,e,r)},get({id:e}){return t.get(`gateway-accounts/${e}`)},update({id:e,data:r}){return t.patch(`gateway-accounts/${e}`,r)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null}){const o={limit:r,offset:n,filter:s,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:r}){return t.post(`gateway-accounts/${e}/downtime-schedules`,r)},getDowntimeSchedule({id:e,downtimeId:r}){return t.get(`gateway-accounts/${e}/downtime-schedules/${r}`)},updateDowntimeSchedule({id:e,downtimeId:r,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${r}`,n)},deleteDowntimeSchedule({id:e,downtimeId:r}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${r}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:r}){return t.get(`gateway-accounts/${e}/limits/${r}`)},updateVolumeLimit({id:e,limitId:r,data:n}){return t.put(`gateway-accounts/${e}/limits/${r}`,n)},deleteVolumeLimit({id:e,limitId:r}){return t.delete(`gateway-accounts/${e}/limits/${r}`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`gateway-accounts/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`gateway-accounts/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`gateway-accounts/${e}/timeline/${r}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:r}){return t.put(`gateway-accounts/${e}/financial-settings`,r)}}}function jn({apiHandler:t}){return{getAll(){return t.getAll("integrations")},get({label:e}){return t.get(`integrations/${e}`)}}}function qn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`invoices/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`invoices/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`invoices/${e}`,r,s)},getAllInvoiceItems({id:e,limit:r=null,offset:n=null,expand:s=null}){const u={limit:r,offset:n,expand:s};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:r}){return t.post(`invoices/${e}/items`,r)},getInvoiceItem({id:e,itemId:r}){return t.get(`invoices/${e}/items/${r}`)},updateInvoiceItem({id:e,itemId:r,data:n}){return t.put(`invoices/${e}/items/${r}`,n)},deleteInvoiceItem({id:e,itemId:r}){return t.delete(`invoices/${e}/items/${r}`)},issue({id:e,data:r}){return t.post(`invoices/${e}/issue`,r)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:r}){return t.post(`invoices/${e}/reissue`,r)},getAllTransactionAllocations({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:r}){return t.post(`invoices/${e}/transaction`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`invoices/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`invoices/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`invoices/${e}/timeline/${r}`)},getAllCreditMemoAllocations({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`invoices/${e}/credit-memo-allocations`,s)},getCreditMemoAllocation({id:e,creditMemoId:r,limit:n=null,offset:s=null}){const u={limit:n,offset:s};return t.get(`invoices/${e}/credit-memo-allocations/${r}`,u)},applyCreditMemo({id:e,creditMemoId:r,data:n}){return t.put(`invoices/${e}/credit-memo-allocations/${r}`,n)},deleteCreditMemoAllocation({id:e,creditMemoId:r}){return t.delete(`invoices/${e}/credit-memo-allocations/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("invoices",l)},downloadPDF({id:e}){const r={headers:Qe,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Dn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("kyc-documents",u)},create({id:e="",data:r}){return t.create(`kyc-documents/${e}`,e,r)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.put(`kyc-documents/${e}`,r)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:r}){return t.post(`kyc-documents/${e}/matches`,r)},reject({id:e,data:r}){return t.post(`kyc-documents/${e}/rejection`,r)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function Mn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:r}){return t.patch(`kyc-requests/${e}`,r)}}}function Nn({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function Bn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:r,filter:n,sort:s,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:r}){return t.create(`lists/${e}`,e,r)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:r}){return t.put(`lists/${e}`,r)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:r}){return t.get(`lists/${e}/${r}`)}}}function Un({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("memberships",u)},get({organizationId:e,userId:r}){return t.get(`memberships/${e}/${r}`)},update({organizationId:e,userId:r,data:n}){return t.put(`memberships/${e}/${r}`,n)},delete({organizationId:e,userId:r}){return t.delete(`memberships/${e}/${r}`)}}}function Ln({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:r,filter:n,q:s};return t.getAll("organizations",u)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:r}){return t.patch(`organizations/${e}`,r)}}}function Fn({apiHandler:t}){return{getAll({limit:e=null,q:r=null}={}){const n={limit:e,q:r};return t.getAll("payment-cards-bank-names",n)}}}function Kn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Vn({apiHandler:t}){return{getAll(){return t.getAll("payment-methods")},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function zn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function _n({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Jn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("plans",o)},create({id:e="",data:r}){return t.create(`plans/${e}`,e,r)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:r}){return t.put(`plans/${e}`,r)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Wn({apiHandler:t}){return{sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return t.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return t.post("previews/webhooks",e)},order({data:e}){return t.post("previews/orders",e)}}}function Gn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("products",o)},create({id:e="",data:r}){return t.create(`products/${e}`,e,r)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:r}){return t.put(`products/${e}`,r)},delete({id:e}){return t.delete(`products/${e}`)}}}function Xn({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")},updatePassword({data:e}){return t.post("profile/password",e)},resetTotp(){return t.post("profile/totp-reset")}}}function Yn({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Qn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:n,sort:s,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:r}){return t.create(`roles/${e}`,e,r)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`roles/${e}`,n)},update({id:e,data:r}){return t.put(`roles/${e}`,r)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Zn({apiHandler:t}){return{get({sort:e=null,limit:r=null,offset:n=null,q:s=null}){const u={sort:e,limit:r,offset:n,q:s};return t.get("search",u)}}}function Hn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:r}){return t.create(`grid-segments/${e}`,e,r)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:r}){return t.put(`grid-segments/${e}`,r)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function es({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function ts({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:r,filter:n,sort:s,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:r}){return t.create(`shipping-rates/${e}`,e,r)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:r}){return t.put(`shipping-rates/${e}`,r)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function rs({apiHandler:t}){return{get(){return t.get("status")}}}function ns({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-cancellations",u)},create({id:e="",data:r}){return t.create(`subscription-cancellations/${e}`,e,r)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`subscription-cancellations/${e}`,r)}}}function ss({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-pauses",u)},pause({id:e="",data:r}){return t.create(`subscription-pauses/${e}`,e,r)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:r}){return t.put(`subscription-pauses/${e}`,r)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function os({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`subscriptions/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`subscriptions/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`subscriptions/${e}`,r,s)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:r}){return t.post(`subscriptions/${e}/change-items`,r)},createInterimInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/interim-invoice`,r)},getAllUpcomingInvoices({id:e,expand:r=null}){const n={expand:r};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},issueUpcomingInvoice({id:e,invoiceId:r,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${r}/issue`,n)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`subscriptions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`subscriptions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`subscriptions/${e}/timeline/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("subscriptions",l)}}}function ls({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:r}){return t.patch(`tags/${e}`,r)},tagCustomers({tag:e,data:r}){return t.post(`tags/${e}/customers`,r)},untagCustomers({tag:e,data:r}){return t.delete(`tags/${e}/customers`,r)},tagCustomer({tag:e,customerId:r}){return t.post(`tags/${e}/customers/${r}`)},untagCustomer({tag:e,customerId:r}){return t.delete(`tags/${e}/customers/${r}`)},tagKycDocuments({tag:e,data:r}){return t.post(`tags/${e}/kyc-documents`,r)},untagKycDocuments({tag:e,data:r}){return t.delete(`tags/${e}/kyc-documents`,r)},tagKycDocument({tag:e,kycDocumentId:r}){return t.post(`tags/${e}/kyc-documents/${r}`)},untagKycDocument({tag:e,kycDocumentId:r}){return t.delete(`tags/${e}/kyc-documents/${r}`)}}}function is({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/api",o)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:r,sort:n,filter:s,q:u},headers:D};return t.download("tracking/api",o)}}}function cs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:n,q:s,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:r=null}){const n={expand:r};return t.post("transactions",e,n)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`transactions/${e}`,n)},patch({id:e,data:r}){return t.patch(`transactions/${e}`,r)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:r}){return t.post(`transactions/${e}/update`,r)},refund({id:e,data:r}){return t.post(`transactions/${e}/refund`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null}){const u={limit:r,offset:n,filter:s};return t.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:r}){return t.post(`transactions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`transactions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`transactions/${e}/timeline/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("transactions",l)}}}function as({apiHandler:t}){return{getResetPasswordToken({token:e}){return t.get(`reset-password/${e}`)},resetPassword({token:e,data:r}){return t.post(`reset-password/${e}`,r)},getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("users",o)},create({id:e="",data:r}){return t.create(`users/${e}`,e,r)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:r}){return t.put(`users/${e}`,r)},getMfa({id:e}){return t.get(`users/${e}/mfa`)},updatePassword({id:e,data:r}){return t.post(`users/${e}/password`,r)},resetTotp({id:e}){return t.post(`users/${e}/totp-reset`)}}}function ms({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null}={}){const s={limit:e,offset:r,filter:n};return t.getAll("webhooks",s)},create({id:e="",data:r}){return t.create(`webhooks/${e}`,e,r)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:r}){return t.put(`webhooks/${e}`,r)}}}function fs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:n=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:r,q:n,filter:s,sort:u};return t.getAll("websites",o)},create({id:e="",data:r}){return t.create(`websites/${e}`,e,r)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:r}){return t.put(`websites/${e}`,r)},delete({id:e}){return t.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("websites",l)}}}class gs{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.organizations=Ln({apiHandler:e}),this.paymentCardsBankNames=Fn({apiHandler:e}),this.paymentInstruments=Kn({apiHandler:e}),this.paymentMethods=Vn({apiHandler:e}),this.paymentTokens=zn({apiHandler:e}),this.payouts=_n({apiHandler:e}),this.plans=Jn({apiHandler:e}),this.previews=Wn({apiHandler:e}),this.products=Gn({apiHandler:e}),this.profile=Xn({apiHandler:e}),this.purchase=Yn({apiHandler:e}),this.roles=Qn({apiHandler:e}),this.search=Zn({apiHandler:e}),this.segments=Hn({apiHandler:e}),this.sendThroughAttribution=es({apiHandler:e}),this.shippingRates=ts({apiHandler:e}),this.status=rs({apiHandler:e}),this.subscriptionCancellations=ns({apiHandler:e}),this.subscriptionPauses=ss({apiHandler:e}),this.subscriptionReactivations=us({apiHandler:e}),this.subscriptions=os({apiHandler:e}),this.tags=ls({apiHandler:e}),this.tracking=is({apiHandler:e}),this.transactions=cs({apiHandler:e}),this.users=as({apiHandler:e}),this.webhooks=ms({apiHandler:e}),this.websites=fs({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 hs({apiHandler:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ps({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:r,sort:n,expand:s,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`data-exports/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`data-exports/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`data-exports/${e}`,r,s)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function ds({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:r,aggregationField:n,aggregationPeriod:s,metric:u,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,aggregationPeriod:s,metric:u,filter:o};return t.get("histograms/transactions",l)}}}function $s({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:r,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:r,metrics:n,segments:s};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:r,limit:n=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:r,limit:n,offset:s,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null}){const o={periodStart:r,periodEnd:n,limit:s,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/future-renewals",u)},getKycAcceptanceSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:n,limit:s,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const c={aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",c)},getRetentionValue({aggregationField:e,aggregationPeriod:r,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:h=null,sort:c=null,criteria:g=null}){const w={aggregationField:e,aggregationPeriod:r,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:c,criteria:g};return t.get("reports/retention-value",w)},getRevenueWaterfall({currency:e,issuedFrom:r,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:r,issuedTo:n,recognizedTo:s};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e,periodEnd:r,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,limit:s,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:r,periodStart:n,periodEnd:s}){const u={type:e,subaggregate:r,periodStart:n,periodEnd:s};return t.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:r,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,limit:s,offset:u,filter:o};return t.get("reports/transactions",l)}}}function ys({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function bs({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:r=1e3,offset:n=0}){const s={eventTypes:e,limit:r,offset:n};return t.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:r=null,limit:n=1e3,offset:s=0}){const u={eventTypes:r,limit:n,offset:s};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:r=null,limit:n=1e3,offset:s=0}){const u={eventTypes:r,limit:n,offset:s};return t.getAll(`customers/${e}/timeline`,u)}}}function As({apiHandler:t}){return{query(){return t.get("location")}}}const M={CustomersResource:hs,DataExportsResource:ps,HistogramsResource:ds,ReportsResource:$s,SubscriptionsResource:ys,TimelinesResource:bs,LocationResource:As};class vs{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 ws({apiHandler:t}){return{get(){return t.get("account")},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:r}){return t.post(`account/reset-password/${e}`,r)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Rs({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Es({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function Ss({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function ks({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("invoices",o)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const r={headers:Qe,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Cs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.patch(`kyc-documents/${e}`,r)}}}function Ts({apiHandler:t}){return{get({id:e}){return t.get(`kyc-requests/${e}`)}}}function xs({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("orders",o)},get({id:e}){return t.get(`orders/${e}`)},update({id:e,data:r}){return t.patch(`orders/${e}`,r)},cancel({id:e,data:r}){return t.post(`orders/${e}/cancellation`,r)}}}function Is({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.get(`payment-instruments/${e}`,s)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:r}){return t.post(`payment-instruments/${e}/setup`,r)}}}function Ps({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("plans",o)},get({id:e}){return t.get(`plans/${e}`)}}}function Os({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function js({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function qs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},update({id:e,data:r}){return t.patch(`transactions/${e}`,r)}}}function Ds({apiHandler:t}){return{get({id:e}){return t.get(`websites/${e}`)}}}class Ms{constructor({apiHandler:e}){this.account=ws({apiHandler:e}),this.authorization=Rs({apiHandler:e}),this.billingPortals=Es({apiHandler:e}),this.checkoutForms=Ss({apiHandler:e}),this.invoices=ks({apiHandler:e}),this.kycDocuments=Cs({apiHandler:e}),this.kycRequests=Ts({apiHandler:e}),this.orders=xs({apiHandler:e}),this.paymentInstruments=Is({apiHandler:e}),this.plans=Ps({apiHandler:e}),this.products=Os({apiHandler:e}),this.purchase=js({apiHandler:e}),this.transactions=qs({apiHandler:e}),this.websites=Ds({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 Ns({apiHandler:t}){return new gs({apiHandler:t})}function Bs({apiHandler:t}){return new vs({apiHandler:t})}function Us({apiHandler:t}){return new Ms({apiHandler:t})}const ye={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},be=6e3;function Ze({apiKey:t=null,sandbox:e=!1,timeout:r=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:t,apiVersion:"",isSandbox:e,requestTimeout:r,jwt:null,organizationId:n}});return Ns({apiHandler:o})}function Ls({apiKey:t=null,sandbox:e=!1,timeout:r=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:t,apiVersion:"experimental",isSandbox:e,requestTimeout:r,jwt:null,organizationId:n}});return Bs({apiHandler:o})}function Fs({publishableKey:t=null,jwt:e=null,sandbox:r=!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:t,jwt:e,apiVersion:"storefront",isSandbox:r,requestTimeout:n,organizationId:s},l=$e({options:o});return l.setSessionToken(o.jwt),Us({apiHandler:l})}d.RebillyAPI=Ze,d.RebillyErrors=S,d.RebillyExperimentalAPI=Ls,d.RebillyStorefrontAPI=Fs,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,r,n){_r(e,function(s,u){if(Jr.call(e,u))return r.call(n,e[u],u,e)})},Gr=Tr,Xr=Lr,Yr=Kr,Qr=Wr;function de(t,e){switch(Yr(t)){case"object":return Zr(t,e);case"array":return Hr(t,e);default:return Xr(t)}}function Zr(t,e){if(Gr(t)){var r={};return Qr(t,function(n,s){this[s]=de(n,e)},r),r}else return e?e(t):t}function Hr(t,e){for(var r=t.length,n=[],s=-1;++s<r;)n[s]=de(t[s],e);return n}var en=de;const tn="47.11.1";let rn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nn=(t=21)=>{let e="",r=t;for(;r--;)e+=rn[Math.random()*64|0];return e};class sn{constructor({id:e=null,created:r=null}={}){this.id=e||nn(),this.created=r||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,r)=>{try{L.getById(e).cancel(r),L.deleteById(e)}catch{}}),ve(re,"cancelAll",e=>L.getAll().forEach(r=>{r.cancel(e),L.deleteById(r.id)}));var un={cancelAll:(...t)=>re.cancelAll(...t)};const q={request:"request",response:"response"},Ye=t=>{if(!Object.values(q).includes(t))throw new Error(`There is no such interceptor type as "${t}"`);return!0};function $e({options:t}){const e=r();function r(){return pe.create(s())}function n(){return e}function s(){return{baseURL:u(),timeout:t.requestTimeout,headers:o()}}function u(){let i=t.isSandbox?t.apiEndpoints.sandbox:t.apiEndpoints.live;return t.apiVersion&&(i=`${i}/${t.apiVersion}`),t.organizationId&&(i=`${i}/organizations/${t.organizationId}`),`${i}`}function o(){const i={"REB-API-CONSUMER":`RebillySDK/JS-SDK ${tn}`};return t.apiKey&&(i["REB-APIKEY"]=t.apiKey),i}function l(){return en(e.defaults.headers)}function a(i){t.requestTimeout=Number(i),e.defaults.timeout=t.requestTimeout}function h(i=t.jwt){const m=l();t.apiKey=null,t.jwt=i,delete m.common["REB-APIKEY"],m.common.Authorization=`Bearer ${i}`,e.defaults.headers=m}function c(i=t.publishableKey){const m=l();t.publishableKey=i,m.common.Authorization=`${i}`,e.defaults.headers=m}function g({host:i,port:m,auth:f}){e.defaults.proxy={host:i,port:m,auth:f}}function w({live:i=null,sandbox:m=null}){i&&(t.apiEndpoints.live=i),m&&(t.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:g,setSessionToken:h,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:t}){return{activate({token:e}){return t.post(`activation/${e}`,{authenticate:!1})},forgotPassword({data:e}){return t.post("forgot-password",e,{authenticate:!1})},logout(){return t.post("logout")},signIn({data:e}){return t.post("signin",e,{authenticate:!1})},signUp({data:e}){return t.post("signup",e,{authenticate:!1})}}}function ln({apiHandler:t}){return{getAll({firstName:e,lastName:r,dob:n=null,country:s=null}){const u={firstName:e,lastName:r,dob:n,country:s};return t.getAll("aml",u)}}}function cn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null}={}){const s={limit:e,offset:r,sort:n};return t.getAll("api-keys",s)},create({id:e="",data:r}){return t.create(`api-keys/${e}`,e,r)},get({id:e}){return t.get(`api-keys/${e}`)},update({id:e,data:r}){return t.put(`api-keys/${e}`,r)},delete({id:e}){return t.delete(`api-keys/${e}`)}}}function an({apiHandler:t}){return{get({applicationId:e}){return t.get(`application-instances/${e}`)},upsert({applicationId:e,data:r}){return t.put(`application-instances/${e}`,r)},delete({applicationId:e}){return t.delete(`application-instances/${e}`)}}}function mn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("applications",a)},create({data:e}){return t.post("applications",e)},get({id:e}){return t.get(`applications/${e}`)},getInstances({id:e}){return t.getAll(`applications/${e}/instances`)},getInstance({id:e,organizationId:r}){return t.get(`applications/${e}/instances/${r}`)}}}function fn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("balance-transactions",n)},get({id:e}){return t.get(`balance-transactions/${e}`)}}}function gn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("billing-portals",o)},create({id:e="",data:r}){return t.create(`billing-portals/${e}`,e,r)},get({id:e}){return t.get(`billing-portals/${e}`)},update({id:e,data:r}){return t.put(`billing-portals/${e}`,r)},delete({id:e}){return t.delete(`billing-portals/${e}`)}}}function hn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("blocklists",o)},create({id:e="",data:r}){return t.create(`blocklists/${e}`,e,r)},get({id:e}){return t.get(`blocklists/${e}`)},delete({id:e}){return t.delete(`blocklists/${e}`)}}}function pn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null}={}){const u={limit:e,offset:r,sort:n,filter:s};return t.getAll("broadcast-messages",u)},create({data:e}){return t.post("broadcast-messages",e)},get({id:e}){return t.get(`broadcast-messages/${e}`)},delete({id:e}){return t.delete(`broadcast-messages/${e}`)},update({id:e,data:r}){return t.patch(`broadcast-messages/${e}`,r)}}}function dn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("checkout-forms",o)},create({id:e="",data:r}){return t.create(`checkout-forms/${e}`,e,r)},get({id:e}){return t.get(`checkout-forms/${e}`)},update({id:e,data:r}){return t.put(`checkout-forms/${e}`,r)},delete({id:e}){return t.delete(`checkout-forms/${e}`)}}}function $n({apiHandler:t}){return{getAllRedemptions({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("coupons-redemptions",o)},redeem({data:e}){return t.post("coupons-redemptions",e)},getRedemption({id:e}){return t.get(`coupons-redemptions/${e}`)},cancelRedemption({id:e}){return t.post(`coupons-redemptions/${e}/cancel`)},getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("coupons",o)},create({id:e="",data:r}){return t.create(`coupons/${e}`,e,r)},get({id:e}){return t.get(`coupons/${e}`)},update({id:e,data:r}){return t.put(`coupons/${e}`,r)},setExpiration({id:e,data:r}){return t.post(`coupons/${e}/expiration`,r)}}}function yn({apiHandler:t}){return{createAWSSESCredential({data:e}){return t.post("credential-hashes/aws-ses",e)},getAWSSESCredential({hash:e}){return t.get(`credential-hashes/aws-ses/${e}`)},updateAWSSESCredential({hash:e,data:r}){return t.patch(`credential-hashes/aws-ses/${e}`,r)},createEmailCredential({data:e}){return t.post("credential-hashes/emails",e)},getEmailCredential({hash:e}){return t.get(`credential-hashes/emails/${e}`)},patchEmailCredential({hash:e,data:r}){return t.patch(`credential-hashes/emails/${e}`,r)},createMailgunCredential({data:e}){return t.post("credential-hashes/mailgun",e)},getMailgunCredential({hash:e}){return t.get(`credential-hashes/mailgun/${e}`)},patchMailgunCredential({hash:e,data:r}){return t.patch(`credential-hashes/mailgun/${e}`,r)},getAllOAuth2Credentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/oauth2",o)},createOAuth2Credential({data:e}){return t.post("credential-hashes/oauth2",e)},getOAuth2Credential({hash:e}){return t.get(`credential-hashes/oauth2/${e}`)},updateOAuth2Credential({hash:e,data:r}){return t.patch(`credential-hashes/oauth2/${e}`,r)},getOAuth2CredentialItems({hash:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,fields:o=null,sort:l=null}){const a={limit:r,offset:n,filter:s,q:u,fields:o,sort:l};return t.getAll(`credential-hashes/oauth2/${e}/items`,a)},getAllPlaidCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/plaid",o)},createPlaidCredential({data:e}){return t.post("credential-hashes/plaid",e)},getPlaidCredential({hash:e}){return t.get(`credential-hashes/plaid/${e}`)},updatePlaidCredential({hash:e,data:r}){return t.patch(`credential-hashes/plaid/${e}`,r)},createPostmarkCredential({data:e}){return t.post("credential-hashes/postmark",e)},getPostmarkCredential({hash:e}){return t.get(`credential-hashes/postmark/${e}`)},patchPostmarkCredential({hash:e,data:r}){return t.patch(`credential-hashes/postmark/${e}`,r)},createSendGridCredential({data:e}){return t.post("credential-hashes/sendgrid",e)},getSendGridCredential({hash:e}){return t.get(`credential-hashes/sendgrid/${e}`)},patchSendGridCredential({hash:e,data:r}){return t.patch(`credential-hashes/sendgrid/${e}`,r)},createWebhookCredential({data:e}){return t.post("credential-hashes/webhooks",e)},getWebhookCredential({hash:e}){return t.get(`credential-hashes/webhooks/${e}`)},patchWebhookCredential({hash:e,data:r}){return t.patch(`credential-hashes/webhooks/${e}`,r)},getAllExperianCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/experian",o)},createExperianCredential({data:e}){return t.post("credential-hashes/experian",e)},getExperianCredential({hash:e}){return t.get(`credential-hashes/experian/${e}`)},updateExperianCredential({hash:e,data:r}){return t.patch(`credential-hashes/experian/${e}`,r)},getAllTaxJarCredentials({filter:e=null,limit:r=null,offset:n=null,sort:s=null,q:u=null}={}){const o={filter:e,limit:r,offset:n,sort:s,q:u};return t.getAll("credential-hashes/taxjar",o)},createTaxJarCredential({data:e}){return t.post("credential-hashes/taxjar",e)},getTaxJarCredential({hash:e}){return t.get(`credential-hashes/taxjar/${e}`)},updateTaxJarCredential({hash:e,data:r}){return t.patch(`credential-hashes/taxjar/${e}`,r)}}}function bn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("credit-memos",l)},create({id:e="",data:r}){return t.create(`credit-memos/${e}`,e,r)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`credit-memos/${e}`,n)},update({id:e,data:r}){return t.put(`credit-memos/${e}`,r)},void({id:e}){return t.post(`credit-memos/${e}/void`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`credit-memos/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`credit-memos/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`credit-memos/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`credit-memos/${e}/timeline/${r}`)}}}function An({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("custom-domains",o)},create({data:e}){return t.post("custom-domains",e)},get({domain:e}){return t.get(`custom-domains/${e}`)},delete({domain:e}){return t.delete(`custom-domains/${e}`)}}}function vn({apiHandler:t}){return{getAll({resource:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`custom-fields/${e}`,s)},get({resource:e,name:r}){return t.get(`custom-fields/${e}/${r}`)},create({resource:e,name:r,data:n}){return t.put(`custom-fields/${e}/${r}`,n)},update({resource:e,name:r,data:n}){return t.put(`custom-fields/${e}/${r}`,n)}}}function wn({apiHandler:t}){return{getAuthOptions(){return t.get("authentication-options")},updateAuthOptions({data:e}){return t.put("authentication-options",e)},getAllAuthTokens({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("authentication-tokens",n)},login({data:e}){return t.post("authentication-tokens",e)},verify({token:e}){return t.get(`authentication-tokens/${e}`)},logout({token:e}){return t.delete(`authentication-tokens/${e}`)},exchangeToken({token:e,data:r}){return t.post(`authentication-tokens/${e}/exchange`,r)},getAllCredentials({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("credentials",n)},createCredential({id:e="",data:r}){return t.create(`credentials/${e}`,e,r)},getCredential({id:e}){return t.get(`credentials/${e}`)},updateCredential({id:e,data:r}){return t.put(`credentials/${e}`,r)},deleteCredential({id:e}){return t.delete(`credentials/${e}`)},getAllResetPasswordTokens({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("password-tokens",n)},createResetPasswordToken({data:e}){return t.post("password-tokens",e)},getResetPasswordToken({id:e}){return t.get(`password-tokens/${e}`)},deleteResetPasswordToken({id:e}){return t.delete(`password-tokens/${e}`)}}}const D={Accept:"text/csv"},Qe={Accept:"application/pdf"};function Rn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("customers",a)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`customers/${e}`,e,r,s)},get({id:e,expand:r=null,fields:n=null}){const s={expand:r,fields:n};return t.get(`customers/${e}`,s)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`customers/${e}`,r,s)},merge({id:e,targetCustomerId:r}){return t.delete(`customers/${e}?targetCustomerId=${r}`)},getAml({id:e}){return t.getAll(`customers/${e}/aml`)},getLeadSource({id:e}){return t.get(`customers/${e}/lead-source`)},createLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},updateLeadSource({id:e,data:r}){return t.put(`customers/${e}/lead-source`,r)},deleteLeadSource({id:e}){return t.delete(`customers/${e}/lead-source`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`customers/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`customers/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`customers/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`customers/${e}/timeline/${r}`)},getAllUpcomingInvoices({id:e,expand:r=null}){const n={expand:r};return t.getAll(`customers/${e}/upcoming-invoices`,n)},getCustomerEddScore({id:e}){return t.get(`customers/${e}/edd-score`)},patchCustomerEddScore({id:e,data:r}){return t.patch(`customers/${e}/edd-score`,r)},getEddTimelineCollection({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`customers/${e}/edd-timeline`,l)},createEddTimelineComment({id:e,data:r}){return t.post(`customers/${e}/edd-timeline`,r)},GetEddSearchResults({id:e}){return t.get(`customers/${e}/edd-search-results`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("customers",l)}}}function En({apiHandler:t}){return{create({data:e}){return t.post("digital-wallets/onboarding/apple-pay",e)},validate({data:e}){return t.post("digital-wallets/validation",e)}}}function Sn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("disputes",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`disputes/${e}`,e,r,s)},get({id:e}){return t.get(`disputes/${e}`)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`disputes/${e}`,r,s)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("disputes",l)}}}function kn({apiHandler:t}){return{verify({token:e}){return t.put(`email-delivery-setting-verifications/${e}`)},getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:r,filter:n,sort:s,q:u};return t.getAll("email-delivery-settings",o)},create({data:e}){return t.post("email-delivery-settings",e)},get({id:e}){return t.get(`email-delivery-settings/${e}`)},delete({id:e}){return t.delete(`email-delivery-settings/${e}`)},update({id:e,data:r}){return t.patch(`email-delivery-settings/${e}`,r)},resendVerification({id:e}){return t.post(`email-delivery-settings/${e}/resend-email-verification`)}}}function Cn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:n=null,sort:s=null,filter:u=null}={}){const o={limit:e,offset:r,q:n,sort:s,filter:u};return t.getAll("email-messages",o)},create({data:e}){return t.post("email-messages",e)},get({id:e}){return t.get(`email-messages/${e}`)},delete({id:e}){return t.delete(`email-messages/${e}`)},send({id:e,data:r={status:"outbox"}}){return t.patch(`email-messages/${e}`,r)}}}function Tn({apiHandler:t}){return{getAll(){return t.getAll("email-notifications")}}}function xn({apiHandler:t}){return{getAll(){return t.getAll("events")},get({eventType:e}){return t.get(`events/${e}`)},getRules({eventType:e}){return t.get(`events/${e}/rules`)},createRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},updateRules({eventType:e,data:r}){return t.put(`events/${e}/rules`,r)},getAllTimelineMessages({eventType:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`events/${e}/timeline`,l)},createTimelineComment({eventType:e,data:r}){return t.post(`events/${e}/timeline`,r)},getTimelineMessage({eventType:e,messageId:r}){return t.get(`events/${e}/timeline/${r}`)},deleteTimelineMessage({eventType:e,messageId:r}){return t.delete(`events/${e}/timeline/${r}`)},getRulesHistory({eventType:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const h={limit:r,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return t.getAll(`events/${e}/rules/history`,h)},getRulesVersionNumber({eventType:e,version:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/history/${r}`,u)},getRulesVersionDetail({eventType:e,version:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/versions/${r}`,u)},getAllDraftRulesets({eventType:e,limit:r=null,offset:n=null,filter:s=null,q:u=null,sort:o=null,fields:l=null,expand:a=null}){const h={limit:r,offset:n,filter:s,q:u,sort:o,fields:l,expand:a};return t.getAll(`events/${e}/rules/drafts`,h)},createDraftRuleset({eventType:e,data:r}){return t.post(`events/${e}/rules/drafts`,r)},getDraftRuleset({eventType:e,id:r,fields:n=null,expand:s=null}){const u={fields:n,expand:s};return t.get(`events/${e}/rules/drafts/${r}`,u)},updateDraftRuleset({eventType:e,id:r,data:n}){return t.put(`events/${e}/rules/drafts/${r}`,n)},deleteDraftRuleset({eventType:e,id:r}){return t.delete(`events/${e}/rules/drafts/${r}`)}}}function In({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("fees",n)},create({id:e="",data:r}){return t.create(`fees/${e}`,e,r)},get({id:e}){return t.get(`fees/${e}`)},upsert({id:e,data:r}){return t.put(`fees/${e}`,r)},patch({id:e,data:r}){return t.patch(`fees/${e}`,r)}}}function Pn({apiHandler:t}){return{getAllAttachments({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("attachments",a)},attach({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`attachments/${e}`,e,r,s)},getAttachment({id:e}){return t.get(`attachments/${e}`)},updateAttachment({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`attachments/${e}`,r,s)},detach({id:e}){return t.delete(`attachments/${e}`)},getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:e,offset:r,filter:n,q:s,expand:u,fields:o,sort:l};return t.getAll("files",a)},upload({fileObject:e}){return t.post("files",e)},get({id:e}){return t.get(`files/${e}`)},update({id:e,data:r}){return t.put(`files/${e}`,r)},delete({id:e}){return t.delete(`files/${e}`)},download({id:e}){const r={responseType:"arraybuffer"};return t.download(`files/${e}/download`,r)},detachAndDelete({id:e}){const r={filter:`fileId:${e}`};let n=[];const u=(async()=>{const o=this.getAllAttachments(r);n.push(o);const a=(await o).items.map(c=>this.detach({id:c.fields.id}));n=[...n,a],await Promise.all(a);const h=t.delete(`files/${e}`);return n.push(h),h})();return u.cancel=()=>{n.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:e,data:r={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:r.description,tags:r.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:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null,fields:o=null}={}){const l={limit:e,offset:r,sort:n,filter:s,q:u,fields:o};return t.getAll("gateway-accounts",l)},create({id:e="",data:r}){return t.create(`gateway-accounts/${e}`,e,r)},get({id:e}){return t.get(`gateway-accounts/${e}`)},update({id:e,data:r}){return t.patch(`gateway-accounts/${e}`,r)},delete({id:e}){return t.delete(`gateway-accounts/${e}`)},close({id:e}){return t.post(`gateway-accounts/${e}/close`)},disable({id:e}){return t.post(`gateway-accounts/${e}/disable`)},getAllDowntimeSchedules({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null}){const o={limit:r,offset:n,filter:s,sort:u};return t.getAll(`gateway-accounts/${e}/downtime-schedules`,o)},createDowntimeSchedule({id:e,data:r}){return t.post(`gateway-accounts/${e}/downtime-schedules`,r)},getDowntimeSchedule({id:e,downtimeId:r}){return t.get(`gateway-accounts/${e}/downtime-schedules/${r}`)},updateDowntimeSchedule({id:e,downtimeId:r,data:n}){return t.put(`gateway-accounts/${e}/downtime-schedules/${r}`,n)},deleteDowntimeSchedule({id:e,downtimeId:r}){return t.delete(`gateway-accounts/${e}/downtime-schedules/${r}`)},enable({id:e}){return t.post(`gateway-accounts/${e}/enable`)},getAllVolumeLimits({id:e}){return t.getAll(`gateway-accounts/${e}/limits`)},getVolumeLimit({id:e,limitId:r}){return t.get(`gateway-accounts/${e}/limits/${r}`)},updateVolumeLimit({id:e,limitId:r,data:n}){return t.put(`gateway-accounts/${e}/limits/${r}`,n)},deleteVolumeLimit({id:e,limitId:r}){return t.delete(`gateway-accounts/${e}/limits/${r}`)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`gateway-accounts/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`gateway-accounts/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`gateway-accounts/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`gateway-accounts/${e}/timeline/${r}`)},checkCredentials({id:e}){return t.post(`gateway-accounts/${e}/check-credentials`)},getFinancialSettings({id:e}){return t.get(`gateway-accounts/${e}/financial-settings`)},setFinancialSettings({id:e,data:r}){return t.put(`gateway-accounts/${e}/financial-settings`,r)}}}function jn({apiHandler:t}){return{getAll(){return t.getAll("integrations")},get({label:e}){return t.get(`integrations/${e}`)}}}function qn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("invoices",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`invoices/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`invoices/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`invoices/${e}`,r,s)},getAllInvoiceItems({id:e,limit:r=null,offset:n=null,expand:s=null}){const u={limit:r,offset:n,expand:s};return t.getAll(`invoices/${e}/items`,u)},createInvoiceItem({id:e,data:r}){return t.post(`invoices/${e}/items`,r)},getInvoiceItem({id:e,itemId:r}){return t.get(`invoices/${e}/items/${r}`)},updateInvoiceItem({id:e,itemId:r,data:n}){return t.put(`invoices/${e}/items/${r}`,n)},deleteInvoiceItem({id:e,itemId:r}){return t.delete(`invoices/${e}/items/${r}`)},issue({id:e,data:r}){return t.post(`invoices/${e}/issue`,r)},abandon({id:e}){return t.post(`invoices/${e}/abandon`)},void({id:e}){return t.post(`invoices/${e}/void`)},recalculate({id:e}){return t.post(`invoices/${e}/recalculate`)},reissue({id:e,data:r}){return t.post(`invoices/${e}/reissue`,r)},getAllTransactionAllocations({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`invoices/${e}/transaction-allocations`,s)},applyTransaction({id:e,data:r}){return t.post(`invoices/${e}/transaction`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`invoices/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`invoices/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`invoices/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`invoices/${e}/timeline/${r}`)},getAllCreditMemoAllocations({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.getAll(`invoices/${e}/credit-memo-allocations`,s)},getCreditMemoAllocation({id:e,creditMemoId:r,limit:n=null,offset:s=null}){const u={limit:n,offset:s};return t.get(`invoices/${e}/credit-memo-allocations/${r}`,u)},applyCreditMemo({id:e,creditMemoId:r,data:n}){return t.put(`invoices/${e}/credit-memo-allocations/${r}`,n)},deleteCreditMemoAllocation({id:e,creditMemoId:r}){return t.delete(`invoices/${e}/credit-memo-allocations/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("invoices",l)},downloadPDF({id:e}){const r={headers:Qe,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Dn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("kyc-documents",u)},create({id:e="",data:r}){return t.create(`kyc-documents/${e}`,e,r)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.put(`kyc-documents/${e}`,r)},accept({id:e}){return t.post(`kyc-documents/${e}/acceptance`)},matches({id:e,data:r}){return t.post(`kyc-documents/${e}/matches`,r)},reject({id:e,data:r}){return t.post(`kyc-documents/${e}/rejection`,r)},review({id:e}){return t.post(`kyc-documents/${e}/review`)},startReview({id:e}){return t.post(`kyc-documents/${e}/start-review`)},stopReview({id:e}){return t.post(`kyc-documents/${e}/stop-review`)}}}function Mn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("kyc-requests",u)},create({data:e}){return t.post("kyc-requests",e)},get({id:e}){return t.get(`kyc-requests/${e}`)},delete({id:e}){return t.delete(`kyc-requests/${e}`)},update({id:e,data:r}){return t.patch(`kyc-requests/${e}`,r)}}}function Nn({apiHandler:t}){return{getKycSettings(){return t.get("kyc-settings")},updateKycSettings({data:e}){return t.put("kyc-settings",e)}}}function Bn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,fields:u=null,q:o=null}={}){const l={limit:e,offset:r,filter:n,sort:s,fields:u,q:o};return t.getAll("lists",l)},create({id:e="",data:r}){return t.create(`lists/${e}`,e,r)},getLatestVersion({id:e}){return t.get(`lists/${e}`)},update({id:e,data:r}){return t.put(`lists/${e}`,r)},delete({id:e}){return t.delete(`lists/${e}`)},getByVersion({id:e,version:r}){return t.get(`lists/${e}/${r}`)}}}function Un({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("memberships",u)},get({organizationId:e,userId:r}){return t.get(`memberships/${e}/${r}`)},update({organizationId:e,userId:r,data:n}){return t.put(`memberships/${e}/${r}`,n)},delete({organizationId:e,userId:r}){return t.delete(`memberships/${e}/${r}`)}}}function Ln({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("organization-exports",o)},create(){return t.post("organization-exports")},get({id:e}){return t.get(`organization-exports/${e}`)}}}function Fn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null}={}){const u={limit:e,offset:r,filter:n,q:s};return t.getAll("organizations",u)},create({data:e}){return t.post("organizations",e)},get({id:e}){return t.get(`organizations/${e}`)},update({id:e,data:r}){return t.patch(`organizations/${e}`,r)}}}function Kn({apiHandler:t}){return{getAll({limit:e=null,q:r=null}={}){const n={limit:e,q:r};return t.getAll("payment-cards-bank-names",n)}}}function zn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("payment-instruments",l)},create({data:e}){return t.post("payment-instruments",e)},get({id:e}){return t.get(`payment-instruments/${e}`)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)}}}function Vn({apiHandler:t}){return{getAll(){return t.getAll("payment-methods")},get({apiName:e}){return t.get(`payment-methods/${e}`)}}}function _n({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("tokens",n)},create({data:e}){return t.post("tokens",e)},get({token:e}){return t.get(`tokens/${e}`)}}}function Jn({apiHandler:t}){return{create({data:e}){return t.post("payouts",e)}}}function Wn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("plans",o)},create({id:e="",data:r}){return t.create(`plans/${e}`,e,r)},get({id:e}){return t.get(`plans/${e}`)},update({id:e,data:r}){return t.put(`plans/${e}`,r)},delete({id:e}){return t.delete(`plans/${e}`)}}}function Gn({apiHandler:t}){return{sendEmailRuleAction({data:e}){return t.post("previews/rule-actions/send-email",e)},triggerWebhookRuleAction({data:e}){return t.post("previews/rule-actions/trigger-webhook",e)},webhook({data:e}){return t.post("previews/webhooks",e)},order({data:e}){return t.post("previews/orders",e)}}}function Xn({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("products",o)},create({id:e="",data:r}){return t.create(`products/${e}`,e,r)},get({id:e}){return t.get(`products/${e}`)},update({id:e,data:r}){return t.put(`products/${e}`,r)},delete({id:e}){return t.delete(`products/${e}`)}}}function Yn({apiHandler:t}){return{startPermissionsEmulation({data:e}){return t.post("permissions-emulation",e)},stopPermissionsEmulation(){return t.delete("permissions-emulation")},get(){return t.get("profile")},update({data:e}){return t.put("profile",e)},getMfa(){return t.get("profile/mfa")},updateMfa(){return t.post("profile/mfa")},deleteMfa(){return t.delete("profile/mfa")},updatePassword({data:e}){return t.post("profile/password",e)},resetTotp(){return t.post("profile/totp-reset")}}}function Qn({apiHandler:t}){return{readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Zn({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:n,sort:s,q:u,expand:o};return t.getAll("roles",l)},create({id:e="",data:r}){return t.create(`roles/${e}`,e,r)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`roles/${e}`,n)},update({id:e,data:r}){return t.put(`roles/${e}`,r)},delete({id:e}){return t.delete(`roles/${e}`)}}}function Hn({apiHandler:t}){return{get({sort:e=null,limit:r=null,offset:n=null,q:s=null}){const u={sort:e,limit:r,offset:n,q:s};return t.get("search",u)}}}function es({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("grid-segments",o)},create({id:e="",data:r}){return t.create(`grid-segments/${e}`,e,r)},get({id:e}){return t.get(`grid-segments/${e}`)},update({id:e,data:r}){return t.put(`grid-segments/${e}`,r)},delete({id:e}){return t.delete(`grid-segments/${e}`)}}}function ts({apiHandler:t}){return{getAll({eventType:e}){return t.getAll(`send-through-attribution/${e}`)}}}function rs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null,q:u=null}={}){const o={limit:e,offset:r,filter:n,sort:s,q:u};return t.getAll("shipping-rates",o)},create({id:e="",data:r}){return t.create(`shipping-rates/${e}`,e,r)},get({id:e}){return t.get(`shipping-rates/${e}`)},update({id:e,data:r}){return t.put(`shipping-rates/${e}`,r)},delete({id:e}){return t.delete(`shipping-rates/${e}`)}}}function ns({apiHandler:t}){return{get(){return t.get("status")}}}function ss({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-cancellations",u)},create({id:e="",data:r}){return t.create(`subscription-cancellations/${e}`,e,r)},get({id:e}){return t.get(`subscription-cancellations/${e}`)},delete({id:e}){return t.delete(`subscription-cancellations/${e}`)},patch({id:e,data:r}){return t.patch(`subscription-cancellations/${e}`,r)}}}function us({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-pauses",u)},pause({id:e="",data:r}){return t.create(`subscription-pauses/${e}`,e,r)},get({id:e}){return t.get(`subscription-pauses/${e}`)},update({id:e,data:r}){return t.put(`subscription-pauses/${e}`,r)},delete({id:e}){return t.delete(`subscription-pauses/${e}`)}}}function os({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,sort:s=null}={}){const u={limit:e,offset:r,filter:n,sort:s};return t.getAll("subscription-reactivations",u)},reactivate({data:e}){return t.post("subscription-reactivations",e)},get({id:e}){return t.get(`subscription-reactivations/${e}`)}}}function ls({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("subscriptions",l)},create({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`subscriptions/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`subscriptions/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`subscriptions/${e}`,r,s)},delete({id:e}){return t.delete(`subscriptions/${e}`)},void({id:e}){return t.post(`subscriptions/${e}/void`)},changeItems({id:e,data:r}){return t.post(`subscriptions/${e}/change-items`,r)},createInterimInvoice({id:e,data:r}){return t.post(`subscriptions/${e}/interim-invoice`,r)},getAllUpcomingInvoices({id:e,expand:r=null}){const n={expand:r};return t.getAll(`subscriptions/${e}/upcoming-invoices`,n)},issueUpcomingInvoice({id:e,invoiceId:r,data:n}){return t.post(`subscriptions/${e}/upcoming-invoices/${r}/issue`,n)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null,sort:u=null,q:o=null}){const l={limit:r,offset:n,filter:s,sort:u,q:o};return t.getAll(`subscriptions/${e}/timeline`,l)},createTimelineComment({id:e,data:r}){return t.post(`subscriptions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`subscriptions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`subscriptions/${e}/timeline/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("subscriptions",l)}}}function is({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("tags",o)},create({data:e}){return t.post("tags",e)},get({tag:e}){return t.get(`tags/${e}`)},delete({tag:e}){return t.delete(`tags/${e}`)},update({tag:e,data:r}){return t.patch(`tags/${e}`,r)},tagCustomers({tag:e,data:r}){return t.post(`tags/${e}/customers`,r)},untagCustomers({tag:e,data:r}){return t.delete(`tags/${e}/customers`,r)},tagCustomer({tag:e,customerId:r}){return t.post(`tags/${e}/customers/${r}`)},untagCustomer({tag:e,customerId:r}){return t.delete(`tags/${e}/customers/${r}`)},tagKycDocuments({tag:e,data:r}){return t.post(`tags/${e}/kyc-documents`,r)},untagKycDocuments({tag:e,data:r}){return t.delete(`tags/${e}/kyc-documents`,r)},tagKycDocument({tag:e,kycDocumentId:r}){return t.post(`tags/${e}/kyc-documents/${r}`)},untagKycDocument({tag:e,kycDocumentId:r}){return t.delete(`tags/${e}/kyc-documents/${r}`)}}}function cs({apiHandler:t}){return{getAllApiLogs({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/api",o)},getApiLog({id:e}){return t.get(`tracking/api/${e}`)},getAllListsChangesHistory({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:e}){return t.get(`tracking/webhooks/${e}`)},resendWebhook({id:e}){return t.post(`tracking/webhooks/${e}/resend`)},downloadApiLogsCSV({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={params:{limit:e,offset:r,sort:n,filter:s,q:u},headers:D};return t.download("tracking/api",o)}}}function as({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null,expand:o=null}={}){const l={limit:e,offset:r,filter:n,q:s,sort:u,expand:o};return t.getAll("transactions",l)},create({data:e,expand:r=null}){const n={expand:r};return t.post("transactions",e,n)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`transactions/${e}`,n)},patch({id:e,data:r}){return t.patch(`transactions/${e}`,r)},query({id:e}){return t.post(`transactions/${e}/query`)},update({id:e,data:r}){return t.post(`transactions/${e}/update`,r)},refund({id:e,data:r}){return t.post(`transactions/${e}/refund`,r)},getAllTimelineMessages({id:e,limit:r=null,offset:n=null,filter:s=null}){const u={limit:r,offset:n,filter:s};return t.getAll(`transactions/${e}/timeline`,u)},createTimelineComment({id:e,data:r}){return t.post(`transactions/${e}/timeline`,r)},getTimelineMessage({id:e,messageId:r}){return t.get(`transactions/${e}/timeline/${r}`)},deleteTimelineMessage({id:e,messageId:r}){return t.delete(`transactions/${e}/timeline/${r}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.download("transactions",l)}}}function ms({apiHandler:t}){return{getResetPasswordToken({token:e}){return t.get(`reset-password/${e}`)},resetPassword({token:e,data:r}){return t.post(`reset-password/${e}`,r)},getAll({limit:e=null,offset:r=null,sort:n=null,filter:s=null,q:u=null}={}){const o={limit:e,offset:r,sort:n,filter:s,q:u};return t.getAll("users",o)},create({id:e="",data:r}){return t.create(`users/${e}`,e,r)},get({id:e}){return t.get(`users/${e}`)},update({id:e,data:r}){return t.put(`users/${e}`,r)},getMfa({id:e}){return t.get(`users/${e}/mfa`)},updatePassword({id:e,data:r}){return t.post(`users/${e}/password`,r)},resetTotp({id:e}){return t.post(`users/${e}/totp-reset`)}}}function fs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null}={}){const s={limit:e,offset:r,filter:n};return t.getAll("webhooks",s)},create({id:e="",data:r}){return t.create(`webhooks/${e}`,e,r)},get({id:e}){return t.get(`webhooks/${e}`)},update({id:e,data:r}){return t.put(`webhooks/${e}`,r)}}}function gs({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,q:n=null,filter:s=null,sort:u=null}={}){const o={limit:e,offset:r,q:n,filter:s,sort:u};return t.getAll("websites",o)},create({id:e="",data:r}){return t.create(`websites/${e}`,e,r)},get({id:e}){return t.get(`websites/${e}`)},update({id:e,data:r}){return t.put(`websites/${e}`,r)},delete({id:e}){return t.delete(`websites/${e}`)},downloadCSV({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null}={}){const l={params:{limit:e,offset:r,sort:n,expand:s,filter:u,q:o},headers:D};return t.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:t}){return{getCustomerLifetimeSummaryMetrics({customerId:e}){return t.get(`customers/${e}/summary-metrics`)}}}function ds({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,sort:n=null,expand:s=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:e,offset:r,sort:n,expand:s,filter:u,q:o,criteria:l};return t.getAll("data-exports",a)},queue({id:e="",data:r,expand:n=null}){const s={expand:n};return t.create(`data-exports/${e}`,e,r,s)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`data-exports/${e}`,n)},update({id:e,data:r,expand:n=null}){const s={expand:n};return t.put(`data-exports/${e}`,r,s)},delete({id:e}){return t.delete(`data-exports/${e}`)}}}function $s({apiHandler:t}){return{getTransactionHistogramReport({periodStart:e,periodEnd:r,aggregationField:n,aggregationPeriod:s,metric:u,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,aggregationPeriod:s,metric:u,filter:o};return t.get("histograms/transactions",l)}}}function ys({apiHandler:t}){return{getApiLogSummary({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/api-log-summary",u)},getCumulativeSubscriptions({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:e,periodEnd:r,metrics:n=null,segments:s=null}){const u={periodStart:e,periodEnd:r,metrics:n,segments:s};return t.get("reports/dashboard",u)},getDccMarkup({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/dcc-markup",l)},getDisputes({aggregationField:e,periodMonth:r,limit:n=null,offset:s=null,filter:u=null}){const o={aggregationField:e,periodMonth:r,limit:n,offset:s,filter:u};return t.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null}){const o={periodStart:r,periodEnd:n,limit:s,offset:u};return t.get(`reports/events-triggered/${e}/rules`,o)},getFutureRenewals({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/future-renewals",u)},getKycAcceptanceSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-acceptance-summary",n)},getKycRejectionSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-rejection-summary",n)},getKycRequestSummary({periodStart:e,periodEnd:r}){const n={periodStart:e,periodEnd:r};return t.get("reports/kyc-request-summary",n)},getMonthlyRecurringRevenue({currency:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null}){const o={currency:e,periodStart:r,periodEnd:n,limit:s,offset:u};return t.get("reports/monthly-recurring-revenue",o)},getRenewalSales({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:n=null,periodStart:s,periodEnd:u,limit:o=null,offset:l=null,filter:a=null,criteria:h=null}){const c={aggregationField:e,aggregationPeriod:r,includeSwitchedSubscriptions:n,periodStart:s,periodEnd:u,limit:o,offset:l,filter:a,criteria:h};return t.get("reports/retention-percentage",c)},getRetentionValue({aggregationField:e,aggregationPeriod:r,includeRefunds:n=null,includeDisputes:s=null,periodStart:u,periodEnd:o,limit:l=null,offset:a=null,filter:h=null,sort:c=null,criteria:g=null}){const w={aggregationField:e,aggregationPeriod:r,includeRefunds:n,includeDisputes:s,periodStart:u,periodEnd:o,limit:l,offset:a,filter:h,sort:c,criteria:g};return t.get("reports/retention-value",w)},getRevenueWaterfall({currency:e,issuedFrom:r,issuedTo:n,recognizedTo:s}){const u={currency:e,issuedFrom:r,issuedTo:n,recognizedTo:s};return t.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:e,periodEnd:r,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,limit:s,offset:u,filter:o};return t.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:e,periodEnd:r,limit:n=null,offset:s=null}){const u={periodStart:e,periodEnd:r,limit:n,offset:s};return t.get("reports/subscription-renewal",u)},getTimeSeriesTransaction({type:e,subaggregate:r,periodStart:n,periodEnd:s}){const u={type:e,subaggregate:r,periodStart:n,periodEnd:s};return t.get("reports/time-series-transaction",u)},getTransactionsTimeDispute({aggregationField:e,periodStart:r,periodEnd:n,limit:s=null,offset:u=null,filter:o=null}){const l={aggregationField:e,periodStart:r,periodEnd:n,limit:s,offset:u,filter:o};return t.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:e,periodEnd:r,aggregationField:n,limit:s=null,offset:u=null,filter:o=null}){const l={periodStart:e,periodEnd:r,aggregationField:n,limit:s,offset:u,filter:o};return t.get("reports/transactions",l)}}}function bs({apiHandler:t}){return{getSubscriptionSummaryMetrics({subscriptionId:e}){return t.get(`subscriptions/${e}/summary-metrics`)}}}function As({apiHandler:t}){return{getActivityFeed({eventTypes:e=null,limit:r=1e3,offset:n=0}){const s={eventTypes:e,limit:r,offset:n};return t.getAll("activity-feed",s)},getTransaction({id:e="",eventTypes:r=null,limit:n=1e3,offset:s=0}){const u={eventTypes:r,limit:n,offset:s};return t.getAll(`transactions/${e}/timeline`,u)},getCustomer({id:e="",eventTypes:r=null,limit:n=1e3,offset:s=0}){const u={eventTypes:r,limit:n,offset:s};return t.getAll(`customers/${e}/timeline`,u)}}}function vs({apiHandler:t}){return{query(){return t.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:t}){return{get(){return t.get("account")},update({data:e}){return t.patch("account",e)},requestPasswordReset({data:e}){return t.post("account/forgot-password",e)},changePassword({data:e}){return t.patch("account/password",e)},resendEmailVerification({data:e}){return t.post("account/resend-verification",e)},confirmPasswordReset({token:e,data:r}){return t.post(`account/reset-password/${e}`,r)},verifyEmail({token:e}){return t.post(`account/verification/${e}`)},register({data:e}){return t.post("register",e)}}}function Es({apiHandler:t}){return{login({data:e}){return t.post("login",e)},logout(){return t.post("logout")}}}function Ss({apiHandler:t}){return{get({slug:e}){return t.get(`billing-portals/${e}`)}}}function ks({apiHandler:t}){return{get({id:e}){return t.get(`checkout-forms/${e}`)}}}function Cs({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("invoices",o)},get({id:e}){return t.get(`invoices/${e}`)},downloadPDF({id:e}){const r={headers:Qe,responseType:"arraybuffer"};return t.download(`invoices/${e}`,r)}}}function Ts({apiHandler:t}){return{getAll({limit:e=null,offset:r=null}={}){const n={limit:e,offset:r};return t.getAll("kyc-documents",n)},create({data:e}){return t.post("kyc-documents",e)},get({id:e}){return t.get(`kyc-documents/${e}`)},update({id:e,data:r}){return t.patch(`kyc-documents/${e}`,r)}}}function xs({apiHandler:t}){return{get({id:e,expand:r=null}){const n={expand:r};return t.get(`kyc-requests/${e}`,n)}}}function Is({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("orders",o)},get({id:e}){return t.get(`orders/${e}`)},update({id:e,data:r}){return t.patch(`orders/${e}`,r)},cancel({id:e,data:r}){return t.post(`orders/${e}/cancellation`,r)}}}function Ps({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("payment-instruments",o)},create({data:e}){return t.post("payment-instruments",e)},get({id:e,limit:r=null,offset:n=null}){const s={limit:r,offset:n};return t.get(`payment-instruments/${e}`,s)},update({id:e,data:r}){return t.patch(`payment-instruments/${e}`,r)},deactivate({id:e}){return t.post(`payment-instruments/${e}/deactivation`)},getSetupTransaction({id:e}){return t.get(`payment-instruments/${e}/setup`)},setup({id:e,data:r}){return t.post(`payment-instruments/${e}/setup`,r)}}}function Os({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null,expand:o=null}={}){const l={filter:e,sort:r,limit:n,offset:s,q:u,expand:o};return t.getAll("plans",l)},get({id:e,expand:r=null}){const n={expand:r};return t.get(`plans/${e}`,n)}}}function js({apiHandler:t}){return{getAll({filter:e=null,sort:r=null,limit:n=null,offset:s=null,q:u=null}={}){const o={filter:e,sort:r,limit:n,offset:s,q:u};return t.getAll("products",o)},get({id:e}){return t.get(`products/${e}`)}}}function qs({apiHandler:t}){return{payment({data:e}){return t.post("payment",e)},purchase({data:e}){return t.post("purchase",e)},preview({data:e}){return t.post("preview-purchase",e)},readyToPay({data:e}){return t.post("ready-to-pay",e)}}}function Ds({apiHandler:t}){return{getAll({limit:e=null,offset:r=null,filter:n=null,q:s=null,sort:u=null}={}){const o={limit:e,offset:r,filter:n,q:s,sort:u};return t.getAll("transactions",o)},get({id:e}){return t.get(`transactions/${e}`)},update({id:e,data:r}){return t.patch(`transactions/${e}`,r)}}}function Ms({apiHandler:t}){return{get({id:e}){return t.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:t}){return new hs({apiHandler:t})}function Us({apiHandler:t}){return new ws({apiHandler:t})}function Ls({apiHandler:t}){return new Ns({apiHandler:t})}const ye={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},be=6e3;function Ze({apiKey:t=null,sandbox:e=!1,timeout:r=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:t,apiVersion:"",isSandbox:e,requestTimeout:r,jwt:null,organizationId:n}});return Bs({apiHandler:o})}function Fs({apiKey:t=null,sandbox:e=!1,timeout:r=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:t,apiVersion:"experimental",isSandbox:e,requestTimeout:r,jwt:null,organizationId:n}});return Us({apiHandler:o})}function Ks({publishableKey:t=null,jwt:e=null,sandbox:r=!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:t,jwt:e,apiVersion:"storefront",isSandbox:r,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.9.0",
3
+ "version": "47.11.1",
4
4
  "description": "Official Rebilly API JS library for the browser and Node",
5
5
  "types": "./dist/rebilly-js-sdk.d.ts",
6
6
  "main": "./dist/rebilly-js-sdk.umd.js",