@seayoo-web/gamer-api 2.9.9 → 2.10.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/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { isComboWebView as me } from "@seayoo-web/combo-webview";
2
- import { isPlainObject as w, supportWx as b, useConsole as ue, usePromise as de, pruneURL as ge, supportWindow as pe, queryString as S, pruneObject as c, omitFields as k, parseJSON as _e, removePara as G } from "@seayoo-web/utils";
1
+ import { isComboWebView as ue } from "@seayoo-web/combo-webview";
2
+ import { isPlainObject as w, supportWx as b, useConsole as de, usePromise as ge, pruneURL as pe, supportWindow as _e, queryString as L, pruneObject as c, omitFields as k, parseJSON as be, removePara as G } from "@seayoo-web/utils";
3
3
  import { v as e, objectGuard as s } from "@seayoo-web/validator";
4
- function be(i) {
4
+ function ye(i) {
5
5
  return w(i, "gamer_token") && typeof i.gamer_token == "string";
6
6
  }
7
7
  function O(i) {
8
8
  return w(i);
9
9
  }
10
- const R = ue("GamerApiSDK");
11
- function ye(i) {
10
+ const j = de("GamerApiSDK");
11
+ function fe(i) {
12
12
  return /^\/[a-z\d-]+$/.test(i);
13
13
  }
14
- async function fe() {
15
- const { promise: i, resolve: t } = de();
14
+ async function he() {
15
+ const { promise: i, resolve: t } = ge();
16
16
  return wx.login({
17
17
  success(n) {
18
18
  t(n.code);
@@ -22,7 +22,7 @@ async function fe() {
22
22
  }
23
23
  }), await i;
24
24
  }
25
- const he = {
25
+ const we = {
26
26
  get(i) {
27
27
  return localStorage.getItem(i) || "";
28
28
  },
@@ -32,12 +32,12 @@ const he = {
32
32
  remove(i) {
33
33
  localStorage.removeItem(i);
34
34
  }
35
- }, we = {
35
+ }, ke = {
36
36
  get(i) {
37
37
  try {
38
38
  if (b()) return wx.getStorageSync(i) || "";
39
39
  } catch (t) {
40
- R.error("getStorageSyncError", t);
40
+ j.error("getStorageSyncError", t);
41
41
  }
42
42
  return "";
43
43
  },
@@ -45,18 +45,18 @@ const he = {
45
45
  try {
46
46
  b() && wx.setStorageSync(i, t);
47
47
  } catch (n) {
48
- R.error("setStorageSyncError", n);
48
+ j.error("setStorageSyncError", n);
49
49
  }
50
50
  },
51
51
  remove(i) {
52
52
  try {
53
53
  b() && wx.removeStorageSync(i);
54
54
  } catch (t) {
55
- R.error("removeStorageSync", t);
55
+ j.error("removeStorageSync", t);
56
56
  }
57
57
  }
58
58
  }, y = "gamer_token";
59
- class $r {
59
+ class Br {
60
60
  $NetRequest;
61
61
  $idToken = "";
62
62
  $weixinToken = "";
@@ -64,8 +64,8 @@ class $r {
64
64
  req;
65
65
  storage;
66
66
  constructor(t, n) {
67
- this.storage = b() ? we : he;
68
- const r = ye(t) ? t : `https://${ge(t)}`;
67
+ this.storage = b() ? ke : we;
68
+ const r = fe(t) ? t : `https://${pe(t)}`;
69
69
  if (this.$NetRequest = n, this.req = n({
70
70
  baseURL: `${r}/v1`,
71
71
  timeout: 1e4,
@@ -86,9 +86,9 @@ class $r {
86
86
  requestTransformer: (a) => {
87
87
  this.$gamerToken && (a.headers.Authorization = `Bearer ${this.$gamerToken}`);
88
88
  }
89
- }), pe()) {
90
- const a = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = S("gamer_token");
91
- (me() || a && o) && (this.$gamerToken = o);
89
+ }), _e()) {
90
+ const a = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = L("gamer_token");
91
+ (ue() || a && o) && (this.$gamerToken = o);
92
92
  }
93
93
  this.$gamerToken || this.loadGamerTokenCache();
94
94
  }
@@ -171,7 +171,7 @@ class $r {
171
171
  const { code: n, data: r } = await this.req.post(
172
172
  "login-with-token",
173
173
  c({ id_token: this.idToken, weixin_token: t ? this.weixinToken : null }),
174
- be,
174
+ ye,
175
175
  {
176
176
  message: !1,
177
177
  cacheTTL: 300,
@@ -213,21 +213,21 @@ class $r {
213
213
  return n;
214
214
  }
215
215
  }
216
- const ke = {
216
+ const ve = {
217
217
  /** 未知 */
218
218
  Unknown: "unknown",
219
219
  /** 男 */
220
220
  Male: "male",
221
221
  /** 女 */
222
222
  Female: "female"
223
- }, ve = e.string().enum(ke).lock(), Ce = {
223
+ }, Ve = e.string().enum(ve).lock(), Ce = {
224
224
  /** 积分增加 */
225
225
  Increase: "increase",
226
226
  /** 积分减少 */
227
227
  Decrease: "decrease",
228
228
  /** 积分过期 */
229
229
  Expired: "expired"
230
- }, Ve = e.string().enum(Ce).lock(), Re = {
230
+ }, Re = e.string().enum(Ce).lock(), je = {
231
231
  /** 游戏内购买 */
232
232
  Order: "order",
233
233
  /** 游戏内消耗 */
@@ -240,21 +240,21 @@ const ke = {
240
240
  Admin: "admin",
241
241
  /** 运营活动 */
242
242
  Event: "event"
243
- }, je = e.string().enum(Re).lock(), Te = {
243
+ }, Te = e.string().enum(je).lock(), qe = {
244
244
  /** 游戏内奖励 */
245
245
  GameReward: "game_reward",
246
246
  /** 实物商品 */
247
247
  Physical: "physical",
248
248
  /** 虚拟商品 */
249
249
  Virtual: "virtual"
250
- }, H = e.string().enum(Te).lock(), qe = {
250
+ }, z = e.string().enum(qe).lock(), xe = {
251
251
  /** 待发放 */
252
252
  Pending: "pending",
253
253
  /** 已发放 */
254
254
  Issued: "issued",
255
255
  /** 发放失败 */
256
256
  Failed: "failed"
257
- }, xe = e.string().enum(qe).lock(), Se = e.object({
257
+ }, Se = e.string().enum(xe).lock(), Le = e.object({
258
258
  default_avatar_url: e.string(),
259
259
  official_avatar_urls: e.array(e.string()),
260
260
  default_nickname: e.string(),
@@ -272,7 +272,7 @@ const ke = {
272
272
  exp_description: e.string(),
273
273
  credit_description: e.string(),
274
274
  send_role_mail_rate_limit: e.number()
275
- }).lock(), Le = e.object({
275
+ }).lock(), Pe = e.object({
276
276
  member_id: e.string(),
277
277
  player_id: e.string(),
278
278
  exp: e.number(),
@@ -281,19 +281,19 @@ const ke = {
281
281
  credit_expiring: e.number(),
282
282
  level_change_time: e.number(),
283
283
  level_expire_time: e.number()
284
- }).lock(), Pe = e.object({
284
+ }).lock(), Ee = e.object({
285
285
  server_id: e.string(),
286
286
  server_name: e.string()
287
287
  }).lock(), $e = e.object({
288
288
  role_id: e.string(),
289
289
  role_name: e.string()
290
- }).lock(), z = e.object({
290
+ }).lock(), J = e.object({
291
291
  ...$e.shape,
292
- ...Pe.shape,
292
+ ...Ee.shape,
293
293
  role_level: e.number(),
294
294
  last_login_time: e.number()
295
- }).lock(), Ee = e.object({
296
- ...z.shape,
295
+ }).lock(), Fe = e.object({
296
+ ...J.shape,
297
297
  /** 角色战力 */
298
298
  role_fighting: e.number(),
299
299
  /** 宗门 ID */
@@ -302,13 +302,13 @@ const ke = {
302
302
  kin_name: e.string().optional(),
303
303
  /** 宗门职位 */
304
304
  kin_position: e.string().optional()
305
- }).lock(), Fe = e.object({
305
+ }).lock(), Ue = e.object({
306
306
  name: e.string(),
307
307
  avatar_url: e.string(),
308
308
  bio: e.string(),
309
- gender: ve,
309
+ gender: Ve,
310
310
  birthday: e.object({ year: e.number(), month: e.number(), day: e.number() })
311
- }).lock(), J = e.object({
311
+ }).lock(), Z = e.object({
312
312
  address_id: e.number(),
313
313
  recipient: e.string(),
314
314
  mobile: e.string(),
@@ -317,19 +317,19 @@ const ke = {
317
317
  district: e.string(),
318
318
  address: e.string(),
319
319
  is_default: e.bool()
320
- }).lock(), Ue = e.object({
320
+ }).lock(), Ie = e.object({
321
321
  increased_credit: e.number(),
322
322
  decreased_credit: e.number(),
323
323
  expired_credit: e.number(),
324
324
  balance_credit: e.number()
325
- }).lock(), Ie = e.object({
325
+ }).lock(), De = e.object({
326
326
  id: e.number(),
327
- change_type: Ve,
328
- change_scene: je,
327
+ change_type: Re,
328
+ change_scene: Te,
329
329
  change_credit: e.number(),
330
330
  balance: e.number(),
331
331
  change_time: e.number()
332
- }).lock(), Z = e.object({
332
+ }).lock(), X = e.object({
333
333
  benefit_id: e.number(),
334
334
  name: e.string(),
335
335
  img_url: e.string(),
@@ -338,11 +338,11 @@ const ke = {
338
338
  max_level: e.number(),
339
339
  product_id: e.number(),
340
340
  tag: e.string()
341
- }).lock(), X = e.object({
341
+ }).lock(), Y = e.object({
342
342
  product_id: e.number(),
343
343
  catalog_id: e.number(),
344
344
  catalog_name: e.string(),
345
- item_type: H,
345
+ item_type: z,
346
346
  name: e.string(),
347
347
  img_url: e.string(),
348
348
  description: e.string(),
@@ -364,10 +364,10 @@ const ke = {
364
364
  created_at: e.number(),
365
365
  updated_at: e.number(),
366
366
  redeemable_quantity: e.number().optional()
367
- }).lock(), De = e.object({
368
- ...k(Z.shape, "tag"),
369
- product: X.clone().optional()
370
- }).lock(), Er = e.union(
367
+ }).lock(), Ae = e.object({
368
+ ...k(X.shape, "tag"),
369
+ product: Y.clone().optional()
370
+ }).lock(), Mr = e.union(
371
371
  e.object({
372
372
  server_id: e.string(),
373
373
  role_id: e.string()
@@ -375,7 +375,7 @@ const ke = {
375
375
  e.object({
376
376
  address_id: e.number()
377
377
  })
378
- ).satisfies().lock(), Ae = e.object({
378
+ ).satisfies().lock(), Ge = e.object({
379
379
  recipient: e.string(),
380
380
  mobile: e.string(),
381
381
  province: e.string(),
@@ -384,32 +384,32 @@ const ke = {
384
384
  address: e.string(),
385
385
  express_company: e.string(),
386
386
  express_number: e.string()
387
- }).lock(), Ge = e.object({
387
+ }).lock(), Oe = e.object({
388
388
  server_id: e.string(),
389
389
  role_id: e.string(),
390
390
  role_name: e.string()
391
- }).lock(), Oe = e.object({
391
+ }).lock(), Ne = e.object({
392
392
  redemption_id: e.number(),
393
393
  player_id: e.string(),
394
394
  product_id: e.number(),
395
395
  name: e.string(),
396
396
  img_url: e.string(),
397
- item_type: H,
397
+ item_type: z,
398
398
  catalog_id: e.number(),
399
399
  catalog_name: e.string(),
400
400
  quantity: e.number(),
401
401
  amount: e.number(),
402
- status: xe,
402
+ status: Se,
403
403
  created_at: e.number(),
404
- extra_data: e.union(Ae.clone(), Ge.clone()).satisfies().optional()
405
- }), Ne = e.guard(Se), N = s({ player: Le }), Qe = s({ roles: e.array(z) }), j = s({ role_card: Ee }), Q = e.guard(Fe), B = e.guard(J), Be = s({ addresses: e.array(J) }), Me = e.guard(Ue), Ke = s({
406
- credit_logs: e.array(Ie),
404
+ extra_data: e.union(Ge.clone(), Oe.clone()).satisfies().optional()
405
+ }), Qe = e.guard(Le), N = s({ player: Pe }), Be = s({ roles: e.array(J) }), T = s({ role_card: Fe }), Q = e.guard(Ue), B = e.guard(Z), Me = s({ addresses: e.array(Z) }), Ke = e.guard(Ie), He = s({
406
+ credit_logs: e.array(De),
407
407
  next_token: e.string().optional()
408
- }), He = s({ products: e.array(X) }), ze = s({ benefits: e.array(Z) }), Je = s({ benefit: De }), Ze = s({
409
- redemptions: e.array(Oe),
408
+ }), ze = s({ products: e.array(Y) }), Je = s({ benefits: e.array(X) }), Ze = s({ benefit: Ae }), Xe = s({
409
+ redemptions: e.array(Ne),
410
410
  next_token: e.string().optional()
411
411
  });
412
- class Fr {
412
+ class Kr {
413
413
  token;
414
414
  req;
415
415
  constructor(t) {
@@ -421,7 +421,7 @@ class Fr {
421
421
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=tuhsPt3ihp
422
422
  */
423
423
  async getConfig(t) {
424
- const { data: n } = await this.req.get("club/config", Ne, t);
424
+ const { data: n } = await this.req.get("club/config", Qe, t);
425
425
  return n;
426
426
  }
427
427
  /**
@@ -462,7 +462,7 @@ class Fr {
462
462
  */
463
463
  async getRoles(t, n, r) {
464
464
  if (!await this.token.autoLogin()) return [];
465
- const { data: a } = await this.req.get("club/roles", Qe, {
465
+ const { data: a } = await this.req.get("club/roles", Be, {
466
466
  ...r,
467
467
  params: c({ player_id: t, refresh: n })
468
468
  });
@@ -474,7 +474,7 @@ class Fr {
474
474
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=A1Wr7kUXnS
475
475
  */
476
476
  async getRoleCard(t, n) {
477
- const { data: r } = await this.req.get("club/role-card", j, {
477
+ const { data: r } = await this.req.get("club/role-card", T, {
478
478
  ...n,
479
479
  params: { member_id: t }
480
480
  });
@@ -487,7 +487,7 @@ class Fr {
487
487
  */
488
488
  async setRoleCard(t, n) {
489
489
  if (!await this.token.autoLogin()) return null;
490
- const { data: r } = await this.req.post("club/role-card", t, j, n);
490
+ const { data: r } = await this.req.post("club/role-card", t, T, n);
491
491
  return r?.role_card ?? null;
492
492
  }
493
493
  /**
@@ -497,7 +497,7 @@ class Fr {
497
497
  */
498
498
  async refreshRoleCard(t) {
499
499
  if (!await this.token.autoLogin()) return null;
500
- const { data: n } = await this.req.post("club/refresh-role-card", {}, j, t);
500
+ const { data: n } = await this.req.post("club/refresh-role-card", {}, T, t);
501
501
  return n?.role_card ?? null;
502
502
  }
503
503
  /**
@@ -534,7 +534,7 @@ class Fr {
534
534
  */
535
535
  async getAddresses(t) {
536
536
  if (!await this.token.autoLogin()) return [];
537
- const { data: n } = await this.req.get("club/addresses", Be, t);
537
+ const { data: n } = await this.req.get("club/addresses", Me, t);
538
538
  return n?.addresses ?? [];
539
539
  }
540
540
  /**
@@ -582,7 +582,7 @@ class Fr {
582
582
  */
583
583
  async getUserCredit(t, n) {
584
584
  await this.token.autoLogin();
585
- const { data: r, code: a, message: o } = await this.req.get("club/user-credit", Me, {
585
+ const { data: r, code: a, message: o } = await this.req.get("club/user-credit", Ke, {
586
586
  ...n,
587
587
  params: c(t)
588
588
  });
@@ -598,7 +598,7 @@ class Fr {
598
598
  */
599
599
  async getCreditLogs(t, n) {
600
600
  await this.token.autoLogin();
601
- const { data: r } = await this.req.get("club/credit-logs", Ke, {
601
+ const { data: r } = await this.req.get("club/credit-logs", He, {
602
602
  ...n,
603
603
  params: c({ max_results: 20, ...t })
604
604
  });
@@ -614,7 +614,7 @@ class Fr {
614
614
  */
615
615
  async getBenefits(t) {
616
616
  if (!await this.token.autoLogin()) return [];
617
- const { data: n } = await this.req.get("club/benefits", ze, t);
617
+ const { data: n } = await this.req.get("club/benefits", Je, t);
618
618
  return n?.benefits || [];
619
619
  }
620
620
  /**
@@ -624,7 +624,7 @@ class Fr {
624
624
  */
625
625
  async getBenefit(t, n) {
626
626
  if (!await this.token.autoLogin()) return null;
627
- const { data: r } = await this.req.get("club/benefit", Je, {
627
+ const { data: r } = await this.req.get("club/benefit", Ze, {
628
628
  ...n,
629
629
  params: { benefit_id: t }
630
630
  });
@@ -636,7 +636,7 @@ class Fr {
636
636
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=r3vC3PzfMQ
637
637
  */
638
638
  async getProducts(t, n) {
639
- const { data: r } = await this.req.get("club/products", He, {
639
+ const { data: r } = await this.req.get("club/products", ze, {
640
640
  ...n,
641
641
  params: t
642
642
  });
@@ -662,7 +662,7 @@ class Fr {
662
662
  */
663
663
  async getRedemptions(t, n) {
664
664
  await this.token.autoLogin();
665
- const { data: r } = await this.req.get("club/redemptions", Ze, {
665
+ const { data: r } = await this.req.get("club/redemptions", Xe, {
666
666
  ...n,
667
667
  params: c({ max_results: 20, ...t })
668
668
  });
@@ -693,17 +693,17 @@ const v = {
693
693
  ExternalCode: "external_gift_code",
694
694
  /** 空奖励 */
695
695
  VoidItem: "void_item"
696
- }, Y = e.string().enum(v).lock(), Ur = v, W = Y, Xe = {
696
+ }, W = e.string().enum(v).lock(), Hr = v, ee = W, Ye = {
697
697
  /** 世游通行证 ID / Combo ID */
698
698
  UserId: "user_id",
699
699
  /** 游戏角色 ID */
700
700
  RoleId: "role_id"
701
- }, Ye = e.string().enum(Xe).lock(), We = {
701
+ }, We = e.string().enum(Ye).lock(), et = {
702
702
  None: "none",
703
703
  Daily: "daily",
704
704
  Weekly: "weekly",
705
705
  Monthly: "monthly"
706
- }, et = e.string().enum(We).lock(), l = {
706
+ }, tt = e.string().enum(et).lock(), l = {
707
707
  /** 预约 */
708
708
  Preregister: "preregister",
709
709
  /** 抽奖 */
@@ -722,6 +722,8 @@ const v = {
722
722
  Comment: "comment",
723
723
  /** 投票 */
724
724
  Vote: "vote",
725
+ /** 投票 V2 */
726
+ Vote2: "vote2",
725
727
  /** 礼包码 */
726
728
  GiftCode: "gift_code",
727
729
  /** 注册 */
@@ -744,7 +746,7 @@ const v = {
744
746
  ClaimActivationKey: "claim_activation_key",
745
747
  /** 不朽箴言特有的 AI 聊天 */
746
748
  ZeroChatgpt: "zero_chatgpt"
747
- }, tt = e.string().enum(l).lock(), nt = {
749
+ }, nt = e.string().enum(l).lock(), rt = {
748
750
  /** 累计游戏内活跃值 */
749
751
  Active: "player_active_points",
750
752
  /** 累计登录,单位 人天 */
@@ -763,14 +765,14 @@ const v = {
763
765
  PlayerLevel: "player_level",
764
766
  /** 活动道具累计获取 */
765
767
  EventItems: "event_items"
766
- }, ee = e.string().enum(nt).lock(), rt = {
768
+ }, te = e.string().enum(rt).lock(), at = {
767
769
  /** 官方上传 */
768
770
  System: "system",
769
771
  /** 用户投稿 */
770
772
  UserSubmission: "user_submission",
771
773
  /** 投票入围 */
772
774
  Shortlisted: "shortlisted"
773
- }, at = e.string().enum(rt).lock(), d = {
775
+ }, ot = e.string().enum(at).lock(), d = {
774
776
  /** 未获得奖励 */
775
777
  Ineligible: "ineligible",
776
778
  /** 奖励未领取 */
@@ -781,7 +783,7 @@ const v = {
781
783
  Failed: "failed",
782
784
  /** 奖励已发货 */
783
785
  Delivered: "delivered"
784
- }, Ir = e.string().enum(d).lock(), ot = {
786
+ }, zr = e.string().enum(d).lock(), it = {
785
787
  /** 奖励未领取 */
786
788
  Unclaimed: d.Unclaimed,
787
789
  /** 奖励已领取 */
@@ -790,7 +792,7 @@ const v = {
790
792
  Failed: d.Failed,
791
793
  /** 奖励已发货 */
792
794
  Delivered: d.Delivered
793
- }, te = e.string().enum(ot).lock(), it = {
795
+ }, ne = e.string().enum(it).lock(), st = {
794
796
  /** 未获得奖励 */
795
797
  Ineligible: d.Ineligible,
796
798
  /** 奖励未领取 */
@@ -801,17 +803,17 @@ const v = {
801
803
  Failed: d.Failed,
802
804
  /** 奖励已发货 */
803
805
  Delivered: d.Delivered
804
- }, L = e.string().enum(it).lock(), st = {
806
+ }, P = e.string().enum(st).lock(), ct = {
805
807
  /** 玩法产出奖励 */
806
808
  Output: "output",
807
809
  /** 玩法参与奖励 */
808
810
  Engage: "engage"
809
- }, P = e.string().enum(st).lock(), ct = {
811
+ }, E = e.string().enum(ct).lock(), lt = {
810
812
  /** 私有队伍 */
811
813
  Private: "private",
812
814
  /** 公开队伍 */
813
815
  Public: "public"
814
- }, lt = e.string().enum(ct).lock(), f = {
816
+ }, mt = e.string().enum(lt).lock(), f = {
815
817
  /** 未知状态 */
816
818
  Unknown: "unknown",
817
819
  /** 等待开奖 */
@@ -822,7 +824,7 @@ const v = {
822
824
  Claimed: "claimed",
823
825
  /** 领奖失败 */
824
826
  Fail: "fail"
825
- }, Dr = e.string().enum(f).lock(), mt = {
827
+ }, Jr = e.string().enum(f).lock(), ut = {
826
828
  /** 发起组队 */
827
829
  Assemble: "assemble",
828
830
  /** 加入队伍 */
@@ -833,78 +835,88 @@ const v = {
833
835
  ChangeVisibility: "change_visibility",
834
836
  /** 查询组队信息 */
835
837
  Query: "query"
836
- }, Ar = e.string().enum(mt).lock(), ut = {
838
+ }, Zr = e.string().enum(ut).lock(), dt = {
837
839
  /** 查询抽奖券 */
838
840
  Query: "query",
839
841
  /** 开奖 */
840
842
  Draw: "draw",
841
843
  /** 领奖 */
842
844
  Claim: "claim"
843
- }, Gr = e.string().enum(ut).lock(), ne = {
845
+ }, Xr = e.string().enum(dt).lock(), re = {
844
846
  /** 将所有队员的进度值求和,作为队伍进度值 */
845
847
  Sum: "sum",
846
848
  /** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
847
849
  TopN: "top_n"
848
- }, Or = e.string().enum(ne).lock(), dt = e.string().enum(ne).optional().lock(), gt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), $ = e.object({
850
+ }, Yr = e.string().enum(re).lock(), gt = e.string().enum(re).optional().lock(), pt = {
851
+ /** 尚未结算 */
852
+ None: "none",
853
+ /** 获胜奖励 */
854
+ Winner: "winner",
855
+ /** 安慰奖励 */
856
+ Consolation: "consolation"
857
+ }, _t = e.string().enum(pt).lock(), bt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), $ = e.object({
849
858
  reward_item_id: e.number(),
850
859
  reward_amount: e.number(),
851
860
  reward_item_name: e.string(),
852
861
  reward_item_icon_url: e.string(),
853
862
  reward_item_desc: e.string().optional(),
854
- reward_item_type: gt,
863
+ reward_item_type: bt,
855
864
  reward_item_rating: e.number()
856
- }).lock(), pt = e.object({
865
+ }).lock(), yt = e.object({
857
866
  engage_count: e.number(),
858
867
  rewards: e.array($)
859
- }).lock(), _t = e.union(
868
+ }).lock(), ft = e.union(
860
869
  e.object({
861
870
  feature_reward_type: e.string().enum("every"),
862
871
  reward_details: e.array($)
863
872
  }),
864
873
  e.object({
865
874
  feature_reward_type: e.string().enum("regular"),
866
- reward_details: e.array(pt)
875
+ reward_details: e.array(yt)
867
876
  })
868
- ).satisfies().lock(), m = e.object({
877
+ ).satisfies().lock(), M = e.object({
878
+ item_id: e.number(),
879
+ item_amount: e.number()
880
+ }), m = e.object({
869
881
  feature_name: e.string(),
870
882
  feature_id: e.number(),
871
883
  description: e.string(),
872
- cycle: et,
884
+ cycle: tt,
873
885
  cycle_limit: e.number(),
874
886
  limit: e.number(),
875
887
  since: e.number(),
876
888
  until: e.number(),
877
- engage_account: Ye,
878
- feature_rewards: _t.clone().optional(),
889
+ engage_account: We,
890
+ feature_rewards: ft.clone().optional(),
879
891
  sort: e.number().optional()
880
- }), bt = l.Cashback, yt = e.object({
892
+ }), ht = l.Cashback, wt = e.object({
881
893
  ...m.shape,
882
- feature_type: e.string().enum(bt),
894
+ feature_type: e.string().enum(ht),
883
895
  config: e.object({
884
896
  order_start_time: e.number(),
885
897
  order_end_time: e.number(),
886
898
  claim_rewards_start_time: e.number(),
887
899
  claim_rewards_end_time: e.number()
888
900
  })
889
- }), ft = l.CheckIn, ht = e.object({
901
+ }), kt = l.CheckIn, vt = e.object({
890
902
  ...m.shape,
891
- feature_type: e.string().enum(ft)
892
- }), wt = l.ClaimActivationKey, kt = e.object({
903
+ feature_type: e.string().enum(kt)
904
+ }), Vt = l.ClaimActivationKey, Ct = e.object({
893
905
  ...m.shape,
894
- feature_type: e.string().enum(wt)
895
- }), vt = l.ClaimRewards, Ct = e.object({
906
+ feature_type: e.string().enum(Vt)
907
+ }), Rt = l.ClaimRewards, jt = e.object({
896
908
  ...m.shape,
897
- feature_type: e.string().enum(vt)
898
- }), Vt = l.Comment, Rt = e.object({
909
+ feature_type: e.string().enum(Rt)
910
+ }), Tt = l.Comment, qt = e.object({
899
911
  ...m.shape,
900
- feature_type: e.string().enum(Vt),
912
+ feature_type: e.string().enum(Tt),
901
913
  config: e.object({
902
914
  comments: e.array(e.string()),
903
915
  send_rate: e.number()
904
916
  })
905
- }), jt = l.Follow, Tt = e.object({
917
+ }), xt = l.Follow, St = e.object({
906
918
  ...m.shape,
907
- feature_type: e.string().enum(jt),
919
+ feature_type: e.string().enum(xt),
908
920
  config: e.object({
909
921
  platform: e.string(),
910
922
  platform_icon: e.string().optional(),
@@ -912,66 +924,67 @@ const v = {
912
924
  qr_code_url: e.string().optional(),
913
925
  platform_desc: e.string().optional()
914
926
  })
915
- }), qt = l.GiftCode, xt = e.object({
927
+ }), Lt = l.GiftCode, Pt = e.object({
916
928
  name: e.string(),
917
929
  icon_url: e.string(),
918
930
  count: e.number()
919
- }), St = e.object({
931
+ }), Et = e.object({
920
932
  ...m.shape,
921
- feature_type: e.string().enum(qt),
933
+ feature_type: e.string().enum(Lt),
922
934
  config: e.object({
923
- gift_items: e.array(xt),
935
+ gift_items: e.array(Pt),
924
936
  mp_url: e.string().optional(),
925
937
  mp_qrcode_url: e.string().optional()
926
938
  })
927
- }), Lt = l.Invite, Pt = e.object({
939
+ }), $t = l.Invite, Ft = e.object({
928
940
  ...m.shape,
929
- feature_type: e.string().enum(Lt),
941
+ feature_type: e.string().enum($t),
930
942
  config: e.object({
931
943
  share_url: e.string()
932
944
  })
933
- }), $t = l.InvitedRegister, Et = e.object({
945
+ }), Ut = l.InvitedRegister, It = e.object({
934
946
  ...m.shape,
935
- feature_type: e.string().enum($t)
936
- }), Ft = e.string().enum(k(v, "GiftCode", "LotteryTicket")), Ut = l.Lottery, It = e.object({
947
+ feature_type: e.string().enum(Ut)
948
+ }), Dt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), At = l.Lottery, Gt = e.object({
937
949
  reward_item_id: e.number(),
938
950
  reward_item_name: e.string(),
939
- reward_item_type: Ft,
951
+ reward_item_type: Dt,
940
952
  reward_item_icon_url: e.string(),
941
953
  reward_item_desc: e.string().optional(),
942
954
  reward_amount: e.number(),
943
- reward_remaining_stock: e.number()
944
- }), Dt = e.object({
955
+ reward_remaining_stock: e.number(),
956
+ reward_item_rating: e.number()
957
+ }), Ot = e.object({
945
958
  ...m.shape,
946
- feature_type: e.string().enum(Ut),
959
+ feature_type: e.string().enum(At),
947
960
  config: e.object({
948
961
  consume_item_id: e.number(),
949
962
  consume_item_name: e.string(),
950
963
  consume_item_icon_url: e.string(),
951
964
  consume_item_count: e.array(e.number()),
952
965
  consume_item_desc: e.string().optional(),
953
- rewards: e.array(It)
966
+ rewards: e.array(Gt)
954
967
  })
955
- }), At = l.LotteryDraw, Gt = e.object({
968
+ }), Nt = l.LotteryDraw, Qt = e.object({
956
969
  ...m.shape,
957
- feature_type: e.string().enum(At),
970
+ feature_type: e.string().enum(Nt),
958
971
  config: e.object({
959
972
  draw_not_before: e.number(),
960
973
  draw_not_after: e.number()
961
974
  })
962
- }), Ot = l.Preregister, Nt = e.object({
975
+ }), Bt = l.Preregister, Mt = e.object({
963
976
  ...m.shape,
964
- feature_type: e.string().enum(Ot)
965
- }), Qt = l.Quest, Bt = e.object({
977
+ feature_type: e.string().enum(Bt)
978
+ }), Kt = l.Quest, Ht = e.object({
966
979
  ...m.shape,
967
- feature_type: e.string().enum(Qt),
980
+ feature_type: e.string().enum(Kt),
968
981
  config: e.object({
969
- objective: ee,
982
+ objective: te,
970
983
  completion_value: e.number(),
971
984
  team: e.object({
972
985
  feature_id: e.number().optional(),
973
986
  completion_value: e.number(),
974
- progress_algorithm: dt,
987
+ progress_algorithm: gt,
975
988
  top_n: e.number().optional()
976
989
  }).optional(),
977
990
  config: e.object({
@@ -981,38 +994,38 @@ const v = {
981
994
  event_item_id: e.number().optional()
982
995
  }).optional()
983
996
  })
984
- }), Mt = l.Register, Kt = e.object({
997
+ }), zt = l.Register, Jt = e.object({
985
998
  ...m.shape,
986
- feature_type: e.string().enum(Mt)
987
- }), Ht = l.Share, zt = e.object({
999
+ feature_type: e.string().enum(zt)
1000
+ }), Zt = l.Share, Xt = e.object({
988
1001
  ...m.shape,
989
- feature_type: e.string().enum(Ht),
1002
+ feature_type: e.string().enum(Zt),
990
1003
  config: e.object({
991
1004
  share_platform: e.string(),
992
1005
  jump_url: e.string().optional(),
993
1006
  icon_url: e.string().optional()
994
1007
  })
995
- }), Jt = l.Subscribe, Zt = e.object({
1008
+ }), Yt = l.Subscribe, Wt = e.object({
996
1009
  ...m.shape,
997
- feature_type: e.string().enum(Jt),
1010
+ feature_type: e.string().enum(Yt),
998
1011
  config: e.object({
999
1012
  weixin_template_ids: e.array(e.string())
1000
1013
  })
1001
- }), Xt = l.Survey, Yt = e.object({
1014
+ }), en = l.Survey, tn = e.object({
1002
1015
  ...m.shape,
1003
- feature_type: e.string().enum(Xt),
1016
+ feature_type: e.string().enum(en),
1004
1017
  config: e.object({
1005
1018
  survey_id: e.string(),
1006
1019
  survey_url: e.string()
1007
1020
  })
1008
- }), Wt = l.Team, en = e.object({
1021
+ }), nn = l.Team, rn = e.object({
1009
1022
  ...m.shape,
1010
- feature_type: e.string().enum(Wt),
1023
+ feature_type: e.string().enum(nn),
1011
1024
  config: e.object({
1012
1025
  max_members: e.number().min(1),
1013
1026
  min_members: e.number().min(1)
1014
1027
  })
1015
- }), tn = l.Vote, nn = e.object({
1028
+ }), an = l.Vote, on = e.object({
1016
1029
  sn: e.string(),
1017
1030
  name: e.string(),
1018
1031
  img_urls: e.array(e.string()).optional(),
@@ -1022,132 +1035,157 @@ const v = {
1022
1035
  amount: e.number(),
1023
1036
  finalists: e.bool(),
1024
1037
  last_vote_time: e.number()
1025
- }), rn = e.object({
1038
+ }), sn = e.object({
1026
1039
  ...m.shape,
1027
- feature_type: e.string().enum(tn),
1040
+ feature_type: e.string().enum(an),
1028
1041
  config: e.object({
1029
1042
  vote_feature_ids: e.array(e.number()),
1030
1043
  submission_feature_ids: e.array(e.number()),
1031
1044
  finalists_amount: e.number(),
1032
- source: at,
1033
- options: e.array(nn),
1045
+ source: ot,
1046
+ options: e.array(on),
1034
1047
  rewards: e.array($)
1035
1048
  })
1036
- }), an = l.ZeroChatgpt, on = e.object({
1049
+ }), cn = l.Vote2, ln = e.object({
1050
+ candidate_id: e.string(),
1051
+ display_name: e.string(),
1052
+ images: e.array(e.string()).optional(),
1053
+ videos: e.array(e.string()).optional(),
1054
+ description: e.string().optional(),
1055
+ jump_url: e.string(),
1056
+ base_votes: e.number(),
1057
+ votes_multiplier: e.number()
1058
+ }), mn = e.object({
1037
1059
  ...m.shape,
1038
- feature_type: e.string().enum(an)
1039
- }), sn = e.union(
1040
- yt,
1041
- ht,
1042
- Ct,
1043
- Rt,
1044
- Tt,
1060
+ feature_type: e.string().enum(cn),
1061
+ config: e.object({
1062
+ vote_item_id: e.number().optional(),
1063
+ candidates: e.array(ln),
1064
+ vote_since: e.number(),
1065
+ vote_until: e.number(),
1066
+ rewards_since: e.number(),
1067
+ rewards_until: e.number(),
1068
+ winner_strategy: e.string().enum("votes", "manual"),
1069
+ total_winners: e.number(),
1070
+ winner_rewards: e.array(M).optional(),
1071
+ consolation_rewards: e.array(M).optional()
1072
+ })
1073
+ }), un = l.ZeroChatgpt, dn = e.object({
1074
+ ...m.shape,
1075
+ feature_type: e.string().enum(un)
1076
+ }), gn = e.union(
1077
+ wt,
1078
+ vt,
1079
+ jt,
1080
+ qt,
1045
1081
  St,
1046
- Pt,
1047
1082
  Et,
1048
- Dt,
1049
- Gt,
1050
- Nt,
1051
- Bt,
1052
- Kt,
1053
- zt,
1054
- Zt,
1055
- Yt,
1056
- en,
1083
+ Ft,
1084
+ It,
1085
+ Ot,
1086
+ Qt,
1087
+ Mt,
1088
+ Ht,
1089
+ Jt,
1090
+ Xt,
1091
+ Wt,
1092
+ tn,
1057
1093
  rn,
1058
- kt,
1059
- on
1060
- ).key("feature_type").satisfies(), cn = e.object({
1094
+ sn,
1095
+ mn,
1096
+ Ct,
1097
+ dn
1098
+ ).key("feature_type").satisfies(), pn = e.object({
1061
1099
  event_name: e.string(),
1062
1100
  rules: e.string(),
1063
1101
  since: e.number(),
1064
1102
  until: e.number(),
1065
1103
  visit_count: e.number().optional(),
1066
- features: e.array(sn)
1067
- }).lock(), T = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ln = e.object({
1068
- order_total_amount: T,
1069
- cashback_total_amount: T,
1070
- game_item_count: T
1071
- }), mn = e.object({
1104
+ features: e.array(gn)
1105
+ }).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), _n = e.object({
1106
+ order_total_amount: q,
1107
+ cashback_total_amount: q,
1108
+ game_item_count: q
1109
+ }), bn = e.object({
1072
1110
  activation_key: e.string().disallow("")
1073
- }), un = e.object({
1111
+ }), yn = e.object({
1074
1112
  gift_code: e.string()
1075
- }), dn = e.object({
1113
+ }), fn = e.object({
1076
1114
  user_id: e.string(),
1077
1115
  name: e.string().optional(),
1078
1116
  avatar_url: e.string().optional()
1079
- }), gn = e.object({
1117
+ }), hn = e.object({
1080
1118
  lottery_count: e.number()
1081
- }), E = e.object({
1119
+ }), V = e.object({
1082
1120
  reward_id: e.number(),
1083
1121
  reward_item_id: e.number(),
1084
- reward_source: P,
1122
+ reward_source: E,
1085
1123
  reward_item_name: e.string(),
1086
- reward_item_type: Y,
1124
+ reward_item_type: W,
1087
1125
  reward_item_icon_url: e.string(),
1088
1126
  reward_item_desc: e.string().optional(),
1089
1127
  reward_item_rating: e.number(),
1090
1128
  reward_amount: e.number(),
1091
- reward_status: L,
1129
+ reward_status: P,
1092
1130
  event_id: e.number(),
1093
1131
  event_name: e.string(),
1094
1132
  feature_id: e.number(),
1095
1133
  engagement_id: e.number(),
1096
- feature_type: tt,
1134
+ feature_type: nt,
1097
1135
  receive_time: e.number(),
1098
1136
  extra_data: e.record(e.unknown()).optional()
1099
- }), pn = e.string().enum(f.Unknown, f.Pending), _n = e.union(
1137
+ }), wn = e.string().enum(f.Unknown, f.Pending), kn = e.union(
1100
1138
  e.object({
1101
1139
  ticket: e.string(),
1102
- status: pn
1140
+ status: wn
1103
1141
  }),
1104
1142
  e.object({
1105
1143
  ticket: e.string(),
1106
1144
  status: e.string().enum(k(f, "Unknown", "Pending")),
1107
- reward: E
1145
+ reward: V
1108
1146
  })
1109
- ).satisfies(), bn = e.object({
1110
- tickets: e.array(_n)
1111
- }), yn = e.object({
1147
+ ).satisfies(), vn = e.object({
1148
+ tickets: e.array(kn)
1149
+ }), Vn = e.object({
1112
1150
  platforms: e.array(e.string())
1113
- }), re = e.object({
1151
+ }), ae = e.object({
1114
1152
  role_name: e.string(),
1115
1153
  is_leader: e.bool(),
1116
1154
  is_myself: e.bool().optional(),
1117
1155
  progress: e.number().optional()
1118
- }).lock(), fn = e.object({
1119
- objective: ee,
1156
+ }).lock(), Cn = e.object({
1157
+ objective: te,
1120
1158
  progress: e.number(),
1121
1159
  completion_value: e.number().optional(),
1122
1160
  team: e.object({
1123
1161
  progress: e.number(),
1124
1162
  completion_value: e.number().optional(),
1125
- players: e.array(re)
1163
+ players: e.array(ae)
1126
1164
  }).optional()
1127
- }), hn = e.object({
1165
+ }), Rn = e.object({
1128
1166
  progress: e.number(),
1129
1167
  team: e.object({
1130
1168
  progress: e.number(),
1131
- team_members: e.array(re).optional()
1169
+ team_members: e.array(ae).optional()
1132
1170
  }).optional()
1133
- }), wn = e.object({
1171
+ }), jn = e.object({
1134
1172
  platform: e.string()
1135
- }), kn = e.object({
1173
+ }), Tn = e.object({
1136
1174
  weixin_openid: e.string()
1137
- }), vn = e.object({
1175
+ }), qn = e.object({
1138
1176
  serial_number: e.number()
1139
- }), Cn = e.object({
1177
+ }), xn = e.object({
1140
1178
  team_code: e.string(),
1141
1179
  leader_name: e.string(),
1142
1180
  total_members: e.number()
1143
- }), Nr = e.object({
1181
+ }), Wr = e.object({
1144
1182
  is_leader: e.bool(),
1145
1183
  is_myself: e.bool().optional(),
1146
1184
  role_name: e.string(),
1147
1185
  server_name: e.string()
1148
- }), Vn = e.object({
1186
+ }), Sn = e.object({
1149
1187
  team_code: e.string(),
1150
- visibility: lt,
1188
+ visibility: mt,
1151
1189
  members: e.array(
1152
1190
  e.object({
1153
1191
  is_leader: e.bool(),
@@ -1155,14 +1193,27 @@ const v = {
1155
1193
  server_name: e.string()
1156
1194
  })
1157
1195
  )
1158
- }), Rn = e.object({
1196
+ }), Ln = e.object({
1159
1197
  option_sn: e.string()
1160
- }), jn = e.object({
1198
+ }), Pn = e.object({
1199
+ candidate_id: e.string(),
1200
+ total_votes: e.number().optional(),
1201
+ my_votes: e.number().optional(),
1202
+ votes: e.number().optional()
1203
+ }), En = e.object({
1204
+ rewards_type: _t,
1205
+ rewards: e.array(V).optional()
1206
+ }), $n = e.object({
1207
+ candidate_id: e.string(),
1208
+ is_winner: e.bool(),
1209
+ total_votes: e.number(),
1210
+ my_votes: e.number()
1211
+ }), Fn = e.object({
1161
1212
  role: e.string(),
1162
1213
  content: e.string()
1163
- }), Tn = e.object({
1164
- conversations: e.array(jn)
1165
- }), qn = e.object({
1214
+ }), Un = e.object({
1215
+ conversations: e.array(Fn)
1216
+ }), In = e.object({
1166
1217
  user_id: e.string(),
1167
1218
  name: e.string(),
1168
1219
  avatar_url: e.string(),
@@ -1170,50 +1221,51 @@ const v = {
1170
1221
  video_note: e.number(),
1171
1222
  created_at: e.number()
1172
1223
  }), F = e.union(
1173
- yn,
1174
- gn,
1175
- vn,
1176
- dn,
1177
- wn,
1178
- Rn,
1179
- kn,
1180
- ln,
1181
- un,
1182
1224
  Vn,
1225
+ hn,
1226
+ qn,
1183
1227
  fn,
1184
- bn,
1185
- mn,
1228
+ jn,
1229
+ Ln,
1230
+ Pn,
1186
1231
  Tn,
1232
+ _n,
1233
+ yn,
1234
+ Sn,
1235
+ Cn,
1236
+ vn,
1237
+ bn,
1238
+ Un,
1187
1239
  e.custom(
1188
1240
  "EmptyObject",
1189
1241
  (i) => w(i) && Object.keys(i).length === 0
1190
1242
  )
1191
- ).satisfies().lock(), xn = e.object({
1243
+ ).satisfies().lock(), Dn = e.object({
1192
1244
  reward_id: e.number(),
1193
1245
  reward_item_id: e.number(),
1194
- reward_item_type: W,
1246
+ reward_item_type: ee,
1195
1247
  reward_count: e.number(),
1196
- reward_status: te,
1197
- reward_source: P,
1248
+ reward_status: ne,
1249
+ reward_source: E,
1198
1250
  reward_item_name: e.string(),
1199
1251
  reward_item_icon_url: e.string(),
1200
1252
  reward_item_desc: e.string().optional(),
1201
1253
  reward_item_rating: e.number(),
1202
1254
  receive_time: e.number(),
1203
1255
  extra_data: e.union(...F.validators, e.record(e.unknown())).satisfies().optional()
1204
- }), Sn = e.object({
1256
+ }), An = e.object({
1205
1257
  reward_id: e.number(),
1206
1258
  reward_item_id: e.number(),
1207
1259
  reward_item_name: e.string(),
1208
- reward_item_type: W,
1260
+ reward_item_type: ee,
1209
1261
  reward_item_icon_url: e.string(),
1210
1262
  reward_item_desc: e.string().optional(),
1211
1263
  reward_item_rating: e.number(),
1212
1264
  reward_amount: e.number(),
1213
- reward_status: te,
1214
- reward_source: P,
1265
+ reward_status: ne,
1266
+ reward_source: E,
1215
1267
  extra_data: e.record(e.unknown()).optional()
1216
- }), Ln = e.object({
1268
+ }), Gn = e.object({
1217
1269
  engagement_id: e.number(),
1218
1270
  user_id: e.string(),
1219
1271
  event_id: e.number(),
@@ -1223,15 +1275,15 @@ const v = {
1223
1275
  server_id: e.string().optional(),
1224
1276
  role_id: e.string().optional(),
1225
1277
  created_at: e.number(),
1226
- rewards: e.array(xn).optional()
1227
- }).lock(), Pn = e.object({
1278
+ rewards: e.array(Dn).optional()
1279
+ }).lock(), On = e.object({
1228
1280
  allowed: e.bool(),
1229
1281
  registered: e.bool()
1230
- }), $n = e.object({
1282
+ }), Nn = e.object({
1231
1283
  feature_id: e.number(),
1232
1284
  can_engage: e.bool(),
1233
1285
  has_unclaimed_rewards: e.bool()
1234
- }), En = e.object({
1286
+ }), Qn = e.object({
1235
1287
  engagement_id: e.number(),
1236
1288
  engagement: e.object({
1237
1289
  engagement_id: e.number(),
@@ -1239,37 +1291,41 @@ const v = {
1239
1291
  feature_id: e.number(),
1240
1292
  data: F.clone().optional()
1241
1293
  }).optional(),
1242
- rewards: e.array(Sn).optional(),
1294
+ rewards: e.array(An).optional(),
1243
1295
  scan: e.bool().optional()
1244
- }), Fn = e.object({
1296
+ }), Bn = e.object({
1245
1297
  reward_id: e.number(),
1246
- reward_status: L
1247
- }), Un = e.guard(cn), In = e.guard(Pn), q = s({ count: e.number() }), Dn = s({ first_visit: e.bool() }), An = s({
1248
- engagements: e.union(e.array(qn), e.array(Cn))
1249
- }), Gn = s({
1250
- status: e.array($n)
1251
- }), On = s({
1298
+ reward_status: P
1299
+ }), Mn = e.guard(pn), Kn = e.guard(On), x = s({ count: e.number() }), Hn = s({ first_visit: e.bool() }), zn = s({
1300
+ engagements: e.union(e.array(In), e.array(xn))
1301
+ }), Jn = s({
1302
+ status: e.array(Nn)
1303
+ }), Zn = s({
1252
1304
  engagements_counts: e.record(e.number())
1253
- }), Nn = s({
1254
- engagements: e.array(Ln),
1305
+ }), Xn = s({
1306
+ engagements: e.array(Gn),
1255
1307
  next_token: e.string().optional()
1256
- }), Qn = e.guard(En), Bn = s({
1257
- claimed_items: e.array(Fn)
1258
- }), Mn = s({
1259
- rewards: e.array(E)
1260
- }), Kn = s({
1261
- reward_status: L
1262
- }), Hn = s({
1263
- user_rewards: e.array(E),
1308
+ }), Yn = e.guard(Qn), Wn = s({
1309
+ claimed_items: e.array(Bn)
1310
+ }), er = s({
1311
+ rewards: e.array(V)
1312
+ }), tr = s({
1313
+ reward_status: P
1314
+ }), nr = s({
1315
+ user_rewards: e.array(V),
1264
1316
  next_token: e.string().optional()
1265
- }), zn = s({
1317
+ }), rr = s({
1266
1318
  scene: e.string()
1267
- }), Jn = s({
1319
+ }), ar = s({
1268
1320
  params: e.string()
1269
- }), Zn = s({
1321
+ }), or = s({
1270
1322
  img: e.string()
1271
- }), Xn = e.guard(hn);
1272
- class Qr {
1323
+ }), ir = e.guard(Rn), sr = e.guard(En), cr = e.guard(
1324
+ e.object({
1325
+ candidate_votes: e.array($n)
1326
+ })
1327
+ );
1328
+ class ea {
1273
1329
  token;
1274
1330
  event = 0;
1275
1331
  req;
@@ -1282,7 +1338,7 @@ class Qr {
1282
1338
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
1283
1339
  */
1284
1340
  async verifyMobileAllowed(t, n, r) {
1285
- const { data: a } = await this.req.get("verify-mobile-allowed", In, {
1341
+ const { data: a } = await this.req.get("verify-mobile-allowed", Kn, {
1286
1342
  ...r,
1287
1343
  params: { game_id: t, mobile: n }
1288
1344
  });
@@ -1294,7 +1350,7 @@ class Qr {
1294
1350
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
1295
1351
  */
1296
1352
  async getConfig(t) {
1297
- const { data: n } = await this.req.get(`event/${this.event}/event-config`, Un, t);
1353
+ const { data: n } = await this.req.get(`event/${this.event}/event-config`, Mn, t);
1298
1354
  return n;
1299
1355
  }
1300
1356
  /**
@@ -1303,7 +1359,7 @@ class Qr {
1303
1359
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1304
1360
  */
1305
1361
  async getEngagementsUserCount(t, n) {
1306
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1362
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1307
1363
  ...n,
1308
1364
  params: { feature_id: t, type: "user" }
1309
1365
  });
@@ -1315,7 +1371,7 @@ class Qr {
1315
1371
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1316
1372
  */
1317
1373
  async getEngagementsCount(t, n) {
1318
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1374
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1319
1375
  ...n,
1320
1376
  params: { feature_id: t, type: "engagement" }
1321
1377
  });
@@ -1329,7 +1385,7 @@ class Qr {
1329
1385
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
1330
1386
  */
1331
1387
  async getEngagements(t, n) {
1332
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, An, {
1388
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, zn, {
1333
1389
  ...n,
1334
1390
  params: { feature_id: t }
1335
1391
  });
@@ -1345,7 +1401,7 @@ class Qr {
1345
1401
  const { data: r, code: a, message: o } = await this.req.post(
1346
1402
  `event/${this.event}/visit`,
1347
1403
  c(t || {}),
1348
- Dn,
1404
+ Hn,
1349
1405
  n
1350
1406
  );
1351
1407
  return r ?? {
@@ -1358,13 +1414,11 @@ class Qr {
1358
1414
  *
1359
1415
  * 💡活动下包含 engage_account_type 为 role_id 的玩法时,需要提供 server_id 和 role_id
1360
1416
  *
1361
- * 🔕请求静默进行,无消息提示
1362
- *
1363
1417
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
1364
1418
  */
1365
1419
  async getUserFeatureStatus(t, n) {
1366
1420
  if (!await this.token.autoLogin()) return [];
1367
- const { data: r } = await this.req.get("event/user-feature-status", Gn, {
1421
+ const { data: r } = await this.req.get("event/user-feature-status", Jn, {
1368
1422
  ...n,
1369
1423
  message: !1,
1370
1424
  params: c({ ...t, event_id: this.event })
@@ -1378,7 +1432,7 @@ class Qr {
1378
1432
  */
1379
1433
  async getUserEngagementCount(t, n) {
1380
1434
  if (!await this.token.autoLogin()) return {};
1381
- const { data: r } = await this.req.get("event/user-engagements-count", On, {
1435
+ const { data: r } = await this.req.get("event/user-engagements-count", Zn, {
1382
1436
  message: !1,
1383
1437
  params: c({ ...n, event_id: this.event, feature_id: t })
1384
1438
  });
@@ -1397,7 +1451,7 @@ class Qr {
1397
1451
  engagements: [],
1398
1452
  next_token: ""
1399
1453
  };
1400
- const { data: a } = await this.req.get("event/user-engagements", Nn, {
1454
+ const { data: a } = await this.req.get("event/user-engagements", Xn, {
1401
1455
  ...r,
1402
1456
  params: c({
1403
1457
  max_results: 20,
@@ -1429,13 +1483,13 @@ class Qr {
1429
1483
  engagement: n,
1430
1484
  ...r
1431
1485
  }),
1432
- Qn,
1486
+ Yn,
1433
1487
  a
1434
1488
  );
1435
1489
  return o ?? {
1436
1490
  message: p,
1437
1491
  error: g
1438
- // 激活码已领完
1492
+ // 您的道具数量不足,请先获取足够的道具
1439
1493
  };
1440
1494
  }
1441
1495
  /**
@@ -1453,7 +1507,7 @@ class Qr {
1453
1507
  ...t,
1454
1508
  server_id: t.server_id ? +t.server_id : void 0
1455
1509
  }),
1456
- Bn,
1510
+ Wn,
1457
1511
  n
1458
1512
  );
1459
1513
  return r?.claimed_items || {
@@ -1474,7 +1528,7 @@ class Qr {
1474
1528
  ...t,
1475
1529
  server_id: t.server_id ? +t.server_id : void 0
1476
1530
  }),
1477
- Mn,
1531
+ er,
1478
1532
  n
1479
1533
  );
1480
1534
  return r?.rewards || {
@@ -1492,7 +1546,7 @@ class Qr {
1492
1546
  const { data: r, code: a, message: o } = await this.req.post(
1493
1547
  "event/claim-weixin-hongbao",
1494
1548
  { reward_id: t },
1495
- Kn,
1549
+ tr,
1496
1550
  n
1497
1551
  );
1498
1552
  return r || {
@@ -1533,7 +1587,7 @@ class Qr {
1533
1587
  const { data: r } = await this.req.post(
1534
1588
  "event/user-rewards",
1535
1589
  c({ max_results: 20, ...t, event_id: this.event }),
1536
- Hn,
1590
+ nr,
1537
1591
  n
1538
1592
  );
1539
1593
  return {
@@ -1548,7 +1602,7 @@ class Qr {
1548
1602
  */
1549
1603
  async getUserItemCount(t, n) {
1550
1604
  if (!await this.token.autoLogin()) return null;
1551
- const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, q, {
1605
+ const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, x, {
1552
1606
  ...n,
1553
1607
  params: { item_id: t }
1554
1608
  });
@@ -1581,7 +1635,7 @@ class Qr {
1581
1635
  */
1582
1636
  async getUnlimitQrcodeScene(t, n) {
1583
1637
  if (!await this.token.autoLogin()) return null;
1584
- const { data: r } = await this.req.get("event/unlimit-qrcode-scene", zn, {
1638
+ const { data: r } = await this.req.get("event/unlimit-qrcode-scene", rr, {
1585
1639
  ...n,
1586
1640
  params: { params: t }
1587
1641
  });
@@ -1595,7 +1649,7 @@ class Qr {
1595
1649
  * @param scene - 小程序码 scene 值
1596
1650
  */
1597
1651
  async getParamsByQrcodeScene(t, n) {
1598
- const { data: r } = await this.req.get("event/params-by-qrcode-scene", Jn, {
1652
+ const { data: r } = await this.req.get("event/params-by-qrcode-scene", ar, {
1599
1653
  ...n,
1600
1654
  params: { scene: t }
1601
1655
  });
@@ -1611,19 +1665,19 @@ class Qr {
1611
1665
  const { data: r } = await this.req.post(
1612
1666
  "event/unlimit-qrcode",
1613
1667
  c(t),
1614
- Zn,
1668
+ or,
1615
1669
  n
1616
1670
  );
1617
1671
  return r?.img ?? null;
1618
1672
  }
1619
1673
  /**
1620
- * 本接口用于获取任务玩法的实时进度数据
1674
+ * 本接口用于获取任务玩法的实时进度数据,支持部分任务进度的查询:累计充值金额 / 累计游戏内活跃值 / 账号等级目标
1621
1675
  *
1622
1676
  * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=ZAnm12d3f0
1623
1677
  */
1624
1678
  async getQuestProgress(t, n) {
1625
1679
  if (!await this.token.autoLogin()) return null;
1626
- const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, Xn, {
1680
+ const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, ir, {
1627
1681
  message: !1,
1628
1682
  ...n,
1629
1683
  params: { feature_id: t }
@@ -1633,13 +1687,44 @@ class Qr {
1633
1687
  error: a
1634
1688
  };
1635
1689
  }
1690
+ /**
1691
+ * 领取投票(vote2)玩法获得的奖励
1692
+ *
1693
+ * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=fabGKteIEK
1694
+ */
1695
+ async claimVote2Rewards(t, n) {
1696
+ if (!await this.token.autoLogin()) return null;
1697
+ const { data: r, code: a, message: o } = await this.req.post(
1698
+ "event/vote2/rewards",
1699
+ { feature_id: t },
1700
+ sr,
1701
+ n
1702
+ );
1703
+ return r || {
1704
+ message: o,
1705
+ code: a
1706
+ };
1707
+ }
1708
+ /**
1709
+ * 查询投票(vote2)玩法排行榜数据
1710
+ *
1711
+ * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=cYZMVXbP4u
1712
+ */
1713
+ async getVote2Leaderboard(t, n) {
1714
+ if (!await this.token.autoLogin()) return [];
1715
+ const { data: r } = await this.req.get("event/vote2/leaderboard", cr, {
1716
+ ...n,
1717
+ params: { feature_id: t }
1718
+ });
1719
+ return r?.candidate_votes || [];
1720
+ }
1636
1721
  }
1637
- const Yn = {
1722
+ const lr = {
1638
1723
  /** 所有人均可以发帖 */
1639
1724
  All: "all",
1640
1725
  /** 指定用户可发帖 */
1641
1726
  Limit: "limit"
1642
- }, Wn = e.string().enum(Yn).lock(), er = {
1727
+ }, mr = e.string().enum(lr).lock(), ur = {
1643
1728
  /** 待审核(仅自己可见) */
1644
1729
  Pending: "pending",
1645
1730
  /** 审核通过 */
@@ -1648,14 +1733,14 @@ const Yn = {
1648
1733
  Failed: "failed",
1649
1734
  /** 嫌疑(仅自己可见) */
1650
1735
  Suspect: "suspect"
1651
- }, ae = e.string().enum(er).lock(), tr = {
1736
+ }, oe = e.string().enum(ur).lock(), dr = {
1652
1737
  /** 系统通知 */
1653
1738
  System: "system",
1654
1739
  /** 评论我的 */
1655
1740
  Comment: "comment",
1656
1741
  /** 点赞通知 */
1657
1742
  Like: "like"
1658
- }, Br = e.string().enum(tr).lock(), u = {
1743
+ }, ta = e.string().enum(dr).lock(), u = {
1659
1744
  /** 系统通知 */
1660
1745
  System: "system",
1661
1746
  /** 帖子被置顶 */
@@ -1680,13 +1765,13 @@ const Yn = {
1680
1765
  ReplyLiked: "reply_liked",
1681
1766
  /** 回复被删除 */
1682
1767
  ReplyDeleted: "reply_deleted"
1683
- }, nr = e.string().enum(u).lock(), oe = e.object({
1768
+ }, gr = e.string().enum(u).lock(), ie = e.object({
1684
1769
  forum_id: e.number(),
1685
1770
  icon_url: e.string(),
1686
1771
  name: e.string(),
1687
1772
  tags: e.array(e.string()),
1688
1773
  sort: e.number(),
1689
- mode: Wn,
1774
+ mode: mr,
1690
1775
  member_ids: e.array(e.number())
1691
1776
  }).lock(), U = e.object({
1692
1777
  topic_id: e.number(),
@@ -1697,7 +1782,7 @@ const Yn = {
1697
1782
  post_num: e.number()
1698
1783
  }).lock(), I = e.object({
1699
1784
  post_id: e.number(),
1700
- forum: oe,
1785
+ forum: ie,
1701
1786
  posted_by: e.string(),
1702
1787
  nickname: e.string(),
1703
1788
  avatar_url: e.string(),
@@ -1713,11 +1798,11 @@ const Yn = {
1713
1798
  event_ids: e.array(e.number()),
1714
1799
  is_pinned: e.bool(),
1715
1800
  is_highlighted: e.bool(),
1716
- status: ae,
1801
+ status: oe,
1717
1802
  create_time: e.number()
1718
- }).lock(), ie = e.object({
1803
+ }).lock(), se = e.object({
1719
1804
  err_msg: e.string().optional()
1720
- }).optional().lock(), rr = e.object({
1805
+ }).optional().lock(), pr = e.object({
1721
1806
  reply_id: e.number(),
1722
1807
  reply_content: e.string().optional(),
1723
1808
  replied_by: e.string(),
@@ -1736,7 +1821,7 @@ const Yn = {
1736
1821
  content: e.string(),
1737
1822
  like_num: e.number(),
1738
1823
  liked: e.bool(),
1739
- reply_to: rr,
1824
+ reply_to: pr,
1740
1825
  create_time: e.number()
1741
1826
  }).lock(), h = e.object({
1742
1827
  comment_id: e.number(),
@@ -1756,21 +1841,21 @@ const Yn = {
1756
1841
  liked: e.bool(),
1757
1842
  image_url: e.string(),
1758
1843
  create_time: e.number(),
1759
- status: ae,
1844
+ status: oe,
1760
1845
  replies: e.array(C).optional()
1761
- }).lock(), ar = e.object({
1846
+ }).lock(), _r = e.object({
1762
1847
  image_url: e.string(),
1763
1848
  upload_url: e.string(),
1764
1849
  existed: e.bool()
1765
1850
  }).lock(), _ = e.object({
1766
1851
  notification_id: e.string(),
1767
- notification_type: nr,
1852
+ notification_type: gr,
1768
1853
  is_read: e.bool(),
1769
1854
  create_time: e.number(),
1770
1855
  origin_user_id: e.string(),
1771
1856
  origin_user_name: e.string(),
1772
1857
  origin_user_avatar_url: e.string()
1773
- }).lock(), or = e.object({
1858
+ }).lock(), br = e.object({
1774
1859
  system_message_subject: e.string(),
1775
1860
  system_message_content: e.string()
1776
1861
  }).lock(), D = e.object({
@@ -1778,17 +1863,17 @@ const Yn = {
1778
1863
  post_subject: e.string(),
1779
1864
  post_summary: e.string(),
1780
1865
  post_image_url: e.string()
1781
- }).lock(), V = e.object({
1866
+ }).lock(), R = e.object({
1782
1867
  comment_id: e.number(),
1783
1868
  comment_content: e.string()
1784
1869
  }).lock(), A = e.object({
1785
1870
  reply_id: e.number(),
1786
1871
  reply_content: e.string()
1787
- }).lock(), ir = e.object({
1872
+ }).lock(), yr = e.object({
1788
1873
  ..._.shape,
1789
- ...or.shape,
1874
+ ...br.shape,
1790
1875
  notification_type: e.string().enum(u.System)
1791
- }), sr = e.object({
1876
+ }), fr = e.object({
1792
1877
  ..._.shape,
1793
1878
  ...D.shape,
1794
1879
  notification_type: e.string().enum(
@@ -1797,68 +1882,68 @@ const Yn = {
1797
1882
  u.PostDeleted,
1798
1883
  u.PostLiked
1799
1884
  )
1800
- }), cr = e.object({
1885
+ }), hr = e.object({
1801
1886
  ..._.shape,
1802
1887
  ...D.shape,
1803
- ...V.shape,
1888
+ ...R.shape,
1804
1889
  notification_type: e.string().enum(u.PostCommented)
1805
- }), lr = e.object({
1890
+ }), wr = e.object({
1806
1891
  ..._.shape,
1807
- ...V.shape,
1892
+ ...R.shape,
1808
1893
  ...A.shape,
1809
1894
  notification_type: e.string().enum(u.CommentReplied)
1810
- }), mr = e.object({
1895
+ }), kr = e.object({
1811
1896
  ..._.shape,
1812
- ...V.shape,
1897
+ ...R.shape,
1813
1898
  ...D.shape,
1814
1899
  notification_type: e.string().enum(u.CommentLiked, u.CommentDeleted)
1815
- }), ur = e.object({
1900
+ }), vr = e.object({
1816
1901
  ..._.shape,
1817
1902
  ...A.shape,
1818
1903
  notification_type: e.string().enum(u.ReplyReplied),
1819
1904
  comment_id: e.number(),
1820
1905
  reply_to_reply_id: e.number(),
1821
1906
  reply_to_reply_content: e.string()
1822
- }), dr = e.object({
1907
+ }), Vr = e.object({
1823
1908
  ..._.shape,
1824
1909
  ...A.shape,
1825
- ...V.shape,
1910
+ ...R.shape,
1826
1911
  notification_type: e.string().enum(u.ReplyLiked, u.ReplyDeleted)
1827
- }), gr = e.union(
1828
- ir,
1829
- sr,
1830
- cr,
1831
- lr,
1832
- mr,
1833
- ur,
1834
- dr
1835
- ).satisfies().lock(), pr = s({ forums: e.array(oe) }), _r = s({ topics: e.array(U) }), br = s({ topic: U }), yr = s({ post: I }), M = s({
1912
+ }), Cr = e.union(
1913
+ yr,
1914
+ fr,
1915
+ hr,
1916
+ wr,
1917
+ kr,
1918
+ vr,
1919
+ Vr
1920
+ ).satisfies().lock(), Rr = s({ forums: e.array(ie) }), jr = s({ topics: e.array(U) }), Tr = s({ topic: U }), qr = s({ post: I }), K = s({
1836
1921
  posts: e.array(I),
1837
1922
  next_token: e.string().optional()
1838
- }), fr = s({
1923
+ }), xr = s({
1839
1924
  post: I.clone().optional(),
1840
- antispam: ie.clone().optional()
1841
- }), hr = s({
1925
+ antispam: se.clone().optional()
1926
+ }), Sr = s({
1842
1927
  replies: e.array(C),
1843
1928
  next_token: e.string().optional()
1844
- }), wr = s({ reply: C }), kr = s({
1929
+ }), Lr = s({ reply: C }), Pr = s({
1845
1930
  reply: C.clone().optional(),
1846
- antispam: ie.clone().optional()
1847
- }), vr = s({ comment: h }), Cr = s({
1931
+ antispam: se.clone().optional()
1932
+ }), Er = s({ comment: h }), $r = s({
1848
1933
  comments: e.array(h),
1849
1934
  next_token: e.string().optional()
1850
- }), Vr = s({
1935
+ }), Fr = s({
1851
1936
  comment: h.clone().optional(),
1852
1937
  antispam: h.clone().optional()
1853
- }), Rr = e.guard(ar), jr = s({
1854
- notifications: e.array(gr),
1938
+ }), Ur = e.guard(_r), Ir = s({
1939
+ notifications: e.array(Cr),
1855
1940
  next_token: e.string().optional()
1856
- }), Tr = s({
1941
+ }), Dr = s({
1857
1942
  system: e.number(),
1858
1943
  comment: e.number(),
1859
1944
  like: e.number()
1860
1945
  });
1861
- class Mr {
1946
+ class na {
1862
1947
  token;
1863
1948
  req;
1864
1949
  constructor(t) {
@@ -1870,7 +1955,7 @@ class Mr {
1870
1955
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
1871
1956
  */
1872
1957
  async getForums(t) {
1873
- const { data: n } = await this.req.get("community/forums", pr, t);
1958
+ const { data: n } = await this.req.get("community/forums", Rr, t);
1874
1959
  return n?.forums || [];
1875
1960
  }
1876
1961
  /**
@@ -1879,7 +1964,7 @@ class Mr {
1879
1964
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
1880
1965
  */
1881
1966
  async getTopics(t) {
1882
- const { data: n } = await this.req.get("community/topics", _r, t);
1967
+ const { data: n } = await this.req.get("community/topics", jr, t);
1883
1968
  return n?.topics || [];
1884
1969
  }
1885
1970
  /**
@@ -1888,7 +1973,7 @@ class Mr {
1888
1973
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
1889
1974
  */
1890
1975
  async getTopic(t, n) {
1891
- const { data: r, code: a } = await this.req.get("community/topic", br, {
1976
+ const { data: r, code: a } = await this.req.get("community/topic", Tr, {
1892
1977
  ...n,
1893
1978
  params: { topic_id: t }
1894
1979
  });
@@ -1900,7 +1985,7 @@ class Mr {
1900
1985
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
1901
1986
  */
1902
1987
  async getPosts(t, n) {
1903
- const { data: r, code: a, message: o } = await this.req.get("community/posts", M, {
1988
+ const { data: r, code: a, message: o } = await this.req.get("community/posts", K, {
1904
1989
  ...n,
1905
1990
  params: c(t)
1906
1991
  });
@@ -1915,7 +2000,7 @@ class Mr {
1915
2000
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
1916
2001
  */
1917
2002
  async getPinnedPosts(t, n, r, a) {
1918
- const { data: o, code: g, message: p } = await this.req.get("community/pinned-posts", M, {
2003
+ const { data: o, code: g, message: p } = await this.req.get("community/pinned-posts", K, {
1919
2004
  ...a,
1920
2005
  params: c({ forum_id: t, max_results: n, next_token: r })
1921
2006
  });
@@ -1930,7 +2015,7 @@ class Mr {
1930
2015
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
1931
2016
  */
1932
2017
  async getPost(t, n) {
1933
- const { data: r, code: a, message: o } = await this.req.get("community/post", yr, {
2018
+ const { data: r, code: a, message: o } = await this.req.get("community/post", qr, {
1934
2019
  ...n,
1935
2020
  params: { post_id: t }
1936
2021
  });
@@ -1948,7 +2033,7 @@ class Mr {
1948
2033
  const { data: r, code: a, message: o } = await this.req.post(
1949
2034
  "community/post",
1950
2035
  c(t),
1951
- fr,
2036
+ xr,
1952
2037
  n
1953
2038
  );
1954
2039
  return r ?? {
@@ -1962,7 +2047,7 @@ class Mr {
1962
2047
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
1963
2048
  */
1964
2049
  async getComments(t, n) {
1965
- const { data: r, code: a, message: o } = await this.req.get("community/comments", Cr, {
2050
+ const { data: r, code: a, message: o } = await this.req.get("community/comments", $r, {
1966
2051
  ...n,
1967
2052
  params: c(t)
1968
2053
  });
@@ -1977,7 +2062,7 @@ class Mr {
1977
2062
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
1978
2063
  */
1979
2064
  async getComment(t, n) {
1980
- const { data: r, code: a, message: o } = await this.req.get("community/comment", vr, {
2065
+ const { data: r, code: a, message: o } = await this.req.get("community/comment", Er, {
1981
2066
  ...n,
1982
2067
  params: { comment_id: t }
1983
2068
  });
@@ -1996,7 +2081,7 @@ class Mr {
1996
2081
  const { data: r, code: a, message: o } = await this.req.post(
1997
2082
  "community/comment",
1998
2083
  c(t),
1999
- Vr,
2084
+ Fr,
2000
2085
  n
2001
2086
  );
2002
2087
  return r ?? {
@@ -2010,7 +2095,7 @@ class Mr {
2010
2095
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
2011
2096
  */
2012
2097
  async getReplies(t, n) {
2013
- const { data: r } = await this.req.get("community/replies", hr, {
2098
+ const { data: r } = await this.req.get("community/replies", Sr, {
2014
2099
  ...n,
2015
2100
  params: c({ max_results: 20, ...t })
2016
2101
  });
@@ -2025,7 +2110,7 @@ class Mr {
2025
2110
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
2026
2111
  */
2027
2112
  async getReply(t, n) {
2028
- const { data: r, code: a, message: o } = await this.req.get("community/reply", wr, {
2113
+ const { data: r, code: a, message: o } = await this.req.get("community/reply", Lr, {
2029
2114
  ...n,
2030
2115
  params: { reply_id: t }
2031
2116
  });
@@ -2044,7 +2129,7 @@ class Mr {
2044
2129
  const { data: r, code: a, message: o } = await this.req.post(
2045
2130
  "community/reply",
2046
2131
  c(t),
2047
- kr,
2132
+ Pr,
2048
2133
  n
2049
2134
  );
2050
2135
  return r ?? {
@@ -2095,7 +2180,7 @@ class Mr {
2095
2180
  */
2096
2181
  async getMediaPresignedUrl(t, n) {
2097
2182
  await this.token.autoLogin();
2098
- const { data: r } = await this.req.get("community/media-presign-url", Rr, {
2183
+ const { data: r } = await this.req.get("community/media-presign-url", Ur, {
2099
2184
  ...n,
2100
2185
  params: t
2101
2186
  });
@@ -2110,7 +2195,7 @@ class Mr {
2110
2195
  */
2111
2196
  async getNotifications(t, n) {
2112
2197
  await this.token.autoLogin();
2113
- const { data: r } = await this.req.get("community/notifications", jr, {
2198
+ const { data: r } = await this.req.get("community/notifications", Ir, {
2114
2199
  ...n,
2115
2200
  params: c({ max_results: 20, ...t })
2116
2201
  });
@@ -2128,7 +2213,7 @@ class Mr {
2128
2213
  if (!await this.token.autoLogin()) return null;
2129
2214
  const { data: n } = await this.req.get(
2130
2215
  "community/unread-notifications-count",
2131
- Tr,
2216
+ Dr,
2132
2217
  t
2133
2218
  );
2134
2219
  return n;
@@ -2144,17 +2229,17 @@ class Mr {
2144
2229
  return r;
2145
2230
  }
2146
2231
  }
2147
- const qr = s({
2232
+ const Ar = s({
2148
2233
  nonce_str: e.string(),
2149
2234
  timestamp: e.number(),
2150
2235
  signature: e.string()
2151
2236
  });
2152
- var xr = /* @__PURE__ */ ((i) => (i.RedirectUriDisMatch = "10003", i.AppidError = "10016", i.AuthorizationError = "10015", i.NoRightForScope = "10005", i.Frequently = "10009", i.AppBanded = "10004", i.ShouldFollow = "10006", i.ScopeNull = "10010", i.RedirectUriNull = "10011", i.AppidNull = "10012", i.StateNull = "10013", i))(xr || {});
2153
- function x(i) {
2237
+ var Gr = /* @__PURE__ */ ((i) => (i.RedirectUriDisMatch = "10003", i.AppidError = "10016", i.AuthorizationError = "10015", i.NoRightForScope = "10005", i.Frequently = "10009", i.AppBanded = "10004", i.ShouldFollow = "10006", i.ScopeNull = "10010", i.RedirectUriNull = "10011", i.AppidNull = "10012", i.StateNull = "10013", i))(Gr || {});
2238
+ function S(i) {
2154
2239
  return w(i, "open_id", "union_id", "weixin_token");
2155
2240
  }
2156
- const K = "wx_login_cache";
2157
- class Kr {
2241
+ const H = "wx_login_cache";
2242
+ class ra {
2158
2243
  token;
2159
2244
  $appid;
2160
2245
  req;
@@ -2185,11 +2270,11 @@ class Kr {
2185
2270
  * 也可以直接调用 login 方法,并传入 weixin code 的读取函数
2186
2271
  */
2187
2272
  async getLoginCache() {
2188
- const t = this.token.storage.get(K);
2273
+ const t = this.token.storage.get(H);
2189
2274
  if (!t)
2190
2275
  return null;
2191
- const n = _e(t);
2192
- return x(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2276
+ const n = be(t);
2277
+ return S(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2193
2278
  }
2194
2279
  /**
2195
2280
  * 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
@@ -2214,13 +2299,13 @@ class Kr {
2214
2299
  const n = await this.getLoginCache();
2215
2300
  if (n)
2216
2301
  return n;
2217
- const r = await fe(), { data: a, code: o, message: g } = await this.req.post(
2302
+ const r = await he(), { data: a, code: o, message: g } = await this.req.post(
2218
2303
  "weixin/login",
2219
2304
  { code: r, appid: this.appid },
2220
- x,
2305
+ S,
2221
2306
  { ...t, message: !1 }
2222
2307
  );
2223
- return a && (this.token.weixinToken = a.weixin_token, this.token.storage.set(K, JSON.stringify(a))), a ?? {
2308
+ return a && (this.token.weixinToken = a.weixin_token, this.token.storage.set(H, JSON.stringify(a))), a ?? {
2224
2309
  message: g,
2225
2310
  error: o
2226
2311
  };
@@ -2242,11 +2327,11 @@ class Kr {
2242
2327
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
2243
2328
  */
2244
2329
  async webLogin(t = "snsapi_userinfo", n) {
2245
- const r = S("code"), a = Date.now(), o = +S("state");
2330
+ const r = L("code"), a = Date.now(), o = +L("state");
2246
2331
  if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
2247
- const le = G(["code", "state"]);
2332
+ const me = G(["code", "state"]);
2248
2333
  location.replace(
2249
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2334
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(me)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2250
2335
  );
2251
2336
  return;
2252
2337
  }
@@ -2259,12 +2344,12 @@ class Kr {
2259
2344
  "replaceState" in history && history.replaceState({}, "", g);
2260
2345
  const {
2261
2346
  data: p,
2262
- code: se,
2263
- message: ce
2264
- } = await this.req.post("weixin/login", { code: r, appid: this.appid }, x, n);
2347
+ code: ce,
2348
+ message: le
2349
+ } = await this.req.post("weixin/login", { code: r, appid: this.appid }, S, n);
2265
2350
  return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? {
2266
- message: ce,
2267
- error: se
2351
+ message: le,
2352
+ error: ce
2268
2353
  };
2269
2354
  }
2270
2355
  /**
@@ -2294,7 +2379,7 @@ class Kr {
2294
2379
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
2295
2380
  */
2296
2381
  async getJSSDKConfig(t) {
2297
- const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", qr, {
2382
+ const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", Ar, {
2298
2383
  ...t,
2299
2384
  params: {
2300
2385
  appid: this.appid,
@@ -2310,150 +2395,157 @@ class Kr {
2310
2395
  }
2311
2396
  }
2312
2397
  export {
2313
- ie as AntispamValidator,
2314
- $r as AuthToken,
2315
- ln as CashbackEngagementDataValidator,
2316
- mn as ClaimActivationKeyEngagementDataValidator,
2317
- it as ClaimRewardStatus,
2318
- L as ClaimRewardStatusValidator,
2319
- Fn as ClaimedItemValidator,
2320
- J as ClubAddressValidator,
2321
- Fr as ClubApi,
2322
- Z as ClubBenefitSummaryValidator,
2323
- De as ClubBenefitValidator,
2324
- Re as ClubCreditChangeScene,
2325
- je as ClubCreditChangeSceneValidator,
2398
+ se as AntispamValidator,
2399
+ Br as AuthToken,
2400
+ $n as CandidateVoteValidator,
2401
+ _n as CashbackEngagementDataValidator,
2402
+ bn as ClaimActivationKeyEngagementDataValidator,
2403
+ st as ClaimRewardStatus,
2404
+ P as ClaimRewardStatusValidator,
2405
+ Bn as ClaimedItemValidator,
2406
+ Z as ClubAddressValidator,
2407
+ Kr as ClubApi,
2408
+ X as ClubBenefitSummaryValidator,
2409
+ Ae as ClubBenefitValidator,
2410
+ je as ClubCreditChangeScene,
2411
+ Te as ClubCreditChangeSceneValidator,
2326
2412
  Ce as ClubCreditChangeType,
2327
- Ve as ClubCreditChangeTypeValidator,
2328
- Ie as ClubCreditLogValidator,
2329
- Se as ClubGlobalConfigValidator,
2330
- Te as ClubItemType,
2331
- H as ClubItemTypeValidator,
2332
- Le as ClubPlayerValidator,
2333
- X as ClubProductValidator,
2334
- qe as ClubRedemptionStatus,
2335
- xe as ClubRedemptionStatusValidator,
2336
- Ue as ClubUserCreditValidator,
2337
- Fe as ClubUserProfileValidator,
2338
- qn as CommentEngagementValidator,
2413
+ Re as ClubCreditChangeTypeValidator,
2414
+ De as ClubCreditLogValidator,
2415
+ Le as ClubGlobalConfigValidator,
2416
+ qe as ClubItemType,
2417
+ z as ClubItemTypeValidator,
2418
+ Pe as ClubPlayerValidator,
2419
+ Y as ClubProductValidator,
2420
+ xe as ClubRedemptionStatus,
2421
+ Se as ClubRedemptionStatusValidator,
2422
+ Ie as ClubUserCreditValidator,
2423
+ Ue as ClubUserProfileValidator,
2424
+ In as CommentEngagementValidator,
2339
2425
  h as CommentValidator,
2340
- Mr as CommunityApi,
2341
- Xe as EngageAccountType,
2342
- Ye as EngageAccountTypeValidator,
2343
- En as EngageResponseValidator,
2344
- Sn as EngageRewardValidator,
2345
- Qr as EventApi,
2346
- cn as EventConfigValidator,
2347
- yt as EventFeatureConfigOfCashbackValidator,
2348
- ht as EventFeatureConfigOfCheckInValidator,
2349
- kt as EventFeatureConfigOfClaimActivationKeyValidator,
2350
- Ct as EventFeatureConfigOfClaimRewardsValidator,
2351
- Rt as EventFeatureConfigOfCommentValidator,
2352
- Tt as EventFeatureConfigOfFollowValidator,
2353
- St as EventFeatureConfigOfGiftCodeValidator,
2354
- Pt as EventFeatureConfigOfInviteValidator,
2355
- Et as EventFeatureConfigOfInvitedRegisterValidator,
2356
- Gt as EventFeatureConfigOfLotteryDrawValidator,
2357
- Dt as EventFeatureConfigOfLotteryValidator,
2358
- Nt as EventFeatureConfigOfPreregisterValidator,
2359
- Bt as EventFeatureConfigOfQuestValidator,
2360
- Kt as EventFeatureConfigOfRegisterValidator,
2361
- zt as EventFeatureConfigOfShareValidator,
2362
- Zt as EventFeatureConfigOfSubscribeValidator,
2363
- Yt as EventFeatureConfigOfSurveyValidator,
2364
- en as EventFeatureConfigOfTeamValidator,
2365
- rn as EventFeatureConfigOfVoteValidator,
2366
- sn as EventFeatureConfigValidator,
2367
- We as EventPeriodType,
2368
- et as EventPeriodTypeValidator,
2426
+ M as CommonRewardItemValidator,
2427
+ na as CommunityApi,
2428
+ Ye as EngageAccountType,
2429
+ We as EngageAccountTypeValidator,
2430
+ Qn as EngageResponseValidator,
2431
+ An as EngageRewardValidator,
2432
+ ea as EventApi,
2433
+ pn as EventConfigValidator,
2434
+ wt as EventFeatureConfigOfCashbackValidator,
2435
+ vt as EventFeatureConfigOfCheckInValidator,
2436
+ Ct as EventFeatureConfigOfClaimActivationKeyValidator,
2437
+ jt as EventFeatureConfigOfClaimRewardsValidator,
2438
+ qt as EventFeatureConfigOfCommentValidator,
2439
+ St as EventFeatureConfigOfFollowValidator,
2440
+ Et as EventFeatureConfigOfGiftCodeValidator,
2441
+ Ft as EventFeatureConfigOfInviteValidator,
2442
+ It as EventFeatureConfigOfInvitedRegisterValidator,
2443
+ Qt as EventFeatureConfigOfLotteryDrawValidator,
2444
+ Ot as EventFeatureConfigOfLotteryValidator,
2445
+ Mt as EventFeatureConfigOfPreregisterValidator,
2446
+ Ht as EventFeatureConfigOfQuestValidator,
2447
+ Jt as EventFeatureConfigOfRegisterValidator,
2448
+ Xt as EventFeatureConfigOfShareValidator,
2449
+ Wt as EventFeatureConfigOfSubscribeValidator,
2450
+ tn as EventFeatureConfigOfSurveyValidator,
2451
+ rn as EventFeatureConfigOfTeamValidator,
2452
+ mn as EventFeatureConfigOfVote2Validator,
2453
+ sn as EventFeatureConfigOfVoteValidator,
2454
+ gn as EventFeatureConfigValidator,
2455
+ et as EventPeriodType,
2456
+ tt as EventPeriodTypeValidator,
2369
2457
  $ as EventRewardItemConfigValidator,
2370
- Ge as ExtraGameRewardValidator,
2371
- Ae as ExtraPhysicalShipmentValidator,
2372
- _t as FeatureRewardValidator,
2458
+ Oe as ExtraGameRewardValidator,
2459
+ Ge as ExtraPhysicalShipmentValidator,
2460
+ ft as FeatureRewardValidator,
2373
2461
  l as FeatureType,
2374
- tt as FeatureTypeValidator,
2375
- Yn as ForumMode,
2376
- Wn as ForumModeValidator,
2377
- oe as ForumValidator,
2462
+ nt as FeatureTypeValidator,
2463
+ lr as ForumMode,
2464
+ mr as ForumModeValidator,
2465
+ ie as ForumValidator,
2378
2466
  v as GamerItemType,
2379
- Y as GamerItemTypeValidator,
2380
- ke as Gender,
2381
- ve as GenderValidator,
2382
- un as GiftCodeEngagementDataValidator,
2383
- dn as InviteEngagementDataValidator,
2384
- ut as LotteryDrawAction,
2385
- Gr as LotteryDrawActionValidator,
2386
- bn as LotteryDrawEngagementDataValidator,
2387
- gn as LotteryEngagementDataValidator,
2467
+ W as GamerItemTypeValidator,
2468
+ ve as Gender,
2469
+ Ve as GenderValidator,
2470
+ yn as GiftCodeEngagementDataValidator,
2471
+ fn as InviteEngagementDataValidator,
2472
+ dt as LotteryDrawAction,
2473
+ Xr as LotteryDrawActionValidator,
2474
+ vn as LotteryDrawEngagementDataValidator,
2475
+ hn as LotteryEngagementDataValidator,
2388
2476
  f as LotteryTicketStatus,
2389
- Dr as LotteryTicketStatusValidator,
2477
+ Jr as LotteryTicketStatusValidator,
2390
2478
  _ as NotificationBaseValidator,
2391
- tr as NotificationCategory,
2392
- Br as NotificationCategoryValidator,
2393
- lr as NotificationCommentReplyValidator,
2394
- mr as NotificationCommentValidator,
2395
- V as NotificationPayloadCommentValidator,
2479
+ dr as NotificationCategory,
2480
+ ta as NotificationCategoryValidator,
2481
+ wr as NotificationCommentReplyValidator,
2482
+ kr as NotificationCommentValidator,
2483
+ R as NotificationPayloadCommentValidator,
2396
2484
  D as NotificationPayloadPostValidator,
2397
2485
  A as NotificationPayloadReplyValidator,
2398
- or as NotificationPayloadSystemValidator,
2399
- cr as NotificationPostCommentValidator,
2400
- sr as NotificationPostValidator,
2401
- ur as NotificationReplyRepliedValidator,
2402
- dr as NotificationReplyValidator,
2403
- ir as NotificationSystemValidator,
2486
+ br as NotificationPayloadSystemValidator,
2487
+ hr as NotificationPostCommentValidator,
2488
+ fr as NotificationPostValidator,
2489
+ vr as NotificationReplyRepliedValidator,
2490
+ Vr as NotificationReplyValidator,
2491
+ yr as NotificationSystemValidator,
2404
2492
  u as NotificationType,
2405
- nr as NotificationTypeValidator,
2406
- gr as NotificationValidator,
2407
- Ee as PlayerRoleCardValidator,
2408
- z as PlayerRoleValidator,
2409
- er as PostStatus,
2410
- ae as PostStatusValidator,
2493
+ gr as NotificationTypeValidator,
2494
+ Cr as NotificationValidator,
2495
+ Fe as PlayerRoleCardValidator,
2496
+ J as PlayerRoleValidator,
2497
+ ur as PostStatus,
2498
+ oe as PostStatusValidator,
2411
2499
  I as PostValidator,
2412
- yn as PreregisterEngagementDataValidator,
2413
- ar as PresignedUrlResponseValidator,
2414
- fn as QuestEngagementDataValidator,
2415
- nt as QuestObjective,
2416
- ee as QuestObjectiveValidator,
2417
- ne as QuestProgressAlgorithm,
2418
- dt as QuestProgressAlgorithmOptionalValidator,
2419
- Or as QuestProgressAlgorithmValidator,
2420
- hn as QuestProgressValidator,
2421
- Er as RedeemParamsValidator,
2422
- Oe as RedemptionValidator,
2423
- pt as RegularRewardValidator,
2424
- rr as ReplyToValidator,
2500
+ Vn as PreregisterEngagementDataValidator,
2501
+ _r as PresignedUrlResponseValidator,
2502
+ Cn as QuestEngagementDataValidator,
2503
+ rt as QuestObjective,
2504
+ te as QuestObjectiveValidator,
2505
+ re as QuestProgressAlgorithm,
2506
+ gt as QuestProgressAlgorithmOptionalValidator,
2507
+ Yr as QuestProgressAlgorithmValidator,
2508
+ Rn as QuestProgressValidator,
2509
+ Mr as RedeemParamsValidator,
2510
+ Ne as RedemptionValidator,
2511
+ yt as RegularRewardValidator,
2512
+ pr as ReplyToValidator,
2425
2513
  C as ReplyValidator,
2426
- Ur as RewardItemType,
2427
- W as RewardItemTypeValidator,
2428
- st as RewardSource,
2429
- P as RewardSourceValidator,
2514
+ Hr as RewardItemType,
2515
+ ee as RewardItemTypeValidator,
2516
+ ct as RewardSource,
2517
+ E as RewardSourceValidator,
2430
2518
  d as RewardStatus,
2431
- ot as RewardStatusSuffix,
2432
- te as RewardStatusSuffixValidator,
2433
- Ir as RewardStatusValidator,
2434
- xn as RewardValidator,
2519
+ it as RewardStatusSuffix,
2520
+ ne as RewardStatusSuffixValidator,
2521
+ zr as RewardStatusValidator,
2522
+ Dn as RewardValidator,
2435
2523
  $e as RoleBaseInfoValidator,
2436
- Pe as ServerBaseInfoValidator,
2437
- wn as ShareEngagementDataValidator,
2438
- vn as SurveyEngagementDataValidator,
2439
- mt as TeamAction,
2440
- Ar as TeamActionValidator,
2441
- Vn as TeamEngagementDataValidator,
2442
- Cn as TeamEngagementValidator,
2443
- Nr as TeamMemberValidator,
2444
- ct as TeamVisibility,
2445
- lt as TeamVisibilityValidator,
2524
+ Ee as ServerBaseInfoValidator,
2525
+ jn as ShareEngagementDataValidator,
2526
+ qn as SurveyEngagementDataValidator,
2527
+ ut as TeamAction,
2528
+ Zr as TeamActionValidator,
2529
+ Sn as TeamEngagementDataValidator,
2530
+ xn as TeamEngagementValidator,
2531
+ Wr as TeamMemberValidator,
2532
+ lt as TeamVisibility,
2533
+ mt as TeamVisibilityValidator,
2446
2534
  U as TopicValidator,
2447
2535
  F as UserEngagementDataValidator,
2448
- Ln as UserEngagementValidator,
2449
- $n as UserFeatureStatusValidator,
2450
- E as UserRewardValidator,
2451
- Pn as VerifyMobileResultValidator,
2452
- Rn as VoteEngagementDataValidator,
2453
- rt as VoteOptionSource,
2454
- at as VoteOptionSourceValidator,
2455
- Kr as WeixinApi,
2456
- kn as WeixinSubscribeEngagementDataValidator,
2457
- xr as WeixinWebLoginErrorCode,
2458
- qr as isWeixinSignResponse
2536
+ Gn as UserEngagementValidator,
2537
+ Nn as UserFeatureStatusValidator,
2538
+ V as UserRewardValidator,
2539
+ On as VerifyMobileResultValidator,
2540
+ En as Vote2ClaimRewardsResponseValidator,
2541
+ Pn as Vote2EngagementDataValidator,
2542
+ pt as Vote2RewardType,
2543
+ _t as Vote2RewardTypeValidator,
2544
+ Ln as VoteEngagementDataValidator,
2545
+ at as VoteOptionSource,
2546
+ ot as VoteOptionSourceValidator,
2547
+ ra as WeixinApi,
2548
+ Tn as WeixinSubscribeEngagementDataValidator,
2549
+ Gr as WeixinWebLoginErrorCode,
2550
+ Ar as isWeixinSignResponse
2459
2551
  };