-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtypedefs.ts
More file actions
161 lines (148 loc) · 3.5 KB
/
typedefs.ts
File metadata and controls
161 lines (148 loc) · 3.5 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import { gql } from "apollo-server";
export const typeDefs = gql`
type AuthData {
token: String
}
type User {
id: ID!
username: String
email: String!
password: String!
firstname: String!
lastname: String!
codeiumAPIKey: String!
}
type Repo {
id: ID!
name: String
pods: [Pod]
edges: [Edge]
userId: ID!
stargazers: [User]
collaborators: [User]
public: Boolean
createdAt: String
updatedAt: String
accessedAt: String
}
type Edge {
source: String!
target: String!
}
type Pod {
id: ID!
type: String
content: String
githead: String
staged: String
column: Int
lang: String
parent: Pod
index: Int
children: [Pod]
result: String
stdout: String
error: String
imports: String
exports: String
reexports: String
midports: String
fold: Boolean
thundar: Boolean
utility: Boolean
name: String
x: Float
y: Float
width: Float
height: Float
}
input PodInput {
id: ID!
type: String
content: String
column: Int
lang: String
result: String
stdout: String
error: String
imports: String
exports: String
reexports: String
midports: String
fold: Boolean
thundar: Boolean
utility: Boolean
name: String
x: Float
y: Float
width: Float
height: Float
parent: ID
children: [ID]
}
type RuntimeInfo {
startedAt: String
lastActive: String
sessionId: String
ttl: Int
}
type YDocSnapshot {
id: String
createdAt: String
message: String
}
input RunSpecInput {
code: String
podId: String
}
type Query {
hello: String
users: [User]
me: User
repos: [Repo]
repo(id: String!): Repo
pod(id: ID!): Pod
getDashboardRepos: [Repo]
getRepoSnapshots(repoId: String!): [YDocSnapshot]
activeSessions: [String]
listAllRuntimes: [RuntimeInfo]
infoRuntime(sessionId: String!): RuntimeInfo
}
type Mutation {
login(email: String!, password: String!): AuthData
signup(
email: String!
password: String!
firstname: String!
lastname: String!
): AuthData
loginWithGoogle(idToken: String!): AuthData
updateUser(email: String!, firstname: String!, lastname: String!): Boolean
createRepo: Repo
updateRepo(id: ID!, name: String!): Boolean
deleteRepo(id: ID!): Boolean
copyRepo(repoId: String!): ID!
updatePod(id: String!, repoId: String!, input: PodInput): Boolean
addEdge(source: ID!, target: ID!): Boolean
deleteEdge(source: ID!, target: ID!): Boolean
clearUser: Boolean
clearRepo: Boolean
clearPod: Boolean
spawnRuntime(sessionId: String!): Boolean
killRuntime(sessionId: String!): Boolean
updateVisibility(repoId: String!, isPublic: Boolean!): Boolean
addCollaborator(repoId: String!, email: String!): Boolean
deleteCollaborator(repoId: String!, collaboratorId: String!): Boolean
star(repoId: ID!): Boolean
unstar(repoId: ID!): Boolean
exportJSON(repoId: String!): String!
exportFile(repoId: String!): String!
addRepoSnapshot(repoId: String!, message: String!): String!
updateCodeiumAPIKey(apiKey: String!): Boolean
connectRuntime(runtimeId: String, repoId: String): Boolean
runCode(runtimeId: String, spec: RunSpecInput): Boolean
runChain(runtimeId: String, specs: [RunSpecInput]): Boolean
interruptKernel(runtimeId: String): Boolean
requestKernelStatus(runtimeId: String): Boolean
}
`;