@@ -183,14 +183,6 @@ export interface ChangeStreamDocumentCommon {
183
183
*/
184
184
clusterTime ?: Timestamp ;
185
185
186
- /**
187
- * The server date and time of the database operation.
188
- * wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.
189
- * The format is "YYYY-MM-DD HH:MM.SS.millis".
190
- * @sinceServerVersion 6.0.0
191
- */
192
- wallTime ?: Date ;
193
-
194
186
/**
195
187
* The transaction number.
196
188
* Only present if the operation is part of a multi-document transaction.
@@ -213,6 +205,16 @@ export interface ChangeStreamDocumentCommon {
213
205
splitEvent ?: ChangeStreamSplitEvent ;
214
206
}
215
207
208
+ /** @public */
209
+ export interface ChangeStreamDocumentWallTime {
210
+ /**
211
+ * The server date and time of the database operation.
212
+ * wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.
213
+ * @sinceServerVersion 6.0.0
214
+ */
215
+ wallTime ?: Date ;
216
+ }
217
+
216
218
/** @public */
217
219
export interface ChangeStreamDocumentCollectionUUID {
218
220
/**
@@ -247,7 +249,8 @@ export interface ChangeStreamDocumentOperationDescription {
247
249
export interface ChangeStreamInsertDocument < TSchema extends Document = Document >
248
250
extends ChangeStreamDocumentCommon ,
249
251
ChangeStreamDocumentKey < TSchema > ,
250
- ChangeStreamDocumentCollectionUUID {
252
+ ChangeStreamDocumentCollectionUUID ,
253
+ ChangeStreamDocumentWallTime {
251
254
/** Describes the type of operation represented in this change notification */
252
255
operationType : 'insert' ;
253
256
/** This key will contain the document being inserted */
@@ -263,7 +266,8 @@ export interface ChangeStreamInsertDocument<TSchema extends Document = Document>
263
266
export interface ChangeStreamUpdateDocument < TSchema extends Document = Document >
264
267
extends ChangeStreamDocumentCommon ,
265
268
ChangeStreamDocumentKey < TSchema > ,
266
- ChangeStreamDocumentCollectionUUID {
269
+ ChangeStreamDocumentCollectionUUID ,
270
+ ChangeStreamDocumentWallTime {
267
271
/** Describes the type of operation represented in this change notification */
268
272
operationType : 'update' ;
269
273
/**
@@ -293,7 +297,8 @@ export interface ChangeStreamUpdateDocument<TSchema extends Document = Document>
293
297
*/
294
298
export interface ChangeStreamReplaceDocument < TSchema extends Document = Document >
295
299
extends ChangeStreamDocumentCommon ,
296
- ChangeStreamDocumentKey < TSchema > {
300
+ ChangeStreamDocumentKey < TSchema > ,
301
+ ChangeStreamDocumentWallTime {
297
302
/** Describes the type of operation represented in this change notification */
298
303
operationType : 'replace' ;
299
304
/** The fullDocument of a replace event represents the document after the insert of the replacement document */
@@ -317,7 +322,8 @@ export interface ChangeStreamReplaceDocument<TSchema extends Document = Document
317
322
export interface ChangeStreamDeleteDocument < TSchema extends Document = Document >
318
323
extends ChangeStreamDocumentCommon ,
319
324
ChangeStreamDocumentKey < TSchema > ,
320
- ChangeStreamDocumentCollectionUUID {
325
+ ChangeStreamDocumentCollectionUUID ,
326
+ ChangeStreamDocumentWallTime {
321
327
/** Describes the type of operation represented in this change notification */
322
328
operationType : 'delete' ;
323
329
/** Namespace the delete event occurred on */
@@ -338,7 +344,8 @@ export interface ChangeStreamDeleteDocument<TSchema extends Document = Document>
338
344
*/
339
345
export interface ChangeStreamDropDocument
340
346
extends ChangeStreamDocumentCommon ,
341
- ChangeStreamDocumentCollectionUUID {
347
+ ChangeStreamDocumentCollectionUUID ,
348
+ ChangeStreamDocumentWallTime {
342
349
/** Describes the type of operation represented in this change notification */
343
350
operationType : 'drop' ;
344
351
/** Namespace the drop event occurred on */
@@ -351,7 +358,8 @@ export interface ChangeStreamDropDocument
351
358
*/
352
359
export interface ChangeStreamRenameDocument
353
360
extends ChangeStreamDocumentCommon ,
354
- ChangeStreamDocumentCollectionUUID {
361
+ ChangeStreamDocumentCollectionUUID ,
362
+ ChangeStreamDocumentWallTime {
355
363
/** Describes the type of operation represented in this change notification */
356
364
operationType : 'rename' ;
357
365
/** The new name for the `ns.coll` collection */
@@ -364,7 +372,9 @@ export interface ChangeStreamRenameDocument
364
372
* @public
365
373
* @see https://www.mongodb.com/docs/manual/reference/change-events/#dropdatabase-event
366
374
*/
367
- export interface ChangeStreamDropDatabaseDocument extends ChangeStreamDocumentCommon {
375
+ export interface ChangeStreamDropDatabaseDocument
376
+ extends ChangeStreamDocumentCommon ,
377
+ ChangeStreamDocumentWallTime {
368
378
/** Describes the type of operation represented in this change notification */
369
379
operationType : 'dropDatabase' ;
370
380
/** The database dropped */
@@ -375,7 +385,9 @@ export interface ChangeStreamDropDatabaseDocument extends ChangeStreamDocumentCo
375
385
* @public
376
386
* @see https://www.mongodb.com/docs/manual/reference/change-events/#invalidate-event
377
387
*/
378
- export interface ChangeStreamInvalidateDocument extends ChangeStreamDocumentCommon {
388
+ export interface ChangeStreamInvalidateDocument
389
+ extends ChangeStreamDocumentCommon ,
390
+ ChangeStreamDocumentWallTime {
379
391
/** Describes the type of operation represented in this change notification */
380
392
operationType : 'invalidate' ;
381
393
}
@@ -388,7 +400,8 @@ export interface ChangeStreamInvalidateDocument extends ChangeStreamDocumentComm
388
400
export interface ChangeStreamCreateIndexDocument
389
401
extends ChangeStreamDocumentCommon ,
390
402
ChangeStreamDocumentCollectionUUID ,
391
- ChangeStreamDocumentOperationDescription {
403
+ ChangeStreamDocumentOperationDescription ,
404
+ ChangeStreamDocumentWallTime {
392
405
/** Describes the type of operation represented in this change notification */
393
406
operationType : 'createIndexes' ;
394
407
}
@@ -401,7 +414,8 @@ export interface ChangeStreamCreateIndexDocument
401
414
export interface ChangeStreamDropIndexDocument
402
415
extends ChangeStreamDocumentCommon ,
403
416
ChangeStreamDocumentCollectionUUID ,
404
- ChangeStreamDocumentOperationDescription {
417
+ ChangeStreamDocumentOperationDescription ,
418
+ ChangeStreamDocumentWallTime {
405
419
/** Describes the type of operation represented in this change notification */
406
420
operationType : 'dropIndexes' ;
407
421
}
@@ -413,7 +427,8 @@ export interface ChangeStreamDropIndexDocument
413
427
*/
414
428
export interface ChangeStreamCollModDocument
415
429
extends ChangeStreamDocumentCommon ,
416
- ChangeStreamDocumentCollectionUUID {
430
+ ChangeStreamDocumentCollectionUUID ,
431
+ ChangeStreamDocumentWallTime {
417
432
/** Describes the type of operation represented in this change notification */
418
433
operationType : 'modify' ;
419
434
}
@@ -424,7 +439,8 @@ export interface ChangeStreamCollModDocument
424
439
*/
425
440
export interface ChangeStreamCreateDocument
426
441
extends ChangeStreamDocumentCommon ,
427
- ChangeStreamDocumentCollectionUUID {
442
+ ChangeStreamDocumentCollectionUUID ,
443
+ ChangeStreamDocumentWallTime {
428
444
/** Describes the type of operation represented in this change notification */
429
445
operationType : 'create' ;
430
446
@@ -443,7 +459,8 @@ export interface ChangeStreamCreateDocument
443
459
export interface ChangeStreamShardCollectionDocument
444
460
extends ChangeStreamDocumentCommon ,
445
461
ChangeStreamDocumentCollectionUUID ,
446
- ChangeStreamDocumentOperationDescription {
462
+ ChangeStreamDocumentOperationDescription ,
463
+ ChangeStreamDocumentWallTime {
447
464
/** Describes the type of operation represented in this change notification */
448
465
operationType : 'shardCollection' ;
449
466
}
0 commit comments