2023-01-27 03:22:44 -08:00
|
|
|
import type { TColumnType, TDateTimeFormat, TInheritColumnKey } from './types';
|
2021-09-29 16:28:27 -07:00
|
|
|
|
|
|
|
export type ColumnType = keyof typeof schema.columnTypes;
|
|
|
|
|
|
|
|
export const schema = {
|
2022-08-17 08:50:24 -07:00
|
|
|
rowFetchSegmentLimit: 1000,
|
|
|
|
dateTimeFormat: 'YYYY-MM-DDTHH:mm:ss.SSSZ',
|
|
|
|
internalNames: {
|
|
|
|
_id: 'text',
|
|
|
|
_creator: 'creator',
|
|
|
|
_ctime: 'ctime',
|
|
|
|
_last_modifier: 'last-modifier',
|
|
|
|
_mtime: 'mtime',
|
|
|
|
_seq: 'auto-number',
|
|
|
|
},
|
|
|
|
columnTypes: {
|
|
|
|
text: 'Text',
|
|
|
|
'long-text': 'Long Text',
|
|
|
|
number: 'Number',
|
|
|
|
collaborator: 'Collaborator',
|
|
|
|
date: 'Date',
|
|
|
|
duration: 'Duration',
|
|
|
|
'single-select': 'Single Select',
|
|
|
|
'multiple-select': 'Multiple Select',
|
2023-10-25 17:20:43 -07:00
|
|
|
image: 'Image',
|
|
|
|
file: 'File',
|
2022-08-17 08:50:24 -07:00
|
|
|
email: 'Email',
|
|
|
|
url: 'URL',
|
|
|
|
checkbox: 'Checkbox',
|
2023-10-25 17:20:43 -07:00
|
|
|
rate: 'Rating',
|
2022-08-17 08:50:24 -07:00
|
|
|
formula: 'Formula',
|
2023-10-25 17:20:43 -07:00
|
|
|
'link-formula': 'Link-Formula',
|
|
|
|
geolocation: 'Geolocation',
|
|
|
|
link: 'Link',
|
2022-08-17 08:50:24 -07:00
|
|
|
creator: 'Creator',
|
|
|
|
ctime: 'Created time',
|
|
|
|
'last-modifier': 'Last Modifier',
|
|
|
|
mtime: 'Last modified time',
|
|
|
|
'auto-number': 'Auto number',
|
2023-10-25 17:20:43 -07:00
|
|
|
button: 'Button',
|
|
|
|
'digital-sign': 'Digital Signature',
|
2022-08-17 08:50:24 -07:00
|
|
|
},
|
|
|
|
nonUpdateAbleColumnTypes: {
|
|
|
|
creator: 'creator',
|
|
|
|
ctime: 'ctime',
|
|
|
|
'last-modifier': 'last-modifier',
|
|
|
|
mtime: 'mtime',
|
|
|
|
'auto-number': 'auto-number',
|
2023-10-25 17:20:43 -07:00
|
|
|
button: 'button',
|
|
|
|
formula: 'formula',
|
|
|
|
'link-formula': 'link-formula',
|
|
|
|
link: 'link',
|
|
|
|
'digital-sign': 'digital-sign',
|
2022-08-17 08:50:24 -07:00
|
|
|
},
|
2021-09-29 16:28:27 -07:00
|
|
|
} as {
|
2022-08-17 08:50:24 -07:00
|
|
|
rowFetchSegmentLimit: number;
|
|
|
|
dateTimeFormat: TDateTimeFormat;
|
|
|
|
internalNames: { [key in TInheritColumnKey]: ColumnType };
|
|
|
|
columnTypes: { [key in TColumnType]: string };
|
|
|
|
nonUpdateAbleColumnTypes: { [key in ColumnType]: ColumnType };
|
2021-09-29 16:28:27 -07:00
|
|
|
};
|