@@ -319,6 +319,15 @@ class AggregateOptions {
319319 * @see https://www.mongodb.com/docs/manual/reference/command/aggregate/
320320 */
321321 let: Optional<Document>;
322+
323+ /**
324+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
325+ *
326+ * @note This option will not be sent when connected to pre-9.0 servers.
327+ *
328+ * @since MongoDB 8.2
329+ */
330+ rawData: Optional<Boolean>;
322331}
323332
324333class CountOptions {
@@ -371,6 +380,15 @@ class CountOptions {
371380 * and providing one will result in a server-side error.
372381 */
373382 comment: Optional<any>;
383+
384+ /**
385+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
386+ *
387+ * @note This option will not be sent when connected to pre-9.0 servers.
388+ *
389+ * @since MongoDB 8.2
390+ */
391+ rawData: Optional<Boolean>;
374392}
375393
376394class EstimatedDocumentCountOptions {
@@ -395,6 +413,15 @@ class EstimatedDocumentCountOptions {
395413 * comment may result in a server-side error.
396414 */
397415 comment: Optional<any>;
416+
417+ /**
418+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
419+ *
420+ * @note This option will not be sent when connected to pre-9.0 servers.
421+ *
422+ * @since MongoDB 8.2
423+ */
424+ rawData: Optional<Boolean>;
398425}
399426
400427class DistinctOptions {
@@ -439,6 +466,15 @@ class DistinctOptions {
439466 * @see https://www.mongodb.com/docs/manual/reference/command/find/
440467 */
441468 hint: Optional<(String | Document)>;
469+
470+ /**
471+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
472+ *
473+ * @note This option will not be sent when connected to pre-9.0 servers.
474+ *
475+ * @since MongoDB 8.2
476+ */
477+ rawData: Optional<Boolean>;
442478}
443479
444480enum CursorType {
@@ -713,6 +749,15 @@ class FindOptions {
713749 * @see https://www.mongodb.com/docs/manual/reference/command/find/
714750 */
715751 let: Optional<Document>;
752+
753+ /**
754+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
755+ *
756+ * @note This option will not be sent when connected to pre-9.0 servers.
757+ *
758+ * @since MongoDB 8.2
759+ */
760+ rawData: Optional<Boolean>;
716761}
717762
718763type FindOneOptions = Omit<FindOptions, 'batchSize' | 'cursorType' | 'limit' | 'noCursorTimeout'>;
@@ -985,6 +1030,15 @@ class BulkWriteOptions {
9851030 * The value of let will be passed to all update and delete, but not insert, commands.
9861031 */
9871032 let: Optional <Document >;
1033+
1034+ /**
1035+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1036+ *
1037+ * @note This option will not be sent when connected to pre-9.0 servers.
1038+ *
1039+ * @since MongoDB 8.2
1040+ */
1041+ rawData: Optional <Boolean >;
9881042}
9891043
9901044class InsertOneOptions {
@@ -1007,6 +1061,15 @@ class InsertOneOptions {
10071061 * and providing one will result in a server-side error.
10081062 */
10091063 comment: Optional <any >;
1064+
1065+ /**
1066+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1067+ *
1068+ * @note This option will not be sent when connected to pre-9.0 servers.
1069+ *
1070+ * @since MongoDB 8.2
1071+ */
1072+ rawData: Optional <Boolean >;
10101073}
10111074
10121075class InsertManyOptions {
@@ -1036,6 +1099,15 @@ class InsertManyOptions {
10361099 * and providing one will result in a server-side error.
10371100 */
10381101 comment: Optional <any >;
1102+
1103+ /**
1104+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1105+ *
1106+ * @note This option will not be sent when connected to pre-9.0 servers.
1107+ *
1108+ * @since MongoDB 8.2
1109+ */
1110+ rawData: Optional <Boolean >;
10391111}
10401112
10411113class UpdateOptions {
@@ -1127,6 +1199,15 @@ class UpdateOptions {
11271199 * @see https://www.mongodb.com/docs/manual/reference/command/update/
11281200 */
11291201 sort: Optional <Document >;
1202+
1203+ /**
1204+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1205+ *
1206+ * @note This option will not be sent when connected to pre-9.0 servers.
1207+ *
1208+ * @since MongoDB 8.2
1209+ */
1210+ rawData: Optional <Boolean >;
11301211}
11311212
11321213class ReplaceOptions {
@@ -1206,6 +1287,15 @@ class ReplaceOptions {
12061287 * @see https://www.mongodb.com/docs/manual/reference/command/update/
12071288 */
12081289 sort: Optional <Document >;
1290+
1291+ /**
1292+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1293+ *
1294+ * @note This option will not be sent when connected to pre-9.0 servers.
1295+ *
1296+ * @since MongoDB 8.2
1297+ */
1298+ rawData: Optional <Boolean >;
12091299}
12101300
12111301class DeleteOptions {
@@ -1256,6 +1346,15 @@ class DeleteOptions {
12561346 * and providing one will result in a server-side error.
12571347 */
12581348 comment: Optional <any >;
1349+
1350+ /**
1351+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
1352+ *
1353+ * @note This option will not be sent when connected to pre-9.0 servers.
1354+ *
1355+ * @since MongoDB 8.2
1356+ */
1357+ rawData: Optional <Boolean >;
12591358}
12601359` ` `
12611360
@@ -2009,6 +2108,15 @@ class FindOneAndDeleteOptions {
20092108 * and providing one will result in a server-side error.
20102109 */
20112110 comment: Optional <any >;
2111+
2112+ /**
2113+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
2114+ *
2115+ * @note This option will not be sent when connected to pre-9.0 servers.
2116+ *
2117+ * @since MongoDB 8.2
2118+ */
2119+ rawData: Optional <Boolean >;
20122120}
20132121
20142122class FindOneAndReplaceOptions {
@@ -2117,6 +2225,15 @@ class FindOneAndReplaceOptions {
21172225 * and providing one will result in a server-side error.
21182226 */
21192227 comment: Optional <any >;
2228+
2229+ /**
2230+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
2231+ *
2232+ * @note This option will not be sent when connected to pre-9.0 servers.
2233+ *
2234+ * @since MongoDB 8.2
2235+ */
2236+ rawData: Optional <Boolean >;
21202237}
21212238
21222239class FindOneAndUpdateOptions {
@@ -2234,6 +2351,15 @@ class FindOneAndUpdateOptions {
22342351 * and providing one will result in a server-side error.
22352352 */
22362353 comment: Optional <any >;
2354+
2355+ /**
2356+ * This option allows operations to function on the bucket-level data while accessing the primary namespace (not system.buckets).
2357+ *
2358+ * @note This option will not be sent when connected to pre-9.0 servers.
2359+ *
2360+ * @since MongoDB 8.2
2361+ */
2362+ rawData: Optional <Boolean >;
22372363}
22382364` ` `
22392365
@@ -2512,6 +2638,8 @@ aforementioned allowance in the SemVer spec.
25122638
25132639## Changelog
25142640
2641+ - 2025-06-27: Added ` rawData ` options.
2642+
25152643- 2024-11-13: Define ` findOne ` operation as optional, and add guidance on ` limit ` and ` batchSize ` for ` find ` operations.
25162644
25172645- 2024-11-04: Always send a value for ` bypassDocumentValidation ` if it was specified.
0 commit comments