@@ -38,7 +38,6 @@ import type {
3838 CountOptions ,
3939 CreateCollectionOptions ,
4040 CreateIndexesOptions ,
41- CursorCloseOptions ,
4241 DbOptions ,
4342 DbStatsOptions ,
4443 DeleteOptions ,
@@ -69,16 +68,13 @@ import type {
6968 ListDatabasesOptions ,
7069 ListDatabasesResult ,
7170 ListIndexesOptions ,
72- MapFunction ,
73- MapReduceOptions ,
7471 ModifyResult ,
7572 MongoClientOptions ,
7673 ObjectId ,
7774 OperationOptions ,
7875 OptionalUnlessRequiredId ,
7976 ProfilingLevel ,
8077 ProfilingLevelOptions ,
81- ReduceFunction ,
8278 RemoveUserOptions ,
8379 RenameOptions ,
8480 ReplaceOptions ,
@@ -99,7 +95,7 @@ type NonConstructor<T> = Pick<T, NonConstructorKeys<T>>;
9995
10096declare const Admin : new ( ) => Omit < MDBAdmin , 'addUser' | 'buildInfo' | 'command' | 'listDatabases' | 'ping' | 'removeUser' | 'replSetGetStatus' | 'serverInfo' | 'serverStatus' | 'validateCollection' > ;
10197declare const ChangeStream : new < TSchema extends Document = Document , TChange extends Document = ChangeStreamDocument < TSchema > > ( ) => Omit < MDBChangeStream < TSchema , TChange > , 'close' | 'hasNext' | 'next' | 'tryNext' > ;
102- declare const Collection : new < TSchema > ( ) => Omit < MDBCollection < TSchema > , 'initializeUnorderedBulkOp' | 'initializeOrderedBulkOp' | 'bulkWrite' | 'count' | 'countDocuments' | 'estimatedDocumentCount' | 'createIndex' | 'createIndexes' | 'dropIndex' | 'dropIndexes' | 'deleteMany' | 'deleteOne' | 'distinct' | 'drop' | 'findOne' | 'findOneAndDelete' | 'findOneAndReplace' | 'findOneAndUpdate' | 'indexExists' | 'indexInformation' | 'indexes' | 'insert' | ' insertMany'| 'insertOne' | 'isCapped' | 'mapReduce' | ' options'| 'remove' | ' rename'| 'replaceOne' | 'stats' | 'update '| 'updateMany' | 'updateOne' | 'aggregate' | 'find' | 'listIndexes' | 'watch' > ;
98+ declare const Collection : new < TSchema > ( ) => Omit < MDBCollection < TSchema > , 'initializeUnorderedBulkOp' | 'initializeOrderedBulkOp' | 'bulkWrite' | 'count' | 'countDocuments' | 'estimatedDocumentCount' | 'createIndex' | 'createIndexes' | 'dropIndex' | 'dropIndexes' | 'deleteMany' | 'deleteOne' | 'distinct' | 'drop' | 'findOne' | 'findOneAndDelete' | 'findOneAndReplace' | 'findOneAndUpdate' | 'indexExists' | 'indexInformation' | 'indexes' | 'insertMany' | 'insertOne' | 'isCapped' | 'options' | 'rename' | 'replaceOne' | 'stats' | 'updateMany' | 'updateOne' | 'aggregate' | 'find' | 'listIndexes' | 'watch' > ;
10399declare const Db : new ( ) => Omit < MDBDb , 'command' | 'addUser' | 'removeUser' | 'createCollection' | 'dropCollection' | 'createIndex' | 'dropDatabase' | 'indexInformation' | 'profilingLevel' | 'setProfilingLevel' | 'renameCollection' | 'stats' | 'collections' | 'collection' | 'admin' | 'aggregate' | 'listCollections' | 'watch' > ;
104100declare const GridFSBucket : new ( db : LegacyDb , options : GridFSBucketOptions ) => Omit < NonConstructor < MDBGridFSBucket > , 'delete' | 'rename' | 'drop' | 'find' > ;
105101declare const MongoClient : new ( url : string , options ?: MongoClientOptions ) => Omit < NonConstructor < MDBMongoClient > , 'connect' | 'close' | 'db' | 'watch' | 'withSession' | 'startSession' > ;
@@ -732,49 +728,6 @@ declare class LegacyCollection<TSchema extends Document = Document> extends Coll
732728 * @typeParam TChange - Type of the whole change stream document emitted
733729 */
734730 watch < TLocal extends Document = TSchema , TChange extends Document = ChangeStreamDocument < TLocal > > ( pipeline ?: Document [ ] , options ?: ChangeStreamOptions ) : LegacyChangeStream < TLocal , TChange > ;
735- /**
736- * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
737- *
738- * @deprecated collection.mapReduce is deprecated. Use the aggregation pipeline instead. Visit https://docs.mongodb.com/manual/reference/map-reduce-to-aggregation-pipeline for more information on how to translate map-reduce operations to the aggregation pipeline.
739- * @param map - The mapping function.
740- * @param reduce - The reduce function.
741- * @param options - Optional settings for the command
742- * @param callback - An optional callback, a Promise will be returned if none is provided
743- */
744- mapReduce < TKey = any , TValue = any > ( map : string | MapFunction < TSchema > , reduce : string | ReduceFunction < TKey , TValue > ) : Promise < Document | Document [ ] > ;
745- mapReduce < TKey = any , TValue = any > ( map : string | MapFunction < TSchema > , reduce : string | ReduceFunction < TKey , TValue > , callback : Callback < Document | Document [ ] > ) : void ;
746- mapReduce < TKey = any , TValue = any > ( map : string | MapFunction < TSchema > , reduce : string | ReduceFunction < TKey , TValue > , options : MapReduceOptions < TKey , TValue > ) : Promise < Document | Document [ ] > ;
747- mapReduce < TKey = any , TValue = any > ( map : string | MapFunction < TSchema > , reduce : string | ReduceFunction < TKey , TValue > , options : MapReduceOptions < TKey , TValue > , callback : Callback < Document | Document [ ] > ) : void ;
748- /**
749- * Inserts a single document or a an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
750- * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
751- * can be overridden by setting the **forceServerObjectId** flag.
752- *
753- * @deprecated Use insertOne, insertMany or bulkWrite instead.
754- * @param docs - The documents to insert
755- * @param options - Optional settings for the command
756- * @param callback - An optional callback, a Promise will be returned if none is provided
757- */
758- insert ( docs : OptionalUnlessRequiredId < TSchema > [ ] , options : BulkWriteOptions , callback : Callback < InsertManyResult < TSchema > > ) : Promise < InsertManyResult < TSchema > > | void ;
759- /**
760- * Updates documents.
761- *
762- * @deprecated use updateOne, updateMany or bulkWrite
763- * @param selector - The selector for the update operation.
764- * @param update - The update operations to be applied to the documents
765- * @param options - Optional settings for the command
766- * @param callback - An optional callback, a Promise will be returned if none is provided
767- */
768- update ( selector : Filter < TSchema > , update : UpdateFilter < TSchema > , options : UpdateOptions , callback : Callback < Document > ) : Promise < UpdateResult > | void ;
769- /**
770- * Remove documents.
771- *
772- * @deprecated use deleteOne, deleteMany or bulkWrite
773- * @param selector - The selector for the update operation.
774- * @param options - Optional settings for the command
775- * @param callback - An optional callback, a Promise will be returned if none is provided
776- */
777- remove ( selector : Filter < TSchema > , options : DeleteOptions , callback : Callback ) : Promise < DeleteResult > | void ;
778731 /**
779732 * An estimated count of matching documents in the db to a filter.
780733 *
@@ -1114,11 +1067,11 @@ declare class LegacyAbstractCursor<TSchema = any, CursorEvents extends AbstractC
11141067 /**
11151068 * @deprecated options argument is deprecated
11161069 */
1117- close ( options : CursorCloseOptions ) : Promise < void > ;
1070+ close ( ) : Promise < void > ;
11181071 /**
11191072 * @deprecated options argument is deprecated
11201073 */
1121- close ( options : CursorCloseOptions , callback : Callback ) : void ;
1074+ close ( callback : Callback ) : void ;
11221075 /**
11231076 * Returns an array of documents. The caller is responsible for making sure that there
11241077 * is enough memory to store the results. Note that the array only contains partial
0 commit comments