@seayoo-web/gamer-api 1.1.9 → 1.1.11

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 CHANGED
@@ -1671,5 +1671,6 @@ export {
1671
1671
  Pe as TeamVisibility,
1672
1672
  xe as VoteOptionSource,
1673
1673
  sr as WeixinApi,
1674
- Xt as WeixinWebLoginErrorCode
1674
+ Xt as WeixinWebLoginErrorCode,
1675
+ Ge as isEventConfig
1675
1676
  };
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": "1.1.9",
4
+ "version": "1.1.11",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -22,21 +22,21 @@
22
22
  "license": "MIT",
23
23
  "devDependencies": {
24
24
  "@types/node": "^22.13.1",
25
- "@seayoo-web/scripts": "^1.3.15",
26
25
  "@seayoo-web/combo-webview": "^2.5.0",
27
26
  "@seayoo-web/request": "^2.1.2",
28
- "@seayoo-web/utils": "^3.1.1",
29
- "@seayoo-web/tsconfig": "^1.0.3"
27
+ "@seayoo-web/scripts": "^1.3.15",
28
+ "@seayoo-web/tsconfig": "^1.0.3",
29
+ "@seayoo-web/utils": "^3.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@seayoo-web/combo-webview": "^2.5.0",
33
- "@seayoo-web/utils": "^3.1.1"
33
+ "@seayoo-web/utils": "^3.2.0"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "vite build && tsc --emitDeclarationOnly",
37
37
  "type-check": "tsc --noEmit",
38
38
  "lint": "eslint ./src/**/*.ts",
39
- "lint:fix": "eslint ./src/**/*.{ts,js} --fix",
39
+ "lint:fix": "eslint \"./src/**/*.{ts,js}\" --fix",
40
40
  "prepublish": "pnpm lint:fix && pnpm build"
41
41
  }
42
42
  }
@@ -153,7 +153,7 @@ export interface ReplyTo {
153
153
  /** 回复者的头像 */
154
154
  avatar_url: string;
155
155
  }
