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

# Database

> Botpress local sync: searchable entities, `.search()` filters, and operators.

The Botpress plugin syncs data locally. Use `corsair.botpress.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Bots

Path: `botpress.db.bots.search`

```ts theme={null}
const rows = await corsair.botpress.db.bots.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type      | Operators                                  |
| ------------- | --------- | ------------------------------------------ |
| `entity_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `id`          | `string`  | equals, contains, startsWith, endsWith, in |
| `name`        | `string`  | equals, contains, startsWith, endsWith, in |
| `createdAt`   | `date`    | equals, before, after, between             |
| `updatedAt`   | `date`    | equals, before, after, between             |
| `createdBy`   | `string`  | equals, contains, startsWith, endsWith, in |
| `dev`         | `boolean` | equals                                     |
| `alwaysAlive` | `boolean` | equals                                     |
| `status`      | `string`  | equals, contains, startsWith, endsWith, in |
| `type`        | `string`  | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Integrations

Path: `botpress.db.integrations.search`

```ts theme={null}
const rows = await corsair.botpress.db.integrations.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type      | Operators                                  |
| ------------- | --------- | ------------------------------------------ |
| `entity_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `id`          | `string`  | equals, contains, startsWith, endsWith, in |
| `name`        | `string`  | equals, contains, startsWith, endsWith, in |
| `version`     | `string`  | equals, contains, startsWith, endsWith, in |
| `title`       | `string`  | equals, contains, startsWith, endsWith, in |
| `description` | `string`  | equals, contains, startsWith, endsWith, in |
| `createdAt`   | `date`    | equals, before, after, between             |
| `updatedAt`   | `date`    | equals, before, after, between             |
| `visibility`  | `string`  | equals, contains, startsWith, endsWith, in |
| `dev`         | `boolean` | equals                                     |
| `url`         | `string`  | equals, contains, startsWith, endsWith, in |
| `iconUrl`     | `string`  | equals, contains, startsWith, endsWith, in |
| `readmeUrl`   | `string`  | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Workspaces

Path: `botpress.db.workspaces.search`

```ts theme={null}
const rows = await corsair.botpress.db.workspaces.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field            | Type      | Operators                                  |
| ---------------- | --------- | ------------------------------------------ |
| `entity_id`      | `string`  | equals, contains, startsWith, endsWith, in |
| `id`             | `string`  | equals, contains, startsWith, endsWith, in |
| `name`           | `string`  | equals, contains, startsWith, endsWith, in |
| `ownerId`        | `string`  | equals, contains, startsWith, endsWith, in |
| `createdAt`      | `date`    | equals, before, after, between             |
| `updatedAt`      | `date`    | equals, before, after, between             |
| `blocked`        | `boolean` | equals                                     |
| `plan`           | `string`  | equals, contains, startsWith, endsWith, in |
| `billingVersion` | `string`  | equals, contains, startsWith, endsWith, in |
| `spendingLimit`  | `number`  | equals, gt, gte, lt, lte, in               |
| `botCount`       | `number`  | equals, gt, gte, lt, lte, in               |
| `about`          | `string`  | equals, contains, startsWith, endsWith, in |
| `profilePicture` | `string`  | equals, contains, startsWith, endsWith, in |
| `contactEmail`   | `string`  | equals, contains, startsWith, endsWith, in |
| `website`        | `string`  | equals, contains, startsWith, endsWith, in |
| `isPublic`       | `boolean` | equals                                     |
| `handle`         | `string`  | equals, contains, startsWith, endsWith, in |
| `activeTrialId`  | `string`  | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
