@seayoo-web/gamer-api 2.1.1 → 2.2.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/dist/index.js +438 -429
- package/package.json +3 -3
- package/types/src/event.config/feature.claimActivationKey.d.ts +7 -0
- package/types/src/event.config/feature.d.ts +4 -2
- package/types/src/event.define.d.ts +3 -5
- package/types/src/event.engage/engage.claimActivationKey.d.ts +5 -0
- package/types/src/event.engage/engage.d.ts +4 -2
- package/types/src/event.enums.d.ts +2 -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.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.13.1",
|
|
26
26
|
"@seayoo-web/combo-webview": "^2.5.4",
|
|
27
|
-
"@seayoo-web/utils": "^3.5.1",
|
|
28
27
|
"@seayoo-web/request": "^3.1.5",
|
|
29
|
-
"@seayoo-web/scripts": "^2.
|
|
28
|
+
"@seayoo-web/scripts": "^2.5.2",
|
|
29
|
+
"@seayoo-web/utils": "^3.5.1",
|
|
30
30
|
"@seayoo-web/tsconfig": "^1.0.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type EventFeatureBaseConfig } from "./feature.base";
|
|
2
|
+
declare const featureType: "claim_activation_key";
|
|
3
|
+
export type EventFeatureConfigOfClaimActivationKey = EventFeatureBaseConfig & {
|
|
4
|
+
feature_type: typeof featureType;
|
|
5
|
+
};
|
|
6
|
+
export declare const EventFeatureConfigOfClaimActivationKeyValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfClaimActivationKey, false, false>;
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type EventFeatureConfigOfCashback } from "./feature.cashback";
|
|
2
2
|
import { type EventFeatureConfigOfCheckIn } from "./feature.checkIn";
|
|
3
|
+
import { type EventFeatureConfigOfClaimActivationKey } from "./feature.claimActivationKey";
|
|
3
4
|
import { type EventFeatureConfigOfClaimRewards } from "./feature.claimRewards";
|
|
4
5
|
import { type EventFeatureConfigOfComment } from "./feature.comment";
|
|
5
6
|
import { type EventFeatureConfigOfFollow } from "./feature.follow";
|
|
@@ -34,5 +35,6 @@ export * from "./feature.subscribe";
|
|
|
34
35
|
export * from "./feature.survey";
|
|
35
36
|
export * from "./feature.team";
|
|
36
37
|
export * from "./feature.vote";
|
|
37
|
-
export
|
|
38
|
-
export
|
|
38
|
+
export * from "./feature.claimActivationKey";
|
|
39
|
+
export type EventFeatureConfig = EventFeatureConfigOfCashback | EventFeatureConfigOfCheckIn | EventFeatureConfigOfClaimRewards | EventFeatureConfigOfComment | EventFeatureConfigOfFollow | EventFeatureConfigOfGiftCode | EventFeatureConfigOfInvite | EventFeatureConfigOfInvitedRegister | EventFeatureConfigOfLottery | EventFeatureConfigOfLotteryDraw | EventFeatureConfigOfPreregister | EventFeatureConfigOfQuest | EventFeatureConfigOfRegister | EventFeatureConfigOfShare | EventFeatureConfigOfSubscribe | EventFeatureConfigOfSurvey | EventFeatureConfigOfTeam | EventFeatureConfigOfVote | EventFeatureConfigOfClaimActivationKey;
|
|
40
|
+
export declare const EventFeatureConfigValidator: import("@seayoo-web/utils").UnionValidator<[import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfCashback, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfCheckIn, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfClaimRewards, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfComment, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfFollow, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfGiftCode, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfInvite, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfInvitedRegister, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfLottery, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfLotteryDraw, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfPreregister, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfQuest, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfRegister, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfShare, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfSubscribe, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfSurvey, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfTeam, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfVote, false, false>, import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfClaimActivationKey, false, false>], false, false>;
|
|
@@ -25,13 +25,11 @@ export declare const UserFeatureStatusValidator: import("@seayoo-web/utils").Obj
|
|
|
25
25
|
export interface EngageResponse {
|
|
26
26
|
/** 当前参与记录 ID */
|
|
27
27
|
engagement_id: number;
|
|
28
|
-
/** 用户玩法参与记录
|
|
28
|
+
/** 用户玩法参与记录 */
|
|
29
29
|
engagement?: {
|
|
30
|
-
|
|
31
|
-
feature_id: number;
|
|
30
|
+
engagement_id: number;
|
|
32
31
|
sequence: number;
|
|
33
|
-
|
|
34
|
-
role_id: string;
|
|
32
|
+
feature_id: number;
|
|
35
33
|
/** 附带的数据,由 feature_id 的类型决定 */
|
|
36
34
|
data?: UserEngagementData;
|
|
37
35
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CashbackEngagementData } from "./engage.cashback";
|
|
2
|
+
import { type ClaimActivationKeyEngagementData } from "./engage.claimActivationKey";
|
|
2
3
|
import { type GiftCodeEngagementData } from "./engage.giftcode";
|
|
3
4
|
import { type InviteEngagementData } from "./engage.invite";
|
|
4
5
|
import { type LotteryEngagementData } from "./engage.lottery";
|
|
@@ -23,8 +24,9 @@ export * from "./engage.subscribe";
|
|
|
23
24
|
export * from "./engage.survey";
|
|
24
25
|
export * from "./engage.team";
|
|
25
26
|
export * from "./engage.vote";
|
|
27
|
+
export * from "./engage.claimActivationKey";
|
|
26
28
|
export type EmptyObject = Record<string | number | symbol, never>;
|
|
27
|
-
export type UserEngagementData = PreregisterEngagementData | LotteryEngagementData | SurveyEngagementData | InviteEngagementData | ShareEngagementData | VoteEngagementData | WeixinSubscribeEngagementData | CashbackEngagementData | GiftCodeEngagementData | TeamEngagementData | QuestEngagementData | LotteryDrawEngagementData | EmptyObject;
|
|
29
|
+
export type UserEngagementData = PreregisterEngagementData | LotteryEngagementData | SurveyEngagementData | InviteEngagementData | ShareEngagementData | VoteEngagementData | WeixinSubscribeEngagementData | CashbackEngagementData | GiftCodeEngagementData | TeamEngagementData | QuestEngagementData | LotteryDrawEngagementData | ClaimActivationKeyEngagementData | EmptyObject;
|
|
28
30
|
export declare const UserEngagementDataValidator: import("@seayoo-web/utils").UnionValidator<[import("@seayoo-web/utils").ObjectValidator<{
|
|
29
31
|
platforms: string[];
|
|
30
32
|
}, false, false>, import("@seayoo-web/utils").ObjectValidator<LotteryEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
@@ -38,7 +40,7 @@ export declare const UserEngagementDataValidator: import("@seayoo-web/utils").Un
|
|
|
38
40
|
status: /*elided*/ any;
|
|
39
41
|
reward: /*elided*/ any;
|
|
40
42
|
})[];
|
|
41
|
-
}, false, false>, import("@seayoo-web/utils").CustomValidator<EmptyObject, false, false>], false, false> & {
|
|
43
|
+
}, false, false>, import("@seayoo-web/utils").ObjectValidator<ClaimActivationKeyEngagementData, false, false>, import("@seayoo-web/utils").CustomValidator<EmptyObject, false, false>], false, false> & {
|
|
42
44
|
optional: never;
|
|
43
45
|
maybeNull: never;
|
|
44
46
|
key: never;
|
|
@@ -136,6 +136,8 @@ export declare const FeatureType: {
|
|
|
136
136
|
readonly LotteryDraw: "lottery_draw";
|
|
137
137
|
/** 签到 */
|
|
138
138
|
readonly CheckIn: "check_in";
|
|
139
|
+
/** 领取激活码 */
|
|
140
|
+
readonly ClaimActivationKey: "claim_activation_key";
|
|
139
141
|
};
|
|
140
142
|
export type FeatureType = ValueOf<typeof FeatureType>;
|
|
141
143
|
export declare const FeatureTypeValidator: import("@seayoo-web/utils").StringValidator<FeatureType, false, false> & {
|