Comparing version 8.2.2 to 8.2.3
{ | ||
"name": "mongoose", | ||
"description": "Mongoose MongoDB ODM", | ||
"version": "8.2.2", | ||
"version": "8.2.3", | ||
"author": "Guillermo Rauch <guillermo@learnboost.com>", | ||
@@ -89,3 +89,2 @@ "keywords": [ | ||
"docs:generate": "node ./scripts/website.js", | ||
"docs:generate:search": "node ./scripts/generateSearch.js", | ||
"docs:generate:sponsorData": "node ./scripts/loadSponsorData.js", | ||
@@ -95,5 +94,5 @@ "docs:merge:stable": "git merge master", | ||
"docs:merge:6x": "git merge 6.x", | ||
"docs:test": "npm run docs:generate && npm run docs:generate:search", | ||
"docs:test": "npm run docs:generate", | ||
"docs:view": "node ./scripts/static.js", | ||
"docs:prepare:publish:stable": "npm run docs:checkout:gh-pages && npm run docs:merge:stable && npm run docs:generate && npm run docs:generate:search", | ||
"docs:prepare:publish:stable": "npm run docs:checkout:gh-pages && npm run docs:merge:stable && npm run docs:generate", | ||
"docs:prepare:publish:5x": "npm run docs:checkout:5x && npm run docs:merge:5x && npm run docs:clean:stable && npm run docs:generate && npm run docs:copy:tmp && npm run docs:checkout:gh-pages && npm run docs:copy:tmp:5x", | ||
@@ -100,0 +99,0 @@ "docs:prepare:publish:6x": "npm run docs:checkout:6x && npm run docs:merge:6x && npm run docs:clean:stable && env DOCS_DEPLOY=true npm run docs:generate && npm run docs:move:6x:tmp && npm run docs:checkout:gh-pages && npm run docs:copy:tmp:6x", |
@@ -278,2 +278,9 @@ /// <reference path="./aggregate.d.ts" /> | ||
/** | ||
* Define a search index for this schema. | ||
* | ||
* @remarks Search indexes are only supported when used against a 7.0+ Mongo Atlas cluster. | ||
*/ | ||
searchIndex(description: mongodb.SearchIndexDescription): this; | ||
/** | ||
* Returns a list of indexes that this schema declares, via `schema.index()` | ||
@@ -280,0 +287,0 @@ * or by `index: true` in a path's options. |
declare module 'mongoose' { | ||
import mongodb = require('mongodb'); | ||
export type ApplyBasicQueryCasting<T> = T | T[] | (T extends (infer U)[] ? U : any) | any; | ||
type Condition<T> = ApplyBasicQueryCasting<T> | QuerySelector<ApplyBasicQueryCasting<T>>; | ||
type StringQueryTypeCasting = string | RegExp; | ||
type ObjectIdQueryTypeCasting = Types.ObjectId | string; | ||
type UUIDQueryTypeCasting = Types.UUID | string; | ||
type QueryTypeCasting<T> = T extends string | ||
? StringQueryTypeCasting | ||
: T extends Types.ObjectId | ||
? ObjectIdQueryTypeCasting | ||
: T extends Types.UUID | ||
? UUIDQueryTypeCasting | ||
: T | any; | ||
export type ApplyBasicQueryCasting<T> = T | T[] | (T extends (infer U)[] ? QueryTypeCasting<U> : T); | ||
export type Condition<T> = ApplyBasicQueryCasting<QueryTypeCasting<T>> | QuerySelector<ApplyBasicQueryCasting<QueryTypeCasting<T>>>; | ||
type _FilterQuery<T> = { | ||
@@ -388,3 +400,3 @@ [P in keyof T]?: Condition<T[P]>; | ||
filter: FilterQuery<RawDocType> | ||
): QueryWithHelpers<Array<RawDocType>, DocType, THelpers, RawDocType, 'find'>; | ||
): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>; | ||
find(): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>; | ||
@@ -485,3 +497,3 @@ | ||
/** Returns the current query filter (also known as conditions) as a POJO. */ | ||
getFilter(): FilterQuery<RawDocType>; | ||
getFilter(): FilterQuery<DocType>; | ||
@@ -495,3 +507,3 @@ /** Gets query options. */ | ||
/** Returns the current query filter. Equivalent to `getFilter()`. */ | ||
getQuery(): FilterQuery<RawDocType>; | ||
getQuery(): FilterQuery<DocType>; | ||
@@ -498,0 +510,0 @@ /** Returns the current update operations as a JSON object. */ |
@@ -28,2 +28,7 @@ declare module 'mongoose' { | ||
/** | ||
* Similar to autoIndex, except for automatically creates any Atlas search indexes defined in your | ||
* schema. Unlike autoIndex, this option defaults to false. | ||
*/ | ||
autoSearchIndex?: boolean; | ||
/** | ||
* If set to `true`, Mongoose will call Model.createCollection() to create the underlying collection | ||
@@ -30,0 +35,0 @@ * in MongoDB if autoCreate is set to true. Calling createCollection() sets the collection's default |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2634488
50042