Appearance
Platform
Returns generic information required for development and using specific API's
Initiate App
Allows the application to be included into the platform and does not allow the app to be loaded outside the platform.
ts
invsy.platform.init()invsy.platform.init()Initiate Session
Initiates the client session timer based on the client user settings
ts
invsy.platfrom.initSession()invsy.platfrom.initSession()Initiate Pre Login Session
Initiates a custom pre login session where you can set the session time and logout function
js
function logoutFunction(){
alert('logout function ran')
}
invsy.platform.initPreLoginSession(120,logoutFunction)function logoutFunction(){
alert('logout function ran')
}
invsy.platform.initPreLoginSession(120,logoutFunction)Generate Platform Token
Generates a token that can be used to validate external API sessions to ensure the application is being access from the platform.
js
invsy.platform.getPlatformToken().then(res => {
return res.result
})invsy.platform.getPlatformToken().then(res => {
return res.result
})Is Web or Mobile Platform
Indicates if the sdk is running in the web or app. The response will either come back with "web" or "mobile"
js
invsy.platform.isWebOrMobile().then(res => {
return res.result
})invsy.platform.isWebOrMobile().then(res => {
return res.result
})Previous page url
gets the previous page url of the current page that is being presented
js
invsy.platform.previousPageUrl().then(res => {
return res.result
})invsy.platform.previousPageUrl().then(res => {
return res.result
})Navigate top app
Display the top app container and load a feature in it.
js
invsy.platform.interactions.update({headerApp:{src:'https://example.com',show:true,height:'100'}})invsy.platform.interactions.update({headerApp:{src:'https://example.com',show:true,height:'100'}})Navigate left app
Display the left app container and load a feature in it.
js
invsy.platform.interactions.update({leftApp:{src:'https://example.com',show:showLeft,width:'300'}})invsy.platform.interactions.update({leftApp:{src:'https://example.com',show:showLeft,width:'300'}})Navigate Modal app
Display the Modal container and load a feature in it.
js
invsy.platform.interactions.update({modalApp:{src:'https://example.com',show:true}})invsy.platform.interactions.update({modalApp:{src:'https://example.com',show:true}})Pre Fetch Data
Gets the user settings, available settings, user features and menu information and stores it in state
js
invsy.platfrom.preFetchData(AuthResponse)invsy.platfrom.preFetchData(AuthResponse)Reset platform Data
Clears the platform state and gets everything from the API
js
invsy.platfrom.reset()invsy.platfrom.reset()Set browser title
sets the browser title in the browser tab
js
invsy.platfrom.setBrowserTile(title)invsy.platfrom.setBrowserTile(title)Navigate to URL
Allow features to route to others inside and outside the platform
ts
invsy.platfrom.navigateUrl(url: string | IMenuItem,target?:string)invsy.platfrom.navigateUrl(url: string | IMenuItem,target?:string)Print Document
Print a document and open in or outside the platform
js
invsy.platfrom.printDocument(data:{ body: Blob | MediaSource | string; filename: string})invsy.platfrom.printDocument(data:{ body: Blob | MediaSource | string; filename: string})Update Url
Update the URL that is displaying in the browser
js
invsy.platform.updateUrl('lekke/lekke')invsy.platform.updateUrl('lekke/lekke')logged in successfully(authRes: any)
Tells the platform that a session has been established with the api and can move into a logged in state
js
invsy.platfrom.loggedInSuccessfully(authRes)invsy.platfrom.loggedInSuccessfully(authRes)Update context
Updates the platform state by comparing each value and replacing old values with the new data provided
ts
invsy.platfrom.updateContext(state: IUserAppStateEntity)
export interface IUserAppStateEntity {
AuthResponse?:{
authRes:IAuthResponse | undefined
},
Menu?:{
menuConfig:IMenuConfig | undefined
},
userFeatures?:{
features: IFeatures | undefined
},
userSettings?:{
settings: IUserSetting[] | undefined
},
availableUserSettings?:{
availableSettings: IUserSetting[] | undefined
},
Portfolio?:{
data: IPortfolioEntity | undefined
},
ZaProfiles?:{
data: IZaProfileEntity[] | undefined
},
selectedProfile?:{
profile: IZaProfileEntity | undefined
},
PlatformInteractions?:{
data: IPlatformInteractionsInterface
}
}invsy.platfrom.updateContext(state: IUserAppStateEntity)
export interface IUserAppStateEntity {
AuthResponse?:{
authRes:IAuthResponse | undefined
},
Menu?:{
menuConfig:IMenuConfig | undefined
},
userFeatures?:{
features: IFeatures | undefined
},
userSettings?:{
settings: IUserSetting[] | undefined
},
availableUserSettings?:{
availableSettings: IUserSetting[] | undefined
},
Portfolio?:{
data: IPortfolioEntity | undefined
},
ZaProfiles?:{
data: IZaProfileEntity[] | undefined
},
selectedProfile?:{
profile: IZaProfileEntity | undefined
},
PlatformInteractions?:{
data: IPlatformInteractionsInterface
}
}Determine journey after login
Determine the journey after login or go to default home
js
invsy.platfrom.determineJourneyAfterLogin()invsy.platfrom.determineJourneyAfterLogin()Update menu region
Update menu region in platform state that tells the platform which type of page to load if the client is geo-liked (multi regions)
js
invsy.platfrom.determineJourneyAfterLogin()invsy.platfrom.determineJourneyAfterLogin()Update platform interactions
Update platform interactions (header,leftNav)
ts
invsy.platfrom.interactions.update(interactions: IPlatformInteractionsInterface)
IPlatformInteractionsInterface {
header?: {
showHeader?:boolean,
showNotifications?: boolean
showMegaMenu?: boolean,
showProfileSelector?:boolean
},
leftNav?:{
showLeftNav?: boolean,
isOpen?: boolean
}
}invsy.platfrom.interactions.update(interactions: IPlatformInteractionsInterface)
IPlatformInteractionsInterface {
header?: {
showHeader?:boolean,
showNotifications?: boolean
showMegaMenu?: boolean,
showProfileSelector?:boolean
},
leftNav?:{
showLeftNav?: boolean,
isOpen?: boolean
}
}Logout
Logout from platform and kills the api session
js
invsy.platfrom.logout()invsy.platfrom.logout()