@seayoo-web/gamer-api 1.0.1 → 1.0.4

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.
@@ -1,75 +1,43 @@
1
- export interface ClubGlobalConfig {
2
- /** 俱乐部默认头像地址 */
3
- default_avatar_url: string;
4
- /** 俱乐部官方头像库地址 */
5
- official_avatar_urls: string[];
6
- /** 俱乐部默认昵称 */
7
- default_nickname: string;
8
- /** 俱乐部默认签名 */
9
- default_bio: string;
10
- /** 俱乐部默认用户角色头像地址 */
11
- default_role_avatar_url: string;
12
- /** 俱乐部等级配置 */
13
- level_configs: {
14
- /** 俱乐部等级 */
15
- level: number;
16
- /** 等级对应的成长值 */
17
- exp: number;
18
- /** 俱乐部等级对应的称号 */
19
- title: string;
20
- }[];
21
- /** 俱乐部等级有效期 */
22
- level_valid_days: number;
23
- /** 俱乐部权益描述 */
24
- benefit_description: string;
25
- /** 俱乐部成长值描述 */
26
- exp_description: string;
27
- /** 俱乐部积分规则描述 */
28
- credit_description: string;
29
- /** 发送角色邮件的频次限制,单位:秒 */
30
- send_role_mail_rate_limit: number;
31
- }
1
+ import type { ClubAddress, ClubBenefit, ClubBenefitSummary, ClubGlobalConfig, ClubPlayer, ClubProduct, ClubCreditLog, PlayerRole, PlayerRoleCard, Redemption, RoleBaseInfo, ServerBaseInfo, ClubUserCredit, ClubUserProfile } from "./club.define";
32
2
  export declare function isClubConfigResponse(data: unknown): data is ClubGlobalConfig;
33
- export interface ClubPlayer {
34
- /** 俱乐部会员 ID(世游通行证 ID) */
35
- member_id: string;
36
- /** Combo ID */
37
- player_id: string;
38
- /** 游戏账号类型 */
39
- type: "primary" | "secondary";
40
- /** 成长值 */
41
- exp: number;
42
- /** 等级 */
43
- level: number;
44
- /** 用户积分余额 */
45
- credit: number;
46
- /** 月底即将过期积分数量 */
47
- credit_expiring: number;
48
- /** 等级变动时间 */
49
- level_change_time: number;
50
- /** 等级过期时间 */
51
- level_expire_time: number;
52
- }
53
3
  export declare function isClubPlayerResponse(data: unknown): data is {
54
4
  player: ClubPlayer;
55
5
  };
