-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathtypes.ts
More file actions
87 lines (81 loc) · 2.01 KB
/
types.ts
File metadata and controls
87 lines (81 loc) · 2.01 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { NamedNode, IndexedFormula } from 'rdflib'
// Note: there might be a more appropriate project to hold this definition:
export interface PaneDefinition {
icon: string;
global?: boolean;
name: string;
label: (subject: NamedNode) => string | null;
render: (subject: NamedNode, dom: HTMLDocument, options?: unknown) => HTMLElement;
shouldGetFocus?: (subject: NamedNode) => boolean;
requireQueryButton?: boolean;
mintClass?: NamedNode;
mintNew?: (options: NewPaneOptions) => Promise<NewPaneOptions & { newInstance: NamedNode }>;
};
interface NewPaneOptions {
appPathSegment: string;
div: HTMLDivElement;
dom: HTMLDocument;
folder: NamedNode;
iconEle: HTMLImageElement;
me?: NamedNode;
newBase: string;
newInstance: NamedNode;
noIndexHTML: boolean;
noun: string;
pane: PaneDefinition;
refreshTarget: HTMLTableElement;
}
export interface ViewParams {
container: HTMLElement;
subject: NamedNode;
store: IndexedFormula;
visitNode: (node: NamedNode) => void;
user?: NamedNode;
};
export interface RevampPaneDefinition {
canHandle: (subject: NamedNode, store: IndexedFormula) => boolean;
view: (params: ViewParams) => void;
label: (subject: NamedNode, store: IndexedFormula) => string | null;
};
interface NewPaneOptions {
appPathSegment: string;
div: HTMLDivElement;
dom: HTMLDocument;
folder: NamedNode;
iconEle: HTMLImageElement;
me?: NamedNode;
newBase: string;
newInstance: NamedNode;
noIndexHTML: boolean;
noun: string;
pane: PaneDefinition;
refreshTarget: HTMLTableElement;
}
export interface SolidSession {
authorization: SolidAuthorization;
credentialType: string;
idClaims: SolidClaim;
idp: string;
issuer: string;
sessionKey: string;
webId: string;
}
interface SolidAuthorization {
access_token: string;
client_id: string;
id_token: string;
}
interface SolidClaim {
at_hash: string;
aud: string;
azp: string;
cnf: {
jwk: string;
};
exp: number;
iat: number;
iss: string;
jti: string;
nonce: string;
sub: string;
}