-
Notifications
You must be signed in to change notification settings - Fork 134
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
Merged
mistryvinay
merged 36 commits into
finos:context-data-and-intents-consolidated-update-branch-2.1
from
singletracksystems:592-intent-proposal-create-transaction-result
Mar 22, 2023
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9f6294f
add-create-interaction-intent
milindchidrawar 6accbc1
add-create-interaction-intent
milindchidrawar 10f1e44
add-create-interaction-intent
milindchidrawar d74f407
Interaction context added
pauldyson 6abb14d
update CreateInteraction to use origin instead of source
milindchidrawar 1c37ad0
partial implementation of transaction results
milindchidrawar 2213c26
Example code for TransactionResult
pauldyson c05af21
complete implementation of transaction result
milindchidrawar c1a30b8
update transaction result based on feedback
milindchidrawar 003fb7d
resolve alphabetical sorting for create interaction
milindchidrawar 0db3dfa
updated transactionresult schema and context description
milindchidrawar 453f61d
Merge branch 'master' into 592-intent-proposal-create-transaction-result
milindchidrawar aca7d8b
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 76d57a5
resolve alphabetical sort
milindchidrawar 48f0de0
transaction result context field should be of type Context
milindchidrawar af6ccfb
update transaction result description
milindchidrawar b601840
Adjusting definition of TransactionResult
kriswest 5b0ccbf
Adding note about intents that return data and TransactionResult to I…
kriswest c5fc7cf
Merge pull request #8 from kriswest/592-create-transaction-result-KW-…
milindchidrawar bc8b160
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 6178a3e
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 3d27bbc
updates to context and intent descriptions and cleanup ContextTypes.ts
milindchidrawar ff18e75
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 849d350
include an example transactionresult for create interaction with an id
milindchidrawar d77fc27
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 2799e39
support new id types for interaction
milindchidrawar f1aec8a
full upper case for sourced id types
milindchidrawar 70e83a8
Update docs/intents/ref/CreateInteraction.md
milindchidrawar 0b898eb
Update docs/context/ref/Interaction.md
milindchidrawar 2054efb
Update docs/context/ref/Interaction.md
milindchidrawar 2b27c99
Update docs/intents/ref/CreateInteraction.md
milindchidrawar 5a2246c
Update docs/context/ref/Interaction.md
milindchidrawar a7a0631
Update docs/intents/ref/CreateInteraction.md
milindchidrawar c43c6a0
Update src/context/schemas/interaction.schema.json
milindchidrawar f34e5fa
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar 9d8d14a
added change log item and updated incorrect contacts label. removed l…
milindchidrawar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
id: Interaction | ||
sidebar_label: Interaction | ||
title: Interaction | ||
hide_title: true | ||
--- | ||
# `Interaction` | ||
|
||
An `Interaction` is a significant direct exchange of ideas or information between a number of participants, e.g. 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, such as financial data for a given company or sector. | ||
|
||
Notes: | ||
|
||
- `interactionType` SHOULD be one of `'Instant Message'`, `'Email'`, `'Call'`, or `'Meeting'` although other string values are permitted. | ||
- `origin` is used to represent the application or service that the interaction was created from to aid in tracing the source of an interaction. | ||
- `id` does not need to be populated by the originating application, however the target application could store it for future reference and SHOULD return it in a `TransactionResult`. | ||
- `id` can be used by a target application to pass an identifier back to the originating application after an interaction record has been created, updated or deleted. | ||
- `id.URI` can be used by a target application to pass a record's link back to the originating application. This offers the originating application a way to open the record for a user to view. | ||
|
||
## 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` | | ||
| `id.SINGLETRACK` | string | No | `a0S8d000000uO05EAE` | | ||
| `id.SALESFORCE` | string | No | `a0S8d000000uO05EAE` | | ||
| `id.URI` | string | No | `https://example.com/record/a0S8d000000uO05EAE` | | ||
|
||
|
||
## 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
|
||
- [TransactionResult](TransactionResult] | ||
|
||
Intents | ||
- [CreateInteraction](../../intents/ref/CreateInteraction) | ||
- [ViewInteractions](../../intents/ref/ViewInteractions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` | ||
|
||
A context type representing the result of a transaction initiated via FDC3, which SHOULD be returned as an [`IntentResult`](../../api/Types#intentresult) by intents that create, retrieve, update or delete content or records in another application. Its purpose is to provide a status and message (where needed) for the transaction and MAY wrap a returned context object. | ||
|
||
## Type | ||
|
||
`fdc3.transactionResult` | ||
|
||
## Schema | ||
|
||
https://fdc3.finos.org/schemas/next/transactionresult.schema.json | ||
|
||
## Details | ||
|
||
| Property | Type | Required | Example Value | | ||
|------------|---------|----------|-------------------| | ||
| `type` | string | Yes | 'fdc3.transactionResult' | | ||
| `status` | string | Yes | `"Created" | "Deleted" | "Updated" | "Failed"` | | ||
| `context` | Context | No | See Below | | ||
| `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" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
id: CreateInteraction | ||
sidebar_label: CreateInteraction | ||
title: CreateInteraction | ||
hide_title: true | ||
--- | ||
# `CreateInteraction` | ||
|
||
Create a record documenting an interaction (calls, meetings, etc.) between 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
|
||
* [Interaction](../../context/ref/Interaction) | ||
|
||
SHOULD return context as a result: | ||
|
||
* [TransactionResult](../../context/ref/TransactionResult) | ||
|
||
## 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' | ||
} | ||
|
||
const intentResolution = await fdc3.raiseIntent('CreateInteraction', interaction); | ||
const result = await intentResolution.getResult(); | ||
console.log(result); | ||
``` | ||
|
||
Console log will display: | ||
|
||
```js | ||
{ | ||
type: 'fdc3.transactionResult', | ||
status: 'Created', | ||
context: { | ||
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' | ||
id: { | ||
Singletrack: 'a0S8d000000uO05EAE' | ||
} | ||
}, | ||
message: 'record with id "a0S8d000000uO05EAE" was created' | ||
} | ||
``` | ||
|
||
## See Also | ||
|
||
Context | ||
- [Interaction](../../context/ref/Interaction) | ||
- [TransactionResult](../../context/ref/TransactionResult) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This PR contains the CreateInteraction PR as well (#747)... but as we'll likely considate the PRs as the next step that probably won't matter.
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.
Just be sure to update this one with any changes to the other ;-)