import { Watchable } from 'apprt-core/Types'; /** * @module api */ /** * Represents observable properties of the activity state. */ interface WatchableActivityStateProperties { /** Indicates if a user is active. */ active: boolean; } /** * Represents the state of an app regarding user activity * It can be observed to detect inactivity. * * The state is available as service `system.ActivityState`. */ interface ActivityState extends Watchable, WatchableActivityStateProperties { /** Indicates if the local storage is used to store the latest activity.*/ useLocalStorage: boolean; /** Date object representing the last activity. Only used if useLocalStorage is false */ lastActivity: Date; /** Number of milliseconds that a user is allowed to be inactive. Default: 3600000. * If set to 0, automatic logout is disabled. */ idleTimeOut: number; /** Indicates if a user should be logged out on inactivity.*/ logoutWhenInactive: boolean; } export type { ActivityState, WatchableActivityStateProperties };