WeivData options only for some write functions like insert. Where you can insert new data into collection.

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

enableVisitorId?: boolean

An option to use visitorId. This option will try to get the id of current user on the site. Even if it's a visitor and if that same visitor signs up to your site your _owner field data will be the same with the member id in Wix Members. Created for new data inserts doesn't have any effect on read functions or update functions

When enabled, function will make another extra call so it will be slower, defaults to false. For members you don't need this option to be true, weivData always knows the member ids.

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.