export declare enum LayoutType { Global = "Global", Activity = "Activity", ApplicationDefault = "ApplicationDefault", Swimlane = "Swimlane", Workspaces = "Workspace" } export type ApplicationType = "activity" | "window" | "exe" | "node" | "canvas" | "swimlane" | "clickonce" | "citrix" | "Workspace" | "workspaceFrame" | "childWindow"; export declare enum SwimlaneItemType { Tab = "tab", Window = "window", Canvas = "canvas" } export type WindowLayoutInfo = ApplicationLayoutInfo<"window", WindowLayoutState>; export type ActivityLayoutInfo = ApplicationLayoutInfo<"activity", ActivityLayoutState>; export type LayoutStates = WindowLayoutState | ActivityLayoutState | CanvasLayoutState | SwimlaneLayoutState | ExeLayoutState | NodeLayoutState | ChildWindowLayoutState; export type ApplicationLayoutComponent = ApplicationLayoutInfo<"window", WindowLayoutState> | ApplicationLayoutInfo<"activity", ActivityLayoutState> | ApplicationLayoutInfo<"canvas", CanvasLayoutState> | ApplicationLayoutInfo<"swimlane", SwimlaneLayoutState> | ApplicationLayoutInfo<"exe", ExeLayoutState> | ApplicationLayoutInfo<"node", NodeLayoutState> | ApplicationLayoutInfo<"clickonce", ExeLayoutState> | ApplicationLayoutInfo<"citrix", ExeLayoutState> | ApplicationLayoutInfo<"Workspace", WorkspaceLayoutState> | ApplicationLayoutInfo<"workspaceFrame", WorkspaceFrameLayoutState> | ApplicationLayoutInfo<"childWindow", ChildWindowLayoutState>; /** * Schema describing the Glue42 Desktop layout. */ export interface LayoutData { /** * Version of the schema. */ version?: number; /** * Type of the layout. */ type: LayoutType; /** * Name of the layout. */ name: string; /** * Used internally to audit operations. */ token: string; components: ApplicationLayoutComponent[]; /** * Context saved with the layout. */ context?: object; /** * Metadata saved with the layout. */ metadata?: object; displays?: Display[]; } export interface ApplicationLayoutInfo { /** * Name of the application. */ application?: string; /** * Type of the application. */ type: T; /** * Type of the component. Can be `application` or `activity`. */ componentType?: "activity" | "application"; state?: U; } export interface RestoreSettings { /** * ID of the group. */ groupId?: string; /** * User specified title of the group. */ groupUserTitle?: string; /** * Z-order of the group. */ groupZOrder?: number; /** * Group target display. */ groupDisplayId?: number; /** * Skip offsetting the group */ skipOffset?: boolean; } export interface WindowLayoutState { bounds?: Bounds; screenBounds?: { left?: number; top?: number; width?: number; height?: number; }; displayId?: number; /** * Mode of the window. */ mode?: "flat" | "html" | "tab" | "frameless"; /** * If `true`, the window was saved in a collapsed state. */ isCollapsed?: boolean; /** * If `true`, the window was saved in a pinned web group tab state. */ isPinned?: boolean; /** * Application specific context. */ context?: object; /** * If participating in an activity, the window can specify the activity context to be saved. This will be respected only if the window is the owner of the activity. */ activityContext?: object; /** * ID of the tab group. */ tabGroupId?: string; /** * Index within the tab group. */ tabIndex?: number; /** * ID of the channel. */ channelId?: string; /** * Allow channels */ allowChannels?: boolean; /** * If set, the window will start in the specified state (maximized, minimized, normal). */ windowState?: string; restoreState?: string; /** * User specified title of the window */ userTitle?: string; /** * custom window title set by the API */ customTitle?: string; /** * It will be used in hibernation/resume logic, to match the live instance with the saved one */ instanceId?: string; createArgs?: any; /** * If set, the window will be created as popup */ parentInstanceId?: string; restoreSettings?: RestoreSettings; /** * If `true`, the window was saved with enabled stickiness. */ isSticky?: boolean; /** * Placement settings */ placement?: any; /** * Docking */ dockingPlacement?: any; /** * url saved in layout */ url?: any; /** * application title saved in layout */ title?: string; command?: string; parameters?: string; env?: { [k: string]: string; }; channelRestrictions?: ChannelRestrictions; allowWorkspaceDrop?: boolean; zoomFactor?: number; } export interface Bounds { /** * Coordinate on the horizontal axis. */ left?: number; /** * Coordinate on the vertical axis. */ top?: number; /** * Width of the app window. */ width?: number; /** * Height of the app window. */ height?: number; /** * Right border on the horizontal axis. */ right?: number; /** * Bottom border on the vertical axis. */ bottom?: number; } export interface ActivityLayoutState { /** * Type of the activity. */ type?: string; /** * All the windows participating in the activity. */ windows?: ActivityWindowLayoutState[]; /** * Activity context. */ context?: object; /** * It will be used in hibernation/resume logic, to match the live instance with the saved one */ instanceId?: string; } export interface CanvasLayoutState { bounds?: Bounds; /** * Index of the selected workspace. */ selectedWorkspace?: number; caption?: string; windowState?: string; restoreState?: string; zOrder?: number; displayId?: number; canvas?: SwimlaneCanvas; /** * Collection of the workspaces. */ workspaces?: SwimlaneCanvas[]; /** * Application specific context. */ context?: object; frameBounds?: Bounds; /** * It will be used in hibernation/resume logic, to match the live instance with the saved one */ instanceId?: string; } export interface SwimlaneLayout { name: string; canvas: SwimlaneCanvas; lastSaveTime: string; metadata?: object; } export interface SwimlaneCanvas { lanes: SwimlaneLane[]; horizontal: boolean; caption?: string; laneRatios: number[]; selected?: boolean; frameId?: string; canvasId?: string; } export interface SwimlaneLane { items: SwimlaneItem[]; itemRatios: number[]; allowDrop?: boolean; allowResize?: boolean; fixedSize?: number; minSize?: number; maxSize?: number; pinned?: boolean; } export interface SwimlaneItem { lane: number; positionInLane?: number; tabIndex?: number; selected?: boolean; type: SwimlaneItemType; name?: string; tabTitle?: string; tabGroup?: string; showButtons?: boolean; showCaption?: boolean; showBorder?: boolean; showFrame?: boolean; allowDrop?: boolean; allowExtract?: boolean; allowAdd?: boolean; isWorkspaceTab?: boolean; canvas?: SwimlaneCanvas; context?: object; maximized?: boolean; fixedWidth?: number; fixedHeight?: number; maxHeight?: number; maxWidth?: number; minHeight?: number; minWidth?: number; pinned?: boolean; activityType?: string; activityId?: string; activityWindowType?: string; isOwner?: boolean; items?: SwimlaneItem[]; showTabCloseButton?: boolean; disableTileMode?: boolean; channelId?: string; createArgs?: any; instanceId?: string; hostInstanceId?: string; isSticky?: boolean; } export interface SwimlaneLayoutState { canvas: SwimlaneCanvas; context?: object; lastSaveTime: string; instanceId?: string; } export interface GroupLayoutItem { type: "group"; children: WindowLayoutItem[]; config?: any; } export interface WindowLayoutItem { type: "window"; config: { appName: string; isMaximized?: boolean; isLoaded?: boolean; isFocused?: boolean; [k: string]: any; }; } export interface RowLayoutItem { type: "row"; children: Array; config?: any; } export interface ColumnLayoutItem { type: "column"; children: Array; config?: any; } export interface WorkspaceFrameLayoutState { bounds?: Bounds; screenBounds?: { left?: number; top?: number; width?: number; height?: number; }; /** * Index of the selected workspace. */ selectedWorkspace?: number; windowState?: string; restoreState?: string; zOrder?: number; displayId?: number; /** * Collection of the workspaces. */ workspaces?: WorkspaceLayoutState[]; /** * Application specific context. */ context?: object; /** * It will be used in hibernation/resume logic, to match the live instance with the saved one */ instanceId?: string; } export interface WorkspaceLayoutState { instanceId?: string; type?: "workspace"; children: Array; config?: any; context?: object; } export interface Display { /** * Screen (physical) bounds. */ screenBounds?: { left?: number; top?: number; width?: number; height?: number; }; screenWorkArea?: { left?: number; top?: number; width?: number; height?: number; }; /** * Physical scale factor. */ screenScale?: number; /** * Height of the display. */ height?: number; /** * Whatever the display is primary. */ isPrimary?: boolean; /** * Height of the display. */ left?: number; /** * Unique identifier associated with the display. */ name?: number; /** * Logical scale factor. */ scale?: number; top?: number; /** * Width of the display. */ width?: number; workingAreaHeight?: number; workingAreaLeft?: number; workingAreaTop?: number; workingAreaWidth?: number; /** * Unique identifier associated with the display. */ id?: number; /** * Display user friendly name. */ displayName?: string; /** * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. */ rotation?: number; /** * Can be available, unavailable, unknown. */ touchSupport?: string; } export interface ExeLayoutState extends WindowLayoutState { } export interface ChildWindowLayoutState extends WindowLayoutState { hostInstanceId?: string; hostApplication?: string; } export interface NodeLayoutState { context?: object; instanceId?: string; } export interface ActivityWindowLayoutState extends WindowLayoutState { /** * Activity type of the window. */ type?: string; /** * Activity name of the window. */ name?: string; /** * Is `true`, if this is the owner of the activity. */ isOwner?: boolean; /** * Is `true`, if the window is independent */ isIndependent?: boolean; } export interface ChannelRestrictions { channels: ChannelRestriction[]; } export interface ChannelRestriction { name: string; read: boolean; write: boolean; }