import { type TypeAliasDeclarationStructure, type VariableStatementStructure } from "ts-morph"; import type { GenerationContext, OperationInfo } from "../types.mjs"; /** * Build the default response type alias. * Example: export type FindPetsDefaultResponse = Awaited>["data"]; */ export declare function buildDefaultResponseType(op: OperationInfo): TypeAliasDeclarationStructure; /** * Build the query result type alias. * Example: export type FindPetsQueryResult = UseQueryResult; */ export declare function buildQueryResultType(op: OperationInfo): TypeAliasDeclarationStructure; /** * Build the mutation result type alias. * Example: export type AddPetMutationResult = Awaited>; */ export declare function buildMutationResultType(op: OperationInfo): TypeAliasDeclarationStructure; /** * Build query key constant. * Example: export const useFindPetsKey = "FindPets"; */ export declare function buildQueryKeyConst(op: OperationInfo): VariableStatementStructure; /** * Build mutation key constant. * Example: export const useAddPetKey = "AddPet"; */ export declare function buildMutationKeyConst(op: OperationInfo): VariableStatementStructure; /** * Build query key function. * Example: export const UseFindPetsKeyFn = (clientOptions: Options = {}, queryKey?: Array) => * [useFindPetsKey, ...(queryKey ?? [clientOptions])]; */ export declare function buildQueryKeyFn(op: OperationInfo): VariableStatementStructure; /** * Build mutation key function. * Example: export const UseAddPetKeyFn = (mutationKey?: Array) => * [useAddPetKey, ...(mutationKey ?? [])]; */ export declare function buildMutationKeyFn(op: OperationInfo): VariableStatementStructure; /** * Build the client options type for infinite queries. * The page parameter is excluded because TanStack Query supplies it via the * pageParam mechanism (#140). * Example: * export type FindPaginatedPetsInfiniteClientOptions = Omit, "query"> & * { query?: Omit, "page"> }; */ export declare function buildInfiniteClientOptionsType(op: OperationInfo, ctx: GenerationContext): TypeAliasDeclarationStructure; /** * Build the infinite query key constant. * Shares the plain query key as its first segment so a single * `invalidateQueries({ queryKey: [useXKey] })` matches both the plain and the * infinite cache entries of an operation (#174), while the extra "infinite" * segment keeps cached InfiniteData from colliding with plain query data (#140). * Example: export const useFindPaginatedPetsInfiniteKey = [useFindPaginatedPetsKey, "infinite"] as const; */ export declare function buildInfiniteQueryKeyConst(op: OperationInfo): VariableStatementStructure; /** * Build the infinite query key function. * The custom queryKey argument only replaces the params segment — the * hierarchical [opKey, "infinite"] prefix is always preserved so * prefix-based invalidation keeps working. * Example: export const UseFindPaginatedPetsInfiniteKeyFn = (clientOptions: FindPaginatedPetsInfiniteClientOptions = {}, queryKey?: Array) => * [...useFindPaginatedPetsInfiniteKey, ...(queryKey ?? [clientOptions])]; */ export declare function buildInfiniteQueryKeyFn(op: OperationInfo): VariableStatementStructure;