<a id="filtersclient"></a>

### Filters Client

The filters client is a client for interacting with Hatchet's filters API.

#### Methods

<a id="create"></a>

##### `create()`

Creates a new filter.

Parameters

| Parameter | Type                    | Description                           |
| --------- | ----------------------- | ------------------------------------- |
| `opts`    | `V1CreateFilterRequest` | The options for the create operation. |

Returns

`Promise`\<`V1Filter`\>

A promise that resolves to the created filter.

<a id="delete"></a>

##### `delete()`

Deletes a filter by its ID.

Parameters

| Parameter  | Type     | Description                     |
| ---------- | -------- | ------------------------------- |
| `filterId` | `string` | The ID of the filter to delete. |

Returns

`Promise`\<`V1Filter`\>

A promise that resolves to the deleted filter.

<a id="get"></a>

##### `get()`

Gets a filter by its ID.

Parameters

| Parameter  | Type     | Description                  |
| ---------- | -------- | ---------------------------- |
| `filterId` | `string` | The ID of the filter to get. |

Returns

`Promise`\<`V1Filter`\>

A promise that resolves to the filter.

<a id="list"></a>

##### `list()`

Lists all filters.

Parameters

| Parameter           | Type                                                                                    | Description                                                    |
| ------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `opts?`             | \{ `limit?`: `number`; `offset?`: `number`; `scopes?`: ...[]; `workflowIds?`: ...[]; \} | The options for the list operation.                            |
| `opts.limit?`       | `number`                                                                                | The number of filters to return.                               |
| `opts.offset?`      | `number`                                                                                | The number of filters to skip before returning the result set. |
| `opts.scopes?`      | ...[]                                                                                   | A list of scopes to filter by.                                 |
| `opts.workflowIds?` | ...[]                                                                                   | A list of workflow IDs to filter by.                           |

Returns

`Promise`\<`V1FilterList`\>

A promise that resolves to the list of filters.

<a id="update"></a>

##### `update()`

Updates a filter by its ID.

Parameters

| Parameter  | Type                    | Description                         |
| ---------- | ----------------------- | ----------------------------------- |
| `filterId` | `string`                | The ID of the filter to update.     |
| `updates`  | `V1UpdateFilterRequest` | The updates to apply to the filter. |

Returns

`Promise`\<`V1Filter`\>

A promise that resolves to the updated filter.
