@hey-api/openapi-ts 0.86.11 → 0.87.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.
- package/README.md +8 -14
- package/dist/clients/angular/types.ts +2 -2
- package/dist/clients/axios/types.ts +2 -2
- package/dist/clients/core/params.ts +34 -11
- package/dist/clients/fetch/types.ts +2 -2
- package/dist/clients/next/types.ts +2 -2
- package/dist/clients/nuxt/types.ts +1 -1
- package/dist/clients/ofetch/types.ts +2 -2
- package/dist/{types-CFT9BYmF.d.ts → config-B2o9ax_a.d.cts} +1607 -3076
- package/dist/{types-Bxdq98WE.d.cts → config-oAoGatJ7.d.ts} +1770 -2369
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +575 -140
- package/dist/index.d.ts +439 -878
- package/dist/index.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +38 -1
- package/dist/internal.d.ts +38 -1
- package/dist/internal.js +1 -1
- package/dist/openApi-BWD76jue.cjs +21 -0
- package/dist/openApi-BWD76jue.cjs.map +1 -0
- package/dist/openApi-DXfWYPpF.js +21 -0
- package/dist/openApi-DXfWYPpF.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 +11 -0
- package/dist/src-CTUbY-zd.js.map +1 -0
- package/dist/src-H1fIt1p4.cjs +19 -0
- package/dist/src-H1fIt1p4.cjs.map +1 -0
- package/package.json +2 -5
- package/dist/getSpec-NJ6vig64.js +0 -25
- package/dist/getSpec-NJ6vig64.js.map +0 -1
- package/dist/getSpec-ekNG3x72.cjs +0 -25
- package/dist/getSpec-ekNG3x72.cjs.map +0 -1
- package/dist/src-C4Q2-7Ic.js +0 -1310
- package/dist/src-C4Q2-7Ic.js.map +0 -1
- package/dist/src-Cu5Xi-FZ.cjs +0 -1318
- package/dist/src-Cu5Xi-FZ.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as typescript0 from "typescript";
|
|
3
|
-
import ts from "typescript";
|
|
1
|
+
import { S as MaybeArray, _ as Client$2, a as Plugin, b as IR, c as OpenApiOperationObject, d as OpenApiResponseObject, f as OpenApiSchemaObject, g as ExpressionTransformer, h as TypeTransformer, i as DefinePlugin, l as OpenApiParameterObject, m as Logger, n as UserConfig, o as OpenApi, p as Context, s as OpenApiMetaObject, u as OpenApiRequestBodyObject, v as PluginHandler, x as LazyOrAsync, y as StringCase } from "./config-B2o9ax_a.cjs";
|
|
4
2
|
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
|
|
5
3
|
import { Injector } from "@angular/core";
|
|
6
4
|
import { AxiosError, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosStatic, CreateAxiosDefaults } from "axios";
|
|
7
5
|
import { AsyncDataOptions, UseFetchOptions, useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from "nuxt/app";
|
|
8
6
|
import { Ref } from "vue";
|
|
9
7
|
import { FetchOptions, ResponseType, ofetch } from "ofetch";
|
|
8
|
+
import * as typescript0 from "typescript";
|
|
9
|
+
import ts from "typescript";
|
|
10
10
|
|
|
11
|
+
//#region rolldown:runtime
|
|
12
|
+
//#endregion
|
|
11
13
|
//#region src/plugins/@hey-api/client-core/bundle/auth.d.ts
|
|
12
14
|
type AuthToken = string | undefined;
|
|
13
15
|
interface Auth {
|
|
@@ -28,12 +30,12 @@ interface Auth {
|
|
|
28
30
|
}
|
|
29
31
|
//#endregion
|
|
30
32
|
//#region src/plugins/@hey-api/client-core/bundle/pathSerializer.d.ts
|
|
31
|
-
interface SerializerOptions<T
|
|
33
|
+
interface SerializerOptions<T> {
|
|
32
34
|
/**
|
|
33
35
|
* @default true
|
|
34
36
|
*/
|
|
35
37
|
explode: boolean;
|
|
36
|
-
style: T
|
|
38
|
+
style: T;
|
|
37
39
|
}
|
|
38
40
|
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
39
41
|
type ObjectStyle = 'form' | 'deepObject';
|
|
@@ -56,7 +58,7 @@ type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
|
56
58
|
//#endregion
|
|
57
59
|
//#region src/plugins/@hey-api/client-core/bundle/types.d.ts
|
|
58
60
|
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
59
|
-
type Client$
|
|
61
|
+
type Client$7<RequestFn$6 = never, Config$7 = unknown, MethodFn$6 = never, BuildUrlFn$6 = never, SseFn$6 = never> = {
|
|
60
62
|
/**
|
|
61
63
|
* Returns the final request URL.
|
|
62
64
|
*/
|
|
@@ -124,7 +126,7 @@ interface Config {
|
|
|
124
126
|
}
|
|
125
127
|
//#endregion
|
|
126
128
|
//#region src/plugins/@hey-api/client-core/bundle/serverSentEvents.d.ts
|
|
127
|
-
type ServerSentEventsOptions<TData
|
|
129
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
128
130
|
/**
|
|
129
131
|
* Fetch API implementation. You can use this option to provide a custom
|
|
130
132
|
* fetch instance.
|
|
@@ -152,7 +154,7 @@ type ServerSentEventsOptions<TData$1 = unknown> = Omit<RequestInit, 'method'> &
|
|
|
152
154
|
* @param event Event streamed from the server.
|
|
153
155
|
* @returns Nothing (void).
|
|
154
156
|
*/
|
|
155
|
-
onSseEvent?: (event: StreamEvent<TData
|
|
157
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
156
158
|
serializedBody?: RequestInit['body'];
|
|
157
159
|
/**
|
|
158
160
|
* Default retry delay in milliseconds.
|
|
@@ -184,20 +186,20 @@ type ServerSentEventsOptions<TData$1 = unknown> = Omit<RequestInit, 'method'> &
|
|
|
184
186
|
sseSleepFn?: (ms: number) => Promise<void>;
|
|
185
187
|
url: string;
|
|
186
188
|
};
|
|
187
|
-
interface StreamEvent<TData
|
|
188
|
-
data: TData
|
|
189
|
+
interface StreamEvent<TData = unknown> {
|
|
190
|
+
data: TData;
|
|
189
191
|
event?: string;
|
|
190
192
|
id?: string;
|
|
191
193
|
retry?: number;
|
|
192
194
|
}
|
|
193
|
-
type ServerSentEventsResult<TData
|
|
194
|
-
stream: AsyncGenerator<TData
|
|
195
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
196
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
195
197
|
};
|
|
196
198
|
//#endregion
|
|
197
199
|
//#region src/plugins/@hey-api/client-angular/bundle/utils.d.ts
|
|
198
|
-
type ErrInterceptor$3<Err
|
|
199
|
-
type ReqInterceptor$3<Req
|
|
200
|
-
type ResInterceptor$3<Res
|
|
200
|
+
type ErrInterceptor$3<Err, Res, Req, Options$6> = (error: Err, response: Res, request: Req, options: Options$6) => Err | Promise<Err>;
|
|
201
|
+
type ReqInterceptor$3<Req, Options$6> = (request: Req, options: Options$6) => Req | Promise<Req>;
|
|
202
|
+
type ResInterceptor$3<Res, Req, Options$6> = (response: Res, request: Req, options: Options$6) => Res | Promise<Res>;
|
|
201
203
|
declare class Interceptors$3<Interceptor> {
|
|
202
204
|
fns: Array<Interceptor | null>;
|
|
203
205
|
clear(): void;
|
|
@@ -207,19 +209,19 @@ declare class Interceptors$3<Interceptor> {
|
|
|
207
209
|
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
208
210
|
use(fn: Interceptor): number;
|
|
209
211
|
}
|
|
210
|
-
interface Middleware$3<Req
|
|
211
|
-
error: Interceptors$3<ErrInterceptor$3<Err
|
|
212
|
-
request: Interceptors$3<ReqInterceptor$3<Req
|
|
213
|
-
response: Interceptors$3<ResInterceptor$3<Res
|
|
212
|
+
interface Middleware$3<Req, Res, Err, Options$6> {
|
|
213
|
+
error: Interceptors$3<ErrInterceptor$3<Err, Res, Req, Options$6>>;
|
|
214
|
+
request: Interceptors$3<ReqInterceptor$3<Req, Options$6>>;
|
|
215
|
+
response: Interceptors$3<ResInterceptor$3<Res, Req, Options$6>>;
|
|
214
216
|
}
|
|
215
217
|
//#endregion
|
|
216
218
|
//#region src/plugins/@hey-api/client-angular/bundle/types.d.ts
|
|
217
219
|
type ResponseStyle$2 = 'data' | 'fields';
|
|
218
|
-
interface Config$6<T
|
|
220
|
+
interface Config$6<T extends ClientOptions$5 = ClientOptions$5> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<Config, 'headers'> {
|
|
219
221
|
/**
|
|
220
222
|
* Base URL for all requests made by this client.
|
|
221
223
|
*/
|
|
222
|
-
baseUrl?: T
|
|
224
|
+
baseUrl?: T['baseUrl'];
|
|
223
225
|
/**
|
|
224
226
|
* An object containing any HTTP headers that you want to pre-populate your
|
|
225
227
|
* `HttpHeaders` object with.
|
|
@@ -242,12 +244,12 @@ interface Config$6<T$1 extends ClientOptions$5 = ClientOptions$5> extends Omit<R
|
|
|
242
244
|
*
|
|
243
245
|
* @default false
|
|
244
246
|
*/
|
|
245
|
-
throwOnError?: T
|
|
247
|
+
throwOnError?: T['throwOnError'];
|
|
246
248
|
}
|
|
247
|
-
interface RequestOptions$5<TData
|
|
248
|
-
responseStyle: TResponseStyle
|
|
249
|
-
throwOnError: ThrowOnError
|
|
250
|
-
}>, Pick<ServerSentEventsOptions<TData
|
|
249
|
+
interface RequestOptions$5<TData = unknown, TResponseStyle extends ResponseStyle$2 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$6<{
|
|
250
|
+
responseStyle: TResponseStyle;
|
|
251
|
+
throwOnError: ThrowOnError;
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
251
253
|
/**
|
|
252
254
|
* Any body that you want to add to your request.
|
|
253
255
|
*
|
|
@@ -266,24 +268,24 @@ interface RequestOptions$5<TData$1 = unknown, TResponseStyle$1 extends ResponseS
|
|
|
266
268
|
security?: ReadonlyArray<Auth>;
|
|
267
269
|
url: Url;
|
|
268
270
|
}
|
|
269
|
-
interface ResolvedRequestOptions$3<TResponseStyle
|
|
271
|
+
interface ResolvedRequestOptions$3<TResponseStyle extends ResponseStyle$2 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions$5<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
270
272
|
serializedBody?: string;
|
|
271
273
|
}
|
|
272
|
-
type RequestResult$5<TData
|
|
273
|
-
data: TData
|
|
274
|
+
type RequestResult$5<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle$2 = 'fields'> = Promise<ThrowOnError extends true ? TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
275
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
274
276
|
request: HttpRequest<unknown>;
|
|
275
|
-
response: HttpResponse<TData
|
|
276
|
-
} : TResponseStyle
|
|
277
|
-
data: TData
|
|
277
|
+
response: HttpResponse<TData>;
|
|
278
|
+
} : TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : {
|
|
279
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
278
280
|
error: undefined;
|
|
279
281
|
request: HttpRequest<unknown>;
|
|
280
|
-
response: HttpResponse<TData
|
|
282
|
+
response: HttpResponse<TData>;
|
|
281
283
|
} | {
|
|
282
284
|
data: undefined;
|
|
283
|
-
error: TError
|
|
285
|
+
error: TError[keyof TError];
|
|
284
286
|
request: HttpRequest<unknown>;
|
|
285
287
|
response: HttpErrorResponse & {
|
|
286
|
-
error: TError
|
|
288
|
+
error: TError[keyof TError] | null;
|
|
287
289
|
};
|
|
288
290
|
}>;
|
|
289
291
|
interface ClientOptions$5 {
|
|
@@ -300,8 +302,8 @@ type BuildUrlFn$5 = <TData extends {
|
|
|
300
302
|
path?: Record<string, unknown>;
|
|
301
303
|
query?: Record<string, unknown>;
|
|
302
304
|
url: string;
|
|
303
|
-
}>(options:
|
|
304
|
-
type Client = Client$
|
|
305
|
+
}>(options: TData & Options$5<TData>) => string;
|
|
306
|
+
type Client = Client$7<RequestFn$5, Config$6, MethodFn$5, BuildUrlFn$5, SseFn$5> & {
|
|
305
307
|
interceptors: Middleware$3<HttpRequest<unknown>, HttpResponse<unknown>, unknown, ResolvedRequestOptions$3>;
|
|
306
308
|
requestOptions: RequestOptionsFn;
|
|
307
309
|
};
|
|
@@ -312,11 +314,11 @@ interface TDataShape$5 {
|
|
|
312
314
|
query?: unknown;
|
|
313
315
|
url: string;
|
|
314
316
|
}
|
|
315
|
-
type OmitKeys$5<T
|
|
316
|
-
type Options$
|
|
317
|
+
type OmitKeys$5<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
318
|
+
type Options$5<TData extends TDataShape$5 = TDataShape$5, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle$2 = 'fields'> = OmitKeys$5<RequestOptions$5<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
317
319
|
//#endregion
|
|
318
320
|
//#region src/plugins/@hey-api/client-axios/bundle/types.d.ts
|
|
319
|
-
interface Config$5<T
|
|
321
|
+
interface Config$5<T extends ClientOptions$4 = ClientOptions$4> extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, Config {
|
|
320
322
|
/**
|
|
321
323
|
* Axios implementation. You can use this option to provide either an
|
|
322
324
|
* `AxiosStatic` or an `AxiosInstance`.
|
|
@@ -327,7 +329,7 @@ interface Config$5<T$1 extends ClientOptions$4 = ClientOptions$4> extends Omit<C
|
|
|
327
329
|
/**
|
|
328
330
|
* Base URL for all requests made by this client.
|
|
329
331
|
*/
|
|
330
|
-
baseURL?: T
|
|
332
|
+
baseURL?: T['baseURL'];
|
|
331
333
|
/**
|
|
332
334
|
* An object containing any HTTP headers that you want to pre-populate your
|
|
333
335
|
* `Headers` object with.
|
|
@@ -340,11 +342,11 @@ interface Config$5<T$1 extends ClientOptions$4 = ClientOptions$4> extends Omit<C
|
|
|
340
342
|
*
|
|
341
343
|
* @default false
|
|
342
344
|
*/
|
|
343
|
-
throwOnError?: T
|
|
345
|
+
throwOnError?: T['throwOnError'];
|
|
344
346
|
}
|
|
345
|
-
interface RequestOptions$4<TData
|
|
346
|
-
throwOnError: ThrowOnError
|
|
347
|
-
}>, Pick<ServerSentEventsOptions<TData
|
|
347
|
+
interface RequestOptions$4<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$5<{
|
|
348
|
+
throwOnError: ThrowOnError;
|
|
349
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
348
350
|
/**
|
|
349
351
|
* Any body that you want to add to your request.
|
|
350
352
|
*
|
|
@@ -363,11 +365,11 @@ interface ClientOptions$4 {
|
|
|
363
365
|
baseURL?: string;
|
|
364
366
|
throwOnError?: boolean;
|
|
365
367
|
}
|
|
366
|
-
type RequestResult$4<TData
|
|
368
|
+
type RequestResult$4<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>> : Promise<(AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {
|
|
367
369
|
error: undefined;
|
|
368
|
-
}) | (AxiosError<TError
|
|
370
|
+
}) | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {
|
|
369
371
|
data: undefined;
|
|
370
|
-
error: TError
|
|
372
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
371
373
|
})>;
|
|
372
374
|
type MethodFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$4<TData, ThrowOnError>, 'method'>) => RequestResult$4<TData, TError, ThrowOnError>;
|
|
373
375
|
type SseFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$4<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
@@ -377,8 +379,8 @@ type BuildUrlFn$4 = <TData extends {
|
|
|
377
379
|
path?: Record<string, unknown>;
|
|
378
380
|
query?: Record<string, unknown>;
|
|
379
381
|
url: string;
|
|
380
|
-
}>(options:
|
|
381
|
-
type Client$1 = Client$
|
|
382
|
+
}>(options: TData & Options$4<TData>) => string;
|
|
383
|
+
type Client$1 = Client$7<RequestFn$4, Config$5, MethodFn$4, BuildUrlFn$4, SseFn$4> & {
|
|
382
384
|
instance: AxiosInstance;
|
|
383
385
|
};
|
|
384
386
|
interface TDataShape$4 {
|
|
@@ -388,13 +390,13 @@ interface TDataShape$4 {
|
|
|
388
390
|
query?: unknown;
|
|
389
391
|
url: string;
|
|
390
392
|
}
|
|
391
|
-
type OmitKeys$4<T
|
|
392
|
-
type Options$
|
|
393
|
+
type OmitKeys$4<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
394
|
+
type Options$4<TData extends TDataShape$4 = TDataShape$4, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys$4<RequestOptions$4<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
393
395
|
//#endregion
|
|
394
396
|
//#region src/plugins/@hey-api/client-fetch/bundle/utils.d.ts
|
|
395
|
-
type ErrInterceptor$2<Err
|
|
396
|
-
type ReqInterceptor$2<Req
|
|
397
|
-
type ResInterceptor$2<Res
|
|
397
|
+
type ErrInterceptor$2<Err, Res, Req, Options$6> = (error: Err, response: Res, request: Req, options: Options$6) => Err | Promise<Err>;
|
|
398
|
+
type ReqInterceptor$2<Req, Options$6> = (request: Req, options: Options$6) => Req | Promise<Req>;
|
|
399
|
+
type ResInterceptor$2<Res, Req, Options$6> = (response: Res, request: Req, options: Options$6) => Res | Promise<Res>;
|
|
398
400
|
declare class Interceptors$2<Interceptor> {
|
|
399
401
|
fns: Array<Interceptor | null>;
|
|
400
402
|
clear(): void;
|
|
@@ -404,19 +406,19 @@ declare class Interceptors$2<Interceptor> {
|
|
|
404
406
|
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
405
407
|
use(fn: Interceptor): number;
|
|
406
408
|
}
|
|
407
|
-
interface Middleware$2<Req
|
|
408
|
-
error: Interceptors$2<ErrInterceptor$2<Err
|
|
409
|
-
request: Interceptors$2<ReqInterceptor$2<Req
|
|
410
|
-
response: Interceptors$2<ResInterceptor$2<Res
|
|
409
|
+
interface Middleware$2<Req, Res, Err, Options$6> {
|
|
410
|
+
error: Interceptors$2<ErrInterceptor$2<Err, Res, Req, Options$6>>;
|
|
411
|
+
request: Interceptors$2<ReqInterceptor$2<Req, Options$6>>;
|
|
412
|
+
response: Interceptors$2<ResInterceptor$2<Res, Req, Options$6>>;
|
|
411
413
|
}
|
|
412
414
|
//#endregion
|
|
413
415
|
//#region src/plugins/@hey-api/client-fetch/bundle/types.d.ts
|
|
414
416
|
type ResponseStyle$1 = 'data' | 'fields';
|
|
415
|
-
interface Config$4<T
|
|
417
|
+
interface Config$4<T extends ClientOptions$3 = ClientOptions$3> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config {
|
|
416
418
|
/**
|
|
417
419
|
* Base URL for all requests made by this client.
|
|
418
420
|
*/
|
|
419
|
-
baseUrl?: T
|
|
421
|
+
baseUrl?: T['baseUrl'];
|
|
420
422
|
/**
|
|
421
423
|
* Fetch API implementation. You can use this option to provide a custom
|
|
422
424
|
* fetch instance.
|
|
@@ -451,12 +453,12 @@ interface Config$4<T$1 extends ClientOptions$3 = ClientOptions$3> extends Omit<R
|
|
|
451
453
|
*
|
|
452
454
|
* @default false
|
|
453
455
|
*/
|
|
454
|
-
throwOnError?: T
|
|
456
|
+
throwOnError?: T['throwOnError'];
|
|
455
457
|
}
|
|
456
|
-
interface RequestOptions$3<TData
|
|
457
|
-
responseStyle: TResponseStyle
|
|
458
|
-
throwOnError: ThrowOnError
|
|
459
|
-
}>, Pick<ServerSentEventsOptions<TData
|
|
458
|
+
interface RequestOptions$3<TData = unknown, TResponseStyle extends ResponseStyle$1 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$4<{
|
|
459
|
+
responseStyle: TResponseStyle;
|
|
460
|
+
throwOnError: ThrowOnError;
|
|
461
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
460
462
|
/**
|
|
461
463
|
* Any body that you want to add to your request.
|
|
462
464
|
*
|
|
@@ -471,19 +473,19 @@ interface RequestOptions$3<TData$1 = unknown, TResponseStyle$1 extends ResponseS
|
|
|
471
473
|
security?: ReadonlyArray<Auth>;
|
|
472
474
|
url: Url;
|
|
473
475
|
}
|
|
474
|
-
interface ResolvedRequestOptions$2<TResponseStyle
|
|
476
|
+
interface ResolvedRequestOptions$2<TResponseStyle extends ResponseStyle$1 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions$3<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
475
477
|
serializedBody?: string;
|
|
476
478
|
}
|
|
477
|
-
type RequestResult$3<TData
|
|
478
|
-
data: TData
|
|
479
|
+
type RequestResult$3<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle$1 = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
480
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
479
481
|
request: Request;
|
|
480
482
|
response: Response;
|
|
481
|
-
}> : Promise<TResponseStyle
|
|
482
|
-
data: TData
|
|
483
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
484
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
483
485
|
error: undefined;
|
|
484
486
|
} | {
|
|
485
487
|
data: undefined;
|
|
486
|
-
error: TError
|
|
488
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
487
489
|
}) & {
|
|
488
490
|
request: Request;
|
|
489
491
|
response: Response;
|
|
@@ -501,8 +503,8 @@ type BuildUrlFn$3 = <TData extends {
|
|
|
501
503
|
path?: Record<string, unknown>;
|
|
502
504
|
query?: Record<string, unknown>;
|
|
503
505
|
url: string;
|
|
504
|
-
}>(options:
|
|
505
|
-
type Client$3 = Client$
|
|
506
|
+
}>(options: TData & Options$3<TData>) => string;
|
|
507
|
+
type Client$3 = Client$7<RequestFn$3, Config$4, MethodFn$3, BuildUrlFn$3, SseFn$3> & {
|
|
506
508
|
interceptors: Middleware$2<Request, Response, unknown, ResolvedRequestOptions$2>;
|
|
507
509
|
};
|
|
508
510
|
interface TDataShape$3 {
|
|
@@ -512,13 +514,13 @@ interface TDataShape$3 {
|
|
|
512
514
|
query?: unknown;
|
|
513
515
|
url: string;
|
|
514
516
|
}
|
|
515
|
-
type OmitKeys$3<T
|
|
516
|
-
type Options$
|
|
517
|
+
type OmitKeys$3<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
518
|
+
type Options$3<TData extends TDataShape$3 = TDataShape$3, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle$1 = 'fields'> = OmitKeys$3<RequestOptions$3<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
517
519
|
//#endregion
|
|
518
520
|
//#region src/plugins/@hey-api/client-next/bundle/utils.d.ts
|
|
519
|
-
type ErrInterceptor$1<Err
|
|
520
|
-
type ReqInterceptor$1<Options$
|
|
521
|
-
type ResInterceptor$1<Res
|
|
521
|
+
type ErrInterceptor$1<Err, Res, Options$6> = (error: Err, response: Res, options: Options$6) => Err | Promise<Err>;
|
|
522
|
+
type ReqInterceptor$1<Options$6> = (options: Options$6) => void | Promise<void>;
|
|
523
|
+
type ResInterceptor$1<Res, Options$6> = (response: Res, options: Options$6) => Res | Promise<Res>;
|
|
522
524
|
declare class Interceptors$1<Interceptor> {
|
|
523
525
|
fns: Array<Interceptor | null>;
|
|
524
526
|
clear(): void;
|
|
@@ -528,18 +530,18 @@ declare class Interceptors$1<Interceptor> {
|
|
|
528
530
|
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
529
531
|
use(fn: Interceptor): number;
|
|
530
532
|
}
|
|
531
|
-
interface Middleware$1<Res
|
|
532
|
-
error: Interceptors$1<ErrInterceptor$1<Err
|
|
533
|
-
request: Interceptors$1<ReqInterceptor$1<Options$
|
|
534
|
-
response: Interceptors$1<ResInterceptor$1<Res
|
|
533
|
+
interface Middleware$1<Res, Err, Options$6> {
|
|
534
|
+
error: Interceptors$1<ErrInterceptor$1<Err, Res, Options$6>>;
|
|
535
|
+
request: Interceptors$1<ReqInterceptor$1<Options$6>>;
|
|
536
|
+
response: Interceptors$1<ResInterceptor$1<Res, Options$6>>;
|
|
535
537
|
}
|
|
536
538
|
//#endregion
|
|
537
539
|
//#region src/plugins/@hey-api/client-next/bundle/types.d.ts
|
|
538
|
-
interface Config$3<T
|
|
540
|
+
interface Config$3<T extends ClientOptions$2 = ClientOptions$2> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config {
|
|
539
541
|
/**
|
|
540
542
|
* Base URL for all requests made by this client.
|
|
541
543
|
*/
|
|
542
|
-
baseUrl?: T
|
|
544
|
+
baseUrl?: T['baseUrl'];
|
|
543
545
|
/**
|
|
544
546
|
* Fetch API implementation. You can use this option to provide a custom
|
|
545
547
|
* fetch instance.
|
|
@@ -561,11 +563,11 @@ interface Config$3<T$1 extends ClientOptions$2 = ClientOptions$2> extends Omit<R
|
|
|
561
563
|
*
|
|
562
564
|
* @default false
|
|
563
565
|
*/
|
|
564
|
-
throwOnError?: T
|
|
566
|
+
throwOnError?: T['throwOnError'];
|
|
565
567
|
}
|
|
566
|
-
interface RequestOptions$2<TData
|
|
567
|
-
throwOnError: ThrowOnError
|
|
568
|
-
}>, Pick<ServerSentEventsOptions<TData
|
|
568
|
+
interface RequestOptions$2<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$3<{
|
|
569
|
+
throwOnError: ThrowOnError;
|
|
570
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
569
571
|
/**
|
|
570
572
|
* Any body that you want to add to your request.
|
|
571
573
|
*
|
|
@@ -580,18 +582,18 @@ interface RequestOptions$2<TData$1 = unknown, ThrowOnError$1 extends boolean = b
|
|
|
580
582
|
security?: ReadonlyArray<Auth>;
|
|
581
583
|
url: Url;
|
|
582
584
|
}
|
|
583
|
-
interface ResolvedRequestOptions$1<ThrowOnError
|
|
585
|
+
interface ResolvedRequestOptions$1<ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions$2<unknown, ThrowOnError, Url> {
|
|
584
586
|
serializedBody?: string;
|
|
585
587
|
}
|
|
586
|
-
type RequestResult$2<TData
|
|
587
|
-
data: TData
|
|
588
|
+
type RequestResult$2<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<{
|
|
589
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
588
590
|
response: Response;
|
|
589
591
|
}> : Promise<({
|
|
590
|
-
data: TData
|
|
592
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
591
593
|
error: undefined;
|
|
592
594
|
} | {
|
|
593
595
|
data: undefined;
|
|
594
|
-
error: TError
|
|
596
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
595
597
|
}) & {
|
|
596
598
|
response: Response;
|
|
597
599
|
}>;
|
|
@@ -607,8 +609,8 @@ type BuildUrlFn$2 = <TData extends {
|
|
|
607
609
|
path?: Record<string, unknown>;
|
|
608
610
|
query?: Record<string, unknown>;
|
|
609
611
|
url: string;
|
|
610
|
-
}>(options:
|
|
611
|
-
type Client$4 = Client$
|
|
612
|
+
}>(options: TData & Options$2<TData>) => string;
|
|
613
|
+
type Client$4 = Client$7<RequestFn$2, Config$3, MethodFn$2, BuildUrlFn$2, SseFn$2> & {
|
|
612
614
|
interceptors: Middleware$1<Response, unknown, ResolvedRequestOptions$1>;
|
|
613
615
|
};
|
|
614
616
|
interface TDataShape$2 {
|
|
@@ -618,18 +620,18 @@ interface TDataShape$2 {
|
|
|
618
620
|
query?: unknown;
|
|
619
621
|
url: string;
|
|
620
622
|
}
|
|
621
|
-
type OmitKeys$2<T
|
|
622
|
-
type Options$
|
|
623
|
+
type OmitKeys$2<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
624
|
+
type Options$2<TData extends TDataShape$2 = TDataShape$2, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys$2<RequestOptions$2<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
623
625
|
//#endregion
|
|
624
626
|
//#region src/plugins/@hey-api/client-nuxt/bundle/types.d.ts
|
|
625
627
|
type QuerySerializer = (query: Parameters<Client$5['buildUrl']>[0]['query']) => string;
|
|
626
|
-
type WithRefs<TData
|
|
627
|
-
type KeysOf<T
|
|
628
|
-
interface Config$2<T
|
|
628
|
+
type WithRefs<TData> = { [K in keyof TData]: NonNullable<TData[K]> extends object ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> };
|
|
629
|
+
type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;
|
|
630
|
+
interface Config$2<T extends ClientOptions$1 = ClientOptions$1> extends Omit<FetchOptions$1<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>, WithRefs<Pick<FetchOptions$1<unknown>, 'query'>>, Omit<Config, 'querySerializer'> {
|
|
629
631
|
/**
|
|
630
632
|
* Base URL for all requests made by this client.
|
|
631
633
|
*/
|
|
632
|
-
baseURL?: T
|
|
634
|
+
baseURL?: T['baseURL'];
|
|
633
635
|
/**
|
|
634
636
|
* A function for serializing request query parameters. By default, arrays
|
|
635
637
|
* will be exploded in form style, objects will be exploded in deepObject
|
|
@@ -639,7 +641,7 @@ interface Config$2<T$1 extends ClientOptions$1 = ClientOptions$1> extends Omit<F
|
|
|
639
641
|
*/
|
|
640
642
|
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
641
643
|
}
|
|
642
|
-
interface RequestOptions$1<TComposable
|
|
644
|
+
interface RequestOptions$1<TComposable extends Composable = '$fetch', ResT = unknown, DefaultT = undefined, Url extends string = string> extends Config$2, WithRefs<{
|
|
643
645
|
/**
|
|
644
646
|
* Any body that you want to add to your request.
|
|
645
647
|
*
|
|
@@ -649,9 +651,9 @@ interface RequestOptions$1<TComposable$1 extends Composable = '$fetch', ResT$1 =
|
|
|
649
651
|
path?: FetchOptions$1<unknown>['query'];
|
|
650
652
|
query?: FetchOptions$1<unknown>['query'];
|
|
651
653
|
rawBody?: unknown;
|
|
652
|
-
}>, Pick<ServerSentEventsOptions<ResT
|
|
653
|
-
asyncDataOptions?: AsyncDataOptions<ResT
|
|
654
|
-
composable?: TComposable
|
|
654
|
+
}>, Pick<ServerSentEventsOptions<ResT>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
655
|
+
asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;
|
|
656
|
+
composable?: TComposable;
|
|
655
657
|
key?: string;
|
|
656
658
|
/**
|
|
657
659
|
* Security mechanism(s) to use for the request.
|
|
@@ -659,7 +661,7 @@ interface RequestOptions$1<TComposable$1 extends Composable = '$fetch', ResT$1 =
|
|
|
659
661
|
security?: ReadonlyArray<Auth>;
|
|
660
662
|
url: Url;
|
|
661
663
|
}
|
|
662
|
-
type RequestResult$1<TComposable
|
|
664
|
+
type RequestResult$1<TComposable extends Composable, ResT, TError> = TComposable extends '$fetch' ? ReturnType<typeof $fetch<ResT>> : TComposable extends 'useAsyncData' ? ReturnType<typeof useAsyncData<ResT | null, TError>> : TComposable extends 'useFetch' ? ReturnType<typeof useFetch<ResT | null, TError>> : TComposable extends 'useLazyAsyncData' ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>> : TComposable extends 'useLazyFetch' ? ReturnType<typeof useLazyFetch<ResT | null, TError>> : never;
|
|
663
665
|
interface ClientOptions$1 {
|
|
664
666
|
baseURL?: string;
|
|
665
667
|
}
|
|
@@ -682,18 +684,18 @@ interface TDataShape$1 {
|
|
|
682
684
|
query?: FetchOptions$1<unknown>['query'];
|
|
683
685
|
url: string;
|
|
684
686
|
}
|
|
685
|
-
type BuildUrlOptions<TData
|
|
687
|
+
type BuildUrlOptions<TData extends Omit<TDataShape$1, 'headers'> = Omit<TDataShape$1, 'headers'>> = Pick<WithRefs<TData>, 'path' | 'query'> & Pick<TData, 'url'> & Pick<Options$1<'$fetch', TData>, 'baseURL' | 'querySerializer'>;
|
|
686
688
|
type BuildUrlFn$1 = <TData extends Omit<TDataShape$1, 'headers'>>(options: BuildUrlOptions<TData>) => string;
|
|
687
|
-
type Client$5 = Client$
|
|
688
|
-
type OmitKeys$1<T
|
|
689
|
-
type Options$
|
|
690
|
-
type FetchOptions$1<TData
|
|
689
|
+
type Client$5 = Client$7<RequestFn$1, Config$2, MethodFn$1, BuildUrlFn$1, SseFn$1>;
|
|
690
|
+
type OmitKeys$1<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
691
|
+
type Options$1<TComposable extends Composable = '$fetch', TData extends TDataShape$1 = TDataShape$1, ResT = unknown, DefaultT = undefined> = OmitKeys$1<RequestOptions$1<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);
|
|
692
|
+
type FetchOptions$1<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;
|
|
691
693
|
type Composable = '$fetch' | 'useAsyncData' | 'useFetch' | 'useLazyAsyncData' | 'useLazyFetch';
|
|
692
694
|
//#endregion
|
|
693
695
|
//#region src/plugins/@hey-api/client-ofetch/bundle/utils.d.ts
|
|
694
|
-
type ErrInterceptor<Err
|
|
695
|
-
type ReqInterceptor<Req
|
|
696
|
-
type ResInterceptor<Res
|
|
696
|
+
type ErrInterceptor<Err, Res, Req, Options$6> = (error: Err, response: Res, request: Req, options: Options$6) => Err | Promise<Err>;
|
|
697
|
+
type ReqInterceptor<Req, Options$6> = (request: Req, options: Options$6) => Req | Promise<Req>;
|
|
698
|
+
type ResInterceptor<Res, Req, Options$6> = (response: Res, request: Req, options: Options$6) => Res | Promise<Res>;
|
|
697
699
|
declare class Interceptors<Interceptor> {
|
|
698
700
|
fns: Array<Interceptor | null>;
|
|
699
701
|
clear(): void;
|
|
@@ -703,15 +705,15 @@ declare class Interceptors<Interceptor> {
|
|
|
703
705
|
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
704
706
|
use(fn: Interceptor): number;
|
|
705
707
|
}
|
|
706
|
-
interface Middleware<Req
|
|
707
|
-
error: Interceptors<ErrInterceptor<Err
|
|
708
|
-
request: Interceptors<ReqInterceptor<Req
|
|
709
|
-
response: Interceptors<ResInterceptor<Res
|
|
708
|
+
interface Middleware<Req, Res, Err, Options$6> {
|
|
709
|
+
error: Interceptors<ErrInterceptor<Err, Res, Req, Options$6>>;
|
|
710
|
+
request: Interceptors<ReqInterceptor<Req, Options$6>>;
|
|
711
|
+
response: Interceptors<ResInterceptor<Res, Req, Options$6>>;
|
|
710
712
|
}
|
|
711
713
|
//#endregion
|
|
712
714
|
//#region src/plugins/@hey-api/client-ofetch/bundle/types.d.ts
|
|
713
715
|
type ResponseStyle = 'data' | 'fields';
|
|
714
|
-
interface Config$1<T
|
|
716
|
+
interface Config$1<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config {
|
|
715
717
|
/**
|
|
716
718
|
* HTTP(S) agent configuration (Node.js only). Passed through to ofetch.
|
|
717
719
|
*/
|
|
@@ -719,7 +721,7 @@ interface Config$1<T$1 extends ClientOptions = ClientOptions> extends Omit<Reque
|
|
|
719
721
|
/**
|
|
720
722
|
* Base URL for all requests made by this client.
|
|
721
723
|
*/
|
|
722
|
-
baseUrl?: T
|
|
724
|
+
baseUrl?: T['baseUrl'];
|
|
723
725
|
/**
|
|
724
726
|
* Node-only proxy/agent options.
|
|
725
727
|
*/
|
|
@@ -806,16 +808,16 @@ interface Config$1<T$1 extends ClientOptions = ClientOptions> extends Omit<Reque
|
|
|
806
808
|
*
|
|
807
809
|
* @default false
|
|
808
810
|
*/
|
|
809
|
-
throwOnError?: T
|
|
811
|
+
throwOnError?: T['throwOnError'];
|
|
810
812
|
/**
|
|
811
813
|
* Abort the request after the given milliseconds.
|
|
812
814
|
*/
|
|
813
815
|
timeout?: number;
|
|
814
816
|
}
|
|
815
|
-
interface RequestOptions<TData
|
|
816
|
-
responseStyle: TResponseStyle
|
|
817
|
-
throwOnError: ThrowOnError
|
|
818
|
-
}>, Pick<ServerSentEventsOptions<TData
|
|
817
|
+
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$1<{
|
|
818
|
+
responseStyle: TResponseStyle;
|
|
819
|
+
throwOnError: ThrowOnError;
|
|
820
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
819
821
|
/**
|
|
820
822
|
* Any body that you want to add to your request.
|
|
821
823
|
*
|
|
@@ -830,19 +832,19 @@ interface RequestOptions<TData$1 = unknown, TResponseStyle$1 extends ResponseSty
|
|
|
830
832
|
security?: ReadonlyArray<Auth>;
|
|
831
833
|
url: Url;
|
|
832
834
|
}
|
|
833
|
-
interface ResolvedRequestOptions<TResponseStyle
|
|
835
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
834
836
|
serializedBody?: string;
|
|
835
837
|
}
|
|
836
|
-
type RequestResult<TData
|
|
837
|
-
data: TData
|
|
838
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
839
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
838
840
|
request: Request;
|
|
839
841
|
response: Response;
|
|
840
|
-
}> : Promise<TResponseStyle
|
|
841
|
-
data: TData
|
|
842
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
843
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
842
844
|
error: undefined;
|
|
843
845
|
} | {
|
|
844
846
|
data: undefined;
|
|
845
|
-
error: TError
|
|
847
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
846
848
|
}) & {
|
|
847
849
|
request: Request;
|
|
848
850
|
response: Response;
|
|
@@ -860,8 +862,8 @@ type BuildUrlFn = <TData extends {
|
|
|
860
862
|
path?: Record<string, unknown>;
|
|
861
863
|
query?: Record<string, unknown>;
|
|
862
864
|
url: string;
|
|
863
|
-
}>(options:
|
|
864
|
-
type Client$6 = Client$
|
|
865
|
+
}>(options: TData & Options<TData>) => string;
|
|
866
|
+
type Client$6 = Client$7<RequestFn, Config$1, MethodFn, BuildUrlFn, SseFn> & {
|
|
865
867
|
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
866
868
|
};
|
|
867
869
|
interface TDataShape {
|
|
@@ -871,8 +873,8 @@ interface TDataShape {
|
|
|
871
873
|
query?: unknown;
|
|
872
874
|
url: string;
|
|
873
875
|
}
|
|
874
|
-
type OmitKeys<T
|
|
875
|
-
type Options
|
|
876
|
+
type OmitKeys<T, K$1> = Pick<T, Exclude<keyof T, K$1>>;
|
|
877
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
876
878
|
//#endregion
|
|
877
879
|
//#region src/generate.d.ts
|
|
878
880
|
/**
|
|
@@ -880,7 +882,7 @@ type Options$1<TData$1 extends TDataShape = TDataShape, ThrowOnError$1 extends b
|
|
|
880
882
|
*
|
|
881
883
|
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
882
884
|
*/
|
|
883
|
-
declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger) => Promise<ReadonlyArray<
|
|
885
|
+
declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger) => Promise<ReadonlyArray<Context>>;
|
|
884
886
|
//#endregion
|
|
885
887
|
//#region src/config/parser.d.ts
|
|
886
888
|
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
@@ -917,6 +919,435 @@ declare const definePluginConfig: <T extends Plugin.Types>(defaultConfig: Plugin
|
|
|
917
919
|
*/
|
|
918
920
|
name: any;
|
|
919
921
|
};
|
|
922
|
+
declare namespace types_d_exports {
|
|
923
|
+
export { AccessLevel, FunctionParameter, FunctionTypeParameter, ObjectValue, SyntaxKindKeyword, createAnonymousFunction, createArrayLiteralExpression, createArrowFunction, createAsExpression, createAssignment, createAwaitExpression, createBlock, createConditionalExpression, createEnumDeclaration, createForOfStatement, createFunctionTypeNode, createGetAccessorDeclaration, createIndexedAccessTypeNode, createKeywordTypeNode, createLiteralTypeNode, createMappedTypeNode, createNamespaceDeclaration, createNewExpression, createNull, createObjectType, createParameterDeclaration, createPropertyAccessChain, createPropertyAccessExpression, createPropertyAssignment, createRegularExpressionLiteral, createStringLiteral, createTemplateLiteralType, createTypeAliasDeclaration, createTypeNode, createTypeOfExpression, createTypeOperatorNode, createTypeParameterDeclaration, createTypeParenthesizedNode, createTypeReferenceNode, syntaxKindKeyword, toExpression, toParameterDeclarations, toTypeParameters };
|
|
924
|
+
}
|
|
925
|
+
type AccessLevel = 'private' | 'protected' | 'public';
|
|
926
|
+
type FunctionParameter = {
|
|
927
|
+
accessLevel?: AccessLevel;
|
|
928
|
+
default?: any;
|
|
929
|
+
isReadOnly?: boolean;
|
|
930
|
+
isRequired?: boolean;
|
|
931
|
+
name: string;
|
|
932
|
+
type?: any | ts.TypeNode;
|
|
933
|
+
} | {
|
|
934
|
+
destructure: ReadonlyArray<FunctionParameter>;
|
|
935
|
+
type?: any | ts.TypeNode;
|
|
936
|
+
};
|
|
937
|
+
interface FunctionTypeParameter {
|
|
938
|
+
default?: any;
|
|
939
|
+
extends?: string | ts.TypeNode;
|
|
940
|
+
name: string | ts.Identifier;
|
|
941
|
+
}
|
|
942
|
+
declare const createTypeNode: (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]) => ts.TypeNode;
|
|
943
|
+
declare const createPropertyAccessChain: ({
|
|
944
|
+
expression,
|
|
945
|
+
name
|
|
946
|
+
}: {
|
|
947
|
+
expression: ts.Expression;
|
|
948
|
+
name: string | ts.MemberName;
|
|
949
|
+
}) => ts.PropertyAccessChain;
|
|
950
|
+
declare const createPropertyAccessExpression: ({
|
|
951
|
+
expression,
|
|
952
|
+
isOptional,
|
|
953
|
+
name
|
|
954
|
+
}: {
|
|
955
|
+
expression: string | ts.Expression;
|
|
956
|
+
isOptional?: boolean;
|
|
957
|
+
name: string | number | ts.MemberName;
|
|
958
|
+
}) => ts.PropertyAccessChain | ts.PropertyAccessExpression | ts.ElementAccessExpression;
|
|
959
|
+
declare const createNull: () => ts.NullLiteral;
|
|
960
|
+
/**
|
|
961
|
+
* Convert an unknown value to an expression.
|
|
962
|
+
* @param identifiers - list of keys that are treated as identifiers.
|
|
963
|
+
* @param shorthand - if shorthand syntax is allowed.
|
|
964
|
+
* @param unescape - if string should be unescaped.
|
|
965
|
+
* @param value - the unknown value.
|
|
966
|
+
* @returns ts.Expression
|
|
967
|
+
*/
|
|
968
|
+
declare const toExpression: <T = unknown>({
|
|
969
|
+
identifiers,
|
|
970
|
+
isValueAccess,
|
|
971
|
+
shorthand,
|
|
972
|
+
unescape,
|
|
973
|
+
value
|
|
974
|
+
}: {
|
|
975
|
+
identifiers?: string[];
|
|
976
|
+
isValueAccess?: boolean;
|
|
977
|
+
shorthand?: boolean;
|
|
978
|
+
unescape?: boolean;
|
|
979
|
+
value: T;
|
|
980
|
+
}) => ts.Expression | undefined;
|
|
981
|
+
/**
|
|
982
|
+
* Convert parameters to the declaration array expected by TypeScript
|
|
983
|
+
* Compiler API.
|
|
984
|
+
* @param parameters - the parameters to convert to declarations
|
|
985
|
+
* @returns ts.ParameterDeclaration[]
|
|
986
|
+
*/
|
|
987
|
+
declare const toParameterDeclarations: (parameters: ReadonlyArray<FunctionParameter>) => ts.ParameterDeclaration[];
|
|
988
|
+
type SyntaxKindKeyword = 'any' | 'async' | 'boolean' | 'export' | 'never' | 'number' | 'private' | 'protected' | 'public' | 'readonly' | 'static' | 'string' | 'undefined' | 'unknown' | 'void';
|
|
989
|
+
declare const syntaxKindKeyword: <T extends SyntaxKindKeyword>({
|
|
990
|
+
keyword
|
|
991
|
+
}: {
|
|
992
|
+
keyword: T;
|
|
993
|
+
}) => T extends "protected" ? ts.SyntaxKind.ProtectedKeyword : T extends "public" ? ts.SyntaxKind.PublicKeyword : T extends "private" ? ts.SyntaxKind.PrivateKeyword : T extends "export" ? ts.SyntaxKind.ExportKeyword : T extends "async" ? ts.SyntaxKind.ExportKeyword : T extends "readonly" ? ts.SyntaxKind.ExportKeyword : T extends "static" ? ts.SyntaxKind.ExportKeyword : ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword | ts.SyntaxKind.VoidKeyword;
|
|
994
|
+
declare const createKeywordTypeNode: ({
|
|
995
|
+
keyword
|
|
996
|
+
}: {
|
|
997
|
+
keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
|
|
998
|
+
}) => ts.KeywordTypeNode<ts.SyntaxKind.VoidKeyword | ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword>;
|
|
999
|
+
declare const toTypeParameters: (types: (FunctionTypeParameter | ts.TypeParameterDeclaration)[]) => ts.TypeParameterDeclaration[];
|
|
1000
|
+
declare const createTypeOperatorNode: ({
|
|
1001
|
+
operator,
|
|
1002
|
+
type
|
|
1003
|
+
}: {
|
|
1004
|
+
operator: "keyof" | "readonly" | "unique";
|
|
1005
|
+
type: ts.TypeNode;
|
|
1006
|
+
}) => ts.TypeOperatorNode;
|
|
1007
|
+
declare const createTypeParameterDeclaration: ({
|
|
1008
|
+
constraint,
|
|
1009
|
+
defaultType,
|
|
1010
|
+
modifiers,
|
|
1011
|
+
name
|
|
1012
|
+
}: {
|
|
1013
|
+
constraint?: ts.TypeNode;
|
|
1014
|
+
defaultType?: ts.TypeNode;
|
|
1015
|
+
modifiers?: Array<ts.Modifier>;
|
|
1016
|
+
name: string | ts.Identifier;
|
|
1017
|
+
}) => ts.TypeParameterDeclaration;
|
|
1018
|
+
declare const createMappedTypeNode: ({
|
|
1019
|
+
members,
|
|
1020
|
+
nameType,
|
|
1021
|
+
questionToken,
|
|
1022
|
+
readonlyToken,
|
|
1023
|
+
type,
|
|
1024
|
+
typeParameter
|
|
1025
|
+
}: {
|
|
1026
|
+
members?: ts.NodeArray<ts.TypeElement>;
|
|
1027
|
+
nameType?: ts.TypeNode;
|
|
1028
|
+
questionToken?: ts.QuestionToken | ts.PlusToken | ts.MinusToken;
|
|
1029
|
+
readonlyToken?: ts.ReadonlyKeyword | ts.PlusToken | ts.MinusToken;
|
|
1030
|
+
type?: ts.TypeNode;
|
|
1031
|
+
typeParameter: ts.TypeParameterDeclaration;
|
|
1032
|
+
}) => ts.MappedTypeNode;
|
|
1033
|
+
declare const createLiteralTypeNode: ({
|
|
1034
|
+
literal
|
|
1035
|
+
}: {
|
|
1036
|
+
literal: ts.LiteralTypeNode["literal"];
|
|
1037
|
+
}) => ts.LiteralTypeNode;
|
|
1038
|
+
/**
|
|
1039
|
+
* Create arrow function type expression.
|
|
1040
|
+
*/
|
|
1041
|
+
declare const createArrowFunction: ({
|
|
1042
|
+
async,
|
|
1043
|
+
comment,
|
|
1044
|
+
multiLine,
|
|
1045
|
+
parameters,
|
|
1046
|
+
returnType,
|
|
1047
|
+
statements,
|
|
1048
|
+
types
|
|
1049
|
+
}: {
|
|
1050
|
+
async?: boolean;
|
|
1051
|
+
comment?: Comments;
|
|
1052
|
+
multiLine?: boolean;
|
|
1053
|
+
parameters?: ReadonlyArray<FunctionParameter>;
|
|
1054
|
+
returnType?: string | ts.TypeNode;
|
|
1055
|
+
statements?: ts.Statement[] | ts.Expression;
|
|
1056
|
+
types?: FunctionTypeParameter[];
|
|
1057
|
+
}) => ts.ArrowFunction;
|
|
1058
|
+
/**
|
|
1059
|
+
* Create anonymous function type expression.
|
|
1060
|
+
*/
|
|
1061
|
+
declare const createAnonymousFunction: ({
|
|
1062
|
+
async,
|
|
1063
|
+
comment,
|
|
1064
|
+
multiLine,
|
|
1065
|
+
parameters,
|
|
1066
|
+
returnType,
|
|
1067
|
+
statements,
|
|
1068
|
+
types
|
|
1069
|
+
}: {
|
|
1070
|
+
async?: boolean;
|
|
1071
|
+
comment?: Comments;
|
|
1072
|
+
multiLine?: boolean;
|
|
1073
|
+
parameters?: FunctionParameter[];
|
|
1074
|
+
returnType?: string | ts.TypeNode;
|
|
1075
|
+
statements?: ReadonlyArray<ts.Statement>;
|
|
1076
|
+
types?: FunctionTypeParameter[];
|
|
1077
|
+
}) => ts.FunctionExpression;
|
|
1078
|
+
/**
|
|
1079
|
+
* Create Array type expression.
|
|
1080
|
+
*/
|
|
1081
|
+
declare const createArrayLiteralExpression: <T>({
|
|
1082
|
+
elements,
|
|
1083
|
+
multiLine
|
|
1084
|
+
}: {
|
|
1085
|
+
/**
|
|
1086
|
+
* The array to create.
|
|
1087
|
+
*/
|
|
1088
|
+
elements: T[];
|
|
1089
|
+
/**
|
|
1090
|
+
* Should the array be multi line?
|
|
1091
|
+
*
|
|
1092
|
+
* @default false
|
|
1093
|
+
*/
|
|
1094
|
+
multiLine?: boolean;
|
|
1095
|
+
}) => ts.ArrayLiteralExpression;
|
|
1096
|
+
declare const createAwaitExpression: ({
|
|
1097
|
+
expression
|
|
1098
|
+
}: {
|
|
1099
|
+
expression: ts.Expression;
|
|
1100
|
+
}) => ts.AwaitExpression;
|
|
1101
|
+
declare const createFunctionTypeNode: ({
|
|
1102
|
+
parameters,
|
|
1103
|
+
returnType,
|
|
1104
|
+
typeParameters
|
|
1105
|
+
}: {
|
|
1106
|
+
parameters?: ts.ParameterDeclaration[];
|
|
1107
|
+
returnType: ts.TypeNode;
|
|
1108
|
+
typeParameters?: ts.TypeParameterDeclaration[];
|
|
1109
|
+
}) => ts.FunctionTypeNode;
|
|
1110
|
+
type ObjectValue = {
|
|
1111
|
+
assertion?: 'any' | ts.TypeNode;
|
|
1112
|
+
comments?: Comments;
|
|
1113
|
+
spread: string;
|
|
1114
|
+
} | {
|
|
1115
|
+
comments?: Comments;
|
|
1116
|
+
isValueAccess?: boolean;
|
|
1117
|
+
key: string;
|
|
1118
|
+
shorthand?: boolean;
|
|
1119
|
+
value: any;
|
|
1120
|
+
};
|
|
1121
|
+
/**
|
|
1122
|
+
* Create Object type expression.
|
|
1123
|
+
* @param comments - comments to add to each property.
|
|
1124
|
+
* @param identifier - keys that should be treated as identifiers.
|
|
1125
|
+
* @param multiLine - if the object should be multiline.
|
|
1126
|
+
* @param obj - the object to create expression with.
|
|
1127
|
+
* @param shorthand - if shorthand syntax should be used.
|
|
1128
|
+
* @param unescape - if properties strings should be unescaped.
|
|
1129
|
+
* @returns ts.ObjectLiteralExpression
|
|
1130
|
+
*/
|
|
1131
|
+
declare const createObjectType: <T extends Record<string, any> | Array<ObjectValue>>({
|
|
1132
|
+
comments,
|
|
1133
|
+
identifiers,
|
|
1134
|
+
multiLine,
|
|
1135
|
+
obj,
|
|
1136
|
+
shorthand,
|
|
1137
|
+
unescape
|
|
1138
|
+
}: {
|
|
1139
|
+
comments?: Comments;
|
|
1140
|
+
identifiers?: string[];
|
|
1141
|
+
multiLine?: boolean;
|
|
1142
|
+
obj: T;
|
|
1143
|
+
shorthand?: boolean;
|
|
1144
|
+
unescape?: boolean;
|
|
1145
|
+
}) => ts.ObjectLiteralExpression;
|
|
1146
|
+
/**
|
|
1147
|
+
* Create enum declaration. Example `export enum T = { X, Y };`
|
|
1148
|
+
* @param asConst - whether to use const enums.
|
|
1149
|
+
* @param comments - comments to add to each property.
|
|
1150
|
+
* @param leadingComment - leading comment to add to enum.
|
|
1151
|
+
* @param name - the name of the enum.
|
|
1152
|
+
* @param obj - the object representing the enum.
|
|
1153
|
+
* @returns ts.EnumDeclaration
|
|
1154
|
+
*/
|
|
1155
|
+
declare const createEnumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({
|
|
1156
|
+
asConst,
|
|
1157
|
+
comments: enumMemberComments,
|
|
1158
|
+
leadingComment: comments,
|
|
1159
|
+
name,
|
|
1160
|
+
obj
|
|
1161
|
+
}: {
|
|
1162
|
+
asConst: boolean;
|
|
1163
|
+
comments?: Record<string | number, Comments>;
|
|
1164
|
+
leadingComment?: Comments;
|
|
1165
|
+
name: string | ts.TypeReferenceNode;
|
|
1166
|
+
obj: T;
|
|
1167
|
+
}) => ts.EnumDeclaration;
|
|
1168
|
+
/**
|
|
1169
|
+
* Create namespace declaration. Example `export namespace MyNamespace { ... }`
|
|
1170
|
+
* @param name - the name of the namespace.
|
|
1171
|
+
* @param nodes - the nodes in the namespace.
|
|
1172
|
+
* @returns
|
|
1173
|
+
*/
|
|
1174
|
+
declare const createNamespaceDeclaration: ({
|
|
1175
|
+
name,
|
|
1176
|
+
statements
|
|
1177
|
+
}: {
|
|
1178
|
+
name: string;
|
|
1179
|
+
statements: Array<ts.Statement>;
|
|
1180
|
+
}) => ts.ModuleDeclaration;
|
|
1181
|
+
declare const createIndexedAccessTypeNode: ({
|
|
1182
|
+
indexType,
|
|
1183
|
+
objectType
|
|
1184
|
+
}: {
|
|
1185
|
+
indexType: ts.TypeNode;
|
|
1186
|
+
objectType: ts.TypeNode;
|
|
1187
|
+
}) => ts.IndexedAccessTypeNode;
|
|
1188
|
+
declare const createGetAccessorDeclaration: ({
|
|
1189
|
+
modifiers,
|
|
1190
|
+
name,
|
|
1191
|
+
returnType,
|
|
1192
|
+
statements
|
|
1193
|
+
}: {
|
|
1194
|
+
modifiers?: Modifier | ReadonlyArray<Modifier>;
|
|
1195
|
+
name: string | ts.PropertyName;
|
|
1196
|
+
returnType?: string | ts.Identifier;
|
|
1197
|
+
statements: ReadonlyArray<ts.Statement>;
|
|
1198
|
+
}) => ts.GetAccessorDeclaration;
|
|
1199
|
+
declare const createStringLiteral: ({
|
|
1200
|
+
isSingleQuote,
|
|
1201
|
+
text
|
|
1202
|
+
}: {
|
|
1203
|
+
isSingleQuote?: boolean;
|
|
1204
|
+
text: string;
|
|
1205
|
+
}) => ts.StringLiteral;
|
|
1206
|
+
declare const createConditionalExpression: ({
|
|
1207
|
+
condition,
|
|
1208
|
+
whenFalse,
|
|
1209
|
+
whenTrue
|
|
1210
|
+
}: {
|
|
1211
|
+
condition: ts.Expression;
|
|
1212
|
+
whenFalse: ts.Expression;
|
|
1213
|
+
whenTrue: ts.Expression;
|
|
1214
|
+
}) => ts.ConditionalExpression;
|
|
1215
|
+
declare const createTypeOfExpression: ({
|
|
1216
|
+
text
|
|
1217
|
+
}: {
|
|
1218
|
+
text: string | ts.Identifier;
|
|
1219
|
+
}) => ts.TypeOfExpression;
|
|
1220
|
+
/**
|
|
1221
|
+
* Create a type alias declaration. Example `export type X = Y;`.
|
|
1222
|
+
* @param comment (optional) comments to add
|
|
1223
|
+
* @param name the name of the type
|
|
1224
|
+
* @param type the type
|
|
1225
|
+
* @returns ts.TypeAliasDeclaration
|
|
1226
|
+
*/
|
|
1227
|
+
declare const createTypeAliasDeclaration: ({
|
|
1228
|
+
comment,
|
|
1229
|
+
exportType,
|
|
1230
|
+
name,
|
|
1231
|
+
type,
|
|
1232
|
+
typeParameters
|
|
1233
|
+
}: {
|
|
1234
|
+
comment?: Comments;
|
|
1235
|
+
exportType?: boolean;
|
|
1236
|
+
name: string | ts.TypeReferenceNode;
|
|
1237
|
+
type: string | ts.TypeNode | ts.Identifier;
|
|
1238
|
+
typeParameters?: FunctionTypeParameter[];
|
|
1239
|
+
}) => ts.TypeAliasDeclaration;
|
|
1240
|
+
declare const createTypeReferenceNode: ({
|
|
1241
|
+
typeArguments,
|
|
1242
|
+
typeName
|
|
1243
|
+
}: {
|
|
1244
|
+
typeArguments?: ts.TypeNode[];
|
|
1245
|
+
typeName: string | ts.EntityName;
|
|
1246
|
+
}) => ts.TypeReferenceNode;
|
|
1247
|
+
declare const createTypeParenthesizedNode: ({
|
|
1248
|
+
type
|
|
1249
|
+
}: {
|
|
1250
|
+
type: ts.TypeNode;
|
|
1251
|
+
}) => ts.ParenthesizedTypeNode;
|
|
1252
|
+
declare const createParameterDeclaration: ({
|
|
1253
|
+
initializer,
|
|
1254
|
+
modifiers,
|
|
1255
|
+
name,
|
|
1256
|
+
required,
|
|
1257
|
+
type
|
|
1258
|
+
}: {
|
|
1259
|
+
initializer?: ts.Expression;
|
|
1260
|
+
modifiers?: ReadonlyArray<ts.ModifierLike>;
|
|
1261
|
+
name: string | ts.BindingName;
|
|
1262
|
+
required?: boolean;
|
|
1263
|
+
type?: ts.TypeNode;
|
|
1264
|
+
}) => ts.ParameterDeclaration;
|
|
1265
|
+
declare const createNewExpression: ({
|
|
1266
|
+
argumentsArray,
|
|
1267
|
+
expression,
|
|
1268
|
+
typeArguments
|
|
1269
|
+
}: {
|
|
1270
|
+
argumentsArray?: Array<ts.Expression>;
|
|
1271
|
+
expression: ts.Expression;
|
|
1272
|
+
typeArguments?: Array<ts.TypeNode>;
|
|
1273
|
+
}) => ts.NewExpression;
|
|
1274
|
+
declare const createForOfStatement: ({
|
|
1275
|
+
awaitModifier,
|
|
1276
|
+
expression,
|
|
1277
|
+
initializer,
|
|
1278
|
+
statement
|
|
1279
|
+
}: {
|
|
1280
|
+
awaitModifier?: ts.AwaitKeyword;
|
|
1281
|
+
expression: ts.Expression;
|
|
1282
|
+
initializer: ts.ForInitializer;
|
|
1283
|
+
statement: ts.Statement;
|
|
1284
|
+
}) => ts.ForOfStatement;
|
|
1285
|
+
declare const createAssignment: ({
|
|
1286
|
+
left,
|
|
1287
|
+
right
|
|
1288
|
+
}: {
|
|
1289
|
+
left: ts.Expression;
|
|
1290
|
+
right: ts.Expression;
|
|
1291
|
+
}) => ts.AssignmentExpression<ts.EqualsToken>;
|
|
1292
|
+
declare const createBlock: ({
|
|
1293
|
+
multiLine,
|
|
1294
|
+
statements
|
|
1295
|
+
}: {
|
|
1296
|
+
multiLine?: boolean;
|
|
1297
|
+
statements: ReadonlyArray<ts.Statement>;
|
|
1298
|
+
}) => ts.Block;
|
|
1299
|
+
declare const createPropertyAssignment: ({
|
|
1300
|
+
initializer,
|
|
1301
|
+
name
|
|
1302
|
+
}: {
|
|
1303
|
+
initializer: ts.Expression;
|
|
1304
|
+
name: string | ts.PropertyName;
|
|
1305
|
+
}) => ts.PropertyAssignment;
|
|
1306
|
+
declare const createRegularExpressionLiteral: ({
|
|
1307
|
+
flags,
|
|
1308
|
+
text
|
|
1309
|
+
}: {
|
|
1310
|
+
flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
|
|
1311
|
+
text: string;
|
|
1312
|
+
}) => ts.RegularExpressionLiteral;
|
|
1313
|
+
declare const createAsExpression: ({
|
|
1314
|
+
expression,
|
|
1315
|
+
type
|
|
1316
|
+
}: {
|
|
1317
|
+
expression: ts.Expression;
|
|
1318
|
+
type: ts.TypeNode;
|
|
1319
|
+
}) => ts.AsExpression;
|
|
1320
|
+
declare const createTemplateLiteralType: ({
|
|
1321
|
+
value
|
|
1322
|
+
}: {
|
|
1323
|
+
value: ReadonlyArray<string | ts.TypeNode>;
|
|
1324
|
+
}) => ts.TemplateLiteralTypeNode;
|
|
1325
|
+
//#endregion
|
|
1326
|
+
//#region src/tsc/utils.d.ts
|
|
1327
|
+
interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
|
|
1328
|
+
alias?: Alias;
|
|
1329
|
+
asType?: boolean;
|
|
1330
|
+
name: Name;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Print a TypeScript node to a string.
|
|
1334
|
+
* @param node the node to print
|
|
1335
|
+
* @returns string
|
|
1336
|
+
*/
|
|
1337
|
+
declare function tsNodeToString({
|
|
1338
|
+
node,
|
|
1339
|
+
unescape
|
|
1340
|
+
}: {
|
|
1341
|
+
node: ts.Node;
|
|
1342
|
+
unescape?: boolean;
|
|
1343
|
+
}): string;
|
|
1344
|
+
type Modifier = AccessLevel | 'async' | 'export' | 'readonly' | 'static';
|
|
1345
|
+
type CommentLines = Array<string | null | false | undefined>;
|
|
1346
|
+
type CommentObject = {
|
|
1347
|
+
jsdoc?: boolean;
|
|
1348
|
+
lines: CommentLines;
|
|
1349
|
+
};
|
|
1350
|
+
type Comments = CommentLines | Array<CommentObject>;
|
|
920
1351
|
declare namespace module_d_exports {
|
|
921
1352
|
export { ImportExportItem, createCallExpression, createConstVariable, createExportAllDeclaration, createNamedExportDeclarations, createNamedImportDeclarations };
|
|
922
1353
|
}
|
|
@@ -1199,10 +1630,12 @@ declare const tsc: {
|
|
|
1199
1630
|
typeParameters?: typescript0.TypeParameterDeclaration[];
|
|
1200
1631
|
}) => typescript0.FunctionTypeNode;
|
|
1201
1632
|
getAccessorDeclaration: ({
|
|
1633
|
+
modifiers,
|
|
1202
1634
|
name,
|
|
1203
1635
|
returnType,
|
|
1204
1636
|
statements
|
|
1205
1637
|
}: {
|
|
1638
|
+
modifiers?: Modifier | ReadonlyArray<Modifier>;
|
|
1206
1639
|
name: string | typescript0.PropertyName;
|
|
1207
1640
|
returnType?: string | typescript0.Identifier;
|
|
1208
1641
|
statements: ReadonlyArray<typescript0.Statement>;
|
|
@@ -1371,7 +1804,7 @@ declare const tsc: {
|
|
|
1371
1804
|
type
|
|
1372
1805
|
}: {
|
|
1373
1806
|
initializer?: typescript0.Expression;
|
|
1374
|
-
modifier?:
|
|
1807
|
+
modifier?: Modifier;
|
|
1375
1808
|
name: string | typescript0.PropertyName;
|
|
1376
1809
|
type?: typescript0.TypeNode;
|
|
1377
1810
|
}) => typescript0.PropertyDeclaration;
|
|
@@ -1740,10 +2173,12 @@ declare const compiler: {
|
|
|
1740
2173
|
typeParameters?: typescript0.TypeParameterDeclaration[];
|
|
1741
2174
|
}) => typescript0.FunctionTypeNode;
|
|
1742
2175
|
getAccessorDeclaration: ({
|
|
2176
|
+
modifiers,
|
|
1743
2177
|
name,
|
|
1744
2178
|
returnType,
|
|
1745
2179
|
statements
|
|
1746
2180
|
}: {
|
|
2181
|
+
modifiers?: Modifier | ReadonlyArray<Modifier>;
|
|
1747
2182
|
name: string | typescript0.PropertyName;
|
|
1748
2183
|
returnType?: string | typescript0.Identifier;
|
|
1749
2184
|
statements: ReadonlyArray<typescript0.Statement>;
|
|
@@ -1912,7 +2347,7 @@ declare const compiler: {
|
|
|
1912
2347
|
type
|
|
1913
2348
|
}: {
|
|
1914
2349
|
initializer?: typescript0.Expression;
|
|
1915
|
-
modifier?:
|
|
2350
|
+
modifier?: Modifier;
|
|
1916
2351
|
name: string | typescript0.PropertyName;
|
|
1917
2352
|
type?: typescript0.TypeNode;
|
|
1918
2353
|
}) => typescript0.PropertyDeclaration;
|
|
@@ -2138,5 +2573,5 @@ declare module '@hey-api/codegen-core' {
|
|
|
2138
2573
|
*/
|
|
2139
2574
|
declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
|
|
2140
2575
|
//#endregion
|
|
2141
|
-
export { type Client as AngularClient, type Client$1 as AxiosClient, type Client$2 as Client, type DefinePlugin, type ExpressionTransformer, type Client$3 as FetchClient, type IR,
|
|
2576
|
+
export { type Client as AngularClient, type Client$1 as AxiosClient, type Client$2 as Client, type DefinePlugin, type ExpressionTransformer, type Client$3 as FetchClient, type IR, Logger, type Client$4 as NextClient, type Client$5 as NuxtClient, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, type Plugin, type TypeTransformer, type UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, tsc, utils };
|
|
2142
2577
|
//# sourceMappingURL=index.d.cts.map
|