@ewb/mongoose-query-express 0.0.3 → 0.0.4
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/lib/QueryExpress.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QueryModel } from '@ewb/mongoose-query';
|
|
2
2
|
import { NextFunction, Request, Response } from 'express';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { QueryExpressSub } from './QueryExpressSub.js';
|
|
@@ -20,7 +20,7 @@ export declare class QueryExpress<R extends Request, T extends mongoose.Document
|
|
|
20
20
|
private param;
|
|
21
21
|
private handler;
|
|
22
22
|
readonly options: IQueryExpressHandlerOptions<T>;
|
|
23
|
-
constructor(param: keyof R, handler:
|
|
23
|
+
constructor(param: keyof R, handler: QueryModel<T>, options?: IQueryExpressHandlerOptions<T>);
|
|
24
24
|
post(req: R, res: Response, next: NextFunction): Promise<void>;
|
|
25
25
|
findOne(req: R, _res: Response, next: NextFunction): Promise<void>;
|
|
26
26
|
search(req: R, res: Response, next: NextFunction): Promise<void | Response<any, Record<string, any>>>;
|
package/lib/QueryExpressSub.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QueryModel } from '@ewb/mongoose-query';
|
|
2
2
|
import { NextFunction, Request, Response } from 'express';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { QueryExpress } from './QueryExpress.js';
|
|
@@ -7,7 +7,7 @@ export declare class QueryExpressSub<R extends Request, T extends mongoose.Docum
|
|
|
7
7
|
private express;
|
|
8
8
|
private reqKey;
|
|
9
9
|
private param;
|
|
10
|
-
constructor(handler:
|
|
10
|
+
constructor(handler: QueryModel<T>, express: QueryExpress<R, T>, reqKey: keyof R, param: K);
|
|
11
11
|
post(req: R, _res: Response, next: NextFunction): Promise<void>;
|
|
12
12
|
search(req: R, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
|
|
13
13
|
findOne(req: R, _res: Response, next: NextFunction): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ewb/mongoose-query-express",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Routes and controllers for express to handle mongoose queries",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"preversion": "yarn build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ewb/mongoose-query": "^1.0.
|
|
20
|
+
"@ewb/mongoose-query": "^1.0.4",
|
|
21
21
|
"http-status": "^1.6.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|