Skip to content

Commit

Permalink
Interaction context added
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldyson committed Jun 8, 2022
1 parent 10f1e44 commit d74f407
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 5 deletions.
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)
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
4 changes: 1 addition & 3 deletions docs/intents/ref/CreateInteraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,4 @@ fdc3.raiseIntent('CreateInteraction', interaction)
## See Also

Context
- [Contact](../../context/ref/Contact)
- [ContactList](../../context/ref/ContactList)
- [TimeRange](../../context/ref/TimeRange)
- [Interaction](../../context/ref/Interaction)
11 changes: 11 additions & 0 deletions src/context/ContextTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ export interface Email {
richTextBody?: object;
}

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;
Expand Down
1 change: 1 addition & 0 deletions src/context/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
"Country": ["https://fdc3.finos.org/schemas/next/country.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"]
}
5 changes: 3 additions & 2 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"intents/ref/ViewProfile",
"intents/ref/ViewQuote",
"intents/ref/ViewResearch",
"intents/ref/ViewContact",
"intents/ref/CreateInteraction"
"intents/ref/CreateInteraction",
"intents/ref/ViewContact"
]
},
{
Expand All @@ -70,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

0 comments on commit d74f407

Please sign in to comment.