@kubb/plugin-svelte-query 4.8.0 → 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 { a as OperationSchemas, n as PluginSvelteQuery, r as Transformer, s as Operation } from "./types-DAA4yhtI.cjs";
1
+ import { a as OperationSchemas, n as PluginSvelteQuery, r as Transformer, s as Operation } from "./types-OrVnaAMq.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 { a as OperationSchemas, n as PluginSvelteQuery, r as Transformer, s as Operation } from "./types-B4YAiWUu.js";
1
+ import { a as OperationSchemas, n as PluginSvelteQuery, r as Transformer, s as Operation } from "./types-B77KhUe5.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 { i as ReactGenerator, n as PluginSvelteQuery } from "./types-DAA4yhtI.cjs";
1
+ import { i as ReactGenerator, n as PluginSvelteQuery } from "./types-OrVnaAMq.cjs";
2
2
 
3
3
  //#region src/generators/mutationGenerator.d.ts
4
4
  declare const mutationGenerator: ReactGenerator<PluginSvelteQuery>;
@@ -1,4 +1,4 @@
1
- import { i as ReactGenerator, n as PluginSvelteQuery } from "./types-B4YAiWUu.js";
1
+ import { i as ReactGenerator, n as PluginSvelteQuery } from "./types-B77KhUe5.js";
2
2
 
3
3
  //#region src/generators/mutationGenerator.d.ts
4
4
  declare const mutationGenerator: ReactGenerator<PluginSvelteQuery>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as PluginSvelteQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-DAA4yhtI.cjs";
1
+ import { n as PluginSvelteQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-OrVnaAMq.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginSvelteQueryName = "plugin-svelte-query";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as PluginSvelteQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-B4YAiWUu.js";
1
+ import { n as PluginSvelteQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-B77KhUe5.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginSvelteQueryName = "plugin-svelte-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']>;
@@ -1262,4 +1270,4 @@ type ResolvedOptions = {
1262
1270
  type PluginSvelteQuery = PluginFactoryOptions<'plugin-svelte-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1263
1271
  //#endregion
1264
1272
  export { OperationSchemas as a, ReactGenerator as i, PluginSvelteQuery as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options$1 as t };
1265
- //# sourceMappingURL=types-B4YAiWUu.d.ts.map
1273
+ //# sourceMappingURL=types-B77KhUe5.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']>;
@@ -1262,4 +1270,4 @@ type ResolvedOptions = {
1262
1270
  type PluginSvelteQuery = PluginFactoryOptions<'plugin-svelte-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1263
1271
  //#endregion
1264
1272
  export { OperationSchemas as a, ReactGenerator as i, PluginSvelteQuery as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options$1 as t };
1265
- //# sourceMappingURL=types-DAA4yhtI.d.cts.map
1273
+ //# sourceMappingURL=types-OrVnaAMq.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-svelte-query",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Svelte Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Svelte applications.",
5
5
  "keywords": [
6
6
  "svelte-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.0",
73
- "@kubb/oas": "4.8.0",
74
- "@kubb/plugin-client": "4.8.0",
75
- "@kubb/plugin-oas": "4.8.0",
76
- "@kubb/plugin-ts": "4.8.0",
77
- "@kubb/plugin-zod": "4.8.0"
72
+ "@kubb/core": "4.9.0",
73
+ "@kubb/oas": "4.9.0",
74
+ "@kubb/plugin-client": "4.9.0",
75
+ "@kubb/plugin-oas": "4.9.0",
76
+ "@kubb/plugin-ts": "4.9.0",
77
+ "@kubb/plugin-zod": "4.9.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@kubb/react-fabric": "0.5.4"