vona-module-a-openapi 5.0.41 → 5.0.42

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.js CHANGED
@@ -683,13 +683,6 @@ function $locale(key) {
683
683
  }
684
684
  /** scope: end */
685
685
 
686
- function schemaRequired(params) {
687
- params = params || $locale('ZodErrorRequired');
688
- return function (schema) {
689
- schema._zod.def.error = z.util.normalizeParams(params).error;
690
- return schema;
691
- };
692
- }
693
686
  function schemaEmail(params) {
694
687
  return function (_schema) {
695
688
  return z.email(params);
@@ -890,6 +883,13 @@ function schemaLooseObject() {
890
883
  return z.looseObject(schema.shape);
891
884
  };
892
885
  }
886
+ function schemaRequired(params) {
887
+ params = params || $locale('ZodErrorRequired');
888
+ return function (schema) {
889
+ schema._zod.def.error = z.util.normalizeParams(params).error;
890
+ return schema;
891
+ };
892
+ }
893
893
 
894
894
  function schemaZodRefine(zodRefineName, options) {
895
895
  return function (schema) {
@@ -923,15 +923,15 @@ function schemaZodTransform(zodTransformName, options) {
923
923
  }
924
924
 
925
925
  const v = {
926
- lazy: schemaLazy,
927
- array: schemaArray,
926
+ required: schemaRequired,
927
+ optional: schemaOptional,
928
928
  default: schemaDefault,
929
929
  object: schemaObject,
930
- optional: schemaOptional,
931
930
  strictObject: schemaStrictObject,
932
931
  looseObject: schemaLooseObject,
932
+ array: schemaArray,
933
+ lazy: schemaLazy,
933
934
  // helpers
934
- required: schemaRequired,
935
935
  email: schemaEmail,
936
936
  url: schemaUrl,
937
937
  uuid: schemaUuid,
@@ -1,7 +1,6 @@
1
1
  import type { ISerializerTransformRecord, TypeSerializerTransformGetter } from 'vona-module-a-serialization';
2
2
  import type { ISchemaObjectExtensionFieldCaptcha } from '../../../types/captcha.ts';
3
3
  import { z } from 'zod';
4
- export declare function schemaRequired(params?: string | z.core.$ZodStringParams): (schema: z.ZodType) => z.ZodType;
5
4
  export declare function schemaEmail(params?: string | z.core.$ZodEmailParams): (_schema: z.ZodString) => z.ZodEmail;
6
5
  export declare function schemaUrl(params?: string | z.core.$ZodURLParams): (_schema: z.ZodString) => z.ZodURL;
7
6
  export declare function schemaUuid(params?: string | z.core.$ZodUUIDParams): (_schema: z.ZodString) => z.ZodUUID;
@@ -11,3 +11,4 @@ export declare function schemaArray(schemaLike?: SchemaLike, params?: z.core.$Zo
11
11
  }): (schema: z.ZodType) => z.ZodType;
12
12
  export declare function schemaStrictObject(): (schema: z.ZodObject) => z.ZodObject;
13
13
  export declare function schemaLooseObject(): (schema: z.ZodObject) => z.ZodObject;
14
+ export declare function schemaRequired(params?: string | z.core.$ZodStringParams): (schema: z.ZodType) => z.ZodType;
@@ -1,16 +1,16 @@
1
- import { schemaCaptcha, schemaEmail, schemaIPv4, schemaIPv6, schemaLowercase, schemaMax, schemaMin, schemaRegex, schemaRequired, schemaSerializerExclude, schemaSerializerGetter, schemaSerializerSensitive, schemaSerializerTransform, schemaTableIdentity, schemaToLowerCase, schemaToUpperCase, schemaTrim, schemaUppercase, schemaUrl, schemaUuid } from './v/helpers.ts';
1
+ import { schemaCaptcha, schemaEmail, schemaIPv4, schemaIPv6, schemaLowercase, schemaMax, schemaMin, schemaRegex, schemaSerializerExclude, schemaSerializerGetter, schemaSerializerSensitive, schemaSerializerTransform, schemaTableIdentity, schemaToLowerCase, schemaToUpperCase, schemaTrim, schemaUppercase, schemaUrl, schemaUuid } from './v/helpers.ts';
2
2
  import { schemaDescription, schemaExample, schemaOpenapi, schemaTitle } from './v/openapi.ts';
3
- import { schemaArray, schemaDefault, schemaLazy, schemaLooseObject, schemaObject, schemaOptional, schemaStrictObject } from './v/system.ts';
3
+ import { schemaArray, schemaDefault, schemaLazy, schemaLooseObject, schemaObject, schemaOptional, schemaRequired, schemaStrictObject } from './v/system.ts';
4
4
  import { schemaZodRefine, schemaZodTransform } from './v/zod.ts';
5
5
  export declare const v: {
6
- lazy: typeof schemaLazy;
7
- array: typeof schemaArray;
6
+ required: typeof schemaRequired;
7
+ optional: typeof schemaOptional;
8
8
  default: typeof schemaDefault;
9
9
  object: typeof schemaObject;
10
- optional: typeof schemaOptional;
11
10
  strictObject: typeof schemaStrictObject;
12
11
  looseObject: typeof schemaLooseObject;
13
- required: typeof schemaRequired;
12
+ array: typeof schemaArray;
13
+ lazy: typeof schemaLazy;
14
14
  email: typeof schemaEmail;
15
15
  url: typeof schemaUrl;
16
16
  uuid: typeof schemaUuid;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-openapi",
3
3
  "type": "module",
4
- "version": "5.0.41",
4
+ "version": "5.0.42",
5
5
  "title": "a-openapi",
6
6
  "vonaModule": {
7
7
  "capabilities": {