@seayoo-web/gamer-api 1.1.15 → 1.1.17
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.
- package/dist/index.js +935 -833
- package/package.json +4 -4
- package/types/src/club.d.ts +8 -2
- package/types/src/club.define.d.ts +0 -2
- package/types/src/club.enums.d.ts +7 -2
- package/types/src/club.guards.d.ts +27 -27
- package/types/src/community.d.ts +26 -14
- package/types/src/community.define.d.ts +14 -8
- package/types/src/community.enums.d.ts +4 -0
- package/types/src/community.guards.d.ts +36 -49
- package/types/src/event.config.d.ts +1 -1
- package/types/src/event.d.ts +1 -1
- package/types/src/event.enums.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/gamer-api",
|
|
3
3
|
"description": "agent for gamer api",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^22.13.1",
|
|
25
25
|
"@seayoo-web/combo-webview": "^2.5.0",
|
|
26
|
-
"@seayoo-web/scripts": "^1.3.15",
|
|
27
26
|
"@seayoo-web/request": "^2.1.2",
|
|
28
27
|
"@seayoo-web/tsconfig": "^1.0.3",
|
|
29
|
-
"@seayoo-web/
|
|
28
|
+
"@seayoo-web/scripts": "^1.3.15",
|
|
29
|
+
"@seayoo-web/utils": "^3.3.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@seayoo-web/combo-webview": "^2.5.0",
|
|
33
|
-
"@seayoo-web/utils": "^3.
|
|
33
|
+
"@seayoo-web/utils": "^3.3.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"vitest": "^3.0.5"
|
package/types/src/club.d.ts
CHANGED
|
@@ -132,7 +132,10 @@ export declare class ClubApi {
|
|
|
132
132
|
end_time: number;
|
|
133
133
|
/** 游戏账号 ID,游戏外必传 */
|
|
134
134
|
player_id?: string;
|
|
135
|
-
}): Promise<
|
|
135
|
+
}): Promise<{
|
|
136
|
+
credit_logs: import("./club.define").ClubCreditLog[];
|
|
137
|
+
next_token: string | undefined;
|
|
138
|
+
}>;
|
|
136
139
|
/**
|
|
137
140
|
* 获取自己的俱乐部权益列表
|
|
138
141
|
*
|
|
@@ -182,5 +185,8 @@ export declare class ClubApi {
|
|
|
182
185
|
item_type?: ClubItemType;
|
|
183
186
|
/** 游戏账号 ID,游戏外必传 */
|
|
184
187
|
player_id?: string;
|
|
185
|
-
}): Promise<
|
|
188
|
+
}): Promise<{
|
|
189
|
+
redemptions: import("./club.define").Redemption[];
|
|
190
|
+
next_token: string | undefined;
|
|
191
|
+
}>;
|
|
186
192
|
}
|
|
@@ -6,6 +6,7 @@ export declare const enum Gender {
|
|
|
6
6
|
/** 女 */
|
|
7
7
|
Female = "female"
|
|
8
8
|
}
|
|
9
|
+
export declare const GenderValidator: import("@seayoo-web/utils").StringValidator<Gender, false, false>;
|
|
9
10
|
/** 俱乐部积分变化类型 */
|
|
10
11
|
export declare const enum ClubCreditChangeType {
|
|
11
12
|
/** 积分增加 */
|
|
@@ -15,6 +16,7 @@ export declare const enum ClubCreditChangeType {
|
|
|
15
16
|
/** 积分过期 */
|
|
16
17
|
Expired = "expired"
|
|
17
18
|
}
|
|
19
|
+
export declare const ClubCreditChangeTypeValidator: import("@seayoo-web/utils").StringValidator<ClubCreditChangeType, false, false>;
|
|
18
20
|
/** 积分变动场景 */
|
|
19
21
|
export declare const enum ClubCreditChangeSence {
|
|
20
22
|
/** 游戏内购买 */
|
|
@@ -30,6 +32,7 @@ export declare const enum ClubCreditChangeSence {
|
|
|
30
32
|
/** 运营活动 */
|
|
31
33
|
Event = "event"
|
|
32
34
|
}
|
|
35
|
+
export declare const ClubCreditChangeSenceValidator: import("@seayoo-web/utils").StringValidator<ClubCreditChangeSence, false, false>;
|
|
33
36
|
export declare const enum ClubItemType {
|
|
34
37
|
/** 游戏内奖励 */
|
|
35
38
|
GameReward = "game_reward",
|
|
@@ -38,11 +41,13 @@ export declare const enum ClubItemType {
|
|
|
38
41
|
/** 虚拟商品 */
|
|
39
42
|
Virtual = "virtual"
|
|
40
43
|
}
|
|
44
|
+
export declare const ClubItemTypeValidator: import("@seayoo-web/utils").StringValidator<ClubItemType, false, false>;
|
|
41
45
|
export declare const enum ClubRedemptionStatus {
|
|
42
46
|
/** 待发放 */
|
|
43
47
|
Pending = "pending",
|
|
44
48
|
/** 已发放 */
|
|
45
|
-
|
|
49
|
+
Issued = "issued",
|
|
46
50
|
/** 发放失败 */
|
|
47
|
-
|
|
51
|
+
Failed = "failed"
|
|
48
52
|
}
|
|
53
|
+
export declare const ClubRedemptionStatusValidator: import("@seayoo-web/utils").StringValidator<ClubRedemptionStatus, false, false>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import type { ClubAddress, ClubBenefit, ClubBenefitSummary, ClubGlobalConfig, ClubPlayer, ClubProduct, ClubCreditLog, PlayerRole, PlayerRoleCard, Redemption, RoleBaseInfo, ServerBaseInfo, ClubUserCredit, ClubUserProfile } from "./club.define";
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
2
|
+
export declare const isClubConfigResponse: (data: unknown) => data is ClubGlobalConfig;
|
|
3
|
+
export declare const isClubPlayer: (data: unknown) => data is ClubPlayer;
|
|
4
|
+
export declare const isClubPlayerResponse: (data: unknown) => data is {
|
|
4
5
|
player: ClubPlayer;
|
|
5
6
|
};
|
|
6
7
|
export type VerifyLinkSecondaryPlayerOtpResponse = ServerBaseInfo & RoleBaseInfo;
|
|
7
|
-
export declare
|
|
8
|
+
export declare const isPlayerRole: (data: unknown) => data is PlayerRole;
|
|
9
|
+
export declare const isGetRolesResponse: (data: unknown) => data is {
|
|
8
10
|
roles: PlayerRole[];
|
|
9
11
|
};
|
|
10
|
-
export declare
|
|
12
|
+
export declare const isPlayerRoleCard: (data: unknown) => data is PlayerRoleCard;
|
|
13
|
+
export declare const isRoleCardResponse: (data: unknown) => data is {
|
|
11
14
|
role_card: PlayerRoleCard;
|
|
12
15
|
};
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
15
|
-
export declare
|
|
16
|
+
export declare const isUserProfile: (data: unknown) => data is ClubUserProfile;
|
|
17
|
+
export declare const isClubAddress: (data: unknown) => data is ClubAddress;
|
|
18
|
+
export declare const isGetAddressesResponse: (data: unknown) => data is {
|
|
16
19
|
addresses: ClubAddress[];
|
|
17
20
|
};
|
|
18
|
-
export declare
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
+
export declare const isUserCredit: (data: unknown) => data is ClubUserCredit;
|
|
22
|
+
export declare const isCreditLog: (data: unknown) => data is ClubCreditLog;
|
|
23
|
+
export declare const isCreditLogListWithToken: (data: unknown) => data is {
|
|
21
24
|
credit_logs: ClubCreditLog[];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export declare
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
next_token: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const isClubProduct: (data: unknown) => data is ClubProduct;
|
|
28
|
+
export declare const isGetProductsResponse: (data: unknown) => data is {
|
|
29
|
+
products: ClubProduct[];
|
|
30
|
+
};
|
|
31
|
+
export declare const isBenefitSummary: (data: unknown) => data is ClubBenefitSummary;
|
|
32
|
+
export declare const isGetBenefitsResponse: (data: unknown) => data is {
|
|
28
33
|
benefits: ClubBenefitSummary[];
|
|
29
34
|
};
|
|
30
|
-
export declare
|
|
35
|
+
export declare const isBenefit: (data: unknown) => data is ClubBenefit;
|
|
36
|
+
export declare const isGetBenefitResponse: (data: unknown) => data is {
|
|
31
37
|
benefit: ClubBenefit;
|
|
32
38
|
};
|
|
33
|
-
export declare
|
|
34
|
-
export declare
|
|
35
|
-
products: ClubProduct[];
|
|
36
|
-
};
|
|
37
|
-
export interface RedemptionListWithToken {
|
|
38
|
-
/** 兑换记录列表 */
|
|
39
|
+
export declare const isRedemption: (data: unknown) => data is Redemption;
|
|
40
|
+
export declare const isRedemptionListWithToken: (data: unknown) => data is {
|
|
39
41
|
redemptions: Redemption[];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
export declare function isRedemptionListWithToken(data: unknown): data is RedemptionListWithToken;
|
|
42
|
+
next_token: string | undefined;
|
|
43
|
+
};
|
package/types/src/community.d.ts
CHANGED
|
@@ -56,7 +56,10 @@ export declare class CommunityApi {
|
|
|
56
56
|
* - post_like 帖子点赞数排序
|
|
57
57
|
*/
|
|
58
58
|
sort_key?: "post_time_desc" | "post_like";
|
|
59
|
-
}): Promise<
|
|
59
|
+
}): Promise<{
|
|
60
|
+
posts: import("./community.define").Post[];
|
|
61
|
+
next_token: string | undefined;
|
|
62
|
+
} | {
|
|
60
63
|
error: RequestInteralError | "forum_not_found" | "topic_not_found";
|
|
61
64
|
}>;
|
|
62
65
|
/**
|
|
@@ -64,7 +67,10 @@ export declare class CommunityApi {
|
|
|
64
67
|
*
|
|
65
68
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
|
|
66
69
|
*/
|
|
67
|
-
getPinnedPosts(forumId: number, maxResults: number, nextToken?: string): Promise<
|
|
70
|
+
getPinnedPosts(forumId: number, maxResults: number, nextToken?: string): Promise<{
|
|
71
|
+
posts: import("./community.define").Post[];
|
|
72
|
+
next_token: string | undefined;
|
|
73
|
+
} | {
|
|
68
74
|
error: RequestInteralError | "forum_not_found";
|
|
69
75
|
}>;
|
|
70
76
|
/**
|
|
@@ -87,8 +93,8 @@ export declare class CommunityApi {
|
|
|
87
93
|
image_urls?: string[];
|
|
88
94
|
topic_ids?: number[];
|
|
89
95
|
}): Promise<{
|
|
90
|
-
post
|
|
91
|
-
antispam
|
|
96
|
+
post: import("./community.define").Post | undefined;
|
|
97
|
+
antispam: import("./community.define").Antispam;
|
|
92
98
|
} | {
|
|
93
99
|
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
100
|
}>;
|
|
@@ -106,7 +112,10 @@ export declare class CommunityApi {
|
|
|
106
112
|
max_results: number;
|
|
107
113
|
/** 分页token */
|
|
108
114
|
next_token?: string;
|
|
109
|
-
}): Promise<
|
|
115
|
+
}): Promise<{
|
|
116
|
+
comments: import("./community.define").Comment[];
|
|
117
|
+
next_token: string | undefined;
|
|
118
|
+
} | {
|
|
110
119
|
error: RequestInteralError | "post_not_found" | "post_deleted";
|
|
111
120
|
}>;
|
|
112
121
|
/**
|
|
@@ -130,8 +139,8 @@ export declare class CommunityApi {
|
|
|
130
139
|
/** 评论内容图片地址 */
|
|
131
140
|
image_url?: string;
|
|
132
141
|
}): Promise<{
|
|
133
|
-
comment
|
|
134
|
-
antispam
|
|
142
|
+
comment: import("./community.define").Comment | undefined;
|
|
143
|
+
antispam: import("./community.define").Antispam | undefined;
|
|
135
144
|
} | {
|
|
136
145
|
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
146
|
}>;
|
|
@@ -149,7 +158,12 @@ export declare class CommunityApi {
|
|
|
149
158
|
query_value: string;
|
|
150
159
|
/** 分页标识,不传默认首次查询 */
|
|
151
160
|
next_token?: string;
|
|
152
|
-
}): Promise<
|
|
161
|
+
}): Promise<{
|
|
162
|
+
replies: import("./community.define").Reply[];
|
|
163
|
+
next_token: string | undefined;
|
|
164
|
+
} | {
|
|
165
|
+
replies: never[];
|
|
166
|
+
}>;
|
|
153
167
|
/**
|
|
154
168
|
* 根据回复 id 获取回复详情
|
|
155
169
|
*
|
|
@@ -216,11 +230,7 @@ export declare class CommunityApi {
|
|
|
216
230
|
filename: string;
|
|
217
231
|
/** 资源文件内容的 SHA-256 哈希值,用于校验上传对象的完整性 */
|
|
218
232
|
content_sha256: string;
|
|
219
|
-
}): Promise<
|
|
220
|
-
image_url: string;
|
|
221
|
-
upload_url: string;
|
|
222
|
-
existed: boolean;
|
|
223
|
-
} | null>;
|
|
233
|
+
}): Promise<import("./community.define").PresignUrlResponse | null>;
|
|
224
234
|
/**
|
|
225
235
|
* 获取用户社区通知
|
|
226
236
|
*
|
|
@@ -237,7 +247,9 @@ export declare class CommunityApi {
|
|
|
237
247
|
next_token?: string;
|
|
238
248
|
}): Promise<{
|
|
239
249
|
notifications: import("./community.define").Notification[];
|
|
240
|
-
next_token
|
|
250
|
+
next_token: string | undefined;
|
|
251
|
+
} | {
|
|
252
|
+
notifications: never[];
|
|
241
253
|
}>;
|
|
242
254
|
/**
|
|
243
255
|
* 获取用户未读通知数量
|
|
@@ -135,7 +135,7 @@ export interface Reply {
|
|
|
135
135
|
/** 点赞数量 */
|
|
136
136
|
like_num: number;
|
|
137
137
|
/** 当前用户是否点赞 */
|
|
138
|
-
liked:
|
|
138
|
+
liked: boolean;
|
|
139
139
|
/** 回复的目标 */
|
|
140
140
|
reply_to: ReplyTo;
|
|
141
141
|
/** 回复发布时间 */
|
|
@@ -153,6 +153,14 @@ export interface ReplyTo {
|
|
|
153
153
|
/** 回复者的头像 */
|
|
154
154
|
avatar_url: string;
|
|
155
155
|
}
|
|
156
|
+
export interface PresignUrlResponse {
|
|
157
|
+
/** 资源文件的真实地址 */
|
|
158
|
+
image_url: string;
|
|
159
|
+
/** 媒体文件临时上传地址(有效期 5min) */
|
|
160
|
+
upload_url: string;
|
|
161
|
+
/** 媒体文件是否已存在,已存在无需上传 */
|
|
162
|
+
existed: boolean;
|
|
163
|
+
}
|
|
156
164
|
export interface NotificationBase {
|
|
157
165
|
/** 通知的 ID */
|
|
158
166
|
notification_id: string;
|
|
@@ -197,12 +205,6 @@ export interface NotificationPaylodReply {
|
|
|
197
205
|
/** 回复内容 */
|
|
198
206
|
reply_content: string;
|
|
199
207
|
}
|
|
200
|
-
export interface NotificationPaylodReplyToReply {
|
|
201
|
-
/** 回复的回复 ID */
|
|
202
|
-
reply_to_reply_id: number;
|
|
203
|
-
/** 回复的回复内容 */
|
|
204
|
-
reply_to_reply_content: string;
|
|
205
|
-
}
|
|
206
208
|
export interface NotificationSystem extends NotificationBase, NotificationPaylodSystem {
|
|
207
209
|
notification_type: NotificationType.System;
|
|
208
210
|
}
|
|
@@ -218,10 +220,14 @@ export interface NotificationCommentReply extends NotificationBase, Notification
|
|
|
218
220
|
export interface NotificationComment extends NotificationBase, NotificationPaylodComment, NotificationPaylodPost {
|
|
219
221
|
notification_type: NotificationType.CommentLiked | NotificationType.CommentDeleted;
|
|
220
222
|
}
|
|
221
|
-
export interface NotificationReplyReplied extends NotificationBase, NotificationPaylodReply
|
|
223
|
+
export interface NotificationReplyReplied extends NotificationBase, NotificationPaylodReply {
|
|
222
224
|
notification_type: NotificationType.ReplyReplied;
|
|
223
225
|
/** 评论 ID */
|
|
224
226
|
comment_id: number;
|
|
227
|
+
/** 回复的回复 ID */
|
|
228
|
+
reply_to_reply_id: number;
|
|
229
|
+
/** 回复的回复内容 */
|
|
230
|
+
reply_to_reply_content: string;
|
|
225
231
|
}
|
|
226
232
|
export interface NotificationReply extends NotificationBase, NotificationPaylodReply, NotificationPaylodComment {
|
|
227
233
|
notification_type: NotificationType.ReplyLiked | NotificationType.ReplyDeleted;
|
|
@@ -5,6 +5,7 @@ export declare const enum ForumMode {
|
|
|
5
5
|
/** 指定用户可发帖 */
|
|
6
6
|
Limit = "limit"
|
|
7
7
|
}
|
|
8
|
+
export declare const ForumModeValidator: import("@seayoo-web/utils").StringValidator<ForumMode, false, false>;
|
|
8
9
|
/** 社区帖子状态 */
|
|
9
10
|
export declare const enum PostStatus {
|
|
10
11
|
/** 待审核(仅自己可见) */
|
|
@@ -16,6 +17,7 @@ export declare const enum PostStatus {
|
|
|
16
17
|
/** 嫌疑(仅自己可见) */
|
|
17
18
|
Suspect = "suspect"
|
|
18
19
|
}
|
|
20
|
+
export declare const PostStatusValidator: import("@seayoo-web/utils").StringValidator<PostStatus, false, false>;
|
|
19
21
|
/** 社区通知分类 */
|
|
20
22
|
export declare const enum NotificationCategory {
|
|
21
23
|
/** 系统通知 */
|
|
@@ -25,6 +27,7 @@ export declare const enum NotificationCategory {
|
|
|
25
27
|
/** 点赞通知 */
|
|
26
28
|
Like = "like"
|
|
27
29
|
}
|
|
30
|
+
export declare const NotificationCategoryValidator: import("@seayoo-web/utils").StringValidator<NotificationCategory, false, false>;
|
|
28
31
|
/** 社区通知类型 */
|
|
29
32
|
export declare const enum NotificationType {
|
|
30
33
|
/** 系统通知 */
|
|
@@ -52,3 +55,4 @@ export declare const enum NotificationType {
|
|
|
52
55
|
/** 回复被删除 */
|
|
53
56
|
ReplyDeleted = "reply_deleted"
|
|
54
57
|
}
|
|
58
|
+
export declare const NotificationTypeValidator: import("@seayoo-web/utils").StringValidator<NotificationType, false, false>;
|
|
@@ -1,73 +1,60 @@
|
|
|
1
|
-
import type { Antispam, Forum, Post, Topic, Comment, Reply, Notification } from "./community.define";
|
|
2
|
-
export declare
|
|
1
|
+
import type { Antispam, Forum, Post, Topic, Comment, Reply, ReplyTo, Notification, PresignUrlResponse } from "./community.define";
|
|
2
|
+
export declare const isForum: (data: unknown) => data is Forum;
|
|
3
|
+
export declare const isGetForumsResponse: (data: unknown) => data is {
|
|
3
4
|
forums: Forum[];
|
|
4
5
|
};
|
|
5
|
-
export declare
|
|
6
|
+
export declare const isTopic: (data: unknown) => data is Topic;
|
|
7
|
+
export declare const isGetTopicsResponse: (data: unknown) => data is {
|
|
6
8
|
topics: Topic[];
|
|
7
9
|
};
|
|
8
|
-
export declare
|
|
10
|
+
export declare const isGetTopicResponse: (data: unknown) => data is {
|
|
9
11
|
topic: Topic;
|
|
10
12
|
};
|
|
11
|
-
export
|
|
13
|
+
export declare const isPost: (data: unknown) => data is Post;
|
|
14
|
+
export declare const isGetPostsResponse: (data: unknown) => data is {
|
|
12
15
|
posts: Post[];
|
|
13
|
-
next_token: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function isGetPostsResponse(data: unknown): data is PostListWithToken;
|
|
16
|
-
export declare function isGetPostResponse(data: unknown): data is {
|
|
17
|
-
post: Post;
|
|
18
|
-
};
|
|
19
|
-
export declare function isCreatePostResponse(data: unknown): data is {
|
|
20
|
-
/** 帖子信息 */
|
|
21
|
-
post?: Post;
|
|
22
|
-
/** 安全检测信息 */
|
|
23
|
-
antispam?: Antispam;
|
|
16
|
+
next_token: string | undefined;
|
|
24
17
|
};
|
|
25
|
-
export declare
|
|
26
|
-
|
|
18
|
+
export declare const isGetPostResponse: (data: unknown) => data is {
|
|
19
|
+
post: Post;
|
|
27
20
|
};
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare function isCommentListResponse(data: unknown): data is CommentListWithToken;
|
|
33
|
-
export declare function isCreateCommentResponse(data: unknown): data is {
|
|
34
|
-
/** 评论 */
|
|
35
|
-
comment?: Comment;
|
|
36
|
-
/** 安全检测信息 */
|
|
37
|
-
antispam?: Antispam;
|
|
21
|
+
export declare const isAntispam: (data: unknown) => data is Antispam;
|
|
22
|
+
export declare const isCreatePostResponse: (data: unknown) => data is {
|
|
23
|
+
post: Post | undefined;
|
|
24
|
+
antispam: Antispam;
|
|
38
25
|
};
|
|
39
|
-
export
|
|
26
|
+
export declare const isReplyTo: (data: unknown) => data is ReplyTo;
|
|
27
|
+
export declare const isReply: (data: unknown) => data is Reply;
|
|
28
|
+
export declare const isRelyListResponse: (data: unknown) => data is {
|
|
40
29
|
replies: Reply[];
|
|
41
|
-
next_token
|
|
42
|
-
}
|
|
43
|
-
export declare
|
|
44
|
-
export declare function isRelyResponse(data: unknown): data is {
|
|
30
|
+
next_token: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
export declare const isRelyResponse: (data: unknown) => data is {
|
|
45
33
|
reply: Reply;
|
|
46
34
|
};
|
|
47
35
|
export declare function isCreateReplyResponse(data: unknown): data is {
|
|
48
36
|
reply?: Reply;
|
|
49
37
|
antispam?: Antispam;
|
|
50
38
|
};
|
|
51
|
-
export declare
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
export declare const isComment: (data: unknown) => data is Comment;
|
|
40
|
+
export declare const isCommentResponse: (data: unknown) => data is {
|
|
41
|
+
comment: Comment;
|
|
42
|
+
};
|
|
43
|
+
export declare const isCommentListResponse: (data: unknown) => data is {
|
|
44
|
+
comments: Comment[];
|
|
45
|
+
next_token: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
export declare const isCreateCommentResponse: (data: unknown) => data is {
|
|
48
|
+
comment: Comment | undefined;
|
|
49
|
+
antispam: Antispam | undefined;
|
|
58
50
|
};
|
|
59
|
-
export declare
|
|
60
|
-
export declare
|
|
61
|
-
/** 通知列表 */
|
|
51
|
+
export declare const isGetPresignUrlResponse: (data: unknown) => data is PresignUrlResponse;
|
|
52
|
+
export declare const isNotificationListWithToken: (data: unknown) => data is {
|
|
62
53
|
notifications: Notification[];
|
|
63
|
-
|
|
64
|
-
next_token?: string;
|
|
54
|
+
next_token: string | undefined;
|
|
65
55
|
};
|
|
66
|
-
export declare
|
|
67
|
-
/** 系统通知未读数量 */
|
|
56
|
+
export declare const isUnreadNotificationsCountResponse: (data: unknown) => data is {
|
|
68
57
|
system: number;
|
|
69
|
-
/** 评论我的通知未读数量 */
|
|
70
58
|
comment: number;
|
|
71
|
-
/** 收到的赞通知未读数量 */
|
|
72
59
|
like: number;
|
|
73
60
|
};
|
|
@@ -14,7 +14,7 @@ export interface EventConfig {
|
|
|
14
14
|
features: EventFeatureConfig[];
|
|
15
15
|
}
|
|
16
16
|
export declare function isEventConfig(data: unknown): data is EventConfig;
|
|
17
|
-
export type EventFeatureConfig = EventFeatureBaseConfig<FeatureType.Preregister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Lottery, FeatureLotteryConfig> | EventFeatureBaseConfig<FeatureType.Survey, FeatureSurveyConfig> | EventFeatureBaseConfig<FeatureType.Invite, FeatureInviteConfig> | EventFeatureBaseConfig<FeatureType.Share, FeatureShareConfig> | EventFeatureBaseConfig<FeatureType.Follow, FeatureFollowConfig> | EventFeatureBaseConfig<FeatureType.Subscribe, FeatureSubscribeConfig> | EventFeatureBaseConfig<FeatureType.Comment, FeatureCommentConfig> | EventFeatureBaseConfig<FeatureType.Vote, FeatureVoteConfig> | EventFeatureBaseConfig<FeatureType.Cashback, FeatureCashbackConfig> | EventFeatureBaseConfig<FeatureType.GiftCode, FeatureGiftCodeConfig> | EventFeatureBaseConfig<FeatureType.Register, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.InvitedRegister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.ClaimRewards, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Quest, FeatureQuestConfig> | EventFeatureBaseConfig<FeatureType.Team, FeatureTeamConfig> | EventFeatureBaseConfig<FeatureType.LotteryDraw, FeatureLotteryDrawConfig>;
|
|
17
|
+
export type EventFeatureConfig = EventFeatureBaseConfig<FeatureType.Preregister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Lottery, FeatureLotteryConfig> | EventFeatureBaseConfig<FeatureType.Survey, FeatureSurveyConfig> | EventFeatureBaseConfig<FeatureType.Invite, FeatureInviteConfig> | EventFeatureBaseConfig<FeatureType.Share, FeatureShareConfig> | EventFeatureBaseConfig<FeatureType.Follow, FeatureFollowConfig> | EventFeatureBaseConfig<FeatureType.Subscribe, FeatureSubscribeConfig> | EventFeatureBaseConfig<FeatureType.Comment, FeatureCommentConfig> | EventFeatureBaseConfig<FeatureType.Vote, FeatureVoteConfig> | EventFeatureBaseConfig<FeatureType.Cashback, FeatureCashbackConfig> | EventFeatureBaseConfig<FeatureType.GiftCode, FeatureGiftCodeConfig> | EventFeatureBaseConfig<FeatureType.Register, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.InvitedRegister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.ClaimRewards, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Quest, FeatureQuestConfig> | EventFeatureBaseConfig<FeatureType.Team, FeatureTeamConfig> | EventFeatureBaseConfig<FeatureType.LotteryDraw, FeatureLotteryDrawConfig> | EventFeatureBaseConfig<FeatureType.CheckIn, NoopFeatureConfig>;
|
|
18
18
|
export interface EventRewardItemConfig {
|
|
19
19
|
/** 玩法奖励道具 id */
|
|
20
20
|
reward_item_id: number;
|
package/types/src/event.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ export declare class EventApi {
|
|
|
133
133
|
engagement_id: number;
|
|
134
134
|
/** 产生奖励的来源 */
|
|
135
135
|
reward_source: RewardSoure;
|
|
136
|
-
server_id?:
|
|
136
|
+
server_id?: number;
|
|
137
137
|
role_id?: string;
|
|
138
138
|
role_name?: string;
|
|
139
139
|
}): Promise<import("./event.define").ClaimedItem[] | {
|
|
@@ -64,7 +64,9 @@ export declare const enum FeatureType {
|
|
|
64
64
|
/** 组队 */
|
|
65
65
|
Team = "team",
|
|
66
66
|
/** 开奖 */
|
|
67
|
-
LotteryDraw = "lottery_draw"
|
|
67
|
+
LotteryDraw = "lottery_draw",
|
|
68
|
+
/** 签到 */
|
|
69
|
+
CheckIn = "check_in"
|
|
68
70
|
}
|
|
69
71
|
/** 任务玩法的目标类型 */
|
|
70
72
|
export declare const enum QuestObjective {
|