@seayoo-web/gamer-api 2.13.21 → 2.14.2
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 +338 -300
- package/package.json +5 -5
- package/types/src/club.define.d.ts +9 -18
- package/types/src/event.d.ts +25 -0
- package/types/src/event.engage/engage.ugc.d.ts +3 -0
- package/types/src/event.guards.d.ts +6 -0
- package/types/src/utils.d.ts +1 -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": "2.
|
|
4
|
+
"version": "2.14.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.13.1",
|
|
33
|
-
"@seayoo-web/combo-webview": "2.8.0",
|
|
34
33
|
"@seayoo-web/request": "3.4.2",
|
|
35
|
-
"@seayoo-web/
|
|
34
|
+
"@seayoo-web/combo-webview": "2.8.0",
|
|
36
35
|
"@seayoo-web/tsconfig": "1.0.5",
|
|
36
|
+
"@seayoo-web/scripts": "3.1.6",
|
|
37
37
|
"@seayoo-web/utils": "4.1.3",
|
|
38
38
|
"@seayoo-web/validator": "2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@seayoo-web/combo-webview": "^2.8.0",
|
|
42
|
-
"@seayoo-web/
|
|
43
|
-
"@seayoo-web/
|
|
42
|
+
"@seayoo-web/utils": "^4.1.3",
|
|
43
|
+
"@seayoo-web/validator": "^2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
|
|
@@ -118,22 +118,6 @@ export declare const PlayerRoleCardValidator: import("@seayoo-web/validator").Ob
|
|
|
118
118
|
maybeNull: never;
|
|
119
119
|
lock: never;
|
|
120
120
|
};
|
|
121
|
-
export type SocialMedia = {
|
|
122
|
-
/** 抖音 */
|
|
123
|
-
douyin?: string;
|
|
124
|
-
/** 小红书 */
|
|
125
|
-
xiaohongshu?: string;
|
|
126
|
-
/** taptap */
|
|
127
|
-
taptap?: string;
|
|
128
|
-
/** bilibili */
|
|
129
|
-
bilibili?: string;
|
|
130
|
-
/** 微博 */
|
|
131
|
-
weibo?: string;
|
|
132
|
-
/** 虎牙 */
|
|
133
|
-
huya?: string;
|
|
134
|
-
/** 斗鱼 */
|
|
135
|
-
douyu?: string;
|
|
136
|
-
};
|
|
137
121
|
export type ClubUserProfile = {
|
|
138
122
|
/** 用户昵称 */
|
|
139
123
|
name: string;
|
|
@@ -150,8 +134,14 @@ export type ClubUserProfile = {
|
|
|
150
134
|
day: number;
|
|
151
135
|
};
|
|
152
136
|
/** 社交媒体信息 */
|
|
153
|
-
social_medias?:
|
|
154
|
-
};
|
|
137
|
+
social_medias?: Record<string, Homepage | undefined>;
|
|
138
|
+
};
|
|
139
|
+
interface Homepage {
|
|
140
|
+
/** 主页链接 */
|
|
141
|
+
homepage_url: string;
|
|
142
|
+
/** 主页截图链接 */
|
|
143
|
+
homepage_image_url: string;
|
|
144
|
+
}
|
|
155
145
|
export declare const ClubUserProfileValidator: import("@seayoo-web/validator").ObjectValidator<ClubUserProfile, false, false> & {
|
|
156
146
|
desc: never;
|
|
157
147
|
plain: never;
|
|
@@ -403,3 +393,4 @@ export type Redemption = {
|
|
|
403
393
|
extra_data?: ExtraPhysicalShipment | ExtraGameReward;
|
|
404
394
|
};
|
|
405
395
|
export declare const RedemptionValidator: import("@seayoo-web/validator").ObjectValidator<Redemption, false, false>;
|
|
396
|
+
export {};
|
package/types/src/event.d.ts
CHANGED
|
@@ -214,6 +214,17 @@ export declare class EventApi {
|
|
|
214
214
|
user_rewards: import("./event.engage").UserReward[];
|
|
215
215
|
next_token: string;
|
|
216
216
|
}>;
|
|
217
|
+
/**
|
|
218
|
+
* 查询用户奖励数量,目前仅返回未领取的奖励数量
|
|
219
|
+
*
|
|
220
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=jrFbyZ3UWN
|
|
221
|
+
*/
|
|
222
|
+
getUserRewardsCount(option: {
|
|
223
|
+
/** 活动 ID 列表,多个用逗号分隔。若不传,则统计所有活动。*/
|
|
224
|
+
event_ids?: string;
|
|
225
|
+
}, requestOptions?: IRequestOptions): Promise<{
|
|
226
|
+
unclaimed: number;
|
|
227
|
+
}>;
|
|
217
228
|
/**
|
|
218
229
|
* 查询用户活动道具数量。💡 注意,这里只能是活动道具
|
|
219
230
|
*
|
|
@@ -361,6 +372,20 @@ export declare class EventApi {
|
|
|
361
372
|
message: string;
|
|
362
373
|
error: RequestInternalError | "event_not_found" | "feature_not_found";
|
|
363
374
|
} | null>;
|
|
375
|
+
/**
|
|
376
|
+
* 查询用户投稿数量
|
|
377
|
+
*
|
|
378
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=U0sYIGPzDk
|
|
379
|
+
*/
|
|
380
|
+
getUgcMyCount(option: {
|
|
381
|
+
/** 活动 ID 列表,多个用逗号分隔。若不传,则统计所有活动。*/
|
|
382
|
+
event_ids?: string;
|
|
383
|
+
}, requestOptions?: IRequestOptions): Promise<{
|
|
384
|
+
total_count: number;
|
|
385
|
+
} | {
|
|
386
|
+
message: string;
|
|
387
|
+
error: RequestInternalError | "event_not_found";
|
|
388
|
+
} | null>;
|
|
364
389
|
/**
|
|
365
390
|
* 媒体资源预上传地址获取,为投稿玩法(UGC)提供 S3 预签名上传 URL,供用户客户端上传图片资源
|
|
366
391
|
*
|
|
@@ -68,6 +68,9 @@ export interface UgcRecordResponse {
|
|
|
68
68
|
next_token?: string;
|
|
69
69
|
}
|
|
70
70
|
export declare const UgcRecordResponseValidator: import("@seayoo-web/validator").ObjectValidator<UgcRecordResponse, false, false>;
|
|
71
|
+
export declare const UgcCountResponseValidator: import("@seayoo-web/validator").ObjectValidator<{
|
|
72
|
+
total_count: number;
|
|
73
|
+
}, false, false>;
|
|
71
74
|
export interface UgcUploadImageResponse {
|
|
72
75
|
/** 图片是否已存在,已存在无需上传。 */
|
|
73
76
|
existed: boolean;
|
|
@@ -33,6 +33,9 @@ export declare const isGetUserRewardsResponse: (data: unknown) => data is {
|
|
|
33
33
|
user_rewards: import("./event.engage").UserReward[];
|
|
34
34
|
next_token: string | undefined;
|
|
35
35
|
};
|
|
36
|
+
export declare const isGetUserRewardsCountResponse: (data: unknown) => data is {
|
|
37
|
+
unclaimed: number;
|
|
38
|
+
};
|
|
36
39
|
export declare const isGetUnlimitQrcodeSceneResponse: (data: unknown) => data is {
|
|
37
40
|
scene: string;
|
|
38
41
|
};
|
|
@@ -49,6 +52,9 @@ export declare const isVote2LeaderboardResponse: (data: unknown) => data is {
|
|
|
49
52
|
};
|
|
50
53
|
export declare const isCashbackQueryResponse: (data: unknown) => data is import("./event.engage").CashbackEngagementData;
|
|
51
54
|
export declare const isUgcResponse: (data: unknown) => data is import("./event.engage").UgcRecordResponse;
|
|
55
|
+
export declare const isUgcCountResponse: (data: unknown) => data is {
|
|
56
|
+
total_count: number;
|
|
57
|
+
};
|
|
52
58
|
export declare const isUgcUploadImageResponse: (data: unknown) => data is {
|
|
53
59
|
existed: boolean;
|
|
54
60
|
upload_url: string | undefined;
|
package/types/src/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const console: Pick<Console, "
|
|
1
|
+
export declare const console: Pick<Console, "log" | "error" | "warn">;
|
|
2
2
|
/** 检测是否在 combo webview */
|
|
3
3
|
export declare function inComboWebview(): boolean;
|
|
4
4
|
export declare function isRootEndpoint(path: string): boolean;
|