Home Reference Source Repository
public class | source

MagiCloud

Method Summary

Public Methods
public

Try to auto signin user if authentication cookie exists

public

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

Find suitable fanSpeed for given operation point.

public

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

Get pressure drop of curve at specific flow.

public

Return logged in user data { Id: string, Fullname: string }

public

Return release info of MagiCloud Widget SDK in example Production 2.35.0

public

isLoggedIn(): *

Return information is user logged in

public

load(options: object): Promise

Load and initialize MagiCloud Javascript Library

public

login(options: object): Promise

Login current user.

public

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(): Promise source

Try to auto signin user if authentication cookie exists

Return:

Promise

Successful response will contain user data {Id: string, Fullname: string, Description: 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 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 getLoggedInUser(): * source

Return logged in user data { Id: string, Fullname: string }

Return:

*

public getReleaseInfo(): string source

Return release info of MagiCloud Widget SDK in example Production 2.35.0

Return:

string

public isLoggedIn(): * source

Return information is user logged in

Return:

*

boolean value is used logged in

public load(options: object): Promise source

Load and initialize MagiCloud Javascript Library

Params:

NameTypeAttributeDescription
options object

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

Return:

Promise

Successful response will contain product/variant data

public login(options: object): Promise source

Login current user. Will open MagiCloud login popup.

Params:

NameTypeAttributeDescription
options object

{ applicationId: string, returnUri: string }

Return:

Promise

Successful response will contain user data {Id: string, Fullname: string, Description: string}

public logout(): Promise source

Logout current logged in user

Return:

Promise

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 = { Ventilation, Heating, Cooling, SupplyAir, ExtractAir, Radiator, Pump }