Skip to content

Commit f3d4269

Browse files
committed
Align intent and application definition between schemas
Fixes #19 and #156
1 parent 0c13bf3 commit f3d4269

File tree

3 files changed

+33
-45
lines changed

3 files changed

+33
-45
lines changed

src/api/interface.ts

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,50 @@ enum ResolveError {
2121
/**
2222
* Intent descriptor
2323
*/
24-
interface IntentMetadata {
24+
interface Intent {
25+
26+
// The name of the intent, default naming convention is UpperCamelCase
2527
name: string;
26-
displayName: string;
28+
29+
// An optional display name for the intent, "name" will be used if left empty
30+
displayName?: string;
31+
32+
// A list of the contexts the intent accepts. This will typically be a set of namespaced context types, e.g. "fdc3.contact"
33+
contexts?: string[]
34+
35+
// Custom configuration for the intent that may be required for a particular desktop agent.
36+
customConfig?: object;
2737
}
2838

2939
/**
3040
* An interface that relates an intent to apps
3141
*/
3242
interface AppIntent {
33-
intent: IntentMetadata;
34-
apps: Array<AppMetadata>;
43+
intent: Intent;
44+
apps: Array<Application>;
3545
}
3646

3747
/**
38-
* App metadata is Desktop Agent specific - but should support a name property.
48+
* App definition as provided by the application directory
3949
*/
40-
interface AppMetadata {
50+
interface Application {
51+
appId: string;
4152
name: string;
53+
title?: string;
54+
tooltip?: string;
55+
description?: string;
56+
images?: Array<AppImage>;
57+
icons?: Array<Icon>;
58+
intents?: Array<Intent>;
59+
customConfig?: Array<{name: string, value: string}>;
60+
}
61+
62+
interface AppImage {
63+
url: string;
64+
}
65+
66+
interface Icon {
67+
icon: string;
4268
}
4369

4470
/**

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)