File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export interface CommandOperationOptions
6969 * Used when the command needs to grant access to the underlying namespaces for time series collections.
7070 * Only available on server versions 8.2 and above.
7171 * @public
72+ * @sinceServerVersion 8.2
7273 **/
7374 rawData ?: boolean ;
7475}
Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ export class ListIndexesOperation extends CommandOperation<CursorResponse> {
368368 * This allows typescript to delete the key but will
369369 * not allow a writeConcern to be assigned as a property on options.
370370 */
371- override options : ListIndexesOptions & { writeConcern ?: never } ;
371+ override options : ListIndexesOptions & { writeConcern ?: never ; rawData ?: boolean } ;
372372 collectionNamespace : MongoDBNamespace ;
373373
374374 constructor ( collection : Collection , options ?: ListIndexesOptions ) {
Original file line number Diff line number Diff line change @@ -361,14 +361,14 @@ export function uuidV4(): Buffer {
361361 */
362362export function maxWireVersion ( handshakeAware ?: Connection | Topology | Server ) : number {
363363 if ( handshakeAware ) {
364- if ( handshakeAware . serverApi ?. version ) {
365- // We return the max supported wire version for serverAPI.
366- return MAX_SUPPORTED_WIRE_VERSION ;
367- }
368364 if ( handshakeAware . hello ) {
369365 return handshakeAware . hello . maxWireVersion ;
370366 }
371367
368+ if ( handshakeAware . serverApi ?. version ) {
369+ // We return the max supported wire version for serverAPI.
370+ return MAX_SUPPORTED_WIRE_VERSION ;
371+ }
372372 // This is the fallback case for load balanced mode. If we are building commands the
373373 // object being checked will be a connection, and we will have a hello response on
374374 // it. For other cases, such as retryable writes, the object will be a server or
You can’t perform that action at this time.
0 commit comments