mongoose 8.2.3 → 8.2.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mongoose",
3
3
  "description": "Mongoose MongoDB ODM",
4
- "version": "8.2.3",
4
+ "version": "8.2.4",
5
5
  "author": "Guillermo Rauch <guillermo@learnboost.com>",
6
6
  "keywords": [
7
7
  "mongodb",
package/types/index.d.ts CHANGED
@@ -279,7 +279,7 @@ declare module 'mongoose' {
279
279
  *
280
280
  * @remarks Search indexes are only supported when used against a 7.0+ Mongo Atlas cluster.
281
281
  */
282
- searchIndex(description: mongodb.SearchIndexDescription): this;
282
+ searchIndex(description: SearchIndexDescription): this;
283
283
 
284
284
  /**
285
285
  * Returns a list of indexes that this schema declares, via `schema.index()`
@@ -86,4 +86,6 @@ declare module 'mongoose' {
86
86
  expires?: number | string;
87
87
  weights?: Record<string, number>;
88
88
  }
89
+
90
+ type SearchIndexDescription = mongodb.SearchIndexDescription;
89
91
  }
package/types/models.d.ts CHANGED
@@ -327,7 +327,7 @@ declare module 'mongoose' {
327
327
  * Create an [Atlas search index](https://www.mongodb.com/docs/atlas/atlas-search/create-index/).
328
328
  * This function only works when connected to MongoDB Atlas.
329
329
  */
330
- createSearchIndex(description: mongodb.SearchIndexDescription): Promise<string>;
330
+ createSearchIndex(description: SearchIndexDescription): Promise<string>;
331
331
 
332
332
  /** Connection the model uses. */
333
333
  db: Connection;
package/types/query.d.ts CHANGED
@@ -493,7 +493,7 @@ declare module 'mongoose' {
493
493
  get(path: string): any;
494
494
 
495
495
  /** Returns the current query filter (also known as conditions) as a POJO. */
496
- getFilter(): FilterQuery<DocType>;
496
+ getFilter(): FilterQuery<RawDocType>;
497
497
 
498
498
  /** Gets query options. */
499
499
  getOptions(): QueryOptions<DocType>;
@@ -502,7 +502,7 @@ declare module 'mongoose' {
502
502
  getPopulatedPaths(): Array<string>;
503
503
 
504
504
  /** Returns the current query filter. Equivalent to `getFilter()`. */
505
- getQuery(): FilterQuery<DocType>;
505
+ getQuery(): FilterQuery<RawDocType>;
506
506
 
507
507
  /** Returns the current update operations as a JSON object. */
508
508
  getUpdate(): UpdateQuery<DocType> | UpdateWithAggregationPipeline | null;
@@ -234,7 +234,7 @@ declare module 'mongoose' {
234
234
  query?: IfEquals<
235
235
  QueryHelpers,
236
236
  {},
237
- Record<any, <T extends QueryWithHelpers<unknown, THydratedDocumentType>>(this: T, ...args: any) => T>,
237
+ Record<any, <T extends QueryWithHelpers<unknown, THydratedDocumentType, QueryHelpers, DocType>>(this: T, ...args: any) => T>,
238
238
  QueryHelpers
239
239
  >
240
240