Skip to content

Commit

Permalink
Merge branch '592-intent-proposal-create-interaction' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/singletracksystems/FDC3 into singletracksystems-592-intent-proposal-create-interaction
  • Loading branch information
mistryvinay committed Jul 1, 2022
2 parents 507b457 + 6abb14d commit d0481e9
Show file tree
Hide file tree
Showing 15 changed files with 1,883 additions and 1,543 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Added an `interop` field to AppD application records, replacing the `intents` field, to more fully describe an app's use of FDC3 and enable search for apps that 'interoperate' with a selected app ([#697](https://github.com/finos/FDC3/pull/697))
* Added `AppIdentifier` type, which is a new parent of `AppMetadata` and clarifies required fields for API call parameters which now prefer `appId` and `instanceId` over `name` ([#722](https://github.com/finos/FDC3/pull/722))
* Added a `getAppMetdata()` function to the desktop agent that can be used to retrieve the full `AppMetadata` for an `AppIdentifier` and reduced types such as `IntentResolution.source` and `ContextMetadata.source` from `AppMetadata` to `AppIdentifier` to clarify what fields a developer can rely on and that they should manually retrieve the full `AppMetadata` when they need it for display purposes. ([#751](https://github.com/finos/FDC3/pull/751))
* Added a `CreateInteraction` Intent. An interaction is a significant direct exchange of ideas or information between parties. Interaction type could be defined as a call, email, a meeting (physical or virtual), an IM ([#747](https://github.com/finos/FDC3/pull/747))

### Changed

Expand Down
1 change: 1 addition & 0 deletions docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Intents
- [ViewResearch](../../intents/ref/ViewResearch)
- [ViewInteractions](../../intents/ref/ViewInteractions)
- [ViewOrders](../../intents/ref/ViewOrders)
- [CreateInteraction](../../intents/ref/CreateInteraction)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
1 change: 1 addition & 0 deletions docs/context/ref/ContactList.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Other Types
Intents
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [CreateInteraction](../../intents/ref/CreateInteraction)

FINOS Financial Objects
- [ContactList](https://fo.finos.org/docs/objects/contactlist)
87 changes: 87 additions & 0 deletions docs/context/ref/Interaction.md
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)

Intents
- [CreateInteraction](../../intents/ref/CreateInteraction)
3 changes: 3 additions & 0 deletions docs/context/ref/TimeRange.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ const timeRange = {
Other Types

- [Chart](Chart)

Intents
- [CreateInteraction](../../intents/ref/CreateInteraction)
1 change: 1 addition & 0 deletions docs/context/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ 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))
- [`fdc3.organization`](ref/Organization) ([schema](/schemas/next/organization.schema.json))
Expand Down
69 changes: 69 additions & 0 deletions docs/intents/ref/CreateInteraction.md
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)

## 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)
```

## See Also

Context
- [Interaction](../../context/ref/Interaction)
1 change: 1 addition & 0 deletions docs/intents/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

### Deprecated Intents

Expand Down
15 changes: 15 additions & 0 deletions src/context/ContextTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ export interface Email {
recipients: RecipientsObject;
subject?: string;
textBody?: string;
}

export interface Interaction {
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;
id?: { [key: string]: string };
name?: string;
Expand Down
1 change: 1 addition & 0 deletions src/context/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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"],
"Nothing": ["https://fdc3.finos.org/schemas/next/nothing.schema.json"],
Expand Down
37 changes: 37 additions & 0 deletions src/context/schemas/interaction.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"]
}
1 change: 1 addition & 0 deletions src/intents/Intents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export enum Intents {
ViewProfile = 'ViewProfile',
ViewQuote = 'ViewQuote',
ViewResearch = 'ViewResearch',
CreateInteraction = 'CreateInteraction',
}
4 changes: 4 additions & 0 deletions src/intents/standard intents.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
{
"name": "ViewOrders",
"displayName": "Orders"
},
{
"name": "CreateInteraction",
"displayName": "Create Interaction"
}
]
}
2 changes: 2 additions & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"intents/ref/ViewProfile",
"intents/ref/ViewQuote",
"intents/ref/ViewResearch",
"intents/ref/CreateInteraction",
"intents/ref/ViewContact"
]
},
Expand All @@ -69,6 +70,7 @@
"context/ref/Country",
"context/ref/Currency",
"context/ref/Email",
"context/ref/Interaction",
"context/ref/Instrument",
"context/ref/InstrumentList",
"context/ref/Nothing",
Expand Down
Loading

0 comments on commit d0481e9

Please sign in to comment.