Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Context

Hierarchy

Index

Constructors

constructor

  • new Context(app: App, timestamp?: number, ip?: string | null, user_id?: string | null, session_id?: string | null, anonymous_session_id?: string | null, anon_session_is_new?: boolean | null, anonymous_user_id?: string | null): Context
  • Parameters

    • app: App
    • Default value timestamp: number = Date.now()
    • Optional ip: string | null
    • Optional user_id: string | null
    • Optional session_id: string | null
    • Optional anonymous_session_id: string | null
    • Optional anon_session_is_new: boolean | null
    • Optional anonymous_user_id: string | null

    Returns Context

Properties

anon_session_is_new

anon_session_is_new: boolean | null

anonymous_session_id

anonymous_session_id: string | null

anonymous_user_id

anonymous_user_id: string | null

app

app: App

ip

ip: string | null

is_super

is_super: boolean = false

loading_user_data

loading_user_data: boolean

original_context

original_context: Context | null

session_id

session_id: string | null

timestamp

timestamp: number

user_data

user_data: null | Promise<Item> = null

user_id

user_id: string | null

Methods

getUserData

  • getUserData(app: App): Promise<Item | null>
  • Parameters

    Returns Promise<Item | null>

toDBEntry

  • toDBEntry(): { anon_session_is_new: null | false | true; anonymous_session_id: null | string; anonymous_user_id: null | string; ip: null | string; session_id: null | string; timestamp: number; user_id: null | string }
  • Returns { anon_session_is_new: null | false | true; anonymous_session_id: null | string; anonymous_user_id: null | string; ip: null | string; session_id: null | string; timestamp: number; user_id: null | string }

    • anon_session_is_new: null | false | true
    • anonymous_session_id: null | string
    • anonymous_user_id: null | string
    • ip: null | string
    • session_id: null | string
    • timestamp: number
    • user_id: null | string

Generated using TypeDoc