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

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

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

## Campaigns

Path: `dripcel.db.campaigns.search`

```ts theme={null}
const rows = await corsair.dripcel.db.campaigns.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 |
| `status`    | `string`  | equals, contains, startsWith, endsWith, in |
| `active`    | `boolean` | equals                                     |
| `createdAt` | `string`  | equals, contains, startsWith, endsWith, in |
| `updatedAt` | `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).*

***

## Contacts

Path: `dripcel.db.contacts.search`

```ts theme={null}
const rows = await corsair.dripcel.db.contacts.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 |
| `cell`      | `string` | equals, contains, startsWith, endsWith, in |
| `firstname` | `string` | equals, contains, startsWith, endsWith, in |
| `lastname`  | `string` | equals, contains, startsWith, endsWith, in |
| `email`     | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt` | `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).*

***

## Deliveries

Path: `dripcel.db.deliveries.search`

```ts theme={null}
const rows = await corsair.dripcel.db.deliveries.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 |
| `cell`       | `string` | equals, contains, startsWith, endsWith, in |
| `customerId` | `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).*

***

## Email Templates

Path: `dripcel.db.emailTemplates.search`

```ts theme={null}
const rows = await corsair.dripcel.db.emailTemplates.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 |
| `subject`   | `string` | equals, contains, startsWith, endsWith, in |
| `content`   | `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).*

***

## Replies

Path: `dripcel.db.replies.search`

```ts theme={null}
const rows = await corsair.dripcel.db.replies.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 |
| `Msisdn`        | `string` | equals, contains, startsWith, endsWith, in |
| `Message`       | `string` | equals, contains, startsWith, endsWith, in |
| `campaign_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `UserReference` | `string` | equals, contains, startsWith, endsWith, in |
| `Received`      | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt`     | `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).*

***

## Sales

Path: `dripcel.db.sales.search`

```ts theme={null}
const rows = await corsair.dripcel.db.sales.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 |
| `campaign_id` | `string` | equals, contains, startsWith, endsWith, in |
| `send_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `click_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `cell`        | `string` | equals, contains, startsWith, endsWith, in |
| `soldAt`      | `string` | equals, contains, startsWith, endsWith, in |
| `saleValue`   | `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).*

***

## Send Logs

Path: `dripcel.db.sendLogs.search`

```ts theme={null}
const rows = await corsair.dripcel.db.sendLogs.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 |
| `campaign_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `message`         | `string` | equals, contains, startsWith, endsWith, in |
| `triggeredBy`     | `string` | equals, contains, startsWith, endsWith, in |
| `startDeliveryAt` | `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).*

***

## Tags

Path: `dripcel.db.tags.search`

```ts theme={null}
const rows = await corsair.dripcel.db.tags.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 |
| `color`       | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`   | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt`   | `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).*

***
