@kubb/plugin-react-query 3.5.5 → 3.5.7

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 (45) hide show
  1. package/dist/{chunk-VC4S3P5L.js → chunk-CO3KLAV4.js} +10 -10
  2. package/dist/chunk-CO3KLAV4.js.map +1 -0
  3. package/dist/{chunk-K2SXRS7U.js → chunk-LVGRZJKZ.js} +85 -85
  4. package/dist/chunk-LVGRZJKZ.js.map +1 -0
  5. package/dist/{chunk-V7E7AGU4.cjs → chunk-ODTL4QSL.cjs} +85 -85
  6. package/dist/chunk-ODTL4QSL.cjs.map +1 -0
  7. package/dist/{chunk-BQFIDATQ.cjs → chunk-ZVI74AOG.cjs} +29 -29
  8. package/dist/chunk-ZVI74AOG.cjs.map +1 -0
  9. package/dist/components.cjs +9 -9
  10. package/dist/components.js +1 -1
  11. package/dist/generators.cjs +6 -6
  12. package/dist/generators.js +2 -2
  13. package/dist/index.cjs +7 -7
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +4 -4
  16. package/dist/index.js.map +1 -1
  17. package/package.json +12 -12
  18. package/src/components/InfiniteQuery.tsx +2 -2
  19. package/src/components/InfiniteQueryOptions.tsx +6 -2
  20. package/src/components/Mutation.tsx +1 -1
  21. package/src/components/Query.tsx +2 -2
  22. package/src/components/QueryOptions.tsx +6 -2
  23. package/src/components/SuspenseQuery.tsx +2 -2
  24. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +6 -2
  25. package/src/generators/__snapshots__/clientGetImportPath.ts +6 -2
  26. package/src/generators/__snapshots__/clientPostImportPath.ts +1 -1
  27. package/src/generators/__snapshots__/findByTags.ts +6 -2
  28. package/src/generators/__snapshots__/findByTagsObject.ts +2 -2
  29. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +6 -2
  30. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +6 -2
  31. package/src/generators/__snapshots__/findByTagsWithZod.ts +6 -2
  32. package/src/generators/__snapshots__/findInfiniteByTags.ts +2 -2
  33. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +2 -2
  34. package/src/generators/__snapshots__/getPetIdCamelCase.ts +2 -2
  35. package/src/generators/__snapshots__/postAsQuery.ts +2 -2
  36. package/src/generators/__snapshots__/updatePetById.ts +1 -1
  37. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +1 -1
  38. package/src/generators/infiniteQueryGenerator.tsx +1 -1
  39. package/src/generators/mutationGenerator.tsx +1 -1
  40. package/src/generators/queryGenerator.tsx +1 -1
  41. package/src/generators/suspenseQueryGenerator.tsx +1 -1
  42. package/dist/chunk-BQFIDATQ.cjs.map +0 -1
  43. package/dist/chunk-K2SXRS7U.js.map +0 -1
  44. package/dist/chunk-V7E7AGU4.cjs.map +0 -1
  45. package/dist/chunk-VC4S3P5L.js.map +0 -1
@@ -23,7 +23,7 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
23
23
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
24
24
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
25
25
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
26
- } : void 0
26
+ } : undefined
27
27
  });
28
28
  }
29
29
  function Url({ name, isExportable = true, isIndexable = true, typeSchemas, baseURL, paramsType, paramsCasing, pathParamsType, operation }) {
@@ -42,15 +42,15 @@ function getParams2({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
42
42
  data: typeSchemas.request?.name ? {
43
43
  type: typeSchemas.request?.name,
44
44
  optional: oas.isOptional(typeSchemas.request?.schema)
45
- } : void 0,
45
+ } : undefined,
46
46
  params: typeSchemas.queryParams?.name ? {
47
47
  type: typeSchemas.queryParams?.name,
48
48
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
49
- } : void 0,
49
+ } : undefined,
50
50
  headers: typeSchemas.headerParams?.name ? {
51
51
  type: typeSchemas.headerParams?.name,
52
52
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
53
- } : void 0
53
+ } : undefined
54
54
  }
55
55
  },
