Skip to content

Commit e966570

Browse files
committed
feat: Add ViewHoldings intent (#497)
- Add new intent documentation page and include in sidebar. - Add to Intents enumeration for npm package. - Add to standard intents JSON file. Resolves #497
1 parent 5b8ee37 commit e966570

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed

docs/intents/ref/ViewHoldings.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
id: ViewHoldings
3+
sidebar_label: ViewHoldings
4+
title: ViewHoldings
5+
hide_title: true
6+
---
7+
# `ViewHoldings`
8+
9+
Display any holdings for the provided instrument, list of instruments, or organization.
10+
11+
## Intent Name
12+
13+
`ViewHoldings`
14+
15+
## Display Name
16+
17+
`View Holdings`
18+
19+
## Possible Contexts
20+
21+
* [Instrument](../../context/ref/Instrument)
22+
* [InstrumentList](../../context/ref/InstrumentList)
23+
* [Organization](../../context/ref/Organization)
24+
25+
## Example
26+
27+
```js
28+
const instrument = {
29+
type: 'fdc3.instrument',
30+
name: 'Tesla, Inc.',
31+
id: {
32+
ticker: 'TSLA'
33+
}
34+
}
35+
36+
fdc3.raiseIntent('ViewHoldings', instrument)
37+
```
38+
39+
## See Also
40+
41+
Context
42+
- [Instrument](../../context/ref/Instrument)
43+
- [InstrumentList](../../context/ref/InstrumentList)
44+
- [Organization](../../context/ref/Organization)
45+
46+
Intents
47+
- [ViewInstrument](ViewInstrument)
48+
- [ViewAnalysis](ViewAnalysis)

src/intents/Intents.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export enum Intents {
77
ViewNews = 'ViewNews',
88
ViewInstrument = 'ViewInstrument',
99
ViewAnalysis = 'ViewAnalysis',
10+
ViewHoldings = 'ViewHoldings',
1011
}

src/intents/standard intents.json

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
{
3232
"name": "ViewAnalysis",
3333
"displayName": "Analyze"
34+
},
35+
{
36+
"name": "ViewHoldings",
37+
"displayName": "Holdings"
3438
}
3539
]
3640
}

website/sidebars.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"intents/ref/ViewQuote",
4040
"intents/ref/ViewNews",
4141
"intents/ref/ViewAnalysis",
42-
"intents/ref/ViewInstrument"
42+
"intents/ref/ViewInstrument",
43+
"intents/ref/ViewHoldings"
4344
]
4445
}
4546
],

0 commit comments

Comments
 (0)