forked from SolidOS/solid-logic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
43 lines (37 loc) · 1.21 KB
/
types.ts
File metadata and controls
43 lines (37 loc) · 1.21 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
import { Session } from "@inrupt/solid-client-authn-browser"
import { NamedNode } from "rdflib"
export type AppDetails = {
noun: string
appPathSegment: string
}
export type AuthenticationContext = {
containers?: Array<NamedNode>
div?: HTMLElement
dom?: HTMLDocument
index?: { [key: string]: Array<NamedNode> }
instances?: Array<NamedNode>
me?: NamedNode | null
noun?: string
preferencesFile?: NamedNode
preferencesFileError?: string
publicProfile?: NamedNode
statusArea?: HTMLElement
}
export interface AuthnLogic {
authSession: Session //this needs to be deprecated in the future. Is only here to allow imports like panes.UI.authn.authSession prior to moving authn from ui to logic
currentUser: () => NamedNode | null
checkUser: <T>(setUserCallback?: (me: NamedNode | null) => T) => Promise<NamedNode | T | null>
saveUser: (webId: NamedNode | string | null,
context?: AuthenticationContext) => NamedNode | null
}
export interface SolidNamespace {
[key: string]: (term: string) => NamedNode
}
interface NewPaneOptions {
me?: NamedNode;
newInstance?: NamedNode;
newBase: string;
}
interface CreatedPaneOptions {
newInstance: NamedNode;
}