@glue42/workspaces-api
Version:
Glue42 Core workspaces API
49 lines (41 loc) • 2.2 kB
TypeScript
import { Glue42Workspaces } from "./workspaces";
export interface API extends Glue42Workspaces.API {
/**
* Notifies when a workspace is hibernated in any frame and returns an unsubscribe function.
* @param callback Callback function to handle the event. Receives the hibernated workspace as a parameter.
*/
onWorkspaceHibernated(callback: (workspace: Glue42Workspaces.Workspace) => void): Promise<Glue42Workspaces.Unsubscribe>;
/**
* Notifies when a workspace is resumed in any frame and returns an unsubscribe function.
* @param callback Callback function to handle the event. Receives the resumed workspace as a parameter.
*/
onWorkspaceResumed(callback: (workspace: Glue42Workspaces.Workspace) => void): Promise<Glue42Workspaces.Unsubscribe>;
}
export interface RestoreWorkspaceConfig extends Glue42Workspaces.RestoreWorkspaceConfig {
/** Controls the users ability to automatically hibernate the workspace */
allowSystemHibernation?: boolean;
}
export interface WorkspaceConfig extends Glue42Workspaces.WorkspaceConfig {
/** Controls the users ability to automatically hibernate the workspace */
allowSystemHibernation?: boolean;
}
export interface WorkspaceLockConfig extends Glue42Workspaces.WorkspaceLockConfig {
/** Controls the users ability to automatically hibernate the workspace */
allowSystemHibernation?: boolean;
}
export interface WorkspaceSummary extends Glue42Workspaces.WorkspaceSummary {
/** Controls the users ability to automatically hibernate the workspace */
allowSystemHibernation?: boolean;
}
export interface Workspace extends Glue42Workspaces.Workspace {
/**
* Notifies when this workspace is hibernated and returns an unsubscribe function.
* @param callback Callback function to handle the event.
*/
onHibernated(callback: () => void): Promise<Glue42Workspaces.Unsubscribe>;
/**
* Notifies when this workspace is resumed and returns an unsubscribe function.
* @param callback Callback function to handle the event.
*/
onResumed(callback: () => void): Promise<Glue42Workspaces.Unsubscribe>;
}