@fowgence/api-schema 1.0.1-dev.0 → 1.0.1-dev.21987503868.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 +356 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fowgence/api-schema",
3
- "version": "1.0.1-dev.0",
3
+ "version": "1.0.1-dev.21987503868.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
@@ -2,27 +2,371 @@
2
2
  # THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
3
3
  # ------------------------------------------------------
4
4
 
5
+ type UserSetting {
6
+ id: ID!
7
+ createdAt: DateTime
8
+ updatedAt: DateTime
9
+ theme: Theme
10
+ notificationLike: Flag
11
+ notificationReward: Flag
12
+ notificationReply: Flag
13
+ notificationFollowRequest: Flag
14
+ notificationMention: Flag
15
+ notificationGroupFollowRequest: Flag
16
+ notificationGroupJoinRequest: Flag
17
+ notificationGroupNewPost: Flag
18
+ notificationGroupReply: Flag
19
+ systemLanguage: Language
20
+ postsLanguage: [Language!]
21
+ privacy: Privacy
22
+ }
23
+
24
+ """
25
+ A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
26
+ """
27
+ scalar DateTime
28
+
29
+ enum Theme {
30
+ LIGHT
31
+ DARK
32
+ }
33
+
34
+ enum Flag {
35
+ OFF
36
+ ON
37
+ }
38
+
39
+ enum Language {
40
+ ENGLISH
41
+ JAPANESE
42
+ }
43
+
44
+ enum Privacy {
45
+ PRIVATE
46
+ PUBLIC
47
+ }
48
+
49
+ type ExternalLink {
50
+ id: ID!
51
+ createdAt: DateTime
52
+ updatedAt: DateTime
53
+ name: String
54
+ url: String
55
+ }
56
+
57
+ type Media {
58
+ id: ID!
59
+ createdAt: DateTime
60
+ updatedAt: DateTime
61
+ key: String!
62
+ }
63
+
64
+ type Snippet {
65
+ id: ID!
66
+ createdAt: DateTime
67
+ updatedAt: DateTime
68
+ code: String
69
+ language: String
70
+ fileName: String
71
+ }
72
+
73
+ type GroupModel {
74
+ id: ID!
75
+ createdAt: DateTime
76
+ updatedAt: DateTime
77
+ name: String
78
+ displayName: String
79
+ description: String
80
+ privacy: Privacy
81
+ rank: GroupRank
82
+ externalLinks: [ExternalLink]
83
+ membersCount: Int
84
+ followersCount: Int
85
+ joinRequestsCount: Int
86
+ postsCount: Int
87
+ }
88
+
89
+ enum GroupRank {
90
+ TROPHY
91
+ AWARD
92
+ MEDAL
93
+ }
94
+
95
+ type Tag {
96
+ id: ID!
97
+ createdAt: DateTime
98
+ updatedAt: DateTime
99
+ name: String!
100
+ }
101
+
5
102
  type Post {
6
- id: Int!
7
- title: String!
8
- votes: Int
103
+ id: ID!
104
+ createdAt: DateTime
105
+ updatedAt: DateTime
106
+ title: String
107
+ content: String
108
+ images: [Media]
109
+ snippets: [Snippet]
110
+ author: User
111
+ group: GroupModel
112
+ tags: [Tag]
113
+ likesCount: Int
114
+ isLiked: Boolean
115
+ isBookmarked: Boolean
116
+ rewardsCount: Int
117
+ isRewarded: Boolean
118
+ }
119
+
120
+ type Comment {
121
+ id: ID!
122
+ createdAt: DateTime
123
+ updatedAt: DateTime
124
+ content: String
125
+ authorType: AuthorType
126
+ quotedText: String
127
+ startIndex: Int
128
+ images: [Media]
129
+ snippets: [Snippet]
130
+ comments: [Comment]
131
+ author: User
132
+ }
133
+
134
+ enum AuthorType {
135
+ AI
136
+ USER
137
+ }
138
+
139
+ type User {
140
+ id: ID!
141
+ createdAt: DateTime
142
+ updatedAt: DateTime
143
+ name: String
144
+ displayName: String
145
+ bio: String
146
+ rank: UserRank
147
+ setting: UserSetting
148
+ externalLinks: [ExternalLink]
149
+ followingsCount: Int
150
+ followersCount: Int
151
+ receivedFollowRequestsCount: Int
152
+ groupsCount: Int
153
+ followingGroupsCount: Int
154
+ posts: [Post]
155
+ comments: [Comment]
156
+ likes: [Post]
157
+ bookmarks: [Post]
158
+ sentRewards: [Post]
159
+ availableRewards: Int
160
+ }
161
+
162
+ enum UserRank {
163
+ KING
164
+ QUEEN
165
+ ROOK
166
+ BISHOP
167
+ KNIGHT
168
+ PAWN
169
+ }
170
+
171
+ type FollowRequestModel {
172
+ id: ID!
173
+ createdAt: DateTime
174
+ updatedAt: DateTime
175
+ userId: String!
176
+ userName: String!
9
177
  }
