@mongosh/shell-api 3.15.0 → 3.16.1

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.
@@ -1,7 +1,6 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import type { Agent } from 'https';
4
- import type { AutocompletionContext } from '@mongodb-js/mongodb-ts-autocomplete';
5
4
  import { Binary } from 'bson';
6
5
  import { BSONRegExp } from 'bson';
7
6
  import { BSONSymbol } from 'bson';
@@ -20,6 +19,7 @@ import { EJSONOptions } from 'bson';
20
19
  import { EventEmitter } from 'events';
21
20
  import type { IncomingMessage } from 'http';
22
21
  import { Int32 } from 'bson';
22
+ import type { JSONSchema } from 'mongodb-schema';
23
23
  import { Long } from 'bson';
24
24
  import { MaxKey } from 'bson';
25
25
  import { MinKey } from 'bson';
@@ -825,6 +825,16 @@ declare interface AutocompleteParameters {
825
825
  getCollectionCompletionsForCurrentDb: (collName: string) => Promise<string[]>;
826
826
  getDatabaseCompletions: (dbName: string) => Promise<string[]>;
827
827
  }
828
+ declare interface AutocompletionContext {
829
+ currentDatabaseAndConnection(): {
830
+ connectionId: string;
831
+ databaseName: string;
832
+ } | undefined;
833
+ databasesForConnection(connectionId: string): Promise<string[]>;
834
+ collectionsForDatabase(connectionId: string, databaseName: string): Promise<string[]>;
835
+ schemaInformationForCollection(connectionId: string, databaseName: string, collectionName: string): Promise<JSONSchema>;
836
+ cacheOptions?: Partial<CacheOptions>;
837
+ }
828
838
 
829
839
  /** @public */
