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

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

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

## Comments

Path: `todoist.db.comments.search`

```ts theme={null}
const rows = await corsair.todoist.db.comments.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 |
| `task_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `project_id` | `string` | equals, contains, startsWith, endsWith, in |
| `content`    | `string` | equals, contains, startsWith, endsWith, in |
| `posted_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).*

***

## Labels

Path: `todoist.db.labels.search`

```ts theme={null}
const rows = await corsair.todoist.db.labels.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 |
| `color`     | `string`  | equals, contains, startsWith, endsWith, in |
| `order`     | `number`  | equals, gt, gte, lt, lte, in               |
| `favorite`  | `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).*

***

## Projects

Path: `todoist.db.projects.search`

```ts theme={null}
const rows = await corsair.todoist.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 |
| `color`         | `string`  | equals, contains, startsWith, endsWith, in |
| `parent_id`     | `string`  | equals, contains, startsWith, endsWith, in |
| `order`         | `number`  | equals, gt, gte, lt, lte, in               |
| `favorite`      | `boolean` | equals                                     |
| `comment_count` | `number`  | equals, gt, gte, lt, lte, in               |
| `is_shared`     | `boolean` | equals                                     |
| `is_archived`   | `boolean` | equals                                     |
| `is_favorite`   | `boolean` | equals                                     |
| `view_style`    | `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).*

***

## Reminders

Path: `todoist.db.reminders.search`

```ts theme={null}
const rows = await corsair.todoist.db.reminders.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 |
| `task_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `notify_uid` | `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: `todoist.db.sections.search`

```ts theme={null}
const rows = await corsair.todoist.db.sections.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 |
| `project_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name`       | `string` | equals, contains, startsWith, endsWith, in |
| `order`      | `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).*

***

## Tasks

Path: `todoist.db.tasks.search`

```ts theme={null}
const rows = await corsair.todoist.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 |
| `project_id`    | `string`  | equals, contains, startsWith, endsWith, in |
| `section_id`    | `string`  | equals, contains, startsWith, endsWith, in |
| `content`       | `string`  | equals, contains, startsWith, endsWith, in |
| `description`   | `string`  | equals, contains, startsWith, endsWith, in |
| `is_completed`  | `boolean` | equals                                     |
| `parent_id`     | `string`  | equals, contains, startsWith, endsWith, in |
| `order`         | `number`  | equals, gt, gte, lt, lte, in               |
| `priority`      | `number`  | equals, gt, gte, lt, lte, in               |
| `url`           | `string`  | equals, contains, startsWith, endsWith, in |
| `comment_count` | `number`  | equals, gt, gte, lt, lte, in               |
| `created_at`    | `string`  | equals, contains, startsWith, endsWith, in |
| `creator_id`    | `string`  | equals, contains, startsWith, endsWith, in |
| `assignee_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `assigner_id`   | `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).*

***
