import { FieldName, FieldsValidator, UnknownFields } from "./fields"; import { AirtableRecord } from "./record"; import { Formula } from "@qualifyze/airtable-formulator"; import { ActionPayload } from "./endpoint"; import { TableActionPoint } from "./table"; declare type CellFormat = "json" | "string"; declare type TimeZone = string; declare type UserLocale = string; declare type SortParam = { field: keyof Fields; direction: "asc" | "desc"; }; export declare type SelectQueryPayload = ActionPayload, unknown>>, never>; export declare type SelectQueryParams = { fields?: FieldName[]; filterByFormula?: Formula; maxRecords?: number; pageSize?: number; sort?: SortParam[]; view?: string; cellFormat?: CellFormat; timeZone?: TimeZone; userLocale?: UserLocale; }; export declare type SelectQueryDataSource = FieldsValidator & TableActionPoint; export declare class SelectQuery implements AsyncIterable> { readonly table: SelectQueryDataSource; readonly params: SelectQueryParams; constructor(table: SelectQueryDataSource, param: SelectQueryParams); private createQueryPayload; fetchRecords(payload: SelectQueryPayload): Promise<{ records: AirtableRecord[]; offset?: string; }>; /** * For cross-compatiblity with the offiical client. * * @deprecated */ firstPage(): Promise[]>; pageIterable(): AsyncIterable[]>; /** * For cross-compatibility with the official client. * * @deprecated * @param handler */ eachPage(handler: (records: AirtableRecord[]) => void): Promise; getPage(offset?: string): Promise[]>; [Symbol.asyncIterator](): AsyncIterator>; /** * For cross-compatibility with the official client. * * @deprecated */ all(): Promise[]>; } export {};