@kubb/plugin-client 4.1.3 → 4.2.0

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.
Files changed (36) hide show
  1. package/README.md +18 -16
  2. package/dist/{Operations-CRXqVhJN.cjs → Operations-CT9m1j9w.cjs} +2 -2
  3. package/dist/Operations-CT9m1j9w.cjs.map +1 -0
  4. package/dist/{Operations-v1XspnnY.js → Operations-ktPlsW1u.js} +3 -3
  5. package/dist/Operations-ktPlsW1u.js.map +1 -0
  6. package/dist/clients/axios.d.cts +4 -4
  7. package/dist/clients/axios.d.ts +4 -4
  8. package/dist/clients/fetch.d.cts +4 -4
  9. package/dist/clients/fetch.d.ts +4 -4
  10. package/dist/components.cjs +1 -1
  11. package/dist/components.d.cts +8 -5
  12. package/dist/components.d.ts +8 -5
  13. package/dist/components.js +1 -1
  14. package/dist/{generators-Ba5WL1X9.cjs → generators-BSxTToF6.cjs} +10 -5
  15. package/dist/generators-BSxTToF6.cjs.map +1 -0
  16. package/dist/{generators-DxMViNzn.js → generators-BqXV2IXC.js} +11 -7
  17. package/dist/generators-BqXV2IXC.js.map +1 -0
  18. package/dist/generators.cjs +2 -2
  19. package/dist/generators.d.cts +1 -1
  20. package/dist/generators.d.ts +1 -1
  21. package/dist/generators.js +2 -2
  22. package/dist/index.cjs +2 -2
  23. package/dist/index.d.cts +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/{types-Dff_FBev.d.ts → types-BO1JodPd.d.cts} +78 -123
  27. package/dist/{types-CX3qvh_y.d.cts → types-sBB-Ek3Z.d.ts} +78 -123
  28. package/package.json +8 -8
  29. package/src/components/Client.tsx +1 -1
  30. package/src/generators/clientGenerator.tsx +5 -6
  31. package/src/generators/groupedClientGenerator.tsx +6 -7
  32. package/src/generators/operationsGenerator.tsx +7 -7
  33. package/dist/Operations-CRXqVhJN.cjs.map +0 -1
  34. package/dist/Operations-v1XspnnY.js.map +0 -1
  35. package/dist/generators-Ba5WL1X9.cjs.map +0 -1
  36. package/dist/generators-DxMViNzn.js.map +0 -1
package/README.md CHANGED
@@ -1,29 +1,29 @@
1
1
  <div align="center">
2
+ <h1>Plugin Client</h1>
3
+ <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
4
+ <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
5
+ </a>
2
6
 
3
- <!-- <img src="assets/logo.png" alt="logo" width="200" height="auto" /> -->
4
- <h1>@kubb/plugin-client</h1>
5
-
6
- <p>
7
- Swagger integration for Axios to generate all the different clients based on an OpenAPI specification.
8
- </p>
9
- <img src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/banner.png" alt="logo" height="auto" />
10
7
 
11
8
  [![npm version][npm-version-src]][npm-version-href]
12
9
  [![npm downloads][npm-downloads-src]][npm-downloads-href]
13
10
  [![Coverage][coverage-src]][coverage-href]
14
11
  [![License][license-src]][license-href]
15
-
12
+ [![Sponsors][sponsors-src]][sponsors-href]
16
13
  <h4>
17
- <a href="https://codesandbox.io/s/github/kubb-labs/kubb/tree/main//examples/typescript" target="_blank">View Demo</a>
18
- <span> · </span>
19
- <a href="https://kubb.dev/" target="_blank">Documentation</a>
20
- <span> · </span>
21
- <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
22
- <span> · </span>
23
- <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
24
- </h4>
14
+ <a href="https://codesandbox.io/s/github/kubb-labs/kubb/tree/main//examples/typescript" target="_blank">View Demo</a>
15
+ <span> · </span>
16
+ <a href="https://kubb.dev/" target="_blank">Documentation</a>
17
+ <span> · </span>
18
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
19
+ <span> · </span>
20
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
21
+ </h4>
25
22
  </div>
26
23
 
24
+ Swagger integration for Axios to generate all the different clients based on an OpenAPI specification.
25
+
26
+
27
27
  ## Supporting Kubb
28
28
 
29
29
  Kubb uses an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
@@ -51,3 +51,5 @@ Kubb uses an MIT-licensed open source project with its ongoing development made
51
51
  [minified-href]: https://www.npmjs.com/package/@kubb/plugin-client
52
52
  [coverage-src]: https://img.shields.io/codecov/c/github/kubb-labs/kubb?style=flat&colorA=18181B&colorB=f58517
53
53
  [coverage-href]: https://www.npmjs.com/package/@kubb/plugin-client
