export type GmailSearchInput = { query: string } export type GmailSearchResultItem = { id: string type: "gmail" title: string path: string text: string lastEdited: string isPrivate: boolean pageId: string emailAddress: string } export type GmailSearchResult = { results: Array } export type GmailLoadThreadInput = | { threadId: string url?: never } | { threadId?: never url: string } export type GmailLoadThreadResult = Record export type GmailQueryInput = { q?: string maxResults?: number } export type GmailQueryMessage = { user: { name: string } text: string subject?: string timestamp: number } export type GmailQueryThread = { type: "gmail" threadId: string subject: string messages: Array timestamp: number } export type GmailQueryResult = { threads: Array } /* Search Gmail messages via the connected Gmail search connector. */ export type GmailSearch = (args: GmailSearchInput) => Promise /* Load a Gmail thread by URL or thread ID. */ export type GmailLoadThread = ( args: GmailLoadThreadInput, ) => Promise /* Query Gmail messages using Gmail search query syntax. */ export type GmailQuery = (args: GmailQueryInput) => Promise export type Module = { search: GmailSearch loadThread: GmailLoadThread query: GmailQuery } export type { GmailIntegration, ModulePermissions, ModuleState, } from "./integration"