@fowgence/api-schema 1.0.1-dev.25282179606.0 → 1.0.1-dev.25628145568.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 +50 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fowgence/api-schema",
3
- "version": "1.0.1-dev.25282179606.0",
3
+ "version": "1.0.1-dev.25628145568.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,7 +18,7 @@ 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 UserSetting {
21
+ type UserSettingModel {
22
22
  id: ID!
23
23
  createdAt: DateTime
24
24
  updatedAt: DateTime
@@ -112,7 +112,7 @@ enum Privacy {
112
112
  PUBLIC
113
113
  }
114
114
 
115
- type ExternalLink {
115
+ type ExternalLinkModel {
116
116
  id: ID!
117
117
  createdAt: DateTime
118
118
  updatedAt: DateTime
@@ -131,11 +131,13 @@ type GroupModel {
131
131
  description: String
132
132
  privacy: Privacy
133
133
  rank: GroupRank
134
- externalLinks: [ExternalLink]
134
+ externalLinks: [ExternalLinkModel]
135
135
  membersCount: Int
136
136
  followersCount: Int
137
137
  joinRequestsCount: Int
138
138
  postsCount: Int
139
+ isHost: Boolean
140
+ isMember: Boolean
139
141
  }
140
142
 
141
143
  enum GroupRank {
@@ -144,7 +146,7 @@ enum GroupRank {
144
146
  MEDAL
145
147
  }
146
148
 
147
- type Post {
149
+ type PostModel {
148
150
  id: ID!
149
151
  createdAt: DateTime
150
152
  updatedAt: DateTime
@@ -152,9 +154,9 @@ type Post {
152
154
  title: String
153
155
  content: String
154
156
  medias: [Media]
155
- author: User
157
+ author: UserModel
156
158
  group: GroupModel
157
- comments: [Comment!]
159
+ comments: [CommentModel!]
158
160
  tags: [String]
159
161
  commentsCount: Int
160
162
  topComments: [String]
@@ -166,7 +168,7 @@ type Post {
166
168
  isReported: Boolean
167
169
  }
168
170
 
169
- type User {
171
+ type UserModel {
170
172
  id: ID!
171
173
  createdAt: DateTime
172
174
  updatedAt: DateTime
@@ -175,17 +177,17 @@ type User {
175
177
  displayName: String
176
178
  bio: String
177
179
  rank: UserRank
178
- setting: UserSetting
179
- externalLinks: [ExternalLink]
180
+ setting: UserSettingModel
181
+ externalLinks: [ExternalLinkModel]
180
182
  followingsCount: Int
181
183
  followersCount: Int
182
184
  receivedFollowRequestsCount: Int
183
185
  groupsCount: Int
184
186
  followingGroupsCount: Int
185
- posts: [Post]
186
- likes: [Post]
187
- bookmarks: [Post]
188
- sentRewards: [Post]
187
+ posts: [PostModel]
188
+ likes: [PostModel]
189
+ bookmarks: [PostModel]
190
+ sentRewards: [PostModel]
189
191
  availableRewards: Int
190
192
  }
191
193
 
@@ -198,7 +200,7 @@ enum UserRank {
198
200
  PAWN
199
201
  }
200
202
 
201
- type Comment {
203
+ type CommentModel {
202
204
  id: ID!
203
205
  createdAt: DateTime
204
206
  updatedAt: DateTime
@@ -208,9 +210,9 @@ type Comment {
208
210
  authorType: AuthorType
209
211
  score: Float
210
212
  medias: [Media]
211
- author: User
212
- quotingComments: [Comment]
213
- children: [Comment]
213
+ author: UserModel
214
+ quotingComments: [CommentModel]
215
+ children: [CommentModel]
214
216
  childrenCount: Int
215
217
  likesCount: Int
216
218
  isLiked: Boolean
@@ -246,10 +248,10 @@ type Notification {
246
248
  success: Boolean!
247
249
  template: NotificationTemplate
248
250
  readAt: DateTime
249
- user: User
250
- sender: User
251
+ user: UserModel
252
+ sender: UserModel
251
253
  group: GroupModel
252
- post: Post
254
+ post: PostModel
253
255
  }
254
256
 
255
257
  enum NotificationTemplate {
@@ -278,8 +280,8 @@ type Query {
278
280
  followers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
279
281
  followings(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
280
282
  followRequests(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [UserItemModel]
281
- user(name: String!): User
282
- searchUsers(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [User!]
283
+ user(name: String!): UserModel
284
+ searchUsers(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [UserModel!]
283
285
  group(name: String!): GroupModel
284
286
  searchGroups(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [GroupModel!]!
285
287
  myGroups: [GroupModel]
@@ -287,33 +289,33 @@ type Query {
287
289
  groupMembers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [GroupMemberModel]
288
290
  groupFollowers(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
289
291
  joinRequests(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): [UserItemModel]
290
- post(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Post
291
- suggestPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [Post]
292
- searchPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [Post]
293
- recommendPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
294
- postsHome(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
295
- aiPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
296
- userPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [Post]
297
- groupPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, groupId: ID!): [Post]
298
- likedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
299
- bookmarkedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
300
- rewardedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Post]
301
- postPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Post
292
+ post(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): PostModel
293
+ suggestPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [PostModel]
294
+ searchPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, term: String!): [PostModel]
295
+ recommendPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
296
+ postsHome(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
297
+ aiPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
298
+ userPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [PostModel]
299
+ groupPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, groupId: ID!): [PostModel]
300
+ likedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
301
+ bookmarkedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
302
+ rewardedPosts(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [PostModel]
303
+ postPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): PostModel
302
304
  notifications: [Notification]
303
- rootAiComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
304
- comment(postId: ID!, id: ID!): Comment!
305
- comments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, excludeIds: [String]): [Comment!]!
306
- userComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [Comment]
307
- likedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
308
- bookmarkedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
309
- rewardedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [Comment]
310
- replies(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, parentId: String!): [Comment!]!
311
- rootAiCommentPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Comment!
305
+ rootAiComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): CommentModel!
306
+ comment(postId: ID!, id: ID!): CommentModel!
307
+ comments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, excludeIds: [String]): [CommentModel!]!
308
+ userComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, authorId: ID!): [CommentModel]
309
+ likedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [CommentModel]
310
+ bookmarkedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [CommentModel]
311
+ rewardedComments(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime): [CommentModel]
312
+ replies(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!, parentId: String!): [CommentModel!]!
313
+ rootAiCommentPublic(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): CommentModel!
312
314
  }
313
315
 
314
316
  type Mutation {
315
- createUser(data: CreateUser!): User!
316
- updateUser(data: UpdateUser!): User!
317
+ createUser(data: CreateUser!): UserModel!
318
+ updateUser(data: UpdateUser!): UserModel!
317
319
  updatePrivacy(privacy: Privacy!): Boolean!
318
320
  updateUserSetting(data: UpdateUserSetting!): Boolean!
319
321
  deleteUser: Boolean
@@ -333,14 +335,14 @@ type Mutation {
333
335
  createJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
334
336
  deleteJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
335
337
  acceptJoinRequest(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
336
- createPost(data: CreatePost!): Post!
338
+ createPost(data: CreatePost!): PostModel!
337
339
  deletePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean!
338
340
  updateNotificationsByIds(data: IdsModel!): Boolean
339
341
  updateGroupNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
340
342
  updatePostNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
341
343
  updateCommentNotification(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
342
- createComment(data: CreateComment!): Comment!
343
- createReply(data: CreateComment!): Comment!
344
+ createComment(data: CreateComment!): CommentModel!
345
+ createReply(data: CreateComment!): CommentModel!
344
346
  deleteComment(id: ID!, limit: Float, lastId: String, lastTimestamp: Int): Boolean
345
347
  likePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean
346
348
  unlikePost(lastScore: Float, limit: Float! = 20, lastId: String, lastTimestamp: DateTime, postId: ID!): Boolean