Skip to content

Commit 320772f

Browse files
committed
feat: make types that are exported in thread and parent code
1 parent 67f98fa commit 320772f

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
export type RecordType = {
2+
computedMeasures: null | { [key: string]: unknown };
3+
date: Date;
4+
id: string;
5+
instrumentId: string;
6+
session: {
7+
date: Date;
8+
id: string;
9+
type: 'IN_PERSON' | 'REMOTE' | 'RETROSPECTIVE';
10+
user: null | {
11+
username: string;
12+
};
13+
};
14+
subject: {
15+
dateOfBirth: Date | null;
16+
groupIds: string[];
17+
id: string;
18+
sex: string;
19+
};
20+
};
21+
22+
export type InitData = {
23+
edition: number;
24+
id: string;
25+
name: string;
26+
}[];
27+
28+
export type InitMessage = {
29+
data: InitData;
30+
type: 'INIT';
31+
};
32+
33+
export type ChunkCompleteData = RecordType[];
34+
35+
export type ChunkCompleteMessage = {
36+
data: ChunkCompleteData;
37+
type: 'CHUNK_COMPLETE';
38+
};
39+
40+
export type ParentMessage = ChunkCompleteMessage | InitMessage;

0 commit comments

Comments
 (0)