@seayoo-web/gamer-api 2.13.9 → 2.13.10

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.13.9",
4
+ "version": "2.13.10",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,10 +30,10 @@
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
+ "@seayoo-web/combo-webview": "2.8.0",
33
34
  "@seayoo-web/scripts": "3.1.6",
34
- "@seayoo-web/request": "3.4.1",
35
+ "@seayoo-web/request": "3.4.2",
35
36
  "@seayoo-web/tsconfig": "1.0.5",
36
- "@seayoo-web/combo-webview": "2.8.0",
37
37
  "@seayoo-web/utils": "4.1.3",
38
38
  "@seayoo-web/validator": "2.0.0"
39
39
  },
@@ -118,6 +118,22 @@ export declare const PlayerRoleCardValidator: import("@seayoo-web/validator").Ob
118
118
  maybeNull: never;
119
119
  lock: never;
120
120
  };
121
+ export type SocialMedia = {
122
+ /** 抖音 */
123
+ douyin?: string;
124
+ /** 小红书 */
125
+ xiaohongshu?: string;
126
+ /** taptap */
127
+ taptap?: string;
128
+ /** bilibili */
129
+ bilibili?: string;
130
+ /** 微博 */
131
+ weibo?: string;
132
+ /** 虎牙 */
133
+ huya?: string;
134
+ /** 斗鱼 */
135
+ douyu?: string;
136
+ };
121
137
  export type ClubUserProfile = {
122
138
  /** 用户昵称 */
123
139
  name: string;
@@ -133,6 +149,8 @@ export type ClubUserProfile = {
133
149
  month: number;
134
150
  day: number;
135
151
  };
152
+ /** 社交媒体信息 */
153
+ social_medias?: SocialMedia;
136
154
  };
137
155
  export declare const ClubUserProfileValidator: import("@seayoo-web/validator").ObjectValidator<ClubUserProfile, false, false> & {
138
156
  desc: never;
@@ -1,6 +1,6 @@
1
1
  import type { EventFeatureBaseConfig } from "./feature.base";
2
2
  import type { InferType } from "@seayoo-web/validator";
3
- declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"activation_key" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "club_credit" | "external_gift_code" | "void_item", false, false>;
3
+ declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "club_credit" | "external_gift_code" | "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/validator";
2
- declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"activation_key" | "gift_code" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "lottery_ticket" | "club_credit" | "external_gift_code" | "void_item", false, false>;
2
+ declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "gift_code" | "activation_key" | "lottery_ticket" | "club_credit" | "external_gift_code" | "void_item", false, false>;
3
3
  export interface EventRewardItemConfig {
4
4
  /** 玩法奖励道具 id */
5
5
  reward_item_id: number;
@@ -69,6 +69,12 @@ export declare class AuthToken {
69
69
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=ReeJpWraRO
70
70
  */
71
71
  autoLogin(): Promise<boolean>;
72
+ /**
73
+ * 用于在多租户小程序环境中切换当前 Session 的 game_id。
74
+ *
75
+ * https://www.kdocs.cn/l/cf2mO2uRLqh9?linkname=ifQTBNrckh
76
+ */
77
+ switchGame(gameId: string): Promise<boolean>;
72
78
  /**
73
79
  * 获取当前登录用户的 Session 的信息
74
80
  *
@@ -2,4 +2,8 @@ import type { GamerSession } from "./token.define";
2
2
  export declare function isGamerTokenResponse(data: unknown): data is {
3
3
  gamer_token: string;
4
4
  };
5
+ export declare function isSwitchGameResponse(data: unknown): data is {
6
+ gamer_token: string;
7
+ game_id: string;
8
+ };
5
9
  export declare function isGetSessionResponse(data: unknown): data is GamerSession;
@@ -1,4 +1,4 @@
1
- export declare const console: Pick<Console, "log" | "error" | "warn">;
1
+ export declare const console: Pick<Console, "error" | "log" | "warn">;
2
2
  /** 检测是否在 combo webview */
3
3
  export declare function inComboWebview(): boolean;
4
4
  export declare function isRootEndpoint(path: string): boolean;