c2-mongoose 2.1.165 → 2.1.166
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/C2Flow.d.ts +1 -1
- package/dist/flow/C2Flow.js +1 -1
- package/package.json +1 -1
- package/src/flow/C2Flow.ts +2 -2
package/dist/flow/C2Flow.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare class C2Flow<D> {
|
|
|
5
5
|
private repository;
|
|
6
6
|
constructor(repository: mongoose.Model<any>);
|
|
7
7
|
create(data: Partial<D>, options: Partial<Options>): Promise<Partial<D>>;
|
|
8
|
-
createMany(data: Partial<D>[], options: Partial<Options>): Promise<Partial<D
|
|
8
|
+
createMany(data: Partial<D>[], options: Partial<Options>): Promise<Partial<D>[]>;
|
|
9
9
|
updateById(_id: Types.ObjectId, data: Partial<D>, options: Partial<Options>): Promise<Partial<D>>;
|
|
10
10
|
updateByModel(searcher: SearchFlow, data: Partial<D>, options: Partial<Options>): Promise<Partial<D>>;
|
|
11
11
|
deleteById(_id: Types.ObjectId, options: Partial<Options>): Promise<void>;
|
package/dist/flow/C2Flow.js
CHANGED
|
@@ -91,7 +91,7 @@ var C2Flow = /** @class */ (function () {
|
|
|
91
91
|
return [4 /*yield*/, global.LoggerRepository.create([log], { session: options.session })];
|
|
92
92
|
case 2:
|
|
93
93
|
_a.sent();
|
|
94
|
-
return [2 /*return*/, dataAfter
|
|
94
|
+
return [2 /*return*/, dataAfter];
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
});
|
package/package.json
CHANGED
package/src/flow/C2Flow.ts
CHANGED
|
@@ -26,7 +26,7 @@ class C2Flow<D> {
|
|
|
26
26
|
return dataAfter[0]._doc
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async createMany(data: Partial<D>[], options: Partial<Options>): Promise<Partial<D
|
|
29
|
+
async createMany(data: Partial<D>[], options: Partial<Options>): Promise<Partial<D>[]> {
|
|
30
30
|
let dataAfter = await this.repository.create(data, { session: options.session })
|
|
31
31
|
|
|
32
32
|
if (options.logger === false) {
|
|
@@ -36,7 +36,7 @@ class C2Flow<D> {
|
|
|
36
36
|
let log: Partial<ILogger> = BuildLogFlowItem.build(options, dataAfter[0]._doc, TypeOfOperation.CREATE, this.repository)
|
|
37
37
|
await (global as any).LoggerRepository.create([log], { session: options.session })
|
|
38
38
|
|
|
39
|
-
return dataAfter
|
|
39
|
+
return dataAfter
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
async updateById(_id: Types.ObjectId, data: Partial<D>, options: Partial<Options>): Promise<Partial<D>> {
|