Skip to content

Commit 69d76bc

Browse files
authored
Merge pull request #157 from rikoe/align-intent-app-metadata
Align intent and application definition between schemas
2 parents 04c0f23 + b7ecb9d commit 69d76bc

File tree

4 files changed

+33
-41
lines changed

4 files changed

+33
-41
lines changed

docs/api/DesktopAgent.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,20 @@ The Interface used to describe an Intent within the platform.
254254
```typescript
255255
interface AppMetadata {
256256
name: string;
257+
title?: string;
258+
tooltip?: string;
259+
description?: string;
260+
icons?: Array<string>;
261+
images?: Array<string>;
257262
}
258263
```
259264

260-
App metadata is Desktop Agent specific - but should always support a name property.
265+
App metadata is provided by the FDC3 App Directory that the desktop agent connects to.
266+
267+
It always includes at least a `name` property, which can be used with [`open`](#open) and [`raiseIntent`](#raiseIntent).
268+
269+
Optionally, extra information from the app directory can be returned, to aid in rendering UI elements, e.g. a context menu.
270+
This includes a title, description, tooltip and icon and image URLs.
261271

262272
### `IntentResolution`
263273

src/api/interface.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ enum ChannelError {
2828
* Intent descriptor
2929
*/
3030
interface IntentMetadata {
31+
/** The unique name of the intent that can be invoked by the raiseIntent call */
3132
name: string;
33+
34+
/** A friendly display name for the intent that should be used to render UI elements */
3235
displayName: string;
3336
}
3437

@@ -42,10 +45,27 @@ interface AppIntent {
4245

4346

4447
/**
45-
* App metadata is Desktop Agent specific - but should support a name property.
48+
* App definition as provided by the application directory
4649
*/
4750
interface AppMetadata {
51+
52+
/** The unique app name that can be used with the open and raiseIntent calls. */
4853
name: string;
54+
55+
/** A more user-friendly application title that can be used to render UI elements */
56+
title?: string;
57+
58+
/** A tooltip for the application that can be used to render UI elements */
59+
tooltip?: string;
60+
61+
/** A longer, multi-paragraph description for the application that could include markup */
62+
description?: string;
63+
64+
/** A list of icon URLs for the application that can be used to render UI elements */
65+
icons?: Array<string>;
66+
67+
/** A list of image URLs for the application that can be used to render UI elements */
68+
images?: Array<string>;
4969
}
5070

5171
/**

src/intents/Intent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Intent:
2222
type: string
2323
description: The contexts the intent accepts. This will
2424
typically be a set of namespaced context types, e.g.
25-
"org.symphony.contact"
25+
"fdc3.contact"
2626
customConfig:
2727
type: object
2828
description: Custom configuration for the intent

src/intents/intent.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)