blob: b045a1005d8615ab1c0006e342f23877ceccfcef (
plain)
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
|
export type Id = string;
export type Relation<T> = Id | T;
export interface User {
id: Id;
username: string;
email: string;
}
export interface Project {
id: Id;
owner: Relation<User>;
name: string;
public: boolean;
}
export interface Node {
id: Id;
project: Relation<Project>;
type: string;
x: number;
y: number;
collapsed: boolean;
}
export interface Link {
id: Id;
project: Relation<Project>;
from: Relation<Node>;
fromSocket: string;
to: Relation<Node>;
toSocket: string;
}
|