@kubb/plugin-client 5.0.0-alpha.11 → 5.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,12 @@ function toCamelOrPascal(text, pascal) {
22
22
  * Splits `text` on `.` and applies `transformPart` to each segment.
23
23
  * The last segment receives `isLast = true`, all earlier segments receive `false`.
24
24
  * Segments are joined with `/` to form a file path.
25
+ *
26
+ * Only splits on dots followed by a letter so that version numbers
27
+ * embedded in operationIds (e.g. `v2025.0`) are kept intact.
25
28
  */
26
29
  function applyToFileParts(text, transformPart) {
27
- const parts = text.split(".");
30
+ const parts = text.split(/\.(?=[a-zA-Z])/);
28
31
  return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
29
32
  }
30
33
  /**
@@ -674,4 +677,4 @@ Object.defineProperty(exports, "pascalCase", {
674
677
  }
675
678
  });
676
679
 
677
- //# sourceMappingURL=StaticClassClient-By-aMAe4.cjs.map
680
+ //# sourceMappingURL=StaticClassClient-Azx6Ze4P.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticClassClient-Azx6Ze4P.cjs","names":["#options","#transformParam","#eachParam","getParams","FunctionParams","File","Function","Const","FunctionParams","File","Function","buildHeaders","buildGenerics","buildClientParams","FunctionParams","buildRequestDataLine","buildFormDataLine","buildReturnStatement","generateMethod","File","File","Const","FunctionParams","File"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/jsdoc.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../src/components/Url.tsx","../src/components/Client.tsx","../src/components/ClassClient.tsx","../src/components/Operations.tsx","../src/components/StaticClassClient.tsx"],"sourcesContent":["type Options = {\n /** When `true`, dot-separated segments are split on `.` and joined with `/` after casing. */\n isFile?: boolean\n /** Text prepended before casing is applied. */\n prefix?: string\n /** Text appended before casing is applied. */\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 const normalized = 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\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n *\n * Only splits on dots followed by a letter so that version numbers\n * embedded in operationIds (e.g. `v2025.0`) are kept intact.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split(/\\.(?=[a-zA-Z])/)\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): 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\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Builds a JSDoc comment block from an array of lines.\n * Returns `fallback` when `comments` is empty so callers always get a usable string.\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /** String to use for indenting each line. Defaults to `' * '`. */\n indent?: string\n /** String appended after the closing tag. Defaults to `'\\n '`. */\n suffix?: string\n /** Returned as-is when `comments` is empty. Defaults to `' '`. */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) return fallback\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = new Set([\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n] as const)\n\n/**\n * Prefixes a word with `_` when it is a reserved JavaScript/Java identifier\n * or starts with a digit.\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.has(word as 'valueOf') || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /** The resolved URL string (Express-style or template literal, depending on context). */\n url: string\n /** Extracted path parameters as a key-value map, or `undefined` when the path has none. */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /** Controls whether the `url` is rendered as an Express path or a template literal. Defaults to `'path'`. */\n type?: 'path' | 'template'\n /** Optional transform applied to each extracted parameter name. */\n replacer?: (pathParam: string) => string\n /** When `true`, the result is serialized to a string expression instead of a plain object. */\n stringify?: boolean\n}\n\n/** Supported identifier casing strategies for path parameters. */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /** Casing strategy applied to path parameter names. Defaults to the original identifier. */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters. */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n\n baseURL: string | undefined\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n operation: Operation\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n },\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({\n name,\n isExportable = true,\n isIndexable = true,\n typeSchemas,\n baseURL,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n // Generate pathParams mapping when paramsCasing is used\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && <br />}\n <Const name={'res'}>{`{ method: '${operation.method.toUpperCase()}', url: ${path.toTemplateString({ prefix: baseURL })} as const }`}</Const>\n <br />\n return res\n </Function>\n </File.Source>\n )\n}\n\nUrl.getParams = getParams\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Url } from './Url.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n urlName?: string\n isExportable?: boolean\n isIndexable?: boolean\n isConfigurable?: boolean\n returnType?: string\n\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n operation: Operation\n children?: FabricReactNode\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n isConfigurable: boolean\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n const children = {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n }\n\n // Check if all children are optional or undefined\n const allChildrenAreOptional = Object.values(children).every((child) => !child || child.optional)\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children,\n default: allChildrenAreOptional ? '{}' : undefined,\n },\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n}\n\nexport function Client({\n name,\n isExportable = true,\n isIndexable = true,\n returnType,\n typeSchemas,\n baseURL,\n dataReturnType,\n parser,\n zodSchemas,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n urlName,\n children,\n isConfigurable = true,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n\n // Generate parameter mappings when paramsCasing is used\n // Apply to pathParams, queryParams and headerParams\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n const queryParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.queryParams, { casing: paramsCasing }) : undefined\n const headerParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.headerParams, { casing: paramsCasing }) : undefined\n\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? (headerParamsMapping ? '...mappedHeaders' : '...headers') : undefined,\n ].filter(Boolean)\n\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n isConfigurable,\n })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n const clientParams = FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: urlName ? `${urlName}(${urlParams.toCall()}).url.toString()` : path.template,\n },\n baseURL:\n baseURL && !urlName\n ? {\n value: `\\`${baseURL}\\``,\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? (queryParamsMapping ? { value: 'mappedParams' } : {}) : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n requestConfig: isConfigurable\n ? {\n mode: 'inlineSpread',\n }\n : undefined,\n headers: headers.length\n ? {\n value: isConfigurable ? `{ ${headers.join(', ')}, ...requestConfig.headers }` : `{ ${headers.join(', ')} }`,\n }\n : undefined,\n },\n },\n })\n\n const childrenElement = children ? (\n children\n ) : (\n <>\n {dataReturnType === 'full' && parser === 'zod' && zodSchemas && `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`}\n {dataReturnType === 'data' && parser === 'zod' && zodSchemas && `return ${zodSchemas.response.name}.parse(res.data)`}\n {dataReturnType === 'full' && parser === 'client' && 'return res'}\n {dataReturnType === 'data' && parser === 'client' && 'return res.data'}\n </>\n )\n\n return (\n <>\n <br />\n\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function\n name={name}\n async\n export={isExportable}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n returnType={returnType}\n >\n {isConfigurable ? 'const { client: request = fetch, ...requestConfig } = config' : ''}\n <br />\n <br />\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && (\n <>\n <br />\n <br />\n </>\n )}\n {queryParamsMapping && typeSchemas.queryParams?.name && (\n <>\n {`const mappedParams = params ? { ${Object.entries(queryParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": params.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {headerParamsMapping && typeSchemas.headerParams?.name && (\n <>\n {`const mappedHeaders = headers ? { ${Object.entries(headerParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": headers.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {parser === 'zod' && zodSchemas?.request?.name\n ? `const requestData = ${zodSchemas.request.name}.parse(data)`\n : typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {isFormData && typeSchemas?.request?.name && 'const formData = buildFormData(requestData)'}\n <br />\n {isConfigurable\n ? `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`\n : `const res = await fetch<${generics.join(', ')}>(${clientParams.toCall()})`}\n <br />\n {childrenElement}\n </Function>\n </File.Source>\n </>\n )\n}\n\nClient.getParams = getParams\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\nimport { Client } from './Client.tsx'\n\ntype Props = {\n /**\n * Name of the class\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = ClassClient.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n return `${jsdoc}async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function ClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\n #config: Partial<RequestConfig> & { client?: Client }\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n this.#config = config\n }\n\n${methods.join('\\n\\n')}\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nClassClient.getParams = Client.getParams\n","import { URLPath } from '@internals/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps): FabricReactNode {\n const operationsObject: Record<string, { path: string; method: HttpMethod }> = {}\n\n operations.forEach((operation) => {\n operationsObject[operation.getOperationId()] = {\n path: new URLPath(operation.path).URL,\n method: operation.method,\n }\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={name} export>\n {JSON.stringify(operationsObject, undefined, 2)}\n </Const>\n </File.Source>\n )\n}\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Client } from './Client.tsx'\n\ntype Props = {\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = Client.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n // Indent static method by 2 spaces, body by 4 spaces (matching snapshot)\n return `${jsdoc} static async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function StaticClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\\n static #config: Partial<RequestConfig> & { client?: Client } = {}\\n\\n${methods.join('\\n\\n')}\\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nStaticClassClient.getParams = Client.getParams\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB,KAChB,MAAM,CACN,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ,gBAAgB,QAAQ,CAEV,MAAM,gBAAgB,CAAC,OAAO,QAAQ,CAG5D,KAAK,MAAM,MAAM;AAEhB,MADiB,KAAK,SAAS,KAAK,SAAS,KAAK,aAAa,CACjD,QAAO;AACrB,MAAI,MAAM,KAAK,CAAC,OAAQ,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;AAC3E,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;GACnD,CACD,KAAK,GAAG,CACR,QAAQ,iBAAiB,GAAG;;;;;;;;;;AAWjC,SAAS,iBAAiB,MAAc,eAAkE;CACxG,MAAM,QAAQ,KAAK,MAAM,iBAAiB;AAC1C,QAAO,MAAM,KAAK,MAAM,MAAM,cAAc,MAAM,MAAM,MAAM,SA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A,aAAuB,UAAU,CAAC;CAEhD,MAAM,kBAAkB,qBAAqB;EAAE;EAAQ;EAAY;EAAa,CAAC;CACjF,MAAM,eAAe,kBAAkB,YAAY,CAAC,CAAC,aAAa,SAAS,KAAK;CAChF,MAAM,kBAAkB,qBAAqB;EAAE;EAAgB;EAAQ;EAAY,CAAC;CAEpF,MAAM,aAAa;EACjB;EACA;EACA;EACA;EACA,6BAA6B,SAAS,KAAK,KAAK,CAAC,IAAI,aAAa,QAAQ,CAAC;EAC3E;EACD,CACE,OAAO,QAAQ,CACf,KAAK,SAAS,OAAO,OAAO,CAC5B,KAAK,KAAK;AAGb,QAAO,GAAG,MAAM,iBAAiB,KAAK,GAAG,OAAO,eAAe,CAAC,OAAO,WAAW;;AAGpF,SAAgB,kBAAkB,EAChC,MACA,eAAe,MACf,cAAc,MACd,YACA,SACA,gBACA,QACA,YACA,cACA,gBACA,YACyB;CAgBzB,MAAM,YAAY,gBAAgB,KAAK,6EAfvB,WAAW,KAAK,EAAE,WAAW,MAAM,YAAY,aAAa,iBAC1E,eAAe;EACb;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,CACH,CAE2H,KAAK,OAAO,CAAC;AAEzI,QACE,iBAAA,GAAA,+BAAA,MAACC,mBAAAA,KAAK,QAAN;EAAmB;EAAoB;EAA2B;YAAlE,CACG,WACA,SACW;;;AAGlB,kBAAkB,YAAY,OAAO"}
@@ -22,9 +22,12 @@ function toCamelOrPascal(text, pascal) {
22
22
  * Splits `text` on `.` and applies `transformPart` to each segment.
23
23
  * The last segment receives `isLast = true`, all earlier segments receive `false`.
24
24
  * Segments are joined with `/` to form a file path.
25
+ *
26
+ * Only splits on dots followed by a letter so that version numbers
27
+ * embedded in operationIds (e.g. `v2025.0`) are kept intact.
25
28
  */
26
29
  function applyToFileParts(text, transformPart) {
27
- const parts = text.split(".");
30
+ const parts = text.split(/\.(?=[a-zA-Z])/);
28
31
  return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
29
32
  }
30
33
  /**
@@ -633,4 +636,4 @@ StaticClassClient.getParams = Client.getParams;
633
636
  //#endregion
634
637
  export { Url as a, Client as i, Operations as n, camelCase as o, ClassClient as r, pascalCase as s, StaticClassClient as t };
635
638
 
636
- //# sourceMappingURL=StaticClassClient-CCn9g9eF.js.map
639
+ //# sourceMappingURL=StaticClassClient-BFqabdAx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticClassClient-BFqabdAx.js","names":["#options","#transformParam","#eachParam","getParams","Function","Function","buildHeaders","buildGenerics","buildClientParams","buildRequestDataLine","buildFormDataLine","buildReturnStatement","generateMethod"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/jsdoc.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../src/components/Url.tsx","../src/components/Client.tsx","../src/components/ClassClient.tsx","../src/components/Operations.tsx","../src/components/StaticClassClient.tsx"],"sourcesContent":["type Options = {\n /** When `true`, dot-separated segments are split on `.` and joined with `/` after casing. */\n isFile?: boolean\n /** Text prepended before casing is applied. */\n prefix?: string\n /** Text appended before casing is applied. */\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 const normalized = 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\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n *\n * Only splits on dots followed by a letter so that version numbers\n * embedded in operationIds (e.g. `v2025.0`) are kept intact.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split(/\\.(?=[a-zA-Z])/)\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): 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\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Builds a JSDoc comment block from an array of lines.\n * Returns `fallback` when `comments` is empty so callers always get a usable string.\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /** String to use for indenting each line. Defaults to `' * '`. */\n indent?: string\n /** String appended after the closing tag. Defaults to `'\\n '`. */\n suffix?: string\n /** Returned as-is when `comments` is empty. Defaults to `' '`. */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) return fallback\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = new Set([\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n] as const)\n\n/**\n * Prefixes a word with `_` when it is a reserved JavaScript/Java identifier\n * or starts with a digit.\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.has(word as 'valueOf') || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /** The resolved URL string (Express-style or template literal, depending on context). */\n url: string\n /** Extracted path parameters as a key-value map, or `undefined` when the path has none. */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /** Controls whether the `url` is rendered as an Express path or a template literal. Defaults to `'path'`. */\n type?: 'path' | 'template'\n /** Optional transform applied to each extracted parameter name. */\n replacer?: (pathParam: string) => string\n /** When `true`, the result is serialized to a string expression instead of a plain object. */\n stringify?: boolean\n}\n\n/** Supported identifier casing strategies for path parameters. */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /** Casing strategy applied to path parameter names. Defaults to the original identifier. */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters. */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n\n baseURL: string | undefined\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n operation: Operation\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n },\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({\n name,\n isExportable = true,\n isIndexable = true,\n typeSchemas,\n baseURL,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n // Generate pathParams mapping when paramsCasing is used\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && <br />}\n <Const name={'res'}>{`{ method: '${operation.method.toUpperCase()}', url: ${path.toTemplateString({ prefix: baseURL })} as const }`}</Const>\n <br />\n return res\n </Function>\n </File.Source>\n )\n}\n\nUrl.getParams = getParams\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Url } from './Url.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n urlName?: string\n isExportable?: boolean\n isIndexable?: boolean\n isConfigurable?: boolean\n returnType?: string\n\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n operation: Operation\n children?: FabricReactNode\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n isConfigurable: boolean\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n const children = {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n }\n\n // Check if all children are optional or undefined\n const allChildrenAreOptional = Object.values(children).every((child) => !child || child.optional)\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children,\n default: allChildrenAreOptional ? '{}' : undefined,\n },\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n}\n\nexport function Client({\n name,\n isExportable = true,\n isIndexable = true,\n returnType,\n typeSchemas,\n baseURL,\n dataReturnType,\n parser,\n zodSchemas,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n urlName,\n children,\n isConfigurable = true,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n\n // Generate parameter mappings when paramsCasing is used\n // Apply to pathParams, queryParams and headerParams\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n const queryParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.queryParams, { casing: paramsCasing }) : undefined\n const headerParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.headerParams, { casing: paramsCasing }) : undefined\n\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? (headerParamsMapping ? '...mappedHeaders' : '...headers') : undefined,\n ].filter(Boolean)\n\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n isConfigurable,\n })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n const clientParams = FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: urlName ? `${urlName}(${urlParams.toCall()}).url.toString()` : path.template,\n },\n baseURL:\n baseURL && !urlName\n ? {\n value: `\\`${baseURL}\\``,\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? (queryParamsMapping ? { value: 'mappedParams' } : {}) : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n requestConfig: isConfigurable\n ? {\n mode: 'inlineSpread',\n }\n : undefined,\n headers: headers.length\n ? {\n value: isConfigurable ? `{ ${headers.join(', ')}, ...requestConfig.headers }` : `{ ${headers.join(', ')} }`,\n }\n : undefined,\n },\n },\n })\n\n const childrenElement = children ? (\n children\n ) : (\n <>\n {dataReturnType === 'full' && parser === 'zod' && zodSchemas && `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`}\n {dataReturnType === 'data' && parser === 'zod' && zodSchemas && `return ${zodSchemas.response.name}.parse(res.data)`}\n {dataReturnType === 'full' && parser === 'client' && 'return res'}\n {dataReturnType === 'data' && parser === 'client' && 'return res.data'}\n </>\n )\n\n return (\n <>\n <br />\n\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function\n name={name}\n async\n export={isExportable}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n returnType={returnType}\n >\n {isConfigurable ? 'const { client: request = fetch, ...requestConfig } = config' : ''}\n <br />\n <br />\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && (\n <>\n <br />\n <br />\n </>\n )}\n {queryParamsMapping && typeSchemas.queryParams?.name && (\n <>\n {`const mappedParams = params ? { ${Object.entries(queryParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": params.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {headerParamsMapping && typeSchemas.headerParams?.name && (\n <>\n {`const mappedHeaders = headers ? { ${Object.entries(headerParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": headers.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {parser === 'zod' && zodSchemas?.request?.name\n ? `const requestData = ${zodSchemas.request.name}.parse(data)`\n : typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {isFormData && typeSchemas?.request?.name && 'const formData = buildFormData(requestData)'}\n <br />\n {isConfigurable\n ? `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`\n : `const res = await fetch<${generics.join(', ')}>(${clientParams.toCall()})`}\n <br />\n {childrenElement}\n </Function>\n </File.Source>\n </>\n )\n}\n\nClient.getParams = getParams\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\nimport { Client } from './Client.tsx'\n\ntype Props = {\n /**\n * Name of the class\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = ClassClient.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n return `${jsdoc}async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function ClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\n #config: Partial<RequestConfig> & { client?: Client }\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n this.#config = config\n }\n\n${methods.join('\\n\\n')}\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nClassClient.getParams = Client.getParams\n","import { URLPath } from '@internals/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps): FabricReactNode {\n const operationsObject: Record<string, { path: string; method: HttpMethod }> = {}\n\n operations.forEach((operation) => {\n operationsObject[operation.getOperationId()] = {\n path: new URLPath(operation.path).URL,\n method: operation.method,\n }\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={name} export>\n {JSON.stringify(operationsObject, undefined, 2)}\n </Const>\n </File.Source>\n )\n}\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Client } from './Client.tsx'\n\ntype Props = {\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = Client.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n // Indent static method by 2 spaces, body by 4 spaces (matching snapshot)\n return `${jsdoc} static async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function StaticClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\\n static #config: Partial<RequestConfig> & { client?: Client } = {}\\n\\n${methods.join('\\n\\n')}\\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nStaticClassClient.getParams = Client.getParams\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB,KAChB,MAAM,CACN,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ,gBAAgB,QAAQ,CAEV,MAAM,gBAAgB,CAAC,OAAO,QAAQ,CAG5D,KAAK,MAAM,MAAM;AAEhB,MADiB,KAAK,SAAS,KAAK,SAAS,KAAK,aAAa,CACjD,QAAO;AACrB,MAAI,MAAM,KAAK,CAAC,OAAQ,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;AAC3E,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;GACnD,CACD,KAAK,GAAG,CACR,QAAQ,iBAAiB,GAAG;;;;;;;;;;AAWjC,SAAS,iBAAiB,MAAc,eAAkE;CACxG,MAAM,QAAQ,KAAK,MAAM,iBAAiB;AAC1C,QAAO,MAAM,KAAK,MAAM,MAAM,cAAc,MAAM,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,KAAK,IAAI;;;;;;;;;;AAWtF,SAAgB,UAAU,MAAc,EAAE,QAAQ,SAAS,IAAI,SAAS,OAAgB,EAAE,EAAU;AAClG,KAAI,OACF,QAAO,iBAAiB,OAAO,MAAM,WAAW,UAAU,MAAM,SAAS;EAAE;EAAQ;EAAQ,GAAG,EAAE,CAAC,CAAC;AAGpG,QAAO,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,MAAM;;;;;;;;;;AAW9D,SAAgB,WAAW,MAAc,EAAE,QAAQ,SAAS,IAAI,SAAS,OAAgB,EAAE,EAAU;AACnG,KAAI,OACF,QAAO,iBAAiB,OAAO,MAAM,WAAY,SAAS,WAAW,MAAM;EAAE;EAAQ;EAA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Q;EAAY,CAAC;CAEpF,MAAM,aAAa;EACjB;EACA;EACA;EACA;EACA,6BAA6B,SAAS,KAAK,KAAK,CAAC,IAAI,aAAa,QAAQ,CAAC;EAC3E;EACD,CACE,OAAO,QAAQ,CACf,KAAK,SAAS,OAAO,OAAO,CAC5B,KAAK,KAAK;AAGb,QAAO,GAAG,MAAM,iBAAiB,KAAK,GAAG,OAAO,eAAe,CAAC,OAAO,WAAW;;AAGpF,SAAgB,kBAAkB,EAChC,MACA,eAAe,MACf,cAAc,MACd,YACA,SACA,gBACA,QACA,YACA,cACA,gBACA,YACyB;CAgBzB,MAAM,YAAY,gBAAgB,KAAK,6EAfvB,WAAW,KAAK,EAAE,WAAW,MAAM,YAAY,aAAa,iBAC1E,eAAe;EACb;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,CACH,CAE2H,KAAK,OAAO,CAAC;AAEzI,QACE,qBAAC,KAAK,QAAN;EAAmB;EAAoB;EAA2B;YAAlE,CACG,WACA,SACW;;;AAGlB,kBAAkB,YAAY,OAAO"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_StaticClassClient = require("./StaticClassClient-By-aMAe4.cjs");
2
+ const require_StaticClassClient = require("./StaticClassClient-Azx6Ze4P.cjs");
3
3
  exports.ClassClient = require_StaticClassClient.ClassClient;
4
4
  exports.Client = require_StaticClassClient.Client;
5
5
  exports.Operations = require_StaticClassClient.Operations;
@@ -1,2 +1,2 @@
1
- import { a as Url, i as Client, n as Operations, r as ClassClient, t as StaticClassClient } from "./StaticClassClient-CCn9g9eF.js";
1
+ import { a as Url, i as Client, n as Operations, r as ClassClient, t as StaticClassClient } from "./StaticClassClient-BFqabdAx.js";
2
2
  export { ClassClient, Client, Operations, StaticClassClient, Url };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-ByKO4r7w.cjs");
2
- const require_StaticClassClient = require("./StaticClassClient-By-aMAe4.cjs");
2
+ const require_StaticClassClient = require("./StaticClassClient-Azx6Ze4P.cjs");
3
3
  let node_path = require("node:path");
4
4
  node_path = require_chunk.__toESM(node_path);
5
5
  let _kubb_plugin_zod = require("@kubb/plugin-zod");
@@ -750,4 +750,4 @@ Object.defineProperty(exports, "staticClassClientGenerator", {
750
750
  }
751
751
  });
752
752
 
753
- //# sourceMappingURL=generators-CSAmn1bw.cjs.map
753
+ //# sourceMappingURL=generators-BE4MB_JK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generators-CSAmn1bw.cjs","names":["camelCase","File","pluginTsName","pluginZodName","camelCase","pascalCase","File","path","ClassClient","pluginTsName","pluginZodName","File","path","Url","Client","camelCase","File","Function","File","Operations","pluginTsName","pluginZodName","camelCase","pascalCase","File","path","StaticClassClient"],"sources":["../src/components/WrapperClient.tsx","../src/generators/classClientGenerator.tsx","../src/generators/clientGenerator.tsx","../src/generators/groupedClientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/staticClassClientGenerator.tsx"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n classNames: Array<string>\n isExportable?: boolean\n isIndexable?: boolean\n}\n\nexport function WrapperClient({ name, classNames, isExportable = true, isIndexable = true }: Props): FabricReactNode {\n const properties = classNames.map((className) => ` readonly ${camelCase(className)}: ${className}`).join('\\n')\n const assignments = classNames.map((className) => ` this.${camelCase(className)} = new ${className}(config)`).join('\\n')\n\n const classCode = `export class ${name} {\n${properties}\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n${assignments}\n }\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n </File.Source>\n )\n}\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { ClassClient } from '../components/ClassClient'\nimport { WrapperClient } from '../components/WrapperClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const classClientGenerator = createReactGenerator<PluginClient>({\n name: 'classClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n const files = controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <ClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n\n if (options.wrapper) {\n const wrapperFile = driver.getFile({\n name: options.wrapper.className,\n extname: '.ts',\n pluginName,\n })\n\n files.push(\n <File\n key={wrapperFile.path}\n baseName={wrapperFile.baseName}\n path={wrapperFile.path}\n meta={wrapperFile.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <File.Import name={['Client', 'RequestConfig']} path={options.importPath} isTypeOnly />\n ) : (\n <File.Import\n name={['Client', 'RequestConfig']}\n root={wrapperFile.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n\n {controllers.map(({ name, file }) => (\n <File.Import key={name} name={[name]} root={wrapperFile.path} path={file.path} />\n ))}\n\n <WrapperClient name={options.wrapper.className} classNames={controllers.map(({ name }) => name)} />\n </File>,\n )\n }\n\n return files\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { Client } from '../components/Client'\nimport { Url } from '../components/Url.tsx'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ config, plugin, operation, generator }) {\n const driver = usePluginDriver()\n const {\n options,\n options: { output, urlType },\n } = plugin\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const url = {\n name: getName(operation, { type: 'function', suffix: 'url', prefix: 'get' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const isFormData = operation.getContentType() === 'multipart/form-data'\n\n return (\n <File\n baseName={client.file.baseName}\n path={client.file.path}\n meta={client.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={client.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {isFormData && type.schemas.request?.name && (\n <File.Import name={['buildFormData']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n\n {options.parser === 'zod' && (\n <File.Import\n name={[zod.schemas.response.name, zod.schemas.request?.name].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={zod.file.path}\n />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Url\n name={url.name}\n baseURL={options.baseURL}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n isIndexable={urlType === 'export'}\n isExportable={urlType === 'export'}\n />\n\n <Client\n name={client.name}\n urlName={url.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations, generator, plugin }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager(generator)\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const group = getGroup(operation)\n const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : undefined\n\n if (!group?.tag || !name) {\n return acc\n }\n\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations, plugin }) {\n const {\n name: pluginName,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { StaticClassClient } from '../components/StaticClassClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const staticClassClientGenerator = createReactGenerator<PluginClient>({\n name: 'staticClassClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n return controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <StaticClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,cAAc,EAAE,MAAM,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Q;MACtB,YAAY,QAAQ;MACpB,QAAQ,QAAQ;MAChB,CAAA;KACG;MAhEA,KAAK,KAgEL;IAET;;CAEL,CAAC"}
1
+ {"version":3,"file":"generators-BE4MB_JK.cjs","names":["camelCase","File","pluginTsName","pluginZodName","camelCase","pascalCase","File","path","ClassClient","pluginTsName","pluginZodName","File","path","Url","Client","camelCase","File","Function","File","Operations","pluginTsName","pluginZodName","camelCase","pascalCase","File","path","StaticClassClient"],"sources":["../src/components/WrapperClient.tsx","../src/generators/classClientGenerator.tsx","../src/generators/clientGenerator.tsx","../src/generators/groupedClientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/staticClassClientGenerator.tsx"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n classNames: Array<string>\n isExportable?: boolean\n isIndexable?: boolean\n}\n\nexport function WrapperClient({ name, classNames, isExportable = true, isIndexable = true }: Props): FabricReactNode {\n const properties = classNames.map((className) => ` readonly ${camelCase(className)}: ${className}`).join('\\n')\n const assignments = classNames.map((className) => ` this.${camelCase(className)} = new ${className}(config)`).join('\\n')\n\n const classCode = `export class ${name} {\n${properties}\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n${assignments}\n }\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n </File.Source>\n )\n}\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { ClassClient } from '../components/ClassClient'\nimport { WrapperClient } from '../components/WrapperClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const classClientGenerator = createReactGenerator<PluginClient>({\n name: 'classClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n const files = controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <ClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n\n if (options.wrapper) {\n const wrapperFile = driver.getFile({\n name: options.wrapper.className,\n extname: '.ts',\n pluginName,\n })\n\n files.push(\n <File\n key={wrapperFile.path}\n baseName={wrapperFile.baseName}\n path={wrapperFile.path}\n meta={wrapperFile.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <File.Import name={['Client', 'RequestConfig']} path={options.importPath} isTypeOnly />\n ) : (\n <File.Import\n name={['Client', 'RequestConfig']}\n root={wrapperFile.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n\n {controllers.map(({ name, file }) => (\n <File.Import key={name} name={[name]} root={wrapperFile.path} path={file.path} />\n ))}\n\n <WrapperClient name={options.wrapper.className} classNames={controllers.map(({ name }) => name)} />\n </File>,\n )\n }\n\n return files\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { Client } from '../components/Client'\nimport { Url } from '../components/Url.tsx'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ config, plugin, operation, generator }) {\n const driver = usePluginDriver()\n const {\n options,\n options: { output, urlType },\n } = plugin\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const url = {\n name: getName(operation, { type: 'function', suffix: 'url', prefix: 'get' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const isFormData = operation.getContentType() === 'multipart/form-data'\n\n return (\n <File\n baseName={client.file.baseName}\n path={client.file.path}\n meta={client.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={client.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {isFormData && type.schemas.request?.name && (\n <File.Import name={['buildFormData']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n\n {options.parser === 'zod' && (\n <File.Import\n name={[zod.schemas.response.name, zod.schemas.request?.name].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={zod.file.path}\n />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Url\n name={url.name}\n baseURL={options.baseURL}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n isIndexable={urlType === 'export'}\n isExportable={urlType === 'export'}\n />\n\n <Client\n name={client.name}\n urlName={url.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations, generator, plugin }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager(generator)\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const group = getGroup(operation)\n const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : undefined\n\n if (!group?.tag || !name) {\n return acc\n }\n\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations, plugin }) {\n const {\n name: pluginName,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { StaticClassClient } from '../components/StaticClassClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const staticClassClientGenerator = createReactGenerator<PluginClient>({\n name: 'staticClassClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n return controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <StaticClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,cAAc,EAAE,MAAM,YAAY,eAAe,MAAM,cAAc,QAAgC;CAInH,MAAM,YAAY,gBAAgB,KAAK;EAHpB,WAAW,KAAK,cAAc,cAAcA,0BAAAA,UAAU,UAAU,CAAC,IAAI,YAAY,CAAC,KAAK,KAAK,CAIpG;;;EAHS,WAAW,KAAK,cAAc,YAAYA,0BAAAA,UAAU,UAAU,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"./StaticClassClient-CCn9g9eF.js";
2
+ import { a as Url, i as Client, n as Operations, o as camelCase, r as ClassClient, s as pascalCase, t as StaticClassClient } from "./StaticClassClient-BFqabdAx.js";
3
3
  import path from "node:path";
4
4
  import { pluginZodName } from "@kubb/plugin-zod";
5
5
  import { usePluginDriver } from "@kubb/core/hooks";
@@ -720,4 +720,4 @@ const staticClassClientGenerator = createReactGenerator({
720
720
  //#endregion
721
721
  export { classClientGenerator as a, clientGenerator as i, operationsGenerator as n, groupedClientGenerator as r, staticClassClientGenerator as t };
722
722
 
723
- //# sourceMappingURL=generators-BD0Kg3x9.js.map
723
+ //# sourceMappingURL=generators-C7Uz42d2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generators-BD0Kg3x9.js","names":[],"sources":["../src/components/WrapperClient.tsx","../src/generators/classClientGenerator.tsx","../src/generators/clientGenerator.tsx","../src/generators/groupedClientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/staticClassClientGenerator.tsx"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n classNames: Array<string>\n isExportable?: boolean\n isIndexable?: boolean\n}\n\nexport function WrapperClient({ name, classNames, isExportable = true, isIndexable = true }: Props): FabricReactNode {\n const properties = classNames.map((className) => ` readonly ${camelCase(className)}: ${className}`).join('\\n')\n const assignments = classNames.map((className) => ` this.${camelCase(className)} = new ${className}(config)`).join('\\n')\n\n const classCode = `export class ${name} {\n${properties}\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n${assignments}\n }\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n </File.Source>\n )\n}\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { ClassClient } from '../components/ClassClient'\nimport { WrapperClient } from '../components/WrapperClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const classClientGenerator = createReactGenerator<PluginClient>({\n name: 'classClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n const files = controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <ClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n\n if (options.wrapper) {\n const wrapperFile = driver.getFile({\n name: options.wrapper.className,\n extname: '.ts',\n pluginName,\n })\n\n files.push(\n <File\n key={wrapperFile.path}\n baseName={wrapperFile.baseName}\n path={wrapperFile.path}\n meta={wrapperFile.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <File.Import name={['Client', 'RequestConfig']} path={options.importPath} isTypeOnly />\n ) : (\n <File.Import\n name={['Client', 'RequestConfig']}\n root={wrapperFile.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n\n {controllers.map(({ name, file }) => (\n <File.Import key={name} name={[name]} root={wrapperFile.path} path={file.path} />\n ))}\n\n <WrapperClient name={options.wrapper.className} classNames={controllers.map(({ name }) => name)} />\n </File>,\n )\n }\n\n return files\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { Client } from '../components/Client'\nimport { Url } from '../components/Url.tsx'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ config, plugin, operation, generator }) {\n const driver = usePluginDriver()\n const {\n options,\n options: { output, urlType },\n } = plugin\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const url = {\n name: getName(operation, { type: 'function', suffix: 'url', prefix: 'get' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const isFormData = operation.getContentType() === 'multipart/form-data'\n\n return (\n <File\n baseName={client.file.baseName}\n path={client.file.path}\n meta={client.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={client.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {isFormData && type.schemas.request?.name && (\n <File.Import name={['buildFormData']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n\n {options.parser === 'zod' && (\n <File.Import\n name={[zod.schemas.response.name, zod.schemas.request?.name].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={zod.file.path}\n />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Url\n name={url.name}\n baseURL={options.baseURL}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n isIndexable={urlType === 'export'}\n isExportable={urlType === 'export'}\n />\n\n <Client\n name={client.name}\n urlName={url.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations, generator, plugin }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager(generator)\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const group = getGroup(operation)\n const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : undefined\n\n if (!group?.tag || !name) {\n return acc\n }\n\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations, plugin }) {\n const {\n name: pluginName,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { StaticClassClient } from '../components/StaticClassClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const staticClassClientGenerator = createReactGenerator<PluginClient>({\n name: 'staticClassClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n return controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <StaticClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n },\n})\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,cAAc,EAAE,MAAM,YAAY,eAAe,MAAM,cAAc,QAA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MAClE,MAAM,UAAU,eAAe,IAAI,SAAS;AAC5C,UAAI,CAAC,QACH,QAAO;MAET,MAAM,cAAc,MAAM,KAAK,QAAQ,CAAC,OAAO,QAAQ;AACvD,UAAI,YAAY,WAAW,EACzB,QAAO;AAGT,aAAO,oBAAC,KAAK,QAAN;OAA4B,MAAM;OAAa,MAAM,KAAK;OAAM,MAAM,QAAQ;OAAQ,EAApE,SAAoE;OAC7F;KAEJ,oBAAC,mBAAD;MACQ;MACN,YAAY;MACZ,SAAS,QAAQ;MACjB,gBAAgB,QAAQ;MACxB,gBAAgB,QAAQ;MACxB,cAAc,QAAQ;MACtB,YAAY,QAAQ;MACpB,QAAQ,QAAQ;MAChB,CAAA;KACG;MAhEA,KAAK,KAgEL;IAET;;CAEL,CAAC"}
1
+ {"version":3,"file":"generators-C7Uz42d2.js","names":[],"sources":["../src/components/WrapperClient.tsx","../src/generators/classClientGenerator.tsx","../src/generators/clientGenerator.tsx","../src/generators/groupedClientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/staticClassClientGenerator.tsx"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n classNames: Array<string>\n isExportable?: boolean\n isIndexable?: boolean\n}\n\nexport function WrapperClient({ name, classNames, isExportable = true, isIndexable = true }: Props): FabricReactNode {\n const properties = classNames.map((className) => ` readonly ${camelCase(className)}: ${className}`).join('\\n')\n const assignments = classNames.map((className) => ` this.${camelCase(className)} = new ${className}(config)`).join('\\n')\n\n const classCode = `export class ${name} {\n${properties}\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n${assignments}\n }\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n </File.Source>\n )\n}\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { ClassClient } from '../components/ClassClient'\nimport { WrapperClient } from '../components/WrapperClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const classClientGenerator = createReactGenerator<PluginClient>({\n name: 'classClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n const files = controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <ClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n\n if (options.wrapper) {\n const wrapperFile = driver.getFile({\n name: options.wrapper.className,\n extname: '.ts',\n pluginName,\n })\n\n files.push(\n <File\n key={wrapperFile.path}\n baseName={wrapperFile.baseName}\n path={wrapperFile.path}\n meta={wrapperFile.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <File.Import name={['Client', 'RequestConfig']} path={options.importPath} isTypeOnly />\n ) : (\n <File.Import\n name={['Client', 'RequestConfig']}\n root={wrapperFile.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n\n {controllers.map(({ name, file }) => (\n <File.Import key={name} name={[name]} root={wrapperFile.path} path={file.path} />\n ))}\n\n <WrapperClient name={options.wrapper.className} classNames={controllers.map(({ name }) => name)} />\n </File>,\n )\n }\n\n return files\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { Client } from '../components/Client'\nimport { Url } from '../components/Url.tsx'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ config, plugin, operation, generator }) {\n const driver = usePluginDriver()\n const {\n options,\n options: { output, urlType },\n } = plugin\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const url = {\n name: getName(operation, { type: 'function', suffix: 'url', prefix: 'get' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const isFormData = operation.getContentType() === 'multipart/form-data'\n\n return (\n <File\n baseName={client.file.baseName}\n path={client.file.path}\n meta={client.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={client.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {isFormData && type.schemas.request?.name && (\n <File.Import name={['buildFormData']} root={client.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n\n {options.parser === 'zod' && (\n <File.Import\n name={[zod.schemas.response.name, zod.schemas.request?.name].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={zod.file.path}\n />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter((x): x is string => Boolean(x))}\n root={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Url\n name={url.name}\n baseURL={options.baseURL}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n isIndexable={urlType === 'export'}\n isExportable={urlType === 'export'}\n />\n\n <Client\n name={client.name}\n urlName={url.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations, generator, plugin }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager(generator)\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const group = getGroup(operation)\n const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : undefined\n\n if (!group?.tag || !name) {\n return acc\n }\n\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations, plugin }) {\n const {\n name: pluginName,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { camelCase, pascalCase } from '@internals/utils'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { StaticClassClient } from '../components/StaticClassClient'\nimport type { PluginClient } from '../types'\n\ntype OperationData = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n typeFile: KubbFile.File\n zodFile: KubbFile.File\n}\n\ntype Controller = {\n name: string\n file: KubbFile.File\n operations: Array<OperationData>\n}\n\nexport const staticClassClientGenerator = createReactGenerator<PluginClient>({\n name: 'staticClassClient',\n Operations({ operations, generator, plugin, config }) {\n const { options, name: pluginName } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile, getGroup, getSchemas } = useOperationManager(generator)\n\n function renderOperationData(operation: Operation): OperationData {\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n return {\n operation,\n name: getName(operation, { type: 'function' }),\n typeSchemas: type.schemas,\n zodSchemas: zod.schemas,\n typeFile: type.file,\n zodFile: zod.file,\n }\n }\n\n // Group operations by tag\n const controllers = operations.reduce(\n (acc, operation) => {\n const group = getGroup(operation)\n const groupName = group?.tag ? (options.group?.name?.({ group: camelCase(group.tag) }) ?? pascalCase(group.tag)) : 'Client'\n\n if (!group?.tag && !options.group) {\n // If no grouping, put all operations in a single class\n const name = 'ApiClient'\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n } else if (group?.tag) {\n // Group by tag\n const name = groupName\n const file = driver.getFile({\n name,\n extname: '.ts',\n pluginName,\n options: { group },\n })\n\n const operationData = renderOperationData(operation)\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.operations.push(operationData)\n } else {\n acc.push({ name, file, operations: [operationData] })\n }\n }\n\n return acc\n },\n [] as Array<Controller>,\n )\n\n function collectTypeImports(ops: Array<OperationData>) {\n const typeImportsByFile = new Map<string, Set<string>>()\n const typeFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { typeSchemas, typeFile } = op\n\n if (!typeImportsByFile.has(typeFile.path)) {\n typeImportsByFile.set(typeFile.path, new Set())\n }\n const typeImports = typeImportsByFile.get(typeFile.path)!\n\n if (typeSchemas.request?.name) typeImports.add(typeSchemas.request.name)\n if (typeSchemas.response?.name) typeImports.add(typeSchemas.response.name)\n if (typeSchemas.pathParams?.name) typeImports.add(typeSchemas.pathParams.name)\n if (typeSchemas.queryParams?.name) typeImports.add(typeSchemas.queryParams.name)\n if (typeSchemas.headerParams?.name) typeImports.add(typeSchemas.headerParams.name)\n typeSchemas.statusCodes?.forEach((item) => {\n if (item?.name) typeImports.add(item.name)\n })\n typeFilesByPath.set(typeFile.path, typeFile)\n })\n\n return { typeImportsByFile, typeFilesByPath }\n }\n\n function collectZodImports(ops: Array<OperationData>) {\n const zodImportsByFile = new Map<string, Set<string>>()\n const zodFilesByPath = new Map<string, KubbFile.File>()\n\n ops.forEach((op) => {\n const { zodSchemas, zodFile } = op\n\n if (!zodImportsByFile.has(zodFile.path)) {\n zodImportsByFile.set(zodFile.path, new Set())\n }\n const zodImports = zodImportsByFile.get(zodFile.path)!\n\n if (zodSchemas?.response?.name) zodImports.add(zodSchemas.response.name)\n if (zodSchemas?.request?.name) zodImports.add(zodSchemas.request.name)\n zodFilesByPath.set(zodFile.path, zodFile)\n })\n\n return { zodImportsByFile, zodFilesByPath }\n }\n\n return controllers.map(({ name, file, operations: ops }) => {\n const { typeImportsByFile, typeFilesByPath } = collectTypeImports(ops)\n const { zodImportsByFile, zodFilesByPath } =\n options.parser === 'zod'\n ? collectZodImports(ops)\n : { zodImportsByFile: new Map<string, Set<string>>(), zodFilesByPath: new Map<string, KubbFile.File>() }\n const hasFormData = ops.some((op) => op.operation.getContentType() === 'multipart/form-data')\n\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: driver.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n {options.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['mergeConfig']} path={options.importPath} />\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import name={['mergeConfig']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n </>\n )}\n\n {hasFormData && <File.Import name={['buildFormData']} root={file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />}\n\n {Array.from(typeImportsByFile.entries()).map(([filePath, imports]) => {\n const typeFile = typeFilesByPath.get(filePath)\n if (!typeFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n return <File.Import key={filePath} name={importNames} root={file.path} path={typeFile.path} isTypeOnly />\n })}\n\n {options.parser === 'zod' &&\n Array.from(zodImportsByFile.entries()).map(([filePath, imports]) => {\n const zodFile = zodFilesByPath.get(filePath)\n if (!zodFile) {\n return null\n }\n const importNames = Array.from(imports).filter(Boolean)\n if (importNames.length === 0) {\n return null\n }\n\n return <File.Import key={filePath} name={importNames} root={file.path} path={zodFile.path} />\n })}\n\n <StaticClassClient\n name={name}\n operations={ops}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n parser={options.parser}\n />\n </File>\n )\n })\n },\n})\n"],"mappings":";;;;;;;;;;;;AAWA,SA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iBAAiB,SAAS,CAAC,CAAC,KAAK,CAAC,UAAU,aAAa;MAClE,MAAM,UAAU,eAAe,IAAI,SAAS;AAC5C,UAAI,CAAC,QACH,QAAO;MAET,MAAM,cAAc,MAAM,KAAK,QAAQ,CAAC,OAAO,QAAQ;AACvD,UAAI,YAAY,WAAW,EACzB,QAAO;AAGT,aAAO,oBAAC,KAAK,QAAN;OAA4B,MAAM;OAAa,MAAM,KAAK;OAAM,MAAM,QAAQ;OAAQ,EAApE,SAAoE;OAC7F;KAEJ,oBAAC,mBAAD;MACQ;MACN,YAAY;MACZ,SAAS,QAAQ;MACjB,gBAAgB,QAAQ;MACxB,gBAAgB,QAAQ;MACxB,cAAc,QAAQ;MACtB,YAAY,QAAQ;MACpB,QAAQ,QAAQ;MAChB,CAAA;KACG;MAhEA,KAAK,KAgEL;IAET;;CAEL,CAAC"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_generators = require("./generators-CSAmn1bw.cjs");
2
+ const require_generators = require("./generators-BE4MB_JK.cjs");
3
3
  exports.classClientGenerator = require_generators.classClientGenerator;
4
4
  exports.clientGenerator = require_generators.clientGenerator;
5
5
  exports.groupedClientGenerator = require_generators.groupedClientGenerator;
@@ -1,2 +1,2 @@
1
- import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-BD0Kg3x9.js";
1
+ import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-C7Uz42d2.js";
2
2
  export { classClientGenerator, clientGenerator, groupedClientGenerator, operationsGenerator, staticClassClientGenerator };
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-ByKO4r7w.cjs");
3
- const require_StaticClassClient = require("./StaticClassClient-By-aMAe4.cjs");
4
- const require_generators = require("./generators-CSAmn1bw.cjs");
3
+ const require_StaticClassClient = require("./StaticClassClient-Azx6Ze4P.cjs");
4
+ const require_generators = require("./generators-BE4MB_JK.cjs");
5
5
  const require_templates_clients_axios_source = require("./templates/clients/axios.source.cjs");
6
6
  const require_templates_clients_fetch_source = require("./templates/clients/fetch.source.cjs");
7
7
  const require_templates_config_source = require("./templates/config.source.cjs");
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./chunk--u3MIqq1.js";
2
- import { o as camelCase } from "./StaticClassClient-CCn9g9eF.js";
3
- import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-BD0Kg3x9.js";
2
+ import { o as camelCase } from "./StaticClassClient-BFqabdAx.js";
3
+ import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-C7Uz42d2.js";
4
4
  import { source } from "./templates/clients/axios.source.js";
5
5
  import { source as source$1 } from "./templates/clients/fetch.source.js";
6
6
  import { source as source$2 } from "./templates/config.source.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-client",
3
- "version": "5.0.0-alpha.11",
3
+ "version": "5.0.0-alpha.12",
4
4
  "description": "API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.",
5
5
  "keywords": [
6
6
  "api-client",
@@ -110,11 +110,11 @@
110
110
  "dependencies": {
111
111
  "@kubb/fabric-core": "0.14.0",
112
112
  "@kubb/react-fabric": "0.14.0",
113
- "@kubb/core": "5.0.0-alpha.11",
114
- "@kubb/oas": "5.0.0-alpha.11",
115
- "@kubb/plugin-oas": "5.0.0-alpha.11",
116
- "@kubb/plugin-ts": "5.0.0-alpha.11",
117
- "@kubb/plugin-zod": "5.0.0-alpha.11"
113
+ "@kubb/core": "5.0.0-alpha.12",
114
+ "@kubb/oas": "5.0.0-alpha.12",
115
+ "@kubb/plugin-oas": "5.0.0-alpha.12",
116
+ "@kubb/plugin-ts": "5.0.0-alpha.12",
117
+ "@kubb/plugin-zod": "5.0.0-alpha.12"
118
118
  },
119
119
  "devDependencies": {
120
120
  "axios": "^1.13.6",
@@ -1 +0,0 @@
1
- {"version":3,"file":"StaticClassClient-By-aMAe4.cjs","names":["#options","#transformParam","#eachParam","getParams","FunctionParams","File","Function","Const","FunctionParams","File","Function","buildHeaders","buildGenerics","buildClientParams","FunctionParams","buildRequestDataLine","buildFormDataLine","buildReturnStatement","generateMethod","File","File","Const","FunctionParams","File"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/jsdoc.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../src/components/Url.tsx","../src/components/Client.tsx","../src/components/ClassClient.tsx","../src/components/Operations.tsx","../src/components/StaticClassClient.tsx"],"sourcesContent":["type Options = {\n /** When `true`, dot-separated segments are split on `.` and joined with `/` after casing. */\n isFile?: boolean\n /** Text prepended before casing is applied. */\n prefix?: string\n /** Text appended before casing is applied. */\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 const normalized = 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\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split('.')\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): 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\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Builds a JSDoc comment block from an array of lines.\n * Returns `fallback` when `comments` is empty so callers always get a usable string.\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /** String to use for indenting each line. Defaults to `' * '`. */\n indent?: string\n /** String appended after the closing tag. Defaults to `'\\n '`. */\n suffix?: string\n /** Returned as-is when `comments` is empty. Defaults to `' '`. */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) return fallback\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = new Set([\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n] as const)\n\n/**\n * Prefixes a word with `_` when it is a reserved JavaScript/Java identifier\n * or starts with a digit.\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.has(word as 'valueOf') || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /** The resolved URL string (Express-style or template literal, depending on context). */\n url: string\n /** Extracted path parameters as a key-value map, or `undefined` when the path has none. */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /** Controls whether the `url` is rendered as an Express path or a template literal. Defaults to `'path'`. */\n type?: 'path' | 'template'\n /** Optional transform applied to each extracted parameter name. */\n replacer?: (pathParam: string) => string\n /** When `true`, the result is serialized to a string expression instead of a plain object. */\n stringify?: boolean\n}\n\n/** Supported identifier casing strategies for path parameters. */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /** Casing strategy applied to path parameter names. Defaults to the original identifier. */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters. */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n\n baseURL: string | undefined\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n operation: Operation\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n },\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({\n name,\n isExportable = true,\n isIndexable = true,\n typeSchemas,\n baseURL,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n // Generate pathParams mapping when paramsCasing is used\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && <br />}\n <Const name={'res'}>{`{ method: '${operation.method.toUpperCase()}', url: ${path.toTemplateString({ prefix: baseURL })} as const }`}</Const>\n <br />\n return res\n </Function>\n </File.Source>\n )\n}\n\nUrl.getParams = getParams\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Url } from './Url.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n urlName?: string\n isExportable?: boolean\n isIndexable?: boolean\n isConfigurable?: boolean\n returnType?: string\n\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n operation: Operation\n children?: FabricReactNode\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n isConfigurable: boolean\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n const children = {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n }\n\n // Check if all children are optional or undefined\n const allChildrenAreOptional = Object.values(children).every((child) => !child || child.optional)\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children,\n default: allChildrenAreOptional ? '{}' : undefined,\n },\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n}\n\nexport function Client({\n name,\n isExportable = true,\n isIndexable = true,\n returnType,\n typeSchemas,\n baseURL,\n dataReturnType,\n parser,\n zodSchemas,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n urlName,\n children,\n isConfigurable = true,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n\n // Generate parameter mappings when paramsCasing is used\n // Apply to pathParams, queryParams and headerParams\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n const queryParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.queryParams, { casing: paramsCasing }) : undefined\n const headerParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.headerParams, { casing: paramsCasing }) : undefined\n\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? (headerParamsMapping ? '...mappedHeaders' : '...headers') : undefined,\n ].filter(Boolean)\n\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n isConfigurable,\n })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n const clientParams = FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: urlName ? `${urlName}(${urlParams.toCall()}).url.toString()` : path.template,\n },\n baseURL:\n baseURL && !urlName\n ? {\n value: `\\`${baseURL}\\``,\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? (queryParamsMapping ? { value: 'mappedParams' } : {}) : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n requestConfig: isConfigurable\n ? {\n mode: 'inlineSpread',\n }\n : undefined,\n headers: headers.length\n ? {\n value: isConfigurable ? `{ ${headers.join(', ')}, ...requestConfig.headers }` : `{ ${headers.join(', ')} }`,\n }\n : undefined,\n },\n },\n })\n\n const childrenElement = children ? (\n children\n ) : (\n <>\n {dataReturnType === 'full' && parser === 'zod' && zodSchemas && `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`}\n {dataReturnType === 'data' && parser === 'zod' && zodSchemas && `return ${zodSchemas.response.name}.parse(res.data)`}\n {dataReturnType === 'full' && parser === 'client' && 'return res'}\n {dataReturnType === 'data' && parser === 'client' && 'return res.data'}\n </>\n )\n\n return (\n <>\n <br />\n\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function\n name={name}\n async\n export={isExportable}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n returnType={returnType}\n >\n {isConfigurable ? 'const { client: request = fetch, ...requestConfig } = config' : ''}\n <br />\n <br />\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && (\n <>\n <br />\n <br />\n </>\n )}\n {queryParamsMapping && typeSchemas.queryParams?.name && (\n <>\n {`const mappedParams = params ? { ${Object.entries(queryParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": params.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {headerParamsMapping && typeSchemas.headerParams?.name && (\n <>\n {`const mappedHeaders = headers ? { ${Object.entries(headerParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": headers.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {parser === 'zod' && zodSchemas?.request?.name\n ? `const requestData = ${zodSchemas.request.name}.parse(data)`\n : typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {isFormData && typeSchemas?.request?.name && 'const formData = buildFormData(requestData)'}\n <br />\n {isConfigurable\n ? `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`\n : `const res = await fetch<${generics.join(', ')}>(${clientParams.toCall()})`}\n <br />\n {childrenElement}\n </Function>\n </File.Source>\n </>\n )\n}\n\nClient.getParams = getParams\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\nimport { Client } from './Client.tsx'\n\ntype Props = {\n /**\n * Name of the class\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = ClassClient.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n return `${jsdoc}async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function ClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\n #config: Partial<RequestConfig> & { client?: Client }\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n this.#config = config\n }\n\n${methods.join('\\n\\n')}\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nClassClient.getParams = Client.getParams\n","import { URLPath } from '@internals/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps): FabricReactNode {\n const operationsObject: Record<string, { path: string; method: HttpMethod }> = {}\n\n operations.forEach((operation) => {\n operationsObject[operation.getOperationId()] = {\n path: new URLPath(operation.path).URL,\n method: operation.method,\n }\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={name} export>\n {JSON.stringify(operationsObject, undefined, 2)}\n </Const>\n </File.Source>\n )\n}\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Client } from './Client.tsx'\n\ntype Props = {\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = Client.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n // Indent static method by 2 spaces, body by 4 spaces (matching snapshot)\n return `${jsdoc} static async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function StaticClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\\n static #config: Partial<RequestConfig> & { client?: Client } = {}\\n\\n${methods.join('\\n\\n')}\\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nStaticClassClient.getParams = Client.getParams\n"],"mappings":";;;;;;;;;;;;;AAgBA,S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AAK,EAAE,WAAW,MAAM,YAAY,aAAa,iBAC1E,eAAe;EACb;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,CACH,CAE2H,KAAK,OAAO,CAAC;AAEzI,QACE,iBAAA,GAAA,+BAAA,MAACC,mBAAAA,KAAK,QAAN;EAAmB;EAAoB;EAA2B;YAAlE,CACG,WACA,SACW;;;AAGlB,kBAAkB,YAAY,OAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StaticClassClient-CCn9g9eF.js","names":["#options","#transformParam","#eachParam","getParams","Function","Function","buildHeaders","buildGenerics","buildClientParams","buildRequestDataLine","buildFormDataLine","buildReturnStatement","generateMethod"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/jsdoc.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../src/components/Url.tsx","../src/components/Client.tsx","../src/components/ClassClient.tsx","../src/components/Operations.tsx","../src/components/StaticClassClient.tsx"],"sourcesContent":["type Options = {\n /** When `true`, dot-separated segments are split on `.` and joined with `/` after casing. */\n isFile?: boolean\n /** Text prepended before casing is applied. */\n prefix?: string\n /** Text appended before casing is applied. */\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 const normalized = 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\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split('.')\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): 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\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Builds a JSDoc comment block from an array of lines.\n * Returns `fallback` when `comments` is empty so callers always get a usable string.\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /** String to use for indenting each line. Defaults to `' * '`. */\n indent?: string\n /** String appended after the closing tag. Defaults to `'\\n '`. */\n suffix?: string\n /** Returned as-is when `comments` is empty. Defaults to `' '`. */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) return fallback\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = new Set([\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n] as const)\n\n/**\n * Prefixes a word with `_` when it is a reserved JavaScript/Java identifier\n * or starts with a digit.\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.has(word as 'valueOf') || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /** The resolved URL string (Express-style or template literal, depending on context). */\n url: string\n /** Extracted path parameters as a key-value map, or `undefined` when the path has none. */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /** Controls whether the `url` is rendered as an Express path or a template literal. Defaults to `'path'`. */\n type?: 'path' | 'template'\n /** Optional transform applied to each extracted parameter name. */\n replacer?: (pathParam: string) => string\n /** When `true`, the result is serialized to a string expression instead of a plain object. */\n stringify?: boolean\n}\n\n/** Supported identifier casing strategies for path parameters. */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /** Casing strategy applied to path parameter names. Defaults to the original identifier. */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters. */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n\n baseURL: string | undefined\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n operation: Operation\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n },\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({\n name,\n isExportable = true,\n isIndexable = true,\n typeSchemas,\n baseURL,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n // Generate pathParams mapping when paramsCasing is used\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && <br />}\n <Const name={'res'}>{`{ method: '${operation.method.toUpperCase()}', url: ${path.toTemplateString({ prefix: baseURL })} as const }`}</Const>\n <br />\n return res\n </Function>\n </File.Source>\n )\n}\n\nUrl.getParams = getParams\n","import { isValidVarName, URLPath } from '@internals/utils'\nimport { getDefaultValue, isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getParamsMapping, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Url } from './Url.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n urlName?: string\n isExportable?: boolean\n isIndexable?: boolean\n isConfigurable?: boolean\n returnType?: string\n\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n operation: Operation\n children?: FabricReactNode\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['paramsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n isConfigurable: boolean\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n })\n\n const children = {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n }\n\n // Check if all children are optional or undefined\n const allChildrenAreOptional = Object.values(children).every((child) => !child || child.optional)\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children,\n default: allChildrenAreOptional ? '{}' : undefined,\n },\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n }\n : undefined,\n })\n}\n\nexport function Client({\n name,\n isExportable = true,\n isIndexable = true,\n returnType,\n typeSchemas,\n baseURL,\n dataReturnType,\n parser,\n zodSchemas,\n paramsType,\n paramsCasing,\n pathParamsType,\n operation,\n urlName,\n children,\n isConfigurable = true,\n}: Props): FabricReactNode {\n const path = new URLPath(operation.path)\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n\n // Generate parameter mappings when paramsCasing is used\n // Apply to pathParams, queryParams and headerParams\n const pathParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.pathParams, { casing: paramsCasing }) : undefined\n const queryParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.queryParams, { casing: paramsCasing }) : undefined\n const headerParamsMapping = paramsCasing ? getParamsMapping(typeSchemas.headerParams, { casing: paramsCasing }) : undefined\n\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? (headerParamsMapping ? '...mappedHeaders' : '...headers') : undefined,\n ].filter(Boolean)\n\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n isConfigurable,\n })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n\n const clientParams = FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: urlName ? `${urlName}(${urlParams.toCall()}).url.toString()` : path.template,\n },\n baseURL:\n baseURL && !urlName\n ? {\n value: `\\`${baseURL}\\``,\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? (queryParamsMapping ? { value: 'mappedParams' } : {}) : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n requestConfig: isConfigurable\n ? {\n mode: 'inlineSpread',\n }\n : undefined,\n headers: headers.length\n ? {\n value: isConfigurable ? `{ ${headers.join(', ')}, ...requestConfig.headers }` : `{ ${headers.join(', ')} }`,\n }\n : undefined,\n },\n },\n })\n\n const childrenElement = children ? (\n children\n ) : (\n <>\n {dataReturnType === 'full' && parser === 'zod' && zodSchemas && `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`}\n {dataReturnType === 'data' && parser === 'zod' && zodSchemas && `return ${zodSchemas.response.name}.parse(res.data)`}\n {dataReturnType === 'full' && parser === 'client' && 'return res'}\n {dataReturnType === 'data' && parser === 'client' && 'return res.data'}\n </>\n )\n\n return (\n <>\n <br />\n\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function\n name={name}\n async\n export={isExportable}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n returnType={returnType}\n >\n {isConfigurable ? 'const { client: request = fetch, ...requestConfig } = config' : ''}\n <br />\n <br />\n {pathParamsMapping &&\n Object.entries(pathParamsMapping)\n .filter(([originalName, camelCaseName]) => originalName !== camelCaseName && isValidVarName(originalName))\n .map(([originalName, camelCaseName]) => `const ${originalName} = ${camelCaseName}`)\n .join('\\n')}\n {pathParamsMapping && (\n <>\n <br />\n <br />\n </>\n )}\n {queryParamsMapping && typeSchemas.queryParams?.name && (\n <>\n {`const mappedParams = params ? { ${Object.entries(queryParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": params.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {headerParamsMapping && typeSchemas.headerParams?.name && (\n <>\n {`const mappedHeaders = headers ? { ${Object.entries(headerParamsMapping)\n .map(([originalName, camelCaseName]) => `\"${originalName}\": headers.${camelCaseName}`)\n .join(', ')} } : undefined`}\n <br />\n <br />\n </>\n )}\n {parser === 'zod' && zodSchemas?.request?.name\n ? `const requestData = ${zodSchemas.request.name}.parse(data)`\n : typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {isFormData && typeSchemas?.request?.name && 'const formData = buildFormData(requestData)'}\n <br />\n {isConfigurable\n ? `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`\n : `const res = await fetch<${generics.join(', ')}>(${clientParams.toCall()})`}\n <br />\n {childrenElement}\n </Function>\n </File.Source>\n </>\n )\n}\n\nClient.getParams = getParams\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\n\nimport { Client } from './Client.tsx'\n\ntype Props = {\n /**\n * Name of the class\n */\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = ClassClient.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n return `${jsdoc}async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function ClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\n #config: Partial<RequestConfig> & { client?: Client }\n\n constructor(config: Partial<RequestConfig> & { client?: Client } = {}) {\n this.#config = config\n }\n\n${methods.join('\\n\\n')}\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children}\n </File.Source>\n )\n}\nClassClient.getParams = Client.getParams\n","import { URLPath } from '@internals/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps): FabricReactNode {\n const operationsObject: Record<string, { path: string; method: HttpMethod }> = {}\n\n operations.forEach((operation) => {\n operationsObject[operation.getOperationId()] = {\n path: new URLPath(operation.path).URL,\n method: operation.method,\n }\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={name} export>\n {JSON.stringify(operationsObject, undefined, 2)}\n </Const>\n </File.Source>\n )\n}\n","import { buildJSDoc, URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments } from '@kubb/plugin-oas/utils'\nimport { File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginClient } from '../types.ts'\nimport { Client } from './Client.tsx'\n\ntype Props = {\n name: string\n isExportable?: boolean\n isIndexable?: boolean\n operations: Array<{\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n }>\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n paramsType: PluginClient['resolvedOptions']['pathParamsType']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n children?: FabricReactNode\n}\n\ntype GenerateMethodProps = {\n operation: Operation\n name: string\n typeSchemas: OperationSchemas\n zodSchemas: OperationSchemas | undefined\n baseURL: string | undefined\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n paramsType: PluginClient['resolvedOptions']['paramsType']\n paramsCasing: PluginClient['resolvedOptions']['paramsCasing']\n pathParamsType: PluginClient['resolvedOptions']['pathParamsType']\n}\n\nfunction buildHeaders(contentType: string, hasHeaderParams: boolean): Array<string> {\n return [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n hasHeaderParams ? '...headers' : undefined,\n ].filter(Boolean) as Array<string>\n}\n\nfunction buildGenerics(typeSchemas: OperationSchemas): Array<string> {\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n return [typeSchemas.response.name, TError, typeSchemas.request?.name || 'unknown'].filter(Boolean)\n}\n\nfunction buildClientParams({\n operation,\n path,\n baseURL,\n typeSchemas,\n isFormData,\n headers,\n}: {\n operation: Operation\n path: URLPath\n baseURL: string | undefined\n typeSchemas: OperationSchemas\n isFormData: boolean\n headers: Array<string>\n}) {\n return FunctionParams.factory({\n config: {\n mode: 'object',\n children: {\n requestConfig: {\n mode: 'inlineSpread',\n },\n method: {\n value: JSON.stringify(operation.method.toUpperCase()),\n },\n url: {\n value: path.template,\n },\n baseURL: baseURL\n ? {\n value: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? 'formData as FormData' : 'requestData',\n }\n : undefined,\n headers: headers.length\n ? {\n value: `{ ${headers.join(', ')}, ...requestConfig.headers }`,\n }\n : undefined,\n },\n },\n })\n}\n\nfunction buildRequestDataLine({\n parser,\n zodSchemas,\n typeSchemas,\n}: {\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n typeSchemas: OperationSchemas\n}): string {\n if (parser === 'zod' && zodSchemas?.request?.name) {\n return `const requestData = ${zodSchemas.request.name}.parse(data)`\n }\n if (typeSchemas?.request?.name) {\n return 'const requestData = data'\n }\n return ''\n}\n\nfunction buildFormDataLine(isFormData: boolean, hasRequest: boolean): string {\n return isFormData && hasRequest ? 'const formData = buildFormData(requestData)' : ''\n}\n\nfunction buildReturnStatement({\n dataReturnType,\n parser,\n zodSchemas,\n}: {\n dataReturnType: PluginClient['resolvedOptions']['dataReturnType']\n parser: PluginClient['resolvedOptions']['parser'] | undefined\n zodSchemas: OperationSchemas | undefined\n}): string {\n if (dataReturnType === 'full' && parser === 'zod' && zodSchemas) {\n return `return {...res, data: ${zodSchemas.response.name}.parse(res.data)}`\n }\n if (dataReturnType === 'data' && parser === 'zod' && zodSchemas) {\n return `return ${zodSchemas.response.name}.parse(res.data)`\n }\n if (dataReturnType === 'full' && parser === 'client') {\n return 'return res'\n }\n return 'return res.data'\n}\n\nfunction generateMethod({\n operation,\n name,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: GenerateMethodProps): string {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = buildHeaders(contentType, !!typeSchemas.headerParams?.name)\n const generics = buildGenerics(typeSchemas)\n const params = Client.getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable: true })\n const clientParams = buildClientParams({ operation, path, baseURL, typeSchemas, isFormData, headers })\n const jsdoc = buildJSDoc(getComments(operation))\n\n const requestDataLine = buildRequestDataLine({ parser, zodSchemas, typeSchemas })\n const formDataLine = buildFormDataLine(isFormData, !!typeSchemas?.request?.name)\n const returnStatement = buildReturnStatement({ dataReturnType, parser, zodSchemas })\n\n const methodBody = [\n 'const { client: request = fetch, ...requestConfig } = mergeConfig(this.#config, config)',\n '',\n requestDataLine,\n formDataLine,\n `const res = await request<${generics.join(', ')}>(${clientParams.toCall()})`,\n returnStatement,\n ]\n .filter(Boolean)\n .map((line) => ` ${line}`)\n .join('\\n')\n\n // Indent static method by 2 spaces, body by 4 spaces (matching snapshot)\n return `${jsdoc} static async ${name}(${params.toConstructor()}) {\\n${methodBody}\\n }`\n}\n\nexport function StaticClassClient({\n name,\n isExportable = true,\n isIndexable = true,\n operations,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n children,\n}: Props): FabricReactNode {\n const methods = operations.map(({ operation, name: methodName, typeSchemas, zodSchemas }) =>\n generateMethod({\n operation,\n name: methodName,\n typeSchemas,\n zodSchemas,\n baseURL,\n dataReturnType,\n parser,\n paramsType,\n paramsCasing,\n pathParamsType,\n }),\n )\n\n const classCode = `export class ${name} {\\n static #config: Partial<RequestConfig> & { client?: Client } = {}\\n\\n${methods.join('\\n\\n')}\\n}`\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n {classCode}\n {children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