56
56
  config: {
@@ -64,19 +64,19 @@ function getParams2({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
64
64
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
65
65
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
66
66
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
67
- } : void 0,
67
+ } : undefined,
68
68
  data: typeSchemas.request?.name ? {
69
69
  type: typeSchemas.request?.name,
70
70
  optional: oas.isOptional(typeSchemas.request?.schema)
71
- } : void 0,
71
+ } : undefined,
72
72
  params: typeSchemas.queryParams?.name ? {
73
73
  type: typeSchemas.queryParams?.name,
74
74
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
75
- } : void 0,
75
+ } : undefined,
76
76
  headers: typeSchemas.headerParams?.name ? {
77
77
  type: typeSchemas.headerParams?.name,
78
78
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
79
- } : void 0,
79
+ } : undefined,
80
80
  config: {
81
81
  type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }",
82
82
  default: "{}"
@@ -102,8 +102,8 @@ function Client({
102
102
  const contentType = operation.getContentType();
103
103
  const isFormData = contentType === "multipart/form-data";
104
104
  const headers = [
105
- contentType !== "application/json" ? `'Content-Type': '${contentType}'` : void 0,
106
- typeSchemas.headerParams?.name ? "...headers" : void 0
105
+ contentType !== "application/json" ? `'Content-Type': '${contentType}'` : undefined,
106
+ typeSchemas.headerParams?.name ? "...headers" : undefined
107
107
  ].filter(Boolean);
108
108
  const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
109
109
  const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || "unknown"].filter(Boolean);
@@ -126,14 +126,14 @@ function Client({
126
126
  },
127
127
  baseURL: baseURL && !urlName ? {
128
128
  value: JSON.stringify(baseURL)
129
- } : void 0,
130
- params: typeSchemas.queryParams?.name ? {} : void 0,
129
+ } : undefined,
130
+ params: typeSchemas.queryParams?.name ? {} : undefined,
131
131
  data: typeSchemas.request?.name ? {
132
- value: isFormData ? "formData" : void 0
133
- } : void 0,
132
+ value: isFormData ? "formData" : undefined
133
+ } : undefined,
134
134
  headers: headers.length ? {
135
- value: headers.length ? `{ ${headers.join(", ")}, ...requestConfig.headers }` : void 0
136
- } : void 0,
135
+ value: headers.length ? `{ ${headers.join(", ")}, ...requestConfig.headers }` : undefined
136
+ } : undefined,
137
137
  requestConfig: {
138
138
  mode: "inlineSpread"
139
139
  }
@@ -185,7 +185,7 @@ function Operations({ name, operations }) {
185
185
  method: operation.method
186
186
  };
187
187
  });
188
- return /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Const, { name, export: true, asConst: true, children: JSON.stringify(operationsObject, void 0, 2) }) });
188
+ return /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Const, { name, export: true, asConst: true, children: JSON.stringify(operationsObject, undefined, 2) }) });
189
189
  }
190
190
  function getParams3({}) {
191
191
  return react.FunctionParams.factory({});
@@ -211,25 +211,25 @@ function getParams4({ paramsCasing, dataReturnType, typeSchemas }) {
211
211
  data: typeSchemas.request?.name ? {
212
212
  type: typeSchemas.request?.name,
213
213
  optional: oas.isOptional(typeSchemas.request?.schema)
214
- } : void 0,
214
+ } : undefined,
215
215
  params: typeSchemas.queryParams?.name ? {
216
216
  type: typeSchemas.queryParams?.name,
217
217
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
218
- } : void 0,
218
+ } : undefined,
219
219
  headers: typeSchemas.headerParams?.name ? {
220
220
  type: typeSchemas.headerParams?.name,
221
221
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
222
- } : void 0
222
+ } : undefined
223
223
  });
224
224
  const TRequest = mutationParams.toConstructor({ valueAsType: true });
225
225
  const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
226
- const generics = [TData, TError, TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
226
+ const generics = [TData, TError, TRequest ? `{${TRequest}}` : undefined].filter(Boolean).join(", ");
227
227
  return react.FunctionParams.factory({
228
228
  options: {
229
229
  type: `
230
230
  {
231
231
  mutation?: UseMutationOptions<${generics}>,
232
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"},
232
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"},
233
233
  }
234
234
  `,
235
235
  default: "{}"
@@ -268,15 +268,15 @@ function Mutation({
268
268
  data: typeSchemas.request?.name ? {
269
269
  type: typeSchemas.request?.name,
270
270
  optional: oas.isOptional(typeSchemas.request?.schema)
271
- } : void 0,
271
+ } : undefined,
272
272
  params: typeSchemas.queryParams?.name ? {
273
273
  type: typeSchemas.queryParams?.name,
274
274
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
275
- } : void 0,
275
+ } : undefined,
276
276
  headers: typeSchemas.headerParams?.name ? {
277
277
  type: typeSchemas.headerParams?.name,
278
278
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
279
- } : void 0
279
+ } : undefined
280
280
  });
281
281
  const dataParams = react.FunctionParams.factory({
282
282
  data: {
@@ -287,7 +287,7 @@ function Mutation({
287
287
  if (value) {
288
288
  acc[key] = {
289
289
  ...value,
290
- type: void 0
290
+ type: undefined
291
291
  };
292
292
  }
293
293
  return acc;
@@ -297,7 +297,7 @@ function Mutation({
297
297
  const TRequest = mutationParams.toConstructor({ valueAsType: true });
298
298
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
299
299
  const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
300
- const generics = [TData, TError, TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
300
+ const generics = [TData, TError, TRequest ? `{${TRequest}}` : undefined].filter(Boolean).join(", ");
301
301
  return /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
302
302
  react.Function,
303
303
  {
@@ -331,11 +331,11 @@ function getParams5({ pathParamsType, paramsCasing, typeSchemas }) {
331
331
  data: typeSchemas.request?.name ? {
332
332
  type: typeSchemas.request?.name,
333
333
  optional: oas.isOptional(typeSchemas.request?.schema)
334
- } : void 0,
334
+ } : undefined,
335
335
  params: typeSchemas.queryParams?.name ? {
336
336
  type: typeSchemas.queryParams?.name,
337
337
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
338
- } : void 0
338
+ } : undefined
339
339
  });
340
340
  }
341
341
  var getTransformer2 = ({ operation, schemas, casing }) => {
@@ -345,8 +345,8 @@ var getTransformer2 = ({ operation, schemas, casing }) => {
345
345
  type: "path",
346
346
  stringify: true
347
347
  }),
348
- schemas.queryParams?.name ? "...(params ? [params] : [])" : void 0,
349
- schemas.request?.name ? "...(data ? [data] : [])" : void 0
348
+ schemas.queryParams?.name ? "...(params ? [params] : [])" : undefined,
349
+ schemas.request?.name ? "...(data ? [data] : [])" : undefined
350
350
  ].filter(Boolean);
351
351
  return keys;
352
352
  };
@@ -374,19 +374,19 @@ function getParams6({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
374
374
  data: typeSchemas.request?.name ? {
375
375
  type: typeSchemas.request?.name,
376
376
  optional: oas.isOptional(typeSchemas.request?.schema)
377
- } : void 0,
377
+ } : undefined,
378
378
  params: typeSchemas.queryParams?.name ? {
379
379
  type: typeSchemas.queryParams?.name,
380
380
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
381
- } : void 0,
381
+ } : undefined,
382
382
  headers: typeSchemas.headerParams?.name ? {
383
383
  type: typeSchemas.headerParams?.name,
384
384
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
385
- } : void 0
385
+ } : undefined
386
386
  }
387
387
  },
388
388
  config: {
389
- type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>",
389
+ type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }",
390
390
  default: "{}"
391
391
  }
392
392
  });
@@ -396,21 +396,21 @@ function getParams6({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
396
396
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
397
397
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
398
398
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
399
- } : void 0,
399
+ } : undefined,
400
400
  data: typeSchemas.request?.name ? {
401
401
  type: typeSchemas.request?.name,
402
402
  optional: oas.isOptional(typeSchemas.request?.schema)
403
- } : void 0,
403
+ } : undefined,
404
404
  params: typeSchemas.queryParams?.name ? {
405
405
  type: typeSchemas.queryParams?.name,
406
406
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
407
- } : void 0,
407
+ } : undefined,
408
408
  headers: typeSchemas.headerParams?.name ? {
409
409
  type: typeSchemas.headerParams?.name,
410
410
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
411
- } : void 0,
411
+ } : undefined,
412
412
  config: {
413
- type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>",
413
+ type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }",
414
414
  default: "{}"
