@aeriajs/http 0.0.41 → 0.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/routing.d.ts +2 -2
- package/package.json +11 -11
package/dist/routing.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type Middleware = (context: RouteContext) => any;
|
|
|
8
8
|
export type RouteGroupOptions = {
|
|
9
9
|
base?: RouteUri;
|
|
10
10
|
};
|
|
11
|
-
type TypedContext<TContractWithRoles extends ContractWithRoles> = RouteContext<number extends keyof TContractWithRoles['roles'] ? TContractWithRoles['roles'][number] :
|
|
11
|
+
type TypedContext<TContractWithRoles extends ContractWithRoles> = RouteContext<number extends keyof TContractWithRoles['roles'] ? TContractWithRoles['roles'][number] : null> & {
|
|
12
12
|
request: Omit<RouteContext['request'], 'payload' | 'query'> & {
|
|
13
13
|
payload: TContractWithRoles extends {
|
|
14
14
|
payload: infer Payload;
|
|
@@ -33,7 +33,7 @@ export declare const wrapRouteExecution: (res: GenericResponse, cb: () => any |
|
|
|
33
33
|
export declare const createRouter: (options?: Partial<RouterOptions>) => ProxiedRouter<{
|
|
34
34
|
route: <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
|
|
35
35
|
response: infer Response;
|
|
36
|
-
} ? InferResponse<Response> : any) extends infer Response_1 ? TContractWithRoles["roles"] extends unknown[] ? TContractWithRoles["roles"][number] extends infer Role ? "guest" extends Role ? (context: TypedContext<TContractWithRoles>) => Response_1 : (context: RouteContext<number extends keyof TContractWithRoles["roles"] ? TContractWithRoles["roles"][keyof TContractWithRoles["roles"] & number] :
|
|
36
|
+
} ? InferResponse<Response> : any) extends infer Response_1 ? TContractWithRoles["roles"] extends unknown[] ? TContractWithRoles["roles"][number] extends infer Role ? "guest" extends Role ? (context: TypedContext<TContractWithRoles>) => Response_1 : (context: RouteContext<number extends keyof TContractWithRoles["roles"] ? TContractWithRoles["roles"][keyof TContractWithRoles["roles"] & number] : null> & {
|
|
37
37
|
request: Omit<GenericRequest, "payload" | "query"> & {
|
|
38
38
|
payload: TContractWithRoles extends {
|
|
39
39
|
payload: infer Payload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/http",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@aeriajs/access-control": "^0.0.
|
|
26
|
-
"@aeriajs/common": "^0.0.
|
|
27
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
28
|
-
"@aeriajs/types": "^0.0.
|
|
29
|
-
"@aeriajs/validation": "^0.0.
|
|
25
|
+
"@aeriajs/access-control": "^0.0.34",
|
|
26
|
+
"@aeriajs/common": "^0.0.34",
|
|
27
|
+
"@aeriajs/entrypoint": "^0.0.34",
|
|
28
|
+
"@aeriajs/types": "^0.0.31",
|
|
29
|
+
"@aeriajs/validation": "^0.0.37"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@aeriajs/access-control": "^0.0.
|
|
33
|
-
"@aeriajs/common": "^0.0.
|
|
34
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
35
|
-
"@aeriajs/types": "^0.0.
|
|
36
|
-
"@aeriajs/validation": "^0.0.
|
|
32
|
+
"@aeriajs/access-control": "^0.0.34",
|
|
33
|
+
"@aeriajs/common": "^0.0.34",
|
|
34
|
+
"@aeriajs/entrypoint": "^0.0.34",
|
|
35
|
+
"@aeriajs/types": "^0.0.31",
|
|
36
|
+
"@aeriajs/validation": "^0.0.37"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"test": "echo skipping",
|