2021-10-07 21:02:51 +00:00
|
|
|
// Letter codes for CellValue types encoded as [code, args...] tuples.
|
|
|
|
export const enum GristObjCode {
|
|
|
|
List = 'L',
|
2021-11-09 12:11:37 +00:00
|
|
|
LookUp = 'l',
|
2021-10-07 21:02:51 +00:00
|
|
|
Dict = 'O',
|
|
|
|
DateTime = 'D',
|
|
|
|
Date = 'd',
|
|
|
|
Skip = 'S',
|
|
|
|
Censored = 'C',
|
|
|
|
Reference = 'R',
|
|
|
|
ReferenceList = 'r',
|
|
|
|
Exception = 'E',
|
|
|
|
Pending = 'P',
|
|
|
|
Unmarshallable = 'U',
|
|
|
|
Versions = 'V',
|
|
|
|
}
|
|
|
|
|
|
|
|
export type CellValue = number|string|boolean|null|[GristObjCode, ...unknown[]];
|
2020-08-13 18:13:16 +00:00
|
|
|
|
|
|
|
export interface RowRecord {
|
|
|
|
id: number;
|
|
|
|
[colId: string]: CellValue;
|
|
|
|
}
|
2022-02-08 15:23:14 +00:00
|
|
|
|
|
|
|
export type GristType = 'Any' | 'Attachments' | 'Blob' | 'Bool' | 'Choice' | 'ChoiceList' |
|
|
|
|
'Date' | 'DateTime' |
|
|
|
|
'Id' | 'Int' | 'ManualSortPos' | 'Numeric' | 'PositionNumber' | 'Ref' | 'RefList' | 'Text';
|