Skip to content

Commit

Permalink
View Orders PR. This commit closes #588
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldyson committed Apr 22, 2022
1 parent 1c5445b commit a203c38
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
- [Contact](https://fo.finos.org/docs/objects/contact)
5 changes: 3 additions & 2 deletions docs/context/ref/Instrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
- [Instrument](https://fo.finos.org/docs/objects/instrument)
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)
- [ViewOrders](../../intents/ref/ViewOrders)

FINOS Financial Objects
- [Organization](https://fo.finos.org/docs/objects/organization)
1 change: 1 addition & 0 deletions docs/intents/ref/ViewHoldings.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ Context
Intents
- [ViewInstrument](ViewInstrument)
- [ViewAnalysis](ViewAnalysis)
- [ViewOrders](ViewOrders)
3 changes: 2 additions & 1 deletion docs/intents/ref/ViewInstrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ Context


Intents
- [ViewChart](ViewChart)
- [ViewChart](ViewChart)
- [ViewOrders](ViewOrders)
48 changes: 48 additions & 0 deletions docs/intents/ref/ViewOrders.md
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions docs/intents/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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',
ViewOrders = 'ViewOrders',
}
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": "ViewOrders",
"displayName": "Orders"
}
]
}
3 changes: 2 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"intents/ref/ViewNews",
"intents/ref/ViewAnalysis",
"intents/ref/ViewInstrument",
"intents/ref/ViewHoldings"
"intents/ref/ViewHoldings",
"intents/ref/ViewOrders"
]
}
],
Expand Down

0 comments on commit a203c38

Please sign in to comment.