@kubb/plugin-react-query 5.5.0-canary.20261014T114046 → 5.5.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.
package/dist/index.cjs CHANGED
@@ -357,7 +357,7 @@ var compatibility = {
357
357
  };
358
358
  //#endregion
359
359
  //#region package.json
360
- var version = "5.5.0-canary.20261014T114046";
360
+ var version = "5.5.0";
361
361
  //#endregion
362
362
  //#region ../../internals/client/src/resolveClient.ts
363
363
  /**
@@ -677,13 +677,14 @@ function resolvePageParamType(node, { resolver, initialPageParam, queryParam })
677
677
  }
678
678
  /**
679
679
  * Applies the shared query defaults during plugin setup: `false` disables query generation, and an
680
- * object merges over `methods: ['GET']` and the plugin's runtime `importPath`.
680
+ * object merges over `methods: ['GET', 'QUERY']` and the plugin's runtime `importPath`. QUERY
681
+ * (RFC 10008) is a safe, idempotent read that carries its input in the body, so it is a query too.
681
682
  */
682
683
  function resolveQueryConfig(query, options) {
683
684
  if (query === false) return false;
684
685
  return {
685
686
  importPath: options.importPath,
686
- methods: ["GET"],
687
+ methods: ["GET", "QUERY"],
687
688
  ...query
688
689
  };
689
690
  }
@@ -996,7 +997,7 @@ const queryKeyTransformer = ({ node, variant }) => {
996
997
  if (isInfinite) urlFields.push("infinite: true");
997
998
  const result = [`{ ${urlFields.join(", ")} }`];
998
999
  if (query.length > 0) result.push("...(query ? [query] : [])");
999
- if (node.requestBody?.content?.[0]?.schema) result.push("...(body ? [body] : [])");
1000
+ if (node.requestBody?.content?.[0]?.schema) result.push("...(body !== undefined ? [body] : [])");
1000
1001
  return result;
1001
1002
  };
1002
1003
  function QueryKey({ name, node, tsResolver, typeName, transformer, variant = "query" }) {
@@ -1939,7 +1940,7 @@ const mutationGenerator = (0, kubb_kit.defineGenerator)({
1939
1940
  //#region src/generators/queryGenerator.tsx
1940
1941
  /**
1941
1942
  * Built-in generator for `useQuery` hooks. Emits one `useFooQuery` hook per
1942
- * GET operation (configurable via `query.methods`) plus the matching
1943
+ * GET and QUERY operation (configurable via `query.methods`) plus the matching
1943
1944
  * `fooQueryKey` / `fooQueryOptions` helpers.
1944
1945
  */
1945
1946
  const queryGenerator = (0, kubb_kit.defineGenerator)({