c2-mongoose 2.1.97 → 2.1.98
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/flow/CrudFlow.d.ts +1 -1
- package/package.json +1 -1
- package/src/flow/CrudFlow.ts +1 -1
package/dist/flow/CrudFlow.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class CrudFlow<D> {
|
|
|
13
13
|
updateAny(id: string, data: any, session?: any): Promise<D>;
|
|
14
14
|
updateByModel(filter: any, data: any, params: any): Promise<D>;
|
|
15
15
|
find(options?: SearchOptions): Promise<SearchResponse<D>>;
|
|
16
|
-
getOne(model: D, session
|
|
16
|
+
getOne(model: D, session?: ClientSession): Promise<D>;
|
|
17
17
|
get(id: string, pop?: string, sel?: string, session?: ClientSession): Promise<D>;
|
|
18
18
|
getById(id: string, session?: ClientSession): Promise<Partial<D>>;
|
|
19
19
|
sumBy(fieldToSum: any, fieldToGroup: any, addToSet?: any, session?: ClientSession): Promise<any>;
|
package/package.json
CHANGED
package/src/flow/CrudFlow.ts
CHANGED
|
@@ -48,7 +48,7 @@ class CrudFlow<D> {
|
|
|
48
48
|
return await this.search.search(this.repository, options)
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
public async getOne(model: D, session
|
|
51
|
+
public async getOne(model: D, session?: ClientSession): Promise<D> {
|
|
52
52
|
const data = await this.search.findOne(this.repository, model, session)
|
|
53
53
|
return data as D
|
|
54
54
|
}
|