Skip to content

Commit ec9e6ba

Browse files
authored
Team Settings (codesandbox#4062)
1 parent 0e2cd15 commit ec9e6ba

File tree

6 files changed

+424
-216
lines changed

6 files changed

+424
-216
lines changed

packages/app/src/app/graphql/schema.graphql

Lines changed: 81 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# source: https://codesandbox.io/api/graphql
2-
# timestamp: Thu Apr 30 2020 19:12:48 GMT+0200 (Central European Summer Time)
2+
# timestamp: Fri May 01 2020 14:54:19 GMT+0200 (Central European Summer Time)
33

44
schema {
55
query: RootQuery
@@ -163,84 +163,62 @@ The metadata of a reference
163163
union ReferenceMetadata = CodeReferenceMetadata
164164

165165
type RootMutation {
166-
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
167-
168-
"""
169-
Create a team
170166
"""
171-
createTeam(name: String!): Team!
172-
173-
"""
174-
Delete sandboxes
167+
Redeem an invite token from a team
175168
"""
176-
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
177-
createSandboxInvitation(
169+
redeemTeamInviteToken(inviteToken: String!): Team!
170+
changeSandboxInvitationAuthorization(
178171
authorization: Authorization!
179-
email: String!
172+
invitationId: ID!
180173
sandboxId: ID!
181174
): Invitation!
175+
renameSandbox(id: ID!, title: String!): Sandbox!
182176

183177
"""
184-
Make templates from sandboxes
185-
"""
186-
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
187-
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
188-
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
189-
190-
"""
191-
Rename a collection and all subfolders
192-
"""
193-
renameCollection(
194-
newPath: String!
195-
newTeamId: ID
196-
path: String!
197-
teamId: ID
198-
): [Collection!]!
199-
200-
"""
201-
Convert templates back to sandboxes
178+
Remove someone from a team
202179
"""
203-
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
180+
removeFromTeam(teamId: ID!, userId: ID!): Team!
204181

205182
"""
206-
Unbookmark a template
183+
Revoke an invitation to a team
207184
"""
208-
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
185+
revokeTeamInvitation(teamId: ID!, userId: ID!): Team!
209186

210187
"""
211-
Delete a collection and all subfolders
188+
Invite someone to a team via email
212189
"""
213-
deleteCollection(path: String!, teamId: ID): [Collection!]!
190+
inviteToTeamViaEmail(email: String!, teamId: ID!): String!
214191

215192
"""
216-
Leave a team
193+
Delete sandboxes
217194
"""
218-
leaveTeam(teamId: ID!): String!
195+
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
219196

220197
"""
221-
Revoke an invitation to a team
198+
Rename a collection and all subfolders
222199
"""
223-
revokeTeamInvitation(teamId: ID!, userId: ID!): Team!
224-
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
200+
renameCollection(
201+
newPath: String!
202+
newTeamId: ID
203+
path: String!
204+
teamId: ID
205+
): [Collection!]!
225206

226207
"""
227-
Change authorization of a collaborator
208+
Clear notification unread count
228209
"""
229-
changeCollaboratorAuthorization(
230-
authorization: Authorization!
231-
sandboxId: ID!
232-
username: String!
233-
): Collaborator!
210+
clearNotificationCount: User
211+
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
234212

235213
"""
236-
Reject an invitation to a team
214+
Accept an invitation to a team
237215
"""
238-
rejectTeamInvitation(teamId: ID!): String!
216+
acceptTeamInvitation(teamId: ID!): Team!
239217

240218
"""
241-
Soft delete a comment. Note: all child comments will also be deleted.
219+
bookmark a template
242220
"""
243-
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
221+
bookmarkTemplate(teamId: ID, templateId: ID!): Template
244222

245223
"""
246224
Add sandboxes to a collection
@@ -250,31 +228,22 @@ type RootMutation {
250228
sandboxIds: [ID]!
251229
teamId: ID
252230
): Collection!
253-
createComment(
254-
codeReference: CodeReference
255-
content: String!
256-
id: ID
257-
parentCommentId: ID
258-
sandboxId: ID!
259-
): Comment!
260-
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
261-
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
262231

263232
"""
264233
Remove a collaborator
265234
"""
266235
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
236+
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!
267237

268238
"""
269-
Set the description of the team
239+
Invite someone to a team
270240
"""
271-
setTeamDescription(description: String!, teamId: ID!): Team!
272-
renameSandbox(id: ID!, title: String!): Sandbox!
241+
inviteToTeam(teamId: ID!, username: String!): Team!
273242

274243
"""
275-
Invite someone to a team
244+
Convert templates back to sandboxes
276245
"""
277-
inviteToTeam(teamId: ID!, username: String!): Team!
246+
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
278247

279248
"""
280249
Add a collaborator
@@ -286,50 +255,80 @@ type RootMutation {
286255
): Collaborator!
287256

288257
"""
289-
Remove someone from a team
258+
Leave a team
290259
"""
291-
removeFromTeam(teamId: ID!, userId: ID!): Team!
260+
leaveTeam(teamId: ID!): String!
292261

293262
"""
294-
Invite someone to a team via email
263+
Delete a collection and all subfolders
295264
"""
296-
inviteToTeamViaEmail(email: String!, teamId: ID!): String!
297-
changeSandboxInvitationAuthorization(
298-
authorization: Authorization!
299-
invitationId: ID!
300-
sandboxId: ID!
301-
): Invitation!
302-
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!
265+
deleteCollection(path: String!, teamId: ID): [Collection!]!
303266

304267
"""
305-
Clear notification unread count
268+
Unbookmark a template
306269
"""
307-
clearNotificationCount: User
270+
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
271+
272+
"""
273+
Set the description of the team
274+
"""
275+
setTeamDescription(description: String!, teamId: ID!): Team!
276+
277+
"""
278+
Soft delete a comment. Note: all child comments will also be deleted.
279+
"""
280+
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
281+
createSandboxInvitation(
282+
authorization: Authorization!
283+
email: String!
284+
sandboxId: ID!
285+
): Invitation!
286+
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
308287

309288
"""
310289
Mark all notifications as read
311290
"""
312291
markAllNotificationsAsRead: User
292+
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
313293

314294
"""
315-
bookmark a template
295+
Make templates from sandboxes
316296
"""
317-
bookmarkTemplate(teamId: ID, templateId: ID!): Template
297+
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
298+
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
299+
createComment(
300+
codeReference: CodeReference
301+
content: String!
302+
id: ID
303+
parentCommentId: ID
304+
sandboxId: ID!
305+
): Comment!
318306

319307
"""
320-
Redeem an invite token from a team
308+
Change authorization of a collaborator
321309
"""
322-
redeemTeamInviteToken(inviteToken: String!): Team!
310+
changeCollaboratorAuthorization(
311+
authorization: Authorization!
312+
sandboxId: ID!
313+
username: String!
314+
): Collaborator!
315+
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
323316

324317
"""
325318
Create a collection
326319
"""
327320
createCollection(path: String!, teamId: ID): Collection!
328321

329322
"""
330-
Accept an invitation to a team
323+
Create a team
331324
"""
332-
acceptTeamInvitation(teamId: ID!): Team!
325+
createTeam(name: String!): Team!
326+
327+
"""
328+
Reject an invitation to a team
329+
"""
330+
rejectTeamInvitation(teamId: ID!): String!
331+
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
333332
}
334333

335334
type RootQuery {

0 commit comments

Comments
 (0)