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

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

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

## Clients

Path: `everhour.db.clients.search`

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

### Searchable filters

| Field             | Type     | Operators                                  |
| ----------------- | -------- | ------------------------------------------ |
| `entity_id`       | `string` | equals, contains, startsWith, endsWith, in |
| `name`            | `string` | equals, contains, startsWith, endsWith, in |
| `phone`           | `string` | equals, contains, startsWith, endsWith, in |
| `address`         | `string` | equals, contains, startsWith, endsWith, in |
| `businessDetails` | `string` | equals, contains, startsWith, endsWith, in |
| `status`          | `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).*

***

## Expense Categories

Path: `everhour.db.expenseCategories.search`

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

### Searchable filters

| Field       | Type      | Operators                                  |
| ----------- | --------- | ------------------------------------------ |
| `entity_id` | `string`  | equals, contains, startsWith, endsWith, in |
| `name`      | `string`  | equals, contains, startsWith, endsWith, in |
| `color`     | `string`  | equals, contains, startsWith, endsWith, in |
| `unitBased` | `boolean` | equals                                     |
| `unitName`  | `string`  | equals, contains, startsWith, endsWith, in |
| `unitPrice` | `number`  | equals, gt, gte, lt, lte, 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).*

***

## Expenses

Path: `everhour.db.expenses.search`

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

### Searchable filters

| Field       | Type      | Operators                                  |
| ----------- | --------- | ------------------------------------------ |
| `entity_id` | `string`  | equals, contains, startsWith, endsWith, in |
| `amount`    | `number`  | equals, gt, gte, lt, lte, in               |
| `date`      | `string`  | equals, contains, startsWith, endsWith, in |
| `project`   | `string`  | equals, contains, startsWith, endsWith, in |
| `billable`  | `boolean` | equals                                     |
| `details`   | `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).*

***

## Invoices

Path: `everhour.db.invoices.search`

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

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `status`      | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`   | `string` | equals, contains, startsWith, endsWith, in |
| `publicId`    | `string` | equals, contains, startsWith, endsWith, in |
| `totalAmount` | `number` | equals, gt, gte, lt, lte, 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).*

***

## Platforms

Path: `everhour.db.platforms.search`

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

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name`      | `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).*

***

## Projects

Path: `everhour.db.projects.search`

```ts theme={null}
const rows = await corsair.everhour.db.projects.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 |
| `description` | `string`  | equals, contains, startsWith, endsWith, in |
| `client_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `color`       | `string`  | equals, contains, startsWith, endsWith, in |
| `is_archived` | `boolean` | equals                                     |
| `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).*

***

## Sections

Path: `everhour.db.sections.search`

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

### Searchable filters

| Field       | Type      | Operators                                  |
| ----------- | --------- | ------------------------------------------ |
| `entity_id` | `string`  | equals, contains, startsWith, endsWith, in |
| `name`      | `string`  | equals, contains, startsWith, endsWith, in |
| `project`   | `string`  | equals, contains, startsWith, endsWith, in |
| `position`  | `number`  | equals, gt, gte, lt, lte, in               |
| `status`    | `string`  | equals, contains, startsWith, endsWith, in |
| `collapsed` | `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).*

***

## Tags

Path: `everhour.db.tags.search`

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

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name`      | `string` | equals, contains, startsWith, endsWith, in |
| `color`     | `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: `everhour.db.tasks.search`

```ts theme={null}
const rows = await corsair.everhour.db.tasks.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 |
| `project_id`  | `string`  | equals, contains, startsWith, endsWith, in |
| `description` | `string`  | equals, contains, startsWith, endsWith, in |
| `status`      | `string`  | equals, contains, startsWith, endsWith, in |
| `is_archived` | `boolean` | equals                                     |
| `section`     | `number`  | equals, gt, gte, lt, lte, 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).*

***

## Timecards

Path: `everhour.db.timecards.search`

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

### Searchable filters

| Field       | Type      | Operators                                  |
| ----------- | --------- | ------------------------------------------ |
| `entity_id` | `string`  | equals, contains, startsWith, endsWith, in |
| `workTime`  | `number`  | equals, gt, gte, lt, lte, in               |
| `clockIn`   | `string`  | equals, contains, startsWith, endsWith, in |
| `clockOut`  | `string`  | equals, contains, startsWith, endsWith, in |
| `breakTime` | `number`  | equals, gt, gte, lt, lte, in               |
| `date`      | `string`  | equals, contains, startsWith, endsWith, in |
| `weekId`    | `number`  | equals, gt, gte, lt, lte, in               |
| `isLocked`  | `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).*

***

## Time Entries

Path: `everhour.db.timeEntries.search`

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

### Searchable filters

| Field         | Type      | Operators                                  |
| ------------- | --------- | ------------------------------------------ |
| `entity_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `time`        | `number`  | equals, gt, gte, lt, lte, in               |
| `date`        | `string`  | equals, contains, startsWith, endsWith, in |
| `task_id`     | `string`  | equals, contains, startsWith, endsWith, in |
| `user_id`     | `string`  | equals, contains, startsWith, endsWith, in |
| `start_date`  | `date`    | equals, before, after, between             |
| `end_date`    | `date`    | equals, before, after, between             |
| `duration`    | `number`  | equals, gt, gte, lt, lte, in               |
| `description` | `string`  | equals, contains, startsWith, endsWith, in |
| `comment`     | `string`  | equals, contains, startsWith, endsWith, in |
| `is_billable` | `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).*

***

## Users

Path: `everhour.db.users.search`

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

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `name`       | `string` | equals, contains, startsWith, endsWith, in |
| `first_name` | `string` | equals, contains, startsWith, endsWith, in |
| `last_name`  | `string` | equals, contains, startsWith, endsWith, in |
| `email`      | `string` | equals, contains, startsWith, endsWith, in |
| `avatarUrl`  | `string` | equals, contains, startsWith, endsWith, in |
| `avatar`     | `string` | equals, contains, startsWith, endsWith, in |
| `role`       | `string` | equals, contains, startsWith, endsWith, in |
| `status`     | `string` | equals, contains, startsWith, endsWith, in |
| `headline`   | `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).*

***

## Webhooks

Path: `everhour.db.webhooks.search`

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

### Searchable filters

| Field        | Type      | Operators                                  |
| ------------ | --------- | ------------------------------------------ |
| `entity_id`  | `string`  | equals, contains, startsWith, endsWith, in |
| `targetUrl`  | `string`  | equals, contains, startsWith, endsWith, in |
| `project`    | `string`  | equals, contains, startsWith, endsWith, in |
| `active`     | `boolean` | equals                                     |
| `createdAt`  | `string`  | equals, contains, startsWith, endsWith, in |
| `lastUsedAt` | `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).*

***
