> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tappify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TapMock

> The mock bridge, with the recorded calls and the handles that drive it.

The mock bridge, with the recorded calls and the handles that drive it.

## Properties

### calls

```ts theme={null}
calls: TapMockCalls;
```

***

### portal

```ts theme={null}
portal: HTMLElement;
```

The node `TapDialog` renders into, appended to the document by `renderWithTap`.

***

### tap

```ts theme={null}
tap: Tap;
```

The bridge itself, which `renderWithTap` puts above the component.

## Methods

### documents()

```ts theme={null}
documents(collection, documentId?): unknown[];
```

What a collection holds now, or just the one document under `documentId`.

#### Parameters

##### collection

`string`

##### documentId?

`string`

#### Returns

`unknown`\[]

***

### emit()

```ts theme={null}
emit<E>(event, payload): void;
```

Delivers a Tappify event to everything subscribed through `tap.data.subscribe`.

#### Type Parameters

##### E

`E` *extends*
\| `"release.shipped"`
\| `"metadata.changed"`
\| `"keyword.set_changed"`
\| `"screenshots.updated"`
\| `"price.changed"`
\| `"featuring.started"`
\| `"score.changed"`
\| `"incident.opened"`
\| `"incident.resolved"`
\| `"playbook.step_approved"`
\| `"review.thread_opened"`
\| `"review.thread_resolved"`
\| `"approval.requested"`
\| `"digest.sent"`
\| `"install.created"`
\| `"install.paused"`
\| `"install.resumed"`
\| `"install.revoked"`
\| `"install.token_rotated"`
\| `"scopes.changed"`
\| `"settings.changed"`

#### Parameters

##### event

`E`

##### payload

`TapHostEvents`\[`E`]

#### Returns

`void`

***

### setFilters()

```ts theme={null}
setFilters(filters): void;
```

Replaces the whole filter bar and re-renders the hooks that read it.

#### Parameters

##### filters

`TapFilters`

#### Returns

`void`

***

### setParams()

```ts theme={null}
setParams(params): void;
```

Replaces the route `useTapParams` reports, in the host's own positional shape.

#### Parameters

##### params

`Record`\<`string`, `string`>

#### Returns

`void`

***

### setSize()

```ts theme={null}
setSize(size): void;
```

Moves the mount between slot, panel and page.

#### Parameters

##### size

`TapSize`

#### Returns

`void`

***

### setTheme()

```ts theme={null}
setTheme(mode): void;
```

Switches the theme `useTapTheme` reports.

#### Parameters

##### mode

`"light"` | `"dark"`

#### Returns

`void`
