Description

Entity for a user in the nodeblocks platform. Users are the primary entity in the platform, and have different roles (access levels)

Hierarchy

  • BaseMongoEntity
    • UserEntity

Implements

  • WithCustomFields
  • User

Constructors

Properties

addressLine1: string

Address line 1

addressLine2: string

Address line 2

addressLine3: string

Address line 3

avatar?: string

Avatar object id in bucket

customFields: Record<string, unknown>

Custom fields for the user

deactivatedAt?: null | Date

deactivatedAt

email?: string

The user's email (blank when not used)

emailVerified: boolean

Whether the user's email has been verified

failedAttempts: number

Number of failed login attempts

isLocked: boolean

Whether the user is locked (locked users cannot be logged in to)

name: string

The user's display name

password?: string

The user's password (when NOT using oauth login)

phoneNumber: string

The phone number for the user

postalCode: string

The postal code of the user

preferences?: {
    key: string;
    value: string;
}[]

User preferences (this is unrelated to the user preferences table; use when a separate table is not needed)

Type declaration

  • key: string
  • value: string
provider?: string

Which provider the user has an oauth login with (google, twitter etc)

providerId?: string

The id of the user in the oauth provider

reviewStats?: {
    averageRate?: number;
    averageSubRates?: Record<string, number>;
    totalCount?: number;
}

Statistics for reviews made against this user

Type declaration

  • Optional averageRate?: number
  • Optional averageSubRates?: Record<string, number>
  • Optional totalCount?: number
timeline?: UserTimelines

Timeline array object

typeId: "100" | "010" | "011" | "001" | "000"

Type (role) of the user

Generated using TypeDoc