Top-level entry point into the Catavolt API

### Hierarchy

- CatavoltApiImpl

### Implements

- CatavoltApi

## Index

### Constructors

- constructor

### Properties

- DEFAULT_LOCALE
- _devicePropsDynamic
- _devicePropsStatic
- _dialogApi
- _locale
- _onSessionExpiration
- _session
- _sessionTimer
- dataLastChangedTime
- CHECK_SESSION_INTERVAL_MILLIS
- ONE_HOUR_IN_MILLIS
- SERVER_URL
- SERVER_VERSION
- _singleton

### Accessors

- clientTimeoutMillis
- currencySymbol
- deviceProps
- dialogApi
- isLoggedIn
- locale
- onSessionExpiration
- remainingSessionTime
- session
- sessionHasExpired
- defaultTTLInMillis
- singleton

### Methods

- addClientListener
- addDynamicDeviceProp
- addStaticDeviceProp
- changePasswordAndLogin
- getRedirection
- initDialogApi
- isAnyUserInBriefcaseMode
- isFeatureSetAvailable
- isUserInBriefcaseMode
- login
- loginWithToken
- logout
- openDialog
- openDialogWithId
- openStream
- performWorkbenchAction
- performWorkbenchActionForId
- processLogin
- refreshSession
- removeClientListener
- streamContent
- toDialogOrRedirection

## Constructors

### Private constructor

- new CatavoltApiImpl(serverUrl: string, serverVersion: string): CatavoltApiImpl

- - Defined in dialog/Catavolt.ts:76

  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')

Implementation of CatavoltApi.DEFAULT_LOCALE

- Defined in dialog/Catavolt.ts:41

### Private _devicePropsDynamic

_devicePropsDynamic: object

- Defined in dialog/Catavolt.ts:46

#### Type declaration

- ##### [index: string]: function

  - - (): string

    - #### Returns string

### Private _devicePropsStatic

_devicePropsStatic: object

- Defined in dialog/Catavolt.ts:47

#### Type declaration

- ##### [index: string]: string

### Private _dialogApi

_dialogApi: DialogApi

- Defined in dialog/Catavolt.ts:44

### Private _locale

_locale: CvLocale = null

- Defined in dialog/Catavolt.ts:48

### Private _onSessionExpiration

_onSessionExpiration: any = null

- Defined in dialog/Catavolt.ts:50

### Private _session

_session: Session

- Defined in dialog/Catavolt.ts:45

### Private _sessionTimer

_sessionTimer: SessionTimer = null

- Defined in dialog/Catavolt.ts:49

### dataLastChangedTime

dataLastChangedTime: Date = new Date()

Implementation of CatavoltApi.dataLastChangedTime

- Defined in dialog/Catavolt.ts:43

### Static Private CHECK_SESSION_INTERVAL_MILLIS

CHECK_SESSION_INTERVAL_MILLIS: number = 30 * 1000

- Defined in dialog/Catavolt.ts:36

### Static Private ONE_HOUR_IN_MILLIS

ONE_HOUR_IN_MILLIS: number = 60 * 60 * 1000

- Defined in dialog/Catavolt.ts:35

### Static Private SERVER_URL

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

- Defined in dialog/Catavolt.ts:38

### Static Private SERVER_VERSION

SERVER_VERSION: string = "v0"

- Defined in dialog/Catavolt.ts:39

### Static Private _singleton

_singleton: CatavoltApiImpl

- Defined in dialog/Catavolt.ts:33

## Accessors

### clientTimeoutMillis

- get clientTimeoutMillis(): number

- - Defined in dialog/Catavolt.ts:178

  Get the number of millis that the client will remain active between calls to the server.

  #### Returns number

### currencySymbol

- get currencySymbol(): string

- - Defined in dialog/Catavolt.ts:187

  Get the currency symbol override if defined from the server.

  #### Returns string

### deviceProps

- get deviceProps(): object

- - Defined in dialog/Catavolt.ts:196

  Get the device props

  #### Returns object

  - ##### [index: string]: string

### dialogApi

- get dialogApi(): DialogApi

- - Defined in dialog/Catavolt.ts:210

  Get the DialogApi instance

  #### Returns DialogApi

