@moonbase.sh/vue 0.1.52 → 0.1.54
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.d.cts +77 -2
- package/dist/index.d.ts +77 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -33,7 +33,82 @@ declare function useProduct(productId: string): Ref<StorefrontProduct | null>;
|
|
|
33
33
|
declare function useProducts(): Ref<StorefrontProduct[]>;
|
|
34
34
|
|
|
35
35
|
declare function useCart(): {
|
|
36
|
-
items: vue.ComputedRef<
|
|
36
|
+
items: vue.ComputedRef<({
|
|
37
|
+
type: "Product";
|
|
38
|
+
id: string;
|
|
39
|
+
productId: string;
|
|
40
|
+
quantity: number;
|
|
41
|
+
variationId: string;
|
|
42
|
+
price?: Record<string, number> | undefined;
|
|
43
|
+
variation?: {
|
|
44
|
+
id: string;
|
|
45
|
+
price: Record<string, number>;
|
|
46
|
+
name: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
product?: {
|
|
49
|
+
type: "product";
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
tagline: string;
|
|
53
|
+
iconUrl: string;
|
|
54
|
+
defaultVariation?: {
|
|
55
|
+
id: string;
|
|
56
|
+
price: Record<string, number>;
|
|
57
|
+
name: string;
|
|
58
|
+
} | undefined;
|
|
59
|
+
variations?: {
|
|
60
|
+
id: string;
|
|
61
|
+
price: Record<string, number>;
|
|
62
|
+
name: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
type: "Bundle";
|
|
67
|
+
id: string;
|
|
68
|
+
quantity: number;
|
|
69
|
+
variationId: string;
|
|
70
|
+
bundleId: string;
|
|
71
|
+
price?: Record<string, number> | undefined;
|
|
72
|
+
variation?: {
|
|
73
|
+
id: string;
|
|
74
|
+
price: Record<string, number>;
|
|
75
|
+
name: string;
|
|
76
|
+
} | undefined;
|
|
77
|
+
bundle?: {
|
|
78
|
+
type: "bundle";
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
tagline: string;
|
|
82
|
+
iconUrl: string;
|
|
83
|
+
products: {
|
|
84
|
+
type: "product";
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
tagline: string;
|
|
88
|
+
iconUrl: string;
|
|
89
|
+
defaultVariation?: {
|
|
90
|
+
id: string;
|
|
91
|
+
price: Record<string, number>;
|
|
92
|
+
name: string;
|
|
93
|
+
} | undefined;
|
|
94
|
+
variations?: {
|
|
95
|
+
id: string;
|
|
96
|
+
price: Record<string, number>;
|
|
97
|
+
name: string;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
defaultVariation?: {
|
|
101
|
+
id: string;
|
|
102
|
+
price: Record<string, number>;
|
|
103
|
+
name: string;
|
|
104
|
+
} | undefined;
|
|
105
|
+
variations?: {
|
|
106
|
+
id: string;
|
|
107
|
+
price: Record<string, number>;
|
|
108
|
+
name: string;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
})[]>;
|
|
37
112
|
currency: vue.ComputedRef<string>;
|
|
38
113
|
total: vue.ComputedRef<{
|
|
39
114
|
amount: number;
|
|
@@ -103,7 +178,7 @@ declare const storefrontKey: InjectionKey<StorefrontContext>;
|
|
|
103
178
|
interface Cart {
|
|
104
179
|
items: CartItem[];
|
|
105
180
|
}
|
|
106
|
-
type CartItem = LineItem
|
|
181
|
+
type CartItem = LineItem;
|
|
107
182
|
declare function createStorefront(endpoint: string, stateFactory?: StateFactory): StorefrontContext;
|
|
108
183
|
|
|
109
184
|
export { type Cart, type CartItem, createStorefront, storefrontKey, useAuth, useBundle, useBundles, useCart, useProduct, useProducts };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,82 @@ declare function useProduct(productId: string): Ref<StorefrontProduct | null>;
|
|
|
33
33
|
declare function useProducts(): Ref<StorefrontProduct[]>;
|
|
34
34
|
|
|
35
35
|
declare function useCart(): {
|
|
36
|
-
items: vue.ComputedRef<
|
|
36
|
+
items: vue.ComputedRef<({
|
|
37
|
+
type: "Product";
|
|
38
|
+
id: string;
|
|
39
|
+
productId: string;
|
|
40
|
+
quantity: number;
|
|
41
|
+
variationId: string;
|
|
42
|
+
price?: Record<string, number> | undefined;
|
|
43
|
+
variation?: {
|
|
44
|
+
id: string;
|
|
45
|
+
price: Record<string, number>;
|
|
46
|
+
name: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
product?: {
|
|
49
|
+
type: "product";
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
tagline: string;
|
|
53
|
+
iconUrl: string;
|
|
54
|
+
defaultVariation?: {
|
|
55
|
+
id: string;
|
|
56
|
+
price: Record<string, number>;
|
|
57
|
+
name: string;
|
|
58
|
+
} | undefined;
|
|
59
|
+
variations?: {
|
|
60
|
+
id: string;
|
|
61
|
+
price: Record<string, number>;
|
|
62
|
+
name: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
type: "Bundle";
|
|
67
|
+
id: string;
|
|
68
|
+
quantity: number;
|
|
69
|
+
variationId: string;
|
|
70
|
+
bundleId: string;
|
|
71
|
+
price?: Record<string, number> | undefined;
|
|
72
|
+
variation?: {
|
|
73
|
+
id: string;
|
|
74
|
+
price: Record<string, number>;
|
|
75
|
+
name: string;
|
|
76
|
+
} | undefined;
|
|
77
|
+
bundle?: {
|
|
78
|
+
type: "bundle";
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
tagline: string;
|
|
82
|
+
iconUrl: string;
|
|
83
|
+
products: {
|
|
84
|
+
type: "product";
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
tagline: string;
|
|
88
|
+
iconUrl: string;
|
|
89
|
+
defaultVariation?: {
|
|
90
|
+
id: string;
|
|
91
|
+
price: Record<string, number>;
|
|
92
|
+
name: string;
|
|
93
|
+
} | undefined;
|
|
94
|
+
variations?: {
|
|
95
|
+
id: string;
|
|
96
|
+
price: Record<string, number>;
|
|
97
|
+
name: string;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
defaultVariation?: {
|
|
101
|
+
id: string;
|
|
102
|
+
price: Record<string, number>;
|
|
103
|
+
name: string;
|
|
104
|
+
} | undefined;
|
|
105
|
+
variations?: {
|
|
106
|
+
id: string;
|
|
107
|
+
price: Record<string, number>;
|
|
108
|
+
name: string;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
})[]>;
|
|
37
112
|
currency: vue.ComputedRef<string>;
|
|
38
113
|
total: vue.ComputedRef<{
|
|
39
114
|
amount: number;
|
|
@@ -103,7 +178,7 @@ declare const storefrontKey: InjectionKey<StorefrontContext>;
|
|
|
103
178
|
interface Cart {
|
|
104
179
|
items: CartItem[];
|
|
105
180
|
}
|
|
106
|
-
type CartItem = LineItem
|
|
181
|
+
type CartItem = LineItem;
|
|
107
182
|
declare function createStorefront(endpoint: string, stateFactory?: StateFactory): StorefrontContext;
|
|
108
183
|
|
|
109
184
|
export { type Cart, type CartItem, createStorefront, storefrontKey, useAuth, useBundle, useBundles, useCart, useProduct, useProducts };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.54",
|
|
5
5
|
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@vue/devtools-api": "^6.5.1",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
|
-
"@moonbase.sh/api-client": "0.1.
|
|
21
|
+
"@moonbase.sh/api-client": "0.1.54"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/uuid": "^9.0.7",
|