@classytic/mongokit 3.0.2 → 3.0.3

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.d.ts CHANGED
@@ -46,7 +46,7 @@ declare class Repository<TDoc = AnyDocument> {
46
46
  readonly _pagination: PaginationEngine<TDoc>;
47
47
  private readonly _hookMode;
48
48
  [key: string]: unknown;
49
- constructor(Model: Model<TDoc>, plugins?: PluginType[], paginationConfig?: PaginationConfig, options?: RepositoryOptions);
49
+ constructor(Model: Model<TDoc, any, any, any>, plugins?: PluginType[], paginationConfig?: PaginationConfig, options?: RepositoryOptions);
50
50
  /**
51
51
  * Register a plugin
52
52
  */
@@ -236,6 +236,6 @@ declare class Repository<TDoc = AnyDocument> {
236
236
  * @example
237
237
  * const userRepo = createRepository(UserModel, [timestampPlugin()]);
238
238
  */
239
- declare function createRepository<TDoc>(Model: mongoose.Model<TDoc>, plugins?: PluginType[], paginationConfig?: PaginationConfig, options?: RepositoryOptions): Repository<TDoc>;
239
+ declare function createRepository<TDoc>(Model: mongoose.Model<TDoc, any, any, any>, plugins?: PluginType[], paginationConfig?: PaginationConfig, options?: RepositoryOptions): Repository<TDoc>;
240
240
 
241
241
  export { AggregatePaginationResult, AnyDocument, HttpError, KeysetPaginationResult, ObjectId, OffsetPaginationResult, PaginationConfig, PaginationEngine, PluginType, PopulateSpec, Repository, RepositoryContext, RepositoryOptions, SelectSpec, SortSpec, UpdateOptions, createRepository, Repository as default };
package/dist/index.js CHANGED
@@ -643,6 +643,7 @@ var PaginationEngine = class {
643
643
  * @param Model - Mongoose model to paginate
644
644
  * @param config - Pagination configuration
645
645
  */
646
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
646
647
  constructor(Model, config = {}) {
647
648
  this.Model = Model;
648
649
  this.config = {
@@ -50,7 +50,7 @@ declare class PaginationEngine<TDoc = AnyDocument> {
50
50
  * @param Model - Mongoose model to paginate
51
51
  * @param config - Pagination configuration
52
52
  */
53
- constructor(Model: Model<TDoc>, config?: PaginationConfig);
53
+ constructor(Model: Model<TDoc, any, any, any>, config?: PaginationConfig);
54
54
  /**
55
55
  * Offset-based pagination using skip/limit
56
56
  * Best for small datasets and when users need random page access
@@ -171,6 +171,7 @@ var PaginationEngine = class {
171
171
  * @param Model - Mongoose model to paginate
172
172
  * @param config - Pagination configuration
173
173
  */
174
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
174
175
  constructor(Model, config = {}) {
175
176
  this.Model = Model;
176
177
  this.config = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classytic/mongokit",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Production-grade MongoDB repositories with zero dependencies - smart pagination, events, and plugins",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",