@seayoo-web/gamer-api 3.0.4 → 4.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.
@@ -1,6 +1,6 @@
1
1
  import type { AuthToken } from "./token";
2
2
  import type { WeixinWebLoginErrorCode } from "./weixin.define";
3
- import type { IRequestOptions, RequestInternalError } from "@seayoo-web/request";
3
+ import type { RequestOptions, RequestInternalError } from "@seayoo-web/request";
4
4
  export declare class WeixinApi {
5
5
  private token;
6
6
  private _appid;
@@ -45,7 +45,7 @@ export declare class WeixinApi {
45
45
  *
46
46
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
47
47
  */
48
- login(requestOptions?: IRequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
48
+ login(requestOptions?: RequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
49
49
  message: string;
50
50
  error: RequestInternalError | "invalid_weixin_appid" | "invalid_weixin_code";
51
51
  }>;
@@ -65,7 +65,7 @@ export declare class WeixinApi {
65
65
  * - snsapi_base 不弹出授权页面,用户无感知,只能获取用户 openid,如果需要获取 union_id 则需要 snsapi_userinfo
66
66
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
67
67
  */
68
- webLogin(scope?: "snsapi_base" | "snsapi_userinfo", requestOptions?: IRequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
68
+ webLogin(scope?: "snsapi_base" | "snsapi_userinfo", requestOptions?: RequestOptions): Promise<import("./weixin.define").WeixinLoginResponse | {
69
69
  message: string;
70
70
  error: WeixinWebLoginErrorCode;
71
71
  } | {
@@ -84,13 +84,13 @@ export declare class WeixinApi {
84
84
  * @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
85
85
  * @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
86
86
  */
87
- linkPlayer(weixinToken: string, gameCode: string, requestOptions?: IRequestOptions): Promise<boolean>;
87
+ linkPlayer(weixinToken: string, gameCode: string, requestOptions?: RequestOptions): Promise<boolean>;
88
88
  /**
89
89
  * 获取集成 JSSDK 所需的签名信息
90
90
  *
91
91
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
92
92
  */
93
- getJSSDKConfig(requestOptions?: IRequestOptions): Promise<{
93
+ getJSSDKConfig(requestOptions?: RequestOptions): Promise<{
94
94
  appid: string;
95
95
  nonceStr: string;
96
96
  timestamp: number;