@seayoo-web/gamer-api 2.16.2 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { isComboWebView as me } from "@seayoo-web/combo-webview";
2
- import { isPlainObject as y, usePromise as de, useConsole as ge, weixinStorageHelper as pe, localStorageHelper as _e, supportWx as f, pruneURL as be, supportWindow as ye, queryString as L, pruneObject as c, omitFields as U, parseJSON as he, removePara as G } from "@seayoo-web/utils";
3
- import { v as e, objectGuard as i } from "@seayoo-web/validator";
4
- function fe(s) {
5
- return y(s, "gamer_token") && typeof s.gamer_token == "string";
2
+ import { isPlainObject as y, usePromise as de, useConsole as ge, weixinStorageHelper as pe, localStorageHelper as _e, supportWx as h, pruneURL as be, supportWindow as ye, queryString as x, pruneObject as c, omitFields as L, parseJSON as fe, removePara as O } from "@seayoo-web/utils";
3
+ import { v as e, objectGuard as s } from "@seayoo-web/validator";
4
+ function he(a) {
5
+ return y(a, "gamer_token") && typeof a.gamer_token == "string";
6
6
  }
7
- function we(s) {
8
- return y(s, "gamer_token", "game_id") && typeof s.gamer_token == "string" && typeof s.game_id == "string";
7
+ function we(a) {
8
+ return y(a, "gamer_token", "game_id") && typeof a.gamer_token == "string" && typeof a.game_id == "string";
9
9
  }
10
- function O(s) {
11
- return y(s);
10
+ function G(a) {
11
+ return y(a);
12
12
  }
13
13
  ge("GamerApiSDK");
14
- function ke(s) {
15
- return /^\/[a-z\d-]+$/.test(s);
14
+ function ke(a) {
15
+ return /^\/[a-z\d-]+$/.test(a);
16
16
  }
17
17
  async function ve() {
18
- const { promise: s, resolve: t } = de();
18
+ const { promise: a, resolve: t } = de();
19
19
  return wx.login({
20
20
  success(n) {
21
21
  t(n.code);
@@ -23,10 +23,10 @@ async function ve() {
23
23
  fail() {
24
24
  t("");
25
25
  }
26
- }), await s;
26
+ }), await a;
27
27
  }
28
- const h = "gamer_token";
29
- class br {
28
+ const f = "gamer_token";
29
+ class ba {
30
30
  $NetRequest;
31
31
  $idToken = "";
32
32
  $weixinToken = "";
@@ -34,15 +34,15 @@ class br {
34
34
  req;
35
35
  storage;
36
36
  constructor(t, n) {
37
- this.storage = f() ? pe : _e;
38
- const a = ke(t) ? t : `https://${be(t)}`;
37
+ this.storage = h() ? pe : _e;
38
+ const r = ke(t) ? t : `https://${be(t)}`;
39
39
  if (this.$NetRequest = n, this.req = n({
40
- baseURL: `${a}/v1`,
40
+ baseURL: `${r}/v1`,
41
41
  timeout: 1e4,
42
42
  maxRetry: 2,
43
43
  retryInterval: "2EB",
44
- retryResolve({ method: r, status: o }) {
45
- return r === "GET" && o < 0;
44
+ retryResolve({ method: o, status: i }) {
45
+ return o === "GET" && i < 0;
46
46
  },
47
47
  responseRule: {
48
48
  ok: { resolve: "body" },
@@ -53,12 +53,12 @@ class br {
53
53
  }
54
54
  },
55
55
  // 使用箭头函数绑定执行上下文
56
- requestTransformer: (r) => {
57
- this.$gamerToken && (r.headers.Authorization = `Bearer ${this.$gamerToken}`);
56
+ requestTransformer: (o) => {
57
+ this.$gamerToken && (o.headers.Authorization = `Bearer ${this.$gamerToken}`);
58
58
  }
59
59
  }), ye()) {
60
- const r = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = L("gamer_token");
61
- (me() || r && o) && (this.$gamerToken = o);
60
+ const o = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), i = x("gamer_token");
61
+ (me() || o && i) && (this.$gamerToken = i);
62
62
  }
63
63
  this.$gamerToken || this.loadGamerTokenCache();
64
64
  }
@@ -66,15 +66,15 @@ class br {
66
66
  return this.$NetRequest;
67
67
  }
68
68
  loadGamerTokenCache() {
69
- const n = this.storage.get(h).match(/^(\d{12,})#(.{8,})$/);
69
+ const n = this.storage.get(f).match(/^(\d{12,})#(.{8,})$/);
70
70
  if (n) {
71
- const a = parseInt(n[1]), r = n[2];
72
- if (a > Date.now() - (24 * 3600 - 10) * 1e3) {
73
- this.$gamerToken = r;
71
+ const r = parseInt(n[1]), o = n[2];
72
+ if (r > Date.now() - (24 * 3600 - 10) * 1e3) {
73
+ this.$gamerToken = o;
74
74
  return;
75
75
  }
76
76
  }
77
- this.storage.remove(h);
77
+ this.storage.remove(f);
78
78
  }
79
79
  /** 当前是否为登录状态,即是否拥有 gamerToken */
80
80
  get isLoggedIn() {
@@ -108,7 +108,7 @@ class br {
108
108
  * 直接写入 Gamer Token,并更新缓存
109
109
  */
110
110
  set gamerToken(t) {
111
- this.$gamerToken = t, t ? this.storage.set(h, `${Date.now()}#${t}`) : this.storage.remove(h);
111
+ this.$gamerToken = t, t ? this.storage.set(f, `${Date.now()}#${t}`) : this.storage.remove(f);
112
112
  }
113
113
  /**
114
114
  * 退出登录,销毁相关 Token
@@ -135,13 +135,13 @@ class br {
135
135
  async autoLogin() {
136
136
  if (this.gamerToken)
137
137
  return !0;
138
- const t = f();
138
+ const t = h();
139
139
  if (!this.idToken || t && !this.weixinToken)
140
140
  return !1;
141
- const { code: n, data: a } = await this.req.post(
141
+ const { code: n, data: r } = await this.req.post(
142
142
  "login-with-token",
143
143
  c({ id_token: this.idToken, weixin_token: t ? this.weixinToken : null }),
144
- fe,
144
+ he,
145
145
  {
146
146
  message: !1,
147
147
  cacheTTL: 300,
@@ -156,7 +156,7 @@ class br {
156
156
  this.weixinToken = "";
157
157
  break;
158
158
  }
159
- return this.gamerToken = a?.gamer_token || "", !!this.gamerToken;
159
+ return this.gamerToken = r?.gamer_token || "", !!this.gamerToken;
160
160
  }
161
161
  /**
162
162
  * 用于在多租户小程序环境中切换当前 Session 的 game_id。
@@ -164,10 +164,10 @@ class br {
164
164
  * https://www.kdocs.cn/l/cf2mO2uRLqh9?linkname=ifQTBNrckh
165
165
  */
166
166
  async switchGame(t) {
167
- const n = f();
167
+ const n = h();
168
168
  if (!this.idToken || n && !this.weixinToken)
169
169
  return !1;
170
- const { code: a, data: r } = await this.req.post(
170
+ const { code: r, data: o } = await this.req.post(
171
171
  "session/switch-game",
172
172
  c({ game_id: t }),
173
173
  we,
@@ -176,7 +176,7 @@ class br {
176
176
  maxRetry: 2
177
177
  }
178
178
  );
179
- return a === "game_not_allowed" ? !1 : (this.gamerToken = r?.gamer_token || "", !!this.gamerToken);
179
+ return r === "game_not_allowed" ? !1 : (this.gamerToken = o?.gamer_token || "", !!this.gamerToken);
180
180
  }
181
181
  /**
182
182
  * 获取当前登录用户的 Session 的信息
@@ -187,7 +187,7 @@ class br {
187
187
  */
188
188
  async getSession() {
189
189
  if (!await this.autoLogin()) return null;
190
- const { data: t } = await this.req.get("session", O, {
190
+ const { data: t } = await this.req.get("session", G, {
191
191
  message: !1
192
192
  });
193
193
  return t;
@@ -199,7 +199,7 @@ class br {
199
199
  */
200
200
  async authRealName(t) {
201
201
  if (!await this.autoLogin()) return null;
202
- const { data: n } = await this.req.post("auth-real-name", c(t), O);
202
+ const { data: n } = await this.req.post("auth-real-name", c(t), G);
203
203
  return n;
204
204
  }
205
205
  }
@@ -237,7 +237,7 @@ const Re = {
237
237
  Physical: "physical",
238
238
  /** 虚拟商品 */
239
239
  Virtual: "virtual"
240
- }, z = e.string().enum(xe).lock(), Le = {
240
+ }, H = e.string().enum(xe).lock(), Le = {
241
241
  /** 待发放 */
242
242
  Pending: "pending",
243
243
  /** 已发放 */
@@ -271,19 +271,19 @@ const Re = {
271
271
  credit_expiring: e.number(),
272
272
  level_change_time: e.number(),
273
273
  level_expire_time: e.number()
274
- }).lock(), Ee = e.object({
274
+ }).lock(), $e = e.object({
275
275
  server_id: e.string(),
276
276
  server_name: e.string()
277
- }).lock(), $e = e.object({
277
+ }).lock(), Ee = e.object({
278
278
  role_id: e.string(),
279
279
  role_name: e.string()
280
- }).lock(), J = e.object({
281
- ...$e.shape,
280
+ }).lock(), z = e.object({
282
281
  ...Ee.shape,
282
+ ...$e.shape,
283
283
  role_level: e.number(),
284
284
  last_login_time: e.number()
285
285
  }).lock(), Fe = e.object({
286
- ...J.shape,
286
+ ...z.shape,
287
287
  /** 角色战力 */
288
288
  role_fighting: e.number(),
289
289
  /** 宗门 ID */
@@ -304,7 +304,7 @@ const Re = {
304
304
  homepage_image_url: e.string()
305
305
  }).optional()
306
306
  ).optional()
307
- }).lock(), Z = e.object({
307
+ }).lock(), J = e.object({
308
308
  address_id: e.number(),
309
309
  recipient: e.string(),
310
310
  mobile: e.string(),
@@ -326,7 +326,7 @@ const Re = {
326
326
  balance: e.number(),
327
327
  change_time: e.number(),
328
328
  metadata: e.record(e.unknown()).optional()
329
- }).lock(), X = e.object({
329
+ }).lock(), Z = e.object({
330
330
  benefit_id: e.number(),
331
331
  name: e.string(),
332
332
  img_url: e.string(),
@@ -335,11 +335,11 @@ const Re = {
335
335
  max_level: e.number(),
336
336
  product_id: e.number(),
337
337
  tag: e.string()
338
- }).lock(), Y = e.object({
338
+ }).lock(), X = e.object({
339
339
  product_id: e.number(),
340
340
  catalog_id: e.number(),
341
341
  catalog_name: e.string(),
342
- item_type: z,
342
+ item_type: H,
343
343
  name: e.string(),
344
344
  img_url: e.string(),
345
345
  description: e.string(),
@@ -361,10 +361,10 @@ const Re = {
361
361
  created_at: e.number(),
362
362
  updated_at: e.number(),
363
363
  redeemable_quantity: e.number().optional()
364
- }).lock(), Ge = e.object({
365
- ...U(X.shape, "tag"),
366
- product: Y.clone().optional()
367
- }).lock(), yr = e.union(
364
+ }).lock(), Oe = e.object({
365
+ ...L(Z.shape, "tag"),
366
+ product: X.clone().optional()
367
+ }).lock(), ya = e.union(
368
368
  e.object({
369
369
  server_id: e.string(),
370
370
  role_id: e.string()
@@ -372,7 +372,7 @@ const Re = {
372
372
  e.object({
373
373
  address_id: e.number()
374
374
  })
375
- ).satisfies().lock(), Oe = e.object({
375
+ ).satisfies().lock(), Ge = e.object({
376
376
  recipient: e.string(),
377
377
  mobile: e.string(),
378
378
  province: e.string(),
@@ -391,26 +391,26 @@ const Re = {
391
391
  product_id: e.number(),
392
392
  name: e.string(),
393
393
  img_url: e.string(),
394
- item_type: z,
394
+ item_type: H,
395
395
  catalog_id: e.number(),
396
396
  catalog_name: e.string(),
397
397
  quantity: e.number(),
398
398
  amount: e.number(),
399
399
  status: Ue,
400
400
  created_at: e.number(),
401
- extra_data: e.union(Oe.clone(), Ne.clone()).satisfies().optional()
402
- }), Be = e.guard(Se), N = i({ player: Pe }), Me = i({ roles: e.array(J) }), j = i({ role_card: Fe }), Q = e.guard(Ie), B = e.guard(Z), Ke = i({ addresses: e.array(Z) }), He = e.guard(De), ze = i({
401
+ extra_data: e.union(Ge.clone(), Ne.clone()).satisfies().optional()
402
+ }), Be = e.guard(Se), N = s({ player: Pe }), Me = s({ roles: e.array(z) }), j = s({ role_card: Fe }), Q = e.guard(Ie), B = e.guard(J), Ke = s({ addresses: e.array(J) }), He = e.guard(De), ze = s({
403
403
  credit_logs: e.array(Ae),
404
404
  next_token: e.string().optional()
405
- }), Je = i({ products: e.array(Y) }), Ze = i({ benefits: e.array(X) }), Xe = i({ benefit: Ge }), Ye = i({
405
+ }), Je = s({ products: e.array(X) }), Ze = s({ benefits: e.array(Z) }), Xe = s({ benefit: Oe }), Ye = s({
406
406
  redemptions: e.array(Qe),
407
407
  next_token: e.string().optional()
408
- }), We = i({
408
+ }), We = s({
409
409
  existed: e.bool(),
410
410
  image_upload_url: e.string().optional(),
411
411
  image_id: e.string()
412
412
  });
413
- class hr {
413
+ class fa {
414
414
  token;
415
415
  req;
416
416
  constructor(t) {
@@ -433,10 +433,10 @@ class hr {
433
433
  */
434
434
  async getCurrentPlayer(t) {
435
435
  await this.token.autoLogin();
436
- const { data: n, code: a, message: r } = await this.req.get("club/current-player", N, t);
436
+ const { data: n, code: r, message: o } = await this.req.get("club/current-player", N, t);
437
437
  return n?.player ?? {
438
- message: r,
439
- error: a
438
+ message: o,
439
+ error: r
440
440
  };
441
441
  }
442
442
  /**
@@ -446,15 +446,15 @@ class hr {
446
446
  */
447
447
  async linkPlayer(t) {
448
448
  await this.token.autoLogin();
449
- const { data: n, code: a, message: r } = await this.req.post(
449
+ const { data: n, code: r, message: o } = await this.req.post(
450
450
  "club/link-player",
451
451
  { id_token: this.token.idToken },
452
452
  N,
453
453
  t
454
454
  );
455
455
  return n?.player ?? {
456
- message: r,
457
- error: a
456
+ message: o,
457
+ error: r
458
458
  };
459
459
  }
460
460
  /**
@@ -462,13 +462,13 @@ class hr {
462
462
  *
463
463
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=nwu4FiGM9V
464
464
  */
465
- async getRoles(t, n, a) {
465
+ async getRoles(t, n, r) {
466
466
  if (!await this.token.autoLogin()) return [];
467
- const { data: r } = await this.req.get("club/roles", Me, {
468
- ...a,
467
+ const { data: o } = await this.req.get("club/roles", Me, {
468
+ ...r,
469
469
  params: c({ player_id: t, refresh: n })
470
470
  });
471
- return r?.roles || [];
471
+ return o?.roles || [];
472
472
  }
473
473
  /**
474
474
  * 获取俱乐部会员的角色卡片数据
@@ -477,11 +477,11 @@ class hr {
477
477
  */
478
478
  async getRoleCard(t, n) {
479
479
  await this.token.autoLogin();
480
- const { data: a } = await this.req.get("club/role-card", j, {
480
+ const { data: r } = await this.req.get("club/role-card", j, {
481
481
  ...n,
482
482
  params: { member_id: t }
483
483
  });
484
- return a?.role_card ?? null;
484
+ return r?.role_card ?? null;
485
485
  }
486
486
  /**
487
487
  * 设置自己的角色卡片
@@ -490,8 +490,8 @@ class hr {
490
490
  */
491
491
  async setRoleCard(t, n) {
492
492
  if (!await this.token.autoLogin()) return null;
493
- const { data: a } = await this.req.post("club/role-card", t, j, n);
494
- return a?.role_card ?? null;
493
+ const { data: r } = await this.req.post("club/role-card", t, j, n);
494
+ return r?.role_card ?? null;
495
495
  }
496
496
  /**
497
497
  * 强制刷新自己的角色卡片,从游戏内获取最新数据
@@ -510,11 +510,11 @@ class hr {
510
510
  */
511
511
  async getUserProfile(t, n) {
512
512
  await this.token.autoLogin();
513
- const { data: a } = await this.req.get("club/user-profile", Q, {
513
+ const { data: r } = await this.req.get("club/user-profile", Q, {
514
514
  ...n,
515
515
  params: { member_id: t }
516
516
  });
517
- return a;
517
+ return r;
518
518
  }
519
519
  /**
520
520
  * 修改自己的俱乐部用户信息
@@ -525,10 +525,10 @@ class hr {
525
525
  if (Object.keys(t).length === 0)
526
526
  return { error: "OptionIsEmpty", message: "请提供需要修改的信息" };
527
527
  await this.token.autoLogin();
528
- const { data: a, code: r, message: o } = await this.req.post("club/user-profile", t, Q, n);
529
- return a ?? {
530
- message: o,
531
- error: r
528
+ const { data: r, code: o, message: i } = await this.req.post("club/user-profile", t, Q, n);
529
+ return r ?? {
530
+ message: i,
531
+ error: o
532
532
  };
533
533
  }
534
534
  /**
@@ -548,15 +548,15 @@ class hr {
548
548
  */
549
549
  async addAddress(t, n) {
550
550
  if (!await this.token.autoLogin()) return null;
551
- const { data: a, code: r, message: o } = await this.req.post(
551
+ const { data: r, code: o, message: i } = await this.req.post(
552
552
  "/club/add-address",
553
553
  c(t),
554
554
  B,
555
555
  n
556
556
  );
557
- return a ?? {
558
- message: o,
559
- error: r
557
+ return r ?? {
558
+ message: i,
559
+ error: o
560
560
  };
561
561
  }
562
562
  /**
@@ -566,15 +566,15 @@ class hr {
566
566
  */
567
567
  async updateAddress(t, n) {
568
568
  await this.token.autoLogin();
569
- const { data: a, code: r, message: o } = await this.req.post(
569
+ const { data: r, code: o, message: i } = await this.req.post(
570
570
  "club/update-address",
571
571
  c(t),
572
572
  B,
573
573
  n
574
574
  );
575
- return a ?? {
576
- message: o,
577
- error: r
575
+ return r ?? {
576
+ message: i,
577
+ error: o
578
578
  };
579
579
  }
580
580
  /**
@@ -584,8 +584,8 @@ class hr {
584
584
  */
585
585
  async deleteAddress(t, n) {
586
586
  if (!await this.token.autoLogin()) return null;
587
- const { ok: a } = await this.req.post("club/delete-address", { address_id: t }, null, n);
588
- return a;
587
+ const { ok: r } = await this.req.post("club/delete-address", { address_id: t }, null, n);
588
+ return r;
589
589
  }
590
590
  /**
591
591
  * 获取俱乐部积分统计信息
@@ -594,13 +594,13 @@ class hr {
594
594
  */
595
595
  async getUserCredit(t, n) {
596
596
  await this.token.autoLogin();
597
- const { data: a, code: r, message: o } = await this.req.get("club/user-credit", He, {
597
+ const { data: r, code: o, message: i } = await this.req.get("club/user-credit", He, {
598
598
  ...n,
599
599
  params: c(t)
600
600
  });
601
- return a ?? {
602
- message: o,
603
- error: r
601
+ return r ?? {
602
+ message: i,
603
+ error: o
604
604
  };
605
605
  }
606
606
  /**
@@ -610,13 +610,13 @@ class hr {
610
610
  */
611
611
  async getCreditLogs(t, n) {
612
612
  await this.token.autoLogin();
613
- const { data: a } = await this.req.get("club/credit-logs", ze, {
613
+ const { data: r } = await this.req.get("club/credit-logs", ze, {
614
614
  ...n,
615
615
  params: c({ max_results: 20, ...t })
616
616
  });
617
617
  return {
618
- credit_logs: a?.credit_logs || [],
619
- next_token: a?.next_token
618
+ credit_logs: r?.credit_logs || [],
619
+ next_token: r?.next_token
620
620
  };
621
621
  }
622
622
  /**
@@ -636,11 +636,11 @@ class hr {
636
636
  */
637
637
  async getBenefit(t, n) {
638
638
  if (!await this.token.autoLogin()) return null;
639
- const { data: a } = await this.req.get("club/benefit", Xe, {
639
+ const { data: r } = await this.req.get("club/benefit", Xe, {
640
640
  ...n,
641
641
  params: { benefit_id: t }
642
642
  });
643
- return a?.benefit || null;
643
+ return r?.benefit || null;
644
644
  }
645
645
  /**
646
646
  * 获取商城商品列表
@@ -649,11 +649,11 @@ class hr {
649
649
  */
650
650
  async getProducts(t, n) {
651
651
  await this.token.autoLogin();
652
- const { data: a } = await this.req.get("club/products", Je, {
652
+ const { data: r } = await this.req.get("club/products", Je, {
653
653
  ...n,
654
654
  params: t
655
655
  });
656
- return a?.products || [];
656
+ return r?.products || [];
657
657
  }
658
658
  /**
659
659
  * 兑换商城商品
@@ -662,10 +662,10 @@ class hr {
662
662
  */
663
663
  async redeemProduct(t, n) {
664
664
  await this.token.autoLogin();
665
- const { ok: a, code: r, message: o } = await this.req.post("club/redeem-product", c(t), null, n);
666
- return a || {
667
- message: o,
668
- error: r
665
+ const { ok: r, code: o, message: i } = await this.req.post("club/redeem-product", c(t), null, n);
666
+ return r || {
667
+ message: i,
668
+ error: o
669
669
  };
670
670
  }
671
671
  /**
@@ -675,13 +675,13 @@ class hr {
675
675
  */
676
676
  async getRedemptions(t, n) {
677
677
  await this.token.autoLogin();
678
- const { data: a } = await this.req.get("club/redemptions", Ye, {
678
+ const { data: r } = await this.req.get("club/redemptions", Ye, {
679
679
  ...n,
680
680
  params: c({ max_results: 20, ...t })
681
681
  });
682
682
  return {
683
- redemptions: a?.redemptions || [],
684
- next_token: a?.next_token
683
+ redemptions: r?.redemptions || [],
684
+ next_token: r?.next_token
685
685
  };
686
686
  }
687
687
  /**
@@ -691,18 +691,38 @@ class hr {
691
691
  */
692
692
  async clubUploadImage(t, n) {
693
693
  await this.token.autoLogin();
694
- const { data: a, code: r, message: o } = await this.req.post(
694
+ const { data: r, code: o, message: i } = await this.req.post(
695
695
  "club/image-upload-url",
696
696
  c(t),
697
697
  We,
698
698
  n
699
699
  );
700
- return a ?? {
701
- message: o,
702
- error: r
700
+ return r ?? {
701
+ message: i,
702
+ error: o
703
703
  };
704
704
  }
705
705
  }
706
+ class ha {
707
+ token;
708
+ req;
709
+ $event = 0;
710
+ get event() {
711
+ return this.$event;
712
+ }
713
+ constructor(t, n) {
714
+ this.$event = +n, this.token = t, this.req = t.req;
715
+ }
716
+ /**
717
+ * 绑定指定的方法到当前实例上
718
+ */
719
+ bind(t) {
720
+ const n = this;
721
+ for (const [r, o] of Object.entries(t))
722
+ n[r] = o.bind(this);
723
+ return n;
724
+ }
725
+ }
706
726
  const v = {
707
727
  /** 活动道具 */
708
728
  EventItem: "event_item",
@@ -726,7 +746,7 @@ const v = {
726
746
  ExternalCode: "external_gift_code",
727
747
  /** 空奖励 */
728
748
  VoidItem: "void_item"
729
- }, W = e.string().enum(v).lock(), fr = v, ee = W, et = {
749
+ }, Y = e.string().enum(v).lock(), wa = v, W = Y, et = {
730
750
  /** 世游通行证 ID / Combo ID */
731
751
  UserId: "user_id",
732
752
  /** 游戏角色 ID */
@@ -736,7 +756,7 @@ const v = {
736
756
  Daily: "daily",
737
757
  Weekly: "weekly",
738
758
  Monthly: "monthly"
739
- }, at = e.string().enum(nt).lock(), u = {
759
+ }, rt = e.string().enum(nt).lock(), u = {
740
760
  /** 预约 */
741
761
  Preregister: "preregister",
742
762
  /** 抽奖 */
@@ -785,7 +805,7 @@ const v = {
785
805
  UgcLike: "ugc_like",
786
806
  /** 兑换 */
787
807
  Redeem: "redeem"
788
- }, rt = e.string().enum(u).lock(), ot = {
808
+ }, at = e.string().enum(u).lock(), ot = {
789
809
  /** 累计游戏内活跃值 */
790
810
  Active: "player_active_points",
791
811
  /** 累计登录,单位 人天 */
@@ -814,14 +834,14 @@ const v = {
814
834
  OrderAmountInPayCenter: "order_seayoo_web_total_amount",
815
835
  /** 组队进度 */
816
836
  TeamSize: "team_size"
817
- }, te = e.string().enum(ot).lock(), it = {
837
+ }, ee = e.string().enum(ot).lock(), it = {
818
838
  /** 官方上传 */
819
839
  System: "system",
820
840
  /** 用户投稿 */
821
841
  UserSubmission: "user_submission",
822
842
  /** 投票入围 */
823
843
  Shortlisted: "shortlisted"
824
- }, st = e.string().enum(it).lock(), b = {
844
+ }, st = e.string().enum(it).lock(), _ = {
825
845
  /** 未获得奖励 */
826
846
  Ineligible: "ineligible",
827
847
  /** 奖励未领取 */
@@ -832,23 +852,23 @@ const v = {
832
852
  Failed: "failed",
833
853
  /** 奖励已发货 */
834
854
  Delivered: "delivered"
835
- }, ne = e.string().enum(b).lock(), ct = {
855
+ }, te = e.string().enum(_).lock(), ct = {
836
856
  /** 未获得奖励 */
837
- Ineligible: b.Ineligible,
857
+ Ineligible: _.Ineligible,
838
858
  /** 奖励未领取 */
839
- Unclaimed: b.Unclaimed,
859
+ Unclaimed: _.Unclaimed,
840
860
  /** 奖励已领取 */
841
- Received: b.Received,
861
+ Received: _.Received,
842
862
  /** 奖励发放失败 */
843
- Failed: b.Failed,
863
+ Failed: _.Failed,
844
864
  /** 奖励已发货 */
845
- Delivered: b.Delivered
846
- }, S = e.string().enum(ct).lock(), ut = {
865
+ Delivered: _.Delivered
866
+ }, U = e.string().enum(ct).lock(), ut = {
847
867
  /** 玩法产出奖励 */
848
868
  Output: "output",
849
869
  /** 玩法参与奖励 */
850
870
  Engage: "engage"
851
- }, P = e.string().enum(ut).lock(), lt = {
871
+ }, S = e.string().enum(ut).lock(), lt = {
852
872
  /** 私有队伍 */
853
873
  Private: "private",
854
874
  /** 公开队伍 */
@@ -864,7 +884,7 @@ const v = {
864
884
  Claimed: "claimed",
865
885
  /** 领奖失败 */
866
886
  Fail: "fail"
867
- }, wr = e.string().enum(w).lock(), dt = {
887
+ }, ka = e.string().enum(w).lock(), dt = {
868
888
  /** 发起组队 */
869
889
  Assemble: "assemble",
870
890
  /** 加入队伍 */
@@ -875,14 +895,14 @@ const v = {
875
895
  ChangeVisibility: "change_visibility",
876
896
  /** 查询组队信息 */
877
897
  Query: "query"
878
- }, kr = e.string().enum(dt).lock(), gt = {
898
+ }, va = e.string().enum(dt).lock(), gt = {
879
899
  /** 查询抽奖券 */
880
900
  Query: "query",
881
901
  /** 开奖 */
882
902
  Draw: "draw",
883
903
  /** 领奖 */
884
904
  Claim: "claim"
885
- }, vr = e.string().enum(gt).lock(), pt = {
905
+ }, Ra = e.string().enum(gt).lock(), pt = {
886
906
  /** 将所有队员的进度值求和,作为队伍进度值 */
887
907
  Sum: "sum",
888
908
  /** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
@@ -894,7 +914,7 @@ const v = {
894
914
  Winner: "winner",
895
915
  /** 安慰奖励 */
896
916
  Consolation: "consolation"
897
- }, yt = e.string().enum(bt).lock(), ht = {
917
+ }, yt = e.string().enum(bt).lock(), ft = {
898
918
  /** 抖音 */
899
919
  Douyin: "douyin",
900
920
  /** 小红书 */
@@ -909,14 +929,14 @@ const v = {
909
929
  Huya: "huya",
910
930
  /** 斗鱼 */
911
931
  Douyu: "douyu"
912
- }, E = e.string().enum(ht).lock(), ft = {
932
+ }, P = e.string().enum(ft).lock(), ht = {
913
933
  /** 已提交 */
914
934
  Submitted: "submitted",
915
935
  /** 已接收 */
916
936
  Accepted: "accepted",
917
937
  /** 已拒绝 */
918
938
  Rejected: "rejected"
919
- }, wt = e.string().enum(ft).lock(), kt = e.string().enum(v), p = e.object({
939
+ }, wt = e.string().enum(ht).lock(), kt = e.string().enum(v), g = e.object({
920
940
  reward_item_id: e.number(),
921
941
  reward_amount: e.number(),
922
942
  reward_item_name: e.string(),
@@ -926,11 +946,11 @@ const v = {
926
946
  reward_item_rating: e.number()
927
947
  }).lock(), vt = e.object({
928
948
  engage_count: e.number(),
929
- rewards: e.array(p)
949
+ rewards: e.array(g)
930
950
  }).lock(), Rt = e.union(
931
951
  e.object({
932
952
  feature_reward_type: e.string().enum("every"),
933
- reward_details: e.array(p)
953
+ reward_details: e.array(g)
934
954
  }),
935
955
  e.object({
936
956
  feature_reward_type: e.string().enum("regular"),
@@ -940,7 +960,7 @@ const v = {
940
960
  feature_name: e.string(),
941
961
  feature_id: e.number(),
942
962
  description: e.string(),
943
- cycle: at,
963
+ cycle: rt,
944
964
  cycle_limit: e.number(),
945
965
  limit: e.number(),
946
966
  since: e.number(),
@@ -973,9 +993,9 @@ const v = {
973
993
  comments: e.array(e.string()),
974
994
  send_rate: e.number()
975
995
  })
976
- }), Et = u.Follow, $t = e.object({
996
+ }), $t = u.Follow, Et = e.object({
977
997
  ...l.shape,
978
- feature_type: e.string().enum(Et),
998
+ feature_type: e.string().enum($t),
979
999
  config: e.object({
980
1000
  platform: e.string(),
981
1001
  platform_icon: e.string().optional(),
@@ -995,16 +1015,16 @@ const v = {
995
1015
  mp_url: e.string().optional(),
996
1016
  mp_qrcode_url: e.string().optional()
997
1017
  })
998
- }), At = u.Invite, Gt = e.object({
1018
+ }), At = u.Invite, Ot = e.object({
999
1019
  ...l.shape,
1000
1020
  feature_type: e.string().enum(At),
1001
1021
  config: e.object({
1002
1022
  share_url: e.string()
1003
1023
  })
1004
- }), Ot = u.InvitedRegister, Nt = e.object({
1024
+ }), Gt = u.InvitedRegister, Nt = e.object({
1005
1025
  ...l.shape,
1006
- feature_type: e.string().enum(Ot)
1007
- }), Qt = e.string().enum(U(v, "GiftCode", "LotteryTicket")), Bt = u.Lottery, Mt = e.object({
1026
+ feature_type: e.string().enum(Gt)
1027
+ }), Qt = e.string().enum(L(v, "GiftCode", "LotteryTicket")), Bt = u.Lottery, Mt = e.object({
1008
1028
  reward_item_id: e.number(),
1009
1029
  reward_item_name: e.string(),
1010
1030
  reward_item_type: Qt,
@@ -1038,7 +1058,7 @@ const v = {
1038
1058
  ...l.shape,
1039
1059
  feature_type: e.string().enum(Xt),
1040
1060
  config: e.object({
1041
- objective: te,
1061
+ objective: ee,
1042
1062
  completion_value: e.number(),
1043
1063
  team: e.object({
1044
1064
  feature_id: e.number().optional(),
@@ -1056,7 +1076,7 @@ const v = {
1056
1076
  }), Wt = u.Redeem, en = e.object({
1057
1077
  price: e.number(),
1058
1078
  per_user_limit: e.number(),
1059
- item: p
1079
+ item: g
1060
1080
  }), tn = e.object({
1061
1081
  ...l.shape,
1062
1082
  feature_type: e.string().enum(Wt),
@@ -1064,12 +1084,12 @@ const v = {
1064
1084
  event_item_id: e.number(),
1065
1085
  redeem_catalog: e.array(en)
1066
1086
  })
1067
- }), nn = u.Register, an = e.object({
1087
+ }), nn = u.Register, rn = e.object({
1068
1088
  ...l.shape,
1069
1089
  feature_type: e.string().enum(nn)
1070
- }), rn = u.Share, on = e.object({
1090
+ }), an = u.Share, on = e.object({
1071
1091
  ...l.shape,
1072
- feature_type: e.string().enum(rn),
1092
+ feature_type: e.string().enum(an),
1073
1093
  config: e.object({
1074
1094
  share_platform: e.string(),
1075
1095
  jump_url: e.string().optional(),
@@ -1100,7 +1120,7 @@ const v = {
1100
1120
  feature_type: e.string().enum(gn),
1101
1121
  config: e.object({
1102
1122
  allowed_social_medias: e.array(e.string()).optional(),
1103
- acceptance_rewards: e.array(p).optional()
1123
+ acceptance_rewards: e.array(g).optional()
1104
1124
  })
1105
1125
  }), _n = u.UgcLike, bn = e.object({
1106
1126
  ...l.shape,
@@ -1108,7 +1128,7 @@ const v = {
1108
1128
  config: e.object({
1109
1129
  ugc_feature_id: e.number()
1110
1130
  })
1111
- }), yn = u.Vote, hn = e.object({
1131
+ }), yn = u.Vote, fn = e.object({
1112
1132
  sn: e.string(),
1113
1133
  name: e.string(),
1114
1134
  img_urls: e.array(e.string()).optional(),
@@ -1118,7 +1138,7 @@ const v = {
1118
1138
  amount: e.number(),
1119
1139
  finalists: e.bool(),
1120
1140
  last_vote_time: e.number()
1121
- }), fn = e.object({
1141
+ }), hn = e.object({
1122
1142
  ...l.shape,
1123
1143
  feature_type: e.string().enum(yn),
1124
1144
  config: e.object({
@@ -1126,119 +1146,64 @@ const v = {
1126
1146
  submission_feature_ids: e.array(e.number()),
1127
1147
  finalists_amount: e.number(),
1128
1148
  source: st,
1129
- options: e.array(hn),
1130
- rewards: e.array(p)
1131
- })
1132
- }), wn = u.Vote2, kn = e.object({
1133
- candidate_id: e.string(),
1134
- display_name: e.string(),
1135
- images: e.array(e.string()).optional(),
1136
- videos: e.array(e.string()).optional(),
1137
- description: e.string().optional(),
1138
- jump_url: e.string()
1139
- }), vn = e.object({
1140
- ...l.shape,
1141
- feature_type: e.string().enum(wn),
1142
- config: e.object({
1143
- vote_item_id: e.number().optional(),
1144
- candidates: e.array(kn),
1145
- vote_since: e.number(),
1146
- vote_until: e.number(),
1147
- rewards_since: e.number(),
1148
- rewards_until: e.number(),
1149
- winner_rewards: e.array(p).optional(),
1150
- consolation_rewards: e.array(p).optional()
1149
+ options: e.array(fn),
1150
+ rewards: e.array(g)
1151
1151
  })
1152
- }), Rn = u.ZeroChatgpt, Cn = e.object({
1153
- ...l.shape,
1154
- feature_type: e.string().enum(Rn)
1155
- }), Vn = e.union(
1156
- Vt,
1157
- Tt,
1158
- Ut,
1159
- Pt,
1160
- $t,
1161
- Dt,
1162
- Gt,
1163
- Nt,
1164
- Kt,
1165
- zt,
1166
- Zt,
1167
- Yt,
1168
- an,
1169
- on,
1170
- cn,
1171
- ln,
1172
- dn,
1173
- fn,
1174
- vn,
1175
- xt,
1176
- Cn,
1177
- pn,
1178
- bn,
1179
- tn
1180
- ).key("feature_type").satisfies(), jn = e.object({
1181
- event_name: e.string(),
1182
- rules: e.string(),
1183
- since: e.number(),
1184
- until: e.number(),
1185
- visit_count: e.number().optional(),
1186
- features: e.array(Vn)
1187
- }).lock(), T = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ae = e.object({
1152
+ }), T = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ne = e.object({
1188
1153
  order_total_amount: T,
1189
1154
  cashback_total_amount: T,
1190
1155
  game_item_count: T
1191
- }), Tn = e.object({
1156
+ }), wn = e.object({
1192
1157
  activation_key: e.string().disallow("")
1193
- }), qn = e.object({
1158
+ }), kn = e.object({
1194
1159
  gift_code: e.string()
1195
- }), xn = e.object({
1160
+ }), vn = e.object({
1196
1161
  user_id: e.string(),
1197
1162
  name: e.string().optional(),
1198
1163
  avatar_url: e.string().optional()
1199
- }), Ln = e.object({
1164
+ }), Rn = e.object({
1200
1165
  lottery_count: e.number()
1201
1166
  }), R = e.object({
1202
1167
  reward_id: e.number(),
1203
1168
  reward_item_id: e.number(),
1204
- reward_source: P,
1169
+ reward_source: S,
1205
1170
  reward_item_name: e.string(),
1206
- reward_item_type: W,
1171
+ reward_item_type: Y,
1207
1172
  reward_item_icon_url: e.string(),
1208
1173
  reward_item_desc: e.string().optional(),
1209
1174
  reward_item_rating: e.number(),
1210
1175
  reward_amount: e.number(),
1211
- reward_status: S,
1176
+ reward_status: U,
1212
1177
  event_id: e.number(),
1213
1178
  event_name: e.string(),
1214
1179
  feature_id: e.number(),
1215
1180
  engagement_id: e.number(),
1216
- feature_type: rt,
1181
+ feature_type: at,
1217
1182
  receive_time: e.number(),
1218
1183
  extra_data: e.record(e.unknown()).optional()
1219
- }), Un = e.string().enum(w.Unknown, w.Pending), Sn = e.union(
1184
+ }), Cn = e.string().enum(w.Unknown, w.Pending), Vn = e.union(
1220
1185
  e.object({
1221
1186
  ticket: e.string(),
1222
- status: Un,
1187
+ status: Cn,
1223
1188
  created_at: e.number()
1224
1189
  }),
1225
1190
  e.object({
1226
1191
  ticket: e.string(),
1227
- status: e.string().enum(U(w, "Unknown", "Pending")),
1192
+ status: e.string().enum(L(w, "Unknown", "Pending")),
1228
1193
  created_at: e.number(),
1229
1194
  reward: R
1230
1195
  })
1231
- ).satisfies(), Pn = e.object({
1232
- tickets: e.array(Sn)
1233
- }), En = e.object({
1196
+ ).satisfies(), jn = e.object({
1197
+ tickets: e.array(Vn)
1198
+ }), Tn = e.object({
1234
1199
  platforms: e.array(e.string())
1235
1200
  }), re = e.object({
1236
1201
  role_name: e.string(),
1237
1202
  is_leader: e.bool(),
1238
1203
  is_myself: e.bool().optional(),
1239
1204
  progress: e.number().optional()
1240
- }).lock(), $n = e.object({
1241
- objective: te,
1205
+ }).lock(), qn = e.object({
1206
+ objective: ee,
1242
1207
  progress: e.number(),
1243
1208
  completion_value: e.number().optional(),
1244
1209
  team: e.object({
@@ -1246,17 +1211,17 @@ const v = {
1246
1211
  completion_value: e.number().optional(),
1247
1212
  players: e.array(re)
1248
1213
  }).optional()
1249
- }), Fn = e.object({
1214
+ }), xn = e.object({
1250
1215
  progress: e.number(),
1251
1216
  team: e.object({
1252
1217
  progress: e.number(),
1253
1218
  team_members: e.array(re).optional()
1254
1219
  }).optional()
1255
- }), In = e.object({
1220
+ }), Ln = e.object({
1256
1221
  item_id: e.number(),
1257
1222
  item_count: e.number(),
1258
1223
  redeem_count: e.number()
1259
- }), Dn = e.object({
1224
+ }), Un = e.object({
1260
1225
  item_stocks: e.array(
1261
1226
  e.object({
1262
1227
  item_id: e.number(),
@@ -1264,23 +1229,23 @@ const v = {
1264
1229
  user_limit: e.number()
1265
1230
  })
1266
1231
  )
1267
- }), An = e.object({
1268
- platform: e.string()
1269
- }), Gn = e.object({
1232
+ }), Sn = e.object({
1233
+ platform: e.string().optional()
1234
+ }), Pn = e.object({
1270
1235
  weixin_openid: e.string()
1271
- }), On = e.object({
1236
+ }), $n = e.object({
1272
1237
  serial_number: e.number()
1273
- }), Nn = e.object({
1238
+ }), En = e.object({
1274
1239
  team_code: e.string(),
1275
1240
  leader_name: e.string(),
1276
1241
  total_members: e.number()
1277
- }), Rr = e.object({
1242
+ }), Ca = e.object({
1278
1243
  is_leader: e.bool(),
1279
1244
  is_myself: e.bool().optional(),
1280
1245
  role_name: e.string(),
1281
1246
  server_name: e.string(),
1282
1247
  avatar_url: e.string().optional()
1283
- }), Qn = e.object({
1248
+ }), Fn = e.object({
1284
1249
  team_code: e.string(),
1285
1250
  visibility: mt,
1286
1251
  members: e.array(
@@ -1290,14 +1255,14 @@ const v = {
1290
1255
  server_name: e.string()
1291
1256
  })
1292
1257
  )
1293
- }), Bn = e.object({
1258
+ }), In = e.object({
1294
1259
  ugc_id: e.number(),
1295
1260
  title: e.string(),
1296
1261
  content: e.string().optional(),
1297
1262
  image_urls: e.array(e.string()).optional(),
1298
- social_media: E.clone().optional(),
1263
+ social_media: P.clone().optional(),
1299
1264
  social_media_url: e.string().optional()
1300
- }), Mn = e.object({
1265
+ }), Dn = e.object({
1301
1266
  ugcs: e.array(
1302
1267
  e.object({
1303
1268
  ugc_id: e.number(),
@@ -1306,7 +1271,7 @@ const v = {
1306
1271
  title: e.string(),
1307
1272
  content: e.string().optional(),
1308
1273
  image_urls: e.array(e.string()).optional(),
1309
- social_media: E.clone().optional(),
1274
+ social_media: P.clone().optional(),
1310
1275
  social_media_url: e.string().optional(),
1311
1276
  server_id: e.number().optional(),
1312
1277
  server_name: e.string().optional(),
@@ -1317,7 +1282,7 @@ const v = {
1317
1282
  })
1318
1283
  ).optional(),
1319
1284
  next_token: e.string().optional()
1320
- }), Kn = e.object({
1285
+ }), An = e.object({
1321
1286
  ugcs: e.array(
1322
1287
  e.object({
1323
1288
  ugc_id: e.number(),
@@ -1329,7 +1294,7 @@ const v = {
1329
1294
  title: e.string(),
1330
1295
  content: e.string().optional(),
1331
1296
  image_urls: e.array(e.string()).optional(),
1332
- social_media: E.clone().optional(),
1297
+ social_media: P.clone().optional(),
1333
1298
  social_media_url: e.string().optional(),
1334
1299
  server_id: e.number().optional(),
1335
1300
  server_name: e.string().optional(),
@@ -1340,13 +1305,13 @@ const v = {
1340
1305
  })
1341
1306
  ).optional(),
1342
1307
  next_token: e.string().optional()
1343
- }), Hn = e.object({
1308
+ }), On = e.object({
1344
1309
  total_count: e.number()
1345
- }), zn = e.object({
1310
+ }), Gn = e.object({
1346
1311
  existed: e.bool(),
1347
1312
  upload_url: e.string().optional(),
1348
1313
  image_url: e.string()
1349
- }), Jn = e.object({
1314
+ }), Nn = e.object({
1350
1315
  ugcs: e.array(
1351
1316
  e.object({
1352
1317
  ugc_id: e.number(),
@@ -1359,27 +1324,27 @@ const v = {
1359
1324
  role_name: e.string().optional()
1360
1325
  })
1361
1326
  ).optional()
1362
- }), Zn = e.object({
1327
+ }), Qn = e.object({
1363
1328
  option_sn: e.string()
1364
- }), Xn = e.object({
1329
+ }), Bn = e.object({
1365
1330
  candidate_id: e.string(),
1366
1331
  total_votes: e.number().optional(),
1367
1332
  my_votes: e.number().optional(),
1368
1333
  votes: e.number().optional()
1369
- }), Yn = e.object({
1334
+ }), Mn = e.object({
1370
1335
  rewards_type: yt,
1371
1336
  rewards: e.array(R).optional()
1372
- }), Wn = e.object({
1337
+ }), Kn = e.object({
1373
1338
  candidate_id: e.string(),
1374
1339
  is_winner: e.bool(),
1375
1340
  total_votes: e.number(),
1376
1341
  my_votes: e.number()
1377
- }), ea = e.object({
1342
+ }), Hn = e.object({
1378
1343
  role: e.string(),
1379
1344
  content: e.string()
1380
- }), ta = e.object({
1381
- conversations: e.array(ea)
1382
- }), na = e.object({
1345
+ }), zn = e.object({
1346
+ conversations: e.array(Hn)
1347
+ }), Jn = e.object({
1383
1348
  user_id: e.string(),
1384
1349
  name: e.string(),
1385
1350
  avatar_url: e.string(),
@@ -1387,53 +1352,53 @@ const v = {
1387
1352
  video_note: e.number(),
1388
1353
  created_at: e.number()
1389
1354
  }), $ = e.union(
1390
- En,
1391
- Ln,
1392
- On,
1393
- xn,
1394
- An,
1395
- Zn,
1396
- Xn,
1397
- Gn,
1398
- ae,
1399
- qn,
1400
- Qn,
1401
- $n,
1402
- Pn,
1403
1355
  Tn,
1404
- ta,
1356
+ Rn,
1357
+ $n,
1358
+ vn,
1359
+ Sn,
1360
+ Qn,
1405
1361
  Bn,
1362
+ Pn,
1363
+ ne,
1364
+ kn,
1365
+ Fn,
1366
+ qn,
1367
+ jn,
1368
+ wn,
1369
+ zn,
1406
1370
  In,
1371
+ Ln,
1407
1372
  e.custom(
1408
1373
  "EmptyObject",
1409
- (s) => y(s) && Object.keys(s).length === 0
1374
+ (a) => y(a) && Object.keys(a).length === 0
1410
1375
  )
1411
- ).satisfies().lock(), aa = e.object({
1376
+ ).satisfies().lock(), Zn = e.object({
1412
1377
  reward_id: e.number(),
1413
1378
  reward_item_id: e.number(),
1414
- reward_item_type: ee,
1379
+ reward_item_type: W,
1415
1380
  reward_count: e.number(),
1416
- reward_status: ne,
1417
- reward_source: P,
1381
+ reward_status: te,
1382
+ reward_source: S,
1418
1383
  reward_item_name: e.string(),
1419
1384
  reward_item_icon_url: e.string(),
1420
1385
  reward_item_desc: e.string().optional(),
1421
1386
  reward_item_rating: e.number(),
1422
1387
  receive_time: e.number(),
1423
1388
  extra_data: e.union(...$.validators, e.record(e.unknown())).satisfies().optional()
1424
- }), ra = e.object({
1389
+ }), Xn = e.object({
1425
1390
  reward_id: e.number(),
1426
1391
  reward_item_id: e.number(),
1427
1392
  reward_item_name: e.string(),
1428
- reward_item_type: ee,
1393
+ reward_item_type: W,
1429
1394
  reward_item_icon_url: e.string(),
1430
1395
  reward_item_desc: e.string().optional(),
1431
1396
  reward_item_rating: e.number(),
1432
1397
  reward_amount: e.number(),
1433
- reward_status: ne,
1434
- reward_source: P,
1398
+ reward_status: te,
1399
+ reward_source: S,
1435
1400
  extra_data: e.record(e.unknown()).optional()
1436
- }), oa = e.object({
1401
+ }), Yn = e.object({
1437
1402
  engagement_id: e.number(),
1438
1403
  user_id: e.string(),
1439
1404
  event_id: e.number(),
@@ -1443,18 +1408,18 @@ const v = {
1443
1408
  server_id: e.string().optional(),
1444
1409
  role_id: e.string().optional(),
1445
1410
  created_at: e.number(),
1446
- rewards: e.array(aa).optional()
1447
- }).lock(), ia = e.object({
1411
+ rewards: e.array(Zn).optional()
1412
+ }).lock(), Wn = e.object({
1448
1413
  allowed: e.bool(),
1449
1414
  registered: e.bool()
1450
- }), sa = e.object({
1415
+ }), er = e.object({
1451
1416
  feature_id: e.number(),
1452
1417
  can_engage: e.bool(),
1453
1418
  has_unclaimed_rewards: e.bool(),
1454
1419
  final_available_count: e.number(),
1455
1420
  total_remaining_engagements: e.number(),
1456
1421
  cycle_remaining_engagements: e.number()
1457
- }), ca = e.object({
1422
+ }), tr = e.object({
1458
1423
  engagement_id: e.number(),
1459
1424
  engagement: e.object({
1460
1425
  engagement_id: e.number(),
@@ -1462,617 +1427,475 @@ const v = {
1462
1427
  feature_id: e.number(),
1463
1428
  data: $.clone().optional()
1464
1429
  }).optional(),
1465
- rewards: e.array(ra).optional(),
1430
+ rewards: e.array(Xn).optional(),
1466
1431
  scan: e.bool().optional()
1467
- }), ua = e.object({
1432
+ }), nr = e.object({
1468
1433
  reward_id: e.number(),
1469
- reward_status: S
1470
- }), la = e.guard(jn), ma = e.guard(ia), q = i({ count: e.number() }), da = i({ first_visit: e.bool() }), ga = i({
1471
- engagements: e.union(e.array(na), e.array(Nn))
1472
- }), pa = i({
1473
- status: e.array(sa)
1474
- }), _a = i({
1434
+ reward_status: U
1435
+ }), rr = u.Vote2, ar = e.object({
1436
+ candidate_id: e.string(),
1437
+ display_name: e.string(),
1438
+ images: e.array(e.string()).optional(),
1439
+ videos: e.array(e.string()).optional(),
1440
+ description: e.string().optional(),
1441
+ jump_url: e.string()
1442
+ }), or = e.object({
1443
+ ...l.shape,
1444
+ feature_type: e.string().enum(rr),
1445
+ config: e.object({
1446
+ vote_item_id: e.number().optional(),
1447
+ candidates: e.array(ar),
1448
+ vote_since: e.number(),
1449
+ vote_until: e.number(),
1450
+ rewards_since: e.number(),
1451
+ rewards_until: e.number(),
1452
+ winner_rewards: e.array(g).optional(),
1453
+ consolation_rewards: e.array(g).optional()
1454
+ })
1455
+ }), ir = u.ZeroChatgpt, sr = e.object({
1456
+ ...l.shape,
1457
+ feature_type: e.string().enum(ir)
1458
+ }), cr = e.union(
1459
+ Vt,
1460
+ Tt,
1461
+ Ut,
1462
+ Pt,
1463
+ Et,
1464
+ Dt,
1465
+ Ot,
1466
+ Nt,
1467
+ Kt,
1468
+ zt,
1469
+ Zt,
1470
+ Yt,
1471
+ rn,
1472
+ on,
1473
+ cn,
1474
+ ln,
1475
+ dn,
1476
+ hn,
1477
+ or,
1478
+ xt,
1479
+ sr,
1480
+ pn,
1481
+ bn,
1482
+ tn
1483
+ ).key("feature_type").satisfies(), ur = e.object({
1484
+ event_name: e.string(),
1485
+ rules: e.string(),
1486
+ since: e.number(),
1487
+ until: e.number(),
1488
+ visit_count: e.number().optional(),
1489
+ features: e.array(cr)
1490
+ }).lock(), lr = e.guard(ur), mr = e.guard(Wn), E = s({ count: e.number() }), dr = s({ first_visit: e.bool() }), gr = s({
1491
+ engagements: e.union(e.array(Jn), e.array(En))
1492
+ }), pr = s({
1493
+ status: e.array(er)
1494
+ }), _r = s({
1475
1495
  engagements_counts: e.record(e.number())
1476
- }), ba = i({
1477
- engagements: e.array(oa),
1496
+ }), br = s({
1497
+ engagements: e.array(Yn),
1478
1498
  next_token: e.string().optional()
1479
- }), ya = e.guard(ca), ha = i({
1480
- claimed_items: e.array(ua)
1481
- }), fa = i({
1499
+ }), yr = e.guard(tr), fr = s({
1500
+ claimed_items: e.array(nr)
1501
+ }), hr = s({
1482
1502
  rewards: e.array(R)
1483
- }), wa = i({
1484
- reward_status: S
1485
- }), ka = i({
1503
+ }), wr = s({
1504
+ reward_status: U
1505
+ }), kr = s({
1486
1506
  user_rewards: e.array(R),
1487
1507
  next_token: e.string().optional()
1488
- }), va = i({
1508
+ }), vr = s({
1489
1509
  unclaimed: e.number()
1490
- }), Ra = i({
1510
+ }), Rr = s({
1491
1511
  scene: e.string()
1492
- }), Ca = i({
1512
+ }), Cr = s({
1493
1513
  params: e.string()
1494
- }), Va = i({
1514
+ }), Vr = s({
1495
1515
  img: e.string()
1496
- }), ja = e.guard(Fn), Ta = e.guard(Yn), qa = e.guard(
1516
+ }), jr = e.guard(xn), Tr = e.guard(Mn), qr = e.guard(
1497
1517
  e.object({
1498
- candidate_votes: e.array(Wn)
1518
+ candidate_votes: e.array(Kn)
1499
1519
  })
1500
- ), xa = e.guard(ae), M = e.guard(Kn), La = e.guard(Mn), Ua = e.guard(Hn), Sa = e.guard(zn), Pa = e.guard(Jn), Ea = e.guard(Dn);
1501
- class Cr {
1502
- token;
1503
- event = 0;
1504
- req;
1505
- constructor(t, n) {
1506
- this.token = t, this.event = +n, this.req = t.req;
1507
- }
1508
- /**
1509
- * 根据手机号白名单,检查手机号是否允许登录某个游戏
1510
- *
1511
- * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
1512
- */
1513
- async verifyMobileAllowed(t, n, a) {
1514
- const { data: r } = await this.req.get("verify-mobile-allowed", ma, {
1515
- ...a,
1516
- params: { game_id: t, mobile: n }
1517
- });
1518
- return r;
1519
- }
1520
- /**
1521
- * 获取运营活动的基础配置信息
1522
- *
1523
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
1524
- */
1525
- async getConfig(t) {
1526
- const { data: n } = await this.req.get(`event/${this.event}/event-config`, la, t);
1527
- return n;
1528
- }
1529
- /**
1530
- * 获取某个玩法参与用户数量
1531
- *
1532
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1533
- */
1534
- async getEngagementsUserCount(t, n) {
1535
- const { data: a } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1536
- ...n,
1537
- params: { feature_id: t, type: "user" }
1538
- });
1539
- return a?.count ?? null;
1540
- }
1541
- /**
1542
- * 获取某个玩法参与次数
1543
- *
1544
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1545
- */
1546
- async getEngagementsCount(t, n) {
1547
- const { data: a } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
1548
- ...n,
1549
- params: { feature_id: t, type: "engagement" }
1550
- });
1551
- return a?.count ?? null;
1552
- }
1553
- /**
1554
- * 获取某个玩法的参与记录(和特定用户无关)
1555
- *
1556
- * 💡目前仅支持 Comment / Team 两个玩法的参与数据
1557
- *
1558
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
1559
- */
1560
- async getEngagements(t, n) {
1561
- const { data: a } = await this.req.get(`event/${this.event}/feature-engagements`, ga, {
1562
- ...n,
1563
- params: { feature_id: t }
1564
- });
1565
- return a?.engagements || [];
1566
- }
1567
- /**
1568
- * 用户访问某个活动或玩法
1569
- *
1570
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=DWtJrnrBCn
1571
- */
1572
- async visit(t, n) {
1573
- await this.token.autoLogin();
1574
- const { data: a, code: r, message: o } = await this.req.post(
1575
- `event/${this.event}/visit`,
1576
- c(t || {}),
1577
- da,
1578
- n
1579
- );
1580
- return a ?? {
1581
- message: o,
1582
- error: r
1520
+ ), xr = e.guard(ne), ae = e.guard(An), Lr = e.guard(Dn), Ur = e.guard(On), Sr = e.guard(Gn), Pr = e.guard(Nn), $r = e.guard(Un);
1521
+ async function Va(a, t, n) {
1522
+ const { data: r } = await this.req.get("verify-mobile-allowed", mr, {
1523
+ ...n,
1524
+ params: { game_id: a, mobile: t }
1525
+ });
1526
+ return r;
1527
+ }
1528
+ async function ja(a) {
1529
+ const { data: t } = await this.req.get(`event/${this.event}/event-config`, lr, a);
1530
+ return t;
1531
+ }
1532
+ async function Ta(a, t) {
1533
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, E, {
1534
+ ...t,
1535
+ params: { feature_id: a, type: "user" }
1536
+ });
1537
+ return n?.count ?? null;
1538
+ }
1539
+ async function qa(a, t) {
1540
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, E, {
1541
+ ...t,
1542
+ params: { feature_id: a, type: "engagement" }
1543
+ });
1544
+ return n?.count ?? null;
1545
+ }
1546
+ async function xa(a, t) {
1547
+ const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, gr, {
1548
+ ...t,
1549
+ params: { feature_id: a }
1550
+ });
1551
+ return n?.engagements || [];
1552
+ }
1553
+ async function La(a, t) {
1554
+ await this.token.autoLogin();
1555
+ const { data: n, code: r, message: o } = await this.req.post(
1556
+ `event/${this.event}/visit`,
1557
+ c(a || {}),
1558
+ dr,
1559
+ t
1560
+ );
1561
+ return n ?? {
1562
+ message: o,
1563
+ error: r
1564
+ };
1565
+ }
1566
+ async function Ua(a, t) {
1567
+ if (!await this.token.autoLogin()) return [];
1568
+ const { data: n } = await this.req.get("event/user-feature-status", pr, {
1569
+ ...t,
1570
+ message: !1,
1571
+ params: c({ ...a, event_id: this.event })
1572
+ });
1573
+ return n?.status || [];
1574
+ }
1575
+ async function Sa(a, t) {
1576
+ if (!await this.token.autoLogin()) return {};
1577
+ const { data: n } = await this.req.get("event/user-engagements-count", _r, {
1578
+ message: !1,
1579
+ params: c({ ...t, event_id: this.event, feature_id: a })
1580
+ });
1581
+ return n?.engagements_counts || {};
1582
+ }
1583
+ async function Pa(a, t, n) {
1584
+ if (!await this.token.autoLogin())
1585
+ return {
1586
+ engagements: [],
1587
+ next_token: ""
1583
1588
  };
1584
- }
1585
- /**
1586
- * 获取用户在目标活动下的所有玩法的参与状态,用于前端进一步确定如何执行交互逻辑
1587
- *
1588
- * 💡活动下包含 engage_account_type 为 role_id 的玩法时,需要提供 server_id 和 role_id
1589
- *
1590
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
1591
- */
1592
- async getUserFeatureStatus(t, n) {
1593
- if (!await this.token.autoLogin()) return [];
1594
- const { data: a } = await this.req.get("event/user-feature-status", pa, {
1595
- ...n,
1596
- message: !1,
1597
- params: c({ ...t, event_id: this.event })
1598
- });
1599
- return a?.status || [];
1600
- }
1601
- /**
1602
- * 获取用户在目标活动下的某个玩法的参与次数
1603
- *
1604
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=uYCsjWyL36
1605
- */
1606
- async getUserEngagementCount(t, n) {
1607
- if (!await this.token.autoLogin()) return {};
1608
- const { data: a } = await this.req.get("event/user-engagements-count", _a, {
1609
- message: !1,
1610
- params: c({ ...n, event_id: this.event, feature_id: t })
1611
- });
1612
- return a?.engagements_counts || {};
1613
- }
1614
- /**
1615
- * 获取当前登录用户参与某个玩法的记录
1616
- *
1617
- * 💡当玩法的 engage_account_type role_id 时,可提供 server_id role_id 获取具体角色的参与记录
1618
- *
1619
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=NFDdV1dwWb
1620
- */
1621
- async getUserEngagements(t, n, a) {
1622
- if (!await this.token.autoLogin())
1623
- return {
1624
- engagements: [],
1625
- next_token: ""
1626
- };
1627
- const { data: r } = await this.req.get("event/user-engagements", ba, {
1628
- ...a,
1629
- params: c({
1630
- max_results: 20,
1631
- ...n,
1632
- event_id: this.event,
1633
- feature_id: t
1634
- })
1635
- });
1636
- return {
1637
- engagements: r?.engagements || [],
1638
- next_token: r?.next_token || ""
1639
- };
1640
- }
1641
- /**
1642
- * 用户参与某个玩法
1643
- *
1644
- * 💡可以设置泛型参数来快速确定 engagementParam 数据类型和返回值
1645
- *
1646
- * 💡需要先调用 `visit` 接口提交访问信息
1647
- *
1648
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vuOyrcry3S
1649
- */
1650
- async engage(t, n, a, r) {
1651
- await this.token.autoLogin();
1652
- const { data: o, code: d, message: g } = await this.req.post(
1653
- `event/${this.event}/engage`,
1654
- c({
1655
- feature_id: t,
1656
- engagement: n,
1657
- ...a
1658
- }),
1659
- ya,
1660
- r
1661
- );
1662
- return o ?? {
1663
- message: g,
1664
- error: d
1665
- };
1666
- }
1667
- /**
1668
- * 用户领取除红包和实物奖励以外的所有奖励
1669
- *
1670
- * @deprecated 请优先使用 `claimRewardsV2` 接口
1671
- *
1672
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=lCGuqgvUDP
1673
- */
1674
- async claimRewards(t, n) {
1675
- await this.token.autoLogin();
1676
- const { data: a, code: r, message: o } = await this.req.post(
1677
- "event/claim-rewards",
1678
- c({
1679
- ...t,
1680
- server_id: t.server_id ? +t.server_id : void 0
1681
- }),
1682
- ha,
1683
- n
1684
- );
1685
- return a?.claimed_items || {
1686
- message: o,
1687
- error: r
1688
- };
1689
- }
1690
- /**
1691
- * 用户领取除红包和实物奖励以外的所有奖励
1692
- *
1693
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vdc4SrqXjF
1694
- */
1695
- async claimRewardsV2(t, n) {
1696
- await this.token.autoLogin();
1697
- const { data: a, code: r, message: o } = await this.req.post(
1698
- "event/claim-rewards-v2",
1699
- c({
1700
- ...t,
1701
- server_id: t.server_id ? +t.server_id : void 0
1702
- }),
1703
- fa,
1704
- n
1705
- );
1706
- return a?.rewards || {
1707
- message: o,
1708
- error: r
1709
- };
1710
- }
1711
- /**
1712
- * 用户领取红包奖励
1713
- *
1714
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=aQLhlOAB4Q
1715
- */
1716
- async claimWeixinHongbao(t, n) {
1717
- await this.token.autoLogin();
1718
- const { data: a, code: r, message: o } = await this.req.post(
1719
- "event/claim-weixin-hongbao",
1720
- { reward_id: t },
1721
- wa,
1722
- n
1723
- );
1724
- return a || {
1725
- message: o,
1726
- error: r
1727
- };
1728
- }
1729
- /**
1730
- * 验证资格激活码有效性
1731
- *
1732
- * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
1733
- */
1734
- async verifyActivationKey(t, n) {
1735
- if (!this.token.isLoggedIn)
1736
- return { error: "not_logged_in" };
1737
- const { ok: a, code: r, message: o } = await this.req.post(
1738
- "verify-activation-key",
1739
- { activation_key: t },
1740
- null,
1741
- { message: !1, ...n }
1742
- );
1743
- return a || {
1744
- message: o,
1745
- error: r
1746
- };
1747
- }
1748
- /**
1749
- * 查询用户活动奖励列表
1750
- *
1751
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=qj12eIgYQG
1752
- */
1753
- async getUserRewards(t, n) {
1754
- if (!await this.token.autoLogin())
1755
- return {
1756
- user_rewards: [],
1757
- next_token: ""
1758
- };
1759
- const { data: a } = await this.req.post(
1760
- "event/user-rewards",
1761
- c({ max_results: 20, ...t, event_id: this.event }),
1762
- ka,
1763
- n
1764
- );
1589
+ const { data: r } = await this.req.get("event/user-engagements", br, {
1590
+ ...n,
1591
+ params: c({
1592
+ max_results: 20,
1593
+ ...t,
1594
+ event_id: this.event,
1595
+ feature_id: a
1596
+ })
1597
+ });
1598
+ return {
1599
+ engagements: r?.engagements || [],
1600
+ next_token: r?.next_token || ""
1601
+ };
1602
+ }
1603
+ async function $a(a, t, n, r) {
1604
+ await this.token.autoLogin();
1605
+ const { data: o, code: i, message: d } = await this.req.post(
1606
+ `event/${this.event}/engage`,
1607
+ c({
1608
+ feature_id: a,
1609
+ engagement: t,
1610
+ ...n
1611
+ }),
1612
+ yr,
1613
+ r
1614
+ );
1615
+ return o ?? {
1616
+ message: d,
1617
+ error: i
1618
+ };
1619
+ }
1620
+ async function Ea(a, t) {
1621
+ await this.token.autoLogin();
1622
+ const { data: n, code: r, message: o } = await this.req.post(
1623
+ "event/claim-rewards",
1624
+ c({
1625
+ ...a,
1626
+ server_id: a.server_id ? +a.server_id : void 0
1627
+ }),
1628
+ fr,
1629
+ t
1630
+ );
1631
+ return n?.claimed_items || {
1632
+ message: o,
1633
+ error: r
1634
+ };
1635
+ }
1636
+ async function Fa(a, t) {
1637
+ if (!await this.token.autoLogin()) return null;
1638
+ const { ok: n, code: r, message: o } = await this.req.post(
1639
+ `event/${this.event}/user-reward-address`,
1640
+ a,
1641
+ null,
1642
+ t
1643
+ );
1644
+ return n || {
1645
+ message: o,
1646
+ error: r
1647
+ };
1648
+ }
1649
+ async function Ia(a, t) {
1650
+ if (!await this.token.autoLogin()) return null;
1651
+ const { data: n } = await this.req.get("event/unlimit-qrcode-scene", Rr, {
1652
+ ...t,
1653
+ params: { params: a }
1654
+ });
1655
+ return n?.scene ?? null;
1656
+ }
1657
+ async function Da(a, t) {
1658
+ const { data: n } = await this.req.get("event/params-by-qrcode-scene", Cr, {
1659
+ ...t,
1660
+ params: { scene: a }
1661
+ });
1662
+ return n?.params ?? null;
1663
+ }
1664
+ async function Aa(a, t) {
1665
+ if (!await this.token.autoLogin()) return null;
1666
+ const { data: n } = await this.req.post(
1667
+ "event/unlimit-qrcode",
1668
+ c(a),
1669
+ Vr,
1670
+ t
1671
+ );
1672
+ return n?.img ?? null;
1673
+ }
1674
+ async function Oa(a, t) {
1675
+ if (!await this.token.autoLogin()) return null;
1676
+ const { data: n, code: r, message: o } = await this.req.get(`event/${this.event}/quest-progress`, jr, {
1677
+ message: !1,
1678
+ ...t,
1679
+ params: { feature_id: a }
1680
+ });
1681
+ return n || {
1682
+ message: o,
1683
+ error: r
1684
+ };
1685
+ }
1686
+ async function Ga(a, t) {
1687
+ if (!await this.token.autoLogin()) return null;
1688
+ const { data: n, code: r, message: o } = await this.req.post(
1689
+ "event/vote2/rewards",
1690
+ { feature_id: a, event_id: this.event },
1691
+ Tr,
1692
+ t
1693
+ );
1694
+ return n || {
1695
+ message: o,
1696
+ code: r
1697
+ };
1698
+ }
1699
+ async function Na(a, t) {
1700
+ if (!await this.token.autoLogin()) return [];
1701
+ const { data: n } = await this.req.get("event/vote2/leaderboard", qr, {
1702
+ ...t,
1703
+ params: { feature_id: a, event_id: this.event }
1704
+ });
1705
+ return n?.candidate_votes || [];
1706
+ }
1707
+ async function Qa(a, t) {
1708
+ if (!await this.token.autoLogin()) return null;
1709
+ const { data: n, code: r, message: o } = await this.req.get("event/cashback/query", xr, {
1710
+ ...t,
1711
+ params: { feature_id: a, event_id: this.event }
1712
+ });
1713
+ return n || {
1714
+ message: o,
1715
+ error: r
1716
+ };
1717
+ }
1718
+ async function Ba(a, t) {
1719
+ if (!await this.token.autoLogin()) return null;
1720
+ const { data: n, code: r, message: o } = await this.req.get("event/ugc/my", ae, {
1721
+ ...t,
1722
+ params: {
1723
+ max_results: 20,
1724
+ ...a
1725
+ }
1726
+ });
1727
+ return n || {
1728
+ message: o,
1729
+ error: r
1730
+ };
1731
+ }
1732
+ async function Ma(a, t) {
1733
+ if (!await this.token.autoLogin()) return null;
1734
+ const { data: n, code: r, message: o } = await this.req.get("event/ugc/my-count", Ur, {
1735
+ ...t,
1736
+ params: {
1737
+ ...a
1738
+ }
1739
+ });
1740
+ return n || {
1741
+ message: o,
1742
+ error: r
1743
+ };
1744
+ }
1745
+ async function Ka(a, t) {
1746
+ await this.token.autoLogin();
1747
+ const { data: n, code: r, message: o } = await this.req.post(
1748
+ "event/claim-rewards-v2",
1749
+ c({
1750
+ ...a,
1751
+ server_id: a.server_id ? +a.server_id : void 0
1752
+ }),
1753
+ hr,
1754
+ t
1755
+ );
1756
+ return n?.rewards || {
1757
+ message: o,
1758
+ error: r
1759
+ };
1760
+ }
1761
+ async function Ha(a, t) {
1762
+ await this.token.autoLogin();
1763
+ const { data: n, code: r, message: o } = await this.req.post(
1764
+ "event/claim-weixin-hongbao",
1765
+ { reward_id: a },
1766
+ wr,
1767
+ t
1768
+ );
1769
+ return n || {
1770
+ message: o,
1771
+ error: r
1772
+ };
1773
+ }
1774
+ async function za(a, t) {
1775
+ if (!this.token.isLoggedIn)
1776
+ return { error: "not_logged_in" };
1777
+ const { ok: n, code: r, message: o } = await this.req.post("verify-activation-key", { activation_key: a }, null, {
1778
+ message: !1,
1779
+ ...t
1780
+ });
1781
+ return n || {
1782
+ message: o,
1783
+ error: r
1784
+ };
1785
+ }
1786
+ async function Ja(a, t) {
1787
+ if (!await this.token.autoLogin())
1765
1788
  return {
1766
- user_rewards: a?.user_rewards || [],
1767
- next_token: a?.next_token || ""
1789
+ user_rewards: [],
1790
+ next_token: ""
1768
1791
  };
1769
- }
1770
- /**
1771
- * 查询用户奖励数量,目前仅返回未领取的奖励数量
1772
- *
1773
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=jrFbyZ3UWN
1774
- */
1775
- async getUserRewardsCount(t, n) {
1776
- if (!await this.token.autoLogin())
1777
- return {
1778
- unclaimed: 0
1779
- };
1780
- const { data: a } = await this.req.get("event/user-rewards-count", va, {
1781
- ...n,
1782
- params: c({ ...t })
1783
- });
1792
+ const { data: n } = await this.req.post(
1793
+ "event/user-rewards",
1794
+ c({ max_results: 20, ...a, event_id: this.event }),
1795
+ kr,
1796
+ t
1797
+ );
1798
+ return {
1799
+ user_rewards: n?.user_rewards || [],
1800
+ next_token: n?.next_token || ""
1801
+ };
1802
+ }
1803
+ async function Za(a, t) {
1804
+ if (!await this.token.autoLogin())
1784
1805
  return {
1785
- unclaimed: a?.unclaimed || 0
1786
- };
1787
- }
1788
- /**
1789
- * 查询用户活动道具数量。💡 注意,这里只能是活动道具
1790
- *
1791
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=mnGCTeTgMb
1792
- */
1793
- async getUserItemCount(t, n) {
1794
- if (!await this.token.autoLogin()) return null;
1795
- const { data: a } = await this.req.get(`event/${this.event}/user-item-count`, q, {
1796
- ...n,
1797
- params: { item_id: t }
1798
- });
1799
- return a?.count ?? null;
1800
- }
1801
- /**
1802
- * 填写实物奖励收货地址,返回 null 表示未登录
1803
- *
1804
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=QIwGhnaexb
1805
- */
1806
- async submitUserRewardAddress(t, n) {
1807
- if (!await this.token.autoLogin()) return null;
1808
- const { ok: a, code: r, message: o } = await this.req.post(
1809
- `event/${this.event}/user-reward-address`,
1810
- t,
1811
- null,
1812
- n
1813
- );
1814
- return a || {
1815
- message: o,
1816
- error: r
1817
- };
1818
- }
1819
- /**
1820
- * 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
1821
- *
1822
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=TbEeyUmZzN
1823
- *
1824
- * @param params - 前端扫描二维码打开小程序所需参数
1825
- */
1826
- async getUnlimitQrcodeScene(t, n) {
1827
- if (!await this.token.autoLogin()) return null;
1828
- const { data: a } = await this.req.get("event/unlimit-qrcode-scene", Ra, {
1829
- ...n,
1830
- params: { params: t }
1831
- });
1832
- return a?.scene ?? null;
1833
- }
1834
- /**
1835
- * 根据小程序码携带 scene 值,获取对应的前端所需参数
1836
- *
1837
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=SzWPFZDQBV
1838
- *
1839
- * @param scene - 小程序码 scene 值
1840
- */
1841
- async getParamsByQrcodeScene(t, n) {
1842
- const { data: a } = await this.req.get("event/params-by-qrcode-scene", Ca, {
1843
- ...n,
1844
- params: { scene: t }
1845
- });
1846
- return a?.params ?? null;
1847
- }
1848
- /**
1849
- * 生成不限制的带参数的小程序码(dataURI 格式的小程序码图片)
1850
- *
1851
- * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=Rvmoq8iIy0
1852
- */
1853
- async generateUnlimitQrcode(t, n) {
1854
- if (!await this.token.autoLogin()) return null;
1855
- const { data: a } = await this.req.post(
1856
- "event/unlimit-qrcode",
1857
- c(t),
1858
- Va,
1859
- n
1860
- );
1861
- return a?.img ?? null;
1862
- }
1863
- /**
1864
- * 本接口用于获取任务玩法的实时进度数据,支持部分任务进度的查询:累计充值金额 / 累计游戏内活跃值 / 账号等级目标
1865
- *
1866
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=ZAnm12d3f0
1867
- */
1868
- async getQuestProgress(t, n) {
1869
- if (!await this.token.autoLogin()) return null;
1870
- const { data: a, code: r, message: o } = await this.req.get(`event/${this.event}/quest-progress`, ja, {
1871
- message: !1,
1872
- ...n,
1873
- params: { feature_id: t }
1874
- });
1875
- return a || {
1876
- message: o,
1877
- error: r
1878
- };
1879
- }
1880
- /**
1881
- * 产生投票(vote2)玩法获得的奖励,并非发放给用户;领取需要调用 claimRewardsV2
1882
- *
1883
- * path: event/vote2/rewards
1884
- *
1885
- * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=fabGKteIEK
1886
- */
1887
- async vote2Rewards(t, n) {
1888
- if (!await this.token.autoLogin()) return null;
1889
- const { data: a, code: r, message: o } = await this.req.post(
1890
- "event/vote2/rewards",
1891
- { feature_id: t, event_id: this.event },
1892
- Ta,
1893
- n
1894
- );
1895
- return a || {
1896
- message: o,
1897
- code: r
1898
- };
1899
- }
1900
- /**
1901
- * 查询投票(vote2)玩法排行榜数据
1902
- *
1903
- * https://www.kdocs.cn/l/chlVWKom7DzU?linkname=cYZMVXbP4u
1904
- */
1905
- async getVote2Leaderboard(t, n) {
1906
- if (!await this.token.autoLogin()) return [];
1907
- const { data: a } = await this.req.get("event/vote2/leaderboard", qa, {
1908
- ...n,
1909
- params: { feature_id: t, event_id: this.event }
1910
- });
1911
- return a?.candidate_votes || [];
1912
- }
1913
- /**
1914
- * 充值返还玩法的查询接口,查询返还数据
1915
- *
1916
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=yNolN2sWp4
1917
- */
1918
- async getCashbackQuery(t, n) {
1919
- if (!await this.token.autoLogin()) return null;
1920
- const { data: a, code: r, message: o } = await this.req.get("event/cashback/query", xa, {
1921
- ...n,
1922
- params: { feature_id: t, event_id: this.event }
1923
- });
1924
- return a || {
1925
- message: o,
1926
- error: r
1806
+ unclaimed: 0
1927
1807
  };
1928
- }
1929
- /**
1930
- * 获取当前登录用户的投稿记录
1931
- *
1932
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=biEwrNKhAF
1933
- */
1934
- async getUgcRecord(t, n) {
1935
- if (!await this.token.autoLogin()) return null;
1936
- const { data: a, code: r, message: o } = await this.req.get("event/ugc/my", M, {
1937
- ...n,
1938
- params: {
1939
- max_results: 20,
1940
- ...t
1941
- }
1942
- });
1943
- return a || {
1944
- message: o,
1945
- error: r
1946
- };
1947
- }
1948
- /**
1949
- * 查询用户投稿数量
1950
- *
1951
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=U0sYIGPzDk
1952
- */
1953
- async getUgcMyCount(t, n) {
1954
- if (!await this.token.autoLogin()) return null;
1955
- const { data: a, code: r, message: o } = await this.req.get("event/ugc/my-count", Ua, {
1956
- ...n,
1957
- params: {
1958
- ...t
1959
- }
1960
- });
1961
- return a || {
1962
- message: o,
1963
- error: r
1964
- };
1965
- }
1966
- /**
1967
- * 媒体资源预上传地址获取,为投稿玩法(UGC)提供 S3 预签名上传 URL,供用户客户端上传图片资源
1968
- *
1969
- * 仅允许上传 image/jpeg 和 image/png 格式的图片。
1970
- * 图片会按照 event_id / feature_id 维度分目录存储在S3 对象存储中。
1971
- * 投稿玩法不调用任何第三方(网易易盾等)进行内容安全检测。
1972
- *
1973
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=xhGGpJEbol
1974
- */
1975
- async ugcUploadImage(t, n, a) {
1976
- if (!await this.token.autoLogin()) return null;
1977
- const { data: r, code: o, message: d } = await this.req.post(
1978
- "event/ugc/upload-image",
1979
- { feature_id: t, ...n, event_id: this.event },
1980
- Sa,
1981
- a
1982
- );
1983
- return r || {
1984
- message: d,
1985
- error: o
1986
- };
1987
- }
1988
- /**
1989
- * 获取推荐稿件列表,随机显示 N 条被接受的投稿记录
1990
- *
1991
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=WzvcAPjHAh
1992
- */
1993
- async getUgcRecommendation(t, n) {
1994
- const { data: a, code: r, message: o } = await this.req.get("event/ugc/recommendation", M, {
1995
- ...n,
1996
- params: {
1997
- feature_id: t,
1998
- event_id: this.event
1999
- }
2000
- });
2001
- return a || {
2002
- message: o,
2003
- error: r
2004
- };
2005
- }
2006
- /**
2007
- * 用于查询指定活动玩法下,所有已被接收 (review_status = accepted) 的用户投稿内容列表,默认按照投稿时间倒序。
2008
- *
2009
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=VRYN6d3rbd
2010
- */
2011
- async getUgcs(t, n, a) {
2012
- const { data: r, code: o, message: d } = await this.req.get("event/ugc/ugcs", La, {
2013
- ...a,
2014
- params: {
2015
- event_id: this.event,
2016
- feature_id: t,
2017
- max_results: 20,
2018
- ...n
2019
- }
2020
- });
2021
- return r || {
2022
- message: d,
2023
- error: o
2024
- };
2025
- }
2026
- /**
2027
- * 获取指定活动玩法的 UGC 投稿排行榜数据
2028
- *
2029
- * 该接口仅在管理员在 Console 后台完成排行榜结算后才会返回有效数据。
2030
- * 结算前调用将返回空结果集。
2031
- * 排行榜结算通常在活动结束后由管理员在 Console 后台手动触发。
2032
- * 目前前端无法直接在投稿玩法中获得「是否已经结算」的状态。
2033
- *
2034
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=KoB7S8omkC
2035
- */
2036
- async getUgcLeaderboard(t, n) {
2037
- if (!await this.token.autoLogin()) return null;
2038
- const { data: a, code: r, message: o } = await this.req.get("event/ugc/leaderboard", Pa, {
2039
- ...n,
2040
- params: {
2041
- feature_id: t,
2042
- event_id: this.event
2043
- }
2044
- });
2045
- return a || {
2046
- message: o,
2047
- error: r
2048
- };
2049
- }
2050
- /**
2051
- * 查询兑换玩法的物品剩余库存(含用户可兑换数量)
2052
- *
2053
- * https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=gOqT9svLF7
2054
- */
2055
- async getRedeemItemStocks(t, n) {
2056
- if (!await this.token.autoLogin()) return null;
2057
- const { data: a, code: r, message: o } = await this.req.get("event/redeem/item-stocks", Ea, {
2058
- ...n,
2059
- params: {
2060
- event_id: this.event,
2061
- feature_id: t
2062
- }
2063
- });
2064
- return a || {
2065
- message: o,
2066
- error: r
2067
- };
2068
- }
1808
+ const { data: n } = await this.req.get("event/user-rewards-count", vr, {
1809
+ ...t,
1810
+ params: c({ ...a })
1811
+ });
1812
+ return {
1813
+ unclaimed: n?.unclaimed || 0
1814
+ };
1815
+ }
1816
+ async function Xa(a, t) {
1817
+ if (!await this.token.autoLogin()) return null;
1818
+ const { data: n } = await this.req.get(`event/${this.event}/user-item-count`, E, {
1819
+ ...t,
1820
+ params: { item_id: a }
1821
+ });
1822
+ return n?.count ?? null;
1823
+ }
1824
+ async function Ya(a, t, n) {
1825
+ if (!await this.token.autoLogin()) return null;
1826
+ const { data: r, code: o, message: i } = await this.req.post(
1827
+ "event/ugc/upload-image",
1828
+ { feature_id: a, ...t, event_id: this.event },
1829
+ Sr,
1830
+ n
1831
+ );
1832
+ return r || {
1833
+ message: i,
1834
+ error: o
1835
+ };
1836
+ }
1837
+ async function Wa(a, t) {
1838
+ const { data: n, code: r, message: o } = await this.req.get("event/ugc/recommendation", ae, {
1839
+ ...t,
1840
+ params: {
1841
+ feature_id: a,
1842
+ event_id: this.event
1843
+ }
1844
+ });
1845
+ return n || {
1846
+ message: o,
1847
+ error: r
1848
+ };
2069
1849
  }
2070
- const $a = {
1850
+ async function eo(a, t, n) {
1851
+ const { data: r, code: o, message: i } = await this.req.get("event/ugc/ugcs", Lr, {
1852
+ ...n,
1853
+ params: {
1854
+ event_id: this.event,
1855
+ feature_id: a,
1856
+ max_results: 20,
1857
+ ...t
1858
+ }
1859
+ });
1860
+ return r || {
1861
+ message: i,
1862
+ error: o
1863
+ };
1864
+ }
1865
+ async function to(a, t) {
1866
+ if (!await this.token.autoLogin()) return null;
1867
+ const { data: n, code: r, message: o } = await this.req.get("event/ugc/leaderboard", Pr, {
1868
+ ...t,
1869
+ params: {
1870
+ feature_id: a,
1871
+ event_id: this.event
1872
+ }
1873
+ });
1874
+ return n || {
1875
+ message: o,
1876
+ error: r
1877
+ };
1878
+ }
1879
+ async function no(a, t) {
1880
+ if (!await this.token.autoLogin()) return null;
1881
+ const { data: n, code: r, message: o } = await this.req.get("event/redeem/item-stocks", $r, {
1882
+ ...t,
1883
+ params: {
1884
+ event_id: this.event,
1885
+ feature_id: a
1886
+ }
1887
+ });
1888
+ return n || {
1889
+ message: o,
1890
+ error: r
1891
+ };
1892
+ }
1893
+ const Er = {
2071
1894
  /** 所有人均可以发帖 */
2072
1895
  All: "all",
2073
1896
  /** 指定用户可发帖 */
2074
1897
  Limit: "limit"
2075
- }, Fa = e.string().enum($a).lock(), Ia = {
1898
+ }, Fr = e.string().enum(Er).lock(), Ir = {
2076
1899
  /** 待审核(仅自己可见) */
2077
1900
  Pending: "pending",
2078
1901
  /** 审核通过 */
@@ -2081,14 +1904,14 @@ const $a = {
2081
1904
  Failed: "failed",
2082
1905
  /** 嫌疑(仅自己可见) */
2083
1906
  Suspect: "suspect"
2084
- }, oe = e.string().enum(Ia).lock(), Da = {
1907
+ }, oe = e.string().enum(Ir).lock(), Dr = {
2085
1908
  /** 系统通知 */
2086
1909
  System: "system",
2087
1910
  /** 评论我的 */
2088
1911
  Comment: "comment",
2089
1912
  /** 点赞通知 */
2090
1913
  Like: "like"
2091
- }, Vr = e.string().enum(Da).lock(), m = {
1914
+ }, ro = e.string().enum(Dr).lock(), m = {
2092
1915
  /** 系统通知 */
2093
1916
  System: "system",
2094
1917
  /** 帖子被置顶 */
@@ -2113,13 +1936,13 @@ const $a = {
2113
1936
  ReplyLiked: "reply_liked",
2114
1937
  /** 回复被删除 */
2115
1938
  ReplyDeleted: "reply_deleted"
2116
- }, Aa = e.string().enum(m).lock(), ie = e.object({
1939
+ }, Ar = e.string().enum(m).lock(), ie = e.object({
2117
1940
  forum_id: e.number(),
2118
1941
  icon_url: e.string(),
2119
1942
  name: e.string(),
2120
1943
  tags: e.array(e.string()),
2121
1944
  sort: e.number(),
2122
- mode: Fa,
1945
+ mode: Fr,
2123
1946
  member_ids: e.array(e.number())
2124
1947
  }).lock(), F = e.object({
2125
1948
  topic_id: e.number(),
@@ -2150,7 +1973,7 @@ const $a = {
2150
1973
  create_time: e.number()
2151
1974
  }).lock(), se = e.object({
2152
1975
  err_msg: e.string().optional()
2153
- }).optional().lock(), Ga = e.object({
1976
+ }).optional().lock(), Or = e.object({
2154
1977
  reply_id: e.number(),
2155
1978
  reply_content: e.string().optional(),
2156
1979
  replied_by: e.string(),
@@ -2169,7 +1992,7 @@ const $a = {
2169
1992
  content: e.string(),
2170
1993
  like_num: e.number(),
2171
1994
  liked: e.bool(),
2172
- reply_to: Ga,
1995
+ reply_to: Or,
2173
1996
  create_time: e.number()
2174
1997
  }).lock(), k = e.object({
2175
1998
  comment_id: e.number(),
@@ -2191,19 +2014,19 @@ const $a = {
2191
2014
  create_time: e.number(),
2192
2015
  status: oe,
2193
2016
  replies: e.array(C).optional()
2194
- }).lock(), Oa = e.object({
2017
+ }).lock(), Gr = e.object({
2195
2018
  image_url: e.string(),
2196
2019
  upload_url: e.string(),
2197
2020
  existed: e.bool()
2198
- }).lock(), _ = e.object({
2021
+ }).lock(), p = e.object({
2199
2022
  notification_id: e.string(),
2200
- notification_type: Aa,
2023
+ notification_type: Ar,
2201
2024
  is_read: e.bool(),
2202
2025
  create_time: e.number(),
2203
2026
  origin_user_id: e.string(),
2204
2027
  origin_user_name: e.string(),
2205
2028
  origin_user_avatar_url: e.string()
2206
- }).lock(), Na = e.object({
2029
+ }).lock(), Nr = e.object({
2207
2030
  system_message_subject: e.string(),
2208
2031
  system_message_content: e.string()
2209
2032
  }).lock(), D = e.object({
@@ -2217,12 +2040,12 @@ const $a = {
2217
2040
  }).lock(), A = e.object({
2218
2041
  reply_id: e.number(),
2219
2042
  reply_content: e.string()
2220
- }).lock(), Qa = e.object({
2221
- ..._.shape,
2222
- ...Na.shape,
2043
+ }).lock(), Qr = e.object({
2044
+ ...p.shape,
2045
+ ...Nr.shape,
2223
2046
  notification_type: e.string().enum(m.System)
2224
- }), Ba = e.object({
2225
- ..._.shape,
2047
+ }), Br = e.object({
2048
+ ...p.shape,
2226
2049
  ...D.shape,
2227
2050
  notification_type: e.string().enum(
2228
2051
  m.PostPinned,
@@ -2230,68 +2053,68 @@ const $a = {
2230
2053
  m.PostDeleted,
2231
2054
  m.PostLiked
2232
2055
  )
2233
- }), Ma = e.object({
2234
- ..._.shape,
2056
+ }), Mr = e.object({
2057
+ ...p.shape,
2235
2058
  ...D.shape,
2236
2059
  ...V.shape,
2237
2060
  notification_type: e.string().enum(m.PostCommented)
2238
- }), Ka = e.object({
2239
- ..._.shape,
2061
+ }), Kr = e.object({
2062
+ ...p.shape,
2240
2063
  ...V.shape,
2241
2064
  ...A.shape,
2242
2065
  notification_type: e.string().enum(m.CommentReplied)
2243
- }), Ha = e.object({
2244
- ..._.shape,
2066
+ }), Hr = e.object({
2067
+ ...p.shape,
2245
2068
  ...V.shape,
2246
2069
  ...D.shape,
2247
2070
  notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
2248
- }), za = e.object({
2249
- ..._.shape,
2071
+ }), zr = e.object({
2072
+ ...p.shape,
2250
2073
  ...A.shape,
2251
2074
  notification_type: e.string().enum(m.ReplyReplied),
2252
2075
  comment_id: e.number(),
2253
2076
  reply_to_reply_id: e.number(),
2254
2077
  reply_to_reply_content: e.string()
2255
- }), Ja = e.object({
2256
- ..._.shape,
2078
+ }), Jr = e.object({
2079
+ ...p.shape,
2257
2080
  ...A.shape,
2258
2081
  ...V.shape,
2259
2082
  notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
2260
- }), Za = e.union(
2261
- Qa,
2262
- Ba,
2263
- Ma,
2264
- Ka,
2265
- Ha,
2266
- za,
2267
- Ja
2268
- ).satisfies().lock(), Xa = i({ forums: e.array(ie) }), Ya = i({ topics: e.array(F) }), Wa = i({ topic: F }), er = i({ post: I }), K = i({
2083
+ }), Zr = e.union(
2084
+ Qr,
2085
+ Br,
2086
+ Mr,
2087
+ Kr,
2088
+ Hr,
2089
+ zr,
2090
+ Jr
2091
+ ).satisfies().lock(), Xr = s({ forums: e.array(ie) }), Yr = s({ topics: e.array(F) }), Wr = s({ topic: F }), ea = s({ post: I }), M = s({
2269
2092
  posts: e.array(I),
2270
2093
  next_token: e.string().optional()
2271
- }), tr = i({
2094
+ }), ta = s({
2272
2095
  post: I.clone().optional(),
2273
2096
  antispam: se.clone().optional()
2274
- }), nr = i({
2097
+ }), na = s({
2275
2098
  replies: e.array(C),
2276
2099
  next_token: e.string().optional()
2277
- }), ar = i({ reply: C }), rr = i({
2100
+ }), ra = s({ reply: C }), aa = s({
2278
2101
  reply: C.clone().optional(),
2279
2102
  antispam: se.clone().optional()
2280
- }), or = i({ comment: k }), ir = i({
2103
+ }), oa = s({ comment: k }), ia = s({
2281
2104
  comments: e.array(k),
2282
2105
  next_token: e.string().optional()
2283
- }), sr = i({
2106
+ }), sa = s({
2284
2107
  comment: k.clone().optional(),
2285
2108
  antispam: k.clone().optional()
2286
- }), cr = e.guard(Oa), ur = i({
2287
- notifications: e.array(Za),
2109
+ }), ca = e.guard(Gr), ua = s({
2110
+ notifications: e.array(Zr),
2288
2111
  next_token: e.string().optional()
2289
- }), lr = i({
2112
+ }), la = s({
2290
2113
  system: e.number(),
2291
2114
  comment: e.number(),
2292
2115
  like: e.number()
2293
2116
  });
2294
- class jr {
2117
+ class ao {
2295
2118
  token;
2296
2119
  req;
2297
2120
  constructor(t) {
@@ -2303,7 +2126,7 @@ class jr {
2303
2126
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
2304
2127
  */
2305
2128
  async getForums(t) {
2306
- const { data: n } = await this.req.get("community/forums", Xa, t);
2129
+ const { data: n } = await this.req.get("community/forums", Xr, t);
2307
2130
  return n?.forums || [];
2308
2131
  }
2309
2132
  /**
@@ -2312,7 +2135,7 @@ class jr {
2312
2135
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
2313
2136
  */
2314
2137
  async getTopics(t) {
2315
- const { data: n } = await this.req.get("community/topics", Ya, t);
2138
+ const { data: n } = await this.req.get("community/topics", Yr, t);
2316
2139
  return n?.topics || [];
2317
2140
  }
2318
2141
  /**
@@ -2321,11 +2144,11 @@ class jr {
2321
2144
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
2322
2145
  */
2323
2146
  async getTopic(t, n) {
2324
- const { data: a, code: r } = await this.req.get("community/topic", Wa, {
2147
+ const { data: r, code: o } = await this.req.get("community/topic", Wr, {
2325
2148
  ...n,
2326
2149
  params: { topic_id: t }
2327
2150
  });
2328
- return a?.topic ?? { error: r };
2151
+ return r?.topic ?? { error: o };
2329
2152
  }
2330
2153
  /**
2331
2154
  * 获取社区帖子列表
@@ -2333,13 +2156,13 @@ class jr {
2333
2156
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
2334
2157
  */
2335
2158
  async getPosts(t, n) {
2336
- const { data: a, code: r, message: o } = await this.req.get("community/posts", K, {
2159
+ const { data: r, code: o, message: i } = await this.req.get("community/posts", M, {
2337
2160
  ...n,
2338
2161
  params: c(t)
2339
2162
  });
2340
- return a ?? {
2341
- message: o,
2342
- error: r
2163
+ return r ?? {
2164
+ message: i,
2165
+ error: o
2343
2166
  };
2344
2167
  }
2345
2168
  /**
@@ -2347,13 +2170,13 @@ class jr {
2347
2170
  *
2348
2171
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
2349
2172
  */
2350
- async getPinnedPosts(t, n, a, r) {
2351
- const { data: o, code: d, message: g } = await this.req.get("community/pinned-posts", K, {
2352
- ...r,
2353
- params: c({ forum_id: t, max_results: n, next_token: a })
2173
+ async getPinnedPosts(t, n, r, o) {
2174
+ const { data: i, code: d, message: b } = await this.req.get("community/pinned-posts", M, {
2175
+ ...o,
2176
+ params: c({ forum_id: t, max_results: n, next_token: r })
2354
2177
  });
2355
- return o ?? {
2356
- message: g,
2178
+ return i ?? {
2179
+ message: b,
2357
2180
  error: d
2358
2181
  };
2359
2182
  }
@@ -2363,13 +2186,13 @@ class jr {
2363
2186
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
2364
2187
  */
2365
2188
  async getPost(t, n) {
2366
- const { data: a, code: r, message: o } = await this.req.get("community/post", er, {
2189
+ const { data: r, code: o, message: i } = await this.req.get("community/post", ea, {
2367
2190
  ...n,
2368
2191
  params: { post_id: t }
2369
2192
  });
2370
- return a?.post ?? {
2371
- message: o,
2372
- error: r
2193
+ return r?.post ?? {
2194
+ message: i,
2195
+ error: o
2373
2196
  };
2374
2197
  }
2375
2198
  /**
@@ -2378,15 +2201,15 @@ class jr {
2378
2201
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
2379
2202
  */
2380
2203
  async post(t, n) {
2381
- const { data: a, code: r, message: o } = await this.req.post(
2204
+ const { data: r, code: o, message: i } = await this.req.post(
2382
2205
  "community/post",
2383
2206
  c(t),
2384
- tr,
2207
+ ta,
2385
2208
  n
2386
2209
  );
2387
- return a ?? {
2388
- message: o,
2389
- error: r
2210
+ return r ?? {
2211
+ message: i,
2212
+ error: o
2390
2213
  };
2391
2214
  }
2392
2215
  /**
@@ -2395,13 +2218,13 @@ class jr {
2395
2218
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
2396
2219
  */
2397
2220
  async getComments(t, n) {
2398
- const { data: a, code: r, message: o } = await this.req.get("community/comments", ir, {
2221
+ const { data: r, code: o, message: i } = await this.req.get("community/comments", ia, {
2399
2222
  ...n,
2400
2223
  params: c(t)
2401
2224
  });
2402
- return a ?? {
2403
- message: o,
2404
- error: r
2225
+ return r ?? {
2226
+ message: i,
2227
+ error: o
2405
2228
  };
2406
2229
  }
2407
2230
  /**
@@ -2410,13 +2233,13 @@ class jr {
2410
2233
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
2411
2234
  */
2412
2235
  async getComment(t, n) {
2413
- const { data: a, code: r, message: o } = await this.req.get("community/comment", or, {
2236
+ const { data: r, code: o, message: i } = await this.req.get("community/comment", oa, {
2414
2237
  ...n,
2415
2238
  params: { comment_id: t }
2416
2239
  });
2417
- return a?.comment ?? {
2418
- message: o,
2419
- error: r
2240
+ return r?.comment ?? {
2241
+ message: i,
2242
+ error: o
2420
2243
  };
2421
2244
  }
2422
2245
  /**
@@ -2426,15 +2249,15 @@ class jr {
2426
2249
  */
2427
2250
  async comment(t, n) {
2428
2251
  await this.token.autoLogin();
2429
- const { data: a, code: r, message: o } = await this.req.post(
2252
+ const { data: r, code: o, message: i } = await this.req.post(
2430
2253
  "community/comment",
2431
2254
  c(t),
2432
- sr,
2255
+ sa,
2433
2256
  n
2434
2257
  );
2435
- return a ?? {
2436
- message: o,
2437
- error: r
2258
+ return r ?? {
2259
+ message: i,
2260
+ error: o
2438
2261
  };
2439
2262
  }
2440
2263
  /**
@@ -2443,13 +2266,13 @@ class jr {
2443
2266
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
2444
2267
  */
2445
2268
  async getReplies(t, n) {
2446
- const { data: a } = await this.req.get("community/replies", nr, {
2269
+ const { data: r } = await this.req.get("community/replies", na, {
2447
2270
  ...n,
2448
2271
  params: c({ max_results: 20, ...t })
2449
2272
  });
2450
2273
  return {
2451
- replies: a?.replies || [],
2452
- next_token: a?.next_token || ""
2274
+ replies: r?.replies || [],
2275
+ next_token: r?.next_token || ""
2453
2276
  };
2454
2277
  }
2455
2278
  /**
@@ -2458,13 +2281,13 @@ class jr {
2458
2281
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
2459
2282
  */
2460
2283
  async getReply(t, n) {
2461
- const { data: a, code: r, message: o } = await this.req.get("community/reply", ar, {
2284
+ const { data: r, code: o, message: i } = await this.req.get("community/reply", ra, {
2462
2285
  ...n,
2463
2286
  params: { reply_id: t }
2464
2287
  });
2465
- return a?.reply ?? {
2466
- message: o,
2467
- error: r
2288
+ return r?.reply ?? {
2289
+ message: i,
2290
+ error: o
2468
2291
  };
2469
2292
  }
2470
2293
  /**
@@ -2474,15 +2297,15 @@ class jr {
2474
2297
  */
2475
2298
  async reply(t, n) {
2476
2299
  await this.token.autoLogin();
2477
- const { data: a, code: r, message: o } = await this.req.post(
2300
+ const { data: r, code: o, message: i } = await this.req.post(
2478
2301
  "community/reply",
2479
2302
  c(t),
2480
- rr,
2303
+ aa,
2481
2304
  n
2482
2305
  );
2483
- return a ?? {
2484
- message: o,
2485
- error: r
2306
+ return r ?? {
2307
+ message: i,
2308
+ error: o
2486
2309
  };
2487
2310
  }
2488
2311
  /**
@@ -2492,15 +2315,15 @@ class jr {
2492
2315
  */
2493
2316
  async like(t, n) {
2494
2317
  await this.token.autoLogin();
2495
- const { ok: a, code: r, message: o } = await this.req.post(
2318
+ const { ok: r, code: o, message: i } = await this.req.post(
2496
2319
  "community/like",
2497
2320
  { ...t, action: "like" },
2498
2321
  null,
2499
2322
  n
2500
2323
  );
2501
- return a || {
2502
- message: o,
2503
- error: r
2324
+ return r || {
2325
+ message: i,
2326
+ error: o
2504
2327
  };
2505
2328
  }
2506
2329
  /**
@@ -2510,15 +2333,15 @@ class jr {
2510
2333
  */
2511
2334
  async unlike(t, n) {
2512
2335
  await this.token.autoLogin();
2513
- const { ok: a, code: r, message: o } = await this.req.post(
2336
+ const { ok: r, code: o, message: i } = await this.req.post(
2514
2337
  "community/like",
2515
2338
  { ...t, action: "unlike" },
2516
2339
  null,
2517
2340
  n
2518
2341
  );
2519
- return a || {
2520
- message: o,
2521
- error: r
2342
+ return r || {
2343
+ message: i,
2344
+ error: o
2522
2345
  };
2523
2346
  }
2524
2347
  /**
@@ -2528,11 +2351,11 @@ class jr {
2528
2351
  */
2529
2352
  async getMediaPresignedUrl(t, n) {
2530
2353
  await this.token.autoLogin();
2531
- const { data: a } = await this.req.get("community/media-presign-url", cr, {
2354
+ const { data: r } = await this.req.get("community/media-presign-url", ca, {
2532
2355
  ...n,
2533
2356
  params: t
2534
2357
  });
2535
- return a;
2358
+ return r;
2536
2359
  }
2537
2360
  /**
2538
2361
  * 获取用户社区通知
@@ -2543,13 +2366,13 @@ class jr {
2543
2366
  */
2544
2367
  async getNotifications(t, n) {
2545
2368
  await this.token.autoLogin();
2546
- const { data: a } = await this.req.get("community/notifications", ur, {
2369
+ const { data: r } = await this.req.get("community/notifications", ua, {
2547
2370
  ...n,
2548
2371
  params: c({ max_results: 20, ...t })
2549
2372
  });
2550
2373
  return {
2551
- notifications: a?.notifications || [],
2552
- next_token: a?.next_token || ""
2374
+ notifications: r?.notifications || [],
2375
+ next_token: r?.next_token || ""
2553
2376
  };
2554
2377
  }
2555
2378
  /**
@@ -2561,7 +2384,7 @@ class jr {
2561
2384
  if (!await this.token.autoLogin()) return null;
2562
2385
  const { data: n } = await this.req.get(
2563
2386
  "community/unread-notifications-count",
2564
- lr,
2387
+ la,
2565
2388
  t
2566
2389
  );
2567
2390
  return n;
@@ -2573,21 +2396,21 @@ class jr {
2573
2396
  */
2574
2397
  async clearUnreadNotifications(t, n) {
2575
2398
  if (!await this.token.autoLogin()) return !1;
2576
- const { ok: a } = await this.req.post("community/clear-unread-notifications", { category: t }, null, n);
2577
- return a;
2399
+ const { ok: r } = await this.req.post("community/clear-unread-notifications", { category: t }, null, n);
2400
+ return r;
2578
2401
  }
2579
2402
  }
2580
- const mr = i({
2403
+ const ma = s({
2581
2404
  nonce_str: e.string(),
2582
2405
  timestamp: e.number(),
2583
2406
  signature: e.string()
2584
2407
  });
2585
- var dr = /* @__PURE__ */ ((s) => (s.RedirectUriDisMatch = "10003", s.AppidError = "10016", s.AuthorizationError = "10015", s.NoRightForScope = "10005", s.Frequently = "10009", s.AppBanded = "10004", s.ShouldFollow = "10006", s.ScopeNull = "10010", s.RedirectUriNull = "10011", s.AppidNull = "10012", s.StateNull = "10013", s))(dr || {});
2586
- function x(s) {
2587
- return y(s, "open_id", "union_id", "weixin_token");
2408
+ var da = /* @__PURE__ */ ((a) => (a.RedirectUriDisMatch = "10003", a.AppidError = "10016", a.AuthorizationError = "10015", a.NoRightForScope = "10005", a.Frequently = "10009", a.AppBanded = "10004", a.ShouldFollow = "10006", a.ScopeNull = "10010", a.RedirectUriNull = "10011", a.AppidNull = "10012", a.StateNull = "10013", a))(da || {});
2409
+ function q(a) {
2410
+ return y(a, "open_id", "union_id", "weixin_token");
2588
2411
  }
2589
- const H = "wx_login_cache";
2590
- class Tr {
2412
+ const K = "wx_login_cache";
2413
+ class oo {
2591
2414
  token;
2592
2415
  $appid;
2593
2416
  req;
@@ -2618,11 +2441,11 @@ class Tr {
2618
2441
  * 也可以直接调用 login 方法,并传入 weixin code 的读取函数
2619
2442
  */
2620
2443
  async getLoginCache() {
2621
- const t = this.token.storage.get(H);
2444
+ const t = this.token.storage.get(K);
2622
2445
  if (!t)
2623
2446
  return null;
2624
- const n = he(t);
2625
- return x(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2447
+ const n = fe(t);
2448
+ return q(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2626
2449
  }
2627
2450
  /**
2628
2451
  * 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
@@ -2642,20 +2465,20 @@ class Tr {
2642
2465
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
2643
2466
  */
2644
2467
  async login(t) {
2645
- if (!f())
2468
+ if (!h())
2646
2469
  throw new Error("当前环境非微信小程序");
2647
2470
  const n = await this.getLoginCache();
2648
2471
  if (n)
2649
2472
  return n;
2650
- const a = await ve(), { data: r, code: o, message: d } = await this.req.post(
2473
+ const r = await ve(), { data: o, code: i, message: d } = await this.req.post(
2651
2474
  "weixin/login",
2652
- { code: a, appid: this.appid },
2653
- x,
2475
+ { code: r, appid: this.appid },
2476
+ q,
2654
2477
  { ...t, message: !1 }
2655
2478
  );
2656
- return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(H, JSON.stringify(r))), r ?? {
2479
+ return o && (this.token.weixinToken = o.weixin_token, this.token.storage.set(K, JSON.stringify(o))), o ?? {
2657
2480
  message: d,
2658
- error: o
2481
+ error: i
2659
2482
  };
2660
2483
  }
2661
2484
  /**
@@ -2675,27 +2498,27 @@ class Tr {
2675
2498
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
2676
2499
  */
2677
2500
  async webLogin(t = "snsapi_userinfo", n) {
2678
- const a = L("code"), r = Date.now(), o = +L("state");
2679
- if (!a || !o || o < r - 1e3 * 60 * 5 || o > r) {
2680
- const le = G(["code", "state"]);
2501
+ const r = x("code"), o = Date.now(), i = +x("state");
2502
+ if (!r || !i || i < o - 1e3 * 60 * 5 || i > o) {
2503
+ const le = O(["code", "state"]);
2681
2504
  location.replace(
2682
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${r}#wechat_redirect`
2505
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${o}#wechat_redirect`
2683
2506
  );
2684
2507
  return;
2685
2508
  }
2686
- if (/^100\d{2}$/.test(a))
2509
+ if (/^100\d{2}$/.test(r))
2687
2510
  return {
2688
- message: "Error: " + a,
2689
- error: a
2511
+ message: "Error: " + r,
2512
+ error: r
2690
2513
  };
2691
- const d = G(["code", "state"]);
2514
+ const d = O(["code", "state"]);
2692
2515
  "replaceState" in history && history.replaceState({}, "", d);
2693
2516
  const {
2694
- data: g,
2517
+ data: b,
2695
2518
  code: ce,
2696
2519
  message: ue
2697
- } = await this.req.post("weixin/login", { code: a, appid: this.appid }, x, n);
2698
- return g && (this.token.weixinToken = g.weixin_token, await this.token.autoLogin()), g ?? {
2520
+ } = await this.req.post("weixin/login", { code: r, appid: this.appid }, q, n);
2521
+ return b && (this.token.weixinToken = b.weixin_token, await this.token.autoLogin()), b ?? {
2699
2522
  message: ue,
2700
2523
  error: ce
2701
2524
  };
@@ -2712,14 +2535,14 @@ class Tr {
2712
2535
  * @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
2713
2536
  * @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
2714
2537
  */
2715
- async linkPlayer(t, n, a) {
2538
+ async linkPlayer(t, n, r) {
2716
2539
  if (!t || !n)
2717
2540
  return !1;
2718
- const { ok: r } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: n }, null, {
2719
- ...a,
2541
+ const { ok: o } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: n }, null, {
2542
+ ...r,
2720
2543
  message: !1
2721
2544
  });
2722
- return r;
2545
+ return o;
2723
2546
  }
2724
2547
  /**
2725
2548
  * 获取集成 JSSDK 所需的签名信息
@@ -2727,7 +2550,7 @@ class Tr {
2727
2550
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
2728
2551
  */
2729
2552
  async getJSSDKConfig(t) {
2730
- const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", mr, {
2553
+ const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", ma, {
2731
2554
  ...t,
2732
2555
  params: {
2733
2556
  appid: this.appid,
@@ -2744,17 +2567,17 @@ class Tr {
2744
2567
  }
2745
2568
  export {
2746
2569
  se as AntispamValidator,
2747
- br as AuthToken,
2748
- Wn as CandidateVoteValidator,
2749
- ae as CashbackEngagementDataValidator,
2750
- Tn as ClaimActivationKeyEngagementDataValidator,
2570
+ ba as AuthToken,
2571
+ Kn as CandidateVoteValidator,
2572
+ ne as CashbackEngagementDataValidator,
2573
+ wn as ClaimActivationKeyEngagementDataValidator,
2751
2574
  ct as ClaimRewardStatus,
2752
- S as ClaimRewardStatusValidator,
2753
- ua as ClaimedItemValidator,
2754
- Z as ClubAddressValidator,
2755
- hr as ClubApi,
2756
- X as ClubBenefitSummaryValidator,
2757
- Ge as ClubBenefitValidator,
2575
+ U as ClaimRewardStatusValidator,
2576
+ nr as ClaimedItemValidator,
2577
+ J as ClubAddressValidator,
2578
+ fa as ClubApi,
2579
+ Z as ClubBenefitSummaryValidator,
2580
+ Oe as ClubBenefitValidator,
2758
2581
  Te as ClubCreditChangeScene,
2759
2582
  qe as ClubCreditChangeSceneValidator,
2760
2583
  Ve as ClubCreditChangeType,
@@ -2762,152 +2585,184 @@ export {
2762
2585
  Ae as ClubCreditLogValidator,
2763
2586
  Se as ClubGlobalConfigValidator,
2764
2587
  xe as ClubItemType,
2765
- z as ClubItemTypeValidator,
2588
+ H as ClubItemTypeValidator,
2766
2589
  Pe as ClubPlayerValidator,
2767
- Y as ClubProductValidator,
2590
+ X as ClubProductValidator,
2768
2591
  Le as ClubRedemptionStatus,
2769
2592
  Ue as ClubRedemptionStatusValidator,
2770
2593
  De as ClubUserCreditValidator,
2771
2594
  Ie as ClubUserProfileValidator,
2772
- na as CommentEngagementValidator,
2595
+ Jn as CommentEngagementValidator,
2773
2596
  k as CommentValidator,
2774
- jr as CommunityApi,
2775
- ea as ConversationValidator,
2597
+ ao as CommunityApi,
2598
+ Hn as ConversationValidator,
2776
2599
  et as EngageAccountType,
2777
2600
  tt as EngageAccountTypeValidator,
2778
- ca as EngageResponseValidator,
2779
- ra as EngageRewardValidator,
2780
- Cr as EventApi,
2781
- jn as EventConfigValidator,
2601
+ tr as EngageResponseValidator,
2602
+ Xn as EngageRewardValidator,
2603
+ ha as EventApi,
2604
+ ur as EventConfigValidator,
2782
2605
  Vt as EventFeatureConfigOfCashbackValidator,
2783
2606
  Tt as EventFeatureConfigOfCheckInValidator,
2784
2607
  xt as EventFeatureConfigOfClaimActivationKeyValidator,
2785
2608
  Ut as EventFeatureConfigOfClaimRewardsValidator,
2786
2609
  Pt as EventFeatureConfigOfCommentValidator,
2787
- $t as EventFeatureConfigOfFollowValidator,
2610
+ Et as EventFeatureConfigOfFollowValidator,
2788
2611
  Dt as EventFeatureConfigOfGiftCodeValidator,
2789
- Gt as EventFeatureConfigOfInviteValidator,
2612
+ Ot as EventFeatureConfigOfInviteValidator,
2790
2613
  Nt as EventFeatureConfigOfInvitedRegisterValidator,
2791
2614
  zt as EventFeatureConfigOfLotteryDrawValidator,
2792
2615
  Kt as EventFeatureConfigOfLotteryValidator,
2793
2616
  Zt as EventFeatureConfigOfPreregisterValidator,
2794
2617
  Yt as EventFeatureConfigOfQuestValidator,
2795
2618
  tn as EventFeatureConfigOfRedeemValidator,
2796
- an as EventFeatureConfigOfRegisterValidator,
2619
+ rn as EventFeatureConfigOfRegisterValidator,
2797
2620
  on as EventFeatureConfigOfShareValidator,
2798
2621
  cn as EventFeatureConfigOfSubscribeValidator,
2799
2622
  ln as EventFeatureConfigOfSurveyValidator,
2800
2623
  dn as EventFeatureConfigOfTeamValidator,
2801
2624
  bn as EventFeatureConfigOfUgcLikeValidator,
2802
2625
  pn as EventFeatureConfigOfUgcValidator,
2803
- vn as EventFeatureConfigOfVote2Validator,
2804
- fn as EventFeatureConfigOfVoteValidator,
2805
- Vn as EventFeatureConfigValidator,
2626
+ or as EventFeatureConfigOfVote2Validator,
2627
+ hn as EventFeatureConfigOfVoteValidator,
2628
+ cr as EventFeatureConfigValidator,
2806
2629
  nt as EventPeriodType,
2807
- at as EventPeriodTypeValidator,
2808
- p as EventRewardItemConfigValidator,
2630
+ rt as EventPeriodTypeValidator,
2631
+ g as EventRewardItemConfigValidator,
2809
2632
  Ne as ExtraGameRewardValidator,
2810
- Oe as ExtraPhysicalShipmentValidator,
2633
+ Ge as ExtraPhysicalShipmentValidator,
2811
2634
  en as FeatureRedeemItemConfigValidator,
2812
2635
  Rt as FeatureRewardValidator,
2813
2636
  u as FeatureType,
2814
- rt as FeatureTypeValidator,
2815
- $a as ForumMode,
2816
- Fa as ForumModeValidator,
2637
+ at as FeatureTypeValidator,
2638
+ Er as ForumMode,
2639
+ Fr as ForumModeValidator,
2817
2640
  ie as ForumValidator,
2818
2641
  v as GamerItemType,
2819
- W as GamerItemTypeValidator,
2642
+ Y as GamerItemTypeValidator,
2820
2643
  Re as Gender,
2821
2644
  Ce as GenderValidator,
2822
- qn as GiftCodeEngagementDataValidator,
2823
- xn as InviteEngagementDataValidator,
2645
+ kn as GiftCodeEngagementDataValidator,
2646
+ vn as InviteEngagementDataValidator,
2824
2647
  gt as LotteryDrawAction,
2825
- vr as LotteryDrawActionValidator,
2826
- Pn as LotteryDrawEngagementDataValidator,
2827
- Ln as LotteryEngagementDataValidator,
2648
+ Ra as LotteryDrawActionValidator,
2649
+ jn as LotteryDrawEngagementDataValidator,
2650
+ Rn as LotteryEngagementDataValidator,
2828
2651
  w as LotteryTicketStatus,
2829
- wr as LotteryTicketStatusValidator,
2830
- _ as NotificationBaseValidator,
2831
- Da as NotificationCategory,
2832
- Vr as NotificationCategoryValidator,
2833
- Ka as NotificationCommentReplyValidator,
2834
- Ha as NotificationCommentValidator,
2652
+ ka as LotteryTicketStatusValidator,
2653
+ p as NotificationBaseValidator,
2654
+ Dr as NotificationCategory,
2655
+ ro as NotificationCategoryValidator,
2656
+ Kr as NotificationCommentReplyValidator,
2657
+ Hr as NotificationCommentValidator,
2835
2658
  V as NotificationPayloadCommentValidator,
2836
2659
  D as NotificationPayloadPostValidator,
2837
2660
  A as NotificationPayloadReplyValidator,
2838
- Na as NotificationPayloadSystemValidator,
2839
- Ma as NotificationPostCommentValidator,
2840
- Ba as NotificationPostValidator,
2841
- za as NotificationReplyRepliedValidator,
2842
- Ja as NotificationReplyValidator,
2843
- Qa as NotificationSystemValidator,
2661
+ Nr as NotificationPayloadSystemValidator,
2662
+ Mr as NotificationPostCommentValidator,
2663
+ Br as NotificationPostValidator,
2664
+ zr as NotificationReplyRepliedValidator,
2665
+ Jr as NotificationReplyValidator,
2666
+ Qr as NotificationSystemValidator,
2844
2667
  m as NotificationType,
2845
- Aa as NotificationTypeValidator,
2846
- Za as NotificationValidator,
2668
+ Ar as NotificationTypeValidator,
2669
+ Zr as NotificationValidator,
2847
2670
  Fe as PlayerRoleCardValidator,
2848
- J as PlayerRoleValidator,
2849
- Ia as PostStatus,
2671
+ z as PlayerRoleValidator,
2672
+ Ir as PostStatus,
2850
2673
  oe as PostStatusValidator,
2851
2674
  I as PostValidator,
2852
- En as PreregisterEngagementDataValidator,
2853
- Oa as PresignedUrlResponseValidator,
2854
- $n as QuestEngagementDataValidator,
2675
+ Tn as PreregisterEngagementDataValidator,
2676
+ Gr as PresignedUrlResponseValidator,
2677
+ qn as QuestEngagementDataValidator,
2855
2678
  ot as QuestObjective,
2856
- te as QuestObjectiveValidator,
2679
+ ee as QuestObjectiveValidator,
2857
2680
  pt as QuestProgressAlgorithm,
2858
2681
  _t as QuestProgressAlgorithmValidator,
2859
- Fn as QuestProgressValidator,
2860
- In as RedeemEngagementDataValidator,
2861
- yr as RedeemParamsValidator,
2862
- Dn as RedeemStocksResponseValidator,
2682
+ xn as QuestProgressValidator,
2683
+ Ln as RedeemEngagementDataValidator,
2684
+ ya as RedeemParamsValidator,
2685
+ Un as RedeemStocksResponseValidator,
2863
2686
  Qe as RedemptionValidator,
2864
2687
  vt as RegularRewardValidator,
2865
- Ga as ReplyToValidator,
2688
+ Or as ReplyToValidator,
2866
2689
  C as ReplyValidator,
2867
- fr as RewardItemType,
2868
- ee as RewardItemTypeValidator,
2690
+ wa as RewardItemType,
2691
+ W as RewardItemTypeValidator,
2869
2692
  ut as RewardSource,
2870
- P as RewardSourceValidator,
2871
- b as RewardStatus,
2872
- ne as RewardStatusValidator,
2873
- aa as RewardValidator,
2874
- $e as RoleBaseInfoValidator,
2875
- Ee as ServerBaseInfoValidator,
2876
- An as ShareEngagementDataValidator,
2877
- On as SurveyEngagementDataValidator,
2693
+ S as RewardSourceValidator,
2694
+ _ as RewardStatus,
2695
+ te as RewardStatusValidator,
2696
+ Zn as RewardValidator,
2697
+ Ee as RoleBaseInfoValidator,
2698
+ $e as ServerBaseInfoValidator,
2699
+ Sn as ShareEngagementDataValidator,
2700
+ $n as SurveyEngagementDataValidator,
2878
2701
  dt as TeamAction,
2879
- kr as TeamActionValidator,
2880
- Qn as TeamEngagementDataValidator,
2881
- Nn as TeamEngagementValidator,
2882
- Rr as TeamMemberValidator,
2702
+ va as TeamActionValidator,
2703
+ Fn as TeamEngagementDataValidator,
2704
+ En as TeamEngagementValidator,
2705
+ Ca as TeamMemberValidator,
2883
2706
  lt as TeamVisibility,
2884
2707
  mt as TeamVisibilityValidator,
2885
2708
  F as TopicValidator,
2886
- Hn as UgcCountResponseValidator,
2887
- Bn as UgcEngagementDataValidator,
2888
- Jn as UgcLeaderboardResponseValidator,
2889
- Mn as UgcRecordBaseResponseValidator,
2890
- Kn as UgcRecordResponseValidator,
2891
- ft as UgcReviewStatus,
2709
+ On as UgcCountResponseValidator,
2710
+ In as UgcEngagementDataValidator,
2711
+ Nn as UgcLeaderboardResponseValidator,
2712
+ Dn as UgcRecordBaseResponseValidator,
2713
+ An as UgcRecordResponseValidator,
2714
+ ht as UgcReviewStatus,
2892
2715
  wt as UgcReviewStatusValidator,
2893
- ht as UgcSocialMedia,
2894
- E as UgcSocialMediaValidator,
2895
- zn as UgcUploadImageValidator,
2716
+ ft as UgcSocialMedia,
2717
+ P as UgcSocialMediaValidator,
2718
+ Gn as UgcUploadImageValidator,
2896
2719
  $ as UserEngagementDataValidator,
2897
- oa as UserEngagementValidator,
2898
- sa as UserFeatureStatusValidator,
2720
+ Yn as UserEngagementValidator,
2721
+ er as UserFeatureStatusValidator,
2899
2722
  R as UserRewardValidator,
2900
- ia as VerifyMobileResultValidator,
2901
- Yn as Vote2ClaimRewardsResponseValidator,
2902
- Xn as Vote2EngagementDataValidator,
2723
+ Wn as VerifyMobileResultValidator,
2724
+ Mn as Vote2ClaimRewardsResponseValidator,
2725
+ Bn as Vote2EngagementDataValidator,
2903
2726
  bt as Vote2RewardType,
2904
2727
  yt as Vote2RewardTypeValidator,
2905
- Zn as VoteEngagementDataValidator,
2728
+ Qn as VoteEngagementDataValidator,
2906
2729
  it as VoteOptionSource,
2907
2730
  st as VoteOptionSourceValidator,
2908
- Tr as WeixinApi,
2909
- Gn as WeixinSubscribeEngagementDataValidator,
2910
- dr as WeixinWebLoginErrorCode,
2911
- ta as ZeroChatGPTDataValidator,
2912
- mr as isWeixinSignResponse
2731
+ oo as WeixinApi,
2732
+ Pn as WeixinSubscribeEngagementDataValidator,
2733
+ da as WeixinWebLoginErrorCode,
2734
+ zn as ZeroChatGPTDataValidator,
2735
+ Ea as claimRewards,
2736
+ Ka as claimRewardsV2,
2737
+ Ha as claimWeixinHongbao,
2738
+ $a as engage,
2739
+ Aa as generateUnlimitQrcode,
2740
+ Qa as getCashbackQuery,
2741
+ ja as getConfig,
2742
+ xa as getEngagements,
2743
+ qa as getEngagementsCount,
2744
+ Ta as getEngagementsUserCount,
2745
+ Da as getParamsByQrcodeScene,
2746
+ Oa as getQuestProgress,
2747
+ no as getRedeemItemStocks,
2748
+ to as getUgcLeaderboard,
2749
+ Ma as getUgcMyCount,
2750
+ Wa as getUgcRecommendation,
2751
+ Ba as getUgcRecord,
2752
+ eo as getUgcs,
2753
+ Ia as getUnlimitQrcodeScene,
2754
+ Sa as getUserEngagementCount,
2755
+ Pa as getUserEngagements,
2756
+ Ua as getUserFeatureStatus,
2757
+ Xa as getUserItemCount,
2758
+ Ja as getUserRewards,
2759
+ Za as getUserRewardsCount,
2760
+ Na as getVote2Leaderboard,
2761
+ ma as isWeixinSignResponse,
2762
+ Fa as submitUserRewardAddress,
2763
+ Ya as ugcUploadImage,
2764
+ za as verifyActivationKey,
2765
+ Va as verifyMobileAllowed,
2766
+ La as visit,
2767
+ Ga as vote2Rewards
2913
2768
  };