@kubb/plugin-vue-query 5.5.3 → 5.5.4

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
@@ -345,7 +345,7 @@ var compatibility = {
345
345
  };
346
346
  //#endregion
347
347
  //#region package.json
348
- var version = "5.5.3";
348
+ var version = "5.5.4";
349
349
  //#endregion
350
350
  //#region ../../internals/tanstack-query/src/components/HookFile.tsx
351
351
  /**
@@ -835,6 +835,16 @@ return infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${que
835
835
  //#endregion
836
836
  //#region ../../internals/tanstack-query/src/components/MutationKey.tsx
837
837
  const declarationPrinter$4 = (0, _kubb_plugin_ts.functionPrinter)({ mode: "declaration" });
838
+ /**
839
+ * Default `mutationKey` builder. Call it from a custom builder to extend the default key.
840
+ *
841
+ * @remarks The returned segments may change between releases. Spread them instead of reading single entries.
842
+ *
843
+ * @example
844
+ * ```ts
845
+ * mutationKey: (props) => [JSON.stringify(props.node.operationId), ...mutationKeyTransformer(props)]
846
+ * ```
847
+ */
838
848
  const mutationKeyTransformer = ({ node }) => {
839
849
  if (!node.path) return [];
840
850
  return [`{ url: '${kubb_kit.Url.toPath(node.path)}' }`];
@@ -926,6 +936,16 @@ function createMutationResolver() {
926
936
  //#endregion
927
937
  //#region ../../internals/tanstack-query/src/components/QueryKey.tsx
928
938
  const declarationPrinter$3 = (0, _kubb_plugin_ts.functionPrinter)({ mode: "declaration" });
939
+ /**
940
+ * Default `queryKey` builder. Call it from a custom builder to extend the default key.
941
+ *
942
+ * @remarks The returned segments may change between releases. Spread them instead of reading single entries.
943
+ *
944
+ * @example
945
+ * ```ts
946
+ * queryKey: (props) => [JSON.stringify(props.node.operationId), ...queryKeyTransformer(props)]
947
+ * ```
948
+ */
929
949
  const queryKeyTransformer = ({ node, variant }) => {
930
950
  if (!node.path) return [];
931
951
  const { path, query } = getOperationParameters(node);
@@ -1752,8 +1772,10 @@ const pluginVueQuery = (0, kubb_kit.defineExtension)({
1752
1772
  //#endregion
1753
1773
  exports.default = pluginVueQuery;
1754
1774
  exports.definePageParam = definePageParam;
1775
+ exports.mutationKeyTransformer = mutationKeyTransformer;
1755
1776
  exports.pluginVueQuery = pluginVueQuery;
1756
1777
  exports.pluginVueQueryName = pluginVueQueryName;
1778
+ exports.queryKeyTransformer = queryKeyTransformer;
1757
1779
  exports.resolverVueQuery = resolverVueQuery;
1758
1780
 
1759
1781
  //# sourceMappingURL=index.cjs.map