forked from finos/FDC3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.schema.json
67 lines (67 loc) · 2.63 KB
/
action.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/context/action.schema.json",
"title": "Action",
"description": "A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object, for example a chat message.\n\nThe action may be completed by calling `fdc3.raiseIntent()` with the specified Intent and Context, or, if only a context is specified, by calling `fdc3.raiseIntentForContext()` (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).\n\nAccepts an optional `app` parameter in order to specify a specific app.",
"allOf": [{
"type": "object",
"properties": {
"type": { "const": "fdc3.action" },
"title": {
"title": "Action Title",
"description": "A human readable display name for the action",
"type": "string"
},
"intent": {
"title": "Action Intent",
"description": "Optional Intent to raise to perform the actions. Should reference an intent type name, such as those defined in the FDC3 Standard. If intent is not set then `fdc3.raiseIntentForContext` should be used to perform the action as this will usually allow the user to choose the intent to raise.",
"type": "string"
},
"context": {
"title": "Action Context",
"description": "A context object with which the action will be performed",
"$ref": "context.schema.json#"
},
"app": {
"title": "Action Target App",
"description": "An optional target application identifier that should perform the action",
"allOf": [
{ "$ref": "../api/api.schema.json#/definitions/AppIdentifier" }
]
}
},
"required": [
"title", "context"
]
},
{ "$ref": "context.schema.json#/definitions/BaseContext" }
],
"examples": [
{
"type": "fdc3.action",
"title": "Click to view Chart",
"intent": "ViewChart",
"context": {
"type": "fdc3.chart",
"instruments": [
{
"type": "fdc3.instrument",
"id": {
"ticker": "EURUSD"
}
}
],
"range": {
"type": "fdc3.dateRange",
"starttime": "2020-09-01T08:00:00.000Z",
"endtime": "2020-10-31T08:00:00.000Z"
},
"style": "candle"
},
"app" :{
"appId": "MyChartViewingApp",
"instanceId": "instance1"
}
}
]
}