Skip to main content

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.

The Gmail plugin syncs data locally. Use corsair.gmail.db.<entity>.search({ data, limit?, offset? }) with the filters listed per entity.

Drafts

Path: gmail.db.drafts.search
const rows = await corsair.gmail.db.drafts.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});

Searchable filters

FieldTypeOperators
entity_idstringequals, contains, startsWith, endsWith, in
idstringequals, contains, startsWith, endsWith, in
messageIdstringequals, contains, startsWith, endsWith, in
createdAtdateequals, 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.

Labels

Path: gmail.db.labels.search
const rows = await corsair.gmail.db.labels.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});

Searchable filters

FieldTypeOperators
entity_idstringequals, contains, startsWith, endsWith, in
idstringequals, contains, startsWith, endsWith, in
namestringequals, contains, startsWith, endsWith, in
messagesTotalnumberequals, gt, gte, lt, lte, in
messagesUnreadnumberequals, gt, gte, lt, lte, in
threadsTotalnumberequals, gt, gte, lt, lte, in
threadsUnreadnumberequals, gt, gte, lt, lte, in
createdAtdateequals, 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.

Messages

Path: gmail.db.messages.search
const rows = await corsair.gmail.db.messages.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});

Searchable filters

FieldTypeOperators
entity_idstringequals, contains, startsWith, endsWith, in
idstringequals, contains, startsWith, endsWith, in
threadIdstringequals, contains, startsWith, endsWith, in
snippetstringequals, contains, startsWith, endsWith, in
historyIdstringequals, contains, startsWith, endsWith, in
internalDatestringequals, contains, startsWith, endsWith, in
sizeEstimatenumberequals, gt, gte, lt, lte, in
rawstringequals, contains, startsWith, endsWith, in
subjectstringequals, contains, startsWith, endsWith, in
bodystringequals, contains, startsWith, endsWith, in
fromstringequals, contains, startsWith, endsWith, in
tostringequals, contains, startsWith, endsWith, in
createdAtdateequals, 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.

Threads

Path: gmail.db.threads.search
const rows = await corsair.gmail.db.threads.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});

Searchable filters

FieldTypeOperators
entity_idstringequals, contains, startsWith, endsWith, in
idstringequals, contains, startsWith, endsWith, in
snippetstringequals, contains, startsWith, endsWith, in
historyIdstringequals, contains, startsWith, endsWith, in
createdAtdateequals, 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.