mongodb 5.0.1 → 5.2.0
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.
- package/README.md +25 -22
- package/lib/bson.js +3 -1
- package/lib/bson.js.map +1 -1
- package/lib/change_stream.js +3 -2
- package/lib/change_stream.js.map +1 -1
- package/lib/cmap/auth/auth_provider.js +21 -10
- package/lib/cmap/auth/auth_provider.js.map +1 -1
- package/lib/cmap/auth/gssapi.js +71 -116
- package/lib/cmap/auth/gssapi.js.map +1 -1
- package/lib/cmap/auth/mongo_credentials.js +17 -0
- package/lib/cmap/auth/mongo_credentials.js.map +1 -1
- package/lib/cmap/auth/mongocr.js +20 -29
- package/lib/cmap/auth/mongocr.js.map +1 -1
- package/lib/cmap/auth/mongodb_aws.js +126 -140
- package/lib/cmap/auth/mongodb_aws.js.map +1 -1
- package/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js +28 -0
- package/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/callback_workflow.js +178 -0
- package/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/service_workflow.js +41 -0
- package/lib/cmap/auth/mongodb_oidc/service_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/token_entry_cache.js +115 -0
- package/lib/cmap/auth/mongodb_oidc/token_entry_cache.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/workflow.js +3 -0
- package/lib/cmap/auth/mongodb_oidc/workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc.js +62 -0
- package/lib/cmap/auth/mongodb_oidc.js.map +1 -0
- package/lib/cmap/auth/plain.js +4 -5
- package/lib/cmap/auth/plain.js.map +1 -1
- package/lib/cmap/auth/providers.js +4 -1
- package/lib/cmap/auth/providers.js.map +1 -1
- package/lib/cmap/auth/scram.js +45 -73
- package/lib/cmap/auth/scram.js.map +1 -1
- package/lib/cmap/auth/x509.js +8 -11
- package/lib/cmap/auth/x509.js.map +1 -1
- package/lib/cmap/command_monitoring_events.js +8 -5
- package/lib/cmap/command_monitoring_events.js.map +1 -1
- package/lib/cmap/commands.js +9 -1
- package/lib/cmap/commands.js.map +1 -1
- package/lib/cmap/connect.js +72 -86
- package/lib/cmap/connect.js.map +1 -1
- package/lib/cmap/connection.js +68 -74
- package/lib/cmap/connection.js.map +1 -1
- package/lib/cmap/connection_pool.js +51 -13
- package/lib/cmap/connection_pool.js.map +1 -1
- package/lib/cmap/message_stream.js.map +1 -1
- package/lib/cmap/wire_protocol/shared.js +1 -16
- package/lib/cmap/wire_protocol/shared.js.map +1 -1
- package/lib/collection.js +10 -10
- package/lib/connection_string.js +47 -33
- package/lib/connection_string.js.map +1 -1
- package/lib/cursor/abstract_cursor.js +13 -7
- package/lib/cursor/abstract_cursor.js.map +1 -1
- package/lib/cursor/find_cursor.js +1 -1
- package/lib/db.js +3 -2
- package/lib/db.js.map +1 -1
- package/lib/error.js +2 -1
- package/lib/error.js.map +1 -1
- package/lib/mongo_client.js +22 -2
- package/lib/mongo_client.js.map +1 -1
- package/lib/mongo_logger.js +17 -1
- package/lib/mongo_logger.js.map +1 -1
- package/lib/operations/aggregate.js +4 -1
- package/lib/operations/aggregate.js.map +1 -1
- package/lib/operations/create_collection.js +1 -0
- package/lib/operations/create_collection.js.map +1 -1
- package/lib/operations/execute_operation.js +8 -27
- package/lib/operations/execute_operation.js.map +1 -1
- package/lib/operations/find.js +3 -2
- package/lib/operations/find.js.map +1 -1
- package/lib/operations/indexes.js +2 -1
- package/lib/operations/indexes.js.map +1 -1
- package/lib/operations/list_collections.js +2 -1
- package/lib/operations/list_collections.js.map +1 -1
- package/lib/read_concern.js +1 -1
- package/lib/read_preference.js +2 -2
- package/lib/sdam/monitor.js +1 -0
- package/lib/sdam/monitor.js.map +1 -1
- package/lib/sdam/server.js +4 -2
- package/lib/sdam/server.js.map +1 -1
- package/lib/sdam/topology.js +3 -26
- package/lib/sdam/topology.js.map +1 -1
- package/lib/sessions.js +2 -1
- package/lib/sessions.js.map +1 -1
- package/lib/utils.js +15 -70
- package/lib/utils.js.map +1 -1
- package/lib/write_concern.js +1 -1
- package/mongodb.d.ts +137 -68
- package/package.json +30 -30
- package/src/bson.ts +3 -1
- package/src/bulk/common.ts +1 -1
- package/src/change_stream.ts +16 -8
- package/src/cmap/auth/auth_provider.ts +29 -16
- package/src/cmap/auth/gssapi.ts +102 -149
- package/src/cmap/auth/mongo_credentials.ts +47 -1
- package/src/cmap/auth/mongocr.ts +31 -36
- package/src/cmap/auth/mongodb_aws.ts +167 -189
- package/src/cmap/auth/mongodb_oidc/aws_service_workflow.ts +26 -0
- package/src/cmap/auth/mongodb_oidc/callback_workflow.ts +259 -0
- package/src/cmap/auth/mongodb_oidc/service_workflow.ts +47 -0
- package/src/cmap/auth/mongodb_oidc/token_entry_cache.ts +166 -0
- package/src/cmap/auth/mongodb_oidc/workflow.ts +21 -0
- package/src/cmap/auth/mongodb_oidc.ts +123 -0
- package/src/cmap/auth/plain.ts +6 -6
- package/src/cmap/auth/providers.ts +5 -2
- package/src/cmap/auth/scram.ts +56 -90
- package/src/cmap/auth/x509.ts +12 -18
- package/src/cmap/command_monitoring_events.ts +5 -2
- package/src/cmap/commands.ts +11 -1
- package/src/cmap/connect.ts +90 -114
- package/src/cmap/connection.ts +92 -90
- package/src/cmap/connection_pool.ts +77 -16
- package/src/cmap/message_stream.ts +0 -2
- package/src/cmap/wire_protocol/compression.ts +1 -1
- package/src/cmap/wire_protocol/shared.ts +1 -23
- package/src/collection.ts +11 -11
- package/src/connection_string.ts +52 -35
- package/src/cursor/abstract_cursor.ts +13 -6
- package/src/cursor/change_stream_cursor.ts +5 -5
- package/src/cursor/find_cursor.ts +1 -1
- package/src/db.ts +3 -2
- package/src/deps.ts +56 -38
- package/src/error.ts +3 -2
- package/src/index.ts +7 -0
- package/src/mongo_client.ts +35 -10
- package/src/mongo_logger.ts +20 -2
- package/src/mongo_types.ts +4 -3
- package/src/operations/aggregate.ts +4 -2
- package/src/operations/create_collection.ts +2 -1
- package/src/operations/execute_operation.ts +8 -25
- package/src/operations/find.ts +13 -4
- package/src/operations/find_and_modify.ts +4 -4
- package/src/operations/indexes.ts +12 -4
- package/src/operations/list_collections.ts +11 -3
- package/src/operations/set_profiling_level.ts +1 -1
- package/src/operations/stats.ts +1 -1
- package/src/read_concern.ts +2 -2
- package/src/read_preference.ts +3 -3
- package/src/sdam/common.ts +2 -2
- package/src/sdam/monitor.ts +1 -0
- package/src/sdam/server.ts +4 -1
- package/src/sdam/topology.ts +4 -33
- package/src/sessions.ts +2 -1
- package/src/transactions.ts +1 -1
- package/src/utils.ts +24 -98
- package/src/write_concern.ts +1 -1
package/mongodb.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ export declare abstract class AbstractCursor<TSchema = any, CursorEvents extends
|
|
|
162
162
|
/**
|
|
163
163
|
* Set the batch size for the cursor.
|
|
164
164
|
*
|
|
165
|
-
* @param value - The number of documents to return per batch. See {@link https://
|
|
165
|
+
* @param value - The number of documents to return per batch. See {@link https://www.mongodb.com/docs/manual/reference/command/find/|find command documentation}.
|
|
166
166
|
*/
|
|
167
167
|
batchSize(value: number): this;
|
|
168
168
|
/**
|
|
@@ -347,7 +347,7 @@ export declare class Admin {
|
|
|
347
347
|
export declare interface AggregateOptions extends CommandOperationOptions {
|
|
348
348
|
/** allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 \>). */
|
|
349
349
|
allowDiskUse?: boolean;
|
|
350
|
-
/** The number of documents to return per batch. See [aggregation documentation](https://
|
|
350
|
+
/** The number of documents to return per batch. See [aggregation documentation](https://www.mongodb.com/docs/manual/reference/command/aggregate). */
|
|
351
351
|
batchSize?: number;
|
|
352
352
|
/** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */
|
|
353
353
|
bypassDocumentValidation?: boolean;
|
|
@@ -499,6 +499,8 @@ export declare interface Auth {
|
|
|
499
499
|
password?: string;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
+
/* Excluded from this release type: AuthContext */
|
|
503
|
+
|
|
502
504
|
/** @public */
|
|
503
505
|
export declare const AuthMechanism: Readonly<{
|
|
504
506
|
readonly MONGODB_AWS: "MONGODB-AWS";
|
|
@@ -509,10 +511,12 @@ export declare const AuthMechanism: Readonly<{
|
|
|
509
511
|
readonly MONGODB_SCRAM_SHA1: "SCRAM-SHA-1";
|
|
510
512
|
readonly MONGODB_SCRAM_SHA256: "SCRAM-SHA-256";
|
|
511
513
|
readonly MONGODB_X509: "MONGODB-X509";
|
|
514
|
+
/** @experimental */
|
|
515
|
+
readonly MONGODB_OIDC: "MONGODB-OIDC";
|
|
512
516
|
}>;
|
|
513
517
|
|
|
514
518
|
/** @public */
|
|
515
|
-
export declare type AuthMechanism = typeof AuthMechanism[keyof typeof AuthMechanism];
|
|
519
|
+
export declare type AuthMechanism = (typeof AuthMechanism)[keyof typeof AuthMechanism];
|
|
516
520
|
|
|
517
521
|
/** @public */
|
|
518
522
|
export declare interface AuthMechanismProperties extends Document {
|
|
@@ -521,6 +525,12 @@ export declare interface AuthMechanismProperties extends Document {
|
|
|
521
525
|
SERVICE_REALM?: string;
|
|
522
526
|
CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue;
|
|
523
527
|
AWS_SESSION_TOKEN?: string;
|
|
528
|
+
/** @experimental */
|
|
529
|
+
REQUEST_TOKEN_CALLBACK?: OIDCRequestFunction;
|
|
530
|
+
/** @experimental */
|
|
531
|
+
REFRESH_TOKEN_CALLBACK?: OIDCRefreshFunction;
|
|
532
|
+
/** @experimental */
|
|
533
|
+
PROVIDER_NAME?: 'aws';
|
|
524
534
|
}
|
|
525
535
|
|
|
526
536
|
/** @public */
|
|
@@ -547,7 +557,7 @@ export declare const AutoEncryptionLoggerLevel: Readonly<{
|
|
|
547
557
|
}>;
|
|
548
558
|
|
|
549
559
|
/** @public */
|
|
550
|
-
export declare type AutoEncryptionLoggerLevel = typeof AutoEncryptionLoggerLevel[keyof typeof AutoEncryptionLoggerLevel];
|
|
560
|
+
export declare type AutoEncryptionLoggerLevel = (typeof AutoEncryptionLoggerLevel)[keyof typeof AutoEncryptionLoggerLevel];
|
|
551
561
|
|
|
552
562
|
/** @public */
|
|
553
563
|
export declare interface AutoEncryptionOptions {
|
|
@@ -569,7 +579,7 @@ export declare interface AutoEncryptionOptions {
|
|
|
569
579
|
* X-Amz-Security-Token header for AWS requests.
|
|
570
580
|
*/
|
|
571
581
|
sessionToken?: string;
|
|
572
|
-
}
|
|
582
|
+
} | Record<string, never>;
|
|
573
583
|
/** Configuration options for using 'local' as your KMS provider */
|
|
574
584
|
local?: {
|
|
575
585
|
/**
|
|
@@ -593,7 +603,12 @@ export declare interface AutoEncryptionOptions {
|
|
|
593
603
|
* Defaults to "login.microsoftonline.com"
|
|
594
604
|
*/
|
|
595
605
|
identityPlatformEndpoint?: string | undefined;
|
|
596
|
-
}
|
|
606
|
+
} | {
|
|
607
|
+
/**
|
|
608
|
+
* If present, an access token to authenticate with Azure.
|
|
609
|
+
*/
|
|
610
|
+
accessToken: string;
|
|
611
|
+
} | Record<string, never>;
|
|
597
612
|
/** Configuration options for using 'gcp' as your KMS provider */
|
|
598
613
|
gcp?: {
|
|
599
614
|
/** The service account email to authenticate */
|
|
@@ -605,7 +620,12 @@ export declare interface AutoEncryptionOptions {
|
|
|
605
620
|
* Defaults to "oauth2.googleapis.com"
|
|
606
621
|
*/
|
|
607
622
|
endpoint?: string | undefined;
|
|
608
|
-
}
|
|
623
|
+
} | {
|
|
624
|
+
/**
|
|
625
|
+
* If present, an access token to authenticate with GCP.
|
|
626
|
+
*/
|
|
627
|
+
accessToken: string;
|
|
628
|
+
} | Record<string, never>;
|
|
609
629
|
/**
|
|
610
630
|
* Configuration options for using 'kmip' as your KMS provider
|
|
611
631
|
*/
|
|
@@ -742,7 +762,7 @@ export declare const BatchType: Readonly<{
|
|
|
742
762
|
}>;
|
|
743
763
|
|
|
744
764
|
/** @public */
|
|
745
|
-
export declare type BatchType = typeof BatchType[keyof typeof BatchType];
|
|
765
|
+
export declare type BatchType = (typeof BatchType)[keyof typeof BatchType];
|
|
746
766
|
|
|
747
767
|
export { Binary }
|
|
748
768
|
|
|
@@ -759,7 +779,7 @@ export { BSONRegExp }
|
|
|
759
779
|
* BSON Serialization options.
|
|
760
780
|
* @public
|
|
761
781
|
*/
|
|
762
|
-
export declare interface BSONSerializeOptions extends Omit<SerializeOptions, 'index'>, Omit<DeserializeOptions, 'evalFunctions' | 'cacheFunctions' | 'cacheFunctionsCrc32' | 'allowObjectSmallerThanBufferSize' | 'index' | 'validation'
|
|
782
|
+
export declare interface BSONSerializeOptions extends Omit<SerializeOptions, 'index'>, Omit<DeserializeOptions, 'evalFunctions' | 'cacheFunctions' | 'cacheFunctionsCrc32' | 'allowObjectSmallerThanBufferSize' | 'index' | 'validation'> {
|
|
763
783
|
/**
|
|
764
784
|
* Enabling the raw option will return a [Node.js Buffer](https://nodejs.org/api/buffer.html)
|
|
765
785
|
* which is allocated using [allocUnsafe API](https://nodejs.org/api/buffer.html#static-method-bufferallocunsafesize).
|
|
@@ -965,7 +985,16 @@ export declare class CancellationToken extends TypedEventEmitter<{
|
|
|
965
985
|
*/
|
|
966
986
|
export declare class ChangeStream<TSchema extends Document = Document, TChange extends Document = ChangeStreamDocument<TSchema>> extends TypedEventEmitter<ChangeStreamEvents<TSchema, TChange>> {
|
|
967
987
|
pipeline: Document[];
|
|
968
|
-
|
|
988
|
+
/**
|
|
989
|
+
* @remarks WriteConcern can still be present on the options because
|
|
990
|
+
* we inherit options from the client/db/collection. The
|
|
991
|
+
* key must be present on the options in order to delete it.
|
|
992
|
+
* This allows typescript to delete the key but will
|
|
993
|
+
* not allow a writeConcern to be assigned as a property on options.
|
|
994
|
+
*/
|
|
995
|
+
options: ChangeStreamOptions & {
|
|
996
|
+
writeConcern?: never;
|
|
997
|
+
};
|
|
969
998
|
parent: MongoClient | Db | Collection;
|
|
970
999
|
namespace: MongoDBNamespace;
|
|
971
1000
|
type: symbol;
|
|
@@ -1238,7 +1267,7 @@ export declare interface ChangeStreamNameSpace {
|
|
|
1238
1267
|
* Options that can be passed to a ChangeStream. Note that startAfter, resumeAfter, and startAtOperationTime are all mutually exclusive, and the server will error if more than one is specified.
|
|
1239
1268
|
* @public
|
|
1240
1269
|
*/
|
|
1241
|
-
export declare interface ChangeStreamOptions extends AggregateOptions {
|
|
1270
|
+
export declare interface ChangeStreamOptions extends Omit<AggregateOptions, 'writeConcern'> {
|
|
1242
1271
|
/**
|
|
1243
1272
|
* Allowed values: 'updateLookup', 'whenAvailable', 'required'.
|
|
1244
1273
|
*
|
|
@@ -1272,19 +1301,19 @@ export declare interface ChangeStreamOptions extends AggregateOptions {
|
|
|
1272
1301
|
maxAwaitTimeMS?: number;
|
|
1273
1302
|
/**
|
|
1274
1303
|
* Allows you to start a changeStream after a specified event.
|
|
1275
|
-
* @see https://
|
|
1304
|
+
* @see https://www.mongodb.com/docs/manual/changeStreams/#resumeafter-for-change-streams
|
|
1276
1305
|
*/
|
|
1277
1306
|
resumeAfter?: ResumeToken;
|
|
1278
1307
|
/**
|
|
1279
1308
|
* Similar to resumeAfter, but will allow you to start after an invalidated event.
|
|
1280
|
-
* @see https://
|
|
1309
|
+
* @see https://www.mongodb.com/docs/manual/changeStreams/#startafter-for-change-streams
|
|
1281
1310
|
*/
|
|
1282
1311
|
startAfter?: ResumeToken;
|
|
1283
1312
|
/** Will start the changeStream after the specified operationTime. */
|
|
1284
1313
|
startAtOperationTime?: OperationTime;
|
|
1285
1314
|
/**
|
|
1286
1315
|
* The number of documents to return per batch.
|
|
1287
|
-
* @see https://
|
|
1316
|
+
* @see https://www.mongodb.com/docs/manual/reference/command/aggregate
|
|
1288
1317
|
*/
|
|
1289
1318
|
batchSize?: number;
|
|
1290
1319
|
/**
|
|
@@ -1393,7 +1422,10 @@ export declare interface ChangeStreamUpdateDocument<TSchema extends Document = D
|
|
|
1393
1422
|
fullDocumentBeforeChange?: TSchema;
|
|
1394
1423
|
}
|
|
1395
1424
|
|
|
1396
|
-
/**
|
|
1425
|
+
/**
|
|
1426
|
+
* @public
|
|
1427
|
+
* @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#hello-command
|
|
1428
|
+
*/
|
|
1397
1429
|
export declare interface ClientMetadata {
|
|
1398
1430
|
driver: {
|
|
1399
1431
|
name: string;
|
|
@@ -1406,7 +1438,6 @@ export declare interface ClientMetadata {
|
|
|
1406
1438
|
version: string;
|
|
1407
1439
|
};
|
|
1408
1440
|
platform: string;
|
|
1409
|
-
version?: string;
|
|
1410
1441
|
application?: {
|
|
1411
1442
|
name: string;
|
|
1412
1443
|
};
|
|
@@ -1811,7 +1842,7 @@ export declare class Collection<TSchema extends Document = Document> {
|
|
|
1811
1842
|
* error.
|
|
1812
1843
|
*
|
|
1813
1844
|
* **Note**: Unlike {@link Collection#createIndex| createIndex}, this function takes in raw index specifications.
|
|
1814
|
-
* Index specifications are defined {@link
|
|
1845
|
+
* Index specifications are defined {@link https://www.mongodb.com/docs/manual/reference/command/createIndexes/| here}.
|
|
1815
1846
|
*
|
|
1816
1847
|
* @param indexSpecs - An array of index specifications to be created
|
|
1817
1848
|
* @param options - Optional settings for the command
|
|
@@ -1895,18 +1926,18 @@ export declare class Collection<TSchema extends Document = Document> {
|
|
|
1895
1926
|
* | `$near` | [`$geoWithin`][2] with [`$center`][3] |
|
|
1896
1927
|
* | `$nearSphere` | [`$geoWithin`][2] with [`$centerSphere`][4] |
|
|
1897
1928
|
*
|
|
1898
|
-
* [1]: https://
|
|
1899
|
-
* [2]: https://
|
|
1900
|
-
* [3]: https://
|
|
1901
|
-
* [4]: https://
|
|
1929
|
+
* [1]: https://www.mongodb.com/docs/manual/reference/operator/query/expr/
|
|
1930
|
+
* [2]: https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/
|
|
1931
|
+
* [3]: https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center
|
|
1932
|
+
* [4]: https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere
|
|
1902
1933
|
*
|
|
1903
1934
|
* @param filter - The filter for the count
|
|
1904
1935
|
* @param options - Optional settings for the command
|
|
1905
1936
|
*
|
|
1906
|
-
* @see https://
|
|
1907
|
-
* @see https://
|
|
1908
|
-
* @see https://
|
|
1909
|
-
* @see https://
|
|
1937
|
+
* @see https://www.mongodb.com/docs/manual/reference/operator/query/expr/
|
|
1938
|
+
* @see https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/
|
|
1939
|
+
* @see https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center
|
|
1940
|
+
* @see https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere
|
|
1910
1941
|
*/
|
|
1911
1942
|
countDocuments(filter?: Document, options?: CountDocumentsOptions): Promise<number>;
|
|
1912
1943
|
/**
|
|
@@ -1997,7 +2028,7 @@ export declare class Collection<TSchema extends Document = Document> {
|
|
|
1997
2028
|
* });
|
|
1998
2029
|
* ```
|
|
1999
2030
|
*
|
|
2000
|
-
* @param pipeline - An array of {@link https://
|
|
2031
|
+
* @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.
|
|
2001
2032
|
* @param options - Optional settings for the command
|
|
2002
2033
|
* @typeParam TLocal - Type of the data being detected by the change stream
|
|
2003
2034
|
* @typeParam TChange - Type of the whole change stream document emitted
|
|
@@ -2060,7 +2091,7 @@ export declare interface CollectionOptions extends BSONSerializeOptions, WriteCo
|
|
|
2060
2091
|
|
|
2061
2092
|
/**
|
|
2062
2093
|
* @public
|
|
2063
|
-
* @see https://
|
|
2094
|
+
* @see https://www.mongodb.com/docs/manual/reference/command/collStats/
|
|
2064
2095
|
*/
|
|
2065
2096
|
export declare interface CollStats extends Document {
|
|
2066
2097
|
/** Namespace */
|
|
@@ -2208,7 +2239,7 @@ export declare const Compressor: Readonly<{
|
|
|
2208
2239
|
}>;
|
|
2209
2240
|
|
|
2210
2241
|
/** @public */
|
|
2211
|
-
export declare type Compressor = typeof Compressor[CompressorName];
|
|
2242
|
+
export declare type Compressor = (typeof Compressor)[CompressorName];
|
|
2212
2243
|
|
|
2213
2244
|
/** @public */
|
|
2214
2245
|
export declare type CompressorName = keyof typeof Compressor;
|
|
@@ -2490,7 +2521,7 @@ export declare interface CreateCollectionOptions extends CommandOperationOptions
|
|
|
2490
2521
|
}
|
|
2491
2522
|
|
|
2492
2523
|
/** @public */
|
|
2493
|
-
export declare interface CreateIndexesOptions extends CommandOperationOptions {
|
|
2524
|
+
export declare interface CreateIndexesOptions extends Omit<CommandOperationOptions, 'writeConcern'> {
|
|
2494
2525
|
/** Creates the index in the background, yielding whenever possible. */
|
|
2495
2526
|
background?: boolean;
|
|
2496
2527
|
/** Creates an unique index. */
|
|
@@ -2529,7 +2560,7 @@ export declare interface CreateIndexesOptions extends CommandOperationOptions {
|
|
|
2529
2560
|
export declare const CURSOR_FLAGS: readonly ["tailable", "oplogReplay", "noCursorTimeout", "awaitData", "exhaust", "partial"];
|
|
2530
2561
|
|
|
2531
2562
|
/** @public */
|
|
2532
|
-
export declare type CursorFlag = typeof CURSOR_FLAGS[number];
|
|
2563
|
+
export declare type CursorFlag = (typeof CURSOR_FLAGS)[number];
|
|
2533
2564
|
|
|
2534
2565
|
/** @public */
|
|
2535
2566
|
export declare interface CursorStreamOptions {
|
|
@@ -2592,7 +2623,7 @@ export declare class Db {
|
|
|
2592
2623
|
get namespace(): string;
|
|
2593
2624
|
/**
|
|
2594
2625
|
* Create a new collection on a server with the specified options. Use this to create capped collections.
|
|
2595
|
-
* More information about command options available at https://
|
|
2626
|
+
* More information about command options available at https://www.mongodb.com/docs/manual/reference/command/create/
|
|
2596
2627
|
*
|
|
2597
2628
|
* @param name - The name of the collection to create
|
|
2598
2629
|
* @param options - Optional settings for the command
|
|
@@ -2726,7 +2757,7 @@ export declare class Db {
|
|
|
2726
2757
|
* - The first is to provide the schema that may be defined for all the collections within this database
|
|
2727
2758
|
* - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
|
|
2728
2759
|
*
|
|
2729
|
-
* @param pipeline - An array of {@link https://
|
|
2760
|
+
* @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.
|
|
2730
2761
|
* @param options - Optional settings for the command
|
|
2731
2762
|
* @typeParam TSchema - Type of the data being detected by the change stream
|
|
2732
2763
|
* @typeParam TChange - Type of the whole change stream document emitted
|
|
@@ -3100,7 +3131,7 @@ export declare class FindCursor<TSchema = any> extends AbstractCursor<TSchema> {
|
|
|
3100
3131
|
* Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)
|
|
3101
3132
|
*
|
|
3102
3133
|
* @remarks
|
|
3103
|
-
* {@link https://
|
|
3134
|
+
* {@link https://www.mongodb.com/docs/manual/reference/command/find/#find-cmd-allowdiskuse | find command allowDiskUse documentation}
|
|
3104
3135
|
*/
|
|
3105
3136
|
allowDiskUse(allow?: boolean): this;
|
|
3106
3137
|
/**
|
|
@@ -3125,7 +3156,7 @@ export declare class FindCursor<TSchema = any> extends AbstractCursor<TSchema> {
|
|
|
3125
3156
|
|
|
3126
3157
|
/** @public */
|
|
3127
3158
|
export declare interface FindOneAndDeleteOptions extends CommandOperationOptions {
|
|
3128
|
-
/** An optional hint for query optimization. See the {@link https://
|
|
3159
|
+
/** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/
|
|
3129
3160
|
hint?: Document;
|
|
3130
3161
|
/** Limits the fields to return for all matching documents. */
|
|
3131
3162
|
projection?: Document;
|
|
@@ -3139,7 +3170,7 @@ export declare interface FindOneAndDeleteOptions extends CommandOperationOptions
|
|
|
3139
3170
|
export declare interface FindOneAndReplaceOptions extends CommandOperationOptions {
|
|
3140
3171
|
/** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */
|
|
3141
3172
|
bypassDocumentValidation?: boolean;
|
|
3142
|
-
/** An optional hint for query optimization. See the {@link https://
|
|
3173
|
+
/** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/
|
|
3143
3174
|
hint?: Document;
|
|
3144
3175
|
/** Limits the fields to return for all matching documents. */
|
|
3145
3176
|
projection?: Document;
|
|
@@ -3159,7 +3190,7 @@ export declare interface FindOneAndUpdateOptions extends CommandOperationOptions
|
|
|
3159
3190
|
arrayFilters?: Document[];
|
|
3160
3191
|
/** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */
|
|
3161
3192
|
bypassDocumentValidation?: boolean;
|
|
3162
|
-
/** An optional hint for query optimization. See the {@link https://
|
|
3193
|
+
/** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/
|
|
3163
3194
|
hint?: Document;
|
|
3164
3195
|
/** Limits the fields to return for all matching documents. */
|
|
3165
3196
|
projection?: Document;
|
|
@@ -3206,7 +3237,7 @@ export declare class FindOperators {
|
|
|
3206
3237
|
* @public
|
|
3207
3238
|
* @typeParam TSchema - Unused schema definition, deprecated usage, only specify `FindOptions` with no generic
|
|
3208
3239
|
*/
|
|
3209
|
-
export declare interface FindOptions<TSchema extends Document = Document> extends CommandOperationOptions {
|
|
3240
|
+
export declare interface FindOptions<TSchema extends Document = Document> extends Omit<CommandOperationOptions, 'writeConcern'> {
|
|
3210
3241
|
/** Sets the limit of documents returned in the query. */
|
|
3211
3242
|
limit?: number;
|
|
3212
3243
|
/** Set to sort the documents coming back from the query. Array of indexes, `[['a', 1]]` etc. */
|
|
@@ -3537,7 +3568,7 @@ export declare const GSSAPICanonicalizationValue: Readonly<{
|
|
|
3537
3568
|
}>;
|
|
3538
3569
|
|
|
3539
3570
|
/** @public */
|
|
3540
|
-
export declare type GSSAPICanonicalizationValue = typeof GSSAPICanonicalizationValue[keyof typeof GSSAPICanonicalizationValue];
|
|
3571
|
+
export declare type GSSAPICanonicalizationValue = (typeof GSSAPICanonicalizationValue)[keyof typeof GSSAPICanonicalizationValue];
|
|
3541
3572
|
|
|
3542
3573
|
/** @public */
|
|
3543
3574
|
export declare interface HedgeOptions {
|
|
@@ -3630,7 +3661,7 @@ export declare interface InsertOneResult<TSchema = Document> {
|
|
|
3630
3661
|
export { Int32 }
|
|
3631
3662
|
|
|
3632
3663
|
/** @public */
|
|
3633
|
-
export declare type IntegerType = number | Int32 | Long;
|
|
3664
|
+
export declare type IntegerType = number | Int32 | Long | bigint;
|
|
3634
3665
|
|
|
3635
3666
|
/* Excluded from this release type: InternalAbstractCursorOptions */
|
|
3636
3667
|
|
|
@@ -3800,7 +3831,7 @@ export declare class ListCollectionsCursor<T extends Pick<CollectionInfo, 'name'
|
|
|
3800
3831
|
}
|
|
3801
3832
|
|
|
3802
3833
|
/** @public */
|
|
3803
|
-
export declare interface ListCollectionsOptions extends CommandOperationOptions {
|
|
3834
|
+
export declare interface ListCollectionsOptions extends Omit<CommandOperationOptions, 'writeConcern'> {
|
|
3804
3835
|
/** Since 4.0: If true, will only return the collection name in the response, and will omit additional info */
|
|
3805
3836
|
nameOnly?: boolean;
|
|
3806
3837
|
/** Since 4.0: If true and nameOnly is true, allows a user without the required privilege (i.e. listCollections action on the database) to run the command when access control is enforced. */
|
|
@@ -3841,7 +3872,7 @@ export declare class ListIndexesCursor extends AbstractCursor {
|
|
|
3841
3872
|
}
|
|
3842
3873
|
|
|
3843
3874
|
/** @public */
|
|
3844
|
-
export declare interface ListIndexesOptions extends CommandOperationOptions {
|
|
3875
|
+
export declare interface ListIndexesOptions extends Omit<CommandOperationOptions, 'writeConcern'> {
|
|
3845
3876
|
/** The batchSize for the returned command cursor or if pre 2.8 the systems batch collection */
|
|
3846
3877
|
batchSize?: number;
|
|
3847
3878
|
}
|
|
@@ -3862,7 +3893,7 @@ export { MinKey }
|
|
|
3862
3893
|
|
|
3863
3894
|
/**
|
|
3864
3895
|
* @public
|
|
3865
|
-
* @deprecated This type will be completely removed
|
|
3896
|
+
* @deprecated This type will be completely removed and findOneAndUpdate,
|
|
3866
3897
|
* findOneAndDelete, and findOneAndReplace will then return the
|
|
3867
3898
|
* actual result document.
|
|
3868
3899
|
*/
|
|
@@ -3983,6 +4014,7 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> {
|
|
|
3983
4014
|
/* Excluded from this release type: s */
|
|
3984
4015
|
/* Excluded from this release type: topology */
|
|
3985
4016
|
/* Excluded from this release type: mongoLogger */
|
|
4017
|
+
/* Excluded from this release type: connectionLock */
|
|
3986
4018
|
/* Excluded from this release type: [kOptions] */
|
|
3987
4019
|
constructor(url: string, options?: MongoClientOptions);
|
|
3988
4020
|
get options(): Readonly<MongoOptions>;
|
|
@@ -4000,6 +4032,7 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> {
|
|
|
4000
4032
|
* @see docs.mongodb.org/manual/reference/connection-string/
|
|
4001
4033
|
*/
|
|
4002
4034
|
connect(): Promise<this>;
|
|
4035
|
+
/* Excluded from this release type: _connect */
|
|
4003
4036
|
/**
|
|
4004
4037
|
* Close the client and its underlying connections
|
|
4005
4038
|
*
|
|
@@ -4019,7 +4052,7 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> {
|
|
|
4019
4052
|
* @remarks
|
|
4020
4053
|
* The programmatically provided options take precedence over the URI options.
|
|
4021
4054
|
*
|
|
4022
|
-
* @see https://
|
|
4055
|
+
* @see https://www.mongodb.com/docs/manual/reference/connection-string/
|
|
4023
4056
|
*/
|
|
4024
4057
|
static connect(url: string, options?: MongoClientOptions): Promise<MongoClient>;
|
|
4025
4058
|
/** Starts a new session on the server */
|
|
@@ -4045,7 +4078,7 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> {
|
|
|
4045
4078
|
* - The first is to provide the schema that may be defined for all the data within the current cluster
|
|
4046
4079
|
* - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
|
|
4047
4080
|
*
|
|
4048
|
-
* @param pipeline - An array of {@link https://
|
|
4081
|
+
* @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.
|
|
4049
4082
|
* @param options - Optional settings for the command
|
|
4050
4083
|
* @typeParam TSchema - Type of the data being detected by the change stream
|
|
4051
4084
|
* @typeParam TChange - Type of the whole change stream document emitted
|
|
@@ -4054,14 +4087,14 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> {
|
|
|
4054
4087
|
}
|
|
4055
4088
|
|
|
4056
4089
|
/** @public */
|
|
4057
|
-
export declare type MongoClientEvents = Pick<TopologyEvents, typeof MONGO_CLIENT_EVENTS[number]> & {
|
|
4090
|
+
export declare type MongoClientEvents = Pick<TopologyEvents, (typeof MONGO_CLIENT_EVENTS)[number]> & {
|
|
4058
4091
|
open(mongoClient: MongoClient): void;
|
|
4059
4092
|
};
|
|
4060
4093
|
|
|
4061
4094
|
/**
|
|
4062
4095
|
* Describes all possible URI query options for the mongo client
|
|
4063
4096
|
* @public
|
|
4064
|
-
* @see https://
|
|
4097
|
+
* @see https://www.mongodb.com/docs/manual/reference/connection-string
|
|
4065
4098
|
*/
|
|
4066
4099
|
export declare interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeConnectionOptions {
|
|
4067
4100
|
/** Specifies the name of the replica set, if the mongod is a member of a replica set. */
|
|
@@ -4167,7 +4200,7 @@ export declare interface MongoClientOptions extends BSONSerializeOptions, Suppor
|
|
|
4167
4200
|
* A MongoDB WriteConcern, which describes the level of acknowledgement
|
|
4168
4201
|
* requested from MongoDB for write operations.
|
|
4169
4202
|
*
|
|
4170
|
-
* @see https://
|
|
4203
|
+
* @see https://www.mongodb.com/docs/manual/reference/write-concern/
|
|
4171
4204
|
*/
|
|
4172
4205
|
writeConcern?: WriteConcern | WriteConcernSettings;
|
|
4173
4206
|
/** Validate mongod server certificate against Certificate Authority */
|
|
@@ -4203,7 +4236,7 @@ export declare interface MongoClientOptions extends BSONSerializeOptions, Suppor
|
|
|
4203
4236
|
* Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error
|
|
4204
4237
|
* (see [libmongocrypt: Auto Encryption Allow-List](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#libmongocrypt-auto-encryption-allow-list)). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.
|
|
4205
4238
|
*
|
|
4206
|
-
* Automatic encryption requires the authenticated user to have the [listCollections privilege action](https://
|
|
4239
|
+
* Automatic encryption requires the authenticated user to have the [listCollections privilege action](https://www.mongodb.com/docs/manual/reference/command/listCollections/#dbcmd.listCollections).
|
|
4207
4240
|
*
|
|
4208
4241
|
* If a MongoClient with a limited connection pool size (i.e a non-zero maxPoolSize) is configured with AutoEncryptionOptions, a separate internal MongoClient is created if any of the following are true:
|
|
4209
4242
|
* - AutoEncryptionOptions.keyVaultClient is not passed.
|
|
@@ -4389,7 +4422,7 @@ export declare const MongoErrorLabel: Readonly<{
|
|
|
4389
4422
|
}>;
|
|
4390
4423
|
|
|
4391
4424
|
/** @public */
|
|
4392
|
-
export declare type MongoErrorLabel = typeof MongoErrorLabel[keyof typeof MongoErrorLabel];
|
|
4425
|
+
export declare type MongoErrorLabel = (typeof MongoErrorLabel)[keyof typeof MongoErrorLabel];
|
|
4393
4426
|
|
|
4394
4427
|
/**
|
|
4395
4428
|
* An error generated when the user attempts to operate
|
|
@@ -4531,6 +4564,7 @@ export declare class MongoNotConnectedError extends MongoAPIError {
|
|
|
4531
4564
|
* @public
|
|
4532
4565
|
*/
|
|
4533
4566
|
export declare interface MongoOptions extends Required<Pick<MongoClientOptions, 'autoEncryption' | 'connectTimeoutMS' | 'directConnection' | 'driverInfo' | 'forceServerObjectId' | 'minHeartbeatFrequencyMS' | 'heartbeatFrequencyMS' | 'keepAlive' | 'keepAliveInitialDelay' | 'localThresholdMS' | 'maxConnecting' | 'maxIdleTimeMS' | 'maxPoolSize' | 'minPoolSize' | 'monitorCommands' | 'noDelay' | 'pkFactory' | 'raw' | 'replicaSet' | 'retryReads' | 'retryWrites' | 'serverSelectionTimeoutMS' | 'socketTimeoutMS' | 'srvMaxHosts' | 'srvServiceName' | 'tlsAllowInvalidCertificates' | 'tlsAllowInvalidHostnames' | 'tlsInsecure' | 'waitQueueTimeoutMS' | 'zlibCompressionLevel'>>, SupportedNodeConnectionOptions {
|
|
4567
|
+
appName?: string;
|
|
4534
4568
|
hosts: HostAddress[];
|
|
4535
4569
|
srvHost?: string;
|
|
4536
4570
|
credentials?: MongoCredentials;
|
|
@@ -4746,7 +4780,7 @@ export declare interface MonitorOptions extends Omit<ConnectionOptions, 'id' | '
|
|
|
4746
4780
|
/**
|
|
4747
4781
|
* @public
|
|
4748
4782
|
* returns tuple of strings (keys to be joined on '.') that represent every path into a schema
|
|
4749
|
-
* https://
|
|
4783
|
+
* https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/
|
|
4750
4784
|
*
|
|
4751
4785
|
* @remarks
|
|
4752
4786
|
* Through testing we determined that a depth of 8 is safe for the typescript compiler
|
|
@@ -4755,7 +4789,7 @@ export declare interface MonitorOptions extends Omit<ConnectionOptions, 'id' | '
|
|
|
4755
4789
|
* depth any helpers that make use of NestedPaths should devolve to not asserting any
|
|
4756
4790
|
* type safety on the input.
|
|
4757
4791
|
*/
|
|
4758
|
-
export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 8 ? [] : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
|
|
4792
|
+
export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 8 ? [] : Type extends string | number | bigint | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
|
|
4759
4793
|
_bsontype: string;
|
|
4760
4794
|
} ? [] : Type extends ReadonlyArray<infer ArrayType> ? [] | [number, ...NestedPaths<ArrayType, [...Depth, 1]>] : Type extends Map<string, any> ? [string] : Type extends object ? {
|
|
4761
4795
|
[Key in Extract<keyof Type, string>]: Type[Key] extends Type ? [Key] : Type extends Type[Key] ? [Key] : Type[Key] extends ReadonlyArray<infer ArrayType> ? Type extends ArrayType ? [Key] : ArrayType extends Type ? [Key] : [
|
|
@@ -4771,7 +4805,7 @@ export declare type NestedPaths<Type, Depth extends number[]> = Depth['length']
|
|
|
4771
4805
|
/**
|
|
4772
4806
|
* @public
|
|
4773
4807
|
* returns keys (strings) for every path into a schema with a value of type
|
|
4774
|
-
* https://
|
|
4808
|
+
* https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/
|
|
4775
4809
|
*/
|
|
4776
4810
|
export declare type NestedPathsOfType<TSchema, Type> = KeysOfAType<{
|
|
4777
4811
|
[Property in Join<NestedPaths<TSchema, []>, '.'>]: PropertyType<TSchema, Property>;
|
|
@@ -4795,6 +4829,41 @@ export declare type NumericType = IntegerType | Decimal128 | Double;
|
|
|
4795
4829
|
|
|
4796
4830
|
export { ObjectId }
|
|
4797
4831
|
|
|
4832
|
+
/**
|
|
4833
|
+
* @public
|
|
4834
|
+
* @experimental
|
|
4835
|
+
*/
|
|
4836
|
+
export declare interface OIDCMechanismServerStep1 {
|
|
4837
|
+
authorizationEndpoint?: string;
|
|
4838
|
+
tokenEndpoint?: string;
|
|
4839
|
+
deviceAuthorizationEndpoint?: string;
|
|
4840
|
+
clientId: string;
|
|
4841
|
+
clientSecret?: string;
|
|
4842
|
+
requestScopes?: string[];
|
|
4843
|
+
}
|
|
4844
|
+
|
|
4845
|
+
/**
|
|
4846
|
+
* @public
|
|
4847
|
+
* @experimental
|
|
4848
|
+
*/
|
|
4849
|
+
export declare type OIDCRefreshFunction = (principalName: string, serverResult: OIDCMechanismServerStep1, result: OIDCRequestTokenResult, timeout: AbortSignal | number) => Promise<OIDCRequestTokenResult>;
|
|
4850
|
+
|
|
4851
|
+
/**
|
|
4852
|
+
* @public
|
|
4853
|
+
* @experimental
|
|
4854
|
+
*/
|
|
4855
|
+
export declare type OIDCRequestFunction = (principalName: string, serverResult: OIDCMechanismServerStep1, timeout: AbortSignal | number) => Promise<OIDCRequestTokenResult>;
|
|
4856
|
+
|
|
4857
|
+
/**
|
|
4858
|
+
* @public
|
|
4859
|
+
* @experimental
|
|
4860
|
+
*/
|
|
4861
|
+
export declare interface OIDCRequestTokenResult {
|
|
4862
|
+
accessToken: string;
|
|
4863
|
+
expiresInSeconds?: number;
|
|
4864
|
+
refreshToken?: string;
|
|
4865
|
+
}
|
|
4866
|
+
|
|
4798
4867
|
/** @public */
|
|
4799
4868
|
export declare type OneOrMore<T> = T | ReadonlyArray<T>;
|
|
4800
4869
|
|
|
@@ -4819,7 +4888,7 @@ export declare interface OperationOptions extends BSONSerializeOptions {
|
|
|
4819
4888
|
/**
|
|
4820
4889
|
* Represents a specific point in time on a server. Can be retrieved by using `db.command()`
|
|
4821
4890
|
* @public
|
|
4822
|
-
* @see https://
|
|
4891
|
+
* @see https://www.mongodb.com/docs/manual/reference/method/db.runCommand/#response
|
|
4823
4892
|
*/
|
|
4824
4893
|
export declare type OperationTime = Timestamp;
|
|
4825
4894
|
|
|
@@ -4873,7 +4942,7 @@ export declare const ProfilingLevel: Readonly<{
|
|
|
4873
4942
|
}>;
|
|
4874
4943
|
|
|
4875
4944
|
/** @public */
|
|
4876
|
-
export declare type ProfilingLevel = typeof ProfilingLevel[keyof typeof ProfilingLevel];
|
|
4945
|
+
export declare type ProfilingLevel = (typeof ProfilingLevel)[keyof typeof ProfilingLevel];
|
|
4877
4946
|
|
|
4878
4947
|
/** @public */
|
|
4879
4948
|
export declare type ProfilingLevelOptions = CommandOperationOptions;
|
|
@@ -4917,7 +4986,7 @@ export declare type PushOperator<TSchema> = ({
|
|
|
4917
4986
|
* of the data read from replica sets and replica set shards.
|
|
4918
4987
|
* @public
|
|
4919
4988
|
*
|
|
4920
|
-
* @see https://
|
|
4989
|
+
* @see https://www.mongodb.com/docs/manual/reference/read-concern/index.html
|
|
4921
4990
|
*/
|
|
4922
4991
|
export declare class ReadConcern {
|
|
4923
4992
|
level: ReadConcernLevel | string;
|
|
@@ -4949,7 +5018,7 @@ export declare const ReadConcernLevel: Readonly<{
|
|
|
4949
5018
|
}>;
|
|
4950
5019
|
|
|
4951
5020
|
/** @public */
|
|
4952
|
-
export declare type ReadConcernLevel = typeof ReadConcernLevel[keyof typeof ReadConcernLevel];
|
|
5021
|
+
export declare type ReadConcernLevel = (typeof ReadConcernLevel)[keyof typeof ReadConcernLevel];
|
|
4953
5022
|
|
|
4954
5023
|
/** @public */
|
|
4955
5024
|
export declare type ReadConcernLike = ReadConcern | {
|
|
@@ -4961,7 +5030,7 @@ export declare type ReadConcernLike = ReadConcern | {
|
|
|
4961
5030
|
* used to construct connections.
|
|
4962
5031
|
* @public
|
|
4963
5032
|
*
|
|
4964
|
-
* @see https://
|
|
5033
|
+
* @see https://www.mongodb.com/docs/manual/core/read-preference/
|
|
4965
5034
|
*/
|
|
4966
5035
|
export declare class ReadPreference {
|
|
4967
5036
|
mode: ReadPreferenceMode;
|
|
@@ -5011,7 +5080,7 @@ export declare class ReadPreference {
|
|
|
5011
5080
|
isValid(mode?: string): boolean;
|
|
5012
5081
|
/**
|
|
5013
5082
|
* Indicates that this readPreference needs the "SecondaryOk" bit when sent over the wire
|
|
5014
|
-
* @see https://
|
|
5083
|
+
* @see https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/#op-query
|
|
5015
5084
|
*/
|
|
5016
5085
|
secondaryOk(): boolean;
|
|
5017
5086
|
/**
|
|
@@ -5054,7 +5123,7 @@ export declare const ReadPreferenceMode: Readonly<{
|
|
|
5054
5123
|
}>;
|
|
5055
5124
|
|
|
5056
5125
|
/** @public */
|
|
5057
|
-
export declare type ReadPreferenceMode = typeof ReadPreferenceMode[keyof typeof ReadPreferenceMode];
|
|
5126
|
+
export declare type ReadPreferenceMode = (typeof ReadPreferenceMode)[keyof typeof ReadPreferenceMode];
|
|
5058
5127
|
|
|
5059
5128
|
/** @public */
|
|
5060
5129
|
export declare interface ReadPreferenceOptions {
|
|
@@ -5137,7 +5206,7 @@ export declare const ReturnDocument: Readonly<{
|
|
|
5137
5206
|
}>;
|
|
5138
5207
|
|
|
5139
5208
|
/** @public */
|
|
5140
|
-
export declare type ReturnDocument = typeof ReturnDocument[keyof typeof ReturnDocument];
|
|
5209
|
+
export declare type ReturnDocument = (typeof ReturnDocument)[keyof typeof ReturnDocument];
|
|
5141
5210
|
|
|
5142
5211
|
/** @public */
|
|
5143
5212
|
export declare interface RoleSpecification {
|
|
@@ -5204,7 +5273,7 @@ export declare const ServerApiVersion: Readonly<{
|
|
|
5204
5273
|
}>;
|
|
5205
5274
|
|
|
5206
5275
|
/** @public */
|
|
5207
|
-
export declare type ServerApiVersion = typeof ServerApiVersion[keyof typeof ServerApiVersion];
|
|
5276
|
+
export declare type ServerApiVersion = (typeof ServerApiVersion)[keyof typeof ServerApiVersion];
|
|
5208
5277
|
|
|
5209
5278
|
/** @public */
|
|
5210
5279
|
export declare class ServerCapabilities {
|
|
@@ -5421,7 +5490,7 @@ export declare const ServerType: Readonly<{
|
|
|
5421
5490
|
}>;
|
|
5422
5491
|
|
|
5423
5492
|
/** @public */
|
|
5424
|
-
export declare type ServerType = typeof ServerType[keyof typeof ServerType];
|
|
5493
|
+
export declare type ServerType = (typeof ServerType)[keyof typeof ServerType];
|
|
5425
5494
|
|
|
5426
5495
|
/** @public */
|
|
5427
5496
|
export declare type SetFields<TSchema> = ({
|
|
@@ -5542,13 +5611,13 @@ export declare type StrictUpdateFilter<TSchema> = {
|
|
|
5542
5611
|
export declare type SupportedNodeConnectionOptions = SupportedTLSConnectionOptions & SupportedTLSSocketOptions & SupportedSocketOptions;
|
|
5543
5612
|
|
|
5544
5613
|
/** @public */
|
|
5545
|
-
export declare type SupportedSocketOptions = Pick<TcpNetConnectOpts, typeof LEGAL_TCP_SOCKET_OPTIONS[number]>;
|
|
5614
|
+
export declare type SupportedSocketOptions = Pick<TcpNetConnectOpts, (typeof LEGAL_TCP_SOCKET_OPTIONS)[number]>;
|
|
5546
5615
|
|
|
5547
5616
|
/** @public */
|
|
5548
|
-
export declare type SupportedTLSConnectionOptions = Pick<ConnectionOptions_2, Extract<keyof ConnectionOptions_2, typeof LEGAL_TLS_SOCKET_OPTIONS[number]>>;
|
|
5617
|
+
export declare type SupportedTLSConnectionOptions = Pick<ConnectionOptions_2, Extract<keyof ConnectionOptions_2, (typeof LEGAL_TLS_SOCKET_OPTIONS)[number]>>;
|
|
5549
5618
|
|
|
5550
5619
|
/** @public */
|
|
5551
|
-
export declare type SupportedTLSSocketOptions = Pick<TLSSocketOptions, Extract<keyof TLSSocketOptions, typeof LEGAL_TLS_SOCKET_OPTIONS[number]>>;
|
|
5620
|
+
export declare type SupportedTLSSocketOptions = Pick<TLSSocketOptions, Extract<keyof TLSSocketOptions, (typeof LEGAL_TLS_SOCKET_OPTIONS)[number]>>;
|
|
5552
5621
|
|
|
5553
5622
|
/** @public */
|
|
5554
5623
|
export declare type TagSet = {
|
|
@@ -5559,7 +5628,7 @@ export declare type TagSet = {
|
|
|
5559
5628
|
|
|
5560
5629
|
/** @public
|
|
5561
5630
|
* Configuration options for timeseries collections
|
|
5562
|
-
* @see https://
|
|
5631
|
+
* @see https://www.mongodb.com/docs/manual/core/timeseries-collections/
|
|
5563
5632
|
*/
|
|
5564
5633
|
export declare interface TimeSeriesCollectionOptions extends Document {
|
|
5565
5634
|
timeField: string;
|
|
@@ -5682,7 +5751,7 @@ export declare const TopologyType: Readonly<{
|
|
|
5682
5751
|
}>;
|
|
5683
5752
|
|
|
5684
5753
|
/** @public */
|
|
5685
|
-
export declare type TopologyType = typeof TopologyType[keyof typeof TopologyType];
|
|
5754
|
+
export declare type TopologyType = (typeof TopologyType)[keyof typeof TopologyType];
|
|
5686
5755
|
|
|
5687
5756
|
/** @public */
|
|
5688
5757
|
export declare interface TopologyVersion {
|
|
@@ -6101,7 +6170,7 @@ export declare type WithTransactionCallback<T = void> = (session: ClientSession)
|
|
|
6101
6170
|
* requested from MongoDB for write operations.
|
|
6102
6171
|
* @public
|
|
6103
6172
|
*
|
|
6104
|
-
* @see https://
|
|
6173
|
+
* @see https://www.mongodb.com/docs/manual/reference/write-concern/
|
|
6105
6174
|
*/
|
|
6106
6175
|
export declare class WriteConcern {
|
|
6107
6176
|
/** request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. */
|