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

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

The Bitwarden plugin syncs data locally. Use `corsair.bitwarden.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>

## Ciphers

Path: `bitwarden.db.ciphers.search`

```ts theme={null}
const rows = await corsair.bitwarden.db.ciphers.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 |
| `organizationId` | `string`  | equals, contains, startsWith, endsWith, in |
| `name`           | `string`  | equals, contains, startsWith, endsWith, in |
| `type`           | `number`  | equals, gt, gte, lt, lte, in               |
| `favorite`       | `boolean` | equals                                     |
| `edit`           | `boolean` | equals                                     |

*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).*

***

## Collections

Path: `bitwarden.db.collections.search`

```ts theme={null}
const rows = await corsair.bitwarden.db.collections.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 |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `name`           | `string` | equals, contains, startsWith, endsWith, in |
| `externalId`     | `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).*

***

## Members

Path: `bitwarden.db.members.search`

```ts theme={null}
const rows = await corsair.bitwarden.db.members.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 |
| `organizationId`   | `string`  | equals, contains, startsWith, endsWith, in |
| `email`            | `string`  | equals, contains, startsWith, endsWith, in |
| `name`             | `string`  | equals, contains, startsWith, endsWith, in |
| `status`           | `number`  | equals, gt, gte, lt, lte, in               |
| `type`             | `number`  | equals, gt, gte, lt, lte, in               |
| `twoFactorEnabled` | `boolean` | equals                                     |
| `accessAll`        | `boolean` | equals                                     |

*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).*

***

## Organizations

Path: `bitwarden.db.organizations.search`

```ts theme={null}
const rows = await corsair.bitwarden.db.organizations.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 |
| `billingEmail`    | `string` | equals, contains, startsWith, endsWith, in |
| `businessName`    | `string` | equals, contains, startsWith, endsWith, in |
| `businessCountry` | `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).*

***
