-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.graphql
154 lines (137 loc) · 4.64 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
schema {
query: Query
}
# The root query type
type Query {
# Retrieve user through a user ID or through the token passed to
# Query. Leave id empty if you'd like to view the currently logged in
# user.
user(id: ID): User
# All the users in the database, useful for polling for new user information.
# This is paginated, n is the number of results, and last_id is the last ID
# seen from the latest page retrieved, if you want the first page leave this out.
users(pagination_token: ID, n: Int!, filter: UserFilter, ids: [String]): [User!]!
# Search for users by name and email
search_user(search: String!, use_regex: Boolean = false, offset: Int!, n: Int!, filter: UserFilter): SearchResult!
# Simplified search_user that can be forwarded correctly from checkin2
search_user_simple(search: String!, use_regex: Boolean = false, offset: Int!, n: Int!, filter: UserFilter): [User!]!
# All possible application question branches
application_branches: [String!]!
# All possible confirmation question branches
confirmation_branches: [String!]!
# All possible question branches from all types!
question_branches: [String!]!
# All possible question names, or names of question in a branch
question_names(branch: String): [String!]
}
# A search result containing the results and associated data
type SearchResult {
# The offset passed to the search
offset: Int!
# The number of users returned by this query (limited by n)
count: Int!
# The total number of users that match this query (but not necessarily returned)
total: Int!
# The array of matching users
users: [User!]!
}
# Registration info about the user
type User {
# User ID, valid across the entire system
id: ID!
# User's full name
name: String!
# User's email
email: String!
# If the user has admin privileges
admin: Boolean!
# If the user has applied to the event
applied: Boolean!
# If the user has been accepted to the event
accepted: Boolean!
# If the user has been accepted and notified of his or her acceptance
accepted_and_notified: Boolean!
# If the user has submitted a confirmation
confirmed: Boolean!
# A users assigned confirmation branch
confirmationBranch: String
# A users application phase answers
# null if user has not filled out this phase
application: Branch
# A users confirmation phase answers
# null if user has not filled out this phase
confirmation: Branch
# Get the answer to one of the questions asked of this user.
question(name: String!): FormItem
# Get the answer to multiple questions asked of this user, userful
# when the set of questions you want to receive is set by the user.
questions(names: [String!]!): [FormItem!]!
# What team, if any, is the user a part of?
team: Team
# ID used for pagination
pagination_token: ID!
}
# Filter users by this criterea.
# A value means to filter by that value, no value
# means that filter will be ignored.
input UserFilter {
# If the user has applied to the event
applied: Boolean
# If the user has been accepted to the event
accepted: Boolean
# If the user has indicated that he or she is attending
confirmed: Boolean
# The type of application a user filled out (e.g. Mentor, Participant)
application_branch: String
# The type of confirmation a user filled out (e.g. Needs Reimbursement)
confirmation_branch: String
}
# A filled out form (application / confirmation form)
type Branch {
# What type of application did the user fill out (mentor, participant, etc.)
# when going through the form?
type: String!
# A key-value list of questions and answers from the confirmation application
data: [FormItem!]!
# Start of application as some RFC's date string
start_time: String
# Submit time of application as some RFC's date string
submit_time: String
}
# Application teams
type Team {
# ID of the Team
id: ID!
# Name of the Team
name: String!
}
# Entries to various forms (application, confirmation, etc.)
type FormItem {
# Name (basically the ID) of the question / form item
name: String!
# Label of form item
label: String!
# Type of form item (textbox, checkbox, phone no.)
type: String!
# Value (if just one string)
value: String
# Values (if many selections are applicable, like checkbox)
values: [String]
# File if type contains a file
file: File
}
# Uploaded file
type File {
# The original name of the uploaded file
original_name: String!
# The file's encoding
encoding: String!
# The file's mimetype
mimetype: String!
# The path to the file in S3
path: String!
# The size of the file in bytes
size: Int!
# The formatted size of the file in human-readable units
size_formatted: String!
}