-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdto.ts
More file actions
75 lines (65 loc) · 1.77 KB
/
Copy pathdto.ts
File metadata and controls
75 lines (65 loc) · 1.77 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
/**
* DTOs = Data Transfer Objects
*
* Mostly equivalent to raw JSON definition over wire
*/
export interface EnsembleDocument {
readonly id: string;
readonly name: string;
readonly content: string;
readonly path?: string;
readonly isRoot?: boolean;
readonly isDraft?: boolean;
readonly category?: string;
readonly isArchived?: boolean;
}
export interface ApplicationDTO extends Omit<EnsembleDocument, "content"> {
readonly screens: ScreenDTO[];
readonly widgets: WidgetDTO[];
readonly scripts: ScriptDTO[];
readonly theme?: ThemeDTO;
readonly themes?: ThemeDTO[];
readonly languages?: LanguageDTO[];
readonly config?: string | EnsembleConfigYAML;
readonly fonts?: FontDTO[];
readonly icons: IconDTO;
readonly description?: string;
readonly isPublic?: boolean;
readonly isAutoGenerated?: boolean;
readonly status?: string;
}
export type ScreenDTO = EnsembleDocument;
export type WidgetDTO = EnsembleDocument;
export type ScriptDTO = EnsembleDocument;
export interface ThemeDTO {
readonly id: string;
readonly name?: string;
readonly content: string;
}
export interface LanguageDTO {
readonly name: string;
readonly nativeName: string;
readonly languageCode: string;
readonly content: string;
}
export interface EnsembleEnvironmentDTO {
googleOAuthId?: string;
}
export interface EnsembleConfigYAML {
environmentVariables?: { [key: string]: unknown };
secretVariables?: { [key: string]: unknown };
}
export interface FontDTO {
readonly fontFamily: string;
readonly publicUrl: string;
readonly fontWeight: string;
readonly fontStyle: string;
}
export interface IconSet {
readonly prefix?: string;
readonly icons?: { [key: string]: unknown };
}
export interface IconDTO {
readonly mui: IconSet;
readonly custom?: IconSet;
}