@seayoo-web/gamer-api 2.4.4 → 2.5.0
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/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.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.13.1",
|
|
33
|
-
"@seayoo-web/tsconfig": "^1.0.4",
|
|
34
33
|
"@seayoo-web/combo-webview": "^2.5.4",
|
|
34
|
+
"@seayoo-web/scripts": "^2.6.0",
|
|
35
35
|
"@seayoo-web/request": "^3.2.0",
|
|
36
|
-
"@seayoo-web/
|
|
36
|
+
"@seayoo-web/tsconfig": "^1.0.4",
|
|
37
37
|
"@seayoo-web/utils": "^3.6.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InferType } from "@seayoo-web/utils";
|
|
2
2
|
import { type EventFeatureBaseConfig } from "./feature.base";
|
|
3
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"
|
|
3
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "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/utils";
|
|
2
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"
|
|
2
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "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
|
@@ -127,6 +127,8 @@ export declare class EventApi {
|
|
|
127
127
|
/**
|
|
128
128
|
* 用户领取除红包和实物奖励以外的所有奖励
|
|
129
129
|
*
|
|
130
|
+
* @deprecated 请优先使用 `claimRewardsV2` 接口
|
|
131
|
+
*
|
|
130
132
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=lCGuqgvUDP
|
|
131
133
|
*/
|
|
132
134
|
claimRewards(params: {
|
|
@@ -144,6 +146,26 @@ export declare class EventApi {
|
|
|
144
146
|
message: string;
|
|
145
147
|
error: RequestInternalError | "invalid_server_id" | "invalid_role_id" | "event_not_found" | "engagement_not_found" | "event_not_started" | "event_already_ended" | "claim_rewards_not_started" | "claim_rewards_already_ended" | "no_rewards_to_claim" | "reward_received" | "claim_reward_error";
|
|
146
148
|
}>;
|
|
149
|
+
/**
|
|
150
|
+
* 用户领取除红包和实物奖励以外的所有奖励
|
|
151
|
+
*
|
|
152
|
+
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vdc4SrqXjF
|
|
153
|
+
*/
|
|
154
|
+
claimRewardsV2(params: {
|
|
155
|
+
/** 用户参与记录 ID */
|
|
156
|
+
engagement_id: number;
|
|
157
|
+
/** 产生奖励的来源 */
|
|
158
|
+
reward_source: RewardSource;
|
|
159
|
+
/** 游戏服务器 ID,领取游戏道具时为必填 */
|
|
160
|
+
server_id?: string | number;
|
|
161
|
+
/** 游戏角色 ID,领取游戏道具时为必填 */
|
|
162
|
+
role_id?: string;
|
|
163
|
+
/** 游戏角色名 */
|
|
164
|
+
role_name?: string;
|
|
165
|
+
}, requestOptions?: IRequestOptions): Promise<import("./event.engage").UserReward[] | {
|
|
166
|
+
message: string;
|
|
167
|
+
error: RequestInternalError | "invalid_server_id" | "invalid_role_id" | "event_not_found" | "engagement_not_found" | "event_not_started" | "event_already_ended" | "claim_rewards_not_started" | "claim_rewards_already_ended" | "no_rewards_to_claim" | "reward_received" | "claim_reward_error";
|
|
168
|
+
}>;
|
|
147
169
|
/**
|
|
148
170
|
* 用户领取红包奖励
|
|
149
171
|
*
|
|
@@ -11,6 +11,8 @@ export declare const GamerItemType: {
|
|
|
11
11
|
readonly WeixinHongbao: "weixin_hongbao";
|
|
12
12
|
/** 礼包码 */
|
|
13
13
|
readonly GiftCode: "gift_code";
|
|
14
|
+
/** 激活码 */
|
|
15
|
+
readonly ActivationKey: "activation_key";
|
|
14
16
|
/** 抽奖券 */
|
|
15
17
|
readonly LotteryTicket: "lottery_ticket";
|
|
16
18
|
/** 积分 */
|
|
@@ -42,6 +44,8 @@ export declare const RewardItemType: {
|
|
|
42
44
|
readonly WeixinHongbao: "weixin_hongbao";
|
|
43
45
|
/** 礼包码 */
|
|
44
46
|
readonly GiftCode: "gift_code";
|
|
47
|
+
/** 激活码 */
|
|
48
|
+
readonly ActivationKey: "activation_key";
|
|
45
49
|
/** 抽奖券 */
|
|
46
50
|
readonly LotteryTicket: "lottery_ticket";
|
|
47
51
|
/** 积分 */
|
|
@@ -20,6 +20,9 @@ export declare const isEngageResponse: (data: unknown) => data is import("./even
|
|
|
20
20
|
export declare const isClaimRewardsResponse: (data: unknown) => data is {
|
|
21
21
|
claimed_items: import("./event.define").ClaimedItem[];
|
|
22
22
|
};
|
|
23
|
+
export declare const isClaimRewardsV2Response: (data: unknown) => data is {
|
|
24
|
+
rewards: import("./event.engage").UserReward[];
|
|
25
|
+
};
|
|
23
26
|
export declare const isClaimWeixinHongbaoResponse: (data: unknown) => data is {
|
|
24
27
|
reward_status: import("./event.enums").ClaimRewardStatus;
|
|
25
28
|
};
|