@seayoo-web/gamer-api 2.9.8 → 2.10.0

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,66 @@ 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
955
  reward_remaining_stock: e.number()
944
- }), Dt = e.object({
956
+ }), Ot = e.object({
945
957
  ...m.shape,
946
- feature_type: e.string().enum(Ut),
958
+ feature_type: e.string().enum(At),
947
959
  config: e.object({
948
960
  consume_item_id: e.number(),
949
961
  consume_item_name: e.string(),
950
962
  consume_item_icon_url: e.string(),
951
963
  consume_item_count: e.array(e.number()),
952
964
  consume_item_desc: e.string().optional(),
953
- rewards: e.array(It)
965
+ rewards: e.array(Gt)
954
966
  })
955
- }), At = l.LotteryDraw, Gt = e.object({
967
+ }), Nt = l.LotteryDraw, Qt = e.object({
956
968
  ...m.shape,
957
- feature_type: e.string().enum(At),
969
+ feature_type: e.string().enum(Nt),
958
970
  config: e.object({
959
971
  draw_not_before: e.number(),
960
972
  draw_not_after: e.number()
961
973
  })
962
- }), Ot = l.Preregister, Nt = e.object({
974
+ }), Bt = l.Preregister, Mt = e.object({
963
975
  ...m.shape,
964
- feature_type: e.string().enum(Ot)
965
- }), Qt = l.Quest, Bt = e.object({
976
+ feature_type: e.string().enum(Bt)
977
+ }), Kt = l.Quest, Ht = e.object({
966
978
  ...m.shape,
967
- feature_type: e.string().enum(Qt),
979
+ feature_type: e.string().enum(Kt),
968
980
  config: e.object({
969
- objective: ee,
981
+ objective: te,
970
982
  completion_value: e.number(),
971
983
  team: e.object({
972
984
  feature_id: e.number().optional(),
973
985
  completion_value: e.number(),
974
- progress_algorithm: dt,
986
+ progress_algorithm: gt,
975
987
  top_n: e.number().optional()
976
988
  }).optional(),
977
989
  config: e.object({
@@ -981,38 +993,38 @@ const v = {
981
993
  event_item_id: e.number().optional()
982
994
  }).optional()
983
995
  })
984
- }), Mt = l.Register, Kt = e.object({
996
+ }), zt = l.Register, Jt = e.object({
985
997
  ...m.shape,
986
- feature_type: e.string().enum(Mt)
987
- }), Ht = l.Share, zt = e.object({
998
+ feature_type: e.string().enum(zt)
999
+ }), Zt = l.Share, Xt = e.object({
988
1000
  ...m.shape,
989
- feature_type: e.string().enum(Ht),
1001
+ feature_type: e.string().enum(Zt),
990
1002
  config: e.object({
991
1003
  share_platform: e.string(),
992
1004
  jump_url: e.string().optional(),
993
1005
  icon_url: e.string().optional()
994
1006
  })
995
- }), Jt = l.Subscribe, Zt = e.object({
1007
+ }), Yt = l.Subscribe, Wt = e.object({
996
1008
  ...m.shape,
997
- feature_type: e.string().enum(Jt),
1009
+ feature_type: e.string().enum(Yt),
998
1010
  config: e.object({
999
1011
  weixin_template_ids: e.array(e.string())
1000
1012
  })
1001
- }), Xt = l.Survey, Yt = e.object({
1013
+ }), en = l.Survey, tn = e.object({
1002
1014
  ...m.shape,
1003
- feature_type: e.string().enum(Xt),
1015
+ feature_type: e.string().enum(en),
1004
1016
  config: e.object({
1005
1017
  survey_id: e.string(),
1006
1018
  survey_url: e.string()
1007
1019
  })
1008
- }), Wt = l.Team, en = e.object({
1020
+ }), nn = l.Team, rn = e.object({
1009
1021
  ...m.shape,
1010
- feature_type: e.string().enum(Wt),
1022
+ feature_type: e.string().enum(nn),
1011
1023
  config: e.object({
1012
1024
  max_members: e.number().min(1),
1013
1025
  min_members: e.number().min(1)
1014
1026
  })
1015
- }), tn = l.Vote, nn = e.object({
1027
+ }), an = l.Vote, on = e.object({
1016
1028
  sn: e.string(),
1017
1029
  name: e.string(),
1018
1030
  img_urls: e.array(e.string()).optional(),
@@ -1022,132 +1034,157 @@ const v = {
1022
1034
  amount: e.number(),
1023
1035
  finalists: e.bool(),
1024
1036
  last_vote_time: e.number()
1025
- }), rn = e.object({
1037
+ }), sn = e.object({
1026
1038
  ...m.shape,
1027
- feature_type: e.string().enum(tn),
1039
+ feature_type: e.string().enum(an),
1028
1040
  config: e.object({
1029
1041
  vote_feature_ids: e.array(e.number()),
1030
1042
  submission_feature_ids: e.array(e.number()),
1031
1043
  finalists_amount: e.number(),
1032
- source: at,
1033
- options: e.array(nn),
1044
+ source: ot,
1045
+ options: e.array(on),
1034
1046
  rewards: e.array($)
1035
1047
  })
1036
- }), an = l.ZeroChatgpt, on = e.object({
1048
+ }), cn = l.Vote2, ln = e.object({
1049
+ candidate_id: e.string(),
1050
+ display_name: e.string(),
1051
+ images: e.array(e.string()).optional(),
1052
+ videos: e.array(e.string()).optional(),
1053
+ description: e.string().optional(),
1054
+ jump_url: e.string(),
1055
+ base_votes: e.number(),
1056
+ votes_multiplier: e.number()
1057
+ }), mn = e.object({
1037
1058
  ...m.shape,
1038
- feature_type: e.string().enum(an)
1039
- }), sn = e.union(
1040
- yt,
1041
- ht,
1042
- Ct,
1043
- Rt,
1044
- Tt,
1059
+ feature_type: e.string().enum(cn),
1060
+ config: e.object({
1061
+ vote_item_id: e.number().optional(),
1062
+ candidates: e.array(ln),
1063
+ vote_since: e.number(),
1064
+ vote_until: e.number(),
1065
+ rewards_since: e.number(),
1066
+ rewards_until: e.number(),
1067
+ winner_strategy: e.string().enum("votes", "manual"),
1068
+ total_winners: e.number(),
1069
+ winner_rewards: e.array(M).optional(),
1070
+ consolation_rewards: e.array(M).optional()
1071
+ })
1072
+ }), un = l.ZeroChatgpt, dn = e.object({
1073
+ ...m.shape,
1074
+ feature_type: e.string().enum(un)
1075
+ }), gn = e.union(
1076
+ wt,
1077
+ vt,
1078
+ jt,
1079
+ qt,
1045
1080
  St,
1046
- Pt,
1047
1081
  Et,
1048
- Dt,
1049
- Gt,
1050
- Nt,
1051
- Bt,
1052
- Kt,
1053
- zt,
1054
- Zt,
1055
- Yt,
1056
- en,
1082
+ Ft,
1083
+ It,
1084
+ Ot,
1085
+ Qt,
1086
+ Mt,
1087
+ Ht,
1088
+ Jt,
1089
+ Xt,
1090
+ Wt,
1091
+ tn,
1057
1092
  rn,
1058
- kt,
1059
- on
1060
- ).key("feature_type").satisfies(), cn = e.object({
1093
+ sn,
1094
+ mn,
1095
+ Ct,
1096
+ dn
1097
+ ).key("feature_type").satisfies(), pn = e.object({
1061
1098
  event_name: e.string(),
1062
1099
  rules: e.string(),
1063
1100
  since: e.number(),
1064
1101
  until: e.number(),
1065
1102
  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({
1103
+ features: e.array(gn)
1104
+ }).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), _n = e.object({
1105
+ order_total_amount: q,
1106
+ cashback_total_amount: q,
1107
+ game_item_count: q
1108
+ }), bn = e.object({
1072
1109
  activation_key: e.string().disallow("")
1073
- }), un = e.object({
1110
+ }), yn = e.object({
1074
1111
  gift_code: e.string()
1075
- }), dn = e.object({
1112
+ }), fn = e.object({
1076
1113
  user_id: e.string(),
1077
1114
  name: e.string().optional(),
1078
1115
  avatar_url: e.string().optional()
1079
- }), gn = e.object({
1116
+ }), hn = e.object({
1080
1117
  lottery_count: e.number()
1081
- }), E = e.object({
1118
+ }), V = e.object({
1082
1119
  reward_id: e.number(),
1083
1120
  reward_item_id: e.number(),
1084
- reward_source: P,
1121
+ reward_source: E,
1085
1122
  reward_item_name: e.string(),
1086
- reward_item_type: Y,
1123
+ reward_item_type: W,
1087
1124
  reward_item_icon_url: e.string(),
1088
1125
  reward_item_desc: e.string().optional(),
1089
1126
  reward_item_rating: e.number(),
1090
1127
  reward_amount: e.number(),
1091
- reward_status: L,
1128
+ reward_status: P,
1092
1129
  event_id: e.number(),
1093
1130
  event_name: e.string(),
1094
1131
  feature_id: e.number(),
1095
1132
  engagement_id: e.number(),
1096
- feature_type: tt,
1133
+ feature_type: nt,
1097
1134
  receive_time: e.number(),
1098
1135
  extra_data: e.record(e.unknown()).optional()
1099
- }), pn = e.string().enum(f.Unknown, f.Pending), _n = e.union(
1136
+ }), wn = e.string().enum(f.Unknown, f.Pending), kn = e.union(
1100
1137
  e.object({
1101
1138
  ticket: e.string(),
1102
- status: pn
1139
+ status: wn
1103
1140
  }),
1104
1141
  e.object({
1105
1142
  ticket: e.string(),
1106
1143
  status: e.string().enum(k(f, "Unknown", "Pending")),
1107
- reward: E
1144
+ reward: V
1108
1145
  })
1109
- ).satisfies(), bn = e.object({
1110
- tickets: e.array(_n)
1111
- }), yn = e.object({
1146
+ ).satisfies(), vn = e.object({
1147
+ tickets: e.array(kn)
1148
+ }), Vn = e.object({
1112
1149
  platforms: e.array(e.string())
1113
- }), re = e.object({
1150
+ }), ae = e.object({
1114
1151
  role_name: e.string(),
1115
1152
  is_leader: e.bool(),
1116
1153
  is_myself: e.bool().optional(),
1117
1154
  progress: e.number().optional()
1118
- }).lock(), fn = e.object({
1119
- objective: ee,
1155
+ }).lock(), Cn = e.object({
1156
+ objective: te,
1120
1157
  progress: e.number(),
1121
1158
  completion_value: e.number().optional(),
1122
1159
  team: e.object({
1123
1160
  progress: e.number(),
1124
1161
  completion_value: e.number().optional(),
1125
- players: e.array(re)
1162
+ players: e.array(ae)
1126
1163
  }).optional()
1127
- }), hn = e.object({
1164
+ }), Rn = e.object({
1128
1165
  progress: e.number(),
1129
1166
  team: e.object({
1130
1167
  progress: e.number(),
1131
- team_members: e.array(re).optional()
1168
+ team_members: e.array(ae).optional()
1132
1169
  }).optional()
1133
- }), wn = e.object({
1170
+ }), jn = e.object({
1134
1171
  platform: e.string()
1135
- }), kn = e.object({
1172
+ }), Tn = e.object({
1136
1173
  weixin_openid: e.string()
1137
- }), vn = e.object({
1174
+ }), qn = e.object({
1138
1175
  serial_number: e.number()
1139
- }), Cn = e.object({
1176
+ }), xn = e.object({
1140
1177
  team_code: e.string(),
1141
1178
  leader_name: e.string(),
1142
1179
  total_members: e.number()
1143
- }), Nr = e.object({
1180
+ }), Wr = e.object({
1144
1181
  is_leader: e.bool(),
1145
1182
  is_myself: e.bool().optional(),
1146
1183
  role_name: e.string(),
1147
1184
  server_name: e.string()
1148
- }), Vn = e.object({
1185
+ }), Sn = e.object({
1149
1186
  team_code: e.string(),
1150
- visibility: lt,
1187
+ visibility: mt,
1151
1188
  members: e.array(
1152
1189
  e.object({
1153
1190
  is_leader: e.bool(),
@@ -1155,14 +1192,27 @@ const v = {
1155
1192
  server_name: e.string()
1156
1193
  })
1157
1194
  )
1158
- }), Rn = e.object({
1195
+ }), Ln = e.object({
1159
1196
  option_sn: e.string()
1160
- }), jn = e.object({
1197
+ }), Pn = e.object({
1198
+ candidate_id: e.string(),
1199
+ total_votes: e.number().optional(),
1200
+ my_votes: e.number().optional(),
1201
+ votes: e.number().optional()
1202
+ }), En = e.object({
1203
+ rewards_type: _t,
1204
+ rewards: e.array(V).optional()
1205
+ }), $n = e.object({
1206
+ candidate_id: e.string(),
1207
+ is_winner: e.bool(),
1208
+ total_votes: e.number(),
1209
+ my_votes: e.number()
1210
+ }), Fn = e.object({
1161
1211
  role: e.string(),
1162
1212
  content: e.string()
1163
- }), Tn = e.object({
1164
- conversations: e.array(jn)
1165
- }), qn = e.object({
1213
+ }), Un = e.object({
1214
+ conversations: e.array(Fn)
1215
+ }), In = e.object({
1166
1216
  user_id: e.string(),
1167
1217
  name: e.string(),
1168
1218
  avatar_url: e.string(),
@@ -1170,49 +1220,51 @@ const v = {
1170
1220
  video_note: e.number(),
1171
1221
  created_at: e.number()
1172
1222
  }), F = e.union(
1173
- yn,
1174
- gn,
1175
- vn,
1176
- dn,
1177
- wn,
1178
- Rn,
1179
- kn,
1180
- ln,
1181
- un,
1182
1223
  Vn,
1224
+ hn,
1225
+ qn,
1183
1226
  fn,
1184
- bn,
1185
- mn,
1227
+ jn,
1228
+ Ln,
1229
+ Pn,
1186
1230
  Tn,
1231
+ _n,
1232
+ yn,
1233
+ Sn,
1234
+ Cn,
1235
+ vn,
1236
+ bn,
1237
+ Un,
1187
1238
  e.custom(
1188
1239
  "EmptyObject",
1189
1240
  (i) => w(i) && Object.keys(i).length === 0
1190
1241
  )
1191
- ).satisfies().lock(), xn = e.object({
1242
+ ).satisfies().lock(), Dn = e.object({
1192
1243
  reward_id: e.number(),
1193
1244
  reward_item_id: e.number(),
1194
- reward_item_type: W,
1245
+ reward_item_type: ee,
1195
1246
  reward_count: e.number(),
1196
- reward_status: te,
1197
- reward_source: P,
1247
+ reward_status: ne,
1248
+ reward_source: E,
1198
1249
  reward_item_name: e.string(),
1199
1250
  reward_item_icon_url: e.string(),
1200
1251
  reward_item_desc: e.string().optional(),
1201
1252
  reward_item_rating: e.number(),
1202
1253
  receive_time: e.number(),
1203
1254
  extra_data: e.union(...F.validators, e.record(e.unknown())).satisfies().optional()
1204
- }), Sn = e.object({
1255
+ }), An = e.object({
1205
1256
  reward_id: e.number(),
1206
1257
  reward_item_id: e.number(),
1207
1258
  reward_item_name: e.string(),
1208
- reward_item_type: W,
1259
+ reward_item_type: ee,
1209
1260
  reward_item_icon_url: e.string(),
1210
1261
  reward_item_desc: e.string().optional(),
1262
+ reward_item_rating: e.number(),
1211
1263
  reward_amount: e.number(),
1212
- reward_status: te,
1213
- reward_source: P,
1264
+ reward_status: ne,
1265
+ reward_source: E,
1214
1266
  extra_data: e.record(e.unknown()).optional()
1215
- }), Ln = e.object({
1267
+ }), Gn = e.object({
1216
1268
  engagement_id: e.number(),
1217
1269
  user_id: e.string(),
1218
1270
  event_id: e.number(),
@@ -1222,15 +1274,15 @@ const v = {
1222
1274
  server_id: e.string().optional(),
1223
1275
  role_id: e.string().optional(),
1224
1276
  created_at: e.number(),
1225
- rewards: e.array(xn).optional()
1226
- }).lock(), Pn = e.object({
1277
+ rewards: e.array(Dn).optional()
1278
+ }).lock(), On = e.object({
1227
1279
  allowed: e.bool(),
1228
1280
  registered: e.bool()
1229
- }), $n = e.object({
1281
+ }), Nn = e.object({
1230
1282
  feature_id: e.number(),
1231
1283
  can_engage: e.bool(),
1232
1284
  has_unclaimed_rewards: e.bool()
1233
- }), En = e.object({
1285
+ }), Qn = e.object({
1234
1286
  engagement_id: e.number(),
1235
1287
  engagement: e.object({
1236
1288
  engagement_id: e.number(),
@@ -1238,37 +1290,41 @@ const v = {
1238
1290
  feature_id: e.number(),
1239
1291
  data: F.clone().optional()
1240
1292
  }).optional(),
1241
- rewards: e.array(Sn).optional(),
1293
+ rewards: e.array(An).optional(),
1242
1294
  scan: e.bool().optional()
1243
- }), Fn = e.object({
1295
+ }), Bn = e.object({
1244
1296
  reward_id: e.number(),
1245
- reward_status: L
1246
- }), Un = e.guard(cn), In = e.guard(Pn), q = s({ count: e.number() }), Dn = s({ first_visit: e.bool() }), An = s({
1247
- engagements: e.union(e.array(qn), e.array(Cn))
1248
- }), Gn = s({
1249
- status: e.array($n)
1250
- }), On = s({
1297
+ reward_status: P
1298
+ }), Mn = e.guard(pn), Kn = e.guard(On), x = s({ count: e.number() }), Hn = s({ first_visit: e.bool() }), zn = s({
1299
+ engagements: e.union(e.array(In), e.array(xn))
1300
+ }), Jn = s({
1301
+ status: e.array(Nn)
1302
+ }), Zn = s({
1251
1303
  engagements_counts: e.record(e.number())
1252
- }), Nn = s({
1253
- engagements: e.array(Ln),
1304
+ }), Xn = s({
1305
+ engagements: e.array(Gn),
1254
1306
  next_token: e.string().optional()
1255
- }), Qn = e.guard(En), Bn = s({
1256
- claimed_items: e.array(Fn)
1257
- }), Mn = s({
1258
- rewards: e.array(E)
1259
- }), Kn = s({
1260
- reward_status: L
1261
- }), Hn = s({
1262
- user_rewards: e.array(E),
1307
+ }), Yn = e.guard(Qn), Wn = s({
1308
+ claimed_items: e.array(Bn)
1309
+ }), er = s({
1310
+ rewards: e.array(V)
1311
+ }), tr = s({
1312
+ reward_status: P
1313
+ }), nr = s({
1314
+ user_rewards: e.array(V),
1263
1315
  next_token: e.string().optional()
1264
- }), zn = s({
1316
+ }), rr = s({
1265
1317
  scene: e.string()
1266
- }), Jn = s({
1318
+ }), ar = s({
1267
1319
  params: e.string()
1268
- }), Zn = s({
1320
+ }), or = s({
1269
1321
  img: e.string()
1270
- }), Xn = e.guard(hn);
1271
- class Qr {
1322
+ }), ir = e.guard(Rn), sr = e.guard(En), cr = e.guard(
1323
+ e.object({
1324
+ candidate_votes: e.array($n)
1325
+ })
1326
+ );
1327
+ class ea {
1272
1328
  token;
1273
1329
  event = 0;
1274
1330
  req;
@@ -1281,7 +1337,7 @@ class Qr {
1281
1337
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
1282
1338
  */
1283
1339
  async verifyMobileAllowed(t, n, r) {
1284
- const { data: a } = await this.req.get("verify-mobile-allowed", In, {
1340
+ const { data: a } = await this.req.get("verify-mobile-allowed", Kn, {
1285
1341
  ...r,
1286
1342
  params: { game_id: t, mobile: n }
1287
1343
  });
@@ -1293,7 +1349,7 @@ class Qr {
1293
1349
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
1294
1350
  */
1295
1351
  async getConfig(t) {
1296
- const { data: n } = await this.req.get(`event/${this.event}/event-config`, Un, t);
1352
+ const { data: n } = await this.req.get(`event/${this.event}/event-config`, Mn, t);
1297
1353
  return n;
1298
1354
  }
1299
1355
  /**
@@ -1302,7 +1358,7 @@ class Qr {
1302
1358
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1303
1359
  */
1304
1360
  async getEngagementsUserCount(t, n) {
1305
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1361
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1306
1362
  ...n,
1307
1363
  params: { feature_id: t, type: "user" }
1308
1364
  });
@@ -1314,7 +1370,7 @@ class Qr {
1314
1370
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1315
1371
  */
1316
1372
  async getEngagementsCount(t, n) {
1317
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1373
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1318
1374
  ...n,
1319
1375
  params: { feature_id: t, type: "engagement" }
1320
1376
  });
@@ -1328,7 +1384,7 @@ class Qr {
1328
1384
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
1329
1385
  */
1330
1386
  async getEngagements(t, n) {
1331
- const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, An, {
1387
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, zn, {
1332
1388
  ...n,
1333
1389
  params: { feature_id: t }
1334
1390
  });
@@ -1344,7 +1400,7 @@ class Qr {
1344
1400
  const { data: r, code: a, message: o } = await this.req.post(
1345
1401
  `event/${this.event}/visit`,
1346
1402
  c(t || {}),
1347
- Dn,
1403
+ Hn,
1348
1404
  n
1349
1405
  );
1350
1406
  return r ?? {
@@ -1357,13 +1413,11 @@ class Qr {
1357
1413
  *
1358
1414
  * 💡活动下包含 engage_account_type 为 role_id 的玩法时,需要提供 server_id 和 role_id
1359
1415
  *
1360
- * 🔕请求静默进行,无消息提示
1361
- *
1362
1416
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
1363
1417
  */
1364
1418
  async getUserFeatureStatus(t, n) {
1365
1419
  if (!await this.token.autoLogin()) return [];
1366
- const { data: r } = await this.req.get("event/user-feature-status", Gn, {
1420
+ const { data: r } = await this.req.get("event/user-feature-status", Jn, {
1367
1421
  ...n,
1368
1422
  message: !1,
1369
1423
  params: c({ ...t, event_id: this.event })
@@ -1377,7 +1431,7 @@ class Qr {
1377
1431
  */
1378
1432
  async getUserEngagementCount(t, n) {
1379
1433
  if (!await this.token.autoLogin()) return {};
1380
- const { data: r } = await this.req.get("event/user-engagements-count", On, {
1434
+ const { data: r } = await this.req.get("event/user-engagements-count", Zn, {
1381
1435
  message: !1,
1382
1436
  params: c({ ...n, event_id: this.event, feature_id: t })
1383
1437
  });
@@ -1396,7 +1450,7 @@ class Qr {
1396
1450
  engagements: [],
1397
1451
  next_token: ""
1398
1452
  };
1399
- const { data: a } = await this.req.get("event/user-engagements", Nn, {
1453
+ const { data: a } = await this.req.get("event/user-engagements", Xn, {
1400
1454
  ...r,
1401
1455
  params: c({
1402
1456
  max_results: 20,
@@ -1428,13 +1482,13 @@ class Qr {
1428
1482
  engagement: n,
1429
1483
  ...r
1430
1484
  }),
1431
- Qn,
1485
+ Yn,
1432
1486
  a
1433
1487
  );
1434
1488
  return o ?? {
1435
1489
  message: p,
1436
1490
  error: g
1437
- // 激活码已领完
1491
+ // 您的道具数量不足,请先获取足够的道具
1438
1492
  };
1439
1493
  }
1440
1494
  /**
@@ -1452,7 +1506,7 @@ class Qr {
1452
1506
  ...t,
1453
1507
  server_id: t.server_id ? +t.server_id : void 0
1454
1508
  }),
1455
- Bn,
1509
+ Wn,
1456
1510
  n
1457
1511
  );
1458
1512
  return r?.claimed_items || {
@@ -1473,7 +1527,7 @@ class Qr {
1473
1527
  ...t,
1474
1528
  server_id: t.server_id ? +t.server_id : void 0
1475
1529
  }),
1476
- Mn,
1530
+ er,
1477
1531
  n
1478
1532
  );
1479
1533
  return r?.rewards || {
@@ -1491,7 +1545,7 @@ class Qr {
1491
1545
  const { data: r, code: a, message: o } = await this.req.post(
1492
1546
  "event/claim-weixin-hongbao",
1493
1547
  { reward_id: t },
1494
- Kn,
1548
+ tr,
1495
1549
  n
1496
1550
  );
1497
1551
  return r || {
@@ -1532,7 +1586,7 @@ class Qr {
1532
1586
  const { data: r } = await this.req.post(
1533
1587
  "event/user-rewards",
1534
1588
  c({ max_results: 20, ...t, event_id: this.event }),
1535
- Hn,
1589
+ nr,
1536
1590
  n
1537
1591
  );
1538
1592
  return {
@@ -1547,7 +1601,7 @@ class Qr {
1547
1601
  */
1548
1602
  async getUserItemCount(t, n) {
1549
1603
  if (!await this.token.autoLogin()) return null;
1550
- const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, q, {
1604
+ const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, x, {
1551
1605
  ...n,
1552
1606
  params: { item_id: t }
1553
1607
  });
@@ -1580,7 +1634,7 @@ class Qr {
1580
1634
  */
1581
1635
  async getUnlimitQrcodeScene(t, n) {
1582
1636
  if (!await this.token.autoLogin()) return null;
1583
- const { data: r } = await this.req.get("event/unlimit-qrcode-scene", zn, {
1637
+ const { data: r } = await this.req.get("event/unlimit-qrcode-scene", rr, {
1584
1638
  ...n,
1585
1639
  params: { params: t }
1586
1640
  });
@@ -1594,7 +1648,7 @@ class Qr {
1594
1648
  * @param scene - 小程序码 scene 值
1595
1649
  */
1596
1650
  async getParamsByQrcodeScene(t, n) {
1597
- const { data: r } = await this.req.get("event/params-by-qrcode-scene", Jn, {
1651
+ const { data: r } = await this.req.get("event/params-by-qrcode-scene", ar, {
1598
1652
  ...n,
1599
1653
  params: { scene: t }
1600
1654
  });
@@ -1610,19 +1664,19 @@ class Qr {
1610
1664
  const { data: r } = await this.req.post(
1611
1665
  "event/unlimit-qrcode",
1612
1666
  c(t),
1613
- Zn,
1667
+ or,
1614
1668
  n
1615
1669
  );
1616
1670
  return r?.img ?? null;
1617
1671
  }
1618
1672
  /**
1619
- * 本接口用于获取任务玩法的实时进度数据
1673
+ * 本接口用于获取任务玩法的实时进度数据,支持部分任务进度的查询:累计充值金额 / 累计游戏内活跃值 / 账号等级目标
1620
1674
  *
1621
1675
  * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=ZAnm12d3f0
1622
1676
  */
1623
1677
  async getQuestProgress(t, n) {
1624
1678
  if (!await this.token.autoLogin()) return null;
1625
- const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, Xn, {
1679
+ const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, ir, {
1626
1680
  message: !1,
1627
1681
  ...n,
1628
1682
  params: { feature_id: t }
@@ -1632,13 +1686,44 @@ class Qr {
1632
1686
  error: a
1633
1687
  };
1634
1688
  }
1689
+ /**
1690
+ * 领取投票(vote2)玩法获得的奖励
1691
+ *
1692
+ * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=fabGKteIEK
1693
+ */
1694
+ async claimVote2Rewards(t, n) {
1695
+ if (!await this.token.autoLogin()) return null;
1696
+ const { data: r, code: a, message: o } = await this.req.post(
1697
+ "event/vote2/rewards",
1698
+ { feature_id: t },
1699
+ sr,
1700
+ n
1701
+ );
1702
+ return r || {
1703
+ message: o,
1704
+ code: a
1705
+ };
1706
+ }
1707
+ /**
1708
+ * 查询投票(vote2)玩法排行榜数据
1709
+ *
1710
+ * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=cYZMVXbP4u
1711
+ */
1712
+ async getVote2Leaderboard(t, n) {
1713
+ if (!await this.token.autoLogin()) return [];
1714
+ const { data: r } = await this.req.get("event/vote2/leaderboard", cr, {
1715
+ ...n,
1716
+ params: { feature_id: t }
1717
+ });
1718
+ return r?.candidate_votes || [];
1719
+ }
1635
1720
  }
1636
- const Yn = {
1721
+ const lr = {
1637
1722
  /** 所有人均可以发帖 */
1638
1723
  All: "all",
1639
1724
  /** 指定用户可发帖 */
1640
1725
  Limit: "limit"
1641
- }, Wn = e.string().enum(Yn).lock(), er = {
1726
+ }, mr = e.string().enum(lr).lock(), ur = {
1642
1727
  /** 待审核(仅自己可见) */
1643
1728
  Pending: "pending",
1644
1729
  /** 审核通过 */
@@ -1647,14 +1732,14 @@ const Yn = {
1647
1732
  Failed: "failed",
1648
1733
  /** 嫌疑(仅自己可见) */
1649
1734
  Suspect: "suspect"
1650
- }, ae = e.string().enum(er).lock(), tr = {
1735
+ }, oe = e.string().enum(ur).lock(), dr = {
1651
1736
  /** 系统通知 */
1652
1737
  System: "system",
1653
1738
  /** 评论我的 */
1654
1739
  Comment: "comment",
1655
1740
  /** 点赞通知 */
1656
1741
  Like: "like"
1657
- }, Br = e.string().enum(tr).lock(), u = {
1742
+ }, ta = e.string().enum(dr).lock(), u = {
1658
1743
  /** 系统通知 */
1659
1744
  System: "system",
1660
1745
  /** 帖子被置顶 */
@@ -1679,13 +1764,13 @@ const Yn = {
1679
1764
  ReplyLiked: "reply_liked",
1680
1765
  /** 回复被删除 */
1681
1766
  ReplyDeleted: "reply_deleted"
1682
- }, nr = e.string().enum(u).lock(), oe = e.object({
1767
+ }, gr = e.string().enum(u).lock(), ie = e.object({
1683
1768
  forum_id: e.number(),
1684
1769
  icon_url: e.string(),
1685
1770
  name: e.string(),
1686
1771
  tags: e.array(e.string()),
1687
1772
  sort: e.number(),
1688
- mode: Wn,
1773
+ mode: mr,
1689
1774
  member_ids: e.array(e.number())
1690
1775
  }).lock(), U = e.object({
1691
1776
  topic_id: e.number(),
@@ -1696,7 +1781,7 @@ const Yn = {
1696
1781
  post_num: e.number()
1697
1782
  }).lock(), I = e.object({
1698
1783
  post_id: e.number(),
1699
- forum: oe,
1784
+ forum: ie,
1700
1785
  posted_by: e.string(),
1701
1786
  nickname: e.string(),
1702
1787
  avatar_url: e.string(),
@@ -1712,11 +1797,11 @@ const Yn = {
1712
1797
  event_ids: e.array(e.number()),
1713
1798
  is_pinned: e.bool(),
1714
1799
  is_highlighted: e.bool(),
1715
- status: ae,
1800
+ status: oe,
1716
1801
  create_time: e.number()
1717
- }).lock(), ie = e.object({
1802
+ }).lock(), se = e.object({
1718
1803
  err_msg: e.string().optional()
1719
- }).optional().lock(), rr = e.object({
1804
+ }).optional().lock(), pr = e.object({
1720
1805
  reply_id: e.number(),
1721
1806
  reply_content: e.string().optional(),
1722
1807
  replied_by: e.string(),
@@ -1735,7 +1820,7 @@ const Yn = {
1735
1820
  content: e.string(),
1736
1821
  like_num: e.number(),
1737
1822
  liked: e.bool(),
1738
- reply_to: rr,
1823
+ reply_to: pr,
1739
1824
  create_time: e.number()
1740
1825
  }).lock(), h = e.object({
1741
1826
  comment_id: e.number(),
@@ -1755,21 +1840,21 @@ const Yn = {
1755
1840
  liked: e.bool(),
1756
1841
  image_url: e.string(),
1757
1842
  create_time: e.number(),
1758
- status: ae,
1843
+ status: oe,
1759
1844
  replies: e.array(C).optional()
1760
- }).lock(), ar = e.object({
1845
+ }).lock(), _r = e.object({
1761
1846
  image_url: e.string(),
1762
1847
  upload_url: e.string(),
1763
1848
  existed: e.bool()
1764
1849
  }).lock(), _ = e.object({
1765
1850
  notification_id: e.string(),
1766
- notification_type: nr,
1851
+ notification_type: gr,
1767
1852
  is_read: e.bool(),
1768
1853
  create_time: e.number(),
1769
1854
  origin_user_id: e.string(),
1770
1855
  origin_user_name: e.string(),
1771
1856
  origin_user_avatar_url: e.string()
1772
- }).lock(), or = e.object({
1857
+ }).lock(), br = e.object({
1773
1858
  system_message_subject: e.string(),
1774
1859
  system_message_content: e.string()
1775
1860
  }).lock(), D = e.object({
@@ -1777,17 +1862,17 @@ const Yn = {
1777
1862
  post_subject: e.string(),
1778
1863
  post_summary: e.string(),
1779
1864
  post_image_url: e.string()
1780
- }).lock(), V = e.object({
1865
+ }).lock(), R = e.object({
1781
1866
  comment_id: e.number(),
1782
1867
  comment_content: e.string()
1783
1868
  }).lock(), A = e.object({
1784
1869
  reply_id: e.number(),
1785
1870
  reply_content: e.string()
1786
- }).lock(), ir = e.object({
1871
+ }).lock(), yr = e.object({
1787
1872
  ..._.shape,
1788
- ...or.shape,
1873
+ ...br.shape,
1789
1874
  notification_type: e.string().enum(u.System)
1790
- }), sr = e.object({
1875
+ }), fr = e.object({
1791
1876
  ..._.shape,
1792
1877
  ...D.shape,
1793
1878
  notification_type: e.string().enum(
@@ -1796,68 +1881,68 @@ const Yn = {
1796
1881
  u.PostDeleted,
1797
1882
  u.PostLiked
1798
1883
  )
1799
- }), cr = e.object({
1884
+ }), hr = e.object({
1800
1885
  ..._.shape,
1801
1886
  ...D.shape,
1802
- ...V.shape,
1887
+ ...R.shape,
1803
1888
  notification_type: e.string().enum(u.PostCommented)
1804
- }), lr = e.object({
1889
+ }), wr = e.object({
1805
1890
  ..._.shape,
1806
- ...V.shape,
1891
+ ...R.shape,
1807
1892
  ...A.shape,
1808
1893
  notification_type: e.string().enum(u.CommentReplied)
1809
- }), mr = e.object({
1894
+ }), kr = e.object({
1810
1895
  ..._.shape,
1811
- ...V.shape,
1896
+ ...R.shape,
1812
1897
  ...D.shape,
1813
1898
  notification_type: e.string().enum(u.CommentLiked, u.CommentDeleted)
1814
- }), ur = e.object({
1899
+ }), vr = e.object({
1815
1900
  ..._.shape,
1816
1901
  ...A.shape,
1817
1902
  notification_type: e.string().enum(u.ReplyReplied),
1818
1903
  comment_id: e.number(),
1819
1904
  reply_to_reply_id: e.number(),
1820
1905
  reply_to_reply_content: e.string()
1821
- }), dr = e.object({
1906
+ }), Vr = e.object({
1822
1907
  ..._.shape,
1823
1908
  ...A.shape,
1824
- ...V.shape,
1909
+ ...R.shape,
1825
1910
  notification_type: e.string().enum(u.ReplyLiked, u.ReplyDeleted)
1826
- }), gr = e.union(
1827
- ir,
1828
- sr,
1829
- cr,
1830
- lr,
1831
- mr,
1832
- ur,
1833
- dr
1834
- ).satisfies().lock(), pr = s({ forums: e.array(oe) }), _r = s({ topics: e.array(U) }), br = s({ topic: U }), yr = s({ post: I }), M = s({
1911
+ }), Cr = e.union(
1912
+ yr,
1913
+ fr,
1914
+ hr,
1915
+ wr,
1916
+ kr,
1917
+ vr,
1918
+ Vr
1919
+ ).satisfies().lock(), Rr = s({ forums: e.array(ie) }), jr = s({ topics: e.array(U) }), Tr = s({ topic: U }), qr = s({ post: I }), K = s({
1835
1920
  posts: e.array(I),
1836
1921
  next_token: e.string().optional()
1837
- }), fr = s({
1922
+ }), xr = s({
1838
1923
  post: I.clone().optional(),
1839
- antispam: ie.clone().optional()
1840
- }), hr = s({
1924
+ antispam: se.clone().optional()
1925
+ }), Sr = s({
1841
1926
  replies: e.array(C),
1842
1927
  next_token: e.string().optional()
1843
- }), wr = s({ reply: C }), kr = s({
1928
+ }), Lr = s({ reply: C }), Pr = s({
1844
1929
  reply: C.clone().optional(),
1845
- antispam: ie.clone().optional()
1846
- }), vr = s({ comment: h }), Cr = s({
1930
+ antispam: se.clone().optional()
1931
+ }), Er = s({ comment: h }), $r = s({
1847
1932
  comments: e.array(h),
1848
1933
  next_token: e.string().optional()
1849
- }), Vr = s({
1934
+ }), Fr = s({
1850
1935
  comment: h.clone().optional(),
1851
1936
  antispam: h.clone().optional()
1852
- }), Rr = e.guard(ar), jr = s({
1853
- notifications: e.array(gr),
1937
+ }), Ur = e.guard(_r), Ir = s({
1938
+ notifications: e.array(Cr),
1854
1939
  next_token: e.string().optional()
1855
- }), Tr = s({
1940
+ }), Dr = s({
1856
1941
  system: e.number(),
1857
1942
  comment: e.number(),
1858
1943
  like: e.number()
1859
1944
  });
1860
- class Mr {
1945
+ class na {
1861
1946
  token;
1862
1947
  req;
1863
1948
  constructor(t) {
@@ -1869,7 +1954,7 @@ class Mr {
1869
1954
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
1870
1955
  */
1871
1956
  async getForums(t) {
1872
- const { data: n } = await this.req.get("community/forums", pr, t);
1957
+ const { data: n } = await this.req.get("community/forums", Rr, t);
1873
1958
  return n?.forums || [];
1874
1959
  }
1875
1960
  /**
@@ -1878,7 +1963,7 @@ class Mr {
1878
1963
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
1879
1964
  */
1880
1965
  async getTopics(t) {
1881
- const { data: n } = await this.req.get("community/topics", _r, t);
1966
+ const { data: n } = await this.req.get("community/topics", jr, t);
1882
1967
  return n?.topics || [];
1883
1968
  }
1884
1969
  /**
@@ -1887,7 +1972,7 @@ class Mr {
1887
1972
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
1888
1973
  */
1889
1974
  async getTopic(t, n) {
1890
- const { data: r, code: a } = await this.req.get("community/topic", br, {
1975
+ const { data: r, code: a } = await this.req.get("community/topic", Tr, {
1891
1976
  ...n,
1892
1977
  params: { topic_id: t }
1893
1978
  });
@@ -1899,7 +1984,7 @@ class Mr {
1899
1984
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
1900
1985
  */
1901
1986
  async getPosts(t, n) {
1902
- const { data: r, code: a, message: o } = await this.req.get("community/posts", M, {
1987
+ const { data: r, code: a, message: o } = await this.req.get("community/posts", K, {
1903
1988
  ...n,
1904
1989
  params: c(t)
1905
1990
  });
@@ -1914,7 +1999,7 @@ class Mr {
1914
1999
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
1915
2000
  */
1916
2001
  async getPinnedPosts(t, n, r, a) {
1917
- const { data: o, code: g, message: p } = await this.req.get("community/pinned-posts", M, {
2002
+ const { data: o, code: g, message: p } = await this.req.get("community/pinned-posts", K, {
1918
2003
  ...a,
1919
2004
  params: c({ forum_id: t, max_results: n, next_token: r })
1920
2005
  });
@@ -1929,7 +2014,7 @@ class Mr {
1929
2014
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
1930
2015
  */
1931
2016
  async getPost(t, n) {
1932
- const { data: r, code: a, message: o } = await this.req.get("community/post", yr, {
2017
+ const { data: r, code: a, message: o } = await this.req.get("community/post", qr, {
1933
2018
  ...n,
1934
2019
  params: { post_id: t }
1935
2020
  });
@@ -1947,7 +2032,7 @@ class Mr {
1947
2032
  const { data: r, code: a, message: o } = await this.req.post(
1948
2033
  "community/post",
1949
2034
  c(t),
1950
- fr,
2035
+ xr,
1951
2036
  n
1952
2037
  );
1953
2038
  return r ?? {
@@ -1961,7 +2046,7 @@ class Mr {
1961
2046
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
1962
2047
  */
1963
2048
  async getComments(t, n) {
1964
- const { data: r, code: a, message: o } = await this.req.get("community/comments", Cr, {
2049
+ const { data: r, code: a, message: o } = await this.req.get("community/comments", $r, {
1965
2050
  ...n,
1966
2051
  params: c(t)
1967
2052
  });
@@ -1976,7 +2061,7 @@ class Mr {
1976
2061
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
1977
2062
  */
1978
2063
  async getComment(t, n) {
1979
- const { data: r, code: a, message: o } = await this.req.get("community/comment", vr, {
2064
+ const { data: r, code: a, message: o } = await this.req.get("community/comment", Er, {
1980
2065
  ...n,
1981
2066
  params: { comment_id: t }
1982
2067
  });
@@ -1995,7 +2080,7 @@ class Mr {
1995
2080
  const { data: r, code: a, message: o } = await this.req.post(
1996
2081
  "community/comment",
1997
2082
  c(t),
1998
- Vr,
2083
+ Fr,
1999
2084
  n
2000
2085
  );
2001
2086
  return r ?? {
@@ -2009,7 +2094,7 @@ class Mr {
2009
2094
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
2010
2095
  */
2011
2096
  async getReplies(t, n) {
2012
- const { data: r } = await this.req.get("community/replies", hr, {
2097
+ const { data: r } = await this.req.get("community/replies", Sr, {
2013
2098
  ...n,
2014
2099
  params: c({ max_results: 20, ...t })
2015
2100
  });
@@ -2024,7 +2109,7 @@ class Mr {
2024
2109
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
2025
2110
  */
2026
2111
  async getReply(t, n) {
2027
- const { data: r, code: a, message: o } = await this.req.get("community/reply", wr, {
2112
+ const { data: r, code: a, message: o } = await this.req.get("community/reply", Lr, {
2028
2113
  ...n,
2029
2114
  params: { reply_id: t }
2030
2115
  });
@@ -2043,7 +2128,7 @@ class Mr {
2043
2128
  const { data: r, code: a, message: o } = await this.req.post(
2044
2129
  "community/reply",
2045
2130
  c(t),
2046
- kr,
2131
+ Pr,
2047
2132
  n
2048
2133
  );
2049
2134
  return r ?? {
@@ -2094,7 +2179,7 @@ class Mr {
2094
2179
  */
2095
2180
  async getMediaPresignedUrl(t, n) {
2096
2181
  await this.token.autoLogin();
2097
- const { data: r } = await this.req.get("community/media-presign-url", Rr, {
2182
+ const { data: r } = await this.req.get("community/media-presign-url", Ur, {
2098
2183
  ...n,
2099
2184
  params: t
2100
2185
  });
@@ -2109,7 +2194,7 @@ class Mr {
2109
2194
  */
2110
2195
  async getNotifications(t, n) {
2111
2196
  await this.token.autoLogin();
2112
- const { data: r } = await this.req.get("community/notifications", jr, {
2197
+ const { data: r } = await this.req.get("community/notifications", Ir, {
2113
2198
  ...n,
2114
2199
  params: c({ max_results: 20, ...t })
2115
2200
  });
@@ -2127,7 +2212,7 @@ class Mr {
2127
2212
  if (!await this.token.autoLogin()) return null;
2128
2213
  const { data: n } = await this.req.get(
2129
2214
  "community/unread-notifications-count",
2130
- Tr,
2215
+ Dr,
2131
2216
  t
2132
2217
  );
2133
2218
  return n;
@@ -2143,17 +2228,17 @@ class Mr {
2143
2228
  return r;
2144
2229
  }
2145
2230
  }
2146
- const qr = s({
2231
+ const Ar = s({
2147
2232
  nonce_str: e.string(),
2148
2233
  timestamp: e.number(),
2149
2234
  signature: e.string()
2150
2235
  });
2151
- 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 || {});
2152
- function x(i) {
2236
+ 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 || {});
2237
+ function S(i) {
2153
2238
  return w(i, "open_id", "union_id", "weixin_token");
2154
2239
  }
2155
- const K = "wx_login_cache";
2156
- class Kr {
2240
+ const H = "wx_login_cache";
2241
+ class ra {
2157
2242
  token;
2158
2243
  $appid;
2159
2244
  req;
@@ -2184,11 +2269,11 @@ class Kr {
2184
2269
  * 也可以直接调用 login 方法,并传入 weixin code 的读取函数
2185
2270
  */
2186
2271
  async getLoginCache() {
2187
- const t = this.token.storage.get(K);
2272
+ const t = this.token.storage.get(H);
2188
2273
  if (!t)
2189
2274
  return null;
2190
- const n = _e(t);
2191
- return x(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2275
+ const n = be(t);
2276
+ return S(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2192
2277
  }
2193
2278
  /**
2194
2279
  * 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
@@ -2213,13 +2298,13 @@ class Kr {
2213
2298
  const n = await this.getLoginCache();
2214
2299
  if (n)
2215
2300
  return n;
2216
- const r = await fe(), { data: a, code: o, message: g } = await this.req.post(
2301
+ const r = await he(), { data: a, code: o, message: g } = await this.req.post(
2217
2302
  "weixin/login",
2218
2303
  { code: r, appid: this.appid },
2219
- x,
2304
+ S,
2220
2305
  { ...t, message: !1 }
2221
2306
  );
2222
- return a && (this.token.weixinToken = a.weixin_token, this.token.storage.set(K, JSON.stringify(a))), a ?? {
2307
+ return a && (this.token.weixinToken = a.weixin_token, this.token.storage.set(H, JSON.stringify(a))), a ?? {
2223
2308
  message: g,
2224
2309
  error: o
2225
2310
  };
@@ -2241,11 +2326,11 @@ class Kr {
2241
2326
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
2242
2327
  */
2243
2328
  async webLogin(t = "snsapi_userinfo", n) {
2244
- const r = S("code"), a = Date.now(), o = +S("state");
2329
+ const r = L("code"), a = Date.now(), o = +L("state");
2245
2330
  if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
2246
- const le = G(["code", "state"]);
2331
+ const me = G(["code", "state"]);
2247
2332
  location.replace(
2248
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2333
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(me)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2249
2334
  );
2250
2335
  return;
2251
2336
  }
@@ -2258,12 +2343,12 @@ class Kr {
2258
2343
  "replaceState" in history && history.replaceState({}, "", g);
2259
2344
  const {
2260
2345
  data: p,
2261
- code: se,
2262
- message: ce
2263
- } = await this.req.post("weixin/login", { code: r, appid: this.appid }, x, n);
2346
+ code: ce,
2347
+ message: le
2348
+ } = await this.req.post("weixin/login", { code: r, appid: this.appid }, S, n);
2264
2349
  return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? {
2265
- message: ce,
2266
- error: se
2350
+ message: le,
2351
+ error: ce
2267
2352
  };
2268
2353
  }
2269
2354
  /**
@@ -2293,7 +2378,7 @@ class Kr {
2293
2378
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
2294
2379
  */
2295
2380
  async getJSSDKConfig(t) {
2296
- const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", qr, {
2381
+ const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", Ar, {
2297
2382
  ...t,
2298
2383
  params: {
2299
2384
  appid: this.appid,
@@ -2309,150 +2394,157 @@ class Kr {
2309
2394
  }
2310
2395
  }
2311
2396
  export {
2312
- ie as AntispamValidator,
2313
- $r as AuthToken,
2314
- ln as CashbackEngagementDataValidator,
2315
- mn as ClaimActivationKeyEngagementDataValidator,
2316
- it as ClaimRewardStatus,
2317
- L as ClaimRewardStatusValidator,
2318
- Fn as ClaimedItemValidator,
2319
- J as ClubAddressValidator,
2320
- Fr as ClubApi,
2321
- Z as ClubBenefitSummaryValidator,
2322
- De as ClubBenefitValidator,
2323
- Re as ClubCreditChangeScene,
2324
- je as ClubCreditChangeSceneValidator,
2397
+ se as AntispamValidator,
2398
+ Br as AuthToken,
2399
+ $n as CandidateVoteValidator,
2400
+ _n as CashbackEngagementDataValidator,
2401
+ bn as ClaimActivationKeyEngagementDataValidator,
2402
+ st as ClaimRewardStatus,
2403
+ P as ClaimRewardStatusValidator,
2404
+ Bn as ClaimedItemValidator,
2405
+ Z as ClubAddressValidator,
2406
+ Kr as ClubApi,
2407
+ X as ClubBenefitSummaryValidator,
2408
+ Ae as ClubBenefitValidator,
2409
+ je as ClubCreditChangeScene,
2410
+ Te as ClubCreditChangeSceneValidator,
2325
2411
  Ce as ClubCreditChangeType,
2326
- Ve as ClubCreditChangeTypeValidator,
2327
- Ie as ClubCreditLogValidator,
2328
- Se as ClubGlobalConfigValidator,
2329
- Te as ClubItemType,
2330
- H as ClubItemTypeValidator,
2331
- Le as ClubPlayerValidator,
2332
- X as ClubProductValidator,
2333
- qe as ClubRedemptionStatus,
2334
- xe as ClubRedemptionStatusValidator,
2335
- Ue as ClubUserCreditValidator,
2336
- Fe as ClubUserProfileValidator,
2337
- qn as CommentEngagementValidator,
2412
+ Re as ClubCreditChangeTypeValidator,
2413
+ De as ClubCreditLogValidator,
2414
+ Le as ClubGlobalConfigValidator,
2415
+ qe as ClubItemType,
2416
+ z as ClubItemTypeValidator,
2417
+ Pe as ClubPlayerValidator,
2418
+ Y as ClubProductValidator,
2419
+ xe as ClubRedemptionStatus,
2420
+ Se as ClubRedemptionStatusValidator,
2421
+ Ie as ClubUserCreditValidator,
2422
+ Ue as ClubUserProfileValidator,
2423
+ In as CommentEngagementValidator,
2338
2424
  h as CommentValidator,
2339
- Mr as CommunityApi,
2340
- Xe as EngageAccountType,
2341
- Ye as EngageAccountTypeValidator,
2342
- En as EngageResponseValidator,
2343
- Sn as EngageRewardValidator,
2344
- Qr as EventApi,
2345
- cn as EventConfigValidator,
2346
- yt as EventFeatureConfigOfCashbackValidator,
2347
- ht as EventFeatureConfigOfCheckInValidator,
2348
- kt as EventFeatureConfigOfClaimActivationKeyValidator,
2349
- Ct as EventFeatureConfigOfClaimRewardsValidator,
2350
- Rt as EventFeatureConfigOfCommentValidator,
2351
- Tt as EventFeatureConfigOfFollowValidator,
2352
- St as EventFeatureConfigOfGiftCodeValidator,
2353
- Pt as EventFeatureConfigOfInviteValidator,
2354
- Et as EventFeatureConfigOfInvitedRegisterValidator,
2355
- Gt as EventFeatureConfigOfLotteryDrawValidator,
2356
- Dt as EventFeatureConfigOfLotteryValidator,
2357
- Nt as EventFeatureConfigOfPreregisterValidator,
2358
- Bt as EventFeatureConfigOfQuestValidator,
2359
- Kt as EventFeatureConfigOfRegisterValidator,
2360
- zt as EventFeatureConfigOfShareValidator,
2361
- Zt as EventFeatureConfigOfSubscribeValidator,
2362
- Yt as EventFeatureConfigOfSurveyValidator,
2363
- en as EventFeatureConfigOfTeamValidator,
2364
- rn as EventFeatureConfigOfVoteValidator,
2365
- sn as EventFeatureConfigValidator,
2366
- We as EventPeriodType,
2367
- et as EventPeriodTypeValidator,
2425
+ M as CommonRewardItemValidator,
2426
+ na as CommunityApi,
2427
+ Ye as EngageAccountType,
2428
+ We as EngageAccountTypeValidator,
2429
+ Qn as EngageResponseValidator,
2430
+ An as EngageRewardValidator,
2431
+ ea as EventApi,
2432
+ pn as EventConfigValidator,
2433
+ wt as EventFeatureConfigOfCashbackValidator,
2434
+ vt as EventFeatureConfigOfCheckInValidator,
2435
+ Ct as EventFeatureConfigOfClaimActivationKeyValidator,
2436
+ jt as EventFeatureConfigOfClaimRewardsValidator,
2437
+ qt as EventFeatureConfigOfCommentValidator,
2438
+ St as EventFeatureConfigOfFollowValidator,
2439
+ Et as EventFeatureConfigOfGiftCodeValidator,
2440
+ Ft as EventFeatureConfigOfInviteValidator,
2441
+ It as EventFeatureConfigOfInvitedRegisterValidator,
2442
+ Qt as EventFeatureConfigOfLotteryDrawValidator,
2443
+ Ot as EventFeatureConfigOfLotteryValidator,
2444
+ Mt as EventFeatureConfigOfPreregisterValidator,
2445
+ Ht as EventFeatureConfigOfQuestValidator,
2446
+ Jt as EventFeatureConfigOfRegisterValidator,
2447
+ Xt as EventFeatureConfigOfShareValidator,
2448
+ Wt as EventFeatureConfigOfSubscribeValidator,
2449
+ tn as EventFeatureConfigOfSurveyValidator,
2450
+ rn as EventFeatureConfigOfTeamValidator,
2451
+ mn as EventFeatureConfigOfVote2Validator,
2452
+ sn as EventFeatureConfigOfVoteValidator,
2453
+ gn as EventFeatureConfigValidator,
2454
+ et as EventPeriodType,
2455
+ tt as EventPeriodTypeValidator,
2368
2456
  $ as EventRewardItemConfigValidator,
2369
- Ge as ExtraGameRewardValidator,
2370
- Ae as ExtraPhysicalShipmentValidator,
2371
- _t as FeatureRewardValidator,
2457
+ Oe as ExtraGameRewardValidator,
2458
+ Ge as ExtraPhysicalShipmentValidator,
2459
+ ft as FeatureRewardValidator,
2372
2460
  l as FeatureType,
2373
- tt as FeatureTypeValidator,
2374
- Yn as ForumMode,
2375
- Wn as ForumModeValidator,
2376
- oe as ForumValidator,
2461
+ nt as FeatureTypeValidator,
2462
+ lr as ForumMode,
2463
+ mr as ForumModeValidator,
2464
+ ie as ForumValidator,
2377
2465
  v as GamerItemType,
2378
- Y as GamerItemTypeValidator,
2379
- ke as Gender,
2380
- ve as GenderValidator,
2381
- un as GiftCodeEngagementDataValidator,
2382
- dn as InviteEngagementDataValidator,
2383
- ut as LotteryDrawAction,
2384
- Gr as LotteryDrawActionValidator,
2385
- bn as LotteryDrawEngagementDataValidator,
2386
- gn as LotteryEngagementDataValidator,
2466
+ W as GamerItemTypeValidator,
2467
+ ve as Gender,
2468
+ Ve as GenderValidator,
2469
+ yn as GiftCodeEngagementDataValidator,
2470
+ fn as InviteEngagementDataValidator,
2471
+ dt as LotteryDrawAction,
2472
+ Xr as LotteryDrawActionValidator,
2473
+ vn as LotteryDrawEngagementDataValidator,
2474
+ hn as LotteryEngagementDataValidator,
2387
2475
  f as LotteryTicketStatus,
2388
- Dr as LotteryTicketStatusValidator,
2476
+ Jr as LotteryTicketStatusValidator,
2389
2477
  _ as NotificationBaseValidator,
2390
- tr as NotificationCategory,
2391
- Br as NotificationCategoryValidator,
2392
- lr as NotificationCommentReplyValidator,
2393
- mr as NotificationCommentValidator,
2394
- V as NotificationPayloadCommentValidator,
2478
+ dr as NotificationCategory,
2479
+ ta as NotificationCategoryValidator,
2480
+ wr as NotificationCommentReplyValidator,
2481
+ kr as NotificationCommentValidator,
2482
+ R as NotificationPayloadCommentValidator,
2395
2483
  D as NotificationPayloadPostValidator,
2396
2484
  A as NotificationPayloadReplyValidator,
2397
- or as NotificationPayloadSystemValidator,
2398
- cr as NotificationPostCommentValidator,
2399
- sr as NotificationPostValidator,
2400
- ur as NotificationReplyRepliedValidator,
2401
- dr as NotificationReplyValidator,
2402
- ir as NotificationSystemValidator,
2485
+ br as NotificationPayloadSystemValidator,
2486
+ hr as NotificationPostCommentValidator,
2487
+ fr as NotificationPostValidator,
2488
+ vr as NotificationReplyRepliedValidator,
2489
+ Vr as NotificationReplyValidator,
2490
+ yr as NotificationSystemValidator,
2403
2491
  u as NotificationType,
2404
- nr as NotificationTypeValidator,
2405
- gr as NotificationValidator,
2406
- Ee as PlayerRoleCardValidator,
2407
- z as PlayerRoleValidator,
2408
- er as PostStatus,
2409
- ae as PostStatusValidator,
2492
+ gr as NotificationTypeValidator,
2493
+ Cr as NotificationValidator,
2494
+ Fe as PlayerRoleCardValidator,
2495
+ J as PlayerRoleValidator,
2496
+ ur as PostStatus,
2497
+ oe as PostStatusValidator,
2410
2498
  I as PostValidator,
2411
- yn as PreregisterEngagementDataValidator,
2412
- ar as PresignedUrlResponseValidator,
2413
- fn as QuestEngagementDataValidator,
2414
- nt as QuestObjective,
2415
- ee as QuestObjectiveValidator,
2416
- ne as QuestProgressAlgorithm,
2417
- dt as QuestProgressAlgorithmOptionalValidator,
2418
- Or as QuestProgressAlgorithmValidator,
2419
- hn as QuestProgressValidator,
2420
- Er as RedeemParamsValidator,
2421
- Oe as RedemptionValidator,
2422
- pt as RegularRewardValidator,
2423
- rr as ReplyToValidator,
2499
+ Vn as PreregisterEngagementDataValidator,
2500
+ _r as PresignedUrlResponseValidator,
2501
+ Cn as QuestEngagementDataValidator,
2502
+ rt as QuestObjective,
2503
+ te as QuestObjectiveValidator,
2504
+ re as QuestProgressAlgorithm,
2505
+ gt as QuestProgressAlgorithmOptionalValidator,
2506
+ Yr as QuestProgressAlgorithmValidator,
2507
+ Rn as QuestProgressValidator,
2508
+ Mr as RedeemParamsValidator,
2509
+ Ne as RedemptionValidator,
2510
+ yt as RegularRewardValidator,
2511
+ pr as ReplyToValidator,
2424
2512
  C as ReplyValidator,
2425
- Ur as RewardItemType,
2426
- W as RewardItemTypeValidator,
2427
- st as RewardSource,
2428
- P as RewardSourceValidator,
2513
+ Hr as RewardItemType,
2514
+ ee as RewardItemTypeValidator,
2515
+ ct as RewardSource,
2516
+ E as RewardSourceValidator,
2429
2517
  d as RewardStatus,
2430
- ot as RewardStatusSuffix,
2431
- te as RewardStatusSuffixValidator,
2432
- Ir as RewardStatusValidator,
2433
- xn as RewardValidator,
2518
+ it as RewardStatusSuffix,
2519
+ ne as RewardStatusSuffixValidator,
2520
+ zr as RewardStatusValidator,
2521
+ Dn as RewardValidator,
2434
2522
  $e as RoleBaseInfoValidator,
2435
- Pe as ServerBaseInfoValidator,
2436
- wn as ShareEngagementDataValidator,
2437
- vn as SurveyEngagementDataValidator,
2438
- mt as TeamAction,
2439
- Ar as TeamActionValidator,
2440
- Vn as TeamEngagementDataValidator,
2441
- Cn as TeamEngagementValidator,
2442
- Nr as TeamMemberValidator,
2443
- ct as TeamVisibility,
2444
- lt as TeamVisibilityValidator,
2523
+ Ee as ServerBaseInfoValidator,
2524
+ jn as ShareEngagementDataValidator,
2525
+ qn as SurveyEngagementDataValidator,
2526
+ ut as TeamAction,
2527
+ Zr as TeamActionValidator,
2528
+ Sn as TeamEngagementDataValidator,
2529
+ xn as TeamEngagementValidator,
2530
+ Wr as TeamMemberValidator,
2531
+ lt as TeamVisibility,
2532
+ mt as TeamVisibilityValidator,
2445
2533
  U as TopicValidator,
2446
2534
  F as UserEngagementDataValidator,
2447
- Ln as UserEngagementValidator,
2448
- $n as UserFeatureStatusValidator,
2449
- E as UserRewardValidator,
2450
- Pn as VerifyMobileResultValidator,
2451
- Rn as VoteEngagementDataValidator,
2452
- rt as VoteOptionSource,
2453
- at as VoteOptionSourceValidator,
2454
- Kr as WeixinApi,
2455
- kn as WeixinSubscribeEngagementDataValidator,
2456
- xr as WeixinWebLoginErrorCode,
2457
- qr as isWeixinSignResponse
2535
+ Gn as UserEngagementValidator,
2536
+ Nn as UserFeatureStatusValidator,
2537
+ V as UserRewardValidator,
2538
+ On as VerifyMobileResultValidator,
2539
+ En as Vote2ClaimRewardsResponseValidator,
2540
+ Pn as Vote2EngagementDataValidator,
2541
+ pt as Vote2RewardType,
2542
+ _t as Vote2RewardTypeValidator,
2543
+ Ln as VoteEngagementDataValidator,
2544
+ at as VoteOptionSource,
2545
+ ot as VoteOptionSourceValidator,
2546
+ ra as WeixinApi,
2547
+ Tn as WeixinSubscribeEngagementDataValidator,
2548
+ Gr as WeixinWebLoginErrorCode,
2549
+ Ar as isWeixinSignResponse
2458
2550
  };