@seayoo-web/gamer-api 1.1.18 → 2.0.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.
Files changed (55) hide show
  1. package/dist/index.js +1418 -1072
  2. package/package.json +5 -5
  3. package/types/src/club.d.ts +11 -8
  4. package/types/src/club.define.d.ts +157 -55
  5. package/types/src/club.enums.d.ts +84 -33
  6. package/types/src/club.guards.d.ts +13 -23
  7. package/types/src/community.d.ts +20 -20
  8. package/types/src/community.define.d.ts +155 -62
  9. package/types/src/community.enums.d.ts +74 -33
  10. package/types/src/community.guards.d.ts +20 -28
  11. package/types/src/event.config/feature.base.d.ts +23 -0
  12. package/types/src/event.config/feature.cashback.d.ts +18 -0
  13. package/types/src/event.config/feature.checkIn.d.ts +7 -0
  14. package/types/src/event.config/feature.claimRewards.d.ts +7 -0
  15. package/types/src/event.config/feature.comment.d.ts +14 -0
  16. package/types/src/event.config/feature.d.ts +38 -0
  17. package/types/src/event.config/feature.follow.d.ts +24 -0
  18. package/types/src/event.config/feature.giftcode.d.ts +24 -0
  19. package/types/src/event.config/feature.invite.d.ts +12 -0
  20. package/types/src/event.config/feature.invitedRegister.d.ts +7 -0
  21. package/types/src/event.config/feature.lottery.d.ts +40 -0
  22. package/types/src/event.config/feature.lotteryDraw.d.ts +14 -0
  23. package/types/src/event.config/feature.preregister.d.ts +7 -0
  24. package/types/src/event.config/feature.quest.d.ts +22 -0
  25. package/types/src/event.config/feature.register.d.ts +7 -0
  26. package/types/src/event.config/feature.share.d.ts +16 -0
  27. package/types/src/event.config/feature.subscribe.d.ts +12 -0
  28. package/types/src/event.config/feature.survey.d.ts +14 -0
  29. package/types/src/event.config/feature.team.d.ts +14 -0
  30. package/types/src/event.config/feature.vote.d.ts +44 -0
  31. package/types/src/event.config/index.d.ts +23 -0
  32. package/types/src/event.config/reward.d.ts +55 -0
  33. package/types/src/event.d.ts +47 -38
  34. package/types/src/event.define.d.ts +19 -309
  35. package/types/src/event.engage/engage.cashback.d.ts +9 -0
  36. package/types/src/event.engage/engage.comment.d.ts +22 -0
  37. package/types/src/event.engage/engage.d.ts +46 -0
  38. package/types/src/event.engage/engage.giftcode.d.ts +5 -0
  39. package/types/src/event.engage/engage.invite.d.ts +9 -0
  40. package/types/src/event.engage/engage.lottery.d.ts +9 -0
  41. package/types/src/event.engage/engage.lotteryDraw.d.ts +40 -0
  42. package/types/src/event.engage/engage.preregister.d.ts +11 -0
  43. package/types/src/event.engage/engage.quest.d.ts +28 -0
  44. package/types/src/event.engage/engage.share.d.ts +9 -0
  45. package/types/src/event.engage/engage.subscribe.d.ts +14 -0
  46. package/types/src/event.engage/engage.survey.d.ts +7 -0
  47. package/types/src/event.engage/engage.team.d.ts +53 -0
  48. package/types/src/event.engage/engage.vote.d.ts +9 -0
  49. package/types/src/event.engage/index.d.ts +47 -0
  50. package/types/src/event.engage/reward.d.ts +89 -0
  51. package/types/src/event.enums.d.ts +298 -109
  52. package/types/src/event.guards.d.ts +22 -26
  53. package/types/src/token.d.ts +2 -2
  54. package/types/src/weixin.d.ts +4 -4
  55. package/types/src/weixin.define.d.ts +1 -1
