Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Account

Abstraction of account type.

Responsible for representing the user account.

Hierarchy

  • Account

Index

Methods

changePassword

  • changePassword(oldPassword: string, newPassword: string): Promise<void>
  • Change the password of account.

    throws

    {errorInvalidCredentials} If current password is not correct.

    throws

    {errorInsufficientPasswordComplexity} If the new password does not have the complexity requirement.

    Parameters

    • oldPassword: string

      current password.

    • newPassword: string

      new password.

    Returns Promise<void>

downloadProfilePicture

  • downloadProfilePicture(destpath: string, callback?: ProgressCallback): Promise<null | string>
  • Download profile url and save in basepath.

    retuns

    Full path of the downloaded file, useful if the destpath is a directory, or null if the user has no photo.

    Parameters

    • destpath: string

      It can be either a folder or a file name, if the path is a directory then it will be saved inside the folder, if it is a file name it will be saved exactly in this place, but if the folder does not exist it will throw an error.

    • Optional callback: ProgressCallback

      To know the progress of the download, each downloaded part will be called informing how much has already been downloaded.

    Returns Promise<null | string>

getActiveBonds

  • Returns active bonds, in IFSC it is called "VĂ­nculos ativos".

    A user can have more than one bond. Eg. A user takes two programs.

    Returns Promise<BondType[]>

getEmails

  • getEmails(): Promise<string[]>

getInactiveBonds

  • getInactiveBonds(): Promise<BondType[]>
  • Returns inactive bonds, in IFSC it is called "VĂ­nculos inativos". An inactive bond is a bond that the user has completed, for example, courses completed by the user.

    Returns Promise<BondType[]>

getName

  • getName(): Promise<string>

getProfilePictureURL

  • getProfilePictureURL(): Promise<null | URL>

logoff

  • logoff(): Promise<void>

Generated using TypeDoc