-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathDirectoryInterface.ts
More file actions
32 lines (24 loc) · 973 Bytes
/
DirectoryInterface.ts
File metadata and controls
32 lines (24 loc) · 973 Bytes
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
import { components } from '../../generated/directory-schema.js';
type schemas = components['schemas'];
export type DirectoryIntent = schemas['Intent'] & { intentName: string; appId: string };
export type DirectoryApp = schemas['Application'];
export type WebAppDetails = schemas['WebAppDetails'];
/**
* This interface wraps the functionality of the FDC3 Directory structure (stored in JSON),
* providing lookup calls to functions that would be handled by inspecting the directory/directories JSON definitions.
*/
export interface Directory {
retrieveAllApps(): DirectoryApp[];
retrieveApps(
contextType: string | undefined,
intentName: string | undefined,
resultType: string | undefined
): DirectoryApp[];
retrieveAllIntents(): DirectoryIntent[];
retrieveIntents(
contextType: string | undefined,
intentName?: string | undefined,
resultType?: string
): DirectoryIntent[];
retrieveAppsById(appId: string): DirectoryApp[];
}