@seayoo-web/gamer-api 2.4.3 → 2.4.4

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/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.3",
4
+ "version": "2.4.4",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,11 +30,11 @@
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
+ "@seayoo-web/tsconfig": "^1.0.4",
33
34
  "@seayoo-web/combo-webview": "^2.5.4",
34
35
  "@seayoo-web/request": "^3.2.0",
35
36
  "@seayoo-web/scripts": "^2.5.7",
36
- "@seayoo-web/utils": "^3.6.0",
37
- "@seayoo-web/tsconfig": "^1.0.4"
37
+ "@seayoo-web/utils": "^3.6.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@seayoo-web/combo-webview": "^2.5.4",
@@ -135,7 +135,7 @@ export declare class EventApi {
135
135
  /** 产生奖励的来源 */
136
136
  reward_source: RewardSource;
137
137
  /** 游戏服务器 ID,领取游戏道具时为必填 */
138
- server_id?: number;
138
+ server_id?: string | number;
139
139
  /** 游戏角色 ID,领取游戏道具时为必填 */
140
140
  role_id?: string;
141
141
  /** 游戏角色名 */
@@ -47,6 +47,7 @@ export declare class WeixinApi {
47
47
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
48
48
  */
49
49
  login(requestOptions?: IRequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
50
+ message: string;
50
51
  error: RequestInternalError | "invalid_weixin_appid" | "invalid_weixin_code";
51
52
  }>;
52
53
  /**
@@ -66,8 +67,10 @@ export declare class WeixinApi {
66
67
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
67
68
  */
68
69
  webLogin(scope?: "snsapi_base" | "snsapi_userinfo", requestOptions?: IRequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
70
+ message: string;
69
71
  error: WeixinWebLoginErrorCode;
70
72
  } | {
73
+ message: string;
71
74
  error: RequestInternalError | "invalid_weixin_appid" | "invalid_weixin_code";
72
75
  } | undefined>;
73
76
  /**
@@ -82,7 +85,7 @@ export declare class WeixinApi {
82
85
  * @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
83
86
  * @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
84
87
  */
85
- linkPlayer(weixinToken: string, gameCode: string, requestOptions?: IRequestOptions): Promise<void>;
88
+ linkPlayer(weixinToken: string, gameCode: string, requestOptions?: IRequestOptions): Promise<boolean>;
86
89
  /**
87
90
  * 获取集成 JSSDK 所需的签名信息
88
91
  *