@seayoo-web/gamer-api 2.12.5 → 2.12.6
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 +545 -489
- package/package.json +2 -2
- package/types/src/event.d.ts +24 -1
- package/types/src/event.engage/engage.ugc.d.ts +23 -0
- package/types/src/event.guards.d.ts +1 -0
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": "2.12.
|
|
4
|
+
"version": "2.12.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.13.1",
|
|
33
33
|
"@seayoo-web/combo-webview": "2.8.0",
|
|
34
|
-
"@seayoo-web/scripts": "3.1.5",
|
|
35
34
|
"@seayoo-web/request": "3.4.0",
|
|
35
|
+
"@seayoo-web/scripts": "3.1.5",
|
|
36
36
|
"@seayoo-web/tsconfig": "1.0.5",
|
|
37
37
|
"@seayoo-web/utils": "4.1.3",
|
|
38
38
|
"@seayoo-web/validator": "1.1.1"
|
package/types/src/event.d.ts
CHANGED
|
@@ -373,6 +373,29 @@ export declare class EventApi {
|
|
|
373
373
|
image_url: string;
|
|
374
374
|
} | {
|
|
375
375
|
message: string;
|
|
376
|
-
|
|
376
|
+
error: RequestInternalError | "event_not_found" | "feature_not_found";
|
|
377
|
+
} | null>;
|
|
378
|
+
/**
|
|
379
|
+
* 获取推荐稿件列表,随机显示 N 条被接受的投稿记录
|
|
380
|
+
*
|
|
381
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=WzvcAPjHAh
|
|
382
|
+
*/
|
|
383
|
+
getUgcRecommendation(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcRecordResponse | {
|
|
384
|
+
message: string;
|
|
385
|
+
error: RequestInternalError | "event_not_found" | "feature_not_found";
|
|
386
|
+
} | null>;
|
|
387
|
+
/**
|
|
388
|
+
* 获取指定活动玩法的 UGC 投稿排行榜数据
|
|
389
|
+
*
|
|
390
|
+
* 该接口仅在管理员在 Console 后台完成排行榜结算后才会返回有效数据。
|
|
391
|
+
* 结算前调用将返回空结果集。
|
|
392
|
+
* 排行榜结算通常在活动结束后由管理员在 Console 后台手动触发。
|
|
393
|
+
* 目前前端无法直接在投稿玩法中获得「是否已经结算」的状态。
|
|
394
|
+
*
|
|
395
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=KoB7S8omkC
|
|
396
|
+
*/
|
|
397
|
+
getUgcLeaderboard(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcLeaderboardResponse | {
|
|
398
|
+
message: string;
|
|
399
|
+
error: RequestInternalError | "event_not_found" | "feature_not_found";
|
|
377
400
|
} | null>;
|
|
378
401
|
}
|
|
@@ -75,3 +75,26 @@ export declare const UgcUploadImageValidator: import("@seayoo-web/validator").Ob
|
|
|
75
75
|
upload_url: string | undefined;
|
|
76
76
|
image_url: string;
|
|
77
77
|
}, false, false>;
|
|
78
|
+
export interface LeaderboardEntry {
|
|
79
|
+
/** 投稿记录 ID */
|
|
80
|
+
ugc_id: number;
|
|
81
|
+
/** 排名 */
|
|
82
|
+
rank: number;
|
|
83
|
+
/** 投稿记录获得的总赞数 */
|
|
84
|
+
total_likes: number;
|
|
85
|
+
/** 图片 URL 列表 */
|
|
86
|
+
image_urls?: string[];
|
|
87
|
+
/** 服务器 ID */
|
|
88
|
+
server_id?: number;
|
|
89
|
+
/** 服务器名称 */
|
|
90
|
+
server_name?: string;
|
|
91
|
+
/** 角色 ID */
|
|
92
|
+
role_id?: string;
|
|
93
|
+
/** 角色名称 */
|
|
94
|
+
role_name?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface UgcLeaderboardResponse {
|
|
97
|
+
/** 投稿排行榜列表 */
|
|
98
|
+
ugcs: Array<LeaderboardEntry>;
|
|
99
|
+
}
|
|
100
|
+
export declare const UgcLeaderboardResponseValidator: import("@seayoo-web/validator").ObjectValidator<UgcLeaderboardResponse, false, false>;
|