-
Notifications
You must be signed in to change notification settings - Fork 129
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
592 771 context proposal TransactionResult #761
Changes from 9 commits
9f6294f
6accbc1
10f1e44
d74f407
6abb14d
1c37ad0
2213c26
c05af21
c1a30b8
003fb7d
0db3dfa
453f61d
aca7d8b
76d57a5
48f0de0
af6ccfb
b601840
5b0ccbf
c5fc7cf
bc8b160
6178a3e
3d27bbc
ff18e75
849d350
d77fc27
2799e39
f1aec8a
70e83a8
0b898eb
2054efb
2b27c99
5a2246c
a7a0631
c43c6a0
f34e5fa
9d8d14a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ Other Types | |
Intents | ||
- [StartChat](../../intents/ref/StartChat) | ||
- [StartCall](../../intents/ref/StartCall) | ||
- [CreateInteraction](../../intents/ref/CreateInteraction) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alpha sort or rebase PR so this change isn't in here. If you've fixed in the other PR you can merge it into this to bring across - although we prefer clean PRs based off master (rather than branches used in other PRs) |
||
|
||
FINOS Financial Objects | ||
- [ContactList](https://fo.finos.org/docs/objects/contactlist) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
id: Interaction | ||
sidebar_label: Interaction | ||
title: Interaction | ||
hide_title: true | ||
--- | ||
# `Interaction` | ||
|
||
An interaction is a significant direct exchange of ideas or information between a Sell Side party and one or more Buy Side parties. An interaction might be a call, a meeting (physical or virtual), an IM or the preparation of some specialist data. | ||
|
||
Notes: | ||
|
||
- interactionType SHOULD be one of 'Instant Message', 'Email', 'Call', or 'Meeting' although other values can be provided | ||
- origin indicates the application or service that the interaction was created from to aid in tracing the source of the interaction | ||
|
||
## Type | ||
|
||
`fdc3.interaction` | ||
|
||
## Schema | ||
|
||
https://fdc3.finos.org/schemas/next/interaction.schema.json | ||
|
||
## Details | ||
|
||
| Property | Type | Required | Example Value | | ||
|-------------|---------|----------|---------------------| | ||
| `type` | string | Yes | `fdc3.interaction` | | ||
| `participants` | fdc3.contactList | Yes | See below | | ||
| `timeRange` | fdc3.timeRange | Yes | See below | | ||
| `interactionType` | string | Yes | `Instant Message` | | ||
| `description` | string | Yes | `Blah, blah, blah` | | ||
| `initiator` | fdc3.contact | No | See below | | ||
| `origin` | string | No | `Outlook` | | ||
|
||
## Example | ||
|
||
```js | ||
const interaction = { | ||
type: 'fdc3.interaction', | ||
participants: { | ||
type: 'fdc3.contactList', | ||
contacts: [ | ||
{ | ||
type: 'fdc3.contact', | ||
name: 'Jane Doe', | ||
id: { | ||
email: 'jane.doe@mail.com' | ||
} | ||
}, | ||
{ | ||
type: 'fdc3.contact', | ||
name: 'John Doe', | ||
id: { | ||
email: 'john.doe@mail.com' | ||
} | ||
}, | ||
] | ||
}, | ||
interactionType: 'Instant Message', | ||
timeRange: { | ||
type: 'fdc3.timeRange', | ||
startTime: '2022-02-10T15:12:00Z' | ||
}, | ||
description: 'Laboris libero dapibus fames elit adipisicing eu, fermentum, dignissimos laboriosam, erat, risus qui deserunt. Praesentium! Reiciendis. Hic harum nostrud, harum potenti amet? Mauris. Pretium aliquid animi, eget eiusmod integer proident. Architecto ipsum blandit ducimus, possimus illum sunt illum necessitatibus ab litora sed, nonummy integer minus corrupti ducimus iste senectus accumsan, fugiat nostrud? Pede vero dictumst excepturi, iure earum consequuntur voluptatum', | ||
initiator: { | ||
type: 'fdc3.contact', | ||
name: 'Jane Doe', | ||
id: { | ||
email: 'jane.doe@mail.com' | ||
} | ||
}, | ||
origin: 'Outlook' | ||
} | ||
|
||
fdc3.raiseIntent('CreateInteraction', interaction) | ||
``` | ||
|
||
## See Also | ||
|
||
Other Types | ||
- [Contact](Contact) | ||
- [ContactList](ContactList) | ||
- [TimeRange](TimeRange) | ||
milindchidrawar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Intents | ||
- [CreateInteraction](../../intents/ref/CreateInteraction) | ||
milindchidrawar marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,59 @@ | ||||||||||||||
--- | ||||||||||||||
id: TransactionResult | ||||||||||||||
sidebar_label: TransactionResult | ||||||||||||||
title: TransactionResult | ||||||||||||||
hide_title: true | ||||||||||||||
--- | ||||||||||||||
# `TransactionResult` | ||||||||||||||
|
||||||||||||||
The result of any given create, update or delete intent. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets discuss this description (and other docs required) at next meeting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither @pauldyson or I are available to join tomorrow's context and intents discussion meeting I'm afraid. I'm out on annual leave from tomorrow but if you could share your feedback on the description, I will take a look on my return (22nd July). Thanks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heres a start on a deeper description. We'll also need to add something to the Intents overview doc describing the same. I'd suggest adding a new section at the bottom of https://fdc3.finos.org/docs/next/intents/spec for now, called something like:
Suggested change
|
||||||||||||||
|
||||||||||||||
## Type | ||||||||||||||
|
||||||||||||||
`fdc3.transactionResult` | ||||||||||||||
|
||||||||||||||
## Schema | ||||||||||||||
|
||||||||||||||
https://fdc3.finos.org/schemas/next/transactionresult.schema.json | ||||||||||||||
|
||||||||||||||
## Details | ||||||||||||||
|
||||||||||||||
| Property | Type | Required | Example Value | | ||||||||||||||
|-------------|---------|----------|-------------------| | ||||||||||||||
| `type` | Context | Yes | See Below | | ||||||||||||||
| `status` | string | Yes | `'Updated'` | | ||||||||||||||
| `context` | string | Yes | See Below | | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type should be Context, which will allow any other FDC3 context to be wrapped There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been updated now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not seeing the change... however the type filed is now Context... will add a suggestion to correct both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| `message` | string | No | See Below | | ||||||||||||||
|
||||||||||||||
## Example | ||||||||||||||
|
||||||||||||||
```js | ||||||||||||||
const contact = { | ||||||||||||||
type: "fdc3.contact", | ||||||||||||||
name: "Jane Doe", | ||||||||||||||
id: { | ||||||||||||||
email: "jane.doe@mail.com" | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
const resolution = await window.fdc3.raiseIntent('CreateOrUpdateProfile', contact); | ||||||||||||||
const result = await resolution.getResult(); | ||||||||||||||
console.log(JSON.stringify(result)); | ||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
Console log will display: | ||||||||||||||
|
||||||||||||||
```json | ||||||||||||||
{ | ||||||||||||||
"type": "fdc3.transactionResult", | ||||||||||||||
"status": "Updated", | ||||||||||||||
"context": { | ||||||||||||||
"type": "fdc3.contact", | ||||||||||||||
"name": "Jane Doe", | ||||||||||||||
"id": { | ||||||||||||||
"email": "jane.doe@mail.com" | ||||||||||||||
} | ||||||||||||||
}, | ||||||||||||||
"message": "record with id jane.doe@mail.com was updated" | ||||||||||||||
} | ||||||||||||||
``` |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -146,13 +146,15 @@ The following are standard FDC3 context types: | |||||||||||||
- [`fdc3.country`](ref/Country) ([schema](/schemas/next/country.schema.json)) | ||||||||||||||
- [`fdc3.currency`](ref/Currency) ([schema](/schemas/next/currency.schema.json)) | ||||||||||||||
- [`fdc3.email`](ref/Email) ([schema](/schemas/next/email.schema.json)) | ||||||||||||||
- [`fdc3.interaction`](ref/Interaction) ([schema](/schemas/next/interaction.schema.json)) | ||||||||||||||
- [`fdc3.instrument`](ref/Instrument) ([schema](/schemas/next/instrument.schema.json)) | ||||||||||||||
- [`fdc3.instrumentList`](ref/InstrumentList) ([schema](/schemas/next/instrumentList.schema.json)) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls move after the fdc3.instrument* types
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or rather do so in PR #747 - added suggestion there |
||||||||||||||
- [`fdc3.organization`](ref/Organization) ([schema](/schemas/next/organization.schema.json)) | ||||||||||||||
- [`fdc3.portfolio`](ref/Portfolio) ([schema](/schemas/next/portfolio.schema.json)) | ||||||||||||||
- [`fdc3.position`](ref/Position) ([schema](/schemas/next/position.schema.json)) | ||||||||||||||
- [`fdc3.nothing`](ref/Nothing) ([schema](/schemas/next/nothing.schema.json)) | ||||||||||||||
- [`fdc3.timerange`](ref/TimeRange) ([schema](/schemas/next/timerange.schema.json)) | ||||||||||||||
- [`fdc3.transactionResult`](ref/TransactionResult) ([schema](/schemas/next/transactionresult.schema.json)) | ||||||||||||||
- [`fdc3.valuation`](ref/Valuation) ([schema](/schemas/next/valuation.schema.json)) | ||||||||||||||
|
||||||||||||||
__Note:__ The below examples show how the base context data interface can be used to define specific context data objects. | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
id: CreateInteraction | ||
sidebar_label: CreateInteraction | ||
title: CreateInteraction | ||
hide_title: true | ||
--- | ||
# `CreateInteraction` | ||
|
||
Create an interaction with a list of contacts. | ||
|
||
## Intent Name | ||
|
||
`CreateInteraction` | ||
|
||
## Display Name | ||
|
||
`Create Interaction` | ||
|
||
## Possible Contexts | ||
|
||
* [ContactList](../../context/ref/ContactList) | ||
kriswest marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Example | ||
|
||
```js | ||
const interaction = { | ||
type: 'fdc3.interaction', | ||
contacts: { | ||
type: 'fdc3.contactList', | ||
contacts: [ | ||
{ | ||
type: 'fdc3.contact', | ||
name: 'Jane Doe', | ||
id: { | ||
email: 'jane.doe@mail.com' | ||
} | ||
}, | ||
{ | ||
type: 'fdc3.contact', | ||
name: 'John Doe', | ||
id: { | ||
email: 'john.doe@mail.com' | ||
} | ||
}, | ||
] | ||
}, | ||
interactionType: 'Instant Message', | ||
timeRange: { | ||
type: 'fdc3.timeRange', | ||
startTime: '2022-02-10T15:12:00Z' | ||
}, | ||
description: 'Laboris libero dapibus fames elit adipisicing eu, fermentum, dignissimos laboriosam, erat, risus qui deserunt. Praesentium! Reiciendis. Hic harum nostrud, harum potenti amet? Mauris. Pretium aliquid animi, eget eiusmod integer proident. Architecto ipsum blandit ducimus, possimus illum sunt illum necessitatibus ab litora sed, nonummy integer minus corrupti ducimus iste senectus accumsan, fugiat nostrud? Pede vero dictumst excepturi, iure earum consequuntur voluptatum', | ||
initiator: { | ||
type: 'fdc3.contact', | ||
name: 'Jane Doe', | ||
id: { | ||
email: 'jane.doe@mail.com' | ||
} | ||
}, | ||
origin: 'Outlook' | ||
} | ||
|
||
fdc3.raiseIntent('CreateInteraction', interaction) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to see this example show the returned TransactionResult context There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps with a wrapped Interaction object that now contains an ID? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @kriswest I've just submitted another change that includes an example TransactionResult for CreateInteraction. The Interaction context didn't have an id property and so I've introduced one. This should allow a system that creates an interaction to return an id as part of the TransactionResult. This change is pending internal review, but please feel free to take a look and let me know what you think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @kriswest - after going through this with @pauldyson, I've updated Interaction.md to support application specific identifiers (e.g.- id.SINGLETRACK, id.SALESFORCE). The example TransactionResult in CreateInteraction.md uses a Singletrack ID. I've also added 'id.URI' so that an application can pass a link to an interaction record. Although Singletrack automatically opens its interaction logger when an interaction is created, other applications may not. Returning a URI would give an originating application the flexibility to open the created record. Happy to discuss further on this Thursday's call.
milindchidrawar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
## See Also | ||
|
||
Context | ||
- [Interaction](../../context/ref/Interaction) | ||
milindchidrawar marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,7 @@ A list of standardized intents are defined in the following pages: | |
* [`ViewProfile`](ref/ViewProfile) | ||
* [`ViewQuote`](ref/ViewQuote) | ||
* [`ViewResearch`](ref/ViewResearch) | ||
* [`CreateInteraction`](ref/CreateInteraction) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alphabetical order pls |
||
|
||
### Deprecated Intents | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -48,6 +48,17 @@ export interface Email { | |||||||||
richTextBody?: object; | ||||||||||
} | ||||||||||
|
||||||||||
export interface Interaction { | ||||||||||
kriswest marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
id?: { [key: string]: string }; | ||||||||||
type: string; | ||||||||||
participants: ContactList; | ||||||||||
timeRange: TimeRange; | ||||||||||
interactionType: ("Instant Message" | "Email" | "Call" | "Meeting") | string; | ||||||||||
description: string; | ||||||||||
initiator?: Contact; | ||||||||||
origin?: string; | ||||||||||
} | ||||||||||
|
||||||||||
export interface InstrumentList { | ||||||||||
instruments: Instrument[]; | ||||||||||
type: string; | ||||||||||
|
@@ -115,6 +126,13 @@ export interface Nothing { | |||||||||
type: string; | ||||||||||
} | ||||||||||
|
||||||||||
export interface TransactionResult { | ||||||||||
status: ("Created" | "Deleted" | "Updated" | "Failed") | string; | ||||||||||
type: string; | ||||||||||
context: Context; | ||||||||||
message: string; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional fields...
Suggested change
|
||||||||||
} | ||||||||||
|
||||||||||
// Converts JSON strings to/from your types | ||||||||||
// and asserts the results of JSON.parse at runtime | ||||||||||
export class Convert { | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,6 +9,7 @@ | |||||||||||||||
"Country": ["https://fdc3.finos.org/schemas/next/country.schema.json"], | ||||||||||||||||
"Currency": ["https://fdc3.finos.org/schemas/next/currency.schema.json"], | ||||||||||||||||
"Email": ["https://fdc3.finos.org/schemas/next/email.schema.json"], | ||||||||||||||||
"Interaction": ["https://fdc3.finos.org/schemas/next/interaction.schema.json"], | ||||||||||||||||
"Instrument": ["https://fdc3.finos.org/schemas/next/instrument.schema.json"], | ||||||||||||||||
"InstrumentList": ["https://fdc3.finos.org/schemas/next/instrumentList.schema.json"], | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
"Country": ["https://fdc3.finos.org/schemas/next/country.schema.json"], | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copy/paste error? This is already on line 7 |
||||||||||||||||
|
@@ -17,5 +18,6 @@ | |||||||||||||||
"Position": ["https://fdc3.finos.org/schemas/next/position.schema.json"], | ||||||||||||||||
"Nothing": ["https://fdc3.finos.org/schemas/next/nothing.schema.json"], | ||||||||||||||||
"TimeRange": ["https://fdc3.finos.org/schemas/next/timerange.schema.json"], | ||||||||||||||||
"TransactionResult": ["https://fdc3.finos.org/schemas/next/transactionresult.schema.json"], | ||||||||||||||||
"Valuation": ["https://fdc3.finos.org/schemas/next/valuation.schema.json"] | ||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/interaction.schema.json", | ||
"type": "object", | ||
"title": "Interaction", | ||
"allOf": [{ "$ref": "context.schema.json#" }], | ||
"properties": { | ||
"type": { "const": "fdc3.interaction" }, | ||
"participants": { | ||
"$ref": "contactList.schema.json#" | ||
}, | ||
"timeRange": { | ||
"$ref": "timerange.schema.json#" | ||
}, | ||
"interactionType": { | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"enum": ["Instant Message", "Email", "Call", "Meeting"] | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"initiator": { | ||
"$ref": "contact.schema.json#" | ||
}, | ||
"origin": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["contacts", "timeRange", "interactionType", "description"] | ||
milindchidrawar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/transactionresult.schema.json", | ||
"type": "object", | ||
"title": "TransactionResult", | ||
"allOf": [{ "$ref": "context.schema.json#" }], | ||
"properties": { | ||
"type": { "const": "fdc3.transactionResult" }, | ||
"status": { | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"enum": ["Created", "Deleted", "Updated", "Failed"] | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"context": { "$ref": "context.schema.json#" } | ||
kriswest marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"required": ["status", "context"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha sort or rebase PR so this change isn't in here. If you've fixed in the other PR you can merge it into this to bring across - although we prefer clean PRs based off master (rather than branches used in other PRs)