@fowgence/api-schema 1.0.1-dev.23496316375.0 → 1.0.1-dev.24246808686.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schema.gql +71 -81
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fowgence/api-schema",
3
- "version": "1.0.1-dev.23496316375.0",
3
+ "version": "1.0.1-dev.24246808686.0",
4
4
  "description": "Auto-generated GraphQL schema for the Next.js frontend",
5
5
  "main": "schema.gql",
6
6
  "files": [
package/schema.gql CHANGED
@@ -18,16 +18,6 @@ A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date
18
18
  """
19
19
  scalar DateTime
20
20
 
21
- type Snippet {
22
- id: ID!
23
- createdAt: DateTime
24
- updatedAt: DateTime
25
- success: Boolean!
26
- code: String
27
- language: String
28
- fileName: String
29
- }
30
-
31
21
  type UserSetting {
32
22
  id: ID!
33
23
  createdAt: DateTime
@@ -131,6 +121,16 @@ type ExternalLink {
131
121
  url: String
132
122
  }
133
123
 
124
+ type Snippet {
125
+ id: ID!
126
+ createdAt: DateTime
127
+ updatedAt: DateTime
128
+ success: Boolean!
129
+ code: String
130
+ language: String
131
+ fileName: String
132
+ }
133
+
134
134
  type GroupModel {
135
135
  id: ID!
136
136
  createdAt: DateTime
@@ -173,6 +173,7 @@ type Post {
173
173
  isBookmarked: Boolean
174
174
  rewardsCount: Int
175
175
  isRewarded: Boolean
176
+ isReported: Boolean
176
177
  }
177
178
 
178
179
  type User {
@@ -217,7 +218,6 @@ type Comment {
217
218
  authorType: AuthorType
218
219
  score: Float
219
220
  medias: [Media]
220
- snippets: [Snippet]
221
221
  author: User
222
222
  quotingComments: [Comment]
223
223
  children: [Comment]
@@ -234,43 +234,6 @@ enum AuthorType {
234
234
  USER
235
235
  }
236
236
 
237
- type FollowRequestModel {
238
- id: ID!
239
- createdAt: DateTime
240
- updatedAt: DateTime
241
- success: Boolean!
242
- userId: String!
243
- userName: String!
244
- }
245
-
246
- type FollowerModel {
247
- id: ID!
248
- createdAt: DateTime
249
- updatedAt: DateTime
250
- success: Boolean!
251
- userId: String!
252
- userName: String!
253
- isFollowing: Boolean!
254
- }
255
-
256
- type FollowingModel {
257
- id: ID!
258
- createdAt: DateTime
259
- updatedAt: DateTime
260
- success: Boolean!
261
- userId: String!
262
- userName: String!
263
- }
264
-
265
- type GroupFollowerModel {
266
- id: ID!
267
- createdAt: DateTime
268
- updatedAt: DateTime
269
- success: Boolean!
270
- userId: String!
271
- userName: String!
272
- }
273
-
274
237
  type GroupMemberModel {
275
238
  id: ID!
276
239
  createdAt: DateTime
@@ -286,15 +249,6 @@ enum MemberRole {
286
249
  MEMBER
287
250
  }
288
251
 
289
- type JoinRequestModel {
290
- id: ID!
291
- createdAt: DateTime
292
- updatedAt: DateTime
293
- success: Boolean!
294
- userId: String!
295
- userName: String!
296
- }
297
-
298
252
  type Notification {
299
253
  id: ID!
300
254
  createdAt: DateTime
@@ -322,49 +276,60 @@ enum NotificationTemplate {
322
276
  GROUP_JOIN_REQ
323
277
  }
324
278
 
279
+ type UserItemModel {
280
+ id: ID!
281
+ createdAt: DateTime
282
+ updatedAt: DateTime
283
+ success: Boolean!
284
+ userId: String!
285
+ name: String!
286
+ displayName: String!
287
+ isFollowing: Boolean
288
+ }
289
+
325
290
  type Query {
326
- followers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [FollowerModel]
327
- followings(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [FollowingModel]
328
- followRequests: [FollowRequestModel]
291
+ followers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
292
+ followings(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
293
+ followRequests(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [UserItemModel]
329
294
  user(name: String!): User
330
- searchUsers(searchTerm: String!, max: Float): [User!]
295
+ searchUsers(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [User!]
331
296
  group(name: String!): GroupModel
332
- searchGroups(searchTerm: String!, max: Float): [GroupModel]
297
+ searchGroups(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [GroupModel!]!
333
298
  myGroups: [GroupModel]
334
299
  groups(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupModel]
335
300
  groupMembers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupMemberModel]
336
- groupFollowers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupFollowerModel]
337
- joinRequests(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [JoinRequestModel]
338
- post(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
339
- postsRecommend(data: QueryPostsFeedModel!): [Post]
340
- postsHome(authorId: String, groupId: String, limit: Float, lastTimestamp: DateTime): [Post]
341
- userPosts(authorId: String, groupId: String, limit: Float, lastTimestamp: DateTime): [Post]
342
- groupPosts(authorId: String, groupId: String, limit: Float, lastTimestamp: DateTime): [Post]
301
+ groupFollowers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
302
+ joinRequests(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
303
+ post(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Post
304
+ suggestPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [Post]
305
+ searchPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [Post]
306
+ recommendPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
307
+ postsHome(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
308
+ userPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [Post]
309
+ groupPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, groupId: ID!): [Post]
310
+ likedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
311
+ bookmarkedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
312
+ rewardedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
343
313
  postPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
344
- postsRecommendationPublic(data: QueryPostsFeedModel!): [Post]
345
- searchPosts(searchTerm: String!, max: Float): [Post]
346
314
  notifications: [Notification]
347
315
  rootAiComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
348
316
  comment(postId: ID!, id: ID!, parentId: String): Comment!
349
- comments(postId: ID!, limit: Float, lastScore: Float, excludeIds: [String]): [Comment!]!
350
- replies(postId: ID!, parentId: String!, limit: Float, lastTimestamp: DateTime): [Comment!]!
317
+ comments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, excludeIds: [String]): [Comment!]!
318
+ userComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [Comment]
319
+ likedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
320
+ bookmarkedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
321
+ rewardedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
322
+ replies(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, parentId: String!): [Comment!]!
351
323
  rootAiCommentPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
352
324
  }
353
325
 
354
- input QueryPostsFeedModel {
355
- languages: [Language]
356
- lon: Float!
357
- lat: Float!
358
- page: Int
359
- limit: Int
360
- }
361
-
362
326
  type Mutation {
363
327
  createUser(data: CreateUser!): User!
364
328
  updateUser(data: UpdateUser!): User!
365
329
  deleteUser: Boolean
366
330
  followUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
367
331
  unfollowUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
332
+ blockUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
368
333
  createFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
369
334
  deleteFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
370
335
  acceptFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
@@ -380,12 +345,28 @@ type Mutation {
380
345
  deleteJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
381
346
  acceptJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
382
347
  createPost(data: CreatePost!): Post!
348
+ deletePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean!
383
349
  updateNotificationsByIds(data: IdsModel!): Boolean
384
350
  updateGroupNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
385
351
  updatePostNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
386
352
  updateCommentNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
387
353
  createComment(data: CreateComment!): Comment!
388
354
  createReply(data: CreateComment!): Comment!
355
+ deleteComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
356
+ likePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
357
+ unlikePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
358
+ likeComment(commentId: ID!): Boolean
359
+ unlikeComment(commentId: ID!): Boolean
360
+ bookmarkPost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
361
+ unbookmarkPost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
362
+ bookmarkComment(commentId: ID!): Boolean
363
+ unbookmarkComment(commentId: ID!): Boolean
364
+ rewardPost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
365
+ unrewardPost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
366
+ rewardComment(commentId: ID!): Boolean
367
+ unrewardComment(commentId: ID!): Boolean
368
+ reportPost(postId: ID!, reason: ReportReason!): Boolean
369
+ reportComment(commentId: ID!, reason: ReportReason!): Boolean
389
370
  }
390
371
 
391
372
  input CreateUser {
@@ -505,6 +486,15 @@ enum QuoteType {
505
486
  CORRECT
506
487
  }
507
488
 
489
+ enum ReportReason {
490
+ SPAM
491
+ HARASSMENT
492
+ HATE_SPEECH
493
+ VIOLENCE
494
+ MISINFORMATION
495
+ SENSITIVE_CONTENT
496
+ }
497
+
508
498
  type Subscription {
509
499
  unreadNotificationsCount: Int!
510
500
  unreadNotifications: [Notification!]!