415
415
  }
416
416
  });
@@ -430,7 +430,7 @@ function QueryOptions({ name, clientName, dataReturnType, typeSchemas, paramsCas
430
430
  typeSchemas,
431
431
  paramsCasing
432
432
  });
433
- const enabled = Object.entries(queryKeyParams.flatParams).map(([key, item]) => item && !item.optional ? key : void 0).filter(Boolean).join("&& ");
433
+ const enabled = Object.entries(queryKeyParams.flatParams).map(([key, item]) => item && !item.optional ? key : undefined).filter(Boolean).join("&& ");
434
434
  const enabledText = enabled ? `enabled: !!(${enabled}),` : "";
435
435
  return /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Function, { name, export: true, params: params.toConstructor(), children: `
436
436
  const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})
@@ -457,22 +457,22 @@ function getParams7({ paramsType, paramsCasing, pathParamsType, dataReturnType,
457
457
  data: typeSchemas.request?.name ? {
458
458
  type: typeSchemas.request?.name,
459
459
  optional: oas.isOptional(typeSchemas.request?.schema)
460
- } : void 0,
460
+ } : undefined,
461
461
  params: typeSchemas.queryParams?.name ? {
462
462
  type: typeSchemas.queryParams?.name,
463
463
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
464
- } : void 0,
464
+ } : undefined,
465
465
  headers: typeSchemas.headerParams?.name ? {
466
466
  type: typeSchemas.headerParams?.name,
467
467
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
468
- } : void 0
468
+ } : undefined
469
469
  }
470
470
  },
471
471
  options: {
472
472
  type: `
473
473
  {
474
474
  query?: Partial<QueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
475
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
475
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
476
476
  }
477
477
  `,
478
478
  default: "{}"
@@ -484,24 +484,24 @@ function getParams7({ paramsType, paramsCasing, pathParamsType, dataReturnType,
484
484
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
485
485
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
486
486
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
487
- } : void 0,
487
+ } : undefined,
488
488
  data: typeSchemas.request?.name ? {
489
489
  type: typeSchemas.request?.name,
490
490
  optional: oas.isOptional(typeSchemas.request?.schema)
491
- } : void 0,
491
+ } : undefined,
492
492
  params: typeSchemas.queryParams?.name ? {
493
493
  type: typeSchemas.queryParams?.name,
494
494
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
495
- } : void 0,
495
+ } : undefined,
496
496
  headers: typeSchemas.headerParams?.name ? {
497
497
  type: typeSchemas.headerParams?.name,
498
498
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
499
- } : void 0,
499
+ } : undefined,
500
500
  options: {
501
501
  type: `
502
502
  {
503
503
  query?: Partial<QueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
504
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
504
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
505
505
  }
506
506
  `,
507
507
  default: "{}"
@@ -581,19 +581,19 @@ function getParams8({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
581
581
  data: typeSchemas.request?.name ? {
582
582
  type: typeSchemas.request?.name,
583
583
  optional: oas.isOptional(typeSchemas.request?.schema)
584
- } : void 0,
584
+ } : undefined,
585
585
  params: typeSchemas.queryParams?.name ? {
586
586
  type: typeSchemas.queryParams?.name,
587
587
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
588
- } : void 0,
588
+ } : undefined,
589
589
  headers: typeSchemas.headerParams?.name ? {
590
590
  type: typeSchemas.headerParams?.name,
591
591
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
592
- } : void 0
592
+ } : undefined
593
593
  }
594
594
  },
595
595
  config: {
596
- type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>",
596
+ type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }",
597
597
  default: "{}"
598
598
  }
599
599
  });
@@ -603,21 +603,21 @@ function getParams8({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
603
603
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
604
604
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
605
605
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
606
- } : void 0,
606
+ } : undefined,
607
607
  data: typeSchemas.request?.name ? {
608
608
  type: typeSchemas.request?.name,
609
609
  optional: oas.isOptional(typeSchemas.request?.schema)
610
- } : void 0,
610
+ } : undefined,
611
611
  params: typeSchemas.queryParams?.name ? {
612
612
  type: typeSchemas.queryParams?.name,
613
613
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
614
- } : void 0,
614
+ } : undefined,
615
615
  headers: typeSchemas.headerParams?.name ? {
616
616
  type: typeSchemas.headerParams?.name,
617
617
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
618
- } : void 0,
618
+ } : undefined,
619
619
  config: {
620
- type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>",
620
+ type: typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }",
621
621
  default: "{}"
622
622
  }
623
623
  });
@@ -651,17 +651,17 @@ function InfiniteQueryOptions({
651
651
  });
652
652
  const queryOptions = [
653
653
  `initialPageParam: ${typeof initialPageParam === "string" ? JSON.stringify(initialPageParam) : initialPageParam}`,
654
- cursorParam ? `getNextPageParam: (lastPage) => lastPage['${cursorParam}']` : void 0,
655
- cursorParam ? `getPreviousPageParam: (firstPage) => firstPage['${cursorParam}']` : void 0,
656
- !cursorParam && dataReturnType === "full" ? "getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage.data) && lastPage.data.length === 0 ? undefined : lastPageParam + 1" : void 0,
657
- !cursorParam && dataReturnType === "data" ? "getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage) && lastPage.length === 0 ? undefined : lastPageParam + 1" : void 0,
658
- !cursorParam ? "getPreviousPageParam: (_firstPage, _allPages, firstPageParam) => firstPageParam <= 1 ? undefined : firstPageParam - 1" : void 0
654
+ cursorParam ? `getNextPageParam: (lastPage) => lastPage['${cursorParam}']` : undefined,
655
+ cursorParam ? `getPreviousPageParam: (firstPage) => firstPage['${cursorParam}']` : undefined,
656
+ !cursorParam && dataReturnType === "full" ? "getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage.data) && lastPage.data.length === 0 ? undefined : lastPageParam + 1" : undefined,
657
+ !cursorParam && dataReturnType === "data" ? "getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage) && lastPage.length === 0 ? undefined : lastPageParam + 1" : undefined,
658
+ !cursorParam ? "getPreviousPageParam: (_firstPage, _allPages, firstPageParam) => firstPageParam <= 1 ? undefined : firstPageParam - 1" : undefined
659
659
  ].filter(Boolean);
660
660
  const infiniteOverrideParams = queryParam && typeSchemas.queryParams?.name ? `
661
661
  if(params) {
662
662
  params['${queryParam}'] = pageParam as unknown as ${typeSchemas.queryParams?.name}['${queryParam}']
663
663
  }` : "";
664
- const enabled = Object.entries(queryKeyParams.flatParams).map(([key, item]) => item && !item.optional ? key : void 0).filter(Boolean).join("&& ");
664
+ const enabled = Object.entries(queryKeyParams.flatParams).map(([key, item]) => item && !item.optional ? key : undefined).filter(Boolean).join("&& ");
665
665
  const enabledText = enabled ? `enabled: !!(${enabled}),` : "";
666
666
  if (infiniteOverrideParams) {
667
667
  return /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Function, { name, export: true, params: params.toConstructor(), children: `
@@ -704,22 +704,22 @@ function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType,
704
704
  data: typeSchemas.request?.name ? {
705
705
  type: typeSchemas.request?.name,
706
706
  optional: oas.isOptional(typeSchemas.request?.schema)
707
- } : void 0,
707
+ } : undefined,
708
708
  params: typeSchemas.queryParams?.name ? {
709
709
  type: typeSchemas.queryParams?.name,
710
710
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
711
- } : void 0,
711
+ } : undefined,
712
712
  headers: typeSchemas.headerParams?.name ? {
713
713
  type: typeSchemas.headerParams?.name,
714
714
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
715
- } : void 0
715
+ } : undefined
716
716
  }
