# HostNotificationEvents

Events that a host website can listen to.
This is kept separate from WidgetEvents definitions
in order to avoid any coupling of internal types to
what we expose to the host.

### Properties

- [on-agent-assigned](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-agent-assigned)
- [on-agent-unassigned](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-agent-unassigned)
- [on-conversation-ended](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-conversation-ended)
- [on-conversation-started](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-conversation-started)
- [on-message-added](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-message-added)
- [on-user-identity-changed](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-user-identity-changed)
- [on-user-purged](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-user-purged)
- [on-view-changed](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-view-changed)
- [on-widget-focus-changed](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-widget-focus-changed)
- [on-widget-open-changed](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-widget-open-changed)
- [on-shutdown-completed](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-shutdown-completed)
- [on-backend-error](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-backend-error)
- [on-api-ready](/docs/dixamessenger/web/interfaces/hostnotificationevents#on-api-ready)


## Properties

### on-agent-assigned

• **on-agent-assigned**: [`Agent`](/docs/dixamessenger/web/interfaces/agent)

### on-agent-unassigned

• **on-agent-unassigned**: [`Agent`](/docs/dixamessenger/web/interfaces/agent)

### on-conversation-ended

• **on-conversation-ended**: `Object`

#### Type declaration

| Name | Type |
|  --- | --- |
| `conversationId` | `string` |


### on-conversation-started

• **on-conversation-started**: `Object`

#### Type declaration

| Name | Type |
|  --- | --- |
| `conversationId` | `string` |


### on-message-added

• **on-message-added**: [`ReceivableMessages`](/docs/dixamessenger/web/interfaces/receivablemessages) | [`SendableMessages`](/docs/dixamessenger/web/interfaces/sendablemessages)

### on-user-identity-changed

• **on-user-identity-changed**: `'anonymous' | 'claim' | 'verified'`

For more details see [Actors](/docs/dixamessenger/web/types#identify-actors)

### on-user-purged

• **on-user-purged**: `void`

### on-view-changed

• **on-view-changed**:


```ts
'MainView' |
  'CreateNewConversation' |
  'Conversation' |
  'PreviousConversations' |
  'BulletinItemModal' |
  'KnowledgeBase' |
  'KnowledgeBaseArticle' |
  'IdentityClaimModal' |
  'EndConversationModal';
```

### on-widget-focus-changed

• **on-widget-focus-changed**: `"focused"` | `"blurred"`

### on-widget-open-changed

• **on-widget-open-changed**: `boolean`

`true` represents the widget getting open, `false` represents the widget getting closed.

### on-shutdown-completed

• **on-shutdown-completed**: `void`

Needed for when you need to restart the widget after it has been shutdown.

### on-backend-error

• **on-backend-error**: [`BackendError`](/docs/dixamessenger/web/interfaces/backenderror)

Used to listen to errors that are returned from the backend in response to a command.

### on-api-ready

• **on-api-ready**: `void`

Used to listen to when the `_dixa_.api` is ready to be used. You can use this event to start using the [promise-based API](/docs/dixamessenger/web/promisebasedapi).