connectfy-shared 0.0.113 → 0.0.114
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/index.cjs +6 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11593,6 +11593,12 @@ var BaseRepository = class {
|
|
|
11593
11593
|
}
|
|
11594
11594
|
return await this.model.deleteMany({ _id: { $in: data._ids } }).exec();
|
|
11595
11595
|
}
|
|
11596
|
+
async removeManyByQuery(query, opts) {
|
|
11597
|
+
if (opts?.lean) {
|
|
11598
|
+
return await this.model.deleteMany(query).lean().exec();
|
|
11599
|
+
}
|
|
11600
|
+
return await this.model.deleteMany(query).exec();
|
|
11601
|
+
}
|
|
11596
11602
|
// ================================================
|
|
11597
11603
|
// FINE ONE AND FIND MANY FUNCTIONS
|
|
11598
11604
|
// ================================================
|
package/dist/index.d.cts
CHANGED
|
@@ -806,6 +806,7 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
|
|
|
806
806
|
remove(data: BaseRemoveDto, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface>;
|
|
807
807
|
removeOne(query: Record<string, any>, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface>;
|
|
808
808
|
removeMany(data: BaseRemoveAllDto, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface[]>;
|
|
809
|
+
removeManyByQuery(query: Record<string, any>, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface[]>;
|
|
809
810
|
findOne(params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
|
810
811
|
findOneById(_id: string, params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
|
811
812
|
findOneByUserId(userId: string, params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -806,6 +806,7 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
|
|
|
806
806
|
remove(data: BaseRemoveDto, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface>;
|
|
807
807
|
removeOne(query: Record<string, any>, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface>;
|
|
808
808
|
removeMany(data: BaseRemoveAllDto, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface[]>;
|
|
809
|
+
removeManyByQuery(query: Record<string, any>, opts?: IBaseRepositoryRemoveOptions): Promise<TInterface[]>;
|
|
809
810
|
findOne(params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
|
810
811
|
findOneById(_id: string, params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
|
811
812
|
findOneByUserId(userId: string, params?: BaseFindDto, opts?: IBaseRepositoryOptions): Promise<TInterface | TDocument | null>;
|
package/dist/index.mjs
CHANGED
|
@@ -11540,6 +11540,12 @@ var BaseRepository = class {
|
|
|
11540
11540
|
}
|
|
11541
11541
|
return await this.model.deleteMany({ _id: { $in: data._ids } }).exec();
|
|
11542
11542
|
}
|
|
11543
|
+
async removeManyByQuery(query, opts) {
|
|
11544
|
+
if (opts?.lean) {
|
|
11545
|
+
return await this.model.deleteMany(query).lean().exec();
|
|
11546
|
+
}
|
|
11547
|
+
return await this.model.deleteMany(query).exec();
|
|
11548
|
+
}
|
|
11543
11549
|
// ================================================
|
|
11544
11550
|
// FINE ONE AND FIND MANY FUNCTIONS
|
|
11545
11551
|
// ================================================
|