@seayoo-web/gamer-api 2.0.6 → 2.0.8

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.0.6",
4
+ "version": "2.0.8",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  import { type InferType } from "@seayoo-web/utils";
2
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>;
3
+ declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "credit" | "void_item", false, false>;
4
4
  declare const featureType: "lottery";
5
5
  export interface FeatureLotteryItemConfig {
6
6
  /** 抽奖奖励道具 id */
@@ -1,5 +1,5 @@
1
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>;
2
+ declare const rewardItemTypeValidator: import("@seayoo-web/utils").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "credit" | "void_item", false, false>;
3
3
  export interface EventRewardItemConfig {
4
4
  /** 玩法奖励道具 id */
5
5
  reward_item_id: number;
@@ -218,6 +218,12 @@ export declare const RewardStatusValidator: import("@seayoo-web/utils").StringVa
218
218
  * 已获得奖励的奖励状态,不含有未领取状态
219
219
  */
220
220
  export declare const RewardStatusSuffix: {
221
+ /**
222
+ * 奖励未领取,拼写错误以兼容后端历史版本,检查请使用 Unclaimed
223
+ *
224
+ * @deprecated
225
+ */
226
+ readonly UnclaimedErr: "unaccalimed";
221
227
  /** 奖励未领取 */
222
228
  readonly Unclaimed: "unclaimed";
223
229
  /** 奖励已领取 */
@@ -1,5 +1,5 @@
1
+ import { type WeixinWebLoginErrorCode } from "./weixin.define";
1
2
  import type { AuthToken } from "./token";
2
- import type { WeixinWebLoginErrorCode } from "./weixin.define";
3
3
  import type { RequestInternalError } from "@seayoo-web/request";
4
4
  export * from "./weixin.define";
5
5
  export declare class WeixinApi {
@@ -82,4 +82,14 @@ export declare class WeixinApi {
82
82
  * @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
83
83
  */
84
84
  linkPlayer(weixinToken: string, gameCode: string): Promise<void>;
85
+ /**
86
+ * 获取集成 JSSDK 所需的签名信息
87
+ *
88
+ * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
89
+ */
90
+ getJSSDKConfig(): Promise<{
91
+ nonce_str: string;
92
+ timestamp: number;
93
+ signature: string;
94
+ } | null>;
85
95
  }
@@ -10,6 +10,11 @@ export interface WeixinLoginResponse {
10
10
  */
11
11
  weixin_token: string;
12
12
  }
13
+ export declare const isWeixinSignResponse: (data: unknown) => data is {
14
+ nonce_str: string;
15
+ timestamp: number;
16
+ signature: string;
17
+ };
13
18
  /**
14
19
  * 微信web登录错误码
15
20
  *