Socket
Socket
Sign inDemoInstall

@thing-it/client-api

Package Overview
Dependencies
0
Maintainers
19
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @thing-it/client-api

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


Version published
Maintainers
19
Created

Readme

Source

@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
NameType
optionsClientOptions
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
NameType
meshIdstring
queryany
options?RequestOptions
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
NameType
urlstring
optionsRequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
Returns

Promise<any>

Defined in

client-api.ts:147


getFullUrl

Private getFullUrl(url): string

Memberof

ThingIt

Parameters
NameType
urlstring
Returns

string

Defined in

client-api.ts:398


getHeaders

Private getHeaders(options): Headers

Memberof

ThingIt

Parameters
NameType
optionsRequestOptions
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
NameType
meshIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
urlstring
bodyany
optionsRequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
tokenInfoTokenInfo
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
NameType
optionsClientOptions
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
NameType
meshIdstring
queryany
options?RequestOptions
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
NameType
urlstring
optionsRequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
Returns

Promise<any>

Defined in

client-api.ts:147


getFullUrl

Private getFullUrl(url): string

Memberof

ThingIt

Parameters
NameType
urlstring
Returns

string

Defined in

client-api.ts:440


getHeaders

Private getHeaders(options): Headers

Memberof

ThingIt

Parameters
NameType
optionsRequestOptions
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
NameType
meshIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
urlstring
bodyany
optionsRequestOptions
Returns

Promise<any>

Defined in

client-api.ts:237


postMessage

Private postMessage(message): void

Memberof

ThingIt

Parameters
NameType
messageany
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
routeIdstring
paramsObject
Returns

void

Defined in

client-api.ts:371


setToken

setToken(tokenInfo): void

Set the token

Memberof

ThingIt

Parameters
NameType
tokenInfoTokenInfo
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

Table of contents

Constructors
Properties
Methods

Constructors

constructor

new ThingIt(options)

Creates an instance of ThingIt.

Memberof

ThingIt

Parameters
NameType
optionsClientOptions
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

broadcastUserInteraction

broadcastUserInteraction(): void

Broadcasts a user interaction event to any parent context

Memberof

ThingIt

Returns

void

Defined in

client-api.ts:426


executeMeshQuery

executeMeshQuery(meshId, query, options?): Promise<any>

Execute a query on the input mesh

Memberof

ThingIt

Parameters
NameType
meshIdstring
queryany
options?RequestOptions
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
NameType
urlstring
optionsRequestOptions
Returns

Promise<any>

Defined in

client-api.ts:208


getAccessToken

Private getAccessToken(): undefined | string

Memberof

ThingIt

Returns

undefined | string

Defined in

client-api.ts:442


getCurrentDeskOccupancy

getCurrentDeskOccupancy(meshId, buildingId, options?): Promise<any>

Get current desk occupancy in the input mesh and building

Memberof

ThingIt

Parameters
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
Returns

Promise<any>

Defined in

client-api.ts:147


getFullUrl

Private getFullUrl(url): string

Memberof

ThingIt

Parameters
NameType
urlstring
Returns

string

Defined in

client-api.ts:454


getHeaders

Private getHeaders(options): Headers

Memberof

ThingIt

Parameters
NameType
optionsRequestOptions
Returns

Headers

Defined in

client-api.ts:468


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:489


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
NameType
meshIdstring
options?RequestOptions
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
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
urlstring
bodyany
optionsRequestOptions
Returns

Promise<any>

Defined in

client-api.ts:237


postMessage

Private postMessage(message): void

Memberof

ThingIt

Parameters
NameType
messageany
Returns

void

Defined in

client-api.ts:515


retrieveCurrentlyActiveBookings

retrieveCurrentlyActiveBookings(meshId, buildingId, options?): Promise<any>

Retrieve currently active bookings in the input mesh and building

Memberof

ThingIt

Parameters
NameType
meshIdstring
buildingIdstring
options?RequestOptions
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
NameType
routeIdstring
paramsObject
Returns

void

Defined in

client-api.ts:371


setToken

setToken(tokenInfo): void

Set the token

Memberof

ThingIt

Parameters
NameType
tokenInfoTokenInfo
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

FAQs

Last updated on 19 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc