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

> Amara (subtitling platform) local sync: searchable entities, `.search()` filters, and operators.

The Amara (subtitling platform) plugin syncs data locally. Use `corsair.amara.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>

## Teams

Path: `amara.db.teams.search`

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

### Searchable filters

| Field               | Type      | Operators                                  |
| ------------------- | --------- | ------------------------------------------ |
| `entity_id`         | `string`  | equals, contains, startsWith, endsWith, in |
| `slug`              | `string`  | equals, contains, startsWith, endsWith, in |
| `name`              | `string`  | equals, contains, startsWith, endsWith, in |
| `type`              | `string`  | equals, contains, startsWith, endsWith, in |
| `description`       | `string`  | equals, contains, startsWith, endsWith, in |
| `membership_policy` | `string`  | equals, contains, startsWith, endsWith, in |
| `video_policy`      | `string`  | equals, contains, startsWith, endsWith, in |
| `is_visible`        | `boolean` | equals                                     |
| `resource_uri`      | `string`  | equals, contains, startsWith, endsWith, in |
| `fetchedAt`         | `date`    | equals, before, after, between             |

*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: `amara.db.users.search`

```ts theme={null}
const rows = await corsair.amara.db.users.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 |
| `username`     | `string` | equals, contains, startsWith, endsWith, in |
| `full_name`    | `string` | equals, contains, startsWith, endsWith, in |
| `first_name`   | `string` | equals, contains, startsWith, endsWith, in |
| `last_name`    | `string` | equals, contains, startsWith, endsWith, in |
| `biography`    | `string` | equals, contains, startsWith, endsWith, in |
| `homepage`     | `string` | equals, contains, startsWith, endsWith, in |
| `avatar`       | `string` | equals, contains, startsWith, endsWith, in |
| `num_videos`   | `number` | equals, gt, gte, lt, lte, in               |
| `resource_uri` | `string` | equals, contains, startsWith, endsWith, in |
| `fetchedAt`    | `date`   | equals, before, after, between             |

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

***

## Videos

Path: `amara.db.videos.search`

```ts theme={null}
const rows = await corsair.amara.db.videos.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 |
| `title`                       | `string` | equals, contains, startsWith, endsWith, in |
| `description`                 | `string` | equals, contains, startsWith, endsWith, in |
| `duration`                    | `number` | equals, gt, gte, lt, lte, in               |
| `thumbnail`                   | `string` | equals, contains, startsWith, endsWith, in |
| `team`                        | `string` | equals, contains, startsWith, endsWith, in |
| `project`                     | `string` | equals, contains, startsWith, endsWith, in |
| `primary_audio_language_code` | `string` | equals, contains, startsWith, endsWith, in |
| `video_type`                  | `string` | equals, contains, startsWith, endsWith, in |
| `resource_uri`                | `string` | equals, contains, startsWith, endsWith, in |
| `fetchedAt`                   | `date`   | equals, before, after, between             |

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

***
