@kubb/plugin-mcp 4.21.2 → 4.22.1
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/components.d.cts +2 -1
- package/dist/components.d.ts +1 -1
- package/dist/{generators-DOGoAPGT.cjs → generators-BLuJpiEp.cjs} +11 -3
- package/dist/generators-BLuJpiEp.cjs.map +1 -0
- package/dist/{generators-CrC1R2wh.js → generators-CIGzlv3P.js} +11 -3
- package/dist/generators-CIGzlv3P.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.cts +458 -2
- package/dist/generators.d.ts +457 -2
- package/dist/generators.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/types-Bg_tbyZc.d.ts +64 -0
- package/dist/types-Cb1Tkjj0.d.cts +64 -0
- package/package.json +7 -7
- package/src/generators/mcpGenerator.tsx +2 -2
- package/dist/generators-CrC1R2wh.js.map +0 -1
- package/dist/generators-DOGoAPGT.cjs.map +0 -1
- package/dist/index-DNBGPN7Z.d.ts +0 -548
- package/dist/index-RsNfvceH.d.cts +0 -549
- package/dist/types-BtFvu11q.d.ts +0 -196
- package/dist/types-Bw-588-z.d.cts +0 -195
package/dist/types-BtFvu11q.d.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-eQyhnF5A.js";
|
|
2
|
-
import { c as Oas, i as Include, l as contentType, o as Override, r as Exclude, s as ResolvePathOptions, t as Generator } from "./index-DNBGPN7Z.js";
|
|
3
|
-
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
4
|
-
|
|
5
|
-
//#region ../plugin-client/src/types.d.ts
|
|
6
|
-
type Options$1 = {
|
|
7
|
-
/**
|
|
8
|
-
* Specify the export location for the files and define the behavior of the output
|
|
9
|
-
* @default { path: 'clients', barrelType: 'named' }
|
|
10
|
-
*/
|
|
11
|
-
output?: Output<Oas>;
|
|
12
|
-
/**
|
|
13
|
-
* Define which contentType should be used.
|
|
14
|
-
* By default, the first JSON valid mediaType is used
|
|
15
|
-
*/
|
|
16
|
-
contentType?: contentType;
|
|
17
|
-
/**
|
|
18
|
-
* Group the clients based on the provided name.
|
|
19
|
-
*/
|
|
20
|
-
group?: Group;
|
|
21
|
-
/**
|
|
22
|
-
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
23
|
-
*/
|
|
24
|
-
exclude?: Array<Exclude>;
|
|
25
|
-
/**
|
|
26
|
-
* Array containing include parameters to include tags/operations/methods/paths.
|
|
27
|
-
*/
|
|
28
|
-
include?: Array<Include>;
|
|
29
|
-
/**
|
|
30
|
-
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
31
|
-
*/
|
|
32
|
-
override?: Array<Override<ResolvedOptions$1>>;
|
|
33
|
-
/**
|
|
34
|
-
* Create `operations.ts` file with all operations grouped by methods.
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
operations?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Export urls that are used by operation x.
|
|
40
|
-
* - 'export' makes them part of your barrel file.
|
|
41
|
-
* - false does not make them exportable.
|
|
42
|
-
* @default false
|
|
43
|
-
* @example getGetPetByIdUrl
|
|
44
|
-
*/
|
|
45
|
-
urlType?: 'export' | false;
|
|
46
|
-
/**
|
|
47
|
-
* Client import path for API calls.
|
|
48
|
-
* Used as `import client from '${client.importPath}'`.
|
|
49
|
-
* Accepts relative and absolute paths; path changes are not performed.
|
|
50
|
-
*/
|
|
51
|
-
importPath?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Allows you to set a custom base url for all generated calls.
|
|
54
|
-
*/
|
|
55
|
-
baseURL?: string;
|
|
56
|
-
/**
|
|
57
|
-
* ReturnType that is used when calling the client.
|
|
58
|
-
* - 'data' returns ResponseConfig[data].
|
|
59
|
-
* - 'full' returns ResponseConfig.
|
|
60
|
-
* @default 'data'
|
|
61
|
-
*/
|
|
62
|
-
dataReturnType?: 'data' | 'full';
|
|
63
|
-
/**
|
|
64
|
-
* How to style your params, by default no casing is applied
|
|
65
|
-
* - 'camelcase' uses camelCase for pathParams, queryParams and headerParams names
|
|
66
|
-
* @note response types (data/body) are not affected by this option
|
|
67
|
-
*/
|
|
68
|
-
paramsCasing?: 'camelcase';
|
|
69
|
-
/**
|
|
70
|
-
* How to pass your params.
|
|
71
|
-
* - 'object' returns the params and pathParams as an object.
|
|
72
|
-
* - 'inline' returns the params as comma separated params.
|
|
73
|
-
* @default 'inline'
|
|
74
|
-
*/
|
|
75
|
-
paramsType?: 'object' | 'inline';
|
|
76
|
-
/**
|
|
77
|
-
* How to pass your pathParams.
|
|
78
|
-
* - 'object' returns the pathParams as an object.
|
|
79
|
-
* - 'inline' returns the pathParams as comma separated params.
|
|
80
|
-
* @default 'inline'
|
|
81
|
-
*/
|
|
82
|
-
pathParamsType?: 'object' | 'inline';
|
|
83
|
-
/**
|
|
84
|
-
* Which parser can be used before returning the data.
|
|
85
|
-
* - 'client' returns the data as-is from the client.
|
|
86
|
-
* - 'zod' uses @kubb/plugin-zod to parse the data.
|
|
87
|
-
* @default 'client'
|
|
88
|
-
*/
|
|
89
|
-
parser?: 'client' | 'zod';
|
|
90
|
-
/**
|
|
91
|
-
* Which client should be used to do the HTTP calls.
|
|
92
|
-
* - 'axios' uses axios client for HTTP requests.
|
|
93
|
-
* - 'fetch' uses native fetch API for HTTP requests.
|
|
94
|
-
* @default 'axios'
|
|
95
|
-
*/
|
|
96
|
-
client?: 'axios' | 'fetch';
|
|
97
|
-
/**
|
|
98
|
-
* How to generate the client code.
|
|
99
|
-
* - 'function' generates standalone functions for each operation.
|
|
100
|
-
* - 'class' generates a class with methods for each operation.
|
|
101
|
-
* - 'staticClass' generates a class with static methods for each operation.
|
|
102
|
-
* @default 'function'
|
|
103
|
-
*/
|
|
104
|
-
clientType?: 'function' | 'class' | 'staticClass';
|
|
105
|
-
/**
|
|
106
|
-
* Bundle the selected client into the generated `.kubb` directory.
|
|
107
|
-
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
108
|
-
* @default false
|
|
109
|
-
* In version 5 of Kubb this is by default true
|
|
110
|
-
*/
|
|
111
|
-
bundle?: boolean;
|
|
112
|
-
transformers?: {
|
|
113
|
-
/**
|
|
114
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
115
|
-
*/
|
|
116
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Define some generators next to the client generators
|
|
120
|
-
*/
|
|
121
|
-
generators?: Array<Generator<PluginClient>>;
|
|
122
|
-
};
|
|
123
|
-
type ResolvedOptions$1 = {
|
|
124
|
-
output: Output<Oas>;
|
|
125
|
-
group?: Options$1['group'];
|
|
126
|
-
baseURL: string | undefined;
|
|
127
|
-
client: Options$1['client'];
|
|
128
|
-
clientType: NonNullable<Options$1['clientType']>;
|
|
129
|
-
bundle: NonNullable<Options$1['bundle']>;
|
|
130
|
-
parser: NonNullable<Options$1['parser']>;
|
|
131
|
-
urlType: NonNullable<Options$1['urlType']>;
|
|
132
|
-
importPath: Options$1['importPath'];
|
|
133
|
-
dataReturnType: NonNullable<Options$1['dataReturnType']>;
|
|
134
|
-
pathParamsType: NonNullable<Options$1['pathParamsType']>;
|
|
135
|
-
paramsType: NonNullable<Options$1['paramsType']>;
|
|
136
|
-
paramsCasing: Options$1['paramsCasing'];
|
|
137
|
-
};
|
|
138
|
-
type PluginClient = PluginFactoryOptions<'plugin-client', Options$1, ResolvedOptions$1, never, ResolvePathOptions>;
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region src/types.d.ts
|
|
141
|
-
type Options = {
|
|
142
|
-
/**
|
|
143
|
-
* Specify the export location for the files and define the behavior of the output
|
|
144
|
-
* @default { path: 'mcp', barrelType: 'named' }
|
|
145
|
-
*/
|
|
146
|
-
output?: Output<Oas>;
|
|
147
|
-
/**
|
|
148
|
-
* Define which contentType should be used.
|
|
149
|
-
* By default, the first JSON valid mediaType is used
|
|
150
|
-
*/
|
|
151
|
-
contentType?: contentType;
|
|
152
|
-
client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle' | 'paramsCasing'>;
|
|
153
|
-
/**
|
|
154
|
-
* Transform parameter names to a specific casing format.
|
|
155
|
-
* When set to 'camelcase', parameter names in path, query, and header params will be transformed to camelCase.
|
|
156
|
-
* This should match the paramsCasing setting used in @kubb/plugin-ts.
|
|
157
|
-
* @default undefined
|
|
158
|
-
*/
|
|
159
|
-
paramsCasing?: 'camelcase';
|
|
160
|
-
/**
|
|
161
|
-
* Group the mcp requests based on the provided name.
|
|
162
|
-
*/
|
|
163
|
-
group?: Group;
|
|
164
|
-
/**
|
|
165
|
-
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
166
|
-
*/
|
|
167
|
-
exclude?: Array<Exclude>;
|
|
168
|
-
/**
|
|
169
|
-
* Array containing include parameters to include tags/operations/methods/paths.
|
|
170
|
-
*/
|
|
171
|
-
include?: Array<Include>;
|
|
172
|
-
/**
|
|
173
|
-
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
174
|
-
*/
|
|
175
|
-
override?: Array<Override<ResolvedOptions>>;
|
|
176
|
-
transformers?: {
|
|
177
|
-
/**
|
|
178
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
179
|
-
*/
|
|
180
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
181
|
-
};
|
|
182
|
-
/**
|
|
183
|
-
* Define some generators next to the Mcp generators.
|
|
184
|
-
*/
|
|
185
|
-
generators?: Array<Generator<PluginMcp>>;
|
|
186
|
-
};
|
|
187
|
-
type ResolvedOptions = {
|
|
188
|
-
output: Output<Oas>;
|
|
189
|
-
group: Options['group'];
|
|
190
|
-
client: NonNullable<PluginMcp['options']['client']>;
|
|
191
|
-
paramsCasing: Options['paramsCasing'];
|
|
192
|
-
};
|
|
193
|
-
type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
194
|
-
//#endregion
|
|
195
|
-
export { PluginMcp as n, Options as t };
|
|
196
|
-
//# sourceMappingURL=types-BtFvu11q.d.ts.map
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { c as Oas, i as Include, l as contentType, o as Override, r as Exclude, s as ResolvePathOptions, t as Generator, u as __name } from "./index-RsNfvceH.cjs";
|
|
2
|
-
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
3
|
-
|
|
4
|
-
//#region ../plugin-client/src/types.d.ts
|
|
5
|
-
type Options$1 = {
|
|
6
|
-
/**
|
|
7
|
-
* Specify the export location for the files and define the behavior of the output
|
|
8
|
-
* @default { path: 'clients', barrelType: 'named' }
|
|
9
|
-
*/
|
|
10
|
-
output?: Output<Oas>;
|
|
11
|
-
/**
|
|
12
|
-
* Define which contentType should be used.
|
|
13
|
-
* By default, the first JSON valid mediaType is used
|
|
14
|
-
*/
|
|
15
|
-
contentType?: contentType;
|
|
16
|
-
/**
|
|
17
|
-
* Group the clients based on the provided name.
|
|
18
|
-
*/
|
|
19
|
-
group?: Group;
|
|
20
|
-
/**
|
|
21
|
-
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
22
|
-
*/
|
|
23
|
-
exclude?: Array<Exclude>;
|
|
24
|
-
/**
|
|
25
|
-
* Array containing include parameters to include tags/operations/methods/paths.
|
|
26
|
-
*/
|
|
27
|
-
include?: Array<Include>;
|
|
28
|
-
/**
|
|
29
|
-
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
30
|
-
*/
|
|
31
|
-
override?: Array<Override<ResolvedOptions$1>>;
|
|
32
|
-
/**
|
|
33
|
-
* Create `operations.ts` file with all operations grouped by methods.
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
operations?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Export urls that are used by operation x.
|
|
39
|
-
* - 'export' makes them part of your barrel file.
|
|
40
|
-
* - false does not make them exportable.
|
|
41
|
-
* @default false
|
|
42
|
-
* @example getGetPetByIdUrl
|
|
43
|
-
*/
|
|
44
|
-
urlType?: 'export' | false;
|
|
45
|
-
/**
|
|
46
|
-
* Client import path for API calls.
|
|
47
|
-
* Used as `import client from '${client.importPath}'`.
|
|
48
|
-
* Accepts relative and absolute paths; path changes are not performed.
|
|
49
|
-
*/
|
|
50
|
-
importPath?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Allows you to set a custom base url for all generated calls.
|
|
53
|
-
*/
|
|
54
|
-
baseURL?: string;
|
|
55
|
-
/**
|
|
56
|
-
* ReturnType that is used when calling the client.
|
|
57
|
-
* - 'data' returns ResponseConfig[data].
|
|
58
|
-
* - 'full' returns ResponseConfig.
|
|
59
|
-
* @default 'data'
|
|
60
|
-
*/
|
|
61
|
-
dataReturnType?: 'data' | 'full';
|
|
62
|
-
/**
|
|
63
|
-
* How to style your params, by default no casing is applied
|
|
64
|
-
* - 'camelcase' uses camelCase for pathParams, queryParams and headerParams names
|
|
65
|
-
* @note response types (data/body) are not affected by this option
|
|
66
|
-
*/
|
|
67
|
-
paramsCasing?: 'camelcase';
|
|
68
|
-
/**
|
|
69
|
-
* How to pass your params.
|
|
70
|
-
* - 'object' returns the params and pathParams as an object.
|
|
71
|
-
* - 'inline' returns the params as comma separated params.
|
|
72
|
-
* @default 'inline'
|
|
73
|
-
*/
|
|
74
|
-
paramsType?: 'object' | 'inline';
|
|
75
|
-
/**
|
|
76
|
-
* How to pass your pathParams.
|
|
77
|
-
* - 'object' returns the pathParams as an object.
|
|
78
|
-
* - 'inline' returns the pathParams as comma separated params.
|
|
79
|
-
* @default 'inline'
|
|
80
|
-
*/
|
|
81
|
-
pathParamsType?: 'object' | 'inline';
|
|
82
|
-
/**
|
|
83
|
-
* Which parser can be used before returning the data.
|
|
84
|
-
* - 'client' returns the data as-is from the client.
|
|
85
|
-
* - 'zod' uses @kubb/plugin-zod to parse the data.
|
|
86
|
-
* @default 'client'
|
|
87
|
-
*/
|
|
88
|
-
parser?: 'client' | 'zod';
|
|
89
|
-
/**
|
|
90
|
-
* Which client should be used to do the HTTP calls.
|
|
91
|
-
* - 'axios' uses axios client for HTTP requests.
|
|
92
|
-
* - 'fetch' uses native fetch API for HTTP requests.
|
|
93
|
-
* @default 'axios'
|
|
94
|
-
*/
|
|
95
|
-
client?: 'axios' | 'fetch';
|
|
96
|
-
/**
|
|
97
|
-
* How to generate the client code.
|
|
98
|
-
* - 'function' generates standalone functions for each operation.
|
|
99
|
-
* - 'class' generates a class with methods for each operation.
|
|
100
|
-
* - 'staticClass' generates a class with static methods for each operation.
|
|
101
|
-
* @default 'function'
|
|
102
|
-
*/
|
|
103
|
-
clientType?: 'function' | 'class' | 'staticClass';
|
|
104
|
-
/**
|
|
105
|
-
* Bundle the selected client into the generated `.kubb` directory.
|
|
106
|
-
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
107
|
-
* @default false
|
|
108
|
-
* In version 5 of Kubb this is by default true
|
|
109
|
-
*/
|
|
110
|
-
bundle?: boolean;
|
|
111
|
-
transformers?: {
|
|
112
|
-
/**
|
|
113
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
114
|
-
*/
|
|
115
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Define some generators next to the client generators
|
|
119
|
-
*/
|
|
120
|
-
generators?: Array<Generator<PluginClient>>;
|
|
121
|
-
};
|
|
122
|
-
type ResolvedOptions$1 = {
|
|
123
|
-
output: Output<Oas>;
|
|
124
|
-
group?: Options$1['group'];
|
|
125
|
-
baseURL: string | undefined;
|
|
126
|
-
client: Options$1['client'];
|
|
127
|
-
clientType: NonNullable<Options$1['clientType']>;
|
|
128
|
-
bundle: NonNullable<Options$1['bundle']>;
|
|
129
|
-
parser: NonNullable<Options$1['parser']>;
|
|
130
|
-
urlType: NonNullable<Options$1['urlType']>;
|
|
131
|
-
importPath: Options$1['importPath'];
|
|
132
|
-
dataReturnType: NonNullable<Options$1['dataReturnType']>;
|
|
133
|
-
pathParamsType: NonNullable<Options$1['pathParamsType']>;
|
|
134
|
-
paramsType: NonNullable<Options$1['paramsType']>;
|
|
135
|
-
paramsCasing: Options$1['paramsCasing'];
|
|
136
|
-
};
|
|
137
|
-
type PluginClient = PluginFactoryOptions<'plugin-client', Options$1, ResolvedOptions$1, never, ResolvePathOptions>;
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/types.d.ts
|
|
140
|
-
type Options = {
|
|
141
|
-
/**
|
|
142
|
-
* Specify the export location for the files and define the behavior of the output
|
|
143
|
-
* @default { path: 'mcp', barrelType: 'named' }
|
|
144
|
-
*/
|
|
145
|
-
output?: Output<Oas>;
|
|
146
|
-
/**
|
|
147
|
-
* Define which contentType should be used.
|
|
148
|
-
* By default, the first JSON valid mediaType is used
|
|
149
|
-
*/
|
|
150
|
-
contentType?: contentType;
|
|
151
|
-
client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle' | 'paramsCasing'>;
|
|
152
|
-
/**
|
|
153
|
-
* Transform parameter names to a specific casing format.
|
|
154
|
-
* When set to 'camelcase', parameter names in path, query, and header params will be transformed to camelCase.
|
|
155
|
-
* This should match the paramsCasing setting used in @kubb/plugin-ts.
|
|
156
|
-
* @default undefined
|
|
157
|
-
*/
|
|
158
|
-
paramsCasing?: 'camelcase';
|
|
159
|
-
/**
|
|
160
|
-
* Group the mcp requests based on the provided name.
|
|
161
|
-
*/
|
|
162
|
-
group?: Group;
|
|
163
|
-
/**
|
|
164
|
-
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
165
|
-
*/
|
|
166
|
-
exclude?: Array<Exclude>;
|
|
167
|
-
/**
|
|
168
|
-
* Array containing include parameters to include tags/operations/methods/paths.
|
|
169
|
-
*/
|
|
170
|
-
include?: Array<Include>;
|
|
171
|
-
/**
|
|
172
|
-
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
173
|
-
*/
|
|
174
|
-
override?: Array<Override<ResolvedOptions>>;
|
|
175
|
-
transformers?: {
|
|
176
|
-
/**
|
|
177
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
178
|
-
*/
|
|
179
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* Define some generators next to the Mcp generators.
|
|
183
|
-
*/
|
|
184
|
-
generators?: Array<Generator<PluginMcp>>;
|
|
185
|
-
};
|
|
186
|
-
type ResolvedOptions = {
|
|
187
|
-
output: Output<Oas>;
|
|
188
|
-
group: Options['group'];
|
|
189
|
-
client: NonNullable<PluginMcp['options']['client']>;
|
|
190
|
-
paramsCasing: Options['paramsCasing'];
|
|
191
|
-
};
|
|
192
|
-
type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
193
|
-
//#endregion
|
|
194
|
-
export { PluginMcp as n, Options as t };
|
|
195
|
-
//# sourceMappingURL=types-Bw-588-z.d.cts.map
|