@kubb/plugin-react-query 4.8.1 → 4.9.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.
@@ -1,4 +1,4 @@
1
- import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-dfDuPVNH.cjs";
1
+ import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-Y0KagBqp.cjs";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-CZld1jsG.js";
1
+ import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-BMGM_Xqg.js";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ReactGenerator, r as PluginReactQuery } from "./types-dfDuPVNH.cjs";
1
+ import { a as ReactGenerator, r as PluginReactQuery } from "./types-Y0KagBqp.cjs";
2
2
 
3
3
  //#region src/generators/infiniteQueryGenerator.d.ts
4
4
  declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
@@ -1,4 +1,4 @@
1
- import { a as ReactGenerator, r as PluginReactQuery } from "./types-CZld1jsG.js";
1
+ import { a as ReactGenerator, r as PluginReactQuery } from "./types-BMGM_Xqg.js";
2
2
 
3
3
  //#region src/generators/infiniteQueryGenerator.d.ts
4
4
  declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-dfDuPVNH.cjs";
1
+ import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-Y0KagBqp.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginReactQueryName = "plugin-react-query";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-CZld1jsG.js";
1
+ import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-BMGM_Xqg.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginReactQueryName = "plugin-react-query";
@@ -1094,6 +1094,13 @@ type Options$2 = {
1094
1094
  * @default 'axios'
1095
1095
  */
1096
1096
  client?: 'axios' | 'fetch';
1097
+ /**
1098
+ * How to generate the client code
1099
+ * - 'function' will generate standalone functions for each operation.
1100
+ * - 'class' will generate a class with methods for each operation.
1101
+ * @default 'function'
1102
+ */
1103
+ clientType?: 'function' | 'class';
1097
1104
  /**
1098
1105
  * Bundle the selected client into the generated `.kubb` directory.
1099
1106
  * When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
@@ -1117,6 +1124,7 @@ type ResolvedOptions$1 = {
1117
1124
  group?: Options$2['group'];
1118
1125
  baseURL: string | undefined;
1119
1126
  client: Options$2['client'];
1127
+ clientType: NonNullable<Options$2['clientType']>;
1120
1128
  bundle: NonNullable<Options$2['bundle']>;
1121
1129
  parser: NonNullable<Options$2['parser']>;
1122
1130
  urlType: NonNullable<Options$2['urlType']>;
@@ -1303,4 +1311,4 @@ type ResolvedOptions = {
1303
1311
  type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1304
1312
  //#endregion
1305
1313
  export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginReactQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
1306
- //# sourceMappingURL=types-CZld1jsG.d.ts.map
1314
+ //# sourceMappingURL=types-BMGM_Xqg.d.ts.map
@@ -1094,6 +1094,13 @@ type Options$2 = {
1094
1094
  * @default 'axios'
1095
1095
  */
1096
1096
  client?: 'axios' | 'fetch';
1097
+ /**
1098
+ * How to generate the client code
1099
+ * - 'function' will generate standalone functions for each operation.
1100
+ * - 'class' will generate a class with methods for each operation.
1101
+ * @default 'function'
1102
+ */
1103
+ clientType?: 'function' | 'class';
1097
1104
  /**
1098
1105
  * Bundle the selected client into the generated `.kubb` directory.
1099
1106
  * When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
@@ -1117,6 +1124,7 @@ type ResolvedOptions$1 = {
1117
1124
  group?: Options$2['group'];
1118
1125
  baseURL: string | undefined;
1119
1126
  client: Options$2['client'];
1127
+ clientType: NonNullable<Options$2['clientType']>;
1120
1128
  bundle: NonNullable<Options$2['bundle']>;
1121
1129
  parser: NonNullable<Options$2['parser']>;
1122
1130
  urlType: NonNullable<Options$2['urlType']>;
@@ -1303,4 +1311,4 @@ type ResolvedOptions = {
1303
1311
  type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1304
1312
  //#endregion
1305
1313
  export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginReactQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
1306
- //# sourceMappingURL=types-dfDuPVNH.d.cts.map
1314
+ //# sourceMappingURL=types-Y0KagBqp.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-react-query",
3
- "version": "4.8.1",
3
+ "version": "4.9.0",
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",
@@ -69,12 +69,12 @@
69
69
  "dependencies": {
70
70
  "@kubb/react-fabric": "0.5.4",
71
71
  "remeda": "^2.32.0",
72
- "@kubb/core": "4.8.1",
73
- "@kubb/oas": "4.8.1",
74
- "@kubb/plugin-client": "4.8.1",
75
- "@kubb/plugin-oas": "4.8.1",
76
- "@kubb/plugin-ts": "4.8.1",
77
- "@kubb/plugin-zod": "4.8.1"
72
+ "@kubb/oas": "4.9.0",
73
+ "@kubb/plugin-client": "4.9.0",
74
+ "@kubb/plugin-oas": "4.9.0",
75
+ "@kubb/plugin-ts": "4.9.0",
76
+ "@kubb/plugin-zod": "4.9.0",
77
+ "@kubb/core": "4.9.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@kubb/react-fabric": "0.5.4"