### isLoggedIn

- get isLoggedIn(): boolean

- - Defined in dialog/Catavolt.ts:246

  Checked logged in status

  #### Returns boolean

### locale

- get locale(): CvLocale
- set locale(locale: CvLocale): void

- - Defined in dialog/Catavolt.ts:136

  Get the preferred locale

  #### Returns CvLocale

- - Defined in dialog/Catavolt.ts:158

  Get the preferred locale

  #### Parameters

  - ##### locale: CvLocale

  #### Returns void

### onSessionExpiration

- set onSessionExpiration(onSessionExpiration: function): void

- - Defined in dialog/Catavolt.ts:451

  Function that will be notified when the session expires

  #### Parameters

  - ##### onSessionExpiration: function

    - - (): void

      - #### Returns void

### remainingSessionTime

- get remainingSessionTime(): number

- - Defined in dialog/Catavolt.ts:419

  Time remaining before this session is expired by the server

  #### Returns number

### session

- get session(): Session

- - Defined in dialog/Catavolt.ts:435

  Get the Session

  #### Returns Session

### sessionHasExpired

- get sessionHasExpired(): boolean

- - Defined in dialog/Catavolt.ts:443

  Return whether or not the session has expired

  #### Returns boolean

### Static defaultTTLInMillis

- get defaultTTLInMillis(): number

- - Defined in dialog/Catavolt.ts:60

  Get the default session time

  #### Returns number

### Static singleton

- get singleton(): CatavoltApiImpl

- - Defined in dialog/Catavolt.ts:68

  Get the singleton instance of the CatavoltApiImpl

  #### Returns CatavoltApiImpl

## Methods

### addClientListener

- addClientListener(clientListener: ClientListener): void

- Implementation of CatavoltApi.addClientListener

  - Defined in dialog/Catavolt.ts:128

  #### Parameters

  - ##### clientListener: ClientListener

  #### Returns void

### addDynamicDeviceProp

- addDynamicDeviceProp(propName: string, propFn: function): void

- - Defined in dialog/Catavolt.ts:110

  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

- Implementation of CatavoltApi.addStaticDeviceProp

  - Defined in dialog/Catavolt.ts:120

  Add or replace a static device property

  #### Parameters

  - ##### propName: string

  - ##### propValue: string

  #### Returns void

### changePasswordAndLogin

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

- Implementation of CatavoltApi.changePasswordAndLogin

  - Defined in dialog/Catavolt.ts:163

  #### Parameters

  - ##### tenantId: string

  - ##### clientType: ClientType

  - ##### userId: string

  - ##### existingPassword: string

  - ##### newPassword: string

  #### Returns Promise<Session | Redirection>

### getRedirection

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

- Implementation of CatavoltApi.getRedirection

  - Defined in dialog/Catavolt.ts:371

  #### Parameters

  - ##### redirectionId: string

  #### Returns Promise<Redirection>

### initDialogApi

- initDialogApi(serverUrl: string, serverVersion?: string): void

- Implementation of CatavoltApi.initDialogApi

  - Defined in dialog/Catavolt.ts:220

  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>

- Implementation of CatavoltApi.isAnyUserInBriefcaseMode

  - Defined in dialog/Catavolt.ts:255

  Check offline status

  #### Parameters

  - ##### tenantId: string

  #### Returns Promise<boolean>

### isFeatureSetAvailable

- isFeatureSetAvailable(featureSet: FeatureSet): boolean

- Implementation of CatavoltApi.isFeatureSetAvailable

  - Defined in dialog/Catavolt.ts:230

  Check for the availability of the given featureSet

  see

    FeatureSet

  #### Parameters

  - ##### featureSet: FeatureSet

  #### Returns boolean

### isUserInBriefcaseMode

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

- Implementation of CatavoltApi.isUserInBriefcaseMode

  - Defined in dialog/Catavolt.ts:265

  Check offline status

  #### Parameters

  - ##### userInfo: __type

  #### Returns Promise<boolean>

### login

- login(tenantId: string, clientType: ClientType, userId: string, password: string): Promise<Session | Redirection>

