@seayoo-web/gamer-api 2.16.2 → 3.0.0-alpha.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.
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.16.2",
4
+ "version": "3.0.0-alpha.1",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,16 +30,16 @@
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
- "@seayoo-web/tsconfig": "1.0.5",
34
- "@seayoo-web/combo-webview": "2.8.0",
33
+ "@seayoo-web/scripts": "3.1.9",
35
34
  "@seayoo-web/request": "3.4.3",
36
- "@seayoo-web/scripts": "3.1.8",
37
- "@seayoo-web/utils": "4.3.0",
35
+ "@seayoo-web/combo-webview": "2.8.0",
36
+ "@seayoo-web/tsconfig": "1.0.6",
37
+ "@seayoo-web/utils": "4.4.0",
38
38
  "@seayoo-web/validator": "2.3.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "^2.8.0",
42
- "@seayoo-web/utils": "^4.3.0",
42
+ "@seayoo-web/utils": "^4.4.0",
43
43
  "@seayoo-web/validator": "^2.3.0"
44
44
  },
45
45
  "scripts": {
package/types/index.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  export * from "./src/token";
2
+ export * from "./src/token.define";
2
3
  export * from "./src/club";
4
+ export * from "./src/club.define";
5
+ export * from "./src/club.enums";
3
6
  export * from "./src/event";
7
+ export * from "./src/event.methods";
8
+ export * from "./src/event.define";
9
+ export * from "./src/event.enums";
4
10
  export * from "./src/community";
11
+ export * from "./src/community.define";
12
+ export * from "./src/community.enums";
5
13
  export * from "./src/weixin";
14
+ export * from "./src/weixin.define";
@@ -4,8 +4,6 @@ import type { UgcSocialMedia } from "./event.enums";
4
4
  import type { AuthToken } from "./token";
5
5
  import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
6
6
  import type { SomePartial } from "@seayoo-web/utils";
7
- export * from "./club.enums";
8
- export * from "./club.define";
9
7
  export declare class ClubApi {
10
8
  private token;
11
9
  private req;
@@ -1,8 +1,6 @@
1
1
  import type { NotificationCategory } from "./community.enums";
2
2
  import type { AuthToken } from "./token";
3
3
  import type { IRequestOptions, RequestInternalError } from "@seayoo-web/request";
4
- export * from "./community.enums";
5
- export * from "./community.define";
6
4
  export declare class CommunityApi {
7
5
  private token;
8
6
  private req;
@@ -1,4 +1,4 @@
1
- import type { EventRewardItemConfig } from "../event";
1
+ import type { EventRewardItemConfig } from "../event.define";
2
2
  import type { EventFeatureBaseConfig } from "./feature.base";
3
3
  declare const featureType: "vote2";
4
4
  export interface FeatureVoteCandidate {
@@ -1,458 +1,18 @@
1
- import type { EngagementFeatureType, InferEngagementError, InferEngagementParam } from "./event.define";
2
- import type { GamerItemType, RewardSource, RewardStatus, UgcReviewStatus } from "./event.enums";
3
1
  import type { AuthToken } from "./token";
4
- import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
5
- export * from "./event.define";
6
- export * from "./event.enums";
2
+ import type { NetRequestHandler } from "@seayoo-web/request";
3
+ type ApiMethod = (this: EventApi, ...args: any[]) => any;
7
4
  /** EventApi */
8
5
  export declare class EventApi {
9
- private token;
10
- private event;
11
- private req;
6
+ token: AuthToken;
7
+ req: NetRequestHandler;
8
+ private $event;
9
+ get event(): number;
12
10
  constructor(authToken: AuthToken, eventId: number | string);
13
11
  /**
14
- * 根据手机号白名单,检查手机号是否允许登录某个游戏
15
- *
16
- * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
12
+ * 绑定指定的方法到当前实例上
17
13
  */
18
- verifyMobileAllowed(gameId: string, mobile: string, requestOptions?: IRequestOptions): Promise<import("./event.define").VerifyMobileResult | null>;
19
- /**
20
- * 获取运营活动的基础配置信息
21
- *
22
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
23
- */
24
- getConfig(requestOptions?: IRequestOptions): Promise<import("./event.config").EventConfig | null>;
25
- /**
26
- * 获取某个玩法参与用户数量
27
- *
28
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
29
- */
30
- getEngagementsUserCount(featureId: number, requestOptions?: IRequestOptions): Promise<number | null>;
31
- /**
32
- * 获取某个玩法参与次数
33
- *
34
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
35
- */
36
- getEngagementsCount(featureId: number, requestOptions?: IRequestOptions): Promise<number | null>;
37
- /**
38
- * 获取某个玩法的参与记录(和特定用户无关)
39
- *
40
- * 💡目前仅支持 Comment / Team 两个玩法的参与数据
41
- *
42
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
43
- */
44
- getEngagements(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").CommentEngagement[] | import("./event.engage").TeamEngagement[]>;
45
- /**
46
- * 用户访问某个活动或玩法
47
- *
48
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=DWtJrnrBCn
49
- */
50
- visit(option?: {
51
- feature_id?: number;
52
- server_id?: string;
53
- role_id?: string;
54
- utm_source?: string;
55
- /** 邀请人的世游通行证 ID */
56
- invited_by?: string;
57
- }, requestOptions?: IRequestOptions): Promise<{
58
- first_visit: boolean;
59
- } | {
60
- message: string;
61
- error: RequestInternalError | "event_not_found" | "feature_not_found" | "invalid_server_id" | "invalid_role_id";
62
- }>;
63
- /**
64
- * 获取用户在目标活动下的所有玩法的参与状态,用于前端进一步确定如何执行交互逻辑
65
- *
66
- * 💡活动下包含 engage_account_type 为 role_id 的玩法时,需要提供 server_id 和 role_id
67
- *
68
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
69
- */
70
- getUserFeatureStatus(option?: {
71
- server_id: string;
72
- role_id: string;
73
- }, requestOptions?: IRequestOptions): Promise<import("./event.define").UserFeatureStatus[]>;
74
- /**
75
- * 获取用户在目标活动下的某个玩法的参与次数
76
- *
77
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=uYCsjWyL36
78
- */
79
- getUserEngagementCount(featureId: number, option?: {
80
- server_id: string;
81
- role_id: string;
82
- }): Promise<Record<string, number>>;
83
- /**
84
- * 获取当前登录用户参与某个玩法的记录
85
- *
86
- * 💡当玩法的 engage_account_type 为 role_id 时,可提供 server_id 和 role_id 获取具体角色的参与记录
87
- *
88
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=NFDdV1dwWb
89
- */
90
- getUserEngagements(featureId: number, option?: {
91
- /** 单页返回的最大数量,默认 20 */
92
- max_results?: number;
93
- next_token?: string;
94
- /**
95
- * 是否返回参与奖记录,默认 false
96
- */
97
- return_rewards?: boolean;
98
- /**
99
- * 当玩法的 engage_account_type 为 role_id 时,可提供 server_id 和 role_id 获取具体角色的参与记录
100
- */
101
- server_id?: string;
102
- /**
103
- * 当玩法的 engage_account_type 为 role_id 时,可提供 server_id 和 role_id 获取具体角色的参与记录
104
- */
105
- role_id?: string;
106
- }, requestOptions?: IRequestOptions): Promise<{
107
- engagements: import("./event.engage").UserEngagement[];
108
- next_token: string;
109
- }>;
110
- /**
111
- * 用户参与某个玩法
112
- *
113
- * 💡可以设置泛型参数来快速确定 engagementParam 数据类型和返回值
114
- *
115
- * 💡需要先调用 `visit` 接口提交访问信息
116
- *
117
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vuOyrcry3S
118
- */
119
- engage<T extends EngagementFeatureType = unknown>(featureId: number, engagementParam: InferEngagementParam<T>, option?: {
120
- /**
121
- * 联的游戏账号 ID,如果传该参数后端需验证 player_id 是否从属于当前用户。
122
- *
123
- * 参考 club 模块的 getPlayers 方法
124
- */
125
- player_id?: string;
126
- server_id?: string;
127
- server_name?: string;
128
- role_id?: string;
129
- role_name?: string;
130
- avatar_url?: string;
131
- }, requestOptions?: IRequestOptions): Promise<import("./event.define").EngageResponse | {
132
- message: string;
133
- error: RequestInternalError | InferEngagementError<T>;
134
- }>;
135
- /**
136
- * 用户领取除红包和实物奖励以外的所有奖励
137
- *
138
- * @deprecated 请优先使用 `claimRewardsV2` 接口
139
- *
140
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=lCGuqgvUDP
141
- */
142
- claimRewards(params: {
143
- /** 用户参与记录 ID */
144
- engagement_id: number;
145
- /** 产生奖励的来源 */
146
- reward_source: RewardSource;
147
- /** 游戏服务器 ID,领取游戏道具时为必填 */
148
- server_id?: string | number;
149
- /** 游戏角色 ID,领取游戏道具时为必填 */
150
- role_id?: string;
151
- /** 游戏角色名 */
152
- role_name?: string;
153
- }, requestOptions?: IRequestOptions): Promise<import("./event.define").ClaimedItem[] | {
154
- message: string;
155
- error: RequestInternalError | "invalid_server_id" | "invalid_role_id" | "event_not_found" | "engagement_not_found" | "event_not_started" | "event_already_ended" | "claim_rewards_not_started" | "claim_rewards_already_ended" | "no_rewards_to_claim" | "reward_received" | "claim_reward_error";
156
- }>;
157
- /**
158
- * 用户领取除红包和实物奖励以外的所有奖励
159
- *
160
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vdc4SrqXjF
161
- */
162
- claimRewardsV2(params: {
163
- /** 用户参与记录 ID */
164
- engagement_id: number;
165
- /** 产生奖励的来源 */
166
- reward_source: RewardSource;
167
- /** 游戏服务器 ID,领取游戏道具时为必填 */
168
- server_id?: string | number;
169
- /** 游戏角色 ID,领取游戏道具时为必填 */
170
- role_id?: string;
171
- /** 游戏角色名 */
172
- role_name?: string;
173
- }, requestOptions?: IRequestOptions): Promise<import("./event.engage").UserReward[] | {
174
- message: string;
175
- error: RequestInternalError | "invalid_server_id" | "invalid_role_id" | "event_not_found" | "engagement_not_found" | "event_not_started" | "event_already_ended" | "claim_rewards_not_started" | "claim_rewards_already_ended" | "no_rewards_to_claim" | "reward_received" | "claim_reward_error";
176
- }>;
177
- /**
178
- * 用户领取红包奖励
179
- *
180
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=aQLhlOAB4Q
181
- */
182
- claimWeixinHongbao(rewardId: number, requestOptions?: IRequestOptions): Promise<{
183
- reward_status: import("./event.enums").ClaimRewardStatus;
184
- } | {
185
- message: string;
186
- error: RequestInternalError | "invalid_weixin_openid" | "event_not_started" | "event_already_ended" | "no_rewards_to_claim" | "reward_received" | "invalid_merchant_parameter" | "budget_not_enough";
187
- }>;
188
- /**
189
- * 验证资格激活码有效性
190
- *
191
- * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
192
- */
193
- verifyActivationKey(activationKey: string, requestOptions?: IRequestOptions): Promise<true | {
194
- readonly error: "not_logged_in";
195
- message?: undefined;
196
- } | {
197
- message: string;
198
- error: RequestInternalError | "invalid_activation_key" | "activation_key_expired";
199
- }>;
200
- /**
201
- * 查询用户活动奖励列表
202
- *
203
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=qj12eIgYQG
204
- */
205
- getUserRewards(option: {
206
- /** 活动玩法 ID */
207
- feature_id?: number;
208
- /** 奖励类型,不支持传递空奖励 `void_item` */
209
- reward_types?: Exclude<GamerItemType, typeof GamerItemType.VoidItem>[];
210
- /** 单次查询的数量,默认 20 */
211
- max_results?: number;
212
- next_token?: string;
213
- reward_status?: RewardStatus;
214
- }, requestOptions?: IRequestOptions): Promise<{
215
- user_rewards: import("./event.engage").UserReward[];
216
- next_token: string;
217
- }>;
218
- /**
219
- * 查询用户奖励数量,目前仅返回未领取的奖励数量
220
- *
221
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=jrFbyZ3UWN
222
- */
223
- getUserRewardsCount(option: {
224
- /** 活动 ID 列表,多个用逗号分隔。若不传,则统计所有活动。*/
225
- event_ids?: string;
226
- }, requestOptions?: IRequestOptions): Promise<{
227
- unclaimed: number;
228
- }>;
229
- /**
230
- * 查询用户活动道具数量。💡 注意,这里只能是活动道具
231
- *
232
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=mnGCTeTgMb
233
- */
234
- getUserItemCount(itemId: number, requestOptions?: IRequestOptions): Promise<number | null>;
235
- /**
236
- * 填写实物奖励收货地址,返回 null 表示未登录
237
- *
238
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=QIwGhnaexb
239
- */
240
- submitUserRewardAddress(option: {
241
- /** 用户奖励记录 id */
242
- reward_id: number;
243
- /** @deprecated 即将废弃,请勿再使用 */
244
- address_id?: number;
245
- /** 收件人称呼 */
246
- recipient: string;
247
- /** 收件人手机号 */
248
- mobile: string;
249
- /** 收件地址所在省 */
250
- province: string;
251
- /** 收件地址所在市 */
252
- city: string;
253
- /** 收件地址所在街道 */
254
- district: string;
255
- /** 详细收货地址 */
256
- address: string;
257
- }, requestOptions?: IRequestOptions): Promise<true | {
258
- message: string;
259
- error: RequestInternalError | "invalid_token" | "event_not_found" | "address_not_found";
260
- } | null>;
261
- /**
262
- * 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
263
- *
264
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=TbEeyUmZzN
265
- *
266
- * @param params - 前端扫描二维码打开小程序所需参数
267
- */
268
- getUnlimitQrcodeScene(params: string, requestOptions?: IRequestOptions): Promise<string | null>;
269
- /**
270
- * 根据小程序码携带 scene 值,获取对应的前端所需参数
271
- *
272
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=SzWPFZDQBV
273
- *
274
- * @param scene - 小程序码 scene 值
275
- */
276
- getParamsByQrcodeScene(scene: string, requestOptions?: IRequestOptions): Promise<string | null>;
277
- /**
278
- * 生成不限制的带参数的小程序码(dataURI 格式的小程序码图片)
279
- *
280
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=Rvmoq8iIy0
281
- */
282
- generateUnlimitQrcode(option: {
283
- /** 小程序 appid */
284
- app_id: string;
285
- /**
286
- * 小程序码所携带参数
287
- *
288
- * https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getUnlimitedQRCode.html#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0
289
- */
290
- scene: string;
291
- page?: string;
292
- /**
293
- * 检查 page 是否存在;检查时小程序必须已发布,且 page 存在。
294
- *
295
- * 0 默认检查 1 检查 2 不检查
296
- */
297
- check_path?: 0 | 1 | 2;
298
- /**
299
- * 扫描小程序码打开的小程序版本,默认是正式版
300
- *
301
- * - release 正式版小程序
302
- * - trial 体验版小程序
303
- * - develop 开发版小程序
304
- */
305
- env_version?: "release" | "trial" | "develop";
306
- /** 小程序码的宽度,单位:px,最小 280,最大 1280,默认 430 */
307
- width?: number;
308
- /** 小程序码自动配置线条颜色 */
309
- auto_color?: boolean;
310
- /** 小程序码线条颜色,autoColor 为 false 时生效,使用 rgb 设置颜色 */
311
- line_color?: {
312
- r?: string;
313
- g?: string;
314
- b?: string;
315
- };
316
- /** 生成的小程序码是否需要透明底色 */
317
- is_hyaline?: boolean;
318
- }, requestOptions?: IRequestOptions): Promise<string | null>;
319
- /**
320
- * 本接口用于获取任务玩法的实时进度数据,支持部分任务进度的查询:累计充值金额 / 累计游戏内活跃值 / 账号等级目标
321
- *
322
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=ZAnm12d3f0
323
- */
324
- getQuestProgress(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").QuestProgress | {
325
- message: string;
326
- error: RequestInternalError | "invalid_token" | "feature_not_found";
327
- } | null>;
328
- /**
329
- * 产生投票(vote2)玩法获得的奖励,并非发放给用户;领取需要调用 claimRewardsV2
330
- *
331
- * path: event/vote2/rewards
332
- *
333
- * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=fabGKteIEK
334
- */
335
- vote2Rewards(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").Vote2ClaimRewardsResponse | {
336
- message: string;
337
- code: RequestInternalError | "vote_rewards_not_started" | "vote_rewards_already_ended" | "engagement_not_found";
338
- } | null>;
339
- /**
340
- * 查询投票(vote2)玩法排行榜数据
341
- *
342
- * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=cYZMVXbP4u
343
- */
344
- getVote2Leaderboard(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").CandidateVote[]>;
345
- /**
346
- * 充值返还玩法的查询接口,查询返还数据
347
- *
348
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=yNolN2sWp4
349
- */
350
- getCashbackQuery(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").CashbackEngagementData | {
351
- message: string;
352
- error: RequestInternalError | "event_not_found" | "feature_not_found";
353
- } | null>;
354
- /**
355
- * 获取当前登录用户的投稿记录
356
- *
357
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=biEwrNKhAF
358
- */
359
- getUgcRecord(option: {
360
- /** 按照多个活动 ID 批量查询投稿记录,以逗号分隔。若传入此参数,不再进行单活动/玩法的精确匹配*/
361
- event_ids?: string;
362
- /** 单个活动 ID */
363
- event_id?: number;
364
- /** 活动玩法 ID */
365
- feature_id?: number;
366
- /** 审核状态 不传即查询所有状态的记录 */
367
- review_status?: UgcReviewStatus;
368
- /** 查询返回最大参与记录数 默认20*/
369
- max_results?: number;
370
- /** 分页标识,不传默认首页查询 */
371
- next_token?: string;
372
- }, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcRecordResponse | {
373
- message: string;
374
- error: RequestInternalError | "event_not_found" | "feature_not_found";
375
- } | null>;
376
- /**
377
- * 查询用户投稿数量
378
- *
379
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=U0sYIGPzDk
380
- */
381
- getUgcMyCount(option: {
382
- /** 活动 ID 列表,多个用逗号分隔。若不传,则统计所有活动。*/
383
- event_ids?: string;
384
- }, requestOptions?: IRequestOptions): Promise<{
385
- total_count: number;
386
- } | {
387
- message: string;
388
- error: RequestInternalError | "event_not_found";
389
- } | null>;
390
- /**
391
- * 媒体资源预上传地址获取,为投稿玩法(UGC)提供 S3 预签名上传 URL,供用户客户端上传图片资源
392
- *
393
- * 仅允许上传 image/jpeg 和 image/png 格式的图片。
394
- * 图片会按照 event_id / feature_id 维度分目录存储在S3 对象存储中。
395
- * 投稿玩法不调用任何第三方(网易易盾等)进行内容安全检测。
396
- *
397
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=xhGGpJEbol
398
- */
399
- ugcUploadImage(featureId: number, option: {
400
- image_type: "png" | "jpg" | "jpeg";
401
- /** 媒体文件大小 */
402
- size: number;
403
- /** 媒体文件内容的 SHA-256 哈希值 用于校验上传对象的完整性 */
404
- sha256: string;
405
- }, requestOptions?: IRequestOptions): Promise<{
406
- existed: boolean;
407
- upload_url: string | undefined;
408
- image_url: string;
409
- } | {
410
- message: string;
411
- error: RequestInternalError | "event_not_found" | "feature_not_found";
412
- } | null>;
413
- /**
414
- * 获取推荐稿件列表,随机显示 N 条被接受的投稿记录
415
- *
416
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=WzvcAPjHAh
417
- */
418
- getUgcRecommendation(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcRecordResponse | {
419
- message: string;
420
- error: RequestInternalError | "event_not_found" | "feature_not_found";
421
- }>;
422
- /**
423
- * 用于查询指定活动玩法下,所有已被接收 (review_status = accepted) 的用户投稿内容列表,默认按照投稿时间倒序。
424
- *
425
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=VRYN6d3rbd
426
- */
427
- getUgcs(featureId: number, option?: {
428
- /** 单页返回的最大数量,默认 20 */
429
- max_results?: number;
430
- next_token?: string;
431
- }, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcRecordBaseResponse | {
432
- message: string;
433
- error: RequestInternalError | "event_not_found" | "feature_not_found";
434
- }>;
435
- /**
436
- * 获取指定活动玩法的 UGC 投稿排行榜数据
437
- *
438
- * 该接口仅在管理员在 Console 后台完成排行榜结算后才会返回有效数据。
439
- * 结算前调用将返回空结果集。
440
- * 排行榜结算通常在活动结束后由管理员在 Console 后台手动触发。
441
- * 目前前端无法直接在投稿玩法中获得「是否已经结算」的状态。
442
- *
443
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=KoB7S8omkC
444
- */
445
- getUgcLeaderboard(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").UgcLeaderboardResponse | {
446
- message: string;
447
- error: RequestInternalError | "event_not_found" | "feature_not_found";
448
- } | null>;
449
- /**
450
- * 查询兑换玩法的物品剩余库存(含用户可兑换数量)
451
- *
452
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=gOqT9svLF7
453
- */
454
- getRedeemItemStocks(featureId: number, requestOptions?: IRequestOptions): Promise<import("./event.engage").RedeemStocksResponse | {
455
- message: string;
456
- error: RequestInternalError | "event_not_found" | "feature_not_found";
457
- } | null>;
14
+ bind<T extends Record<string, ApiMethod>>(methods: T): this & {
15
+ [K in keyof T]: T[K] extends (...args: infer Args) => infer Return ? (...args: Args) => Return : never;
16
+ };
458
17
  }
18
+ export {};
@@ -1,9 +1,9 @@
1
1
  export interface ShareEngagementData {
2
2
  /** 用户分享到对应的平台 */
3
- platform: string;
3
+ platform?: string;
4
4
  }
5
5
  export declare const ShareEngagementDataValidator: import("@seayoo-web/validator").ObjectValidator<ShareEngagementData, false, false>;
6
6
  export interface ShareEngagementParam {
7
7
  /** 用户分享到对应的平台 */
8
- platform: string;
8
+ platform?: string;
9
9
  }
@@ -1,7 +1,7 @@
1
1
  import type { UserEngagementData, CommentEngagementParam, PreregisterEngagementParam, LotteryEngagementParam, LotteryDrawEngagementParam, ShareEngagementParam, SubscribeEngagementParam, TeamEngagementParam, VoteEngagementParam, Vote2EngagementParam, UgcEngagementParam, UgcLikeEngagementParam, Vote2EngagementError, LotteryEngagementError, ClaimActivationKeyEngagementError, LotteryDrawEngagementError, TeamEngagementError, GiftCodeEngagementError, RedeemEngagementParam, RedeemEngagementError } from "./engage";
2
+ import type { ZeroChatGPTEngagementParam } from "./engage.zeroChatGPT";
2
3
  import type { Reward } from "./reward";
3
4
  import type { FeatureType } from "../event.enums";
4
- import type { ZeroChatGPTEngagementParam } from "./engage.zeroChatGPT";
5
5
  export * from "./engage";
6
6
  export * from "./reward";
7
7
  export type UserEngagement = {