54
+ [sponsors-src]: https://img.shields.io/github/sponsors/stijnvanhulle?style=flat&colorA=18181B&colorB=f58517
55
+ [sponsors-href]: https://github.com/sponsors/stijnvanhulle/
@@ -118,7 +118,7 @@ function Client({ name, isExportable = true, isIndexable = true, returnType, typ
118
118
  const path = new __kubb_core_utils.URLPath(operation.path, { casing: paramsCasing });
119
119
  const contentType = operation.getContentType();
120
120
  const isFormData = contentType === "multipart/form-data";
121
- const headers = [contentType !== "application/json" ? `'Content-Type': '${contentType}'` : void 0, typeSchemas.headerParams?.name ? "...headers" : void 0].filter(Boolean);
121
+ const headers = [contentType !== "application/json" && contentType !== "multipart/form-data" ? `'Content-Type': '${contentType}'` : void 0, typeSchemas.headerParams?.name ? "...headers" : void 0].filter(Boolean);
122
122
  const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
123
123
  const generics = [
124
124
  typeSchemas.response.name,
@@ -239,4 +239,4 @@ Object.defineProperty(exports, 'Url', {
239
239
  return Url;
240
240
  }
241
241
  });
242
- //# sourceMappingURL=Operations-CRXqVhJN.cjs.map
242
+ //# sourceMappingURL=Operations-CT9m1j9w.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Operations-CT9m1j9w.cjs","names":["getParams","FunctionParams","URLPath","File","Function","Const","FunctionParams","URLPath","File","Function","operationsObject: Record<string, { path: string; method: HttpMethod }>","URLPath","File","Const"],"sources":["../src/components/Url.tsx","../src/components/Client.tsx","../src/components/Operations.tsx"],"sourcesContent":["import { URLPath } from '@kubb/core/utils'\n\nimport { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react'\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 return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\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, { typed: true, casing: paramsCasing }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({ name, isExportable = true, isIndexable = true, typeSchemas, baseURL, paramsType, paramsCasing, pathParamsType, operation }: Props) {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\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 { URLPath } from '@kubb/core/utils'\n\nimport { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { KubbNode } from '@kubb/react/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?: KubbNode\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 return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\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 config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\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, { typed: true, casing: paramsCasing }),\n optional: isOptional(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?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\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) {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? '...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({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\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: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? '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 formData = isFormData\n ? `\n const formData = new FormData()\n if (requestData) {\n Object.keys(requestData).forEach((key) => {\n const value = requestData[key as keyof typeof requestData];\n if (typeof value === 'string' || (value as unknown) instanceof Blob) {\n formData.append(key, value as unknown as string | Blob);\n } else {\n formData.append(key, JSON.stringify(value));\n }\n })\n }\n `\n : undefined\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 <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 {parser === 'zod' && zodSchemas?.request?.name && `const requestData = ${zodSchemas.request.name}.parse(data)`}\n {parser === 'client' && typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {formData}\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\nClient.getParams = getParams\n","import { URLPath } from '@kubb/core/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps) {\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"],"mappings":";;;;;;;;;;;;;AA+BA,SAASA,YAAU,EAAE,YAAY,cAAc,gBAAgB,eAA+B;AAC5F,KAAI,eAAe,SACjB,QAAOC,4BAAe,QAAQ,EAC5B,MAAM;EACJ,MAAM;EACN,UAAU,EACR,8CAAiB,YAAY,YAAY;GAAE,OAAO;GAAM,QAAQ;GAAc,CAAC,EAChF;EACF,EACF,CAAC;AAGJ,QAAOA,4BAAe,QAAQ,EAC5B,YAAY,YAAY,YAAY,OAChC;EACE,MAAM,mBAAmB,WAAW,WAAW;EAC/C,qDAAwB,YAAY,YAAY;GAAE,OAAO;GAAM,QAAQ;GAAc,CAAC;EACtF,qCAAqB,YAAY,YAAY,OAAO;EACrD,GACD,QACL,CAAC;;AAGJ,SAAgB,IAAI,EAAE,MAAM,eA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AAQ,CAAC,KAC3E,2BAA2B,SAAS,KAAK,KAAK,CAAC,IAAI,aAAa,QAAQ,CAAC;IAC7E,kDAAC,SAAK;IACL;;IACQ;GACC;;AAIlB,OAAO,YAAY;;;;AC5OnB,SAAgB,WAAW,EAAE,MAAM,cAA+B;CAChE,MAAMC,mBAAyE,EAAE;AAEjF,YAAW,SAAS,cAAc;AAChC,mBAAiB,UAAU,gBAAgB,IAAI;GAC7C,MAAM,IAAIC,0BAAQ,UAAU,KAAK,CAAC;GAClC,QAAQ,UAAU;GACnB;GACD;AAEF,QACE,kDAACC,kBAAK;EAAa;EAAM;EAAa;YACpC,kDAACC;GAAY;GAAM;aAChB,KAAK,UAAU,kBAAkB,QAAW,EAAE;IACzC;GACI"}
@@ -112,7 +112,7 @@ function Client({ name, isExportable = true, isIndexable = true, returnType, typ
112
112
  const path = new URLPath(operation.path, { casing: paramsCasing });
113
113
  const contentType = operation.getContentType();
114
114
  const isFormData = contentType === "multipart/form-data";
115
- const headers = [contentType !== "application/json" ? `'Content-Type': '${contentType}'` : void 0, typeSchemas.headerParams?.name ? "...headers" : void 0].filter(Boolean);
115
+ const headers = [contentType !== "application/json" && contentType !== "multipart/form-data" ? `'Content-Type': '${contentType}'` : void 0, typeSchemas.headerParams?.name ? "...headers" : void 0].filter(Boolean);
116
116
  const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
117
117
  const generics = [
118
118
  typeSchemas.response.name,
@@ -215,5 +215,5 @@ function Operations({ name, operations }) {
215
215
  }
216
216
 
217
217
  //#endregion
218
- export { Client, Operations, Url };
219
- //# sourceMappingURL=Operations-v1XspnnY.js.map
218
+ export { Client as n, Url as r, Operations as t };
219
+ //# sourceMappingURL=Operations-ktPlsW1u.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Operations-ktPlsW1u.js","names":["getParams","operationsObject: Record<string, { path: string; method: HttpMethod }>"],"sources":["../src/components/Url.tsx","../src/components/Client.tsx","../src/components/Operations.tsx"],"sourcesContent":["import { URLPath } from '@kubb/core/utils'\n\nimport { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { Const, File, Function, FunctionParams } from '@kubb/react'\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 return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\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, { typed: true, casing: paramsCasing }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Url({ name, isExportable = true, isIndexable = true, typeSchemas, baseURL, paramsType, paramsCasing, pathParamsType, operation }: Props) {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })\n\n return (\n <File.Source name={name} isExportable={isExportable} isIndexable={isIndexable}>\n <Function name={name} export={isExportable} params={params.toConstructor()}>\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 { URLPath } from '@kubb/core/utils'\n\nimport { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { KubbNode } from '@kubb/react/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?: KubbNode\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 return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\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 config: isConfigurable\n ? {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\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, { typed: true, casing: paramsCasing }),\n optional: isOptional(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?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\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) {\n const path = new URLPath(operation.path, { casing: paramsCasing })\n const contentType = operation.getContentType()\n const isFormData = contentType === 'multipart/form-data'\n const headers = [\n contentType !== 'application/json' && contentType !== 'multipart/form-data' ? `'Content-Type': '${contentType}'` : undefined,\n typeSchemas.headerParams?.name ? '...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({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable })\n const urlParams = Url.getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\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: JSON.stringify(baseURL),\n }\n : undefined,\n params: typeSchemas.queryParams?.name ? {} : undefined,\n data: typeSchemas.request?.name\n ? {\n value: isFormData ? '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 formData = isFormData\n ? `\n const formData = new FormData()\n if (requestData) {\n Object.keys(requestData).forEach((key) => {\n const value = requestData[key as keyof typeof requestData];\n if (typeof value === 'string' || (value as unknown) instanceof Blob) {\n formData.append(key, value as unknown as string | Blob);\n } else {\n formData.append(key, JSON.stringify(value));\n }\n })\n }\n `\n : undefined\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 <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 {parser === 'zod' && zodSchemas?.request?.name && `const requestData = ${zodSchemas.request.name}.parse(data)`}\n {parser === 'client' && typeSchemas?.request?.name && 'const requestData = data'}\n <br />\n {formData}\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\nClient.getParams = getParams\n","import { URLPath } from '@kubb/core/utils'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport { Const, File } from '@kubb/react'\n\ntype OperationsProps = {\n name: string\n operations: Array<Operation>\n}\n\nexport function Operations({ name, operations }: OperationsProps) {\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"],"mappings":";;;;;;;AA+BA,SAASA,YAAU,EAAE,YAAY,cAAc,gBAAgB,eAA+B;AAC5F,KAAI,eAAe,SACjB,QAAO,eAAe,QAAQ,EAC5B,MAAM;EACJ,MAAM;EACN,UAAU,EACR,GAAG,cAAc,YAAY,YAAY;GAAE,OAAO;GAAM,QAAQ;GAAc,CAAC,EAChF;EACF,EACF,CAAC;AAGJ,QAAO,eAAe,QAAQ,EAC5B,YAAY,YAAY,YAAY,OAChC;EACE,MAAM,mBAAmB,WAAW,WAAW;EAC/C,UAAU,cAAc,YAAY,YAAY;GAAE,OAAO;GAAM,QAAQ;GAAc,CAAC;EACtF,UAAU,WAAW,YAAY,YAAY,OAAO;EACrD,GACD,QACL,CAAC;;AAGJ,SAAgB,IAAI,EAAE,MAAM,eAAe,MAAM,cAAc,MAAM,aA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Q,CAAC,KAC3E,2BAA2B,SAAS,KAAK,KAAK,CAAC,IAAI,aAAa,QAAQ,CAAC;IAC7E,oBAAC,SAAK;IACL;;IACQ;GACC;;AAIlB,OAAO,YAAY;;;;AC5OnB,SAAgB,WAAW,EAAE,MAAM,cAA+B;CAChE,MAAMC,mBAAyE,EAAE;AAEjF,YAAW,SAAS,cAAc;AAChC,mBAAiB,UAAU,gBAAgB,IAAI;GAC7C,MAAM,IAAI,QAAQ,UAAU,KAAK,CAAC;GAClC,QAAQ,UAAU;GACnB;GACD;AAEF,QACE,oBAAC,KAAK;EAAa;EAAM;EAAa;YACpC,oBAAC;GAAY;GAAM;aAChB,KAAK,UAAU,kBAAkB,QAAW,EAAE;IACzC;GACI"}
@@ -5,12 +5,12 @@ import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
5
5
  /**
6
6
  * Subset of AxiosRequestConfig
7
7
  */
8
- type RequestConfig<TData = unknown> = {
8
+ type RequestConfig<TData$1 = unknown> = {
9
9
  baseURL?: string;
10
10
  url?: string;
11
11
  method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD';
12
12
  params?: unknown;
13
- data?: TData | FormData;
13
+ data?: TData$1 | FormData;
14
14
  responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
15
15
  signal?: AbortSignal;
16
16
  validateStatus?: (status: number) => boolean;
@@ -19,8 +19,8 @@ type RequestConfig<TData = unknown> = {
19
19
  /**
20
20
  * Subset of AxiosResponse
21
21
  */
22
- type ResponseConfig<TData = unknown> = {
23
- data: TData;
22
+ type ResponseConfig<TData$1 = unknown> = {
23
+ data: TData$1;
24
24
  status: number;
25
25
  statusText: string;
26
26
  headers: AxiosResponse['headers'];
@@ -5,12 +5,12 @@ import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
5
5
  /**
6
6
  * Subset of AxiosRequestConfig
7
7
  */
8
- type RequestConfig<TData = unknown> = {
8
+ type RequestConfig<TData$1 = unknown> = {
9
9
  baseURL?: string;
10
10
  url?: string;
11
11
  method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD';
12
12
  params?: unknown;
13
- data?: TData | FormData;
13
+ data?: TData$1 | FormData;
14
14
  responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
15
15
  signal?: AbortSignal;
16
16
  validateStatus?: (status: number) => boolean;
@@ -19,8 +19,8 @@ type RequestConfig<TData = unknown> = {
19
19
  /**
20
20
  * Subset of AxiosResponse
21
21
  */
22
- type ResponseConfig<TData = unknown> = {
23
- data: TData;
22
+ type ResponseConfig<TData$1 = unknown> = {
23
+ data: TData$1;
24
24
  status: number;
25
25
  statusText: string;
26
26
  headers: AxiosResponse['headers'];
@@ -6,12 +6,12 @@ type RequestCredentials = 'omit' | 'same-origin' | 'include';
6
6
  /**
7
7
  * Subset of FetchRequestConfig
8
8
  */
9
- type RequestConfig<TData = unknown> = {
9
+ type RequestConfig<TData$1 = unknown> = {
10
10
  baseURL?: string;
11
11
  url?: string;
12
12
  method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD';
13
13
  params?: unknown;
14
- data?: TData | FormData;
14
+ data?: TData$1 | FormData;
15
15
  responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
16
16
  signal?: AbortSignal;
17
17
  headers?: [string, string][] | Record<string, string>;
@@ -20,8 +20,8 @@ type RequestConfig<TData = unknown> = {
20
20
  /**
21
21
  * Subset of FetchResponse
22
22
  */
23
- type ResponseConfig<TData = unknown> = {
24
- data: TData;
23
+ type ResponseConfig<TData$1 = unknown> = {
24
+ data: TData$1;
25
25
  status: number;
26
26
  statusText: string;
27
27
  headers: Headers;
@@ -6,12 +6,12 @@ type RequestCredentials = 'omit' | 'same-origin' | 'include';
6
6
  /**
7
7
  * Subset of FetchRequestConfig
8
8
  */
9
- type RequestConfig<TData = unknown> = {
9
+ type RequestConfig<TData$1 = unknown> = {
10
10
  baseURL?: string;
11
11
  url?: string;
12
12
  method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD';
13
13
  params?: unknown;
14
- data?: TData | FormData;
14
+ data?: TData$1 | FormData;
15
15
  responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
16
16
  signal?: AbortSignal;
17
17
  headers?: [string, string][] | Record<string, string>;
@@ -20,8 +20,8 @@ type RequestConfig<TData = unknown> = {
20
20
  /**
21
21
  * Subset of FetchResponse
22
22
  */
23
- type ResponseConfig<TData = unknown> = {
24
- data: TData;
23
+ type ResponseConfig<TData$1 = unknown> = {
24
+ data: TData$1;
25
25
  status: number;
26
26
  statusText: string;
27
27
  headers: Headers;
@@ -1,4 +1,4 @@
1
- const require_Operations = require('./Operations-CRXqVhJN.cjs');
1
+ const require_Operations = require('./Operations-CT9m1j9w.cjs');
2
2
 
3
3
  exports.Client = require_Operations.Client;
4
4
  exports.Operations = require_Operations.Operations;
@@ -1,7 +1,10 @@
1
- import { FunctionParams, KubbNode, Operation, OperationSchemas, PluginClient } from "./types-CX3qvh_y.cjs";
1
+ import { a as types_d_exports, c as __reExport, i as OperationSchemas, n as PluginClient, s as Operation } from "./types-BO1JodPd.cjs";
2
2
 
3
- //#region src/components/Client.d.ts
3
+ //#region ../react/src/index.d.ts
4
4
 
5
+ import * as import___kubb_react_fabric from "@kubb/react-fabric";
6
+ //#endregion
7
+ //#region src/components/Client.d.ts
5
8
  type Props$1 = {
6
9
  /**
7
10
  * Name of the function
@@ -21,7 +24,7 @@ type Props$1 = {
21
24
  typeSchemas: OperationSchemas;
22
25
  zodSchemas: OperationSchemas | undefined;
23
26
  operation: Operation;
24
- children?: KubbNode;
27
+ children?: types_d_exports.KubbNode;
25
28
  };
26
29
  type GetParamsProps$1 = {
27
30
  paramsCasing: PluginClient['resolvedOptions']['paramsCasing'];
@@ -55,7 +58,7 @@ declare namespace Client {
55
58
  pathParamsType,
56
59
  typeSchemas,
57
60
  isConfigurable
58
- }: GetParamsProps$1) => FunctionParams;
61
+ }: GetParamsProps$1) => index_d_exports.FunctionParams;
59
62
  }
60
63
  //#endregion
61
64
  //#region src/components/Operations.d.ts
@@ -106,7 +109,7 @@ declare namespace Url {
106
109
  paramsCasing,
107
110
  pathParamsType,
108
111
  typeSchemas
109
- }: GetParamsProps) => FunctionParams;
112
+ }: GetParamsProps) => index_d_exports.FunctionParams;
110
113
  }
111
114
  //#endregion
112
115
  export { Client, Operations, Url };
@@ -1,7 +1,10 @@
1
- import { FunctionParams, KubbNode, Operation, OperationSchemas, PluginClient } from "./types-Dff_FBev.js";
1
+ import { a as types_d_exports, c as __reExport, i as OperationSchemas, n as PluginClient, s as Operation } from "./types-sBB-Ek3Z.js";
2
2
 
3
- //#region src/components/Client.d.ts
3
+ //#region ../react/src/index.d.ts
4
4
 
5
+ import * as import___kubb_react_fabric from "@kubb/react-fabric";
6
+ //#endregion
7
+ //#region src/components/Client.d.ts
5
8
  type Props$1 = {
6
9
  /**
7
10
  * Name of the function
@@ -21,7 +24,7 @@ type Props$1 = {
21
24
  typeSchemas: OperationSchemas;
22
25
  zodSchemas: OperationSchemas | undefined;
23
26
  operation: Operation;
24
- children?: KubbNode;
27
+ children?: types_d_exports.KubbNode;
25
28
  };
26
29
  type GetParamsProps$1 = {
27
30
  paramsCasing: PluginClient['resolvedOptions']['paramsCasing'];
@@ -55,7 +58,7 @@ declare namespace Client {
55
58
  pathParamsType,
56
59
  typeSchemas,
57
60
  isConfigurable
58
- }: GetParamsProps$1) => FunctionParams;
61
+ }: GetParamsProps$1) => index_d_exports.FunctionParams;
59
62
  }
60
63
  //#endregion
61
64
  //#region src/components/Operations.d.ts
@@ -106,7 +109,7 @@ declare namespace Url {
106
109
  paramsCasing,
107
110
  pathParamsType,
108
111
  typeSchemas
109
- }: GetParamsProps) => FunctionParams;
112
+ }: GetParamsProps) => index_d_exports.FunctionParams;
110
113
  }
111
114
  //#endregion
112
115
  export { Client, Operations, Url };
@@ -1,3 +1,3 @@
1
- import { Client, Operations, Url } from "./Operations-v1XspnnY.js";
1
+ import { n as Client, r as Url, t as Operations } from "./Operations-ktPlsW1u.js";
2
2
 
3
3
  export { Client, Operations, Url };
@@ -1,11 +1,13 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_Operations = require('./Operations-CRXqVhJN.cjs');
2
+ const require_Operations = require('./Operations-CT9m1j9w.cjs');
3
3
  let __kubb_core_transformers = require("@kubb/core/transformers");
4
4
  __kubb_core_transformers = require_chunk.__toESM(__kubb_core_transformers);
5
5
  let __kubb_plugin_oas = require("@kubb/plugin-oas");
6
6
  __kubb_plugin_oas = require_chunk.__toESM(__kubb_plugin_oas);
7
7
  let __kubb_plugin_zod = require("@kubb/plugin-zod");
8
8
  __kubb_plugin_zod = require_chunk.__toESM(__kubb_plugin_zod);
9
+ let __kubb_core_hooks = require("@kubb/core/hooks");
10
+ __kubb_core_hooks = require_chunk.__toESM(__kubb_core_hooks);
9
11
  let __kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
10
12
  __kubb_plugin_oas_hooks = require_chunk.__toESM(__kubb_plugin_oas_hooks);
11
13
  let __kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
@@ -21,7 +23,8 @@ __kubb_react_jsx_runtime = require_chunk.__toESM(__kubb_react_jsx_runtime);
21
23
  const clientGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
22
24
  name: "client",
23
25
  Operation({ options, operation }) {
24
- const { plugin: { options: { output, urlType } }, pluginManager } = (0, __kubb_react.useApp)();
26
+ const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
27
+ const { options: { output, urlType } } = (0, __kubb_core_hooks.usePlugin)();
25
28
  const oas = (0, __kubb_plugin_oas_hooks.useOas)();
26
29
  const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
27
30
  const client = {
@@ -125,7 +128,8 @@ const clientGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
125
128
  const operationsGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
126
129
  name: "client",
127
130
  Operations({ operations }) {
128
- const { pluginManager, plugin: { key: pluginKey, options: { output } } } = (0, __kubb_react.useApp)();
131
+ const { key: pluginKey, options: { output } } = (0, __kubb_core_hooks.usePlugin)();
132
+ const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
129
133
  const oas = (0, __kubb_plugin_oas_hooks.useOas)();
130
134
  const name = "operations";
131
135
  const file = pluginManager.getFile({
@@ -159,7 +163,8 @@ const operationsGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
159
163
  const groupedClientGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
160
164
  name: "groupedClient",
161
165
  Operations({ operations }) {
162
- const { pluginManager, plugin: { options, key: pluginKey } } = (0, __kubb_react.useApp)();
166
+ const { options, key: pluginKey } = (0, __kubb_core_hooks.usePlugin)();
167
+ const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
163
168
  const oas = (0, __kubb_plugin_oas_hooks.useOas)();
164
169
  const { getName, getFile, getGroup } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
165
170
  return operations.reduce((acc, operation) => {
@@ -238,4 +243,4 @@ Object.defineProperty(exports, 'operationsGenerator', {
238
243
  return operationsGenerator;
239
244
  }
240
245
  });
241
- //# sourceMappingURL=generators-Ba5WL1X9.cjs.map
246
+ //# sourceMappingURL=generators-BSxTToF6.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-BSxTToF6.cjs","names":["pluginTsName","pluginZodName","File","Url","Client","File","Operations","File","Function"],"sources":["../src/generators/clientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/groupedClientGenerator.tsx"],"sourcesContent":["import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas'\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'\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({ options, operation }) {\n const pluginManager = usePluginManager()\n const {\n options: { output, urlType },\n } = usePlugin<PluginClient>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\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, { pluginKey: [pluginTsName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\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: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={client.file.path} path={zod.file.path} />\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(Boolean)}\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 { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations }) {\n const {\n key: pluginKey,\n options: { output },\n } = usePlugin<PluginClient>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import type { KubbFile } from '@kubb/core/fs'\nimport { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { camelCase } from '@kubb/core/transformers'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations }) {\n const { options, key: pluginKey } = usePlugin<PluginClient>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager()\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 = pluginManager.getFile({\n name,\n extname: '.ts',\n pluginKey,\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: pluginManager.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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWA,MAAa,8DAAqD;CAChE,MAAM;CACN,UAAU,EAAE,SAAS,aAAa;EAChC,MAAM,yDAAkC;EACxC,MAAM,EACJ,SAAS,EAAE,QAAQ,gDACQ;EAC7B,MAAM,2CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,8DAAiC;EAE9D,MAAM,SAAS;GACb,MAAM,QAAQ,WAAW,EAAE,MAAM,YAAY,CAAC;GAC9C,MAAM,QAAQ,UAAU;GACzB;EAED,MAAM,MAAM;GACV,MAAM,QAAQ,WAAW;IAAE,MAAM;IAAY,QAAQ;IAAO,QAAQ;IAAO,CAAC;GAC5E,MAAM,QAAQ,UAAU;GACzB;EAED,MAAM,OAAO;GACX,MAAM,QAAQ,WAAW,EAAE,WAAW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AAO;KACnB,CAAC;IAEF,MAAM,SAAS;KACb,MAAM,QAAQ,WAAW,EAAE,MAAM,YAAY,CAAC;KAC9C,MAAM,QAAQ,UAAU;KACzB;IAED,MAAM,eAAe,IAAI,MAAM,SAAS,KAAK,KAAK,SAAS,KAAK,KAAK;AAErE,QAAI,aACF,cAAa,QAAQ,KAAK,OAAO;QAEjC,KAAI,KAAK;KAAE;KAAM;KAAM,SAAS,CAAC,OAAO;KAAE,CAAC;;AAI/C,UAAO;KAET,EAAE,CACH,CAEkB,KAAK,EAAE,MAAM,MAAM,cAAc;AAClD,UACE,mDAACC;IAEC,UAAU,KAAK;IACf,MAAM,KAAK;IACX,MAAM,KAAK;IACX,+CAAkB;KAAE;KAAK,QAAQ,QAAQ;KAAQ,QAAQ,cAAc;KAAQ,CAAC;IAChF,+CAAkB;KAAE;KAAK,QAAQ,QAAQ;KAAQ,CAAC;eAEjD,QAAQ,KAAK,WACZ,kDAACA,kBAAK;KAAyB,MAAM,CAAC,OAAO,KAAK;KAAE,MAAM,KAAK;KAAM,MAAM,OAAO,KAAK;OAArE,OAAO,KAAsE,CAC/F,EAEF,kDAACA,kBAAK;KAAa;KAAM;KAAa;eACpC,kDAACC;MAAS;MAAa;gBACpB,YAAY,QAAQ,KAAK,WAAW,OAAO,KAAK,CAAC,KAAK,KAAK,CAAC;OACpD;MACC;MAfT,KAAK,KAgBL;IAET;;CAEL,CAAC"}
@@ -1,18 +1,20 @@
1
- import { Client, Operations, Url } from "./Operations-v1XspnnY.js";
1
+ import { n as Client, r as Url, t as Operations } from "./Operations-ktPlsW1u.js";
2
2
  import { camelCase } from "@kubb/core/transformers";
3
3
  import { createReactGenerator } from "@kubb/plugin-oas";
4
4
  import { pluginZodName } from "@kubb/plugin-zod";
5
+ import { usePlugin, usePluginManager } from "@kubb/core/hooks";
5
6
  import { useOas, useOperationManager } from "@kubb/plugin-oas/hooks";
6
7
  import { getBanner, getFooter } from "@kubb/plugin-oas/utils";
7
8
  import { pluginTsName } from "@kubb/plugin-ts";
8
- import { File, Function, useApp } from "@kubb/react";
9
+ import { File, Function } from "@kubb/react";
9
10
  import { jsx, jsxs } from "@kubb/react/jsx-runtime";
10
11
 
11
12
  //#region src/generators/clientGenerator.tsx
12
13
  const clientGenerator = createReactGenerator({
13
14
  name: "client",
14
15
  Operation({ options, operation }) {
15
- const { plugin: { options: { output, urlType } }, pluginManager } = useApp();
16
+ const pluginManager = usePluginManager();
17
+ const { options: { output, urlType } } = usePlugin();
16
18
  const oas = useOas();
17
19
  const { getSchemas, getName, getFile } = useOperationManager();
18
20
  const client = {
@@ -116,7 +118,8 @@ const clientGenerator = createReactGenerator({
116
118
  const operationsGenerator = createReactGenerator({
117
119
  name: "client",
118
120
  Operations({ operations }) {
119
- const { pluginManager, plugin: { key: pluginKey, options: { output } } } = useApp();
121
+ const { key: pluginKey, options: { output } } = usePlugin();
122
+ const pluginManager = usePluginManager();
120
123
  const oas = useOas();
121
124
  const name = "operations";
122
125
  const file = pluginManager.getFile({
@@ -150,7 +153,8 @@ const operationsGenerator = createReactGenerator({
150
153
  const groupedClientGenerator = createReactGenerator({
151
154
  name: "groupedClient",
152
155
  Operations({ operations }) {
153
- const { pluginManager, plugin: { options, key: pluginKey } } = useApp();
156
+ const { options, key: pluginKey } = usePlugin();
157
+ const pluginManager = usePluginManager();
154
158
  const oas = useOas();
155
159
  const { getName, getFile, getGroup } = useOperationManager();
156
160
  return operations.reduce((acc, operation) => {
@@ -211,5 +215,5 @@ const groupedClientGenerator = createReactGenerator({
211
215
  });
212
216
 
213
217
  //#endregion
214
- export { clientGenerator, groupedClientGenerator, operationsGenerator };
215
- //# sourceMappingURL=generators-DxMViNzn.js.map
218
+ export { operationsGenerator as n, clientGenerator as r, groupedClientGenerator as t };
219
+ //# sourceMappingURL=generators-BqXV2IXC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-BqXV2IXC.js","names":[],"sources":["../src/generators/clientGenerator.tsx","../src/generators/operationsGenerator.tsx","../src/generators/groupedClientGenerator.tsx"],"sourcesContent":["import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas'\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'\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({ options, operation }) {\n const pluginManager = usePluginManager()\n const {\n options: { output, urlType },\n } = usePlugin<PluginClient>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\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, { pluginKey: [pluginTsName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\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: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={'fetch'} path={options.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.importPath} isTypeOnly />\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={client.file.path} path={zod.file.path} />\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(Boolean)}\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 { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations }) {\n const {\n key: pluginKey,\n options: { output },\n } = usePlugin<PluginClient>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey })\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import type { KubbFile } from '@kubb/core/fs'\nimport { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { camelCase } from '@kubb/core/transformers'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function } from '@kubb/react'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations }) {\n const { options, key: pluginKey } = usePlugin<PluginClient>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager()\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 = pluginManager.getFile({\n name,\n extname: '.ts',\n pluginKey,\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: pluginManager.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"],"mappings":";;;;;;;;;;;;AAWA,MAAa,kBAAkB,qBAAmC;CAChE,MAAM;CACN,UAAU,EAAE,SAAS,aAAa;EAChC,MAAM,gBAAgB,kBAAkB;EACxC,MAAM,EACJ,SAAS,EAAE,QAAQ,cACjB,WAAyB;EAC7B,MAAM,MAAM,QAAQ;EACpB,MAAM,EAAE,YAAY,SAAS,YAAY,qBAAqB;EAE9D,MAAM,SAAS;GACb,MAAM,QAAQ,WAAW,EAAE,MAAM,YAAY,CAAC;GAC9C,MAAM,QAAQ,UAAU;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('./Operations-CT9m1j9w.cjs');
2
+ const require_generators = require('./generators-BSxTToF6.cjs');
3
3
 
4
4
  exports.clientGenerator = require_generators.clientGenerator;
5
5
  exports.groupedClientGenerator = require_generators.groupedClientGenerator;
@@ -1,4 +1,4 @@
1
- import { Generator, PluginClient } from "./types-CX3qvh_y.cjs";
1
+ import { n as PluginClient, r as Generator } from "./types-BO1JodPd.cjs";
2
2
 
3
3
  //#region src/generators/clientGenerator.d.ts
4
4
  declare const clientGenerator: Generator<PluginClient>;
@@ -1,4 +1,4 @@
1
- import { Generator, PluginClient } from "./types-Dff_FBev.js";
1
+ import { n as PluginClient, r as Generator } from "./types-sBB-Ek3Z.js";
2
2
 
3
3
  //#region src/generators/clientGenerator.d.ts
4
4
  declare const clientGenerator: Generator<PluginClient>;
@@ -1,4 +1,4 @@
1
- import "./Operations-v1XspnnY.js";
2
- import { clientGenerator, groupedClientGenerator, operationsGenerator } from "./generators-DxMViNzn.js";
1
+ import "./Operations-ktPlsW1u.js";
2
+ import { n as operationsGenerator, r as clientGenerator, t as groupedClientGenerator } from "./generators-BqXV2IXC.js";
3
3
 
4
4
  export { clientGenerator, groupedClientGenerator, operationsGenerator };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- require('./Operations-CRXqVhJN.cjs');
3
- const require_generators = require('./generators-Ba5WL1X9.cjs');
2
+ require('./Operations-CT9m1j9w.cjs');
3
+ const require_generators = require('./generators-BSxTToF6.cjs');
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
6
6
  let __kubb_core = require("@kubb/core");
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Options, PluginClient, UserPluginWithLifeCycle } from "./types-CX3qvh_y.cjs";
1
+ import { n as PluginClient, o as UserPluginWithLifeCycle, t as Options } from "./types-BO1JodPd.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginClientName = "plugin-client";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Options, PluginClient, UserPluginWithLifeCycle } from "./types-Dff_FBev.js";
1
+ import { n as PluginClient, o as UserPluginWithLifeCycle, t as Options } from "./types-sBB-Ek3Z.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginClientName = "plugin-client";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./Operations-v1XspnnY.js";
2
- import { clientGenerator, groupedClientGenerator, operationsGenerator } from "./generators-DxMViNzn.js";
1
+ import "./Operations-ktPlsW1u.js";
2
+ import { n as operationsGenerator, r as clientGenerator, t as groupedClientGenerator } from "./generators-BqXV2IXC.js";
3
3
  import path from "node:path";
4
4
  import { FileManager, PluginManager, createPlugin } from "@kubb/core";
5
5
  import { camelCase } from "@kubb/core/transformers";