@seayoo-web/gamer-api 2.1.2 → 2.2.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
@@ -2,12 +2,12 @@ var ue = Object.defineProperty;
2
2
  var le = (i, t, n) => t in i ? ue(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
3
  var l = (i, t, n) => le(i, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { isComboWebView as me } from "@seayoo-web/combo-webview";
5
- import { isPlainObject as v, useConsole as de, Support as b, usePromise as ge, pruneURL as pe, queryString as L, pruneObject as a, v as e, omitFields as C, typedObjectGuard as o, parseJSON as _e, removePara as A } from "@seayoo-web/utils";
5
+ import { isPlainObject as C, useConsole as de, Support as b, usePromise as ge, pruneURL as pe, queryString as w, pruneObject as a, v as e, omitFields as R, typedObjectGuard as o, parseJSON as _e, removePara as N } from "@seayoo-web/utils";
6
6
  function be(i) {
7
- return v(i, "gamer_token") && typeof i.gamer_token == "string";
7
+ return C(i, "gamer_token") && typeof i.gamer_token == "string";
8
8
  }
9
9
  function O(i) {
10
- return v(i);
10
+ return C(i);
11
11
  }
12
12
  const f = de("GamerApiSDK");
13
13
  function ye(i) {
@@ -58,7 +58,7 @@ const he = {
58
58
  }
59
59
  }
60
60
  }, h = "gamer_token";
61
- class hr {
61
+ class vr {
62
62
  constructor(t, n) {
63
63
  l(this, "$NetRequest");
64
64
  l(this, "$idToken", "");
@@ -88,7 +88,7 @@ class hr {
88
88
  requestTransformer: (s) => {
89
89
  this.$gamerToken && (s.headers.Authorization = `Bearer ${this.$gamerToken}`);
90
90
  }
91
- }), me() ? this.$gamerToken = L("gamer_token") : this.loadGamerTokenCache();
91
+ }), me() || w("debug") === "yes" ? this.$gamerToken = w("gamer_token") : this.loadGamerTokenCache();
92
92
  }
