Command

Command

Represents Command

Constructor

new Command(targetID, issuerID, aliasActions, commandIDopt, aliasActionResultsopt, commandStateopt, firedByTriggerIDopt, createdopt, modifiedopt, titleopt, descriptionopt, metadataopt)

Create a command.
Properties:
Name Type Description
commandID string ID of command.
targetID TypedID ID of the target thing.
issuerID TypedID ID of the command issuer.
aliasActions Array.<AliasAction> Array of actions of the command.
aliasActionResults Array.<AliasActionResult> Array of action results of the command.
commandState string State of the command.
firedByTriggerID string ID of the trigger if command invoked by trigger.
created Date Timestamp of the creation of the command.
modified Date Timestamp of the modification of the command.
title string Title of the command.
description string Description of the command.
metadata Object Key-value list to store within command definition.
Parameters:
Name Type Attributes Description
targetID TypedID ID of the target thing.
issuerID TypedID ID of the command issuer.
aliasActions Array.<AliasAction> Array of actions of the command.
commandID string <optional>
ID of command.
aliasActionResults Array.<AliasActionResult> <optional>
Array of action results of the command.
commandState string <optional>
State of the command.
firedByTriggerID string <optional>
ID of the trigger if command invoked by trigger.
created Date <optional>
Timestamp of the creation of the command.
modified Date <optional>
Timestamp of the modification of the command.
title string <optional>
Title of the command.
description string <optional>
Description of the command.
metadata Object <optional>
Key-value list to store within command definition.

Methods

getAliasActionResults(alias) → {Array.<AliasActionResult>}

Retrieve aliasAction result with specified alias.
Parameters:
Name Type Description
alias string alias name.
Returns:
Type:
Array.<AliasActionResult>
Found array of AliasActionResult object. If there is not AliasActionResult object with the specified alias, empty array returned.

getAliasActions(alias) → {Array.<AliasAction>}

Retrieve aliasAction with specified alias.
Parameters:
Name Type Description
alias string alias name.
Returns:
Type:
Array.<AliasAction>
Found array of AliasAction object. If there is not AliasActon object with the specified alias, empty array returned.