@seayoo-web/gamer-api 2.0.13 → 2.0.14

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
@@ -1188,7 +1188,7 @@ class xr {
1188
1188
  l(this, "token");
1189
1189
  l(this, "event", 0);
1190
1190
  l(this, "req");
1191
- this.token = t, this.event = n, this.req = t.req;
1191
+ this.token = t, this.event = +n, this.req = t.req;
1192
1192
  }
1193
1193
  /**
1194
1194
  * 根据手机号白名单,检查手机号是否允许登录某个游戏
@@ -1358,7 +1358,7 @@ class xr {
1358
1358
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=qj12eIgYQG
1359
1359
  */
1360
1360
  async getUserRewards(t) {
1361
- if (!await this.token.autoLogin()) return [];
1361
+ if (!await this.token.autoLogin()) return { user_rewards: [], next_token: "" };
1362
1362
  const { data: n } = await this.req.post(
1363
1363
  "event/user-rewards",
1364
1364
  a({ max_results: 20, ...t, event_id: this.event }),
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.0.13",
4
+ "version": "2.0.14",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -25,13 +25,14 @@
25
25
  "vitest": "^3.0.5",
26
26
  "@seayoo-web/combo-webview": "^2.5.3",
27
27
  "@seayoo-web/request": "^3.0.3",
28
- "@seayoo-web/tsconfig": "^1.0.3",
29
28
  "@seayoo-web/utils": "^3.4.4",
30
- "@seayoo-web/scripts": "^2.0.2"
29
+ "@seayoo-web/scripts": "^2.0.3",
30
+ "@seayoo-web/tsconfig": "^1.0.3"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@seayoo-web/combo-webview": "^2.5.3",
34
- "@seayoo-web/utils": "^3.4.4"
34
+ "@seayoo-web/utils": "^3.4.4",
35
+ "@seayoo-web/request": "^3.0.3"
35
36
  },
36
37
  "scripts": {
37
38
  "prebuild": "pnpm -F request build && pnpm -F combo-webview build",
@@ -9,7 +9,7 @@ export declare class EventApi {
9
9
  private token;
10
10
  private event;
11
11
  private req;
12
- constructor(authToken: AuthToken, eventId: number);
12
+ constructor(authToken: AuthToken, eventId: number | string);
13
13
  /**
14
14
  * 根据手机号白名单,检查手机号是否允许登录某个游戏
15
15
  *
@@ -164,7 +164,7 @@ export declare class EventApi {
164
164
  /** 单次查询的数量,默认 20 */
165
165
  max_results?: number;
166
166
  next_token?: string;
167
- }): Promise<never[] | {
167
+ }): Promise<{
168
168
  user_rewards: import("./event.engage").UserReward[];
169
169
  next_token: string;
170
170
  }>;