Home Manual Reference Source
public class | source

UserRepository

Extends:

BaseRepository → UserRepository

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

async getAuthToken(username: string, password: string): Promise<object>

Obtains an access token for a user

public

async me(): Promis<object>

Gets the current user.

Inherited Summary

From class BaseRepository
public
public

http: *

public
public

map: {"single": *, "multi": *}

public
public

params: {}

public

async create(entity: BidEntity): Promise<BidEntity>

Persists a new entity

public

async delete(id: number | string): Promise<Object>

Deletes a single entity by its id

public

Retrieves a single domain object by its id.

public

async get(params: Object): Promise<BidEntity[]>

Retrieves an array of results for the endpoint

public

async save(entity: BidEntity): Promise<BidEntity>

Persists an update to the entity

Public Constructors

public constructor() source

Creates an instance of BaseRepository.

Override:

BaseRepository#constructor

Public Methods

public async getAuthToken(username: string, password: string): Promise<object> source

Obtains an access token for a user

Params:

NameTypeAttributeDescription
username string
password string

Return:

Promise<object>

Return Properties:

NameTypeAttributeDescription
token_type string
expires_in number

Unix timestamp

access_token string
refresh_token string

public async me(): Promis<object> source

Gets the current user.

Return:

Promis<object>

Return Properties:

NameTypeAttributeDescription
id number
name string
email string
timezone string
permissions string[]
roles string[]
account object