-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathindex.d.ts
81 lines (74 loc) · 1.47 KB
/
index.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
export interface IModule {
content: string; // If isBinary is true this will be a URL
isBinary: boolean;
type?: "file";
uploadId?: string;
sha?: string;
}
export interface IBinaryModule extends IModule {
binaryContent: string;
}
export interface IDirectory {
type: "directory";
}
export interface INormalizedModules {
[path: string]: IModule | IBinaryModule | IDirectory;
}
export interface ISandboxFile {
title: string;
code: string;
shortid: string;
isBinary: boolean;
binaryContent?: string;
uploadId?: string;
directoryShortid: string | undefined | null;
sha?: string;
}
export interface ISandboxDirectory {
shortid: string;
title: string;
directoryShortid: string | undefined | null;
}
export type ITemplate =
| "adonis"
| "vue-cli"
| "preact-cli"
| "svelte"
| "create-react-app-typescript"
| "create-react-app"
| "angular-cli"
| "parcel"
| "@dojo/cli-create-app"
| "cxjs"
| "gatsby"
| "nuxt"
| "next"
| "reason"
| "apollo"
| "sapper"
| "ember"
| "nest"
| "static"
| "styleguidist"
| "gridsome"
| "vuepress"
| "mdx-deck"
| "quasar"
| "docusaurus"
| "remix"
| "node";
export interface ISandbox {
title: string;
description: string;
tags: string[];
modules: ISandboxFile[];
directories: ISandboxDirectory[];
externalResources: string[];
template: ITemplate;
entry: string;
environmentVariables: Record<string, string>;
v2?: boolean;
templateParams?: {
iconUrl?: string;
};
}