@base44/sdk 0.4.0 → 0.5.0
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/client.d.ts +2 -2
- package/dist/modules/auth.d.ts +1 -1
- package/dist/modules/auth.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare function createClient(config: {
|
|
|
45
45
|
redirectToLogin(nextUrl: string): void;
|
|
46
46
|
logout(redirectUrl?: string): void;
|
|
47
47
|
setToken(token: string, saveToStorage?: boolean): void;
|
|
48
|
-
|
|
48
|
+
loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
|
|
49
49
|
access_token: string;
|
|
50
50
|
user: any;
|
|
51
51
|
}>;
|
|
@@ -86,7 +86,7 @@ export declare function createClientFromRequest(request: Request): {
|
|
|
86
86
|
redirectToLogin(nextUrl: string): void;
|
|
87
87
|
logout(redirectUrl?: string): void;
|
|
88
88
|
setToken(token: string, saveToStorage?: boolean): void;
|
|
89
|
-
|
|
89
|
+
loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
|
|
90
90
|
access_token: string;
|
|
91
91
|
user: any;
|
|
92
92
|
}>;
|
package/dist/modules/auth.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function createAuthModule(axios: AxiosInstance, functionsAxiosCli
|
|
|
49
49
|
* @param turnstileToken - Optional Turnstile captcha token
|
|
50
50
|
* @returns Login response with access_token and user
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
|
|
53
53
|
access_token: string;
|
|
54
54
|
user: any;
|
|
55
55
|
}>;
|
package/dist/modules/auth.js
CHANGED
|
@@ -103,7 +103,7 @@ export function createAuthModule(axios, functionsAxiosClient, appId) {
|
|
|
103
103
|
* @param turnstileToken - Optional Turnstile captcha token
|
|
104
104
|
* @returns Login response with access_token and user
|
|
105
105
|
*/
|
|
106
|
-
async
|
|
106
|
+
async loginViaEmailPassword(email, password, turnstileToken) {
|
|
107
107
|
var _a;
|
|
108
108
|
try {
|
|
109
109
|
const response = await axios.post(`/apps/${appId}/auth/login`, {
|