import type { PartialSchema } from "@hatchifyjs/core"; import type { HatchifyReactRest } from "@hatchifyjs/react-rest"; import type { Fields, Filters, Include, RestClient, PaginationObject, GetSchemaNames, GetSchemaFromName } from "@hatchifyjs/rest-client"; import type { HatchifyDataGridProps as InternalHatchifyDataGridProps } from "../components/HatchifyDataGrid/index.js"; import type { HatchifyEverythingProps as InternalHatchifyEverythingProps } from "../components/HatchifyEverything/index.js"; import type { HatchifyNavigationProps as InternalHatchifyNavigationProps } from "../components/HatchifyNavigation/HatchifyNavigation.js"; import type { HatchifyEmptyProps } from "../components/HatchifyEmpty/index.js"; import type { DataGridState } from "../hooks/useDataGridState.js"; import type { ReplaceColumnProps, ExtraColumnProps } from "../components/HatchifyColumn/index.js"; import type { SortObject, XDataGridProps } from "../presentation/index.js"; type HatchifyEverythingProps> = Omit, "finalSchemas" | "partialSchemas" | "restClient">; type HatchifyNavigationProps> = Omit, "finalSchemas" | "partialSchemas">; type HatchifyDataGridProps, TSchemaName extends GetSchemaNames> = Omit, "finalSchemas" | "partialSchemas" | "schemaName" | "restClient">; type HatchifyFiltersProps, TSchemaName extends GetSchemaNames> = XDataGridProps; type HatchifyPaginationProps, TSchemaName extends GetSchemaNames> = XDataGridProps; type HatchifyListProps, TSchemaName extends GetSchemaNames> = XDataGridProps; type HatchifyColumnProps, TSchemaName extends GetSchemaNames> = Omit, "allSchemas" | "schemaName"> | Omit, "allSchemas" | "schemaName">; type Components> = { [SchemaName in keyof TSchemas]: { DataGrid: ((props: HatchifyDataGridProps) => React.ReactElement) & { Column: (props: HatchifyColumnProps) => React.ReactElement; Empty: (props: HatchifyEmptyProps) => React.ReactElement; }; Filters: (props: HatchifyFiltersProps) => React.ReactElement; Pagination: (props: HatchifyPaginationProps) => React.ReactElement; List: (props: HatchifyListProps) => React.ReactElement; }; }; export type HatchifyApp> = { components: Components; Everything: (props: HatchifyEverythingProps) => JSX.Element; Navigation: (props: HatchifyNavigationProps) => JSX.Element; NoSchemas: () => JSX.Element; model: HatchifyReactRest; state: { [SchemaName in keyof TSchemas]: { useDataGridState: ({ defaultSelected, onSelectedChange, fields, include, defaultPage, defaultSort, alwaysSorted, baseFilter, minimumLoadTime, }?: { defaultSelected?: HatchifyDataGridProps["defaultSelected"]; onSelectedChange?: HatchifyDataGridProps["onSelectedChange"]; fields?: Fields; include?: Include>; defaultPage?: PaginationObject; defaultSort?: SortObject; alwaysSorted?: boolean; baseFilter?: Filters; minimumLoadTime?: number; }) => DataGridState; }; }; }; export declare function hatchifyReact, const TSchemaName extends GetSchemaNames>(restClient: RestClient): HatchifyApp; export {};