Skip to content

Commit

Permalink
feat: add support for disambiguatedPaths in change stream updates
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Aug 17, 2022
1 parent 38b14be commit fccc0cf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/change_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,25 @@ export interface UpdateDescription<TSchema extends Document = Document> {
/** The number of elements in the truncated array. */
newSize: number;
}>;

/**
* A document containing additional information about any ambiguous update paths from the update event. The document
* maps the full ambiguous update path to an array containing the actual resolved components of the path. For example,
* given a document shaped like `{ a: { '0': 0 } }`, and an update of `{ $inc: 'a.0' }`, disambiguated paths would look like
* the following:
*
* ```
* {
* 'a.0': ['a', '0']
* }
* ```
*
* This field is only present when there are ambiguous paths are updated as a part of the update event and `showExpandedEvents`
* is enabled for the change stream.
* @since 6.1.0
* @experimental
*/
disambiguatedPaths?: Document;
}

/** @public */
Expand Down

0 comments on commit fccc0cf

Please sign in to comment.