Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Classes

Object literals

Object literals

Const authSrv

authSrv: object

checkUserCookie

  • checkUserCookie<T>(this: Client, cookie: string, signature: string, options?: RequestOptions): Promise<T>
  • Checks user' session cookie.

    Type parameters

    • T

    Parameters

    • this: Client
    • cookie: string

      seesion cookie to check.

    • signature: string

      cookie' signature to check.

    • Optional options: RequestOptions

      request options.

    Returns Promise<T>

    a result with user info or a error that cookie is invalid.

checkUserToken

  • Checks user' access token.

    Type parameters

    • T

    Parameters

    • this: Client
    • accessToken: string

      access token to check.

    • Optional options: RequestOptions

      request options.

    Returns Promise<T>

    a result with user info or a error that access token is invalid.

getUserByEmail

  • getUserByEmail<T>(this: Client, email: string): Promise<T>
  • Get a user by it's email.

    Type parameters

    • T

    Parameters

    • this: Client
    • email: string

      user's email.

    Returns Promise<T>

    a user info.

getUserById

  • getUserById<T>(this: Client, _userId: string): Promise<T>
  • Get a user by it's id.

    Type parameters

    • T

    Parameters

    • this: Client
    • _userId: string

      user's id.

    Returns Promise<T>

    a user info.

getUsersbyIds

  • getUsersbyIds<T>(this: Client, ids: string[], queries?: object): Promise<T>
  • Get many users by their id.

    Type parameters

    • T

    Parameters

    • this: Client
    • ids: string[]

      a array of users's id.

    • Default value queries: object = { fields: '_id,name,avatarUrl' }

      a query of fieldmask.

    Returns Promise<T>

    a array of users info.

Generated using TypeDoc