@moonbase.sh/vue 0.2.33 → 0.2.35
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 +3 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -250,6 +250,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
250
250
|
} finally {
|
|
251
251
|
this.loadedUser.value = true;
|
|
252
252
|
}
|
|
253
|
+
return this.currentUser.value;
|
|
253
254
|
}
|
|
254
255
|
async updateStorefront() {
|
|
255
256
|
const latestStorefront = await this.client.storefront.get(this.hasUtm.value ? this.utm.value : void 0);
|
|
@@ -262,6 +263,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
262
263
|
this.currentOrder.value.currency = latestStorefront.suggestedCurrency;
|
|
263
264
|
}
|
|
264
265
|
}
|
|
266
|
+
return latestStorefront;
|
|
265
267
|
}
|
|
266
268
|
async pushOrderContent() {
|
|
267
269
|
if (typeof window !== "undefined")
|
|
@@ -709,7 +711,7 @@ function useAuth(context) {
|
|
|
709
711
|
},
|
|
710
712
|
confirmEmailChange: async (email, code) => {
|
|
711
713
|
await storefront.client.identity.confirmEmailChange(email, code);
|
|
712
|
-
|
|
714
|
+
return await storefront.updateUser();
|
|
713
715
|
}
|
|
714
716
|
};
|
|
715
717
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -16,8 +16,8 @@ interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
|
16
16
|
loadedUser: Ref<boolean>;
|
|
17
17
|
loadedUserPromise: Promise<void>;
|
|
18
18
|
client: MoonbaseClient;
|
|
19
|
-
updateUser: () => Promise<
|
|
20
|
-
updateStorefront: () => Promise<
|
|
19
|
+
updateUser: () => Promise<User | null>;
|
|
20
|
+
updateStorefront: () => Promise<Storefront>;
|
|
21
21
|
pushOrderContent: () => Promise<void>;
|
|
22
22
|
resetOrder: () => void;
|
|
23
23
|
closeCheckout: () => void;
|
|
@@ -797,7 +797,24 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
797
797
|
resetPasswordToken: string | null;
|
|
798
798
|
}>;
|
|
799
799
|
confirmEmail: (email: string, code: string) => Promise<void>;
|
|
800
|
-
confirmEmailChange: (email: string, code: string) => Promise<
|
|
800
|
+
confirmEmailChange: (email: string, code: string) => Promise<{
|
|
801
|
+
id: string;
|
|
802
|
+
email: string;
|
|
803
|
+
name: string;
|
|
804
|
+
tenantId: string;
|
|
805
|
+
communicationPreferences: {
|
|
806
|
+
newsletterOptIn: boolean;
|
|
807
|
+
};
|
|
808
|
+
address?: {
|
|
809
|
+
countryCode: string;
|
|
810
|
+
streetAddress1: string;
|
|
811
|
+
streetAddress2: string | null;
|
|
812
|
+
locality: string | null;
|
|
813
|
+
region: string | null;
|
|
814
|
+
postCode: string;
|
|
815
|
+
} | undefined;
|
|
816
|
+
ownedProducts?: string[] | undefined;
|
|
817
|
+
} | null>;
|
|
801
818
|
};
|
|
802
819
|
|
|
803
820
|
declare const storefrontKey: InjectionKey<StorefrontContext>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
|
16
16
|
loadedUser: Ref<boolean>;
|
|
17
17
|
loadedUserPromise: Promise<void>;
|
|
18
18
|
client: MoonbaseClient;
|
|
19
|
-
updateUser: () => Promise<
|
|
20
|
-
updateStorefront: () => Promise<
|
|
19
|
+
updateUser: () => Promise<User | null>;
|
|
20
|
+
updateStorefront: () => Promise<Storefront>;
|
|
21
21
|
pushOrderContent: () => Promise<void>;
|
|
22
22
|
resetOrder: () => void;
|
|
23
23
|
closeCheckout: () => void;
|
|
@@ -797,7 +797,24 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
797
797
|
resetPasswordToken: string | null;
|
|
798
798
|
}>;
|
|
799
799
|
confirmEmail: (email: string, code: string) => Promise<void>;
|
|
800
|
-
confirmEmailChange: (email: string, code: string) => Promise<
|
|
800
|
+
confirmEmailChange: (email: string, code: string) => Promise<{
|
|
801
|
+
id: string;
|
|
802
|
+
email: string;
|
|
803
|
+
name: string;
|
|
804
|
+
tenantId: string;
|
|
805
|
+
communicationPreferences: {
|
|
806
|
+
newsletterOptIn: boolean;
|
|
807
|
+
};
|
|
808
|
+
address?: {
|
|
809
|
+
countryCode: string;
|
|
810
|
+
streetAddress1: string;
|
|
811
|
+
streetAddress2: string | null;
|
|
812
|
+
locality: string | null;
|
|
813
|
+
region: string | null;
|
|
814
|
+
postCode: string;
|
|
815
|
+
} | undefined;
|
|
816
|
+
ownedProducts?: string[] | undefined;
|
|
817
|
+
} | null>;
|
|
801
818
|
};
|
|
802
819
|
|
|
803
820
|
declare const storefrontKey: InjectionKey<StorefrontContext>;
|
package/dist/index.js
CHANGED
|
@@ -215,6 +215,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
215
215
|
} finally {
|
|
216
216
|
this.loadedUser.value = true;
|
|
217
217
|
}
|
|
218
|
+
return this.currentUser.value;
|
|
218
219
|
}
|
|
219
220
|
async updateStorefront() {
|
|
220
221
|
const latestStorefront = await this.client.storefront.get(this.hasUtm.value ? this.utm.value : void 0);
|
|
@@ -227,6 +228,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
227
228
|
this.currentOrder.value.currency = latestStorefront.suggestedCurrency;
|
|
228
229
|
}
|
|
229
230
|
}
|
|
231
|
+
return latestStorefront;
|
|
230
232
|
}
|
|
231
233
|
async pushOrderContent() {
|
|
232
234
|
if (typeof window !== "undefined")
|
|
@@ -674,7 +676,7 @@ function useAuth(context) {
|
|
|
674
676
|
},
|
|
675
677
|
confirmEmailChange: async (email, code) => {
|
|
676
678
|
await storefront.client.identity.confirmEmailChange(email, code);
|
|
677
|
-
|
|
679
|
+
return await storefront.updateUser();
|
|
678
680
|
}
|
|
679
681
|
};
|
|
680
682
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.35",
|
|
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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vue/devtools-api": "^6.6.3",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
21
|
"zod": "^3.23.8",
|
|
22
|
-
"@moonbase.sh/storefront-api": "0.2.
|
|
22
|
+
"@moonbase.sh/storefront-api": "0.2.35"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|