56
- export declare function isClubPlayersResponse(data: unknown): data is {
57
- players: ClubPlayer[];
6
+ export type VerifyLinkSecondaryPlayerOtpResponse = ServerBaseInfo & RoleBaseInfo;
7
+ export declare function isGetRolesResponse(data: unknown): data is {
8
+ roles: PlayerRole[];
9
+ };
10
+ export declare function isRoleCardResponse(data: unknown): data is {
11
+ role_card: PlayerRoleCard;
58
12
  };
59
- export interface Server {
60
- server_id: string;
61
- server_name: string;
13
+ export declare function isUserProfile(data: unknown): data is ClubUserProfile;
14
+ export declare function isClubAddress(data: unknown): data is ClubAddress;
15
+ export declare function isGetAddressesResponse(data: unknown): data is {
16
+ addresses: ClubAddress[];
17
+ };
18
+ export declare function isUserCredit(data: unknown): data is ClubUserCredit;
19
+ export interface CreditLogListWithToken {
20
+ /** 用户积分变动记录 */
21
+ credit_logs: ClubCreditLog[];
22
+ /** 下一页的 token,用于 cursor 分页机制,若无值,则表示没有更多数据了 */
23
+ next_token?: string;
62
24
  }
63
- export declare function isGetSecondaryServersResponse(data: unknown): data is {
64
- servers: Server[];
25
+ export declare function isCreditLogListWithToken(data: unknown): data is CreditLogListWithToken;
26
+ export declare function isBenefitSummary(data: unknown): data is ClubBenefitSummary;
27
+ export declare function isGetBenefitsResponse(data: unknown): data is {
28
+ benefits: ClubBenefitSummary[];
29
+ };
30
+ export declare function isGetBenefitResponse(data: unknown): data is {
31
+ benefit: ClubBenefit;
65
32
  };
66
- export declare function isCreateLinkSecondaryPlayerOtpResponse(data: unknown): data is {
67
- ticket: string;
33
+ export declare function isClubProduct(data: unknown): data is ClubProduct;
34
+ export declare function isGetProductsResponse(data: unknown): data is {
35
+ products: ClubProduct[];
68
36
  };
69
- export interface VerifyLinkSecondaryPlayerOtpResponse {
70
- role_id: string;
71
- role_name: string;
72
- server_id: string;
73
- server_name: string;
37
+ export interface RedemptionListWithToken {
38
+ /** 兑换记录列表 */
39
+ redemptions: Redemption[];
40
+ /** 下一页的 token,用于 cursor 分页机制,若无值,则表示没有更多数据了 */
41
+ next_token?: string;
74
42
  }
75
- export declare function isVerifyLinkSecondaryPlayerOtpResponse(data: unknown): data is VerifyLinkSecondaryPlayerOtpResponse;
43
+ export declare function isRedemptionListWithToken(data: unknown): data is RedemptionListWithToken;
@@ -0,0 +1,258 @@
1
+ import type { NotificationCategory } from "./community.enums";
2
+ import type { AuthToken } from "./token";
3
+ import type { RequestInteralError } from "@seayoo-web/request";
4
+ export * from "./community.enums";
5
+ export * from "./community.define";
6
+ export declare class CommunityApi {
7
+ private token;
8
+ private req;
9
+ constructor(authToken: AuthToken);
10
+ /**
11
+ * 获取社区版块列表,仅返回启用状态的版块
12
+ *
13
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
14
+ */
15
+ getForums(): Promise<import("./community.define").Forum[]>;
16
+ /**
17
+ * 获取社区话题列表,仅返回启用状态的话题
18
+ *
19
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
20
+ */
21
+ getTopics(): Promise<import("./community.define").Topic[]>;
22
+ /**
23
+ * 根据话题 ID 获取社区话题信息
24
+ *
25
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
26
+ */
27
+ getTopic(topicId: number): Promise<import("./community.define").Topic | {
28
+ error: RequestInteralError | "topic_not_enabled" | "topic_not_found";
29
+ }>;
30
+ /**
31
+ * 获取社区帖子列表
32
+ *
33
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
34
+ */
35
+ getPosts(option: {
36
+ /** 查询返回最大帖子数 */
37
+ max_results: number;
38
+ /** 查询类型 */
39
+ query_type: "all" | "forum" | "topic" | "user";
40
+ /**
41
+ * 查询对应的值
42
+ *
43
+ * - 论坛ID
44
+ * - 话题ID
45
+ * - 用户ID
46
+ */
47
+ query_value?: string | number;
48
+ /** 搜索内容 */
49
+ search_value?: string;
50
+ /** 分页标识,不传默认首次查询 */
51
+ next_token?: string;
52
+ /**
53
+ * 帖子排序键,默认按照发布时间倒序
54
+ *
55
+ * - post_time_desc 帖子发布时间倒序
56
+ * - post_like 帖子点赞数排序
57
+ */
58
+ sort_key?: "post_time_desc" | "post_like";
59
+ }): Promise<import("./community.guards").PostListWithToken | {
60
+ error: RequestInteralError | "forum_not_found" | "topic_not_found";
61
+ }>;
62
+ /**
63
+ * 获取社区置顶帖子列表
64
+ *
65
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
66
+ */
67
+ getPinnedPosts(forumId: number, maxResults: number, nextToken?: string): Promise<import("./community.guards").PostListWithToken | {
68
+ error: RequestInteralError | "forum_not_found";
69
+ }>;
70
+ /**
71
+ * 根据帖子 id 获取帖子详情
72
+ *
73
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
74
+ */
75
+ getPost(postId: number): Promise<import("./community.define").Post | {
76
+ error: RequestInteralError | "post_deleted";
77
+ }>;
78
+ /**
79
+ * 发布帖子
80
+ *
81
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
82
+ */
83
+ post(option: {
84
+ forum_id: number;
85
+ content: string;
86
+ title?: string;
87
+ image_urls?: string[];
88
+ topic_ids?: number[];
89
+ }): Promise<{
90
+ post?: import("./community.define").Post;
91
+ antispam?: import("./community.define").Antispam;
92
+ } | {
93
+ error: RequestInteralError | "post_body_too_long" | "post_subject_too_long" | "post_tag_already_exists" | "moderation_check_text_error" | "moderation_check_image_error" | "unknown_moderation_suggestion" | "invalid_content_length" | "forum_disabled" | "not_allowed_to_post" | "please_real_name" | "post_tag_not_exists";
94
+ }>;
95
+ /**
96
+ * 获取社区帖子评论列表
97
+ *
98
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
99
+ */
100
+ getComments(option: {
101
+ /** 查询类型 */
102
+ query_type: "post" | "user";
103
+ /** 帖子 ID 或 用户 ID */
104
+ query_value: string | number;
105
+ /** 查询返回的数量 */
106
+ max_results: number;
107
+ /** 分页token */
108
+ next_token?: string;
109
+ }): Promise<import("./community.guards").CommentListWithToken | {
110
+ error: RequestInteralError | "post_not_found" | "post_deleted";
111
+ }>;
112
+ /**
113
+ * 根据评论 id 获取评论详情
114
+ *
115
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
116
+ */
117
+ getComment(commentId: number): Promise<import("./community.define").Comment | {
118
+ error: RequestInteralError | "comment_not_found" | "comment_deleted";
119
+ }>;
120
+ /**
121
+ * 帖子下发表评论
122
+ *
123
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=Nv7lk0nTmr
124
+ */
125
+ comment(option: {
126
+ /** 帖子 ID */
127
+ post_id: number;
128
+ /** 评论内容 */
129
+ content: string;
130
+ /** 评论内容图片地址 */
131
+ image_url?: string;
132
+ }): Promise<{
133
+ comment?: import("./community.define").Comment;
134
+ antispam?: import("./community.define").Antispam;
135
+ } | {
136
+ error: RequestInteralError | "moderation_check_text_error" | "moderation_check_image_error" | "unknown_moderation_suggestion" | "invalid_content_length" | "forum_disabled" | "post_not_found" | "post_already_deleted";
137
+ }>;
138
+ /**
139
+ * 获取社区帖子评论回复列表
140
+ *
141
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
142
+ */
143
+ getReplies(option: {
144
+ /** 查询返回最大回复数 */
145
+ max_results?: number;
146
+ /** 查询类型 */
147
+ query_type: "comment" | "user";
148
+ /** 查询对应的值 */
149
+ query_value: string;
150
+ /** 分页标识,不传默认首次查询 */
151
+ next_token?: string;
152
+ }): Promise<import("./community.guards").ReplyListWithToken>;
153
+ /**
154
+ * 根据回复 id 获取回复详情
155
+ *
156
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
157
+ */
158
+ getReply(replyId: number): Promise<import("./community.define").Reply | {
159
+ error: RequestInteralError | "reply_not_found" | "reply_deleted";
160
+ }>;
161
+ /**
162
+ * 回复帖子评论或回复
163
+ *
164
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=KA8WpTX2pg
165
+ */
166
+ reply(option: {
167
+ /** 评论 ID */
168
+ comment_id: number;
169
+ /** 评论内容 */
170
+ content: string;
171
+ /** 回复的回复 ID (仅当回复回复的时候需要) */
172
+ reply_id?: number;
173
+ }): Promise<{
174
+ reply?: import("./community.define").Reply;
175
+ antispam?: import("./community.define").Antispam;
176
+ } | {
177
+ error: RequestInteralError | "moderation_check_text_error" | "moderation_check_image_error" | "comment_not_found" | "comment_deleted" | "reply_not_found" | "reply_deleted";
178
+ }>;
179
+ /**
180
+ * 对 帖子/评论/回复 点赞
181
+ *
182
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
183
+ */
184
+ like(option: {
185
+ /** 点赞目标类型 */
186
+ target_type: "post" | "comment" | "reply";
187
+ /** 目标 ID */
188
+ target_id: number;
189
+ }): Promise<true | {
190
+ error: RequestInteralError | "post_not_found" | "post_deleted" | "comment_not_found" | "comment_deleted" | "reply_not_found" | "reply_deleted";
191
+ }>;
192
+ /**
193
+ * 对 帖子/评论/回复 取消点赞
194
+ *
195
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
196
+ */
197
+ unlike(option: {
198
+ /** 点赞目标类型 */
199
+ target_type: "post" | "comment" | "reply";
200
+ /** 目标 ID */
201
+ target_id: number;
202
+ }): Promise<true | {
203
+ error: RequestInteralError | "post_not_found" | "post_deleted" | "comment_not_found" | "comment_deleted" | "reply_not_found" | "reply_deleted";
204
+ }>;
205
+ /**
206
+ * 获取资源预上传地址
207
+ *
208
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=dWWhpoShxZ
209
+ */
210
+ getMediaPresignUrl(option: {
211
+ /** 资源文件大小 */
212
+ content_length: number;
213
+ /** 资源文件 MIME 类型 */
214
+ content_type: string;
215
+ /** 资源文件名 */
216
+ filename: string;
217
+ /** 资源文件内容的 SHA-256 哈希值,用于校验上传对象的完整性 */
218
+ content_sha256: string;
219
+ }): Promise<{
220
+ image_url: string;
221
+ upload_url: string;
222
+ existed: boolean;
223
+ } | null>;
224
+ /**
225
+ * 获取用户社区通知
226
+ *
227
+ * 了解更多[通知的分类](https://kdocs.cn/l/cbggfJodHLIz?linkname=AiCR5khgOr)。
228
+ *
229
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=W5lceDgbBG
230
+ */
231
+ getNotifications(option: {
232
+ /** 社区通知分类 */
233
+ category: NotificationCategory;
234
+ /** 查询返回最大通知数量 */
235
+ max_results?: number;
236
+ /** 分页标识,不传默认首次查询 */
237
+ next_token?: string;
238
+ }): Promise<{
239
+ notifications: import("./community.define").Notification[];
240
+ next_token?: string;
241
+ }>;
242
+ /**
243
+ * 获取用户未读通知数量
244
+ *
245
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=CwIOMjAfMU
246
+ */
247
+ getUnreadNotificationsCount(): Promise<{
248
+ system: number;
249
+ comment: number;
250
+ like: number;
251
+ } | null>;
252
+ /**
253
+ * 社区用户将通知标为已读
254
+ *
255
+ * https://kdocs.cn/l/cbggfJodHLIz?linkname=TCJQxnOjJe
256
+ */
257
+ clearUnreadNotifications(category: NotificationCategory): Promise<boolean>;
258
+ }
@@ -0,0 +1,231 @@
1
+ import type { NotificationType, ForumMode, PostStatus } from "./community.enums";
2
+ export interface Forum {
3
+ /** 版块 id */
4
+ forum_id: number;
5
+ /** 版块图标 */
6
+ icon_url: string;
7
+ /** 版块名称 */
8
+ name: string;
9
+ /** 版块标签 */
10
+ tags: string[];
11
+ /** 版块排序权重, 数值越大排序越靠前 */
12
+ sort: number;
13
+ /** 发帖模式 */
14
+ mode: ForumMode;
15
+ /** 指定可发帖的用户 id */
16
+ member_ids: number[];
17
+ }
18
+ export interface Topic {
19
+ /** 话题 ID */
20
+ topic_id: number;
21
+ /** 话题图标,可能是空字符串 */
22
+ cover_url: string;
23
+ /** 话题名称 */
24
+ name: string;
25
+ /** 话题描述 */
26
+ description: string;
27
+ /** 话题标签 */
28
+ tags: string[];
29
+ /** 话题下帖子数量 */
30
+ post_num: number;
31
+ }
32
+ export interface Post {
33
+ /** 帖子 ID */
34
+ post_id: number;
35
+ /** 版块信息 */
36
+ forum: Forum;
37
+ /** 帖子发布者的 ID */
38
+ posted_by: string;
39
+ /** 帖子发布者的昵称 */
40
+ nickname: string;
41
+ /** 帖子发布者的头像 */
42
+ avatar_url: string;
43
+ /** 帖子标题 */
44
+ title?: string;
45
+ /** 帖子内容,富文本 HTML 格式 */
46
+ content: string;
47
+ /** 帖子内容,纯文本格式 */
48
+ summary: string;
49
+ /** 点赞数量 */
50
+ like_num: number;
51
+ /** 评论数量 */
52
+ comments_num: number;
53
+ /** 当前用户是否点赞 */
54
+ liked: boolean;
55
+ /** 帖子图片地址 */
56
+ image_urls: string[];
57
+ /** 帖子关联话题 */
58
+ topics: Topic[];
59
+ /** 帖子关联活动 ids */
60
+ event_ids: number[];
61
+ /** 帖子是否置顶 */
62
+ is_pinned: boolean;
63
+ /** 帖子是否标精 */
64
+ is_highlighted: boolean;
65
+ /** 帖子状态 */
66
+ status: PostStatus;
67
+ /** 帖子发布时间 */
68
+ create_time: number;
69
+ }
70
+ export interface Antispam {
71
+ /** 安全检测返回异常提示 */
72
+ err_msg?: string;
73
+ }
74
+ export interface Comment {
75
+ /** 评论 ID */
76
+ comment_id: number;
77
+ /** 帖子 ID */
78
+ post_id: number;
79
+ /** 帖子标题 */
80
+ post_subject?: string;
81
+ /** 帖子概要 */
82
+ post_summary?: string;
83
+ /** 帖子的首张图片地址 */
84
+ post_image_url?: string;
85
+ /** 帖子发布者的 ID */
86
+ posted_by?: string;
87
+ /** 帖子发布者的昵称 */
88
+ posted_by_nickname?: string;
89
+ /** 帖子发布者的头像 */
90
+ posted_by_avatar_url?: string;
91
+ /** 评论发布者的 ID */
92
+ commented_by: string;
93
+ /** 评论发布者的昵称 */
94
+ nickname: string;
95
+ /** 评论发布者的头像 */
96
+ avatar_url: string;
97
+ /** 评论内容 */
98
+ content: string;
99
+ /** 点赞数量 */
100
+ like_num: number;
101
+ /** 回复数量 */
102
+ reply_num: number;
103
+ /** 当前用户是否点赞 */
104
+ liked: boolean;
105
+ /** 评论图片地址 */
106
+ image_url: string;
107
+ /** 评论发布时间 */
108
+ create_time: number;
109
+ /** 评论状态 */
110
+ status: PostStatus;
111
+ /** 评论下最新两条回复 */
112
+ replies?: Reply[];
113
+ }
114
+ export interface Reply {
115
+ /** 回复 ID */
116
+ reply_id: number;
117
+ /** 评论 ID */
118
+ comment_id: number;
119
+ /** 评论内容 */
120
+ comment_content?: string;
121
+ /** 评论发布者的 ID */
122
+ commented_by?: string;
123
+ /** 评论发布者的昵称 */
124
+ commented_by_nickname?: string;
125
+ /** 评论发布者的头像 */
126
+ commented_by_avatar_url?: string;
127
+ /** 回复者的 ID */
128
+ replied_by: string;
129
+ /** 回复者的昵称 */
130
+ nickname: string;
131
+ /** 回复者的头像 */
132
+ avatar_url: string;
133
+ /** 回复内容 */
134
+ content: string;
135
+ /** 点赞数量 */
136
+ like_num: number;
137
+ /** 当前用户是否点赞 */
138
+ liked: number;
139
+ /** 回复的目标 */
140
+ reply_to: ReplyTo;
141
+ /** 回复发布时间 */
142
+ create_time: number;
143
+ }
144
+ export interface ReplyTo {
145
+ /** 回复 ID */
146
+ reply_id: number;
147
+ /** 回复内容 */
148
+ reply_content?: string;
149
+ /** 回复者的 ID */
150
+ replied_by: string;
151
+ /** 回复者的昵称 */
152
+ nickname: string;
153
+ /** 回复者的头像 */
154
+ avatar_url: string;
155
+ }
156
+ interface NotificationBase {
157
+ /** 通知的 ID */
158
+ notification_id: string;
159
+ /** 通知类型 */
160
+ notification_type: NotificationType;
161
+ /** 通知是否已读 */
162
+ is_read: boolean;
163
+ /** 通知产生时间 */
164
+ create_time: number;
165
+ /** 触发通知的用户 ID,系统管理员 ID 为 "0" */
166
+ origin_user_id: string;
167
+ /** 触发通知的用户昵称,如果是系统管理员也会包含此字段,会使用系统配置中管理员的信息 */
168
+ origin_user_name: string;
169
+ /** 触发通知的用户头像 */
170
+ origin_user_avatar_url: string;
171
+ }
172
+ interface NotificationPaylodSystem {
173
+ /** 系统通知的标题 */
174
+ system_message_subject: string;
175
+ /** 系统通知的内容 */
176
+ system_message_content: string;
177
+ }
178
+ interface NotificationPaylodPost {
179
+ /** 帖子 ID */
180
+ post_id: number;
181
+ /** 帖子标题 */
182
+ post_subject: string;
183
+ /** 帖子概要 */
184
+ post_summary: string;
185
+ /** 帖子的首张图片地址 */
186
+ post_image_url: string;
187
+ }
188
+ interface NotificationPaylodComment {
189
+ /** 评论 ID */
190
+ comment_id: number;
191
+ /** 评论内容 */
192
+ comment_content: string;
193
+ }
194
+ interface NotificationPaylodReply {
195
+ /** 回复 ID */
196
+ reply_id: number;
197
+ /** 回复内容 */
198
+ reply_content: string;
199
+ }
200
+ interface NotificationPaylodReplyToReply {
201
+ /** 回复的回复 ID */
202
+ reply_to_reply_id: number;
203
+ /** 回复的回复内容 */
204
+ reply_to_reply_content: string;
205
+ }
206
+ export interface NotificationSystem extends NotificationBase, NotificationPaylodSystem {
207
+ notification_type: NotificationType.System;
208
+ }
209
+ export interface NotificationPost extends NotificationBase, NotificationPaylodPost {
210
+ notification_type: NotificationType.PostPinned | NotificationType.PostHighlighted | NotificationType.PostDeleted | NotificationType.PostLiked;
211
+ }
212
+ export interface NotificationPostComment extends NotificationBase, NotificationPaylodPost, NotificationPaylodComment {
213
+ notification_type: NotificationType.PostCommented;
214
+ }
215
+ export interface NotificationCommentReply extends NotificationBase, NotificationPaylodComment, NotificationPaylodReply {
216
+ notification_type: NotificationType.CommentReplied;
217
+ }
218
+ export interface NotificationComment extends NotificationBase, NotificationPaylodComment, NotificationPaylodPost {
219
+ notification_type: NotificationType.CommentLiked | NotificationType.CommentDeleted;
220
+ }
221
+ export interface NotificationReplyReplied extends NotificationBase, NotificationPaylodReply, NotificationPaylodReplyToReply {
222
+ notification_type: NotificationType.ReplyReplied;
223
+ /** 评论 ID */
224
+ comment_id: number;
225
+ }
226
+ export interface NotificationReply extends NotificationBase, NotificationPaylodReply, NotificationPaylodComment {
227
+ notification_type: NotificationType.ReplyLiked | NotificationType.ReplyDeleted;
228
+ }
229
+ /** 社区通知 */
230
+ export type Notification = NotificationSystem | NotificationPost | NotificationPostComment | NotificationCommentReply | NotificationComment | NotificationReplyReplied | NotificationReply;
231
+ export {};
@@ -0,0 +1,54 @@
1
+ /** 社区板块模式 */
2
+ export declare const enum ForumMode {
3
+ /** 所有人均可以发帖 */
4
+ All = "all",
5
+ /** 指定用户可发帖 */
6
+ Limit = "limit"
7
+ }
8
+ /** 社区帖子状态 */
9
+ export declare const enum PostStatus {
10
+ /** 待审核(仅自己可见) */
11
+ Pending = "pending",
12
+ /** 审核通过 */
13
+ Approved = "approved",
14
+ /** 审核不通过 */
15
+ Failed = "failed",
16
+ /** 嫌疑(仅自己可见) */
17
+ Suspect = "suspect"
18
+ }
19
+ /** 社区通知分类 */
20
+ export declare const enum NotificationCategory {
21
+ /** 系统通知 */
22
+ System = "system",
23
+ /** 评论我的 */
24
+ Comment = "comment",
25
+ /** 点赞通知 */
26
+ Like = "like"
27
+ }
28
+ /** 社区通知类型 */
29
+ export declare const enum NotificationType {
30
+ /** 系统通知 */
31
+ System = "system",
32
+ /** 帖子被置顶 */
33
+ PostPinned = "post_pinned",
34
+ /** 帖子被加精 */
35
+ PostHighlighted = "post_highlighted",
36
+ /** 帖子被删除 */
37
+ PostDeleted = "post_deleted",
38
+ /** 帖子被评论 */
39
+ PostCommented = "post_commented",
40
+ /** 帖子被点赞 */
41
+ PostLiked = "post_liked",
42
+ /** 评论被回复 */
43
+ CommentReplied = "comment_replied",
44
+ /** 评论被点赞 */
45
+ CommentLiked = "comment_liked",
46
+ /** 评论被删除 */
47
+ CommentDeleted = "comment_deleted",
48
+ /** 回复被回复 */
49
+ ReplyReplied = "reply_replied",
50
+ /** 回复被点赞 */
51
+ ReplyLiked = "reply_liked",
52
+ /** 回复被删除 */
53
+ ReplyDeleted = "reply_deleted"
54
+ }