vovk 3.0.0-draft.264 → 3.0.0-draft.265

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.
@@ -70,10 +70,10 @@ export declare function withStandard<T extends (req: REQ, params: PARAMS extends
70
70
  }): RETURN_TYPE;
71
71
  };
72
72
  models: {
73
- body: BODY | undefined;
74
- query: QUERY | undefined;
75
- params: PARAMS | undefined;
76
- output: OUTPUT | undefined;
77
- iteration: ITERATION | undefined;
73
+ iteration?: (ITERATION & ({} | null)) | undefined;
74
+ output?: (OUTPUT & ({} | null)) | undefined;
75
+ params?: (PARAMS & ({} | null)) | undefined;
76
+ query?: (QUERY & ({} | null)) | undefined;
77
+ body?: (BODY & ({} | null)) | undefined;
78
78
  };
79
79
  };
@@ -65,11 +65,11 @@ export declare function withValidationLibrary<T extends VovkTypedMethod<(req: Kn
65
65
  }): RETURN_TYPE;
66
66
  };
67
67
  models: {
68
- body: BODY_MODEL | undefined;
69
- query: QUERY_MODEL | undefined;
70
- params: PARAMS_MODEL | undefined;
71
- output: OUTPUT_MODEL | undefined;
72
- iteration: ITERATION_MODEL | undefined;
68
+ iteration?: (ITERATION_MODEL & ({} | null)) | undefined;
69
+ output?: (OUTPUT_MODEL & ({} | null)) | undefined;
70
+ params?: (PARAMS_MODEL & ({} | null)) | undefined;
71
+ query?: (QUERY_MODEL & ({} | null)) | undefined;
72
+ body?: (BODY_MODEL & ({} | null)) | undefined;
73
73
  };
74
74
  };
75
75
  export {};
@@ -92,11 +92,11 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
92
92
  return (resultHandler.wrapper ?? resultHandler)(fakeReq, (input?.params ?? {}));
93
93
  }
94
94
  const models = {
95
- body,
96
- query,
97
- params,
98
- output,
99
- iteration,
95
+ ...(body !== undefined ? { body } : {}),
96
+ ...(query !== undefined ? { query } : {}),
97
+ ...(params !== undefined ? { params } : {}),
98
+ ...(output !== undefined ? { output } : {}),
99
+ ...(iteration !== undefined ? { iteration } : {}),
100
100
  };
101
101
  const resultHandlerEnhanced = Object.assign(resultHandler, { fn, models });
102
102
  if (toJSONSchema) {
@@ -70,10 +70,10 @@ export declare function withStandard<T extends (req: REQ, params: PARAMS extends
70
70
  }): RETURN_TYPE;
71
71
  };
72
72
  models: {
73
- body: BODY | undefined;
74
- query: QUERY | undefined;
75
- params: PARAMS | undefined;
76
- output: OUTPUT | undefined;
77
- iteration: ITERATION | undefined;
73
+ iteration?: (ITERATION & ({} | null)) | undefined;
74
+ output?: (OUTPUT & ({} | null)) | undefined;
75
+ params?: (PARAMS & ({} | null)) | undefined;
76
+ query?: (QUERY & ({} | null)) | undefined;
77
+ body?: (BODY & ({} | null)) | undefined;
78
78
  };
79
79
  };
@@ -65,11 +65,11 @@ export declare function withValidationLibrary<T extends VovkTypedMethod<(req: Kn
65
65
  }): RETURN_TYPE;
66
66
  };
67
67
  models: {
68
- body: BODY_MODEL | undefined;
69
- query: QUERY_MODEL | undefined;
70
- params: PARAMS_MODEL | undefined;
71
- output: OUTPUT_MODEL | undefined;
72
- iteration: ITERATION_MODEL | undefined;
68
+ iteration?: (ITERATION_MODEL & ({} | null)) | undefined;
69
+ output?: (OUTPUT_MODEL & ({} | null)) | undefined;
70
+ params?: (PARAMS_MODEL & ({} | null)) | undefined;
71
+ query?: (QUERY_MODEL & ({} | null)) | undefined;
72
+ body?: (BODY_MODEL & ({} | null)) | undefined;
73
73
  };
74
74
  };
75
75
  export {};
@@ -92,11 +92,11 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
92
92
  return (resultHandler.wrapper ?? resultHandler)(fakeReq, (input?.params ?? {}));
93
93
  }
94
94
  const models = {
95
- body,
96
- query,
97
- params,
98
- output,
99
- iteration,
95
+ ...(body !== undefined ? { body } : {}),
96
+ ...(query !== undefined ? { query } : {}),
97
+ ...(params !== undefined ? { params } : {}),
98
+ ...(output !== undefined ? { output } : {}),
99
+ ...(iteration !== undefined ? { iteration } : {}),
100
100
  };
101
101
  const resultHandlerEnhanced = Object.assign(resultHandler, { fn, models });
102
102
  if (toJSONSchema) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.264",
3
+ "version": "3.0.0-draft.265",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",