Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CatavoltApiImpl

Top-level entry point into the Catavolt API

Hierarchy

  • CatavoltApiImpl

Implements

Index

Constructors

Private constructor

  • new CatavoltApiImpl(serverUrl: string, serverVersion: string): CatavoltApiImpl
  • Construct an CatavoltApiImpl This should not be called directly, instead use the 'singleton' method

    Parameters

    • serverUrl: string
    • serverVersion: string

    Returns CatavoltApiImpl

Properties

DEFAULT_LOCALE

DEFAULT_LOCALE: CvLocale = new CvLocale('en')

Private _devicePropsDynamic

_devicePropsDynamic: object

Type declaration

  • [index: string]: function
      • (): string
      • Returns string

Private _devicePropsStatic

_devicePropsStatic: object

Type declaration

  • [index: string]: string

Private _dialogApi

_dialogApi: DialogApi

Private _locale

_locale: CvLocale = null

Private _onSessionExpiration

_onSessionExpiration: any = null

Private _session

_session: Session

Private _sessionTimer

_sessionTimer: SessionTimer = null

dataLastChangedTime

dataLastChangedTime: Date = new Date()

Static Private CHECK_SESSION_INTERVAL_MILLIS

CHECK_SESSION_INTERVAL_MILLIS: number = 30 * 1000

Static Private ONE_HOUR_IN_MILLIS

ONE_HOUR_IN_MILLIS: number = 60 * 60 * 1000

Static Private SERVER_URL

SERVER_URL: string = "https://dialog.hxgn-api.net"

Static Private SERVER_VERSION

SERVER_VERSION: string = "v0"

Static Private _singleton

_singleton: CatavoltApiImpl

Accessors

clientTimeoutMillis

  • get clientTimeoutMillis(): number
  • Get the number of millis that the client will remain active between calls to the server.

    Returns number

currencySymbol

  • get currencySymbol(): string
  • Get the currency symbol override if defined from the server.

    Returns string

deviceProps

  • get deviceProps(): object

dialogApi

isLoggedIn

  • get isLoggedIn(): boolean

locale

onSessionExpiration

  • set onSessionExpiration(onSessionExpiration: function): void
  • Function that will be notified when the session expires

    Parameters

    • onSessionExpiration: function
        • (): void
        • Returns void

    Returns void

remainingSessionTime

  • get remainingSessionTime(): number
  • Time remaining before this session is expired by the server

    Returns number

session

sessionHasExpired

  • get sessionHasExpired(): boolean

Static defaultTTLInMillis

  • get defaultTTLInMillis(): number

Static singleton

Methods

addClientListener

addDynamicDeviceProp

  • addDynamicDeviceProp(propName: string, propFn: function): void
  • Add or replace a dynamic device property (func)

    Parameters

    • propName: string
    • propFn: function
        • (): string
        • Returns string

    Returns void

addStaticDeviceProp

  • addStaticDeviceProp(propName: string, propValue: string): void

changePasswordAndLogin

  • changePasswordAndLogin(tenantId: string, clientType: ClientType, userId: string, existingPassword: string, newPassword: string): Promise<Session | Redirection>

getRedirection

  • getRedirection(redirectionId: string): Promise<Redirection>

initDialogApi

  • initDialogApi(serverUrl: string, serverVersion?: string): void
  • Initialize a dialog service implementation for use by this CatavoltApiImpl

    Parameters

    • serverUrl: string
    • Default value serverVersion: string = CatavoltApiImpl.SERVER_VERSION

    Returns void

isAnyUserInBriefcaseMode

  • isAnyUserInBriefcaseMode(tenantId: string): Promise<boolean>

isFeatureSetAvailable

  • isFeatureSetAvailable(featureSet: FeatureSet): boolean

isUserInBriefcaseMode

  • isUserInBriefcaseMode(userInfo: __type): Promise<boolean>

login

loginWithToken

logout

  • logout(): Promise<object>

openDialog

openDialogWithId

  • openDialogWithId(dialogId: string): Promise<Dialog>

openStream

performWorkbenchAction

performWorkbenchActionForId

  • performWorkbenchActionForId(workbenchId: string, workbenchActionId: string): Promise<Redirection>

Private processLogin

  • processLogin(tenantId: string, clientType: ClientType, userId: string, password: string, permissionToken?: string, proofKey?: string): Promise<Session | Redirection>

refreshSession

  • refreshSession(tenantId: string, sessionId: string): Promise<Session>

removeClientListener

streamContent

toDialogOrRedirection

Generated using TypeDoc