- Implementation of CatavoltApi.login

  - Defined in dialog/Catavolt.ts:279

  Log in and retrieve the Session

  #### Parameters

  - ##### tenantId: string

  - ##### clientType: ClientType

  - ##### userId: string

  - ##### password: string

  #### Returns Promise<Session | Redirection>

### loginWithToken

- loginWithToken(tenantId: string, clientType: ClientType, permissionToken: string, proofKey: string): Promise<Session | Redirection>

- Implementation of CatavoltApi.loginWithToken

  - Defined in dialog/Catavolt.ts:293

  #### Parameters

  - ##### tenantId: string

  - ##### clientType: ClientType

  - ##### permissionToken: string

  - ##### proofKey: string

  #### Returns Promise<Session | Redirection>

### logout

- logout(): Promise<object>

- Implementation of CatavoltApi.logout

  - Defined in dialog/Catavolt.ts:312

  Logout and destroy the session

  #### Returns Promise<object>

### openDialog

- openDialog(redirection: DialogRedirection): Promise<Dialog>

- Implementation of CatavoltApi.openDialog

  - Defined in dialog/Catavolt.ts:344

  #### Parameters

  - ##### redirection: DialogRedirection

  #### Returns Promise<Dialog>

### openDialogWithId

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

- Implementation of CatavoltApi.openDialogWithId

  - Defined in dialog/Catavolt.ts:333

  #### Parameters

  - ##### dialogId: string

  #### Returns Promise<Dialog>

### openStream

- openStream(url: string): Promise<StreamProducer>

- Implementation of CatavoltApi.openStream

  - Defined in dialog/Catavolt.ts:353

  Not yet implemented

  #### Parameters

  - ##### url: string

  #### Returns Promise<StreamProducer>

### performWorkbenchAction

- performWorkbenchAction(workbenchAction: WorkbenchAction): Promise<Redirection>

- Implementation of CatavoltApi.performWorkbenchAction

  - Defined in dialog/Catavolt.ts:380

  Open a WorkbenchAction

  #### Parameters

  - ##### workbenchAction: WorkbenchAction

  #### Returns Promise<Redirection>

  | Redirection>}

### performWorkbenchActionForId

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

- Implementation of CatavoltApi.performWorkbenchActionForId

  - Defined in dialog/Catavolt.ts:390

  Open a {@link WorkbenchWorkbenchAction}

  #### Parameters

  - ##### workbenchId: string

  - ##### workbenchActionId: string

  #### Returns Promise<Redirection>

  | Redirection>}

### Private processLogin

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

- - Defined in dialog/Catavolt.ts:467

  #### Parameters

  - ##### tenantId: string

  - ##### clientType: ClientType

  - ##### userId: string

  - ##### password: string

  - ##### Optional permissionToken: string

  - ##### Optional proofKey: string

  #### Returns Promise<Session | Redirection>

### refreshSession

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

- Implementation of CatavoltApi.refreshSession

  - Defined in dialog/Catavolt.ts:408

  Refresh the CatavoltApiImpl

  #### Parameters

  - ##### tenantId: string

  - ##### sessionId: string

  #### Returns Promise<Session>

### removeClientListener

- removeClientListener(clientListener: ClientListener): void

- Implementation of CatavoltApi.removeClientListener

  - Defined in dialog/Catavolt.ts:427

  #### Parameters

  - ##### clientListener: ClientListener

  #### Returns void

### streamContent

- streamContent(contentId: string, streamConsumer: StreamConsumer): Promise<LargeProperty>

- Implementation of CatavoltApi.streamContent

  - Defined in dialog/Catavolt.ts:461

  #### Parameters

  - ##### contentId: string

  - ##### streamConsumer: StreamConsumer

  #### Returns Promise<LargeProperty>

### toDialogOrRedirection

- toDialogOrRedirection(resultPr: Promise<__type>): Promise<Dialog | Redirection>

- Implementation of CatavoltApi.toDialogOrRedirection

  - Defined in dialog/Catavolt.ts:358

  #### Parameters

  - ##### resultPr: Promise<__type>

  #### Returns Promise<Dialog | Redirection>

Generated using TypeDoc