@fowgence/api-schema 1.0.1-dev.22581445048.0 → 1.0.1-dev.23298829854.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 +350 -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.23298829854.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,21 @@ 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
218
+ score: Float
155
219
  medias: [Media]
156
220
  snippets: [Snippet]
157
221
  author: User
158
- group: GroupModel
159
- tags: [String]
222
+ quotingComments: [Comment]
223
+ children: [Comment]
224
+ childrenCount: Int
160
225
  likesCount: Int
161
226
  isLiked: Boolean
162
227
  isBookmarked: Boolean
@@ -164,35 +229,250 @@ type Post {
164
229
  isRewarded: Boolean
165
230
  }
166
231
 
232
+ enum AuthorType {
233
+ AI
234
+ USER
235
+ }
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
+ type GroupMemberModel {
275
+ id: ID!
276
+ createdAt: DateTime
277
+ updatedAt: DateTime
278
+ success: Boolean!
279
+ userId: String!
280
+ userName: String!
281
+ role: MemberRole!
282
+ }
283
+
284
+ enum MemberRole {
285
+ HOST
286
+ MEMBER
287
+ }
288
+
289
+ type JoinRequestModel {
290
+ id: ID!
291
+ createdAt: DateTime
292
+ updatedAt: DateTime
293
+ success: Boolean!
294
+ userId: String!
295
+ userName: String!
296
+ }
297
+
298
+ type Notification {
299
+ id: ID!
300
+ createdAt: DateTime
301
+ updatedAt: DateTime
302
+ success: Boolean!
303
+ template: NotificationTemplate
304
+ readAt: DateTime
305
+ user: User
306
+ sender: User
307
+ group: GroupModel
308
+ post: Post
309
+ }
310
+
311
+ enum NotificationTemplate {
312
+ LIKE
313
+ REPLY
314
+ REWARD
315
+ FOLLOW
316
+ FOLLOW_REQ
317
+ GROUP_LIKE
318
+ GROUP_REPLY
319
+ GROUP_REWARD
320
+ GROUP_FOLLOW
321
+ GROUP_JOIN
322
+ GROUP_JOIN_REQ
323
+ }
324
+
167
325
  type Query {
168
- postsRecommendation(data: PostsFeedQueryModel!): [Post]
169
- postsRecommendationPublic(data: PostsFeedQueryModel!): [Post]
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]
329
+ user(name: String!): User
330
+ searchUsers(searchTerm: String!, max: Float): [User!]
331
+ group(name: String!): GroupModel
332
+ searchGroups(searchTerm: String!, max: Float): [GroupModel]
333
+ myGroups: [GroupModel]
334
+ groups(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupModel]
335
+ 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
+ postsRecommendation(data: QueryPostsFeedModel!): [Post]
340
+ postPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
341
+ postsRecommendationPublic(data: QueryPostsFeedModel!): [Post]
170
342
  searchPosts(searchTerm: String!, max: Float): [Post]
343
+ notifications: [Notification]
344
+ rootAiComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
345
+ comment(postId: ID!, id: ID!, parentId: String): Comment!
346
+ comments(postId: ID!, limit: Float, lastScore: Float, excludeIds: [String]): [Comment!]!
347
+ replies(postId: ID!, parentId: String!, limit: Float, lastTimestamp: DateTime): [Comment!]!
348
+ rootAiCommentPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
171
349
  }
172
350
 
