Home Reference Source Repository
public class | source

MagiCloud

Method Summary

Public Methods
public

autoSignIn(): *

Verifies is current user authentication valid if authentication cookie exists.

public

findOptimalSpeed(productId: string, systemTypeId: string, qv: number, dpTot: number): *

Find suitable fanSpeed for given operation point.

public

Return dimension image query url

public

getDpTot(productId: string, systemTypeId: string, qv: number, fanSpeed: number): *

Get pressure drop of curve at specific flow.

public

getImageQueryUrl(options: object): *

Return image query url

public

Return logged in user data.

public

Return release info of MagiCloud Widget SDK in example Production 2.35.0

public

getUser(): *

Returns promise to load the User object for the currently authenticated user profile.

public

isLoggedIn(): *

Return information is user logged in.

public

load(options: object): Promise<ProductData>

Load and initialize MagiCloud Javascript Library

public

login(options: object): Promise<User>

Login current user.

public

logout(): Promise<void>

Logout current logged in user

public

renderMagiCloudLogo(containerId: string, transparent: boolean)

Render MagiCloud logo to container with specified identified

public

setDiagram(data: object, options: object)

Set specified diagram and bind click event to given elementId.

Public Methods

public autoSignIn(): * source

Verifies is current user authentication valid if authentication cookie exists.

Return:

*

User.profile in form { email: string, firstname: string, id: string, lastname: string, username: string, Fullname: string }

public findOptimalSpeed(productId: string, systemTypeId: string, qv: number, dpTot: number): * source

Find suitable fanSpeed for given operation point.

Params:

NameTypeAttributeDescription
productId string

Product identifier (GUID)

systemTypeId string

Value = {Unknown, AnyFluid, SupplyFluid, ReturnFluid, ColdWater, HotWater, FireHydrant, HotSupplyFluid, Sprinkler, Sewer, AnyAir, SupplyAir, ExtractAir, OutdoorSupply, OutdoorExhau}

qv number

Specified flow

dpTot number

Pressure drop value

Return:

*

Example {PressureDrop: 107.4791, Succeed: true, Value: 6}

public getDimensionImageQueryUrl(options: object): * source

Return dimension image query url

Params:

NameTypeAttributeDescription
options object

{ QModelId: Optional QModelId of model, QModelParameters: Optional QModelParameters of model, ViewMode: one value of { 0=Rendered, 1=DimensionLabels, 2=DimensionValues }, ViewPosition: one value of { 0=Default, 1=Front, 2=Right, 3=Left, 4=Top, 5=Bottom, 6=IsometricLeft, 7=IsometricRight } }

Return:

*

Dimension image url

public getDpTot(productId: string, systemTypeId: string, qv: number, fanSpeed: number): * source

Get pressure drop of curve at specific flow.

Params:

NameTypeAttributeDescription
productId string

Product identifier (GUID)

systemTypeId string

Value = {Unknown, AnyFluid, SupplyFluid, ReturnFluid, ColdWater, HotWater, FireHydrant, HotSupplyFluid, Sprinkler, Sewer, AnyAir, SupplyAir, ExtractAir, OutdoorSupply, OutdoorExhau}

qv number

Specified flow

fanSpeed number

Specified Fan Speed

Return:

*

Example {Succeed: true, Value: 27.870676}

public getImageQueryUrl(options: object): * source

Return image query url

Params:

NameTypeAttributeDescription
options object

{ QModelId: Optional QModelId of model, QModelParameters: Optional QModelParameters of model, ViewPosition: one value of { 0=Default, 1=Front, 2=Right, 3=Left, 4=Top, 5=Bottom, 6=IsometricLeft, 7=IsometricRight } }

Return:

*

Image url

public getLoggedInUser(): * source

Return logged in user data.

Return:

*

User.profile in form { email: string, firstname: string, id: string, lastname: string, username: string, Fullname: string }

public getReleaseInfo(): string source

Return release info of MagiCloud Widget SDK in example Production 2.35.0

Return:

string

public getUser(): * source

Returns promise to load the User object for the currently authenticated user profile.

Return:

*

Promise<User.profile>

public isLoggedIn(): * source

Return information is user logged in.

Return:

*

boolean value is used logged in

public load(options: object): Promise<ProductData> source

Load and initialize MagiCloud Javascript Library

Params:

NameTypeAttributeDescription
options object

{ productId: string, articleNumber: string, manufacturerId: string }

Return:

Promise<ProductData>

Successful response will contain product/variant data

public login(options: object): Promise<User> source

Login current user. Will open MagiCloud login popup.

Params:

NameTypeAttributeDescription
options object

{ client_id: string, popup_redirect_uri: string }

Return:

Promise<User>

public logout(): Promise<void> source

Logout current logged in user

Return:

Promise<void>

Render MagiCloud logo to container with specified identified

Params:

NameTypeAttributeDescription
containerId string

Container identifier

transparent boolean

Boolean value should transparent image be used

public setDiagram(data: object, options: object) source

Set specified diagram and bind click event to given elementId. Click event will add possible data to given dataElementId

Params:

NameTypeAttributeDescription
data object

Product data

options object

example { type: diagramType, elementId: 'el', dataElementId: 'dataEl' } where diagramType is one of { Ventilation, Heating, Cooling, SupplyAir, ExtractAir, Radiator, Pump }