@moonbase.sh/api 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ __export(src_exports, {
35
35
  ActivationStatus: () => ActivationStatus,
36
36
  ConflictError: () => ConflictError,
37
37
  LicenseStatus: () => LicenseStatus,
38
+ MoonbaseApi: () => MoonbaseApi,
38
39
  MoonbaseClient: () => MoonbaseClient,
39
40
  MoonbaseError: () => MoonbaseError,
40
41
  NotAuthenticatedError: () => NotAuthenticatedError,
@@ -42,7 +43,8 @@ __export(src_exports, {
42
43
  NotFoundError: () => NotFoundError,
43
44
  OrderStatus: () => OrderStatus,
44
45
  ProductStatus: () => ProductStatus,
45
- TrialStatus: () => TrialStatus
46
+ TrialStatus: () => TrialStatus,
47
+ objectToQuery: () => objectToQuery
46
48
  });
47
49
  module.exports = __toCommonJS(src_exports);
48
50
 
@@ -723,14 +725,14 @@ var MoonbaseClient = class {
723
725
  constructor(configuration) {
724
726
  this.configuration = configuration;
725
727
  this.configuration.endpoint = this.configuration.endpoint.replace(/\/$/, "");
726
- const api = new MoonbaseApi(this.configuration.endpoint, this.configuration.apiKey);
727
- this.activationRequests = new ActivationRequestEndpoints(api);
728
- this.customers = new CustomerEndpoints(api);
729
- this.licenses = new LicenseEndpoints(api);
730
- this.products = new ProductEndpoints(api);
731
- this.trials = new TrialEndpoints(api);
732
- this.vouchers = new VoucherEndpoints(api);
733
- this.orders = new OrderEndpoints(api);
728
+ this.api = new MoonbaseApi(this.configuration.endpoint, this.configuration.apiKey);
729
+ this.activationRequests = new ActivationRequestEndpoints(this.api);
730
+ this.customers = new CustomerEndpoints(this.api);
731
+ this.licenses = new LicenseEndpoints(this.api);
732
+ this.products = new ProductEndpoints(this.api);
733
+ this.trials = new TrialEndpoints(this.api);
734
+ this.vouchers = new VoucherEndpoints(this.api);
735
+ this.orders = new OrderEndpoints(this.api);
734
736
  }
735
737
  };
736
738
  // Annotate the CommonJS export names for ESM import in node:
@@ -740,6 +742,7 @@ var MoonbaseClient = class {
740
742
  ActivationStatus,
741
743
  ConflictError,
742
744
  LicenseStatus,
745
+ MoonbaseApi,
743
746
  MoonbaseClient,
744
747
  MoonbaseError,
745
748
  NotAuthenticatedError,
@@ -747,5 +750,6 @@ var MoonbaseClient = class {
747
750
  NotFoundError,
748
751
  OrderStatus,
749
752
  ProductStatus,
750
- TrialStatus
753
+ TrialStatus,
754
+ objectToQuery
751
755
  });
package/dist/index.d.cts CHANGED
@@ -6,6 +6,7 @@ interface Response {
6
6
  headers: Headers;
7
7
  status: number;
8
8
  }
9
+ declare function objectToQuery(obj?: Record<string, string | number | boolean>): string;
9
10
  declare class MoonbaseApi {
10
11
  baseUrl: string;
11
12
  private apiKey;
@@ -3852,6 +3853,7 @@ interface MoonbaseConfiguration {
3852
3853
  declare class MoonbaseClient {
3853
3854
  private readonly configuration;
3854
3855
  constructor(configuration: MoonbaseConfiguration);
3856
+ api: MoonbaseApi;
3855
3857
  activationRequests: ActivationRequestEndpoints;
3856
3858
  customers: CustomerEndpoints;
3857
3859
  licenses: LicenseEndpoints;
@@ -3861,4 +3863,4 @@ declare class MoonbaseClient {
3861
3863
  orders: OrderEndpoints;
3862
3864
  }
3863
3865
 
3864
- export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Order, OrderStatus, type Page, type PricingVariation, type Product, ProductStatus, type ProvisionLicensesRequest, type Quantifiable, type Trial, TrialStatus, type Voucher };
3866
+ export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseApi, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Order, OrderStatus, type Page, type PricingVariation, type Product, ProductStatus, type ProvisionLicensesRequest, type Quantifiable, type Trial, TrialStatus, type Voucher, objectToQuery };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ interface Response {
6
6
  headers: Headers;
7
7
  status: number;
8
8
  }
9
+ declare function objectToQuery(obj?: Record<string, string | number | boolean>): string;
9
10
  declare class MoonbaseApi {
10
11
  baseUrl: string;
11
12
  private apiKey;
@@ -3852,6 +3853,7 @@ interface MoonbaseConfiguration {
3852
3853
  declare class MoonbaseClient {
3853
3854
  private readonly configuration;
3854
3855
  constructor(configuration: MoonbaseConfiguration);
3856
+ api: MoonbaseApi;
3855
3857
  activationRequests: ActivationRequestEndpoints;
3856
3858
  customers: CustomerEndpoints;
3857
3859
  licenses: LicenseEndpoints;
@@ -3861,4 +3863,4 @@ declare class MoonbaseClient {
3861
3863
  orders: OrderEndpoints;
3862
3864
  }
3863
3865
 
3864
- export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Order, OrderStatus, type Page, type PricingVariation, type Product, ProductStatus, type ProvisionLicensesRequest, type Quantifiable, type Trial, TrialStatus, type Voucher };
3866
+ export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseApi, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Order, OrderStatus, type Page, type PricingVariation, type Product, ProductStatus, type ProvisionLicensesRequest, type Quantifiable, type Trial, TrialStatus, type Voucher, objectToQuery };
package/dist/index.js CHANGED
@@ -675,14 +675,14 @@ var MoonbaseClient = class {
675
675
  constructor(configuration) {
676
676
  this.configuration = configuration;
677
677
  this.configuration.endpoint = this.configuration.endpoint.replace(/\/$/, "");
678
- const api = new MoonbaseApi(this.configuration.endpoint, this.configuration.apiKey);
679
- this.activationRequests = new ActivationRequestEndpoints(api);
680
- this.customers = new CustomerEndpoints(api);
681
- this.licenses = new LicenseEndpoints(api);
682
- this.products = new ProductEndpoints(api);
683
- this.trials = new TrialEndpoints(api);
684
- this.vouchers = new VoucherEndpoints(api);
685
- this.orders = new OrderEndpoints(api);
678
+ this.api = new MoonbaseApi(this.configuration.endpoint, this.configuration.apiKey);
679
+ this.activationRequests = new ActivationRequestEndpoints(this.api);
680
+ this.customers = new CustomerEndpoints(this.api);
681
+ this.licenses = new LicenseEndpoints(this.api);
682
+ this.products = new ProductEndpoints(this.api);
683
+ this.trials = new TrialEndpoints(this.api);
684
+ this.vouchers = new VoucherEndpoints(this.api);
685
+ this.orders = new OrderEndpoints(this.api);
686
686
  }
687
687
  };
688
688
  export {
@@ -691,6 +691,7 @@ export {
691
691
  ActivationStatus,
692
692
  ConflictError,
693
693
  LicenseStatus,
694
+ MoonbaseApi,
694
695
  MoonbaseClient,
695
696
  MoonbaseError,
696
697
  NotAuthenticatedError,
@@ -698,5 +699,6 @@ export {
698
699
  NotFoundError,
699
700
  OrderStatus,
700
701
  ProductStatus,
701
- TrialStatus
702
+ TrialStatus,
703
+ objectToQuery
702
704
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/api",
3
3
  "type": "module",
4
- "version": "0.3.10",
4
+ "version": "0.3.11",
5
5
  "description": "Package to let you integrate backends with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",