vovk 3.0.0-draft.301 → 3.0.0-draft.302

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.
@@ -1,8 +1,9 @@
1
1
  import type { StandardSchemaV1 } from '@standard-schema/spec';
2
2
  import { KnownAny, VovkRequest, VovkTypedMethod, VovkValidationType } from '../types';
3
- import { withValidationLibrary } from './withValidationLibrary';
4
3
  export declare function createStandardValidation<TYPE = unknown>({ toJSONSchema, }: {
5
- toJSONSchema: Parameters<typeof withValidationLibrary>[0]['toJSONSchema'];
4
+ toJSONSchema: (model: NonNullable<TYPE>, meta: {
5
+ type: VovkValidationType;
6
+ }) => KnownAny;
6
7
  }): <T extends (req: REQ, params: PARAMS extends StandardSchemaV1 ? StandardSchemaV1.InferInput<PARAMS> : Record<string, string>) => KnownAny, BODY extends StandardSchemaV1 & TYPE, QUERY extends StandardSchemaV1 & TYPE, PARAMS extends StandardSchemaV1 & TYPE, OUTPUT extends StandardSchemaV1 & TYPE, ITERATION extends StandardSchemaV1 & TYPE, REQ extends VovkRequest<KnownAny, KnownAny, KnownAny> = VovkRequest<BODY extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<BODY> : undefined, QUERY extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<QUERY> : undefined, PARAMS extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<PARAMS> : undefined>, IS_FORM extends boolean = false>({ isForm, body, query, params, output, iteration, handle, disableServerSideValidation, skipSchemaEmission, validateEachIteration, }: {
7
8
  isForm?: IS_FORM;
8
9
  body?: BODY;
@@ -1,8 +1,9 @@
1
1
  import type { StandardSchemaV1 } from '@standard-schema/spec';
2
2
  import { KnownAny, VovkRequest, VovkTypedMethod, VovkValidationType } from '../types';
3
- import { withValidationLibrary } from './withValidationLibrary';
4
3
  export declare function createStandardValidation<TYPE = unknown>({ toJSONSchema, }: {
5
- toJSONSchema: Parameters<typeof withValidationLibrary>[0]['toJSONSchema'];
4
+ toJSONSchema: (model: NonNullable<TYPE>, meta: {
5
+ type: VovkValidationType;
6
+ }) => KnownAny;
6
7
  }): <T extends (req: REQ, params: PARAMS extends StandardSchemaV1 ? StandardSchemaV1.InferInput<PARAMS> : Record<string, string>) => KnownAny, BODY extends StandardSchemaV1 & TYPE, QUERY extends StandardSchemaV1 & TYPE, PARAMS extends StandardSchemaV1 & TYPE, OUTPUT extends StandardSchemaV1 & TYPE, ITERATION extends StandardSchemaV1 & TYPE, REQ extends VovkRequest<KnownAny, KnownAny, KnownAny> = VovkRequest<BODY extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<BODY> : undefined, QUERY extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<QUERY> : undefined, PARAMS extends StandardSchemaV1<unknown, unknown> ? StandardSchemaV1.InferInput<PARAMS> : undefined>, IS_FORM extends boolean = false>({ isForm, body, query, params, output, iteration, handle, disableServerSideValidation, skipSchemaEmission, validateEachIteration, }: {
7
8
  isForm?: IS_FORM;
8
9
  body?: BODY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.301",
3
+ "version": "3.0.0-draft.302",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",