@seayoo-web/gamer-api 2.10.10 → 2.10.12
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 +2 -2
- package/package.json +3 -3
- package/types/src/club.d.ts +1 -1
- package/types/src/event.config/feature.base.d.ts +2 -2
- package/types/src/event.config/feature.cashback.d.ts +1 -1
- package/types/src/event.config/feature.checkIn.d.ts +1 -1
- package/types/src/event.config/feature.claimActivationKey.d.ts +1 -1
- package/types/src/event.config/feature.claimRewards.d.ts +1 -1
- package/types/src/event.config/feature.comment.d.ts +1 -1
- package/types/src/event.config/feature.d.ts +21 -21
- package/types/src/event.config/feature.follow.d.ts +1 -1
- package/types/src/event.config/feature.giftcode.d.ts +1 -1
- package/types/src/event.config/feature.invite.d.ts +1 -1
- package/types/src/event.config/feature.invitedRegister.d.ts +1 -1
- package/types/src/event.config/feature.lottery.d.ts +3 -3
- package/types/src/event.config/feature.lotteryDraw.d.ts +1 -1
- package/types/src/event.config/feature.preregister.d.ts +1 -1
- package/types/src/event.config/feature.quest.d.ts +2 -2
- package/types/src/event.config/feature.register.d.ts +1 -1
- package/types/src/event.config/feature.share.d.ts +1 -1
- package/types/src/event.config/feature.subscribe.d.ts +1 -1
- package/types/src/event.config/feature.survey.d.ts +1 -1
- package/types/src/event.config/feature.team.d.ts +1 -1
- package/types/src/event.config/feature.vote.d.ts +3 -3
- package/types/src/event.config/feature.vote2.d.ts +2 -2
- package/types/src/event.config/feature.zeroChatgpt.d.ts +1 -1
- package/types/src/event.config/index.d.ts +1 -1
- package/types/src/event.config/reward.d.ts +2 -2
- package/types/src/event.define.d.ts +2 -2
- package/types/src/event.engage/engage.d.ts +15 -15
- package/types/src/event.engage/engage.lotteryDraw.d.ts +4 -3
- package/types/src/event.engage/engage.lotteryDraw.reward.d.ts +1 -1
- package/types/src/event.engage/engage.quest.d.ts +1 -1
- package/types/src/event.engage/engage.team.d.ts +1 -1
- package/types/src/event.engage/engage.vote2.d.ts +2 -2
- package/types/src/event.engage/index.d.ts +3 -3
- package/types/src/event.engage/reward.d.ts +3 -2
- package/types/src/token.d.ts +1 -1
- package/types/src/weixin.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1692,7 +1692,7 @@ class Yr {
|
|
|
1692
1692
|
if (!await this.token.autoLogin()) return null;
|
|
1693
1693
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1694
1694
|
"event/vote2/rewards",
|
|
1695
|
-
{ feature_id: t },
|
|
1695
|
+
{ feature_id: t, event_id: this.event },
|
|
1696
1696
|
ir,
|
|
1697
1697
|
n
|
|
1698
1698
|
);
|
|
@@ -1710,7 +1710,7 @@ class Yr {
|
|
|
1710
1710
|
if (!await this.token.autoLogin()) return [];
|
|
1711
1711
|
const { data: r } = await this.req.get("event/vote2/leaderboard", sr, {
|
|
1712
1712
|
...n,
|
|
1713
|
-
params: { feature_id: t }
|
|
1713
|
+
params: { feature_id: t, event_id: this.event }
|
|
1714
1714
|
});
|
|
1715
1715
|
return r?.candidate_votes || [];
|
|
1716
1716
|
}
|
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.10.
|
|
4
|
+
"version": "2.10.12",
|
|
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/request": "3.4.0",
|
|
34
33
|
"@seayoo-web/combo-webview": "2.7.0",
|
|
35
|
-
"@seayoo-web/scripts": "3.1.
|
|
34
|
+
"@seayoo-web/scripts": "3.1.4",
|
|
36
35
|
"@seayoo-web/tsconfig": "1.0.5",
|
|
36
|
+
"@seayoo-web/request": "3.4.0",
|
|
37
37
|
"@seayoo-web/utils": "4.1.3",
|
|
38
38
|
"@seayoo-web/validator": "1.1.1"
|
|
39
39
|
},
|
package/types/src/club.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type SomePartial } from "@seayoo-web/utils";
|
|
2
1
|
import type { ClubAddress, ClubUserProfile, RedeemParams } from "./club.define";
|
|
3
2
|
import type { ClubCreditChangeType, ClubItemType } from "./club.enums";
|
|
4
3
|
import type { AuthToken } from "./token";
|
|
5
4
|
import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
|
|
5
|
+
import type { SomePartial } from "@seayoo-web/utils";
|
|
6
6
|
export * from "./club.enums";
|
|
7
7
|
export * from "./club.define";
|
|
8
8
|
export declare class ClubApi {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EngageAccountType, EventPeriodType } from "../event.enums";
|
|
2
|
+
import type { FeatureReward } from "./reward";
|
|
3
3
|
export interface EventFeatureBaseConfig {
|
|
4
4
|
/** 玩法名称 */
|
|
5
5
|
feature_name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "check_in";
|
|
3
3
|
export type EventFeatureConfigOfCheckIn = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "claim_activation_key";
|
|
3
3
|
export type EventFeatureConfigOfClaimActivationKey = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "claim_rewards";
|
|
3
3
|
export type EventFeatureConfigOfClaimRewards = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
1
|
+
import type { EventFeatureConfigOfCashback } from "./feature.cashback";
|
|
2
|
+
import type { EventFeatureConfigOfCheckIn } from "./feature.checkIn";
|
|
3
|
+
import type { EventFeatureConfigOfClaimActivationKey } from "./feature.claimActivationKey";
|
|
4
|
+
import type { EventFeatureConfigOfClaimRewards } from "./feature.claimRewards";
|
|
5
|
+
import type { EventFeatureConfigOfComment } from "./feature.comment";
|
|
6
|
+
import type { EventFeatureConfigOfFollow } from "./feature.follow";
|
|
7
|
+
import type { EventFeatureConfigOfGiftCode } from "./feature.giftcode";
|
|
8
|
+
import type { EventFeatureConfigOfInvite } from "./feature.invite";
|
|
9
|
+
import type { EventFeatureConfigOfInvitedRegister } from "./feature.invitedRegister";
|
|
10
|
+
import type { EventFeatureConfigOfLottery } from "./feature.lottery";
|
|
11
|
+
import type { EventFeatureConfigOfLotteryDraw } from "./feature.lotteryDraw";
|
|
12
|
+
import type { EventFeatureConfigOfPreregister } from "./feature.preregister";
|
|
13
|
+
import type { EventFeatureConfigOfQuest } from "./feature.quest";
|
|
14
|
+
import type { EventFeatureConfigOfRegister } from "./feature.register";
|
|
15
|
+
import type { EventFeatureConfigOfShare } from "./feature.share";
|
|
16
|
+
import type { EventFeatureConfigOfSubscribe } from "./feature.subscribe";
|
|
17
|
+
import type { EventFeatureConfigOfSurvey } from "./feature.survey";
|
|
18
|
+
import type { EventFeatureConfigOfTeam } from "./feature.team";
|
|
19
|
+
import type { EventFeatureConfigOfVote } from "./feature.vote";
|
|
20
|
+
import type { EventFeatureConfigOfVote2 } from "./feature.vote2";
|
|
21
|
+
import type { EventFeatureConfigOfZeroChatgpt } from "./feature.zeroChatgpt";
|
|
22
22
|
export * from "./feature.cashback";
|
|
23
23
|
export * from "./feature.checkIn";
|
|
24
24
|
export * from "./feature.claimRewards";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "invited_register";
|
|
3
3
|
export type EventFeatureConfigOfInvitedRegister = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
|
+
import type { InferType } from "@seayoo-web/validator";
|
|
3
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "external_gift_code" | "void_item", false, false>;
|
|
4
4
|
declare const featureType: "lottery";
|
|
5
5
|
export interface FeatureLotteryItemConfig {
|
|
6
6
|
/** 抽奖奖励道具 id */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "preregister";
|
|
3
3
|
export type EventFeatureConfigOfPreregister = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { QuestObjective, QuestProgressAlgorithm } from "../event.enums";
|
|
2
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
3
3
|
declare const featureType: "quest";
|
|
4
4
|
export interface FeatureQuestConfig {
|
|
5
5
|
/** 任务目标 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "register";
|
|
3
3
|
export type EventFeatureConfigOfRegister = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { VoteOptionSource } from "../event.enums";
|
|
2
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
3
|
+
import type { EventRewardItemConfig } from "./reward";
|
|
4
4
|
declare const featureType: "vote";
|
|
5
5
|
export interface FeatureVoteOption {
|
|
6
6
|
/** 选项标识 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EventRewardItemConfig } from "../event";
|
|
2
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
3
3
|
declare const featureType: "vote2";
|
|
4
4
|
export interface FeatureVoteCandidate {
|
|
5
5
|
/** 选项标识 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventFeatureBaseConfig } from "./feature.base";
|
|
2
2
|
declare const featureType: "zero_chatgpt";
|
|
3
3
|
export type EventFeatureConfigOfZeroChatgpt = EventFeatureBaseConfig & {
|
|
4
4
|
feature_type: typeof featureType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"
|
|
1
|
+
import type { InferType } from "@seayoo-web/validator";
|
|
2
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "gift_code" | "activation_key" | "lottery_ticket" | "external_gift_code" | "void_item", false, false>;
|
|
3
3
|
export interface EventRewardItemConfig {
|
|
4
4
|
/** 玩法奖励道具 id */
|
|
5
5
|
reward_item_id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { UserEngagementData, EngageReward } from "./event.engage";
|
|
2
|
+
import type { ClaimRewardStatus } from "./event.enums";
|
|
3
3
|
export * from "./event.config";
|
|
4
4
|
export * from "./event.engage";
|
|
5
5
|
export interface VerifyMobileResult {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import type { CashbackEngagementData } from "./engage.cashback";
|
|
2
|
+
import type { ClaimActivationKeyEngagementData } from "./engage.claimActivationKey";
|
|
3
|
+
import type { GiftCodeEngagementData } from "./engage.giftcode";
|
|
4
|
+
import type { InviteEngagementData } from "./engage.invite";
|
|
5
|
+
import type { LotteryEngagementData } from "./engage.lottery";
|
|
6
|
+
import type { LotteryDrawEngagementData } from "./engage.lotteryDraw";
|
|
7
|
+
import type { PreregisterEngagementData } from "./engage.preregister";
|
|
8
|
+
import type { QuestEngagementData } from "./engage.quest";
|
|
9
|
+
import type { ShareEngagementData } from "./engage.share";
|
|
10
|
+
import type { WeixinSubscribeEngagementData } from "./engage.subscribe";
|
|
11
|
+
import type { SurveyEngagementData } from "./engage.survey";
|
|
12
|
+
import type { TeamEngagementData } from "./engage.team";
|
|
13
|
+
import type { VoteEngagementData } from "./engage.vote";
|
|
14
|
+
import type { Vote2EngagementData } from "./engage.vote2";
|
|
15
|
+
import type { ZeroChatGPTData } from "./engage.zeroChatGPT";
|
|
16
16
|
export * from "./engage.cashback";
|
|
17
17
|
export * from "./engage.comment";
|
|
18
18
|
export * from "./engage.giftcode";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { LotteryTicketStatus } from "../event.enums";
|
|
2
|
+
import type { LotteryDrawAction } from "../event.enums";
|
|
3
|
+
import type { UserReward } from "./engage.lotteryDraw.reward";
|
|
4
|
+
import type { InferType } from "@seayoo-web/validator";
|
|
4
5
|
export * from "./engage.lotteryDraw.reward";
|
|
5
6
|
declare const noRewardStatus: import("@seayoo-web/validator").StringValidator<"unknown" | "pending", false, false>;
|
|
6
7
|
export type LotteryDrawTicket = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ClaimRewardStatus, FeatureType, GamerItemType, RewardSource } from "../event.enums";
|
|
2
2
|
export interface UserReward {
|
|
3
3
|
/** 用户奖励记录 id */
|
|
4
4
|
reward_id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Vote2RewardType } from "../event.enums";
|
|
2
|
+
import type { UserReward } from "./engage.lotteryDraw.reward";
|
|
3
3
|
export interface Vote2EngagementData {
|
|
4
4
|
/** 用户投票选项 */
|
|
5
5
|
candidate_id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { UserEngagementData, CommentEngagementParam, PreregisterEngagementParam, LotteryEngagementParam, LotteryDrawEngagementParam, ShareEngagementParam, SubscribeEngagementParam, TeamEngagementParam, VoteEngagementParam, Vote2EngagementParam, Vote2EngagementError, LotteryEngagementError, ClaimActivationKeyEngagementError, LotteryDrawEngagementError, TeamEngagementError, GiftCodeEngagementError } from "./engage";
|
|
2
|
+
import type { Reward } from "./reward";
|
|
3
3
|
import type { FeatureType } from "../event.enums";
|
|
4
4
|
import type { ZeroChatGPTEngagementParam } from "./engage.zeroChatGPT";
|
|
5
5
|
export * from "./engage";
|
|
@@ -32,7 +32,7 @@ export declare const UserEngagementValidator: import("@seayoo-web/validator").Ob
|
|
|
32
32
|
/**
|
|
33
33
|
* 部分玩法参与时需要提供的参数
|
|
34
34
|
*/
|
|
35
|
-
export type EngagementParam = PreregisterEngagementParam | LotteryEngagementParam | CommentEngagementParam | ShareEngagementParam | VoteEngagementParam | Vote2EngagementParam | SubscribeEngagementParam | TeamEngagementParam | LotteryDrawEngagementParam | ZeroChatGPTEngagementParam;
|
|
35
|
+
export type EngagementParam = null | PreregisterEngagementParam | LotteryEngagementParam | CommentEngagementParam | ShareEngagementParam | VoteEngagementParam | Vote2EngagementParam | SubscribeEngagementParam | TeamEngagementParam | LotteryDrawEngagementParam | ZeroChatGPTEngagementParam;
|
|
36
36
|
export type EngagementFeatureType = FeatureType | unknown;
|
|
37
37
|
/**
|
|
38
38
|
* 根据玩法类型推导需要提交的参数数据类型
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RewardItemType
|
|
2
|
-
import {
|
|
1
|
+
import { RewardItemType } from "../event.enums";
|
|
2
|
+
import type { RewardSource, RewardStatusSuffix } from "../event.enums";
|
|
3
|
+
import type { UserEngagementData } from "./engage";
|
|
3
4
|
export interface Reward {
|
|
4
5
|
/** 用户奖励记录 id */
|
|
5
6
|
reward_id: number;
|
package/types/src/token.d.ts
CHANGED
package/types/src/weixin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type WeixinWebLoginErrorCode } from "./weixin.define";
|
|
2
1
|
import type { AuthToken } from "./token";
|
|
2
|
+
import type { WeixinWebLoginErrorCode } from "./weixin.define";
|
|
3
3
|
import type { IRequestOptions, RequestInternalError } from "@seayoo-web/request";
|
|
4
4
|
export * from "./weixin.define";
|
|
5
5
|
export declare class WeixinApi {
|