@moonbase.sh/storefront-api 0.2.81 → 0.2.83
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 +20 -0
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +20 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -929,6 +929,25 @@ var InventoryEndpoints = class {
|
|
|
929
929
|
}
|
|
930
930
|
};
|
|
931
931
|
|
|
932
|
+
// src/vendor/schemas.ts
|
|
933
|
+
var import_zod13 = require("zod");
|
|
934
|
+
var vendorSchema = import_zod13.z.object({
|
|
935
|
+
id: import_zod13.z.string(),
|
|
936
|
+
name: import_zod13.z.string(),
|
|
937
|
+
logoUrl: import_zod13.z.string().nullable()
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
// src/vendor/endpoints.ts
|
|
941
|
+
var VendorEndpoints = class {
|
|
942
|
+
constructor(api) {
|
|
943
|
+
this.api = api;
|
|
944
|
+
}
|
|
945
|
+
async get() {
|
|
946
|
+
const response = await this.api.fetch(`/api/public/vendors/current`, vendorSchema);
|
|
947
|
+
return response.data;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
|
|
932
951
|
// src/schemas.ts
|
|
933
952
|
var schemas_exports2 = {};
|
|
934
953
|
__export(schemas_exports2, {
|
|
@@ -948,6 +967,7 @@ var MoonbaseClient = class {
|
|
|
948
967
|
this.orders = new OrderEndpoints(api);
|
|
949
968
|
this.inventory = new InventoryEndpoints(api);
|
|
950
969
|
this.activationRequests = new ActivationRequestEndpoints(api);
|
|
970
|
+
this.vendor = new VendorEndpoints(api);
|
|
951
971
|
}
|
|
952
972
|
};
|
|
953
973
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.cts
CHANGED
|
@@ -8263,6 +8263,28 @@ declare class InventoryEndpoints {
|
|
|
8263
8263
|
activation: ActivationEndpoints;
|
|
8264
8264
|
}
|
|
8265
8265
|
|
|
8266
|
+
declare const vendorSchema: z.ZodObject<{
|
|
8267
|
+
id: z.ZodString;
|
|
8268
|
+
name: z.ZodString;
|
|
8269
|
+
logoUrl: z.ZodNullable<z.ZodString>;
|
|
8270
|
+
}, "strip", z.ZodTypeAny, {
|
|
8271
|
+
id: string;
|
|
8272
|
+
name: string;
|
|
8273
|
+
logoUrl: string | null;
|
|
8274
|
+
}, {
|
|
8275
|
+
id: string;
|
|
8276
|
+
name: string;
|
|
8277
|
+
logoUrl: string | null;
|
|
8278
|
+
}>;
|
|
8279
|
+
|
|
8280
|
+
type Vendor = z.infer<typeof vendorSchema>;
|
|
8281
|
+
|
|
8282
|
+
declare class VendorEndpoints {
|
|
8283
|
+
private api;
|
|
8284
|
+
constructor(api: MoonbaseApi);
|
|
8285
|
+
get(): Promise<Vendor>;
|
|
8286
|
+
}
|
|
8287
|
+
|
|
8266
8288
|
declare const storefrontProductSchema: z.ZodObject<{
|
|
8267
8289
|
id: z.ZodString;
|
|
8268
8290
|
name: z.ZodString;
|
|
@@ -10749,7 +10771,8 @@ declare class MoonbaseClient {
|
|
|
10749
10771
|
vouchers: VoucherEndpoints;
|
|
10750
10772
|
activationRequests: ActivationRequestEndpoints;
|
|
10751
10773
|
inventory: InventoryEndpoints;
|
|
10774
|
+
vendor: VendorEndpoints;
|
|
10752
10775
|
orders: OrderEndpoints;
|
|
10753
10776
|
}
|
|
10754
10777
|
|
|
10755
|
-
export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, type Discount, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Voucher, schemas, utmToObject };
|
|
10778
|
+
export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, type Discount, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
|
package/dist/index.d.ts
CHANGED
|
@@ -8263,6 +8263,28 @@ declare class InventoryEndpoints {
|
|
|
8263
8263
|
activation: ActivationEndpoints;
|
|
8264
8264
|
}
|
|
8265
8265
|
|
|
8266
|
+
declare const vendorSchema: z.ZodObject<{
|
|
8267
|
+
id: z.ZodString;
|
|
8268
|
+
name: z.ZodString;
|
|
8269
|
+
logoUrl: z.ZodNullable<z.ZodString>;
|
|
8270
|
+
}, "strip", z.ZodTypeAny, {
|
|
8271
|
+
id: string;
|
|
8272
|
+
name: string;
|
|
8273
|
+
logoUrl: string | null;
|
|
8274
|
+
}, {
|
|
8275
|
+
id: string;
|
|
8276
|
+
name: string;
|
|
8277
|
+
logoUrl: string | null;
|
|
8278
|
+
}>;
|
|
8279
|
+
|
|
8280
|
+
type Vendor = z.infer<typeof vendorSchema>;
|
|
8281
|
+
|
|
8282
|
+
declare class VendorEndpoints {
|
|
8283
|
+
private api;
|
|
8284
|
+
constructor(api: MoonbaseApi);
|
|
8285
|
+
get(): Promise<Vendor>;
|
|
8286
|
+
}
|
|
8287
|
+
|
|
8266
8288
|
declare const storefrontProductSchema: z.ZodObject<{
|
|
8267
8289
|
id: z.ZodString;
|
|
8268
8290
|
name: z.ZodString;
|
|
@@ -10749,7 +10771,8 @@ declare class MoonbaseClient {
|
|
|
10749
10771
|
vouchers: VoucherEndpoints;
|
|
10750
10772
|
activationRequests: ActivationRequestEndpoints;
|
|
10751
10773
|
inventory: InventoryEndpoints;
|
|
10774
|
+
vendor: VendorEndpoints;
|
|
10752
10775
|
orders: OrderEndpoints;
|
|
10753
10776
|
}
|
|
10754
10777
|
|
|
10755
|
-
export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, type Discount, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Voucher, schemas, utmToObject };
|
|
10778
|
+
export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, type Discount, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
|
package/dist/index.js
CHANGED
|
@@ -887,6 +887,25 @@ var InventoryEndpoints = class {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
|
|
890
|
+
// src/vendor/schemas.ts
|
|
891
|
+
import { z as z13 } from "zod";
|
|
892
|
+
var vendorSchema = z13.object({
|
|
893
|
+
id: z13.string(),
|
|
894
|
+
name: z13.string(),
|
|
895
|
+
logoUrl: z13.string().nullable()
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
// src/vendor/endpoints.ts
|
|
899
|
+
var VendorEndpoints = class {
|
|
900
|
+
constructor(api) {
|
|
901
|
+
this.api = api;
|
|
902
|
+
}
|
|
903
|
+
async get() {
|
|
904
|
+
const response = await this.api.fetch(`/api/public/vendors/current`, vendorSchema);
|
|
905
|
+
return response.data;
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
|
|
890
909
|
// src/schemas.ts
|
|
891
910
|
var schemas_exports2 = {};
|
|
892
911
|
__export(schemas_exports2, {
|
|
@@ -906,6 +925,7 @@ var MoonbaseClient = class {
|
|
|
906
925
|
this.orders = new OrderEndpoints(api);
|
|
907
926
|
this.inventory = new InventoryEndpoints(api);
|
|
908
927
|
this.activationRequests = new ActivationRequestEndpoints(api);
|
|
928
|
+
this.vendor = new VendorEndpoints(api);
|
|
909
929
|
}
|
|
910
930
|
};
|
|
911
931
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.83",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|