@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 +23 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/docs/options.md +20 -4
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -138,6 +138,32 @@ type Infinite = {
|
|
|
138
138
|
};
|
|
139
139
|
type PageParamFn<TPage = any, TParam = any> = (page: TPage, allPages: Array<TPage>, pageParam: TParam, allPageParams: Array<TParam>) => TParam | undefined | null;
|
|
140
140
|
//#endregion
|
|
141
|
+
//#region ../../internals/tanstack-query/src/components/MutationKey.d.ts
|
|
142
|
+
/**
|
|
143
|
+
* Default `mutationKey` builder. Call it from a custom builder to extend the default key.
|
|
144
|
+
*
|
|
145
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts
|
|
149
|
+
* mutationKey: (props) => [JSON.stringify(props.node.operationId), ...mutationKeyTransformer(props)]
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare const mutationKeyTransformer: Transformer;
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region ../../internals/tanstack-query/src/components/QueryKey.d.ts
|
|
155
|
+
/**
|
|
156
|
+
* Default `queryKey` builder. Call it from a custom builder to extend the default key.
|
|
157
|
+
*
|
|
158
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* queryKey: (props) => [JSON.stringify(props.node.operationId), ...queryKeyTransformer(props)]
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export declare const queryKeyTransformer: Transformer;
|
|
166
|
+
//#endregion
|
|
141
167
|
//#region ../../internals/tanstack-query/src/utils.d.ts
|
|
142
168
|
/**
|
|
143
169
|
* Helper to define a typed page param function for `infinite.getNextPageParam` or
|
|
@@ -397,5 +423,5 @@ export declare const pluginVueQuery: import("kubb/kit").PluginFactory<PluginVueQ
|
|
|
397
423
|
*/
|
|
398
424
|
export declare const resolverVueQuery: ResolverVueQuery;
|
|
399
425
|
//#endregion
|
|
400
|
-
export { type PageParamFn, type PluginVueQuery, type ResolverVueQuery, pluginVueQuery as default };
|
|
426
|
+
export { type PageParamFn, type PluginVueQuery, type ResolverVueQuery, type Transformer, pluginVueQuery as default };
|
|
401
427
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,32 @@ type Infinite = {
|
|
|
138
138
|
};
|
|
139
139
|
type PageParamFn<TPage = any, TParam = any> = (page: TPage, allPages: Array<TPage>, pageParam: TParam, allPageParams: Array<TParam>) => TParam | undefined | null;
|
|
140
140
|
//#endregion
|
|
141
|
+
//#region ../../internals/tanstack-query/src/components/MutationKey.d.ts
|
|
142
|
+
/**
|
|
143
|
+
* Default `mutationKey` builder. Call it from a custom builder to extend the default key.
|
|
144
|
+
*
|
|
145
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts
|
|
149
|
+
* mutationKey: (props) => [JSON.stringify(props.node.operationId), ...mutationKeyTransformer(props)]
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare const mutationKeyTransformer: Transformer;
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region ../../internals/tanstack-query/src/components/QueryKey.d.ts
|
|
155
|
+
/**
|
|
156
|
+
* Default `queryKey` builder. Call it from a custom builder to extend the default key.
|
|
157
|
+
*
|
|
158
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* queryKey: (props) => [JSON.stringify(props.node.operationId), ...queryKeyTransformer(props)]
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export declare const queryKeyTransformer: Transformer;
|
|
166
|
+
//#endregion
|
|
141
167
|
//#region ../../internals/tanstack-query/src/utils.d.ts
|
|
142
168
|
/**
|
|
143
169
|
* Helper to define a typed page param function for `infinite.getNextPageParam` or
|
|
@@ -397,5 +423,5 @@ export declare const pluginVueQuery: import("kubb/kit").PluginFactory<PluginVueQ
|
|
|
397
423
|
*/
|
|
398
424
|
export declare const resolverVueQuery: ResolverVueQuery;
|
|
399
425
|
//#endregion
|
|
400
|
-
export { type PageParamFn, type PluginVueQuery, type ResolverVueQuery, pluginVueQuery as default };
|
|
426
|
+
export { type PageParamFn, type PluginVueQuery, type ResolverVueQuery, type Transformer, pluginVueQuery as default };
|
|
401
427
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -319,7 +319,7 @@ var compatibility = {
|
|
|
319
319
|
};
|
|
320
320
|
//#endregion
|
|
321
321
|
//#region package.json
|
|
322
|
-
var version = "5.5.
|
|
322
|
+
var version = "5.5.4";
|
|
323
323
|
//#endregion
|
|
324
324
|
//#region ../../internals/tanstack-query/src/components/HookFile.tsx
|
|
325
325
|
/**
|
|
@@ -809,6 +809,16 @@ return infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${que
|
|
|
809
809
|
//#endregion
|
|
810
810
|
//#region ../../internals/tanstack-query/src/components/MutationKey.tsx
|
|
811
811
|
const declarationPrinter$4 = functionPrinter({ mode: "declaration" });
|
|
812
|
+
/**
|
|
813
|
+
* Default `mutationKey` builder. Call it from a custom builder to extend the default key.
|
|
814
|
+
*
|
|
815
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
816
|
+
*
|
|
817
|
+
* @example
|
|
818
|
+
* ```ts
|
|
819
|
+
* mutationKey: (props) => [JSON.stringify(props.node.operationId), ...mutationKeyTransformer(props)]
|
|
820
|
+
* ```
|
|
821
|
+
*/
|
|
812
822
|
const mutationKeyTransformer = ({ node }) => {
|
|
813
823
|
if (!node.path) return [];
|
|
814
824
|
return [`{ url: '${Url.toPath(node.path)}' }`];
|
|
@@ -900,6 +910,16 @@ function createMutationResolver() {
|
|
|
900
910
|
//#endregion
|
|
901
911
|
//#region ../../internals/tanstack-query/src/components/QueryKey.tsx
|
|
902
912
|
const declarationPrinter$3 = functionPrinter({ mode: "declaration" });
|
|
913
|
+
/**
|
|
914
|
+
* Default `queryKey` builder. Call it from a custom builder to extend the default key.
|
|
915
|
+
*
|
|
916
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
917
|
+
*
|
|
918
|
+
* @example
|
|
919
|
+
* ```ts
|
|
920
|
+
* queryKey: (props) => [JSON.stringify(props.node.operationId), ...queryKeyTransformer(props)]
|
|
921
|
+
* ```
|
|
922
|
+
*/
|
|
903
923
|
const queryKeyTransformer = ({ node, variant }) => {
|
|
904
924
|
if (!node.path) return [];
|
|
905
925
|
const { path, query } = getOperationParameters(node);
|
|
@@ -1724,6 +1744,6 @@ const pluginVueQuery = defineExtension({
|
|
|
1724
1744
|
}
|
|
1725
1745
|
});
|
|
1726
1746
|
//#endregion
|
|
1727
|
-
export { pluginVueQuery as default, pluginVueQuery, definePageParam, pluginVueQueryName, resolverVueQuery };
|
|
1747
|
+
export { pluginVueQuery as default, pluginVueQuery, definePageParam, mutationKeyTransformer, pluginVueQueryName, queryKeyTransformer, resolverVueQuery };
|
|
1728
1748
|
|
|
1729
1749
|
//# sourceMappingURL=index.js.map
|