156
- interface NotificationBase {
156
+ export interface NotificationBase {
157
157
  /** 通知的 ID */
158
158
  notification_id: string;
159
159
  /** 通知类型 */
@@ -169,13 +169,13 @@ interface NotificationBase {
169
169
  /** 触发通知的用户头像 */
170
170
  origin_user_avatar_url: string;
171
171
  }
172
- interface NotificationPaylodSystem {
172
+ export interface NotificationPaylodSystem {
173
173
  /** 系统通知的标题 */
174
174
  system_message_subject: string;
175
175
  /** 系统通知的内容 */
176
176
  system_message_content: string;
177
177
  }
178
- interface NotificationPaylodPost {
178
+ export interface NotificationPaylodPost {
179
179
  /** 帖子 ID */
180
180
  post_id: number;
181
181
  /** 帖子标题 */
@@ -185,19 +185,19 @@ interface NotificationPaylodPost {
185
185
  /** 帖子的首张图片地址 */
186
186
  post_image_url: string;
187
187
  }
188
- interface NotificationPaylodComment {
188
+ export interface NotificationPaylodComment {
189
189
  /** 评论 ID */
190
190
  comment_id: number;
191
191
  /** 评论内容 */
192
192
  comment_content: string;
193
193
  }
194
- interface NotificationPaylodReply {
194
+ export interface NotificationPaylodReply {
195
195
  /** 回复 ID */
196
196
  reply_id: number;
197
197
  /** 回复内容 */
198
198
  reply_content: string;
199
199
  }
200
- interface NotificationPaylodReplyToReply {
200
+ export interface NotificationPaylodReplyToReply {
201
201
  /** 回复的回复 ID */
202
202
  reply_to_reply_id: number;
203
203
  /** 回复的回复内容 */
@@ -228,4 +228,3 @@ export interface NotificationReply extends NotificationBase, NotificationPaylodR
228
228
  }
229
229
  /** 社区通知 */
230
230
  export type Notification = NotificationSystem | NotificationPost | NotificationPostComment | NotificationCommentReply | NotificationComment | NotificationReplyReplied | NotificationReply;
231
- export {};
@@ -14,8 +14,8 @@ export interface EventConfig {
14
14
  features: EventFeatureConfig[];
15
15
  }
16
16
  export declare function isEventConfig(data: unknown): data is EventConfig;
17
- type EventFeatureConfig = EventFeatureBaseConfig<FeatureType.Preregister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Lottery, FeatureLotteryConfig> | EventFeatureBaseConfig<FeatureType.Survey, FeatureSurveyConfig> | EventFeatureBaseConfig<FeatureType.Invite, FeatureInviteConfig> | EventFeatureBaseConfig<FeatureType.Share, FeatureShareConfig> | EventFeatureBaseConfig<FeatureType.Follow, FeatureFollowConfig> | EventFeatureBaseConfig<FeatureType.Subscribe, FeatureSubscribeConfig> | EventFeatureBaseConfig<FeatureType.Comment, FeatureCommentConfig> | EventFeatureBaseConfig<FeatureType.Vote, FeatureVoteConfig> | EventFeatureBaseConfig<FeatureType.Cashback, FeatureCashbackConfig> | EventFeatureBaseConfig<FeatureType.GiftCode, FeatureGiftCodeConfig> | EventFeatureBaseConfig<FeatureType.Register, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.InvitedRegister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.ClaimRewards, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Quest, FeatureQuestConfig> | EventFeatureBaseConfig<FeatureType.Team, FeatureTeamConfig> | EventFeatureBaseConfig<FeatureType.LotteryDraw, FeatureLotteryDrawConfig>;
18
- interface EventRewardItemConfig {
17
+ export type EventFeatureConfig = EventFeatureBaseConfig<FeatureType.Preregister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Lottery, FeatureLotteryConfig> | EventFeatureBaseConfig<FeatureType.Survey, FeatureSurveyConfig> | EventFeatureBaseConfig<FeatureType.Invite, FeatureInviteConfig> | EventFeatureBaseConfig<FeatureType.Share, FeatureShareConfig> | EventFeatureBaseConfig<FeatureType.Follow, FeatureFollowConfig> | EventFeatureBaseConfig<FeatureType.Subscribe, FeatureSubscribeConfig> | EventFeatureBaseConfig<FeatureType.Comment, FeatureCommentConfig> | EventFeatureBaseConfig<FeatureType.Vote, FeatureVoteConfig> | EventFeatureBaseConfig<FeatureType.Cashback, FeatureCashbackConfig> | EventFeatureBaseConfig<FeatureType.GiftCode, FeatureGiftCodeConfig> | EventFeatureBaseConfig<FeatureType.Register, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.InvitedRegister, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.ClaimRewards, NoopFeatureConfig> | EventFeatureBaseConfig<FeatureType.Quest, FeatureQuestConfig> | EventFeatureBaseConfig<FeatureType.Team, FeatureTeamConfig> | EventFeatureBaseConfig<FeatureType.LotteryDraw, FeatureLotteryDrawConfig>;
18
+ export interface EventRewardItemConfig {
19
19
  /** 玩法奖励道具 id */
20
20
  reward_item_id: number;
21
21
  /** 玩法奖励道具数量 */
@@ -31,7 +31,7 @@ interface EventRewardItemConfig {
31
31
  /** 奖励道具评级,用于前端展示 */
32
32
  reward_item_rating: number;
33
33
  }
34
- type FeatureReward = {
34
+ export type FeatureReward = {
35
35
  feature_reward_type: "every";
36
36
  reward_details: EventRewardItemConfig[];
37
37
  } | {
@@ -42,7 +42,7 @@ type FeatureReward = {
42
42
  }[];
43
43
  };
44
44
  export type NoopFeatureConfig = {} | null;
45
- interface EventFeatureBaseConfig<T extends FeatureType = FeatureType, C extends object | null = object> {
45
+ export interface EventFeatureBaseConfig<T extends FeatureType = FeatureType, C extends object | null = object> {
46
46
  /** 玩法名称 */
47
47
  feature_name: string;
48
48
  /** 玩法 Id */
@@ -66,7 +66,7 @@ interface EventFeatureBaseConfig<T extends FeatureType = FeatureType, C extends
66
66
  /** 玩法参与奖励 */
67
67
  feature_rewards?: FeatureReward;
68
68
  }
69
- interface FeatureLotteryItemConfig {
69
+ export interface FeatureLotteryItemConfig {
70
70
  /** 抽奖奖励道具 id */
71
71
  reward_item_id: number;
72
72
  /** 抽奖奖励道具名称 */
@@ -82,7 +82,7 @@ interface FeatureLotteryItemConfig {
82
82
  /** 抽奖奖励道具库存 */
83
83
  reward_remaining_stock: number;
84
84
  }
85
- interface FeatureLotteryConfig {
85
+ export interface FeatureLotteryConfig {
86
86
  /** 抽奖消耗道具 id */
87
87
  consume_item_id: number;
88
88
  /** 抽奖消耗道具名称 */
@@ -96,17 +96,17 @@ interface FeatureLotteryConfig {
96
96
  /** 抽奖配置奖励列表 */
97
97
  rewards: FeatureLotteryItemConfig[];
98
98
  }
99
- interface FeatureSurveyConfig {
99
+ export interface FeatureSurveyConfig {
100
100
  /** 问卷 ID */
101
101
  survey_id: string;
102
102
  /** 问卷 url 地址 */
103
103
  survey_url: string;
104
104
  }
105
- interface FeatureInviteConfig {
105
+ export interface FeatureInviteConfig {
106
106
  /** 邀请玩法配置分享链接 */
107
107
  share_url: string;
108
108
  }
109
- interface FeatureShareConfig {
109
+ export interface FeatureShareConfig {
110
110
  /** 分享玩法配置分享平台 */
111
111
  share_platform: string;
112
112
  /** 分享玩法配置跳转地址 */
@@ -114,7 +114,7 @@ interface FeatureShareConfig {
114
114
  /** 分享玩法分享平台图标 */
115
115
  icon_url?: string;
116
116
  }
117
- interface FeatureFollowConfig {
117
+ export interface FeatureFollowConfig {
118
118
  /**
119
119
  * 社交媒体平台的标识
120
120
  *
@@ -130,17 +130,17 @@ interface FeatureFollowConfig {
130
130
  /** 社交媒体平台描述 */
131
131
  platform_desc?: string;
132
132
  }
133
- interface FeatureSubscribeConfig {
133
+ export interface FeatureSubscribeConfig {
134
134
  /** 一组微信订阅消息模版 ID */
135
135
  weixin_template_ids: string[];
136
136
  }
137
- interface FeatureCommentConfig {
137
+ export interface FeatureCommentConfig {
138
138
  /** 活动配置的弹幕信息,用于快捷选择 */
139
139
  comments: string[];
140
140
  /** 发送频率限制,单位:秒 */
141
141
  send_rate: number;
142
142
  }
143
- interface FeatureVoteConfig {
143
+ export interface FeatureVoteConfig {
144
144
  /** 关联一个或多个投票玩法 ID */
145
145
  vote_feature_ids: number[];
146
146
  /** 关联一个或多个投稿玩法 ID */
@@ -154,7 +154,7 @@ interface FeatureVoteConfig {
154
154
  /** 投票入围后用户可获得的奖励 */
155
155
  rewards: EventRewardItemConfig[];
156
156
  }
157
- interface FeatureVoteOption {
157
+ export interface FeatureVoteOption {
158
158
  /** 选项标识 */
159
159
  sn: string;
160
160
  /** 选项名称 */
@@ -174,7 +174,7 @@ interface FeatureVoteOption {
174
174
  /** 最后投票时间秒级时间戳 */
175
175
  last_vote_time: number;
176
176
  }
177
- interface FeatureCashbackConfig {
177
+ export interface FeatureCashbackConfig {
178
178
  /** 计算充值总额的开始时间 */
179
179
  order_start_time: number;
180
180
  /** 计算充值总额的结束时间 */
@@ -184,7 +184,7 @@ interface FeatureCashbackConfig {
184
184
  /** 可领取充值返还奖励的结束时间 */
185
185
  claim_rewards_end_time: number;
186
186
  }
187
- interface FeatureGiftCodeConfig {
187
+ export interface FeatureGiftCodeConfig {
188
188
  /** 用于前端显示礼包码兑换后会获得的奖励内容 */
189
189
  gift_items: EventGiftItemConfig[];
190
190
  /** 社媒平台链接 */
@@ -192,7 +192,7 @@ interface FeatureGiftCodeConfig {
192
192
  /** 社媒平台二维码 */
193
193
  mp_qrcode_url?: string;
194
194
  }
195
- interface EventGiftItemConfig {
195
+ export interface EventGiftItemConfig {
196
196
  /** 用于前端展示的游戏道具名称 */
197
197
  name: string;
198
198
  /** 用于前端展示的游戏道具图片地址 */
@@ -200,7 +200,7 @@ interface EventGiftItemConfig {
200
200
  /** 用于前端展示的游戏道具数量 */
201
201
  count: number;
202
202
  }
203
- interface FeatureQuestConfig {
203
+ export interface FeatureQuestConfig {
204
204
  /** 任务目标 */
205
205
  objective: QuestObjective;
206
206
  /** 目标值 */
@@ -213,16 +213,15 @@ interface FeatureQuestConfig {
213
213
  completion_value: number;
214
214
  };
215
215
  }
216
- interface FeatureTeamConfig {
216
+ export interface FeatureTeamConfig {
217
217
  /** 队伍最大成员数 */
218
218
  max_members: number;
219
219
  /** 队伍最小成员数 */
220
220
  min_members: number;
221
221
  }
222
- interface FeatureLotteryDrawConfig {
222
+ export interface FeatureLotteryDrawConfig {
223
223
  /** 可开奖起始时间 */
224
224
  draw_not_before: number;
225
225
  /** 可开奖结束时间 */
226
226
  draw_not_after: number;
227
227
  }
228
- export {};
@@ -2,7 +2,7 @@ import type { EngagementInfo } from "./event.define";
2
2
  import type { GamerItemType, RewardSoure } from "./event.enums";
3
3
  import type { AuthToken } from "./token";
4
4
  import type { RequestInteralError } from "@seayoo-web/request";
5
- export type { EventConfig } from "./event.config";
5
+ export * from "./event.config";
6
6
  export * from "./event.define";
7
7
  export * from "./event.enums";
8
8
  /** EventApi */
@@ -1,4 +1,4 @@
1
- export declare const console: Pick<Console, "error" | "log" | "warn">;
1
+ export declare const console: Pick<Console, "log" | "error" | "warn">;
2
2
  /** 检测是否在 combo webview */
3
3
  export declare function inComboWebview(): boolean;
4
4
  export declare function isRootEndpoint(path: string): boolean;