830
840
  declare const AutoEncryptionLoggerLevel: Readonly<{
@@ -1136,11 +1146,11 @@ declare class Bulk extends ShellApiWithMongoClass {
1136
1146
  /*
1137
1147
  Adds a find to the bulk operation.
1138
1148
  */
1139
- find(query: Document_2): BulkFindOp;
1149
+ find(query: MQLQuery): BulkFindOp;
1140
1150
  /*
1141
1151
  Adds an insert to the bulk operation.
1142
1152
  */
1143
- insert(document: Document_2): Bulk;
1153
+ insert(document: MQLDocument): Bulk;
1144
1154
  toJSON(): Record<'nInsertOps' | 'nUpdateOps' | 'nRemoveOps' | 'nBatches', number>;
1145
1155
  /*
1146
1156
  Returns as a string a JSON document that contains the number of operations and batches in the Bulk() object.
@@ -1371,6 +1381,11 @@ declare class BulkWriteResult_2 extends ShellApiValueClass {
1371
1381
  [index: number]: ObjectId;
1372
1382
  });
1373
1383
  }
1384
+ declare type CacheOptions = {
1385
+ databaseCollectionsTTL: number;
1386
+ collectionSchemaTTL: number;
1387
+ aggregationSchemaTTL: number;
1388
+ };
1374
1389
 
1375
1390
  /** @public */
1376
1391
  declare class CancellationToken extends TypedEventEmitter<{
@@ -2938,17 +2953,17 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2938
2953
  /*
2939
2954
  Calculates aggregate values for the data in a collection or a view.
2940
2955
  */
2941
- aggregate(pipeline: Document_2[], options: AggregateOptions & {
2956
+ aggregate(pipeline: MQLPipeline, options: AggregateOptions & {
2942
2957
  explain: ExplainVerbosityLike;
2943
2958
  }): Document_2;
2944
2959
  /*
2945
2960
  Calculates aggregate values for the data in a collection or a view.
2946
2961
  */
2947
- aggregate(pipeline: Document_2[], options?: AggregateOptions): AggregationCursor_2;
2962
+ aggregate(pipeline: MQLPipeline, options?: AggregateOptions): AggregationCursor_2;
2948
2963
  /*
2949
2964
  Calculates aggregate values for the data in a collection or a view.
2950
2965
  */
2951
- aggregate(...stages: Document_2[]): AggregationCursor_2;
2966
+ aggregate(...stages: MQLPipeline): AggregationCursor_2;
2952
2967
  /*
2953
2968
  Performs multiple write operations with controls for order of execution.
2954
2969
  */
@@ -2960,7 +2975,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2960
2975
  /*
2961
2976
  Returns the count of documents that match the query for a collection or view.
2962
2977
  */
2963
- countDocuments(query?: Document_2, options?: CountDocumentsOptions): number;
2978
+ countDocuments(query?: MQLQuery, options?: CountDocumentsOptions): number;
2964
2979
  /*
2965
2980
  Removes all documents that match the filter from a collection.
2966
2981
  */
@@ -2976,11 +2991,11 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2976
2991
  /*
2977
2992
  Finds the distinct values for a specified field across a single collection or view and returns the results in an array.
2978
2993
  */
2979
- distinct(field: string, query: Document_2): Document_2;
2994
+ distinct(field: string, query: MQLQuery): Document_2;
2980
2995
  /*
2981
2996
  Finds the distinct values for a specified field across a single collection or view and returns the results in an array.
2982
2997
  */
2983
- distinct(field: string, query: Document_2, options: DistinctOptions): Document_2;
2998
+ distinct(field: string, query: MQLQuery, options: DistinctOptions): Document_2;
2984
2999
  /*
2985
3000
  Returns the count of all documents in a collection or view.
2986
3001
  */
@@ -2988,7 +3003,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2988
3003
  /*
2989
3004
  Selects documents in a collection or view.
2990
3005
  */
2991
- find(query?: Document_2, projection?: Document_2, options?: FindOptions): Cursor;
3006
+ find(query?: MQLQuery, projection?: Document_2, options?: FindOptions): Cursor;
2992
3007
  /*
2993
3008
  Modifies and returns a single document.
2994
3009
  */
@@ -2996,7 +3011,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2996
3011
  /*
2997
3012
  Selects documents in a collection or view.
2998
3013
  */
2999
- findOne(query?: Document_2, projection?: Document_2, options?: FindOptions): C['schema'] | null;
3014
+ findOne(query?: MQLQuery, projection?: Document_2, options?: FindOptions): MQLDocument | null;
3000
3015
  /*
3001
3016
  Renames a collection.
3002
3017
  */
@@ -3016,15 +3031,15 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
3016
3031
  /*
3017
3032
  Inserts a document or documents into a collection.
3018
3033
  */
3019
- insert(docs: Document_2 | Document_2[], options?: BulkWriteOptions): InsertManyResult_2;
3034
+ insert(docs: MQLDocument | MQLDocument[], options?: BulkWriteOptions): InsertManyResult_2;
3020
3035
  /*
3021
3036
  Inserts multiple documents into a collection.
3022
3037
  */
3023
- insertMany(docs: Document_2[], options?: BulkWriteOptions): InsertManyResult_2;
3038
+ insertMany(docs: MQLDocument[], options?: BulkWriteOptions): InsertManyResult_2;
3024
3039
  /*
3025
3040
  Inserts a document into a collection.
3026
3041
  */
3027
- insertOne(doc: Document_2, options?: InsertOneOptions): InsertOneResult_2;
3042
+ insertOne(doc: MQLDocument, options?: InsertOneOptions): InsertOneResult_2;
3028
3043
  /*
3029
3044
  Checks if a collection is capped
3030
3045
  */
@@ -3032,7 +3047,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
3032
3047
  /*
3033
3048
  Removes documents from a collection.
3034
3049
  */
3035
- remove(query: Document_2, options?: boolean | RemoveShellOptions): DeleteResult_2 | Document_2;
3050
+ remove(query: MQLQuery, options?: boolean | RemoveShellOptions): DeleteResult_2 | Document_2;
3036
3051
  /*
3037
3052
  Replaces a single document within the collection based on the filter.
3038
3053
  */
@@ -3199,7 +3214,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
3199
3214
  /*
3200
3215
  Opens a change stream cursor on the collection
3201
3216
  */
3202
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
3217
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
3203
3218
  /*
3204
3219
  Hides an existing index from the query planner.
3205
3220
  */
@@ -4726,17 +4741,17 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4726
4741
  /*
4727
4742
  Runs a specified admin/diagnostic pipeline which does not require an underlying collection.
4728
4743
  */
4729
- aggregate(pipeline: Document_2[], options: AggregateOptions & {
4744
+ aggregate(pipeline: MQLPipeline, options: AggregateOptions & {
4730
4745
  explain: ExplainVerbosityLike;
4731
4746
  }): Document_2;
4732
4747
  /*
4733
4748
  Runs a specified admin/diagnostic pipeline which does not require an underlying collection.
4734
4749
  */
4735
- aggregate(pipeline: Document_2[], options?: AggregateOptions): AggregationCursor_2;
4750
+ aggregate(pipeline: MQLPipeline, options?: AggregateOptions): AggregationCursor_2;
4736
4751
  /*
4737
4752
  Runs a specified admin/diagnostic pipeline which does not require an underlying collection.
4738
4753
  */
4739
- aggregate(...stages: Document_2[]): AggregationCursor_2;
4754
+ aggregate(...stages: MQLPipeline): AggregationCursor_2;
4740
4755
  /*
4741
4756
  Returns another database without modifying the db variable in the shell environment.
4742
4757
  */
@@ -4811,7 +4826,7 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4811
4826
  /*
4812
4827
  Create new view
4813
4828
  */
4814
- createView(name: string, source: string, pipeline: Document_2[], options?: CreateCollectionOptions): {
4829
+ createView(name: string, source: string, pipeline: MQLPipeline, options?: CreateCollectionOptions): {
4815
4830
  ok: number;
4816
4831
  };
4817
4832
  /*
@@ -4990,7 +5005,7 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4990
5005
  /*
4991
5006
  Opens a change stream cursor on the database
4992
5007
  */
4993
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
5008
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
4994
5009
  /*
4995
5010
  (Experimental) Runs a SQL query against Atlas Data Lake. Note: this is an experimental feature that may be subject to change in future releases.
4996
5011
  */
@@ -5548,15 +5563,15 @@ declare class Explainable extends ShellApiWithMongoClass {
5548
5563
  /*
5549
5564
  Returns information on the query plan.
5550
5565
  */
5551
- find(query?: Document_2, projection?: Document_2, options?: FindOptions): ExplainableCursor_2;
5566
+ find(query?: MQLQuery, projection?: Document_2, options?: FindOptions): ExplainableCursor_2;
5552
5567
  /*
5553
5568
  Provides information on the query plan for db.collection.aggregate() method.
5554
5569
  */
5555
- aggregate(pipeline: Document_2[], options: Document_2): Document_2;
5570
+ aggregate(pipeline: MQLPipeline, options: Document_2): Document_2;
5556
5571
  /*
5557
5572
  Provides information on the query plan for db.collection.aggregate() method.
5558
5573
  */
5559
- aggregate(...stages: Document_2[]): Document_2;
5574
+ aggregate(...stages: MQLPipeline): Document_2;
5560
5575
  /*
5561
5576
  Returns information on the query plan for db.collection.count().
5562
5577
  */
@@ -5568,11 +5583,11 @@ declare class Explainable extends ShellApiWithMongoClass {
5568
5583
  /*
5569
5584
  Returns information on the query plan for db.collection.distinct().
5570
5585
  */
5571
- distinct(field: string, query: Document_2): Document_2;
5586
+ distinct(field: string, query: MQLQuery): Document_2;
5572
5587
  /*
5573
5588
  Returns information on the query plan for db.collection.distinct().
5574
5589
  */
5575
- distinct(field: string, query: Document_2, options: DistinctOptions): Document_2;
5590
+ distinct(field: string, query: MQLQuery, options: DistinctOptions): Document_2;
5576
5591
  /*
5577
5592
  Returns information on the query plan for db.collection.findAndModify().
5578
5593
  */
@@ -5580,19 +5595,19 @@ declare class Explainable extends ShellApiWithMongoClass {
5580
5595
  /*
5581
5596
  Returns information on the query plan for db.collection.findOneAndDelete().
5582
5597
  */
5583
- findOneAndDelete(filter: Document_2, options?: FindOneAndDeleteOptions): Document_2 | null;
5598
+ findOneAndDelete(filter: MQLQuery, options?: FindOneAndDeleteOptions): Document_2 | null;
5584
5599
  /*
5585
5600
  Returns information on the query plan for db.collection.findOneAndReplace().
5586
5601
  */
5587
- findOneAndReplace(filter: Document_2, replacement: Document_2, options?: FindAndModifyShellOptions<FindOneAndReplaceOptions>): Document_2;
5602
+ findOneAndReplace(filter: MQLQuery, replacement: MQLDocument, options?: FindAndModifyShellOptions<FindOneAndReplaceOptions>): Document_2;
5588
5603
  /*
5589
5604
  Returns information on the query plan for db.collection.findOneAndUpdate().
5590
5605
  */
5591
- findOneAndUpdate(filter: Document_2, update: Document_2, options?: FindAndModifyShellOptions<FindOneAndUpdateOptions>): Document_2;
5606
+ findOneAndUpdate(filter: MQLQuery, update: MQLDocument, options?: FindAndModifyShellOptions<FindOneAndUpdateOptions>): Document_2;
5592
5607
  /*
5593
5608
  Returns information on the query plan for db.collection.remove().
5594
5609
  */
5595
- remove(query: Document_2, options?: boolean | RemoveShellOptions): Document_2;
5610
+ remove(query: MQLQuery, options?: boolean | RemoveShellOptions): Document_2;
5596
5611
  /*
5597
5612
  Returns information on the query plan for db.collection.update().
5598
5613
  */
@@ -5758,7 +5773,7 @@ declare interface FilterOperators<TValue> extends NonObjectIdLikeDocument {
5758
5773
  $rand?: Record<string, never>;
5759
5774
  }
5760
5775
  declare type FindAndModifyMethodShellOptions = {
5761
- query: Document_2;
5776
+ query: MQLQuery;
5762
5777
  sort?: (FindOneAndDeleteOptions | FindOneAndReplaceOptions | FindOneAndUpdateOptions)['sort'];
5763
5778
  update?: Document_2 | Document_2[];
5764
5779
  remove?: boolean;
@@ -6806,7 +6821,7 @@ export declare class Mongo<M extends GenericServerSideSchema = GenericServerSide
6806
6821
  /*
6807
6822
  Opens a change stream cursor on the connection
6808
6823
  */
6809
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
6824
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): ChangeStreamCursor;
6810
6825
  /*
6811
6826
  Returns the ClientEncryption object for the current database collection. The ClientEncryption object supports explicit (manual) encryption and decryption of field values for Client-Side field level encryption.
6812
6827
  */
@@ -7809,6 +7824,9 @@ declare interface MongoshBusEventsMap extends ConnectEventMap {
7809
7824
  'mongosh:fetching-update-metadata-complete': (ev: FetchingUpdateMetadataCompleteEvent) => void;
7810
7825
  'mongosh:log-initialized': () => void;
7811
7826
  }
7827
+ declare type MQLDocument = Document_2;
7828
+ declare type MQLPipeline = Document_2[];
7829
+ declare type MQLQuery = Document_2;
7812
7830
  declare interface Namespace {
7813
7831
  db: string;
7814
7832
  collection: string;
@@ -7997,11 +8015,11 @@ declare class PlanCache extends ShellApiWithMongoClass {
7997
8015
  /*
7998
8016
  Removes cached query plan(s) for a collection of the specified query shape.
7999
8017
  */
8000
- clearPlansByQuery(query: Document_2, projection?: Document_2, sort?: Document_2): Document_2;
8018
+ clearPlansByQuery(query: MQLQuery, projection?: Document_2, sort?: Document_2): Document_2;
8001
8019
  /*
8002
8020
  Lists cached query plan(s) for a collection.
8003
8021
  */
8004
- list(pipeline?: Document_2[]): Document_2[];
8022
+ list(pipeline?: MQLPipeline): Document_2[];
8005
8023
  /*
8006
8024
  Deprecated. Please use PlanCache.list instead
8007
8025
  */
@@ -9051,15 +9069,15 @@ export declare class Shard<M extends GenericServerSideSchema = GenericServerSide
9051
9069
  /*
9052
9070
  Divides an existing chunk into two chunks using a specific value of the shard key as the dividing point. Uses the split command
9053
9071
  */
9054
- splitAt(ns: string, query: Document_2): Document_2;
9072
+ splitAt(ns: string, query: MQLQuery): Document_2;
9055
9073
  /*
9056
9074
  Splits a chunk at the shard key value specified by the query at the median. Uses the split command
9057
9075
  */
9058
- splitFind(ns: string, query: Document_2): Document_2;
9076
+ splitFind(ns: string, query: MQLQuery): Document_2;
9059
9077
  /*
9060
9078
  Moves the chunk that contains the document specified by the query to the destination shard. Uses the moveChunk command
9061
9079
  */
9062
- moveChunk(ns: string, query: Document_2, destination: string): Document_2;
9080
+ moveChunk(ns: string, query: MQLQuery, destination: string): Document_2;
9063
9081
  /*
9064
9082
  Moves a range of documents specified by the min and max keys to the destination shard. Uses the moveRange command
9065
9083
  */
@@ -9579,7 +9597,7 @@ declare class StreamProcessor extends ShellApiWithMongoClass {
9579
9597
  /*
9580
9598
  Modify a stream processor definition.
9581
9599
  */
9582
- modify(pipeline: Document_2[], options?: Document_2): Document_2;
9600
+ modify(pipeline: MQLPipeline, options?: Document_2): Document_2;
9583
9601
  /*
9584
9602
  Return a sample of the results from a named stream processor.
9585
9603
  */
@@ -9599,11 +9617,11 @@ export declare class Streams<M extends GenericServerSideSchema = GenericServerSi
9599
9617
  /*
9600
9618
  Allows a user to process streams of data in the shell interactively and quickly iterate building a stream processor as they go.
9601
9619
  */
9602
- process(pipeline: Document_2[], options?: Document_2): void | Document_2;
9620
+ process(pipeline: MQLPipeline, options?: Document_2): void | Document_2;
9603
9621
  /*
9604
9622
  Create a named stream processor.
9605
9623
  */
9606
- createStreamProcessor(name: string, pipeline: Document_2[], options?: Document_2): Document_2 | StreamProcessor;
9624
+ createStreamProcessor(name: string, pipeline: MQLPipeline, options?: Document_2): Document_2 | StreamProcessor;
9607
9625
  /*
9608
9626
  Show a list of all the named stream processors.
9609
9627
  */
package/lib/api-raw.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import type { Agent } from 'https';
4
- import type { AutocompletionContext } from '@mongodb-js/mongodb-ts-autocomplete';
5
4
  import { Binary } from 'bson';
6
5
  import { BSONRegExp } from 'bson';
7
6
  import { BSONSymbol } from 'bson';
@@ -20,6 +19,7 @@ import { EJSONOptions } from 'bson';
20
19
  import { EventEmitter } from 'events';
21
20
  import type { IncomingMessage } from 'http';
22
21
  import { Int32 } from 'bson';
22
+ import type { JSONSchema } from 'mongodb-schema';
23
23
  import { Long } from 'bson';
24
24
  import { MaxKey } from 'bson';
25
25
  import { MinKey } from 'bson';
@@ -820,6 +820,17 @@ declare interface AutocompleteParameters {
820
820
  getDatabaseCompletions: (dbName: string) => Promise<string[]>;
821
821
  }
822
822
 
823
+ declare interface AutocompletionContext {
824
+ currentDatabaseAndConnection(): {
825
+ connectionId: string;
826
+ databaseName: string;
827
+ } | undefined;
828
+ databasesForConnection(connectionId: string): Promise<string[]>;
829
+ collectionsForDatabase(connectionId: string, databaseName: string): Promise<string[]>;
830
+ schemaInformationForCollection(connectionId: string, databaseName: string, collectionName: string): Promise<JSONSchema>;
831
+ cacheOptions?: Partial<CacheOptions>;
832
+ }
833
+
823
834
  /** @public */
824
835
  declare const AutoEncryptionLoggerLevel: Readonly<{
825
836
  readonly FatalError: 0;
@@ -1127,8 +1138,8 @@ declare class Bulk extends ShellApiWithMongoClass {
1127
1138
  [asPrintable](): any;
1128
1139
  private _emitBulkApiCall;
1129
1140
  execute(writeConcern?: WriteConcern): Promise<BulkWriteResult_2>;
1130
- find(query: Document_2): BulkFindOp;
1131
- insert(document: Document_2): Bulk;
1141
+ find(query: MQLQuery): BulkFindOp;
1142
+ insert(document: MQLDocument): Bulk;
1132
1143
  toJSON(): Record<'nInsertOps' | 'nUpdateOps' | 'nRemoveOps' | 'nBatches', number>;
1133
1144
  toString(): string;
1134
1145
  getOperations(): Pick<Batch, 'originalZeroIndex' | 'batchType' | 'operations'>[];
@@ -1323,6 +1334,12 @@ declare class BulkWriteResult_2 extends ShellApiValueClass {
1323
1334
  });
1324
1335
  }
1325
1336
 
1337
+ declare type CacheOptions = {
1338
+ databaseCollectionsTTL: number;
1339
+ collectionSchemaTTL: number;
1340
+ aggregationSchemaTTL: number;
1341
+ };
1342
+
1326
1343
  /** @public */
1327
1344
  declare class CancellationToken extends TypedEventEmitter<{
1328
1345
  cancel(): void;
@@ -2854,32 +2871,32 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2854
2871
  [namespaceInfo](): Namespace;
2855
2872
  [asPrintable](): string;
2856
2873
  private _emitCollectionApiCall;
2857
- aggregate(pipeline: Document_2[], options: AggregateOptions & {
2874
+ aggregate(pipeline: MQLPipeline, options: AggregateOptions & {
2858
2875
  explain: ExplainVerbosityLike;
2859
2876
  }): Promise<Document_2>;
2860
- aggregate(pipeline: Document_2[], options?: AggregateOptions): Promise<AggregationCursor_2>;
2861
- aggregate(...stages: Document_2[]): Promise<AggregationCursor_2>;
2877
+ aggregate(pipeline: MQLPipeline, options?: AggregateOptions): Promise<AggregationCursor_2>;
2878
+ aggregate(...stages: MQLPipeline): Promise<AggregationCursor_2>;
2862
2879
  bulkWrite(operations: AnyBulkWriteOperation[], options?: BulkWriteOptions): Promise<BulkWriteResult_2>;
2863
2880
  count(query?: {}, options?: CountOptions): Promise<number>;
2864
- countDocuments(query?: Document_2, options?: CountDocumentsOptions): Promise<number>;
2881
+ countDocuments(query?: MQLQuery, options?: CountDocumentsOptions): Promise<number>;
2865
2882
  deleteMany(filter: Document_2, options?: DeleteOptions): Promise<DeleteResult_2 | Document_2>;
2866
2883
  deleteOne(filter: Document_2, options?: DeleteOptions): Promise<DeleteResult_2 | Document_2>;
2867
2884
  distinct(field: string): Promise<Document_2>;
2868
- distinct(field: string, query: Document_2): Promise<Document_2>;
2869
- distinct(field: string, query: Document_2, options: DistinctOptions): Promise<Document_2>;
2885
+ distinct(field: string, query: MQLQuery): Promise<Document_2>;
2886
+ distinct(field: string, query: MQLQuery, options: DistinctOptions): Promise<Document_2>;
2870
2887
  estimatedDocumentCount(options?: EstimatedDocumentCountOptions): Promise<number>;
2871
- find(query?: Document_2, projection?: Document_2, options?: FindOptions): Promise<Cursor>;
2888
+ find(query?: MQLQuery, projection?: Document_2, options?: FindOptions): Promise<Cursor>;
2872
2889
  findAndModify(options: FindAndModifyMethodShellOptions): Promise<Document_2 | null>;
2873
- findOne(query?: Document_2, projection?: Document_2, options?: FindOptions): Promise<C['schema'] | null>;
2890
+ findOne(query?: MQLQuery, projection?: Document_2, options?: FindOptions): Promise<MQLDocument | null>;
2874
2891
  renameCollection(newName: string, dropTarget?: boolean): Promise<Document_2>;
2875
2892
  findOneAndDelete(filter: Document_2, options?: FindOneAndDeleteOptions): Promise<Document_2 | null>;
2876
2893
  findOneAndReplace(filter: Document_2, replacement: Document_2, options?: FindAndModifyShellOptions<FindOneAndReplaceOptions>): Promise<Document_2>;
2877
2894
  findOneAndUpdate(filter: Document_2, update: Document_2 | Document_2[], options?: FindAndModifyShellOptions<FindOneAndUpdateOptions>): Promise<Document_2>;
2878
- insert(docs: Document_2 | Document_2[], options?: BulkWriteOptions): Promise<InsertManyResult_2>;
2879
- insertMany(docs: Document_2[], options?: BulkWriteOptions): Promise<InsertManyResult_2>;
2880
- insertOne(doc: Document_2, options?: InsertOneOptions): Promise<InsertOneResult_2>;
2895
+ insert(docs: MQLDocument | MQLDocument[], options?: BulkWriteOptions): Promise<InsertManyResult_2>;
2896
+ insertMany(docs: MQLDocument[], options?: BulkWriteOptions): Promise<InsertManyResult_2>;
2897
+ insertOne(doc: MQLDocument, options?: InsertOneOptions): Promise<InsertOneResult_2>;
2881
2898
  isCapped(): Promise<boolean>;
2882
- remove(query: Document_2, options?: boolean | RemoveShellOptions): Promise<DeleteResult_2 | Document_2>;
2899
+ remove(query: MQLQuery, options?: boolean | RemoveShellOptions): Promise<DeleteResult_2 | Document_2>;
2883
2900
  replaceOne(filter: Document_2, replacement: Document_2, options?: ReplaceOptions): Promise<UpdateResult_2>;
2884
2901
  update(filter: Document_2, update: Document_2, options?: UpdateOptions & {
2885
2902
  multi?: boolean;
@@ -2929,7 +2946,7 @@ declare class Collection<M extends GenericServerSideSchema = GenericServerSideSc
2929
2946
  shards: string[];
2930
2947
  sharded: boolean;
2931
2948
  }>;
2932
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
2949
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
2933
2950
  hideIndex(index: string | Document_2): Promise<Document_2>;
2934
2951
  unhideIndex(index: string | Document_2): Promise<Document_2>;
2935
2952
  analyzeShardKey(key: Document_2, options?: Document_2): Promise<Document_2>;
@@ -4359,11 +4376,11 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4359
4376
  getCollectionInfos(filter?: Document_2, options?: ListCollectionsOptions): Promise<Document_2[]>;
4360
4377
  runCommand(cmd: string | Document_2, options?: RunCommandOptions): Promise<Document_2>;
4361
4378
  adminCommand(cmd: string | Document_2): Promise<Document_2>;
4362
- aggregate(pipeline: Document_2[], options: AggregateOptions & {
4379
+ aggregate(pipeline: MQLPipeline, options: AggregateOptions & {
4363
4380
  explain: ExplainVerbosityLike;
4364
4381
  }): Promise<Document_2>;
4365
- aggregate(pipeline: Document_2[], options?: AggregateOptions): Promise<AggregationCursor_2>;
4366
- aggregate(...stages: Document_2[]): Promise<AggregationCursor_2>;
4382
+ aggregate(pipeline: MQLPipeline, options?: AggregateOptions): Promise<AggregationCursor_2>;
4383
+ aggregate(...stages: MQLPipeline): Promise<AggregationCursor_2>;
4367
4384
  getSiblingDB<K extends StringKey<M>>(db: K): DatabaseWithSchema<M, M[K]>;
4368
4385
  getCollection<K extends StringKey<D>>(coll: K): CollectionWithSchema<M, D, D[K], K>;
4369
4386
  dropDatabase(writeConcern?: WriteConcern): Promise<Document_2>;
@@ -4387,7 +4404,7 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4387
4404
  collection: Collection;
4388
4405
  encryptedFields: Document_2;
4389
4406
  }>;
4390
- createView(name: string, source: string, pipeline: Document_2[], options?: CreateCollectionOptions): Promise<{
4407
+ createView(name: string, source: string, pipeline: MQLPipeline, options?: CreateCollectionOptions): Promise<{
4391
4408
  ok: number;
4392
4409
  }>;
4393
4410
  createRole(role: Document_2, writeConcern?: WriteConcern): Promise<Document_2>;
@@ -4434,7 +4451,7 @@ declare class Database<M extends GenericServerSideSchema = GenericServerSideSche
4434
4451
  printReplicationInfo(): Promise<CommandResult>;
4435
4452
  printSlaveReplicationInfo(): never;
4436
4453
  setSecondaryOk(): Promise<void>;
4437
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
4454
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
4438
4455
  sql(sqlString: string, options?: AggregateOptions): Promise<AggregationCursor_2>;
4439
4456
  checkMetadataConsistency(options?: CheckMetadataConsistencyOptions): Promise<RunCommandCursor_2>;
4440
4457
  }
@@ -4989,18 +5006,18 @@ declare class Explainable extends ShellApiWithMongoClass {
4989
5006
  getCollection(): CollectionWithSchema;
4990
5007
  getVerbosity(): ExplainVerbosityLike;
4991
5008
  setVerbosity(verbosity: ExplainVerbosityLike): void;
4992
- find(query?: Document_2, projection?: Document_2, options?: FindOptions): Promise<ExplainableCursor_2>;
4993
- aggregate(pipeline: Document_2[], options: Document_2): Promise<Document_2>;
4994
- aggregate(...stages: Document_2[]): Promise<Document_2>;
5009
+ find(query?: MQLQuery, projection?: Document_2, options?: FindOptions): Promise<ExplainableCursor_2>;
5010
+ aggregate(pipeline: MQLPipeline, options: Document_2): Promise<Document_2>;
5011
+ aggregate(...stages: MQLPipeline): Promise<Document_2>;
4995
5012
  count(query?: {}, options?: CountOptions): Promise<Document_2>;
4996
5013
  distinct(field: string): Promise<Document_2>;
4997
- distinct(field: string, query: Document_2): Promise<Document_2>;
4998
- distinct(field: string, query: Document_2, options: DistinctOptions): Promise<Document_2>;
5014
+ distinct(field: string, query: MQLQuery): Promise<Document_2>;
5015
+ distinct(field: string, query: MQLQuery, options: DistinctOptions): Promise<Document_2>;
4999
5016
  findAndModify(options: FindAndModifyMethodShellOptions): Promise<Document_2 | null>;
5000
- findOneAndDelete(filter: Document_2, options?: FindOneAndDeleteOptions): Promise<Document_2 | null>;
5001
- findOneAndReplace(filter: Document_2, replacement: Document_2, options?: FindAndModifyShellOptions<FindOneAndReplaceOptions>): Promise<Document_2>;
5002
- findOneAndUpdate(filter: Document_2, update: Document_2, options?: FindAndModifyShellOptions<FindOneAndUpdateOptions>): Promise<Document_2>;
5003
- remove(query: Document_2, options?: boolean | RemoveShellOptions): Promise<Document_2>;
5017
+ findOneAndDelete(filter: MQLQuery, options?: FindOneAndDeleteOptions): Promise<Document_2 | null>;
5018
+ findOneAndReplace(filter: MQLQuery, replacement: MQLDocument, options?: FindAndModifyShellOptions<FindOneAndReplaceOptions>): Promise<Document_2>;
5019
+ findOneAndUpdate(filter: MQLQuery, update: MQLDocument, options?: FindAndModifyShellOptions<FindOneAndUpdateOptions>): Promise<Document_2>;
5020
+ remove(query: MQLQuery, options?: boolean | RemoveShellOptions): Promise<Document_2>;
5004
5021
  update(filter: Document_2, update: Document_2, options?: UpdateOptions): Promise<Document_2>;
5005
5022
  mapReduce(map: Function | string, reduce: Function | string, optionsOrOutString: MapReduceShellOptions): Promise<Document_2>;
5006
5023
  }
@@ -5168,7 +5185,7 @@ declare interface FilterOperators<TValue> extends NonObjectIdLikeDocument {
5168
5185
  }
5169
5186
 
5170
5187
  declare type FindAndModifyMethodShellOptions = {
5171
- query: Document_2;
5188
+ query: MQLQuery;
5172
5189
  sort?: (FindOneAndDeleteOptions | FindOneAndReplaceOptions | FindOneAndUpdateOptions)['sort'];
5173
5190
  update?: Document_2 | Document_2[];
5174
5191
  remove?: boolean;
@@ -6133,7 +6150,7 @@ export declare class Mongo<M extends GenericServerSideSchema = GenericServerSide
6133
6150
  isCausalConsistency(): void;
6134
6151
  setSlaveOk(): void;
6135
6152
  setSecondaryOk(): Promise<void>;
6136
- watch(pipeline?: Document_2[] | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
6153
+ watch(pipeline?: MQLPipeline | ChangeStreamOptions, options?: ChangeStreamOptions): Promise<ChangeStreamCursor>;
6137
6154
  getClientEncryption(): ClientEncryption_2;
6138
6155
  getKeyVault(): Promise<KeyVault>;
6139
6156
  convertShardKeyToHashed(value: any): Promise<unknown>;
@@ -7130,6 +7147,12 @@ declare interface MongoshBusEventsMap extends ConnectEventMap {
7130
7147
  'mongosh:log-initialized': () => void;
7131
7148
  }
7132
7149
 
7150
+ declare type MQLDocument = Document_2;
7151
+
7152
+ declare type MQLPipeline = Document_2[];
7153
+
7154
+ declare type MQLQuery = Document_2;
7155
+
7133
7156
  declare interface Namespace {
7134
7157
  db: string;
7135
7158
  collection: string;
@@ -7319,8 +7342,8 @@ declare class PlanCache extends ShellApiWithMongoClass {
7319
7342
  get _mongo(): Mongo;
7320
7343
  [asPrintable](): string;
7321
7344
  clear(): Promise<Document_2>;
7322
- clearPlansByQuery(query: Document_2, projection?: Document_2, sort?: Document_2): Promise<Document_2>;
7323
- list(pipeline?: Document_2[]): Promise<Document_2[]>;
7345
+ clearPlansByQuery(query: MQLQuery, projection?: Document_2, sort?: Document_2): Promise<Document_2>;
7346
+ list(pipeline?: MQLPipeline): Promise<Document_2[]>;
7324
7347
  listQueryShapes(): never;
7325
7348
  getPlansByQuery(): never;
7326
7349
  }
@@ -8248,9 +8271,9 @@ export declare class Shard<M extends GenericServerSideSchema = GenericServerSide
8248
8271
  removeShardTag(shard: string, tag: string): Promise<Document_2>;
8249
8272
  enableAutoSplit(): Promise<UpdateResult_2>;
8250
8273
  disableAutoSplit(): Promise<UpdateResult_2>;
8251
- splitAt(ns: string, query: Document_2): Promise<Document_2>;
8252
- splitFind(ns: string, query: Document_2): Promise<Document_2>;
8253
- moveChunk(ns: string, query: Document_2, destination: string): Promise<Document_2>;
8274
+ splitAt(ns: string, query: MQLQuery): Promise<Document_2>;
8275
+ splitFind(ns: string, query: MQLQuery): Promise<Document_2>;
8276
+ moveChunk(ns: string, query: MQLQuery, destination: string): Promise<Document_2>;
8254
8277
  moveRange(ns: string, toShard: string, min?: Document_2, max?: Document_2): Promise<Document_2>;
8255
8278
  balancerCollectionStatus(ns: string): Promise<Document_2>;
8256
8279
  enableBalancing(ns: string): Promise<UpdateResult_2>;
@@ -8625,7 +8648,7 @@ declare class StreamProcessor extends ShellApiWithMongoClass {
8625
8648
  _drop(options?: Document_2): Promise<Document_2>;
8626
8649
  stats(options?: Document_2): Promise<Document_2>;
8627
8650
  modify(options: Document_2): Promise<Document_2>;
8628
- modify(pipeline: Document_2[], options?: Document_2): Promise<Document_2>;
8651
+ modify(pipeline: MQLPipeline, options?: Document_2): Promise<Document_2>;
8629
8652
  sample(options?: Document_2): Promise<Document_2 | undefined>;
8630
8653
  _sampleFrom(cursorId: number): Promise<Document_2 | undefined>;
8631
8654
  }
@@ -8637,8 +8660,8 @@ export declare class Streams<M extends GenericServerSideSchema = GenericServerSi
8637
8660
  get _mongo(): Mongo<M>;
8638
8661
  [asPrintable](): string;
8639
8662
  getProcessor(name: string): StreamProcessor;
8640
- process(pipeline: Document_2[], options?: Document_2): Promise<void | Document_2>;
8641
- createStreamProcessor(name: string, pipeline: Document_2[], options?: Document_2): Promise<Document_2 | StreamProcessor>;
8663
+ process(pipeline: MQLPipeline, options?: Document_2): Promise<void | Document_2>;
8664
+ createStreamProcessor(name: string, pipeline: MQLPipeline, options?: Document_2): Promise<Document_2 | StreamProcessor>;
8642
8665
  listStreamProcessors(filter: Document_2): Promise<any>;
8643
8666
  listConnections(filter: Document_2): Promise<any>;
8644
8667
  _runStreamCommand(cmd: Document_2, options?: Document_2): Promise<Document_2>;
package/lib/bulk.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { Batch, Document, WriteConcern, OrderedBulkOperation, UnorderedBulk
4
4
  import { asPrintable } from './enums';
5
5
  import { BulkWriteResult } from './result';
6
6
  import type { CollectionWithSchema } from './collection';
7
+ import type { MQLDocument, MQLQuery } from './mql-types';
7
8
  export declare class BulkFindOp extends ShellApiWithMongoClass {
8
9
  _serviceProviderBulkFindOp: FindOperators;
9
10
  _parentBulk: Bulk;
@@ -33,8 +34,8 @@ export default class Bulk extends ShellApiWithMongoClass {
33
34
  [asPrintable](): any;
34
35
  private _emitBulkApiCall;
35
36
  execute(writeConcern?: WriteConcern): Promise<BulkWriteResult>;
36
- find(query: Document): BulkFindOp;
37
- insert(document: Document): Bulk;
37
+ find(query: MQLQuery): BulkFindOp;
38
+ insert(document: MQLDocument): Bulk;
38
39
  toJSON(): Record<'nInsertOps' | 'nUpdateOps' | 'nRemoveOps' | 'nBatches', number>;
39
40
  toString(): string;
40
41
  getOperations(): Pick<Batch, 'originalZeroIndex' | 'batchType' | 'operations'>[];
package/lib/bulk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/bulk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAOsB;AAEtB,4CAAyE;AAUzE,mCAAsC;AACtC,uCAAgE;AAChE,qCAA2C;IAI9B,UAAU;4BADtB,iCAAoB;;;;sBACW,mCAAsB;;;;;;;;;;;;;uCAA9B,SAAQ,WAAsB;QAGpD,YAAY,SAAwB,EAAE,UAAgB;YACpD,KAAK,EAAE,CAAC;YAHV,+BAA0B,GADf,mDAAU,CACqB;YAI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