@kubb/plugin-react-query 4.21.2 → 4.22.1

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 (57) hide show
  1. package/dist/components.d.cts +3 -1
  2. package/dist/components.d.ts +3 -1
  3. package/dist/{generators-DLX0cp80.js → generators-DTkvanZK.js} +51 -11
  4. package/dist/generators-DTkvanZK.js.map +1 -0
  5. package/dist/{generators-BNYyHlZa.cjs → generators-DtDEbt56.cjs} +51 -11
  6. package/dist/generators-DtDEbt56.cjs.map +1 -0
  7. package/dist/generators.cjs +1 -1
  8. package/dist/generators.d.cts +457 -1
  9. package/dist/generators.d.ts +457 -1
  10. package/dist/generators.js +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/types-CgOcKVIt.d.cts +204 -0
  16. package/dist/types-DoN-nl4J.d.ts +203 -0
  17. package/package.json +8 -8
  18. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +2 -2
  19. package/src/generators/__snapshots__/clientGetImportPath.ts +2 -2
  20. package/src/generators/__snapshots__/clientPostImportPath.ts +2 -2
  21. package/src/generators/__snapshots__/createUsersWithListInput.ts +2 -2
  22. package/src/generators/__snapshots__/createUsersWithListInputAsQuery.ts +2 -2
  23. package/src/generators/__snapshots__/findByStatusAllOptional.ts +2 -5
  24. package/src/generators/__snapshots__/findByStatusAllOptionalInline.ts +2 -2
  25. package/src/generators/__snapshots__/findByTags.ts +2 -2
  26. package/src/generators/__snapshots__/findByTagsObject.ts +2 -2
  27. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +2 -2
  28. package/src/generators/__snapshots__/findByTagsTemplateString.ts +2 -2
  29. package/src/generators/__snapshots__/findByTagsWithCustomOptions.ts +2 -2
  30. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
  31. package/src/generators/__snapshots__/findByTagsWithZod.ts +2 -2
  32. package/src/generators/__snapshots__/findInfiniteByStatusAllOptional.ts +2 -2
  33. package/src/generators/__snapshots__/findInfiniteByTags.ts +2 -2
  34. package/src/generators/__snapshots__/findInfiniteByTagsNextAndPreviousParam.ts +2 -2
  35. package/src/generators/__snapshots__/findInfiniteByTagsNextParam.ts +2 -2
  36. package/src/generators/__snapshots__/findInfiniteByTagsWithCustomOptions.ts +2 -2
  37. package/src/generators/__snapshots__/findSuspenseByStatusAllOptional.ts +2 -2
  38. package/src/generators/__snapshots__/findSuspenseByTags.ts +2 -2
  39. package/src/generators/__snapshots__/findSuspenseByTagsWithCustomOptions.ts +2 -2
  40. package/src/generators/__snapshots__/findSuspenseInfiniteByStatusAllOptional.ts +2 -2
  41. package/src/generators/__snapshots__/findSuspenseInfiniteByTags.ts +2 -2
  42. package/src/generators/__snapshots__/findSuspenseInfiniteByTagsCursor.ts +2 -2
  43. package/src/generators/__snapshots__/findSuspenseInfiniteByTagsWithCustomOptions.ts +2 -2
  44. package/src/generators/__snapshots__/getPetIdCamelCase.ts +2 -2
  45. package/src/generators/__snapshots__/postAsQuery.ts +2 -2
  46. package/src/generators/__snapshots__/updatePetById.ts +2 -2
  47. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +2 -2
  48. package/src/generators/__snapshots__/updatePetByIdWithCustomOptions.ts +2 -2
  49. package/src/generators/infiniteQueryGenerator.tsx +2 -2
  50. package/src/generators/mutationGenerator.tsx +2 -2
  51. package/src/generators/queryGenerator.tsx +2 -2
  52. package/src/generators/suspenseInfiniteQueryGenerator.tsx +2 -2
  53. package/src/generators/suspenseQueryGenerator.tsx +2 -2
  54. package/dist/generators-BNYyHlZa.cjs.map +0 -1
  55. package/dist/generators-DLX0cp80.js.map +0 -1
  56. package/dist/types-CdpInNzi.d.ts +0 -877
  57. package/dist/types-Fb-3R-ua.d.cts +0 -878
