Type alias DataAPICommandEvents

DataAPICommandEvents: {
    commandFailed: ((event) => void);
    commandStarted: ((event) => void);
    commandSucceeded: ((event) => void);
}

The events emitted by the DataAPIClient. These events are emitted at various stages of the command's lifecycle. Intended for use for monitoring and logging purposes.

Note that these emit real commands, not any abstracted commands like "bulkWrite", "insertMany", or "deleteAll", which have to be translated into appropriate Data API commands.

Type declaration

  • commandFailed: ((event) => void)

    Emitted when a command has errored.

  • commandStarted: ((event) => void)

    Emitted when a command is started, before the initial HTTP request is made.

  • commandSucceeded: ((event) => void)

    Emitted when a command has succeeded.