@base44-preview/sdk 0.8.42-pr.255.53b6586 → 0.8.42-pr.255.c035d2f
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { TrackEventParams, AnalyticsModuleOptions } from "./analytics.types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { InternalAuthModule } from "./auth.types";
|
|
4
4
|
export declare const USER_HEARTBEAT_EVENT_NAME = "__user_heartbeat_event__";
|
|
5
5
|
export declare const ANALYTICS_INITIALIZATION_EVENT_NAME = "__initialization_event__";
|
|
6
6
|
export declare const ANALYTICS_SESSION_DURATION_EVENT_NAME = "__session_duration_event__";
|
|
@@ -10,7 +10,7 @@ export interface AnalyticsModuleArgs {
|
|
|
10
10
|
axiosClient: AxiosInstance;
|
|
11
11
|
serverUrl: string;
|
|
12
12
|
appId: string;
|
|
13
|
-
userAuthModule:
|
|
13
|
+
userAuthModule: InternalAuthModule;
|
|
14
14
|
}
|
|
15
15
|
export declare const createAnalyticsModule: ({ axiosClient, serverUrl, appId, userAuthModule, }: AnalyticsModuleArgs) => {
|
|
16
16
|
track: (params: TrackEventParams) => void;
|
package/dist/modules/auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import {
|
|
2
|
+
import { AuthModuleOptions, InternalAuthModule } from "./auth.types";
|
|
3
3
|
/**
|
|
4
4
|
* Creates the auth module for the Base44 SDK.
|
|
5
5
|
*
|
|
@@ -10,4 +10,4 @@ import { AuthModule, AuthModuleOptions } from "./auth.types";
|
|
|
10
10
|
* @returns Auth module with authentication and user management methods
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
export declare function createAuthModule(axios: AxiosInstance, functionsAxiosClient: AxiosInstance, appId: string, options: AuthModuleOptions):
|
|
13
|
+
export declare function createAuthModule(axios: AxiosInstance, functionsAxiosClient: AxiosInstance, appId: string, options: AuthModuleOptions): InternalAuthModule;
|
|
@@ -117,16 +117,6 @@ export interface AuthModuleOptions {
|
|
|
117
117
|
* The auth module is only available in user authentication mode (`base44.auth`).
|
|
118
118
|
*/
|
|
119
119
|
export interface AuthModule {
|
|
120
|
-
/**
|
|
121
|
-
* Whether an access token is currently set on the client.
|
|
122
|
-
*
|
|
123
|
-
* Reports only the presence of a token, never its validity — an expired or
|
|
124
|
-
* revoked token still reads as `true`. Callers use this to skip requests that
|
|
125
|
-
* could not succeed without a session, not to decide that one is valid.
|
|
126
|
-
*
|
|
127
|
-
* @internal
|
|
128
|
-
*/
|
|
129
|
-
hasToken(): boolean;
|
|
130
120
|
/**
|
|
131
121
|
* Gets the current authenticated user's information.
|
|
132
122
|
*
|
|
@@ -531,3 +521,20 @@ export interface AuthModule {
|
|
|
531
521
|
*/
|
|
532
522
|
changePassword(params: ChangePasswordParams): Promise<any>;
|
|
533
523
|
}
|
|
524
|
+
/**
|
|
525
|
+
* The auth module as constructed internally, before it is narrowed to
|
|
526
|
+
* {@link AuthModule} on the public client. Not exported from the package
|
|
527
|
+
* index — SDK consumers see only {@link AuthModule}.
|
|
528
|
+
*
|
|
529
|
+
* @internal
|
|
530
|
+
*/
|
|
531
|
+
export interface InternalAuthModule extends AuthModule {
|
|
532
|
+
/**
|
|
533
|
+
* Whether an access token is currently set on the client.
|
|
534
|
+
*
|
|
535
|
+
* Reports only the presence of a token, never its validity — an expired or
|
|
536
|
+
* revoked token still reads as `true`. Callers use this to skip requests that
|
|
537
|
+
* could not succeed without a session, not to decide that one is valid.
|
|
538
|
+
*/
|
|
539
|
+
hasToken(): boolean;
|
|
540
|
+
}
|