@bool-ts/core 2.3.6 → 2.3.8
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,31 +1,32 @@
|
|
|
1
1
|
import { contextArgsKey, httpServerArgsKey, paramArgsKey, paramsArgsKey, queryArgsKey, requestArgsKey, requestBodyArgsKey, requestHeaderArgsKey, requestHeadersArgsKey, responseHeadersArgsKey, routeModelArgsKey } from "../constants/keys";
|
|
2
|
+
import type { IContext } from "../interfaces";
|
|
2
3
|
export type TArgumentsMetadata<TValidationSchema = unknown> = {
|
|
3
4
|
index: number;
|
|
4
5
|
type: typeof requestHeadersArgsKey;
|
|
5
|
-
validationSchema?: TValidationSchema;
|
|
6
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
6
7
|
} | {
|
|
7
8
|
index: number;
|
|
8
9
|
type: typeof requestHeaderArgsKey;
|
|
9
10
|
key: string;
|
|
10
|
-
validationSchema?: TValidationSchema;
|
|
11
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
11
12
|
} | {
|
|
12
13
|
index: number;
|
|
13
14
|
type: typeof requestBodyArgsKey;
|
|
14
|
-
validationSchema?: TValidationSchema;
|
|
15
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
15
16
|
parser?: "arrayBuffer" | "blob" | "formData" | "json" | "text";
|
|
16
17
|
} | {
|
|
17
18
|
index: number;
|
|
18
19
|
type: typeof paramsArgsKey;
|
|
19
|
-
validationSchema?: TValidationSchema;
|
|
20
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
20
21
|
} | {
|
|
21
22
|
index: number;
|
|
22
23
|
type: typeof paramArgsKey;
|
|
23
24
|
key: string;
|
|
24
|
-
validationSchema?: TValidationSchema;
|
|
25
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
25
26
|
} | {
|
|
26
27
|
index: number;
|
|
27
28
|
type: typeof queryArgsKey;
|
|
28
|
-
validationSchema?: TValidationSchema;
|
|
29
|
+
validationSchema?: TValidationSchema | ((context: IContext) => Promise<TValidationSchema> | TValidationSchema);
|
|
29
30
|
} | {
|
|
30
31
|
index: number;
|
|
31
32
|
type: typeof requestArgsKey;
|