-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
347 lines (314 loc) · 7.67 KB
/
schema.graphql
File metadata and controls
347 lines (314 loc) · 7.67 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
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
### This file was generated by Nexus Schema
### Do not make changes to this file directly
enum ActivityFilter {
new
unread
}
type Author {
contents: [Content]
id: String!
imageUrl: String
name: String!
}
type Category {
emoji: String!
name: String!
subcategories: [String!]!
}
type CategorySection {
categories: [Category!]!
name: String!
}
type Content {
audioUrl: String
authorImageUrl: String
authorName: String
authors: [Author!]
categories: [String!]
content: String
contentSession: ContentSession
context: String
couldntFetchThumbnail: Boolean
createdAt: Date!
followUpQuestions: [FollowUpQuestion!]
friends: [ContentUserFollowingProfile!]
id: String!
lengthFormatted: String
lengthMs: Int
lengthSeconds: Int!
ogDescription: String
releasedAt: Date
sourceImageUrl: String
summary: String
thumbnailImageUrl: String
title: String!
type: String!
updatedAt: Date!
websiteUrl: String!
}
enum ContentFeedFilter {
Archived
Disliked
ForYou
Friends
New
Popular
Queue
Unread
}
type ContentRespondResponse {
responseAudioUrl: String!
transcription: String!
}
type ContentSession {
bookmarkedAt: Date
content: Content
contentId: String!
createdAt: Date!
currentMs: Float
dislikedAt: Date
durationMs: Float
id: String!
isBookmarked: Boolean
isDisliked: Boolean
notes: String
percentFinished: Float
timestampCursor: Float
updatedAt: Date!
userId: String!
}
type ContentUserFollowingProfile {
avatarImageUrl: String
id: ID!
name: String
username: String
}
type CreateUserResponse {
token: String!
user: User!
}
"""Date custom scalar type"""
scalar Date
type FeedItem {
content: Content
contentId: ID!
contentSession: ContentSession
createdAt: Date!
id: ID!
isQueued: Boolean!
position: Float!
updatedAt: Date!
userId: ID!
}
type FollowUpQuestion {
answer: String!
id: String!
question: String!
}
type FollowersResponse {
followers: [Profile!]!
following: [Profile!]!
}
type FriendProfile {
profile: Profile!
unreadCount: Int!
}
type GetMobileUpdateResponse {
latestVersion: String
shouldUpdate: Boolean!
userVersion: String
}
type GetQueueResponse {
queue: [FeedItem!]!
total: Int!
}
type Interaction {
contentId: ID!
createdAt: Date!
id: ID!
type: InteractionTypeEnum!
updatedAt: Date!
}
enum InteractionTypeEnum {
Bookmarked
Disliked
Finished
LeftInProgress
Likes
ListenedToBeginning
Queued
ScrolledPast
Skipped
StartedListening
Unbookmarked
Undisliked
}
type Metadata {
author: String
byline: String
dir: String
excerpt: String
full_text: String
lang: String
length: Int
page_type: String
publishedTime: String
siteName: String
}
type Mutation {
addOpenGraphDataToContent(contentId: String!): Content!
addToQueue(contentId: ID!): FeedItem!
archiveContent(contentId: ID!): FeedItem!
bookmarkContent(authProviderId: String, contentId: ID!): ContentSession!
clearQueue: String!
createAuthor(imageUrl: String, name: String!): Author
createContentFromUrl(authProviderId: String, url: String!): Content!
createUser(email: String!, name: String, password: String, referralCode: String, username: String): CreateUserResponse!
deleteMe: String!
dislikeContent(authProviderId: String, contentId: ID!): ContentSession!
followProfile(username: String!): String!
getAuthToken: String!
readNotifications(notificationIds: [ID!]!): String!
recordInteraction(contentId: ID!, eventType: InteractionTypeEnum!): Interaction!
removeFromQueue(contentId: ID!): FeedItem!
respondToContent(audioFileUrl: String!, contentId: ID!): ContentRespondResponse!
sendVerification(phoneNumber: String!): String!
setCommuteTime(commuteTime: String, timezone: String): User!
setInterests(interestCategories: [String!]!, interestDescription: String): User!
showMore: String!
startContent(contentId: ID!): ContentSession!
startListening: ContentSession!
unfollowProfile(username: String!): String!
updateContentSession(contentSessionId: ID!, currentMs: Int, isBookmarked: Boolean, isLiked: Boolean, lastListenedAt: Date, notes: String): ContentSession!
updateUser(avatarImageUrl: String, biometricPublicKey: String, description: String, hasMobile: Boolean, hasPushNotifications: Boolean, hasTwoFactorAuth: Boolean, name: String, phoneNumber: String, unreadCount: Int, username: String): User!
verifyPhoneNumber(otpCode: String!, phoneNumber: String!): User!
}
type Notification {
createdAt: Date!
followerUser: PublicProfile
hasRead: Boolean!
hasSent: Boolean!
iconImageUrl: String
id: ID!
subtitle: String!
title: String!
type: String
userId: String!
}
type PaymentMethod {
last4: String!
paymentMethodId: String!
source: String!
}
type Profile {
avatarImageUrl: String
description: String!
id: ID!
isFollowing: Boolean!
name: String!
numFollowers: Int!
numFollowing: Int!
username: String!
}
type PublicProfile {
avatarImageUrl: String
description: String!
id: ID!
name: String!
username: String!
}
type Query {
checkCode(referralCode: String!): Boolean!
checkValidUsername(username: String!): String!
getActivity(filter: ActivityFilter, username: String): [Content!]!
getArchived: [Content!]!
getAuthor(authorId: ID!): Author!
getAuthorContent(authorId: ID!, limit: Int, page: Int): [Content!]!
getBookmarks(limit: Int, page: Int, username: String): [Content!]!
getCategories: [CategorySection!]!
getContent(contentId: ID!): Content!
getContentSession(contentId: ID!): ContentSession!
getCurrentContentSession: ContentSession
getFeed(filter: ContentFeedFilter, limit: Int, page: Int): [Content!]!
getFollows(username: String!): FollowersResponse!
getFriends: [FriendProfile!]!
getIntercomMobileToken(platform: String): String!
getIsBookmarked(authProviderId: String, url: String!): Boolean!
getLikes(limit: Int, page: Int): [ContentSession!]!
getMobileUpdate: GetMobileUpdateResponse!
getNextContent(afterContentId: ID!, currentMs: Int): FeedItem
getNotifications: [Notification!]!
getNumUnreadNotifications: Int!
getPaymentMethods: [PaymentMethod!]!
getPrevContent(beforeContentId: ID!, currentMs: Int): FeedItem
getProfile(username: String): Profile!
getQueue: GetQueueResponse!
getUserContacts(phoneNumbers: [String!]!): [UserContactProfile!]!
me: User
searchSimilarLinks(limit: Int = 8, query: String!): [SearchResult!]!
searchUsers(query: String!): [UserSearchResult!]!
}
type SearchResult {
averageDistance: Float!
createdDate: Date!
fullText: String
id: Int!
lastCrawled: Date
link: String!
metadata: Metadata
minDistance: Float!
modifiedDate: Date!
readCount: Int!
snippet: String
title: String!
userIds: [Int!]!
}
"""The `Upload` scalar type represents a file upload."""
scalar Upload
type User {
authProvider: UserAuthProviderEnum!
authProviderId: String!
avatarImageUrl: String
biometricPublicKey: String
commuteTime: String
createdAt: Date!
description: String!
email: String!
hasMobile: Boolean
hasPushNotificationsEnabled: Boolean
hasTwoFactorAuth: Boolean!
hasVerifiedPhoneNumber: Boolean!
id: String!
intercomMobileUserHash: String
intercomUserHash: String
isSuperuser: Boolean!
name: String
number: Float
phoneNumber: String
referralCode: String
referredByCode: String
referredByName: String
role: String
timezone: String
updatedAt: Date!
username: String
}
enum UserAuthProviderEnum {
Firebase
}
type UserContactProfile {
avatarImageUrl: String
description: String
id: ID!
isFollowing: Boolean
name: String
phoneNumber: String
username: String
}
type UserSearchResult {
avatarImageUrl: String
id: ID!
isFollowing: Boolean
name: String
username: String
}