@@ -0,0 +1,203 @@
1
+ import { t as __name } from "./chunk-eQyhnF5A.js";
2
+ import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
3
+ import { PluginClient } from "@kubb/plugin-client";
4
+ import { Exclude, Include, OperationSchemas, Override, ResolvePathOptions } from "@kubb/plugin-oas";
5
+ import { HttpMethod, Oas, Operation, contentType } from "@kubb/oas";
6
+ import { Generator } from "@kubb/plugin-oas/generators";
7
+
8
+ //#region src/types.d.ts
9
+ type TransformerProps = {
10
+ operation: Operation;
11
+ schemas: OperationSchemas;
12
+ casing: 'camelcase' | undefined;
13
+ };
14
+ type Transformer = (props: TransformerProps) => unknown[];
15
+ type Suspense = object;
16
+ /**
17
+ * Customize the queryKey
18
+ */
19
+ type QueryKey = Transformer;
20
+ /**
21
+ * Customize the mutationKey
22
+ */
23
+ type MutationKey = Transformer;
24
+ type Query = {
25
+ /**
26
+ * Define which HttpMethods can be used for queries
27
+ * @default ['get']
28
+ */
29
+ methods: Array<HttpMethod>;
30
+ /**
31
+ * Path to the useQuery hook for useQuery functionality.
32
+ * Used as `import { useQuery } from '${importPath}'`.
33
+ * Accepts relative and absolute paths.
34
+ * Path is used as-is; relative paths are based on the generated file location.
35
+ * @default '@tanstack/react-query'
36
+ */
37
+ importPath?: string;
38
+ };
39
+ type Mutation = {
40
+ /**
41
+ * Define which HttpMethods can be used for mutations
42
+ * @default ['post', 'put', 'delete']
43
+ */
44
+ methods: Array<HttpMethod>;
45
+ /**
46
+ * Path to the useQuery hook for useQuery functionality.
47
+ * Used as `import { useQuery } from '${importPath}'`.
48
+ * Accepts relative and absolute paths.
49
+ * Path is used as-is; relative paths are based on the generated file location.
50
+ * @default '@tanstack/react-query'
51
+ */
52
+ importPath?: string;
53
+ };
54
+ type Infinite = {
55
+ /**
56
+ * Specify the params key used for `pageParam`.
57
+ * @default 'id'
58
+ */
59
+ queryParam: string;
60
+ /**
61
+ * Which field of the data is used, set it to undefined when no cursor is known.
62
+ * @deprecated Use `nextParam` and `previousParam` instead for more flexible pagination handling.
63
+ */
64
+ cursorParam?: string | undefined;
65
+ /**
66
+ * Which field of the data is used to get the cursor for the next page.
67
+ * Supports dot notation (e.g. 'pagination.next.id') or array path (e.g. ['pagination', 'next', 'id']) to access nested fields.
68
+ */
69
+ nextParam?: string | string[] | undefined;
70
+ /**
71
+ * Which field of the data is used to get the cursor for the previous page.
72
+ * Supports dot notation (e.g. 'pagination.prev.id') or array path (e.g. ['pagination', 'prev', 'id']) to access nested fields.
73
+ */
74
+ previousParam?: string | string[] | undefined;
75
+ /**
76
+ * The initial value, the value of the first page.
77
+ * @default 0
78
+ */
79
+ initialPageParam: unknown;
80
+ };
81
+ type CustomOptions = {
82
+ /**
83
+ * Path to the hook that is used to customize the hook options.
84
+ * It used as `import ${customOptions.name} from '${customOptions.importPath}'`.
85
+ * It allows both relative and absolute paths but be aware that we will not change the path.
86
+ */
87
+ importPath: string;
88
+ /**
89
+ * Name of the exported hook that is used to customize the hook options.
90
+ * It used as `import ${customOptions.name} from '${customOptions.importPath}'`.
91
+ * @default 'useCustomHookOptions'
92
+ */
93
+ name?: string;
94
+ };
95
+ type Options = {
96
+ /**
97
+ * Specify the export location for the files and define the behavior of the output
98
+ * @default { path: 'hooks', barrelType: 'named' }
99
+ */
100
+ output?: Output<Oas>;
101
+ /**
102
+ * Define which contentType should be used.
103
+ * By default, the first JSON valid mediaType is used
104
+ */
105
+ contentType?: contentType;
106
+ /**
107
+ * Group the @tanstack/query hooks based on the provided name.
108
+ */
109
+ group?: Group;
110
+ client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle' | 'paramsCasing'>;
111
+ /**
112
+ * Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
113
+ */
114
+ exclude?: Array<Exclude>;
115
+ /**
116
+ * Array containing include parameters to include tags/operations/methods/paths.
117
+ */
118
+ include?: Array<Include>;
119
+ /**
120
+ * Array containing override parameters to override `options` based on tags/operations/methods/paths.
121
+ */
122
+ override?: Array<Override<ResolvedOptions>>;
123
+ /**
124
+ * How to style your params, by default no casing is applied
125
+ * - 'camelcase' uses camelcase for the params names
126
+ */
127
+ paramsCasing?: 'camelcase';
128
+ /**
129
+ * How to pass your params.
130
+ * - 'object' returns the params and pathParams as an object.
131
+ * - 'inline' returns the params as comma separated params.
132
+ * @default 'inline'
133
+ */
134
+ paramsType?: 'object' | 'inline';
135
+ /**
136
+ * How to pass your pathParams.
137
+ * - 'object' returns the pathParams as an object.
138
+ * - 'inline': returns the pathParams as comma separated params.
139
+ * @default 'inline'
140
+ */
141
+ pathParamsType?: PluginClient['options']['pathParamsType'];
142
+ /**
143
+ * When set, an infiniteQuery hooks is added.
144
+ */
145
+ infinite?: Partial<Infinite> | false;
146
+ /**
147
+ * When set, a suspenseQuery hooks is added.
148
+ */
149
+ suspense?: Partial<Suspense> | false;
150
+ queryKey?: QueryKey;
151
+ /**
152
+ * Override some useQuery behaviors.
153
+ */
154
+ query?: Partial<Query> | false;
155
+ mutationKey?: MutationKey;
156
+ /**
157
+ * Override some useMutation behaviors.
158
+ */
159
+ mutation?: Partial<Mutation> | false;
160
+ /**
161
+ * When set, a custom hook is used to customize the options of the generated hooks.
162
+ * It will also generate a `HookOptions` type that can be used to type the custom options of each hook for type-safety.
163
+ */
164
+ customOptions?: CustomOptions;
165
+ /**
166
+ * Which parser should be used before returning the data to `@tanstack/query`.
167
+ * `'zod'` uses `@kubb/plugin-zod` to parse the data.
168
+ */
169
+ parser?: PluginClient['options']['parser'];
170
+ transformers?: {
171
+ /**
172
+ * Customize the names based on the type that is provided by the plugin.
173
+ */
174
+ name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
175
+ };
176
+ /**
177
+ * Define some generators next to the react-query generators
178
+ */
179
+ generators?: Array<Generator<PluginReactQuery>>;
180
+ };
181
+ type ResolvedOptions = {
182
+ output: Output<Oas>;
183
+ group: Options['group'];
184
+ client: NonNullable<PluginReactQuery['options']['client']>;
185
+ parser: Required<NonNullable<Options['parser']>>;
186
+ pathParamsType: NonNullable<Options['pathParamsType']>;
187
+ paramsCasing: Options['paramsCasing'];
188
+ paramsType: NonNullable<Options['paramsType']>;
189
+ /**
190
+ * Only used of infinite
191
+ */
192
+ infinite: NonNullable<Infinite> | false;
193
+ suspense: Suspense | false;
194
+ queryKey: QueryKey | undefined;
195
+ query: NonNullable<Required<Query>> | false;
196
+ mutationKey: MutationKey | undefined;
197
+ mutation: NonNullable<Required<Mutation>> | false;
198
+ customOptions: NonNullable<Required<CustomOptions>> | undefined;
199
+ };
200
+ type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options, ResolvedOptions, never, ResolvePathOptions>;
201
+ //#endregion
202
+ export { Transformer as i, Options as n, PluginReactQuery as r, Infinite as t };
203
+ //# sourceMappingURL=types-DoN-nl4J.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-react-query",
3
- "version": "4.21.2",
3
+ "version": "4.22.1",
4
4
  "description": "React Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for React applications.",
