21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { AxiosInstance } from "axios";
|
|
import { TrackEventParams, AnalyticsModuleOptions } from "./analytics.types";
|
|
import type { AuthModule } from "./auth.types";
|
|
export declare const USER_HEARTBEAT_EVENT_NAME = "__user_heartbeat_event__";
|
|
export declare const ANALYTICS_INITIALIZATION_EVENT_NAME = "__initialization_event__";
|
|
export declare const ANALYTICS_SESSION_DURATION_EVENT_NAME = "__session_duration_event__";
|
|
export declare const ANALYTICS_CONFIG_ENABLE_URL_PARAM_KEY = "analytics-enable";
|
|
export declare const ANALYTICS_SESSION_ID_LOCAL_STORAGE_KEY = "base44_analytics_session_id";
|
|
export interface AnalyticsModuleArgs {
|
|
axiosClient: AxiosInstance;
|
|
serverUrl: string;
|
|
appId: string;
|
|
userAuthModule: AuthModule;
|
|
}
|
|
export declare const createAnalyticsModule: ({ axiosClient, serverUrl, appId, userAuthModule, }: AnalyticsModuleArgs) => {
|
|
track: (params: TrackEventParams) => void;
|
|
cleanup: () => void;
|
|
};
|
|
export declare function getAnalyticsConfigFromUrlParams(): AnalyticsModuleOptions | undefined;
|
|
export declare function getAnalyticsSessionId(): string;
|