2022-03-24 09:50:40 +00:00
|
|
|
import { Field, RawValue } from '../../schemas/types';
|
|
|
|
|
2022-03-23 06:16:13 +00:00
|
|
|
export type QueryFilter = Record<string, string | string[]>;
|
|
|
|
|
|
|
|
export interface GetQueryBuilderOptions {
|
|
|
|
offset: number;
|
|
|
|
limit: number;
|
|
|
|
groupBy: string;
|
|
|
|
orderBy: string;
|
|
|
|
order: 'desc' | 'asc';
|
|
|
|
}
|
2022-03-24 09:50:40 +00:00
|
|
|
|
|
|
|
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[]
|
|
|
|
>;
|
2022-03-24 13:13:59 +00:00
|
|
|
|
|
|
|
export interface Patch {
|
|
|
|
name: string;
|
|
|
|
version: string;
|
|
|
|
patch: {
|
|
|
|
execute: (DatabaseManager) => Promise<void>;
|
|
|
|
beforeMigrate?: boolean;
|
|
|
|
};
|
|
|
|
}
|