1+ import { type Abortable } from '..' ;
12import type { BSONSerializeOptions , Document } from '../bson' ;
23import { type Connection } from '../cmap/connection' ;
34import {
@@ -28,7 +29,8 @@ export type RunCommandOptions = {
2829 timeoutMS ?: number ;
2930 /** @internal */
3031 omitMaxTimeMS ?: boolean ;
31- } & BSONSerializeOptions ;
32+ } & BSONSerializeOptions &
33+ Abortable ;
3234
3335/** @internal */
3436export class RunCommandOperation < T = Document > extends ModernizedCommandOperation < T > {
@@ -56,7 +58,7 @@ export class RunCommandOperation<T = Document> extends ModernizedCommandOperatio
5658 }
5759
5860 override buildOptions ( timeoutContext : TimeoutContext ) : ServerCommandOptions {
59- return { session : this . session , timeoutContext } ;
61+ return { session : this . session , timeoutContext, signal : this . options . signal } ;
6062 }
6163}
6264
@@ -101,13 +103,15 @@ export class RunAdminCommandOperation<T = Document> extends ModernizedCommandOpe
101103 override options : RunCommandOptions & {
102104 writeConcern ?: WriteConcern ;
103105 bypassPinningCheck ?: boolean ;
106+ noResponse ?: boolean ;
104107 } ;
105108
106109 constructor (
107110 command : Document ,
108111 options : RunCommandOptions & {
109112 writeConcern ?: WriteConcern ;
110113 bypassPinningCheck ?: boolean ;
114+ noResponse ?: boolean ;
111115 }
112116 ) {
113117 super ( undefined , options ) ;
@@ -125,6 +129,6 @@ export class RunAdminCommandOperation<T = Document> extends ModernizedCommandOpe
125129 }
126130
127131 override buildOptions ( timeoutContext : TimeoutContext ) : ServerCommandOptions {
128- return { session : this . session , timeoutContext } ;
132+ return { session : this . session , timeoutContext, noResponse : this . options . noResponse } ;
129133 }
130134}
0 commit comments