From a203c3855259998900c7e962eed2fbb3a184dcd8 Mon Sep 17 00:00:00 2001 From: Paul Dyson Date: Fri, 22 Apr 2022 10:43:28 +0100 Subject: [PATCH] View Orders PR. This commit closes #588 --- docs/context/ref/Contact.md | 3 +- docs/context/ref/Instrument.md | 5 ++-- docs/context/ref/Organization.md | 1 + docs/intents/ref/ViewHoldings.md | 1 + docs/intents/ref/ViewInstrument.md | 3 +- docs/intents/ref/ViewOrders.md | 48 ++++++++++++++++++++++++++++++ docs/intents/spec.md | 3 ++ src/intents/Intents.ts | 1 + src/intents/standard intents.json | 4 +++ website/sidebars.json | 3 +- 10 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 docs/intents/ref/ViewOrders.md diff --git a/docs/context/ref/Contact.md b/docs/context/ref/Contact.md index fe5348f89..ae647995d 100644 --- a/docs/context/ref/Contact.md +++ b/docs/context/ref/Contact.md @@ -49,6 +49,7 @@ Intents - [StartChat](../../intents/ref/StartChat) - [StartCall](../../intents/ref/StartCall) - [ViewContact](../../intents/ref/ViewContact) +- [ViewOrders](../../intents/ref/ViewOrders) FINOS Financial Objects -- [Contact](https://fo.finos.org/docs/objects/contact) \ No newline at end of file +- [Contact](https://fo.finos.org/docs/objects/contact) diff --git a/docs/context/ref/Instrument.md b/docs/context/ref/Instrument.md index 07d2c7077..5fd2d455d 100644 --- a/docs/context/ref/Instrument.md +++ b/docs/context/ref/Instrument.md @@ -19,7 +19,7 @@ In general, the more identifiers an application can provide, the easier it will is for at least one instrument identifier to be provided. - Try to only use instrument identifiers as intended. E.g. the `ticker` property is meant for stock tickers specifically, -if the identifier you want to share is not a stock ticker, or one of the other standardised ones, rather define +if the identifier you want to share is not a stock ticker, or one of the other standardised ones, rather define a property that makes it clear what value it is. This makes it easier for target applications. ## Type @@ -76,6 +76,7 @@ Intents - [ViewInstrument](../../intents/ref/ViewInstrument) - [ViewNews](../../intents/ref/ViewNews) - [ViewQuote](../../intents/ref/ViewQuote) +- [ViewOrders](../../intents/ref/ViewOrders) FINOS Financial Objects -- [Instrument](https://fo.finos.org/docs/objects/instrument) \ No newline at end of file +- [Instrument](https://fo.finos.org/docs/objects/instrument) diff --git a/docs/context/ref/Organization.md b/docs/context/ref/Organization.md index 5b9433dd4..7105d072d 100644 --- a/docs/context/ref/Organization.md +++ b/docs/context/ref/Organization.md @@ -54,6 +54,7 @@ Other Types Intents - [ViewNews](../../intents/ref/ViewNews) - [ViewAnalysis](../../intents/ref/viewAnalysis) +- [ViewOrders](../../intents/ref/ViewOrders) FINOS Financial Objects - [Organization](https://fo.finos.org/docs/objects/organization) diff --git a/docs/intents/ref/ViewHoldings.md b/docs/intents/ref/ViewHoldings.md index 09f06e4d9..0347d057a 100644 --- a/docs/intents/ref/ViewHoldings.md +++ b/docs/intents/ref/ViewHoldings.md @@ -46,3 +46,4 @@ Context Intents - [ViewInstrument](ViewInstrument) - [ViewAnalysis](ViewAnalysis) +- [ViewOrders](ViewOrders) diff --git a/docs/intents/ref/ViewInstrument.md b/docs/intents/ref/ViewInstrument.md index 6006436c1..6047a97c7 100644 --- a/docs/intents/ref/ViewInstrument.md +++ b/docs/intents/ref/ViewInstrument.md @@ -42,4 +42,5 @@ Context Intents -- [ViewChart](ViewChart) \ No newline at end of file +- [ViewChart](ViewChart) +- [ViewOrders](ViewOrders) diff --git a/docs/intents/ref/ViewOrders.md b/docs/intents/ref/ViewOrders.md new file mode 100644 index 000000000..d977316e1 --- /dev/null +++ b/docs/intents/ref/ViewOrders.md @@ -0,0 +1,48 @@ +--- +id: ViewOrders +sidebar_label: ViewOrders +title: ViewOrders +hide_title: true +--- +# `ViewOrders` + +Display any orders related to the provided contact, instrument, or organization. + +## Intent Name + +`ViewOrders` + +## Display Name + +`View Orders` + +## Possible Contexts + +* [Contact](../../context/ref/Contact) +* [Instrument](../../context/ref/Instrument) +* [Organization](../../context/ref/Organization) + +## Example + +```js +const instrument = { + type: 'fdc3.instrument', + name: 'Tesla, Inc.', + id: { + ticker: 'TSLA' + } +} + +fdc3.raiseIntent('ViewOrders', instrument) +``` + +## See Also + +Context +- [Contact](../../context/ref/Contact) +- [Instrument](../../context/ref/Instrument) +- [Organization](../../context/ref/Organization) + +Intents +- [ViewHoldings](ViewHoldings) +- [ViewInstrument](ViewInstrument) diff --git a/docs/intents/spec.md b/docs/intents/spec.md index b615346df..445715800 100644 --- a/docs/intents/spec.md +++ b/docs/intents/spec.md @@ -57,3 +57,6 @@ However, there is a need for applications to ensure that their intents avoid col ### ViewAnalysis * Expected context: Instrument, Organization, etc. * Expected behavior: Send context to receiving application for displaying analysis +### ViewOrders + * Expected context: Contact, Instrument, Organization, etc. + * Expected behavior: Display any orders related to the provided contact, instrument, or organization. diff --git a/src/intents/Intents.ts b/src/intents/Intents.ts index f2619bb89..222c0687f 100644 --- a/src/intents/Intents.ts +++ b/src/intents/Intents.ts @@ -8,4 +8,5 @@ export enum Intents { ViewInstrument = 'ViewInstrument', ViewAnalysis = 'ViewAnalysis', ViewHoldings = 'ViewHoldings', + ViewOrders = 'ViewOrders', } diff --git a/src/intents/standard intents.json b/src/intents/standard intents.json index 0ec5c5352..a7dcb7b58 100644 --- a/src/intents/standard intents.json +++ b/src/intents/standard intents.json @@ -35,6 +35,10 @@ { "name": "ViewHoldings", "displayName": "Holdings" + }, + { + "name": "ViewOrders", + "displayName": "Orders" } ] } diff --git a/website/sidebars.json b/website/sidebars.json index dc4abdadb..2d6beca8b 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -42,7 +42,8 @@ "intents/ref/ViewNews", "intents/ref/ViewAnalysis", "intents/ref/ViewInstrument", - "intents/ref/ViewHoldings" + "intents/ref/ViewHoldings", + "intents/ref/ViewOrders" ] } ],