import { type DefaultError, type InfiniteData, type QueryKey, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, type UseSuspenseInfiniteQueryOptions, type UseSuspenseInfiniteQueryResult, type UseSuspenseQueryOptions, type UseSuspenseQueryResult } from '@tanstack/react-query'; import { type InferExtQueryArgs, type InferExtResult, type InferOptions, type InferSchema } from '@zenstackhq/client-helpers'; import type { AggregateArgs, AggregateResult, BatchResult, ClientContract, CountArgs, CountResult, CreateArgs, CreateManyAndReturnArgs, CreateManyArgs, DeleteArgs, DeleteManyArgs, ExistsArgs, ExtQueryArgsBase, ExtResultBase, FindFirstArgs, FindManyArgs, FindUniqueArgs, GetProcedure, GetProcedureNames, GetSlicedModels, GetSlicedProcedures, GroupByArgs, GroupByResult, ProcedureEnvelope, QueryOptions, SelectSubset, SimplifiedPlainResult, SimplifiedResult, Subset, UpdateArgs, UpdateManyAndReturnArgs, UpdateManyArgs, UpsertArgs } from '@zenstackhq/orm'; import type { GetModels, SchemaDef } from '@zenstackhq/schema'; import type { ExtraMutationOptions, ExtraQueryOptions, ProcedureReturn, QueryContext, TransactionOperation, TransactionResults, TrimSlicedOperations, WithOptimistic } from './common/types.js'; export { AnyNull, DbNull, JsonNull } from '@zenstackhq/client-helpers'; export type { InferExtResult, InferOptions, InferSchema } from '@zenstackhq/client-helpers'; export type { FetchFn } from '@zenstackhq/client-helpers/fetch'; export type { SchemaDef } from '@zenstackhq/schema'; export { getQueryKey } from './common/query-key.js'; type ProcedureHookFn, Options, Result, Input = ProcedureEnvelope> = { args: undefined; } extends Input ? (input?: Input, options?: Options) => Result : (input: Input, options?: Options) => Result; /** * React context for query settings. */ export declare const QuerySettingsContext: import("react").Context; /** * React context provider for configuring query settings. */ export declare const QuerySettingsProvider: import("react").Provider; /** * React context provider for configuring query settings. * * @deprecated Use {@link QuerySettingsProvider} instead. */ export declare const Provider: import("react").Provider; export type ModelQueryOptions = Omit, 'queryKey'> & ExtraQueryOptions; export type ModelQueryResult = UseQueryResult, DefaultError> & { queryKey: QueryKey; }; export type ModelSuspenseQueryOptions = Omit, 'queryKey'> & ExtraQueryOptions; export type ModelSuspenseQueryResult = UseSuspenseQueryResult, DefaultError> & { queryKey: QueryKey; }; export type ModelInfiniteQueryOptions = Omit, QueryKey, TPageParam>, 'queryKey' | 'initialPageParam'>; export type ModelInfiniteQueryResult = UseInfiniteQueryResult & { queryKey: QueryKey; }; export type ModelSuspenseInfiniteQueryOptions = Omit, QueryKey, TPageParam>, 'queryKey' | 'initialPageParam'>; export type ModelSuspenseInfiniteQueryResult = UseSuspenseInfiniteQueryResult & { queryKey: QueryKey; }; export type ModelMutationOptions = Omit, 'mutationFn'> & ExtraMutationOptions; export type ModelMutationResult = UseMutationResult; export type ModelMutationModelResult, TArgs, Array extends boolean = false, Options extends QueryOptions = QueryOptions, ExtResult extends ExtResultBase = {}> = Omit, TArgs>, 'mutateAsync'> & { mutateAsync(args: T, options?: ModelMutationOptions, T>): Promise>; }; /** * Options accepted by `$transaction.useSequential()`. */ export type TransactionMutationOptions = QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}> = Omit[]>, 'mutationFn'> & Omit; /** * The return type of `$transaction.useSequential()`. Overrides `mutateAsync` so the * resolved value is a tuple of per-operation results, narrowed to each operation's * model + op + args (mirrors the typing of the corresponding ORM CRUD method). */ export type TransactionMutationResult = QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}> = Omit[]>, 'mutateAsync'> & { mutateAsync[]>(operations: T, options?: Omit, DefaultError, T>, 'mutationFn'>): Promise>; }; /** * The full set of TanStack Query hooks returned by {@link useClientQueries}. Includes: * * - One entry per (sliced) model under its uncapitalized name, providing the per-model * {@link ModelQueryHooks} (e.g. `client.user.useFindMany`, `client.user.useCreate`). * - A `$procs` namespace with hooks for any custom procedures declared in the schema. * - A `$transaction.useSequential` hook for executing a sequential transaction. */ export type ClientHooks = QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}> = { [Model in GetSlicedModels as `${Uncapitalize}`]: ModelQueryHooks; } & ProcedureHooks & { $transaction: { useSequential(options?: TransactionMutationOptions): TransactionMutationResult; }; }; type ProcedureHookGroup> = { [Name in GetSlicedProcedures]: GetProcedure extends { mutation: true; } ? { useMutation(options?: Omit, DefaultError, ProcedureEnvelope>, 'mutationFn'> & QueryContext): UseMutationResult, DefaultError, ProcedureEnvelope>; } : { useQuery: ProcedureHookFn>, 'optimisticUpdate'>, UseQueryResult, DefaultError> & { queryKey: QueryKey; }>; useSuspenseQuery: ProcedureHookFn>, 'optimisticUpdate'>, UseSuspenseQueryResult, DefaultError> & { queryKey: QueryKey; }>; }; }; export type ProcedureHooks> = Schema['procedures'] extends Record ? { /** * Custom procedures. */ $procs: ProcedureHookGroup; } : Record; export type ModelQueryHooks, Options extends QueryOptions = QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}> = TrimSlicedOperations>(args: SelectSubset>, options?: ModelQueryOptions | null>): ModelQueryResult | null>; useSuspenseFindUnique>(args: SelectSubset>, options?: ModelSuspenseQueryOptions | null>): ModelSuspenseQueryResult | null>; useFindFirst>(args?: SelectSubset>, options?: ModelQueryOptions | null>): ModelQueryResult | null>; useSuspenseFindFirst>(args?: SelectSubset>, options?: ModelSuspenseQueryOptions | null>): ModelSuspenseQueryResult | null>; useExists>(args?: Subset>, options?: ModelQueryOptions): ModelQueryResult; useFindMany>(args?: SelectSubset>, options?: ModelQueryOptions[]>): ModelQueryResult[]>; useSuspenseFindMany>(args?: SelectSubset>, options?: ModelSuspenseQueryOptions[]>): ModelSuspenseQueryResult[]>; useInfiniteFindMany, TPageParam = unknown>(args?: SelectSubset>, options?: ModelInfiniteQueryOptions[], TPageParam>): ModelInfiniteQueryResult[], TPageParam>>; useSuspenseInfiniteFindMany, TPageParam = unknown>(args?: SelectSubset>, options?: ModelSuspenseInfiniteQueryOptions[], TPageParam>): ModelSuspenseInfiniteQueryResult[], TPageParam>>; useCreate>(options?: ModelMutationOptions, T>): ModelMutationModelResult; useCreateMany>(options?: ModelMutationOptions): ModelMutationResult; useCreateManyAndReturn>(options?: ModelMutationOptions[], T>): ModelMutationModelResult; useUpdate>(options?: ModelMutationOptions, T>): ModelMutationModelResult; useUpdateMany>(options?: ModelMutationOptions): ModelMutationResult; useUpdateManyAndReturn>(options?: ModelMutationOptions[], T>): ModelMutationModelResult; useUpsert>(options?: ModelMutationOptions, T>): ModelMutationModelResult; useDelete>(options?: ModelMutationOptions, T>): ModelMutationModelResult; useDeleteMany>(options?: ModelMutationOptions): ModelMutationResult; useCount>(args?: Subset>, options?: ModelQueryOptions>): ModelQueryResult>; useSuspenseCount>(args?: Subset>, options?: ModelSuspenseQueryOptions>): ModelSuspenseQueryResult>; useAggregate>(args: Subset>, options?: ModelQueryOptions>): ModelQueryResult>; useSuspenseAggregate>(args: Subset>, options?: ModelSuspenseQueryOptions>): ModelSuspenseQueryResult>; useGroupBy>(args: Subset>, options?: ModelQueryOptions>): ModelQueryResult>; useSuspenseGroupBy>(args: Subset>, options?: ModelSuspenseQueryOptions>): ModelSuspenseQueryResult>; }>; /** * Gets data query hooks for all models in the schema. * * Accepts either a raw `SchemaDef` or a `ClientContract` type (e.g. `typeof db`) as the generic parameter. * When a `ClientContract` type is provided, computed fields from plugins are reflected in the result types. * * @example * ```typescript * // Basic usage with schema * const client = useClientQueries(schema) * * // With server client type for computed field support * import type { DbType } from '~/server/db' * const client = useClientQueries(schema) * ``` * * @param schema The schema. * @param options Options for all queries originated from this hook. */ export declare function useClientQueries>(schema: InferSchema, options?: QueryContext): ClientHooks, InferOptions>, InferExtQueryArgs extends ExtQueryArgsBase ? InferExtQueryArgs : {}, InferExtResult extends ExtResultBase> ? InferExtResult : {}>; /** * Gets data query hooks for a specific model in the schema. */ export declare function useModelQueries, Options extends QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}>(schema: Schema, model: Model, rootOptions?: QueryContext): ModelQueryHooks; export declare function useInternalQuery(_schema: SchemaDef, model: string, operation: string, args?: unknown, options?: Omit, 'queryKey'> & ExtraQueryOptions): { data: import("@tanstack/query-core").NoInfer; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: import("@tanstack/query-core").NoInfer; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: false; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: import("@tanstack/query-core").NoInfer; isError: false; error: null; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; }; export declare function useInternalSuspenseQuery(_schema: SchemaDef, model: string, operation: string, args?: unknown, options?: Omit, 'queryKey'> & ExtraQueryOptions): { data: TData; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/query-core").FetchStatus; queryKey: import("./common/query-key.js").QueryKey; } | { data: TData; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/query-core").FetchStatus; queryKey: import("./common/query-key.js").QueryKey; }; export declare function useInternalInfiniteQuery(_schema: SchemaDef, model: string, operation: string, args: unknown, options: (Omit, QueryKey, TPageParam>, 'queryKey' | 'initialPageParam'> & QueryContext) | undefined): { data: InfiniteData; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; isPlaceholderData: false; status: "error"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchNextPageError: boolean; isFetchingNextPage: boolean; isFetchPreviousPageError: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: InfiniteData; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isFetchNextPageError: false; isFetchPreviousPageError: false; isSuccess: true; isPlaceholderData: false; status: "success"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchingNextPage: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isFetchNextPageError: false; isFetchPreviousPageError: false; isSuccess: false; isPlaceholderData: false; status: "error"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchingNextPage: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isFetchNextPageError: false; isFetchPreviousPageError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchingNextPage: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: undefined; error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isFetchNextPageError: false; isFetchPreviousPageError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchingNextPage: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; } | { data: InfiniteData; isError: false; error: null; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: true; isFetchNextPageError: false; isFetchPreviousPageError: false; status: "success"; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchingNextPage: boolean; isFetchingPreviousPage: boolean; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; promise: Promise>; queryKey: import("./common/query-key.js").QueryKey; }; export declare function useInternalSuspenseInfiniteQuery(_schema: SchemaDef, model: string, operation: string, args: unknown, options: Omit, QueryKey, TPageParam> & QueryContext, 'queryKey' | 'initialPageParam'>): { data: InfiniteData; error: Error | null; isError: boolean; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: boolean; isSuccess: boolean; status: "error" | "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise, Error>>; fetchStatus: import("@tanstack/query-core").FetchStatus; fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise, Error>>; fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise, Error>>; hasNextPage: boolean; hasPreviousPage: boolean; isFetchNextPageError: boolean; isFetchingNextPage: boolean; isFetchPreviousPageError: boolean; isFetchingPreviousPage: boolean; queryKey: import("./common/query-key.js").QueryKey; }; /** * Creates a react-query mutation * * @private * * @param model The name of the model under mutation. * @param method The HTTP method. * @param operation The mutation operation (e.g. `create`). * @param options The react-query options. * @param checkReadBack Whether to check for read back errors and return undefined if found. */ export declare function useInternalMutation(schema: SchemaDef, model: string, method: 'POST' | 'PUT' | 'DELETE', operation: string, options?: Omit, 'mutationFn'> & ExtraMutationOptions): UseMutationResult; export declare function useInternalTransactionMutation = QueryOptions, ExtQueryArgs extends ExtQueryArgsBase = {}, ExtResult extends ExtResultBase = {}>(schema: Schema, options?: TransactionMutationOptions): TransactionMutationResult;