Command

Command

Represents Command

Constructor

new Command(targetID, issuerID, schema, schemaVersion, actions)

Create a command.
Parameters:
Name Type Description
targetID TypedID ID of the target thing.
issuerID TypedID ID of the command issuer.
schema string Name of schema.
schemaVersion number Version number of schema.
actions Array.<Object> Array of actions of the command.
Properties:
Name Type Description
commandID string ID of command.
targetID TypedID ID of the target thing.
issuerID TypedID ID of the command issuer.
schema string Name of schema.
schemaVersion number Version number of schema.
actions Array.<Object> Array of actions of the command.
actionResults Array.<Object> 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.

Methods

(static) fromJson(obj) → {Command}

This method is for internal use only.
Parameters:
Name Type Description
obj JSON object that represented a command.
Returns:
Command instance
Type
Command

toJson() → {Object}

This method is for internal use only.
Returns:
JSON object that represented this instance.
Type
Object