@embrace-io/web-sdk
Version:
38 lines • 2.9 kB
TypeScript
import { SessionPartEndReason } from "../../api-sessions/manager/types.js";
//#region src/managers/EmbraceUserSessionManager/constants.d.ts
declare const EMBRACE_USER_SESSION_STATE_KEY = "embrace_user_session_state";
/**
* Bump when UserSessionState's shape changes incompatibly. Persisted blobs
* whose schemaVersion doesn't match are discarded on read.
*/
declare const USER_SESSION_STATE_SCHEMA_VERSION = 1;
declare const EMBRACE_USER_SESSION_NUMBER_KEY = "embrace_user_session_number";
declare const EMBRACE_SESSION_PART_NUMBER_KEY = "embrace_session_part_number";
declare const EMBRACE_PERMANENT_PROPERTIES_KEY = "embrace_permanent_properties";
declare const EMBRACE_LAST_END_USER_SESSION_TS_KEY = "embrace_last_end_user_session_ts";
declare const SESSION_PART_SPAN_NAME = "emb-session-part";
/**
* Part end reasons that also terminate the enclosing user session, so the
* part is stamped as the final one (`emb.is_final_session_part`).
*/
declare const FINAL_SESSION_PART_END_REASONS: ReadonlySet<SessionPartEndReason>;
declare const DEFAULT_USER_SESSION_MAX_DURATION_SECONDS: number;
declare const MIN_USER_SESSION_MAX_DURATION_SECONDS: number;
declare const MAX_USER_SESSION_MAX_DURATION_SECONDS: number;
declare const DEFAULT_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS: number;
declare const MIN_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS = 30;
declare const MAX_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS: number;
declare const DEFAULT_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS: number;
declare const MIN_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS = 30;
declare const MAX_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS: number;
declare const END_USER_SESSION_COOLDOWN_MS: number;
/**
* Default upper bound on how often the activity handler runs; prevents
* mousemove from re-arming the inactivity timer for every sub-second event.
*/
declare const DEFAULT_ACTIVITY_THROTTLE_MS: number;
/** Default input events that count as user interaction with a foreground tab. */
declare const DEFAULT_ACTIVITY_EVENTS: ReadonlyArray<string>;
//#endregion
export { DEFAULT_ACTIVITY_EVENTS, DEFAULT_ACTIVITY_THROTTLE_MS, DEFAULT_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS, DEFAULT_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS, DEFAULT_USER_SESSION_MAX_DURATION_SECONDS, EMBRACE_LAST_END_USER_SESSION_TS_KEY, EMBRACE_PERMANENT_PROPERTIES_KEY, EMBRACE_SESSION_PART_NUMBER_KEY, EMBRACE_USER_SESSION_NUMBER_KEY, EMBRACE_USER_SESSION_STATE_KEY, END_USER_SESSION_COOLDOWN_MS, FINAL_SESSION_PART_END_REASONS, MAX_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS, MAX_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS, MAX_USER_SESSION_MAX_DURATION_SECONDS, MIN_USER_SESSION_FOREGROUND_INACTIVITY_TIMEOUT_SECONDS, MIN_USER_SESSION_INACTIVITY_TIMEOUT_SECONDS, MIN_USER_SESSION_MAX_DURATION_SECONDS, SESSION_PART_SPAN_NAME, USER_SESSION_STATE_SCHEMA_VERSION };
//# sourceMappingURL=constants.d.ts.map