-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
api.graphql
542 lines (467 loc) · 11.2 KB
/
api.graphql
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
### This file was generated by Nexus Schema
### Do not make changes to this file directly
input BooleanFilter {
equals: Boolean
not: Boolean
}
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the
`date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO
8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar DateTime
input DateTimeFilter {
equals: DateTime
gt: DateTime
gte: DateTime
in: [DateTime!]
lt: DateTime
lte: DateTime
not: DateTime
notIn: [DateTime!]
}
input IntFilter {
equals: Int
gt: Int
gte: Int
in: [Int!]
lt: Int
lte: Int
not: Int
notIn: [Int!]
}
"""
The `JSON` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar Json
type Label {
background: String!
createdAt: DateTime!
id: Int!
isGlobal: Boolean
project: Project
projectId: Int
team: Team!
teamId: Int!
tickets(after: TicketWhereUniqueInput, before: TicketWhereUniqueInput, first: Int, last: Int, orderBy: TicketOrderByInput, where: TicketWhereInput): [Ticket!]!
updatedAt: DateTime!
value: String!
}
input LabelFilter {
every: LabelWhereInput
none: LabelWhereInput
some: LabelWhereInput
}
input LabelOrderByInput {
background: OrderByArg
createdAt: OrderByArg
foreground: OrderByArg
id: OrderByArg
isGlobal: OrderByArg
projectId: OrderByArg
teamId: OrderByArg
updatedAt: OrderByArg
value: OrderByArg
}
input LabelWhereInput {
AND: [LabelWhereInput!]
background: StringFilter
createdAt: DateTimeFilter
foreground: NullableStringFilter
id: IntFilter
isGlobal: NullableBooleanFilter
NOT: [LabelWhereInput!]
OR: [LabelWhereInput!]
project: ProjectWhereInput
projectId: NullableIntFilter
team: TeamWhereInput
teamId: IntFilter
tickets: TicketFilter
updatedAt: DateTimeFilter
value: StringFilter
}
input LabelWhereUniqueInput {
id: Int
}
type Mutation {
"""Check if a team by the given name already exists."""
checkTeamName(
"""Team name to check against."""
teamName: String!
): Boolean
"""Create a new global label."""
createGlobalLabel(
"""The color of the label."""
color: String
"""The value of the label."""
value: String!
): Label
"""Create a new project."""
createProject(
"""An array of user IDs to associate as members."""
members: [Int!]
"""Name of the project to create."""
name: String!
): Project
"""Create a new ticket."""
createTicket(
"""The content of the ticket."""
body: String!
labels: [String!]
"""The project to associate this ticket with."""
projectId: Int!
"""Title of the ticket to create."""
title: String!
): Ticket
"""Team sign in with an email and return the token and user."""
signinTeam(
"""The user's email address."""
email: String!
"""The user's password."""
password: String!
"""The team's ID."""
teamId: Int!
): TeamSigninData
"""General sign in with an email and return the token and user."""
signinUser(
"""The user's email address."""
email: String!
"""The user's password."""
password: String!
): UserData
"""
Create a user and the relevant profile, along with the team and relevant profile.
"""
signupTeam(
"""The user's email address."""
email: String!
"""The user's first name."""
firstName: String!
"""The user's last name."""
lastName: String!
"""The user's password."""
password: String!
"""The name of the team being created. Must be unique."""
teamName: String!
): TeamSignupData
"""Team creation flow. The created user is the team's owner."""
signupUser(
"""The user's email address."""
email: String!
"""The user's first name."""
firstName: String!
"""The user's last name."""
lastName: String!
"""The user's password."""
password: String!
"""The ID of the team sign up with."""
teamId: Int!
): UserData
}
input NullableBooleanFilter {
equals: Boolean
not: Boolean
}
input NullableIntFilter {
equals: Int
gt: Int
gte: Int
in: [Int!]
lt: Int
lte: Int
not: Int
notIn: [Int!]
}
input NullableStringFilter {
contains: String
endsWith: String
equals: String
gt: String
gte: String
in: [String!]
lt: String
lte: String
not: String
notIn: [String!]
startsWith: String
}
enum OrderByArg {
asc
desc
}
type Project {
createdAt: DateTime!
id: Int!
labels(after: LabelWhereUniqueInput, before: LabelWhereUniqueInput, first: Int, last: Int, orderBy: LabelOrderByInput, where: LabelWhereInput): [Label!]!
members(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int, orderBy: UserOrderByInput, where: UserWhereInput): [User!]!
name: String!
sequence: Int!
team: Team!
teamId: Int!
tickets(after: TicketWhereUniqueInput, before: TicketWhereUniqueInput, first: Int, last: Int, orderBy: TicketOrderByInput, where: TicketWhereInput): [Ticket!]!
updatedAt: DateTime!
}
input ProjectFilter {
every: ProjectWhereInput
none: ProjectWhereInput
some: ProjectWhereInput
}
input ProjectWhereInput {
AND: [ProjectWhereInput!]
createdAt: DateTimeFilter
id: IntFilter
labels: LabelFilter
members: UserFilter
name: StringFilter
NOT: [ProjectWhereInput!]
OR: [ProjectWhereInput!]
sequence: IntFilter
team: TeamWhereInput
teamId: IntFilter
tickets: TicketFilter
updatedAt: DateTimeFilter
}
type Query {
"""Check if a user already exists while creating"""
checkIfUserExists(
"""User's email to check against."""
email: String!
): Boolean
"""Get all the teams the user is associated with as an owner or a member."""
getUserTeams: UserTeamDetails
"""Get all the projects of a particular team."""
projects: [Project!]
"""Fetch the information of a particular team by name."""
teamDetailsFromName(
"""Team's name to fetch data for."""
name: String!
): TeamAuthInfoData
"""Fetch the details of all the teams of a particular user."""
teams: [Team!]
"""
Get bare-minimal user details to populate the interface and identify the user.
"""
userDetails: UserDetails
}
input StringFilter {
contains: String
endsWith: String
equals: String
gt: String
gte: String
in: [String!]
lt: String
lte: String
not: String
notIn: [String!]
startsWith: String
}
type Team {
adminEmail: String
createdAt: DateTime!
displayName: String
id: Int!
maxMembers: Int!
members(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
name: String!
owner: User!
ownerId: Int!
updatedAt: DateTime!
}
type TeamAuthInfoData {
displayName: String
id: Int!
name: String!
}
input TeamFilter {
every: TeamWhereInput
none: TeamWhereInput
some: TeamWhereInput
}
input TeamOrderByInput {
adminEmail: OrderByArg
createdAt: OrderByArg
displayName: OrderByArg
id: OrderByArg
maxMembers: OrderByArg
name: OrderByArg
ownerId: OrderByArg
updatedAt: OrderByArg
}
type TeamSigninData {
"""The encoded JWT token."""
token: String
"""The user object."""
user: User
}
type TeamSignupData {
"""The team object."""
team: Team
"""The encoded JWT token."""
token: String
"""The user object."""
user: User
}
input TeamWhereInput {
adminEmail: NullableStringFilter
AND: [TeamWhereInput!]
createdAt: DateTimeFilter
displayName: NullableStringFilter
id: IntFilter
labels: LabelFilter
maxMembers: IntFilter
members: UserFilter
name: StringFilter
NOT: [TeamWhereInput!]
OR: [TeamWhereInput!]
owner: UserWhereInput
ownerId: IntFilter
projects: ProjectFilter
tickets: TicketFilter
updatedAt: DateTimeFilter
}
input TeamWhereUniqueInput {
id: Int
name: String
}
type Ticket {
author: User!
authorId: Int!
body: String!
createdAt: DateTime!
id: Int!
labels(after: LabelWhereUniqueInput, before: LabelWhereUniqueInput, first: Int, last: Int, orderBy: LabelOrderByInput, where: LabelWhereInput): [Label!]!
project: Project!
projectId: Int!
sequence: Int!
team: Team!
teamId: Int!
title: String!
updatedAt: DateTime!
}
input TicketFilter {
every: TicketWhereInput
none: TicketWhereInput
some: TicketWhereInput
}
input TicketOrderByInput {
authorId: OrderByArg
body: OrderByArg
createdAt: OrderByArg
id: OrderByArg
projectId: OrderByArg
sequence: OrderByArg
teamId: OrderByArg
title: OrderByArg
updatedAt: OrderByArg
}
input TicketWhereInput {
AND: [TicketWhereInput!]
author: UserWhereInput
authorId: IntFilter
body: StringFilter
createdAt: DateTimeFilter
id: IntFilter
labels: LabelFilter
NOT: [TicketWhereInput!]
OR: [TicketWhereInput!]
project: ProjectWhereInput
projectId: IntFilter
sequence: IntFilter
team: TeamWhereInput
teamId: IntFilter
title: StringFilter
updatedAt: DateTimeFilter
}
input TicketWhereUniqueInput {
id: Int
}
type User {
createdAt: DateTime!
email: String!
id: Int!
memberTeams(after: TeamWhereUniqueInput, before: TeamWhereUniqueInput, first: Int, last: Int, orderBy: TeamOrderByInput, where: TeamWhereInput): [Team!]!
ownerTeams(after: TeamWhereUniqueInput, before: TeamWhereUniqueInput, first: Int, last: Int, orderBy: TeamOrderByInput, where: TeamWhereInput): [Team!]!
updatedAt: DateTime!
}
type UserData {
"""The encoded JWT token."""
token: String
"""The user object."""
user: User
}
type UserDetails {
createdAt: DateTime!
email: String!
id: Int!
profile: UserProfile!
updatedAt: DateTime!
}
input UserFilter {
every: UserWhereInput
none: UserWhereInput
some: UserWhereInput
}
input UserOrderByInput {
createdAt: OrderByArg
email: OrderByArg
id: OrderByArg
password: OrderByArg
updatedAt: OrderByArg
}
type UserProfile {
createdAt: DateTime!
firstName: String!
id: Int!
lastName: String!
professionalCompetence: String
updatedAt: DateTime!
utm_campaign: String
utm_content: String
utm_medium: String
utm_source: String
utm_term: String
}
input UserProfileWhereInput {
AND: [UserProfileWhereInput!]
createdAt: DateTimeFilter
firstName: StringFilter
id: IntFilter
isSuperAdmin: BooleanFilter
lastName: StringFilter
NOT: [UserProfileWhereInput!]
OR: [UserProfileWhereInput!]
professionalCompetence: NullableStringFilter
updatedAt: DateTimeFilter
user: UserWhereInput
userId: IntFilter
utm_campaign: NullableStringFilter
utm_content: NullableStringFilter
utm_medium: NullableStringFilter
utm_source: NullableStringFilter
utm_term: NullableStringFilter
}
type UserTeamDetails {
id: Int!
memberTeams(after: TeamWhereUniqueInput, before: TeamWhereUniqueInput, first: Int, last: Int, orderBy: TeamOrderByInput, where: TeamWhereInput): [Team!]!
ownerTeams(after: TeamWhereUniqueInput, before: TeamWhereUniqueInput, first: Int, last: Int, orderBy: TeamOrderByInput, where: TeamWhereInput): [Team!]!
}
input UserWhereInput {
AND: [UserWhereInput!]
createdAt: DateTimeFilter
email: StringFilter
id: IntFilter
memberTeams: TeamFilter
NOT: [UserWhereInput!]
OR: [UserWhereInput!]
ownerTeams: TeamFilter
password: StringFilter
profile: UserProfileWhereInput
projects: ProjectFilter
tickets: TicketFilter
updatedAt: DateTimeFilter
}
input UserWhereUniqueInput {
email: String
id: Int
}