@nattyjs/types 0.0.1-beta.51 → 0.0.1-beta.52

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +51 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -268,4 +268,54 @@ interface RequestRouteInfo {
268
268
  };
269
269
  }
270
270
 
271
- export { BuildOptions, ClassTypeInfo, Cookie, DbFieldConfig, DecoratorInfo, DecoratorParams, ExceptionTypeInfo, HttpRequestBodyInfo, HttpRequestBodyInit, HttpRequestInit, HttpResponseInit, IExceptionContext, IHttpResult, IModelBindingContext, MethodInfo, ModelBinding, ModelConfig, NattyTestModule, ParameterInfo, ProblemDetail, PropConfig, PropertyDecoratorConfig, RequestRouteInfo, RouteConfig, TypeInfo, TypesInfo };
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
+ };
315
+
316
+ type TypeMeta = {
317
+ name: string;
318
+ properties: PropertyMeta[];
319
+ };
320
+
321
+ export { BuildOptions, ClassTypeInfo, Cookie, DbFieldConfig, DecoratorInfo, DecoratorParams, ExceptionTypeInfo, HttpRequestBodyInfo, HttpRequestBodyInit, HttpRequestInit, HttpResponseInit, IExceptionContext, IHttpResult, IModelBindingContext, MethodInfo, ModelBinding, ModelConfig, NattyTestModule, ParameterInfo, ProblemDetail, PropConfig, PropertyDecoratorConfig, PropertyMeta, RequestRouteInfo, RouteConfig, TypeInfo, TypeMeta, TypesInfo, ValidatorMeta };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nattyjs/types",
3
- "version": "0.0.1-beta.51",
3
+ "version": "0.0.1-beta.52",
4
4
  "keywords": [],
5
5
  "author": "ajayojha <ojhaajay@outlook.com>",
6
6
  "license": "ISC",