717
717
  },
718
718
  options: {
719
719
  type: `
720
720
  {
721
721
  query?: Partial<InfiniteQueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
722
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
722
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
723
723
  }
724
724
  `,
725
725
  default: "{}"
@@ -731,24 +731,24 @@ function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType,
731
731
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
732
732
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
733
733
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
734
- } : void 0,
734
+ } : undefined,
735
735
  data: typeSchemas.request?.name ? {
736
736
  type: typeSchemas.request?.name,
737
737
  optional: oas.isOptional(typeSchemas.request?.schema)
738
- } : void 0,
738
+ } : undefined,
739
739
  params: typeSchemas.queryParams?.name ? {
740
740
  type: typeSchemas.queryParams?.name,
741
741
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
742
- } : void 0,
742
+ } : undefined,
743
743
  headers: typeSchemas.headerParams?.name ? {
744
744
  type: typeSchemas.headerParams?.name,
745
745
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
746
- } : void 0,
746
+ } : undefined,
747
747
  options: {
748
748
  type: `
749
749
  {
750
750
  query?: Partial<InfiniteQueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
751
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
751
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
752
752
  }
753
753
  `,
754
754
  default: "{}"
@@ -830,22 +830,22 @@ function getParams10({ paramsType, paramsCasing, pathParamsType, dataReturnType,
830
830
  data: typeSchemas.request?.name ? {
831
831
  type: typeSchemas.request?.name,
832
832
  optional: oas.isOptional(typeSchemas.request?.schema)
833
- } : void 0,
833
+ } : undefined,
834
834
  params: typeSchemas.queryParams?.name ? {
835
835
  type: typeSchemas.queryParams?.name,
836
836
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
837
- } : void 0,
837
+ } : undefined,
838
838
  headers: typeSchemas.headerParams?.name ? {
839
839
  type: typeSchemas.headerParams?.name,
840
840
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
841
- } : void 0
841
+ } : undefined
842
842
  }