@@ -0,0 +1,23 @@
1
+ import { type EngageAccountType, type EventPeriodType } from "../event.enums";
2
+ import { type FeatureReward } from "./reward";
3
+ export interface EventFeatureBaseConfig {
4
+ /** 玩法名称 */
5
+ feature_name: string;
6
+ /** 玩法 Id */
7
+ feature_id: number;
8
+ /** 玩法描述 */
9
+ description: string;
10
+ /** 玩法周期,即每多长时间可参与一次 */
11
+ cycle: EventPeriodType;
12
+ /** 允许的最大参与次数 */
13
+ limit: number;
14
+ /** 玩法开始时间 */
15
+ since: number;
16
+ /** 玩法结束时间 */
17
+ until: number;
18
+ /** 参与玩法维度账号类型 */
19
+ engage_account: EngageAccountType;
20
+ /** 玩法参与奖励 */
21
+ feature_rewards?: FeatureReward;
22
+ }
23
+ export declare const EventFeatureBaseConfigValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureBaseConfig, false, false>;
@@ -0,0 +1,18 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "cashback";
3
+ export interface FeatureCashbackConfig {
4
+ /** 计算充值总额的开始时间 */
5
+ order_start_time: number;
6
+ /** 计算充值总额的结束时间 */
7
+ order_end_time: number;
8
+ /** 可领取充值返还奖励的开始时间 */
9
+ claim_rewards_start_time: number;
10
+ /** 可领取充值返还奖励的结束时间 */
11
+ claim_rewards_end_time: number;
12
+ }
13
+ export type EventFeatureConfigOfCashback = EventFeatureBaseConfig & {
14
+ feature_type: typeof featureType;
15
+ config: FeatureCashbackConfig;
16
+ };
17
+ export declare const EventFeatureConfigOfCashbackValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfCashback, false, false>;
18
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "check_in";
3
+ export type EventFeatureConfigOfCheckIn = EventFeatureBaseConfig & {
4
+ feature_type: typeof featureType;
5
+ };
6
+ export declare const EventFeatureConfigOfCheckInValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfCheckIn, false, false>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "claim_rewards";
3
+ export type EventFeatureConfigOfClaimRewards = EventFeatureBaseConfig & {
4
+ feature_type: typeof featureType;
5
+ };
6
+ export declare const EventFeatureConfigOfClaimRewardsValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfClaimRewards, false, false>;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "comment";
3
+ export interface FeatureCommentConfig {
4
+ /** 活动配置的弹幕信息,用于快捷选择 */
5
+ comments: string[];
6
+ /** 发送频率限制,单位:秒 */
7
+ send_rate: number;
8
+ }
9
+ export type EventFeatureConfigOfComment = EventFeatureBaseConfig & {
10
+ feature_type: typeof featureType;
11
+ config: FeatureCommentConfig;
12
+ };
13
+ export declare const EventFeatureConfigOfCommentValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfComment, false, false>;
14
+ export {};
@@ -0,0 +1,38 @@
1
+ import { type EventFeatureConfigOfCashback } from "./feature.cashback";
2
+ import { type EventFeatureConfigOfCheckIn } from "./feature.checkIn";
3
+ import { type EventFeatureConfigOfClaimRewards } from "./feature.claimRewards";
4
+ import { type EventFeatureConfigOfComment } from "./feature.comment";
5
+ import { type EventFeatureConfigOfFollow } from "./feature.follow";
6
+ import { type EventFeatureConfigOfGiftCode } from "./feature.giftcode";
7
+ import { type EventFeatureConfigOfInvite } from "./feature.invite";
8
+ import { type EventFeatureConfigOfInvitedRegister } from "./feature.invitedRegister";
9
+ import { type EventFeatureConfigOfLottery } from "./feature.lottery";
10
+ import { type EventFeatureConfigOfLotteryDraw } from "./feature.lotteryDraw";
11
+ import { type EventFeatureConfigOfPreregister } from "./feature.preregister";
12
+ import { type EventFeatureConfigOfQuest } from "./feature.quest";
13
+ import { type EventFeatureConfigOfRegister } from "./feature.register";
14
+ import { type EventFeatureConfigOfShare } from "./feature.share";
15
+ import { type EventFeatureConfigOfSubscribe } from "./feature.subscribe";
16
+ import { type EventFeatureConfigOfSurvey } from "./feature.survey";
17
+ import { type EventFeatureConfigOfTeam } from "./feature.team";
18
+ import { type EventFeatureConfigOfVote } from "./feature.vote";
19
+ export * from "./feature.cashback";
20
+ export * from "./feature.checkIn";
21
+ export * from "./feature.claimRewards";
22
+ export * from "./feature.comment";
23
+ export * from "./feature.follow";
24
+ export * from "./feature.giftcode";
25
+ export * from "./feature.invite";
26
+ export * from "./feature.invitedRegister";
27
+ export * from "./feature.lottery";
28
+ export * from "./feature.lotteryDraw";
29
+ export * from "./feature.preregister";
30
+ export * from "./feature.quest";
31
+ export * from "./feature.register";
32
+ export * from "./feature.share";
33
+ export * from "./feature.subscribe";
34
+ export * from "./feature.survey";
35
+ export * from "./feature.team";
36
+ export * from "./feature.vote";
37
+ export type EventFeatureConfig = EventFeatureConfigOfCashback | EventFeatureConfigOfCheckIn | EventFeatureConfigOfClaimRewards | EventFeatureConfigOfComment | EventFeatureConfigOfFollow | EventFeatureConfigOfGiftCode | EventFeatureConfigOfInvite | EventFeatureConfigOfInvitedRegister | EventFeatureConfigOfLottery | EventFeatureConfigOfLotteryDraw | EventFeatureConfigOfPreregister | EventFeatureConfigOfQuest | EventFeatureConfigOfRegister | EventFeatureConfigOfShare | EventFeatureConfigOfSubscribe | EventFeatureConfigOfSurvey | EventFeatureConfigOfTeam | EventFeatureConfigOfVote;
38
+ 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>], false, false>;
@@ -0,0 +1,24 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "follow";
3
+ export interface FeatureFollowConfig {
4
+ /**
5
+ * 社交媒体平台的标识
6
+ *
7
+ * 比如 `bilibili`, `douyin`, `xiaohongshu`, `weibo`, `weixin_official_account`, `qq`
8
+ */
9
+ platform: string;
10
+ /** 社交媒体平台 icon */
11
+ platform_icon?: string;
12
+ /** 跳转链接 */
13
+ link?: string;
14
+ /** 二维码链接地址 */
15
+ qr_code_url?: string;
16
+ /** 社交媒体平台描述 */
17
+ platform_desc?: string;
18
+ }
19
+ export type EventFeatureConfigOfFollow = EventFeatureBaseConfig & {
20
+ feature_type: typeof featureType;
21
+ config: FeatureFollowConfig;
22
+ };
23
+ export declare const EventFeatureConfigOfFollowValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfFollow, false, false>;
24
+ export {};
@@ -0,0 +1,24 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "gift_code";
3
+ export interface EventGiftItemConfig {
4
+ /** 用于前端展示的游戏道具名称 */
5
+ name: string;
6
+ /** 用于前端展示的游戏道具图片地址 */
7
+ icon_url: string;
8
+ /** 用于前端展示的游戏道具数量 */
9
+ count: number;
10
+ }
11
+ export interface FeatureGiftCodeConfig {
12
+ /** 用于前端显示礼包码兑换后会获得的奖励内容 */
13
+ gift_items: EventGiftItemConfig[];
14
+ /** 社媒平台链接 */
15
+ mp_url?: string;
16
+ /** 社媒平台二维码 */
17
+ mp_qrcode_url?: string;
18
+ }
19
+ export type EventFeatureConfigOfGiftCode = EventFeatureBaseConfig & {
20
+ feature_type: typeof featureType;
21
+ config: FeatureGiftCodeConfig;
22
+ };
23
+ export declare const EventFeatureConfigOfGiftCodeValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfGiftCode, false, false>;
24
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "invite";
3
+ export interface FeatureInviteConfig {
4
+ /** 邀请玩法配置分享链接 */
5
+ share_url: string;
6
+ }
7
+ export type EventFeatureConfigOfInvite = EventFeatureBaseConfig & {
8
+ feature_type: typeof featureType;
9
+ config: FeatureInviteConfig;
10
+ };
11
+ export declare const EventFeatureConfigOfInviteValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfInvite, false, false>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "invited_register";
3
+ export type EventFeatureConfigOfInvitedRegister = EventFeatureBaseConfig & {
4
+ feature_type: typeof featureType;
5
+ };
6
+ export declare const EventFeatureConfigOfInvitedRegisterValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfInvitedRegister, false, false>;
7
+ export {};
@@ -0,0 +1,40 @@
1
+ import { type InferType } from "@seayoo-web/utils";
2
+ import { type EventFeatureBaseConfig } from "./feature.base";
3
+ declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"credit" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "void_item", false, false>;
4
+ declare const featureType: "lottery";
5
+ export interface FeatureLotteryItemConfig {
6
+ /** 抽奖奖励道具 id */
7
+ reward_item_id: number;
8
+ /** 抽奖奖励道具名称 */
9
+ reward_item_name: string;
10
+ /** 抽奖奖励道具类型 */
11
+ reward_item_type: InferType<typeof rewardItemTypeValidator>;
12
+ /** 抽奖奖励道具图片地址 */
13
+ reward_item_icon_url: string;
14
+ /** 抽奖奖励道具描述 */
15
+ reward_item_desc?: string;
16
+ /** 抽奖奖励道具数量 */
17
+ reward_amount: number;
18
+ /** 抽奖奖励道具库存 */
19
+ reward_remaining_stock: number;
20
+ }
21
+ export interface FeatureLotteryConfig {
22
+ /** 抽奖消耗道具 id */
23
+ consume_item_id: number;
24
+ /** 抽奖消耗道具名称 */
25
+ consume_item_name: number;
26
+ /** 抽奖消耗道具图片地址 */
27
+ consume_item_icon_url: string;
28
+ /** 抽奖消耗道具数量配置 */
29
+ consume_item_count: number;
30
+ /** 抽奖消耗道具描述 */
31
+ consume_item_desc?: string;
32
+ /** 抽奖配置奖励列表 */
33
+ rewards: FeatureLotteryItemConfig[];
34
+ }
35
+ export type EventFeatureConfigOfLottery = EventFeatureBaseConfig & {
36
+ feature_type: typeof featureType;
37
+ config: FeatureLotteryConfig;
38
+ };
39
+ export declare const EventFeatureConfigOfLotteryValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfLottery, false, false>;
40
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "lottery_draw";
3
+ export interface FeatureLotteryDrawConfig {
4
+ /** 可开奖起始时间 */
5
+ draw_not_before: number;
6
+ /** 可开奖结束时间 */
7
+ draw_not_after: number;
8
+ }
9
+ export type EventFeatureConfigOfLotteryDraw = EventFeatureBaseConfig & {
10
+ feature_type: typeof featureType;
11
+ config: FeatureLotteryDrawConfig;
12
+ };
13
+ export declare const EventFeatureConfigOfLotteryDrawValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfLotteryDraw, false, false>;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "preregister";
3
+ export type EventFeatureConfigOfPreregister = EventFeatureBaseConfig & {
4
+ feature_type: typeof featureType;
5
+ };
6
+ export declare const EventFeatureConfigOfPreregisterValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfPreregister, false, false>;
7
+ export {};
@@ -0,0 +1,22 @@
1
+ import { type QuestObjective } from "../event.enums";
2
+ import { type EventFeatureBaseConfig } from "./feature.base";
3
+ declare const featureType: "quest";
4
+ export interface FeatureQuestConfig {
5
+ /** 任务目标 */
6
+ objective: QuestObjective;
7
+ /** 目标值 */
8
+ completion_value: number;
9
+ /** 团队任务配置 */
10
+ team?: {
11
+ /** 组队任务 ID */
12
+ feature_id?: number;
13
+ /** 目标值 */
14
+ completion_value: number;
15
+ };
16
+ }
17
+ export type EventFeatureConfigOfQuest = EventFeatureBaseConfig & {
18
+ feature_type: typeof featureType;
19
+ config: FeatureQuestConfig;
20
+ };
21
+ export declare const EventFeatureConfigOfQuestValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfQuest, false, false>;
22
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "register";
3
+ export type EventFeatureConfigOfRegister = EventFeatureBaseConfig & {
4
+ feature_type: typeof featureType;
5
+ };
6
+ export declare const EventFeatureConfigOfRegisterValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfRegister, false, false>;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "share";
3
+ export interface FeatureShareConfig {
4
+ /** 分享玩法配置分享平台 */
5
+ share_platform: string;
6
+ /** 分享玩法配置跳转地址 */
7
+ jump_url?: string;
8
+ /** 分享玩法分享平台图标 */
9
+ icon_url?: string;
10
+ }
11
+ export type EventFeatureConfigOfShare = EventFeatureBaseConfig & {
12
+ feature_type: typeof featureType;
13
+ config: FeatureShareConfig;
14
+ };
15
+ export declare const EventFeatureConfigOfShareValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfShare, false, false>;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "weixin_subscribe";
3
+ export interface FeatureSubscribeConfig {
4
+ /** 一组微信订阅消息模版 ID */
5
+ weixin_template_ids: string[];
6
+ }
7
+ export type EventFeatureConfigOfSubscribe = EventFeatureBaseConfig & {
8
+ feature_type: typeof featureType;
9
+ config: FeatureSubscribeConfig;
10
+ };
11
+ export declare const EventFeatureConfigOfSubscribeValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfSubscribe, false, false>;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "survey";
3
+ export interface FeatureSurveyConfig {
4
+ /** 问卷 ID */
5
+ survey_id: string;
6
+ /** 问卷 url 地址 */
7
+ survey_url: string;
8
+ }
9
+ export type EventFeatureConfigOfSurvey = EventFeatureBaseConfig & {
10
+ feature_type: typeof featureType;
11
+ config: FeatureSurveyConfig;
12
+ };
13
+ export declare const EventFeatureConfigOfSurveyValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfSurvey, false, false>;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type EventFeatureBaseConfig } from "./feature.base";
2
+ declare const featureType: "team";
3
+ export interface FeatureTeamConfig {
4
+ /** 队伍最大成员数 */
5
+ max_members: number;
6
+ /** 队伍最小成员数 */
7
+ min_members: number;
8
+ }
9
+ export type EventFeatureConfigOfTeam = EventFeatureBaseConfig & {
10
+ feature_type: typeof featureType;
11
+ config: FeatureTeamConfig;
12
+ };
13
+ export declare const EventFeatureConfigOfTeamValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfTeam, false, false>;
14
+ export {};
@@ -0,0 +1,44 @@
1
+ import { type VoteOptionSource } from "../event.enums";
2
+ import { type EventFeatureBaseConfig } from "./feature.base";
3
+ import { type EventRewardItemConfig } from "./reward";
4
+ declare const featureType: "vote";
5
+ export interface FeatureVoteOption {
6
+ /** 选项标识 */
7
+ sn: string;
8
+ /** 选项名称 */
9
+ name: string;
10
+ /** 选项图片地址 */
11
+ img_urls?: string[];
12
+ /** 选项视频地址 */
13
+ video_urls?: string[];
14
+ /** 选项描述文本 */
15
+ descriptions?: string[];
16
+ /** 跳转地址 */
17
+ jump_url: string;
18
+ /** 选项投票数量 */
19
+ amount: number;
20
+ /** 选项是否入围 */
21
+ finalists: boolean;
22
+ /** 最后投票时间秒级时间戳 */
23
+ last_vote_time: number;
24
+ }
25
+ export interface FeatureVoteConfig {
26
+ /** 关联一个或多个投票玩法 ID */
27
+ vote_feature_ids: number[];
28
+ /** 关联一个或多个投稿玩法 ID */
29
+ submission_feature_ids: number[];
30
+ /** 入围数量 */
31
+ finalists_amount: number;
32
+ /** 选项来源 */
33
+ source: VoteOptionSource;
34
+ /** 投票选项配置 */
35
+ options: FeatureVoteOption[];
36
+ /** 投票入围后用户可获得的奖励 */
37
+ rewards: EventRewardItemConfig[];
38
+ }
39
+ export type EventFeatureConfigOfVote = EventFeatureBaseConfig & {
40
+ feature_type: typeof featureType;
41
+ config: FeatureVoteConfig;
42
+ };
43
+ export declare const EventFeatureConfigOfVoteValidator: import("@seayoo-web/utils").ObjectValidator<EventFeatureConfigOfVote, false, false>;
44
+ export {};
@@ -0,0 +1,23 @@
1
+ import { type EventFeatureConfig } from "./feature";
2
+ export * from "./feature";
3
+ export * from "./reward";
4
+ export interface EventConfig {
5
+ /** 活动名称 */
6
+ event_name: string;
7
+ /** 面向玩家的富文本活动规则 */
8
+ rules: string;
9
+ /** 活动开始时间 */
10
+ since: number;
11
+ /** 活动结束时间 */
12
+ until: number;
13
+ /** 活动访问人数 */
14
+ visit_count?: number;
15
+ /** 活动下玩法列表 */
16
+ features: EventFeatureConfig[];
17
+ }
18
+ export declare const EventConfigValidator: import("@seayoo-web/utils").ObjectValidator<EventConfig, false, false> & {
19
+ plain: never;
20
+ optional: never;
21
+ maybeNull: never;
22
+ lock: never;
23
+ };
@@ -0,0 +1,55 @@
1
+ import { type InferType } from "@seayoo-web/utils";
2
+ declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"credit" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "void_item", false, false>;
3
+ export interface EventRewardItemConfig {
4
+ /** 玩法奖励道具 id */
5
+ reward_item_id: number;
6
+ /** 玩法奖励道具数量 */
7
+ reward_amount: number;
8
+ /** 玩法奖励道具名称 */
9
+ reward_item_name: string;
10
+ /** 玩法奖励道具图片地址 */
11
+ reward_item_icon_url: string;
12
+ /** 玩法奖励道具描述 */
13
+ reward_item_desc?: string;
14
+ /** 玩法奖励道具类型 */
15
+ reward_item_type: InferType<typeof rewardItemTypeValidator>;
16
+ /** 奖励道具评级,用于前端展示 */
17
+ reward_item_rating: number;
18
+ }
19
+ export declare const EventRewardItemConfigValidator: import("@seayoo-web/utils").ObjectValidator<EventRewardItemConfig, false, false> & {
20
+ plain: never;
21
+ optional: never;
22
+ maybeNull: never;
23
+ lock: never;
24
+ };
25
+ export interface RegularReward {
26
+ engage_count: number;
27
+ rewards: EventRewardItemConfig[];
28
+ }
29
+ export declare const RegularRewardValidator: import("@seayoo-web/utils").ObjectValidator<RegularReward, false, false> & {
30
+ plain: never;
31
+ optional: never;
32
+ maybeNull: never;
33
+ lock: never;
34
+ };
35
+ export type FeatureReward = {
36
+ feature_reward_type: "every";
37
+ reward_details: EventRewardItemConfig[];
38
+ } | {
39
+ feature_reward_type: "regular";
40
+ reward_details: RegularReward[];
41
+ };
42
+ export declare const FeatureRewardValidator: import("@seayoo-web/utils").UnionValidator<[import("@seayoo-web/utils").ObjectValidator<{
43
+ feature_reward_type: "every";
44
+ reward_details: EventRewardItemConfig[];
45
+ }, false, false>, import("@seayoo-web/utils").ObjectValidator<{
46
+ feature_reward_type: "regular";
47
+ reward_details: RegularReward[];
48
+ }, false, false>], false, false> & {
49
+ optional: never;
50
+ maybeNull: never;
51
+ key: never;
52
+ satisfies: never;
53
+ lock: never;
54
+ };
55
+ export {};