/** @module @airtable/blocks/models: View */ /** */ import { ObjectMap } from '../private_utils'; import { Color } from '../colors'; import { FieldId } from './field'; import { RecordId } from './record'; /** */ export declare type ViewId = string; /** * An enum of Airtable's view types * * @example * ```js * import {ViewType} from '@airtable/blocks/models'; * const gridViews = myTable.views.filter(view => ( * view.type === ViewType.GRID * )); * ``` */ export declare enum ViewType { /** */ GRID = "grid", /** */ FORM = "form", /** */ CALENDAR = "calendar", /** */ GALLERY = "gallery", /** */ KANBAN = "kanban", /** */ BLOCK = "block" } /** @hidden */ export interface ViewFieldOrderData { fieldIds: Array; visibleFieldCount: number; } /** @hidden */ export declare type ViewColorsByRecordIdData = ObjectMap; /** * Data provided by airtable for groups, only available on views or grouped queries * * @hidden */ export declare type GroupData = { visibleRecordIds: Array; groups: null; } | { visibleRecordIds: null; groups: Array; }; /** * GroupLevel provided by airtable - matches NormalizedGroupLevel * * @hidden */ export interface GroupLevelData { fieldId: FieldId; direction: 'asc' | 'desc'; } /** @hidden */ export interface ViewData { id: ViewId; name: string; type: ViewType; visibleRecordIds?: Array; fieldOrder?: ViewFieldOrderData; colorsByRecordId?: ViewColorsByRecordIdData; groups?: Array | null; groupLevels?: Array | null; }