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

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

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

## Contacts

Path: `filevine.db.contacts.search`

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

### Searchable filters

| Field          | Type     | Operators                                  |
| -------------- | -------- | ------------------------------------------ |
| `entity_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `id`           | `number` | equals, gt, gte, lt, lte, in               |
| `contactId`    | `number` | equals, gt, gte, lt, lte, in               |
| `firstName`    | `string` | equals, contains, startsWith, endsWith, in |
| `lastName`     | `string` | equals, contains, startsWith, endsWith, in |
| `fullName`     | `string` | equals, contains, startsWith, endsWith, in |
| `organization` | `string` | equals, contains, startsWith, endsWith, in |
| `createdDate`  | `string` | equals, contains, startsWith, endsWith, in |
| `modifiedDate` | `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).*

***

## Deadlines

Path: `filevine.db.deadlines.search`

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

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `id`          | `number` | equals, gt, gte, lt, lte, in               |
| `deadlineId`  | `number` | equals, gt, gte, lt, lte, in               |
| `projectId`   | `number` | equals, gt, gte, lt, lte, in               |
| `name`        | `string` | equals, contains, startsWith, endsWith, in |
| `dueDate`     | `string` | equals, contains, startsWith, endsWith, in |
| `assigneeId`  | `number` | equals, gt, gte, lt, lte, in               |
| `createdDate` | `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).*

***

## Documents

Path: `filevine.db.documents.search`

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

### Searchable filters

| Field            | Type      | Operators                                  |
| ---------------- | --------- | ------------------------------------------ |
| `entity_id`      | `string`  | equals, contains, startsWith, endsWith, in |
| `id`             | `number`  | equals, gt, gte, lt, lte, in               |
| `documentId`     | `number`  | equals, gt, gte, lt, lte, in               |
| `projectId`      | `number`  | equals, gt, gte, lt, lte, in               |
| `folderId`       | `number`  | equals, gt, gte, lt, lte, in               |
| `filename`       | `string`  | equals, contains, startsWith, endsWith, in |
| `size`           | `number`  | equals, gt, gte, lt, lte, in               |
| `contentType`    | `string`  | equals, contains, startsWith, endsWith, in |
| `sharedToPortal` | `boolean` | equals                                     |
| `version`        | `number`  | equals, gt, gte, lt, lte, in               |
| `uploadedBy`     | `number`  | equals, gt, gte, lt, lte, in               |
| `createdDate`    | `string`  | equals, contains, startsWith, endsWith, in |
| `modifiedDate`   | `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).*

***

## Notes

Path: `filevine.db.notes.search`

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

### Searchable filters

| Field          | Type      | Operators                                  |
| -------------- | --------- | ------------------------------------------ |
| `entity_id`    | `string`  | equals, contains, startsWith, endsWith, in |
| `id`           | `number`  | equals, gt, gte, lt, lte, in               |
| `noteId`       | `number`  | equals, gt, gte, lt, lte, in               |
| `projectId`    | `number`  | equals, gt, gte, lt, lte, in               |
| `body`         | `string`  | equals, contains, startsWith, endsWith, in |
| `pinned`       | `boolean` | equals                                     |
| `authorId`     | `number`  | equals, gt, gte, lt, lte, in               |
| `createdDate`  | `string`  | equals, contains, startsWith, endsWith, in |
| `modifiedDate` | `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).*

***

## Projects

Path: `filevine.db.projects.search`

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

### Searchable filters

| Field           | Type      | Operators                                  |
| --------------- | --------- | ------------------------------------------ |
| `entity_id`     | `string`  | equals, contains, startsWith, endsWith, in |
| `id`            | `number`  | equals, gt, gte, lt, lte, in               |
| `projectId`     | `number`  | equals, gt, gte, lt, lte, in               |
| `projectName`   | `string`  | equals, contains, startsWith, endsWith, in |
| `name`          | `string`  | equals, contains, startsWith, endsWith, in |
| `number`        | `string`  | equals, contains, startsWith, endsWith, in |
| `projectTypeId` | `number`  | equals, gt, gte, lt, lte, in               |
| `clientId`      | `number`  | equals, gt, gte, lt, lte, in               |
| `phaseName`     | `string`  | equals, contains, startsWith, endsWith, in |
| `isArchived`    | `boolean` | equals                                     |
| `createdDate`   | `string`  | equals, contains, startsWith, endsWith, in |
| `modifiedDate`  | `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).*

***

## Subscriptions

Path: `filevine.db.subscriptions.search`

```ts theme={null}
const rows = await corsair.filevine.db.subscriptions.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 |
| `subscriptionId` | `string` | equals, contains, startsWith, endsWith, in |
| `name`           | `string` | equals, contains, startsWith, endsWith, in |
| `description`    | `string` | equals, contains, startsWith, endsWith, in |
| `endpoint`       | `string` | equals, contains, startsWith, endsWith, in |
| `signingKey`     | `string` | equals, contains, startsWith, endsWith, in |
| `createdDate`    | `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).*

***

## Tasks

Path: `filevine.db.tasks.search`

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

### Searchable filters

| Field           | Type     | Operators                                  |
| --------------- | -------- | ------------------------------------------ |
| `entity_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `id`            | `number` | equals, gt, gte, lt, lte, in               |
| `taskId`        | `number` | equals, gt, gte, lt, lte, in               |
| `projectId`     | `number` | equals, gt, gte, lt, lte, in               |
| `title`         | `string` | equals, contains, startsWith, endsWith, in |
| `body`          | `string` | equals, contains, startsWith, endsWith, in |
| `dueDate`       | `string` | equals, contains, startsWith, endsWith, in |
| `assigneeId`    | `number` | equals, gt, gte, lt, lte, in               |
| `completedDate` | `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).*

***
