Skip to content

Commit af2592e

Browse files
committed
chore: emit raw data from unsupported command options
1 parent 464fb45 commit af2592e

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

src/operations/create_collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export interface ClusteredCollectionOptions extends Document {
6565
}
6666

6767
/** @public */
68-
export interface CreateCollectionOptions extends CommandOperationOptions {
68+
export interface CreateCollectionOptions extends Omit<CommandOperationOptions, 'rawData'> {
6969
/** Create a capped collection */
7070
capped?: boolean;
7171
/** @deprecated Create an index on the _id field of the document. This option is deprecated in MongoDB 3.2+ and will be removed once no longer supported by the server. */

src/operations/drop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { executeOperation } from './execute_operation';
1111
import { Aspect, defineAspects } from './operation';
1212

1313
/** @public */
14-
export interface DropCollectionOptions extends CommandOperationOptions {
14+
export interface DropCollectionOptions extends Omit<CommandOperationOptions, 'rawData'> {
1515
/** @experimental */
1616
encryptedFields?: Document;
1717
}

src/operations/list_databases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface ListDatabasesResult {
1616
}
1717

1818
/** @public */
19-
export interface ListDatabasesOptions extends CommandOperationOptions {
19+
export interface ListDatabasesOptions extends Omit<CommandOperationOptions, 'rawData'> {
2020
/** A query predicate that determines which databases are listed */
2121
filter?: Document;
2222
/** A flag to indicate whether the command should return just the database names, or return both database names and size information */

src/operations/profiling_level.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MongoUnexpectedServerResponseError } from '../error';
66
import { CommandOperation, type CommandOperationOptions } from './command';
77

88
/** @public */
9-
export type ProfilingLevelOptions = CommandOperationOptions;
9+
export type ProfilingLevelOptions = Omit<CommandOperationOptions, 'rawData'>;
1010

1111
class ProfilingLevelResponse extends MongoDBResponse {
1212
get was() {

src/operations/remove_user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CommandOperation, type CommandOperationOptions } from './command';
66
import { Aspect, defineAspects } from './operation';
77

88
/** @public */
9-
export type RemoveUserOptions = CommandOperationOptions;
9+
export type RemoveUserOptions = Omit<CommandOperationOptions, 'rawData'>;
1010

1111
/** @internal */
1212
export class RemoveUserOperation extends CommandOperation<boolean> {

src/operations/rename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CommandOperation, type CommandOperationOptions } from './command';
88
import { Aspect, defineAspects } from './operation';
99

1010
/** @public */
11-
export interface RenameOptions extends CommandOperationOptions {
11+
export interface RenameOptions extends Omit<CommandOperationOptions, 'rawData'> {
1212
/** Drop the target name collection if it previously exists. */
1313
dropTarget?: boolean;
1414
/** Unclear */

src/operations/set_profiling_level.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const ProfilingLevel = Object.freeze({
1919
export type ProfilingLevel = (typeof ProfilingLevel)[keyof typeof ProfilingLevel];
2020

2121
/** @public */
22-
export type SetProfilingLevelOptions = CommandOperationOptions;
22+
export type SetProfilingLevelOptions = Omit<CommandOperationOptions, 'rawData'>;
2323

2424
/** @internal */
2525
export class SetProfilingLevelOperation extends CommandOperation<ProfilingLevel> {

src/operations/stats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CommandOperation, type CommandOperationOptions } from './command';
66
import { Aspect, defineAspects } from './operation';
77

88
/** @public */
9-
export interface DbStatsOptions extends CommandOperationOptions {
9+
export interface DbStatsOptions extends Omit<CommandOperationOptions, 'rawData'> {
1010
/** Divide the returned sizes by scale value. */
1111
scale?: number;
1212
}

src/operations/validate_collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ClientSession } from '../sessions';
77
import { CommandOperation, type CommandOperationOptions } from './command';
88

99
/** @public */
10-
export interface ValidateCollectionOptions extends CommandOperationOptions {
10+
export interface ValidateCollectionOptions extends Omit<CommandOperationOptions, 'rawData'> {
1111
/** Validates a collection in the background, without interrupting read or write traffic (only in MongoDB 4.4+) */
1212
background?: boolean;
1313
}

0 commit comments

Comments
 (0)