@@ -20,7 +20,6 @@ import {
2020// Dependencies (options, etc.)
2121import type {
2222 AbstractCursorEvents ,
23- AddUserOptions ,
2423 AggregateOptions ,
2524 AnyBulkWriteOperation ,
2625 BulkWriteOptions ,
@@ -31,8 +30,6 @@ import type {
3130 ClientSessionOptions ,
3231 CollectionInfo ,
3332 CollectionOptions ,
34- CollStats ,
35- CollStatsOptions ,
3633 CommandOperationOptions ,
3734 CountDocumentsOptions ,
3835 CountOptions ,
@@ -93,10 +90,10 @@ import type {
9390type NonConstructorKeys < T > = { [ P in keyof T ] : T [ P ] extends new ( ) => any ? never : P } [ keyof T ] ;
9491type NonConstructor < T > = Pick < T , NonConstructorKeys < T > > ;
9592
96- declare const Admin : new ( ) => Omit < MDBAdmin , 'addUser' | ' buildInfo' | 'command' | 'listDatabases' | 'ping' | 'removeUser' | 'replSetGetStatus' | 'serverInfo' | 'serverStatus' | 'validateCollection' > ;
93+ declare const Admin : new ( ) => Omit < MDBAdmin , 'buildInfo' | 'command' | 'listDatabases' | 'ping' | 'removeUser' | 'replSetGetStatus' | 'serverInfo' | 'serverStatus' | 'validateCollection' > ;
9794declare const ChangeStream : new < TSchema extends Document = Document , TChange extends Document = ChangeStreamDocument < TSchema > > ( ) => Omit < MDBChangeStream < TSchema , TChange > , 'close' | 'hasNext' | 'next' | 'tryNext' > ;
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' > ;
99- declare const Db : new ( ) => Omit < MDBDb , 'command' | 'addUser' | ' removeUser' | 'createCollection' | 'dropCollection' | 'createIndex' | 'dropDatabase' | 'indexInformation' | 'profilingLevel' | 'setProfilingLevel' | 'renameCollection' | 'stats' | 'collections' | 'collection' | 'admin' | 'aggregate' | 'listCollections' | 'watch' > ;
95+ 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' | 'updateMany' | 'updateOne' | 'aggregate' | 'find' | 'listIndexes' | 'watch' > ;
96+ declare const Db : new ( ) => Omit < MDBDb , 'command' | 'removeUser' | 'createCollection' | 'dropCollection' | 'createIndex' | 'dropDatabase' | 'indexInformation' | 'profilingLevel' | 'setProfilingLevel' | 'renameCollection' | 'stats' | 'collections' | 'collection' | 'admin' | 'aggregate' | 'listCollections' | 'watch' > ;
10097declare const GridFSBucket : new ( db : LegacyDb , options : GridFSBucketOptions ) => Omit < NonConstructor < MDBGridFSBucket > , 'delete' | 'rename' | 'drop' | 'find' > ;
10198declare const MongoClient : new ( url : string , options ?: MongoClientOptions ) => Omit < NonConstructor < MDBMongoClient > , 'connect' | 'close' | 'db' | 'watch' | 'withSession' | 'startSession' > ;
10299declare const ClientSession : new ( ) => Omit < MDBClientSession , 'endSession' | 'abortTransaction' | 'commitTransaction' | 'withTransaction' >
@@ -156,22 +153,6 @@ declare class LegacyAdmin extends Admin {
156153 ping ( callback : Callback < Document > ) : void ;
157154 ping ( options : CommandOperationOptions ) : Promise < Document > ;
158155 ping ( options : CommandOperationOptions , callback : Callback < Document > ) : void ;
159- /**
160- * Add a user to the database
161- *
162- * @param username - The username for the new user
163- * @param password - An optional password for the new user
164- * @param options - Optional settings for the command
165- * @param callback - An optional callback, a Promise will be returned if none is provided
166- */
167- addUser ( username : string ) : Promise < Document > ;
168- addUser ( username : string , callback : Callback < Document > ) : void ;
169- addUser ( username : string , password : string ) : Promise < Document > ;
170- addUser ( username : string , password : string , callback : Callback < Document > ) : void ;
171- addUser ( username : string , options : AddUserOptions ) : Promise < Document > ;
172- addUser ( username : string , options : AddUserOptions , callback : Callback < Document > ) : void ;
173- addUser ( username : string , password : string , options : AddUserOptions ) : Promise < Document > ;
174- addUser ( username : string , password : string , options : AddUserOptions , callback : Callback < Document > ) : void ;
175156 /**
176157 * Remove a user from a database
177158 *
@@ -637,16 +618,6 @@ declare class LegacyCollection<TSchema extends Document = Document> extends Coll
637618 indexes ( callback : Callback < Document [ ] > ) : void ;
638619 indexes ( options : IndexInformationOptions ) : Promise < Document [ ] > ;
639620 indexes ( options : IndexInformationOptions , callback : Callback < Document [ ] > ) : void ;
640- /**
641- * Get all the collection statistics.
642- *
643- * @param options - Optional settings for the command
644- * @param callback - An optional callback, a Promise will be returned if none is provided
645- */
646- stats ( ) : Promise < CollStats > ;
647- stats ( callback : Callback < CollStats > ) : void ;
648- stats ( options : CollStatsOptions ) : Promise < CollStats > ;
649- stats ( options : CollStatsOptions , callback : Callback < CollStats > ) : void ;
650621 /**
651622 * Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation.
652623 *
@@ -868,22 +839,6 @@ declare class LegacyDb extends Db {
868839 createIndex ( name : string , indexSpec : IndexSpecification , callback ?: Callback < string > ) : void ;
869840 createIndex ( name : string , indexSpec : IndexSpecification , options : CreateIndexesOptions ) : Promise < string > ;
870841 createIndex ( name : string , indexSpec : IndexSpecification , options : CreateIndexesOptions , callback : Callback < string > ) : void ;
871- /**
872- * Add a user to the database
873- *
874- * @param username - The username for the new user
875- * @param password - An optional password for the new user
876- * @param options - Optional settings for the command
877- * @param callback - An optional callback, a Promise will be returned if none is provided
878- */
879- addUser ( username : string ) : Promise < Document > ;
880- addUser ( username : string , callback : Callback < Document > ) : void ;
881- addUser ( username : string , password : string ) : Promise < Document > ;
882- addUser ( username : string , password : string , callback : Callback < Document > ) : void ;
883- addUser ( username : string , options : AddUserOptions ) : Promise < Document > ;
884- addUser ( username : string , options : AddUserOptions , callback : Callback < Document > ) : void ;
885- addUser ( username : string , password : string , options : AddUserOptions ) : Promise < Document > ;
886- addUser ( username : string , password : string , options : AddUserOptions , callback : Callback < Document > ) : void ;
887842 /**
888843 * Remove a user from a database
889844 *
0 commit comments