Skip to content
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

Context Data and Intents consolidated update PR #721

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f516d08
ViewProfile addition and ViewContact deprecation
pauldyson Mar 8, 2022
ba28500
Update docs/intents/ref/ViewProfile.md
pauldyson Mar 9, 2022
dd2580d
Update docs/intents/ref/ViewContact.md
pauldyson Mar 9, 2022
e8ec3f4
Update website/sidebars.json
pauldyson Mar 9, 2022
0bd657f
Merge branch 'finos:master' into master
pauldyson Mar 14, 2022
8355d97
Merge branch 'finos:master' into master
pauldyson Mar 18, 2022
d5d4d5d
Merge branch 'finos:master' into master
pauldyson Mar 21, 2022
2494f9e
Update docs/intents/ref/ViewContact.md
pauldyson Apr 22, 2022
42b20e8
Merge branch 'finos:master' into master
pauldyson Apr 22, 2022
c5e5884
Update to Intent Naming Conventions
mistryvinay May 9, 2022
e279f86
Update docs/intents/overview.md
mistryvinay May 12, 2022
fa5ad09
Update docs/intents/spec.md
mistryvinay May 12, 2022
6f12833
Update docs/intents/spec.md
mistryvinay May 12, 2022
9d4b304
Update docs/intents/spec.md
mistryvinay May 12, 2022
d5eaa12
Update docs/intents/spec.md
mistryvinay May 12, 2022
d31a38b
Update docs/intents/spec.md
mistryvinay May 12, 2022
a02f96b
Updates to CHANGELOG.md
mistryvinay May 12, 2022
1bd8ab2
Deleted blank lines in spec.md
mistryvinay May 12, 2022
71896f4
Merge branch 'finos:master' into master
pauldyson May 14, 2022
b3829bc
Merge pull request #701 from mistryvinay/master
mistryvinay May 17, 2022
9f2d7a5
Merge branch 'master' of https://github.com/singletracksystems/FDC3 i…
mistryvinay May 18, 2022
1a0c12a
Merge branch 'singletracksystems-master' into context-data-and-intent…
mistryvinay May 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ website/static/toolbox
website/node_modules
website/i18n/*
website/package-lock.json

.idea/
*.iml
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### Added
* Updated for Intent Naming conventions. Added hyperlinks for existing Intent spec definitions. Changes based on ([#701](https://github.com/finos/FDC3/pull/701))
* Definition of the `icons` property of `AppMetadata`, based on PWA icon spec ([#319](https://github.com/finos/FDC3/pull/319))
* Added support for raiseIntent without a context via the addition of the `fdc3.nothing` context type ([#375](https://github.com/finos/FDC3/pull/375))
* Added [**FDC3 Workbench**](https://fdc3.finos.org/toolbox/fdc3-workbench/), an FDC3 API developer application ([#457](https://github.com/finos/FDC3/pull/457))
Expand Down
4 changes: 2 additions & 2 deletions docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Other Types
Intents
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [ViewContact](../../intents/ref/ViewContact)
- [ViewProfile](../../intents/ref/ViewProfile)

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

FINOS Financial Objects
- [Organization](https://fo.finos.org/docs/objects/organization)
4 changes: 2 additions & 2 deletions docs/intents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const intentsAndApps = await fdc3.findIntentsByContext({

## Using Intents without a context
As the [Desktop Agent API](api/ref/DesktopAgent) and [App Directory](app-directory/overview) both
require a context to specified whereever intents are used, using an intent without a context is
achieved through the use of an explcit `null` context type `fdc3.nothing`. By using an explicit type
require a context to be specified wherever intents are used, using an intent without a context is
achieved through the use of an explicit `null` context type `fdc3.nothing`. By using an explicit type
to represent a lack of context we allow applications to declare their support for a lack of
context.

Expand Down
4 changes: 3 additions & 1 deletion docs/intents/ref/ViewContact.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ title: ViewContact
hide_title: true
---
# `ViewContact`
> **Note:** ViewContact has been deprecated in FDC3 2.0 in favour of the more general [ViewProfile](ViewProfile)


View details for a contact.

Expand Down Expand Up @@ -40,4 +42,4 @@ Context
- [Contact](../../context/ref/Contact)

Intents
- [StartChat](StartChat)
- [StartChat](StartChat)
45 changes: 45 additions & 0 deletions docs/intents/ref/ViewProfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: ViewProfile
sidebar_label: ViewProfile
title: ViewProfile
hide_title: true
---
# `ViewProfile`

Display basic profile information for the individual or organization provided as context.

## Intent Name

`ViewProfile`

## Display Name

`View Profile`

## Possible Contexts

* [Contact](../../context/ref/Contact)
* [Organization](../../context/ref/Organization)

## Example

```js
const contact = {
type: 'fdc3.contact',
name: 'Jane Doe',
id: {
email: 'jane@mail.com'
}
}

fdc3.raiseIntent('ViewProfile', contact)
```

## See Also

Context
* [Contact](../../context/ref/Contact)
* [Organization](../../context/ref/Organization)

Intents
* [ViewHoldings](ViewHoldings)
74 changes: 47 additions & 27 deletions docs/intents/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ title: Intents Specification (next)

FDC3 [Intents](intents-intro) define a standard set of verbs that, in conjunction with context data acting as nouns, can be used to put together common cross-application workflows on the financial desktop.

### Naming Syntax
### Naming Conventions
Naming of Intents SHOULD follow the below guidelines:
* Intent names should be free of non-alphanumeric characters.
* ‘.’ will be used to namespace the intent (see below).
* Intent names should be in UpperCamelCase.

> **Note:** The naming guidelines should be adhered to when creating future Intents. This is to ensure they meet the criteria for addition to the FDC3 standard and to provide a consistent user experience.

### Characteristics

Intents shoulde be:
When creating Intents they should be:
* Recognizable
* Generally self-evident what the thing is
* Repeatable
Expand All @@ -29,31 +32,48 @@ Intents shoulde be:

### Namespaces ###
All standard intent names are reserved. Applications may use their own intents ad hoc.
However, there is a need for applications to ensure that their intents avoid collision. The recommended approach here is to use the app name as the noun. For example, the ‘myChart’ App may expose the ‘ViewChart’ intent and the ‘myChart.Foo’ proprietary intent.
However, there is occasionally a need for applications to ensure that their intents avoid collision, for example, where a workflow is highly specific to or internal to an application. The recommended approach is to namespace the intent with the application name. For example, the ‘myChart’ App may expose the ‘ViewChart’ intent and the ‘myChart.Foo’ proprietary intent.

### Intent Name Prefixes
Early versions of the FDC3 standard included 8 intents, which used one of two different prefixes. The two initial prefixes were `View___` and `Start___`. These are used to help define the behavior of the expected app when resolving the intent.

### `View___`
* Expected behaviour: Content should be displayed to the user.

### `Start___`
* Expected behaviour: An interaction, such as a chat room or email thread, should be initiated.

As more use cases were identified it was clear further Intents were required. FDC3 2.0 expanded this set to include the following:

### `Create___`
* Expected behaviour: A new record or entity should be created. The operation should fail if it already exists.

### `Update___`
* Expected behaviour: An existing record or entity should be updated. The operation should fail if it does not exist.

### `CreateOrUpdate___`
* Expected behaviour: A new record or entity should be created, or an existing one updated if it exists.

### `Delete___`
* Expected behaviour: An existing record or entity should be deleted. The operation should fail if it does not exist.

### `Get___`
* Expected behaviour: A record or entity should be retrieved and returned as an intent result. The operation should fail if the record does not exist.

### `Share___`
* Expected behaviour: A record or entity should shared. The operation should fail if it does not exist

## Initial Set of Standard Intents ##
A list of standardized intents are defined in the following pages:
* [`StartCall`](ref/StartCall)
* [`StartChat`](ref/StartChat)
* [`ViewChart`](ref/ViewChart)
* [`ViewQuote`](ref/ViewQuote)
* [`ViewNews`](ref/ViewNews)
* [`ViewAnalysis`](ref/ViewAnalysis)
* [`ViewHoldings`](ref/ViewHoldings)
* [`ViewInstrument`](ref/ViewInstrument)
* [`ViewProfile`](ref/ViewProfile)

### StartCall
* Expected context: Contact
* Expected behavior: initiate call with contact(s)
### StartChat
* Expected context: Contact
* Expected behavior: initiate chat with contact(s)
### ViewChart
* Expected context: Instrument
* Expected behavior: display a chart for the context
### ViewContact
* Expected context: Contact
* Expected behavior: display details of a contact
### ViewQuote
* Expected context: Instrument
* Expected behavior: display pricing for an instrument
### ViewNews
* Expected context: Instrument, Contact, Organization, etc.
* Expected behavior: display news for a given context
### ViewInstrument
* Expected context: Instrument
* Expected behavior: display relevant information for a given instrument
### ViewAnalysis
* Expected context: Instrument, Organization, etc.
* Expected behavior: Send context to receiving application for displaying analysis
## Deprecated Intents ##
* [`ViewContact`](ref/ViewContact)
1 change: 1 addition & 0 deletions src/intents/Intents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export enum Intents {
ViewInstrument = 'ViewInstrument',
ViewAnalysis = 'ViewAnalysis',
ViewHoldings = 'ViewHoldings',
ViewProfile = 'ViewProfile',
}
4 changes: 4 additions & 0 deletions src/intents/standard intents.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
{
"name": "ViewHoldings",
"displayName": "Holdings"
},
{
"name": "ViewProfile",
"displayName": "Profile"
}
]
}
11 changes: 9 additions & 2 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@
"intents/ref/StartCall",
"intents/ref/StartChat",
"intents/ref/ViewChart",
"intents/ref/ViewContact",
"intents/ref/ViewQuote",
"intents/ref/ViewNews",
"intents/ref/ViewAnalysis",
"intents/ref/ViewInstrument",
"intents/ref/ViewHoldings"
"intents/ref/ViewHoldings",
"intents/ref/ViewProfile"
]
},
{
"type": "subcategory",
"label": "Deprecated",
"ids": [
"intents/ref/ViewContact"
]
}
],
Expand Down