> ## 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.

# TestClient

> One method per route Tappify calls, plus raw for the response itself.

One method per route Tappify calls, plus `raw` for the response itself.

## Methods

### action()

```ts theme={null}
action(id, input): Promise<unknown>;
```

Calls one action by id.

#### Parameters

##### id

`string`

##### input

`unknown`

#### Returns

`Promise`\<`unknown`>

***

### context()

```ts theme={null}
context(id): Promise<ContextBlock>;
```

Calls one context block by id.

#### Parameters

##### id

`string`

#### Returns

`Promise`\<`ContextBlock`>

***

### event()

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

Posts one Tappify event, which the handler answers with 204.

#### Parameters

##### name

`string`

##### payload

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

#### Returns

`Promise`\<`void`>

***

### health()

```ts theme={null}
health(): Promise<TappifyHealth>;
```

Calls the health route, which carries no token.

#### Returns

`Promise`\<`TappifyHealth`>

***

### mention()

```ts theme={null}
mention(id, query): Promise<MentionItems>;
```

Calls one mention by id, with the query as the `q` parameter.

#### Parameters

##### id

`string`

##### query

`string`

#### Returns

`Promise`\<`MentionItems`>

***

### metrics()

```ts theme={null}
metrics(input): Promise<MetricsResponse>;
```

Calls the connector's metrics route.

#### Parameters

##### input

`MetricsInput`

#### Returns

`Promise`\<`MetricsResponse`>

***

### procedure()

```ts theme={null}
procedure(name, input?): Promise<unknown>;
```

Calls one procedure by name; the input defaults to an empty object.

#### Parameters

##### name

`string`

##### input?

`unknown`

#### Returns

`Promise`\<`unknown`>

***

### raw()

```ts theme={null}
raw(
   method, 
   path, 
   body?
): Promise<Response>;
```

Sends any method and path and returns the `Response`, for a test that asserts
on a status rather than a body.

#### Parameters

##### method

`string`

##### path

`string`

##### body?

`unknown`

#### Returns

`Promise`\<`Response`>

***

### tool()

```ts theme={null}
tool(id, input): Promise<unknown>;
```

Calls one tool by id and returns the card it answered with.

#### Parameters

##### id

`string`

##### input

`unknown`

#### Returns

`Promise`\<`unknown`>

***

### work()

```ts theme={null}
work(operation, input): Promise<unknown>;
```

Calls one work operation.

#### Parameters

##### operation

`WorkOperation`

##### input

`unknown`

#### Returns

`Promise`\<`unknown`>
