diff --git a/docs/context/ref/ChatMessage.md b/docs/context/ref/ChatMessage.md new file mode 100644 index 000000000..6c4ca72c7 --- /dev/null +++ b/docs/context/ref/ChatMessage.md @@ -0,0 +1,51 @@ +--- +id: ChatMessage +sidebar_label: ChatMessage +title: ChatMessage +hide_title: true +--- +# `ChatMessage` + +Message to send to a chat. + +## Type + +`fdc3.chat.message` + +## Schema + +- https://fdc3.finos.org/schemas/next/chatMessage.schema.json + +## Details + +| Property | Type | Required | Example Value | +|-------------|---------|----------|-------------------| +| `type` | string | Yes | `'fdc3.chat.message'` | +| `chatRoom` | ChatRoom | Yes | `{ type: 'fdc3.chat.room', providerName: 'Symphony', id:{ roomdId: 'j75xqXy25NBOdacUI3FNBH'} }` | +| `message` | [Message](https://fdc3.finos.org/schemas/next/message.schema.json) | Yes | `'A message to send'` | + +## Example + +```js +const chatMessage = { + type: "fdc3.chat.message", + chatRoom: { + type: 'fdc3.chat.room', + providerName: "Symphony", + id: { + roomId: "j75xqXy25NBOdacUI3FNBH" + } + }, + message: "A message to send" +} +``` + +## See Also + +Intents +- [StartChat](../../intents/ref/StartChat) +- [StartCall](../../intents/ref/StartCall) +- [SendChatMessage](../../intents/ref/SendChatMessage) + +FINOS Financial Objects +- [Contact](https://fo.finos.org/docs/objects/contact) diff --git a/website/static/schemas/next/chatMessage.schema.json b/website/static/schemas/next/chatMessage.schema.json new file mode 100644 index 000000000..72171d832 --- /dev/null +++ b/website/static/schemas/next/chatMessage.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://fdc3.finos.org/schemas/next/chatMessage.schema.json", + "type": "object", + "title": "ChatMessage", + "allOf": [{ "$ref": "context.schema.json#" }], + "properties": { + "type": { "const": "fdc3.chat.message" }, + "chatRoom": { "$ref": "chatRoom.schema.json#" }, + "message": { "$ref": "message.schema.json#" } + }, + "required": ["type", "chatRoom", "message"] +}