Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/Add properties of Message #193

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions _includes/scenarios/integrate/data-model-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Note that RelationshipChangeRequest and RelationshipChangeResponse have nothing

## Message

A Message is a piece of data that can be sent to one or more recipients. The sender is completely free in what the content of the Message looks like. Though in order to enable a normalized communication, enmeshed defines some content structures for Messages, and in the future there will be more of those. Consider that the enmeshed App only supports those normalized Message contents. Currently there are:
A Message is a piece of data that can be sent to one or more recipients. The sender is completely free in what the content of the Message looks like. Though in order to enable a normalized communication, enmeshed defines some `content` structures for Messages, and in the future there will be more of those. Consider that the enmeshed App only supports Messages with such a normalized `content`. Currently there are:

- [`Mail`](#mail)
- [`Request`](#request)
Expand All @@ -112,17 +112,19 @@ A Message is a piece of data that can be sent to one or more recipients. The sen

You can read more details about each of these in the corresponding sections of the "Content Types" chapter.

But if you are communicating with another Connector, feel free to settle on any content structure that fits your needs.

| Name | Type | Description | Remarks |
| --------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| id | `string` | {% include descr_id class="Message" prefix="MSG" %} | |
| content | `unknown` | The content of the Message. You can add whatever you want here. However, if it is intended for a User of the enmeshed App, use either `Mail`, `Request`, `Response` or `Notification`. Otherwise feel free to insert whatever you want or need. | will be encrypted before sent to the Backbone |
| createdBy | `string` | {% include descr_createdBy class="Message" %} | |
| createdByDevice | `string` | {% include descr_createdByDevice class="Message" %} | |
| recipients | [`Recipient`](#recipient)`[]` | An array of recipients of this Message. | |
| createdAt | `string` | {% include descr_createdAt class="Message" %} | |
| attachments | `string[]` | An array of [File](#file) IDs you want to attach to your Message. You receive the File ID after you uploaded a file to the Backbone. By attaching a File to a Message, you share the secret key used to encrypt/decrypt the File, which cannot be undone. | |
But if you are communicating with another Connector, feel free to settle on any `content` structure that fits your needs.

| Name | Type | Description | Remarks |
| --------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| id | `string` | {% include descr_id class="Message" prefix="MSG" %} | |
| content | `unknown` | The content of the Message. You can add whatever you want here. However, if it is intended for a User of the enmeshed App, use either `Mail`, `Request`, `Response` or `Notification`. Otherwise feel free to insert whatever you want or need. | will be encrypted before sent to the Backbone |
| createdBy | `string` | {% include descr_createdBy class="Message" %} | |
| createdByDevice | `string` | {% include descr_createdByDevice class="Message" %} | |
| recipients | [`Recipient`](#recipient)`[]` | An array of recipients of this Message. | |
| createdAt | `string` | {% include descr_createdAt class="Message" %} | |
| attachments | `string[]` | An array of [File](#file) IDs you want to attach to your Message. You receive the File ID after you uploaded a file to the Backbone. By attaching a File to a Message, you share the secret key used to encrypt/decrypt the File, which cannot be undone. | |
| isOwn | `boolean` | Indicates whether you are the sender (`true`) or recipient (`false`) of the Message. | |
| wasReadAt | `string` \| `undefined` | A timestamp indicating when the Message was firstly read. If a Message is marked as unread, this will be `undefined`. If a Message is read again, after having marked it as unread, the timestamp is updated. However, if a Message marked as read is read again, it won't be updated. | |

### Recipient

Expand Down
Loading