@hey-api/openapi-ts 0.87.0 → 0.87.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/README.md +3 -1
- package/dist/clients/angular/index.ts +0 -1
- package/dist/clients/angular/types.ts +0 -27
- package/dist/clients/axios/index.ts +0 -1
- package/dist/clients/axios/types.ts +0 -19
- package/dist/clients/fetch/index.ts +0 -1
- package/dist/clients/fetch/types.ts +0 -27
- package/dist/clients/ky/client.ts +339 -0
- package/dist/clients/ky/index.ts +24 -0
- package/dist/clients/ky/types.ts +271 -0
- package/dist/clients/ky/utils.ts +328 -0
- package/dist/clients/next/index.ts +0 -1
- package/dist/clients/next/types.ts +0 -19
- package/dist/clients/nuxt/index.ts +0 -1
- package/dist/clients/nuxt/types.ts +0 -12
- package/dist/clients/ofetch/index.ts +0 -1
- package/dist/clients/ofetch/types.ts +0 -27
- package/dist/{config-B2o9ax_a.d.cts → config-CQeoZYf_.d.cts} +769 -266
- package/dist/{config-oAoGatJ7.d.ts → config-U5JEpxGS.d.ts} +794 -291
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +28 -14
- package/dist/index.d.ts +28 -14
- package/dist/index.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/openApi-CT-iM-D8.cjs +19 -0
- package/dist/openApi-CT-iM-D8.cjs.map +1 -0
- package/dist/openApi-HKXoyF4o.js +19 -0
- package/dist/openApi-HKXoyF4o.js.map +1 -0
- package/dist/run.cjs +1 -1
- package/dist/run.cjs.map +1 -1
- package/dist/run.js +1 -1
- package/dist/run.js.map +1 -1
- package/dist/{src-CTUbY-zd.js → src-Ba-zyEiS.js} +2 -2
- package/dist/{src-CTUbY-zd.js.map → src-Ba-zyEiS.js.map} +1 -1
- package/dist/{src-H1fIt1p4.cjs → src-CNO_U6s-.cjs} +2 -2
- package/dist/{src-H1fIt1p4.cjs.map → src-CNO_U6s-.cjs.map} +1 -1
- package/package.json +4 -3
- package/dist/openApi-BWD76jue.cjs +0 -21
- package/dist/openApi-BWD76jue.cjs.map +0 -1
- package/dist/openApi-DXfWYPpF.js +0 -21
- package/dist/openApi-DXfWYPpF.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img alt="Two people looking at the blueprint" height="214" src="https://heyapi.dev/images/blueprint-640w.png" width="320">
|
|
3
3
|
<h1><b>OpenAPI TypeScript</b></h1>
|
|
4
|
-
<p><em>“OpenAPI codegen that just works.”</em><br/><sub>— Guillermo Rauch</sub></p>
|
|
4
|
+
<p><em>“OpenAPI codegen that just works.”</em><br/><sub>— Guillermo Rauch, CEO of Vercel</sub></p>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
@@ -278,8 +278,10 @@ Clients are responsible for sending the actual HTTP requests. Using clients is n
|
|
|
278
278
|
- [`@hey-api/client-fetch`](https://heyapi.dev/openapi-ts/clients/fetch)
|
|
279
279
|
- [`@hey-api/client-angular`](https://heyapi.dev/openapi-ts/clients/angular)
|
|
280
280
|
- [`@hey-api/client-axios`](https://heyapi.dev/openapi-ts/clients/axios)
|
|
281
|
+
- [`@hey-api/client-ky`](https://heyapi.dev/openapi-ts/clients/ky)
|
|
281
282
|
- [`@hey-api/client-next`](https://heyapi.dev/openapi-ts/clients/next-js)
|
|
282
283
|
- [`@hey-api/client-nuxt`](https://heyapi.dev/openapi-ts/clients/nuxt)
|
|
284
|
+
- [`@hey-api/client-ofetch`](https://heyapi.dev/openapi-ts/clients/ofetch)
|
|
283
285
|
|
|
284
286
|
### Planned Clients
|
|
285
287
|
|
|
@@ -252,30 +252,3 @@ export type Options<
|
|
|
252
252
|
'body' | 'path' | 'query' | 'url'
|
|
253
253
|
> &
|
|
254
254
|
([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
255
|
-
|
|
256
|
-
export type OptionsLegacyParser<
|
|
257
|
-
TData = unknown,
|
|
258
|
-
ThrowOnError extends boolean = boolean,
|
|
259
|
-
TResponseStyle extends ResponseStyle = 'fields',
|
|
260
|
-
> = TData extends { body?: any }
|
|
261
|
-
? TData extends { headers?: any }
|
|
262
|
-
? OmitKeys<
|
|
263
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
264
|
-
'body' | 'headers' | 'url'
|
|
265
|
-
> &
|
|
266
|
-
TData
|
|
267
|
-
: OmitKeys<
|
|
268
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
269
|
-
'body' | 'url'
|
|
270
|
-
> &
|
|
271
|
-
TData &
|
|
272
|
-
Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'headers'>
|
|
273
|
-
: TData extends { headers?: any }
|
|
274
|
-
? OmitKeys<
|
|
275
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
276
|
-
'headers' | 'url'
|
|
277
|
-
> &
|
|
278
|
-
TData &
|
|
279
|
-
Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body'>
|
|
280
|
-
: OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'url'> &
|
|
281
|
-
TData;
|
|
@@ -193,22 +193,3 @@ export type Options<
|
|
|
193
193
|
'body' | 'path' | 'query' | 'url'
|
|
194
194
|
> &
|
|
195
195
|
([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
196
|
-
|
|
197
|
-
export type OptionsLegacyParser<
|
|
198
|
-
TData = unknown,
|
|
199
|
-
ThrowOnError extends boolean = boolean,
|
|
200
|
-
> = TData extends { body?: any }
|
|
201
|
-
? TData extends { headers?: any }
|
|
202
|
-
? OmitKeys<
|
|
203
|
-
RequestOptions<unknown, ThrowOnError>,
|
|
204
|
-
'body' | 'headers' | 'url'
|
|
205
|
-
> &
|
|
206
|
-
TData
|
|
207
|
-
: OmitKeys<RequestOptions<unknown, ThrowOnError>, 'body' | 'url'> &
|
|
208
|
-
TData &
|
|
209
|
-
Pick<RequestOptions<unknown, ThrowOnError>, 'headers'>
|
|
210
|
-
: TData extends { headers?: any }
|
|
211
|
-
? OmitKeys<RequestOptions<unknown, ThrowOnError>, 'headers' | 'url'> &
|
|
212
|
-
TData &
|
|
213
|
-
Pick<RequestOptions<unknown, ThrowOnError>, 'body'>
|
|
214
|
-
: OmitKeys<RequestOptions<unknown, ThrowOnError>, 'url'> & TData;
|
|
@@ -237,30 +237,3 @@ export type Options<
|
|
|
237
237
|
'body' | 'path' | 'query' | 'url'
|
|
238
238
|
> &
|
|
239
239
|
([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
240
|
-
|
|
241
|
-
export type OptionsLegacyParser<
|
|
242
|
-
TData = unknown,
|
|
243
|
-
ThrowOnError extends boolean = boolean,
|
|
244
|
-
TResponseStyle extends ResponseStyle = 'fields',
|
|
245
|
-
> = TData extends { body?: any }
|
|
246
|
-
? TData extends { headers?: any }
|
|
247
|
-
? OmitKeys<
|
|
248
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
249
|
-
'body' | 'headers' | 'url'
|
|
250
|
-
> &
|
|
251
|
-
TData
|
|
252
|
-
: OmitKeys<
|
|
253
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
254
|
-
'body' | 'url'
|
|
255
|
-
> &
|
|
256
|
-
TData &
|
|
257
|
-
Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'headers'>
|
|
258
|
-
: TData extends { headers?: any }
|
|
259
|
-
? OmitKeys<
|
|
260
|
-
RequestOptions<unknown, TResponseStyle, ThrowOnError>,
|
|
261
|
-
'headers' | 'url'
|
|
262
|
-
> &
|
|
263
|
-
TData &
|
|
264
|
-
Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body'>
|
|
265
|
-
: OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'url'> &
|
|
266
|
-
TData;
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import type { HTTPError, Options as KyOptions } from 'ky';
|
|
2
|
+
import ky from 'ky';
|
|
3
|
+
|
|
4
|
+
import { createSseClient } from '../core/serverSentEvents';
|
|
5
|
+
import type { HttpMethod } from '../core/types';
|
|
6
|
+
import { getValidRequestBody } from '../core/utils';
|
|
7
|
+
import type {
|
|
8
|
+
Client,
|
|
9
|
+
Config,
|
|
10
|
+
RequestOptions,
|
|
11
|
+
ResolvedRequestOptions,
|
|
12
|
+
RetryOptions,
|
|
13
|
+
} from './types';
|
|
14
|
+
import type { Middleware } from './utils';
|
|
15
|
+
import {
|
|
16
|
+
buildUrl,
|
|
17
|
+
createConfig,
|
|
18
|
+
createInterceptors,
|
|
19
|
+
getParseAs,
|
|
20
|
+
mergeConfigs,
|
|
21
|
+
mergeHeaders,
|
|
22
|
+
setAuthParams,
|
|
23
|
+
} from './utils';
|
|
24
|
+
|
|
25
|
+
export const createClient = (config: Config = {}): Client => {
|
|
26
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
27
|
+
|
|
28
|
+
const getConfig = (): Config => ({ ..._config });
|
|
29
|
+
|
|
30
|
+
const setConfig = (config: Config): Config => {
|
|
31
|
+
_config = mergeConfigs(_config, config);
|
|
32
|
+
return getConfig();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const interceptors = createInterceptors<
|
|
36
|
+
Request,
|
|
37
|
+
Response,
|
|
38
|
+
unknown,
|
|
39
|
+
ResolvedRequestOptions
|
|
40
|
+
>();
|
|
41
|
+
|
|
42
|
+
const beforeRequest = async (options: RequestOptions) => {
|
|
43
|
+
const opts = {
|
|
44
|
+
..._config,
|
|
45
|
+
...options,
|
|
46
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
47
|
+
ky: options.ky ?? _config.ky ?? ky,
|
|
48
|
+
serializedBody: undefined,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (opts.security) {
|
|
52
|
+
await setAuthParams({
|
|
53
|
+
...opts,
|
|
54
|
+
security: opts.security,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (opts.requestValidator) {
|
|
59
|
+
await opts.requestValidator(opts);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (opts.body !== undefined && opts.bodySerializer) {
|
|
63
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (opts.body === undefined || opts.serializedBody === '') {
|
|
67
|
+
opts.headers.delete('Content-Type');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const url = buildUrl(opts);
|
|
71
|
+
|
|
72
|
+
return { opts, url };
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const parseErrorResponse = async (
|
|
76
|
+
response: Response,
|
|
77
|
+
request: Request,
|
|
78
|
+
opts: ResolvedRequestOptions,
|
|
79
|
+
interceptorsMiddleware: Middleware<
|
|
80
|
+
Request,
|
|
81
|
+
Response,
|
|
82
|
+
unknown,
|
|
83
|
+
ResolvedRequestOptions
|
|
84
|
+
>,
|
|
85
|
+
) => {
|
|
86
|
+
const result = {
|
|
87
|
+
request,
|
|
88
|
+
response,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const textError = await response.text();
|
|
92
|
+
let jsonError: unknown;
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
jsonError = JSON.parse(textError);
|
|
96
|
+
} catch {
|
|
97
|
+
jsonError = undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const error = jsonError ?? textError;
|
|
101
|
+
let finalError = error;
|
|
102
|
+
|
|
103
|
+
for (const fn of interceptorsMiddleware.error.fns) {
|
|
104
|
+
if (fn) {
|
|
105
|
+
finalError = (await fn(error, response, request, opts)) as string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
finalError = finalError || ({} as string);
|
|
110
|
+
|
|
111
|
+
if (opts.throwOnError) {
|
|
112
|
+
throw finalError;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return opts.responseStyle === 'data'
|
|
116
|
+
? undefined
|
|
117
|
+
: {
|
|
118
|
+
error: finalError,
|
|
119
|
+
...result,
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const request: Client['request'] = async (options) => {
|
|
124
|
+
// @ts-expect-error
|
|
125
|
+
const { opts, url } = await beforeRequest(options);
|
|
126
|
+
|
|
127
|
+
const kyInstance = opts.ky!;
|
|
128
|
+
|
|
129
|
+
const validBody = getValidRequestBody(opts);
|
|
130
|
+
|
|
131
|
+
const kyOptions: KyOptions = {
|
|
132
|
+
body: validBody as BodyInit,
|
|
133
|
+
cache: opts.cache,
|
|
134
|
+
credentials: opts.credentials,
|
|
135
|
+
headers: opts.headers,
|
|
136
|
+
integrity: opts.integrity,
|
|
137
|
+
keepalive: opts.keepalive,
|
|
138
|
+
method: opts.method as KyOptions['method'],
|
|
139
|
+
mode: opts.mode,
|
|
140
|
+
redirect: 'follow',
|
|
141
|
+
referrer: opts.referrer,
|
|
142
|
+
referrerPolicy: opts.referrerPolicy,
|
|
143
|
+
signal: opts.signal,
|
|
144
|
+
throwHttpErrors: opts.throwOnError ?? false,
|
|
145
|
+
timeout: opts.timeout,
|
|
146
|
+
...opts.kyOptions,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
if (opts.retry && typeof opts.retry === 'object') {
|
|
150
|
+
const retryOpts = opts.retry as RetryOptions;
|
|
151
|
+
kyOptions.retry = {
|
|
152
|
+
limit: retryOpts.limit ?? 2,
|
|
153
|
+
methods: retryOpts.methods as Array<
|
|
154
|
+
| 'get'
|
|
155
|
+
| 'post'
|
|
156
|
+
| 'put'
|
|
157
|
+
| 'patch'
|
|
158
|
+
| 'head'
|
|
159
|
+
| 'delete'
|
|
160
|
+
| 'options'
|
|
161
|
+
| 'trace'
|
|
162
|
+
>,
|
|
163
|
+
statusCodes: retryOpts.statusCodes,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let request = new Request(url, {
|
|
168
|
+
body: kyOptions.body as BodyInit,
|
|
169
|
+
headers: kyOptions.headers as HeadersInit,
|
|
170
|
+
method: kyOptions.method,
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
for (const fn of interceptors.request.fns) {
|
|
174
|
+
if (fn) {
|
|
175
|
+
request = await fn(request, opts);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
let response: Response;
|
|
180
|
+
|
|
181
|
+
try {
|
|
182
|
+
response = await kyInstance(request, kyOptions);
|
|
183
|
+
} catch (error) {
|
|
184
|
+
if (error && typeof error === 'object' && 'response' in error) {
|
|
185
|
+
const httpError = error as HTTPError;
|
|
186
|
+
response = httpError.response;
|
|
187
|
+
|
|
188
|
+
for (const fn of interceptors.response.fns) {
|
|
189
|
+
if (fn) {
|
|
190
|
+
response = await fn(response, request, opts);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return parseErrorResponse(response, request, opts, interceptors);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
for (const fn of interceptors.response.fns) {
|
|
201
|
+
if (fn) {
|
|
202
|
+
response = await fn(response, request, opts);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const result = {
|
|
207
|
+
request,
|
|
208
|
+
response,
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
if (response.ok) {
|
|
212
|
+
const parseAs =
|
|
213
|
+
(opts.parseAs === 'auto'
|
|
214
|
+
? getParseAs(response.headers.get('Content-Type'))
|
|
215
|
+
: opts.parseAs) ?? 'json';
|
|
216
|
+
|
|
217
|
+
if (
|
|
218
|
+
response.status === 204 ||
|
|
219
|
+
response.headers.get('Content-Length') === '0'
|
|
220
|
+
) {
|
|
221
|
+
let emptyData: any;
|
|
222
|
+
switch (parseAs) {
|
|
223
|
+
case 'arrayBuffer':
|
|
224
|
+
case 'blob':
|
|
225
|
+
case 'text':
|
|
226
|
+
emptyData = await response[parseAs]();
|
|
227
|
+
break;
|
|
228
|
+
case 'formData':
|
|
229
|
+
emptyData = new FormData();
|
|
230
|
+
break;
|
|
231
|
+
case 'stream':
|
|
232
|
+
emptyData = response.body;
|
|
233
|
+
break;
|
|
234
|
+
case 'json':
|
|
235
|
+
default:
|
|
236
|
+
emptyData = {};
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
return opts.responseStyle === 'data'
|
|
240
|
+
? emptyData
|
|
241
|
+
: {
|
|
242
|
+
data: emptyData,
|
|
243
|
+
...result,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let data: any;
|
|
248
|
+
switch (parseAs) {
|
|
249
|
+
case 'arrayBuffer':
|
|
250
|
+
case 'blob':
|
|
251
|
+
case 'formData':
|
|
252
|
+
case 'json':
|
|
253
|
+
case 'text':
|
|
254
|
+
data = await response[parseAs]();
|
|
255
|
+
break;
|
|
256
|
+
case 'stream':
|
|
257
|
+
return opts.responseStyle === 'data'
|
|
258
|
+
? response.body
|
|
259
|
+
: {
|
|
260
|
+
data: response.body,
|
|
261
|
+
...result,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (parseAs === 'json') {
|
|
266
|
+
if (opts.responseValidator) {
|
|
267
|
+
await opts.responseValidator(data);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (opts.responseTransformer) {
|
|
271
|
+
data = await opts.responseTransformer(data);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return opts.responseStyle === 'data'
|
|
276
|
+
? data
|
|
277
|
+
: {
|
|
278
|
+
data,
|
|
279
|
+
...result,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return parseErrorResponse(response, request, opts, interceptors);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const makeMethodFn =
|
|
287
|
+
(method: Uppercase<HttpMethod>) => (options: RequestOptions) =>
|
|
288
|
+
request({ ...options, method });
|
|
289
|
+
|
|
290
|
+
const makeSseFn =
|
|
291
|
+
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
|
|
292
|
+
const { opts, url } = await beforeRequest(options);
|
|
293
|
+
return createSseClient({
|
|
294
|
+
...opts,
|
|
295
|
+
body: opts.body as BodyInit | null | undefined,
|
|
296
|
+
fetch: globalThis.fetch,
|
|
297
|
+
headers: opts.headers as unknown as Record<string, string>,
|
|
298
|
+
method,
|
|
299
|
+
onRequest: async (url, init) => {
|
|
300
|
+
let request = new Request(url, init);
|
|
301
|
+
for (const fn of interceptors.request.fns) {
|
|
302
|
+
if (fn) {
|
|
303
|
+
request = await fn(request, opts);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return request;
|
|
307
|
+
},
|
|
308
|
+
url,
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
return {
|
|
313
|
+
buildUrl,
|
|
314
|
+
connect: makeMethodFn('CONNECT'),
|
|
315
|
+
delete: makeMethodFn('DELETE'),
|
|
316
|
+
get: makeMethodFn('GET'),
|
|
317
|
+
getConfig,
|
|
318
|
+
head: makeMethodFn('HEAD'),
|
|
319
|
+
interceptors,
|
|
320
|
+
options: makeMethodFn('OPTIONS'),
|
|
321
|
+
patch: makeMethodFn('PATCH'),
|
|
322
|
+
post: makeMethodFn('POST'),
|
|
323
|
+
put: makeMethodFn('PUT'),
|
|
324
|
+
request,
|
|
325
|
+
setConfig,
|
|
326
|
+
sse: {
|
|
327
|
+
connect: makeSseFn('CONNECT'),
|
|
328
|
+
delete: makeSseFn('DELETE'),
|
|
329
|
+
get: makeSseFn('GET'),
|
|
330
|
+
head: makeSseFn('HEAD'),
|
|
331
|
+
options: makeSseFn('OPTIONS'),
|
|
332
|
+
patch: makeSseFn('PATCH'),
|
|
333
|
+
post: makeSseFn('POST'),
|
|
334
|
+
put: makeSseFn('PUT'),
|
|
335
|
+
trace: makeSseFn('TRACE'),
|
|
336
|
+
},
|
|
337
|
+
trace: makeMethodFn('TRACE'),
|
|
338
|
+
} as Client;
|
|
339
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type { Auth } from '../core/auth';
|
|
2
|
+
export type { QuerySerializerOptions } from '../core/bodySerializer';
|
|
3
|
+
export {
|
|
4
|
+
formDataBodySerializer,
|
|
5
|
+
jsonBodySerializer,
|
|
6
|
+
urlSearchParamsBodySerializer,
|
|
7
|
+
} from '../core/bodySerializer';
|
|
8
|
+
export { buildClientParams } from '../core/params';
|
|
9
|
+
export { serializeQueryKeyValue } from '../core/queryKeySerializer';
|
|
10
|
+
export { createClient } from './client';
|
|
11
|
+
export type {
|
|
12
|
+
Client,
|
|
13
|
+
ClientOptions,
|
|
14
|
+
Config,
|
|
15
|
+
CreateClientConfig,
|
|
16
|
+
Options,
|
|
17
|
+
RequestOptions,
|
|
18
|
+
RequestResult,
|
|
19
|
+
ResolvedRequestOptions,
|
|
20
|
+
ResponseStyle,
|
|
21
|
+
RetryOptions,
|
|
22
|
+
TDataShape,
|
|
23
|
+
} from './types';
|
|
24
|
+
export { createConfig, mergeHeaders } from './utils';
|