5
5
  "keywords": [
6
6
  "react-query",
@@ -73,13 +73,13 @@
73
73
  ],
74
74
  "dependencies": {
75
75
  "@kubb/react-fabric": "0.12.11",
76
- "remeda": "^2.33.5",
77
- "@kubb/core": "4.21.2",
78
- "@kubb/oas": "4.21.2",
79
- "@kubb/plugin-client": "4.21.2",
80
- "@kubb/plugin-oas": "4.21.2",
81
- "@kubb/plugin-ts": "4.21.2",
82
- "@kubb/plugin-zod": "4.21.2"
76
+ "remeda": "^2.33.6",
77
+ "@kubb/core": "4.22.1",
78
+ "@kubb/oas": "4.22.1",
79
+ "@kubb/plugin-client": "4.22.1",
80
+ "@kubb/plugin-oas": "4.22.1",
81
+ "@kubb/plugin-ts": "4.22.1",
82
+ "@kubb/plugin-zod": "4.22.1"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "@kubb/react-fabric": "0.12.11"
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import fetch from 'axios'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
- import type { RequestConfig, ResponseErrorConfig } from 'axios'
7
+ import type { Client, RequestConfig, ResponseErrorConfig } from 'axios'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
9
9
 
10
10
  export const findPetsByTagsQueryKey = (params: FindPetsByTagsQueryParams = {}) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import fetch from 'axios'
6
6
  import type { UseMutationOptions, UseMutationResult, QueryClient } from '@tanstack/react-query'
7
- import type { RequestConfig, ResponseErrorConfig } from 'axios'
7
+ import type { Client, RequestConfig, ResponseErrorConfig } from 'axios'
8
8
  import { mutationOptions, useMutation } from '@tanstack/react-query'
9
9
 
10
10
  export const updatePetWithFormMutationKey = () => [{ url: '/pet/:pet_id' }] as const
@@ -19,7 +19,7 @@ export async function updatePetWithForm(
19
19
  petId: UpdatePetWithFormPathParams['petId'],
20
20
  data?: UpdatePetWithFormMutationRequest,
21
21
  params?: UpdatePetWithFormQueryParams,
22
- config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { UseMutationOptions, UseMutationResult, QueryClient } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { mutationOptions, useMutation } from '@tanstack/react-query'
@@ -18,7 +18,7 @@ export type CreateUsersWithListInputMutationKey = ReturnType<typeof createUsersW
18
18
  */
19
19
  export async function createUsersWithListInput(
20
20
  data?: CreateUsersWithListInputMutationRequest,
21
- config: Partial<RequestConfig<CreateUsersWithListInputMutationRequest>> & { client?: typeof fetch } = {},
21
+ config: Partial<RequestConfig<CreateUsersWithListInputMutationRequest>> & { client?: Client } = {},
22
22
  ) {
23
23
  const { client: request = fetch, ...requestConfig } = config
24
24
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type CreateUsersWithListInputQueryKey = ReturnType<typeof createUsersWith
19
19
  */
20
20
  export async function createUsersWithListInput(
21
21
  data?: CreateUsersWithListInputMutationRequest,
22
- config: Partial<RequestConfig<CreateUsersWithListInputMutationRequest>> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig<CreateUsersWithListInputMutationRequest>> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -16,10 +16,7 @@ export type FindPetsByStatusQueryKey = ReturnType<typeof findPetsByStatusQueryKe
16
16
  * @summary Finds Pets by status
17
17
  * {@link /pet/findByStatus}
18
18
  */
19
- export async function findPetsByStatus(
20
- { params }: { params?: FindPetsByStatusQueryParams } = {},
21
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
- ) {
19
+ export async function findPetsByStatus({ params }: { params?: FindPetsByStatusQueryParams } = {}, config: Partial<RequestConfig> & { client?: Client } = {}) {
23
20
  const { client: request = fetch, ...requestConfig } = config
24
21
 
25
22
  const res = await request<FindPetsByStatusQueryResponse, ResponseErrorConfig<FindPetsByStatus400>, unknown>({
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -16,7 +16,7 @@ export type FindPetsByStatusQueryKey = ReturnType<typeof findPetsByStatusQueryKe
16
16
  * @summary Finds Pets by status
17
17
  * {@link /pet/findByStatus}
18
18
  */
19
- export async function findPetsByStatus(params?: FindPetsByStatusQueryParams, config: Partial<RequestConfig> & { client?: typeof fetch } = {}) {
19
+ export async function findPetsByStatus(params?: FindPetsByStatusQueryParams, config: Partial<RequestConfig> & { client?: Client } = {}) {
20
20
  const { client: request = fetch, ...requestConfig } = config
21
21
 
22
22
  const res = await request<FindPetsByStatusQueryResponse, ResponseErrorConfig<FindPetsByStatus400>, unknown>({
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -18,7 +18,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
18
18
  */
19
19
  export async function findPetsByTags(
20
20
  { headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams },
21
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
21
+ config: Partial<RequestConfig> & { client?: Client } = {},
22
22
  ) {
23
23
  const { client: request = fetch, ...requestConfig } = config
24
24
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -20,7 +20,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
20
20
  export async function findPetsByTags(
21
21
  headers: FindPetsByTagsHeaderParams,
22
22
  params?: FindPetsByTagsQueryParams,
23
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
23
+ config: Partial<RequestConfig> & { client?: Client } = {},
24
24
  ) {
25
25
  const { client: request = fetch, ...requestConfig } = config
26
26
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
19
19
  export async function findPetsByTags(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByStatusInfiniteQueryKey = ReturnType<typeof findPetsByStatu
19
19
  */
20
20
  export async function findPetsByStatusInfinite(
21
21
  { params }: { params?: FindPetsByStatusQueryParams } = {},
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
19
19
  export async function findPetsByTagsInfinite(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
19
19
  export async function findPetsByTagsInfinite(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
19
19
  export async function findPetsByTagsInfinite(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
@@ -20,7 +20,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
20
20
  export async function findPetsByTagsInfinite(
21
21
  headers: FindPetsByTagsHeaderParams,
22
22
  params?: FindPetsByTagsQueryParams,
23
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
23
+ config: Partial<RequestConfig> & { client?: Client } = {},
24
24
  ) {
25
25
  const { client: request = fetch, ...requestConfig } = config
26
26
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useSuspenseQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByStatusSuspenseQueryKey = ReturnType<typeof findPetsByStatu
19
19
  */
20
20
  export async function findPetsByStatusSuspense(
21
21
  { params }: { params?: FindPetsByStatusQueryParams } = {},
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useSuspenseQuery } from '@tanstack/react-query'
@@ -19,7 +19,7 @@ export type FindPetsByTagsSuspenseQueryKey = ReturnType<typeof findPetsByTagsSus
19
19
  export async function findPetsByTagsSuspense(
20
20
  headers: FindPetsByTagsHeaderParams,
21
21
  params?: FindPetsByTagsQueryParams,
22
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
22
+ config: Partial<RequestConfig> & { client?: Client } = {},
23
23
  ) {
24
24
  const { client: request = fetch, ...requestConfig } = config
25
25
 
@@ -2,7 +2,7 @@
2
2
  * Generated by Kubb (https://kubb.dev/).
3
3
  * Do not edit manually.
4
4
  */
5
- import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
5
+ import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
6
6
  import type { QueryKey, QueryClient, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query'
7
7
  import { fetch } from './test/.kubb/fetch'
8
8
  import { queryOptions, useSuspenseQuery } from '@tanstack/react-query'
@@ -20,7 +20,7 @@ export type FindPetsByTagsSuspenseQueryKey = ReturnType<typeof findPetsByTagsSus
20
20
  export async function findPetsByTagsSuspense(
21
21
  headers: FindPetsByTagsHeaderParams,
22
22
  params?: FindPetsByTagsQueryParams,
23
- config: Partial<RequestConfig> & { client?: typeof fetch } = {},
23
+ config: Partial<RequestConfig> & { client?: Client } = {},
24
24
  ) {
25
25
  const { client: request = fetch, ...requestConfig } = config
26
26