@base44-preview/sdk 0.4.0-pr.17.d68d3d1 → 0.5.0-pr.21.2b7656a
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 +2 -1
- package/dist/modules/auth.js +5 -2
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare function createClient(config: {
|
|
|
40
40
|
integrations: {};
|
|
41
41
|
auth: {
|
|
42
42
|
me(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
|
-
getSsoAccessToken(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
|
+
getSsoAccessToken(userid?: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
44
|
updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
45
45
|
redirectToLogin(nextUrl: string): void;
|
|
46
46
|
logout(redirectUrl?: string): void;
|
|
@@ -81,7 +81,7 @@ export declare function createClientFromRequest(request: Request): {
|
|
|
81
81
|
integrations: {};
|
|
82
82
|
auth: {
|
|
83
83
|
me(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
84
|
-
getSsoAccessToken(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
84
|
+
getSsoAccessToken(userid?: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
85
85
|
updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
86
86
|
redirectToLogin(nextUrl: string): void;
|
|
87
87
|
logout(redirectUrl?: string): void;
|
package/dist/modules/auth.d.ts
CHANGED
|
@@ -14,9 +14,10 @@ export declare function createAuthModule(axios: AxiosInstance, functionsAxiosCli
|
|
|
14
14
|
me(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
15
15
|
/**
|
|
16
16
|
* Get current user sso access token
|
|
17
|
+
* @param {string} [userid] - Optional user ID to include as URL parameter
|
|
17
18
|
* @returns {Promise<Object>} Current user sso access_token
|
|
18
19
|
*/
|
|
19
|
-
getSsoAccessToken(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
20
|
+
getSsoAccessToken(userid?: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
20
21
|
/**
|
|
21
22
|
* Update current user data
|
|
22
23
|
* @param {Object} data - Updated user data
|
package/dist/modules/auth.js
CHANGED
|
@@ -16,10 +16,13 @@ export function createAuthModule(axios, functionsAxiosClient, appId) {
|
|
|
16
16
|
},
|
|
17
17
|
/**
|
|
18
18
|
* Get current user sso access token
|
|
19
|
+
* @param {string} [userid] - Optional user ID to include as URL parameter
|
|
19
20
|
* @returns {Promise<Object>} Current user sso access_token
|
|
20
21
|
*/
|
|
21
|
-
async getSsoAccessToken() {
|
|
22
|
-
|
|
22
|
+
async getSsoAccessToken(userid) {
|
|
23
|
+
const url = `/apps/${appId}/auth/sso/accesstoken`;
|
|
24
|
+
const params = userid ? { userid } : {};
|
|
25
|
+
return axios.get(url, { params });
|
|
23
26
|
},
|
|
24
27
|
/**
|
|
25
28
|
* Update current user data
|