@kubb/plugin-client 3.16.2 → 3.16.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/Operations-Cxn7C-GC.cjs +228 -0
- package/dist/Operations-Cxn7C-GC.cjs.map +1 -0
- package/dist/Operations-tGJwS9Oj.js +210 -0
- package/dist/Operations-tGJwS9Oj.js.map +1 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/clients/axios.cjs +24 -30
- package/dist/clients/axios.cjs.map +1 -1
- package/dist/clients/axios.d.cts +23 -21
- package/dist/clients/axios.d.ts +23 -21
- package/dist/clients/axios.js +23 -23
- package/dist/clients/axios.js.map +1 -1
- package/dist/clients/fetch.cjs +37 -36
- package/dist/clients/fetch.cjs.map +1 -1
- package/dist/clients/fetch.d.cts +20 -18
- package/dist/clients/fetch.d.ts +20 -18
- package/dist/clients/fetch.js +37 -34
- package/dist/clients/fetch.js.map +1 -1
- package/dist/components.cjs +4 -19
- package/dist/components.d.cts +97 -56
- package/dist/components.d.ts +97 -56
- package/dist/components.js +3 -3
- package/dist/generators-BQnLTqYl.js +216 -0
- package/dist/generators-BQnLTqYl.js.map +1 -0
- package/dist/generators-XXsaqEtA.cjs +234 -0
- package/dist/generators-XXsaqEtA.cjs.map +1 -0
- package/dist/generators.cjs +5 -20
- package/dist/generators.d.cts +12 -11
- package/dist/generators.d.ts +12 -11
- package/dist/generators.js +4 -4
- package/dist/index.cjs +89 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +88 -112
- package/dist/index.js.map +1 -1
- package/dist/types-CdM4kNiz.d.ts +1274 -0
- package/dist/types-Cpfa5PKO.d.cts +1274 -0
- package/package.json +27 -34
- package/dist/chunk-H5KNP3DD.cjs +0 -205
- package/dist/chunk-H5KNP3DD.cjs.map +0 -1
- package/dist/chunk-LNJCFB5O.js +0 -201
- package/dist/chunk-LNJCFB5O.js.map +0 -1
- package/dist/chunk-QNFXNUH5.js +0 -187
- package/dist/chunk-QNFXNUH5.js.map +0 -1
- package/dist/chunk-SDEXSATF.cjs +0 -191
- package/dist/chunk-SDEXSATF.cjs.map +0 -1
- package/dist/components.cjs.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/generators.cjs.map +0 -1
- package/dist/generators.js.map +0 -1
- package/dist/types-DFo3xInC.d.cts +0 -119
- package/dist/types-DFo3xInC.d.ts +0 -119
package/dist/types-DFo3xInC.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Output, Group, ResolveNameParams, PluginFactoryOptions } from '@kubb/core';
|
|
2
|
-
import { Oas, contentType } from '@kubb/oas';
|
|
3
|
-
import { Exclude, Include, Override, Generator, ResolvePathOptions } from '@kubb/plugin-oas';
|
|
4
|
-
|
|
5
|
-
type Options = {
|
|
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 will be 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>>;
|
|
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` will make them part of your barrel file
|
|
40
|
-
* false will not make them exportable
|
|
41
|
-
* @example getGetPetByIdUrl
|
|
42
|
-
*/
|
|
43
|
-
urlType?: 'export' | false;
|
|
44
|
-
/**
|
|
45
|
-
* Path to the client import path that will be used to do the API calls.
|
|
46
|
-
* It will be used as `import client from '${client.importPath}'`.
|
|
47
|
-
* It allows both relative and absolute path but be aware that we will not change the path.
|
|
48
|
-
* @default '@kubb/plugin-client/clients/axios'
|
|
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 will be used when calling the client.
|
|
57
|
-
* - 'data' will return ResponseConfig[data].
|
|
58
|
-
* - 'full' will return ResponseConfig.
|
|
59
|
-
* @default 'data'
|
|
60
|
-
*/
|
|
61
|
-
dataReturnType?: 'data' | 'full';
|
|
62
|
-
/**
|
|
63
|
-
* How to style your params, by default no casing is applied
|
|
64
|
-
* - 'camelcase' will use camelcase for the params names
|
|
65
|
-
*/
|
|
66
|
-
paramsCasing?: 'camelcase';
|
|
67
|
-
/**
|
|
68
|
-
* How to pass your params
|
|
69
|
-
* - 'object' will return the params and pathParams as an object.
|
|
70
|
-
* - 'inline' will return the params as comma separated params.
|
|
71
|
-
* @default 'inline'
|
|
72
|
-
*/
|
|
73
|
-
paramsType?: 'object' | 'inline';
|
|
74
|
-
/**
|
|
75
|
-
* How to pass your pathParams.
|
|
76
|
-
* - 'object' will return the pathParams as an object.
|
|
77
|
-
* - 'inline' will return the pathParams as comma separated params.
|
|
78
|
-
* @default 'inline'
|
|
79
|
-
*/
|
|
80
|
-
pathParamsType?: 'object' | 'inline';
|
|
81
|
-
/**
|
|
82
|
-
* Which parser can be used before returning the data
|
|
83
|
-
* - 'zod' will use `@kubb/plugin-zod` to parse the data.
|
|
84
|
-
* @default 'client'
|
|
85
|
-
*/
|
|
86
|
-
parser?: 'client' | 'zod';
|
|
87
|
-
/**
|
|
88
|
-
* Which client should be used to do the HTTP calls
|
|
89
|
-
* - 'axios' will use `@kubb/plugin-client/clients/axios` to fetch data.
|
|
90
|
-
* - 'fetch' will use `@kubb/plugin-client/clients/fetch` to fetch data.
|
|
91
|
-
* @default 'axios'
|
|
92
|
-
*/
|
|
93
|
-
client?: 'axios' | 'fetch';
|
|
94
|
-
transformers?: {
|
|
95
|
-
/**
|
|
96
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
97
|
-
*/
|
|
98
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Define some generators next to the client generators
|
|
102
|
-
*/
|
|
103
|
-
generators?: Array<Generator<PluginClient>>;
|
|
104
|
-
};
|
|
105
|
-
type ResolvedOptions = {
|
|
106
|
-
output: Output<Oas>;
|
|
107
|
-
group?: Options['group'];
|
|
108
|
-
baseURL: string | undefined;
|
|
109
|
-
parser: NonNullable<Options['parser']>;
|
|
110
|
-
urlType: NonNullable<Options['urlType']>;
|
|
111
|
-
importPath: NonNullable<Options['importPath']>;
|
|
112
|
-
dataReturnType: NonNullable<Options['dataReturnType']>;
|
|
113
|
-
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
114
|
-
paramsType: NonNullable<Options['paramsType']>;
|
|
115
|
-
paramsCasing: Options['paramsCasing'];
|
|
116
|
-
};
|
|
117
|
-
type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
118
|
-
|
|
119
|
-
export type { Options as O, PluginClient as P };
|