# AppRegistry

**Kind**: interface | **Module**: [Apps](https://docs.interop.io/desktop/reference/javascript/apps/index.md) | **Access**: `io.apps.registry`

**Source**: https://docs.interop.io/desktop/reference/javascript/apps/appregistry/index.html

Object that can be used for managing app definitions.

## Properties

- **`inMemory`** (`InMemoryStore`, required)
  Object that can be used for handling app definitions dynamically.

## Methods

### get

Retrieves an app by name.

```ts
(options: GetAppOptions) => Promise<Application | null>
```

**Parameters**

- **`options`** (`GetAppOptions`, required)
  Options for retrieving the app.

**Returns**: `Promise<Application | null>`

### getMany

Retrieves all available apps. You can also provide an optional filter to refine the result.

```ts
(filter?: AppFilter) => Promise<Application[]>
```

**Parameters**

- **`filter`** (`AppFilter`, optional)
  Filter for retrieving apps.

**Returns**: `Promise<Application[]>`

### has

Checks if an app exists in the app registry.

```ts
(name: string) => Promise<boolean>
```

**Parameters**

- **`name`** (`string`, required)
  The name of the app to check.

**Returns**: `Promise<boolean>`

### onAdded

Notifies when an app has been registered in the environment. Returns an unsubscribe function.

```ts
(handler: AppEventHandler<AppAddedEvent>) => Promise<UnsubscribeFunction>
```

**Parameters**

- **`handler`** (`AppEventHandler<AppAddedEvent>`, required)
  Callback function for handling the event. Receives as an argument an object describing the added app.

**Returns**: `Promise<UnsubscribeFunction>`

### onRemoved

Notifies when an app has been removed from the environment. Returns an unsubscribe function.

```ts
(handler: AppEventHandler<AppRemovedEvent>) => Promise<UnsubscribeFunction>
```

**Parameters**

- **`handler`** (`AppEventHandler<AppRemovedEvent>`, required)
  Callback function for handling the event. Receives as an argument the name of the removed app.

**Returns**: `Promise<UnsubscribeFunction>`

### onUpdated

Notifies when an app has been updated. Returns an unsubscribe function.

```ts
(handler: AppEventHandler<AppUpdatedEvent>) => Promise<UnsubscribeFunction>
```

**Parameters**

- **`handler`** (`AppEventHandler<AppUpdatedEvent>`, required)
  Callback function for handling the event. Receives as an argument an object describing the updated app and the new values of the updated app properties.

**Returns**: `Promise<UnsubscribeFunction>`

## Related types

- [AppAddedEvent](https://docs.interop.io/desktop/reference/javascript/apps/appaddedevent/index.md)
- [AppEventHandler](https://docs.interop.io/desktop/reference/javascript/apps/appeventhandler/index.md)
- [AppFilter](https://docs.interop.io/desktop/reference/javascript/apps/appfilter/index.md)
- [AppRemovedEvent](https://docs.interop.io/desktop/reference/javascript/apps/appremovedevent/index.md)
- [AppUpdatedEvent](https://docs.interop.io/desktop/reference/javascript/apps/appupdatedevent/index.md)
- [Application](https://docs.interop.io/desktop/reference/javascript/apps/application/index.md)
- [GetAppOptions](https://docs.interop.io/desktop/reference/javascript/apps/getappoptions/index.md)
- [InMemoryStore](https://docs.interop.io/desktop/reference/javascript/apps/inmemorystore/index.md)
- [UnsubscribeFunction](https://docs.interop.io/desktop/reference/javascript/search/unsubscribefunction/index.md)
