# @coveo/explorer-messenger

> A utility to help library developers send messages to Coveo Explorer.

Latest version **0.5.0** (published 2025-09-23) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @coveo/explorer-messenger
pnpm add @coveo/explorer-messenger
yarn add @coveo/explorer-messenger
bun add @coveo/explorer-messenger
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2025-09-23 |
| First published | 2023-11-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | aboissinot, lcoolen, coveo-organization, coveoit, olamothe, sssayegh, ylakhdar, agong-coveo, ndlr, npmcoveo, pixhel, mmitiche, nlegros, sallain, msrioux, talao-coveo |

## Links

- npm: https://www.npmjs.com/package/@coveo/explorer-messenger
- npm.io page: https://npm.io/package/@coveo/explorer-messenger

## Recent versions

- 0.5.0 (latest) — 2025-09-23
- 0.3.2 (alpha) — 2023-12-21
- 0.4.1 — 2025-02-20
- 0.4.0 — 2024-07-03
- 0.3.1 — 2023-12-12
- 0.3.0 — 2023-12-11
- 0.2.0 — 2023-12-04
- 0.1.1 — 2023-11-17

## README

# Explorer Messenger

A utility to help library developers send messages to Coveo Explorer.

## Usage

First, create an instance of explorer messenger in your project. This instance can then be used to send a message.

```
import { createExplorerMessenger } from "@coveo/explorer-messenger";

const messenger = createExplorerMessenger();
messenger.sendMessage(...);
```

## Message

Each message's format will differ based on the kind of event it will be sent to.

### Event protocol

| Name  | Type               | Description                                                                                                                           |
| ----- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| kind  | "EVENT_PROTOCOL"   | Kind of message, always set to "EVENT_PROTOCOL"                                                                                       |
| event | EventProtocolEvent | Message's structured event                                                                                                            |
| url   | string             | Endpoint defined to communicate with the Event API                                                                                    |
| token | string             | Token to authorize the access to the Event API's validation endpoint. A view access level to the validate event privilege is required |

## Interfaces

### EventProtocolEvent

| Name | Type | Description   |
| ---- | ---- | ------------- |
| meta | Meta | `Meta` object |

You can set additional properties to define the event's payload.

#### Meta

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| type | string | The type of event |

---
_Source: https://npm.io/package/@coveo/explorer-messenger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
