UNPKG

@tradle/models

Version:
127 lines (126 loc) 2.52 kB
{ "id": "tradle.Message", "type": "tradle.Model", "title": "Message", "notEditable": true, "properties": { "object": { "type": "object", "inlined": true, "ref": "tradle.Object" }, "context": { "type": "string" }, "forward": { "type": "string" }, "originalSender": { "type": "string", "description": "for proxied messages" }, "originalRecipient": { "type": "string", "description": "for proxied messages" }, "inReplyTo": { "type": "string" }, "iOfN": { "type": "object", "properties": { "i": { "type": "number" }, "n": { "type": "number" } } }, "_n": { "type": "number", "readOnly": true, "immutable": true, "description": "message sequence number, for this recipient", "sample": "random.number" }, "_q": { "type": "string", "readOnly": true, "immutable": true, "description": "link to the previous message sent to this recipient", "sample": "hash" }, "_time": { "type": "date", "readOnly": true, "immutable": true, "sample": "timestamp.recent", "title": "Date" }, "_recipient": { "type": "string", "title": "Recipient" }, "_payloadType": { "type": "string", "range": "model", "title": "Payload type", "virtual": true }, "_payloadLink": { "type": "string", "virtual": true }, "_payloadRecipient": { "type": "string", "virtual": true }, "_inbound": { "type": "boolean", "virtual": true }, "_counterparty": { "type": "string", "virtual": true, "description": "_author if inbound, _recipient otherwise" }, "_dcounterparty": { "type": "string", "virtual": true, "description": "property used for indexing in/outbound messages by counterparty" }, "_dataBundle": { "type": "string", "readOnly": true } }, "required": [ "object", "_time", "_recipient" ], "primaryKeys": { "hashKey": "_counterparty", "rangeKey": "_time" }, "viewCols": [ "_recipient", "_payloadType", "context", "_time" ], "indexes": [ { "hashKey": "_dcounterparty", "rangeKey": "_time" }, { "hashKey": "context", "rangeKey": "_time" }, { "hashKey": "_link" } ] }