Skip to content

Commit 8015083

Browse files
authored
Merge branch 'fix-context-data-and-intents-consolidated-update-branch-2.1' into 856-chart-otherconfig-improvement
2 parents 3a43bba + 7abfe73 commit 8015083

File tree

88 files changed

+4632
-1415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+4632
-1415
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
88

99
### Added
1010

11+
* 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))
12+
* 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))
1113
* Added error examples to the /v2 App Directory API routes ([#973](https://github.com/finos/FDC3/pull/973))
14+
* 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))
15+
* Added a context type representing a chat message (`fdc3.chat.message`). ([#794](https://github.com/finos/FDC3/pull/794))
16+
* Added a context type representing a chat room (`fdc3.chat.room`). ([#794](https://github.com/finos/FDC3/pull/794))
17+
* Added a chat `Message` type in order to describe messages with rich content and attachments. ([#779](https://github.com/finos/FDC3/pull/779))
18+
* 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))
19+
* 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))
20+
* 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))
21+
* Added a context type representing a ChatSearchCriteria (`fdc3.chat.searchCriteria`). ([#797](https://github.com/finos/FDC3/pull/797))
1222

1323
### Changed
1424

25+
* Updated definition of the `ChatInitSettings` context type to use the new `Message` type. ([#779](https://github.com/finos/FDC3/pull/779))
26+
* Updated the `StartChat` intent to return a reference to the room. ([#794](https://github.com/finos/FDC3/pull/794))
1527
* Updated definition of the `Instrument` context type to include optional market identifiers ([#819](https://github.com/finos/FDC3/pull/819))
1628
* Corrected API functions and object types to always use `string` instead of `String` ([#924](https://github.com/finos/FDC3/pull/924))
1729
* Updated definition of the `otherConfig` element of the `Chart` context type from an Object to an array of Contexts as this allows the `type` of each additional item of config to be examined before it is used ([#985](https://github.com/finos/FDC3/pull/985))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Whilst all 3 roles require some amount of attention, being an Editor or Maintain
156156
### How do you become a Participant, Editor or Maintainer?
157157
Becoming an FDC3 participant is as easy as attending meetings and/or raising issues for changes you'd like see in the Standard, commenting on issues others have raised or even asking questions (which can often result in the clarification of the Standard's documentation to help others with the same questions in future).
158158

159-
If you are going to use, implement or benefit from the FDC3 Standard, we also recommend that you sign up as a voting participant. To do so, please use this link: [[email protected]](mailto:[email protected]?subject=Please%20enroll%20me%20as%20FDC3%20standard%20participant&cc=fdc3-pmc%40finos.org&body=HI%2C%20my%20name%20is%20%3CFirstName%20LastName%3E%20and%20I%27d%20like%20to%20formally%20participate%20to%20the%20FDC3%20standard%20process.%20I%20plan%20to%20contribute%20as%20%3Cindividual%7Con%20behalf%20of%20organizationName%3E%20and%20I%20have%20reviewed%20the%20policies%20described%20at%20https%3A%2F%2Fgithub.com%2Ffinos%2Fcommunity%2Ftree%2Fmaster%2Fgovernance%2FStandards-Projects%20.%20Thank%20you!) to send a templated email email to join the enrolled voting participants group. Please note that standard participants are bound to the provisions in the [FINOS IP Policy](https://github.com/finos/community/blob/master/website/static/governance-docs/IP-Policy.pdf) as described in the [FINOS Standards governance document](https://github.com/finos/community/tree/master/governance/Standards-Projects).
159+
If you are going to use, implement or benefit from the FDC3 Standard, we also recommend that you sign up as a voting participant. To do so, please use this link: [[email protected]](mailto:[email protected]?subject=Please%20enroll%20me%20as%20FDC3%20standard%20participant&cc=fdc3-pmc%40finos.org&body=HI%2C%20my%20name%20is%20%3CFirstName%20LastName%3E%20and%20I%27d%20like%20to%20formally%20participate%20to%20the%20FDC3%20standard%20process.%20I%20plan%20to%20contribute%20as%20%3Cindividual%7Con%20behalf%20of%20organizationName%3E%20and%20I%20have%20reviewed%20the%20policies%20described%20at%20https%3A%2F%2Fgithub.com%2Ffinos%2Fcommunity%2Ftree%2Fmaster%2Fgovernance%2FStandards-Projects%20.%20Thank%20you!) to send a templated email email to join the enrolled voting participants group. Please note that standard participants are bound to the provisions in the [FINOS IP Policy](https://github.com/finos/community/blob/master/website/static/governance-docs/IP-Policy.pdf) as described in the [FINOS Standards governance document](https://community.finos.org/docs/governance/#open-standard-projects).
160160

161161
Upon enrollment as an [FDC3 voting participant](https://github.com/orgs/finos/teams/fdc3-participants), you will be invited to join the [FINOS GitHub organization](https://github.com/orgs/finos/people) and the [fdc3-participants](https://github.com/orgs/finos/teams/fdc3-participants) GitHub team.
162162

docs/context/ref/Action.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
id: Action
3+
sidebar_label: Action
4+
title: Action
5+
hide_title: true
6+
---
7+
# `Action`
8+
9+
A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object,
10+
for example a chat message.
11+
12+
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).
13+
14+
Accepts an optional `app` parameter in order to specify a certain app.
15+
16+
## Type
17+
18+
`fdc3.action`
19+
20+
## Schema
21+
22+
https://fdc3.finos.org/schemas/next/action.schema.json
23+
24+
## Details
25+
26+
| Property | Type | Required | Example Value |
27+
|-------------------|-------------------------------------------|----------|-------------------------|
28+
| `type` | string | Yes | `'fdc3.action'` |
29+
| `title` | string | Yes | `'Click to view Chart'` |
30+
| `intent` | string | No | `'ViewChart'` |
31+
| `context` | string | Yes | See Below |
32+
| `app` | object | No | `'myApp'` |
33+
| `app.appId` | string | Yes | `'app1'` |
34+
| `app.instanceId` | string | No | `'instance1'` |
35+
36+
37+
38+
## Example
39+
40+
```js
41+
const action = {
42+
type: 'fdc3.action',
43+
title: 'Click to view Chart',
44+
intent: 'ViewChart',
45+
context {
46+
type: 'fdc3.chart',
47+
instruments: [
48+
{
49+
type: 'fdc3.instrument',
50+
id: {
51+
ticker: 'EURUSD'
52+
}
53+
}
54+
],
55+
range: {
56+
type: 'fdc3.dateRange',
57+
starttime: '2020-09-01T08:00:00.000Z',
58+
endtime: '2020-10-31T08:00:00.000Z'
59+
},
60+
style: 'candle'
61+
},
62+
app {
63+
appId: 'MyChartViewingApp',
64+
instanceId: 'instance1'
65+
}
66+
}
67+
68+
## See Also
69+
70+
Other Types
71+
* [Message](Message)
72+
73+
Intents
74+
* [StartChat](../../intents/ref/StartChat)

docs/context/ref/ChatInitSettings.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ https://fdc3.finos.org/schemas/next/chatInitSettings.schema.json
2222
| Property | Type | Required | Example Value |
2323
| ------------------------------ | ----------- | -------- | -------------------------------------------------------------------- |
2424
| `type` | string | Yes | `'fdc3.chat.initSettings'` |
25-
| `chatName` | string | No | `'Instrument XYZ'` |
25+
| `chatName` | string | No | `'Instrument XYZ'` |
2626
| `members` | ContactList | No | ContactList - cf. below |
27-
| `initMessage` | string | No | `'Hello!'` |
27+
| `message` | Message | No | Message - cf. below |
2828
| `options.groupRecipients` | boolean | No | `true`: if false a separate chat will be created for each member |
29-
| `options.public` | boolean | No | `true`: the room will be visible to everyone in the chat application |
30-
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
29+
| `options.isPublic` | boolean | No | `true`: the room will be visible to everyone in the chat application |
30+
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
3131
| `options.allowMessageCopy` | boolean | No | `true`: members will be allowed to copy/paste messages |
3232
| `options.allowAddUser` | boolean | No | `true`: members will be allowed to add other members to the chat |
3333

@@ -58,27 +58,46 @@ const initSettings = {
5858
},
5959
options: {
6060
groupRecipients: true, // one chat with both contacts
61-
public: false, // private chat room
61+
isPublic: false, // private chat room
6262
allowHistoryBrowsing: true,
6363
allowMessageCopy: true
6464
}
65-
initMessage: 'Hello both!'
65+
message: {
66+
type: 'fdc3.message',
67+
text: {
68+
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot'
69+
},
70+
entities: {
71+
'0': {
72+
type: 'fdc3.fileAttachment',
73+
data: {
74+
name: 'myImage.png',
75+
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
76+
}
77+
}
78+
}
79+
}
6680
}
6781

6882
const res = fdc3.raiseIntent('StartChat', initSettings);
69-
const roomRefs = await res.getResult();
83+
84+
// Return a reference to the room
85+
const chatRoom = await res.getResult();
7086
```
7187

7288
## See Also
7389

7490
Other Types
7591

92+
- [ChatRoom](ChatRoom)
7693
- [ContactList](ContactList)
94+
- [Message](Message)
7795

7896
Intents
7997

8098
- [StartChat](../../intents/ref/StartChat)
8199
- [StartCall](../../intents/ref/StartCall)
100+
- [SendChatMessage](../../intents/ref/StartChat)
82101
- [ViewContact](../../intents/ref/ViewContact)
83102

84103
FINOS Financial Objects

docs/context/ref/ChatMessage.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
id: ChatMessage
3+
sidebar_label: ChatMessage
4+
title: ChatMessage
5+
hide_title: true
6+
---
7+
# `ChatMessage`
8+
9+
A context representing a chat message. Typically used to send the message or to pre-populate a message for sending.
10+
11+
## Type
12+
13+
`fdc3.chat.message`
14+
15+
## Schema
16+
17+
- https://fdc3.finos.org/schemas/next/chatMessage.schema.json
18+
19+
## Details
20+
21+
| Property | Type | Required | Example Value |
22+
|-------------|---------|----------|-------------------|
23+
| `type` | string | Yes | `'fdc3.chat.message'` |
24+
| `chatRoom` | ChatRoom | Yes | `{ type: 'fdc3.chat.room', providerName: 'Symphony', id:{ streamId: 'j75xqXy25NBOdacUI3FNBH'} }` |
25+
| `message` | [Message](https://fdc3.finos.org/schemas/next/message.schema.json) | Yes | `'A message to send'` |
26+
27+
## Example
28+
29+
```js
30+
const chatMessage = {
31+
type: "fdc3.chat.message",
32+
chatRoom: {
33+
type: 'fdc3.chat.room',
34+
providerName: "Symphony",
35+
id: {
36+
streamId: "j75xqXy25NBOdacUI3FNBH"
37+
}
38+
},
39+
message: "A message to send"
40+
}
41+
```
42+
43+
## See Also
44+
45+
Intents
46+
- [StartChat](../../intents/ref/StartChat)
47+
- [StartCall](../../intents/ref/StartCall)
48+
- [SendChatMessage](../../intents/ref/SendChatMessage)
49+
50+
FINOS Financial Objects
51+
- [Contact](https://fo.finos.org/docs/objects/contact)

docs/context/ref/ChatRoom.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
id: ChatRoom
3+
sidebar_label: ChatRoom
4+
title: Contact
5+
hide_title: true
6+
---
7+
# `ChatRoom`
8+
9+
Reference to the chat room(s) (which could be used later to send a message to the room(s)).
10+
11+
## Type
12+
13+
`fdc3.chat.room`
14+
15+
## Schema
16+
17+
https://fdc3.finos.org/schemas/next/chatRoom.schema.json
18+
19+
## Details
20+
21+
| Property | Type | Required | Example Value |
22+
|-------------|---------|----------|-------------------|
23+
| `type` | string | Yes | `'fdc3.chat.room'` |
24+
| `providerName` | string | Yes | `'Symphony'` |
25+
| `id` | object | Yes | `{ streamId: 'j75xqXy25NBOdacUI3FNBH', anyOtherKey: 'abcdef'}` |
26+
| `url` | string | No | `'http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA'` |
27+
| `name` | string | No | `'My new room'` |
28+
29+
The `url` is an universal url to access to the room. It could be opened from a browser, a mobile app, etc...
30+
31+
## Example
32+
33+
```js
34+
const chatRoom = {
35+
type: "fdc3.chat.room",
36+
providerName: "Symphony",
37+
id: {
38+
streamId: "j75xqXy25NBOdacUI3FNBH"
39+
}
40+
url: "http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA",
41+
name: 'My new room'
42+
};
43+
44+
//Chat rooms are returned by the StartChat intent as a result
45+
const intentResolution = await fdc3.raiseIntent("StartChat", context);
46+
47+
try {
48+
const chatRooms = await intentResolution.getResult():
49+
} catch (error) {
50+
//chat room were not created...
51+
}
52+
```
53+
54+
## See Also
55+
56+
Other Types
57+
* [ChatInitSettings](ChatInitSettings)
58+
59+
Intents
60+
- [StartChat](../../intents/ref/StartChat)
61+
- [SendChatMessage](../../intents/ref/SendChatMessage)
62+
63+
FINOS Financial Objects
64+
- [Contact](https://fo.finos.org/docs/objects/contact)

docs/context/ref/Contact.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Other Types
4646
- [ContactList](ContactList)
4747

4848
Intents
49+
- [CreateInteraction](../../intents/ref/CreateInteraction)
4950
- [StartChat](../../intents/ref/StartChat)
5051
- [StartCall](../../intents/ref/StartCall)
5152
- [ViewProfile](../../intents/ref/ViewProfile)

docs/context/ref/ContactList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Other Types
6262
- [Contact](Contact)
6363

6464
Intents
65+
- [CreateInteraction](../../intents/ref/CreateInteraction)
6566
- [StartChat](../../intents/ref/StartChat)
6667
- [StartCall](../../intents/ref/StartCall)
6768

0 commit comments

Comments
 (0)