Skip to content
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

Upgrade FDC3 website to docusaurus >=3.5.2 #1371 #1418

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
48 changes: 24 additions & 24 deletions docs/api/ref/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface DesktopAgent {
getCurrentChannel() : Promise<Channel | null>;
leaveCurrentChannel() : Promise<void>;

// non-context events
// non-context events
addEventListener(type: FDC3EventTypes | null, handler: EventHandler): Promise<Listener>;

//implementation info
Expand Down Expand Up @@ -145,7 +145,7 @@ const listener = await fdc3.addContextListener(null, context => { ... });
const contactListener = await fdc3.addContextListener('fdc3.contact', contact => { ... });

// listener that logs metadata for the message a specific type
const contactListener = await fdc3.addContextListener('fdc3.contact', (contact, metadata) => {
const contactListener = await fdc3.addContextListener('fdc3.contact', (contact, metadata) => {
console.log(`Received context message\nContext: ${contact}\nOriginating app: ${metadata?.source}`);
//do something else with the context
});
Expand Down Expand Up @@ -210,7 +210,7 @@ Whenever the handler function is called it will be passed an event object with d
const listener = await fdc3.addEventListener(null, event => { ... });

// listener for a specific event type that logs its details
const userChannelChangedListener = await fdc3.addEventListener("userChannelChanged ", event => {
const userChannelChangedListener = await fdc3.addEventListener("userChannelChanged ", event => {
console.log(`Received event ${event.type}\n\tDetails: ${event.details}`);
//do something else with the event
});
Expand Down Expand Up @@ -277,7 +277,7 @@ const listener = fdc3.addIntentListener('StartChat', context => {
});

//Handle a raised intent and log the originating app metadata
const listener = fdc3.addIntentListener('StartChat', (contact, metadata) => {
const listener = fdc3.addIntentListener('StartChat', (contact, metadata) => {
console.log(`Received intent StartChat\nContext: ${contact}\nOriginating app: ${metadata?.source}`);
return;
});
Expand Down Expand Up @@ -492,7 +492,7 @@ _desktopAgent.AddIntentListener<Instrument>("QuoteStream", async (context, metad
var disconnectListener = channel.OnDisconnect(() => {
_feed.stop(symbol);
});

return channel;
});
```
Expand Down Expand Up @@ -599,8 +599,8 @@ const appIntent = await fdc3.findIntent("StartChat");
// {
// intent: { name: "StartChat" },
// apps: [
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Slack" }
// ]
// }
Expand All @@ -610,14 +610,14 @@ await fdc3.raiseIntent(appIntent.intent.name, context, appIntent.apps[0]);

//later, we want to raise 'StartChat' intent again
const appIntent = await fdc3.findIntent("StartChat");
// returns an AppIntent, but with multiple options for resolution,
// returns an AppIntent, but with multiple options for resolution,
// which includes an existing instance of an application:
// {
// intent: { name: "StartChat" },
// apps: [
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Symphony", instanceId: "93d2fe3e-a66c-41e1-b80b-246b87120859" },
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Symphony", instanceId: "93d2fe3e-a66c-41e1-b80b-246b87120859" },
// { appId: "Slack" }
// ]
```
Expand Down Expand Up @@ -742,11 +742,11 @@ const appIntents = await fdc3.findIntentsByContext(context);
// apps: [{ appId: "Skype" }]
// },
// {
// intent: { name: "StartChat" },
// intent: { name: "StartChat" },
// apps: [
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Symphony", instanceId: "93d2fe3e-a66c-41e1-b80b-246b87120859" },
// { appId: "Skype" },
// { appId: "Symphony" },
// { appId: "Symphony", instanceId: "93d2fe3e-a66c-41e1-b80b-246b87120859" },
// { appId: "Slack" }
// ]
// },
Expand Down Expand Up @@ -779,7 +779,7 @@ const appIntentsForType = await fdc3.findIntentsByContext(context, "fdc3.Contact
// intent: { name: "ViewContact" },
// apps: [{ appId: "Symphony" }, { appId: "MyCRM", resultType: "fdc3.ContactList"}]
// }];

// select a particular intent to raise
const startChat = appIntents[1];

Expand Down Expand Up @@ -1259,7 +1259,7 @@ If an error occurs while opening the app, the promise MUST be rejected with an `
let appIdentifier = { appId: 'myApp-v1.0.1' };
let instanceIdentifier = await fdc3.open(appIdentifier);

// Open an app with context
// Open an app with context
let instanceIdentifier = await fdc3.open(appIdentifier, context);
```

Expand All @@ -1271,7 +1271,7 @@ let instanceIdentifier = await fdc3.open(appIdentifier, context);
var appIdentifier = new AppIdentifier("myApp-v1.0.1");
var instanceIdentifier = await _desktopAgent.Open(appIdentifier);

// Open an app with context
// Open an app with context
var instanceIdentifier = await _desktopAgent.Open(appIdentifier, context);
```

Expand Down Expand Up @@ -1307,7 +1307,7 @@ Task<IIntentResolution> RaiseIntent(string intent, IContext context, IAppIdentif
Raises a specific intent for resolution against apps registered with the desktop agent.

The desktop agent MUST resolve the correct app to target based on the provided intent name and context data. If multiple matching apps are found, a method for resolving the intent to a target app, such as presenting the user with a resolver UI allowing them to pick an app, SHOULD be provided.
Alternatively, the specific app or app instance to target can also be provided. A list of valid target applications and instances can be retrieved via [`findIntent`](DesktopAgent#findintent).
Alternatively, the specific app or app instance to target can also be provided. A list of valid target applications and instances can be retrieved via [`findIntent`](DesktopAgent#findintent).

If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, the promise MUST be rejected with an `Error` object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration, or (if connected to a Desktop Agent Bridge) the [`BridgingError`](Errors#bridgingerror) enumeration. If a specific target `app` parameter was set, but either the app or app instance is not available, the promise MUST be rejected with an `Error` object with either the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` string as its `message`. If an invalid context object is passed as an argument the promise MUST be rejected with an `Error` object with the [`ResolveError.MalformedContext`](Errors#resolveerror) string as its `message`.

Expand Down Expand Up @@ -1348,7 +1348,7 @@ try {
} else {
console.error(`${resolution.source} didn't return anything`
}
}
}
catch (error: ResultError) {
console.error(`${resolution.source} returned a result error: ${error}`);
}
Expand Down Expand Up @@ -1476,7 +1476,7 @@ Not implemented
</TabItem>
</Tabs>

Adds a listener for incoming context broadcasts from the Desktop Agent. Provided for backwards compatibility with versions FDC3 standard <2.0.
Adds a listener for incoming context broadcasts from the Desktop Agent. Provided for backwards compatibility with versions FDC3 standard &lt;2.0.

**See also:**

Expand Down Expand Up @@ -1550,7 +1550,7 @@ Not implemented
</TabItem>
</Tabs>

Version of `open` that launches an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard <2.0.
Version of `open` that launches an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard &lt;2.0.

**See also:**

Expand All @@ -1575,7 +1575,7 @@ Not implemented
</TabItem>
</Tabs>

Version of `raiseIntent` that targets an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard <2.0.
Version of `raiseIntent` that targets an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard &lt;2.0.

**See also:**

Expand All @@ -1600,7 +1600,7 @@ Not implemented
</TabItem>
</Tabs>

Version of `raiseIntentForContext` that targets an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard <2.0.
Version of `raiseIntentForContext` that targets an app by name rather than `AppIdentifier`. Provided for backwards compatibility with versions of the FDC3 Standard &lt;2.0.

**See also:**

Expand Down
6 changes: 3 additions & 3 deletions docs/app-directory/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ knowledge of the AppD instance location.

### Authentication and Entitlements

The AppD API specification defines the optional use of an access token to identify the requesting user/launcher and implement authorizations which may affect appD API responses. For example, different subsets of the full list of applications may be returned for different users depending on their role in an organization.
The AppD API specification defines the optional use of an access token to identify the requesting user/launcher and implement authorizations which may affect appD API responses. For example, different subsets of the full list of applications may be returned for different users depending on their role in an organization.

The specification does not define or make mandatory any authorizations or roles that a provider or enterprise can define.

Expand All @@ -116,7 +116,7 @@ However, in order to do so, you must first discover the location of an app direc
Three methods for discovering app directory services are defined in this Standard:

1. **Static configuration:** Statically defined URI records for use within client applications (typically a Desktop Agent implementation) directly.
2. **Fully-qualified appID namespace syntax host resolution:** Discovery of the appD location using a fully qualified application ID (appId) domain name.
2. **Fully-qualified appID namespace syntax host resolution:** Discovery of the appD location using a fully qualified application ID (appId) domain name.
3. **DNS lookup by domain name:** Discovery of the appD location using a domain name to lookup DNS SRV records identifying the host server location and TCP port. ([RFC2782](https://tools.ietf.org/html/rfc2782))

App directory service host discovery implementations SHOULD support each of these methods and MUST support at least static configuration.
Expand All @@ -138,7 +138,7 @@ A launcher can then easily construct a URI by:
3. URI port is default `https/443`, but can be overridden by the launcher
4. URI url is by default `/api/appd/(version)/apps` . Calls that are made without version MUST automatically default to latest, i.e. `/api/appd/apps/app1` should return the same result as `/api/appd/v2/apps/app1".

The resulting URI to retrieve application data for `app1` would be <https://appd.foo.com/api/appd/v2/apps/[email protected]>
The resulting URI to retrieve application data for `app1` would be [https://appd.foo.com/api/appd/v2/apps/[email protected]](https://appd.foo.com/api/appd/v2/apps/[email protected])

### DNS/SRV Records

Expand Down
60 changes: 56 additions & 4 deletions docs/context/ref/Action.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,36 @@ sidebar_label: Action

A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object, for example a chat message.

The action may be completed by calling `fdc3.raiseIntent()` with the specified Intent and Context, or, if only a context is specified, by calling `fdc3.raiseIntentForContext()` (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).
The action may be completed by calling:
- `fdc3.raiseIntent()` with the specified Intent and Context
- `fdc3.raiseIntentForContext()` if only a context is specified, (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).
- `channel.broadcast()` with the specified Context, if the `broadcast` action has been defined.

Accepts an optional `app` parameter in order to specify a specific app.

## Schema

<https://fdc3.finos.org/schemas/next/context/action.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/action.schema.json))
[https://fdc3.finos.org/schemas/next/context/action.schema.json](https://fdc3.finos.org/schemas/next/context/action.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/action.schema.json))

## Type

`fdc3.action`

## Properties

<details>
<summary><code>action</code></summary>

**type**: `string` with values:
- `broadcast`,
- `raiseIntent`

The **action** field indicates the type of action:
- **raiseIntent** : If no action or `raiseIntent` is specified, then `fdc3.raiseIntent` or `fdc3.raiseIntentForContext` will be called with the specified context (and intent if given).
- **broadcast** : If `broadcast` and a `channelId` are specified then `fdc3.getOrCreateChannel(channelId)` is called to retrieve the channel and broadcast the context to it with `channel.broadcast(context)`. If no `channelId` has been specified, the context should be broadcast to the current channel (`fdc3.broadcast()`)

</details>

<details>
<summary><code>title</code> <strong>(required)</strong></summary>

Expand Down Expand Up @@ -50,20 +66,30 @@ A context object with which the action will be performed

</details>

<details>
<summary><code>channelId</code></summary>

**type**: `string`

Optional channel on which to broadcast the context. The `channelId` property is ignored unless the `action` is broadcast.

</details>

<details>
<summary><code>app</code></summary>

**type**: api/AppIdentifier

An optional target application identifier that should perform the action
An optional target application identifier that should perform the action. The `app` property is ignored unless the action is raiseIntent.

</details>

## Example
## Examples

```json
{
"type": "fdc3.action",
"action": "raiseIntent",
"title": "Click to view Chart",
"intent": "ViewChart",
"context": {
Expand All @@ -90,3 +116,29 @@ An optional target application identifier that should perform the action
}
```

```json
{
"type": "fdc3.action",
"action": "broadcast",
"channelId": "Channel 1",
"title": "Click to view Chart",
"context": {
"type": "fdc3.chart",
"instruments": [
{
"type": "fdc3.instrument",
"id": {
"ticker": "EURUSD"
}
}
],
"range": {
"type": "fdc3.dateRange",
"starttime": "2020-09-01T08:00:00.000Z",
"endtime": "2020-10-31T08:00:00.000Z"
},
"style": "candle"
}
}
```

3 changes: 1 addition & 2 deletions docs/context/ref/BaseContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: BaseContext

## Schema

<https://github.com/finos/FDC3/tree/main/schemas/context/context.schema.json>
[https://github.com/finos/FDC3/tree/main/schemas/context/context.schema.json](https://github.com/finos/FDC3/tree/main/schemas/context/context.schema.json)

## Type

Expand All @@ -29,4 +29,3 @@ sidebar_label: BaseContext
**type**: `object`

</details>

2 changes: 1 addition & 1 deletion docs/context/ref/Chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In addition to handling requests to plot charts, a charting application may use

## Schema

<https://fdc3.finos.org/schemas/next/context/chart.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chart.schema.json))
[https://fdc3.finos.org/schemas/next/context/chart.schema.json](https://fdc3.finos.org/schemas/next/context/chart.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chart.schema.json))
bingenito marked this conversation as resolved.
Show resolved Hide resolved

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/ChatInitSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A collection of settings to start a new chat conversation

## Schema

<https://fdc3.finos.org/schemas/next/context/chatInitSettings.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatInitSettings.schema.json))
[https://fdc3.finos.org/schemas/next/context/chatInitSettings.schema.json](https://fdc3.finos.org/schemas/next/context/chatInitSettings.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatInitSettings.schema.json))

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/ChatMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A context representing a chat message. Typically used to send the message or to

## Schema

<https://fdc3.finos.org/schemas/next/context/chatMessage.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatMessage.schema.json))
[https://fdc3.finos.org/schemas/next/context/chatMessage.schema.json](https://fdc3.finos.org/schemas/next/context/chatMessage.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatMessage.schema.json))

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/ChatRoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Reference to the chat room which could be used to send a message to the room

## Schema

<https://fdc3.finos.org/schemas/next/context/chatRoom.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatRoom.schema.json))
[https://fdc3.finos.org/schemas/next/context/chatRoom.schema.json](https://fdc3.finos.org/schemas/next/context/chatRoom.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatRoom.schema.json))

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/ChatSearchCriteria.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A context type that represents a simple search criterion, based on a list of oth

## Schema

<https://fdc3.finos.org/schemas/next/context/chatSearchCriteria.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatSearchCriteria.schema.json))
[https://fdc3.finos.org/schemas/next/context/chatSearchCriteria.schema.json](https://fdc3.finos.org/schemas/next/context/chatSearchCriteria.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/chatSearchCriteria.schema.json))

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A person contact that can be engaged with through email, calling, messaging, CMS

## Schema

<https://fdc3.finos.org/schemas/next/context/contact.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/contact.schema.json))
[https://fdc3.finos.org/schemas/next/context/contact.schema.json](https://fdc3.finos.org/schemas/next/context/contact.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/contact.schema.json))

## Type

Expand Down
2 changes: 1 addition & 1 deletion docs/context/ref/ContactList.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The contact list schema does not explicitly include identifiers in the `id` sect

## Schema

<https://fdc3.finos.org/schemas/next/context/contactList.schema.json> ([github](https://github.com/finos/FDC3/tree/main/schemas/context/contactList.schema.json))
[https://fdc3.finos.org/schemas/next/context/contactList.schema.json](https://fdc3.finos.org/schemas/next/context/contactList.schema.json) ([github](https://github.com/finos/FDC3/tree/main/schemas/context/contactList.schema.json))

## Type

Expand Down
4 changes: 2 additions & 2 deletions docs/context/ref/Context.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide_title: true
---
# `Context`

The `fdc3.context` type defines the basic contract or "shape" for all data exchanged by FDC3 operations. As such, it is not
The `fdc3.context` type defines the basic contract or "shape" for all data exchanged by FDC3 operations. As such, it is not
really meant to be used on its own, but is imported by more specific type definitions (standardised or custom) to provide
the structure and properties shared by all FDC3 context data types.

Expand All @@ -24,7 +24,7 @@ can be expected to have, but this can always be extended with custom fields as a

## Schema

<https://fdc3.finos.org/schemas/next/context/context.schema.json>
[https://fdc3.finos.org/schemas/next/context/context.schema.json](https://fdc3.finos.org/schemas/next/context/context.schema.json)

## Details

Expand Down
Loading