diff --git a/docs/api/DesktopAgent.md b/docs/api/DesktopAgent.md index 867390a7d..45ff557fb 100644 --- a/docs/api/DesktopAgent.md +++ b/docs/api/DesktopAgent.md @@ -254,10 +254,20 @@ The Interface used to describe an Intent within the platform. ```typescript interface AppMetadata { name: string; + title?: string; + tooltip?: string; + description?: string; + icons?: Array; + images?: Array; } ``` -App metadata is Desktop Agent specific - but should always support a name property. +App metadata is provided by the FDC3 App Directory that the desktop agent connects to. + +It always includes at least a `name` property, which can be used with [`open`](#open) and [`raiseIntent`](#raiseIntent). + +Optionally, extra information from the app directory can be returned, to aid in rendering UI elements, e.g. a context menu. +This includes a title, description, tooltip and icon and image URLs. ### `IntentResolution` diff --git a/src/api/interface.ts b/src/api/interface.ts index 34f45433a..5814b8e05 100644 --- a/src/api/interface.ts +++ b/src/api/interface.ts @@ -28,7 +28,10 @@ enum ChannelError { * Intent descriptor */ interface IntentMetadata { + /** The unique name of the intent that can be invoked by the raiseIntent call */ name: string; + + /** A friendly display name for the intent that should be used to render UI elements */ displayName: string; } @@ -42,10 +45,27 @@ interface AppIntent { /** - * App metadata is Desktop Agent specific - but should support a name property. + * App definition as provided by the application directory */ interface AppMetadata { + + /** The unique app name that can be used with the open and raiseIntent calls. */ name: string; + + /** A more user-friendly application title that can be used to render UI elements */ + title?: string; + + /** A tooltip for the application that can be used to render UI elements */ + tooltip?: string; + + /** A longer, multi-paragraph description for the application that could include markup */ + description?: string; + + /** A list of icon URLs for the application that can be used to render UI elements */ + icons?: Array; + + /** A list of image URLs for the application that can be used to render UI elements */ + images?: Array; } /** diff --git a/src/intents/Intent.yaml b/src/intents/Intent.yaml index a489918c0..f7ad43660 100644 --- a/src/intents/Intent.yaml +++ b/src/intents/Intent.yaml @@ -22,7 +22,7 @@ Intent: type: string description: The contexts the intent accepts. This will typically be a set of namespaced context types, e.g. - "org.symphony.contact" + "fdc3.contact" customConfig: type: object description: Custom configuration for the intent diff --git a/src/intents/intent.ts b/src/intents/intent.ts deleted file mode 100644 index 70d57bdd2..000000000 --- a/src/intents/intent.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2019 FINOS FDC3 contributors - see NOTICE file - */ - -/* -* Intent schema -*/ - -interface Intent { - /* - * The name of the intent, default nameing convention is UpperCamelCase - */ - name:string; - /* - * An optional display name for the intent, "name" will be used if left empty - */ - displayName? : string; - /* - * A list of the contexts the intent accepts. This will typically be a set of namespaced context types, e.g. "org.symphony.contact" - */ - contexts?: string[] - /* - * Custom configuration for the intent that may be required for a particular desktop agent. - */ - customConfig?: Object; -} - -/* -* Application schema, to be used in the AppDirectory for apps declaring supported intents -* The full application definiton will be extended with properties defined in the AppDirectory WG -*/ -interface Application { - /* - * List of the intents the application supports - */ - intents:Intent[]; -} \ No newline at end of file