@seayoo-web/gamer-api 2.9.0 → 2.9.2

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 v, supportWx as f, useConsole as de, usePromise as ge, pruneURL as pe, supportWindow as _e, queryString as P, pruneObject as c, omitFields as C, parseJSON as be, removePara as Q } from "@seayoo-web/utils";
1
+ import { isComboWebView as de } from "@seayoo-web/combo-webview";
2
+ import { isPlainObject as v, supportWx as f, useConsole as ge, usePromise as pe, pruneURL as _e, supportWindow as be, queryString as P, pruneObject as c, omitFields as C, parseJSON as ye, removePara as Q } from "@seayoo-web/utils";
3
3
  import { v as e, objectGuard as s } from "@seayoo-web/validator";
4
- function ye(i) {
4
+ function fe(i) {
5
5
  return v(i, "gamer_token") && typeof i.gamer_token == "string";
6
6
  }
7
7
  function B(i) {
8
8
  return v(i);
9
9
  }
10
- const T = de("GamerApiSDK");
11
- function fe(i) {
10
+ const T = ge("GamerApiSDK");
11
+ function he(i) {
12
12
  return /^\/[a-z\d-]+$/.test(i);
13
13
  }
14
- async function he() {
15
- const { promise: i, resolve: t } = ge();
14
+ async function we() {
15
+ const { promise: i, resolve: t } = pe();
16
16
  return wx.login({
17
17
  success(n) {
18
18
  t(n.code);
@@ -22,7 +22,7 @@ async function he() {
22
22
  }
23
23
  }), await i;
24
24
  }
25
- const we = {
25
+ const ke = {
26
26
  get(i) {
27
27
  return localStorage.getItem(i) || "";
28
28
  },
@@ -32,7 +32,7 @@ const we = {
32
32
  remove(i) {
33
33
  localStorage.removeItem(i);
34
34
  }
35
- }, ke = {
35
+ }, ve = {
36
36
  get(i) {
37
37
  try {
38
38
  if (f()) return wx.getStorageSync(i) || "";
@@ -64,8 +64,8 @@ class Er {
64
64
  req;
65
65
  storage;
66
66
  constructor(t, n) {
67
- this.storage = f() ? ke : we;
68
- const r = fe(t) ? t : `https://${pe(t)}`;
67
+ this.storage = f() ? ve : ke;
68
+ const r = he(t) ? t : `https://${_e(t)}`;
69
69
  if (this.$NetRequest = n, this.req = n({
70
70
  baseURL: `${r}/v1`,
71
71
  timeout: 1e4,
@@ -86,9 +86,9 @@ class Er {
86
86
  requestTransformer: (a) => {
87
87
  this.$gamerToken && (a.headers.Authorization = `Bearer ${this.$gamerToken}`);
88
88
  }
89
- }), _e()) {
89
+ }), be()) {
90
90
  const a = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = P("gamer_token");
91
- (me() || a && o) && (this.$gamerToken = o);
91
+ (de() || a && o) && (this.$gamerToken = o);
92
92
  }
93
93
  this.$gamerToken || this.loadGamerTokenCache();
94
94
  }
@@ -171,7 +171,7 @@ class Er {
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
- ye,
174
+ fe,
175
175
  {
176
176
  message: !1,
177
177
  cacheTTL: 300,
@@ -213,21 +213,21 @@ class Er {
213
213
  return n;
214
214
  }
215
215
  }
216
- const ve = {
216
+ const Ce = {
217
217
  /** 未知 */
218
218
  Unknown: "unknown",
219
219
  /** 男 */
220
220
  Male: "male",
221
221
  /** 女 */
222
222
  Female: "female"
223
- }, Ce = e.string().enum(ve).lock(), Ve = {
223
+ }, Ve = e.string().enum(Ce).lock(), Re = {
224
224
  /** 积分增加 */
225
225
  Increase: "increase",
226
226
  /** 积分减少 */
227
227
  Decrease: "decrease",
228
228
  /** 积分过期 */
229
229
  Expired: "expired"
230
- }, Re = e.string().enum(Ve).lock(), je = {
230
+ }, je = e.string().enum(Re).lock(), Te = {
231
231
  /** 游戏内购买 */
232
232
  Order: "order",
233
233
  /** 游戏内消耗 */
@@ -240,21 +240,21 @@ const ve = {
240
240
  Admin: "admin",
241
241
  /** 运营活动 */
242
242
  Event: "event"
243
- }, Te = e.string().enum(je).lock(), qe = {
243
+ }, qe = e.string().enum(Te).lock(), xe = {
244
244
  /** 游戏内奖励 */
245
245
  GameReward: "game_reward",
246
246
  /** 实物商品 */
247
247
  Physical: "physical",
248
248
  /** 虚拟商品 */
249
249
  Virtual: "virtual"
250
- }, Z = e.string().enum(qe).lock(), xe = {
250
+ }, Z = e.string().enum(xe).lock(), Se = {
251
251
  /** 待发放 */
252
252
  Pending: "pending",
253
253
  /** 已发放 */
254
254
  Issued: "issued",
255
255
  /** 发放失败 */
256
256
  Failed: "failed"
257
- }, Se = e.string().enum(xe).lock(), Le = e.object({
257
+ }, Le = e.string().enum(Se).lock(), Pe = 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 ve = {
272
272
  exp_description: e.string(),
273
273
  credit_description: e.string(),
274
274
  send_role_mail_rate_limit: e.number()
275
- }).lock(), Pe = e.object({
275
+ }).lock(), Ee = e.object({
276
276
  member_id: e.string(),
277
277
  player_id: e.string(),
278
278
  exp: e.number(),
@@ -281,18 +281,18 @@ const ve = {
281
281
  credit_expiring: e.number(),
282
282
  level_change_time: e.number(),
283
283
  level_expire_time: e.number()
284
- }).lock(), Ee = e.object({
284
+ }).lock(), $e = e.object({
285
285
  server_id: e.string(),
286
286
  server_name: e.string()
287
- }).lock(), $e = e.object({
287
+ }).lock(), Ue = e.object({
288
288
  role_id: e.string(),
289
289
  role_name: e.string()
290
290
  }).lock(), X = e.object({
291
+ ...Ue.shape,
291
292
  ...$e.shape,
292
- ...Ee.shape,
293
293
  role_level: e.number(),
294
294
  last_login_time: e.number()
295
- }).lock(), Ue = e.object({
295
+ }).lock(), Fe = e.object({
296
296
  ...X.shape,
297
297
  /** 角色战力 */
298
298
  role_fighting: e.number(),
@@ -302,11 +302,11 @@ const ve = {
302
302
  kin_name: e.string().optional(),
303
303
  /** 宗门职位 */
304
304
  kin_position: e.string().optional()
305
- }).lock(), Fe = e.object({
305
+ }).lock(), Ie = e.object({
306
306
  name: e.string(),
307
307
  avatar_url: e.string(),
308
308
  bio: e.string(),
309
- gender: Ce,
309
+ gender: Ve,
310
310
  birthday: e.object({ year: e.number(), month: e.number(), day: e.number() })
311
311
  }).lock(), Y = e.object({
312
312
  address_id: e.number(),
@@ -317,15 +317,15 @@ const ve = {
317
317
  district: e.string(),
318
318
  address: e.string(),
319
319
  is_default: e.bool()
320
- }).lock(), Ie = e.object({
320
+ }).lock(), De = 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(), De = e.object({
325
+ }).lock(), Ae = e.object({
326
326
  id: e.number(),
327
- change_type: Re,
328
- change_scene: Te,
327
+ change_type: je,
328
+ change_scene: qe,
329
329
  change_credit: e.number(),
330
330
  balance: e.number(),
331
331
  change_time: e.number()
@@ -364,7 +364,7 @@ const ve = {
364
364
  created_at: e.number(),
365
365
  updated_at: e.number(),
366
366
  redeemable_quantity: e.number().optional()
367
- }).lock(), Ae = e.object({
367
+ }).lock(), Ge = e.object({
368
368
  ...C(W.shape, "tag"),
369
369
  product: ee.clone().optional()
370
370
  }).lock(), $r = e.union(
@@ -375,7 +375,7 @@ const ve = {
375
375
  e.object({
376
376
  address_id: e.number()
377
377
  })
378
- ).satisfies().lock(), Ge = e.object({
378
+ ).satisfies().lock(), Oe = e.object({
379
379
  recipient: e.string(),
380
380
  mobile: e.string(),
381
381
  province: e.string(),
@@ -384,11 +384,11 @@ const ve = {
384
384
  address: e.string(),
385
385
  express_company: e.string(),
386
386
  express_number: e.string()
387
- }).lock(), Oe = e.object({
387
+ }).lock(), Ne = e.object({
388
388
  server_id: e.string(),
389
389
  role_id: e.string(),
390
390
  role_name: e.string()
391
- }).lock(), Ne = e.object({
391
+ }).lock(), Qe = e.object({
392
392
  redemption_id: e.number(),
393
393
  player_id: e.string(),
394
394
  product_id: e.number(),
@@ -399,14 +399,14 @@ const ve = {
399
399
  catalog_name: e.string(),
400
400
  quantity: e.number(),
401
401
  amount: e.number(),
402
- status: Se,
402
+ status: Le,
403
403
  created_at: e.number(),
404
- extra_data: e.union(Ge.clone(), Oe.clone()).satisfies().optional()
405
- }), Qe = e.guard(Le), M = s({ player: Pe }), Be = s({ roles: e.array(X) }), q = s({ role_card: Ue }), K = e.guard(Fe), H = e.guard(Y), Me = s({ addresses: e.array(Y) }), Ke = e.guard(Ie), He = s({
406
- credit_logs: e.array(De),
404
+ extra_data: e.union(Oe.clone(), Ne.clone()).satisfies().optional()
405
+ }), Be = e.guard(Pe), M = s({ player: Ee }), Me = s({ roles: e.array(X) }), q = s({ role_card: Fe }), K = e.guard(Ie), H = e.guard(Y), Ke = s({ addresses: e.array(Y) }), He = e.guard(De), ze = s({
406
+ credit_logs: e.array(Ae),
407
407
  next_token: e.string().optional()
408
- }), ze = s({ products: e.array(ee) }), Je = s({ benefits: e.array(W) }), Ze = s({ benefit: Ae }), Xe = s({
409
- redemptions: e.array(Ne),
408
+ }), Je = s({ products: e.array(ee) }), Ze = s({ benefits: e.array(W) }), Xe = s({ benefit: Ge }), Ye = s({
409
+ redemptions: e.array(Qe),
410
410
  next_token: e.string().optional()
411
411
  });
412
412
  class Ur {
@@ -421,7 +421,7 @@ class Ur {
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", Qe, t);
424
+ const { data: n } = await this.req.get("club/config", Be, t);
425
425
  return n;
426
426
  }
427
427
  /**
@@ -462,7 +462,7 @@ class Ur {
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", Be, {
465
+ const { data: a } = await this.req.get("club/roles", Me, {
466
466
  ...r,
467
467
  params: c({ player_id: t, refresh: n })
468
468
  });
@@ -534,7 +534,7 @@ class Ur {
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", Me, t);
537
+ const { data: n } = await this.req.get("club/addresses", Ke, t);
538
538
  return n?.addresses ?? [];
539
539
  }
540
540
  /**
@@ -582,7 +582,7 @@ class Ur {
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", Ke, {
585
+ const { data: r, code: a, message: o } = await this.req.get("club/user-credit", He, {
586
586
  ...n,
587
587
  params: c(t)
588
588
  });
@@ -598,7 +598,7 @@ class Ur {
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", He, {
601
+ const { data: r } = await this.req.get("club/credit-logs", ze, {
602
602
  ...n,
603
603
  params: c({ max_results: 20, ...t })
604
604
  });
@@ -614,7 +614,7 @@ class Ur {
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", Je, t);
617
+ const { data: n } = await this.req.get("club/benefits", Ze, t);
618
618
  return n?.benefits || [];
619
619
  }
620
620
  /**
@@ -624,7 +624,7 @@ class Ur {
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", Ze, {
627
+ const { data: r } = await this.req.get("club/benefit", Xe, {
628
628
  ...n,
629
629
  params: { benefit_id: t }
630
630
  });
@@ -636,7 +636,7 @@ class Ur {
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", ze, {
639
+ const { data: r } = await this.req.get("club/products", Je, {
640
640
  ...n,
641
641
  params: t
642
642
  });
@@ -662,7 +662,7 @@ class Ur {
662
662
  */
663
663
  async getRedemptions(t, n) {
664
664
  await this.token.autoLogin();
665
- const { data: r } = await this.req.get("club/redemptions", Xe, {
665
+ const { data: r } = await this.req.get("club/redemptions", Ye, {
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
- }, te = e.string().enum(V).lock(), Fr = V, ne = te, Ye = {
696
+ }, te = e.string().enum(V).lock(), Fr = V, ne = te, We = {
697
697
  /** 世游通行证 ID / Combo ID */
698
698
  UserId: "user_id",
699
699
  /** 游戏角色 ID */
700
700
  RoleId: "role_id"
701
- }, We = e.string().enum(Ye).lock(), et = {
701
+ }, et = e.string().enum(We).lock(), tt = {
702
702
  None: "none",
703
703
  Daily: "daily",
704
704
  Weekly: "weekly",
705
705
  Monthly: "monthly"
706
- }, tt = e.string().enum(et).lock(), l = {
706
+ }, nt = e.string().enum(tt).lock(), u = {
707
707
  /** 预约 */
708
708
  Preregister: "preregister",
709
709
  /** 抽奖 */
@@ -744,7 +744,7 @@ const V = {
744
744
  ClaimActivationKey: "claim_activation_key",
745
745
  /** 不朽箴言特有的 AI 聊天 */
746
746
  ZeroChatgpt: "zero_chatgpt"
747
- }, nt = e.string().enum(l).lock(), rt = {
747
+ }, rt = e.string().enum(u).lock(), at = {
748
748
  /** 累计游戏内活跃值 */
749
749
  Active: "player_active_points",
750
750
  /** 累计登录,单位 人天 */
@@ -763,14 +763,14 @@ const V = {
763
763
  PlayerLevel: "player_level",
764
764
  /** 活动道具累计获取 */
765
765
  EventItems: "event_items"
766
- }, re = e.string().enum(rt).lock(), at = {
766
+ }, re = e.string().enum(at).lock(), ot = {
767
767
  /** 官方上传 */
768
768
  System: "system",
769
769
  /** 用户投稿 */
770
770
  UserSubmission: "user_submission",
771
771
  /** 投票入围 */
772
772
  Shortlisted: "shortlisted"
773
- }, ot = e.string().enum(at).lock(), p = {
773
+ }, it = e.string().enum(ot).lock(), p = {
774
774
  /** 未获得奖励 */
775
775
  Ineligible: "ineligible",
776
776
  /** 奖励未领取 */
@@ -813,17 +813,17 @@ const V = {
813
813
  Failed: p.Failed,
814
814
  /** 奖励已发货 */
815
815
  Delivered: p.Delivered
816
- }, $ = e.string().enum(_).lock(), it = {
816
+ }, $ = e.string().enum(_).lock(), st = {
817
817
  /** 玩法产出奖励 */
818
818
  Output: "output",
819
819
  /** 玩法参与奖励 */
820
820
  Engage: "engage"
821
- }, U = e.string().enum(it).lock(), st = {
821
+ }, U = e.string().enum(st).lock(), ct = {
822
822
  /** 私有队伍 */
823
823
  Private: "private",
824
824
  /** 公开队伍 */
825
825
  Public: "public"
826
- }, ct = e.string().enum(st).lock(), w = {
826
+ }, ut = e.string().enum(ct).lock(), w = {
827
827
  /** 未知状态 */
828
828
  Unknown: "unknown",
829
829
  /** 等待开奖 */
@@ -845,78 +845,78 @@ const V = {
845
845
  ChangeVisibility: "change_visibility",
846
846
  /** 查询组队信息 */
847
847
  Query: "query"
848
- }, Ar = e.string().enum(lt).lock(), ut = {
848
+ }, Ar = e.string().enum(lt).lock(), mt = {
849
849
  /** 查询抽奖券 */
850
850
  Query: "query",
851
851
  /** 开奖 */
852
852
  Draw: "draw",
853
853
  /** 领奖 */
854
854
  Claim: "claim"
855
- }, Gr = e.string().enum(ut).lock(), oe = {
855
+ }, Gr = e.string().enum(mt).lock(), oe = {
856
856
  /** 将所有队员的进度值求和,作为队伍进度值 */
857
857
  Sum: "sum",
858
858
  /** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
859
859
  TopN: "top_n"
860
- }, Or = e.string().enum(oe).lock(), mt = e.string().enum(oe).optional().lock(), dt = e.string().enum(C(V, "GiftCode", "LotteryTicket")), F = e.object({
860
+ }, Or = e.string().enum(oe).lock(), dt = e.string().enum(oe).optional().lock(), gt = e.string().enum(C(V, "GiftCode", "LotteryTicket")), F = e.object({
861
861
  reward_item_id: e.number(),
862
862
  reward_amount: e.number(),
863
863
  reward_item_name: e.string(),
864
864
  reward_item_icon_url: e.string(),
865
865
  reward_item_desc: e.string().optional(),
866
- reward_item_type: dt,
866
+ reward_item_type: gt,
867
867
  reward_item_rating: e.number()
868
- }).lock(), gt = e.object({
868
+ }).lock(), pt = e.object({
869
869
  engage_count: e.number(),
870
870
  rewards: e.array(F)
871
- }).lock(), pt = e.union(
871
+ }).lock(), _t = e.union(
872
872
  e.object({
873
873
  feature_reward_type: e.string().enum("every"),
874
874
  reward_details: e.array(F)
875
875
  }),
876
876
  e.object({
877
877
  feature_reward_type: e.string().enum("regular"),
878
- reward_details: e.array(gt)
878
+ reward_details: e.array(pt)
879
879
  })
880
- ).satisfies().lock(), u = e.object({
880
+ ).satisfies().lock(), l = e.object({
881
881
  feature_name: e.string(),
882
882
  feature_id: e.number(),
883
883
  description: e.string(),
884
- cycle: tt,
884
+ cycle: nt,
885
885
  cycle_limit: e.number(),
886
886
  limit: e.number(),
887
887
  since: e.number(),
888
888
  until: e.number(),
889
- engage_account: We,
890
- feature_rewards: pt.clone().optional(),
889
+ engage_account: et,
890
+ feature_rewards: _t.clone().optional(),
891
891
  sort: e.number().optional()
892
- }), _t = l.Cashback, bt = e.object({
893
- ...u.shape,
894
- feature_type: e.string().enum(_t),
892
+ }), bt = u.Cashback, yt = e.object({
893
+ ...l.shape,
894
+ feature_type: e.string().enum(bt),
895
895
  config: e.object({
896
896
  order_start_time: e.number(),
897
897
  order_end_time: e.number(),
898
898
  claim_rewards_start_time: e.number(),
899
899
  claim_rewards_end_time: e.number()
900
900
  })
901
- }), yt = l.CheckIn, ft = e.object({
902
- ...u.shape,
903
- feature_type: e.string().enum(yt)
904
- }), ht = l.ClaimActivationKey, wt = e.object({
905
- ...u.shape,
906
- feature_type: e.string().enum(ht)
907
- }), kt = l.ClaimRewards, vt = e.object({
908
- ...u.shape,
909
- feature_type: e.string().enum(kt)
910
- }), Ct = l.Comment, Vt = e.object({
911
- ...u.shape,
912
- feature_type: e.string().enum(Ct),
901
+ }), ft = u.CheckIn, ht = e.object({
902
+ ...l.shape,
903
+ feature_type: e.string().enum(ft)
904
+ }), wt = u.ClaimActivationKey, kt = e.object({
905
+ ...l.shape,
906
+ feature_type: e.string().enum(wt)
907
+ }), vt = u.ClaimRewards, Ct = e.object({
908
+ ...l.shape,
909
+ feature_type: e.string().enum(vt)
910
+ }), Vt = u.Comment, Rt = e.object({
911
+ ...l.shape,
912
+ feature_type: e.string().enum(Vt),
913
913
  config: e.object({
914
914
  comments: e.array(e.string()),
915
915
  send_rate: e.number()
916
916
  })
917
- }), Rt = l.Follow, jt = e.object({
918
- ...u.shape,
919
- feature_type: e.string().enum(Rt),
917
+ }), jt = u.Follow, Tt = e.object({
918
+ ...l.shape,
919
+ feature_type: e.string().enum(jt),
920
920
  config: e.object({
921
921
  platform: e.string(),
922
922
  platform_icon: e.string().optional(),
@@ -924,66 +924,66 @@ const V = {
924
924
  qr_code_url: e.string().optional(),
925
925
  platform_desc: e.string().optional()
926
926
  })
927
- }), Tt = l.GiftCode, qt = e.object({
927
+ }), qt = u.GiftCode, xt = e.object({
928
928
  name: e.string(),
929
929
  icon_url: e.string(),
930
930
  count: e.number()
931
- }), xt = e.object({
932
- ...u.shape,
933
- feature_type: e.string().enum(Tt),
931
+ }), St = e.object({
932
+ ...l.shape,
933
+ feature_type: e.string().enum(qt),
934
934
  config: e.object({
935
- gift_items: e.array(qt),
935
+ gift_items: e.array(xt),
936
936
  mp_url: e.string().optional(),
937
937
  mp_qrcode_url: e.string().optional()
938
938
  })
939
- }), St = l.Invite, Lt = e.object({
940
- ...u.shape,
941
- feature_type: e.string().enum(St),
939
+ }), Lt = u.Invite, Pt = e.object({
940
+ ...l.shape,
941
+ feature_type: e.string().enum(Lt),
942
942
  config: e.object({
943
943
  share_url: e.string()
944
944
  })
945
- }), Pt = l.InvitedRegister, Et = e.object({
946
- ...u.shape,
947
- feature_type: e.string().enum(Pt)
948
- }), $t = e.string().enum(C(V, "GiftCode", "LotteryTicket")), Ut = l.Lottery, Ft = e.object({
945
+ }), Et = u.InvitedRegister, $t = e.object({
946
+ ...l.shape,
947
+ feature_type: e.string().enum(Et)
948
+ }), Ut = e.string().enum(C(V, "GiftCode", "LotteryTicket")), Ft = u.Lottery, It = e.object({
949
949
  reward_item_id: e.number(),
950
950
  reward_item_name: e.string(),
951
- reward_item_type: $t,
951
+ reward_item_type: Ut,
952
952
  reward_item_icon_url: e.string(),
953
953
  reward_item_desc: e.string().optional(),
954
954
  reward_amount: e.number(),
955
955
  reward_remaining_stock: e.number()
956
- }), It = e.object({
957
- ...u.shape,
958
- feature_type: e.string().enum(Ut),
956
+ }), Dt = e.object({
957
+ ...l.shape,
958
+ feature_type: e.string().enum(Ft),
959
959
  config: e.object({
960
960
  consume_item_id: e.number(),
961
961
  consume_item_name: e.number(),
962
962
  consume_item_icon_url: e.string(),
963
963
  consume_item_count: e.number(),
964
964
  consume_item_desc: e.string().optional(),
965
- rewards: e.array(Ft)
965
+ rewards: e.array(It)
966
966
  })
967
- }), Dt = l.LotteryDraw, At = e.object({
968
- ...u.shape,
969
- feature_type: e.string().enum(Dt),
967
+ }), At = u.LotteryDraw, Gt = e.object({
968
+ ...l.shape,
969
+ feature_type: e.string().enum(At),
970
970
  config: e.object({
971
971
  draw_not_before: e.number(),
972
972
  draw_not_after: e.number()
973
973
  })
974
- }), Gt = l.Preregister, Ot = e.object({
975
- ...u.shape,
976
- feature_type: e.string().enum(Gt)
977
- }), Nt = l.Quest, Qt = e.object({
978
- ...u.shape,
979
- feature_type: e.string().enum(Nt),
974
+ }), Ot = u.Preregister, Nt = e.object({
975
+ ...l.shape,
976
+ feature_type: e.string().enum(Ot)
977
+ }), Qt = u.Quest, Bt = e.object({
978
+ ...l.shape,
979
+ feature_type: e.string().enum(Qt),
980
980
  config: e.object({
981
981
  objective: re,
982
982
  completion_value: e.number(),
983
983
  team: e.object({
984
984
  feature_id: e.number().optional(),
985
985
  completion_value: e.number(),
986
- progress_algorithm: mt,
986
+ progress_algorithm: dt,
987
987
  top_n: e.number().optional()
988
988
  }).optional(),
989
989
  config: e.object({
@@ -993,38 +993,38 @@ const V = {
993
993
  event_item_id: e.number().optional()
994
994
  }).optional()
995
995
  })
996
- }), Bt = l.Register, Mt = e.object({
997
- ...u.shape,
998
- feature_type: e.string().enum(Bt)
999
- }), Kt = l.Share, Ht = e.object({
1000
- ...u.shape,
1001
- feature_type: e.string().enum(Kt),
996
+ }), Mt = u.Register, Kt = e.object({
997
+ ...l.shape,
998
+ feature_type: e.string().enum(Mt)
999
+ }), Ht = u.Share, zt = e.object({
1000
+ ...l.shape,
1001
+ feature_type: e.string().enum(Ht),
1002
1002
  config: e.object({
1003
1003
  share_platform: e.string(),
1004
1004
  jump_url: e.string().optional(),
1005
1005
  icon_url: e.string().optional()
1006
1006
  })
1007
- }), zt = l.Subscribe, Jt = e.object({
1008
- ...u.shape,
1009
- feature_type: e.string().enum(zt),
1007
+ }), Jt = u.Subscribe, Zt = e.object({
1008
+ ...l.shape,
1009
+ feature_type: e.string().enum(Jt),
1010
1010
  config: e.object({
1011
1011
  weixin_template_ids: e.array(e.string())
1012
1012
  })
1013
- }), Zt = l.Survey, Xt = e.object({
1014
- ...u.shape,
1015
- feature_type: e.string().enum(Zt),
1013
+ }), Xt = u.Survey, Yt = e.object({
1014
+ ...l.shape,
1015
+ feature_type: e.string().enum(Xt),
1016
1016
  config: e.object({
1017
1017
  survey_id: e.string(),
1018
1018
  survey_url: e.string()
1019
1019
  })
1020
- }), Yt = l.Team, Wt = e.object({
1021
- ...u.shape,
1022
- feature_type: e.string().enum(Yt),
1020
+ }), Wt = u.Team, en = e.object({
1021
+ ...l.shape,
1022
+ feature_type: e.string().enum(Wt),
1023
1023
  config: e.object({
1024
1024
  max_members: e.number().min(1),
1025
1025
  min_members: e.number().min(1)
1026
1026
  })
1027
- }), en = l.Vote, tn = e.object({
1027
+ }), tn = u.Vote, nn = e.object({
1028
1028
  sn: e.string(),
1029
1029
  name: e.string(),
1030
1030
  img_urls: e.array(e.string()).optional(),
@@ -1034,61 +1034,61 @@ const V = {
1034
1034
  amount: e.number(),
1035
1035
  finalists: e.bool(),
1036
1036
  last_vote_time: e.number()
1037
- }), nn = e.object({
1038
- ...u.shape,
1039
- feature_type: e.string().enum(en),
1037
+ }), rn = e.object({
1038
+ ...l.shape,
1039
+ feature_type: e.string().enum(tn),
1040
1040
  config: e.object({
1041
1041
  vote_feature_ids: e.array(e.number()),
1042
1042
  submission_feature_ids: e.array(e.number()),
1043
1043
  finalists_amount: e.number(),
1044
- source: ot,
1045
- options: e.array(tn),
1044
+ source: it,
1045
+ options: e.array(nn),
1046
1046
  rewards: e.array(F)
1047
1047
  })
1048
- }), rn = l.ZeroChatgpt, an = e.object({
1049
- ...u.shape,
1050
- feature_type: e.string().enum(rn)
1051
- }), on = e.union(
1052
- bt,
1053
- ft,
1054
- vt,
1055
- Vt,
1056
- jt,
1057
- xt,
1058
- Lt,
1059
- Et,
1060
- It,
1061
- At,
1062
- Ot,
1063
- Qt,
1064
- Mt,
1065
- Ht,
1066
- Jt,
1067
- Xt,
1068
- Wt,
1069
- nn,
1070
- wt,
1071
- an
1072
- ).key("feature_type").satisfies(), sn = e.object({
1048
+ }), an = u.ZeroChatgpt, on = e.object({
1049
+ ...l.shape,
1050
+ feature_type: e.string().enum(an)
1051
+ }), sn = e.union(
1052
+ yt,
1053
+ ht,
1054
+ Ct,
1055
+ Rt,
1056
+ Tt,
1057
+ St,
1058
+ Pt,
1059
+ $t,
1060
+ Dt,
1061
+ Gt,
1062
+ Nt,
1063
+ Bt,
1064
+ Kt,
1065
+ zt,
1066
+ Zt,
1067
+ Yt,
1068
+ en,
1069
+ rn,
1070
+ kt,
1071
+ on
1072
+ ).key("feature_type").satisfies(), cn = e.object({
1073
1073
  event_name: e.string(),
1074
1074
  rules: e.string(),
1075
1075
  since: e.number(),
1076
1076
  until: e.number(),
1077
1077
  visit_count: e.number().optional(),
1078
- features: e.array(on)
1079
- }).lock(), x = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), cn = e.object({
1078
+ features: e.array(sn)
1079
+ }).lock(), x = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), un = e.object({
1080
1080
  order_total_amount: x,
1081
1081
  cashback_total_amount: x,
1082
1082
  game_item_count: x
1083
1083
  }), ln = e.object({
1084
1084
  activation_key: e.string().disallow("")
1085
- }), un = e.object({
1086
- gift_code: e.string()
1087
1085
  }), mn = e.object({
1086
+ gift_code: e.string()
1087
+ }), dn = e.object({
1088
1088
  user_id: e.string(),
1089
1089
  name: e.string().optional(),
1090
1090
  avatar_url: e.string().optional()
1091
- }), dn = e.object({
1091
+ }), gn = e.object({
1092
1092
  lottery_count: e.number()
1093
1093
  }), I = e.object({
1094
1094
  reward_id: e.number(),
@@ -1105,51 +1105,44 @@ const V = {
1105
1105
  event_name: e.string(),
1106
1106
  feature_id: e.number(),
1107
1107
  engagement_id: e.number(),
1108
- feature_type: nt,
1108
+ feature_type: rt,
1109
1109
  receive_time: e.number(),
1110
1110
  extra_data: e.record(e.unknown()).optional()
1111
- }), gn = e.string().enum(w.Unknown, w.Pending), pn = e.union(
1111
+ }), pn = e.string().enum(w.Unknown, w.Pending), _n = e.union(
1112
1112
  e.object({
1113
1113
  ticket: e.string(),
1114
- status: gn
1114
+ status: pn
1115
1115
  }),
1116
1116
  e.object({
1117
1117
  ticket: e.string(),
1118
1118
  status: e.string().enum(C(w, "Unknown", "Pending")),
1119
1119
  reward: I
1120
1120
  })
1121
- ).satisfies(), _n = e.object({
1122
- tickets: e.array(pn)
1123
- }), bn = e.object({
1124
- platforms: e.array(e.string())
1121
+ ).satisfies(), bn = e.object({
1122
+ tickets: e.array(_n)
1125
1123
  }), yn = e.object({
1124
+ platforms: e.array(e.string())
1125
+ }), ie = e.object({
1126
+ role_name: e.string(),
1127
+ is_leader: e.bool(),
1128
+ is_myself: e.bool().optional(),
1129
+ progress: e.number().optional()
1130
+ }).lock(), fn = e.object({
1126
1131
  objective: re,
1127
1132
  progress: e.number(),
1128
1133
  completion_value: e.number().optional(),
1129
1134
  team: e.object({
1130
1135
  progress: e.number(),
1131
1136
  completion_value: e.number().optional(),
1132
- players: e.array(
1133
- e.object({
1134
- is_myself: e.bool().optional(),
1135
- role_name: e.string(),
1136
- is_leader: e.bool(),
1137
- progress: e.number().optional()
1138
- })
1139
- )
1137
+ players: e.array(ie)
1140
1138
  }).optional()
1141
- }), fn = e.object({
1142
- role_name: e.string(),
1143
- is_leader: e.bool(),
1144
- is_myself: e.bool(),
1145
- progress: e.number()
1146
1139
  }), hn = e.object({
1147
1140
  progress: e.number(),
1148
1141
  team: e.object({
1149
1142
  progress: e.number(),
1150
- team_members: e.array(fn).optional()
1143
+ team_members: e.array(ie).optional()
1151
1144
  }).optional()
1152
- }).lock(), wn = e.object({
1145
+ }), wn = e.object({
1153
1146
  platform: e.string()
1154
1147
  }), kn = e.object({
1155
1148
  weixin_openid: e.string()
@@ -1166,7 +1159,7 @@ const V = {
1166
1159
  server_name: e.string()
1167
1160
  }), Vn = e.object({
1168
1161
  team_code: e.string(),
1169
- visibility: ct,
1162
+ visibility: ut,
1170
1163
  members: e.array(
1171
1164
  e.object({
1172
1165
  is_leader: e.bool(),
@@ -1189,18 +1182,18 @@ const V = {
1189
1182
  video_note: e.number(),
1190
1183
  created_at: e.number()
1191
1184
  }), D = e.union(
1192
- bn,
1193
- dn,
1185
+ yn,
1186
+ gn,
1194
1187
  vn,
1195
- mn,
1188
+ dn,
1196
1189
  wn,
1197
1190
  Rn,
1198
1191
  kn,
1199
- cn,
1200
1192
  un,
1193
+ mn,
1201
1194
  Vn,
1202
- yn,
1203
- _n,
1195
+ fn,
1196
+ bn,
1204
1197
  ln,
1205
1198
  Tn,
1206
1199
  e.custom(
@@ -1262,7 +1255,7 @@ const V = {
1262
1255
  }), Un = e.object({
1263
1256
  reward_id: e.number(),
1264
1257
  reward_status: $
1265
- }), Fn = e.guard(sn), In = e.guard(Pn), S = s({ count: e.number() }), Dn = s({ first_visit: e.bool() }), An = s({
1258
+ }), Fn = e.guard(cn), In = e.guard(Pn), S = s({ count: e.number() }), Dn = s({ first_visit: e.bool() }), An = s({
1266
1259
  engagements: e.union(e.array(qn), e.array(Cn))
1267
1260
  }), Gn = s({
1268
1261
  status: e.array(En)
@@ -1633,9 +1626,10 @@ class Qr {
1633
1626
  */
1634
1627
  async getQuestProgress(t, n) {
1635
1628
  if (!await this.token.autoLogin()) return null;
1636
- const { data: r, code: a, message: o } = await this.req.get("event/quest-progress", Xn, {
1629
+ const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, Xn, {
1637
1630
  message: !1,
1638
- params: { feature_id: t, ...n }
1631
+ ...n,
1632
+ params: { feature_id: t }
1639
1633
  });
1640
1634
  return r || {
1641
1635
  message: o,
@@ -1657,7 +1651,7 @@ const Yn = {
1657
1651
  Failed: "failed",
1658
1652
  /** 嫌疑(仅自己可见) */
1659
1653
  Suspect: "suspect"
1660
- }, ie = e.string().enum(er).lock(), tr = {
1654
+ }, se = e.string().enum(er).lock(), tr = {
1661
1655
  /** 系统通知 */
1662
1656
  System: "system",
1663
1657
  /** 评论我的 */
@@ -1689,7 +1683,7 @@ const Yn = {
1689
1683
  ReplyLiked: "reply_liked",
1690
1684
  /** 回复被删除 */
1691
1685
  ReplyDeleted: "reply_deleted"
1692
- }, nr = e.string().enum(g).lock(), se = e.object({
1686
+ }, nr = e.string().enum(g).lock(), ce = e.object({
1693
1687
  forum_id: e.number(),
1694
1688
  icon_url: e.string(),
1695
1689
  name: e.string(),
@@ -1706,7 +1700,7 @@ const Yn = {
1706
1700
  post_num: e.number()
1707
1701
  }).lock(), G = e.object({
1708
1702
  post_id: e.number(),
1709
- forum: se,
1703
+ forum: ce,
1710
1704
  posted_by: e.string(),
1711
1705
  nickname: e.string(),
1712
1706
  avatar_url: e.string(),
@@ -1722,9 +1716,9 @@ const Yn = {
1722
1716
  event_ids: e.array(e.number()),
1723
1717
  is_pinned: e.bool(),
1724
1718
  is_highlighted: e.bool(),
1725
- status: ie,
1719
+ status: se,
1726
1720
  create_time: e.number()
1727
- }).lock(), ce = e.object({
1721
+ }).lock(), ue = e.object({
1728
1722
  err_msg: e.string().optional()
1729
1723
  }).optional().lock(), rr = e.object({
1730
1724
  reply_id: e.number(),
@@ -1765,7 +1759,7 @@ const Yn = {
1765
1759
  liked: e.bool(),
1766
1760
  image_url: e.string(),
1767
1761
  create_time: e.number(),
1768
- status: ie,
1762
+ status: se,
1769
1763
  replies: e.array(R).optional()
1770
1764
  }).lock(), ar = e.object({
1771
1765
  image_url: e.string(),
@@ -1811,12 +1805,12 @@ const Yn = {
1811
1805
  ...O.shape,
1812
1806
  ...j.shape,
1813
1807
  notification_type: e.string().enum(g.PostCommented)
1814
- }), lr = e.object({
1808
+ }), ur = e.object({
1815
1809
  ...b.shape,
1816
1810
  ...j.shape,
1817
1811
  ...N.shape,
1818
1812
  notification_type: e.string().enum(g.CommentReplied)
1819
- }), ur = e.object({
1813
+ }), lr = e.object({
1820
1814
  ...b.shape,
1821
1815
  ...j.shape,
1822
1816
  ...O.shape,
@@ -1837,19 +1831,19 @@ const Yn = {
1837
1831
  ir,
1838
1832
  sr,
1839
1833
  cr,
1840
- lr,
1841
1834
  ur,
1835
+ lr,
1842
1836
  mr,
1843
1837
  dr
1844
- ).satisfies().lock(), pr = s({ forums: e.array(se) }), _r = s({ topics: e.array(A) }), br = s({ topic: A }), yr = s({ post: G }), z = s({
1838
+ ).satisfies().lock(), pr = s({ forums: e.array(ce) }), _r = s({ topics: e.array(A) }), br = s({ topic: A }), yr = s({ post: G }), z = s({
1845
1839
  posts: e.array(G),
1846
1840
  next_token: e.string().optional()
1847
- }), fr = s({ post: G, antispam: ce }), hr = s({
1841
+ }), fr = s({ post: G, antispam: ue }), hr = s({
1848
1842
  replies: e.array(R),
1849
1843
  next_token: e.string().optional()
1850
1844
  }), wr = s({ reply: R }), kr = s({
1851
1845
  reply: R.clone().optional(),
1852
- antispam: ce.clone().optional()
1846
+ antispam: ue.clone().optional()
1853
1847
  }), vr = s({ comment: k }), Cr = s({
1854
1848
  comments: e.array(k),
1855
1849
  next_token: e.string().optional()
@@ -2194,7 +2188,7 @@ class Kr {
2194
2188
  const t = this.token.storage.get(J);
2195
2189
  if (!t)
2196
2190
  return null;
2197
- const n = be(t);
2191
+ const n = ye(t);
2198
2192
  return L(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2199
2193
  }
2200
2194
  /**
@@ -2220,7 +2214,7 @@ class Kr {
2220
2214
  const n = await this.getLoginCache();
2221
2215
  if (n)
2222
2216
  return n;
2223
- const r = await he(), { data: a, code: o, message: d } = await this.req.post(
2217
+ const r = await we(), { data: a, code: o, message: d } = await this.req.post(
2224
2218
  "weixin/login",
2225
2219
  { code: r, appid: this.appid },
2226
2220
  L,
@@ -2250,9 +2244,9 @@ class Kr {
2250
2244
  async webLogin(t = "snsapi_userinfo", n) {
2251
2245
  const r = P("code"), a = Date.now(), o = +P("state");
2252
2246
  if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
2253
- const ue = Q(["code", "state"]);
2247
+ const me = Q(["code", "state"]);
2254
2248
  location.replace(
2255
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ue)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2249
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(me)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2256
2250
  );
2257
2251
  return;
2258
2252
  }
@@ -2316,9 +2310,9 @@ class Kr {
2316
2310
  }
2317
2311
  }
2318
2312
  export {
2319
- ce as AntispamValidator,
2313
+ ue as AntispamValidator,
2320
2314
  Er as AuthToken,
2321
- cn as CashbackEngagementDataValidator,
2315
+ un as CashbackEngagementDataValidator,
2322
2316
  ln as ClaimActivationKeyEngagementDataValidator,
2323
2317
  _ as ClaimRewardStatus,
2324
2318
  $ as ClaimRewardStatusValidator,
@@ -2326,78 +2320,78 @@ export {
2326
2320
  Y as ClubAddressValidator,
2327
2321
  Ur as ClubApi,
2328
2322
  W as ClubBenefitSummaryValidator,
2329
- Ae as ClubBenefitValidator,
2330
- je as ClubCreditChangeScene,
2331
- Te as ClubCreditChangeSceneValidator,
2332
- Ve as ClubCreditChangeType,
2333
- Re as ClubCreditChangeTypeValidator,
2334
- De as ClubCreditLogValidator,
2335
- Le as ClubGlobalConfigValidator,
2336
- qe as ClubItemType,
2323
+ Ge as ClubBenefitValidator,
2324
+ Te as ClubCreditChangeScene,
2325
+ qe as ClubCreditChangeSceneValidator,
2326
+ Re as ClubCreditChangeType,
2327
+ je as ClubCreditChangeTypeValidator,
2328
+ Ae as ClubCreditLogValidator,
2329
+ Pe as ClubGlobalConfigValidator,
2330
+ xe as ClubItemType,
2337
2331
  Z as ClubItemTypeValidator,
2338
- Pe as ClubPlayerValidator,
2332
+ Ee as ClubPlayerValidator,
2339
2333
  ee as ClubProductValidator,
2340
- xe as ClubRedemptionStatus,
2341
- Se as ClubRedemptionStatusValidator,
2342
- Ie as ClubUserCreditValidator,
2343
- Fe as ClubUserProfileValidator,
2334
+ Se as ClubRedemptionStatus,
2335
+ Le as ClubRedemptionStatusValidator,
2336
+ De as ClubUserCreditValidator,
2337
+ Ie as ClubUserProfileValidator,
2344
2338
  qn as CommentEngagementValidator,
2345
2339
  k as CommentValidator,
2346
2340
  Mr as CommunityApi,
2347
- Ye as EngageAccountType,
2348
- We as EngageAccountTypeValidator,
2341
+ We as EngageAccountType,
2342
+ et as EngageAccountTypeValidator,
2349
2343
  $n as EngageResponseValidator,
2350
2344
  Sn as EngageRewardValidator,
2351
2345
  Qr as EventApi,
2352
- sn as EventConfigValidator,
2353
- bt as EventFeatureConfigOfCashbackValidator,
2354
- ft as EventFeatureConfigOfCheckInValidator,
2355
- wt as EventFeatureConfigOfClaimActivationKeyValidator,
2356
- vt as EventFeatureConfigOfClaimRewardsValidator,
2357
- Vt as EventFeatureConfigOfCommentValidator,
2358
- jt as EventFeatureConfigOfFollowValidator,
2359
- xt as EventFeatureConfigOfGiftCodeValidator,
2360
- Lt as EventFeatureConfigOfInviteValidator,
2361
- Et as EventFeatureConfigOfInvitedRegisterValidator,
2362
- At as EventFeatureConfigOfLotteryDrawValidator,
2363
- It as EventFeatureConfigOfLotteryValidator,
2364
- Ot as EventFeatureConfigOfPreregisterValidator,
2365
- Qt as EventFeatureConfigOfQuestValidator,
2366
- Mt as EventFeatureConfigOfRegisterValidator,
2367
- Ht as EventFeatureConfigOfShareValidator,
2368
- Jt as EventFeatureConfigOfSubscribeValidator,
2369
- Xt as EventFeatureConfigOfSurveyValidator,
2370
- Wt as EventFeatureConfigOfTeamValidator,
2371
- nn as EventFeatureConfigOfVoteValidator,
2372
- on as EventFeatureConfigValidator,
2373
- et as EventPeriodType,
2374
- tt as EventPeriodTypeValidator,
2346
+ cn as EventConfigValidator,
2347
+ yt as EventFeatureConfigOfCashbackValidator,
2348
+ ht as EventFeatureConfigOfCheckInValidator,
2349
+ kt as EventFeatureConfigOfClaimActivationKeyValidator,
2350
+ Ct as EventFeatureConfigOfClaimRewardsValidator,
2351
+ Rt as EventFeatureConfigOfCommentValidator,
2352
+ Tt as EventFeatureConfigOfFollowValidator,
2353
+ St as EventFeatureConfigOfGiftCodeValidator,
2354
+ Pt as EventFeatureConfigOfInviteValidator,
2355
+ $t as EventFeatureConfigOfInvitedRegisterValidator,
2356
+ Gt as EventFeatureConfigOfLotteryDrawValidator,
2357
+ Dt as EventFeatureConfigOfLotteryValidator,
2358
+ Nt as EventFeatureConfigOfPreregisterValidator,
2359
+ Bt as EventFeatureConfigOfQuestValidator,
2360
+ Kt as EventFeatureConfigOfRegisterValidator,
2361
+ zt as EventFeatureConfigOfShareValidator,
2362
+ Zt as EventFeatureConfigOfSubscribeValidator,
2363
+ Yt as EventFeatureConfigOfSurveyValidator,
2364
+ en as EventFeatureConfigOfTeamValidator,
2365
+ rn as EventFeatureConfigOfVoteValidator,
2366
+ sn as EventFeatureConfigValidator,
2367
+ tt as EventPeriodType,
2368
+ nt as EventPeriodTypeValidator,
2375
2369
  F as EventRewardItemConfigValidator,
2376
- Oe as ExtraGameRewardValidator,
2377
- Ge as ExtraPhysicalShipmentValidator,
2378
- pt as FeatureRewardValidator,
2379
- l as FeatureType,
2380
- nt as FeatureTypeValidator,
2370
+ Ne as ExtraGameRewardValidator,
2371
+ Oe as ExtraPhysicalShipmentValidator,
2372
+ _t as FeatureRewardValidator,
2373
+ u as FeatureType,
2374
+ rt as FeatureTypeValidator,
2381
2375
  Yn as ForumMode,
2382
2376
  Wn as ForumModeValidator,
2383
- se as ForumValidator,
2377
+ ce as ForumValidator,
2384
2378
  V as GamerItemType,
2385
2379
  te as GamerItemTypeValidator,
2386
- ve as Gender,
2387
- Ce as GenderValidator,
2388
- un as GiftCodeEngagementDataValidator,
2389
- mn as InviteEngagementDataValidator,
2390
- ut as LotteryDrawAction,
2380
+ Ce as Gender,
2381
+ Ve as GenderValidator,
2382
+ mn as GiftCodeEngagementDataValidator,
2383
+ dn as InviteEngagementDataValidator,
2384
+ mt as LotteryDrawAction,
2391
2385
  Gr as LotteryDrawActionValidator,
2392
- _n as LotteryDrawEngagementDataValidator,
2393
- dn as LotteryEngagementDataValidator,
2386
+ bn as LotteryDrawEngagementDataValidator,
2387
+ gn as LotteryEngagementDataValidator,
2394
2388
  w as LotteryTicketStatus,
2395
2389
  Dr as LotteryTicketStatusValidator,
2396
2390
  b as NotificationBaseValidator,
2397
2391
  tr as NotificationCategory,
2398
2392
  Br as NotificationCategoryValidator,
2399
- lr as NotificationCommentReplyValidator,
2400
- ur as NotificationCommentValidator,
2393
+ ur as NotificationCommentReplyValidator,
2394
+ lr as NotificationCommentValidator,
2401
2395
  j as NotificationPayloadCommentValidator,
2402
2396
  O as NotificationPayloadPostValidator,
2403
2397
  N as NotificationPayloadReplyValidator,
@@ -2410,36 +2404,36 @@ export {
2410
2404
  g as NotificationType,
2411
2405
  nr as NotificationTypeValidator,
2412
2406
  gr as NotificationValidator,
2413
- Ue as PlayerRoleCardValidator,
2407
+ Fe as PlayerRoleCardValidator,
2414
2408
  X as PlayerRoleValidator,
2415
2409
  er as PostStatus,
2416
- ie as PostStatusValidator,
2410
+ se as PostStatusValidator,
2417
2411
  G as PostValidator,
2418
- bn as PreregisterEngagementDataValidator,
2412
+ yn as PreregisterEngagementDataValidator,
2419
2413
  ar as PresignedUrlResponseValidator,
2420
- yn as QuestEngagementDataValidator,
2421
- rt as QuestObjective,
2414
+ fn as QuestEngagementDataValidator,
2415
+ at as QuestObjective,
2422
2416
  re as QuestObjectiveValidator,
2423
2417
  oe as QuestProgressAlgorithm,
2424
- mt as QuestProgressAlgorithmOptionalValidator,
2418
+ dt as QuestProgressAlgorithmOptionalValidator,
2425
2419
  Or as QuestProgressAlgorithmValidator,
2426
2420
  hn as QuestProgressValidator,
2427
2421
  $r as RedeemParamsValidator,
2428
- Ne as RedemptionValidator,
2429
- gt as RegularRewardValidator,
2422
+ Qe as RedemptionValidator,
2423
+ pt as RegularRewardValidator,
2430
2424
  rr as ReplyToValidator,
2431
2425
  R as ReplyValidator,
2432
2426
  Fr as RewardItemType,
2433
2427
  ne as RewardItemTypeValidator,
2434
- it as RewardSource,
2428
+ st as RewardSource,
2435
2429
  U as RewardSourceValidator,
2436
2430
  p as RewardStatus,
2437
2431
  E as RewardStatusSuffix,
2438
2432
  ae as RewardStatusSuffixValidator,
2439
2433
  Ir as RewardStatusValidator,
2440
2434
  xn as RewardValidator,
2441
- $e as RoleBaseInfoValidator,
2442
- Ee as ServerBaseInfoValidator,
2435
+ Ue as RoleBaseInfoValidator,
2436
+ $e as ServerBaseInfoValidator,
2443
2437
  wn as ShareEngagementDataValidator,
2444
2438
  vn as SurveyEngagementDataValidator,
2445
2439
  lt as TeamAction,
@@ -2447,8 +2441,8 @@ export {
2447
2441
  Vn as TeamEngagementDataValidator,
2448
2442
  Cn as TeamEngagementValidator,
2449
2443
  Nr as TeamMemberValidator,
2450
- st as TeamVisibility,
2451
- ct as TeamVisibilityValidator,
2444
+ ct as TeamVisibility,
2445
+ ut as TeamVisibilityValidator,
2452
2446
  A as TopicValidator,
2453
2447
  D as UserEngagementDataValidator,
2454
2448
  Ln as UserEngagementValidator,
@@ -2456,8 +2450,8 @@ export {
2456
2450
  I as UserRewardValidator,
2457
2451
  Pn as VerifyMobileResultValidator,
2458
2452
  Rn as VoteEngagementDataValidator,
2459
- at as VoteOptionSource,
2460
- ot as VoteOptionSourceValidator,
2453
+ ot as VoteOptionSource,
2454
+ it as VoteOptionSourceValidator,
2461
2455
  Kr as WeixinApi,
2462
2456
  kn as WeixinSubscribeEngagementDataValidator,
2463
2457
  xr as WeixinWebLoginErrorCode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seayoo-web/gamer-api",
3
3
  "description": "agent for gamer api",
4
- "version": "2.9.0",
4
+ "version": "2.9.2",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -32,15 +32,15 @@
32
32
  "@types/node": "^22.13.1",
33
33
  "@seayoo-web/combo-webview": "2.6.0",
34
34
  "@seayoo-web/request": "3.4.0",
35
- "@seayoo-web/scripts": "3.1.0",
36
- "@seayoo-web/validator": "1.0.1",
35
+ "@seayoo-web/scripts": "3.1.1",
37
36
  "@seayoo-web/tsconfig": "1.0.5",
38
- "@seayoo-web/utils": "4.0.3"
37
+ "@seayoo-web/utils": "4.1.0",
38
+ "@seayoo-web/validator": "1.0.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "2.6.0",
42
42
  "@seayoo-web/validator": "1.0.1",
43
- "@seayoo-web/utils": "4.0.3"
43
+ "@seayoo-web/utils": "4.1.0"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
@@ -1,6 +1,6 @@
1
1
  import { type InferType } from "@seayoo-web/validator";
2
2
  import { type EventFeatureBaseConfig } from "./feature.base";
3
- declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "activation_key" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "external_gift_code" | "void_item", false, false>;
3
+ declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "external_gift_code" | "void_item", false, false>;
4
4
  declare const featureType: "lottery";
5
5
  export interface FeatureLotteryItemConfig {
6
6
  /** 抽奖奖励道具 id */
@@ -1,5 +1,5 @@
1
1
  import { type InferType } from "@seayoo-web/validator";
2
- declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"credit" | "activation_key" | "event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "external_gift_code" | "void_item", false, false>;
2
+ declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "external_gift_code" | "void_item", false, false>;
3
3
  export interface EventRewardItemConfig {
4
4
  /** 玩法奖励道具 id */
5
5
  reward_item_id: number;
@@ -1,4 +1,14 @@
1
1
  import { type QuestObjective } from "../event.enums";
2
+ export type QuestTeamMember = {
3
+ /** 角色名称 */
4
+ role_name: string;
5
+ /** 是否是队长 */
6
+ is_leader: boolean;
7
+ /** 是否是自己 */
8
+ is_myself?: boolean;
9
+ /** 当前用户任务进度值 */
10
+ progress?: number;
11
+ };
2
12
  export interface QuestEngagementData {
3
13
  /** 任务目标 */
4
14
  objective: QuestObjective;
@@ -13,33 +23,15 @@ export interface QuestEngagementData {
13
23
  /** 目标值 */
14
24
  completion_value?: number;
15
25
  /** 队伍信息 */
16
- players: {
17
- is_myself?: boolean;
18
- /** 角色名 */
19
- role_name: string;
20
- /** 是否为队长 */
21
- is_leader: boolean;
22
- /** 进度值 */
23
- progress?: number;
24
- }[];
26
+ players: QuestTeamMember[];
25
27
  };
26
28
  }
27
29
  export declare const QuestEngagementDataValidator: import("@seayoo-web/validator").ObjectValidator<QuestEngagementData, false, false>;
28
- export type QuestProgressMember = {
29
- /** 角色名称 */
30
- role_name: string;
31
- /** 是否是队长 */
32
- is_leader: boolean;
33
- /** 是否是自己 */
34
- is_myself: boolean;
35
- /** 当前用户任务进度值 */
36
- progress: number;
37
- };
38
30
  export type QuestProgressTeam = {
39
31
  /** 个人任务进度值 */
40
32
  progress: number;
41
33
  /** 组队任务团队成员信息,数组内的数据是按照 progress 倒序排序的 */
42
- team_members?: QuestProgressMember[];
34
+ team_members?: QuestTeamMember[];
43
35
  };
44
36
  export type QuestProgress = {
45
37
  /** 个人任务进度值 */
@@ -47,9 +39,4 @@ export type QuestProgress = {
47
39
  /** 任务进度数据 */
48
40
  team?: QuestProgressTeam;
49
41
  };
50
- export declare const QuestProgressValidator: import("@seayoo-web/validator").ObjectValidator<QuestProgress, false, false> & {
51
- plain: never;
52
- optional: never;
53
- maybeNull: never;
54
- lock: never;
55
- };
42
+ export declare const QuestProgressValidator: import("@seayoo-web/validator").ObjectValidator<QuestProgress, false, false>;