-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathAppRegistration.ts
More file actions
35 lines (31 loc) · 1.1 KB
/
AppRegistration.ts
File metadata and controls
35 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {
AppRequestMessage,
WebConnectionProtocol4ValidateAppIdentity,
WebConnectionProtocol6Goodbye,
} from '@finos/fdc3-schema/generated/api/BrowserTypes';
/**
* This is a unique, long, unguessable string that identifies a particular instance of an app.
* All messages arriving at the desktop agent will have this UUID attached to them.
* It is important that this is unguessable as it is a shared secret used to identify the app
* when reconnecting after navigation or refresh.
*/
export type InstanceID = string;
export enum State {
Pending /* App has started, but not completed FDC3 Handshake */,
Connected /* App has completed FDC3 handshake */,
NotResponding /* App has not responded to a heartbeat */,
Terminated /* App has sent a termination message */,
}
/**
* Feel free to extend this type with your own properties
* if implementing your own FDC3ServerInstance.
*/
export type AppRegistration = {
state: State;
appId: string;
instanceId: InstanceID;
};
export type ReceivableMessage =
| AppRequestMessage
| WebConnectionProtocol4ValidateAppIdentity
| WebConnectionProtocol6Goodbye;