@moonbase.sh/vue 0.1.97 → 0.1.100

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
@@ -524,8 +524,6 @@ function useAuth() {
524
524
  return result;
525
525
  },
526
526
  setPassword: async (currentPassword, newPassword) => {
527
- if (!storefront.currentUser.value)
528
- throw new Error("No user loaded");
529
527
  await storefront.client.identity.setPassword(currentPassword, newPassword);
530
528
  },
531
529
  forgotPassword: async (email) => {
@@ -533,6 +531,15 @@ function useAuth() {
533
531
  },
534
532
  resetPassword: async (email, newPassword, code) => {
535
533
  await storefront.client.identity.resetPassword(email, newPassword, code);
534
+ },
535
+ confirmAccount: async (email, code) => {
536
+ return await storefront.client.identity.confirmAccount(email, code);
537
+ },
538
+ confirmEmail: async (email, code) => {
539
+ return await storefront.client.identity.confirmEmail(email, code);
540
+ },
541
+ confirmEmailChange: async (email, code) => {
542
+ return await storefront.client.identity.confirmEmailChange(email, code);
536
543
  }
537
544
  };
538
545
  }
package/dist/index.d.cts CHANGED
@@ -966,6 +966,14 @@ declare function useAuth(): {
966
966
  setPassword: (currentPassword: string, newPassword: string) => Promise<void>;
967
967
  forgotPassword: (email: string) => Promise<void>;
968
968
  resetPassword: (email: string, newPassword: string, code: string) => Promise<void>;
969
+ confirmAccount: (email: string, code: string) => Promise<{
970
+ id: string;
971
+ email: string;
972
+ name: string;
973
+ resetPasswordToken: string | null;
974
+ }>;
975
+ confirmEmail: (email: string, code: string) => Promise<void>;
976
+ confirmEmailChange: (email: string, code: string) => Promise<void>;
969
977
  };
970
978
 
971
979
  declare const storefrontKey: InjectionKey<StorefrontContext>;
package/dist/index.d.ts CHANGED
@@ -966,6 +966,14 @@ declare function useAuth(): {
966
966
  setPassword: (currentPassword: string, newPassword: string) => Promise<void>;
967
967
  forgotPassword: (email: string) => Promise<void>;
968
968
  resetPassword: (email: string, newPassword: string, code: string) => Promise<void>;
969
+ confirmAccount: (email: string, code: string) => Promise<{
970
+ id: string;
971
+ email: string;
972
+ name: string;
973
+ resetPasswordToken: string | null;
974
+ }>;
975
+ confirmEmail: (email: string, code: string) => Promise<void>;
976
+ confirmEmailChange: (email: string, code: string) => Promise<void>;
969
977
  };
970
978
 
971
979
  declare const storefrontKey: InjectionKey<StorefrontContext>;
package/dist/index.js CHANGED
@@ -489,8 +489,6 @@ function useAuth() {
489
489
  return result;
490
490
  },
491
491
  setPassword: async (currentPassword, newPassword) => {
492
- if (!storefront.currentUser.value)
493
- throw new Error("No user loaded");
494
492
  await storefront.client.identity.setPassword(currentPassword, newPassword);
495
493
  },
496
494
  forgotPassword: async (email) => {
@@ -498,6 +496,15 @@ function useAuth() {
498
496
  },
499
497
  resetPassword: async (email, newPassword, code) => {
500
498
  await storefront.client.identity.resetPassword(email, newPassword, code);
499
+ },
500
+ confirmAccount: async (email, code) => {
501
+ return await storefront.client.identity.confirmAccount(email, code);
502
+ },
503
+ confirmEmail: async (email, code) => {
504
+ return await storefront.client.identity.confirmEmail(email, code);
505
+ },
506
+ confirmEmailChange: async (email, code) => {
507
+ return await storefront.client.identity.confirmEmailChange(email, code);
501
508
  }
502
509
  };
503
510
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/vue",
3
3
  "type": "module",
4
- "version": "0.1.97",
4
+ "version": "0.1.100",
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/storefront-api": "0.1.97"
21
+ "@moonbase.sh/storefront-api": "0.1.100"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/uuid": "^9.0.7",