@thing-it/client-api / Exports
@thing-it/client-api / Exports
@thing-it/client-api / Exports
Classes
@thing-it/client-api / Exports / ThingIt
Class: ThingIt
Export
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ThingIt(options
)
Creates an instance of ThingIt.
Memberof
ThingIt
Parameters
Defined in
client-api.ts:45
Properties
clientOptions
• Private
clientOptions: ClientOptions
Defined in
client-api.ts:35
isExternalToken
• Private
isExternalToken: boolean
= false
Defined in
client-api.ts:37
tokenInfo
• Private
tokenInfo: undefined
| TokenInfo
Defined in
client-api.ts:36
Methods
executeMeshQuery
▸ executeMeshQuery(meshId
, query
, options?
): Promise
<any
>
Execute a query on the input mesh
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:269
get
▸ get(url
, options
): Promise
<any
>
Generic method to execute a GET request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:208
getAccessToken
▸ Private
getAccessToken(): undefined
| string
Memberof
ThingIt
Returns
undefined
| string
Defined in
client-api.ts:386
getCurrentDeskOccupancy
▸ getCurrentDeskOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current desk occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:178
getCurrentSpaceOccupancy
▸ getCurrentSpaceOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current space occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:147
getFullUrl
▸ Private
getFullUrl(url
): string
Memberof
ThingIt
Parameters
Returns
string
Defined in
client-api.ts:398
▸ Private
getHeaders(options
): Headers
Memberof
ThingIt
Parameters
Returns
Headers
Defined in
client-api.ts:412
getUpdatedToken
▸ getUpdatedToken(): Promise
<undefined
| TokenInfo
>
Get the updated access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:327
initPostMessageListener
▸ Private
initPostMessageListener(): void
Memberof
ThingIt
Returns
void
Defined in
client-api.ts:433
listBuildings
▸ listBuildings(meshId
, options?
): Promise
<any
>
List the buildings in the input mesh
Example
const meshId = 'ab12314';
const customer = '123123123';
thingIt = new ThingIt();
thingIt.listBuildings(meshId, {meshId, customer})
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:67
listFloors
▸ listFloors(meshId
, buildingId
, options?
): Promise
<any
>
List the floors in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:86
post
▸ post(url
, body
, options
): Promise
<any
>
Generic method to execute a POST request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:237
retrieveCurrentlyActiveBookings
▸ retrieveCurrentlyActiveBookings(meshId
, buildingId
, options?
): Promise
<any
>
Retrieve currently active bookings in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:109
retrieveToken
▸ retrieveToken(): Promise
<undefined
| TokenInfo
>
Retrieve the access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:285
setToken
▸ setToken(tokenInfo
): void
Set the token
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:370
Interfaces
@thing-it/client-api / Exports / AuthenticationInfo
Interface: AuthenticationInfo
Table of contents
Properties
Properties
apiKey
• Optional
apiKey: string
Defined in
client-api.ts:6
clientId
• clientId: string
Defined in
client-api.ts:2
clientSecret
• clientSecret: string
Defined in
client-api.ts:3
password
• password: string
Defined in
client-api.ts:5
username
• username: string
Defined in
client-api.ts:4
@thing-it/client-api / Exports / ClientOptions
Interface: ClientOptions
Table of contents
Properties
Properties
authInfo
• Optional
authInfo: AuthenticationInfo
Defined in
client-api.ts:10
customer
• Optional
customer: string
Defined in
client-api.ts:12
host
• host: string
Defined in
client-api.ts:11
mesh
• Optional
mesh: string
Defined in
client-api.ts:13
@thing-it/client-api / Exports / RequestOptions
Interface: RequestOptions
Table of contents
Properties
Properties
customer
• customer: string
Defined in
client-api.ts:24
mesh
• mesh: string
Defined in
client-api.ts:25
@thing-it/client-api / Exports / TokenInfo
Interface: TokenInfo
Table of contents
Properties
Properties
access_token
• access_token: string
Defined in
client-api.ts:17
expires_in
• expires_in: number
Defined in
client-api.ts:19
refresh_token
• refresh_token: string
Defined in
client-api.ts:20
token_type
• token_type: string
Defined in
client-api.ts:18
@thing-it/client-api / Exports
@thing-it/client-api
Table of contents
Classes
Interfaces
Classes
@thing-it/client-api / Exports / ThingIt
Class: ThingIt
Export
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ThingIt(options
)
Creates an instance of ThingIt.
Memberof
ThingIt
Parameters
Defined in
client-api.ts:45
Properties
clientOptions
• Private
clientOptions: ClientOptions
Defined in
client-api.ts:35
isExternalToken
• Private
isExternalToken: boolean
= false
Defined in
client-api.ts:37
tokenInfo
• Private
tokenInfo: undefined
| TokenInfo
Defined in
client-api.ts:36
Methods
executeMeshQuery
▸ executeMeshQuery(meshId
, query
, options?
): Promise
<any
>
Execute a query on the input mesh
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:269
get
▸ get(url
, options
): Promise
<any
>
Generic method to execute a GET request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:208
getAccessToken
▸ Private
getAccessToken(): undefined
| string
Memberof
ThingIt
Returns
undefined
| string
Defined in
client-api.ts:428
getCurrentDeskOccupancy
▸ getCurrentDeskOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current desk occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:178
getCurrentSpaceOccupancy
▸ getCurrentSpaceOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current space occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:147
getFullUrl
▸ Private
getFullUrl(url
): string
Memberof
ThingIt
Parameters
Returns
string
Defined in
client-api.ts:440
▸ Private
getHeaders(options
): Headers
Memberof
ThingIt
Parameters
Returns
Headers
Defined in
client-api.ts:454
getUpdatedToken
▸ getUpdatedToken(): Promise
<undefined
| TokenInfo
>
Get the updated access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:327
initPostMessageListener
▸ Private
initPostMessageListener(): void
Memberof
ThingIt
Returns
void
Defined in
client-api.ts:475
isApiReady
▸ isApiReady(): Promise
<boolean
>
Check if the API is ready for use
Memberof
ThingIt
Returns
Promise
<boolean
>
Defined in
client-api.ts:400
listBuildings
▸ listBuildings(meshId
, options?
): Promise
<any
>
List the buildings in the input mesh
Example
const meshId = 'ab12314';
const customer = '123123123';
thingIt = new ThingIt();
thingIt.listBuildings(meshId, {meshId, customer})
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:67
listFloors
▸ listFloors(meshId
, buildingId
, options?
): Promise
<any
>
List the floors in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:86
post
▸ post(url
, body
, options
): Promise
<any
>
Generic method to execute a POST request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:237
postMessage
▸ Private
postMessage(message
): void
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:501
retrieveCurrentlyActiveBookings
▸ retrieveCurrentlyActiveBookings(meshId
, buildingId
, options?
): Promise
<any
>
Retrieve currently active bookings in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:109
retrieveToken
▸ retrieveToken(): Promise
<undefined
| TokenInfo
>
Retrieve the access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:285
route
▸ route(routeId
, params
): void
Navigates to the specified kiosk route
Memberof
ThingIt
Parameters
Name | Type |
---|
routeId | string |
params | Object |
Returns
void
Defined in
client-api.ts:371
setToken
▸ setToken(tokenInfo
): void
Set the token
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:385
Interfaces
@thing-it/client-api / Exports / AuthenticationInfo
Interface: AuthenticationInfo
Table of contents
Properties
Properties
apiKey
• Optional
apiKey: string
Defined in
client-api.ts:6
clientId
• clientId: string
Defined in
client-api.ts:2
clientSecret
• clientSecret: string
Defined in
client-api.ts:3
password
• password: string
Defined in
client-api.ts:5
username
• username: string
Defined in
client-api.ts:4
@thing-it/client-api / Exports / ClientOptions
Interface: ClientOptions
Table of contents
Properties
Properties
authInfo
• Optional
authInfo: AuthenticationInfo
Defined in
client-api.ts:10
customer
• Optional
customer: string
Defined in
client-api.ts:12
host
• host: string
Defined in
client-api.ts:11
mesh
• Optional
mesh: string
Defined in
client-api.ts:13
@thing-it/client-api / Exports / RequestOptions
Interface: RequestOptions
Table of contents
Properties
Properties
customer
• customer: string
Defined in
client-api.ts:24
mesh
• mesh: string
Defined in
client-api.ts:25
@thing-it/client-api / Exports / TokenInfo
Interface: TokenInfo
Table of contents
Properties
Properties
access_token
• access_token: string
Defined in
client-api.ts:17
expires_in
• expires_in: number
Defined in
client-api.ts:19
refresh_token
• refresh_token: string
Defined in
client-api.ts:20
token_type
• token_type: string
Defined in
client-api.ts:18
@thing-it/client-api / Exports
@thing-it/client-api
Table of contents
Classes
Interfaces
Classes
@thing-it/client-api / Exports / ThingIt
Class: ThingIt
Export
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ThingIt(options
)
Creates an instance of ThingIt.
Memberof
ThingIt
Parameters
Defined in
client-api.ts:51
Properties
clientOptions
• Private
clientOptions: ClientOptions
Defined in
client-api.ts:36
isExternalToken
• Private
isExternalToken: boolean
= false
Defined in
client-api.ts:41
tokenInfo
• Private
tokenInfo: undefined
| TokenInfo
Defined in
client-api.ts:40
usageEventAPI
• Private
usageEventAPI: UsageEventAPI
Defined in
client-api.ts:43
Methods
broadcastScreenshot
▸ broadcastScreenshot(dataUrl
): void
Broadcasts screenshot event to parent context
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:460
broadcastUserInteraction
▸ broadcastUserInteraction(): void
Broadcasts a user interaction event to any parent context
Memberof
ThingIt
Returns
void
Defined in
client-api.ts:446
executeMeshQuery
▸ executeMeshQuery(meshId
, query
, options?
): Promise
<any
>
Execute a query on the input mesh
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:285
get
▸ get(url
, options
): Promise
<any
>
Generic method to execute a GET request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Implementation of
ServerAPI.get
Defined in
client-api.ts:224
getAccessToken
▸ Private
getAccessToken(): undefined
| string
Memberof
ThingIt
Returns
undefined
| string
Defined in
client-api.ts:479
getCurrentDeskOccupancy
▸ getCurrentDeskOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current desk occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:193
getCurrentSpaceOccupancy
▸ getCurrentSpaceOccupancy(meshId
, buildingId
, options?
): Promise
<any
>
Get current space occupancy in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:161
getFullUrl
▸ Private
getFullUrl(url
, base
): string
Memberof
ThingIt
Parameters
Name | Type |
---|
url | string |
base | string |
Returns
string
Defined in
client-api.ts:491
▸ Private
getHeaders(options
): Headers
Memberof
ThingIt
Parameters
Returns
Headers
Defined in
client-api.ts:505
getUpdatedToken
▸ getUpdatedToken(): Promise
<undefined
| TokenInfo
>
Get the updated access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:343
initPostMessageListener
▸ Private
initPostMessageListener(): void
Memberof
ThingIt
Returns
void
Defined in
client-api.ts:526
isApiReady
▸ isApiReady(): Promise
<boolean
>
Check if the API is ready for use
Memberof
ThingIt
Returns
Promise
<boolean
>
Defined in
client-api.ts:416
listBuildings
▸ listBuildings(meshId
, options?
): Promise
<any
>
List the buildings in the input mesh
Example
const meshId = 'ab12314';
const customer = '123123123';
thingIt = new ThingIt();
thingIt.listBuildings(meshId, {meshId, customer})
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:78
listFloors
▸ listFloors(meshId
, buildingId
, options?
): Promise
<any
>
List the floors in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:97
post
▸ post(url
, body
, options
): Promise
<any
>
Generic method to execute a POST request
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Implementation of
ServerAPI.post
Defined in
client-api.ts:253
postMessage
▸ Private
postMessage(message
): void
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:552
retrieveCurrentlyActiveBookings
▸ retrieveCurrentlyActiveBookings(meshId
, buildingId
, options?
): Promise
<any
>
Retrieve currently active bookings in the input mesh and building
Memberof
ThingIt
Parameters
Returns
Promise
<any
>
Defined in
client-api.ts:123
retrieveToken
▸ retrieveToken(): Promise
<undefined
| TokenInfo
>
Retrieve the access token
Memberof
ThingIt
Returns
Promise
<undefined
| TokenInfo
>
Defined in
client-api.ts:301
route
▸ route(routeId
, params
): void
Navigates to the specified kiosk route
Memberof
ThingIt
Parameters
Name | Type |
---|
routeId | string |
params | Object |
Returns
void
Defined in
client-api.ts:387
setToken
▸ setToken(tokenInfo
): void
Set the token
Memberof
ThingIt
Parameters
Returns
void
Defined in
client-api.ts:401
startUsageEvent
▸ startUsageEvent(path
, timeout?
): UsageEvent
Parameters
Name | Type | Default value |
---|
path | string | undefined |
timeout | number | 10000 |
Returns
UsageEvent
Defined in
client-api.ts:437
@thing-it/client-api / Exports / UsageEvent
Class: UsageEvent
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new UsageEvent(usageEventAPI
, ts
, eventId
, parentId
, customer
, mesh
, user
, device
, deviceModel
, deviceOperatingSystem
, sessionId
, view
, softwareVersion
, agent
, path
)
Parameters
Name | Type |
---|
usageEventAPI | UsageEventAPI |
ts | string |
eventId | string |
parentId | undefined | string |
customer | undefined | string |
mesh | undefined | string |
user | undefined | string |
device | undefined | string |
deviceModel | undefined | string |
deviceOperatingSystem | undefined | string |
sessionId | undefined | string |
view | undefined | string |
softwareVersion | undefined | string |
agent | undefined | string |
path | string |
Defined in
usage-event-api.ts:71
Properties
agent
• Optional
agent: string
Defined in
usage-event-api.ts:64
customer
• Optional
customer: string
Defined in
usage-event-api.ts:55
data
• Optional
data: any
Defined in
usage-event-api.ts:68
device
• Optional
device: string
Defined in
usage-event-api.ts:58
deviceModel
• Optional
deviceModel: string
Defined in
usage-event-api.ts:59
deviceOperatingSystem
• Optional
deviceOperatingSystem: string
Defined in
usage-event-api.ts:60
duration
• Optional
duration: number
Defined in
usage-event-api.ts:67
eventId
• eventId: string
Defined in
usage-event-api.ts:53
mesh
• Optional
mesh: string
Defined in
usage-event-api.ts:56
namePath
• Optional
namePath: string
Defined in
usage-event-api.ts:65
parentId
• Optional
parentId: string
Defined in
usage-event-api.ts:54
sessionId
• Optional
sessionId: string
Defined in
usage-event-api.ts:61
softwareVersion
• Optional
softwareVersion: string
Defined in
usage-event-api.ts:63
start
• start: Date
Defined in
usage-event-api.ts:66
state
• state: UsageEventState
Defined in
usage-event-api.ts:69
ts
• ts: string
Defined in
usage-event-api.ts:52
usageEventAPI
• usageEventAPI: UsageEventAPI
Defined in
usage-event-api.ts:51
user
• Optional
user: string
Defined in
usage-event-api.ts:57
view
• Optional
view: string
Defined in
usage-event-api.ts:62
Methods
abort
▸ abort(data?
): void
Parameters
Name | Type | Default value |
---|
data | any | null |
Returns
void
Defined in
usage-event-api.ts:130
addData
▸ addData(data?
): void
Parameters
Name | Type | Default value |
---|
data | any | null |
Returns
void
Defined in
usage-event-api.ts:110
complete
▸ complete(data?
): void
Parameters
Name | Type | Default value |
---|
data | any | null |
Returns
void
Defined in
usage-event-api.ts:118
@thing-it/client-api / Exports / UsageEventAPI
Class: UsageEventAPI
Export
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new UsageEventAPI(serverAPI
, baseUrl
, settings
)
Creates an instance of UsageEventAPI.
Memberof
UsageEventAPI
Parameters
Defined in
usage-event-api.ts:158
Properties
baseUrl
• baseUrl: string
= 'https://api.thing-it.io'
Defined in
usage-event-api.ts:151
serverAPI
• serverAPI: ServerAPI
Defined in
usage-event-api.ts:149
settings
• settings: UsageEventSettings
Defined in
usage-event-api.ts:150
Methods
getFullUrl
▸ Private
getFullUrl(url
, base
): string
Memberof
ThingIt
Parameters
Name | Type |
---|
url | string |
base | string |
Returns
string
Defined in
usage-event-api.ts:242
start
▸ start(path
, timeout?
, view?
, sessionId?
): UsageEvent
Parameters
Name | Type | Default value |
---|
path | string | undefined |
timeout | number | 10000 |
view? | string | undefined |
sessionId? | string | undefined |
Returns
UsageEvent
Defined in
usage-event-api.ts:165
submit
▸ submit(usageEvent
): void
Parameters
Returns
void
Defined in
usage-event-api.ts:198
@thing-it/client-api / Exports / Utils
Class: Utils
Table of contents
Constructors
Methods
Constructors
constructor
• new Utils()
Methods
uuidv4
▸ Static
uuidv4(): any
Returns
any
Defined in
utils.ts:2
Enums
@thing-it/client-api / Exports / UsageEventState
Enumeration: UsageEventState
Table of contents
Enumeration Members
Enumeration Members
ABORTED
• ABORTED = "abort"
Defined in
usage-event-api.ts:45
COMPLETED
• COMPLETED = "complete"
Defined in
usage-event-api.ts:44
STARTED
• STARTED = "started"
Defined in
usage-event-api.ts:43
SUBMITTED
• SUBMITTED = "submitted"
Defined in
usage-event-api.ts:47
TIMED_OUT
• TIMED_OUT = "timeout"
Defined in
usage-event-api.ts:46
Interfaces
@thing-it/client-api / Exports / AuthenticationInfo
Interface: AuthenticationInfo
Table of contents
Properties
Properties
apiKey
• Optional
apiKey: string
Defined in
client-api.ts:11
clientId
• clientId: string
Defined in
client-api.ts:7
clientSecret
• clientSecret: string
Defined in
client-api.ts:8
password
• password: string
Defined in
client-api.ts:10
username
• username: string
Defined in
client-api.ts:9
@thing-it/client-api / Exports / ClientOptions
Interface: ClientOptions
Table of contents
Properties
Properties
authInfo
• Optional
authInfo: AuthenticationInfo
Defined in
client-api.ts:15
customer
• Optional
customer: string
Defined in
client-api.ts:17
host
• host: string
Defined in
client-api.ts:16
mesh
• Optional
mesh: string
Defined in
client-api.ts:18
usageEventsBaseUrl
• usageEventsBaseUrl: string
Defined in
client-api.ts:19
@thing-it/client-api / Exports / RequestOptions
Interface: RequestOptions
Table of contents
Properties
Properties
customer
• customer: string
Defined in
usage-event-api.ts:4
mesh
• mesh: string
Defined in
usage-event-api.ts:5
@thing-it/client-api / Exports / TokenInfo
Interface: TokenInfo
Table of contents
Properties
Properties
access_token
• access_token: string
Defined in
client-api.ts:23
expires_in
• expires_in: number
Defined in
client-api.ts:25
refresh_token
• refresh_token: string
Defined in
client-api.ts:26
token_type
• token_type: string
Defined in
client-api.ts:24
@thing-it/client-api / Exports / UsageEventSettings
Interface: UsageEventSettings
Table of contents
Properties
Properties
agent
• Optional
agent: string
Defined in
usage-event-api.ts:39
customer
• Optional
customer: string
Defined in
usage-event-api.ts:32
device
• Optional
device: string
Defined in
usage-event-api.ts:35
deviceModel
• Optional
deviceModel: string
Defined in
usage-event-api.ts:36
deviceOperatingSystem
• Optional
deviceOperatingSystem: string
Defined in
usage-event-api.ts:37
mesh
• Optional
mesh: string
Defined in
usage-event-api.ts:33
softwareVersion
• Optional
softwareVersion: string
Defined in
usage-event-api.ts:38
user
• Optional
user: string
Defined in
usage-event-api.ts:34
@thing-it/client-api / Exports
@thing-it/client-api
Table of contents
Enumerations
Classes
Interfaces