@nattyjs/types 0.0.1-beta.51 → 0.0.1-beta.53
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 +135 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -268,4 +268,138 @@ interface RequestRouteInfo {
|
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
|
|
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
|
+
export { BuildOptions, ClassDocBundle, ClassTypeInfo, Cookie, DbFieldConfig, DecoratorInfo, DecoratorParams, ExceptionTypeInfo, 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 };
|