diff --git a/packages/mongo/mongo.d.ts b/packages/mongo/mongo.d.ts index 72199e0267..48ef98708e 100644 --- a/packages/mongo/mongo.d.ts +++ b/packages/mongo/mongo.d.ts @@ -107,6 +107,11 @@ export namespace Mongo { byteSize?: number, maxDocuments?: number ): Promise; + + /** + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see createIndexAsync + */ createIndex( indexSpec: NpmModuleMongodb.IndexSpecification, options?: NpmModuleMongodb.CreateIndexesOptions @@ -150,11 +155,15 @@ export namespace Mongo { ): Cursor>; /** * Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found. + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see findOneAsync * @param selector A query describing the documents to find */ findOne(selector?: Selector | ObjectID | string): U | undefined; /** * Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found. + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see findOneAsync * @param selector A query describing the documents to find */ findOne, 'limit'>>( @@ -189,6 +198,8 @@ export namespace Mongo { estimatedDocumentCount(options?: NpmModuleMongodb.EstimatedDocumentCountOptions): Promise; /** * Insert a document in the collection. Returns its unique _id. + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see insertAsync * @param doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you. * @param callback If present, called with an error object as the first argument and, if no error, the _id as the second. */ @@ -211,6 +222,8 @@ export namespace Mongo { rawDatabase(): NpmModuleMongodb.Db; /** * Remove documents from the collection + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see removeAsync * @param selector Specifies which documents to remove * @param callback If present, called with an error object as its argument. */ @@ -229,6 +242,8 @@ export namespace Mongo { ): Promise; /** * Modify one or more documents in the collection. Returns the number of matched documents. + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see updateAsync * @param selector Specifies which documents to modify * @param modifier Specifies how to modify the documents * @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second. @@ -274,6 +289,8 @@ export namespace Mongo { /** * Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and * `insertedId` (the unique _id of the document that was inserted, if any). + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see upsertAsync * @param selector Specifies which documents to modify * @param modifier Specifies how to modify the documents * @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second. @@ -316,6 +333,10 @@ export namespace Mongo { options?: NpmModuleMongodb.CreateIndexesOptions ): void; _dropCollection(): Promise; + /** + * @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration} + * @see dropIndexAsync + */ _dropIndex(indexName: string): void; }