Options
All
  • Public
  • Public/Protected
  • All
Menu
description

This class defines the exact fields that are stored in the corresponding MongoDB documents. It should be used whenever database documents are being handled or read for the account-sessions collection.

Note that this class uses the generic Transferable trait to enable a toDTO() method on the model.

since

v0.3.2

Hierarchy

Index

Constructors

Properties

accessToken?: string

The JWT access token that can be attached in the bearer authorization header of HTTP requests to indicate that a user is authenticated.

This field is optional and not indexed.

See more details in AccessTokenDTO.

access

public

readonly
var

{string}

address: string

The account's address. An address typically refers to a human-readable series of 39 characters, starting either with a T, for TESTNET addresses, or with a N, for MAINNET addresses.

This field is required, indexed and values are expected to be unique.

access

public

readonly
var

{string}

collectionName: string = "account-sessions"

This field contains the mongo collection name for entries that are stored using AccountSessionDocument or the model AccountSessionModel.

Note that this field is not part of document properties and used only internally to perform queries that refer to an individual collection name, e.g. $unionWith.

access

public

var

{string}

createdAt?: Date

The document's creation timestamp. This field does not reflect the date of creation of an account but rather the date of creation of the cached database entry.

This field is optional and indexed.

access

public

readonly
var

{Date}

lastSessionHash?: string

The transaction hash that is/was attached to the last authenticated session of this account.

This field is optional and not indexed.

access

public

readonly
var

{string}

referralCode: string

The account's referral code. This code should be used when inviting new users to the dApp. This field contains a unique random string of 8 characters.

This field is required, indexed and values are expected to be unique.

access

public

readonly
var

{string}

referredBy?: string

The account's referrer address. This address refers to the account that invited the current account to the dApp.

This field is optional and indexed.

access

public

readonly
var

{string}

refreshTokenHash?: string

The JWT refresh token that can be attached in the bearer authorization header of HTTP requests to /auth/token to indicate that a user's access token must be refreshed.

This field is optional and not indexed.

See more details in AccessTokenDTO.

access

public

readonly
var

{string}

sub: string

The JWT sub value that can be attached in the bearer authorization header of HTTP requests to serve as a unique identity of each device.

This field is not indexed.

access

public

readonly
var

{string}

updatedAt?: Date

The document's update timestamp. This field does not reflect the date of update of an account but rather the date of update of the cached database entry.

This field is optional and not indexed.

access

public

readonly
var

{Date}

Accessors

  • get toQuery(): Record<string, unknown>
  • This method implements a specialized query format to query items individually, as documents, in the collection: account-sessions.

    access

    public

    Returns Record<string, unknown>

    The individual document data that is used in a query.

Methods

Generated using TypeDoc