@seayoo-web/gamer-api 2.13.9 → 2.13.11

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.11",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,17 +30,17 @@
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
- "@seayoo-web/scripts": "3.1.6",
34
- "@seayoo-web/request": "3.4.1",
35
- "@seayoo-web/tsconfig": "1.0.5",
36
33
  "@seayoo-web/combo-webview": "2.8.0",
34
+ "@seayoo-web/tsconfig": "1.0.5",
35
+ "@seayoo-web/request": "3.4.2",
37
36
  "@seayoo-web/utils": "4.1.3",
38
- "@seayoo-web/validator": "2.0.0"
37
+ "@seayoo-web/validator": "2.0.0",
38
+ "@seayoo-web/scripts": "3.1.6"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "^2.8.0",
42
- "@seayoo-web/utils": "^4.1.3",
43
- "@seayoo-web/validator": "^2.0.0"
42
+ "@seayoo-web/validator": "^2.0.0",
43
+ "@seayoo-web/utils": "^4.1.3"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
@@ -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;
@@ -343,7 +343,13 @@ export declare class EventApi {
343
343
  *
344
344
  * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=biEwrNKhAF
345
345
  */
346
- getUgcRecord(featureId: number, option: {
346
+ getUgcRecord(option: {
347
+ /** 按照多个活动 ID 批量查询投稿记录。若传入此参数,不再进行单活动/玩法的精确匹配*/
348
+ event_ids?: number[];
349
+ /** 单个活动 ID */
350
+ event_id?: number;
351
+ /** 活动玩法 ID */
352
+ feature_id?: number;
347
353
  /** 查询返回最大参与记录数 默认20*/
348
354
  max_results?: number;
349
355
  /** 分页标识,不传默认首页查询 */
@@ -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;