WeivData options where onlyOwner is possible.

interface WeivDataOptionsOwner {
    convertIds?: boolean;
    onlyOwner?: 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.

onlyOwner?: boolean

When sert to true WeivData will add another filter and check if _owner field of the item matches with current member id. This will make it possible to take action only if current member is the owner of the data.

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.