@nattyjs/types 0.0.1-beta.6 → 0.0.1-beta.60
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/index.d.ts +155 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ interface ClassTypeInfo extends TypeInfo {
|
|
|
26
26
|
methods?: MethodInfo[];
|
|
27
27
|
properties?: TypeInfo[];
|
|
28
28
|
route?: DecoratorInfo;
|
|
29
|
+
jsDoc?: any;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
interface BuildOptions {
|
|
@@ -33,6 +34,9 @@ interface BuildOptions {
|
|
|
33
34
|
rootDir: string;
|
|
34
35
|
port: number;
|
|
35
36
|
commandName: string;
|
|
37
|
+
outDir: string;
|
|
38
|
+
startupFilePath: string;
|
|
39
|
+
clearScreen: boolean;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
type HttpRequestBodyInfo = {
|
|
@@ -41,6 +45,7 @@ type HttpRequestBodyInfo = {
|
|
|
41
45
|
number?: number | number[];
|
|
42
46
|
boolean?: boolean | boolean[];
|
|
43
47
|
FormData?: FormData;
|
|
48
|
+
buffer?: any;
|
|
44
49
|
ArrayBuffer?: ArrayBuffer;
|
|
45
50
|
Blob?: Blob;
|
|
46
51
|
json?: {
|
|
@@ -89,6 +94,7 @@ interface HttpResponseInit {
|
|
|
89
94
|
headers?: HeadersInit;
|
|
90
95
|
cookies?: Cookie[];
|
|
91
96
|
enableContentNegotiation?: boolean;
|
|
97
|
+
isBuffer?: boolean;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
interface NattyTestModule {
|
|
@@ -262,4 +268,152 @@ interface RequestRouteInfo {
|
|
|
262
268
|
};
|
|
263
269
|
}
|
|
264
270
|
|
|
265
|
-
|
|
271
|
+
type ValidatorMeta = {
|
|
272
|
+
kind: "required";
|
|
273
|
+
options?: any;
|
|
274
|
+
} | {
|
|
275
|
+
kind: "minLength";
|
|
276
|
+
value: number;
|
|
277
|
+
} | {
|
|
278
|
+
kind: "maxLength";
|
|
279
|
+
value: number;
|
|
280
|
+
} | {
|
|
281
|
+
kind: "min";
|
|
282
|
+
value: number;
|
|
283
|
+
} | {
|
|
284
|
+
kind: "max";
|
|
285
|
+
value: number;
|
|
286
|
+
} | {
|
|
287
|
+
kind: "regex";
|
|
288
|
+
pattern: string;
|
|
289
|
+
flags?: string;
|
|
290
|
+
} | {
|
|
291
|
+
kind: "email";
|
|
292
|
+
} | {
|
|
293
|
+
kind: "url";
|
|
294
|
+
} | {
|
|
295
|
+
kind: "ip";
|
|
296
|
+
} | {
|
|
297
|
+
kind: "enum";
|
|
298
|
+
values: (string | number)[];
|
|
299
|
+
} | {
|
|
300
|
+
kind: "custom";
|
|
301
|
+
name: string;
|
|
302
|
+
args?: any[];
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
type PropertyMeta = {
|
|
306
|
+
name: string;
|
|
307
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
308
|
+
ref?: string;
|
|
309
|
+
itemsType?: "string" | "number" | "boolean" | "object";
|
|
310
|
+
itemsRef?: string;
|
|
311
|
+
optional?: boolean;
|
|
312
|
+
enumValues?: (string | number)[];
|
|
313
|
+
validators?: ValidatorMeta[];
|
|
314
|
+
defaultValue?: any;
|
|
315
|
+
defaultValueText?: string;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
type TypeMeta = {
|
|
319
|
+
kind: "object";
|
|
320
|
+
name: string;
|
|
321
|
+
properties: PropertyMeta[];
|
|
322
|
+
} | {
|
|
323
|
+
kind: "enum";
|
|
324
|
+
name: string;
|
|
325
|
+
baseType: "string" | "number";
|
|
326
|
+
enumValues: (string | number)[];
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
type JsDocHeader = {
|
|
330
|
+
name: string;
|
|
331
|
+
required: boolean;
|
|
332
|
+
type?: string;
|
|
333
|
+
description?: string;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
type JsDocParam = {
|
|
337
|
+
name: string;
|
|
338
|
+
type?: string;
|
|
339
|
+
description?: string;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
type JsDocResponse = {
|
|
343
|
+
status: number;
|
|
344
|
+
description?: string;
|
|
345
|
+
type?: string;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
type JsDocInfo = {
|
|
349
|
+
summary?: string;
|
|
350
|
+
description?: string;
|
|
351
|
+
tags?: string[];
|
|
352
|
+
params?: JsDocParam[];
|
|
353
|
+
returns?: string;
|
|
354
|
+
headers?: JsDocHeader[];
|
|
355
|
+
security?: string[];
|
|
356
|
+
responses?: JsDocResponse[];
|
|
357
|
+
deprecated?: string | true;
|
|
358
|
+
custom?: Record<string, string[]>;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type JsDocThrow = {
|
|
362
|
+
status?: number;
|
|
363
|
+
description?: string;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
type RouteParamMeta = {
|
|
367
|
+
name: string;
|
|
368
|
+
in: "path" | "query";
|
|
369
|
+
required: boolean;
|
|
370
|
+
tsType?: string;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
type RouteMeta = {
|
|
374
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
375
|
+
path: string;
|
|
376
|
+
controller: string;
|
|
377
|
+
action: string;
|
|
378
|
+
params?: RouteParamMeta[];
|
|
379
|
+
requestBody?: {
|
|
380
|
+
name: string;
|
|
381
|
+
tsType: string;
|
|
382
|
+
required?: boolean;
|
|
383
|
+
};
|
|
384
|
+
responseType?: string;
|
|
385
|
+
doc?: JsDocInfo;
|
|
386
|
+
auth?: {
|
|
387
|
+
isAnonymous?: boolean;
|
|
388
|
+
schemes?: string[];
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
type ClassDocBundle = {
|
|
393
|
+
className: string;
|
|
394
|
+
classDoc: JsDocInfo;
|
|
395
|
+
methods: Array<{
|
|
396
|
+
name: string;
|
|
397
|
+
doc: JsDocInfo;
|
|
398
|
+
}>;
|
|
399
|
+
properties: Array<{
|
|
400
|
+
name: string;
|
|
401
|
+
doc: JsDocInfo;
|
|
402
|
+
}>;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
type GenerateOpenApiOptions = {
|
|
406
|
+
title: string;
|
|
407
|
+
version: string;
|
|
408
|
+
serverUrl?: string;
|
|
409
|
+
apiPrefix?: string;
|
|
410
|
+
includeApiPrefix?: boolean;
|
|
411
|
+
globalHeaders?: Array<{
|
|
412
|
+
name: string;
|
|
413
|
+
required?: boolean;
|
|
414
|
+
description?: string;
|
|
415
|
+
}>;
|
|
416
|
+
strict?: boolean;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
export { BuildOptions, ClassDocBundle, ClassTypeInfo, Cookie, DbFieldConfig, DecoratorInfo, DecoratorParams, ExceptionTypeInfo, GenerateOpenApiOptions, HttpRequestBodyInfo, HttpRequestBodyInit, HttpRequestInit, HttpResponseInit, IExceptionContext, IHttpResult, IModelBindingContext, JsDocHeader, JsDocInfo, JsDocParam, JsDocResponse, JsDocThrow, MethodInfo, ModelBinding, ModelConfig, NattyTestModule, ParameterInfo, ProblemDetail, PropConfig, PropertyDecoratorConfig, PropertyMeta, RequestRouteInfo, RouteConfig, RouteMeta, TypeInfo, TypeMeta, TypesInfo, ValidatorMeta };
|