@fowgence/api-schema 1.0.1-dev.0 → 1.0.1-dev.21826775874.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 +276 -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.21826775874.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,291 @@
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 JoinRequest {
74
+ id: ID!
75
+ userId: String!
76
+ }
77
+
78
+ type GroupModel {
79
+ id: ID!
80
+ createdAt: DateTime
81
+ updatedAt: DateTime
82
+ name: String
83
+ displayName: String
84
+ bio: String
85
+ privacy: PrivacyType
86
+ rank: GroupRank
87
+ externalLinks: [ExternalLink]
88
+ hosts: [User]
89
+ members: [User]
90
+ followers: [User]
91
+ requests: [JoinRequest]
92
+ posts: [Post]
93
+ }
94
+
95
+ enum PrivacyType {
96
+ PUBLIC
97
+ PRIVATE
98
+ }
99
+
100
+ enum GroupRank {
101
+ TROPHY
102
+ AWARD
103
+ MEDAL
104
+ }
105
+
106
+ type Tag {
107
+ id: ID!
108
+ createdAt: DateTime
109
+ updatedAt: DateTime
110
+ name: String!
111
+ }
112
+
5
113
  type Post {
6
- id: Int!
7
- title: String!
8
- votes: Int
114
+ id: ID!
115
+ createdAt: DateTime
116
+ updatedAt: DateTime
117
+ title: String
118
+ content: String
119
+ images: [Media]
120
+ snippets: [Snippet]
121
+ author: User
122
+ group: GroupModel
123
+ tags: [Tag]
124
+ likesCount: Int
125
+ isLiked: Boolean
126
+ isBookmarked: Boolean
127
+ rewardsCount: Int
128
+ isRewarded: Boolean
129
+ }
130
+
131
+ type Comment {
132
+ id: ID!
133
+ createdAt: DateTime
134
+ updatedAt: DateTime
135
+ content: String
136
+ authorType: AuthorType
137
+ quotedText: String
138
+ startIndex: Int
139
+ images: [Media]
140
+ snippets: [Snippet]
141
+ comments: [Comment]
142
+ author: User
143
+ }
144
+
145
+ enum AuthorType {
146
+ AI
147
+ USER
148
+ }
149
+
150
+ type User {
151
+ id: ID!
152
+ createdAt: DateTime
153
+ updatedAt: DateTime
154
+ name: String
155
+ displayName: String
156
+ bio: String
157
+ rank: UserRank
158
+ setting: UserSetting
159
+ externalLinks: [ExternalLink]
160
+ followingsCount: Int
161
+ followersCount: Int
162
+ receivedFollowRequestsCount: Int
163
+ groupsCount: Int
164
+ followingGroupsCount: Int
165
+ posts: [Post]
166
+ comments: [Comment]
167
+ likes: [Post]
168
+ bookmarks: [Post]
169
+ sentRewards: [Post]
170
+ availableRewards: Int
171
+ isFollowing: Boolean
9
172
  }
10
173
 
11
- type Author {
12
- id: Int!
13
- firstName: String
14
- lastName: String
15
- posts: [Post!]!
174
+ enum UserRank {
175
+ KING
176
+ QUEEN
177
+ ROOK
178
+ BISHOP
179
+ KNIGHT
180
+ PAWN
181
+ }
182
+
183
+ type Notification {
184
+ id: ID!
185
+ createdAt: DateTime
186
+ updatedAt: DateTime
187
+ template: NotificationTemplate
188
+ readAt: DateTime
189
+ user: User
190
+ sender: User
191
+ group: GroupModel
192
+ post: Post
193
+ comment: Comment
194
+ }
195
+
196
+ enum NotificationTemplate {
197
+ LIKE
198
+ REPLY
199
+ REWARD
200
+ MENTION
201
+ FOLLOW
202
+ FOLLOW_REQ
203
+ GROUP_LIKE
204
+ GROUP_REPLY
205
+ GROUP_REWARD
206
+ GROUP_NEW_POST
207
+ GROUP_MENTION
208
+ GROUP_FOLLOW
209
+ GROUP_JOIN
210
+ GROUP_JOIN_REQ
16
211
  }
17
212
 
18
213
  type Query {
19
- author(id: Int!): Author!
214
+ followers(id: ID!, limit: Float, lastId: String): [User]
215
+ followings(id: ID!, limit: Float, lastId: String): [User]
216
+ followRequests: [User]
217
+ user(id: ID!, limit: Float, lastId: String): User
218
+ searchUsers(searchTerm: String!, max: Float): [User!]
219
+ notifications: [Notification]
20
220
  }
21
221
 
22
222
  type Mutation {
23
- upvotePost(upvotePostData: UpvotePostInput!): Post!
223
+ createUser(data: CreateUser!): User!
224
+ updateUser(data: UpdateUser!): User!
225
+ deleteUser: Boolean
226
+ followUser(id: ID!, limit: Float, lastId: String): Boolean
227
+ unfollowUser(id: ID!, limit: Float, lastId: String): Boolean
228
+ sendFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
229
+ cancelFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
230
+ acceptFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
231
+ declineFollowRequest(id: ID!, limit: Float, lastId: String): Boolean
232
+ updateNotificationsByIds(data: IdsModel!): Boolean
233
+ updateNotification(data: UpdateNotification!): Boolean
234
+ }
235
+
236
+ input CreateUser {
237
+ displayName: String!
238
+ bio: String
239
+ setting: CreateUserSetting!
240
+ externalLinks: [UpsertExternalLink]
241
+ }
242
+
243
+ input CreateUserSetting {
244
+ theme: Theme!
245
+ systemLanguage: Language!
246
+ postsLanguages: [Language!]!
247
+ privacy: Privacy!
248
+ }
249
+
250
+ input UpsertExternalLink {
251
+ id: ID
252
+ name: String!
253
+ url: String!
254
+ }
255
+
256
+ input UpdateUser {
257
+ displayName: String
258
+ bio: String
259
+ setting: UpdateUserSetting
260
+ externalLinks: [UpsertExternalLink!]
261
+ }
262
+
263
+ input UpdateUserSetting {
264
+ theme: Theme
265
+ systemLanguage: Language
266
+ postsLanguages: [Language!]
267
+ privacy: Privacy
268
+ notificationLike: Flag
269
+ notificationReward: Flag
270
+ notificationReply: Flag
271
+ notificationFollowRequest: Flag
272
+ notificationMention: Flag
273
+ notificationGroupFollowRequest: Flag
274
+ notificationGroupJoinRequest: Flag
275
+ notificationGroupNewPost: Flag
276
+ notificationGroupReply: Flag
277
+ }
278
+
279
+ input IdsModel {
280
+ ids: [String!]!
281
+ }
282
+
283
+ input UpdateNotification {
284
+ groupId: String
285
+ postId: String
286
+ commentId: String
24
287
  }
25
288
 
26
- input UpvotePostInput {
27
- postId: Float!
289
+ type Subscription {
290
+ unreadNotificationsCount: Int!
291
+ unreadNotifications: [Notification!]!
28
292
  }