import { ColumnAnsiSqlType } from './constants'; export type ObjectAny = Record; type ContractColumnEditingCell = { error?: { value: { keyInRow: string; errorValue: string; }; }; editable?: { keyInRow: string; editableValue: string; }; } & ({ component: 'inputString'; } | { component: 'inputNumber'; } | { component: 'select'; options: { type: 'constant'; options: { value: string | number; text: string | number; }[]; }; }); export type ContractColumnConfig = { key: string; name: string | number; columnType?: ColumnAnsiSqlType; title?: string; sortingType?: 'stringSort' | 'numberSort'; searching?: { keyInRow: string; }; contentFormat?: number | { alignContent?: 'right' | 'left' | 'center'; } | { type: 'number'; decimalSeparator?: string; thousandSeparator?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; useGrouping?: boolean; locales?: string | string[]; alignContent?: 'right' | 'left' | 'center'; }; subRow?: { keyOfColumnInSubRow?: string | number | Record; isColumnWithArrow?: boolean; hideHeaderExpandAllArrow?: boolean; parentKeyAsDefault?: boolean; contentFormat?: number | { alignContent?: 'right' | 'left' | 'center'; } | { type: 'number'; decimalSeparator?: string; thousandSeparator?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; useGrouping?: boolean; locales?: string | string[]; alignContent?: 'right' | 'left' | 'center'; }; editingCell?: ContractColumnEditingCell; }; editingCell?: ContractColumnEditingCell; resizable?: boolean; summaryCell?: { key?: string; text?: string; }; width?: number | string; minWidth?: number; maxWidth?: number; }; export type ContractTableConfig = { sorting?: { type: 'frontend' | 'backend'; }; pagination?: { total: number; totalRows: number; defaultPage: number; defaultPageSize: number; page: number; pageSize: number; pageSizeList?: number[]; }; editing?: { saving: { type: 'onSubmit' | 'onRowChange'; }; rowUniqIdKey: string; rowEditable?: { keyInRow: string; editableValue: string; }; defaultEnabled?: boolean; showToggleEnabledButton?: boolean; }; subRows?: { subRowsKey: string; rowUniqIdKey: string; }; filtering?: { type: 'backend'; }; searching?: { enabled: boolean; type: 'frontend' | 'backend'; defaultSearchQuery?: string; showSearchBlock?: boolean; debounceDelay?: number; isDebounceActive?: boolean; placeholder?: string; searchClasses?: string; }; height?: string; fullScreenEnabled?: boolean; summaryRows?: { showDefault: boolean; showInControl: boolean; }; resizableColumn?: boolean; rowSize?: { showInControl: boolean; default?: 'small' | 'medium' | 'big'; available?: ('small' | 'medium' | 'big')[]; }; rowHeight?: number; containerStyle?: ObjectAny; }; export type ContractResponse = { data: { main: ObjectAny[]; topSummary?: ObjectAny[]; bottomSummary?: ObjectAny[]; }; meta: { columns: ContractColumnConfig[]; tableConfig?: ContractTableConfig; }; }; export {};