@base44-preview/sdk 0.5.0-pr.21.09093c1 → 0.5.0-pr.22.930030a
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 +26 -0
- package/dist/client.js +1 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -35,6 +35,19 @@ export declare function createClient(config: {
|
|
|
35
35
|
functions: {
|
|
36
36
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
37
37
|
};
|
|
38
|
+
auth: {
|
|
39
|
+
me(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
40
|
+
getSsoAccessToken(userid: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
41
|
+
updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
42
|
+
redirectToLogin(nextUrl: string): void;
|
|
43
|
+
logout(redirectUrl?: string): void;
|
|
44
|
+
setToken(token: string, saveToStorage?: boolean): void;
|
|
45
|
+
loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
|
|
46
|
+
access_token: string;
|
|
47
|
+
user: any;
|
|
48
|
+
}>;
|
|
49
|
+
isAuthenticated(): Promise<boolean>;
|
|
50
|
+
};
|
|
38
51
|
};
|
|
39
52
|
entities: {};
|
|
40
53
|
integrations: {};
|
|
@@ -76,6 +89,19 @@ export declare function createClientFromRequest(request: Request): {
|
|
|
76
89
|
functions: {
|
|
77
90
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
78
91
|
};
|
|
92
|
+
auth: {
|
|
93
|
+
me(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
94
|
+
getSsoAccessToken(userid: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
95
|
+
updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
96
|
+
redirectToLogin(nextUrl: string): void;
|
|
97
|
+
logout(redirectUrl?: string): void;
|
|
98
|
+
setToken(token: string, saveToStorage?: boolean): void;
|
|
99
|
+
loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
|
|
100
|
+
access_token: string;
|
|
101
|
+
user: any;
|
|
102
|
+
}>;
|
|
103
|
+
isAuthenticated(): Promise<boolean>;
|
|
104
|
+
};
|
|
79
105
|
};
|
|
80
106
|
entities: {};
|
|
81
107
|
integrations: {};
|
package/dist/client.js
CHANGED
|
@@ -66,6 +66,7 @@ export function createClient(config) {
|
|
|
66
66
|
entities: createEntitiesModule(serviceRoleAxiosClient, appId),
|
|
67
67
|
integrations: createIntegrationsModule(serviceRoleAxiosClient, appId),
|
|
68
68
|
functions: createFunctionsModule(serviceRoleFunctionsAxiosClient, appId),
|
|
69
|
+
auth: createAuthModule(axiosClient, functionsAxiosClient, appId),
|
|
69
70
|
};
|
|
70
71
|
// Always try to get token from localStorage or URL parameters
|
|
71
72
|
if (typeof window !== "undefined") {
|