@seayoo-web/gamer-api 2.1.0 → 2.1.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,20 +1,20 @@
1
- var le = Object.defineProperty;
2
- var me = (i, t, n) => t in i ? le(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
- var l = (i, t, n) => me(i, typeof t != "symbol" ? t + "" : t, n);
4
- import { isComboWebView as de } from "@seayoo-web/combo-webview";
5
- import { isPlainObject as v, useConsole as ge, Support as b, usePromise as pe, pruneURL as _e, queryString as L, pruneObject as a, v as e, omitFields as C, typedObjectGuard as o, parseJSON as be, removePara as N } from "@seayoo-web/utils";
6
- function ye(i) {
1
+ var ue = Object.defineProperty;
2
+ var le = (i, t, n) => t in i ? ue(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
+ var l = (i, t, n) => le(i, typeof t != "symbol" ? t + "" : t, n);
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";
6
+ function be(i) {
7
7
  return v(i, "gamer_token") && typeof i.gamer_token == "string";
8
8
  }
9
- function A(i) {
9
+ function O(i) {
10
10
  return v(i);
11
11
  }
12
- const f = ge("GamerApiSDK");
13
- function fe(i) {
12
+ const f = de("GamerApiSDK");
13
+ function ye(i) {
14
14
  return /^\/[a-z\d-]+$/.test(i);
15
15
  }
16
- async function he() {
17
- const { promise: i, resolve: t } = pe();
16
+ async function fe() {
17
+ const { promise: i, resolve: t } = ge();
18
18
  return wx.login({
19
19
  success(n) {
20
20
  t(n.code);
@@ -24,7 +24,7 @@ async function he() {
24
24
  }
25
25
  }), await i;
26
26
  }
27
- const we = {
27
+ const he = {
28
28
  get(i) {
29
29
  return localStorage.getItem(i) || "";
30
30
  },
@@ -34,7 +34,7 @@ const we = {
34
34
  remove(i) {
35
35
  localStorage.removeItem(i);
36
36
  }
37
- }, ke = {
37
+ }, we = {
38
38
  get(i) {
39
39
  try {
40
40
  if (b.wx) return wx.getStorageSync(i) || "";
@@ -66,8 +66,8 @@ class hr {
66
66
  l(this, "$gamerToken", "");
67
67
  l(this, "req");
68
68
  l(this, "storage");
69
- this.storage = b.wx ? ke : we;
70
- const r = fe(t) ? t : `https://${_e(t)}`;
69
+ this.storage = b.wx ? we : he;
70
+ const r = ye(t) ? t : `https://${pe(t)}`;
71
71
  this.$NetRequest = n, this.req = n({
72
72
  baseURL: `${r}/v1`,
73
73
  timeout: 1e4,
@@ -88,7 +88,7 @@ class hr {
88
88
  requestTransformer: (s) => {
89
89
  this.$gamerToken && (s.headers.Authorization = `Bearer ${this.$gamerToken}`);
90
90
  }
91
- }), de() ? this.$gamerToken = L("gamer_token") : this.loadGamerTokenCache();
91
+ }), me() ? this.$gamerToken = L("gamer_token") : this.loadGamerTokenCache();
92
92
  }
93
93
  get NetRequest() {
94
94
  return this.$NetRequest;
@@ -170,7 +170,7 @@ class hr {
170
170
  const { code: t, data: n } = await this.req.post(
171
171
  "login-with-token",
172
172
  a({ id_token: this.idToken, weixin_token: b.wx ? this.weixinToken : null }),
173
- ye,
173
+ be,
174
174
  { message: !1 }
175
175
  );
176
176
  switch (t) {
@@ -192,7 +192,7 @@ class hr {
192
192
  */
193
193
  async getSession() {
194
194
  if (!await this.autoLogin()) return null;
195
- const { data: t } = await this.req.get("session", A, {
195
+ const { data: t } = await this.req.get("session", O, {
196
196
  message: !1
197
197
  });
198
198
  return t;
@@ -204,25 +204,25 @@ class hr {
204
204
  */
205
205
  async authRealName(t) {
206
206
  if (!await this.autoLogin()) return null;
207
- const { data: n } = await this.req.post("auth-real-name", a(t), A);
207
+ const { data: n } = await this.req.post("auth-real-name", a(t), O);
208
208
  return n;
209
209
  }
210
210
  }
211
- const ve = {
211
+ const ke = {
212
212
  /** 未知 */
213
213
  Unknown: "unknown",
214
214
  /** 男 */
215
215
  Male: "male",
216
216
  /** 女 */
217
217
  Female: "female"
218
- }, Ce = e.string().enum(ve).lock(), Re = {
218
+ }, ve = e.string().enum(ke).lock(), Ce = {
219
219
  /** 积分增加 */
220
220
  Increase: "increase",
221
221
  /** 积分减少 */
222
222
  Decrease: "decrease",
223
223
  /** 积分过期 */
224
224
  Expired: "expired"
225
- }, Ve = e.string().enum(Re).lock(), je = {
225
+ }, Re = e.string().enum(Ce).lock(), Ve = {
226
226
  /** 游戏内购买 */
227
227
  Order: "order",
228
228
  /** 游戏内消耗 */
@@ -235,21 +235,21 @@ const ve = {
235
235
  Admin: "admin",
236
236
  /** 运营活动 */
237
237
  Event: "event"
238
- }, Te = e.string().enum(je).lock(), qe = {
238
+ }, je = e.string().enum(Ve).lock(), Te = {
239
239
  /** 游戏内奖励 */
240
240
  GameReward: "game_reward",
241
241
  /** 实物商品 */
242
242
  Physical: "physical",
243
243
  /** 虚拟商品 */
244
244
  Virtual: "virtual"
245
- }, z = e.string().enum(qe).lock(), xe = {
245
+ }, J = e.string().enum(Te).lock(), qe = {
246
246
  /** 待发放 */
247
247
  Pending: "pending",
248
248
  /** 已发放 */
249
249
  Issued: "issued",
250
250
  /** 发放失败 */
251
251
  Failed: "failed"
252
- }, Se = e.string().enum(xe).lock(), Le = e.object({
252
+ }, xe = e.string().enum(qe).lock(), Se = e.object({
253
253
  default_avatar_url: e.string(),
254
254
  official_avatar_urls: e.array(e.string()),
255
255
  default_nickname: e.string(),
@@ -267,7 +267,7 @@ const ve = {
267
267
  exp_description: e.string(),
268
268
  credit_description: e.string(),
269
269
  send_role_mail_rate_limit: e.number()
270
- }).lock(), Pe = e.object({
270
+ }).lock(), Le = e.object({
271
271
  member_id: e.string(),
272
272
  player_id: e.string(),
273
273
  exp: e.number(),
@@ -276,19 +276,19 @@ const ve = {
276
276
  credit_expiring: e.number(),
277
277
  level_change_time: e.number(),
278
278
  level_expire_time: e.number()
279
- }).lock(), Ee = e.object({
279
+ }).lock(), Pe = e.object({
280
280
  server_id: e.string(),
281
281
  server_name: e.string()
282
- }).lock(), $e = e.object({
282
+ }).lock(), Ee = e.object({
283
283
  role_id: e.string(),
284
284
  role_name: e.string()
285
- }).lock(), J = e.object({
286
- ...$e.shape,
285
+ }).lock(), K = e.object({
287
286
  ...Ee.shape,
287
+ ...Pe.shape,
288
288
  role_level: e.number(),
289
289
  last_login_time: e.number()
290
- }).lock(), Ue = e.object({
291
- ...J.shape,
290
+ }).lock(), $e = e.object({
291
+ ...K.shape,
292
292
  /** 角色战力 */
293
293
  role_fighting: e.number(),
294
294
  /** 宗门 ID */
@@ -297,13 +297,13 @@ const ve = {
297
297
  kin_name: e.string().optional(),
298
298
  /** 宗门职位 */
299
299
  kin_position: e.string().optional()
300
- }).lock(), Fe = e.object({
300
+ }).lock(), Ue = e.object({
301
301
  name: e.string(),
302
302
  avatar_url: e.string(),
303
303
  bio: e.string(),
304
- gender: Ce,
304
+ gender: ve,
305
305
  birthday: e.object({ year: e.number(), month: e.number(), day: e.number() })
306
- }).lock(), K = e.object({
306
+ }).lock(), X = e.object({
307
307
  address_id: e.number(),
308
308
  recipient: e.string(),
309
309
  mobile: e.string(),
@@ -312,19 +312,19 @@ const ve = {
312
312
  district: e.string(),
313
313
  address: e.string(),
314
314
  is_default: e.bool()
315
- }).lock(), De = e.object({
315
+ }).lock(), Fe = e.object({
316
316
  increased_credit: e.number(),
317
317
  decreased_credit: e.number(),
318
318
  expired_credit: e.number(),
319
319
  balance_credit: e.number()
320
- }).lock(), Ie = e.object({
320
+ }).lock(), De = e.object({
321
321
  id: e.number(),
322
- change_type: Ve,
323
- change_scene: Te,
322
+ change_type: Re,
323
+ change_scene: je,
324
324
  change_credit: e.number(),
325
325
  balance: e.number(),
326
326
  change_time: e.number()
327
- }).lock(), X = e.object({
327
+ }).lock(), Y = e.object({
328
328
  benefit_id: e.number(),
329
329
  name: e.string(),
330
330
  img_url: e.string(),
@@ -333,11 +333,11 @@ const ve = {
333
333
  max_level: e.number(),
334
334
  product_id: e.number(),
335
335
  tag: e.string()
336
- }).lock(), Y = e.object({
336
+ }).lock(), Z = e.object({
337
337
  product_id: e.number(),
338
338
  catalog_id: e.number(),
339
339
  catalog_name: e.string(),
340
- item_type: z,
340
+ item_type: J,
341
341
  name: e.string(),
342
342
  img_url: e.string(),
343
343
  description: e.string(),
@@ -359,9 +359,9 @@ const ve = {
359
359
  created_at: e.number(),
360
360
  updated_at: e.number(),
361
361
  redeemable_quantity: e.number().optional()
362
- }).lock(), Ge = e.object({
363
- ...C(X.shape, "tag"),
364
- product: Y.clone().optional()
362
+ }).lock(), Ie = e.object({
363
+ ...C(Y.shape, "tag"),
364
+ product: Z.clone().optional()
365
365
  }).lock(), wr = e.union(
366
366
  e.object({
367
367
  server_id: e.string(),
@@ -370,7 +370,7 @@ const ve = {
370
370
  e.object({
371
371
  address_id: e.number()
372
372
  })
373
- ).satisfies().lock(), Ne = e.object({
373
+ ).satisfies().lock(), Ge = e.object({
374
374
  recipient: e.string(),
375
375
  mobile: e.string(),
376
376
  province: e.string(),
@@ -379,29 +379,29 @@ const ve = {
379
379
  address: e.string(),
380
380
  express_company: e.string(),
381
381
  express_number: e.string()
382
- }).lock(), Ae = e.object({
382
+ }).lock(), Ne = e.object({
383
383
  server_id: e.string(),
384
384
  role_id: e.string(),
385
385
  role_name: e.string()
386
- }).lock(), Oe = e.object({
386
+ }).lock(), Ae = 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: z,
392
+ item_type: J,
393
393
  catalog_id: e.number(),
394
394
  catalog_name: e.string(),
395
395
  quantity: e.number(),
396
396
  amount: e.number(),
397
- status: Se,
397
+ status: xe,
398
398
  created_at: e.number(),
399
- extra_data: e.union(Ne.clone(), Ae.clone()).satisfies().optional()
400
- }), Be = e.guard(Le), O = o({ player: Pe }), Me = o({ roles: e.array(J) }), T = o({ role_card: Ue }), B = e.guard(Fe), M = e.guard(K), Qe = o({ addresses: e.array(K) }), He = e.guard(De), ze = o({
401
- credit_logs: e.array(Ie),
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({
401
+ credit_logs: e.array(De),
402
402
  next_token: e.string().optional()
403
- }), Je = o({ products: e.array(Y) }), Ke = o({ benefits: e.array(X) }), Xe = o({ benefit: Ge }), Ye = o({
404
- redemptions: e.array(Oe),
403
+ }), ze = o({ products: e.array(Z) }), Je = o({ benefits: e.array(Y) }), Ke = o({ benefit: Ie }), Xe = o({
404
+ redemptions: e.array(Ae),
405
405
  next_token: e.string().optional()
406
406
  });
407
407
  class kr {
@@ -416,7 +416,7 @@ class kr {
416
416
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=tuhsPt3ihp
417
417
  */
418
418
  async getConfig() {
419
- const { data: t } = await this.req.get("club/config", Be);
419
+ const { data: t } = await this.req.get("club/config", Oe);
420
420
  return t;
421
421
  }
422
422
  /**
@@ -426,7 +426,7 @@ class kr {
426
426
  */
427
427
  async getCurrentPlayer() {
428
428
  await this.token.autoLogin();
429
- const { data: t, code: n } = await this.req.get("club/current-player", O);
429
+ const { data: t, code: n } = await this.req.get("club/current-player", B);
430
430
  return (t == null ? void 0 : t.player) ?? { error: n };
431
431
  }
432
432
  /**
@@ -441,7 +441,7 @@ class kr {
441
441
  {
442
442
  id_token: this.token.idToken
443
443
  },
444
- O
444
+ B
445
445
  );
446
446
  return (t == null ? void 0 : t.player) ?? {
447
447
  error: n
@@ -454,7 +454,7 @@ class kr {
454
454
  */
455
455
  async getRoles(t, n) {
456
456
  if (!await this.token.autoLogin()) return [];
457
- const { data: r } = await this.req.get("club/roles", Me, {
457
+ const { data: r } = await this.req.get("club/roles", Be, {
458
458
  params: a({ player_id: t, refresh: n })
459
459
  });
460
460
  return (r == null ? void 0 : r.roles) || [];
@@ -496,7 +496,7 @@ class kr {
496
496
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=TMWBCFcOr2
497
497
  */
498
498
  async getUserProfile(t) {
499
- const { data: n } = await this.req.get("club/user-profile", B, {
499
+ const { data: n } = await this.req.get("club/user-profile", M, {
500
500
  params: { member_id: t }
501
501
  });
502
502
  return n;
@@ -508,7 +508,7 @@ class kr {
508
508
  */
509
509
  async updateUserProfile(t) {
510
510
  await this.token.autoLogin();
511
- const { data: n, code: r } = await this.req.post("club/user-profile", t, B);
511
+ const { data: n, code: r } = await this.req.post("club/user-profile", t, M);
512
512
  return n ?? {
513
513
  error: r
514
514
  };
@@ -520,7 +520,7 @@ class kr {
520
520
  */
521
521
  async getAddresses() {
522
522
  if (!await this.token.autoLogin()) return [];
523
- const { data: t } = await this.req.get("club/addresses", Qe);
523
+ const { data: t } = await this.req.get("club/addresses", Me);
524
524
  return (t == null ? void 0 : t.addresses) ?? [];
525
525
  }
526
526
  /**
@@ -530,7 +530,7 @@ class kr {
530
530
  */
531
531
  async addAddress(t) {
532
532
  if (!await this.token.autoLogin()) return null;
533
- const { data: n } = await this.req.post("/club/add-address", a(t), M);
533
+ const { data: n } = await this.req.post("/club/add-address", a(t), Q);
534
534
  return n;
535
535
  }
536
536
  /**
@@ -540,7 +540,7 @@ class kr {
540
540
  */
541
541
  async updateAddress(t) {
542
542
  await this.token.autoLogin();
543
- const { data: n, code: r } = await this.req.post("club/update-address", a(t), M);
543
+ const { data: n, code: r } = await this.req.post("club/update-address", a(t), Q);
544
544
  return n ?? { error: r };
545
545
  }
546
546
  /**
@@ -560,7 +560,7 @@ class kr {
560
560
  */
561
561
  async getUserCredit(t) {
562
562
  await this.token.autoLogin();
563
- const { data: n, code: r } = await this.req.get("club/user-credit", He, { params: a(t) });
563
+ const { data: n, code: r } = await this.req.get("club/user-credit", Qe, { params: a(t) });
564
564
  return n ?? { error: r };
565
565
  }
566
566
  /**
@@ -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", ze, {
573
+ const { data: n } = await this.req.get("club/credit-logs", He, {
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", Ke);
585
+ const { data: t } = await this.req.get("club/benefits", Je);
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", Xe, {
595
+ const { data: n } = await this.req.get("club/benefit", Ke, {
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", Je, {
606
+ const { data: n } = await this.req.get("club/products", ze, {
607
607
  params: t
608
608
  });
609
609
  return (n == null ? void 0 : n.products) || [];
@@ -627,7 +627,7 @@ class kr {
627
627
  */
628
628
  async getRedemptions(t) {
629
629
  await this.token.autoLogin();
630
- const { data: n } = await this.req.get("club/redemptions", Ye, {
630
+ const { data: n } = await this.req.get("club/redemptions", Xe, {
631
631
  params: a({ max_results: 20, ...t })
632
632
  });
633
633
  return { redemptions: (n == null ? void 0 : n.redemptions) || [], next_token: n == null ? void 0 : n.next_token };
@@ -652,17 +652,17 @@ const R = {
652
652
  ExternalCode: "external_gift_code",
653
653
  /** 空奖励 */
654
654
  VoidItem: "void_item"
655
- }, Z = e.string().enum(R).lock(), vr = R, W = Z, Ze = {
655
+ }, W = e.string().enum(R).lock(), vr = R, ee = W, Ye = {
656
656
  /** 世游通行证 ID / Combo ID */
657
657
  UserId: "user_id",
658
658
  /** 游戏角色 ID */
659
659
  RoleId: "role_id"
660
- }, We = e.string().enum(Ze).lock(), et = {
660
+ }, Ze = e.string().enum(Ye).lock(), We = {
661
661
  None: "none",
662
662
  Daily: "daily",
663
663
  Weekly: "weekly",
664
664
  Monthly: "monthly"
665
- }, tt = e.string().enum(et).lock(), c = {
665
+ }, et = e.string().enum(We).lock(), c = {
666
666
  /** 预约 */
667
667
  Preregister: "preregister",
668
668
  /** 抽奖 */
@@ -699,7 +699,7 @@ const R = {
699
699
  LotteryDraw: "lottery_draw",
700
700
  /** 签到 */
701
701
  CheckIn: "check_in"
702
- }, nt = e.string().enum(c).lock(), rt = {
702
+ }, tt = e.string().enum(c).lock(), nt = {
703
703
  /** 累计游戏内活跃值 */
704
704
  Active: "player_active_points",
705
705
  /** 累计登录,单位 人天 */
@@ -714,14 +714,14 @@ const R = {
714
714
  MatchCounts: "player_match_counts",
715
715
  /** 游戏对局天数 */
716
716
  MatchDays: "player_match_days"
717
- }, ee = e.string().enum(rt).lock(), it = {
717
+ }, te = e.string().enum(nt).lock(), rt = {
718
718
  /** 官方上传 */
719
719
  System: "system",
720
720
  /** 用户投稿 */
721
721
  UserSubmission: "user_submission",
722
722
  /** 投票入围 */
723
723
  Shortlisted: "shortlisted"
724
- }, ot = e.string().enum(it).lock(), g = {
724
+ }, it = e.string().enum(rt).lock(), g = {
725
725
  /** 未获得奖励 */
726
726
  Ineligible: "ineligible",
727
727
  /** 奖励未领取 */
@@ -747,7 +747,7 @@ const R = {
747
747
  Failed: g.Failed,
748
748
  /** 奖励已发货 */
749
749
  Delivered: g.Delivered
750
- }, te = e.string().enum(P).lock(), _ = {
750
+ }, ne = e.string().enum(P).lock(), _ = {
751
751
  /** 未获得奖励 */
752
752
  Ineligible: g.Ineligible,
753
753
  /**
@@ -764,17 +764,17 @@ const R = {
764
764
  Failed: g.Failed,
765
765
  /** 奖励已发货 */
766
766
  Delivered: g.Delivered
767
- }, E = e.string().enum(_).lock(), at = {
767
+ }, E = e.string().enum(_).lock(), ot = {
768
768
  /** 玩法产出奖励 */
769
769
  Output: "output",
770
770
  /** 玩法参与奖励 */
771
771
  Engage: "engage"
772
- }, $ = e.string().enum(at).lock(), st = {
772
+ }, $ = e.string().enum(ot).lock(), at = {
773
773
  /** 私有队伍 */
774
774
  Private: "private",
775
775
  /** 公开队伍 */
776
776
  Public: "public"
777
- }, ct = e.string().enum(st).lock(), w = {
777
+ }, st = e.string().enum(at).lock(), w = {
778
778
  /** 未知状态 */
779
779
  Unknown: "unknown",
780
780
  /** 等待开奖 */
@@ -785,7 +785,7 @@ const R = {
785
785
  Claimed: "claimed",
786
786
  /** 领奖失败 */
787
787
  Fail: "fail"
788
- }, Rr = e.string().enum(w).lock(), ut = {
788
+ }, Rr = e.string().enum(w).lock(), ct = {
789
789
  /** 发起组队 */
790
790
  Assemble: "assemble",
791
791
  /** 加入队伍 */
@@ -796,68 +796,68 @@ const R = {
796
796
  ChangeVisibility: "change_visibility",
797
797
  /** 查询组队信息 */
798
798
  Query: "query"
799
- }, Vr = e.string().enum(ut).lock(), lt = {
799
+ }, Vr = e.string().enum(ct).lock(), ut = {
800
800
  /** 查询抽奖券 */
801
801
  Query: "query",
802
802
  /** 开奖 */
803
803
  Draw: "draw",
804
804
  /** 领奖 */
805
805
  Claim: "claim"
806
- }, jr = e.string().enum(lt).lock(), mt = e.string().enum(C(R, "GiftCode", "LotteryTicket")), U = e.object({
806
+ }, jr = e.string().enum(ut).lock(), lt = e.string().enum(C(R, "GiftCode", "LotteryTicket")), U = e.object({
807
807
  reward_item_id: e.number(),
808
808
  reward_amount: e.number(),
809
809
  reward_item_name: e.string(),
810
810
  reward_item_icon_url: e.string(),
811
811
  reward_item_desc: e.string().optional(),
812
- reward_item_type: mt,
812
+ reward_item_type: lt,
813
813
  reward_item_rating: e.number()
814
- }).lock(), dt = e.object({
814
+ }).lock(), mt = e.object({
815
815
  engage_count: e.number(),
816
816
  rewards: e.array(U)
817
- }).lock(), gt = e.union(
817
+ }).lock(), dt = e.union(
818
818
  e.object({
819
819
  feature_reward_type: e.string().enum("every"),
820
820
  reward_details: e.array(U)
821
821
  }),
822
822
  e.object({
823
823
  feature_reward_type: e.string().enum("regular"),
824
- reward_details: e.array(dt)
824
+ reward_details: e.array(mt)
825
825
  })
826
826
  ).satisfies().lock(), u = e.object({
827
827
  feature_name: e.string(),
828
828
  feature_id: e.number(),
829
829
  description: e.string(),
830
- cycle: tt,
830
+ cycle: et,
831
831
  limit: e.number(),
832
832
  since: e.number(),
833
833
  until: e.number(),
834
- engage_account: We,
835
- feature_rewards: gt.clone().optional()
836
- }), pt = c.Cashback, _t = e.object({
834
+ engage_account: Ze,
835
+ feature_rewards: dt.clone().optional()
836
+ }), gt = c.Cashback, pt = e.object({
837
837
  ...u.shape,
838
- feature_type: e.string().enum(pt),
838
+ feature_type: e.string().enum(gt),
839
839
  config: e.object({
840
840
  order_start_time: e.number(),
841
841
  order_end_time: e.number(),
842
842
  claim_rewards_start_time: e.number(),
843
843
  claim_rewards_end_time: e.number()
844
844
  })
845
- }), bt = c.CheckIn, yt = e.object({
845
+ }), _t = c.CheckIn, bt = e.object({
846
846
  ...u.shape,
847
- feature_type: e.string().enum(bt)
848
- }), ft = c.ClaimRewards, ht = e.object({
847
+ feature_type: e.string().enum(_t)
848
+ }), yt = c.ClaimRewards, ft = e.object({
849
849
  ...u.shape,
850
- feature_type: e.string().enum(ft)
851
- }), wt = c.Comment, kt = e.object({
850
+ feature_type: e.string().enum(yt)
851
+ }), ht = c.Comment, wt = e.object({
852
852
  ...u.shape,
853
- feature_type: e.string().enum(wt),
853
+ feature_type: e.string().enum(ht),
854
854
  config: e.object({
855
855
  comments: e.array(e.string()),
856
856
  send_rate: e.number()
857
857
  })
858
- }), vt = c.Follow, Ct = e.object({
858
+ }), kt = c.Follow, vt = e.object({
859
859
  ...u.shape,
860
- feature_type: e.string().enum(vt),
860
+ feature_type: e.string().enum(kt),
861
861
  config: e.object({
862
862
  platform: e.string(),
863
863
  platform_icon: e.string().optional(),
@@ -865,61 +865,61 @@ const R = {
865
865
  qr_code_url: e.string().optional(),
866
866
  platform_desc: e.string().optional()
867
867
  })
868
- }), Rt = c.GiftCode, Vt = e.object({
868
+ }), Ct = c.GiftCode, Rt = e.object({
869
869
  name: e.string(),
870
870
  icon_url: e.string(),
871
871
  count: e.number()
872
- }), jt = e.object({
872
+ }), Vt = e.object({
873
873
  ...u.shape,
874
- feature_type: e.string().enum(Rt),
874
+ feature_type: e.string().enum(Ct),
875
875
  config: e.object({
876
- gift_items: e.array(Vt),
876
+ gift_items: e.array(Rt),
877
877
  mp_url: e.string().optional(),
878
878
  mp_qrcode_url: e.string().optional()
879
879
  })
880
- }), Tt = c.Invite, qt = e.object({
880
+ }), jt = c.Invite, Tt = e.object({
881
881
  ...u.shape,
882
- feature_type: e.string().enum(Tt),
882
+ feature_type: e.string().enum(jt),
883
883
  config: e.object({
884
884
  share_url: e.string()
885
885
  })
886
- }), xt = c.InvitedRegister, St = e.object({
886
+ }), qt = c.InvitedRegister, xt = e.object({
887
887
  ...u.shape,
888
- feature_type: e.string().enum(xt)
889
- }), Lt = e.string().enum(C(R, "GiftCode", "LotteryTicket")), Pt = c.Lottery, Et = e.object({
888
+ feature_type: e.string().enum(qt)
889
+ }), St = e.string().enum(C(R, "GiftCode", "LotteryTicket")), Lt = c.Lottery, Pt = e.object({
890
890
  reward_item_id: e.number(),
891
891
  reward_item_name: e.string(),
892
- reward_item_type: Lt,
892
+ reward_item_type: St,
893
893
  reward_item_icon_url: e.string(),
894
894
  reward_item_desc: e.string().optional(),
895
895
  reward_amount: e.number(),
896
896
  reward_remaining_stock: e.number()
897
- }), $t = e.object({
897
+ }), Et = e.object({
898
898
  ...u.shape,
899
- feature_type: e.string().enum(Pt),
899
+ feature_type: e.string().enum(Lt),
900
900
  config: e.object({
901
901
  consume_item_id: e.number(),
902
902
  consume_item_name: e.number(),
903
903
  consume_item_icon_url: e.string(),
904
904
  consume_item_count: e.number(),
905
905
  consume_item_desc: e.string().optional(),
906
- rewards: e.array(Et)
906
+ rewards: e.array(Pt)
907
907
  })
908
- }), Ut = c.LotteryDraw, Ft = e.object({
908
+ }), $t = c.LotteryDraw, Ut = e.object({
909
909
  ...u.shape,
910
- feature_type: e.string().enum(Ut),
910
+ feature_type: e.string().enum($t),
911
911
  config: e.object({
912
912
  draw_not_before: e.number(),
913
913
  draw_not_after: e.number()
914
914
  })
915
- }), Dt = c.Preregister, It = e.object({
915
+ }), Ft = c.Preregister, Dt = e.object({
916
916
  ...u.shape,
917
- feature_type: e.string().enum(Dt)
918
- }), Gt = c.Quest, Nt = e.object({
917
+ feature_type: e.string().enum(Ft)
918
+ }), It = c.Quest, Gt = e.object({
919
919
  ...u.shape,
920
- feature_type: e.string().enum(Gt),
920
+ feature_type: e.string().enum(It),
921
921
  config: e.object({
922
- objective: ee,
922
+ objective: te,
923
923
  completion_value: e.number(),
924
924
  team: e.object({
925
925
  feature_id: e.number().optional(),
@@ -931,38 +931,38 @@ const R = {
931
931
  required_matches: e.number().min(1).optional()
932
932
  }).optional()
933
933
  })
934
- }), At = c.Register, Ot = e.object({
934
+ }), Nt = c.Register, At = e.object({
935
935
  ...u.shape,
936
- feature_type: e.string().enum(At)
937
- }), Bt = c.Share, Mt = e.object({
936
+ feature_type: e.string().enum(Nt)
937
+ }), Ot = c.Share, Bt = e.object({
938
938
  ...u.shape,
939
- feature_type: e.string().enum(Bt),
939
+ feature_type: e.string().enum(Ot),
940
940
  config: e.object({
941
941
  share_platform: e.string(),
942
942
  jump_url: e.string().optional(),
943
943
  icon_url: e.string().optional()
944
944
  })
945
- }), Qt = c.Subscribe, Ht = e.object({
945
+ }), Mt = c.Subscribe, Qt = e.object({
946
946
  ...u.shape,
947
- feature_type: e.string().enum(Qt),
947
+ feature_type: e.string().enum(Mt),
948
948
  config: e.object({
949
949
  weixin_template_ids: e.array(e.string())
950
950
  })
951
- }), zt = c.Survey, Jt = e.object({
951
+ }), Ht = c.Survey, zt = e.object({
952
952
  ...u.shape,
953
- feature_type: e.string().enum(zt),
953
+ feature_type: e.string().enum(Ht),
954
954
  config: e.object({
955
955
  survey_id: e.string(),
956
956
  survey_url: e.string()
957
957
  })
958
- }), Kt = c.Team, Xt = e.object({
958
+ }), Jt = c.Team, Kt = e.object({
959
959
  ...u.shape,
960
- feature_type: e.string().enum(Kt),
960
+ feature_type: e.string().enum(Jt),
961
961
  config: e.object({
962
962
  max_members: e.number().min(1),
963
963
  min_members: e.number().min(1)
964
964
  })
965
- }), Yt = c.Vote, Zt = e.object({
965
+ }), Xt = c.Vote, Yt = e.object({
966
966
  sn: e.string(),
967
967
  name: e.string(),
968
968
  img_urls: e.array(e.string()).optional(),
@@ -972,61 +972,61 @@ const R = {
972
972
  amount: e.number(),
973
973
  finalists: e.bool(),
974
974
  last_vote_time: e.number()
975
- }), Wt = e.object({
975
+ }), Zt = e.object({
976
976
  ...u.shape,
977
- feature_type: e.string().enum(Yt),
977
+ feature_type: e.string().enum(Xt),
978
978
  config: e.object({
979
979
  vote_feature_ids: e.array(e.number()),
980
980
  submission_feature_ids: e.array(e.number()),
981
981
  finalists_amount: e.number(),
982
- source: ot,
983
- options: e.array(Zt),
982
+ source: it,
983
+ options: e.array(Yt),
984
984
  rewards: e.array(U)
985
985
  })
986
- }), en = e.union(
987
- _t,
988
- yt,
989
- ht,
990
- kt,
991
- Ct,
992
- jt,
993
- qt,
994
- St,
995
- $t,
996
- Ft,
997
- It,
998
- Nt,
999
- Ot,
1000
- Mt,
1001
- Ht,
1002
- Jt,
1003
- Xt,
1004
- Wt
1005
- ).key("feature_type").satisfies(), tn = e.object({
986
+ }), Wt = e.union(
987
+ pt,
988
+ bt,
989
+ ft,
990
+ wt,
991
+ vt,
992
+ Vt,
993
+ Tt,
994
+ xt,
995
+ Et,
996
+ Ut,
997
+ Dt,
998
+ Gt,
999
+ At,
1000
+ Bt,
1001
+ Qt,
1002
+ zt,
1003
+ Kt,
1004
+ Zt
1005
+ ).key("feature_type").satisfies(), en = e.object({
1006
1006
  event_name: e.string(),
1007
1007
  rules: e.string(),
1008
1008
  since: e.number(),
1009
1009
  until: e.number(),
1010
1010
  visit_count: e.number().optional(),
1011
- features: e.array(en)
1012
- }).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), nn = e.object({
1011
+ features: e.array(Wt)
1012
+ }).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), tn = e.object({
1013
1013
  order_total_amount: q,
1014
1014
  cashback_total_amount: q,
1015
1015
  game_item_count: q
1016
- }), rn = e.object({
1016
+ }), nn = e.object({
1017
1017
  gift_code: e.string()
1018
- }), on = e.object({
1018
+ }), rn = e.object({
1019
1019
  user_id: e.string(),
1020
1020
  name: e.string().optional(),
1021
1021
  avatar_url: e.string().optional()
1022
- }), an = e.object({
1022
+ }), on = e.object({
1023
1023
  lottery_count: e.number()
1024
- }), ne = e.object({
1024
+ }), re = e.object({
1025
1025
  reward_id: e.number(),
1026
1026
  reward_item_id: e.number(),
1027
1027
  reward_source: $,
1028
1028
  reward_item_name: e.string(),
1029
- reward_item_type: Z,
1029
+ reward_item_type: W,
1030
1030
  reward_item_icon_url: e.string(),
1031
1031
  reward_item_desc: e.string().optional(),
1032
1032
  reward_item_rating: e.number(),
@@ -1036,27 +1036,27 @@ const R = {
1036
1036
  event_name: e.string(),
1037
1037
  feature_id: e.number(),
1038
1038
  engagement_id: e.number(),
1039
- feature_type: nt,
1039
+ feature_type: tt,
1040
1040
  receive_time: e.number(),
1041
1041
  // https://kdocs.cn/l/ckWFDcOsYEUA?linkname=merUzJsVYH
1042
1042
  // 后续会格式化为具体的类型,此处的校验需要对应增加
1043
1043
  extra_data: e.record(e.unknown()).optional()
1044
- }), sn = e.string().enum(w.Unknown, w.Pending), cn = e.union(
1044
+ }), an = e.string().enum(w.Unknown, w.Pending), sn = e.union(
1045
1045
  e.object({
1046
1046
  ticket: e.string(),
1047
- status: sn
1047
+ status: an
1048
1048
  }),
1049
1049
  e.object({
1050
1050
  ticket: e.string(),
1051
1051
  status: e.string().enum(C(w, "Unknown", "Pending")),
1052
- reward: ne
1052
+ reward: re
1053
1053
  })
1054
- ).satisfies(), un = e.object({
1055
- tickets: e.array(cn)
1056
- }), ln = e.object({
1054
+ ).satisfies(), cn = e.object({
1055
+ tickets: e.array(sn)
1056
+ }), un = e.object({
1057
1057
  platforms: e.array(e.string())
1058
- }), mn = e.object({
1059
- objective: ee,
1058
+ }), ln = e.object({
1059
+ objective: te,
1060
1060
  progress: e.number(),
1061
1061
  completion_value: e.number().optional(),
1062
1062
  team: e.object({
@@ -1071,13 +1071,13 @@ const R = {
1071
1071
  })
1072
1072
  )
1073
1073
  }).optional()
1074
- }), dn = e.object({
1074
+ }), mn = e.object({
1075
1075
  platform: e.string()
1076
- }), gn = e.object({
1076
+ }), dn = e.object({
1077
1077
  weixin_openid: e.string()
1078
- }), pn = e.object({
1078
+ }), gn = e.object({
1079
1079
  serial_number: e.number()
1080
- }), _n = e.object({
1080
+ }), pn = e.object({
1081
1081
  team_code: e.string(),
1082
1082
  leader_name: e.string(),
1083
1083
  total_members: e.number()
@@ -1086,9 +1086,9 @@ const R = {
1086
1086
  is_myself: e.bool().optional(),
1087
1087
  role_name: e.string(),
1088
1088
  server_name: e.string()
1089
- }), bn = e.object({
1089
+ }), _n = e.object({
1090
1090
  team_code: e.string(),
1091
- visibility: ct,
1091
+ visibility: st,
1092
1092
  members: e.array(
1093
1093
  e.object({
1094
1094
  is_leader: e.bool(),
@@ -1096,67 +1096,67 @@ const R = {
1096
1096
  server_name: e.string()
1097
1097
  })
1098
1098
  )
1099
- }), yn = e.object({
1099
+ }), bn = e.object({
1100
1100
  option_sn: e.string()
1101
- }), fn = e.object({
1101
+ }), yn = e.object({
1102
1102
  user_id: e.string(),
1103
1103
  name: e.string(),
1104
1104
  avatar_url: e.string(),
1105
1105
  comment: e.string(),
1106
1106
  video_note: e.number(),
1107
1107
  created_at: e.number()
1108
- }), re = e.union(
1109
- ln,
1110
- an,
1111
- pn,
1108
+ }), F = e.union(
1109
+ un,
1112
1110
  on,
1113
- dn,
1114
- yn,
1115
1111
  gn,
1116
- nn,
1117
1112
  rn,
1118
- bn,
1119
1113
  mn,
1120
- un,
1114
+ bn,
1115
+ dn,
1116
+ tn,
1117
+ nn,
1118
+ _n,
1119
+ ln,
1120
+ cn,
1121
1121
  e.custom(
1122
1122
  "EmptyObject",
1123
1123
  (i) => v(i) && Object.keys(i).length === 0
1124
1124
  )
1125
- ).satisfies().lock(), hn = e.object({
1125
+ ).satisfies().lock(), fn = e.object({
1126
1126
  reward_id: e.number(),
1127
1127
  reward_item_id: e.number(),
1128
- reward_item_type: W,
1128
+ reward_item_type: ee,
1129
1129
  reward_count: e.number(),
1130
- reward_status: te,
1130
+ reward_status: ne,
1131
1131
  reward_source: $,
1132
1132
  reward_item_name: e.string(),
1133
1133
  reward_item_icon_url: e.string(),
1134
1134
  reward_item_desc: e.string().optional(),
1135
1135
  reward_item_rating: e.number(),
1136
1136
  receive_time: e.number(),
1137
- extra_data: e.union(...re.validators, e.record(e.unknown())).satisfies().optional()
1138
- }), wn = e.object({
1137
+ extra_data: e.union(...F.validators, e.record(e.unknown())).satisfies().optional()
1138
+ }), hn = e.object({
1139
1139
  reward_id: e.number(),
1140
1140
  reward_item_id: e.number(),
1141
1141
  reward_item_name: e.string(),
1142
- reward_item_type: W,
1142
+ reward_item_type: ee,
1143
1143
  reward_item_icon_url: e.string(),
1144
1144
  reward_item_desc: e.string().optional(),
1145
1145
  reward_amount: e.number(),
1146
- reward_status: te,
1146
+ reward_status: ne,
1147
1147
  reward_source: $,
1148
1148
  extra_data: e.record(e.unknown()).optional()
1149
- }), ie = e.object({
1149
+ }), wn = e.object({
1150
1150
  engagement_id: e.number(),
1151
1151
  user_id: e.string(),
1152
1152
  event_id: e.number(),
1153
1153
  feature_id: e.number(),
1154
1154
  sequence: e.number(),
1155
- data: re.clone().optional(),
1155
+ data: F.clone().optional(),
1156
1156
  server_id: e.string().optional(),
1157
1157
  role_id: e.string().optional(),
1158
1158
  created_at: e.number(),
1159
- rewards: e.array(hn).optional()
1159
+ rewards: e.array(fn).optional()
1160
1160
  }).lock(), kn = e.object({
1161
1161
  allowed: e.bool(),
1162
1162
  registered: e.bool()
@@ -1167,31 +1167,29 @@ const R = {
1167
1167
  }), Cn = e.object({
1168
1168
  engagement_id: e.number(),
1169
1169
  engagement: e.object({
1170
- user_id: e.string(),
1171
- feature_id: e.number(),
1170
+ engagement_id: e.number(),
1172
1171
  sequence: e.number(),
1173
- server_id: e.string(),
1174
- role_id: e.string(),
1175
- data: ie.clone().optional()
1172
+ feature_id: e.number(),
1173
+ data: F.clone().optional()
1176
1174
  }).optional(),
1177
- rewards: e.array(wn).optional(),
1175
+ rewards: e.array(hn).optional(),
1178
1176
  scan: e.bool().optional()
1179
1177
  }), Rn = e.object({
1180
1178
  reward_id: e.number(),
1181
1179
  reward_status: E
1182
- }), Vn = e.guard(tn), jn = e.guard(kn), x = o({ count: e.number() }), Tn = o({ first_visit: e.bool() }), qn = o({
1183
- engagements: e.union(e.array(fn), e.array(_n))
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))
1184
1182
  }), xn = o({
1185
1183
  status: e.array(vn)
1186
1184
  }), Sn = o({
1187
- engagements: e.array(ie),
1185
+ engagements: e.array(wn),
1188
1186
  next_token: e.string().optional()
1189
1187
  }), Ln = e.guard(Cn), Pn = o({
1190
1188
  claimed_items: e.array(Rn)
1191
1189
  }), En = o({
1192
1190
  reward_status: E
1193
1191
  }), $n = o({
1194
- user_rewards: e.array(ne),
1192
+ user_rewards: e.array(re),
1195
1193
  next_token: e.string().optional()
1196
1194
  }), Un = o({
1197
1195
  scene: e.string()
@@ -1460,7 +1458,7 @@ const In = {
1460
1458
  Failed: "failed",
1461
1459
  /** 嫌疑(仅自己可见) */
1462
1460
  Suspect: "suspect"
1463
- }, oe = e.string().enum(Nn).lock(), An = {
1461
+ }, ie = e.string().enum(Nn).lock(), An = {
1464
1462
  /** 系统通知 */
1465
1463
  System: "system",
1466
1464
  /** 评论我的 */
@@ -1492,7 +1490,7 @@ const In = {
1492
1490
  ReplyLiked: "reply_liked",
1493
1491
  /** 回复被删除 */
1494
1492
  ReplyDeleted: "reply_deleted"
1495
- }, On = e.string().enum(m).lock(), ae = e.object({
1493
+ }, On = e.string().enum(m).lock(), oe = e.object({
1496
1494
  forum_id: e.number(),
1497
1495
  icon_url: e.string(),
1498
1496
  name: e.string(),
@@ -1500,16 +1498,16 @@ const In = {
1500
1498
  sort: e.number(),
1501
1499
  mode: Gn,
1502
1500
  member_ids: e.array(e.number())
1503
- }).lock(), F = e.object({
1501
+ }).lock(), D = e.object({
1504
1502
  topic_id: e.number(),
1505
1503
  cover_url: e.string(),
1506
1504
  name: e.string(),
1507
1505
  description: e.string(),
1508
1506
  tags: e.array(e.string()),
1509
1507
  post_num: e.number()
1510
- }).lock(), D = e.object({
1508
+ }).lock(), I = e.object({
1511
1509
  post_id: e.number(),
1512
- forum: ae,
1510
+ forum: oe,
1513
1511
  posted_by: e.string(),
1514
1512
  nickname: e.string(),
1515
1513
  avatar_url: e.string(),
@@ -1521,13 +1519,13 @@ const In = {
1521
1519
  comments_num: e.number(),
1522
1520
  liked: e.bool(),
1523
1521
  image_urls: e.array(e.string()),
1524
- topics: e.array(F),
1522
+ topics: e.array(D),
1525
1523
  event_ids: e.array(e.number()),
1526
1524
  is_pinned: e.bool(),
1527
1525
  is_highlighted: e.bool(),
1528
- status: oe,
1526
+ status: ie,
1529
1527
  create_time: e.number()
1530
- }).lock(), se = e.object({
1528
+ }).lock(), ae = e.object({
1531
1529
  err_msg: e.string().optional()
1532
1530
  }).lock(), Bn = e.object({
1533
1531
  reply_id: e.number(),
@@ -1568,7 +1566,7 @@ const In = {
1568
1566
  liked: e.bool(),
1569
1567
  image_url: e.string(),
1570
1568
  create_time: e.number(),
1571
- status: oe,
1569
+ status: ie,
1572
1570
  replies: e.array(V).optional()
1573
1571
  }).lock(), Mn = e.object({
1574
1572
  image_url: e.string(),
@@ -1585,7 +1583,7 @@ const In = {
1585
1583
  }).lock(), Qn = e.object({
1586
1584
  system_message_subject: e.string(),
1587
1585
  system_message_content: e.string()
1588
- }).lock(), I = e.object({
1586
+ }).lock(), G = e.object({
1589
1587
  post_id: e.number(),
1590
1588
  post_subject: e.string(),
1591
1589
  post_summary: e.string(),
@@ -1593,7 +1591,7 @@ const In = {
1593
1591
  }).lock(), j = e.object({
1594
1592
  comment_id: e.number(),
1595
1593
  comment_content: e.string()
1596
- }).lock(), G = e.object({
1594
+ }).lock(), N = e.object({
1597
1595
  reply_id: e.number(),
1598
1596
  reply_content: e.string()
1599
1597
  }).lock(), Hn = e.object({
@@ -1602,7 +1600,7 @@ const In = {
1602
1600
  notification_type: e.string().enum(m.System)
1603
1601
  }), zn = e.object({
1604
1602
  ...y.shape,
1605
- ...I.shape,
1603
+ ...G.shape,
1606
1604
  notification_type: e.string().enum(
1607
1605
  m.PostPinned,
1608
1606
  m.PostHighlighted,
@@ -1611,29 +1609,29 @@ const In = {
1611
1609
  )
1612
1610
  }), Jn = e.object({
1613
1611
  ...y.shape,
1614
- ...I.shape,
1612
+ ...G.shape,
1615
1613
  ...j.shape,
1616
1614
  notification_type: e.string().enum(m.PostCommented)
1617
1615
  }), Kn = e.object({
1618
1616
  ...y.shape,
1619
1617
  ...j.shape,
1620
- ...G.shape,
1618
+ ...N.shape,
1621
1619
  notification_type: e.string().enum(m.CommentReplied)
1622
1620
  }), Xn = e.object({
1623
1621
  ...y.shape,
1624
1622
  ...j.shape,
1625
- ...I.shape,
1623
+ ...G.shape,
1626
1624
  notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
1627
1625
  }), Yn = e.object({
1628
1626
  ...y.shape,
1629
- ...G.shape,
1627
+ ...N.shape,
1630
1628
  notification_type: e.string().enum(m.ReplyReplied),
1631
1629
  comment_id: e.number(),
1632
1630
  reply_to_reply_id: e.number(),
1633
1631
  reply_to_reply_content: e.string()
1634
1632
  }), Zn = e.object({
1635
1633
  ...y.shape,
1636
- ...G.shape,
1634
+ ...N.shape,
1637
1635
  ...j.shape,
1638
1636
  notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
1639
1637
  }), Wn = e.union(
@@ -1644,15 +1642,15 @@ const In = {
1644
1642
  Xn,
1645
1643
  Yn,
1646
1644
  Zn
1647
- ).satisfies().lock(), er = o({ forums: e.array(ae) }), tr = o({ topics: e.array(F) }), nr = o({ topic: F }), rr = o({ post: D }), Q = o({
1648
- posts: e.array(D),
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({
1646
+ posts: e.array(I),
1649
1647
  next_token: e.string().optional()
1650
- }), ir = o({ post: D, antispam: se }), or = o({
1648
+ }), ir = o({ post: I, antispam: ae }), or = o({
1651
1649
  replies: e.array(V),
1652
1650
  next_token: e.string().optional()
1653
1651
  }), ar = o({ reply: V }), sr = o({
1654
1652
  reply: V.clone().optional(),
1655
- antispam: se.clone().optional()
1653
+ antispam: ae.clone().optional()
1656
1654
  }), cr = o({ comment: k }), ur = o({
1657
1655
  comments: e.array(k),
1658
1656
  next_token: e.string().optional()
@@ -1708,7 +1706,7 @@ class Sr {
1708
1706
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
1709
1707
  */
1710
1708
  async getPosts(t) {
1711
- const { data: n, code: r } = await this.req.get("community/posts", Q, {
1709
+ const { data: n, code: r } = await this.req.get("community/posts", H, {
1712
1710
  params: a(t)
1713
1711
  });
1714
1712
  return n ?? { error: r };
@@ -1719,7 +1717,7 @@ class Sr {
1719
1717
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
1720
1718
  */
1721
1719
  async getPinnedPosts(t, n, r) {
1722
- const { data: s, code: d } = await this.req.get("community/pinned-posts", Q, {
1720
+ const { data: s, code: d } = await this.req.get("community/pinned-posts", H, {
1723
1721
  params: a({ forum_id: t, max_results: n, next_token: r })
1724
1722
  });
1725
1723
  return s ?? { error: d };
@@ -1894,7 +1892,7 @@ var _r = /* @__PURE__ */ ((i) => (i.RedirectUriDisMatch = "10003", i.AppidError
1894
1892
  function S(i) {
1895
1893
  return v(i, "open_id", "union_id", "weixin_token");
1896
1894
  }
1897
- const H = "wx_login_cache";
1895
+ const z = "wx_login_cache";
1898
1896
  class Lr {
1899
1897
  /**
1900
1898
  * 创建微信相关功能接口
@@ -1926,10 +1924,10 @@ class Lr {
1926
1924
  * 也可以直接调用 login 方法,并传入 weixin code 的读取函数
1927
1925
  */
1928
1926
  async getLoginCache() {
1929
- const t = this.token.storage.get(H);
1927
+ const t = this.token.storage.get(z);
1930
1928
  if (!t)
1931
1929
  return null;
1932
- const n = be(t);
1930
+ const n = _e(t);
1933
1931
  return S(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
1934
1932
  }
1935
1933
  /**
@@ -1955,13 +1953,13 @@ class Lr {
1955
1953
  const t = await this.getLoginCache();
1956
1954
  if (t)
1957
1955
  return t;
1958
- const n = await he(), { data: r, code: s } = await this.req.post(
1956
+ const n = await fe(), { data: r, code: s } = await this.req.post(
1959
1957
  "weixin/login",
1960
1958
  { code: n, appid: this.appid },
1961
1959
  S,
1962
1960
  { message: !1 }
1963
1961
  );
1964
- return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(H, JSON.stringify(r)), await this.token.autoLogin()), r ?? { error: s };
1962
+ return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(z, JSON.stringify(r)), await this.token.autoLogin()), r ?? { error: s };
1965
1963
  }
1966
1964
  /**
1967
1965
  * 在微信内嵌网页中调用微信公众号授权登录【暂未启用】
@@ -1982,17 +1980,17 @@ class Lr {
1982
1980
  async webLogin(t = "snsapi_userinfo") {
1983
1981
  const n = L("code"), r = Date.now(), s = +L("state");
1984
1982
  if (!n || !s || s < r - 1e3 * 60 * 5 || s > r) {
1985
- const ue = N(["code", "state"]);
1983
+ const ce = A(["code", "state"]);
1986
1984
  location.replace(
1987
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ue)}&response_type=code&scope=${t}&state=${r}#wechat_redirect`
1985
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ce)}&response_type=code&scope=${t}&state=${r}#wechat_redirect`
1988
1986
  );
1989
1987
  return;
1990
1988
  }
1991
1989
  if (/^100\d{2}$/.test(n))
1992
1990
  return { error: n };
1993
- const d = N(["code", "state"]);
1991
+ const d = A(["code", "state"]);
1994
1992
  "replaceState" in history && history.replaceState({}, "", d);
1995
- const { data: p, code: ce } = await this.req.post(
1993
+ const { data: p, code: se } = await this.req.post(
1996
1994
  "weixin/login",
1997
1995
  {
1998
1996
  code: n,
@@ -2000,7 +1998,7 @@ class Lr {
2000
1998
  },
2001
1999
  S
2002
2000
  );
2003
- return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? { error: ce };
2001
+ return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? { error: se };
2004
2002
  }
2005
2003
  /**
2006
2004
  * 关联游戏账号,无返回值,全程静默
@@ -2040,79 +2038,79 @@ class Lr {
2040
2038
  }
2041
2039
  }
2042
2040
  export {
2043
- se as AntispamValidator,
2041
+ ae as AntispamValidator,
2044
2042
  hr as AuthToken,
2045
- nn as CashbackEngagementDataValidator,
2043
+ tn as CashbackEngagementDataValidator,
2046
2044
  _ as ClaimRewardStatus,
2047
2045
  E as ClaimRewardStatusValidator,
2048
2046
  Rn as ClaimedItemValidator,
2049
- K as ClubAddressValidator,
2047
+ X as ClubAddressValidator,
2050
2048
  kr as ClubApi,
2051
- X as ClubBenefitSummaryValidator,
2052
- Ge as ClubBenefitValidator,
2053
- je as ClubCreditChangeScene,
2054
- Te as ClubCreditChangeSceneValidator,
2055
- Re as ClubCreditChangeType,
2056
- Ve as ClubCreditChangeTypeValidator,
2057
- Ie as ClubCreditLogValidator,
2058
- Le as ClubGlobalConfigValidator,
2059
- qe as ClubItemType,
2060
- z as ClubItemTypeValidator,
2061
- Pe as ClubPlayerValidator,
2062
- Y as ClubProductValidator,
2063
- xe as ClubRedemptionStatus,
2064
- Se as ClubRedemptionStatusValidator,
2065
- De as ClubUserCreditValidator,
2066
- Fe as ClubUserProfileValidator,
2067
- fn as CommentEngagementValidator,
2049
+ Y as ClubBenefitSummaryValidator,
2050
+ Ie as ClubBenefitValidator,
2051
+ Ve as ClubCreditChangeScene,
2052
+ je as ClubCreditChangeSceneValidator,
2053
+ Ce as ClubCreditChangeType,
2054
+ Re as ClubCreditChangeTypeValidator,
2055
+ De as ClubCreditLogValidator,
2056
+ Se as ClubGlobalConfigValidator,
2057
+ Te as ClubItemType,
2058
+ J as ClubItemTypeValidator,
2059
+ Le as ClubPlayerValidator,
2060
+ Z as ClubProductValidator,
2061
+ qe as ClubRedemptionStatus,
2062
+ xe as ClubRedemptionStatusValidator,
2063
+ Fe as ClubUserCreditValidator,
2064
+ Ue as ClubUserProfileValidator,
2065
+ yn as CommentEngagementValidator,
2068
2066
  k as CommentValidator,
2069
2067
  Sr as CommunityApi,
2070
- Ze as EngageAccountType,
2071
- We as EngageAccountTypeValidator,
2068
+ Ye as EngageAccountType,
2069
+ Ze as EngageAccountTypeValidator,
2072
2070
  Cn as EngageResponseValidator,
2073
- wn as EngageRewardValidator,
2071
+ hn as EngageRewardValidator,
2074
2072
  qr as EventApi,
2075
- tn as EventConfigValidator,
2076
- _t as EventFeatureConfigOfCashbackValidator,
2077
- yt as EventFeatureConfigOfCheckInValidator,
2078
- ht as EventFeatureConfigOfClaimRewardsValidator,
2079
- kt as EventFeatureConfigOfCommentValidator,
2080
- Ct as EventFeatureConfigOfFollowValidator,
2081
- jt as EventFeatureConfigOfGiftCodeValidator,
2082
- qt as EventFeatureConfigOfInviteValidator,
2083
- St as EventFeatureConfigOfInvitedRegisterValidator,
2084
- Ft as EventFeatureConfigOfLotteryDrawValidator,
2085
- $t as EventFeatureConfigOfLotteryValidator,
2086
- It as EventFeatureConfigOfPreregisterValidator,
2087
- Nt as EventFeatureConfigOfQuestValidator,
2088
- Ot as EventFeatureConfigOfRegisterValidator,
2089
- Mt as EventFeatureConfigOfShareValidator,
2090
- Ht as EventFeatureConfigOfSubscribeValidator,
2091
- Jt as EventFeatureConfigOfSurveyValidator,
2092
- Xt as EventFeatureConfigOfTeamValidator,
2093
- Wt as EventFeatureConfigOfVoteValidator,
2094
- en as EventFeatureConfigValidator,
2095
- et as EventPeriodType,
2096
- tt as EventPeriodTypeValidator,
2073
+ en as EventConfigValidator,
2074
+ pt as EventFeatureConfigOfCashbackValidator,
2075
+ 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,
2093
+ We as EventPeriodType,
2094
+ et as EventPeriodTypeValidator,
2097
2095
  U as EventRewardItemConfigValidator,
2098
- Ae as ExtraGameRewardValidator,
2099
- Ne as ExtraPhysicalShipmentValidator,
2100
- gt as FeatureRewardValidator,
2096
+ Ne as ExtraGameRewardValidator,
2097
+ Ge as ExtraPhysicalShipmentValidator,
2098
+ dt as FeatureRewardValidator,
2101
2099
  c as FeatureType,
2102
- nt as FeatureTypeValidator,
2100
+ tt as FeatureTypeValidator,
2103
2101
  In as ForumMode,
2104
2102
  Gn as ForumModeValidator,
2105
- ae as ForumValidator,
2103
+ oe as ForumValidator,
2106
2104
  R as GamerItemType,
2107
- Z as GamerItemTypeValidator,
2108
- ve as Gender,
2109
- Ce as GenderValidator,
2110
- rn as GiftCodeEngagementDataValidator,
2111
- on as InviteEngagementDataValidator,
2112
- lt as LotteryDrawAction,
2105
+ W as GamerItemTypeValidator,
2106
+ ke as Gender,
2107
+ ve as GenderValidator,
2108
+ nn as GiftCodeEngagementDataValidator,
2109
+ rn as InviteEngagementDataValidator,
2110
+ ut as LotteryDrawAction,
2113
2111
  jr as LotteryDrawActionValidator,
2114
- un as LotteryDrawEngagementDataValidator,
2115
- an as LotteryEngagementDataValidator,
2112
+ cn as LotteryDrawEngagementDataValidator,
2113
+ on as LotteryEngagementDataValidator,
2116
2114
  w as LotteryTicketStatus,
2117
2115
  Rr as LotteryTicketStatusValidator,
2118
2116
  y as NotificationBaseValidator,
@@ -2121,8 +2119,8 @@ export {
2121
2119
  Kn as NotificationCommentReplyValidator,
2122
2120
  Xn as NotificationCommentValidator,
2123
2121
  j as NotificationPayloadCommentValidator,
2124
- I as NotificationPayloadPostValidator,
2125
- G as NotificationPayloadReplyValidator,
2122
+ G as NotificationPayloadPostValidator,
2123
+ N as NotificationPayloadReplyValidator,
2126
2124
  Qn as NotificationPayloadSystemValidator,
2127
2125
  Jn as NotificationPostCommentValidator,
2128
2126
  zn as NotificationPostValidator,
@@ -2132,52 +2130,52 @@ export {
2132
2130
  m as NotificationType,
2133
2131
  On as NotificationTypeValidator,
2134
2132
  Wn as NotificationValidator,
2135
- Ue as PlayerRoleCardValidator,
2136
- J as PlayerRoleValidator,
2133
+ $e as PlayerRoleCardValidator,
2134
+ K as PlayerRoleValidator,
2137
2135
  Nn as PostStatus,
2138
- oe as PostStatusValidator,
2139
- D as PostValidator,
2140
- ln as PreregisterEngagementDataValidator,
2136
+ ie as PostStatusValidator,
2137
+ I as PostValidator,
2138
+ un as PreregisterEngagementDataValidator,
2141
2139
  Mn as PresignedUrlResponseValidator,
2142
- mn as QuestEngagementDataValidator,
2143
- rt as QuestObjective,
2144
- ee as QuestObjectiveValidator,
2140
+ ln as QuestEngagementDataValidator,
2141
+ nt as QuestObjective,
2142
+ te as QuestObjectiveValidator,
2145
2143
  wr as RedeemParamsValidator,
2146
- Oe as RedemptionValidator,
2147
- dt as RegularRewardValidator,
2144
+ Ae as RedemptionValidator,
2145
+ mt as RegularRewardValidator,
2148
2146
  Bn as ReplyToValidator,
2149
2147
  V as ReplyValidator,
2150
2148
  vr as RewardItemType,
2151
- W as RewardItemTypeValidator,
2152
- at as RewardSource,
2149
+ ee as RewardItemTypeValidator,
2150
+ ot as RewardSource,
2153
2151
  $ as RewardSourceValidator,
2154
2152
  g as RewardStatus,
2155
2153
  P as RewardStatusSuffix,
2156
- te as RewardStatusSuffixValidator,
2154
+ ne as RewardStatusSuffixValidator,
2157
2155
  Cr as RewardStatusValidator,
2158
- hn as RewardValidator,
2159
- $e as RoleBaseInfoValidator,
2160
- Ee as ServerBaseInfoValidator,
2161
- dn as ShareEngagementDataValidator,
2162
- pn as SurveyEngagementDataValidator,
2163
- ut as TeamAction,
2156
+ fn as RewardValidator,
2157
+ Ee as RoleBaseInfoValidator,
2158
+ Pe as ServerBaseInfoValidator,
2159
+ mn as ShareEngagementDataValidator,
2160
+ gn as SurveyEngagementDataValidator,
2161
+ ct as TeamAction,
2164
2162
  Vr as TeamActionValidator,
2165
- bn as TeamEngagementDataValidator,
2166
- _n as TeamEngagementValidator,
2163
+ _n as TeamEngagementDataValidator,
2164
+ pn as TeamEngagementValidator,
2167
2165
  Tr as TeamMemberValidator,
2168
- st as TeamVisibility,
2169
- ct as TeamVisibilityValidator,
2170
- F as TopicValidator,
2171
- re as UserEngagementDataValidator,
2172
- ie as UserEngagementValidator,
2166
+ at as TeamVisibility,
2167
+ st as TeamVisibilityValidator,
2168
+ D as TopicValidator,
2169
+ F as UserEngagementDataValidator,
2170
+ wn as UserEngagementValidator,
2173
2171
  vn as UserFeatureStatusValidator,
2174
- ne as UserRewardValidator,
2172
+ re as UserRewardValidator,
2175
2173
  kn as VerifyMobileResultValidator,
2176
- yn as VoteEngagementDataValidator,
2177
- it as VoteOptionSource,
2178
- ot as VoteOptionSourceValidator,
2174
+ bn as VoteEngagementDataValidator,
2175
+ rt as VoteOptionSource,
2176
+ it as VoteOptionSourceValidator,
2179
2177
  Lr as WeixinApi,
2180
- gn as WeixinSubscribeEngagementDataValidator,
2178
+ dn as WeixinSubscribeEngagementDataValidator,
2181
2179
  _r as WeixinWebLoginErrorCode,
2182
2180
  pr as isWeixinSignResponse
2183
2181
  };