-
Notifications
You must be signed in to change notification settings - Fork 0
/
Staff.ts
249 lines (218 loc) · 6.3 KB
/
Staff.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
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
import { type Name, NameSchema } from '../../Name'
import { type Image, ImageSchema } from '../../Image'
import { type FuzzyDate, FuzzyDateSchema } from '../../FuzzyDate'
import { type Title, TitleSchema } from '../../Title'
/**
* `StaffResponse` is an interface representing the response from a staff query.
* It includes the staff's id, name, language, image, description, primary occupations, gender, date of birth, date of death, age, years active, hometown, blood type, favourite status, favourite blocked status, site url, staff media, characters, character media, staff, submitter, submission status, submission notes, favourites, and mod notes.
*/
export interface StaffResponse {
/**
* `id` is a number representing the id of the staff.
*/
id: number
/**
* `name` is an instance of `Name` representing the name of the staff.
*/
name: Name
/**
* `languageV2` is a string representing the language of the staff.
*/
languageV2: string
/**
* `image` is an instance of `Image` representing the image of the staff.
*/
image: Image
/**
* `description` is a string representing the description of the staff.
*/
description: string
/**
* `primaryOccupations` is an array of strings representing the primary occupations of the staff.
*/
primaryOccupations: string[]
/**
* `gender` is a string representing the gender of the staff.
*/
gender: string
/**
* `dateOfBirth` is an instance of `FuzzyDate` representing the date of birth of the staff.
*/
dateOfBirth: FuzzyDate
/**
* `dateOfDeath` is an instance of `FuzzyDate` representing the date of death of the staff.
*/
dateOfDeath: FuzzyDate
/**
* `age` is a number representing the age of the staff.
*/
age: number
/**
* `yearsActive` is an array of numbers representing the years the staff has been active.
*/
yearsActive: number[]
/**
* `homeTown` is a string representing the hometown of the staff.
*/
homeTown: string
/**
* `bloodType` is a string representing the blood type of the staff.
*/
bloodType: string
/**
* `isFavourite` is a boolean indicating whether the staff is a favourite.
*/
isFavourite: boolean
/**
* `isFavouriteBlocked` is a boolean indicating whether the favourite status of the staff is blocked.
*/
isFavouriteBlocked: boolean
/**
* `siteUrl` is a string representing the URL of the staff on the site.
*/
siteUrl: string
/**
* `staffMedia` is an object representing the media associated with the staff.
* It includes an array of `nodes` each representing a media node with its own properties.
*/
staffMedia: {
nodes: Array<{
/**
* `id` is a number representing the id of the media node.
*/
id: number
/**
* `title` is an instance of `Title` representing the title of the media node.
*/
title: Title
}>
}
/**
* `characters` is an object representing the characters associated with the staff.
* It includes an array of `nodes` each representing a character node with its own properties.
*/
characters: {
nodes: Array<{
/**
* `id` is a number representing the id of the character node.
*/
id: number
/**
* `name` is an instance of `Name` representing the name of the character node.
*/
name: Name
}>
}
/**
* `characterMedia` is an object representing the media associated with the characters of the staff.
* It includes an array of `nodes` each representing a media node with its own properties.
*/
characterMedia: {
nodes: Array<{
/**
* `id` is a number representing the id of the media node.
*/
id: number
/**
* `title` is an instance of `Title` representing the title of the media node.
*/
title: Title
}>
}
/**
* `staff` is an object representing the staff associated with the staff response.
* It includes the staff's id and name.
*/
staff: {
/**
* `id` is a number representing the id of the staff.
*/
id: number
/**
* `name` is an instance of `Name` representing the name of the staff.
*/
name: Name
}
/**
* `submitter` is an object representing the submitter of the staff response.
* It includes the submitter's id and name.
*/
submitter: {
/**
* `id` is a number representing the id of the submitter.
*/
id: number
/**
* `name` is a string representing the name of the submitter.
*/
name: string
}
/**
* `submissionStatus` is a number representing the submission status of the staff response.
*/
submissionStatus: number
/**
* `submissionNotes` is a string representing the submission notes of the staff response.
*/
submissionNotes: string
/**
* `favourites` is a number representing the count of favourites for the staff.
*/
favourites: number
/**
* `modNotes` is a string representing the mod notes for the staff.
*/
modNotes: string
}
/**
* `StaffSchema` is a constant representing the GraphQL schema for a staff query.
* It includes the staff's id, name, language, image, description, primary occupations, gender, date of birth, date of death, age, years active, hometown, blood type, favourite status, favourite blocked status, site url, staff media, characters, character media, staff, submitter, submission status, submission notes, favourites, and mod notes.
*/
export const StaffSchema = `
id
${NameSchema}
languageV2
${ImageSchema}
description(asHtml: $asHtml)
primaryOccupations
gender
dateOfBirth {
${FuzzyDateSchema}
}
dateOfDeath {
${FuzzyDateSchema}
}
age
yearsActive
homeTown
bloodType
isFavourite
isFavouriteBlocked
siteUrl
staffMedia (sort: $staffMediaSort, type: $staffMediaType, onList: $staffMediaOnList, page: $staffMediaPage, perPage: $staffMediaPerPage) {
nodes {
id
${TitleSchema}
}
}
characters (sort: $charactersSort, page: $charactersPage, perPage: $charactersPerPage) {
nodes {
id
${NameSchema}
}
}
characterMedia (sort: $characterMediaSort, onList: $characterMediaOnList, page: $characterMediaPage, perPage: $characterMediaPerPage) {
nodes {
id
${TitleSchema}
}
}
submitter {
id
name
}
submissionStatus
submissionNotes
favourites
modNotes
`