10
178
 
11
- type Author {
12
- id: Int!
13
- firstName: String
14
- lastName: String
15
- posts: [Post!]!
179
+ type FollowingModel {
180
+ id: ID!
181
+ createdAt: DateTime
182
+ updatedAt: DateTime
183
+ userId: String!
184
+ userName: String!
185
+ }
186
+
187
+ type FollowerModel {
188
+ id: ID!
189
+ createdAt: DateTime
190
+ updatedAt: DateTime
191
+ userId: String!
192
+ userName: String!
193
+ isFollowing: Boolean!
194
+ }
195
+
196
+ type Notification {
197
+ id: ID!
198
+ createdAt: DateTime
199
+ updatedAt: DateTime
200
+ template: NotificationTemplate
201
+ readAt: DateTime
202
+ user: User
203
+ sender: User
204
+ group: GroupModel
205
+ post: Post
206
+ comment: Comment
207
+ }
208
+
209
+ enum NotificationTemplate {
210
+ LIKE
211
+ REPLY
212
+ REWARD
213
+ MENTION
214
+ FOLLOW
215
+ FOLLOW_REQ
216
+ GROUP_LIKE
217
+ GROUP_REPLY
218
+ GROUP_REWARD
219
+ GROUP_NEW_POST
220
+ GROUP_MENTION
221
+ GROUP_FOLLOW
222
+ GROUP_JOIN
223
+ GROUP_JOIN_REQ
224
+ }
225
+
226
+ type GroupFollowerModel {
227
+ id: ID!
228
+ createdAt: DateTime
229
+ updatedAt: DateTime
230
+ userId: String!
231
+ userName: String!
232
+ }
233
+
234
+ type GroupMemberModel {
235
+ id: ID!
236
+ createdAt: DateTime
237
+ updatedAt: DateTime
238
+ userId: String!
239
+ userName: String!
240
+ role: MemberRole!
241
+ }
242
+
243
+ enum MemberRole {
244
+ HOST
245
+ MEMBER
246
+ }
247
+
248
+ type JoinRequestModel {
249
+ id: ID!
250
+ createdAt: DateTime
251
+ updatedAt: DateTime
252
+ userId: String!
253
+ userName: String!
16
254
  }
17
255
 
18
256
  type Query {
19
- author(id: Int!): Author!
257
+ followers(id: ID!, limit: Float, lastId: String): [FollowerModel]
258
+ followings(id: ID!, limit: Float, lastId: String): [FollowingModel]
259
+ followRequests: [FollowRequestModel]
260
+ user(name: String!): User
261
+ searchUsers(searchTerm: String!, max: Float): [User!]
262
+ notifications: [Notification]
263
+ group(name: String!): GroupModel
264
+ searchGroups(searchTerm: String!, max: Float): [GroupModel]
265
+ myGroups: [GroupModel]
266
+ groups(id: ID!, limit: Float, lastId: String): [GroupModel]
267
+ groupMembers(id: ID!, limit: Float, lastId: String): [GroupMemberModel]
268
+ groupFollowers(id: ID!, limit: Float, lastId: String): [GroupFollowerModel]
269
+ joinRequests(id: ID!, limit: Float, lastId: String): [JoinRequestModel]
20
270
  }
21
271
 
22
272
  type Mutation {
23
- upvotePost(upvotePostData: UpvotePostInput!): Post!
273
+ createUser(data: CreateUser!): User!
274
+ updateUser(data: UpdateUser!): User!
275
+ deleteUser: Boolean
276
+ followUser(id: ID!, limit: Float, lastId: String): Boolean
277
+ unfollowUser(id: ID!, limit: Float, lastId: String): Boolean
278
+ createFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
279
+ deleteFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
280
+ acceptFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
281
+ declineFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
282
+ updateNotificationsByIds(data: IdsModel!): Boolean
283
+ updateNotification(data: UpdateNotification!): Boolean
284
+ createGroup(data: CreateGroup!): GroupModel!
285
+ updateGroup(data: UpdateGroup!): GroupModel!
286
+ deleteGroup(id: ID!, limit: Float, lastId: String): Boolean
287
+ followGroup(id: ID!, limit: Float, lastId: String): Boolean
288
+ unfollowGroup(id: ID!, limit: Float, lastId: String): Boolean
289
+ leaveGroup(id: ID!, limit: Float, lastId: String): Boolean
290
+ joinGroup(id: ID!, limit: Float, lastId: String): Boolean
291
+ createJoinRequest(id: ID!, limit: Float, lastId: String): Boolean
292
+ deleteJoinRequest(id: ID!, limit: Float, lastId: String): Boolean
293
+ acceptJoinRequest(id: ID!, limit: Float, lastId: String): Boolean
294
+ }
295
+
296
+ input CreateUser {
297
+ displayName: String!
298
+ bio: String
299
+ setting: CreateUserSetting!
300
+ externalLinks: [UpsertExternalLink]
301
+ }
302
+
303
+ input CreateUserSetting {
304
+ theme: Theme!
305
+ systemLanguage: Language!
306
+ postsLanguages: [Language!]!
307
+ privacy: Privacy!
308
+ }
309
+
310
+ input UpsertExternalLink {
311
+ id: ID
312
+ name: String!
313
+ url: String!
314
+ }
315
+
316
+ input UpdateUser {
317
+ displayName: String
318
+ bio: String
319
+ externalLinks: [UpsertExternalLink!]
320
+ setting: UpdateUserSetting
321
+ }
322
+
323
+ input UpdateUserSetting {
324
+ theme: Theme
325
+ systemLanguage: Language
326
+ postsLanguages: [Language!]
327
+ privacy: Privacy
328
+ notificationLike: Flag
329
+ notificationReward: Flag
330
+ notificationReply: Flag
331
+ notificationFollowRequest: Flag
332
+ notificationMention: Flag
333
+ notificationGroupFollowRequest: Flag
334
+ notificationGroupJoinRequest: Flag
335
+ notificationGroupNewPost: Flag
336
+ notificationGroupReply: Flag
337
+ }
338
+
339
+ input IdsModel {
340
+ ids: [String!]!
341
+ }
342
+
343
+ input UpdateNotification {
344
+ groupId: String
345
+ postId: String
346
+ commentId: String
347
+ }
348
+
349
+ input CreateGroup {
350
+ name: String!
351
+ displayName: String!
352
+ description: String
353
+ privacy: Privacy!
354
+ externalLinks: [UpsertExternalLink]
355
+ hostsIds: [String!]!
356
+ membersIds: [String]
357
+ }
358
+
359
+ input UpdateGroup {
360
+ displayName: String
361
+ description: String
362
+ privacy: Privacy
363
+ externalLinks: [UpsertExternalLink!]
364
+ hostsIds: [String!]
365
+ membersIds: [String!]
366
+ id: ID!
24
367
  }
25
368
 
26
- input UpvotePostInput {
27
- postId: Float!
369
+ type Subscription {
370
+ unreadNotificationsCount: Int!
371
+ unreadNotifications: [Notification!]!
28
372
  }