Skip to content

Align intent and application definition between schemas #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/api/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;
images?: Array<string>;
}
```

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`

Expand Down
22 changes: 21 additions & 1 deletion src/api/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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<string>;

/** A list of image URLs for the application that can be used to render UI elements */
images?: Array<string>;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/intents/Intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 0 additions & 38 deletions src/intents/intent.ts

This file was deleted.