-
Notifications
You must be signed in to change notification settings - Fork 0
/
declarations.d.ts
94 lines (84 loc) · 1.48 KB
/
declarations.d.ts
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
88
89
90
91
92
93
94
interface DBUser {
_id: string
username: string
email: string
passwordHash: string
salt: string
permissions: UserPermissions
}
interface UserPermissions {
level: 'guest' | 'user' | 'admin'
canRead: boolean
canWrite: boolean
}
type PublishStatus = 'private' | 'published' | 'draft'
interface Diagram {
description: string
height: number
rootGoal: Goal
status: PublishStatus
title: string
width: number
}
type DBNodeType =
| 'assumption'
| 'context'
| 'goal'
| 'insufficient'
| 'justification'
| 'solution'
| 'strategy'
type NodeType =
| 'ASSUMPTION'
| 'CONTEXT'
| 'GOAL'
| 'INSUFFICIENT'
| 'JUSTIFICATION'
| 'SOLUTION'
| 'STRATEGY'
interface DBDiagram {
_id?: string
ownerId?: string
title?: string
description?: string
rootGoalId?: string
status?: PublishStatus
height?: number
width?: number
}
interface DBDiagramNode {
_id?: string
ownerId?: string
type?: DBNodeType
name?: string
statement?: string
parent?: string
children?: Array<string>
height?: number
width?: number
}
interface Diagram {
id?: string
owner?: string
title?: string
description?: string
rootGoal?: DiagramNode
status?: PublishStatus
height?: number
width?: number
}
interface DiagramNode {
id?: string
owner?: string
type?: NodeType
name?: string
statement?: string
parent?: DiagramNode
children?: Array<DiagramNode>
height?: number
width?: number
}
type Option = {
label?: string
value?: string | number
}