connectfy-shared 0.0.77 → 0.0.78

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 CHANGED
@@ -11487,6 +11487,15 @@ var BaseRepository = class {
11487
11487
  } = params;
11488
11488
  return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean().exec();
11489
11489
  }
11490
+ async findAll(params = {}) {
11491
+ const {
11492
+ query = {},
11493
+ fields = "",
11494
+ sort = { createdAt: -1 },
11495
+ populate = []
11496
+ } = params;
11497
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).lean().exec();
11498
+ }
11490
11499
  // ================================================
11491
11500
  // EXIST AND COUNT FUNCTIONS
11492
11501
  // ================================================
package/dist/index.d.cts CHANGED
@@ -783,6 +783,7 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
783
783
  findOneById(_id: string, params?: BaseFindDto): Promise<TInterface | null>;
784
784
  findOneByUserId(userId: string, params?: BaseFindDto): Promise<TInterface | null>;
785
785
  findMany(params?: BaseFindDto): Promise<TInterface[]>;
786
+ findAll(params?: BaseFindDto): Promise<TInterface[]>;
786
787
  existsByField(query: Record<string, any>): Promise<boolean>;
787
788
  count(query: Record<string, any>): Promise<number>;
788
789
  }
package/dist/index.d.ts CHANGED
@@ -783,6 +783,7 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
783
783
  findOneById(_id: string, params?: BaseFindDto): Promise<TInterface | null>;
784
784
  findOneByUserId(userId: string, params?: BaseFindDto): Promise<TInterface | null>;
785
785
  findMany(params?: BaseFindDto): Promise<TInterface[]>;
786
+ findAll(params?: BaseFindDto): Promise<TInterface[]>;
786
787
  existsByField(query: Record<string, any>): Promise<boolean>;
787
788
  count(query: Record<string, any>): Promise<number>;
788
789
  }
package/dist/index.mjs CHANGED
@@ -11445,6 +11445,15 @@ var BaseRepository = class {
11445
11445
  } = params;
11446
11446
  return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean().exec();
11447
11447
  }
11448
+ async findAll(params = {}) {
11449
+ const {
11450
+ query = {},
11451
+ fields = "",
11452
+ sort = { createdAt: -1 },
11453
+ populate = []
11454
+ } = params;
11455
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).lean().exec();
11456
+ }
11448
11457
  // ================================================
11449
11458
  // EXIST AND COUNT FUNCTIONS
11450
11459
  // ================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectfy-shared",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {