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

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

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

## Companies

Path: `hubspot.db.companies.search`

```ts theme={null}
const rows = await corsair.hubspot.db.companies.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 |
| `createdAt` | `date`    | equals, before, after, between             |
| `updatedAt` | `date`    | equals, before, after, between             |
| `archived`  | `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).*

***

## Contacts

Path: `hubspot.db.contacts.search`

```ts theme={null}
const rows = await corsair.hubspot.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 |
| `createdAt` | `date`    | equals, before, after, between             |
| `updatedAt` | `date`    | equals, before, after, between             |
| `archived`  | `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).*

***

## Deals

Path: `hubspot.db.deals.search`

```ts theme={null}
const rows = await corsair.hubspot.db.deals.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 |
| `createdAt` | `date`    | equals, before, after, between             |
| `updatedAt` | `date`    | equals, before, after, between             |
| `archived`  | `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).*

***

## Engagements

Path: `hubspot.db.engagements.search`

```ts theme={null}
const rows = await corsair.hubspot.db.engagements.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 |

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

***

## Tickets

Path: `hubspot.db.tickets.search`

```ts theme={null}
const rows = await corsair.hubspot.db.tickets.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 |
| `createdAt` | `date`    | equals, before, after, between             |
| `updatedAt` | `date`    | equals, before, after, between             |
| `archived`  | `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).*

***
