@seayoo-web/gamer-api 2.10.13 → 2.11.1
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 +363 -348
- package/package.json +5 -5
- package/types/src/event.config/feature.lottery.d.ts +1 -1
- package/types/src/event.config/reward.d.ts +1 -1
- package/types/src/event.d.ts +9 -0
- package/types/src/event.engage/engage.cashback.d.ts +3 -0
- package/types/src/event.engage/engage.vote2.d.ts +0 -2
- 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.
|
|
4
|
+
"version": "2.11.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.13.1",
|
|
33
|
-
"@seayoo-web/combo-webview": "2.7.0",
|
|
34
|
-
"@seayoo-web/request": "3.4.0",
|
|
35
33
|
"@seayoo-web/scripts": "3.1.5",
|
|
36
|
-
"@seayoo-web/
|
|
34
|
+
"@seayoo-web/request": "3.4.0",
|
|
35
|
+
"@seayoo-web/combo-webview": "2.7.0",
|
|
37
36
|
"@seayoo-web/tsconfig": "1.0.5",
|
|
37
|
+
"@seayoo-web/utils": "4.1.3",
|
|
38
38
|
"@seayoo-web/validator": "1.1.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@seayoo-web/combo-webview": "^2.7.0",
|
|
42
41
|
"@seayoo-web/validator": "^1.1.1",
|
|
42
|
+
"@seayoo-web/combo-webview": "^2.7.0",
|
|
43
43
|
"@seayoo-web/utils": "^4.1.3"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
import type { InferType } from "@seayoo-web/validator";
|
|
3
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "
|
|
3
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "activation_key" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "external_gift_code" | "void_item", false, false>;
|
|
4
4
|
declare const featureType: "lottery";
|
|
5
5
|
export interface FeatureLotteryItemConfig {
|
|
6
6
|
/** 抽奖奖励道具 id */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InferType } from "@seayoo-web/validator";
|
|
2
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "
|
|
2
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "activation_key" | "gift_code" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "lottery_ticket" | "external_gift_code" | "void_item", false, false>;
|
|
3
3
|
export interface EventRewardItemConfig {
|
|
4
4
|
/** 玩法奖励道具 id */
|
|
5
5
|
reward_item_id: number;
|
package/types/src/event.d.ts
CHANGED
|
@@ -327,4 +327,13 @@ export declare class EventApi {
|
|
|
327
327
|
* https://www.kdocs.cn/l/chlVWKom7DzU?linkname=cYZMVXbP4u
|
|
328
328
|
*/
|
|
329
329
|
getVote2Leaderboard(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").CandidateVote[]>;
|
|
330
|
+
/**
|
|
331
|
+
* 充值返还玩法的查询接口,查询返还数据
|
|
332
|
+
*
|
|
333
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=yNolN2sWp4
|
|
334
|
+
*/
|
|
335
|
+
getCashbackQuery(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").CashbackEngagementData | {
|
|
336
|
+
message: string;
|
|
337
|
+
error: RequestInternalError | "event_not_found" | "feature_not_found";
|
|
338
|
+
} | null>;
|
|
330
339
|
}
|
|
@@ -6,4 +6,7 @@ export interface CashbackEngagementData {
|
|
|
6
6
|
/** 充值返还的总金额所对应的游戏道具数量 */
|
|
7
7
|
game_item_count: `${number}` | number;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* cashback-query 和 engage两个接口同时使用
|
|
11
|
+
*/
|
|
9
12
|
export declare const CashbackEngagementDataValidator: import("@seayoo-web/validator").ObjectValidator<CashbackEngagementData, false, false>;
|
|
@@ -34,8 +34,6 @@ export interface CandidateVote {
|
|
|
34
34
|
total_votes: number;
|
|
35
35
|
/** 用户向候选者投入的总票数 */
|
|
36
36
|
my_votes: number;
|
|
37
|
-
/**候选者最后一次被投票的时间,单位:秒 */
|
|
38
|
-
last_voted_ts: number;
|
|
39
37
|
}
|
|
40
38
|
export declare const CandidateVoteValidator: import("@seayoo-web/validator").ObjectValidator<CandidateVote, false, false>;
|
|
41
39
|
export type Vote2EngagementError = "vote_not_started" | "vote_already_ended" | "vote_candidate_not_found" | "consume_item_not_enough";
|
|
@@ -47,3 +47,4 @@ export declare const isVote2ClaimRewardsResponse: (data: unknown) => data is imp
|
|
|
47
47
|
export declare const isVote2LeaderboardResponse: (data: unknown) => data is {
|
|
48
48
|
candidate_votes: import("./event.engage").CandidateVote[];
|
|
49
49
|
};
|
|
50
|
+
export declare const isCashbackQueryResponse: (data: unknown) => data is import("./event.engage").CashbackEngagementData;
|