@moonbase.sh/storefront-api
Advanced tools
Comparing version 0.1.98 to 0.1.100
@@ -255,2 +255,8 @@ // src/activationRequests/endpoints.ts | ||
})); | ||
var userAccountConfirmedSchema = z7.object({ | ||
id: z7.string(), | ||
name: z7.string(), | ||
email: z7.string(), | ||
resetPasswordToken: z7.string().nullable() | ||
}); | ||
@@ -318,3 +324,3 @@ // src/identity/endpoints.ts | ||
async resetPassword(email, newPassword, code) { | ||
const response = await fetch(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(email)}&code=${code}`, { | ||
const response = await fetch(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, { | ||
method: "POST", | ||
@@ -331,2 +337,12 @@ headers: { | ||
} | ||
async confirmAccount(email, code) { | ||
const response = await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, "POST"); | ||
return userAccountConfirmedSchema.parse(response.data); | ||
} | ||
async confirmEmail(email, code) { | ||
await this.api.fetch(`/customer/identity/confirm-email?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, "POST"); | ||
} | ||
async confirmEmailChange(email, code) { | ||
await this.api.authenticatedFetch(`/customer/identity/confirm-email-change?email=${encodeURIComponent(email)}&code=${encodeURIComponent(code.replaceAll(" ", "+"))}`, "POST"); | ||
} | ||
}; | ||
@@ -333,0 +349,0 @@ |
{ | ||
"name": "@moonbase.sh/storefront-api", | ||
"type": "module", | ||
"version": "0.1.98", | ||
"version": "0.1.100", | ||
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider", | ||
@@ -6,0 +6,0 @@ "author": "Tobias Lønnerød Madsen <m@dsen.tv>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1047385
14690