@fowgence/api-schema 1.0.1-dev.22581445048.0 → 1.0.1-dev.23196426614.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 +344 -45
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fowgence/api-schema",
3
- "version": "1.0.1-dev.22581445048.0",
3
+ "version": "1.0.1-dev.23196426614.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
@@ -6,6 +6,7 @@ type Media {
6
6
  id: ID!
7
7
  createdAt: DateTime
8
8
  updatedAt: DateTime
9
+ success: Boolean!
9
10
  key: String!
10
11
  fileName: String
11
12
  mimeType: String
@@ -21,6 +22,7 @@ type Snippet {
21
22
  id: ID!
22
23
  createdAt: DateTime
23
24
  updatedAt: DateTime
25
+ success: Boolean!
24
26
  code: String
25
27
  language: String
26
28
  fileName: String
@@ -30,6 +32,7 @@ type UserSetting {
30
32
  id: ID!
31
33
  createdAt: DateTime
32
34
  updatedAt: DateTime
35
+ success: Boolean!
33
36
  theme: Theme
34
37
  notificationLike: Flag
35
38
  notificationReward: Flag
@@ -56,8 +59,62 @@ enum Flag {
56
59
  }
57
60
 
58
61
  enum Language {
62
+ AFRIKAANS
63
+ ARABIC
64
+ BULGARIAN
65
+ BENGALI
66
+ CATALAN
67
+ CZECH
68
+ WELSH
69
+ DANISH
70
+ GERMAN
71
+ GREEK
59
72
  ENGLISH
73
+ SPANISH
74
+ ESTONIAN
75
+ PERSIAN
76
+ FINNISH
77
+ FRENCH
78
+ GUJARATI
79
+ HEBREW
80
+ HINDI
81
+ CROATIAN
82
+ HUNGARIAN
83
+ INDONESIAN
84
+ ITALIAN
60
85
  JAPANESE
86
+ KANNADA
87
+ KOREAN
88
+ LITHUANIAN
89
+ LATVIAN
90
+ MACEDONIAN
91
+ MALAYALAM
92
+ MARATHI
93
+ NEPALI
94
+ DUTCH
95
+ NORWEGIAN
96
+ PUNJABI
97
+ POLISH
98
+ PORTUGUESE
99
+ ROMANIAN
100
+ RUSSIAN
101
+ SLOVAK
102
+ SLOVENIAN
103
+ SOMALI
104
+ ALBANIAN
105
+ SWEDISH
106
+ SWAHILI
107
+ TAMIL
108
+ TELUGU
109
+ THAI
110
+ TAGALOG
111
+ TURKISH
112
+ UKRAINIAN
113
+ URDU
114
+ VIETNAMESE
115
+ CHINESE_SIMPLIFIED
116
+ CHINESE_TRADITIONAL
117
+ UNSUPPORTED
61
118
  }
62
119
 
63
120
  enum Privacy {
@@ -69,33 +126,60 @@ type ExternalLink {
69
126
  id: ID!
70
127
  createdAt: DateTime
71
128
  updatedAt: DateTime
129
+ success: Boolean!
72
130
  name: String
73
131
  url: String
74
132
  }
75
133
 
76
- type Comment {
134
+ type GroupModel {
135
+ id: ID!
136
+ createdAt: DateTime
137
+ updatedAt: DateTime
138
+ success: Boolean!
139
+ name: String
140
+ displayName: String
141
+ description: String
142
+ privacy: Privacy
143
+ rank: GroupRank
144
+ externalLinks: [ExternalLink]
145
+ membersCount: Int
146
+ followersCount: Int
147
+ joinRequestsCount: Int
148
+ postsCount: Int
149
+ }
150
+
151
+ enum GroupRank {
152
+ TROPHY
153
+ AWARD
154
+ MEDAL
155
+ }
156
+
157
+ type Post {
77
158
  id: ID!
78
159
  createdAt: DateTime
79
160
  updatedAt: DateTime
161
+ success: Boolean!
162
+ title: String
80
163
  content: String
81
- authorType: AuthorType
82
- quotedText: String
83
- startIndex: Int
84
- images: [Media]
164
+ medias: [Media]
85
165
  snippets: [Snippet]
86
- comments: [Comment]
87
166
  author: User
88
- }
89
-
90
- enum AuthorType {
91
- AI
92
- USER
167
+ group: GroupModel
168
+ comments: [Comment!]
169
+ tags: [String]
170
+ commentsCount: Int
171
+ likesCount: Int
172
+ isLiked: Boolean
173
+ isBookmarked: Boolean
174
+ rewardsCount: Int
175
+ isRewarded: Boolean
93
176
  }
94
177
 
95
178
  type User {
96
179
  id: ID!
97
180
  createdAt: DateTime
98
181
  updatedAt: DateTime
182
+ success: Boolean!
99
183
  name: String
100
184
  displayName: String
101
185
  bio: String
@@ -108,7 +192,6 @@ type User {
108
192
  groupsCount: Int
109
193
  followingGroupsCount: Int
110
194
  posts: [Post]
111
- comments: [Comment]
112
195
  likes: [Post]
113
196
  bookmarks: [Post]
114
197
  sentRewards: [Post]
@@ -124,39 +207,19 @@ enum UserRank {
124
207
  PAWN
125
208
  }
126
209
 
127
- type GroupModel {
128
- id: ID!
129
- createdAt: DateTime
130
- updatedAt: DateTime
131
- name: String
132
- displayName: String
133
- description: String
134
- privacy: Privacy
135
- rank: GroupRank
136
- externalLinks: [ExternalLink]
137
- membersCount: Int
138
- followersCount: Int
139
- joinRequestsCount: Int
140
- postsCount: Int
141
- }
142
-
143
- enum GroupRank {
144
- TROPHY
145
- AWARD
146
- MEDAL
147
- }
148
-
149
- type Post {
210
+ type Comment {
150
211
  id: ID!
151
212
  createdAt: DateTime
152
213
  updatedAt: DateTime
214
+ success: Boolean!
153
215
  title: String
154
216
  content: String
217
+ authorType: AuthorType
155
218
  medias: [Media]
156
219
  snippets: [Snippet]
157
220
  author: User
158
- group: GroupModel
159
- tags: [String]
221
+ quotingComments: [Comment]
222
+ commentsCount: Int
160
223
  likesCount: Int
161
224
  isLiked: Boolean
162
225
  isBookmarked: Boolean
@@ -164,35 +227,248 @@ type Post {
164
227
  isRewarded: Boolean
165
228
  }
166
229
 
230
+ enum AuthorType {
231
+ AI
232
+ USER
233
+ }
234
+
235
+ type FollowRequestModel {
236
+ id: ID!
237
+ createdAt: DateTime
238
+ updatedAt: DateTime
239
+ success: Boolean!
240
+ userId: String!
241
+ userName: String!
242
+ }
243
+
244
+ type FollowerModel {
245
+ id: ID!
246
+ createdAt: DateTime
247
+ updatedAt: DateTime
248
+ success: Boolean!
249
+ userId: String!
250
+ userName: String!
251
+ isFollowing: Boolean!
252
+ }
253
+
254
+ type FollowingModel {
255
+ id: ID!
256
+ createdAt: DateTime
257
+ updatedAt: DateTime
258
+ success: Boolean!
259
+ userId: String!
260
+ userName: String!
261
+ }
262
+
263
+ type GroupFollowerModel {
264
+ id: ID!
265
+ createdAt: DateTime
266
+ updatedAt: DateTime
267
+ success: Boolean!
268
+ userId: String!
269
+ userName: String!
270
+ }
271
+
272
+ type GroupMemberModel {
273
+ id: ID!
274
+ createdAt: DateTime
275
+ updatedAt: DateTime
276
+ success: Boolean!
277
+ userId: String!
278
+ userName: String!
279
+ role: MemberRole!
280
+ }
281
+
282
+ enum MemberRole {
283
+ HOST
284
+ MEMBER
285
+ }
286
+
287
+ type JoinRequestModel {
288
+ id: ID!
289
+ createdAt: DateTime
290
+ updatedAt: DateTime
291
+ success: Boolean!
292
+ userId: String!
293
+ userName: String!
294
+ }
295
+
296
+ type Notification {
297
+ id: ID!
298
+ createdAt: DateTime
299
+ updatedAt: DateTime
300
+ success: Boolean!
301
+ template: NotificationTemplate
302
+ readAt: DateTime
303
+ user: User
304
+ sender: User
305
+ group: GroupModel
306
+ post: Post
307
+ }
308
+
309
+ enum NotificationTemplate {
310
+ LIKE
311
+ REPLY
312
+ REWARD
313
+ FOLLOW
314
+ FOLLOW_REQ
315
+ GROUP_LIKE
316
+ GROUP_REPLY
317
+ GROUP_REWARD
318
+ GROUP_FOLLOW
319
+ GROUP_JOIN
320
+ GROUP_JOIN_REQ
321
+ }
322
+
167
323
  type Query {
168
- postsRecommendation(data: PostsFeedQueryModel!): [Post]
169
- postsRecommendationPublic(data: PostsFeedQueryModel!): [Post]
324
+ followers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [FollowerModel]
325
+ followings(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [FollowingModel]
326
+ followRequests: [FollowRequestModel]
327
+ user(name: String!): User
328
+ searchUsers(searchTerm: String!, max: Float): [User!]
329
+ group(name: String!): GroupModel
330
+ searchGroups(searchTerm: String!, max: Float): [GroupModel]
331
+ myGroups: [GroupModel]
332
+ groups(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupModel]
333
+ groupMembers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupMemberModel]
334
+ groupFollowers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupFollowerModel]
335
+ joinRequests(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [JoinRequestModel]
336
+ post(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
337
+ postsRecommendation(data: QueryPostsFeedModel!): [Post]
338
+ postPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
339
+ postsRecommendationPublic(data: QueryPostsFeedModel!): [Post]
170
340
  searchPosts(searchTerm: String!, max: Float): [Post]
341
+ notifications: [Notification]
342
+ rootAiComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
343
+ comment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
344
+ comments(postId: ID!, limit: Float, lastScore: Float, excludeIds: [String]): [Comment!]!
345
+ rootAiCommentPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
171
346
  }
172
347
 
173
- input PostsFeedQueryModel {
348
+ input QueryPostsFeedModel {
174
349
  languages: [Language]
175
- lat: Float!
176
350
  lon: Float!
351
+ lat: Float!
177
352
  page: Int
178
353
  limit: Int
179
354
  }
180
355
 
181
356
  type Mutation {
357
+ createUser(data: CreateUser!): User!
358
+ updateUser(data: UpdateUser!): User!
359
+ deleteUser: Boolean
360
+ followUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
361
+ unfollowUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
362
+ createFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
363
+ deleteFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
364
+ acceptFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
365
+ declineFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
366
+ createGroup(data: CreateGroup!): GroupModel!
367
+ updateGroup(data: UpdateGroup!): GroupModel!
368
+ deleteGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
369
+ followGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
370
+ unfollowGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
371
+ leaveGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
372
+ joinGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
373
+ createJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
374
+ deleteJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
375
+ acceptJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
182
376
  createPost(data: CreatePost!): Post!
377
+ updateNotificationsByIds(data: IdsModel!): Boolean
378
+ updateGroupNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
379
+ updatePostNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
380
+ updateCommentNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
381
+ createComment(data: CreateComment!): Comment!
382
+ }
383
+
384
+ input CreateUser {
385
+ displayName: String!
386
+ bio: String
387
+ setting: CreateUserSetting!
388
+ externalLinks: [UpsertExternalLink]
389
+ }
390
+
391
+ input CreateUserSetting {
392
+ theme: Theme!
393
+ systemLanguage: Language!
394
+ postsLanguages: [Language!]!
395
+ privacy: Privacy! = PUBLIC
396
+ }
397
+
398
+ input UpsertExternalLink {
399
+ id: ID
400
+ name: String!
401
+ url: String!
402
+ }
403
+
404
+ input UpdateUser {
405
+ displayName: String
406
+ bio: String
407
+ externalLinks: [UpsertExternalLink!]
408
+ setting: UpdateUserSetting
409
+ }
410
+
411
+ input UpdateUserSetting {
412
+ theme: Theme
413
+ systemLanguage: Language
414
+ postsLanguages: [Language!]
415
+ privacy: Privacy = PUBLIC
416
+ notificationLike: Flag
417
+ notificationReward: Flag
418
+ notificationReply: Flag
419
+ notificationFollowRequest: Flag
420
+ notificationMention: Flag
421
+ notificationGroupFollowRequest: Flag
422
+ notificationGroupJoinRequest: Flag
423
+ notificationGroupNewPost: Flag
424
+ notificationGroupReply: Flag
425
+ }
426
+
427
+ input CreateGroup {
428
+ name: String!
429
+ displayName: String!
430
+ description: String
431
+ privacy: Privacy!
432
+ externalLinks: [UpsertExternalLink]
433
+ hostsIds: [String!]!
434
+ membersIds: [String]
435
+ }
436
+
437
+ input UpdateGroup {
438
+ displayName: String
439
+ description: String
440
+ privacy: Privacy
441
+ externalLinks: [UpsertExternalLink!]
442
+ hostsIds: [String!]
443
+ membersIds: [String!]
444
+ id: ID!
183
445
  }
184
446
 
185
447
  input CreatePost {
448
+ id: ID!
449
+ lon: Float
450
+ lat: Float
451
+ privacy: Privacy! = PUBLIC
186
452
  title: String
187
453
  content: String!
188
- images: [CreateMedia]
454
+ medias: [CreateMedia]
189
455
  snippets: [CreateSnippet]
190
456
  groupId: String
191
- tags: [CreateTag]
457
+ tags: [String]
458
+ askAi: Flag! = OFF
192
459
  }
193
460
 
194
461
  input CreateMedia {
195
462
  key: String!
463
+ mimeType: MimeType!
464
+ }
465
+
466
+ enum MimeType {
467
+ PNG
468
+ JPEG
469
+ WEBP
470
+ HEIC
471
+ HEIF
196
472
  }
197
473
 
198
474
  input CreateSnippet {
@@ -201,6 +477,29 @@ input CreateSnippet {
201
477
  fileName: String
202
478
  }
203
479
 
204
- input CreateTag {
205
- name: String!
480
+ input IdsModel {
481
+ ids: [String!]!
482
+ }
483
+
484
+ input CreateComment {
485
+ postId: ID!
486
+ content: String!
487
+ medias: [CreateMedia]
488
+ snippets: [CreateSnippet]
489
+ quotedCommentId: String
490
+ quoteType: QuoteType
491
+ quotedText: String
492
+ startIndex: Int
493
+ }
494
+
495
+ enum QuoteType {
496
+ QUOTE
497
+ CORRECT
498
+ }
499
+
500
+ type Subscription {
501
+ unreadNotificationsCount: Int!
502
+ unreadNotifications: [Notification!]!
503
+ aiCommentAdded(postId: String!): String!
504
+ commentAdded: [String!]!
206
505
  }