Skip to content

Commit 32f0b57

Browse files
committed
Merge branch 'master' into 654-chart-context-type
2 parents bafc7e5 + 7ae5b80 commit 32f0b57

48 files changed

Lines changed: 3238 additions & 2643 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
node_modules
44
dist
55
coverage
6+
.project
67

78
lib/core/metadata.js
89
lib/core/MetadataBlog.js

docs/api/overview.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/api/ref/Channel.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Channels each have a unique identifier, some display metadata and operations for
1616
interface Channel {
1717
// properties
1818
id: string;
19-
type: string;
19+
type: "user" | "app" | "private";
2020
displayMetadata?: DisplayMetadata;
2121

2222
// methods
@@ -51,10 +51,10 @@ Uniquely identifies the channel. It is either assigned by the desktop agent (Use
5151
### `type`
5252

5353
```ts
54-
public readonly type: string;
54+
public readonly type: "user" | "app" | "private";
5555
```
5656

57-
Can be _system_, _app_ or _private_.
57+
Can be _user_, _app_ or _private_.
5858

5959
### `displayMetadata`
6060

@@ -65,15 +65,18 @@ public readonly displayMetadata?: DisplayMetadata;
6565
DisplayMetadata can be used to provide display hints for User Channels intended to be visualized and selectable by end users.
6666

6767
#### See also
68+
6869
* [`DisplayMetadata`](Metadata#displaymetadata)
6970

7071
## Methods
7172

7273

7374
### `addContextListener`
75+
7476
```ts
7577
public addContextListener(contextType: string | null, handler: ContextHandler): Promise<Listener>;
7678
```
79+
7780
Adds a listener for incoming contexts of the specified _context type_ whenever a broadcast happens on this channel.
7881

7982
If, when this function is called, the channel already contains context that would be passed to the listener it is NOT called or passed this context automatically (this behavior differs from that of the [`fdc3.addContextListener`](DesktopAgent#addcontextlistener) function). Apps wishing to access to the current context of the channel should instead call the [`getCurrentContext(contextType)`](#getcurrentcontext) function.
@@ -122,6 +125,7 @@ instrumentListener.unsubscribe();
122125
```
123126

124127
#### See also
128+
125129
* [`Listener`](Types#listener)
126130
* [`ContextHandler`](Types#contexthandler)
127131
* [`broadcast`](#broadcast)
@@ -159,6 +163,7 @@ try {
159163
```
160164

161165
#### See also
166+
162167
* [`ChannelError`](Errors#channelerror)
163168
* [`getCurrentContext`](#getcurrentcontext)
164169
* [`addContextListener`](#addcontextlistener)
@@ -175,7 +180,6 @@ If no _context type_ is provided, the most recent context that was broadcast on
175180

176181
It is up to the specific Desktop Agent implementation whether and how recent contexts are stored. For example, an implementation could store context history for a channel in a single array and search through the array for the last context matching a provided type, or context could be maintained as a dictionary keyed by context types. An implementation could also choose not to support context history, in which case this method will return `null` for any context type not matching the type of the most recent context.
177182

178-
179183
If getting the current context fails, the promise will return an `Error` with a string from the [`ChannelError`](ChannelError) enumeration.
180184

181185
#### Examples
@@ -201,6 +205,7 @@ try {
201205
```
202206

203207
#### See also
208+
204209
* [`ChannelError`](Errors#channelerror)
205210
* [`broadcast`](#broadcast)
206211
* [`addContextListener`](#addcontextlistener)

docs/api/ref/Metadata.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ interface AppIntent {
1515
An interface that represents the binding of an intent to apps, returned as part of intent disocvery.
1616
For each intent, it reference the applications that support that intent.
1717

18-
### See also
19-
* [`AppMetadata`]#appmetadata)
18+
#### See also
19+
* [`AppMetadata`](#appmetadata)
2020
* [`IntentMetadata`](#intentmetadata)
2121
* [`DesktopAgent.findIntent`](DesktopAgent#findintent)
2222
* [`DesktopAgent.findIntentsByContext`](DesktopAgent#findintentsbycontext)
@@ -120,7 +120,7 @@ interface ImplementationMetadata {
120120

121121
Metadata relating to the FDC3 [DesktopAgent](DesktopAgent) object and its provider, including the supported version of the FDC3 specification and the name of the provider of the implementation.
122122

123-
### See also
123+
#### See also
124124
* [`DesktopAgent.getInfo`](DesktopAgent#getinfo)
125125

126126
## `IntentMetadata`
@@ -137,7 +137,7 @@ interface IntentMetadata {
137137
The interface used to describe an intent within the platform.
138138

139139

140-
### See also
140+
#### See also
141141
* [`AppIntent.intent`](#appintent)
142142

143143
## `IntentResolution`
@@ -212,7 +212,7 @@ try {
212212
}
213213
```
214214

215-
### See also
215+
#### See also
216216
* [`DesktopAgent.raiseIntent`](DesktopAgent#raiseintent)
217217
* [`DesktopAgent.raiseIntentForContext`](DesktopAgent#raiseintentforcontext)
218218
* [`TargetApp`](Types#targetapp)

0 commit comments

Comments
 (0)