export type DataTableColumnType = 'string' | 'number' | 'boolean' | 'date'; /** * Data Table row operations * Used by the Data Table node (n8n-nodes-base.dataTable) for row-level CRUD operations */ export type DataTableRowOperation = 'insert' | 'get' | 'rowExists' | 'rowNotExists' | 'deleteRows' | 'update' | 'upsert'; /** * Data Table table operations * Used by the Data Table node for table-level management operations */ export type DataTableTableOperation = 'create' | 'delete' | 'list' | 'update'; export type DataTableColumn = { id: string; name: string; type: DataTableColumnType; index: number; dataTableId: string; }; export type DataTable = { id: string; name: string; columns: DataTableColumn[]; createdAt: Date; updatedAt: Date; projectId: string; }; export type CreateDataTableColumnOptions = Pick & Partial>; export type CreateDataTableOptions = Pick & { columns: CreateDataTableColumnOptions[]; }; export type UpdateDataTableOptions = { name: string; }; export type ListDataTableOptionsSortByKey = 'name' | 'createdAt' | 'updatedAt'; export type ListDataTableOptions = { filter?: Record; sortBy?: `${ListDataTableOptionsSortByKey}:asc` | `${ListDataTableOptionsSortByKey}:desc`; take?: number; skip?: number; }; export type DataTableFilter = { type: 'and' | 'or'; filters: Array<{ columnName: string; condition: 'eq' | 'neq' | 'like' | 'ilike' | 'gt' | 'gte' | 'lt' | 'lte'; value: DataTableColumnJsType; }>; }; export type ListDataTableRowsOptions = { filter?: DataTableFilter; sortBy?: [string, 'ASC' | 'DESC']; take?: number; skip?: number; }; export type UpdateDataTableRowOptions = { filter: DataTableFilter; data: DataTableRow; dryRun?: boolean; }; export type UpsertDataTableRowOptions = { filter: DataTableFilter; data: DataTableRow; dryRun?: boolean; }; export type DeleteDataTableRowsOptions = { filter: DataTableFilter; dryRun?: boolean; }; export type MoveDataTableColumnOptions = { targetIndex: number; }; export type AddDataTableColumnOptions = Pick & Partial>; export type DataTableColumnJsType = string | number | boolean | Date | null; export declare const DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP: Record; export declare const DATA_TABLE_SYSTEM_COLUMNS: string[]; export declare const DATA_TABLE_SYSTEM_TESTING_COLUMN = "dryRunState"; export type DataTableRawRowReturnBase = { id: number; createdAt: string | number | Date; updatedAt: string | number | Date; }; export type DataTableRowReturnBase = { id: number; createdAt: Date; updatedAt: Date; }; export type DataTableRow = Record; export type DataTableRows = DataTableRow[]; export type DataTableRawRowReturn = DataTableRow & DataTableRawRowReturnBase; export type DataTableRawRowsReturn = DataTableRawRowReturn[]; export type DataTableRowReturn = DataTableRow & DataTableRowReturnBase; export type DataTableRowsReturn = DataTableRowReturn[]; export type DataTableRowReturnWithState = DataTableRow & { id: number | null; createdAt: Date | null; updatedAt: Date | null; dryRunState: 'before' | 'after'; }; export type DataTableRowUpdatePair = { before: DataTableRowReturn; after: DataTableRowReturn; }; export type DataTableInsertRowsReturnType = 'all' | 'id' | 'count'; export type DataTableInsertRowsBulkResult = { success: true; insertedRows: number; }; export type DataTableInsertRowsResult = T extends 'all' ? DataTableRowReturn[] : T extends 'id' ? Array> : DataTableInsertRowsBulkResult; export type DataTableSizeStatus = 'ok' | 'warn' | 'error'; export type DataTableInfo = { id: string; name: string; projectId: string; projectName: string; sizeBytes: number; }; export type DataTableInfoById = Record; export type DataTablesSizeData = { totalBytes: number; dataTables: DataTableInfoById; }; export type DataTablesSizeResult = DataTablesSizeData & { quotaStatus: DataTableSizeStatus; }; export interface IDataTableProjectAggregateService { getProjectId(): string; createDataTable(options: CreateDataTableOptions): Promise; getManyAndCount(options: ListDataTableOptions): Promise<{ count: number; data: DataTable[]; }>; deleteDataTableAll(): Promise; } export interface IDataTableProjectService { updateDataTable(options: UpdateDataTableOptions): Promise; deleteDataTable(): Promise; getColumns(): Promise; addColumn(options: AddDataTableColumnOptions): Promise; moveColumn(columnId: string, options: MoveDataTableColumnOptions): Promise; deleteColumn(columnId: string): Promise; getManyRowsAndCount(dto: Partial): Promise<{ count: number; data: DataTableRowsReturn; }>; insertRows(rows: DataTableRows, returnType: T): Promise>; updateRows(options: UpdateDataTableRowOptions): Promise; upsertRow(options: UpsertDataTableRowOptions): Promise; deleteRows(options: DeleteDataTableRowsOptions): Promise; } //# sourceMappingURL=data-table.types.d.ts.map