173
- input PostsFeedQueryModel {
351
+ input QueryPostsFeedModel {
174
352
  languages: [Language]
175
- lat: Float!
176
353
  lon: Float!
354
+ lat: Float!
177
355
  page: Int
178
356
  limit: Int
179
357
  }
180
358
 
181
359
  type Mutation {
360
+ createUser(data: CreateUser!): User!
361
+ updateUser(data: UpdateUser!): User!
362
+ deleteUser: Boolean
363
+ followUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
364
+ unfollowUser(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
365
+ createFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
366
+ deleteFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
367
+ acceptFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
368
+ declineFollowRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
369
+ createGroup(data: CreateGroup!): GroupModel!
370
+ updateGroup(data: UpdateGroup!): GroupModel!
371
+ deleteGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
372
+ followGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
373
+ unfollowGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
374
+ leaveGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
375
+ joinGroup(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
376
+ createJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
377
+ deleteJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
378
+ acceptJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
182
379
  createPost(data: CreatePost!): Post!
380
+ updateNotificationsByIds(data: IdsModel!): Boolean
381
+ updateGroupNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
382
+ updatePostNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
383
+ updateCommentNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
384
+ createComment(data: CreateComment!): Comment!
385
+ createReply(data: CreateComment!): Comment!
386
+ }
387
+
388
+ input CreateUser {
389
+ displayName: String!
390
+ bio: String
391
+ setting: CreateUserSetting!
392
+ externalLinks: [UpsertExternalLink]
393
+ }
394
+
395
+ input CreateUserSetting {
396
+ theme: Theme!
397
+ systemLanguage: Language!
398
+ postsLanguages: [Language!]!
399
+ privacy: Privacy! = PUBLIC
400
+ }
401
+
402
+ input UpsertExternalLink {
403
+ id: ID
404
+ name: String!
405
+ url: String!
406
+ }
407
+
408
+ input UpdateUser {
409
+ displayName: String
410
+ bio: String
411
+ externalLinks: [UpsertExternalLink!]
412
+ setting: UpdateUserSetting
413
+ }
414
+
415
+ input UpdateUserSetting {
416
+ theme: Theme
417
+ systemLanguage: Language
418
+ postsLanguages: [Language!]
419
+ privacy: Privacy = PUBLIC
420
+ notificationLike: Flag
421
+ notificationReward: Flag
422
+ notificationReply: Flag
423
+ notificationFollowRequest: Flag
424
+ notificationMention: Flag
425
+ notificationGroupFollowRequest: Flag
426
+ notificationGroupJoinRequest: Flag
427
+ notificationGroupNewPost: Flag
428
+ notificationGroupReply: Flag
429
+ }
430
+
431
+ input CreateGroup {
432
+ name: String!
433
+ displayName: String!
434
+ description: String
435
+ privacy: Privacy!
436
+ externalLinks: [UpsertExternalLink]
437
+ hostsIds: [String!]!
438
+ membersIds: [String]
439
+ }
440
+
441
+ input UpdateGroup {
442
+ displayName: String
443
+ description: String
444
+ privacy: Privacy
445
+ externalLinks: [UpsertExternalLink!]
446
+ hostsIds: [String!]
447
+ membersIds: [String!]
448
+ id: ID!
183
449
  }
184
450
 
185
451
  input CreatePost {
452
+ id: ID!
453
+ lon: Float
454
+ lat: Float
455
+ privacy: Privacy! = PUBLIC
186
456
  title: String
187
457
  content: String!
188
- images: [CreateMedia]
458
+ medias: [CreateMedia]
189
459
  snippets: [CreateSnippet]
190
460
  groupId: String
191
- tags: [CreateTag]
461
+ tags: [String]
462
+ askAi: Flag! = OFF
192
463
  }
193
464
 
194
465
  input CreateMedia {
195
466
  key: String!
467
+ mimeType: MimeType!
468
+ }
469
+
470
+ enum MimeType {
471
+ PNG
472
+ JPEG
473
+ WEBP
474
+ HEIC
475
+ HEIF
196
476
  }
197
477
 
198
478
  input CreateSnippet {
@@ -201,6 +481,31 @@ input CreateSnippet {
201
481
  fileName: String
202
482
  }
203
483
 
204
- input CreateTag {
205
- name: String!
484
+ input IdsModel {
485
+ ids: [String!]!
486
+ }
487
+
488
+ input CreateComment {
489
+ postId: ID!
490
+ parentId: String
491
+ privacy: Privacy! = PUBLIC
492
+ content: String!
493
+ snippets: [CreateSnippet]
494
+ quotedCommentId: String
495
+ quoteType: QuoteType
496
+ quotedText: String
497
+ startIndex: Int
498
+ askAi: Flag! = OFF
499
+ }
500
+
501
+ enum QuoteType {
502
+ QUOTE
503
+ CORRECT
504
+ }
505
+
506
+ type Subscription {
507
+ unreadNotificationsCount: Int!
508
+ unreadNotifications: [Notification!]!
509
+ aiCommentAdded(postId: String!): String!
510
+ commentAdded: [String!]!
206
511
  }