export interface Pagination { page: number; perPage: number; } export interface Sort { field: string; order: string; } export interface FilterPayload { [k: string]: any; } export interface DataAction { readonly type: any; readonly payload: object; readonly meta: object; } export interface ResourceDefinition { readonly name: string; readonly label?: string; readonly hasList?: boolean; readonly hasEdit?: boolean; readonly hasShow?: boolean; readonly hasCreate?: boolean; } /** * Redux */ export interface ReduxState {} /** * i18nProvider */ export type Translate = (key: string, options?: any) => string; export type I18nProvider = { translate: Translate; changeLocale: (locale: string, options?: any) => Promise; getLocale: () => string; [key: string]: any; }; /** * authProvider */ export type AuthProvider = { login: (params: any) => Promise; logout: (params: any) => Promise; checkAuth: (params: any) => Promise; checkError: (error: any) => Promise; getPermissions: (params: any) => Promise; [key: string]: any; };