@leisuresaas/react-native 0.6.2 → 0.6.3-dev.1
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/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/public-auth.ts +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leisuresaas/react-native",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3-dev.1",
|
|
4
4
|
"description": "React Native SDK for LeisureSaas: OAuth, Public Ads/App Config, Drive User Plane (publishable keys). Frontend-only — no Integration Key.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/src/index.ts
CHANGED
package/src/public-auth.ts
CHANGED
|
@@ -138,6 +138,18 @@ export async function requestProductEmailVerification(
|
|
|
138
138
|
await publicAuthRequest(ctx, "/email-verification", { email: input.email, locale: input.locale ?? "" });
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
export async function confirmProductEmailVerification(ctx: PublicAuthContext, token: string): Promise<ProductAuthTokens> {
|
|
142
|
+
const resp = await publicAuthRequest<TokenJSON>(ctx, "/email-verification/confirm", { token });
|
|
143
|
+
return tokensFromJSON(resp);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function confirmProductPasswordReset(
|
|
147
|
+
ctx: PublicAuthContext,
|
|
148
|
+
input: { token: string; newPassword: string },
|
|
149
|
+
): Promise<void> {
|
|
150
|
+
await publicAuthRequest(ctx, "/password-reset/confirm", { token: input.token, new_password: input.newPassword });
|
|
151
|
+
}
|
|
152
|
+
|
|
141
153
|
export async function changeProductPassword(
|
|
142
154
|
ctx: PublicAuthContext,
|
|
143
155
|
accessToken: string,
|