From 0375d8c4286e80c6ebccd766f82dcbe83f395e47 Mon Sep 17 00:00:00 2001 From: Milena Czierlinski Date: Mon, 19 Feb 2024 10:11:50 +0000 Subject: [PATCH 1/2] chore: add isOwn and wasReadAt to Message --- .../integrate/data-model-overview.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/_includes/scenarios/integrate/data-model-overview.md b/_includes/scenarios/integrate/data-model-overview.md index 09311575b..728ef5403 100644 --- a/_includes/scenarios/integrate/data-model-overview.md +++ b/_includes/scenarios/integrate/data-model-overview.md @@ -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 those normalized Message `content`s. Currently there are: - [`Mail`](#mail) - [`Request`](#request) @@ -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 From b6b44459fa7a808ffb7ba857a775bfdbf03296ea Mon Sep 17 00:00:00 2001 From: Milena Czierlinski Date: Mon, 19 Feb 2024 10:15:58 +0000 Subject: [PATCH 2/2] feat: formate 'content' in text --- _includes/scenarios/integrate/data-model-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/scenarios/integrate/data-model-overview.md b/_includes/scenarios/integrate/data-model-overview.md index 728ef5403..4e150f738 100644 --- a/_includes/scenarios/integrate/data-model-overview.md +++ b/_includes/scenarios/integrate/data-model-overview.md @@ -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 `content`s. 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)