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

Symphony PRs in FDC3 2.1 candidates #882

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
56479cc
feat: Add message type
ZimmySymphony Jul 21, 2022
df75169
Add ChatRoom
symphony-jean-michael Aug 5, 2022
75141ff
review: make intent type free, rename intent+context to action
Yannick-Malins Aug 5, 2022
4501ef2
Add SendChatMessage Intent
symphony-jean-michael Aug 5, 2022
d30e3e9
Add ChatMessage context
symphony-jean-michael Aug 5, 2022
44c2d61
Add ChatRoom and ChatMessage to the documentation
symphony-jean-michael Aug 5, 2022
81699a9
added Action, set Types on Message and Action, did doc
Yannick-Malins Aug 5, 2022
37712ce
merge master
Yannick-Malins Aug 5, 2022
864ad77
typo
Yannick-Malins Aug 5, 2022
bc31906
Add ChatRoom and SendChatMessage in Typescript
symphony-jean-michael Aug 8, 2022
100f416
Add SearchCriteria Context
symphony-jean-michael Aug 8, 2022
3afbfec
Link ChatRoom and ChatMessage schemas in main schema
symphony-jean-michael Aug 8, 2022
f98866c
typos
Yannick-Malins Aug 16, 2022
f2c89da
Update ChatMessage.md
mistryvinay Aug 24, 2022
59fbd9f
rename chat.message to message to make space for PR765
Yannick-Malins Aug 29, 2022
2eb75d8
Lint file
symphony-jean-michael Aug 29, 2022
a57e625
Remove the html entitites
symphony-jean-michael Aug 29, 2022
6e1c104
Add SeachCriteria link
symphony-jean-michael Aug 29, 2022
f236082
Merge remote-tracking branch 'upstream/master' into feature/ViewMessages
symphony-jean-michael Sep 1, 2022
d31fb7b
Hugh review
Yannick-Malins Sep 1, 2022
864f756
Update the description to be more generic
symphony-jean-michael Sep 1, 2022
56ddcd7
kris review
Yannick-Malins Sep 1, 2022
5f9b52c
Reorder links
symphony-jean-michael Sep 1, 2022
1a344df
more kris review
Yannick-Malins Sep 1, 2022
b517682
Update descriptions
symphony-jean-michael Sep 1, 2022
6ab7ece
Restore the HTML entities
symphony-jean-michael Sep 1, 2022
1d7f05b
Flip the order of the example
symphony-jean-michael Sep 1, 2022
81dfc54
Update links
symphony-jean-michael Sep 1, 2022
24ecdfe
Replace URI with URL
symphony-jean-michael Sep 1, 2022
91f9a67
Update description
symphony-jean-michael Sep 1, 2022
ca41bfe
Merge remote-tracking branch 'upstream/master' into feature/SendChatM…
symphony-jean-michael Sep 1, 2022
82229d9
Update description
symphony-jean-michael Sep 2, 2022
a54ae60
Rename contexts in criteria
symphony-jean-michael Sep 2, 2022
2b9931a
Rename fdc3.searchCriteria into fdc3.chat.searchCriteria
symphony-jean-michael Sep 6, 2022
342173f
#644 | Add Order and OrderLeg Context Types
nemery-flextrade Sep 29, 2022
e1bb738
Empty criteria
symphony-jean-michael Oct 4, 2022
58ab363
Update StartChat description
symphony-jean-michael Oct 28, 2022
86aa01b
Add ViewChat Intent
symphony-jean-michael Aug 8, 2022
cbc349b
Add ViewChat entry in the unreleased section of the changelog.md
symphony-jean-michael Nov 9, 2022
0172785
Rename SearchCriteria in ChatSearchCriteria
symphony-jean-michael Nov 10, 2022
89d2fec
Rename searchCriteria in chatSearchCriteria
symphony-jean-michael Nov 10, 2022
41b3384
Add ViewMessages entry in the unreleased section of the changelog.md
symphony-jean-michael Nov 10, 2022
bfc8c03
Remove unnecessary 'type' because it's already required by context sc…
symphony-jean-michael Nov 10, 2022
6a62c40
Add SendChatMessage, ChatRoom and ChatMessage in the Changelog
symphony-jean-michael Nov 10, 2022
9d6df85
kris review
Yannick-Malins Nov 23, 2022
7586c45
Merge branch 'master' into message_container
Yannick-Malins Nov 23, 2022
c7ad6ab
Merge feature/SendChatMessage
symphony-jean-michael Dec 8, 2022
a729cf7
Merge feature/ViewChat
symphony-jean-michael Dec 8, 2022
6564051
Merge feature/ViewMessages
symphony-jean-michael Dec 8, 2022
f887601
Merge Yannick-Symphony:message_container
symphony-jean-michael Dec 8, 2022
6f92481
Update ChatRoom examples
symphony-jean-michael Dec 8, 2022
6799b31
Add missing Github PR links
symphony-jean-michael Dec 14, 2022
ddef7d9
Fix syntax by closing the example section
symphony-jean-michael Dec 14, 2022
86310a3
Update ChatRoom examples
symphony-jean-michael Mar 22, 2023
aab2b9e
Merge branch '644-context-type-order' of https://github.com/nemery-fl…
mistryvinay Mar 22, 2023
06ff641
Merge branch 'nemery-flextrade-644-context-type-order' into context-d…
mistryvinay Mar 22, 2023
d9661d1
Merge branch 'context-data-and-intents-consolidated-update-branch-2.1…
symphony-jean-michael Mar 23, 2023
7df7aab
Fix invalid syntax
symphony-jean-michael Mar 23, 2023
b4c2dc2
Use the same syntax for bullets
symphony-jean-michael Mar 23, 2023
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
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added
* Added `CreateInteraction` intent. To be used when a user wants to record an interaction into a system. New context `Interaction` also introduced. An interaction might be a call, IM, email, a meeting (physical or virtual) or the preparation of some specialist data. ([#747](https://github.com/finos/FDC3/pull/747))
* Added `TransactionResult` context. A context type representing the result of a transaction initiated via FDC3. Its purpose is to provide a status and message (where needed) for the transaction and MAY wrap a returned context object. ([#761] (https://github.com/finos/FDC3/pull/761))

* Added `TransactionResult` context. A context type representing the result of a transaction initiated via FDC3. Its purpose is to provide a status and message (where needed) for the transaction and MAY wrap a returned context object. ([#761](https://github.com/finos/FDC3/pull/761))
* Added `Order` (`fdc3.order`) context type representing the details of an order, which may be used to transmit a new order to a third party or share details of an existing order. ([#824](https://github.com/finos/FDC3/pull/824))

* Added a `SendChatMessage` intent to be used when a user wants to send a message to an existing chat room. ([#794](https://github.com/finos/FDC3/pull/794))
* Added a context type representing a chat message (`fdc3.chat.message`). ([#794](https://github.com/finos/FDC3/pull/794))
* Added a context type representing a chat room (`fdc3.chat.room`). ([#794](https://github.com/finos/FDC3/pull/794))
* Added a chat `Message` type in order to describe messages with rich content and attachments. ([#779](https://github.com/finos/FDC3/pull/779))
* Added an `Action` type, encapsulating either a `Context` or the association of a `Context` with an `Intent` inside another object. ([#779](https://github.com/finos/FDC3/pull/779))
* Added a `ViewChat` Intent to be used when a user wants to open an existing chat room. ([#796](https://github.com/finos/FDC3/pull/796))
* Added a `ViewMessages` intent to be used when a user wants to search and see a list of messages. ([#797](https://github.com/finos/FDC3/pull/797))
* Added a context type representing a ChatSearchCriteria (`fdc3.chat.searchCriteria`). ([#797](https://github.com/finos/FDC3/pull/797))

### Changed

* Updated definition of the `ChatInitSettings` context type to use the new `Message` type. ([#779](https://github.com/finos/FDC3/pull/779))
* Updated definition of the `Instrument` context type to include optional market identifiers ([#819](https://github.com/finos/FDC3/pull/819))
* Updated the `StartChat` intent to return a reference to the room. ([#794](https://github.com/finos/FDC3/pull/794))

### Deprecated

Expand Down
74 changes: 74 additions & 0 deletions docs/context/ref/Action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
id: Action
sidebar_label: Action
title: Action
hide_title: true
---
# `Action`

A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object,
for example a chat message.

The action may be completed by calling `fdc3.raiseIntent()` with the specified Intent and Context, or, if only a context is specified, by calling `fdc3.raiseIntentForContext()` (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).

Accepts an optional `app` parameter in order to specify a certain app.

## Type

`fdc3.action`

## Schema

https://fdc3.finos.org/schemas/next/action.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------------|-------------------------------------------|----------|-------------------------|
| `type` | string | Yes | `'fdc3.action'` |
| `title` | string | Yes | `'Click to view Chart'` |
| `intent` | string | No | `'ViewChart'` |
| `context` | string | Yes | See Below |
| `app` | object | No | `'myApp'` |
| `app.appId` | string | Yes | `'app1'` |
| `app.instanceId` | string | No | `'instance1'` |



## Example

```js
const action = {
type: 'fdc3.action',
title: 'Click to view Chart',
intent: 'ViewChart',
context {
type: 'fdc3.chart',
instruments: [
{
type: 'fdc3.instrument',
id: {
ticker: 'EURUSD'
}
}
],
range: {
type: 'fdc3.dateRange',
starttime: '2020-09-01T08:00:00.000Z',
endtime: '2020-10-31T08:00:00.000Z'
},
style: 'candle'
},
app {
appId: 'MyChartViewingApp',
instanceId: 'instance1'
}
}

## See Also

Other Types
* [Message](Message)

Intents
* [StartChat](../../intents/ref/StartChat)
30 changes: 24 additions & 6 deletions docs/context/ref/ChatInitSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ https://fdc3.finos.org/schemas/next/chatInitSettings.schema.json
| Property | Type | Required | Example Value |
| ------------------------------ | ----------- | -------- | -------------------------------------------------------------------- |
| `type` | string | Yes | `'fdc3.chat.initSettings'` |
| `chatName` | string | No | `'Instrument XYZ'` |
| `chatName` | string | No | `'Instrument XYZ'` |
| `members` | ContactList | No | ContactList - cf. below |
| `initMessage` | string | No | `'Hello!'` |
| `message` | Message | No | Message - cf. below |
| `options.groupRecipients` | boolean | No | `true`: if false a separate chat will be created for each member |
| `options.isPublic` | boolean | No | `true`: the room will be visible to everyone in the chat application |
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
| `options.allowMessageCopy` | boolean | No | `true`: members will be allowed to copy/paste messages |
| `options.allowAddUser` | boolean | No | `true`: members will be allowed to add other members to the chat |

Expand Down Expand Up @@ -62,23 +62,41 @@ const initSettings = {
allowHistoryBrowsing: true,
allowMessageCopy: true
}
initMessage: 'Hello both!'
message: {
type: 'fdc3.message',
text: {
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot'
},
entities: {
'0': {
type: 'fdc3.fileAttachment',
data: {
name: 'myImage.png',
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
}
}
}
}
}

const res = fdc3.raiseIntent('StartChat', initSettings);
const roomRefs = await res.getResult();

// Return a reference to the room
const chatRoom = await res.getResult();
```

## See Also

Other Types

- [ChatRoom](ChatRoom)
- [ContactList](ContactList)
- [Message](Message)

Intents

- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [SendChatMessage](../../intents/ref/StartChat)
- [ViewContact](../../intents/ref/ViewContact)

FINOS Financial Objects
Expand Down
51 changes: 51 additions & 0 deletions docs/context/ref/ChatMessage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
id: ChatMessage
sidebar_label: ChatMessage
title: ChatMessage
hide_title: true
---
# `ChatMessage`

A context representing a chat message. Typically used to send the message or to pre-populate a message for sending.

## 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:{ streamId: '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: {
streamId: "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)
64 changes: 64 additions & 0 deletions docs/context/ref/ChatRoom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
id: ChatRoom
sidebar_label: ChatRoom
title: Contact
hide_title: true
---
# `ChatRoom`

Reference to the chat room(s) (which could be used later to send a message to the room(s)).

## Type

`fdc3.chat.room`

## Schema

https://fdc3.finos.org/schemas/next/chatRoom.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.chat.room'` |
| `providerName` | string | Yes | `'Symphony'` |
| `id` | object | Yes | `{ streamId: 'j75xqXy25NBOdacUI3FNBH', anyOtherKey: 'abcdef'}` |
| `url` | string | No | `'http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA'` |
| `name` | string | No | `'My new room'` |

The `url` is an universal url to access to the room. It could be opened from a browser, a mobile app, etc...

## Example

```js
const chatRoom = {
type: "fdc3.chat.room",
providerName: "Symphony",
id: {
streamId: "j75xqXy25NBOdacUI3FNBH"
}
url: "http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA",
name: 'My new room'
};

//Chat rooms are returned by the StartChat intent as a result
const intentResolution = await fdc3.raiseIntent("StartChat", context);

try {
const chatRooms = await intentResolution.getResult():
} catch (error) {
//chat room were not created...
}
```

## See Also

Other Types
* [ChatInitSettings](ChatInitSettings)

Intents
- [StartChat](../../intents/ref/StartChat)
- [SendChatMessage](../../intents/ref/SendChatMessage)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
77 changes: 77 additions & 0 deletions docs/context/ref/Message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
id: Message
sidebar_label: Message
title: Message
hide_title: true
---
# `Message`

A chat message to be sent through an instant messaging application. Can contain one or several text bodies (organised by mime-type, plaintext or markdown),
as well as attached entities (either arbitrary file attachments or FDC3 actions to be embedded in the message). To be put inside a ChatInitSettings object.

## Type

`fdc3.message`

## Schema

https://fdc3.finos.org/schemas/next/message.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------------|-------------------------------------------|----------|-------------------------|
| `type` | string | Yes | `'fdc3.message'` |
| `text` | map of string mime-type to string content | No | { text/plain: 'Hello' } |
| `entities` | map of json entity to string id | No | See Below |

## Example

```js
const message = {
type: 'fdc3.message',
text: {
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot and a link to the current exchange rate'
},
entities: {
'picture1': {
type: 'fdc3.fileAttachment',
data: {
name: 'myImage.png',
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
}
},
'eurusd_action': {
type: 'fdc3.action',
title: 'Click to view Chart',
intent: 'ViewChart',
context: {
type: 'fdc3.chart',
instruments: [
{
type: 'fdc3.instrument',
id: {
ticker: 'EURUSD'
}
}
],
range: {
type: 'fdc3.dateRange',
starttime: '2020-09-01T08:00:00.000Z',
endtime: '2020-10-31T08:00:00.000Z'
},
style: 'candle'
}
}
}
}
```

## See Also
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block of text is also included in the example section. Needs to be moved outside of the example.


Other Types
* [ChatInitSettings](ChatInitSettings)
* [Action](Action)

Intents
* [StartChat](../../intents/ref/StartChat)
42 changes: 42 additions & 0 deletions docs/context/ref/Order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
id: Order
sidebar_label: Order
title: Order
hide_title: true
---
# `Order`

:::caution Experimental

**Note:** This feature has been designated as experimental to indicate that its design may change in the future. To read more about the FDC3 experimental policy pleae visit our [Experimental Features](https://fdc3.finos.org/docs/fdc3-compliance#experimental-features) page.

:::

A context type representing the details of an order, which may be used to transmit a new order to a third party or share details of an existing order.

When the intent is to create an Order in a downstream system at least one OrderLeg MUST be populated.

When the intent is to lookup an Order in a downstream system at least one entry MUST be populated in the id field and other fields are not required.

## Type

`fdc3.order`

## Schema

https://fdc3.finos.org/scehmas/next/order.schema.json

## Details

| Property| Type| Required| Example
| -| -| -| -
| `id` | object | Yes | `{'OMS': '123456789'}`
| `id.OMS` | string | No | `'123456789'`
| `id.EMS` | string | No | `'EMSID1234'`
| `id.PMS` | string | No | `'PMS12345'`
| `sendingTime` | string | Yes | `'2022-03-30T15:44:44+00:00'`
| `timeInForce` | fdc3.timeRange| No | `{type: "fdc3.timeRange", startTime: "2020-09-01T08:00:00.000Z", endTime: "2020-10-31T08:00:00.000Z"}`
| `orderLegs` | fdc3.orderLeg[] | Yes |
| `notes` | String | No


Loading