843
843
  },
844
844
  options: {
845
845
  type: `
846
846
  {
847
847
  query?: Partial<UseSuspenseQueryOptions<${[TData, TError, "TData", "TQueryKey"].join(", ")}>>,
848
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
848
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
849
849
  }
850
850
  `,
851
851
  default: "{}"
@@ -857,24 +857,24 @@ function getParams10({ paramsType, paramsCasing, pathParamsType, dataReturnType,
857
857
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
858
858
  children: utils$1.getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
859
859
  optional: oas.isOptional(typeSchemas.pathParams?.schema)
860
- } : void 0,
860
+ } : undefined,
861
861
  data: typeSchemas.request?.name ? {
862
862
  type: typeSchemas.request?.name,
863
863
  optional: oas.isOptional(typeSchemas.request?.schema)
864
- } : void 0,
864
+ } : undefined,
865
865
  params: typeSchemas.queryParams?.name ? {
866
866
  type: typeSchemas.queryParams?.name,
867
867
  optional: oas.isOptional(typeSchemas.queryParams?.schema)
868
- } : void 0,
868
+ } : undefined,
869
869
  headers: typeSchemas.headerParams?.name ? {
870
870
  type: typeSchemas.headerParams?.name,
871
871
  optional: oas.isOptional(typeSchemas.headerParams?.schema)
872
- } : void 0,
872
+ } : undefined,
873
873
  options: {
874
874
  type: `
875
875
  {
876
876
  query?: Partial<UseSuspenseQueryOptions<${[TData, TError, "TData", "TQueryKey"].join(", ")}>>,
877
- client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
877
+ client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof client }` : "Partial<RequestConfig> & { client?: typeof client }"}
878
878
  }
879
879
  `,
880
880
  default: "{}"
@@ -956,5 +956,5 @@ exports.QueryKey = QueryKey;
956
956
  exports.QueryOptions = QueryOptions;
957
957
  exports.SuspenseQuery = SuspenseQuery;
958
958
  exports.Url = Url;
959
- //# sourceMappingURL=chunk-V7E7AGU4.cjs.map
960
- //# sourceMappingURL=chunk-V7E7AGU4.cjs.map
959
+ //# sourceMappingURL=chunk-ODTL4QSL.cjs.map
960
+ //# sourceMappingURL=chunk-ODTL4QSL.cjs.map