An object that you pass as the options parameter that modifies how an operation is performed.

interface WeivDataOptions {
    convertIds?: boolean;
    readConcern?:
        | "local"
        | "majority"
        | "linearizable"
        | "available"
        | "snapshot";
    suppressAuth?: boolean;
    suppressHooks?: boolean;
}

Hierarchy (view full)

Properties

convertIds?: boolean

When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

readConcern?:
    | "local"
    | "majority"
    | "linearizable"
    | "available"
    | "snapshot"

An option to choose a consistency level when reading data from MongoDB Clusters.

suppressAuth?: boolean

An option to bypass permissions and perform operations in admin level.

suppressHooks?: boolean

An option to bypass all hooks (before or after hooks) that runs for the function.