@aeriajs/http 0.0.23 → 0.0.25
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 +5 -5
package/dist/routing.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ type TypedContext<TContractWithRoles extends ContractWithRoles> = Omit<Context,
|
|
|
21
21
|
};
|
|
22
22
|
export type ProxiedRouter<TRouter> = TRouter & Record<RequestMethod, <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
|
|
23
23
|
response: infer Response;
|
|
24
|
-
} ? InferResponse<Response> : any) extends infer Response ? 'roles' extends
|
|
24
|
+
} ? InferResponse<Response> : any) extends infer Response ? TContractWithRoles['roles'] extends unknown[] ? TContractWithRoles['roles'][number] extends infer Role ? 'guest' extends Role ? (context: TypedContext<TContractWithRoles>) => Response : (context: TypedContext<TContractWithRoles> & {
|
|
25
25
|
token: {
|
|
26
26
|
authenticated: true;
|
|
27
27
|
};
|
|
@@ -34,7 +34,7 @@ export declare const wrapRouteExecution: (res: GenericResponse, cb: () => any |
|
|
|
34
34
|
export declare const createRouter: (options?: Partial<RouterOptions>) => ProxiedRouter<{
|
|
35
35
|
route: <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
|
|
36
36
|
response: infer Response;
|
|
37
|
-
} ? InferResponse<Response> : any) extends infer Response_1 ? "roles" extends
|
|
37
|
+
} ? 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: Omit<Context, "request"> & {
|
|
38
38
|
request: Omit<GenericRequest, "payload" | "query"> & {
|
|
39
39
|
payload: TContractWithRoles extends {
|
|
40
40
|
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.25",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@aeriajs/access-control": "^0.0.
|
|
26
|
-
"@aeriajs/common": "^0.0.
|
|
27
|
-
"@aeriajs/types": "^0.0.
|
|
28
|
-
"@aeriajs/validation": "^0.0.
|
|
25
|
+
"@aeriajs/access-control": "^0.0.18",
|
|
26
|
+
"@aeriajs/common": "^0.0.18",
|
|
27
|
+
"@aeriajs/types": "^0.0.17",
|
|
28
|
+
"@aeriajs/validation": "^0.0.21"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"test": "echo skipping",
|