export declare type Identifier = string | number; export interface IRecord { id: Identifier; [key: string]: any; } export interface FormRecord { [key: string]: any; } export interface SortPayload { field: string; order: string; } export interface FilterPayload { [k: string]: any; } export interface PaginationPayload { page: number; perPage: number; } export interface PaginationResponse { current_page: number; per_page: number; total: number; } export declare type OptionType = { value: string; label: string; }; export declare type DataProvider = { getList: (resource: string, params: Partial) => Promise>; reorderList: (resource: string, params: ReorderParams) => Promise; getOne: (resource: string, params: GetOneParams) => Promise>; getCreateFormData: (resource: string) => Promise>; getUpdateFormData: (resource: string, params: GetOneParams) => Promise>; getFiltersFormData: (resource: string, urlState?: Record) => Promise; update: (resource: string, params: UpdateParams) => Promise>; create: (resource: string, params: CreateParams) => Promise>; deleteOne: (resource: string, params: DeleteParams) => Promise>; [key: string]: any; }; export interface GetListParams { pagination: PaginationPayload; sort: SortPayload; filter: any; } export interface GetListResult { items: RecordType[]; meta: PaginationResponse; } export interface ReorderParams { data: T; } export interface GetOneParams { id: Identifier; } export interface RecordOptions { [k: string]: OptionType[]; } export interface GetOneResult { data: RecordType; values: RecordOptions; } export interface GetFormDataResult { data: RecordType; values: RecordOptions; } export interface GetFiltersFormDataResult { options: RecordOptions; } export interface UpdateParams { id: Identifier; data: T; } export interface UpdateResult { data: RecordType; } export interface CreateParams { data: T; } export interface CreateResult { data: RecordType; } export interface DeleteParams { id: Identifier; } export interface DeleteResult { data: RecordType; }