Contains constants and functions for a Outgoing Command.
The structure for a Outgoing Command is as follows:
{
  clientId: <string>,
  payload: <object>,
  timestamp: <number>,
  type: 'control'
  vendor: <string>,
}
            - Source:
 
Members
(static, constant) group
A grouping for this object
- Source:
 
(static, constant) label
A label that can be used when describing this object
- Source:
 
(static, constant) matcher
Matcher can be used to find matching Outgoing Command objects.
- Source:
 - See:
 - 
      
- kit.match
 
 
(static, constant) parentDepth
Describes the number of parents this object has based off schema references. When checking for matches for example, we want to use a schema that is more specific over a more generic schema
- Source:
 
(static, constant) path :string
Paths for the keys on a Outgoing Command
Properties:
| Name | Type | Description | 
|---|---|---|
clientId | 
      
      string | 
           A unique id that differentiates clients from one another.  | 
    
payload | 
      
      string | 
           An object with custom data describing the event.  | 
    
timestamp | 
      
      string | 
           When the command was triggered.  | 
    
rootType | 
      
      string | 
           The type of event. For commands it's always 'control'..  | 
    
vendor | 
      
      string | 
           The vendor of the plugin to receive the command.  | 
    
- Source:
 
(static, constant) ROOT_TYPE
The value for rootType for a Outgoing Command.
Path is type.
- Source:
 
Methods
(static) get(alias, data) → {*}
Retrieves a value from the object. You can provide either a path or an alias.
Parameters:
| Name | Type | Description | 
|---|---|---|
alias | 
        
        string | 
           Path or alias  | 
      
data | 
        
        * | 
           Data to search  | 
      
- Source:
 
(static) getClientId(source) → {string}
Returns the clientId from the Outgoing Command.
This is the a unique id that differentiates clients from one another.
Path is clientId.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) getPayload(source) → {object}
Returns the payload from the Outgoing Command.
This is the an object with custom data describing the event.
Path is payload.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) getPayloadKey(…path, source) → {*}
Returns the data using the specified path from the payload of the Outgoing Command.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
path | 
        
        string | 
            
            
            
              <repeatable> | 
        
        
        
           key in object  | 
      
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) getRootType(source) → {string}
Returns the rootType from the Outgoing Command.
This is the the type of event. For commands it's always 'control'..
Path is type.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) getTimestamp(source) → {number}
Returns the timestamp from the Outgoing Command.
This is the when the command was triggered.
Path is timestamp.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) getVendor(source) → {string}
Returns the vendor from the Outgoing Command.
This is the the vendor of the plugin to receive the command.
Path is vendor.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 
(static) isMatch(source) → {boolean}
Tests the provided source against the matcher to see if it's Outgoing Command event.
Parameters:
| Name | Type | Description | 
|---|---|---|
source | 
        
        object | 
           The Outgoing Command instance  | 
      
- Source:
 - See:
 - 
      
- kit.isMatch
 
 
(static) make(…input) → {object}
Generates a Outgoing Command with the const values set. Can be useful in testing. Can provide additional data by providing a flat object of paths and values.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
input | 
        
        function | 
            
            
            
              <repeatable> | 
        
        
        
           Overrides  | 
      
- Source:
 
(static) mock(…input) → {object}
Generates a Outgoing Command with some default values set. Can be useful in testing. Can override defaults and provide additional data by providing a flat object of paths and values.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
input | 
        
        function | 
            
            
            
              <repeatable> | 
        
        
        
           Overrides  | 
      
- Source: