Skip to content

Commit

Permalink
Merge pull request #763 from finos/636-optional-API-features
Browse files Browse the repository at this point in the history
636 optional api features
  • Loading branch information
kriswest authored Jun 23, 2022
2 parents 274a46d + d98640e commit 4929bd8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api/ref/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ let current = await fdc3.getCurrentChannel();
getInfo(): Promise<ImplementationMetadata>;
```
Retrieves information about the FDC3 Desktop Agent implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number and the metadata of the calling application according to the desktop agent.
Retrieves information about the FDC3 Desktop Agent implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
Returns an [`ImplementationMetadata`](Metadata#implementationmetadata) object. This metadata object can be used to vary the behavior of an application based on the version supported by the Desktop Agent and for logging purposes.
Expand Down
13 changes: 13 additions & 0 deletions docs/api/ref/Metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,19 @@ interface ImplementationMetadata {
*/
readonly providerVersion?: string;

/** Metadata indicating whether the Desktop Agent implements optional features of
* the Desktop Agent API.
*/
readonly optionalFeatures: {
/** Used to indicate whether the exposure of 'origninating app metadata' for
* context and intent messages is supported by the Desktop Agent.*/
"OriginatingAppMetadata": boolean;
/** Used to indicate whether the optional `fdc3.joinUserChannel`,
* `fdc3.getCurrentChannel` and `fdc3.leaveCurrentChannel` are implemented by
* the Desktop Agent.*/
"UserChannelMembershipAPIs": boolean;
};

/** The calling application instance's own metadata, according to the
* Desktop Agent (MUST include at least the `appId` and `instanceId`).
*/
Expand Down
1 change: 1 addition & 0 deletions docs/api/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ An FDC3 Standard compliant Desktop Agent implementation **MUST**:
- [`raiseIntentForContext`](ref/DesktopAgent#raiseintentforcontext)
- Provide an ID for each [`PrivateChannel`](ref/PrivateChannel) created via [`createPrivateChannel`](ref/DesktopAgent#createprivatechannel) and prevent them from being retrieved via [`getOrCreateChannel`](ref/DesktopAgent#getorcreatechannel) by ID.
- Only require app directories that they connect to to have implemented only the minimum requirements specified in the [App Directory API Part](../app-directory/spec) of this Standard.
- Provide details of whether they implement optional features of the Desktop Agent API in the `optionalFeatures` property of the [`ImplementationMetadata`](ref/Metadata#implementationmetadata) object returned by the [`fdc3.getInfo()`](ref/DesktopAgent#getinfo) function.

An FDC3 Standard compliant Desktop Agent implementation **SHOULD**:

Expand Down
17 changes: 15 additions & 2 deletions src/api/ImplementationMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,25 @@ export interface ImplementationMetadata {
*/
readonly fdc3Version: string;

/** The name of the provider of the FDC3 Desktop Agent Implementation (e.g. Finsemble, Glue42, OpenFin etc.). */
/** The name of the provider of the Desktop Agent implementation (e.g. Finsemble, Glue42, OpenFin etc.). */
readonly provider: string;

/** The version of the provider of the FDC3 Desktop Agent Implementation (e.g. 5.3.0). */
/** The version of the provider of the Desktop Agent implementation (e.g. 5.3.0). */
readonly providerVersion?: string;

/** Metadata indicating whether the Desktop Agent implements optional features of
* the Desktop Agent API.
*/
readonly optionalFeatures: {
/** Used to indicate whether the exposure of 'origninating app metadata' for
* context and intent messages is supported by the Desktop Agent.*/
OriginatingAppMetadata: boolean;
/** Used to indicate whether the optional `fdc3.joinUserChannel`,
* `fdc3.getCurrentChannel` and `fdc3.leaveCurrentChannel` are implemented by
* the Desktop Agent.*/
UserChannelMembershipAPIs: boolean;
};

/** The calling application instance's own metadata, according to the Desktop Agent (MUST include at least the `appId` and `instanceId`). */
readonly appMetadata: AppMetadata;
}

0 comments on commit 4929bd8

Please sign in to comment.