2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00
books/backend/database/types.ts
2022-05-23 16:18:21 +05:30

29 lines
633 B
TypeScript

import { Field, RawValue } from '../../schemas/types';
export type QueryFilter = Record<string, string | string[]>;
export interface GetQueryBuilderOptions {
offset: number;
limit: number;
groupBy: string;
orderBy: string;
order: 'desc' | 'asc';
}
export interface GetAllOptions {
schemaName?: string;
fields?: string[];
filters?: Record<string, string>;
start?: number;
limit?: number;
groupBy?: string;
orderBy?: string;
order?: 'asc' | 'desc';
}
export type ColumnDiff = { added: Field[]; removed: string[] };
export type FieldValueMap = Record<
string,
RawValue | undefined | FieldValueMap[]
>;