new DataPacket(name, action, data, metas, source, messages, indexed) → {Object}
Creates or returns a normalized data envelope suitable for inter-View messaging (JSON-safe).
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
name |
String | Indicates type of data within. |
|
action |
String | REST-like intention for recipient interface. |
|
data |
Object | Array | Single or multiple data rows for display or processing. |
|
metas |
Object | Array | Single or multiple sets of recipient header information. |
|
source |
String | Indicates to recipient where data originated. (connection|cache|xmpp|api) |
|
messages |
Object | Array |
<optional> |
Single or multiple informational objects to allow communication with recipient in non REST-like ways. |
indexed |
String |
<optional> |
If supplied, data will be converted into a hashlike object with values of the specified property (e.g. id) used as keys. All supplied data objects must contain this property. |
- Source:
Returns:
- Type
- Object