# Domains & Operations

Source: https://docs.interop.io/browser/capabilities/plugins/domains-operations/index.html

## Overview

This section describes the io.Connect API domain and operation IDs, and the signature of the `data` object each operation expects in order to be executed. Use this reference information to set the `domain`, `operation` and `data` properties of the base control message object correctly when invoking io.Connect operations in your interception handlers.

An example invocation of an io.Connect operation:

```javascript
// Settings for starting an instance of an app with a specified name.
const controlMessage = {
    domain: "appManager",
    operation: "applicationStart",
    data: {
        name: "My App Name"
    }
};

// The `platform` object has already been passed as an argument to the Plugin implementation.
await platform.system.sendControl(controlMessage);
```

All io.Connect domains have an operation called `"operationCheck"` that can be used to verify whether the provided io.Connect operation is supported.

The `data` object for this operation has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `operation` | `string` | **Required.** Name of the io.Connect operation to verify. |

The following example demonstrates how to verify whether an operation named `"openWindow"` exists:

```javascript
const controlMessage = {
    domain: "windows",
    operation: "operationCheck",
    data: {
        operation: "openWindow"
    }
};

// Checking whether the specified io.Connect operation is supported in the specified domain.
await platform.system.sendControl(controlMessage);
```

## App Management

To send a control message to the [App Management](https://docs.interop.io/browser/capabilities/app-management/index.md) domain, set the `domain` property to `"appManager"`.

The following io.Connect operations are available for this domain:

### "appHello"

Retrieves all available io.Connect apps connected to the **io.Connect Browser** environment.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | Optional ID of an io.Connect Window. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `apps` | `object[]` | Array of objects describing the io.Connect apps. |

### "applicationStart"

Starts an io.Connect app.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `context` | `object` | Context for the started app. |
| `forceChromeTab` | `boolean` | If `true`, will force the Chrome tab to open the app window with the bounds specified either in the app definition or in the app start options. |
| `height` | `number` | Height in pixels for the app window. |
| `id` | `string` | ID for the app instance. |
| `layoutComponentId` | `string` | ID used for managing the new app window in Layouts. |
| `left` | `number` | Distance in pixels from the left edge of the screen for the app window. |
| `name` | `string` | **Required.** Name of the app to start. |
| `relativeDirection` | `"top"` \| `"left"` \| `"right"` \| `"bottom"` | Direction relative to the io.Connect Window specified in `realtiveTo` in which to position the new app window. |
| `relativeTo` | `string` | The ID of an io.Connect Window relatively to which the new app window will be positioned. |
| `top` | `number` | Distance in pixels from the top edge of the screen for the app window. |
| `width` | `number` | Width in pixels for the app window. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `applicationName` | `string` | The name of the started io.Connect app. |
| `id` | `string` | ID of the started io.Connect app. |

### "clear"

Clears all in-memory app definitions dynamically.

A `data` object for this operation isn't required.

### "export"

Exports all in-memory app definitions dynamically.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `definitions` | [`Definition[]`](../../../reference/javascript/app%20management/definition/index.html) | Array of app definition objects. |

### "import"

Imports app definitions dynamically.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `definitions` | `object[]` | **Required.** An array of io.Connect [`Definition`](https://docs.interop.io/browser/reference/javascript/app%20management/definition/index.md) or FDC3 app definition objects to import. |
| `mode` | `"replace"` \| `"merge"` | **Required.** Mode for importing the app definitions. Use `"replace"` to replace all existing in-memory definitions with the provided ones. Use `"merge"` to merge the existing app definitions with the provided ones, replacing the app definitions with the same name. |

### "instanceStop"

Stops an io.Connect app instance.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | **Required.** ID of the app instance to stop. |

### "registerWorkspaceApp"

Registers an app instance as a Workspace window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `appName` | `string` | App name of the window if it has been defined as an io.Connect app within the io.Connect environment. |
| `context` | `object` | Starting context for the window. |
| `frameId` | `string` | **Required.** ID of the Workspaces App in which to register the window. |
| `name` | `string` | **Required.** Name of the window to register in the Workspace. |
| `title` | `string` | Title for the window. |
| `windowId` | `string` | **Required.** ID of the window to register in the Workspace. |

### "registerRemoteApps"

Registers app definitions fetched from a remote source.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `definitions` | `object[]` | **Required.** An array of io.Connect [`Definition`](https://docs.interop.io/browser/reference/javascript/app%20management/definition/index.md) or FDC3 app definition objects to register. |

### "remove"

Removes an app definition dynamically.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Name of the app to remove. |

### "unregisterWorkspaceApp"

Unregisters an app instance from a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the window to unregister from the Workspace. |

## Intents

To send a control message to the [Intents](https://docs.interop.io/browser/capabilities/data-sharing/intents/overview/index.md) domain, set the `domain` property to `"intents"`.

The following io.Connect operations are available for this domain:

### "getIntents"

Retrieves all registered Intents.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `intents` | [`Intent[]`](../../../reference/javascript/intents/intent/index.html) | Array of objects describing the Intents. |

### "findIntent"

Retrieves Intent objects by a provided [`IntentFilter`](https://docs.interop.io/browser/reference/javascript/intents/intentfilter/index.md) object.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `filter` | [`IntentFilter`](https://docs.interop.io/browser/reference/javascript/intents/intentfilter/index.md) | Object for finding an Intent. If not provided, all available Intents will be returned. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `intents` | [`Intent[]`](../../../reference/javascript/intents/intent/index.html) | Array of Intent objects matching the search criteria. |

### "raise"

Raises an Intent. Extends the `"raiseIntent"` command by handling the Intent request considering the configuration for the Intent Resolver app.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `intentRequest` | [`IntentRequest`](https://docs.interop.io/browser/reference/javascript/intents/intentrequest/index.md) | Object describing the request for raising an Intent. |
| `resolverConfig` | `object` | Object with `enabled`, `appName` and `waitResponseTimeout` properties describing the configuration for the Intent Resolver app. |

Returns an [`IntentResult`](https://docs.interop.io/browser/reference/javascript/intents/intentresult/index.md) object.

## Channels

To send a control message to the [Channels](https://docs.interop.io/browser/capabilities/data-sharing/channels/index.md) domain, set the `domain` property to `"channels"`.

The following io.Connect operations are available for this domain:

### "addChannel"

Creates a new Channel.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `data` | `object` | Data object that will be used as Channel context. |
| `meta` | `object` | **Required.** Meta data for the new Channel. The meta data object contains a required `color` property that specifies the Channel color as an HTML color name or a hex value. |
| `name` | `string` | **Required.** Name for the new Channel. |

## Window Management

To send a control message to the [Window Management](https://docs.interop.io/browser/capabilities/windows/window-management/index.md) domain, set the `domain` property to `"windows"`.

The following io.Connect operations are available for this domain:

### "close"

Closes an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the io.Connect Window to close. |

### "focus"

Focuses an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the io.Connect Window to focus. |

### "focusChange"

This operation informs the io.Connect environment that the focus of an io.Connect Window has changed.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `hasFocus` | `boolean` | **Required.** Whether the specified io.Connect Window has gotten or lost focus. |
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose focus has changed. |

### "getBounds"

Retrieves the bounds of an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose bounds to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `bounds` | [`Bounds`](https://docs.interop.io/browser/reference/javascript/windows/bounds/index.md) | Object describing the window bounds in pixels. |
| `windowId` | `string` | ID of the io.Connect Window. |

### "getTitle"

Retrieves the title of an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose title to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `title` | `string` | Title of the io.Connect Window. |
| `windowId` | `string` | ID of the io.Connect Window. |

### "getUrl"

Retrieves the URL of an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose URL to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `url` | `string` | The URL of the io.Connect Window. |
| `windowId` | `string` | ID of the io.Connect Window. |

### "moveResize"

Changes the bounds (position and/or size) of an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `height` | `number` | Height in pixels for the window. |
| `left` | `number` | Distance in pixels from the left edge of the screen for the window. |
| `relative` | `boolean` | If `true`, the new window location (`top` and `left`) will be set relatively to the current window position. |
| `top` | `number` | Distance in pixels from the top edge of the screen for the window. |
| `width` | `number` | Width in pixels for the window. |
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose bounds to change. |

### "openWindow"

Opens a new io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Unique name for the io.Connect Window to open. |
| `options` | [`Settings`](https://docs.interop.io/browser/reference/javascript/windows/settings/index.md) | Object with settings for the new io.Connect Window. |
| `url` | `string` | **Required.** URL to load in the new io.Connect Window. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | Name of the io.Connect Window. |
| `windowId` | `string` | ID of the io.Connect Window. |

### "registerWorkspaceWindow"

Registers an io.Connect Window as a Workspace window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `appName` | `string` | App name of the window if it has been defined as an io.Connect app within the io.Connect environment. |
| `context` | `object` | Starting context for the window. |
| `frameId` | `string` | **Required.** ID of the Workspaces App in which to register the window. |
| `name` | `string` | **Required.** Name of the window to register in the Workspace. |
| `title` | `string` | Title for the window. |
| `windowId` | `string` | **Required.** ID of the window to register in the Workspace. |

### "setTitle"

Sets the title of an io.Connect Window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `title` | `string` | **Required.** Title for the io.Connect Window. |
| `windowId` | `string` | **Required.** ID of the io.Connect Window whose title to set. |

### "unregisterWorkspaceWindow"

Unregisters an io.Connect Window from a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | **Required.** ID of the window to unregister from the Workspace. |

### "windowHello"

Retrieves all io.Connect Windows.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | Optional ID of an io.Connect Window. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `isWorkspaceFrame` | `boolean` | Specifies whether the windows in the returned collection are Workspaces App instances. |
| `windows` | `object[]` | Array of objects each with `windowId` and `name` properties describing the io.Connect Windows. |

## Workspaces

To send a control message to the [Workspaces](https://docs.interop.io/browser/capabilities/windows/workspaces/overview/index.md) domain, set the `domain` property to `"workspaces"`.

The following io.Connect operations are available for this domain:

### "addContainer"

Adds a [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element to a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `definition` | [`BoxDefinition`](https://docs.interop.io/browser/reference/javascript/workspaces/boxdefinition/index.md) | **Required.** Object describing the element to add to the Workspace. |
| `parentId` | `string` | **Required.** ID of the Workspace element in which to add the new element. |
| `parentType` | `"row"` \| `"column"` \| `"group"` \| `"workspace"` | **Required.** Type of the Workspace element in which to add the new element. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | ID of the added [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element. |

### "addWindow"

Adds a [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md) to a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `definition` | [`WorkspaceWindowDefinition`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindowdefinition/index.md) | **Required.** Object describing the window to add to the Workspace. |
| `parentId` | `string` | **Required.** ID of the Workspace element in which to add the window. |
| `parentType` | `"row"` \| `"column"` \| `"group"` \| `"workspace"` | **Required.** Type of the Workspace element in which to add the window. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | ID of the added [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md). |

### "bundleItem"

Bundles a Workspace element into a [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) or a [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspace element to bundle. |
| `type` | `"row"` \| `"column"` | **Required.** Specifies whether to bundle the Workspace element into a [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) or a [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md). |

### "bundleWorkspace"

Bundles an entire Workspace into a [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) or a [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `type` | `"row"` \| `"column"` | **Required.** Specifies whether to bundle the Workspace into a [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) or a [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md). |
| `workspaceId` | `string` | **Required.** ID of the Workspace to bundle. |

### "checkStarted"

Checks whether the Workspaces controller has started.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `started` | `boolean` | Specifies whether the Workspaces controller has been initialized. |

### "closeItem"

Closes a Workspaces item - a Workspace, a Workspace element or the entire Workspaces App.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspaces item to close. |

### "createFrame"

Creates an empty Workspaces [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) (a new instance of a Workpsaces App).

The `data` object for this operation is required and is an [`EmptyFrameDefinition`](https://docs.interop.io/browser/reference/javascript/workspaces/emptyframedefinition/index.md) object.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | ID of the created [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) instance. |
| `initializationContext` | `object` | Object with a `context` property holding initial context passed to the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md), if any. |
| `isInitialized` | `boolean` | Specifies whether the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) has been initialized. |

### "createWorkspace"

Creates a new [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `children` | [`BoxDefinition[]`](../../../reference/javascript/workspaces/boxdefinition/index.html) \| [`WorkspaceWindowDefinition[]`](../../../reference/javascript/workspaces/workspacewindowdefinition/index.html) | **Required.** Array of objects describing the elements of the new Workspace. Pass an empty array to create an empty Workspace. |
| `config` | [`WorkspaceConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/workspaceconfig/index.md) | Object with settings for the new Workspace. |
| `context` | `object` | Object with context data that will be used for all windows in the Workspace. |
| `frame` | [`FrameTargetingOptions`](https://docs.interop.io/browser/reference/javascript/workspaces/frametargetingoptions/index.md) | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) in which to create the new Workspace. |
| `saveConfig` | [`WorkspaceCreateConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacecreateconfig/index.md) | Object with options for saving the new Workspace as a Layout. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `children` | `object[]` | Array of objects describing the elements of the new [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `config` | `object` | Object describing the settings and properties of the new [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `context` | `object` | The context passed to the new [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `id` | `string` | ID of the created [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `frameSummary` | `object` | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) in which the Workspace was created. |

### "deleteLayout"

Deletes a Workspace Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Name of the Workspace Layout to delete. |

### "ejectWindow"

Ejects a window from a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the window to eject from the Workspace. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | ID of the window ejected from the Workspace. |

### "exportAllLayouts"

Exports all Workspace Layouts.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layouts` | [`WorkspaceLayout[]`](../../../reference/javascript/workspaces/workspacelayout/index.html) | Array of objects describing the exported Workspace Layouts. |

### "focusItem"

Focuses a Workspaces App, a Workspace or a Workspace element.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspaces item to focus. |

### "forceLoadWindow"

Forces a Workspace window to load its content.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the window to force to load. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowId` | `string` | ID of the window that was forced to load. |

### "focusChange"

This operation informs the io.Connect environment that the focus of a Workspaces App has changed.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `hasFocus` | `boolean` | **Required.** Whether the specified Workspaces App has gotten or lost focus. |
| `windowId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) whose focus has changed. |

### "getAllFramesSummaries"

Retrieves the summary descriptions of all available [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) objects.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `summaries` | `object[]` | Array of objects each with `id`, `isInitialized` and `initializationContext` properties describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) objects. |

### "getAllLayoutsSummaries"

Retrieves the summary descriptions of all available Workspace Layouts.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `summaries` | `object[]` | Array of objects each with a `name` property describing the Workspace Layouts. |

### "getAllWorkspacesSummaries"

Retrieves the summary descriptions of all available Workspaces.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `summaries` | `object[]` | Array of objects each with `id` and `config` properties describing the Workspaces. |

### "getFrameBounds"

Retrieves the bounds of a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) whose bounds to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `bounds` | [`Bounds`](https://docs.interop.io/browser/reference/javascript/windows/bounds/index.md) | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) bounds in pixels. |

### "getFrameSnapshot"

Retrieves a snapshot of a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `excludeIds` | `boolean` | If `true`, the IDs of the various elements of the Workspaces won't be included in the snapshot. |
| `itemId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) whose snapshot to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `config` | `object` | Object with `minWidth`, `maxWidth`, `minHeight` and `maxHeight` properties describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) constraints. |
| `id` | `string` | ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |
| `workspaces` | `object[]` | Array of objects each with `id`, `children`, `config`, `frameSummary` and `context` properties describing the Workspaces in the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |

### "getFrameSummary"

Retrieves the summary description of a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) whose summary to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) instance. |
| `initializationContext` | `object` | Object with a `context` property that holds the initial context passed to the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md), if any. |
| `isInitialized` | `boolean` | Specifies whether the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) has been initialized. |

### "getPlatformFrameId"

Retrieves the ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) object that belongs to the Browser Platform app (i.e., when a Workspaces App is also a [Main app](https://docs.interop.io/browser/developers/browser-platform/overview/index.md)).

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) instance. |

### "getWorkspaceIcon"

Retrieves the icon of a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `workspaceId` | `string` | **Required.** ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) whose icon to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `icon` | `string` | Workspace icon in Base64 format. |

### "getWorkspacesConfig"

Retrieves the configuration for the Workspaces App as specified in the [Main app](https://docs.interop.io/browser/developers/browser-platform/overview/index.md).

A `data` object for this operation isn't required.

Returns an object describing the [Workspaces App configuration](https://docs.interop.io/browser/capabilities/windows/workspaces/enabling-workspaces/index.md#main_app-hibernation).

### "getWorkspaceSnapshot"

Retrieves a snapshot of a [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) whose snapshot to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `children` | `object[]` | Array of objects describing the elements of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `config` | `object` | Object describing the settings and properties of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `context` | `object` | The context passed to the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `frameSummary` | `object` | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) to which the Workspace belongs. |
| `id` | `string` | ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |

### "getWorkspaceWindowFrameBounds"

Retrieves the bounds of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) that contains a specified Workspace window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspace window for which to retrieve the bounds of its [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `bounds` | [`Bounds`](https://docs.interop.io/browser/reference/javascript/windows/bounds/index.md) | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) bounds in pixels. |

### "getWorkspaceWindowsOnLayoutSaveContext"

Retrieves the context of the windows in a Workspace when a Layout save has been requested.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layoutName` | `string` | **Required.** Name of the Workspace Layout to which the windows belong. |
| `layoutType` | `"Global"` \| `"Workspace"` | **Required.** Type of the Workspace Layout to which the windows belong. Must be set to `"Workspace"`. |
| `windowIds` | `string[]` | **Required.** IDs of the windows whose context to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windowsOnSaveData` | `object[]` | Array of objects each with `windowId` and `windowContext` properties holding the ID and context of a Workspace window. |

### "hibernateWorkspace"

Hibernates a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `workspaceId` | `string` | **Required.** ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) to hibernate. |

### "importLayout"

Imports a Workspace Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layout` | [`WorkspaceLayout`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacelayout/index.md) | **Required.** Object to import. |
| `mode` | `"replace"` \| `"merge"` | **Required.** Mode for importing the Workspace Layout. Use `"replace"` to replace all existing Workspace Layouts with the imported one. Use `"merge"` to add the imported Workspace Layout to the existing ones or replace an existing Workspace Layout with the same name. |

### "initFrame"

Initializes an empty Workspaces [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `frameId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) to initialize. |
| `workspaces` | [`WorkspaceDefinition[]`](../../../reference/javascript/workspaces/workspacedefinition/index.html) \| [`RestoreWorkspaceDefinition[]`](../../../reference/javascript/workspaces/restoreworkspacedefinition/index.html) | **Required.** Array of objects with which to initialize the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). Pass an empty array to initialize the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) without any Workspaces in it. |

### "isWindowInWorkspace"

Checks whether a window is in a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the window for which to check whether it's in a Workspace. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `inWorkspace` | `boolean` | Specifies whether the window is in a Workspace. |

### "lockContainer"

Locks a [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element of a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `config` | [`RowLockConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/rowlockconfig/index.md) \| [`ColumnLockConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/columnlockconfig/index.md) \| [`GroupLockConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/grouplockconfig/index.md) | Object with lock settings for the [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element. To unlock all currently locked features, pass an empty object. |
| `itemId` | `string` | **Required.** ID of the [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element to lock. |
| `type` | `"row"` \| `"column"` \| `"group"` | **Required.** Type of the [`Box`](https://docs.interop.io/browser/reference/javascript/workspaces/box/index.md) element to lock. |

### "lockWindow"

Locks a Workspace window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `config` | [`WorkspaceWindowLockConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindowlockconfig/index.md) | Object with lock settings for the [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md). To unlock all currently locked features, pass an empty object. |
| `windowPlacementId` | `string` | **Required.** ID of the [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md) to lock. |

### "lockWorkspace"

Locks a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `config` | [`WorkspaceLockConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacelockconfig/index.md) | Object with lock settings for the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). To unlock all currently locked features, pass an empty object. |
| `workspaceId` | `string` | **Required.** ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) to lock. |

### "maximizeItem"

Maximizes a Workspace element.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspace element to maximize. |

### "moveFrame"

Moves a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) to an absolute or relative location on the screen. This operation can't be executed when the specified [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) is also a [Main app](https://docs.interop.io/browser/developers/browser-platform/overview/index.md).

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) to move. |
| `left` | `number` | Distance in pixels from the left edge of the screen for the new location of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |
| `relative` | `boolean` | If `true`, the new window location (`top` and `left`) will be set relatively to the current [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) position. |
| `top` | `number` | Distance in pixels from the top edge of the screen for the new location of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |

### "moveWindowTo"

Moves a Workspace window to a specified containing element - another Workspace or a Workspace element.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `containerId` | `string` | **Required.** ID of the containing element to which to move the [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md). |
| `itemId` | `string` | **Required.** ID of the [`WorkspaceWindow`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacewindow/index.md) to move. |

### "openWorkspace"

Opens an already existing Workspace Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Name of the Workspace Layout. |
| `restoreOptions` | [`RestoreWorkspaceConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/restoreworkspaceconfig/index.md) | Options for restoring the Workspace Layout. If a Workspaces App instance isn't specified, the Workspace will be opened in the last created [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `children` | `object[]` | Array of objects describing the elements of the opened [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `config` | `object` | Object describing the settings and properties of the opened [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `context` | `object` | The context passed to the opened [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `id` | `string` | ID of the opened [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md). |
| `frameSummary` | `object` | Object describing the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) in which the Workspace was opened. |

### "pinWorkspace"

Pins a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `icon` | `string` | **Required.** Icon in Base64 format for the pinned Workspace. |
| `workspaceId` | `string` | **Required.** ID of the Workspace to pin. |

### "resizeItem"

Resizes a Workspace element or a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md) elements can be resized only in width. [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) elements can be resized only in height.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `height` | `number` | Height in pixels for the element. |
| `itemId` | `string` | **Required.** ID of the element to resize. |
| `relative` | `boolean` | Taken into account only when resizing a [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). If `true`, the specified `width` and `height` values will be added or subtracted from the current width and height of the [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md). |
| `width` | `number` | Width in pixels for the element. |

### "restoreItem"

Restores a previously maximized Workspace element.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspace element to restore. |

### "resumeWorkspace"

Resumes a hibernated Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `workspaceId` | `string` | **Required.** ID of the [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) to resume. |

### "saveLayout"

Saves a Workspace Layout.

The `data` object for this operation is required and is a [`WorkspaceLayoutSaveConfig`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacelayoutsaveconfig/index.md) object.

Returns a [`WorkspaceLayout`](https://docs.interop.io/browser/reference/javascript/workspaces/workspacelayout/index.md) object.

### "setItemTitle"

Sets the title of a Workspace or a Workspace window.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `itemId` | `string` | **Required.** ID of the Workspace or the Workspace window whose title to set. |
| `title` | `string` | **Required.** Title for the Workspace or the Workspace window. |

### "setMaximizationBoundary"

Sets a [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md) or a [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) element as a maximization boundary for its child Workspace elements.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `enabled` | `boolean` | **Required.** If `true`, will set the element as a maximization boundary. |
| `itemId` | `string` | **Required.** ID of the [`Column`](https://docs.interop.io/browser/reference/javascript/workspaces/column/index.md) or the [`Row`](https://docs.interop.io/browser/reference/javascript/workspaces/row/index.md) element which to set as a maximization boundary. |

### "setWorkspaceIcon"

Sets an icon for a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `icon` | `string` | Icon in Base64 format for the Workspace. |
| `workspaceId` | `string` | **Required.** ID of the Workspace whose icon to set. |

### "unpinWorkspace"

Unpins a Workspace.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `workspaceId` | `string` | **Required.** ID of the Workspace to pin. |

## Layouts

To send a control message to the [Layouts](https://docs.interop.io/browser/capabilities/windows/layouts/setup/index.md) domain, set the `domain` property to `"layouts"`.

The following io.Connect operations are available for this domain:

### "checkGlobalActivated"

Checks whether Global Layouts are available.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `isAvailable` | `boolean` | Specifies whether Global Layouts are available. |

### "export"

Exports Layouts by type.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `type` | [`LayoutType`](https://docs.interop.io/browser/reference/javascript/layouts/layouttype/index.md) | **Required.** Type of the Layouts to export. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layouts` | [`Layout[]`](../../../reference/javascript/layouts/layout/index.html) | Array of objects describing the exported Layouts. |

### "get"

Retrieves a Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Name of the Layout to retrieve. |
| `type` | [`LayoutType`](https://docs.interop.io/browser/reference/javascript/layouts/layouttype/index.md) | **Required.** Type of the Layout to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layout` | [`Layout`](https://docs.interop.io/browser/reference/javascript/layouts/layout/index.md) | Object describing the retrieved Layout. |

### "getAll"

Retrieves all Layout summaries by Layout type.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `type` | [`LayoutType`](https://docs.interop.io/browser/reference/javascript/layouts/layouttype/index.md) | **Required.** Type of the Layouts whose summaries to retrieve. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `summaries` | [`LayoutSummary[]`](../../../reference/javascript/layouts/layoutsummary/index.html) | Array of objects describing the Layout summaries. |

### "getGlobalPermissionState"

Retrieves the [permission state for the Multi-Screen Window Placement browser functionality](https://docs.interop.io/browser/capabilities/windows/layouts/layouts-api/index.md#requesting_multiscreen_window_placement_permission), required for Global Layouts to work properly.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `state` | `"prompt"` \| `"granted"` \| `"denied"` | State of the permission for the Multi-Screen Window Placement browser functionality. |

### "getRawWindowsLayoutData"

Retrieves raw window data when a Layout save is requested.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `context` | `object` | Context to be saved for the Layout windows. |
| `ignoreInstances` | `string[]` | Array of IDs of windows to be ignored when saving the Layout. |
| `instances` | `string[]` | Array of IDs of windows to be saved in the Layout. |
| `layoutName` | `string` | **Required.** Name of the Layout for which a save operation has been requested. |
| `layoutType` | `"Global"` \| `"Workspace"` | **Required.** Type of the Layout for which a save operation has been requested. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `windows` | `object[]` | Array of objects describing the windows to be saved in the Layout. |

### "import"

Imports Layouts.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layouts` | [`Layout[]`](../../../reference/javascript/layouts/layout/index.html) | **Required.** Array of objects describing the Layouts to import. |
| `mode` | `"replace"` \| `"merge"` | **Required.** Mode for importing the Layouts. Use `"replace"` to replace all existing Layouts with the provided ones. Use `"merge"` to merge the existing Layouts with the provided ones, replacing the Layouts with the same name. |

### "remove"

Removes a Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `name` | `string` | **Required.** Name of the Layout to remove. |
| `type` | [`LayoutType`](https://docs.interop.io/browser/reference/javascript/layouts/layouttype/index.md) | **Required.** Type of the Layout to remove. |

### "requestGlobalPermission"

Shows a browser prompt that requests permission from the user for the [Multi-Screen Window Placement browser functionality](https://docs.interop.io/browser/capabilities/windows/layouts/layouts-api/index.md#requesting_multiscreen_window_placement_permission), required for Global Layouts to work properly.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `isAvailable` | `boolean` | If `true`, the user has granted permission. |

### "restore"

Restores a Global Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layout` | [`RestoreOptions`](https://docs.interop.io/browser/reference/javascript/layouts/restoreoptions/index.md) | **Required.** Object with options for the Layout to restore. |

### "save"

Saves a Global Layout.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layout` | [`NewLayoutOptions`](https://docs.interop.io/browser/reference/javascript/layouts/newlayoutoptions/index.md) | **Required.** Object with options for the Layout to save. |

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `layout` | [`Layout`](https://docs.interop.io/browser/reference/javascript/layouts/layout/index.md) | Object describing the saved Layout. |

## Notifications

To send a control message to the [Notifications](https://docs.interop.io/browser/capabilities/notifications/setup/index.md) domain, set the `domain` property to `"notifications"`.

The following io.Connect operations are available for this domain:

### "clear"

Removes a notification by ID.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | **Required.** ID of the notification to remove. |

### "clearAll"

Removes all known notifications.

A `data` object for this operation isn't required.

### "click"

Clicks a notification or a notification action programmatically.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `action` | `string` | Name of the notification action to click. |
| `id` | `string` | **Required.** ID of the notification to click. |

### "getPermission"

Retrieves the notification permission state.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `permission` | `"granted"` \| `"denied"` \| `"default"` | State of the permission for sending web notifications to the desktop. |

### "list"

Retrieves all known notifications.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `notifications` | [`NotificationData[]`](../../../reference/javascript/notifications/notificationdata/index.html) | Array of objects describing the notifications. |

### "raiseNotification"

Raises a notification.

The `data` object for this operation is required and has the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `id` | `string` | **Required.** Notification ID. |
| `settings` | [`RaiseOptions`](https://docs.interop.io/browser/reference/javascript/notifications/raiseoptions/index.md) | **Required.** Object with options for the notification to raise. |

### "requestPermission"

Shows a browser prompt that requests permission from the user for sending web notifications to the desktop.

A `data` object for this operation isn't required.

Returns an object with the following properties:

| Property | Type | Description |
|----------|------|-------------|
| `permissionGranted` | `boolean` | If `true`, the user has granted permission. |
