@kubb/plugin-client 4.31.0 → 4.31.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-client",
3
- "version": "4.31.0",
3
+ "version": "4.31.2",
4
4
  "description": "API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.",
5
5
  "keywords": [
6
6
  "api-client",
@@ -108,18 +108,18 @@
108
108
  }
109
109
  ],
110
110
  "dependencies": {
111
- "@kubb/react-fabric": "0.13.2",
112
- "@kubb/core": "4.31.0",
113
- "@kubb/oas": "4.31.0",
114
- "@kubb/plugin-oas": "4.31.0",
115
- "@kubb/plugin-ts": "4.31.0",
116
- "@kubb/plugin-zod": "4.31.0"
111
+ "@kubb/react-fabric": "0.13.3",
112
+ "@kubb/core": "4.31.2",
113
+ "@kubb/oas": "4.31.2",
114
+ "@kubb/plugin-oas": "4.31.2",
115
+ "@kubb/plugin-ts": "4.31.2",
116
+ "@kubb/plugin-zod": "4.31.2"
117
117
  },
118
118
  "devDependencies": {
119
119
  "axios": "^1.13.6"
120
120
  },
121
121
  "peerDependencies": {
122
- "@kubb/react-fabric": "0.13.2",
122
+ "@kubb/react-fabric": "0.13.3",
123
123
  "axios": "^1.7.2"
124
124
  },
125
125
  "peerDependenciesMeta": {
@@ -1,159 +0,0 @@
1
- import { t as __name } from "./chunk-cy2TeOE5.cjs";
2
- import { Oas, contentType } from "@kubb/oas";
3
- import { Exclude, Include, Override, ResolvePathOptions } from "@kubb/plugin-oas";
4
- import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
5
- import { Generator } from "@kubb/plugin-oas/generators";
6
-
7
- //#region src/types.d.ts
8
- /**
9
- * Use either a preset `client` type OR a custom `importPath`, not both.
10
- * `importPath` will override the default `client` preset when both are provided.
11
- * These options are mutually exclusive. `bundle` and `importPath` are also
12
- * mutually exclusive since `bundle` only has effect when `importPath` is not set.
13
- */
14
- type ClientImportPath = {
15
- /**
16
- * Which client should be used to do the HTTP calls.
17
- * - 'axios' uses axios client for HTTP requests.
18
- * - 'fetch' uses native fetch API for HTTP requests.
19
- * @default 'axios'
20
- */
21
- client?: 'axios' | 'fetch';
22
- importPath?: never;
23
- } | {
24
- client?: never;
25
- /**
26
- * Client import path for API calls.
27
- * Used as `import client from '${importPath}'`.
28
- * Accepts relative and absolute paths; path changes are not performed.
29
- */
30
- importPath: string;
31
- /**
32
- * `bundle` has no effect when `importPath` is set.
33
- * Use either `bundle` (with `client`) or `importPath`, not both.
34
- */
35
- bundle?: never;
36
- };
37
- type Options = {
38
- /**
39
- * Specify the export location for the files and define the behavior of the output
40
- * @default { path: 'clients', barrelType: 'named' }
41
- */
42
- output?: Output<Oas>;
43
- /**
44
- * Define which contentType should be used.
45
- * By default, the first JSON valid mediaType is used
46
- */
47
- contentType?: contentType;
48
- /**
49
- * Group the clients based on the provided name.
50
- */
51
- group?: Group;
52
- /**
53
- * Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
54
- */
55
- exclude?: Array<Exclude>;
56
- /**
57
- * Array containing include parameters to include tags/operations/methods/paths.
58
- */
59
- include?: Array<Include>;
60
- /**
61
- * Array containing override parameters to override `options` based on tags/operations/methods/paths.
62
- */
63
- override?: Array<Override<ResolvedOptions>>;
64
- /**
65
- * Create `operations.ts` file with all operations grouped by methods.
66
- * @default false
67
- */
68
- operations?: boolean;
69
- /**
70
- * Export urls that are used by operation x.
71
- * - 'export' makes them part of your barrel file.
72
- * - false does not make them exportable.
73
- * @default false
74
- * @example getGetPetByIdUrl
75
- */
76
- urlType?: 'export' | false;
77
- /**
78
- * Allows you to set a custom base url for all generated calls.
79
- */
80
- baseURL?: string;
81
- /**
82
- * ReturnType that is used when calling the client.
83
- * - 'data' returns ResponseConfig[data].
84
- * - 'full' returns ResponseConfig.
85
- * @default 'data'
86
- */
87
- dataReturnType?: 'data' | 'full';
88
- /**
89
- * How to style your params, by default no casing is applied
90
- * - 'camelcase' uses camelCase for pathParams, queryParams and headerParams names
91
- * @note response types (data/body) are not affected by this option
92
- */
93
- paramsCasing?: 'camelcase';
94
- /**
95
- * How to pass your params.
96
- * - 'object' returns the params and pathParams as an object.
97
- * - 'inline' returns the params as comma separated params.
98
- * @default 'inline'
99
- */
100
- paramsType?: 'object' | 'inline';
101
- /**
102
- * How to pass your pathParams.
103
- * - 'object' returns the pathParams as an object.
104
- * - 'inline' returns the pathParams as comma separated params.
105
- * @default 'inline'
106
- */
107
- pathParamsType?: 'object' | 'inline';
108
- /**
109
- * Which parser can be used before returning the data.
110
- * - 'client' returns the data as-is from the client.
111
- * - 'zod' uses @kubb/plugin-zod to parse the data.
112
- * @default 'client'
113
- */
114
- parser?: 'client' | 'zod';
115
- /**
116
- * How to generate the client code.
117
- * - 'function' generates standalone functions for each operation.
118
- * - 'class' generates a class with methods for each operation.
119
- * - 'staticClass' generates a class with static methods for each operation.
120
- * @default 'function'
121
- */
122
- clientType?: 'function' | 'class' | 'staticClass';
123
- /**
124
- * Bundle the selected client into the generated `.kubb` directory.
125
- * When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
126
- * @default false
127
- * In version 5 of Kubb this is by default true
128
- */
129
- bundle?: boolean;
130
- transformers?: {
131
- /**
132
- * Customize the names based on the type that is provided by the plugin.
133
- */
134
- name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
135
- };
136
- /**
137
- * Define some generators next to the client generators
138
- */
139
- generators?: Array<Generator<PluginClient>>;
140
- } & ClientImportPath;
141
- type ResolvedOptions = {
142
- output: Output<Oas>;
143
- group?: Options['group'];
144
- baseURL: string | undefined;
145
- client: Options['client'];
146
- clientType: NonNullable<Options['clientType']>;
147
- bundle: NonNullable<Options['bundle']>;
148
- parser: NonNullable<Options['parser']>;
149
- urlType: NonNullable<Options['urlType']>;
150
- importPath: Options['importPath'];
151
- dataReturnType: NonNullable<Options['dataReturnType']>;
152
- pathParamsType: NonNullable<Options['pathParamsType']>;
153
- paramsType: NonNullable<Options['paramsType']>;
154
- paramsCasing: Options['paramsCasing'];
155
- };
156
- type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
157
- //#endregion
158
- export { Options as n, PluginClient as r, ClientImportPath as t };
159
- //# sourceMappingURL=types-DGWXyUI0.d.ts.map