93
93
  get NetRequest() {
94
94
  return this.$NetRequest;
@@ -242,7 +242,7 @@ const ke = {
242
242
  Physical: "physical",
243
243
  /** 虚拟商品 */
244
244
  Virtual: "virtual"
245
- }, J = e.string().enum(Te).lock(), qe = {
245
+ }, z = e.string().enum(Te).lock(), qe = {
246
246
  /** 待发放 */
247
247
  Pending: "pending",
248
248
  /** 已发放 */
@@ -282,13 +282,13 @@ const ke = {
282
282
  }).lock(), Ee = e.object({
283
283
  role_id: e.string(),
284
284
  role_name: e.string()
285
- }).lock(), K = e.object({
285
+ }).lock(), J = e.object({
286
286
  ...Ee.shape,
287
287
  ...Pe.shape,
288
288
  role_level: e.number(),
289
289
  last_login_time: e.number()
290
290
  }).lock(), $e = e.object({
291
- ...K.shape,
291
+ ...J.shape,
292
292
  /** 角色战力 */
293
293
  role_fighting: e.number(),
294
294
  /** 宗门 ID */
@@ -337,7 +337,7 @@ const ke = {
337
337
  product_id: e.number(),
338
338
  catalog_id: e.number(),
339
339
  catalog_name: e.string(),
340
- item_type: J,
340
+ item_type: z,
341
341
  name: e.string(),
342
342
  img_url: e.string(),
343
343
  description: e.string(),
@@ -360,9 +360,9 @@ const ke = {
360
360
  updated_at: e.number(),
361
361
  redeemable_quantity: e.number().optional()
362
362
  }).lock(), Ie = e.object({
363
- ...C(Y.shape, "tag"),
363
+ ...R(Y.shape, "tag"),
364
364
  product: Z.clone().optional()
365
- }).lock(), wr = e.union(
365
+ }).lock(), Cr = e.union(
366
366
  e.object({
367
367
  server_id: e.string(),
368
368
  role_id: e.string()
@@ -379,32 +379,32 @@ const ke = {
379
379
  address: e.string(),
380
380
  express_company: e.string(),
381
381
  express_number: e.string()
382
- }).lock(), Ne = e.object({
382
+ }).lock(), Ae = e.object({
383
383
  server_id: e.string(),
384
384
  role_id: e.string(),
385
385
  role_name: e.string()
386
- }).lock(), Ae = e.object({
386
+ }).lock(), Ne = e.object({
387
387
  redemption_id: e.number(),
388
388
  player_id: e.string(),
389
389
  product_id: e.number(),
390
390
  name: e.string(),
391
391
  img_url: e.string(),
392
- item_type: J,
392
+ item_type: z,
393
393
  catalog_id: e.number(),
394
394
  catalog_name: e.string(),
395
395
  quantity: e.number(),
396
396
  amount: e.number(),
397
397
  status: xe,
398
398
  created_at: e.number(),
399
- extra_data: e.union(Ge.clone(), Ne.clone()).satisfies().optional()
400
- }), Oe = e.guard(Se), B = o({ player: Le }), Be = o({ roles: e.array(K) }), T = o({ role_card: $e }), M = e.guard(Ue), Q = e.guard(X), Me = o({ addresses: e.array(X) }), Qe = e.guard(Fe), He = o({
399
+ extra_data: e.union(Ge.clone(), Ae.clone()).satisfies().optional()
400
+ }), Oe = e.guard(Se), B = o({ player: Le }), Be = o({ roles: e.array(J) }), q = o({ role_card: $e }), M = e.guard(Ue), Q = e.guard(X), Me = o({ addresses: e.array(X) }), Qe = e.guard(Fe), Ke = o({
401
401
  credit_logs: e.array(De),
402
402
  next_token: e.string().optional()
403
- }), ze = o({ products: e.array(Z) }), Je = o({ benefits: e.array(Y) }), Ke = o({ benefit: Ie }), Xe = o({
404
- redemptions: e.array(Ae),
403
+ }), He = o({ products: e.array(Z) }), ze = o({ benefits: e.array(Y) }), Je = o({ benefit: Ie }), Xe = o({
404
+ redemptions: e.array(Ne),
405
405
  next_token: e.string().optional()
406
406
  });
407
- class kr {
407
+ class Rr {
408
408
  constructor(t) {
409
409
  l(this, "token");
410
410
  l(this, "req");
@@ -465,7 +465,7 @@ class kr {
465
465
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=A1Wr7kUXnS
466
466
  */
467
467
  async getRoleCard(t) {
468
- const { data: n } = await this.req.get("club/role-card", T, {
468
+ const { data: n } = await this.req.get("club/role-card", q, {
469
469
  params: { member_id: t }
470
470
  });
471
471
  return (n == null ? void 0 : n.role_card) ?? null;
@@ -477,7 +477,7 @@ class kr {
477
477
  */
478
478
  async setRoleCard(t) {
479
479
  if (!await this.token.autoLogin()) return null;
480
- const { data: n } = await this.req.post("club/role-card", t, T);
480
+ const { data: n } = await this.req.post("club/role-card", t, q);
481
481
  return (n == null ? void 0 : n.role_card) ?? null;
482
482
  }
483
483
  /**
@@ -487,7 +487,7 @@ class kr {
487
487
  */
488
488
  async refreshRoleCard() {
489
489
  if (!await this.token.autoLogin()) return null;
490
- const { data: t } = await this.req.post("club/refresh-role-card", {}, T);
490
+ const { data: t } = await this.req.post("club/refresh-role-card", {}, q);
491
491
  return (t == null ? void 0 : t.role_card) ?? null;
492
492
  }
493
493
  /**
@@ -570,7 +570,7 @@ class kr {
570
570
  */
571
571
  async getCreditLogs(t) {
572
572
  await this.token.autoLogin();
573
- const { data: n } = await this.req.get("club/credit-logs", He, {
573
+ const { data: n } = await this.req.get("club/credit-logs", Ke, {
574
574
  params: a({ max_results: 20, ...t })
575
575
  });
576
576
  return { credit_logs: (n == null ? void 0 : n.credit_logs) || [], next_token: n == null ? void 0 : n.next_token };
@@ -582,7 +582,7 @@ class kr {
582
582
  */
583
583
  async getBenefits() {
584
584
  if (!await this.token.autoLogin()) return [];
585
- const { data: t } = await this.req.get("club/benefits", Je);
585
+ const { data: t } = await this.req.get("club/benefits", ze);
586
586
  return (t == null ? void 0 : t.benefits) || [];
587
587
  }
588
588
  /**
@@ -592,7 +592,7 @@ class kr {
592
592
  */
593
593
  async getBenefit(t) {
594
594
  if (!await this.token.autoLogin()) return null;
595
- const { data: n } = await this.req.get("club/benefit", Ke, {
595
+ const { data: n } = await this.req.get("club/benefit", Je, {
596
596
  params: { benefit_id: t }
597
597
  });
598
598
  return (n == null ? void 0 : n.benefit) || null;
@@ -603,7 +603,7 @@ class kr {
603
603
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=r3vC3PzfMQ
604
604
  */
605
605
  async getProducts(t) {
606
- const { data: n } = await this.req.get("club/products", ze, {
606
+ const { data: n } = await this.req.get("club/products", He, {
607
607
  params: t
608
608
  });
609
609
  return (n == null ? void 0 : n.products) || [];
@@ -633,7 +633,7 @@ class kr {
633
633
  return { redemptions: (n == null ? void 0 : n.redemptions) || [], next_token: n == null ? void 0 : n.next_token };
634
634
  }
635
635
  }
636
- const R = {
636
+ const V = {
637
637
  /** 活动道具 */
638
638
  EventItem: "event_item",
639
639
  /** 游戏内道具 */
@@ -652,7 +652,7 @@ const R = {
652
652
  ExternalCode: "external_gift_code",
653
653
  /** 空奖励 */
654
654
  VoidItem: "void_item"
655
- }, W = e.string().enum(R).lock(), vr = R, ee = W, Ye = {
655
+ }, W = e.string().enum(V).lock(), Vr = V, ee = W, Ye = {
656
656
  /** 世游通行证 ID / Combo ID */
657
657
  UserId: "user_id",
658
658
  /** 游戏角色 ID */
@@ -698,7 +698,9 @@ const R = {
698
698
  /** 开奖 */
699
699
  LotteryDraw: "lottery_draw",
700
700
  /** 签到 */
701
- CheckIn: "check_in"
701
+ CheckIn: "check_in",
702
+ /** 领取激活码 */
703
+ ClaimActivationKey: "claim_activation_key"
702
704
  }, tt = e.string().enum(c).lock(), nt = {
703
705
  /** 累计游戏内活跃值 */
704
706
  Active: "player_active_points",
@@ -732,7 +734,7 @@ const R = {
732
734
  Failed: "failed",
733
735
  /** 奖励已发货 */
734
736
  Delivered: "delivered"
735
- }, Cr = e.string().enum(g).lock(), P = {
737
+ }, jr = e.string().enum(g).lock(), P = {
736
738
  /**
737
739
  * 奖励未领取,拼写错误以兼容后端历史版本,检查请使用 Unclaimed
738
740
  *
@@ -774,7 +776,7 @@ const R = {
774
776
  Private: "private",
775
777
  /** 公开队伍 */
776
778
  Public: "public"
777
- }, st = e.string().enum(at).lock(), w = {
779
+ }, st = e.string().enum(at).lock(), k = {
778
780
  /** 未知状态 */
779
781
  Unknown: "unknown",
780
782
  /** 等待开奖 */
@@ -785,7 +787,7 @@ const R = {
785
787
  Claimed: "claimed",
786
788
  /** 领奖失败 */
787
789
  Fail: "fail"
788
- }, Rr = e.string().enum(w).lock(), ct = {
790
+ }, Tr = e.string().enum(k).lock(), ct = {
789
791
  /** 发起组队 */
790
792
  Assemble: "assemble",
791
793
  /** 加入队伍 */
@@ -796,14 +798,14 @@ const R = {
796
798
  ChangeVisibility: "change_visibility",
797
799
  /** 查询组队信息 */
798
800
  Query: "query"
799
- }, Vr = e.string().enum(ct).lock(), ut = {
801
+ }, qr = e.string().enum(ct).lock(), ut = {
800
802
  /** 查询抽奖券 */
801
803
  Query: "query",
802
804
  /** 开奖 */
803
805
  Draw: "draw",
804
806
  /** 领奖 */
805
807
  Claim: "claim"
806
- }, jr = e.string().enum(ut).lock(), lt = e.string().enum(C(R, "GiftCode", "LotteryTicket")), U = e.object({
808
+ }, xr = e.string().enum(ut).lock(), lt = e.string().enum(R(V, "GiftCode", "LotteryTicket")), U = e.object({
807
809
  reward_item_id: e.number(),
808
810
  reward_amount: e.number(),
809
811
  reward_item_name: e.string(),
@@ -845,19 +847,22 @@ const R = {
845
847
  }), _t = c.CheckIn, bt = e.object({
846
848
  ...u.shape,
847
849
  feature_type: e.string().enum(_t)
848
- }), yt = c.ClaimRewards, ft = e.object({
850
+ }), yt = c.ClaimActivationKey, ft = e.object({
849
851
  ...u.shape,
850
852
  feature_type: e.string().enum(yt)
851
- }), ht = c.Comment, wt = e.object({
853
+ }), ht = c.ClaimRewards, wt = e.object({
854
+ ...u.shape,
855
+ feature_type: e.string().enum(ht)
856
+ }), kt = c.Comment, vt = e.object({
852
857
  ...u.shape,
853
- feature_type: e.string().enum(ht),
858
+ feature_type: e.string().enum(kt),
854
859
  config: e.object({
855
860
  comments: e.array(e.string()),
856
861
  send_rate: e.number()
857
862
  })
858
- }), kt = c.Follow, vt = e.object({
863
+ }), Ct = c.Follow, Rt = e.object({
859
864
  ...u.shape,
860
- feature_type: e.string().enum(kt),
865
+ feature_type: e.string().enum(Ct),
861
866
  config: e.object({
862
867
  platform: e.string(),
863
868
  platform_icon: e.string().optional(),
@@ -865,59 +870,59 @@ const R = {
865
870
  qr_code_url: e.string().optional(),
866
871
  platform_desc: e.string().optional()
867
872
  })
868
- }), Ct = c.GiftCode, Rt = e.object({
873
+ }), Vt = c.GiftCode, jt = e.object({
869
874
  name: e.string(),
870
875
  icon_url: e.string(),
871
876
  count: e.number()
872
- }), Vt = e.object({
877
+ }), Tt = e.object({
873
878
  ...u.shape,
874
- feature_type: e.string().enum(Ct),
879
+ feature_type: e.string().enum(Vt),
875
880
  config: e.object({
876
- gift_items: e.array(Rt),
881
+ gift_items: e.array(jt),
877
882
  mp_url: e.string().optional(),
878
883
  mp_qrcode_url: e.string().optional()
879
884
  })
880
- }), jt = c.Invite, Tt = e.object({
885
+ }), qt = c.Invite, xt = e.object({
881
886
  ...u.shape,
882
- feature_type: e.string().enum(jt),
887
+ feature_type: e.string().enum(qt),
883
888
  config: e.object({
884
889
  share_url: e.string()
885
890
  })
886
- }), qt = c.InvitedRegister, xt = e.object({
891
+ }), St = c.InvitedRegister, Lt = e.object({
887
892
  ...u.shape,
888
- feature_type: e.string().enum(qt)
889
- }), St = e.string().enum(C(R, "GiftCode", "LotteryTicket")), Lt = c.Lottery, Pt = e.object({
893
+ feature_type: e.string().enum(St)
894
+ }), Pt = e.string().enum(R(V, "GiftCode", "LotteryTicket")), Et = c.Lottery, $t = e.object({
890
895
  reward_item_id: e.number(),
891
896
  reward_item_name: e.string(),
892
- reward_item_type: St,
897
+ reward_item_type: Pt,
893
898
  reward_item_icon_url: e.string(),
894
899
  reward_item_desc: e.string().optional(),
895
900
  reward_amount: e.number(),
896
901
  reward_remaining_stock: e.number()
897
- }), Et = e.object({
902
+ }), Ut = e.object({
898
903
  ...u.shape,
899
- feature_type: e.string().enum(Lt),
904
+ feature_type: e.string().enum(Et),
900
905
  config: e.object({
901
906
  consume_item_id: e.number(),
902
907
  consume_item_name: e.number(),
903
908
  consume_item_icon_url: e.string(),
904
909
  consume_item_count: e.number(),
905
910
  consume_item_desc: e.string().optional(),
906
- rewards: e.array(Pt)
911
+ rewards: e.array($t)
907
912
  })
908
- }), $t = c.LotteryDraw, Ut = e.object({
913
+ }), Ft = c.LotteryDraw, Dt = e.object({
909
914
  ...u.shape,
910
- feature_type: e.string().enum($t),
915
+ feature_type: e.string().enum(Ft),
911
916
  config: e.object({
912
917
  draw_not_before: e.number(),
913
918
  draw_not_after: e.number()
914
919
  })
915
- }), Ft = c.Preregister, Dt = e.object({
920
+ }), It = c.Preregister, Gt = e.object({
916
921
  ...u.shape,
917
- feature_type: e.string().enum(Ft)
918
- }), It = c.Quest, Gt = e.object({
922
+ feature_type: e.string().enum(It)
923
+ }), At = c.Quest, Nt = e.object({
919
924
  ...u.shape,
920
- feature_type: e.string().enum(It),
925
+ feature_type: e.string().enum(At),
921
926
  config: e.object({
922
927
  objective: te,
923
928
  completion_value: e.number(),
@@ -931,38 +936,38 @@ const R = {
931
936
  required_matches: e.number().min(1).optional()
932
937
  }).optional()
933
938
  })
934
- }), Nt = c.Register, At = e.object({
939
+ }), Ot = c.Register, Bt = e.object({
935
940
  ...u.shape,
936
- feature_type: e.string().enum(Nt)
937
- }), Ot = c.Share, Bt = e.object({
941
+ feature_type: e.string().enum(Ot)
942
+ }), Mt = c.Share, Qt = e.object({
938
943
  ...u.shape,
939
- feature_type: e.string().enum(Ot),
944
+ feature_type: e.string().enum(Mt),
940
945
  config: e.object({
941
946
  share_platform: e.string(),
942
947
  jump_url: e.string().optional(),
943
948
  icon_url: e.string().optional()
944
949
  })
945
- }), Mt = c.Subscribe, Qt = e.object({
950
+ }), Kt = c.Subscribe, Ht = e.object({
946
951
  ...u.shape,
947
- feature_type: e.string().enum(Mt),
952
+ feature_type: e.string().enum(Kt),
948
953
  config: e.object({
949
954
  weixin_template_ids: e.array(e.string())
950
955
  })
951
- }), Ht = c.Survey, zt = e.object({
956
+ }), zt = c.Survey, Jt = e.object({
952
957
  ...u.shape,
953
- feature_type: e.string().enum(Ht),
958
+ feature_type: e.string().enum(zt),
954
959
  config: e.object({
955
960
  survey_id: e.string(),
956
961
  survey_url: e.string()
957
962
  })
958
- }), Jt = c.Team, Kt = e.object({
963
+ }), Xt = c.Team, Yt = e.object({
959
964
  ...u.shape,
960
- feature_type: e.string().enum(Jt),
965
+ feature_type: e.string().enum(Xt),
961
966
  config: e.object({
962
967
  max_members: e.number().min(1),
963
968
  min_members: e.number().min(1)
964
969
  })
965
- }), Xt = c.Vote, Yt = e.object({
970
+ }), Zt = c.Vote, Wt = e.object({
966
971
  sn: e.string(),
967
972
  name: e.string(),
968
973
  img_urls: e.array(e.string()).optional(),
@@ -972,54 +977,57 @@ const R = {
972
977
  amount: e.number(),
973
978
  finalists: e.bool(),
974
979
  last_vote_time: e.number()
975
- }), Zt = e.object({
980
+ }), en = e.object({
976
981
  ...u.shape,
977
- feature_type: e.string().enum(Xt),
982
+ feature_type: e.string().enum(Zt),
978
983
  config: e.object({
979
984
  vote_feature_ids: e.array(e.number()),
980
985
  submission_feature_ids: e.array(e.number()),
981
986
  finalists_amount: e.number(),
982
987
  source: it,
983
- options: e.array(Yt),
988
+ options: e.array(Wt),
984
989
  rewards: e.array(U)
985
990
  })
986
- }), Wt = e.union(
991
+ }), tn = e.union(
987
992
  pt,
988
993
  bt,
989
- ft,
990
994
  wt,
991
995
  vt,
992
- Vt,
996
+ Rt,
993
997
  Tt,
994
998
  xt,
995
- Et,
999
+ Lt,
996
1000
  Ut,
997
1001
  Dt,
998
1002
  Gt,
999
- At,
1003
+ Nt,
1000
1004
  Bt,
1001
1005
  Qt,
1002
- zt,
1003
- Kt,
1004
- Zt
1005
- ).key("feature_type").satisfies(), en = e.object({
1006
+ Ht,
1007
+ Jt,
1008
+ Yt,
1009
+ en,
1010
+ ft
1011
+ ).key("feature_type").satisfies(), nn = e.object({
1006
1012
  event_name: e.string(),
1007
1013
  rules: e.string(),
1008
1014
  since: e.number(),
1009
1015
  until: e.number(),
1010
1016
  visit_count: e.number().optional(),
1011
- features: e.array(Wt)
1012
- }).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), tn = e.object({
1013
- order_total_amount: q,
1014
- cashback_total_amount: q,
1015
- game_item_count: q
1016
- }), nn = e.object({
1017
+ features: e.array(tn)
1018
+ }).lock(), x = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), rn = e.object({
1019
+ order_total_amount: x,
1020
+ cashback_total_amount: x,
1021
+ game_item_count: x
1022
+ }), on = e.object({
1023
+ activation_key: e.string().disallow("")
1024
+ }), an = e.object({
1017
1025
  gift_code: e.string()
1018
- }), rn = e.object({
1026
+ }), sn = e.object({
1019
1027
  user_id: e.string(),
1020
1028
  name: e.string().optional(),
1021
1029
  avatar_url: e.string().optional()
1022
- }), on = e.object({
1030
+ }), cn = e.object({
1023
1031
  lottery_count: e.number()
1024
1032
  }), re = e.object({
1025
1033
  reward_id: e.number(),
@@ -1041,21 +1049,21 @@ const R = {
1041
1049
  // https://kdocs.cn/l/ckWFDcOsYEUA?linkname=merUzJsVYH
1042
1050
  // 后续会格式化为具体的类型,此处的校验需要对应增加
1043
1051
  extra_data: e.record(e.unknown()).optional()
1044
- }), an = e.string().enum(w.Unknown, w.Pending), sn = e.union(
1052
+ }), un = e.string().enum(k.Unknown, k.Pending), ln = e.union(
1045
1053
  e.object({
1046
1054
  ticket: e.string(),
1047
- status: an
1055
+ status: un
1048
1056
  }),
1049
1057
  e.object({
1050
1058
  ticket: e.string(),
1051
- status: e.string().enum(C(w, "Unknown", "Pending")),
1059
+ status: e.string().enum(R(k, "Unknown", "Pending")),
1052
1060
  reward: re
1053
1061
  })
1054
- ).satisfies(), cn = e.object({
1055
- tickets: e.array(sn)
1056
- }), un = e.object({
1062
+ ).satisfies(), mn = e.object({
1063
+ tickets: e.array(ln)
1064
+ }), dn = e.object({
1057
1065
  platforms: e.array(e.string())
1058
- }), ln = e.object({
1066
+ }), gn = e.object({
1059
1067
  objective: te,
1060
1068
  progress: e.number(),
1061
1069
  completion_value: e.number().optional(),
@@ -1071,22 +1079,22 @@ const R = {
1071
1079
  })
1072
1080
  )
1073
1081
  }).optional()
1074
- }), mn = e.object({
1082
+ }), pn = e.object({
1075
1083
  platform: e.string()
1076
- }), dn = e.object({
1084
+ }), _n = e.object({
1077
1085
  weixin_openid: e.string()
1078
- }), gn = e.object({
1086
+ }), bn = e.object({
1079
1087
  serial_number: e.number()
1080
- }), pn = e.object({
1088
+ }), yn = e.object({
1081
1089
  team_code: e.string(),
1082
1090
  leader_name: e.string(),
1083
1091
  total_members: e.number()
1084
- }), Tr = e.object({
1092
+ }), Sr = e.object({
1085
1093
  is_leader: e.bool(),
1086
1094
  is_myself: e.bool().optional(),
1087
1095
  role_name: e.string(),
1088
1096
  server_name: e.string()
1089
- }), _n = e.object({
1097
+ }), fn = e.object({
1090
1098
  team_code: e.string(),
1091
1099
  visibility: st,
1092
1100
  members: e.array(
@@ -1096,9 +1104,9 @@ const R = {
1096
1104
  server_name: e.string()
1097
1105
  })
1098
1106
  )
1099
- }), bn = e.object({
1107
+ }), hn = e.object({
1100
1108
  option_sn: e.string()
1101
- }), yn = e.object({
1109
+ }), wn = e.object({
1102
1110
  user_id: e.string(),
1103
1111
  name: e.string(),
1104
1112
  avatar_url: e.string(),
@@ -1106,23 +1114,24 @@ const R = {
1106
1114
  video_note: e.number(),
1107
1115
  created_at: e.number()
1108
1116
  }), F = e.union(
1109
- un,
1110
- on,
1111
- gn,
1112
- rn,
1113
- mn,
1114
- bn,
1115
1117
  dn,
1116
- tn,
1117
- nn,
1118
- _n,
1119
- ln,
1120
1118
  cn,
1119
+ bn,
1120
+ sn,
1121
+ pn,
1122
+ hn,
1123
+ _n,
1124
+ rn,
1125
+ an,
1126
+ fn,
1127
+ gn,
1128
+ mn,
1129
+ on,
1121
1130
  e.custom(
1122
1131
  "EmptyObject",
1123
- (i) => v(i) && Object.keys(i).length === 0
1132
+ (i) => C(i) && Object.keys(i).length === 0
1124
1133
  )
1125
- ).satisfies().lock(), fn = e.object({
1134
+ ).satisfies().lock(), kn = e.object({
1126
1135
  reward_id: e.number(),
1127
1136
  reward_item_id: e.number(),
1128
1137
  reward_item_type: ee,
@@ -1135,7 +1144,7 @@ const R = {
1135
1144
  reward_item_rating: e.number(),
1136
1145
  receive_time: e.number(),
1137
1146
  extra_data: e.union(...F.validators, e.record(e.unknown())).satisfies().optional()
1138
- }), hn = e.object({
1147
+ }), vn = e.object({
1139
1148
  reward_id: e.number(),
1140
1149
  reward_item_id: e.number(),
1141
1150
  reward_item_name: e.string(),
@@ -1146,7 +1155,7 @@ const R = {
1146
1155
  reward_status: ne,
1147
1156
  reward_source: $,
1148
1157
  extra_data: e.record(e.unknown()).optional()
1149
- }), wn = e.object({
1158
+ }), Cn = e.object({
1150
1159
  engagement_id: e.number(),
1151
1160
  user_id: e.string(),
1152
1161
  event_id: e.number(),
@@ -1156,15 +1165,15 @@ const R = {
1156
1165
  server_id: e.string().optional(),
1157
1166
  role_id: e.string().optional(),
1158
1167
  created_at: e.number(),
1159
- rewards: e.array(fn).optional()
1160
- }).lock(), kn = e.object({
1168
+ rewards: e.array(kn).optional()
1169
+ }).lock(), Rn = e.object({
1161
1170
  allowed: e.bool(),
1162
1171
  registered: e.bool()
1163
- }), vn = e.object({
1172
+ }), Vn = e.object({
1164
1173
  feature_id: e.number(),
1165
1174
  can_engage: e.bool(),
1166
1175
  has_unclaimed_rewards: e.bool()
1167
- }), Cn = e.object({
1176
+ }), jn = e.object({
1168
1177
  engagement_id: e.number(),
1169
1178
  engagement: e.object({
1170
1179
  engagement_id: e.number(),
@@ -1172,33 +1181,33 @@ const R = {
1172
1181
  feature_id: e.number(),
1173
1182
  data: F.clone().optional()
1174
1183
  }).optional(),
1175
- rewards: e.array(hn).optional(),
1184
+ rewards: e.array(vn).optional(),
1176
1185
  scan: e.bool().optional()
1177
- }), Rn = e.object({
1186
+ }), Tn = e.object({
1178
1187
  reward_id: e.number(),
1179
1188
  reward_status: E
1180
- }), Vn = e.guard(en), jn = e.guard(kn), x = o({ count: e.number() }), Tn = o({ first_visit: e.bool() }), qn = o({
1181
- engagements: e.union(e.array(yn), e.array(pn))
1182
- }), xn = o({
1183
- status: e.array(vn)
1184
- }), Sn = o({
1185
- engagements: e.array(wn),
1186
- next_token: e.string().optional()
1187
- }), Ln = e.guard(Cn), Pn = o({
1188
- claimed_items: e.array(Rn)
1189
+ }), qn = e.guard(nn), xn = e.guard(Rn), S = o({ count: e.number() }), Sn = o({ first_visit: e.bool() }), Ln = o({
1190
+ engagements: e.union(e.array(wn), e.array(yn))
1191
+ }), Pn = o({
1192
+ status: e.array(Vn)
1189
1193
  }), En = o({
1194
+ engagements: e.array(Cn),
1195
+ next_token: e.string().optional()
1196
+ }), $n = e.guard(jn), Un = o({
1197
+ claimed_items: e.array(Tn)
1198
+ }), Fn = o({
1190
1199
  reward_status: E
1191
- }), $n = o({
1200
+ }), Dn = o({
1192
1201
  user_rewards: e.array(re),
1193
1202
  next_token: e.string().optional()
1194
- }), Un = o({
1203
+ }), In = o({
1195
1204
  scene: e.string()
1196
- }), Fn = o({
1205
+ }), Gn = o({
1197
1206
  params: e.string()
1198
- }), Dn = o({
1207
+ }), An = o({
1199
1208
  img: e.string()
1200
1209
  });
1201
- class qr {
1210
+ class Lr {
1202
1211
  constructor(t, n) {
1203
1212
  l(this, "token");
1204
1213
  l(this, "event", 0);
@@ -1211,7 +1220,7 @@ class qr {
1211
1220
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
1212
1221
  */
1213
1222
  async verifyMobileAllowed(t, n) {
1214
- const { data: r } = await this.req.get("verify-mobile-allowed", jn, {
1223
+ const { data: r } = await this.req.get("verify-mobile-allowed", xn, {
1215
1224
  params: { game_id: t, mobile: n }
1216
1225
  });
1217
1226
  return r;
@@ -1222,7 +1231,7 @@ class qr {
1222
1231
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
1223
1232
  */
1224
1233
  async getConfig() {
1225
- const { data: t } = await this.req.get(`event/${this.event}/event-config`, Vn);
1234
+ const { data: t } = await this.req.get(`event/${this.event}/event-config`, qn);
1226
1235
  return t;
1227
1236
  }
1228
1237
  /**
@@ -1231,7 +1240,7 @@ class qr {
1231
1240
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1232
1241
  */
1233
1242
  async getEngagementsUserCount(t) {
1234
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1243
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
1235
1244
  params: { feature_id: t, type: "user" }
1236
1245
  });
1237
1246
  return (n == null ? void 0 : n.count) ?? null;
@@ -1242,7 +1251,7 @@ class qr {
1242
1251
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1243
1252
  */
1244
1253
  async getEngagementsCount(t) {
1245
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, x, {
1254
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
1246
1255
  params: { feature_id: t, type: "engagement" }
1247
1256
  });
1248
1257
  return (n == null ? void 0 : n.count) ?? null;
@@ -1255,7 +1264,7 @@ class qr {
1255
1264
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
1256
1265
  */
1257
1266
  async getEngagements(t) {
1258
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, qn, {
1267
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, Ln, {
1259
1268
  params: { feature_id: t }
1260
1269
  });
1261
1270
  return (n == null ? void 0 : n.engagements) || [];
@@ -1270,7 +1279,7 @@ class qr {
1270
1279
  const { data: n, code: r } = await this.req.post(
1271
1280
  `event/${this.event}/visit`,
1272
1281
  a(t || {}),
1273
- Tn
1282
+ Sn
1274
1283
  );
1275
1284
  return n ?? {
1276
1285
  error: r
@@ -1287,7 +1296,7 @@ class qr {
1287
1296
  */
1288
1297
  async getUserFeatureStatus(t) {
1289
1298
  if (!await this.token.autoLogin()) return [];
1290
- const { data: n } = await this.req.get("event/user-feature-status", xn, {
1299
+ const { data: n } = await this.req.get("event/user-feature-status", Pn, {
1291
1300
  params: a({ ...t, event_id: this.event }),
1292
1301
  message: !1
1293
1302
  });
@@ -1302,7 +1311,7 @@ class qr {
1302
1311
  */
1303
1312
  async getUserEngagements(t, n) {
1304
1313
  if (!await this.token.autoLogin()) return [];
1305
- const { data: r } = await this.req.get("event/user-engagements", Sn, {
1314
+ const { data: r } = await this.req.get("event/user-engagements", En, {
1306
1315
  params: a({
1307
1316
  max_results: 20,
1308
1317
  ...n,
@@ -1333,7 +1342,7 @@ class qr {
1333
1342
  engagement: n,
1334
1343
  ...r
1335
1344
  }),
1336
- Ln
1345
+ $n
1337
1346
  );
1338
1347
  return s && s.rewards && (s.rewards = s.rewards.map((p) => (p.reward_status = p.reward_status === P.UnclaimedErr ? P.Unclaimed : p.reward_status, p))), s ?? {
1339
1348
  error: d
@@ -1346,7 +1355,7 @@ class qr {
1346
1355
  */
1347
1356
  async claimRewards(t) {
1348
1357
  await this.token.autoLogin();
1349
- const { data: n, code: r } = await this.req.post("event/claim-rewards", a(t), Pn), s = n == null ? void 0 : n.claimed_items;
1358
+ const { data: n, code: r } = await this.req.post("event/claim-rewards", a(t), Un), s = n == null ? void 0 : n.claimed_items;
1350
1359
  return s ? s.map((d) => (d.reward_status = d.reward_status === _.UnclaimedErr ? _.Unclaimed : d.reward_status, d)) : {
1351
1360
  error: r
1352
1361
  };
@@ -1361,7 +1370,7 @@ class qr {
1361
1370
  const { data: n, code: r } = await this.req.post(
1362
1371
  "event/claim-weixin-hongbao",
1363
1372
  { reward_id: t },
1364
- En
1373
+ Fn
1365
1374
  );
1366
1375
  return n ? (n.reward_status = n.reward_status === _.UnclaimedErr ? _.Unclaimed : n.reward_status, n) : {
1367
1376
  error: r
@@ -1377,7 +1386,7 @@ class qr {
1377
1386
  const { data: n } = await this.req.post(
1378
1387
  "event/user-rewards",
1379
1388
  a({ max_results: 20, ...t, event_id: this.event }),
1380
- $n
1389
+ Dn
1381
1390
  );
1382
1391
  return {
1383
1392
  user_rewards: ((n == null ? void 0 : n.user_rewards) || []).map((r) => (r.reward_status = r.reward_status === _.UnclaimedErr ? _.Unclaimed : r.reward_status, r)),
@@ -1391,7 +1400,7 @@ class qr {
1391
1400
  */
1392
1401
  async getUserItemCount(t) {
1393
1402
  if (!await this.token.autoLogin()) return null;
1394
- const { data: n } = await this.req.get(`event/${this.event}/user-item-count`, x, {
1403
+ const { data: n } = await this.req.get(`event/${this.event}/user-item-count`, S, {
1395
1404
  params: { item_id: t }
1396
1405
  });
1397
1406
  return (n == null ? void 0 : n.count) ?? null;
@@ -1415,7 +1424,7 @@ class qr {
1415
1424
  */
1416
1425
  async getUnlimitQrcodeScene(t) {
1417
1426
  if (!await this.token.autoLogin()) return null;
1418
- const { data: n } = await this.req.get("event/unlimit-qrcode-scene", Un, {
1427
+ const { data: n } = await this.req.get("event/unlimit-qrcode-scene", In, {
1419
1428
  params: { params: t }
1420
1429
  });
1421
1430
  return (n == null ? void 0 : n.scene) ?? null;
@@ -1428,7 +1437,7 @@ class qr {
1428
1437
  * @param scene - 小程序码 scene 值
1429
1438
  */
1430
1439
  async getParamsByQrcodeScene(t) {
1431
- const { data: n } = await this.req.get("event/params-by-qrcode-scene", Fn, {
1440
+ const { data: n } = await this.req.get("event/params-by-qrcode-scene", Gn, {
1432
1441
  params: { scene: t }
1433
1442
  });
1434
1443
  return (n == null ? void 0 : n.params) ?? null;
@@ -1440,16 +1449,16 @@ class qr {
1440
1449
  */
1441
1450
  async generateUnlimitQrcode(t) {
1442
1451
  if (!await this.token.autoLogin()) return null;
1443
- const { data: n } = await this.req.post("event/unlimit-qrcode", a(t), Dn);
1452
+ const { data: n } = await this.req.post("event/unlimit-qrcode", a(t), An);
1444
1453
  return (n == null ? void 0 : n.img) ?? null;
1445
1454
  }
1446
1455
  }
1447
- const In = {
1456
+ const Nn = {
1448
1457
  /** 所有人均可以发帖 */
1449
1458
  All: "all",
1450
1459
  /** 指定用户可发帖 */
1451
1460
  Limit: "limit"
1452
- }, Gn = e.string().enum(In).lock(), Nn = {
1461
+ }, On = e.string().enum(Nn).lock(), Bn = {
1453
1462
  /** 待审核(仅自己可见) */
1454
1463
  Pending: "pending",
1455
1464
  /** 审核通过 */
@@ -1458,14 +1467,14 @@ const In = {
1458
1467
  Failed: "failed",
1459
1468
  /** 嫌疑(仅自己可见) */
1460
1469
  Suspect: "suspect"
1461
- }, ie = e.string().enum(Nn).lock(), An = {
1470
+ }, ie = e.string().enum(Bn).lock(), Mn = {
1462
1471
  /** 系统通知 */
1463
1472
  System: "system",
1464
1473
  /** 评论我的 */
1465
1474
  Comment: "comment",
1466
1475
  /** 点赞通知 */
1467
1476
  Like: "like"
1468
- }, xr = e.string().enum(An).lock(), m = {
1477
+ }, Pr = e.string().enum(Mn).lock(), m = {
1469
1478
  /** 系统通知 */
1470
1479
  System: "system",
1471
1480
  /** 帖子被置顶 */
@@ -1490,13 +1499,13 @@ const In = {
1490
1499
  ReplyLiked: "reply_liked",
1491
1500
  /** 回复被删除 */
1492
1501
  ReplyDeleted: "reply_deleted"
1493
- }, On = e.string().enum(m).lock(), oe = e.object({
1502
+ }, Qn = e.string().enum(m).lock(), oe = e.object({
1494
1503
  forum_id: e.number(),
1495
1504
  icon_url: e.string(),
1496
1505
  name: e.string(),
1497
1506
  tags: e.array(e.string()),
1498
1507
  sort: e.number(),
1499
- mode: Gn,
1508
+ mode: On,
1500
1509
  member_ids: e.array(e.number())
1501
1510
  }).lock(), D = e.object({
1502
1511
  topic_id: e.number(),
@@ -1527,13 +1536,13 @@ const In = {
1527
1536
  create_time: e.number()
1528
1537
  }).lock(), ae = e.object({
1529
1538
  err_msg: e.string().optional()
1530
- }).lock(), Bn = e.object({
1539
+ }).lock(), Kn = e.object({
1531
1540
  reply_id: e.number(),
1532
1541
  reply_content: e.string().optional(),
1533
1542
  replied_by: e.string(),
1534
1543
  nickname: e.string(),
1535
1544
  avatar_url: e.string()
1536
- }).lock(), V = e.object({
1545
+ }).lock(), j = e.object({
1537
1546
  reply_id: e.number(),
1538
1547
  comment_id: e.number(),
1539
1548
  comment_content: e.string().optional(),
@@ -1546,9 +1555,9 @@ const In = {
1546
1555
  content: e.string(),
1547
1556
  like_num: e.number(),
1548
1557
  liked: e.bool(),
1549
- reply_to: Bn,
1558
+ reply_to: Kn,
1550
1559
  create_time: e.number()
1551
- }).lock(), k = e.object({
1560
+ }).lock(), v = e.object({
1552
1561
  comment_id: e.number(),
1553
1562
  post_id: e.number(),
1554
1563
  post_subject: e.string().optional(),
@@ -1567,20 +1576,20 @@ const In = {
1567
1576
  image_url: e.string(),
1568
1577
  create_time: e.number(),
1569
1578
  status: ie,
1570
- replies: e.array(V).optional()
1571
- }).lock(), Mn = e.object({
1579
+ replies: e.array(j).optional()
1580
+ }).lock(), Hn = e.object({
1572
1581
  image_url: e.string(),
1573
1582
  upload_url: e.string(),
1574
1583
  existed: e.bool()
1575
1584
  }).lock(), y = e.object({
1576
1585
  notification_id: e.string(),
1577
- notification_type: On,
1586
+ notification_type: Qn,
1578
1587
  is_read: e.bool(),
1579
1588
  create_time: e.number(),
1580
1589
  origin_user_id: e.string(),
1581
1590
  origin_user_name: e.string(),
1582
1591
  origin_user_avatar_url: e.string()
1583
- }).lock(), Qn = e.object({
1592
+ }).lock(), zn = e.object({
1584
1593
  system_message_subject: e.string(),
1585
1594
  system_message_content: e.string()
1586
1595
  }).lock(), G = e.object({
@@ -1588,17 +1597,17 @@ const In = {
1588
1597
  post_subject: e.string(),
1589
1598
  post_summary: e.string(),
1590
1599
  post_image_url: e.string()
1591
- }).lock(), j = e.object({
1600
+ }).lock(), T = e.object({
1592
1601
  comment_id: e.number(),
1593
1602
  comment_content: e.string()
1594
- }).lock(), N = e.object({
1603
+ }).lock(), A = e.object({
1595
1604
  reply_id: e.number(),
1596
1605
  reply_content: e.string()
1597
- }).lock(), Hn = e.object({
1606
+ }).lock(), Jn = e.object({
1598
1607
  ...y.shape,
1599
- ...Qn.shape,
1608
+ ...zn.shape,
1600
1609
  notification_type: e.string().enum(m.System)
1601
- }), zn = e.object({
1610
+ }), Xn = e.object({
1602
1611
  ...y.shape,
1603
1612
  ...G.shape,
1604
1613
  notification_type: e.string().enum(
@@ -1607,65 +1616,65 @@ const In = {
1607
1616
  m.PostDeleted,
1608
1617
  m.PostLiked
1609
1618
  )
1610
- }), Jn = e.object({
1619
+ }), Yn = e.object({
1611
1620
  ...y.shape,
1612
1621
  ...G.shape,
1613
- ...j.shape,
1622
+ ...T.shape,
1614
1623
  notification_type: e.string().enum(m.PostCommented)
1615
- }), Kn = e.object({
1624
+ }), Zn = e.object({
1616
1625
  ...y.shape,
1617
- ...j.shape,
1618
- ...N.shape,
1626
+ ...T.shape,
1627
+ ...A.shape,
1619
1628
  notification_type: e.string().enum(m.CommentReplied)
1620
- }), Xn = e.object({
1629
+ }), Wn = e.object({
1621
1630
  ...y.shape,
1622
- ...j.shape,
1631
+ ...T.shape,
1623
1632
  ...G.shape,
1624
1633
  notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
1625
- }), Yn = e.object({
1634
+ }), er = e.object({
1626
1635
  ...y.shape,
1627
- ...N.shape,
1636
+ ...A.shape,
1628
1637
  notification_type: e.string().enum(m.ReplyReplied),
1629
1638
  comment_id: e.number(),
1630
1639
  reply_to_reply_id: e.number(),
1631
1640
  reply_to_reply_content: e.string()
1632
- }), Zn = e.object({
1641
+ }), tr = e.object({
1633
1642
  ...y.shape,
1634
- ...N.shape,
1635
- ...j.shape,
1643
+ ...A.shape,
1644
+ ...T.shape,
1636
1645
  notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
1637
- }), Wn = e.union(
1638
- Hn,
1639
- zn,
1646
+ }), nr = e.union(
1640
1647
  Jn,
1641
- Kn,
1642
1648
  Xn,
1643
1649
  Yn,
1644
- Zn
1645
- ).satisfies().lock(), er = o({ forums: e.array(oe) }), tr = o({ topics: e.array(D) }), nr = o({ topic: D }), rr = o({ post: I }), H = o({
1650
+ Zn,
1651
+ Wn,
1652
+ er,
1653
+ tr
1654
+ ).satisfies().lock(), rr = o({ forums: e.array(oe) }), ir = o({ topics: e.array(D) }), or = o({ topic: D }), ar = o({ post: I }), K = o({
1646
1655
  posts: e.array(I),
1647
1656
  next_token: e.string().optional()
1648
- }), ir = o({ post: I, antispam: ae }), or = o({
1649
- replies: e.array(V),
1657
+ }), sr = o({ post: I, antispam: ae }), cr = o({
1658
+ replies: e.array(j),
1650
1659
  next_token: e.string().optional()
1651
- }), ar = o({ reply: V }), sr = o({
1652
- reply: V.clone().optional(),
1660
+ }), ur = o({ reply: j }), lr = o({
1661
+ reply: j.clone().optional(),
1653
1662
  antispam: ae.clone().optional()
1654
- }), cr = o({ comment: k }), ur = o({
1655
- comments: e.array(k),
1656
- next_token: e.string().optional()
1657
- }), lr = o({
1658
- comment: k.clone().optional(),
1659
- antispam: k.clone().optional()
1660
- }), mr = e.guard(Mn), dr = o({
1661
- notifications: e.array(Wn),
1663
+ }), mr = o({ comment: v }), dr = o({
1664
+ comments: e.array(v),
1662
1665
  next_token: e.string().optional()
1663
1666
  }), gr = o({
1667
+ comment: v.clone().optional(),
1668
+ antispam: v.clone().optional()
1669
+ }), pr = e.guard(Hn), _r = o({
1670
+ notifications: e.array(nr),
1671
+ next_token: e.string().optional()
1672
+ }), br = o({
1664
1673
  system: e.number(),
1665
1674
  comment: e.number(),
1666
1675
  like: e.number()
1667
1676
  });
1668
- class Sr {
1677
+ class Er {
1669
1678
  constructor(t) {
1670
1679
  l(this, "token");
1671
1680
  l(this, "req");
@@ -1677,7 +1686,7 @@ class Sr {
1677
1686
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
1678
1687
  */
1679
1688
  async getForums() {
1680
- const { data: t } = await this.req.get("community/forums", er);
1689
+ const { data: t } = await this.req.get("community/forums", rr);
1681
1690
  return (t == null ? void 0 : t.forums) || [];
1682
1691
  }
1683
1692
  /**
@@ -1686,7 +1695,7 @@ class Sr {
1686
1695
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
1687
1696
  */
1688
1697
  async getTopics() {
1689
- const { data: t } = await this.req.get("community/topics", tr);
1698
+ const { data: t } = await this.req.get("community/topics", ir);
1690
1699
  return (t == null ? void 0 : t.topics) || [];
1691
1700
  }
1692
1701
  /**
@@ -1695,7 +1704,7 @@ class Sr {
1695
1704
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
1696
1705
  */
1697
1706
  async getTopic(t) {
1698
- const { data: n, code: r } = await this.req.get("community/topic", nr, {
1707
+ const { data: n, code: r } = await this.req.get("community/topic", or, {
1699
1708
  params: { topic_id: t }
1700
1709
  });
1701
1710
  return (n == null ? void 0 : n.topic) ?? { error: r };
@@ -1706,7 +1715,7 @@ class Sr {
1706
1715
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
1707
1716
  */
1708
1717
  async getPosts(t) {
1709
- const { data: n, code: r } = await this.req.get("community/posts", H, {
1718
+ const { data: n, code: r } = await this.req.get("community/posts", K, {
1710
1719
  params: a(t)
1711
1720
  });
1712
1721
  return n ?? { error: r };
@@ -1717,7 +1726,7 @@ class Sr {
1717
1726
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
1718
1727
  */
1719
1728
  async getPinnedPosts(t, n, r) {
1720
- const { data: s, code: d } = await this.req.get("community/pinned-posts", H, {
1729
+ const { data: s, code: d } = await this.req.get("community/pinned-posts", K, {
1721
1730
  params: a({ forum_id: t, max_results: n, next_token: r })
1722
1731
  });
1723
1732
  return s ?? { error: d };
@@ -1728,7 +1737,7 @@ class Sr {
1728
1737
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
1729
1738
  */
1730
1739
  async getPost(t) {
1731
- const { data: n, code: r } = await this.req.get("community/post", rr, {
1740
+ const { data: n, code: r } = await this.req.get("community/post", ar, {
1732
1741
  params: { post_id: t }
1733
1742
  });
1734
1743
  return (n == null ? void 0 : n.post) ?? { error: r };
@@ -1739,7 +1748,7 @@ class Sr {
1739
1748
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
1740
1749
  */
1741
1750
  async post(t) {
1742
- const { data: n, code: r } = await this.req.post("community/post", a(t), ir);
1751
+ const { data: n, code: r } = await this.req.post("community/post", a(t), sr);
1743
1752
  return n ?? {
1744
1753
  error: r
1745
1754
  };
@@ -1750,7 +1759,7 @@ class Sr {
1750
1759
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
1751
1760
  */
1752
1761
  async getComments(t) {
1753
- const { data: n, code: r } = await this.req.get("community/comments", ur, {
1762
+ const { data: n, code: r } = await this.req.get("community/comments", dr, {
1754
1763
  params: a(t)
1755
1764
  });
1756
1765
  return n ?? { error: r };
@@ -1761,7 +1770,7 @@ class Sr {
1761
1770
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
1762
1771
  */
1763
1772
  async getComment(t) {
1764
- const { data: n, code: r } = await this.req.get("community/comment", cr, {
1773
+ const { data: n, code: r } = await this.req.get("community/comment", mr, {
1765
1774
  params: { comment_id: t }
1766
1775
  });
1767
1776
  return (n == null ? void 0 : n.comment) ?? { error: r };
@@ -1773,7 +1782,7 @@ class Sr {
1773
1782
  */
1774
1783
  async comment(t) {
1775
1784
  await this.token.autoLogin();
1776
- const { data: n, code: r } = await this.req.post("community/comment", a(t), lr);
1785
+ const { data: n, code: r } = await this.req.post("community/comment", a(t), gr);
1777
1786
  return n ?? {
1778
1787
  error: r
1779
1788
  };
@@ -1784,7 +1793,7 @@ class Sr {
1784
1793
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
1785
1794
  */
1786
1795
  async getReplies(t) {
1787
- const { data: n } = await this.req.get("community/replies", or, {
1796
+ const { data: n } = await this.req.get("community/replies", cr, {
1788
1797
  params: a({ max_results: 20, ...t })
1789
1798
  });
1790
1799
  return n ?? { replies: [] };
@@ -1795,7 +1804,7 @@ class Sr {
1795
1804
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
1796
1805
  */
1797
1806
  async getReply(t) {
1798
- const { data: n, code: r } = await this.req.get("community/reply", ar, {
1807
+ const { data: n, code: r } = await this.req.get("community/reply", ur, {
1799
1808
  params: { reply_id: t }
1800
1809
  });
1801
1810
  return (n == null ? void 0 : n.reply) ?? { error: r };
@@ -1807,7 +1816,7 @@ class Sr {
1807
1816
  */
1808
1817
  async reply(t) {
1809
1818
  await this.token.autoLogin();
1810
- const { data: n, code: r } = await this.req.post("community/reply", a(t), sr);
1819
+ const { data: n, code: r } = await this.req.post("community/reply", a(t), lr);
1811
1820
  return n ?? {
1812
1821
  error: r
1813
1822
  };
@@ -1843,7 +1852,7 @@ class Sr {
1843
1852
  */
1844
1853
  async getMediaPresignedUrl(t) {
1845
1854
  await this.token.autoLogin();
1846
- const { data: n } = await this.req.get("community/media-presign-url", mr, {
1855
+ const { data: n } = await this.req.get("community/media-presign-url", pr, {
1847
1856
  params: t
1848
1857
  });
1849
1858
  return n;
@@ -1857,7 +1866,7 @@ class Sr {
1857
1866
  */
1858
1867
  async getNotifications(t) {
1859
1868
  await this.token.autoLogin();
1860
- const { data: n } = await this.req.get("community/notifications", dr, {
1869
+ const { data: n } = await this.req.get("community/notifications", _r, {
1861
1870
  params: a({ max_results: 20, ...t })
1862
1871
  });
1863
1872
  return n || { notifications: [] };
@@ -1869,7 +1878,7 @@ class Sr {
1869
1878
  */
1870
1879
  async getUnreadNotificationsCount() {
1871
1880
  if (!await this.token.autoLogin()) return null;
1872
- const { data: t } = await this.req.get("community/unread-notifications-count", gr);
1881
+ const { data: t } = await this.req.get("community/unread-notifications-count", br);
1873
1882
  return t;
1874
1883
  }
1875
1884
  /**
@@ -1883,17 +1892,17 @@ class Sr {
1883
1892
  return n;
1884
1893
  }
1885
1894
  }
1886
- const pr = o({
1895
+ const yr = o({
1887
1896
  nonce_str: e.string(),
1888
1897
  timestamp: e.number(),
1889
1898
  signature: e.string()
1890
1899
  });
1891
- var _r = /* @__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))(_r || {});
1892
- function S(i) {
1893
- return v(i, "open_id", "union_id", "weixin_token");
1900
+ var fr = /* @__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))(fr || {});
1901
+ function L(i) {
1902
+ return C(i, "open_id", "union_id", "weixin_token");
1894
1903
  }
1895
- const z = "wx_login_cache";
1896
- class Lr {
1904
+ const H = "wx_login_cache";
1905
+ class $r {
1897
1906
  /**
1898
1907
  * 创建微信相关功能接口
1899
1908
  *
@@ -1924,11 +1933,11 @@ class Lr {
1924
1933
  * 也可以直接调用 login 方法,并传入 weixin code 的读取函数
1925
1934
  */
1926
1935
  async getLoginCache() {
1927
- const t = this.token.storage.get(z);
1936
+ const t = this.token.storage.get(H);
1928
1937
  if (!t)
1929
1938
  return null;
1930
1939
  const n = _e(t);
1931
- return S(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
1940
+ return L(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
1932
1941
  }
1933
1942
  /**
1934
1943
  * 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
@@ -1956,10 +1965,10 @@ class Lr {
1956
1965
  const n = await fe(), { data: r, code: s } = await this.req.post(
1957
1966
  "weixin/login",
1958
1967
  { code: n, appid: this.appid },
1959
- S,
1968
+ L,
1960
1969
  { message: !1 }
1961
1970
  );
1962
- return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(z, JSON.stringify(r)), await this.token.autoLogin()), r ?? { error: s };
1971
+ return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(H, JSON.stringify(r)), await this.token.autoLogin()), r ?? { error: s };
1963
1972
  }
1964
1973
  /**
1965
1974
  * 在微信内嵌网页中调用微信公众号授权登录【暂未启用】
@@ -1978,9 +1987,9 @@ class Lr {
1978
1987
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
1979
1988
  */
1980
1989
  async webLogin(t = "snsapi_userinfo") {
1981
- const n = L("code"), r = Date.now(), s = +L("state");
1990
+ const n = w("code"), r = Date.now(), s = +w("state");
1982
1991
  if (!n || !s || s < r - 1e3 * 60 * 5 || s > r) {
1983
- const ce = A(["code", "state"]);
1992
+ const ce = N(["code", "state"]);
1984
1993
  location.replace(
1985
1994
  `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ce)}&response_type=code&scope=${t}&state=${r}#wechat_redirect`
1986
1995
  );
@@ -1988,7 +1997,7 @@ class Lr {
1988
1997
  }
1989
1998
  if (/^100\d{2}$/.test(n))
1990
1999
  return { error: n };
1991
- const d = A(["code", "state"]);
2000
+ const d = N(["code", "state"]);
1992
2001
  "replaceState" in history && history.replaceState({}, "", d);
1993
2002
  const { data: p, code: se } = await this.req.post(
1994
2003
  "weixin/login",
@@ -1996,7 +2005,7 @@ class Lr {
1996
2005
  code: n,
1997
2006
  appid: this.appid
1998
2007
  },
1999
- S
2008
+ L
2000
2009
  );
2001
2010
  return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? { error: se };
2002
2011
  }
@@ -2023,7 +2032,7 @@ class Lr {
2023
2032
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
2024
2033
  */
2025
2034
  async getJSSDKConfig() {
2026
- const { data: t } = await this.req.get("weixin/offiaccount/jssdk-sign", pr, {
2035
+ const { data: t } = await this.req.get("weixin/offiaccount/jssdk-sign", yr, {
2027
2036
  params: {
2028
2037
  appid: this.appid,
2029
2038
  url: location.href.split("#")[0]
@@ -2039,13 +2048,14 @@ class Lr {
2039
2048
  }
2040
2049
  export {
2041
2050
  ae as AntispamValidator,
2042
- hr as AuthToken,
2043
- tn as CashbackEngagementDataValidator,
2051
+ vr as AuthToken,
2052
+ rn as CashbackEngagementDataValidator,
2053
+ on as ClaimActivationKeyEngagementDataValidator,
2044
2054
  _ as ClaimRewardStatus,
2045
2055
  E as ClaimRewardStatusValidator,
2046
- Rn as ClaimedItemValidator,
2056
+ Tn as ClaimedItemValidator,
2047
2057
  X as ClubAddressValidator,
2048
- kr as ClubApi,
2058
+ Rr as ClubApi,
2049
2059
  Y as ClubBenefitSummaryValidator,
2050
2060
  Ie as ClubBenefitValidator,
2051
2061
  Ve as ClubCreditChangeScene,
@@ -2055,127 +2065,128 @@ export {
2055
2065
  De as ClubCreditLogValidator,
2056
2066
  Se as ClubGlobalConfigValidator,
2057
2067
  Te as ClubItemType,
2058
- J as ClubItemTypeValidator,
2068
+ z as ClubItemTypeValidator,
2059
2069
  Le as ClubPlayerValidator,
2060
2070
  Z as ClubProductValidator,
2061
2071
  qe as ClubRedemptionStatus,
2062
2072
  xe as ClubRedemptionStatusValidator,
2063
2073
  Fe as ClubUserCreditValidator,
2064
2074
  Ue as ClubUserProfileValidator,
2065
- yn as CommentEngagementValidator,
2066
- k as CommentValidator,
2067
- Sr as CommunityApi,
2075
+ wn as CommentEngagementValidator,
2076
+ v as CommentValidator,
2077
+ Er as CommunityApi,
2068
2078
  Ye as EngageAccountType,
2069
2079
  Ze as EngageAccountTypeValidator,
2070
- Cn as EngageResponseValidator,
2071
- hn as EngageRewardValidator,
2072
- qr as EventApi,
2073
- en as EventConfigValidator,
2080
+ jn as EngageResponseValidator,
2081
+ vn as EngageRewardValidator,
2082
+ Lr as EventApi,
2083
+ nn as EventConfigValidator,
2074
2084
  pt as EventFeatureConfigOfCashbackValidator,
2075
2085
  bt as EventFeatureConfigOfCheckInValidator,
2076
- ft as EventFeatureConfigOfClaimRewardsValidator,
2077
- wt as EventFeatureConfigOfCommentValidator,
2078
- vt as EventFeatureConfigOfFollowValidator,
2079
- Vt as EventFeatureConfigOfGiftCodeValidator,
2080
- Tt as EventFeatureConfigOfInviteValidator,
2081
- xt as EventFeatureConfigOfInvitedRegisterValidator,
2082
- Ut as EventFeatureConfigOfLotteryDrawValidator,
2083
- Et as EventFeatureConfigOfLotteryValidator,
2084
- Dt as EventFeatureConfigOfPreregisterValidator,
2085
- Gt as EventFeatureConfigOfQuestValidator,
2086
- At as EventFeatureConfigOfRegisterValidator,
2087
- Bt as EventFeatureConfigOfShareValidator,
2088
- Qt as EventFeatureConfigOfSubscribeValidator,
2089
- zt as EventFeatureConfigOfSurveyValidator,
2090
- Kt as EventFeatureConfigOfTeamValidator,
2091
- Zt as EventFeatureConfigOfVoteValidator,
2092
- Wt as EventFeatureConfigValidator,
2086
+ ft as EventFeatureConfigOfClaimActivationKeyValidator,
2087
+ wt as EventFeatureConfigOfClaimRewardsValidator,
2088
+ vt as EventFeatureConfigOfCommentValidator,
2089
+ Rt as EventFeatureConfigOfFollowValidator,
2090
+ Tt as EventFeatureConfigOfGiftCodeValidator,
2091
+ xt as EventFeatureConfigOfInviteValidator,
2092
+ Lt as EventFeatureConfigOfInvitedRegisterValidator,
2093
+ Dt as EventFeatureConfigOfLotteryDrawValidator,
2094
+ Ut as EventFeatureConfigOfLotteryValidator,
2095
+ Gt as EventFeatureConfigOfPreregisterValidator,
2096
+ Nt as EventFeatureConfigOfQuestValidator,
2097
+ Bt as EventFeatureConfigOfRegisterValidator,
2098
+ Qt as EventFeatureConfigOfShareValidator,
2099
+ Ht as EventFeatureConfigOfSubscribeValidator,
2100
+ Jt as EventFeatureConfigOfSurveyValidator,
2101
+ Yt as EventFeatureConfigOfTeamValidator,
2102
+ en as EventFeatureConfigOfVoteValidator,
2103
+ tn as EventFeatureConfigValidator,
2093
2104
  We as EventPeriodType,
2094
2105
  et as EventPeriodTypeValidator,
2095
2106
  U as EventRewardItemConfigValidator,
2096
- Ne as ExtraGameRewardValidator,
2107
+ Ae as ExtraGameRewardValidator,
2097
2108
  Ge as ExtraPhysicalShipmentValidator,
2098
2109
  dt as FeatureRewardValidator,
2099
2110
  c as FeatureType,
2100
2111
  tt as FeatureTypeValidator,
2101
- In as ForumMode,
2102
- Gn as ForumModeValidator,
2112
+ Nn as ForumMode,
2113
+ On as ForumModeValidator,
2103
2114
  oe as ForumValidator,
2104
- R as GamerItemType,
2115
+ V as GamerItemType,
2105
2116
  W as GamerItemTypeValidator,
2106
2117
  ke as Gender,
2107
2118
  ve as GenderValidator,
2108
- nn as GiftCodeEngagementDataValidator,
2109
- rn as InviteEngagementDataValidator,
2119
+ an as GiftCodeEngagementDataValidator,
2120
+ sn as InviteEngagementDataValidator,
2110
2121
  ut as LotteryDrawAction,
2111
- jr as LotteryDrawActionValidator,
2112
- cn as LotteryDrawEngagementDataValidator,
2113
- on as LotteryEngagementDataValidator,
2114
- w as LotteryTicketStatus,
2115
- Rr as LotteryTicketStatusValidator,
2122
+ xr as LotteryDrawActionValidator,
2123
+ mn as LotteryDrawEngagementDataValidator,
2124
+ cn as LotteryEngagementDataValidator,
2125
+ k as LotteryTicketStatus,
2126
+ Tr as LotteryTicketStatusValidator,
2116
2127
  y as NotificationBaseValidator,
2117
- An as NotificationCategory,
2118
- xr as NotificationCategoryValidator,
2119
- Kn as NotificationCommentReplyValidator,
2120
- Xn as NotificationCommentValidator,
2121
- j as NotificationPayloadCommentValidator,
2128
+ Mn as NotificationCategory,
2129
+ Pr as NotificationCategoryValidator,
2130
+ Zn as NotificationCommentReplyValidator,
2131
+ Wn as NotificationCommentValidator,
2132
+ T as NotificationPayloadCommentValidator,
2122
2133
  G as NotificationPayloadPostValidator,
2123
- N as NotificationPayloadReplyValidator,
2124
- Qn as NotificationPayloadSystemValidator,
2125
- Jn as NotificationPostCommentValidator,
2126
- zn as NotificationPostValidator,
2127
- Yn as NotificationReplyRepliedValidator,
2128
- Zn as NotificationReplyValidator,
2129
- Hn as NotificationSystemValidator,
2134
+ A as NotificationPayloadReplyValidator,
2135
+ zn as NotificationPayloadSystemValidator,
2136
+ Yn as NotificationPostCommentValidator,
2137
+ Xn as NotificationPostValidator,
2138
+ er as NotificationReplyRepliedValidator,
2139
+ tr as NotificationReplyValidator,
2140
+ Jn as NotificationSystemValidator,
2130
2141
  m as NotificationType,
2131
- On as NotificationTypeValidator,
2132
- Wn as NotificationValidator,
2142
+ Qn as NotificationTypeValidator,
2143
+ nr as NotificationValidator,
2133
2144
  $e as PlayerRoleCardValidator,
2134
- K as PlayerRoleValidator,
2135
- Nn as PostStatus,
2145
+ J as PlayerRoleValidator,
2146
+ Bn as PostStatus,
2136
2147
  ie as PostStatusValidator,
2137
2148
  I as PostValidator,
2138
- un as PreregisterEngagementDataValidator,
2139
- Mn as PresignedUrlResponseValidator,
2140
- ln as QuestEngagementDataValidator,
2149
+ dn as PreregisterEngagementDataValidator,
2150
+ Hn as PresignedUrlResponseValidator,
2151
+ gn as QuestEngagementDataValidator,
2141
2152
  nt as QuestObjective,
2142
2153
  te as QuestObjectiveValidator,
2143
- wr as RedeemParamsValidator,
2144
- Ae as RedemptionValidator,
2154
+ Cr as RedeemParamsValidator,
2155
+ Ne as RedemptionValidator,
2145
2156
  mt as RegularRewardValidator,
2146
- Bn as ReplyToValidator,
2147
- V as ReplyValidator,
2148
- vr as RewardItemType,
2157
+ Kn as ReplyToValidator,
2158
+ j as ReplyValidator,
2159
+ Vr as RewardItemType,
2149
2160
  ee as RewardItemTypeValidator,
2150
2161
  ot as RewardSource,
2151
2162
  $ as RewardSourceValidator,
2152
2163
  g as RewardStatus,
2153
2164
  P as RewardStatusSuffix,
2154
2165
  ne as RewardStatusSuffixValidator,
2155
- Cr as RewardStatusValidator,
2156
- fn as RewardValidator,
2166
+ jr as RewardStatusValidator,
2167
+ kn as RewardValidator,
2157
2168
  Ee as RoleBaseInfoValidator,
2158
2169
  Pe as ServerBaseInfoValidator,
2159
- mn as ShareEngagementDataValidator,
2160
- gn as SurveyEngagementDataValidator,
2170
+ pn as ShareEngagementDataValidator,
2171
+ bn as SurveyEngagementDataValidator,
2161
2172
  ct as TeamAction,
2162
- Vr as TeamActionValidator,
2163
- _n as TeamEngagementDataValidator,
2164
- pn as TeamEngagementValidator,
2165
- Tr as TeamMemberValidator,
2173
+ qr as TeamActionValidator,
2174
+ fn as TeamEngagementDataValidator,
2175
+ yn as TeamEngagementValidator,
2176
+ Sr as TeamMemberValidator,
2166
2177
  at as TeamVisibility,
2167
2178
  st as TeamVisibilityValidator,
2168
2179
  D as TopicValidator,
2169
2180
  F as UserEngagementDataValidator,
2170
- wn as UserEngagementValidator,
2171
- vn as UserFeatureStatusValidator,
2181
+ Cn as UserEngagementValidator,
2182
+ Vn as UserFeatureStatusValidator,
2172
2183
  re as UserRewardValidator,
2173
- kn as VerifyMobileResultValidator,
2174
- bn as VoteEngagementDataValidator,
2184
+ Rn as VerifyMobileResultValidator,
2185
+ hn as VoteEngagementDataValidator,
2175
2186
  rt as VoteOptionSource,
2176
2187
  it as VoteOptionSourceValidator,
2177
- Lr as WeixinApi,
2178
- dn as WeixinSubscribeEngagementDataValidator,
2179
- _r as WeixinWebLoginErrorCode,
2180
- pr as isWeixinSignResponse
2188
+ $r as WeixinApi,
2189
+ _n as WeixinSubscribeEngagementDataValidator,
2190
+ fr as WeixinWebLoginErrorCode,
2191
+ yr as isWeixinSignResponse
2181
2192
  };