@@ -11,6 +11,8 @@ import type { ServerCommandOptions } from '../sdam/server';
1111import type { ClientSession } from '../sessions' ;
1212import { type TimeoutContext } from '../timeout' ;
1313import { MongoDBNamespace } from '../utils' ;
14+ import { type WriteConcern } from '../write_concern' ;
15+ import { ModernizedCommandOperation } from './command' ;
1416import { ModernizedOperation } from './operation' ;
1517
1618/** @public */
@@ -93,22 +95,22 @@ export class RunCursorCommandOperation extends ModernizedOperation<CursorRespons
9395 }
9496}
9597
96- export class RunAdminCommandOperation < T = Document > extends ModernizedOperation < T > {
98+ export class RunAdminCommandOperation < T = Document > extends ModernizedCommandOperation < T > {
9799 override SERVER_COMMAND_RESPONSE_TYPE = MongoDBResponse ;
98100 command : Document ;
99101 override options : RunCommandOptions & {
100- noResponse ?: boolean ;
102+ writeConcern ?: WriteConcern ;
101103 bypassPinningCheck ?: boolean ;
102104 } ;
103105
104106 constructor (
105107 command : Document ,
106108 options : RunCommandOptions & {
107- noResponse ?: boolean ;
109+ writeConcern ?: WriteConcern ;
108110 bypassPinningCheck ?: boolean ;
109111 }
110112 ) {
111- super ( options ) ;
113+ super ( undefined , options ) ;
112114 this . command = command ;
113115 this . options = options ;
114116 this . ns = new MongoDBNamespace ( 'admin' , '$cmd' ) ;
@@ -118,7 +120,7 @@ export class RunAdminCommandOperation<T = Document> extends ModernizedOperation<
118120 return 'runCommand' as const ;
119121 }
120122
121- override buildCommand ( _connection : Connection , _session ?: ClientSession ) : Document {
123+ override buildCommandDocument ( _connection : Connection , _session ?: ClientSession ) : Document {
122124 return this . command ;
123125 }
124126
0 commit comments