{"version":3,"file":"index.cjs","names":["Url","createFunctionParameter","createObjectBindingPattern","createTypeLiteral","createFunctionParameters","declarationPrinter","functionPrinter","callPrinter","InfiniteQueryOptions","createFunctionParameters","File","Function","declarationPrinter","functionPrinter","Url","createFunctionParameters","File","Function","declarationPrinter","functionPrinter","Url","path","declarationPrinter","functionPrinter","createFunctionParameters","File","Function","Type","declarationPrinter","functionPrinter","callPrinter","File","Function","declarationPrinter","functionPrinter","callPrinter","createFunctionParameter","createFunctionParameters","File","Function","getComments","BaseInfiniteQueryOptions","declarationPrinter","functionPrinter","callPrinter","createFunctionParameters","createFunctionParameter","File","Function","getComments","functionPrinter","createFunctionParameter","createFunctionParameters","File","Function","getComments","defineGenerator","jsxRenderer","ast","pluginTsName","File","defineGenerator","jsxRenderer","ast","pluginTsName","File","defineGenerator","jsxRenderer","ast","pluginTsName","File","createResolver","definePlugin","pluginTsName","Resolver"],"sources":["../../../internals/shared/src/params.ts","../../../internals/shared/src/operation.ts","../../../internals/utils/src/casing.ts","../../../internals/utils/src/strings.ts","../../../internals/shared/src/group.ts","../../../internals/tanstack-query/src/utils.ts","../../../internals/tanstack-query/src/components/InfiniteQueryOptions.tsx","../../../internals/tanstack-query/src/components/MutationKey.tsx","../../../internals/tanstack-query/src/resolver.ts","../../../internals/tanstack-query/src/components/QueryKey.tsx","../../../internals/client/src/resolveClient.ts","../../../internals/client/src/resolveClientOperation.ts","../src/utils.ts","../src/components/QueryKey.tsx","../src/components/QueryOptions.tsx","../src/components/InfiniteQuery.tsx","../src/components/InfiniteQueryOptions.tsx","../src/components/Mutation.tsx","../src/components/Query.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx","../src/resolvers/resolverVueQuery.ts","../src/plugin.ts"],"sourcesContent":["import type { ast } from 'kubb/kit'\n\n/**\n * Drops parameters that share the same name, keeping the first.\n *\n * A malformed spec can declare the same parameter name twice within one `in` location. Both would\n * resolve to the same output property, so emitting both would yield an object type with a duplicate\n * member, which TypeScript rejects. This is a defensive guard against that case, not a casing guard:\n * parameter names flow through unchanged, so no two distinct names ever collide here anymore.\n */\nexport function dedupeParams(params: Array<ast.ParameterNode>): Array<ast.ParameterNode> {\n  const seen = new Set<string>()\n\n  return params.filter((param) => {\n    if (seen.has(param.name)) return false\n    seen.add(param.name)\n    return true\n  })\n}\n","import { ast, type Group, type NodeCache, type Output, type Resolver, type ResolverFileParams, Url } from 'kubb/kit'\nimport { dedupeParams } from './params.ts'\n\n/**\n * Builds the `ResolverFileParams` every operation generator passes to\n * `resolver.file`: a file named `name`, tagged by the operation's first\n * tag (or `'default'`), at the operation's path. Centralizes the entry object\n * that was repeated at dozens of call sites across the client and query plugins.\n *\n * @example\n * ```ts\n * resolver.file(operationFileEntry(node, node.operationId), { root, output, group })\n * ```\n */\nexport function operationFileEntry(node: ast.OperationNode, name: string, extname: ResolverFileParams['extname'] = '.ts'): ResolverFileParams {\n  return {\n    name,\n    extname,\n    tag: node.tags[0] ?? 'default',\n    path: node.path,\n  }\n}\n\n/**\n * Resolves a dependency plugin's generated file for `node.operationId`, cached in `cache` (the\n * current node's `ctx.cache`) under the resolver's own plugin name. Several dependents reading the\n * same dependency for the same operation in one pass (a query plugin's several hook generators, the\n * MCP handler, ...) share one computed name and path instead of each calling `resolver.file` again.\n *\n * @example Cache `plugin-ts`'s file for the current operation\n * ```ts\n * const fileTs = resolveDependencyOperationFile({ cache: ctx.cache, node, resolver: tsResolver, root, output })\n * ```\n */\nexport function resolveDependencyOperationFile(options: {\n  cache: NodeCache\n  node: ast.OperationNode\n  resolver: Pick<Resolver, 'file' | 'pluginName'>\n  root: string\n  output: Output\n  group?: Group | null\n}): ast.FileNode {\n  const { cache, node, resolver, root, output, group } = options\n\n  return cache.ensureItem(`${resolver.pluginName}:operationFile`, () =>\n    resolver.file({ ...operationFileEntry(node, node.operationId), root, output, group: group ?? undefined }),\n  )\n}\n\nexport type ContentTypeInfo = {\n  contentTypes: string[]\n  isMultipleContentTypes: boolean\n  contentTypeUnion: string\n  defaultContentType: string\n  hasFormData: boolean\n}\n\nexport type RequestConfigResolver = {\n  response: {\n    body(node: ast.OperationNode): string\n  }\n}\n\nexport type ResponseStatusNameResolver = {\n  response: {\n    status(node: ast.OperationNode, statusCode: ast.StatusCode): string\n  }\n}\n\nexport type ResponseNameResolver = ResponseStatusNameResolver & {\n  response: {\n    response(node: ast.OperationNode): string\n  }\n}\n\nexport type OperationTypeNameResolver = RequestConfigResolver &\n  ResponseNameResolver & {\n    param: {\n      path(node: ast.OperationNode, param: ast.ParameterNode): string\n      query(node: ast.OperationNode, param: ast.ParameterNode): string\n      headers(node: ast.OperationNode, param: ast.ParameterNode): string\n    }\n  }\n\n/**\n * Resolver interface for building operation parameters.\n *\n * `ResolverTs` from `@kubb/plugin-ts` satisfies this interface and can be passed directly.\n */\nexport type OperationParamsResolver = {\n  /**\n   * Naming for an operation's parameters, grouped by location.\n   */\n  param: {\n    /**\n     * Resolves the type name for an individual parameter.\n     *\n     * @example Individual path parameter name\n     * `resolver.param.name(node, param) // → 'DeletePetPathPetId'`\n     */\n    name(node: ast.OperationNode, param: ast.ParameterNode): string\n    /**\n     * Resolves the grouped path parameters type name.\n     * When the return value equals `resolver.param.name`, no indexed access is emitted.\n     *\n     * @example Grouped path params type name\n     * `resolver.param.path(node, param) // → 'DeletePetPath'`\n     */\n    path(node: ast.OperationNode, param: ast.ParameterNode): string\n    /**\n     * Resolves the grouped query parameters type name.\n     * When the return value equals `resolver.param.name`, an inline struct type is emitted instead.\n     *\n     * @example Grouped query params type name\n     * `resolver.param.query(node, param) // → 'FindPetsByStatusQuery'`\n     */\n    query(node: ast.OperationNode, param: ast.ParameterNode): string\n    /**\n     * Resolves the grouped header parameters type name.\n     * When the return value equals `resolver.param.name`, an inline struct type is emitted instead.\n     *\n     * @example Grouped header params type name\n     * `resolver.param.headers(node, param) // → 'DeletePetHeaders'`\n     */\n    headers(node: ast.OperationNode, param: ast.ParameterNode): string\n  }\n  /**\n   * Naming for an operation's request and response types.\n   */\n  response: {\n    /**\n     * Resolves the request body type name.\n     *\n     * @example Request body type name\n     * `resolver.response.body(node) // → 'CreatePetBody'`\n     */\n    body(node: ast.OperationNode): string\n  }\n}\n\nexport type OperationCommentLink = 'pathTemplate' | 'urlPath' | false | ((node: ast.OperationNode) => string | undefined)\n\nexport type BuildOperationCommentsOptions = {\n  link?: OperationCommentLink\n  linkPosition?: 'beforeDeprecated' | 'afterDeprecated'\n  splitLines?: boolean\n}\n\ntype ResponseLike = {\n  statusCode: ast.StatusCode | number | string\n}\n\nexport type OperationParameterGroups = Record<ast.ParameterNode['in'], Array<ast.ParameterNode>>\n\nexport type ResolveOperationTypeNameOptions = {\n  responseStatusNames?: boolean | 'error'\n  exclude?: ReadonlyArray<string | undefined>\n  order?: 'params-first' | 'body-response-first'\n  /**\n   * Include the individual `Path`/`Query`/`Headers` group type names. Set to `false` for clients\n   * that reference the grouped `Options` type instead of the per-group types.\n   */\n  includeParams?: boolean\n}\n\nfunction getOperationLink(node: ast.OperationNode, link: OperationCommentLink): string | null {\n  if (!link) {\n    return null\n  }\n\n  if (typeof link === 'function') {\n    return link(node) ?? null\n  }\n\n  return node.path ? `{@link ${Url.toPath(node.path)}}` : null\n}\n\n/**\n * Derives the shared `ContentTypeInfo` shape from a list of content types, tracking whether several\n * are present and the union, default, and form-data flags the client uses to pick one.\n */\nfunction buildContentTypeInfo(contentTypes: string[]): ContentTypeInfo {\n  const isMultipleContentTypes = contentTypes.length > 1\n\n  return {\n    contentTypes,\n    isMultipleContentTypes,\n    contentTypeUnion: isMultipleContentTypes ? contentTypes.map((ct) => JSON.stringify(ct)).join(' | ') : '',\n    defaultContentType: contentTypes[0] ?? 'application/json',\n    hasFormData: contentTypes.some((ct) => ct === 'multipart/form-data'),\n  }\n}\n\nexport function getContentTypeInfo(node: ast.OperationNode): ContentTypeInfo {\n  return buildContentTypeInfo(node.requestBody?.content?.map((e) => e.contentType) ?? [])\n}\n\n/**\n * The request-body counterpart for the primary success response: the content types it documents and\n * whether several are present, so the client can let a caller pick which one to accept.\n */\nexport function getResponseContentTypeInfo(node: ast.OperationNode): ContentTypeInfo {\n  return buildContentTypeInfo(getPrimarySuccessResponse(node)?.content?.map((e) => e.contentType) ?? [])\n}\n\nexport type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'\n\n/**\n * Reads the single base content type of an operation's primary success response, lowercased and\n * stripped of any `; charset=...` suffix. Returns `undefined` when the response declares zero or\n * more than one content type, since neither case has a single type to act on.\n */\nfunction getPrimarySuccessContentType(node: ast.OperationNode): string | undefined {\n  const contentTypes = getPrimarySuccessResponse(node)?.content?.map((entry) => entry.contentType) ?? []\n  if (contentTypes.length !== 1) return undefined\n  return contentTypes[0]!.split(';')[0]!.trim().toLowerCase()\n}\n\n/**\n * Whether an operation streams its primary success response as Server-Sent Events\n * (`text/event-stream`). The client generator uses this to return a typed event stream instead of a\n * one-shot `RequestResult`.\n */\nexport function isEventStream(node: ast.OperationNode): boolean {\n  return getPrimarySuccessContentType(node) === 'text/event-stream'\n}\n\n/**\n * Derives the default `responseType` for an operation from its primary success response.\n *\n * Returns a value only when that response declares a single non-JSON content type. `text/event-stream`\n * and other binary types (`application/octet-stream`, `application/pdf`, `image/*`, `audio/*`,\n * `video/*`) map to a stream or `'blob'`, and other `text/*` maps to `'text'`. Otherwise `undefined`,\n * leaving the runtime client's `Content-Type` auto-detection in charge.\n */\nexport function getResponseType(node: ast.OperationNode): ResponseType | undefined {\n  const baseType = getPrimarySuccessContentType(node)\n  if (!baseType) return undefined\n\n  if (baseType === 'application/json' || baseType.endsWith('+json') || baseType === 'text/json') return undefined\n  if (baseType === 'text/event-stream') return 'stream'\n  if (baseType.startsWith('text/')) return 'text'\n  if (baseType === 'application/octet-stream' || baseType === 'application/pdf' || /^(image|audio|video)\\//.test(baseType)) return 'blob'\n  return undefined\n}\n\n/**\n * Maps a content type to the PascalCase suffix used to name per-content-type variants\n * (e.g. `application/json` → `Json`, `application/xml` → `Xml`, `multipart/form-data` → `FormData`).\n */\nfunction getContentTypeSuffix(contentType: string): string {\n  const baseType = contentType.split(';')[0]!.trim()\n  if (baseType === 'application/json') return 'Json'\n  if (baseType === 'multipart/form-data') return 'FormData'\n  if (baseType === 'application/x-www-form-urlencoded') return 'FormUrlEncoded'\n  const subtype = baseType.split('/').pop() ?? baseType\n  const parts = subtype.split(/[^a-zA-Z0-9]+/).filter(Boolean)\n  if (parts.length === 0) return 'Unknown'\n  return parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join('')\n}\n\n/**\n * Appends a content-type suffix to a base name, keeping a trailing `Data` segment last\n * (e.g. `AddPetData` + `Json` → `AddPetJsonData`, `AddPetStatus200` + `Xml` → `AddPetStatus200Xml`).\n */\nexport function getPerContentTypeName(baseName: string, suffix: string): string {\n  if (baseName.endsWith('Data')) {\n    return suffix.endsWith('Data') ? baseName.slice(0, -4) + suffix : `${baseName.slice(0, -4)}${suffix}Data`\n  }\n  return baseName + suffix\n}\n\nexport type ContentVariantInput = { contentType: string; schema?: ast.SchemaNode | null; keysToOmit?: Array<string> | null }\nexport type ContentVariant = { name: string; suffix: string; schema: ast.SchemaNode; keysToOmit?: Array<string> | null; contentType: string }\n\n/**\n * Resolves per-content-type variant names for a set of content entries, deduplicating suffix\n * collisions with a numeric counter. Entries without a schema are skipped. The returned `suffix` is\n * the final (possibly counter-augmented) value, so callers can derive parallel names in another\n * namespace (e.g. plugin-faker deriving the matching plugin-ts type name).\n */\nexport function resolveContentTypeVariants(entries: Array<ContentVariantInput>, baseName: string): Array<ContentVariant> {\n  const usedNames = new Set<string>()\n  return entries\n    .filter((entry) => entry.schema)\n    .map((entry) => {\n      const baseSuffix = getContentTypeSuffix(entry.contentType)\n      let suffix = baseSuffix\n      let name = getPerContentTypeName(baseName, suffix)\n      let counter = 2\n      while (usedNames.has(name)) {\n        suffix = `${baseSuffix}${counter++}`\n        name = getPerContentTypeName(baseName, suffix)\n      }\n      usedNames.add(name)\n      return { name, suffix, schema: entry.schema!, keysToOmit: entry.keysToOmit, contentType: entry.contentType }\n    })\n}\n\nexport function buildRequestConfigType(node: ast.OperationNode): string {\n  const request = getContentTypeInfo(node)\n  const response = getResponseContentTypeInfo(node)\n  // The request groups come from the grouped params, so `config` drops the data-shape keys to stay\n  // assignable to `Options`, which omits them from `RequestConfig`.\n  const configType = `Partial<Omit<RequestConfig, 'path' | 'query' | 'body' | 'headers' | 'url'>>`\n\n  // Only the ambiguous side is offered: a single-type side has nothing to pick, so it stays baked in\n  // the generated call.\n  const members = [\n    request.isMultipleContentTypes ? `request?: ${request.contentTypeUnion}` : null,\n    response.isMultipleContentTypes ? `response?: ${response.contentTypeUnion}` : null,\n  ].filter(Boolean)\n\n  return members.length ? `${configType} & { contentType?: { ${members.join('; ')} } }` : configType\n}\n\n/**\n * Builds the `client?:` option type shared by the generated query hooks (`useQuery`,\n * `useInfiniteQuery`, `useSWR`, ...). Unlike {@link buildRequestConfigType}, it never adds a\n * `contentType?:` member: query hooks wrap GET operations, which carry no request body to select a\n * content type for.\n */\nexport function buildClientOptionType(): string {\n  return `Partial<Omit<RequestConfig, 'path' | 'query' | 'body' | 'headers' | 'url'>>`\n}\n\nexport type RequestGroups = {\n  path: boolean\n  query: boolean\n  body: boolean\n  headers: boolean\n}\n\n/**\n * Which of the grouped request options an operation carries.\n */\nexport function getRequestGroups(node: ast.OperationNode): RequestGroups {\n  const { path, query, header } = getOperationParameters(node)\n  return {\n    path: path.length > 0,\n    query: query.length > 0,\n    body: Boolean(node.requestBody?.content?.[0]?.schema),\n    headers: header.length > 0,\n  }\n}\n\nexport type RequestGroupOptionality = {\n  groups: RequestGroups\n  hasRequiredPath: boolean\n  hasRequiredQuery: boolean\n  hasRequiredHeader: boolean\n  /**\n   * Whether the grouped request parameter can default to `{}`. True only when no group carries a\n   * required member, so every member is safe to omit.\n   */\n  isOptional: boolean\n}\n\n/**\n * Resolves which grouped request options an operation carries together with whether each group\n * holds a required member. The grouped parameter stays optional only when nothing inside it is\n * required, matching the generated `RequestConfig` type.\n */\nexport function getRequestGroupOptionality(node: ast.OperationNode): RequestGroupOptionality {\n  const groups = getRequestGroups(node)\n  const { path, query, header } = getOperationParameters(node)\n  const hasRequiredPath = path.some((param) => param.required)\n  const hasRequiredQuery = query.some((param) => param.required)\n  const hasRequiredHeader = header.some((param) => param.required)\n\n  return {\n    groups,\n    hasRequiredPath,\n    hasRequiredQuery,\n    hasRequiredHeader,\n    isOptional: !hasRequiredPath && !hasRequiredQuery && !hasRequiredHeader && !groups.body,\n  }\n}\n\nexport type RequestOptionsNameResolver = RequestConfigResolver & {\n  response: {\n    options(node: ast.OperationNode): string\n  }\n}\n\n/**\n * Builds the grouped `{ path, query, body, headers }` parameter for a generated client\n * function, typed from the operation's `Options` (minus `url`). Only the groups the\n * operation actually has are destructured. The trailing `config` parameter carries the\n * runtime `RequestConfig` overrides plus `client`.\n */\nexport function buildRequestParamsSignature(\n  node: ast.OperationNode,\n  resolver: RequestOptionsNameResolver,\n  options: { isConfigurable?: boolean } = {},\n): { signature: string; groups: RequestGroups } {\n  const { isConfigurable = true } = options\n  const { groups, isOptional } = getRequestGroupOptionality(node)\n\n  const names = (['path', 'query', 'body', 'headers'] as const).filter((key) => groups[key])\n\n  const firstParam = names.length > 0 ? `{ ${names.join(', ')} }: ${resolver.response.options(node)}${isOptional ? ' = {}' : ''}` : null\n  const configParam = isConfigurable ? `config: ${buildRequestConfigType(node)} = {}` : null\n\n  return {\n    signature: [firstParam, configParam].filter(Boolean).join(', '),\n    groups,\n  }\n}\n\nexport function buildOperationComments(node: ast.OperationNode, options: BuildOperationCommentsOptions = {}): Array<string> {\n  const { link = 'pathTemplate', linkPosition = 'afterDeprecated', splitLines = false } = options\n  const linkComment = getOperationLink(node, link)\n  const comments =\n    linkPosition === 'beforeDeprecated'\n      ? [node.description && `@description ${node.description}`, node.summary && `@summary ${node.summary}`, linkComment, node.deprecated && '@deprecated']\n      : [node.description && `@description ${node.description}`, node.summary && `@summary ${node.summary}`, node.deprecated && '@deprecated', linkComment]\n\n  const filteredComments = comments.filter((comment): comment is string => Boolean(comment))\n\n  if (!splitLines) {\n    return filteredComments\n  }\n\n  return filteredComments.flatMap((text) => text.split(/\\r?\\n/).map((line) => line.trim())).filter((comment): comment is string => Boolean(comment))\n}\n\nconst operationParameterGroupsByNode = new WeakMap<ast.OperationNode, OperationParameterGroups>()\n\n/**\n * Groups an operation's parameters by location (`path`/`query`/`header`/`cookie`), deduping each\n * group by name. Every plugin generator visiting the same `OperationNode` shares one AST instance\n * (see `KubbDriver`), so the result is cached per node to avoid re-filtering and re-deduping the\n * same parameters once per plugin.\n */\nexport function getOperationParameters(node: ast.OperationNode): OperationParameterGroups {\n  const cached = operationParameterGroupsByNode.get(node)\n  if (cached) return cached\n\n  const groups: OperationParameterGroups = {\n    path: dedupeParams(node.parameters.filter((param) => param.in === 'path')),\n    query: dedupeParams(node.parameters.filter((param) => param.in === 'query')),\n    header: dedupeParams(node.parameters.filter((param) => param.in === 'header')),\n    cookie: dedupeParams(node.parameters.filter((param) => param.in === 'cookie')),\n  }\n\n  operationParameterGroupsByNode.set(node, groups)\n  return groups\n}\n\n/**\n * Builds the combined `{ body, path, query, headers }` options object schema for an operation,\n * referencing the already-resolved body and grouped param names. Shared by `@kubb/plugin-ts`'s\n * `Options` type and `@kubb/plugin-zod`'s inferred options schema, so both printers emit the same\n * shape from the same inputs. `primitive: 'object'` is a no-op for the TS printer and tells the Zod\n * printer to emit `z.object(…)` rather than a record.\n */\nexport function buildOptionsSchema(node: ast.OperationNode, resolver: OperationTypeNameResolver): ast.SchemaNode {\n  const { path, query, header } = getOperationParameters(node)\n  const hasBody = Boolean(node.requestBody?.content?.[0]?.schema)\n  const createNever = () => ast.factory.createSchema({ type: 'never', primitive: undefined, optional: true })\n  const groups = [\n    { name: 'path', params: path, resolve: resolver.param.path },\n    { name: 'query', params: query, resolve: resolver.param.query },\n    { name: 'headers', params: header, resolve: resolver.param.headers },\n  ] as const\n\n  // NOTE(v5-stable): the fields were renamed from the legacy beta shape\n  // (`data`/`pathParams`/`queryParams`/`headerParams`) to `body`/`path`/`query`/`headers` so the\n  // type matches the runtime client. Drop this note once v5 leaves beta.\n  return ast.factory.createSchema({\n    type: 'object',\n    primitive: 'object',\n    deprecated: node.deprecated,\n    properties: [\n      ast.factory.createProperty({\n        name: 'body',\n        required: hasBody,\n        schema: hasBody ? ast.factory.createSchema({ type: 'ref', name: resolver.response.body(node) }) : createNever(),\n      }),\n      ...groups.map(({ name, params, resolve }) => {\n        const required = params.some((param) => param.required)\n\n        return ast.factory.createProperty({\n          name,\n          required,\n          schema:\n            params.length > 0\n              ? ast.factory.createSchema({ type: 'ref', name: resolve.call(resolver.param, node, params[0]!), optional: !required })\n              : createNever(),\n        })\n      }),\n    ],\n  })\n}\n\nexport function getStatusCodeNumber(statusCode: ast.StatusCode | number | string): number | null {\n  const code = Number(statusCode)\n\n  return Number.isNaN(code) ? null : code\n}\n\nexport function isSuccessStatusCode(statusCode: ast.StatusCode | number | string): boolean {\n  const code = getStatusCodeNumber(statusCode)\n\n  return code !== null && code >= 200 && code < 300\n}\n\nexport function isErrorStatusCode(statusCode: ast.StatusCode | number | string): boolean {\n  const code = getStatusCodeNumber(statusCode)\n\n  return code !== null && code >= 400\n}\n\nexport function getSuccessResponses<TResponse extends ResponseLike>(responses: ReadonlyArray<TResponse>): Array<TResponse> {\n  return responses.filter((response) => isSuccessStatusCode(response.statusCode))\n}\n\nexport function getOperationSuccessResponses(node: ast.OperationNode): Array<ast.ResponseNode> {\n  return getSuccessResponses(node.responses)\n}\n\nexport function getPrimarySuccessResponse(node: ast.OperationNode): ast.ResponseNode | null {\n  return getOperationSuccessResponses(node)[0] ?? null\n}\n\nexport function resolveErrorNames(node: ast.OperationNode, resolver: ResponseStatusNameResolver): string[] {\n  return node.responses.filter((response) => isErrorStatusCode(response.statusCode)).map((response) => resolver.response.status(node, response.statusCode))\n}\n\nexport function resolveSuccessNames(node: ast.OperationNode, resolver: ResponseStatusNameResolver): string[] {\n  return node.responses.filter((response) => isSuccessStatusCode(response.statusCode)).map((response) => resolver.response.status(node, response.statusCode))\n}\n\nexport function resolveStatusCodeNames(node: ast.OperationNode, resolver: ResponseStatusNameResolver): string[] {\n  return node.responses.map((response) => resolver.response.status(node, response.statusCode))\n}\n\nconst typeNamesByResolver = new WeakMap<OperationTypeNameResolver, Map<string, string[]>>()\n\nexport function resolveOperationTypeNames(\n  node: ast.OperationNode,\n  resolver: OperationTypeNameResolver,\n  options: ResolveOperationTypeNameOptions = {},\n): string[] {\n  const cacheKey = `${node.operationId}\\0${options.order ?? ''}\\0${options.responseStatusNames ?? ''}\\0${options.includeParams === false ? 'noparams' : ''}\\0${(options.exclude ?? []).join(',')}`\n  let byResolver = typeNamesByResolver.get(resolver)\n  if (byResolver) {\n    const cached = byResolver.get(cacheKey)\n    if (cached) return cached\n  } else {\n    byResolver = new Map()\n    typeNamesByResolver.set(resolver, byResolver)\n  }\n\n  const { path, query, header } = getOperationParameters(node)\n  const responseStatusNames =\n    options.responseStatusNames === 'error'\n      ? resolveErrorNames(node, resolver)\n      : options.responseStatusNames === false\n        ? []\n        : resolveStatusCodeNames(node, resolver)\n  const exclude = new Set(options.exclude ?? [])\n  const paramNames =\n    options.includeParams === false\n      ? []\n      : [\n          ...path.map((param) => resolver.param.path(node, param)),\n          ...query.map((param) => resolver.param.query(node, param)),\n          ...header.map((param) => resolver.param.headers(node, param)),\n        ]\n  const bodyAndResponseNames = [node.requestBody?.content?.[0]?.schema ? resolver.response.body(node) : null, resolver.response.response(node)]\n  const names =\n    options.order === 'body-response-first'\n      ? [...bodyAndResponseNames, ...paramNames, ...responseStatusNames]\n      : [...paramNames, ...bodyAndResponseNames, ...responseStatusNames]\n\n  const result = names.filter((name): name is string => Boolean(name) && !exclude.has(name as string))\n  byResolver.set(cacheKey, result)\n  return result\n}\n\nexport function resolveResponseTypes(node: ast.OperationNode, resolver: ResponseNameResolver): Array<[statusCode: number | 'default', typeName: string]> {\n  const types: Array<[number | 'default', string]> = []\n\n  for (const response of node.responses) {\n    if (response.statusCode === 'default') {\n      types.push(['default', resolver.response.response(node)])\n      continue\n    }\n\n    const code = getStatusCodeNumber(response.statusCode)\n    if (code === null) {\n      continue\n    }\n\n    types.push([code, isSuccessStatusCode(code) ? resolver.response.response(node) : resolver.response.status(node, response.statusCode)])\n  }\n\n  return types\n}\n\nexport function findSuccessStatusCode(responses: Array<{ statusCode: ast.StatusCode | number | string }>): ast.StatusCode | null {\n  for (const response of responses) {\n    if (isSuccessStatusCode(response.statusCode)) {\n      return response.statusCode as ast.StatusCode\n    }\n  }\n\n  return null\n}\n","type Options = {\n  /**\n   * Text prepended before casing is applied.\n   */\n  prefix?: string\n  /**\n   * Text appended before casing is applied.\n   */\n  suffix?: string\n}\n\n/**\n * Shared implementation for camelCase and PascalCase conversion.\n * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)\n * and capitalizes each word according to `pascal`.\n *\n * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.\n */\nfunction toCamelOrPascal(text: string, pascal: boolean): string {\n  return text\n    .trim()\n    .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n    .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n    .replace(/(\\d)([a-z])/g, '$1 $2')\n    .split(/[\\s\\-_./\\\\:]+/)\n    .filter(Boolean)\n    .map((word, i) => {\n      if (word.length > 1 && word === word.toUpperCase()) return word\n      const head = i === 0 && !pascal ? word.charAt(0).toLowerCase() : word.charAt(0).toUpperCase()\n      return head + word.slice(1)\n    })\n    .join('')\n    .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Converts `text` to camelCase.\n *\n * @example Word boundaries\n * `camelCase('hello-world') // 'helloWorld'`\n *\n * @example With a prefix\n * `camelCase('tag', { prefix: 'create' }) // 'createTag'`\n */\nexport function camelCase(text: string, { prefix = '', suffix = '' }: Options = {}): string {\n  return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n *\n * @example Word boundaries\n * `pascalCase('hello-world') // 'HelloWorld'`\n *\n * @example With a suffix\n * `pascalCase('tag', { suffix: 'schema' }) // 'TagSchema'`\n */\nexport function pascalCase(text: string, { prefix = '', suffix = '' }: Options = {}): string {\n  return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Uppercases only the first character of `text`, leaving the rest untouched.\n * Unlike {@link pascalCase} it never re-splits word boundaries or strips characters.\n *\n * @example\n * `capitalize('getPetById') // 'GetPetById'`\n */\nexport function capitalize(text: string): string {\n  return `${text.charAt(0).toUpperCase()}${text.slice(1)}`\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example From camelCase\n * `snakeCase('helloWorld') // 'hello_world'`\n *\n * @example From mixed separators\n * `snakeCase('Hello-World') // 'hello_world'`\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Options = {}): string {\n  const processed = `${prefix} ${text} ${suffix}`.trim()\n  return processed\n    .replace(/([a-z])([A-Z])/g, '$1_$2')\n    .replace(/[\\s\\-.]+/g, '_')\n    .replace(/[^a-zA-Z0-9_]/g, '')\n    .toLowerCase()\n    .split('_')\n    .filter(Boolean)\n    .join('_')\n}\n\n/**\n * Converts `text` to SCREAMING_SNAKE_CASE.\n *\n * @example From camelCase\n * `screamingSnakeCase('helloWorld') // 'HELLO_WORLD'`\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Options = {}): string {\n  return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Wraps a value in single quotes for emitting a single-quoted JavaScript string literal, escaping\n * any backslash or single quote in the content.\n *\n * @example\n * ```ts\n * singleQuote('foo')      // \"'foo'\"\n * singleQuote(\"o'clock\")  // \"'o\\\\'clock'\"\n * ```\n */\nexport function singleQuote(value: string | number | boolean | undefined | null): string {\n  if (value === undefined || value === null) return \"''\"\n  const escaped = String(value).replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")\n\n  return `'${escaped}'`\n}\n\n/**\n * Strips a single matching pair of `\"...\"`, `'...'`, or `` `...` `` from both ends of `text`.\n * Returns the string unchanged when no balanced quote pair is found.\n *\n * @example\n * ```ts\n * trimQuotes('\"hello\"') // 'hello'\n * trimQuotes('hello')   // 'hello'\n * ```\n */\nexport function trimQuotes(text: string): string {\n  if (text.length >= 2) {\n    const first = text[0]\n    const last = text[text.length - 1]\n    if ((first === '\"' && last === '\"') || (first === \"'\" && last === \"'\") || (first === '`' && last === '`')) {\n      return text.slice(1, -1)\n    }\n  }\n  return text\n}\n\n/**\n * Serializes a primitive to a single-quoted string literal, stripping any surrounding quotes first.\n *\n * Escaping runs through `JSON.stringify`, then the result switches to single quotes so the generated\n * code matches the repo style without a formatter.\n *\n * @example\n * ```ts\n * stringify('hello')   // \"'hello'\"\n * stringify('\"hello\"') // \"'hello'\"\n * ```\n */\nexport function stringify(value: string | number | boolean | undefined): string {\n  if (value === undefined || value === null) return \"''\"\n  const json = JSON.stringify(trimQuotes(value.toString()))\n  const inner = json.slice(1, -1).replace(/\\\\\"/g, '\"').replace(/'/g, \"\\\\'\")\n  return `'${inner}'`\n}\n\n/**\n * Escapes characters that are not allowed inside JS string literals, covering quotes, backslashes,\n * and the Unicode line terminators U+2028 and U+2029.\n *\n * @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4\n *\n * @example\n * ```ts\n * jsStringEscape('say \"hi\"\\nbye') // 'say \\\\\"hi\\\\\"\\\\nbye'\n * ```\n */\nexport function jsStringEscape(input: unknown): string {\n  return `${input}`.replace(/[\"'\\\\\\n\\r\\u2028\\u2029]/g, (character) => {\n    switch (character) {\n      case '\"':\n      case \"'\":\n      case '\\\\':\n        return `\\\\${character}`\n      case '\\n':\n        return '\\\\n'\n      case '\\r':\n        return '\\\\r'\n      case '\\u2028':\n        return '\\\\u2028'\n      case '\\u2029':\n        return '\\\\u2029'\n      default:\n        return ''\n    }\n  })\n}\n\n/**\n * Converts a pattern string into a `new RegExp(...)` constructor call or a regex literal string.\n * Inline flags expressed as a `^(?im)` prefix are extracted and applied to the resulting expression.\n * Pass `null` as the second argument to emit a `/pattern/flags` literal instead.\n *\n * @example\n * ```ts\n * toRegExpString('^(?im)foo')       // 'new RegExp(\"^foo\", \"im\")'\n * toRegExpString('^(?im)foo', null) // '/^foo/im'\n * ```\n */\nexport function toRegExpString(text: string, func: string | null = 'RegExp'): string {\n  const raw = trimQuotes(text)\n\n  const match = raw.match(/^\\^(\\(\\?([igmsuy]+)\\))/i)\n  const replacementTarget = match?.[1] ?? ''\n  const matchedFlags = match?.[2]\n  const cleaned = raw\n    .replace(/^\\\\?\\//, '')\n    .replace(/\\\\?\\/$/, '')\n    .replace(replacementTarget, '')\n\n  const { source, flags } = new RegExp(cleaned, matchedFlags)\n\n  if (func === null) return `/${source}/${flags}`\n\n  return `new ${func}(${JSON.stringify(source)}${flags ? `, ${JSON.stringify(flags)}` : ''})`\n}\n\n/**\n * Renders a plain object as multi-line `key: value` source for embedding in generated code. Nested\n * objects recurse with fixed indentation, so the result drops straight into an object literal\n * without re-parsing.\n *\n * @example\n * ```ts\n * stringifyObject({ foo: 'bar', nested: { a: 1 } })\n * // 'foo: bar,\\nnested: {\\n        a: 1\\n      }'\n * ```\n */\nexport function stringifyObject(value: Record<string, unknown>): string {\n  const items = Object.entries(value)\n    .map(([key, val]) => {\n      if (val !== null && typeof val === 'object') {\n        return `${key}: {\\n        ${stringifyObject(val as Record<string, unknown>)}\\n      }`\n      }\n      return `${key}: ${val}`\n    })\n    .filter(Boolean)\n  return items.join(',\\n')\n}\n\n/**\n * Renders a dotted path or string array as an optional-chaining accessor expression rooted at\n * `accessor`. Returns `null` for an empty path.\n *\n * @example\n * ```ts\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // \"lastPage?.['pagination']?.['next']?.['id']\"\n * ```\n */\nexport function getNestedAccessor(param: string | Array<string>, accessor: string): string | null {\n  const parts = Array.isArray(param) ? param : param.split('.')\n  if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) return null\n  return `${accessor}?.['${`${parts.join(\"']?.['\")}']`}`\n}\n","import { camelCase } from '@internals/utils'\nimport type { Group } from 'kubb/kit'\n\n/**\n * Builds the `group` config a Kubb plugin passes to `ctx.setOptions`, applying the\n * shared default naming so every plugin groups output consistently:\n *\n * - `path` groups use the second path segment (`/pet/findByStatus` → `pet`).\n * - other groups use the camelCased group (`pet store` → `petStore`).\n *\n * A user-provided `group.name` always wins over the default namer, so callers stay in\n * control of their output folders. Returns `null` when grouping is disabled, matching the\n * per-plugin convention.\n *\n * @param group - The user-supplied group option, or `undefined` to disable grouping.\n *\n * @example\n * ```ts\n * createGroupConfig(group) // shared across every plugin\n * ```\n */\nexport function createGroupConfig(group: Group | undefined): Group | null {\n  if (!group) {\n    return null\n  }\n\n  const defaultName = (ctx: { group: string }): string => {\n    if (group.type === 'path') {\n      return `${ctx.group.split('/')[1]}`\n    }\n\n    return camelCase(ctx.group)\n  }\n\n  return {\n    ...group,\n    name: group.name ? group.name : defaultName,\n  } satisfies Group\n}\n","import { getOperationParameters, getRequestGroupOptionality, resolveErrorNames, resolveSuccessNames } from '@internals/shared'\nimport type { ast } from 'kubb/kit'\nimport { createFunctionParameter, createFunctionParameters, createObjectBindingPattern, createTypeLiteral } from '@kubb/plugin-ts'\nimport type { FunctionParameterNode, FunctionParametersNode, PluginTs, ResolverTs } from '@kubb/plugin-ts'\nimport type { Infinite, Mutation, Query } from './types.ts'\n\n/**\n * The grouped request options, ordered for both the destructured signature and the\n * call passed to the underlying client.\n */\nconst requestGroupOrder = ['path', 'query', 'body', 'headers'] as const\n\ntype RequestGroupKey = (typeof requestGroupOrder)[number]\n\n/**\n * Widens a request-group member type so a generated TanStack hook accepts either the value or a\n * deferred value. Both plugins apply this through the `memberTypeWrapper` of `buildGroupedRequestParam`;\n * they only differ in how the deferred form is later resolved.\n *\n * `maybeRefOrGetter` is used by vue-query, which keeps the ref/getter live and unwraps it lazily with\n * `toValue` because vue-query keys are reactive. `maybeValueOrGetter` is used by react-query, which\n * resolves the getter once at the hook boundary and forwards a plain value because React Query hashes\n * keys structurally and cannot hold a function.\n */\nexport function maybeRefOrGetter(type: string): string {\n  return `MaybeRefOrGetter<${type}>`\n}\n\nexport function maybeValueOrGetter(type: string): string {\n  return `${type} | (() => ${type})`\n}\n\n/**\n * Builds the grouped `{ path, query, body, headers }` parameter that mirrors the client\n * function signature. Only the groups the operation carries are emitted, typed from the\n * operation's `Options`. `keys` narrows the emitted groups, used by the query key which\n * never carries `headers`.\n *\n * By default the whole group is typed as the single `Options` reference. When\n * `memberTypeWrapper` is set, each group is emitted as its own member typed from the matching\n * `Options['<group>']` slice and wrapped, used by vue-query to apply\n * `MaybeRefOrGetter` per group.\n */\nexport function buildGroupedRequestParam(\n  node: ast.OperationNode,\n  options: {\n    resolver: ResolverTs\n    keys?: ReadonlyArray<RequestGroupKey>\n    memberTypeWrapper?: (type: string) => string\n  },\n): FunctionParameterNode | null {\n  const { resolver, keys = requestGroupOrder, memberTypeWrapper } = options\n  const { groups, hasRequiredPath, hasRequiredQuery, hasRequiredHeader } = getRequestGroupOptionality(node)\n  const names = keys.filter((key) => groups[key])\n\n  if (names.length === 0) {\n    return null\n  }\n\n  const requiredByGroup: Record<RequestGroupKey, boolean> = {\n    path: hasRequiredPath,\n    query: hasRequiredQuery,\n    body: groups.body,\n    headers: hasRequiredHeader,\n  }\n\n  // The grouped object can default to `{}` only when none of the emitted groups is required. The\n  // query key narrows `keys`, so optionality is computed over the emitted groups, not all of them.\n  const isOptional = names.every((name) => !requiredByGroup[name])\n\n  // Drop the groups this binding never destructures (the query key omits `headers`), so a group\n  // that is required elsewhere does not leak into a binding that does not carry it.\n  const optionsName = resolver.response.options(node)\n  const omittedKeys = requestGroupOrder.filter((key) => !keys.includes(key))\n  const optionsType = omittedKeys.length > 0 ? `Omit<${optionsName}, ${omittedKeys.map((key) => `'${key}'`).join(' | ')}>` : optionsName\n\n  if (memberTypeWrapper) {\n    const members = names.map((name) => ({\n      name,\n      type: memberTypeWrapper(`${optionsType}['${name}']`),\n      optional: !requiredByGroup[name],\n    }))\n\n    return createFunctionParameter({\n      name: createObjectBindingPattern({ elements: names.map((name) => ({ name })) }),\n      type: createTypeLiteral({ members }),\n      optional: false,\n      ...(isOptional ? { default: '{}' } : {}),\n    })\n  }\n\n  return createFunctionParameter({\n    name: createObjectBindingPattern({ elements: names.map((name) => ({ name })) }),\n    type: optionsType,\n    optional: false,\n    ...(isOptional ? { default: '{}' } : {}),\n  })\n}\n\n/**\n * Builds the shared `({ path, query, body, headers }, config = {})` parameter list for a\n * TanStack query-options function. The leading parameter mirrors the client signature, and the\n * trailing `config` is a partial `RequestConfig` minus the grouped data-shape keys, which are passed\n * explicitly. Framework plugins wrap the result when needed, for example vue-query applies `MaybeRefOrGetter`.\n */\nexport function buildQueryOptionsParams(\n  node: ast.OperationNode,\n  options: { resolver: ResolverTs; memberTypeWrapper?: (type: string) => string },\n): FunctionParametersNode {\n  const { resolver, memberTypeWrapper } = options\n\n  const groupedParam = buildGroupedRequestParam(node, { resolver, memberTypeWrapper })\n\n  const configParam = createFunctionParameter({\n    name: 'config',\n    type: `Partial<Omit<RequestConfig, 'path' | 'query' | 'body' | 'headers' | 'url'>>`,\n    default: '{}',\n  })\n\n  return createFunctionParameters({ params: [groupedParam, configParam].filter((param): param is FunctionParameterNode => param !== null) })\n}\n\n/**\n * Builds the call to a client `<op>` function inside a query/mutation hook body. The function takes\n * a single grouped options object, so the operation's request groups are passed as\n * shorthand alongside the spread `config`, with `throwOnError: true` pinned last so a caller's config\n * can't flip the query's error semantics. Queries thread the TanStack `signal`; mutations omit it.\n *\n * When `unwrapName` is set, each request group is passed as an explicit member unwrapped through it,\n * used by vue-query to resolve refs and getters with `toValue(...)` at call time.\n *\n * @example\n * ```ts\n * buildClientCall(node, { clientName: 'getPetById', signal: true })\n * // getPetById({ path, ...config, signal: config.signal ?? signal, throwOnError: true })\n * ```\n */\nexport function buildClientCall(node: ast.OperationNode, options: { clientName: string; signal?: boolean; unwrapName?: (name: string) => string }): string {\n  const { clientName, signal = false, unwrapName } = options\n  const { groups } = getRequestGroupOptionality(node)\n  const names = requestGroupOrder.filter((key) => groups[key])\n\n  const args = [\n    '...config',\n    ...names.map((name) => (unwrapName ? `${name}: ${unwrapName(name)}` : name)),\n    signal ? 'signal: config.signal ?? signal' : null,\n    'throwOnError: true',\n  ].filter((part): part is string => part !== null)\n\n  return `${clientName}({ ${args.join(', ')} })`\n}\n\ntype ResponseTypes = {\n  TData: string\n  TError: string\n}\n\ntype PageParamType = {\n  queryParamsTypeName: string | null\n  pageParamType: string\n}\n\ntype ResolvePageParamTypeParams = {\n  resolver: ResolverTs\n  initialPageParam: Infinite['initialPageParam']\n  queryParam?: Infinite['queryParam']\n}\n\n/**\n * Builds the `TData` / `TError` type expressions shared by every generated hook, joining the resolved\n * success responses into `TData` and wrapping the error responses in `ResponseErrorConfig<...>`.\n */\nexport function buildResponseTypes(node: ast.OperationNode, resolver: ResolverTs): ResponseTypes {\n  const successNames = resolveSuccessNames(node, resolver)\n  const responseName = successNames.length > 0 ? successNames.join(' | ') : resolver.response.response(node)\n  const errorNames = resolveErrorNames(node, resolver)\n\n  return {\n    TData: responseName,\n    TError: `ResponseErrorConfig<${errorNames.length > 0 ? errorNames.join(' | ') : 'Error'}>`,\n  }\n}\n\nfunction resolveFallbackPageParamType(initialPageParam: Infinite['initialPageParam']): string {\n  if (typeof initialPageParam === 'number') return 'number'\n  if (typeof initialPageParam === 'boolean') return 'boolean'\n  if (typeof initialPageParam !== 'string') return 'unknown'\n  if (!initialPageParam.includes(' as ')) return 'string'\n\n  return initialPageParam.split(' as ').at(-1) ?? 'unknown'\n}\n\n/**\n * Resolves the `TPageParam` generic for the infinite-query hooks. Prefers the type read from the\n * configured `queryParam` on the operation's query object, and falls back to the type inferred from\n * `initialPageParam` when that parameter type is unavailable. Also returns the query params type name\n * so callers can reuse it when rewriting the paginated request.\n */\nexport function resolvePageParamType(node: ast.OperationNode, { resolver, initialPageParam, queryParam }: ResolvePageParamTypeParams): PageParamType {\n  const firstQueryParam = getOperationParameters(node).query[0]\n  const groupName = firstQueryParam ? resolver.param.query(node, firstQueryParam) : null\n  const individualName = firstQueryParam ? resolver.param.name(node, firstQueryParam) : null\n  const queryParamsTypeName = groupName !== individualName ? groupName : null\n\n  const queryParamType = queryParam && queryParamsTypeName ? `${queryParamsTypeName}['${queryParam}']` : null\n\n  if (!queryParamType) {\n    return { queryParamsTypeName, pageParamType: resolveFallbackPageParamType(initialPageParam) }\n  }\n\n  const isInitialPageParamDefined = initialPageParam !== undefined && initialPageParam !== null\n\n  return { queryParamsTypeName, pageParamType: isInitialPageParamDefined ? `NonNullable<${queryParamType}>` : queryParamType }\n}\n\n/**\n * Applies the shared query defaults during plugin setup: `false` disables query generation, and an\n * object merges over `methods: ['GET']` and the plugin's runtime `importPath`.\n */\nexport function resolveQueryConfig(query: Partial<Query> | false, options: { importPath: string }): Required<Query> | false {\n  if (query === false) return false\n  return { importPath: options.importPath, methods: ['GET'], ...query }\n}\n\n/**\n * Applies the shared mutation defaults during plugin setup: `false` disables mutation generation,\n * and an object merges over `methods: ['POST', 'PUT', 'PATCH', 'DELETE']` and the plugin's runtime\n * `importPath`.\n */\nexport function resolveMutationConfig(mutation: Partial<Mutation> | false, options: { importPath: string }): Required<Mutation> | false {\n  if (mutation === false) return false\n  return { importPath: options.importPath, methods: ['POST', 'PUT', 'PATCH', 'DELETE'], ...mutation }\n}\n\ntype OperationClassification = {\n  isQuery: boolean\n  isMutation: boolean\n}\n\ntype ClassifyOperationParams = {\n  query: Required<Query> | false\n  mutation: Required<Mutation> | false\n}\n\n/**\n * Classifies an operation as a query or a mutation from the resolved `query` / `mutation` method lists.\n * `query: false` still marks the operation as a query so the query-family generators keep matching it,\n * and a method already claimed by `query` never counts as a mutation.\n */\nexport function classifyOperation(node: ast.HttpOperationNode, { query, mutation }: ClassifyOperationParams): OperationClassification {\n  const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n  const queryMethods = new Set(query ? query.methods : [])\n  const isMutation =\n    mutation !== false &&\n    !isQuery &&\n    (mutation ? mutation.methods : []).some((method) => !queryMethods.has(method) && node.method.toLowerCase() === method.toLowerCase())\n\n  return { isQuery, isMutation }\n}\n\n/**\n * Applies the shared infinite-query defaults during plugin setup: a falsy value disables infinite\n * queries, and an object merges over `queryParam: 'id'` and `initialPageParam: 0` with the cursor\n * paths cleared.\n */\nexport function resolveInfiniteConfig(infinite: Partial<Infinite> | false): Required<Infinite> | false {\n  if (!infinite) return false\n  return { queryParam: 'id', initialPageParam: 0, cursorParam: null, nextParam: null, previousParam: null, ...infinite }\n}\n\nexport function transformName(name: string, type: string, transformers?: { name?: (name: string, type?: string) => string }): string {\n  return transformers?.name?.(name, type) || name\n}\n\ntype OverrideEntry<TOptions> = {\n  type: string\n  pattern: string | RegExp\n  options?: Partial<TOptions>\n}\n\nfunction matchesPattern(node: ast.OperationNode, ov: { type: string; pattern: string | RegExp }): boolean {\n  const { type, pattern } = ov\n  const matches = (value: string) => (typeof pattern === 'string' ? value === pattern : pattern.test(value))\n  if (type === 'operationId') return matches(node.operationId)\n  if (type === 'tag') return node.tags.some((t) => matches(t))\n  if (type === 'path') return node.path !== undefined && matches(node.path)\n  if (type === 'method') return node.method !== undefined && matches(node.method)\n  return false\n}\n\n/**\n * Resolves per-operation overrides (first matching override wins).\n *\n * @example\n * ```ts\n * const opts = resolveOperationOverrides(node, override)\n * const queryOpts = 'query' in opts ? opts.query : defaultQuery\n * ```\n */\nexport function resolveOperationOverrides<TOptions>(node: ast.OperationNode, override?: ReadonlyArray<OverrideEntry<TOptions>>): Partial<TOptions> {\n  if (!override) return {}\n  const match = override.find((ov) => matchesPattern(node, ov))\n  return match?.options ?? {}\n}\n\ntype ZodSchemaNameResolverLike = {\n  response?: {\n    response?: (node: ast.OperationNode) => string | undefined\n    body?: (node: ast.OperationNode) => string | undefined\n  }\n  param?: {\n    query?: (node: ast.OperationNode, param: ast.ParameterNode) => string | undefined\n  }\n}\n\ntype ParserOption = false | 'zod' | { request?: 'zod'; response?: 'zod' } | undefined\n\n/**\n * Returns `'zod'` when response-direction parsing is enabled.\n * The string shorthand `'zod'` also enables response parsing.\n */\nexport function resolveResponseParser(parser: ParserOption): 'zod' | null {\n  if (!parser) return null\n  if (parser === 'zod') return 'zod'\n  return parser.response ?? null\n}\n\n/**\n * Returns `'zod'` when request body parsing is enabled.\n * The string shorthand `'zod'` also enables request body parsing (existing behavior).\n */\nexport function resolveRequestParser(parser: ParserOption): 'zod' | null {\n  if (!parser) return null\n  if (parser === 'zod') return 'zod'\n  return parser.request ?? null\n}\n\n/**\n * Returns `'zod'` when query-params parsing is enabled.\n * Only the object form `{ request: 'zod' }` enables this. `parser: 'zod'` does not.\n */\nexport function resolveQueryParamsParser(parser: ParserOption): 'zod' | null {\n  if (!parser || parser === 'zod') return null\n  return parser.request ?? null\n}\n\n/**\n * Collects the Zod schema import names for an operation based on the active parser directions.\n *\n * - `parser: 'zod'`: response and request body names (backward-compatible behavior).\n * - `parser: { request: 'zod' }`: request body and query params names.\n * - `parser: { response: 'zod' }`: response name only.\n * - `parser: { request: 'zod', response: 'zod' }`: all three.\n *\n * Returns an empty array when no resolver is provided or `parser` is falsy.\n */\nexport function resolveZodSchemaNames(node: ast.OperationNode, zodResolver: ZodSchemaNameResolverLike | null | undefined, parser: ParserOption): Array<string> {\n  if (!zodResolver || !parser) return []\n  const { query: queryParams } = getOperationParameters(node)\n  return [\n    resolveResponseParser(parser) === 'zod' ? zodResolver.response?.response?.(node) : null,\n    resolveRequestParser(parser) === 'zod' && node.requestBody?.content?.[0]?.schema ? zodResolver.response?.body?.(node) : null,\n    resolveQueryParamsParser(parser) === 'zod' && queryParams.length > 0 ? zodResolver.param?.query?.(node, queryParams[0]!) : null,\n  ].filter((n): n is string => Boolean(n))\n}\n\n/**\n * Build QueryKey params as the grouped `{ path, query, body }` object (NO headers, NO config),\n * typed from the operation's `Options` minus `url`. The query key transformer reads the\n * grouped `path`/`query`/`body` bindings.\n */\nexport function buildQueryKeyParams(node: ast.OperationNode, options: { resolver: PluginTs['resolver'] }): FunctionParametersNode {\n  const { resolver } = options\n  const groupedParam = buildGroupedRequestParam(node, { resolver, keys: ['path', 'query', 'body'] })\n\n  return createFunctionParameters({ params: groupedParam ? [groupedParam] : [] })\n}\n","import { getNestedAccessor } from '@internals/utils'\nimport type { ast } from 'kubb/kit'\nimport type { ResolverTs } from '@kubb/plugin-ts'\nimport { createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport type { Infinite } from '../types.ts'\nimport { buildClientCall, buildGroupedRequestParam, buildQueryOptionsParams, buildResponseTypes, resolvePageParamType } from '../utils.ts'\n\ntype Props = {\n  name: string\n  clientName: string\n  queryKeyName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n  initialPageParam: Infinite['initialPageParam']\n  cursorParam: Infinite['cursorParam']\n  nextParam: Infinite['nextParam']\n  previousParam: Infinite['previousParam']\n  queryParam: Infinite['queryParam']\n  /**\n   * The `TQueryKey` generic written into the emitted `infiniteQueryOptions` call. react-query\n   * points it at the local `queryKey` const, vue-query uses the imported `QueryKey` type.\n   *\n   * @default 'typeof queryKey'\n   */\n  queryKeyType?: string\n  /**\n   * Wraps each grouped request member type, used by vue-query to accept `MaybeRefOrGetter` values.\n   */\n  memberTypeWrapper?: (type: string) => string\n  /**\n   * Unwraps a request group inside the client call, used by vue-query to emit `toValue(...)`.\n   */\n  unwrapName?: (name: string) => string\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\nconst callPrinter = functionPrinter({ mode: 'call' })\n\nexport function InfiniteQueryOptions({\n  name,\n  clientName,\n  initialPageParam,\n  cursorParam,\n  nextParam,\n  previousParam,\n  node,\n  tsResolver,\n  queryParam,\n  queryKeyName,\n  queryKeyType = 'typeof queryKey',\n  memberTypeWrapper,\n  unwrapName,\n}: Props): KubbReactNode {\n  const { TData: queryFnDataType, TError: errorType } = buildResponseTypes(node, tsResolver)\n\n  const { queryParamsTypeName, pageParamType } = resolvePageParamType(node, { resolver: tsResolver, initialPageParam, queryParam })\n\n  const groupedKeyParam = buildGroupedRequestParam(node, { resolver: tsResolver, keys: ['path', 'query', 'body'], memberTypeWrapper })\n  const queryKeyParamsNode = createFunctionParameters({ params: groupedKeyParam ? [groupedKeyParam] : [] })\n  const queryKeyParamsCall = callPrinter.print(queryKeyParamsNode) ?? ''\n\n  const paramsNode = buildQueryOptionsParams(node, { resolver: tsResolver, memberTypeWrapper })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n  const queryFnBody = `const { data } = await ${buildClientCall(node, { clientName, signal: true, unwrapName })}\n    return data`\n\n  const hasNewParams = nextParam != null || previousParam != null\n\n  const [getNextPageParamExpr, getPreviousPageParamExpr] = (() => {\n    if (hasNewParams) {\n      const nextAccessor = nextParam ? getNestedAccessor(nextParam, 'lastPage') : null\n      const prevAccessor = previousParam ? getNestedAccessor(previousParam, 'firstPage') : null\n      return [\n        nextAccessor ? `getNextPageParam: (lastPage) => ${nextAccessor}` : null,\n        prevAccessor ? `getPreviousPageParam: (firstPage) => ${prevAccessor}` : null,\n      ] as const\n    }\n    if (cursorParam) {\n      return [`getNextPageParam: (lastPage) => lastPage['${cursorParam}']`, `getPreviousPageParam: (firstPage) => firstPage['${cursorParam}']`] as const\n    }\n    return [\n      'getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage) && lastPage.length === 0 ? undefined : lastPageParam + 1',\n      'getPreviousPageParam: (_firstPage, _allPages, firstPageParam) => firstPageParam <= 1 ? undefined : firstPageParam - 1',\n    ] as const\n  })()\n\n  const queryOptionsArr = [\n    `initialPageParam: ${typeof initialPageParam === 'string' ? JSON.stringify(initialPageParam) : initialPageParam}`,\n    getNextPageParamExpr,\n    getPreviousPageParamExpr,\n  ].filter(Boolean)\n\n  const infiniteOverrideParams =\n    queryParam && queryParamsTypeName\n      ? `query = {\n      ...(query ?? {}),\n      ['${queryParam}']: pageParam as unknown as ${queryParamsTypeName}['${queryParam}'],\n    } as ${queryParamsTypeName}`\n      : ''\n\n  const queryFnArgs = infiniteOverrideParams ? '{ signal, pageParam }' : '{ signal }'\n  const queryFnStatements = infiniteOverrideParams ? `${infiniteOverrideParams}\\n    ${queryFnBody}` : queryFnBody\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function name={name} export params={paramsSignature}>\n        {`\nconst queryKey = ${queryKeyName}(${queryKeyParamsCall})\nreturn infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${queryFnDataType}>, ${queryKeyType}, ${pageParamType}>({\n  queryKey,\n  queryFn: async (${queryFnArgs}) => {\n    ${queryFnStatements}\n  },\n  ${queryOptionsArr.join(',\\n  ')}\n})\n`}\n      </Function>\n    </File.Source>\n  )\n}\n","import { type ast, Url } from 'kubb/kit'\nimport { createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport type { Transformer } from '../types.ts'\n\ntype Props = {\n  name: string\n  node: ast.OperationNode\n  transformer: Transformer | null | undefined\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\n\nexport const mutationKeyTransformer: Transformer = ({ node }) => {\n  if (!node.path) return []\n  return [`{ url: '${Url.toPath(node.path)}' }`]\n}\n\nexport function MutationKey({ name, node, transformer }: Props): KubbReactNode {\n  const paramsNode = createFunctionParameters({ params: [] })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n  const keys = (transformer ?? mutationKeyTransformer)({ node, casing: 'camelcase' })\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function.Arrow name={name} export params={paramsSignature} singleLine>\n        {`[${keys.join(', ')}] as const`}\n      </Function.Arrow>\n    </File.Source>\n  )\n}\n","import { capitalize } from '@internals/utils'\nimport type { ast, Resolver } from 'kubb/kit'\n\n/**\n * The naming variant of a query namespace: the plain query, or the\n * `Suspense`/`Infinite`/`SuspenseInfinite` flavors that suffix every\n * generated identifier.\n */\nexport type QueryVariant = '' | 'Suspense' | 'Infinite' | 'SuspenseInfinite'\n\n/**\n * The query namespace shared by the TanStack Query flavored plugins\n * (react-query, vue-query, swr): hook, options, key, key type, and inline\n * client names.\n */\nexport type QueryResolver = {\n  name(this: Resolver, node: ast.OperationNode): string\n  optionsName(this: Resolver, node: ast.OperationNode): string\n  keyName(this: Resolver, node: ast.OperationNode): string\n  keyTypeName(this: Resolver, node: ast.OperationNode): string\n  clientName(this: Resolver, node: ast.OperationNode): string\n}\n\n/**\n * The mutation namespace shared by the TanStack Query flavored plugins:\n * hook and mutation key names.\n */\nexport type MutationResolver = {\n  name(this: Resolver, node: ast.OperationNode): string\n  keyName(this: Resolver, node: ast.OperationNode): string\n}\n\n/**\n * Builds the shared query namespace for a variant. Spread the result into\n * `createResolver` once per variant the plugin supports.\n *\n * @example\n * ```ts\n * createResolver<PluginReactQuery>({\n *   query: createQueryResolver(),\n *   suspenseQuery: createQueryResolver('Suspense'),\n * })\n * ```\n */\nexport function createQueryResolver(variant: QueryVariant = ''): QueryResolver {\n  return {\n    name(node) {\n      return `use${capitalize(this.name(node.operationId))}${variant}`\n    },\n    optionsName(node) {\n      return `${this.name(node.operationId)}${variant}QueryOptions`\n    },\n    keyName(node) {\n      return `${this.name(node.operationId)}${variant}QueryKey`\n    },\n    keyTypeName(node) {\n      return `${capitalize(this.name(node.operationId))}${variant}QueryKey`\n    },\n    clientName(node) {\n      return `${this.name(node.operationId)}${variant}`\n    },\n  }\n}\n\n/**\n * Builds the shared mutation namespace. Spread the result into\n * `createResolver` and add plugin-specific methods (`optionsName`,\n * `typeName`, `argTypeName`) next to it.\n *\n * @example\n * ```ts\n * createResolver<PluginSwr>({ mutation: { ...createMutationResolver(), argTypeName(node) {...} } })\n * ```\n */\nexport function createMutationResolver(): MutationResolver {\n  return {\n    name(node) {\n      return `use${capitalize(this.name(node.operationId))}`\n    },\n    keyName(node) {\n      return `${this.name(node.operationId)}MutationKey`\n    },\n  }\n}\n","import { getOperationParameters } from '@internals/shared'\nimport { type ast, Url } from 'kubb/kit'\nimport type { PluginTs } from '@kubb/plugin-ts'\nimport { functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function, Type } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport type { Transformer } from '../types.ts'\nimport { buildQueryKeyParams } from '../utils.ts'\n\ntype Props = {\n  name: string\n  typeName: string\n  node: ast.OperationNode\n  tsResolver: PluginTs['resolver']\n  transformer: Transformer | null | undefined\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\n\nexport const queryKeyTransformer: Transformer = ({ node }) => {\n  if (!node.path) return []\n  const hasPathParams = getOperationParameters(node).path.length > 0\n  const hasQueryParams = getOperationParameters(node).query.length > 0\n  const hasRequestBody = !!node.requestBody?.content?.[0]?.schema\n\n  const urlObject = hasPathParams ? `{ url: '${Url.toPath(node.path)}', params: path }` : `{ url: '${Url.toPath(node.path)}' }`\n\n  return [urlObject, hasQueryParams ? '...(query ? [query] : [])' : null, hasRequestBody ? '...(body ? [body] : [])' : null].filter(Boolean) as Array<string>\n}\n\nexport function QueryKey({ name, node, tsResolver, typeName, transformer }: Props): KubbReactNode {\n  const paramsNode = buildQueryKeyParams(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n  const keys = (transformer ?? queryKeyTransformer)({ node, casing: 'camelcase' })\n\n  return (\n    <>\n      <File.Source name={name} isExportable isIndexable>\n        <Function.Arrow name={name} export params={paramsSignature} singleLine>\n          {`[${keys.join(', ')}] as const`}\n        </Function.Arrow>\n      </File.Source>\n      <File.Source name={typeName} isTypeOnly>\n        <Type name={typeName}>{`ReturnType<typeof ${name}>`}</Type>\n      </File.Source>\n    </>\n  )\n}\n","/**\n * Resolves which client plugin a consumer (react-query, vue-query, swr, mcp) should call for an\n * operation, shared so the selection rules and diagnostics stay in one place.\n *\n * Every client runtime lives in a dedicated client plugin, so a consumer always calls a registered\n * contract client plugin (plugin-fetch or plugin-axios) and never emits its own inline client:\n *\n * - `contract` — a registered contract client plugin owns the `<op>` functions and the consumer\n *   imports and calls them.\n * - `error` — no client plugin is registered, several are registered without a selector, or the\n *   requested one is missing.\n *\n * The `client` string selects explicitly (`'fetch'` / `'axios'`); when it is unset a lone registered\n * contract client plugin is picked up automatically.\n */\n\n// Canonical plugin names. They mirror the `pluginFetchName` / `pluginAxiosName` consts the plugins\n// export, kept as literals so this internal needs no plugin install deps.\nconst pluginFetchName = 'plugin-fetch'\nconst pluginAxiosName = 'plugin-axios'\n\n/**\n * The client selector accepted by a consumer's `client` option. Both call a registered contract\n * client plugin.\n */\nexport type ClientSelector = 'fetch' | 'axios'\n\n/**\n * The resolved client strategy stored in a consumer plugin's options: the generated code always\n * imports and calls a registered contract client plugin's `<op>`. The client runtime lives in\n * plugin-axios / plugin-fetch, so nothing is bundled by the consumer.\n */\nexport type ResolvedContractClient = { kind: 'contract'; pluginName: string }\n\n/**\n * The outcome of {@link resolveClient}.\n *\n * - `contract` names the contract client plugin whose `<op>` functions the consumer imports.\n * - `error` carries a setup diagnostic.\n */\nexport type ResolveClientResult = ResolvedContractClient | { kind: 'error'; message: string }\n\nconst selectorToPlugin: Record<'fetch' | 'axios', string> = {\n  fetch: pluginFetchName,\n  axios: pluginAxiosName,\n}\n\n// Every contract client plugin, in auto-detect priority order.\nconst contractPlugins = [pluginFetchName, pluginAxiosName] as const\n\n/**\n * Applies the `client` resolution rules. See the module comment for the strategy shape.\n *\n * @example\n * ```ts\n * resolveClient({ client: 'fetch', pluginNames: ['plugin-ts', 'plugin-fetch'] })\n * // { kind: 'contract', pluginName: 'plugin-fetch' }\n * ```\n *\n * @example\n * ```ts\n * resolveClient({ client: undefined, pluginNames: ['plugin-ts'] })\n * // { kind: 'error', message: 'No client plugin is registered…' }\n * ```\n */\nexport function resolveClient(options: { client: ClientSelector | undefined; pluginNames: ReadonlyArray<string> }): ResolveClientResult {\n  const { client, pluginNames } = options\n  const has = (name: string) => pluginNames.includes(name)\n\n  if (client === 'fetch' || client === 'axios') {\n    const pluginName = selectorToPlugin[client]\n    if (!has(pluginName)) {\n      return {\n        kind: 'error',\n        message: `\\`client: '${client}'\\` is set but \\`@kubb/plugin-${client}\\` is not registered in \\`plugins\\`. Add it, or drop \\`client\\` to use a different client plugin.`,\n      }\n    }\n    return { kind: 'contract', pluginName }\n  }\n\n  // `client` unset: auto-detect a lone registered contract client plugin.\n  const registered = contractPlugins.filter(has)\n  if (registered.length === 1) {\n    return { kind: 'contract', pluginName: registered[0]! }\n  }\n  if (registered.length > 1) {\n    return {\n      kind: 'error',\n      message: `Multiple client plugins are registered (${registered.map((name) => `\\`@kubb/${name}\\``).join(', ')}). Set \\`client: 'fetch' | 'axios'\\` to choose which client the hooks call, or register a single client plugin.`,\n    }\n  }\n\n  return {\n    kind: 'error',\n    message: 'No client plugin is registered. Add `@kubb/plugin-axios` or `@kubb/plugin-fetch` to `plugins` so the generated code has an HTTP client to call.',\n  }\n}\n\n/**\n * Resolves the contract client during a consumer plugin's setup hook. Extracts the plugin names\n * from the raw `plugins` config, applies {@link resolveClient}, and throws the diagnostic on a\n * misconfiguration so every consumer fails fast with the same message.\n */\nexport function resolveContractClient(options: { client: ClientSelector | undefined; plugins?: ReadonlyArray<unknown> }): ResolvedContractClient {\n  const { client, plugins = [] } = options\n  const pluginNames = plugins.map((plugin) => (plugin as { name?: string }).name).filter((name): name is string => Boolean(name))\n  const resolved = resolveClient({ client, pluginNames })\n  if (resolved.kind === 'error') {\n    throw new Error(resolved.message)\n  }\n  return resolved\n}\n","import path from 'node:path'\nimport { operationFileEntry } from '@internals/shared'\nimport type { ast, Group, NodeCache, Output, Resolver } from 'kubb/kit'\n\n/**\n * The resolved contract `<op>` for one operation: the generated function name, the file it lives in,\n * and the contract runtime's `.kubb/client.ts` path (where `RequestConfig` / `ResponseErrorConfig`\n * come from).\n */\nexport type ClientOperation = { name: string; path: string; clientPath: string }\n\n/**\n * Resolves the contract client `<op>` a consumer (query hook, MCP handler) imports, by looking up\n * the registered contract client plugin's resolver and output. Works for any contract client plugin\n * (plugin-fetch or plugin-axios). Returns `null` when no contract plugin is in play (the inline\n * path). The plugin injects `.kubb/client.ts` at the global output root, the same path consumers\n * read `RequestConfig` / `ResponseErrorConfig` from.\n *\n * The result is cached in the current node's `cache` (`ctx.cache`) under the client plugin's name,\n * so several dependents reading the same client plugin for one operation in a single pass\n * (react-query's query/mutation/infinite generators, vue-query, swr, the MCP handler, ...) share\n * one computed result instead of each re-deriving the name and path.\n */\nexport function resolveClientOperation(options: {\n  clientPlugin: { pluginName: string } | null\n  driver: {\n    getPlugin: (name: string) => { options?: { output?: Output; group?: Group | null } } | undefined\n    getResolver: (name: string) => Resolver\n  }\n  node: ast.OperationNode\n  root: string\n  output: Output\n  cache: NodeCache\n}): ClientOperation | null {\n  const { clientPlugin, driver, node, root, output, cache } = options\n  if (!clientPlugin) return null\n\n  return cache.ensureItem(`${clientPlugin.pluginName}:clientOperation`, () => {\n    const resolver = driver.getResolver(clientPlugin.pluginName)\n    const plugin = driver.getPlugin(clientPlugin.pluginName)\n    const file = resolver.file({\n      ...operationFileEntry(node, node.operationId),\n      root,\n      output: plugin?.options?.output ?? output,\n      group: plugin?.options?.group ?? undefined,\n    })\n\n    return { name: resolver.name(node.operationId), path: file.path, clientPath: path.resolve(root, '.kubb/client.ts') }\n  })\n}\n","import { buildClientCall } from '@internals/tanstack-query'\nimport type { ast } from 'kubb/kit'\n\nexport { maybeRefOrGetter } from '@internals/tanstack-query'\nexport { buildClientOptionType, buildOperationComments as getComments, buildRequestConfigType } from '@internals/shared'\n\n/**\n * Builds the call to a contract client `<op>` function inside a vue-query composable body. The\n * function takes a single grouped options object, so `config` is spread first, then the operation's\n * request groups are unwrapped with `toValue()`, then the abort `signal` for queries, with\n * `throwOnError: true` pinned last so a caller's config can't flip the query's error semantics.\n * Mutations omit the `signal`.\n */\nexport function buildVueClientCall(node: ast.OperationNode, options: { clientName: string; signal?: boolean }): string {\n  return buildClientCall(node, { ...options, unwrapName: (name) => `toValue(${name})` })\n}\n","import type { ast } from 'kubb/kit'\nimport type { FunctionParametersNode, ResolverTs } from '@kubb/plugin-ts'\nimport { createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function, Type } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport { buildGroupedRequestParam, queryKeyTransformer } from '@internals/tanstack-query'\nimport type { Transformer } from '../types.ts'\nimport { maybeRefOrGetter } from '../utils.ts'\n\ntype Props = {\n  name: string\n  typeName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n  transformer: Transformer | null | undefined\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\n\nexport function buildQueryKeyParamsNode(node: ast.OperationNode, options: { resolver: ResolverTs }): FunctionParametersNode {\n  const groupedParam = buildGroupedRequestParam(node, { resolver: options.resolver, keys: ['path', 'query', 'body'], memberTypeWrapper: maybeRefOrGetter })\n\n  return createFunctionParameters({ params: groupedParam ? [groupedParam] : [] })\n}\n\nexport function QueryKey({ name, node, tsResolver, typeName, transformer }: Props): KubbReactNode {\n  const paramsNode = buildQueryKeyParamsNode(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n  const keys = (transformer ?? queryKeyTransformer)({\n    node,\n    casing: 'camelcase',\n  })\n\n  return (\n    <>\n      <File.Source name={name} isExportable isIndexable>\n        <Function.Arrow name={name} export params={paramsSignature} singleLine>\n          {`[${keys.join(', ')}] as const`}\n        </Function.Arrow>\n      </File.Source>\n      <File.Source name={typeName} isExportable isIndexable isTypeOnly>\n        <Type name={typeName} export>\n          {`ReturnType<typeof ${name}>`}\n        </Type>\n      </File.Source>\n    </>\n  )\n}\n","import type { ast } from 'kubb/kit'\nimport type { FunctionParametersNode, ResolverTs } from '@kubb/plugin-ts'\nimport { functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport { buildQueryOptionsParams, buildResponseTypes } from '@internals/tanstack-query'\nimport { buildVueClientCall, maybeRefOrGetter } from '../utils.ts'\nimport { buildQueryKeyParamsNode } from './QueryKey.tsx'\n\ntype Props = {\n  name: string\n  clientName: string\n  queryKeyName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\nconst callPrinter = functionPrinter({ mode: 'call' })\n\nexport function getQueryOptionsParams(node: ast.OperationNode, options: { resolver: ResolverTs }): FunctionParametersNode {\n  return buildQueryOptionsParams(node, { resolver: options.resolver, memberTypeWrapper: maybeRefOrGetter })\n}\n\nexport function QueryOptions({ name, clientName, node, tsResolver, queryKeyName }: Props): KubbReactNode {\n  const { TData, TError } = buildResponseTypes(node, tsResolver)\n\n  const queryKeyParamsNode = buildQueryKeyParamsNode(node, { resolver: tsResolver })\n  const queryKeyParamsCall = callPrinter.print(queryKeyParamsNode) ?? ''\n\n  const paramsNode = getQueryOptionsParams(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n  const queryFnBody = `const { data } = await ${buildVueClientCall(node, { clientName, signal: true })}\n          return data`\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function name={name} export params={paramsSignature}>\n        {`\n      const queryKey = ${queryKeyName}(${queryKeyParamsCall})\n      return queryOptions<${TData}, ${TError}, ${TData}>({\n       queryKey,\n       queryFn: async ({ signal }) => {\n          ${queryFnBody}\n       },\n      })\n`}\n      </Function>\n    </File.Source>\n  )\n}\n","import type { ast } from 'kubb/kit'\nimport type { FunctionParameterNode, FunctionParametersNode, ResolverTs } from '@kubb/plugin-ts'\nimport { createFunctionParameter, createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport type { Infinite } from '../types.ts'\nimport { buildGroupedRequestParam, buildResponseTypes } from '@internals/tanstack-query'\nimport { buildClientOptionType, getComments, maybeRefOrGetter } from '../utils.ts'\nimport { buildQueryKeyParamsNode } from './QueryKey.tsx'\nimport { getQueryOptionsParams } from './QueryOptions.tsx'\n\ntype Props = {\n  name: string\n  queryOptionsName: string\n  queryKeyName: string\n  queryKeyTypeName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n  initialPageParam: Infinite['initialPageParam']\n  queryParam?: Infinite['queryParam']\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\nconst callPrinter = functionPrinter({ mode: 'call' })\n\nfunction buildInfiniteQueryParamsNode(\n  node: ast.OperationNode,\n  options: {\n    resolver: ResolverTs\n  },\n): FunctionParametersNode {\n  const { resolver } = options\n  const { TData, TError } = buildResponseTypes(node, resolver)\n\n  const optionsParam = createFunctionParameter({\n    name: 'options',\n    type: `{\n  query?: Partial<UseInfiniteQueryOptions<${[TData, TError, 'TQueryData', 'TQueryKey', 'TQueryData'].join(', ')}>> & { client?: QueryClient },\n  client?: ${buildClientOptionType()}\n}`,\n    default: '{}',\n  })\n\n  const groupedParam = buildGroupedRequestParam(node, { resolver, memberTypeWrapper: maybeRefOrGetter })\n\n  return createFunctionParameters({ params: [groupedParam, optionsParam].filter((param): param is FunctionParameterNode => param !== null) })\n}\n\nexport function InfiniteQuery({ name, queryKeyTypeName, queryOptionsName, queryKeyName, node, tsResolver }: Props): KubbReactNode {\n  const { TData, TError } = buildResponseTypes(node, tsResolver)\n  const returnType = `UseInfiniteQueryReturnType<${['TData', TError].join(', ')}> & { queryKey: TQueryKey }`\n  const generics = [`TData = InfiniteData<${TData}>`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`]\n\n  const queryKeyParamsNode = buildQueryKeyParamsNode(node, { resolver: tsResolver })\n  const queryKeyParamsCall = callPrinter.print(queryKeyParamsNode) ?? ''\n\n  const queryOptionsParamsNode = getQueryOptionsParams(node, { resolver: tsResolver })\n  const queryOptionsParamsCall = callPrinter.print(queryOptionsParamsNode) ?? ''\n\n  const paramsNode = buildInfiniteQueryParamsNode(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function name={name} export generics={generics.join(', ')} params={paramsSignature} JSDoc={{ comments: getComments(node) }}>\n        {`\n       const { query: queryConfig = {}, client: config = {} } = options ?? {}\n       const { client: queryClient, ...resolvedOptions } = queryConfig\n       const queryKey = (resolvedOptions && 'queryKey' in resolvedOptions ? toValue(resolvedOptions.queryKey) : undefined) ?? ${queryKeyName}(${queryKeyParamsCall})\n\n       const queryResult = useInfiniteQuery({\n        ...${queryOptionsName}(${queryOptionsParamsCall}),\n        ...resolvedOptions,\n        queryKey\n       } as unknown as UseInfiniteQueryOptions<${TData}, ${TError}, ${TData}, TQueryKey, ${TData}>, toValue(queryClient)) as ${returnType}\n\n       queryResult.queryKey = queryKey as TQueryKey\n\n       return queryResult\n       `}\n      </Function>\n    </File.Source>\n  )\n}\n","import { InfiniteQueryOptions as BaseInfiniteQueryOptions } from '@internals/tanstack-query'\nimport type { ast } from 'kubb/kit'\nimport type { ResolverTs } from '@kubb/plugin-ts'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport type { Infinite } from '../types.ts'\nimport { maybeRefOrGetter } from '../utils.ts'\n\ntype Props = {\n  name: string\n  clientName: string\n  queryKeyName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n  initialPageParam: Infinite['initialPageParam']\n  cursorParam: Infinite['cursorParam']\n  nextParam: Infinite['nextParam']\n  previousParam: Infinite['previousParam']\n  queryParam: Infinite['queryParam']\n}\n\n/**\n * The vue-query flavor of the shared `infiniteQueryOptions` component: request groups accept\n * `MaybeRefOrGetter` values, are unwrapped with `toValue(...)` in the client call, and the emitted\n * `TQueryKey` generic is the imported `QueryKey` type instead of `typeof queryKey`.\n */\nexport function InfiniteQueryOptions(props: Props): KubbReactNode {\n  return <BaseInfiniteQueryOptions {...props} queryKeyType=\"QueryKey\" memberTypeWrapper={maybeRefOrGetter} unwrapName={(name) => `toValue(${name})`} />\n}\n","import type { ast } from 'kubb/kit'\nimport type { FunctionParametersNode, ResolverTs } from '@kubb/plugin-ts'\nimport { createFunctionParameter, createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport { buildGroupedRequestParam, buildResponseTypes } from '@internals/tanstack-query'\nimport { buildRequestConfigType, buildVueClientCall, getComments } from '../utils.ts'\n\ntype Props = {\n  name: string\n  typeName: string\n  clientName: string\n  mutationKeyName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\nconst callPrinter = functionPrinter({ mode: 'call' })\n\nfunction resolveMutationRequestType(node: ast.OperationNode, resolver: ResolverTs): string {\n  const groupedParam = buildGroupedRequestParam(node, { resolver })\n  return groupedParam ? resolver.response.options(node) : 'undefined'\n}\n\nfunction buildMutationParamsNode(\n  node: ast.OperationNode,\n  options: {\n    resolver: ResolverTs\n  },\n): FunctionParametersNode {\n  const { resolver } = options\n  const { TData, TError } = buildResponseTypes(node, resolver)\n\n  const TRequest = resolveMutationRequestType(node, resolver)\n\n  return createFunctionParameters({\n    params: [\n      createFunctionParameter({\n        name: 'options',\n        type: `{\n  mutation?: MutationObserverOptions<${[TData, TError, TRequest, 'TContext'].join(', ')}> & { client?: QueryClient },\n  client?: ${buildRequestConfigType(node)},\n}`,\n        default: '{}',\n      }),\n    ],\n  })\n}\n\nexport function Mutation({ name, clientName, node, tsResolver, mutationKeyName }: Props): KubbReactNode {\n  const { TData, TError } = buildResponseTypes(node, tsResolver)\n\n  const groupedParam = buildGroupedRequestParam(node, { resolver: tsResolver })\n  const hasMutationParams = groupedParam !== null\n  const groupedParamsNode = createFunctionParameters({ params: groupedParam ? [groupedParam] : [] })\n  const argBindingStr = hasMutationParams ? (callPrinter.print(groupedParamsNode) ?? '') : ''\n  const mutationFnBody = `const { data } = await ${buildVueClientCall(node, { clientName, signal: false })}\n            return data`\n\n  const TRequest = resolveMutationRequestType(node, tsResolver)\n  const generics = [TData, TError, TRequest, 'TContext'].join(', ')\n\n  const paramsNode = buildMutationParamsNode(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function name={name} export params={paramsSignature} JSDoc={{ comments: getComments(node) }} generics={['TContext']}>\n        {`\n        const { mutation = {}, client: config = {} } = options ?? {}\n        const { client: queryClient, ...mutationOptions } = mutation;\n        const mutationKey = mutationOptions?.mutationKey ?? ${mutationKeyName}()\n\n        return useMutation<${generics}>({\n          mutationFn: async(${argBindingStr}) => {\n            ${mutationFnBody}\n          },\n          mutationKey,\n          ...mutationOptions\n        }, queryClient)\n    `}\n      </Function>\n    </File.Source>\n  )\n}\n","import type { ast } from 'kubb/kit'\nimport type { FunctionParameterNode, FunctionParametersNode, ResolverTs } from '@kubb/plugin-ts'\nimport { createFunctionParameter, createFunctionParameters, functionPrinter } from '@kubb/plugin-ts'\nimport { File, Function } from 'kubb/jsx'\nimport type { KubbReactNode } from 'kubb/jsx'\nimport { buildGroupedRequestParam, buildResponseTypes } from '@internals/tanstack-query'\nimport { buildClientOptionType, getComments, maybeRefOrGetter } from '../utils.ts'\nimport { buildQueryKeyParamsNode } from './QueryKey.tsx'\nimport { getQueryOptionsParams } from './QueryOptions.tsx'\n\ntype Props = {\n  name: string\n  queryOptionsName: string\n  queryKeyName: string\n  queryKeyTypeName: string\n  node: ast.OperationNode\n  tsResolver: ResolverTs\n}\n\nconst declarationPrinter = functionPrinter({ mode: 'declaration' })\nconst callPrinter = functionPrinter({ mode: 'call' })\n\nfunction buildQueryParamsNode(\n  node: ast.OperationNode,\n  options: {\n    resolver: ResolverTs\n  },\n): FunctionParametersNode {\n  const { resolver } = options\n  const { TData, TError } = buildResponseTypes(node, resolver)\n\n  const optionsParam = createFunctionParameter({\n    name: 'options',\n    type: `{\n  query?: Partial<UseQueryOptions<${[TData, TError, 'TData', 'TQueryData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },\n  client?: ${buildClientOptionType()}\n}`,\n    default: '{}',\n  })\n\n  // Vue-query wraps each grouped operation param with MaybeRefOrGetter\n  const groupedParam = buildGroupedRequestParam(node, { resolver, memberTypeWrapper: maybeRefOrGetter })\n\n  return createFunctionParameters({ params: [groupedParam, optionsParam].filter((param): param is FunctionParameterNode => param !== null) })\n}\n\nexport function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, node, tsResolver }: Props): KubbReactNode {\n  const { TData, TError } = buildResponseTypes(node, tsResolver)\n  const returnType = `UseQueryReturnType<${['TData', TError].join(', ')}> & { queryKey: TQueryKey }`\n  const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`]\n\n  const queryKeyParamsNode = buildQueryKeyParamsNode(node, { resolver: tsResolver })\n  const queryKeyParamsCall = callPrinter.print(queryKeyParamsNode) ?? ''\n\n  const queryOptionsParamsNode = getQueryOptionsParams(node, { resolver: tsResolver })\n  const queryOptionsParamsCall = callPrinter.print(queryOptionsParamsNode) ?? ''\n\n  const paramsNode = buildQueryParamsNode(node, { resolver: tsResolver })\n  const paramsSignature = declarationPrinter.print(paramsNode) ?? ''\n\n  return (\n    <File.Source name={name} isExportable isIndexable>\n      <Function name={name} export generics={generics.join(', ')} params={paramsSignature} JSDoc={{ comments: getComments(node) }}>\n        {`\n       const { query: queryConfig = {}, client: config = {} } = options ?? {}\n       const { client: queryClient, ...resolvedOptions } = queryConfig\n       const queryKey = (resolvedOptions && 'queryKey' in resolvedOptions ? toValue(resolvedOptions.queryKey) : undefined) ?? ${queryKeyName}(${queryKeyParamsCall})\n\n       const queryResult = useQuery({\n        ...${queryOptionsName}(${queryOptionsParamsCall}),\n        ...resolvedOptions,\n        queryKey\n       } as unknown as UseQueryOptions<${TData}, ${TError}, TData, ${TData}, TQueryKey>, toValue(queryClient)) as ${returnType}\n\n       queryResult.queryKey = queryKey as TQueryKey\n\n       return queryResult\n       `}\n      </Function>\n    </File.Source>\n  )\n}\n","import { getOperationParameters, operationFileEntry, resolveDependencyOperationFile, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveClientOperation } from '@internals/client'\nimport { classifyOperation, resolvePageParamType } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from 'kubb/kit'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, jsxRenderer } from 'kubb/jsx'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useInfiniteQuery` composables. Enabled when\n * `pluginVueQuery({ infinite: { ... }, hooks: true })`. Emits one\n * `useFooInfiniteQuery` composable per query operation, wiring the\n * configured cursor path into TanStack Query's cursor-based pagination.\n */\nexport const infiniteQueryGenerator = defineGenerator<PluginVueQuery>({\n  name: 'vue-query-infinite',\n  renderer: jsxRenderer,\n  operation(node, ctx) {\n    if (!ast.isHttpOperationNode(node)) return null\n    const { config, driver, resolver, root } = ctx\n    const { output, query, mutation, infinite, client, group, hooks } = ctx.options\n\n    const pluginTs = driver.getPlugin(pluginTsName)\n    if (!pluginTs) return null\n    const tsResolver = driver.getResolver(pluginTsName)\n\n    const { isQuery, isMutation } = classifyOperation(node, { query, mutation })\n    const infiniteOptions = infinite && typeof infinite === 'object' ? infinite : null\n\n    if (!isQuery || isMutation || !infiniteOptions || !hooks) return null\n\n    // Validate queryParam exists in operation's query parameters\n    const normalizeKey = (key: string) => key.replace(/\\?$/, '')\n    const queryParamKeys = getOperationParameters(node).query.map((p) => p.name)\n    const hasQueryParam = infiniteOptions.queryParam ? queryParamKeys.some((k) => normalizeKey(k) === infiniteOptions.queryParam) : false\n    // cursorParam validation against response schema keys is skipped in v5 (complex schema inspection)\n    if (!hasQueryParam) return null\n\n    const importPath = query ? query.importPath : '@tanstack/vue-query'\n\n    // The registered contract client plugin owns the `<op>` the composable imports and calls.\n    const contractOp = resolveClientOperation({ clientPlugin: { pluginName: client.pluginName }, driver, node, root, output, cache: ctx.cache })\n    if (!contractOp) return null\n\n    const queryName = resolver.infiniteQuery.name(node)\n    const queryOptionsName = resolver.infiniteQuery.optionsName(node)\n    const queryKeyName = resolver.infiniteQuery.keyName(node)\n    const queryKeyTypeName = resolver.infiniteQuery.keyTypeName(node)\n\n    const meta = {\n      file: resolver.file({ ...operationFileEntry(node, queryName), root, output, group: group ?? undefined }),\n      fileTs: resolveDependencyOperationFile({\n        cache: ctx.cache,\n        node,\n        resolver: tsResolver,\n        root,\n        output: pluginTs.options?.output ?? output,\n        group: pluginTs.options?.group,\n      }),\n    }\n\n    const { queryParamsTypeName } = resolvePageParamType(node, {\n      resolver: tsResolver,\n      initialPageParam: infiniteOptions.initialPageParam,\n      queryParam: infiniteOptions.queryParam,\n    })\n\n    const importedTypeNames = [\n      tsResolver.response.options(node),\n      queryParamsTypeName,\n      ...resolveOperationTypeNames(node, tsResolver, {\n        exclude: [queryKeyTypeName],\n        order: 'body-response-first',\n        includeParams: false,\n      }),\n    ].filter((name): name is string => Boolean(name))\n\n    const calledClientName = contractOp.name\n\n    return (\n      <File\n        baseName={meta.file.baseName}\n        path={meta.file.path}\n        meta={meta.file.meta}\n        banner={resolver.default.banner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n        footer={resolver.default.footer(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n      >\n        <File.Import name={[contractOp.name]} root={meta.file.path} path={contractOp.path} />\n        <File.Import name={['RequestConfig', 'ResponseErrorConfig']} root={meta.file.path} path={contractOp.clientPath} isTypeOnly />\n\n        <File.Import name={['toValue']} path=\"vue\" />\n        <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n\n        {meta.fileTs && importedTypeNames.length > 0 && (\n          <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n        )}\n\n        <QueryKey name={queryKeyName} typeName={queryKeyTypeName} node={node} tsResolver={tsResolver} transformer={ctx.options.queryKey} />\n\n        <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n        <File.Import name={['infiniteQueryOptions']} path={importPath} />\n\n        <InfiniteQueryOptions\n          name={queryOptionsName}\n          clientName={calledClientName}\n          queryKeyName={queryKeyName}\n          node={node}\n          tsResolver={tsResolver}\n          cursorParam={infiniteOptions.cursorParam}\n          nextParam={infiniteOptions.nextParam}\n          previousParam={infiniteOptions.previousParam}\n          initialPageParam={infiniteOptions.initialPageParam}\n          queryParam={infiniteOptions.queryParam}\n        />\n\n        <File.Import name={['useInfiniteQuery']} path={importPath} />\n        <File.Import name={['QueryKey', 'QueryClient', 'UseInfiniteQueryOptions', 'UseInfiniteQueryReturnType']} path={importPath} isTypeOnly />\n\n        <InfiniteQuery\n          name={queryName}\n          queryOptionsName={queryOptionsName}\n          queryKeyName={queryKeyName}\n          queryKeyTypeName={queryKeyTypeName}\n          node={node}\n          tsResolver={tsResolver}\n          initialPageParam={infiniteOptions.initialPageParam}\n          queryParam={infiniteOptions.queryParam}\n        />\n      </File>\n    )\n  },\n})\n","import { getRequestGroups, operationFileEntry, resolveDependencyOperationFile, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveClientOperation } from '@internals/client'\nimport { classifyOperation } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from 'kubb/kit'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, jsxRenderer } from 'kubb/jsx'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useMutation` composables. Emits one\n * `useFooMutation` composable per POST/PUT/DELETE operation (configurable\n * via `mutation.methods`) plus the matching `fooMutationKey` helper.\n */\nexport const mutationGenerator = defineGenerator<PluginVueQuery>({\n  name: 'vue-query-mutation',\n  renderer: jsxRenderer,\n  operation(node, ctx) {\n    if (!ast.isHttpOperationNode(node)) return null\n    const { config, driver, resolver, root } = ctx\n    const { output, query, mutation, client, group, hooks } = ctx.options\n\n    const pluginTs = driver.getPlugin(pluginTsName)\n    if (!pluginTs) return null\n    const tsResolver = driver.getResolver(pluginTsName)\n\n    const { isMutation } = classifyOperation(node, { query, mutation })\n\n    if (!isMutation) return null\n\n    const importPath = mutation ? mutation.importPath : '@tanstack/vue-query'\n\n    // The registered contract client plugin owns the `<op>` the composable imports and calls.\n    const contractOp = resolveClientOperation({ clientPlugin: { pluginName: client.pluginName }, driver, node, root, output, cache: ctx.cache })\n    if (!contractOp) return null\n\n    const mutationHookName = resolver.mutation.name(node)\n    const mutationTypeName = resolver.mutation.typeName(node)\n    const mutationKeyName = resolver.mutation.keyName(node)\n\n    const meta = {\n      file: resolver.file({ ...operationFileEntry(node, mutationHookName), root, output, group: group ?? undefined }),\n      fileTs: resolveDependencyOperationFile({\n        cache: ctx.cache,\n        node,\n        resolver: tsResolver,\n        root,\n        output: pluginTs.options?.output ?? output,\n        group: pluginTs.options?.group,\n      }),\n    }\n\n    const importedTypeNames = [\n      tsResolver.response.options(node),\n      ...resolveOperationTypeNames(node, tsResolver, { order: 'body-response-first', includeParams: false }),\n    ].filter((name): name is string => Boolean(name))\n\n    const calledClientName = contractOp.name\n\n    // The contract body unwraps each request group with `toValue()`, so it needs the runtime import.\n    const groups = getRequestGroups(node)\n    const hasRequestGroups = groups.path || groups.query || groups.body || groups.headers\n\n    return (\n      <File\n        baseName={meta.file.baseName}\n        path={meta.file.path}\n        meta={meta.file.meta}\n        banner={resolver.default.banner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n        footer={resolver.default.footer(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n      >\n        <File.Import name={[contractOp.name]} root={meta.file.path} path={contractOp.path} />\n        <File.Import name={['RequestConfig', 'ResponseErrorConfig']} root={meta.file.path} path={contractOp.clientPath} isTypeOnly />\n\n        {hasRequestGroups && <File.Import name={['toValue']} path=\"vue\" />}\n        <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n\n        {meta.fileTs && importedTypeNames.length > 0 && (\n          <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n        )}\n\n        <MutationKey name={mutationKeyName} node={node} transformer={ctx.options.mutationKey} />\n\n        {mutation && hooks && (\n          <>\n            <File.Import name={['useMutation']} path={importPath} />\n            <File.Import name={['MutationObserverOptions', 'QueryClient']} path={importPath} isTypeOnly />\n            <Mutation\n              name={mutationHookName}\n              clientName={calledClientName}\n              typeName={mutationTypeName}\n              node={node}\n              tsResolver={tsResolver}\n              mutationKeyName={mutationKeyName}\n            />\n          </>\n        )}\n      </File>\n    )\n  },\n})\n","import { operationFileEntry, resolveDependencyOperationFile, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveClientOperation } from '@internals/client'\nimport { classifyOperation } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from 'kubb/kit'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, jsxRenderer } from 'kubb/jsx'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useQuery` composables. Emits one `useFooQuery`\n * composable per GET operation (configurable via `query.methods`) plus the\n * matching `fooQueryKey` / `fooQueryOptions` helpers.\n */\nexport const queryGenerator = defineGenerator<PluginVueQuery>({\n  name: 'vue-query',\n  renderer: jsxRenderer,\n  operation(node, ctx) {\n    if (!ast.isHttpOperationNode(node)) return null\n    const { config, driver, resolver, root } = ctx\n    const { output, query, mutation, client, group, hooks } = ctx.options\n\n    const pluginTs = driver.getPlugin(pluginTsName)\n    if (!pluginTs) return null\n    const tsResolver = driver.getResolver(pluginTsName)\n\n    const { isQuery, isMutation } = classifyOperation(node, { query, mutation })\n\n    if (!isQuery || isMutation) return null\n\n    const importPath = query ? query.importPath : '@tanstack/vue-query'\n\n    // The registered contract client plugin owns the `<op>` the composable imports and calls.\n    const contractOp = resolveClientOperation({ clientPlugin: { pluginName: client.pluginName }, driver, node, root, output, cache: ctx.cache })\n    if (!contractOp) return null\n\n    const queryName = resolver.query.name(node)\n    const queryOptionsName = resolver.query.optionsName(node)\n    const queryKeyName = resolver.query.keyName(node)\n    const queryKeyTypeName = resolver.query.keyTypeName(node)\n\n    const meta = {\n      file: resolver.file({ ...operationFileEntry(node, queryName), root, output, group: group ?? undefined }),\n      fileTs: resolveDependencyOperationFile({\n        cache: ctx.cache,\n        node,\n        resolver: tsResolver,\n        root,\n        output: pluginTs.options?.output ?? output,\n        group: pluginTs.options?.group,\n      }),\n    }\n\n    const importedTypeNames = [\n      tsResolver.response.options(node),\n      ...resolveOperationTypeNames(node, tsResolver, {\n        exclude: [queryKeyTypeName],\n        order: 'body-response-first',\n        includeParams: false,\n      }),\n    ].filter((name): name is string => Boolean(name))\n\n    const calledClientName = contractOp.name\n\n    return (\n      <File\n        baseName={meta.file.baseName}\n        path={meta.file.path}\n        meta={meta.file.meta}\n        banner={resolver.default.banner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n        footer={resolver.default.footer(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n      >\n        <File.Import name={[contractOp.name]} root={meta.file.path} path={contractOp.path} />\n        <File.Import name={['RequestConfig', 'ResponseErrorConfig']} root={meta.file.path} path={contractOp.clientPath} isTypeOnly />\n\n        <File.Import name={['toValue']} path=\"vue\" />\n        <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n\n        {meta.fileTs && importedTypeNames.length > 0 && (\n          <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n        )}\n\n        <QueryKey name={queryKeyName} typeName={queryKeyTypeName} node={node} tsResolver={tsResolver} transformer={ctx.options.queryKey} />\n\n        <File.Import name={['queryOptions']} path={importPath} />\n\n        <QueryOptions name={queryOptionsName} clientName={calledClientName} queryKeyName={queryKeyName} node={node} tsResolver={tsResolver} />\n\n        {query && hooks && (\n          <>\n            <File.Import name={['useQuery']} path={importPath} />\n            <File.Import name={['QueryKey', 'QueryClient', 'UseQueryOptions', 'UseQueryReturnType']} path={importPath} isTypeOnly />\n            <Query\n              name={queryName}\n              queryOptionsName={queryOptionsName}\n              queryKeyName={queryKeyName}\n              queryKeyTypeName={queryKeyTypeName}\n              node={node}\n              tsResolver={tsResolver}\n            />\n          </>\n        )}\n      </File>\n    )\n  },\n})\n","import { createMutationResolver, createQueryResolver } from '@internals/tanstack-query'\nimport { capitalize } from '@internals/utils'\nimport { createResolver } from 'kubb/kit'\nimport type { PluginVueQuery } from '../types.ts'\n\n/**\n * Default resolver used by `@kubb/plugin-vue-query`. Decides the names and\n * file paths for every generated TanStack Query composable (`useFoo`,\n * `useFooInfinite`) and its companion helpers.\n *\n * The `default` helpers are supplied by `createResolver`. Functions and files use camelCase;\n * composables get the `use` prefix. Operation-specific naming is grouped under the `query`,\n * `infiniteQuery`, and `mutation` namespaces.\n *\n * @example Resolve composable and helper names\n * ```ts\n * import { resolverVueQuery } from '@kubb/plugin-vue-query'\n *\n * resolverVueQuery.query.name(operationNode)        // 'useGetPetById'\n * resolverVueQuery.query.keyName(operationNode)     // 'getPetByIdQueryKey'\n * resolverVueQuery.query.optionsName(operationNode) // 'getPetByIdQueryOptions'\n * ```\n */\nexport const resolverVueQuery = createResolver<PluginVueQuery>({\n  pluginName: 'plugin-vue-query',\n  query: createQueryResolver(),\n  infiniteQuery: createQueryResolver('Infinite'),\n  mutation: {\n    ...createMutationResolver(),\n    typeName(node) {\n      return capitalize(this.name(node.operationId))\n    },\n  },\n})\n","import { createGroupConfig } from '@internals/shared'\nimport { definePlugin, Resolver } from 'kubb/kit'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { mutationKeyTransformer, queryKeyTransformer, resolveInfiniteConfig, resolveMutationConfig, resolveQueryConfig } from '@internals/tanstack-query'\nimport { resolveContractClient } from '@internals/client'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\nimport { resolverVueQuery } from './resolvers/resolverVueQuery.ts'\nimport type { PluginVueQuery, ResolverVueQuery } from './types.ts'\n\n/**\n * Canonical plugin name for `@kubb/plugin-vue-query`. Used for driver lookups\n * and cross-plugin dependency references.\n */\nexport const pluginVueQueryName = 'plugin-vue-query' satisfies PluginVueQuery['name']\n\n/**\n * Generates one TanStack Query composable per OpenAPI operation for Vue's\n * Composition API. Queries become `useFoo` (and optionally\n * `useFooInfinite`). Mutations become `useFoo` as well. Each composable\n * is fully typed end to end.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'kubb/config'\n * import { pluginTs } from '@kubb/plugin-ts'\n * import { pluginVueQuery } from '@kubb/plugin-vue-query'\n *\n * export default defineConfig({\n *   input: './petStore.yaml',\n *   output: { path: './src/gen' },\n *   plugins: [\n *     pluginTs(),\n *     pluginVueQuery({\n *       output: { path: './hooks' },\n *     }),\n *   ],\n * })\n * ```\n */\nexport const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {\n  const {\n    output = { path: 'hooks', barrel: { type: 'named' } },\n    group,\n    exclude = [],\n    include,\n    override = [],\n    infinite = false,\n    mutation = {},\n    query = {},\n    mutationKey = mutationKeyTransformer,\n    queryKey = queryKeyTransformer,\n    hooks = false,\n    client,\n    resolver: userResolver,\n    macros: userMacros,\n  } = options\n\n  const selectedGenerators = [queryGenerator, infiniteQueryGenerator, mutationGenerator]\n\n  const groupConfig = createGroupConfig(group)\n\n  return {\n    name: pluginVueQueryName,\n    options,\n    dependencies: [pluginTsName],\n    hooks: {\n      'kubb:plugin:setup'(ctx) {\n        const resolver = userResolver ? Resolver.merge<ResolverVueQuery>(resolverVueQuery, userResolver) : resolverVueQuery\n\n        ctx.setOptions({\n          output,\n          client: resolveContractClient({ client, plugins: ctx.config.plugins }),\n          queryKey,\n          query: resolveQueryConfig(query, { importPath: '@tanstack/vue-query' }),\n          mutationKey,\n          mutation: resolveMutationConfig(mutation, { importPath: '@tanstack/vue-query' }),\n          infinite: resolveInfiniteConfig(infinite),\n          hooks,\n          group: groupConfig,\n          exclude,\n          include,\n          override,\n          resolver,\n        })\n        ctx.setResolver(resolver)\n        if (userMacros?.length) {\n          ctx.setMacros(userMacros)\n        }\n\n        ctx.addGenerator(...selectedGenerators)\n      },\n    },\n  }\n})\n\nexport default pluginVueQuery\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAgB,aAAa,QAA4D;CACvF,MAAM,uBAAO,IAAI,IAAY;CAE7B,OAAO,OAAO,QAAQ,UAAU;EAC9B,IAAI,KAAK,IAAI,MAAM,IAAI,GAAG,OAAO;EACjC,KAAK,IAAI,MAAM,IAAI;EACnB,OAAO;CACT,CAAC;AACH;;;;;;;;;;;;;;ACJA,SAAgB,mBAAmB,MAAyB,MAAc,UAAyC,OAA2B;CAC5I,OAAO;EACL;EACA;EACA,KAAK,KAAK,KAAK,MAAM;EACrB,MAAM,KAAK;CACb;AACF;;;;;;;;;;;;AAaA,SAAgB,+BAA+B,SAO9B;CACf,MAAM,EAAE,OAAO,MAAM,UAAU,MAAM,QAAQ,UAAU;CAEvD,OAAO,MAAM,WAAW,GAAG,SAAS,WAAW,uBAC7C,SAAS,KAAK;EAAE,GAAG,mBAAmB,MAAM,KAAK,WAAW;EAAG;EAAM;EAAQ,OAAO,SAAS,KAAA;CAAU,CAAC,CAC1G;AACF;AAsHA,SAAS,iBAAiB,MAAyB,MAA2C;CAC5F,IAAI,CAAC,MACH,OAAO;CAGT,IAAI,OAAO,SAAS,YAClB,OAAO,KAAK,IAAI,KAAK;CAGvB,OAAO,KAAK,OAAO,UAAUA,SAAAA,IAAI,OAAO,KAAK,IAAI,EAAE,KAAK;AAC1D;;;;;AAMA,SAAS,qBAAqB,cAAyC;CACr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