- relay-js
- Classes
- Enums
- Enumeration: Button
- Enumeration: CallDirection
- Enumeration: DeviceInfoField
- Enumeration: DeviceInfoQuery
- Enumeration: DeviceType
- Enumeration: Event
- Enumeration: IncidentStatus
- Enumeration: Language
- Enumeration: Notification
- Enumeration: NotificationPriority
- Enumeration: NotificationSound
- Enumeration: Taps
- Enumeration: TimeoutType
- Enumeration: TimerType
- Interfaces
- @relaypro/sdk
- Modules
@relaypro/sdk / Exports
relay-js
relay-js SDK is a Node.js library for interacting with Relay. For full documentation visit developer.relaypro.com.
Installation
npm install @relaypro/sdk
Usage
The following code snippet demonstrates a very simple “Hello World” workflow. However, it does show some of the power that is available through the Relay SDK.
import pkg from '@relaypro/sdk'
const { relay, Event, createWorkflow, Uri } = pkg
const app = relay()
app.workflow(`helloworld`, helloworld)
const helloworld = createWorkflow(wf => {
wf.on(Event.START, async (event) => {
const { trigger: { args: { source_uri } } } = event
wf.startInteraction([source_uri], `hello world`)
})
wf.on(Event.INTERACTION_STARTED, async ({ source_uri }) => {
const deviceName = Uri.parseDeviceName(source_uri)
console.log(`interaction start ${source_uri}`)
await wf.sayAndWait(source_uri, `What is your name ?`)
const { text: userProvidedName } = await wf.listen(source_uri)
const greeting = await wf.getVar(`greeting`)
await wf.sayAndWait(source_uri, `${greeting} ${userProvidedName}! You are currently using ${deviceName}`)
await wf.terminate()
})
})
Features demonstrated here:
- When the workflow is triggered, the
start
event is emitted and the registered start callback function is called. - An interaction is started. This creates a temporary channel on the Relay device, which provides a sort of “context” in which some device-specific commands are sent.
- Inside the interaction started handler, the workflow prompts with the
sayAndWait
action. The device user will hear text-to-speech. - The workflow awaits for a response from the device user with the
listen
action. - A workflow configuration variable
greeting
is retrieved as is the triggering device’s name. - The workflow then again uses text-to-speech to reply with a dynamic message.
- Finally, the workflow is terminated and the device is returned to its original state.
Using the Relay CLI, the workflow can be registered with the following command:
relay workflow:create:phrase --name my-test-workflow --uri wss://yourhost:port/helloworld --trigger test -i 99000XXXXXXXXXX
In the above sample sample, a workflow callback function is registered with the name helloworld
. This value
of helloworld
is used to map a WebSocket connection at the path wss://yourhost:port/helloworld
to the registered workflow callback function.
It is also possible to register a “default” workflow at path /
by providing the workflow callback
function as the first parameter:
app.workflow(wf => {
wf.on(Event.START, async () => {
// handle start event
})
})
API
The Relay JS SDK covers a broad set of use cases. Explore the various actions that can be performed in workflow event callbacks:
The full API reference is available at https://relaypro.github.io/relay-js .
Workflow Registration
More thorough documentation on how to register your workflow on a Relay device can be found at https://developer.relaypro.com/docs/register-workflows
Development
git clone git@github.com:relaypro/relay-js.git
cd relay-js
npm install
npm run build
npm run test
License
Classes
@relaypro/sdk / Exports / api / default
Class: default
api.default
Table of contents
Methods
Methods
fetchDevice
▸ fetchDevice(id
): Promise
<Device
>
Parameters
Name | Type |
---|---|
id |
string |
Returns
Promise
<Device
>
Defined in
triggerWorkflow
▸ triggerWorkflow(id
, targets
, args?
): Promise
<void
>
Parameters
Name | Type |
---|---|
id |
string |
targets |
Target |
args? |
Record <string , string > |
Returns
Promise
<void
>
Defined in
@relaypro/sdk / Exports / index / Workflow
Class: Workflow
index.Workflow
Table of contents
Methods
- alert
- answerCall
- breathe
- broadcast
- cancelAlert
- cancelBroadcast
- cancelNotify
- clearTimer
- createIncident
- disableHomeChannel
- disableLocation
- enableHomeChannel
- enableLocation
- endInteraction
- flash
- get
- getArrayVar
- getDeviceAddress
- getDeviceBattery
- getDeviceCoordinates
- getDeviceId
- getDeviceIndoorLocation
- getDeviceLatLong
- getDeviceLocation
- getDeviceLocationEnabled
- getDeviceName
- getDeviceType
- getGroupMembers
- getMappedVar
- getNumberArrayVar
- getNumberVar
- getUnreadInboxSize
- getUserProfile
- getVar
- hangupCall
- isGroupMember
- ledAction
- listen
- logMessage
- logUserMessage
- notify
- off
- on
- placeCall
- play
- playAndWait
- playUnreadInboxMessages
- powerDownDevice
- rainbow
- registerForCalls
- resolveIncident
- restartDevice
- rotate
- say
- sayAndWait
- set
- setChannel
- setDefaultAnalyticEventParameters
- setDeviceChannel
- setDeviceMode
- setDeviceName
- setTimer
- setUserProfile
- setVar
- startInteraction
- startTimer
- stopTimer
- switchAllLedOff
- switchAllLedOn
- switchLedOn
- terminate
- trackEvent
- trackUserEvent
- translate
- unregisterForCalls
- unset
- unsetVar
- vibrate
Methods
alert
▸ alert(target
, originator
, name
, text
, pushOptions?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
originator |
string |
name |
string |
text |
string |
pushOptions? |
NotificationOptions |
Returns
Promise
<void
>
Defined in
answerCall
▸ answerCall(target
, callRequest
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
callRequest |
string | BaseCallEvent |
Returns
Promise
<void
>
Defined in
breathe
▸ breathe(target
, color?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
color |
string |
Returns
Promise
<void
>
Defined in
broadcast
▸ broadcast(target
, originator
, name
, text
, pushOptions?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
originator |
string |
name |
string |
text |
string |
pushOptions? |
NotificationOptions |
Returns
Promise
<void
>
Defined in
cancelAlert
▸ cancelAlert(target
, name
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
name |
string |
Returns
Promise
<void
>
Defined in
cancelBroadcast
▸ cancelBroadcast(target
, name
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
name |
string |
Returns
Promise
<void
>
Defined in
cancelNotify
▸ cancelNotify(target
, name
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
name |
string |
Returns
Promise
<void
>
Defined in
clearTimer
▸ clearTimer(name
): Promise
<void
>
Parameters
Name | Type |
---|---|
name |
string |
Returns
Promise
<void
>
Defined in
createIncident
▸ createIncident(originatorUri
, type
): Promise
<string
>
Parameters
Name | Type |
---|---|
originatorUri |
string |
type |
string |
Returns
Promise
<string
>
Defined in
disableHomeChannel
▸ disableHomeChannel(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Promise
<void
>
Defined in
disableLocation
▸ disableLocation(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<void
>
Defined in
enableHomeChannel
▸ enableHomeChannel(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Promise
<void
>
Defined in
enableLocation
▸ enableLocation(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<void
>
Defined in
endInteraction
▸ endInteraction(target
, name
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
name |
string |
Returns
Promise
<void
>
Defined in
flash
▸ flash(target
, color?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
color |
string |
Returns
Promise
<void
>
Defined in
get
▸ get(names
, mappers
): Promise
<AnyPrimitive
| AnyPrimitive
[]>
Parameters
Name | Type |
---|---|
names |
string | string [] |
mappers |
[Mapper <AnyPrimitive >] |
Returns
Promise
<AnyPrimitive
| AnyPrimitive
[]>
Defined in
getArrayVar
▸ getArrayVar(name
, defaultValue?
): Promise
<undefined
| string
[]>
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
undefined |
defaultValue |
undefined |
undefined |
Returns
Promise
<undefined
| string
[]>
Defined in
getDeviceAddress
▸ getDeviceAddress(target
, refresh
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<string
>
Defined in
getDeviceBattery
▸ getDeviceBattery(target
, refresh
): Promise
<number
>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<number
>
Defined in
getDeviceCoordinates
▸ getDeviceCoordinates(target
, refresh
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<number
[]>
Defined in
getDeviceId
▸ getDeviceId(target
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<string
>
Defined in
getDeviceIndoorLocation
▸ getDeviceIndoorLocation(target
, refresh
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<string
>
Defined in
getDeviceLatLong
▸ getDeviceLatLong(target
, refresh
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<number
[]>
Defined in
getDeviceLocation
▸ getDeviceLocation(target
, refresh
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
refresh |
boolean |
Returns
Promise
<string
>
Defined in
getDeviceLocationEnabled
▸ getDeviceLocationEnabled(target
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<boolean
>
Defined in
getDeviceName
▸ getDeviceName(target
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<string
>
Defined in
getDeviceType
▸ getDeviceType(target
): Promise
<DeviceType
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<DeviceType
>
Defined in
getGroupMembers
▸ getGroupMembers(groupUri
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
groupUri |
string |
Returns
Promise
<string
[]>
Defined in
getMappedVar
▸ getMappedVar<Type
>(name
, mapper
, defaultValue?
): Promise
<undefined
| Type
>
Type parameters
Name |
---|
Type |
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
undefined |
mapper |
Mapper <Type > |
undefined |
defaultValue |
undefined |
undefined |
Returns
Promise
<undefined
| Type
>
Defined in
getNumberArrayVar
▸ getNumberArrayVar(name
, defaultValue?
): Promise
<undefined
| number
[]>
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
undefined |
defaultValue |
undefined |
undefined |
Returns
Promise
<undefined
| number
[]>
Defined in
getNumberVar
▸ getNumberVar(name
, defaultValue?
): Promise
<undefined
| number
>
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
undefined |
defaultValue |
undefined |
undefined |
Returns
Promise
<undefined
| number
>
Defined in
getUnreadInboxSize
▸ getUnreadInboxSize(target
): Promise
<number
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<number
>
Defined in
getUserProfile
▸ getUserProfile(target
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<string
>
Defined in
getVar
▸ getVar(name
, defaultValue?
): Promise
<undefined
| string
>
Parameters
Name | Type | Default value |
---|---|---|
name |
string |
undefined |
defaultValue |
undefined |
undefined |
Returns
Promise
<undefined
| string
>
Defined in
hangupCall
▸ hangupCall(target
, callRequest
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
callRequest |
string | BaseCallEvent |
Returns
Promise
<void
>
Defined in
isGroupMember
▸ isGroupMember(groupNameUri
, potentialMemberNameUri
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
groupNameUri |
string |
potentialMemberNameUri |
string |
Returns
Promise
<boolean
>
Defined in
ledAction
▸ ledAction(target
, effect
, args
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
effect |
LedEffect |
args |
LedInfo |
Returns
Promise
<void
>
Defined in
listen
▸ listen(target
, phrases?
, __namedParameters?
): Promise
<ListenResponse
>
Parameters
Name | Type | Default value |
---|---|---|
target |
string |
undefined |
phrases |
never [] |
[] |
__namedParameters |
Object |
{} |
__namedParameters.alt_lang |
undefined | Language |
undefined |
__namedParameters.timeout |
undefined | number |
undefined |
__namedParameters.transcribe |
undefined | boolean |
undefined |
Returns
Promise
<ListenResponse
>
Defined in
logMessage
▸ logMessage(message
, category?
): Promise
<void
>
Parameters
Name | Type |
---|---|
message |
string |
category |
string |
Returns
Promise
<void
>
Defined in
logUserMessage
▸ logUserMessage(message
, target
, category?
): Promise
<void
>
Parameters
Name | Type |
---|---|
message |
string |
target |
string |
category |
string |
Returns
Promise
<void
>
Defined in
notify
▸ notify(target
, originator
, name
, text
, pushOptions?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
originator |
string |
name |
string |
text |
string |
pushOptions? |
NotificationOptions |
Returns
Promise
<void
>
Defined in
off
▸ off<U
>(eventName
): void
Type parameters
Name | Type |
---|---|
U |
extends keyof WorkflowEventMappings |
Parameters
Name | Type |
---|---|
eventName |
U |
Returns
void
Defined in
on
▸ on<U
>(eventName
, listener
): void
Type parameters
Name | Type |
---|---|
U |
extends keyof WorkflowEventMappings |
Parameters
Name | Type |
---|---|
eventName |
U |
listener |
WorkflowEventHandlers [U ] |
Returns
void
Defined in
placeCall
▸ placeCall(target
, call
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
call |
Partial <Omit <StartedCallEvent , "call_id" >> |
Returns
Promise
<void
>
Defined in
play
▸ play(target
, filename
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
Target |
filename |
string |
Returns
Promise
<string
>
Defined in
playAndWait
▸ playAndWait(target
, filename
): Promise
<string
>
Parameters
Name | Type |
---|---|
target |
Target |
filename |
string |
Returns
Promise
<string
>
Defined in
playUnreadInboxMessages
▸ playUnreadInboxMessages(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
Returns
Promise
<void
>
Defined in
powerDownDevice
▸ powerDownDevice(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Promise
<void
>
Defined in
rainbow
▸ rainbow(target
, rotations?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
target |
Target |
undefined |
rotations |
number |
-1 |
Returns
Promise
<void
>
Defined in
registerForCalls
▸ registerForCalls(target
, request
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
request |
RegisterRequest |
Returns
Promise
<void
>
Defined in
resolveIncident
▸ resolveIncident(incidentId
, reason
): Promise
<void
>
Parameters
Name | Type |
---|---|
incidentId |
string |
reason |
string |
Returns
Promise
<void
>
Defined in
restartDevice
▸ restartDevice(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Promise
<void
>
Defined in
rotate
▸ rotate(target
, color?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
color |
string |
Returns
Promise
<void
>
Defined in
say
▸ say(target
, text
, lang?
): Promise
<string
>
Parameters
Name | Type | Default value |
---|---|---|
target |
Target |
undefined |
text |
string |
undefined |
lang |
Language |
Language.ENGLISH |
Returns
Promise
<string
>
Defined in
sayAndWait
▸ sayAndWait(target
, text
, lang?
): Promise
<string
>
Parameters
Name | Type | Default value |
---|---|---|
target |
Target |
undefined |
text |
string |
undefined |
lang |
Language |
Language.ENGLISH |
Returns
Promise
<string
>
Defined in
set
▸ set(obj
, value?
): Promise
<void
>
Parameters
Name | Type |
---|---|
obj |
Record <string , string > |
value? |
string |
Returns
Promise
<void
>
Defined in
setChannel
▸ setChannel(target
, name
, __namedParameters?
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
name |
string |
__namedParameters |
Object |
__namedParameters.disableHomeChannel? |
false |
__namedParameters.suppressTTS? |
boolean |
Returns
Promise
<void
>
Defined in
setDefaultAnalyticEventParameters
▸ setDefaultAnalyticEventParameters(params
): Promise
<void
>
Parameters
Name | Type |
---|---|
params |
Record <string , string | number | boolean > |
Returns
Promise
<void
>
Defined in
setDeviceChannel
▸ setDeviceChannel(target
, channel
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
channel |
string |
Returns
Promise
<void
>
Defined in
setDeviceMode
▸ setDeviceMode(target
, mode
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
mode |
"panic" | "alarm" | "none" |
Returns
Promise
<void
>
Defined in
setDeviceName
▸ setDeviceName(target
, name
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
name |
string |
Returns
Promise
<void
>
Defined in
setTimer
▸ setTimer(type
, name
, timeout?
, timeout_type
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
type |
TimerType |
undefined |
name |
string |
undefined |
timeout |
number |
60 |
timeout_type |
TimeoutType |
undefined |
Returns
Promise
<void
>
Defined in
setUserProfile
▸ setUserProfile(target
, username
, force?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
target |
string |
undefined |
username |
string |
undefined |
force |
boolean |
false |
Returns
Promise
<void
>
Defined in
setVar
▸ setVar(name
, value
): Promise
<void
>
Parameters
Name | Type |
---|---|
name |
string |
value |
string |
Returns
Promise
<void
>
Defined in
startInteraction
▸ startInteraction(target
, name
, options
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
name |
string |
options |
InteractionOptions |
Returns
Promise
<void
>
Defined in
startTimer
▸ startTimer(timeout?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
timeout |
number |
60 |
Returns
Promise
<void
>
Defined in
stopTimer
▸ stopTimer(): Promise
<void
>
Returns
Promise
<void
>
Defined in
switchAllLedOff
▸ switchAllLedOff(target
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Promise
<void
>
Defined in
switchAllLedOn
▸ switchAllLedOn(target
, color
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
color |
string |
Returns
Promise
<void
>
Defined in
switchLedOn
▸ switchLedOn(target
, led
, color
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
led |
LedIndex |
color |
string |
Returns
Promise
<void
>
Defined in
terminate
▸ terminate(): Promise
<void
>
Returns
Promise
<void
>
Defined in
trackEvent
▸ trackEvent(category
, parameters?
): Promise
<void
>
Parameters
Name | Type |
---|---|
category |
string |
parameters? |
TrackEventParameters |
Returns
Promise
<void
>
Defined in
trackUserEvent
▸ trackUserEvent(category
, target
, parameters?
): Promise
<void
>
Parameters
Name | Type |
---|---|
category |
string |
target |
string |
parameters? |
TrackEventParameters |
Returns
Promise
<void
>
Defined in
translate
▸ translate(text
, from?
, to?
): Promise
<string
>
Parameters
Name | Type | Default value |
---|---|---|
text |
string |
undefined |
from |
Language |
Language.ENGLISH |
to |
Language |
Language.SPANISH |
Returns
Promise
<string
>
Defined in
unregisterForCalls
▸ unregisterForCalls(target
, request
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
string |
request |
UnregisterRequest |
Returns
Promise
<void
>
Defined in
unset
▸ unset(names
): Promise
<void
>
Parameters
Name | Type |
---|---|
names |
string | string [] |
Returns
Promise
<void
>
Defined in
unsetVar
▸ unsetVar(name
): Promise
<void
>
Parameters
Name | Type |
---|---|
name |
string |
Returns
Promise
<void
>
Defined in
vibrate
▸ vibrate(target
, pattern
): Promise
<void
>
Parameters
Name | Type |
---|---|
target |
Target |
pattern |
number [] |
Returns
Promise
<void
>
Defined in
Enums
@relaypro/sdk / Exports / enums / Button
Enumeration: Button
enums.Button
Table of contents
Enumeration Members
Enumeration Members
ACTION
• ACTION
Defined in
CHANNEL
• CHANNEL
Defined in
@relaypro/sdk / Exports / enums / CallDirection
Enumeration: CallDirection
enums.CallDirection
Table of contents
Enumeration Members
Enumeration Members
INBOUND
• INBOUND
Defined in
OUTBOUND
• OUTBOUND
Defined in
@relaypro/sdk / Exports / enums / DeviceInfoField
Enumeration: DeviceInfoField
enums.DeviceInfoField
Table of contents
Enumeration Members
Enumeration Members
CHANNEL
• CHANNEL
Defined in
LABEL
• LABEL
Defined in
LOCATION_ENABLED
• LOCATION_ENABLED
Defined in
@relaypro/sdk / Exports / enums / DeviceInfoQuery
Enumeration: DeviceInfoQuery
enums.DeviceInfoQuery
Table of contents
Enumeration Members
Enumeration Members
ADDRESS
• ADDRESS
Defined in
BATTERY
• BATTERY
Defined in
COORDINATES
• COORDINATES
Defined in
ID
• ID
Defined in
INDOOR_LOCATION
• INDOOR_LOCATION
Defined in
LOCATION
• LOCATION
Defined in
LOCATION_ENABLED
• LOCATION_ENABLED
Defined in
NAME
• NAME
Defined in
TYPE
• TYPE
Defined in
USERNAME
• USERNAME
Defined in
@relaypro/sdk / Exports / enums / DeviceType
Enumeration: DeviceType
enums.DeviceType
Table of contents
Enumeration Members
Enumeration Members
DASH
• DASH
Defined in
RELAY
• RELAY
Defined in
RELAY2
• RELAY2
Defined in
RELAY_APP
• RELAY_APP
Defined in
ROIP
• ROIP
Defined in
@relaypro/sdk / Exports / enums / Event
Enumeration: Event
enums.Event
Table of contents
Enumeration Members
- BUTTON
- CALL_CONNECTED
- CALL_DISCONNECTED
- CALL_FAILED
- CALL_RECEIVED
- CALL_RINGING
- CALL_START_REQUEST
- ERROR
- INCIDENT
- INTERACTION_ENDED
- INTERACTION_FAILED
- INTERACTION_LIFECYCLE
- INTERACTION_RESUMED
- INTERACTION_STARTED
- INTERACTION_SUSPENDED
- NOTIFICATION
- PROMPT
- SPEECH
- START
- STOP
- TIMER
Enumeration Members
BUTTON
• BUTTON
Defined in
CALL_CONNECTED
• CALL_CONNECTED
Defined in
CALL_DISCONNECTED
• CALL_DISCONNECTED
Defined in
CALL_FAILED
• CALL_FAILED
Defined in
CALL_RECEIVED
• CALL_RECEIVED
Defined in
CALL_RINGING
• CALL_RINGING
Defined in
CALL_START_REQUEST
• CALL_START_REQUEST
Defined in
ERROR
• ERROR
Defined in
INCIDENT
• INCIDENT
Defined in
INTERACTION_ENDED
• INTERACTION_ENDED
Defined in
INTERACTION_FAILED
• INTERACTION_FAILED
Defined in
INTERACTION_LIFECYCLE
• INTERACTION_LIFECYCLE
Defined in
INTERACTION_RESUMED
• INTERACTION_RESUMED
Defined in
INTERACTION_STARTED
• INTERACTION_STARTED
Defined in
INTERACTION_SUSPENDED
• INTERACTION_SUSPENDED
Defined in
NOTIFICATION
• NOTIFICATION
Defined in
PROMPT
• PROMPT
Defined in
SPEECH
• SPEECH
Defined in
START
• START
Defined in
STOP
• STOP
Defined in
TIMER
• TIMER
Defined in
@relaypro/sdk / Exports / enums / IncidentStatus
Enumeration: IncidentStatus
enums.IncidentStatus
Table of contents
Enumeration Members
Enumeration Members
CANCELLED
• CANCELLED
Defined in
RESOLVED
• RESOLVED
Defined in
@relaypro/sdk / Exports / enums / Language
Enumeration: Language
enums.Language
Table of contents
Enumeration Members
- ARABIC
- BENGALI
- CHINESE
- CZECH
- DANISH
- DUTCH
- ENGLISH
- FILIPINO
- FINNISH
- FRENCH
- GERMAN
- GREEK
- GUJURATI
- HINDI
- HUNGARIAN
- ICELANDIC
- INDONESIAN
- ITALIAN
- JAPANESE
- KANNADA
- KOREAN
- MALAY
- NORWEGIAN
- POLISH
- PORTUGUESE
- PUNJABI
- ROMANIAN
- RUSSIAN
- SLOVAK
- SPANISH
- SWEDISH
- TAMIL
- TURKISH
- UKRANIAN
- VIETNAMESE
Enumeration Members
ARABIC
• ARABIC
Defined in
BENGALI
• BENGALI
Defined in
CHINESE
• CHINESE
Defined in
CZECH
• CZECH
Defined in
DANISH
• DANISH
Defined in
DUTCH
• DUTCH
Defined in
ENGLISH
• ENGLISH
Defined in
FILIPINO
• FILIPINO
Defined in
FINNISH
• FINNISH
Defined in
FRENCH
• FRENCH
Defined in
GERMAN
• GERMAN
Defined in
GREEK
• GREEK
Defined in
GUJURATI
• GUJURATI
Defined in
HINDI
• HINDI
Defined in
HUNGARIAN
• HUNGARIAN
Defined in
ICELANDIC
• ICELANDIC
Defined in
INDONESIAN
• INDONESIAN
Defined in
ITALIAN
• ITALIAN
Defined in
JAPANESE
• JAPANESE
Defined in
KANNADA
• KANNADA
Defined in
KOREAN
• KOREAN
Defined in
MALAY
• MALAY
Defined in
NORWEGIAN
• NORWEGIAN
Defined in
POLISH
• POLISH
Defined in
PORTUGUESE
• PORTUGUESE
Defined in
PUNJABI
• PUNJABI
Defined in
ROMANIAN
• ROMANIAN
Defined in
RUSSIAN
• RUSSIAN
Defined in
SLOVAK
• SLOVAK
Defined in
SPANISH
• SPANISH
Defined in
SWEDISH
• SWEDISH
Defined in
TAMIL
• TAMIL
Defined in
TURKISH
• TURKISH
Defined in
UKRANIAN
• UKRANIAN
Defined in
VIETNAMESE
• VIETNAMESE
Defined in
@relaypro/sdk / Exports / enums / Notification
Enumeration: Notification
enums.Notification
Table of contents
Enumeration Members
Enumeration Members
ALERT
• ALERT
Defined in
BROADCAST
• BROADCAST
Defined in
CANCEL
• CANCEL
Defined in
NOTIFY
• NOTIFY
Defined in
@relaypro/sdk / Exports / enums / NotificationPriority
Enumeration: NotificationPriority
enums.NotificationPriority
Table of contents
Enumeration Members
Enumeration Members
CRITICAL
• CRITICAL
Defined in
HIGH
• HIGH
Defined in
NORMAL
• NORMAL
Defined in
@relaypro/sdk / Exports / enums / NotificationSound
Enumeration: NotificationSound
enums.NotificationSound
Table of contents
Enumeration Members
Enumeration Members
DEFAULT
• DEFAULT
Defined in
SOS
• SOS
Defined in
@relaypro/sdk / Exports / enums / Taps
Enumeration: Taps
enums.Taps
Table of contents
Enumeration Members
Enumeration Members
DOUBLE
• DOUBLE
Defined in
LONG
• LONG
Defined in
SINGLE
• SINGLE
Defined in
TRIPLE
• TRIPLE
Defined in
@relaypro/sdk / Exports / enums / TimeoutType
Enumeration: TimeoutType
enums.TimeoutType
Table of contents
Enumeration Members
Enumeration Members
HOURS
• HOURS
Defined in
MILLISECONDS
• MILLISECONDS
Defined in
MINUTES
• MINUTES
Defined in
SECONDS
• SECONDS
Defined in
@relaypro/sdk / Exports / enums / TimerType
Enumeration: TimerType
enums.TimerType
Table of contents
Enumeration Members
Enumeration Members
INTERVAL
• INTERVAL
Defined in
TIMEOUT
• TIMEOUT
Defined in
Interfaces
@relaypro/sdk / Exports / types / Relay
Interface: Relay
types.Relay
Table of contents
Properties
Methods
Properties
api
• api: default
Defined in
Methods
workflow
▸ workflow(path
, workflow?
): void
Parameters
Name | Type |
---|---|
path |
string | WorkflowEventHandler |
workflow? |
WorkflowEventHandler |
Returns
void
Defined in
@relaypro/sdk / Exports / types / WorkflowEventHandler
Interface: WorkflowEventHandler
types.WorkflowEventHandler
Callable
WorkflowEventHandler
▸ WorkflowEventHandler(workflow
): void
Parameters
Name | Type |
---|---|
workflow |
Workflow |
Returns
void
Defined in
@relaypro/sdk / Exports
@relaypro/sdk
Table of contents
Modules
Modules
@relaypro/sdk / Exports / api
Module: api
Table of contents
Classes
@relaypro/sdk / Exports / constants
Module: constants
Table of contents
Variables
- ERROR_RESPONSE
- EVENT_TIMEOUT
- HEARTBEAT
- NON_INTERACTIVE_ACTIONS
- NOTIFICATION_TIMEOUT
- PORT
- PROGRESS_EVENT
- REFRESH_TIMEOUT
- TIMEOUT
Variables
ERROR_RESPONSE
• Const
ERROR_RESPONSE: "wf_api_error_response"
Defined in
EVENT_TIMEOUT
• Const
EVENT_TIMEOUT: 32000
Defined in
HEARTBEAT
• Const
HEARTBEAT: number
Defined in
NON_INTERACTIVE_ACTIONS
• Const
NON_INTERACTIVE_ACTIONS: string
[]
Defined in
NOTIFICATION_TIMEOUT
• Const
NOTIFICATION_TIMEOUT: 60000
Defined in
PORT
• Const
PORT: number
Defined in
PROGRESS_EVENT
• Const
PROGRESS_EVENT: "wf_api_progress_event"
Defined in
REFRESH_TIMEOUT
• Const
REFRESH_TIMEOUT: 45000
Defined in
TIMEOUT
• Const
TIMEOUT: 5000
Defined in
@relaypro/sdk / Exports / enums
Module: enums
Table of contents
Enumerations
- Button
- CallDirection
- DeviceInfoField
- DeviceInfoQuery
- DeviceType
- Event
- IncidentStatus
- Language
- Notification
- NotificationPriority
- NotificationSound
- Taps
- TimeoutType
- TimerType
@relaypro/sdk / Exports / index
Module: index
Table of contents
References
- Button
- CallDirection
- DeviceInfoField
- DeviceInfoQuery
- DeviceType
- IncidentStatus
- Notification
- NotificationPriority
- NotificationSound
- Options
- Relay
- Taps
- TimeoutType
- TimerType
- Uri
- WorkflowEventHandler
Classes
Variables
Functions
References
Button
Re-exports Button
CallDirection
Re-exports CallDirection
DeviceInfoField
Re-exports DeviceInfoField
DeviceInfoQuery
Re-exports DeviceInfoQuery
DeviceType
Re-exports DeviceType
IncidentStatus
Re-exports IncidentStatus
Notification
Re-exports Notification
NotificationPriority
Re-exports NotificationPriority
NotificationSound
Re-exports NotificationSound
Options
Re-exports Options
Relay
Re-exports Relay
Taps
Re-exports Taps
TimeoutType
Re-exports TimeoutType
TimerType
Re-exports TimerType
Uri
Renames and re-exports uri
WorkflowEventHandler
Re-exports WorkflowEventHandler
Variables
Event
• Event: typeof Event
Language
• Language: typeof Language
Functions
createWorkflow
▸ createWorkflow(fn
): Workflow
Parameters
Name | Type |
---|---|
fn |
Workflow |
Returns
Defined in
relay
▸ relay(options?
): Relay
Parameters
Name | Type |
---|---|
options |
Options |
Returns
Defined in
@relaypro/sdk / Exports / queue
Module: queue
@relaypro/sdk / Exports / types
Module: types
Table of contents
Interfaces
Type Aliases
- AnyEvent
- AnyPrimitive
- AudioResponse
- BaseCallEvent
- ButtonEvent
- ButtonTrigger
- Call
- ConnectedCallEvent
- Device
- DisconnectedCallEvent
- ErrorEvent
- Event
- FailedCallEvent
- GroupTarget
- HomeChannelBehavior
- HttpTrigger
- IncidentEvent
- InputType
- InteractionLifecycle
- InteractionLifecycleEvent
- InteractionOptions
- LedEffect
- LedIndex
- LedInfo
- ListenResponse
- LocalWebSocket
- Mapper
- Maybe
- NfcTrigger
- NotificationEvent
- NotificationOptions
- NotificationState
- Options
- OtherTrigger
- PhraseTrigger
- PlaceCall
- ProgressingCallEvent
- PromptEvent
- RawWorkflowEvent
- ReceivedCallEvent
- RegisterRequest
- RingingCallEvent
- SingleTarget
- SpeechEvent
- StartEvent
- StartedCallEvent
- StopEvent
- Target
- TargetUris
- TimerEvent
- TrackEventParameters
- TranscriptionResponse
- TriggerArgs
- UnionToIntersection
- UnregisterRequest
- ValueOf
- WorkflowEventHandlers
Type Aliases
AnyEvent
Ƭ AnyEvent: Error
Defined in
AnyPrimitive
Ƭ AnyPrimitive: undefined
| symbol
| string
| boolean
| number
| [string
| boolean
| number
]
Defined in
AudioResponse
Ƭ AudioResponse: Record
<"audio"
, string
>
Defined in
BaseCallEvent
Ƭ BaseCallEvent: Object
Type declaration
Name | Type |
---|---|
call_id |
string |
Defined in
ButtonEvent
Ƭ ButtonEvent: Event
& { button
: Button
; taps
: Taps
}
Defined in
ButtonTrigger
Ƭ ButtonTrigger: Object
Type declaration
Name | Type |
---|---|
args |
TriggerArgs & { action : "action_button_single_tap" | "action_button_double_tap" | "action_button_triple_tap" } |
type |
"button" |
Defined in
Call
Ƭ Call: StartedCallEvent
| ReceivedCallEvent
| ConnectedCallEvent
| DisconnectedCallEvent
| FailedCallEvent
Defined in
ConnectedCallEvent
Ƭ ConnectedCallEvent: ReceivedCallEvent
& { connect_time_epoch
: number
}
Defined in
Device
Ƭ Device: Object
Type declaration
Name | Type |
---|---|
active_channel |
string |
app_version |
string |
background_audio |
boolean |
battery_level |
number |
battery_status |
"charging" | "discharging" |
bluetooth_address |
string |
bluetooth_name |
string |
bluetooth_status |
"on" | "off" |
build_id |
string |
capabilities |
{ allow_sos_override : boolean ; audit_rich_logging : boolean ; background_audio : boolean ; calling : boolean ; calling_between_devices_support : boolean ; devmon_event_support : boolean ; dnd : boolean ; eavesdrop_support : boolean ; enable_audit_logs : boolean ; enable_team_support : boolean ; escalated_sos : boolean ; geofencing : boolean ; group_persistence : boolean ; group_transcriptions : boolean ; group_translations : boolean ; indoor_positioning : boolean ; intent_support : boolean ; location : boolean ; location_history : boolean ; low_latency_audio : boolean ; sip_register_support : boolean ; sos : boolean ; ui_allow_incident_resolution : boolean ; virtual_device_location_reporting : boolean } |
capabilities.allow_sos_override |
boolean |
capabilities.audit_rich_logging |
boolean |
capabilities.background_audio |
boolean |
capabilities.calling |
boolean |
capabilities.calling_between_devices_support |
boolean |
capabilities.devmon_event_support |
boolean |
capabilities.dnd |
boolean |
capabilities.eavesdrop_support |
boolean |
capabilities.enable_audit_logs |
boolean |
capabilities.enable_team_support |
boolean |
capabilities.escalated_sos |
boolean |
capabilities.geofencing |
boolean |
capabilities.group_persistence |
boolean |
capabilities.group_transcriptions |
boolean |
capabilities.group_translations |
boolean |
capabilities.indoor_positioning |
boolean |
capabilities.intent_support |
boolean |
capabilities.location |
boolean |
capabilities.location_history |
boolean |
capabilities.low_latency_audio |
boolean |
capabilities.sip_register_support |
boolean |
capabilities.sos |
boolean |
capabilities.ui_allow_incident_resolution |
boolean |
capabilities.virtual_device_location_reporting |
boolean |
cell_signal |
number |
channels |
{ catalog_type : string ; channel_id : string ; color : string ; force_switch_on_page : boolean ; is_hidden : boolean ; name : string ; params : Record <string , string > ; type : string }[] |
connection_type |
"cell" | "wifi" |
device_status |
"online" | "offline" |
emergency_info |
never |
fcc_id |
string |
features |
{ auto_dnd_when_charging : boolean ; background_audio : boolean ; background_notification_repeat_interval : number ; cache_wifi_for_location : boolean ; calling : boolean ; calling_notifications : boolean ; dnd : boolean ; enable_event_stream : boolean ; foreground_notification_repeat_interval : number ; home_channel_name : string ; home_channel_timeout : number ; indoor_position_algorithm : string ; indoor_positioning : boolean ; location : boolean ; location_polling_interval : number ; ping_interval : number ; prefer_cell : boolean ; sensors_enabled : string [] ; sos : boolean ; use_ibot_transcriptions : false } |
features.auto_dnd_when_charging |
boolean |
features.background_audio |
boolean |
features.background_notification_repeat_interval |
number |
features.cache_wifi_for_location |
boolean |
features.calling |
boolean |
features.calling_notifications |
boolean |
features.dnd |
boolean |
features.enable_event_stream |
boolean |
features.foreground_notification_repeat_interval |
number |
features.home_channel_name |
string |
features.home_channel_timeout |
number |
features.indoor_position_algorithm |
string |
features.indoor_positioning |
boolean |
features.location |
boolean |
features.location_polling_interval |
number |
features.ping_interval |
number |
features.prefer_cell |
boolean |
features.sensors_enabled |
string [] |
features.sos |
boolean |
features.use_ibot_transcriptions |
false |
groups |
{ group_id : string ; name : string }[] |
ic_id |
string |
iccid |
string |
imei |
string |
last_connect_timestamp |
string |
location |
{ accuracy : number ; address : string | null ; date : string ; geofence_events : { geofence_id : string ; label : string ; timestamp_z : string ; type : "entry" | "exit" }[] ; geofence_id : string | null ; geofence_state : "outside" | "inside" | null ; indoor_position : { best : number ; best_match : string [] ; best_match_id : string ; best_match_mac : string ; best_match_venue : string } ; lat : number ; long : number } |
location.accuracy |
number |
location.address |
string | null |
location.date |
string |
location.geofence_events |
{ geofence_id : string ; label : string ; timestamp_z : string ; type : "entry" | "exit" }[] |
location.geofence_id |
string | null |
location.geofence_state |
"outside" | "inside" | null |
location.indoor_position |
{ best : number ; best_match : string [] ; best_match_id : string ; best_match_mac : string ; best_match_venue : string } |
location.indoor_position.best |
number |
location.indoor_position.best_match |
string [] |
location.indoor_position.best_match_id |
string |
location.indoor_position.best_match_mac |
string |
location.indoor_position.best_match_venue |
string |
location.lat |
number |
location.long |
number |
mode |
null | "emergency_sos" | "dnd" |
model |
string |
name |
string |
product_name |
string |
rendezvous |
never [] |
rom_version |
string |
volume_level |
number |
wifi_mac |
string |
wifi_signal |
number |
Defined in
DisconnectedCallEvent
Ƭ DisconnectedCallEvent: ConnectedCallEvent
& { end_time_epoch
: number
; reason
: string
}
Defined in
ErrorEvent
Ƭ ErrorEvent: Object
ErrorEvent is not emitted from Relay Platform. Rather it is emitted from the SDK when an exception goes unhandled by user code.
Type declaration
Name | Type |
---|---|
error |
Error |
Defined in
Event
Ƭ Event: Object
Type declaration
Name | Type |
---|---|
source_uri |
string |
Defined in
FailedCallEvent
Ƭ FailedCallEvent: DisconnectedCallEvent
Defined in
GroupTarget
Ƭ GroupTarget: string
Defined in
HomeChannelBehavior
Ƭ HomeChannelBehavior: "suspend"
| "normal"
Defined in
HttpTrigger
Ƭ HttpTrigger: Object
Type declaration
Name | Type |
---|---|
args |
TriggerArgs & { args : Record <string , string > } |
type |
"http" |
Defined in
IncidentEvent
Ƭ IncidentEvent: Object
Type declaration
Name | Type |
---|---|
incident_id |
string |
reason |
string |
type |
IncidentStatus |
Defined in
InputType
Ƭ InputType: "action_button_single_tap"
| "action_button_double_tap"
| "action_button_triple_tap"
| "action_button_long_press"
| "channel_button_double_tap"
| "channel_button_triple_tap"
Defined in
InteractionLifecycle
Ƭ InteractionLifecycle: "started"
| "resumed"
| "suspended"
| "ended"
| "failed"
Defined in
InteractionLifecycleEvent
Ƭ InteractionLifecycleEvent: Event
& { reason?
: string
; type
: string
}
Defined in
InteractionOptions
Ƭ InteractionOptions: Object
Type declaration
Name | Type |
---|---|
color? |
string |
home_channel? |
HomeChannelBehavior |
input_types? |
[InputType ] |
Defined in
LedEffect
Ƭ LedEffect: "off"
| "breathe"
| "flash"
| "rotate"
| "rainbow"
| "static"
Defined in
LedIndex
Ƭ LedIndex: "ring"
| 1
| 2
| 3
| 4
| 5
| 6
| 7
| 8
| 9
| 10
| 11
| 12
| 13
| 14
| 15
| 16
| "1"
| "2"
| "3"
| "4"
| "5"
| "6"
| "7"
| "8"
| "9"
| "10"
| "11"
| "12"
| "13"
| "14"
| "15"
| "16"
Defined in
LedInfo
Ƭ LedInfo: Object
Type declaration
Name | Type |
---|---|
colors? |
{ [K in LedIndex]?: string } |
count? |
number |
duration? |
number |
pattern_repeats? |
number |
repeat_delay? |
number |
rotations? |
number |
Defined in
ListenResponse
Ƭ ListenResponse: TranscriptionResponse
| AudioResponse
Defined in
LocalWebSocket
Ƭ LocalWebSocket: WebSocket
& { connectionId
: string
; isAlive
: boolean
}
Defined in
Mapper
Ƭ Mapper<Type
>: (value
: string
) => Type
Type parameters
Name |
---|
Type |
Type declaration
▸ (value
): Type
Parameters
Name | Type |
---|---|
value |
string |
Returns
Type
Defined in
Maybe
Ƭ Maybe<T
>: T
| null
| undefined
Type parameters
Name |
---|
T |
Defined in
NfcTrigger
Ƭ NfcTrigger: Object
Type declaration
Name | Type |
---|---|
args |
TriggerArgs & { nfc_payload : Record <string , string > ; uid : string } |
type |
"nfc" |
Defined in
NotificationEvent
Ƭ NotificationEvent: Event
& { event
: string
; name
: string
; notification_state
: NotificationState
}
Defined in
NotificationOptions
Ƭ NotificationOptions: Object
Type declaration
Name | Type |
---|---|
body |
string |
priority |
NotificationPriority |
sound |
NotificationSound |
title |
string |
Defined in
NotificationState
Ƭ NotificationState: Object
Type declaration
Name | Type |
---|---|
acknowledged |
string [] |
cancelled |
string [] |
created |
string [] |
timed_out |
string [] |
Defined in
Options
Ƭ Options: Object
Type declaration
Name | Type |
---|---|
apiKey? |
string |
server? |
http.Server | https.Server |
subscriberId? |
string |
Defined in
OtherTrigger
Ƭ OtherTrigger: Object
Type declaration
Name | Type |
---|---|
args |
TriggerArgs |
type |
"emergency" | "other" | "calendar" | "geofence" | "telephony" |
Defined in
PhraseTrigger
Ƭ PhraseTrigger: Object
Type declaration
Name | Type |
---|---|
args |
TriggerArgs & { phrase : string ; spillover : string } |
type |
"phrase" |
Defined in
PlaceCall
Ƭ PlaceCall: Partial
<Omit
<StartedCallEvent
, "call_id"
>>
Defined in
ProgressingCallEvent
Ƭ ProgressingCallEvent: ReceivedCallEvent
Defined in
PromptEvent
Ƭ PromptEvent: Event
& { id
: string
; type
: string
}
Defined in
RawWorkflowEvent
Ƭ RawWorkflowEvent: UnionToIntersection
<WorkflowEvent
> & { _id
: string
; _type
: string
}
Defined in
ReceivedCallEvent
Ƭ ReceivedCallEvent: StartedCallEvent
& { direction
: CallDirection
; onnet
: boolean
; start_time_epoch
: number
}
Defined in
RegisterRequest
Ƭ RegisterRequest: Object
Type declaration
Name | Type |
---|---|
expires? |
number |
password? |
string |
uri? |
string |
Defined in
RingingCallEvent
Ƭ RingingCallEvent: ReceivedCallEvent
Defined in
SingleTarget
Ƭ SingleTarget: string
Defined in
SpeechEvent
Ƭ SpeechEvent: Event
& { audio
: string
; lang
: string
; request_id
: string
; text
: string
}
Defined in
StartEvent
Ƭ StartEvent: Object
Type declaration
Name | Type |
---|---|
trigger |
PhraseTrigger | ButtonTrigger | HttpTrigger | NfcTrigger | OtherTrigger |
Defined in
StartedCallEvent
Ƭ StartedCallEvent: BaseCallEvent
& { uri
: string
}
Defined in
StopEvent
Ƭ StopEvent: Object
Type declaration
Name | Type |
---|---|
reason |
"error" | "normal" | string |
Defined in
Target
Ƭ Target: SingleTarget
| string
[]
Defined in
TargetUris
Ƭ TargetUris: Object
Type declaration
Name | Type |
---|---|
uris |
string [] |
Defined in
TimerEvent
Ƭ TimerEvent: Record
<"name"
, string
>
Defined in
TrackEventParameters
Ƭ TrackEventParameters: Record
<string
, Record
<string
, string
| number
| boolean
>>
Defined in
TranscriptionResponse
Ƭ TranscriptionResponse: Record
<"text"
| "lang"
, string
>
Defined in
TriggerArgs
Ƭ TriggerArgs: Object
Type declaration
Name | Type |
---|---|
source_uri |
string |
Defined in
UnionToIntersection
Ƭ UnionToIntersection<T
>: T
extends any
? (x
: T
) => any
: never
extends (x
: infer R) => any
? R
: never
Type parameters
Name |
---|
T |
Defined in
UnregisterRequest
Ƭ UnregisterRequest: Omit
<RegisterRequest
, "expires"
>
Defined in
ValueOf
Ƭ ValueOf<T
>: T
[keyof T
]
Type parameters
Name |
---|
T |
Defined in
WorkflowEventHandlers
Ƭ WorkflowEventHandlers: { [EventName in keyof WorkflowEventMappings]?: Function }
Defined in
@relaypro/sdk / Exports / uri
Module: uri
Table of contents
Functions
- allDevices
- allDevicesWithStatus
- assertTargets
- deviceId
- deviceName
- genericOriginator
- groupId
- groupMember
- groupName
- isInteractionUri
- isRelayUri
- makeTargetUris
- parseDeviceId
- parseDeviceName
- parseGroupId
- parseGroupName
Functions
allDevices
▸ allDevices(): string
Returns
string
Defined in
allDevicesWithStatus
▸ allDevicesWithStatus(interactionName
, status
): string
Parameters
Name | Type |
---|---|
interactionName |
string |
status |
InteractionLifecycle |
Returns
string
Defined in
assertTargets
▸ assertTargets(target
): boolean
Parameters
Name | Type |
---|---|
target |
Target |
Returns
boolean
Defined in
deviceId
▸ deviceId(id
): string
Parameters
Name | Type |
---|---|
id |
string |
Returns
string
Defined in
deviceName
▸ deviceName(name
): string
Parameters
Name | Type |
---|---|
name |
string |
Returns
string
Defined in
genericOriginator
▸ genericOriginator(): string
Returns
string
Defined in
groupId
▸ groupId(id
): string
Parameters
Name | Type |
---|---|
id |
string |
Returns
string
Defined in
groupMember
▸ groupMember(group
, device
): string
Parameters
Name | Type |
---|---|
group |
string |
device |
string |
Returns
string
Defined in
groupName
▸ groupName(name
): string
Parameters
Name | Type |
---|---|
name |
string |
Returns
string
Defined in
isInteractionUri
▸ isInteractionUri(uri
): void
Parameters
Name | Type |
---|---|
uri |
string |
Returns
void
Defined in
isRelayUri
▸ isRelayUri(uri
): boolean
Parameters
Name | Type |
---|---|
uri |
string |
Returns
boolean
Defined in
makeTargetUris
▸ makeTargetUris(target
): TargetUris
Parameters
Name | Type |
---|---|
target |
Target |
Returns
Defined in
parseDeviceId
▸ parseDeviceId(uri
): string
Parameters
Name | Type |
---|---|
uri |
string |
Returns
string
Defined in
parseDeviceName
▸ parseDeviceName(uri
): string
Parameters
Name | Type |
---|---|
uri |
string |
Returns
string
Defined in
parseGroupId
▸ parseGroupId(uri
): string
Parameters
Name | Type |
---|---|
uri |
string |
Returns
string
Defined in
parseGroupName
▸ parseGroupName(uri
): string
Parameters
Name | Type |
---|---|
uri |
string |
Returns
string
Defined in
@relaypro/sdk / Exports / utils
Module: utils
Table of contents
Functions
- arrayMapper
- booleanMapper
- filterInt
- isMatch
- isPlainObject
- makeId
- mapDevice
- noop
- numberArrayMapper
- toString
Functions
arrayMapper
▸ arrayMapper(value
): string
[]
Parameters
Name | Type |
---|---|
value |
string |
Returns
string
[]
Defined in
booleanMapper
▸ booleanMapper(value
): boolean
Parameters
Name | Type |
---|---|
value |
string |
Returns
boolean
Defined in
filterInt
▸ filterInt(value
): number
Parameters
Name | Type |
---|---|
value |
string |
Returns
number
Defined in
isMatch
▸ isMatch(object
, source
): boolean
Parameters
Name | Type |
---|---|
object |
any |
source |
any |
Returns
boolean
Defined in
isPlainObject
▸ isPlainObject<Value
>(value
): value is Record<string | number | symbol, Value>
Type parameters
Name |
---|
Value |
Parameters
Name | Type |
---|---|
value |
unknown |
Returns
value is Record<string | number | symbol, Value>
Defined in
makeId
▸ makeId(): string
Returns
string
Defined in
mapDevice
▸ mapDevice(device
): Device
Parameters
Name | Type |
---|---|
device |
Record <string , any > |
Returns
Defined in
noop
▸ noop(): void
Returns
void
Defined in
numberArrayMapper
▸ numberArrayMapper(value
): number
[]
Parameters
Name | Type |
---|---|
value |
string |
Returns
number
[]
Defined in
toString
▸ toString(value
): string
Parameters
Name | Type |
---|---|
value |
AnyPrimitive |
Returns
string
Defined in
@relaypro/sdk / Exports / vars
Module: vars
Table of contents
Variables
Variables
vars
• Const
vars: Vars