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

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

The Breathe HR plugin syncs data locally. Use `corsair.breathehr.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>

## Absences

Path: `breathehr.db.absences.search`

```ts theme={null}
const rows = await corsair.breathehr.db.absences.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               |
| `start_date` | `string` | equals, contains, startsWith, endsWith, in |
| `end_date`   | `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).*

***

## Accounts

Path: `breathehr.db.accounts.search`

```ts theme={null}
const rows = await corsair.breathehr.db.accounts.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               |
| `name`                      | `string`  | equals, contains, startsWith, endsWith, in |
| `domain`                    | `string`  | equals, contains, startsWith, endsWith, in |
| `uuid`                      | `string`  | equals, contains, startsWith, endsWith, in |
| `using_rta`                 | `boolean` | equals                                     |
| `health_and_safety_enabled` | `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).*

***

## Departments

Path: `breathehr.db.departments.search`

```ts theme={null}
const rows = await corsair.breathehr.db.departments.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               |
| `name`      | `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).*

***

## Employee Expenses

Path: `breathehr.db.employeeExpenses.search`

```ts theme={null}
const rows = await corsair.breathehr.db.employeeExpenses.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               |
| `description`  | `string` | equals, contains, startsWith, endsWith, in |
| `expense_date` | `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).*

***

## Employees

Path: `breathehr.db.employees.search`

```ts theme={null}
const rows = await corsair.breathehr.db.employees.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               |
| `account_id`        | `number`  | equals, gt, gte, lt, lte, in               |
| `first_name`        | `string`  | equals, contains, startsWith, endsWith, in |
| `last_name`         | `string`  | equals, contains, startsWith, endsWith, in |
| `email`             | `string`  | equals, contains, startsWith, endsWith, in |
| `job_title`         | `string`  | equals, contains, startsWith, endsWith, in |
| `status`            | `string`  | equals, contains, startsWith, endsWith, in |
| `join_date`         | `string`  | equals, contains, startsWith, endsWith, in |
| `company_join_date` | `string`  | equals, contains, startsWith, endsWith, in |
| `job_start_date`    | `string`  | equals, contains, startsWith, endsWith, in |
| `hr`                | `boolean` | equals                                     |
| `created_at`        | `string`  | equals, contains, startsWith, endsWith, in |
| `updated_at`        | `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).*

***

## Leave Requests

Path: `breathehr.db.leaveRequests.search`

```ts theme={null}
const rows = await corsair.breathehr.db.leaveRequests.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               |
| `start_date` | `string` | equals, contains, startsWith, endsWith, in |
| `end_date`   | `string` | equals, contains, startsWith, endsWith, in |
| `type`       | `string` | equals, contains, startsWith, endsWith, in |
| `status`     | `string` | equals, contains, startsWith, endsWith, in |
| `notes`      | `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).*

***

## Sicknesses

Path: `breathehr.db.sicknesses.search`

```ts theme={null}
const rows = await corsair.breathehr.db.sicknesses.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               |
| `start_date` | `string` | equals, contains, startsWith, endsWith, in |
| `end_date`   | `string` | equals, contains, startsWith, endsWith, in |
| `status`     | `string` | equals, contains, startsWith, endsWith, in |
| `reason`     | `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).*

***
