@seayoo-web/gamer-api 2.4.4 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,80 +1,77 @@
1
- var me = Object.defineProperty;
2
- var de = (a, t, r) => t in a ? me(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
3
- var m = (a, t, r) => de(a, typeof t != "symbol" ? t + "" : t, r);
4
- import { isComboWebView as ge } from "@seayoo-web/combo-webview";
5
- import { isPlainObject as R, useConsole as pe, Support as y, usePromise as _e, pruneURL as be, queryString as P, pruneObject as c, v as e, omitFields as V, typedObjectGuard as s, parseJSON as ye, removePara as B } from "@seayoo-web/utils";
6
- function fe(a) {
7
- return R(a, "gamer_token") && typeof a.gamer_token == "string";
1
+ import { isComboWebView as le } from "@seayoo-web/combo-webview";
2
+ import { isPlainObject as C, useConsole as me, Support as b, usePromise as de, pruneURL as ge, queryString as E, pruneObject as c, v as e, omitFields as R, typedObjectGuard as s, parseJSON as pe, removePara as B } from "@seayoo-web/utils";
3
+ function _e(o) {
4
+ return C(o, "gamer_token") && typeof o.gamer_token == "string";
8
5
  }
9
- function M(a) {
10
- return R(a);
6
+ function M(o) {
7
+ return C(o);
11
8
  }
12
- const w = pe("GamerApiSDK");
13
- function he(a) {
14
- return /^\/[a-z\d-]+$/.test(a);
9
+ const h = me("GamerApiSDK");
10
+ function be(o) {
11
+ return /^\/[a-z\d-]+$/.test(o);
15
12
  }
16
- async function we() {
17
- const { promise: a, resolve: t } = _e();
13
+ async function ye() {
14
+ const { promise: o, resolve: t } = de();
18
15
  return wx.login({
19
- success(r) {
20
- t(r.code);
16
+ success(n) {
17
+ t(n.code);
21
18
  },
22
19
  fail() {
23
20
  t("");
24
21
  }
25
- }), await a;
22
+ }), await o;
26
23
  }
27
- const ke = {
28
- get(a) {
29
- return localStorage.getItem(a) || "";
24
+ const fe = {
25
+ get(o) {
26
+ return localStorage.getItem(o) || "";
30
27
  },
31
- set(a, t) {
32
- localStorage.setItem(a, t);
28
+ set(o, t) {
29
+ localStorage.setItem(o, t);
33
30
  },
34
- remove(a) {
35
- localStorage.removeItem(a);
31
+ remove(o) {
32
+ localStorage.removeItem(o);
36
33
  }
37
- }, ve = {
38
- get(a) {
34
+ }, he = {
35
+ get(o) {
39
36
  try {
40
- if (y.wx) return wx.getStorageSync(a) || "";
37
+ if (b.wx) return wx.getStorageSync(o) || "";
41
38
  } catch (t) {
42
- w.error("getStorageSyncError", t);
39
+ h.error("getStorageSyncError", t);
43
40
  }
44
41
  return "";
45
42
  },
46
- set(a, t) {
43
+ set(o, t) {
47
44
  try {
48
- y.wx && wx.setStorageSync(a, t);
49
- } catch (r) {
50
- w.error("setStorageSyncError", r);
45
+ b.wx && wx.setStorageSync(o, t);
46
+ } catch (n) {
47
+ h.error("setStorageSyncError", n);
51
48
  }
52
49
  },
53
- remove(a) {
50
+ remove(o) {
54
51
  try {
55
- y.wx && wx.removeStorageSync(a);
52
+ b.wx && wx.removeStorageSync(o);
56
53
  } catch (t) {
57
- w.error("removeStorageSync", t);
54
+ h.error("removeStorageSync", t);
58
55
  }
59
56
  }
60
- }, k = "gamer_token";
61
- class Rr {
62
- constructor(t, r) {
63
- m(this, "$NetRequest");
64
- m(this, "$idToken", "");
65
- m(this, "$weixinToken", "");
66
- m(this, "$gamerToken", "");
67
- m(this, "req");
68
- m(this, "storage");
69
- this.storage = y.wx ? ve : ke;
70
- const n = he(t) ? t : `https://${be(t)}`;
71
- this.$NetRequest = r, this.req = r({
72
- baseURL: `${n}/v1`,
57
+ }, w = "gamer_token";
58
+ class kr {
59
+ $NetRequest;
60
+ $idToken = "";
61
+ $weixinToken = "";
62
+ $gamerToken = "";
63
+ req;
64
+ storage;
65
+ constructor(t, n) {
66
+ this.storage = b.wx ? he : fe;
67
+ const r = be(t) ? t : `https://${ge(t)}`;
68
+ this.$NetRequest = n, this.req = n({
69
+ baseURL: `${r}/v1`,
73
70
  timeout: 1e4,
74
71
  maxRetry: 2,
75
72
  retryInterval: "2EB",
76
- retryResolve({ method: d, status: g }) {
77
- return d === "GET" && g < 0;
73
+ retryResolve({ method: d, status: l }) {
74
+ return d === "GET" && l < 0;
78
75
  },
79
76
  responseRule: {
80
77
  ok: { resolve: "body" },
@@ -89,22 +86,22 @@ class Rr {
89
86
  this.$gamerToken && (d.headers.Authorization = `Bearer ${this.$gamerToken}`);
90
87
  }
91
88
  });
92
- const i = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = P("gamer_token");
93
- (ge() || i && o) && (this.$gamerToken = o), this.$gamerToken || this.loadGamerTokenCache();
89
+ const a = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), i = E("gamer_token");
90
+ (le() || a && i) && (this.$gamerToken = i), this.$gamerToken || this.loadGamerTokenCache();
94
91
  }
95
92
  get NetRequest() {
96
93
  return this.$NetRequest;
97
94
  }
98
95
  loadGamerTokenCache() {
99
- const r = this.storage.get(k).match(/^(\d{12,})#(.{8,})$/);
100
- if (r) {
101
- const n = parseInt(r[1]), i = r[2];
102
- if (n > Date.now() - (24 * 3600 - 10) * 1e3) {
103
- this.$gamerToken = i;
96
+ const n = this.storage.get(w).match(/^(\d{12,})#(.{8,})$/);
97
+ if (n) {
98
+ const r = parseInt(n[1]), a = n[2];
99
+ if (r > Date.now() - (24 * 3600 - 10) * 1e3) {
100
+ this.$gamerToken = a;
104
101
  return;
105
102
  }
106
103
  }
107
- this.storage.remove(k);
104
+ this.storage.remove(w);
108
105
  }
109
106
  /** 当前是否为登录状态,即是否拥有 gamerToken */
110
107
  get isLoggedIn() {
@@ -138,7 +135,7 @@ class Rr {
138
135
  * 直接写入 Gamer Token,并更新缓存
139
136
  */
140
137
  set gamerToken(t) {
141
- this.$gamerToken = t, t ? this.storage.set(k, `${Date.now()}#${t}`) : this.storage.remove(k);
138
+ this.$gamerToken = t, t ? this.storage.set(w, `${Date.now()}#${t}`) : this.storage.remove(w);
142
139
  }
143
140
  /**
144
141
  * 退出登录,销毁相关 Token
@@ -166,13 +163,13 @@ class Rr {
166
163
  if (this.gamerToken)
167
164
  return !0;
168
165
  if (!this.idToken)
169
- return w.error("Missing idToken when call autoLogin()"), !1;
170
- if (y.wx && !this.weixinToken)
171
- return w.error("Missing weixinToken when call autoLogin()"), !1;
172
- const { code: t, data: r } = await this.req.post(
166
+ return h.error("Missing idToken when call autoLogin()"), !1;
167
+ if (b.wx && !this.weixinToken)
168
+ return h.error("Missing weixinToken when call autoLogin()"), !1;
169
+ const { code: t, data: n } = await this.req.post(
173
170
  "login-with-token",
174
- c({ id_token: this.idToken, weixin_token: y.wx ? this.weixinToken : null }),
175
- fe,
171
+ c({ id_token: this.idToken, weixin_token: b.wx ? this.weixinToken : null }),
172
+ _e,
176
173
  { message: !1 }
177
174
  );
178
175
  switch (t) {
@@ -183,7 +180,7 @@ class Rr {
183
180
  this.weixinToken = "";
184
181
  break;
185
182
  }
186
- return this.gamerToken = (r == null ? void 0 : r.gamer_token) || "", !!this.gamerToken;
183
+ return this.gamerToken = n?.gamer_token || "", !!this.gamerToken;
187
184
  }
188
185
  /**
189
186
  * 获取当前登录用户的 Session 的信息
@@ -206,25 +203,25 @@ class Rr {
206
203
  */
207
204
  async authRealName(t) {
208
205
  if (!await this.autoLogin()) return null;
209
- const { data: r } = await this.req.post("auth-real-name", c(t), M);
210
- return r;
206
+ const { data: n } = await this.req.post("auth-real-name", c(t), M);
207
+ return n;
211
208
  }
212
209
  }
213
- const Ce = {
210
+ const we = {
214
211
  /** 未知 */
215
212
  Unknown: "unknown",
216
213
  /** 男 */
217
214
  Male: "male",
218
215
  /** 女 */
219
216
  Female: "female"
220
- }, Re = e.string().enum(Ce).lock(), Ve = {
217
+ }, ke = e.string().enum(we).lock(), ve = {
221
218
  /** 积分增加 */
222
219
  Increase: "increase",
223
220
  /** 积分减少 */
224
221
  Decrease: "decrease",
225
222
  /** 积分过期 */
226
223
  Expired: "expired"
227
- }, je = e.string().enum(Ve).lock(), Te = {
224
+ }, Ce = e.string().enum(ve).lock(), Re = {
228
225
  /** 游戏内购买 */
229
226
  Order: "order",
230
227
  /** 游戏内消耗 */
@@ -237,21 +234,21 @@ const Ce = {
237
234
  Admin: "admin",
238
235
  /** 运营活动 */
239
236
  Event: "event"
240
- }, qe = e.string().enum(Te).lock(), xe = {
237
+ }, Ve = e.string().enum(Re).lock(), je = {
241
238
  /** 游戏内奖励 */
242
239
  GameReward: "game_reward",
243
240
  /** 实物商品 */
244
241
  Physical: "physical",
245
242
  /** 虚拟商品 */
246
243
  Virtual: "virtual"
247
- }, X = e.string().enum(xe).lock(), Se = {
244
+ }, X = e.string().enum(je).lock(), Te = {
248
245
  /** 待发放 */
249
246
  Pending: "pending",
250
247
  /** 已发放 */
251
248
  Issued: "issued",
252
249
  /** 发放失败 */
253
250
  Failed: "failed"
254
- }, Le = e.string().enum(Se).lock(), Ee = e.object({
251
+ }, qe = e.string().enum(Te).lock(), xe = e.object({
255
252
  default_avatar_url: e.string(),
256
253
  official_avatar_urls: e.array(e.string()),
257
254
  default_nickname: e.string(),
@@ -269,7 +266,7 @@ const Ce = {
269
266
  exp_description: e.string(),
270
267
  credit_description: e.string(),
271
268
  send_role_mail_rate_limit: e.number()
272
- }).lock(), Pe = e.object({
269
+ }).lock(), Se = e.object({
273
270
  member_id: e.string(),
274
271
  player_id: e.string(),
275
272
  exp: e.number(),
@@ -278,18 +275,18 @@ const Ce = {
278
275
  credit_expiring: e.number(),
279
276
  level_change_time: e.number(),
280
277
  level_expire_time: e.number()
281
- }).lock(), $e = e.object({
278
+ }).lock(), Le = e.object({
282
279
  server_id: e.string(),
283
280
  server_name: e.string()
284
- }).lock(), Ue = e.object({
281
+ }).lock(), Ee = e.object({
285
282
  role_id: e.string(),
286
283
  role_name: e.string()
287
284
  }).lock(), Y = e.object({
288
- ...Ue.shape,
289
- ...$e.shape,
285
+ ...Ee.shape,
286
+ ...Le.shape,
290
287
  role_level: e.number(),
291
288
  last_login_time: e.number()
292
- }).lock(), Fe = e.object({
289
+ }).lock(), Pe = e.object({
293
290
  ...Y.shape,
294
291
  /** 角色战力 */
295
292
  role_fighting: e.number(),
@@ -299,11 +296,11 @@ const Ce = {
299
296
  kin_name: e.string().optional(),
300
297
  /** 宗门职位 */
301
298
  kin_position: e.string().optional()
302
- }).lock(), De = e.object({
299
+ }).lock(), $e = e.object({
303
300
  name: e.string(),
304
301
  avatar_url: e.string(),
305
302
  bio: e.string(),
306
- gender: Re,
303
+ gender: ke,
307
304
  birthday: e.object({ year: e.number(), month: e.number(), day: e.number() })
308
305
  }).lock(), Z = e.object({
309
306
  address_id: e.number(),
@@ -314,15 +311,15 @@ const Ce = {
314
311
  district: e.string(),
315
312
  address: e.string(),
316
313
  is_default: e.bool()
317
- }).lock(), Ie = e.object({
314
+ }).lock(), Ue = e.object({
318
315
  increased_credit: e.number(),
319
316
  decreased_credit: e.number(),
320
317
  expired_credit: e.number(),
321
318
  balance_credit: e.number()
322
- }).lock(), Ge = e.object({
319
+ }).lock(), Fe = e.object({
323
320
  id: e.number(),
324
- change_type: je,
325
- change_scene: qe,
321
+ change_type: Ce,
322
+ change_scene: Ve,
326
323
  change_credit: e.number(),
327
324
  balance: e.number(),
328
325
  change_time: e.number()
@@ -361,10 +358,10 @@ const Ce = {
361
358
  created_at: e.number(),
362
359
  updated_at: e.number(),
363
360
  redeemable_quantity: e.number().optional()
364
- }).lock(), Ae = e.object({
365
- ...V(W.shape, "tag"),
361
+ }).lock(), De = e.object({
362
+ ...R(W.shape, "tag"),
366
363
  product: ee.clone().optional()
367
- }).lock(), Vr = e.union(
364
+ }).lock(), vr = e.union(
368
365
  e.object({
369
366
  server_id: e.string(),
370
367
  role_id: e.string()
@@ -372,7 +369,7 @@ const Ce = {
372
369
  e.object({
373
370
  address_id: e.number()
374
371
  })
375
- ).satisfies().lock(), Ne = e.object({
372
+ ).satisfies().lock(), Ie = e.object({
376
373
  recipient: e.string(),
377
374
  mobile: e.string(),
378
375
  province: e.string(),
@@ -381,11 +378,11 @@ const Ce = {
381
378
  address: e.string(),
382
379
  express_company: e.string(),
383
380
  express_number: e.string()
384
- }).lock(), Oe = e.object({
381
+ }).lock(), Ae = e.object({
385
382
  server_id: e.string(),
386
383
  role_id: e.string(),
387
384
  role_name: e.string()
388
- }).lock(), Be = e.object({
385
+ }).lock(), Ge = e.object({
389
386
  redemption_id: e.number(),
390
387
  player_id: e.string(),
391
388
  product_id: e.number(),
@@ -396,20 +393,20 @@ const Ce = {
396
393
  catalog_name: e.string(),
397
394
  quantity: e.number(),
398
395
  amount: e.number(),
399
- status: Le,
396
+ status: qe,
400
397
  created_at: e.number(),
401
- extra_data: e.union(Ne.clone(), Oe.clone()).satisfies().optional()
402
- }), Me = e.guard(Ee), Q = s({ player: Pe }), Qe = s({ roles: e.array(Y) }), x = s({ role_card: Fe }), K = e.guard(De), H = e.guard(Z), Ke = s({ addresses: e.array(Z) }), He = e.guard(Ie), ze = s({
403
- credit_logs: e.array(Ge),
398
+ extra_data: e.union(Ie.clone(), Ae.clone()).satisfies().optional()
399
+ }), Ne = e.guard(xe), Q = s({ player: Se }), Oe = s({ roles: e.array(Y) }), q = s({ role_card: Pe }), K = e.guard($e), H = e.guard(Z), Be = s({ addresses: e.array(Z) }), Me = e.guard(Ue), Qe = s({
400
+ credit_logs: e.array(Fe),
404
401
  next_token: e.string().optional()
405
- }), Je = s({ products: e.array(ee) }), Xe = s({ benefits: e.array(W) }), Ye = s({ benefit: Ae }), Ze = s({
406
- redemptions: e.array(Be),
402
+ }), Ke = s({ products: e.array(ee) }), He = s({ benefits: e.array(W) }), ze = s({ benefit: De }), Je = s({
403
+ redemptions: e.array(Ge),
407
404
  next_token: e.string().optional()
408
405
  });
409
- class jr {
406
+ class Cr {
407
+ token;
408
+ req;
410
409
  constructor(t) {
411
- m(this, "token");
412
- m(this, "req");
413
410
  this.token = t, this.req = t.req;
414
411
  }
415
412
  /**
@@ -418,8 +415,8 @@ class jr {
418
415
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=tuhsPt3ihp
419
416
  */
420
417
  async getConfig(t) {
421
- const { data: r } = await this.req.get("club/config", Me, t);
422
- return r;
418
+ const { data: n } = await this.req.get("club/config", Ne, t);
419
+ return n;
423
420
  }
424
421
  /**
425
422
  * 用于游戏内嵌 Web 页面和微信小程序获取当前登录的游戏账号在俱乐部中的信息。
@@ -428,10 +425,10 @@ class jr {
428
425
  */
429
426
  async getCurrentPlayer(t) {
430
427
  await this.token.autoLogin();
431
- const { data: r, code: n, message: i } = await this.req.get("club/current-player", Q, t);
432
- return (r == null ? void 0 : r.player) ?? {
433
- message: i,
434
- error: n
428
+ const { data: n, code: r, message: a } = await this.req.get("club/current-player", Q, t);
429
+ return n?.player ?? {
430
+ message: a,
431
+ error: r
435
432
  };
436
433
  }
437
434
  /**
@@ -441,15 +438,15 @@ class jr {
441
438
  */
442
439
  async linkPlayer(t) {
443
440
  await this.token.autoLogin();
444
- const { data: r, code: n, message: i } = await this.req.post(
441
+ const { data: n, code: r, message: a } = await this.req.post(
445
442
  "club/link-player",
446
443
  { id_token: this.token.idToken },
447
444
  Q,
448
445
  t
449
446
  );
450
- return (r == null ? void 0 : r.player) ?? {
451
- message: i,
452
- error: n
447
+ return n?.player ?? {
448
+ message: a,
449
+ error: r
453
450
  };
454
451
  }
455
452
  /**
@@ -457,35 +454,35 @@ class jr {
457
454
  *
458
455
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=nwu4FiGM9V
459
456
  */
460
- async getRoles(t, r, n) {
457
+ async getRoles(t, n, r) {
461
458
  if (!await this.token.autoLogin()) return [];
462
- const { data: i } = await this.req.get("club/roles", Qe, {
463
- ...n,
464
- params: c({ player_id: t, refresh: r })
459
+ const { data: a } = await this.req.get("club/roles", Oe, {
460
+ ...r,
461
+ params: c({ player_id: t, refresh: n })
465
462
  });
466
- return (i == null ? void 0 : i.roles) || [];
463
+ return a?.roles || [];
467
464
  }
468
465
  /**
469
466
  * 获取俱乐部会员的角色卡片数据
470
467
  *
471
468
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=A1Wr7kUXnS
472
469
  */
473
- async getRoleCard(t, r) {
474
- const { data: n } = await this.req.get("club/role-card", x, {
475
- ...r,
470
+ async getRoleCard(t, n) {
471
+ const { data: r } = await this.req.get("club/role-card", q, {
472
+ ...n,
476
473
  params: { member_id: t }
477
474
  });
478
- return (n == null ? void 0 : n.role_card) ?? null;
475
+ return r?.role_card ?? null;
479
476
  }
480
477
  /**
481
478
  * 设置自己的角色卡片
482
479
  *
483
480
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=XgMf6OFE5i
484
481
  */
485
- async setRoleCard(t, r) {
482
+ async setRoleCard(t, n) {
486
483
  if (!await this.token.autoLogin()) return null;
487
- const { data: n } = await this.req.post("club/role-card", t, x, r);
488
- return (n == null ? void 0 : n.role_card) ?? null;
484
+ const { data: r } = await this.req.post("club/role-card", t, q, n);
485
+ return r?.role_card ?? null;
489
486
  }
490
487
  /**
491
488
  * 强制刷新自己的角色卡片,从游戏内获取最新数据
@@ -494,32 +491,32 @@ class jr {
494
491
  */
495
492
  async refreshRoleCard(t) {
496
493
  if (!await this.token.autoLogin()) return null;
497
- const { data: r } = await this.req.post("club/refresh-role-card", {}, x, t);
498
- return (r == null ? void 0 : r.role_card) ?? null;
494
+ const { data: n } = await this.req.post("club/refresh-role-card", {}, q, t);
495
+ return n?.role_card ?? null;
499
496
  }
500
497
  /**
501
498
  * 获取俱乐部用户的信息
502
499
  *
503
500
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=TMWBCFcOr2
504
501
  */
505
- async getUserProfile(t, r) {
506
- const { data: n } = await this.req.get("club/user-profile", K, {
507
- ...r,
502
+ async getUserProfile(t, n) {
503
+ const { data: r } = await this.req.get("club/user-profile", K, {
504
+ ...n,
508
505
  params: { member_id: t }
509
506
  });
510
- return n;
507
+ return r;
511
508
  }
512
509
  /**
513
510
  * 修改自己的俱乐部用户信息
514
511
  *
515
512
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=Qt822A57jd
516
513
  */
517
- async updateUserProfile(t, r) {
514
+ async updateUserProfile(t, n) {
518
515
  await this.token.autoLogin();
519
- const { data: n, code: i, message: o } = await this.req.post("club/user-profile", t, K, r);
520
- return n ?? {
521
- message: o,
522
- error: i
516
+ const { data: r, code: a, message: i } = await this.req.post("club/user-profile", t, K, n);
517
+ return r ?? {
518
+ message: i,
519
+ error: a
523
520
  };
524
521
  }
525
522
  /**
@@ -529,35 +526,35 @@ class jr {
529
526
  */
530
527
  async getAddresses(t) {
531
528
  if (!await this.token.autoLogin()) return [];
532
- const { data: r } = await this.req.get("club/addresses", Ke, t);
533
- return (r == null ? void 0 : r.addresses) ?? [];
529
+ const { data: n } = await this.req.get("club/addresses", Be, t);
530
+ return n?.addresses ?? [];
534
531
  }
535
532
  /**
536
533
  * 增加俱乐部收货地址
537
534
  *
538
535
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=TaGIIYDRYA
539
536
  */
540
- async addAddress(t, r) {
537
+ async addAddress(t, n) {
541
538
  if (!await this.token.autoLogin()) return null;
542
- const { data: n } = await this.req.post("/club/add-address", c(t), H, r);
543
- return n;
539
+ const { data: r } = await this.req.post("/club/add-address", c(t), H, n);
540
+ return r;
544
541
  }
545
542
  /**
546
543
  * 修改自己的俱乐部收货地址
547
544
  *
548
545
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=p9FlJhHnWN
549
546
  */
550
- async updateAddress(t, r) {
547
+ async updateAddress(t, n) {
551
548
  await this.token.autoLogin();
552
- const { data: n, code: i, message: o } = await this.req.post(
549
+ const { data: r, code: a, message: i } = await this.req.post(
553
550
  "club/update-address",
554
551
  c(t),
555
552
  H,
556
- r
553
+ n
557
554
  );
558
- return n ?? {
559
- message: o,
560
- error: i
555
+ return r ?? {
556
+ message: i,
557
+ error: a
561
558
  };
562
559
  }
563
560
  /**
@@ -565,25 +562,25 @@ class jr {
565
562
  *
566
563
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=MEEOBdf8rm
567
564
  */
568
- async deleteAddress(t, r) {
565
+ async deleteAddress(t, n) {
569
566
  if (!await this.token.autoLogin()) return null;
570
- const { ok: n } = await this.req.post("club/delete-address", { address_id: t }, null, r);
571
- return n;
567
+ const { ok: r } = await this.req.post("club/delete-address", { address_id: t }, null, n);
568
+ return r;
572
569
  }
573
570
  /**
574
571
  * 获取俱乐部积分统计信息
575
572
  *
576
573
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=x4uxtGstRL
577
574
  */
578
- async getUserCredit(t, r) {
575
+ async getUserCredit(t, n) {
579
576
  await this.token.autoLogin();
580
- const { data: n, code: i, message: o } = await this.req.get("club/user-credit", He, {
581
- ...r,
577
+ const { data: r, code: a, message: i } = await this.req.get("club/user-credit", Me, {
578
+ ...n,
582
579
  params: c(t)
583
580
  });
584
- return n ?? {
585
- message: o,
586
- error: i
581
+ return r ?? {
582
+ message: i,
583
+ error: a
587
584
  };
588
585
  }
589
586
  /**
@@ -591,15 +588,15 @@ class jr {
591
588
  *
592
589
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=lQFgF689P8
593
590
  */
594
- async getCreditLogs(t, r) {
591
+ async getCreditLogs(t, n) {
595
592
  await this.token.autoLogin();
596
- const { data: n } = await this.req.get("club/credit-logs", ze, {
597
- ...r,
593
+ const { data: r } = await this.req.get("club/credit-logs", Qe, {
594
+ ...n,
598
595
  params: c({ max_results: 20, ...t })
599
596
  });
600
597
  return {
601
- credit_logs: (n == null ? void 0 : n.credit_logs) || [],
602
- next_token: n == null ? void 0 : n.next_token
598
+ credit_logs: r?.credit_logs || [],
599
+ next_token: r?.next_token
603
600
  };
604
601
  }
605
602
  /**
@@ -609,45 +606,45 @@ class jr {
609
606
  */
610
607
  async getBenefits(t) {
611
608
  if (!await this.token.autoLogin()) return [];
612
- const { data: r } = await this.req.get("club/benefits", Xe, t);
613
- return (r == null ? void 0 : r.benefits) || [];
609
+ const { data: n } = await this.req.get("club/benefits", He, t);
610
+ return n?.benefits || [];
614
611
  }
615
612
  /**
616
613
  * 获取某个权益详细信息
617
614
  *
618
615
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=XKto0MeaHF
619
616
  */
620
- async getBenefit(t, r) {
617
+ async getBenefit(t, n) {
621
618
  if (!await this.token.autoLogin()) return null;
622
- const { data: n } = await this.req.get("club/benefit", Ye, {
623
- ...r,
619
+ const { data: r } = await this.req.get("club/benefit", ze, {
620
+ ...n,
624
621
  params: { benefit_id: t }
625
622
  });
626
- return (n == null ? void 0 : n.benefit) || null;
623
+ return r?.benefit || null;
627
624
  }
628
625
  /**
629
626
  * 获取商城商品列表
630
627
  *
631
628
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=r3vC3PzfMQ
632
629
  */
633
- async getProducts(t, r) {
634
- const { data: n } = await this.req.get("club/products", Je, {
635
- ...r,
630
+ async getProducts(t, n) {
631
+ const { data: r } = await this.req.get("club/products", Ke, {
632
+ ...n,
636
633
  params: t
637
634
  });
638
- return (n == null ? void 0 : n.products) || [];
635
+ return r?.products || [];
639
636
  }
640
637
  /**
641
638
  * 兑换商城商品
642
639
  *
643
640
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=LWcMVwX3OY
644
641
  */
645
- async redeemProduct(t, r) {
642
+ async redeemProduct(t, n) {
646
643
  await this.token.autoLogin();
647
- const { ok: n, code: i, message: o } = await this.req.post("club/redeem-product", c(t), null, r);
648
- return n || {
649
- message: o,
650
- error: i
644
+ const { ok: r, code: a, message: i } = await this.req.post("club/redeem-product", c(t), null, n);
645
+ return r || {
646
+ message: i,
647
+ error: a
651
648
  };
652
649
  }
653
650
  /**
@@ -655,19 +652,19 @@ class jr {
655
652
  *
656
653
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=Ml6mLgT4cM
657
654
  */
658
- async getRedemptions(t, r) {
655
+ async getRedemptions(t, n) {
659
656
  await this.token.autoLogin();
660
- const { data: n } = await this.req.get("club/redemptions", Ze, {
661
- ...r,
657
+ const { data: r } = await this.req.get("club/redemptions", Je, {
658
+ ...n,
662
659
  params: c({ max_results: 20, ...t })
663
660
  });
664
661
  return {
665
- redemptions: (n == null ? void 0 : n.redemptions) || [],
666
- next_token: n == null ? void 0 : n.next_token
662
+ redemptions: r?.redemptions || [],
663
+ next_token: r?.next_token
667
664
  };
668
665
  }
669
666
  }
670
- const j = {
667
+ const V = {
671
668
  /** 活动道具 */
672
669
  EventItem: "event_item",
673
670
  /** 游戏内道具 */
@@ -678,6 +675,8 @@ const j = {
678
675
  WeixinHongbao: "weixin_hongbao",
679
676
  /** 礼包码 */
680
677
  GiftCode: "gift_code",
678
+ /** 激活码 */
679
+ ActivationKey: "activation_key",
681
680
  /** 抽奖券 */
682
681
  LotteryTicket: "lottery_ticket",
683
682
  /** 积分 */
@@ -686,17 +685,17 @@ const j = {
686
685
  ExternalCode: "external_gift_code",
687
686
  /** 空奖励 */
688
687
  VoidItem: "void_item"
689
- }, te = e.string().enum(j).lock(), Tr = j, ne = te, We = {
688
+ }, te = e.string().enum(V).lock(), Rr = V, ne = te, Xe = {
690
689
  /** 世游通行证 ID / Combo ID */
691
690
  UserId: "user_id",
692
691
  /** 游戏角色 ID */
693
692
  RoleId: "role_id"
694
- }, et = e.string().enum(We).lock(), tt = {
693
+ }, Ye = e.string().enum(Xe).lock(), Ze = {
695
694
  None: "none",
696
695
  Daily: "daily",
697
696
  Weekly: "weekly",
698
697
  Monthly: "monthly"
699
- }, nt = e.string().enum(tt).lock(), u = {
698
+ }, We = e.string().enum(Ze).lock(), u = {
700
699
  /** 预约 */
701
700
  Preregister: "preregister",
702
701
  /** 抽奖 */
@@ -735,7 +734,7 @@ const j = {
735
734
  CheckIn: "check_in",
736
735
  /** 领取激活码 */
737
736
  ClaimActivationKey: "claim_activation_key"
738
- }, rt = e.string().enum(u).lock(), it = {
737
+ }, et = e.string().enum(u).lock(), tt = {
739
738
  /** 累计游戏内活跃值 */
740
739
  Active: "player_active_points",
741
740
  /** 累计登录,单位 人天 */
@@ -750,14 +749,14 @@ const j = {
750
749
  MatchCounts: "player_match_counts",
751
750
  /** 游戏对局天数 */
752
751
  MatchDays: "player_match_days"
753
- }, re = e.string().enum(it).lock(), ot = {
752
+ }, re = e.string().enum(tt).lock(), nt = {
754
753
  /** 官方上传 */
755
754
  System: "system",
756
755
  /** 用户投稿 */
757
756
  UserSubmission: "user_submission",
758
757
  /** 投票入围 */
759
758
  Shortlisted: "shortlisted"
760
- }, at = e.string().enum(ot).lock(), _ = {
759
+ }, rt = e.string().enum(nt).lock(), p = {
761
760
  /** 未获得奖励 */
762
761
  Ineligible: "ineligible",
763
762
  /** 奖励未领取 */
@@ -768,7 +767,7 @@ const j = {
768
767
  Failed: "failed",
769
768
  /** 奖励已发货 */
770
769
  Delivered: "delivered"
771
- }, qr = e.string().enum(_).lock(), $ = {
770
+ }, Vr = e.string().enum(p).lock(), P = {
772
771
  /**
773
772
  * 奖励未领取,拼写错误以兼容后端历史版本,检查请使用 Unclaimed
774
773
  *
@@ -776,16 +775,16 @@ const j = {
776
775
  */
777
776
  UnclaimedErr: "unaccalimed",
778
777
  /** 奖励未领取 */
779
- Unclaimed: _.Unclaimed,
778
+ Unclaimed: p.Unclaimed,
780
779
  /** 奖励已领取 */
781
- Received: _.Received,
780
+ Received: p.Received,
782
781
  /** 奖励发放失败 */
783
- Failed: _.Failed,
782
+ Failed: p.Failed,
784
783
  /** 奖励已发货 */
785
- Delivered: _.Delivered
786
- }, ie = e.string().enum($).lock(), b = {
784
+ Delivered: p.Delivered
785
+ }, ae = e.string().enum(P).lock(), _ = {
787
786
  /** 未获得奖励 */
788
- Ineligible: _.Ineligible,
787
+ Ineligible: p.Ineligible,
789
788
  /**
790
789
  * 奖励未领取,拼写错误以兼容后端历史版本,检查请使用 Unclaimed
791
790
  *
@@ -793,24 +792,24 @@ const j = {
793
792
  */
794
793
  UnclaimedErr: "unaccalimed",
795
794
  /** 奖励未领取 */
796
- Unclaimed: _.Unclaimed,
795
+ Unclaimed: p.Unclaimed,
797
796
  /** 奖励已领取 */
798
- Received: _.Received,
797
+ Received: p.Received,
799
798
  /** 奖励发放失败 */
800
- Failed: _.Failed,
799
+ Failed: p.Failed,
801
800
  /** 奖励已发货 */
802
- Delivered: _.Delivered
803
- }, U = e.string().enum(b).lock(), st = {
801
+ Delivered: p.Delivered
802
+ }, $ = e.string().enum(_).lock(), at = {
804
803
  /** 玩法产出奖励 */
805
804
  Output: "output",
806
805
  /** 玩法参与奖励 */
807
806
  Engage: "engage"
808
- }, F = e.string().enum(st).lock(), ct = {
807
+ }, U = e.string().enum(at).lock(), it = {
809
808
  /** 私有队伍 */
810
809
  Private: "private",
811
810
  /** 公开队伍 */
812
811
  Public: "public"
813
- }, ut = e.string().enum(ct).lock(), v = {
812
+ }, ot = e.string().enum(it).lock(), k = {
814
813
  /** 未知状态 */
815
814
  Unknown: "unknown",
816
815
  /** 等待开奖 */
@@ -821,7 +820,7 @@ const j = {
821
820
  Claimed: "claimed",
822
821
  /** 领奖失败 */
823
822
  Fail: "fail"
824
- }, xr = e.string().enum(v).lock(), lt = {
823
+ }, jr = e.string().enum(k).lock(), st = {
825
824
  /** 发起组队 */
826
825
  Assemble: "assemble",
827
826
  /** 加入队伍 */
@@ -832,71 +831,71 @@ const j = {
832
831
  ChangeVisibility: "change_visibility",
833
832
  /** 查询组队信息 */
834
833
  Query: "query"
835
- }, Sr = e.string().enum(lt).lock(), mt = {
834
+ }, Tr = e.string().enum(st).lock(), ct = {
836
835
  /** 查询抽奖券 */
837
836
  Query: "query",
838
837
  /** 开奖 */
839
838
  Draw: "draw",
840
839
  /** 领奖 */
841
840
  Claim: "claim"
842
- }, Lr = e.string().enum(mt).lock(), dt = e.string().enum(V(j, "GiftCode", "LotteryTicket")), D = e.object({
841
+ }, qr = e.string().enum(ct).lock(), ut = e.string().enum(R(V, "GiftCode", "LotteryTicket")), F = e.object({
843
842
  reward_item_id: e.number(),
844
843
  reward_amount: e.number(),
845
844
  reward_item_name: e.string(),
846
845
  reward_item_icon_url: e.string(),
847
846
  reward_item_desc: e.string().optional(),
848
- reward_item_type: dt,
847
+ reward_item_type: ut,
849
848
  reward_item_rating: e.number()
850
- }).lock(), gt = e.object({
849
+ }).lock(), lt = e.object({
851
850
  engage_count: e.number(),
852
- rewards: e.array(D)
853
- }).lock(), pt = e.union(
851
+ rewards: e.array(F)
852
+ }).lock(), mt = e.union(
854
853
  e.object({
855
854
  feature_reward_type: e.string().enum("every"),
856
- reward_details: e.array(D)
855
+ reward_details: e.array(F)
857
856
  }),
858
857
  e.object({
859
858
  feature_reward_type: e.string().enum("regular"),
860
- reward_details: e.array(gt)
859
+ reward_details: e.array(lt)
861
860
  })
862
- ).satisfies().lock(), l = e.object({
861
+ ).satisfies().lock(), m = e.object({
863
862
  feature_name: e.string(),
864
863
  feature_id: e.number(),
865
864
  description: e.string(),
866
- cycle: nt,
865
+ cycle: We,
867
866
  limit: e.number(),
868
867
  since: e.number(),
869
868
  until: e.number(),
870
- engage_account: et,
871
- feature_rewards: pt.clone().optional()
872
- }), _t = u.Cashback, bt = e.object({
873
- ...l.shape,
874
- feature_type: e.string().enum(_t),
869
+ engage_account: Ye,
870
+ feature_rewards: mt.clone().optional()
871
+ }), dt = u.Cashback, gt = e.object({
872
+ ...m.shape,
873
+ feature_type: e.string().enum(dt),
875
874
  config: e.object({
876
875
  order_start_time: e.number(),
877
876
  order_end_time: e.number(),
878
877
  claim_rewards_start_time: e.number(),
879
878
  claim_rewards_end_time: e.number()
880
879
  })
881
- }), yt = u.CheckIn, ft = e.object({
882
- ...l.shape,
883
- feature_type: e.string().enum(yt)
884
- }), ht = u.ClaimActivationKey, wt = e.object({
885
- ...l.shape,
886
- feature_type: e.string().enum(ht)
887
- }), kt = u.ClaimRewards, vt = e.object({
888
- ...l.shape,
889
- feature_type: e.string().enum(kt)
890
- }), Ct = u.Comment, Rt = e.object({
891
- ...l.shape,
892
- feature_type: e.string().enum(Ct),
880
+ }), pt = u.CheckIn, _t = e.object({
881
+ ...m.shape,
882
+ feature_type: e.string().enum(pt)
883
+ }), bt = u.ClaimActivationKey, yt = e.object({
884
+ ...m.shape,
885
+ feature_type: e.string().enum(bt)
886
+ }), ft = u.ClaimRewards, ht = e.object({
887
+ ...m.shape,
888
+ feature_type: e.string().enum(ft)
889
+ }), wt = u.Comment, kt = e.object({
890
+ ...m.shape,
891
+ feature_type: e.string().enum(wt),
893
892
  config: e.object({
894
893
  comments: e.array(e.string()),
895
894
  send_rate: e.number()
896
895
  })
897
- }), Vt = u.Follow, jt = e.object({
898
- ...l.shape,
899
- feature_type: e.string().enum(Vt),
896
+ }), vt = u.Follow, Ct = e.object({
897
+ ...m.shape,
898
+ feature_type: e.string().enum(vt),
900
899
  config: e.object({
901
900
  platform: e.string(),
902
901
  platform_icon: e.string().optional(),
@@ -904,59 +903,59 @@ const j = {
904
903
  qr_code_url: e.string().optional(),
905
904
  platform_desc: e.string().optional()
906
905
  })
907
- }), Tt = u.GiftCode, qt = e.object({
906
+ }), Rt = u.GiftCode, Vt = e.object({
908
907
  name: e.string(),
909
908
  icon_url: e.string(),
910
909
  count: e.number()
911
- }), xt = e.object({
912
- ...l.shape,
913
- feature_type: e.string().enum(Tt),
910
+ }), jt = e.object({
911
+ ...m.shape,
912
+ feature_type: e.string().enum(Rt),
914
913
  config: e.object({
915
- gift_items: e.array(qt),
914
+ gift_items: e.array(Vt),
916
915
  mp_url: e.string().optional(),
917
916
  mp_qrcode_url: e.string().optional()
918
917
  })
919
- }), St = u.Invite, Lt = e.object({
920
- ...l.shape,
921
- feature_type: e.string().enum(St),
918
+ }), Tt = u.Invite, qt = e.object({
919
+ ...m.shape,
920
+ feature_type: e.string().enum(Tt),
922
921
  config: e.object({
923
922
  share_url: e.string()
924
923
  })
925
- }), Et = u.InvitedRegister, Pt = e.object({
926
- ...l.shape,
927
- feature_type: e.string().enum(Et)
928
- }), $t = e.string().enum(V(j, "GiftCode", "LotteryTicket")), Ut = u.Lottery, Ft = e.object({
924
+ }), xt = u.InvitedRegister, St = e.object({
925
+ ...m.shape,
926
+ feature_type: e.string().enum(xt)
927
+ }), Lt = e.string().enum(R(V, "GiftCode", "LotteryTicket")), Et = u.Lottery, Pt = e.object({
929
928
  reward_item_id: e.number(),
930
929
  reward_item_name: e.string(),
931
- reward_item_type: $t,
930
+ reward_item_type: Lt,
932
931
  reward_item_icon_url: e.string(),
933
932
  reward_item_desc: e.string().optional(),
934
933
  reward_amount: e.number(),
935
934
  reward_remaining_stock: e.number()
936
- }), Dt = e.object({
937
- ...l.shape,
938
- feature_type: e.string().enum(Ut),
935
+ }), $t = e.object({
936
+ ...m.shape,
937
+ feature_type: e.string().enum(Et),
939
938
  config: e.object({
940
939
  consume_item_id: e.number(),
941
940
  consume_item_name: e.number(),
942
941
  consume_item_icon_url: e.string(),
943
942
  consume_item_count: e.number(),
944
943
  consume_item_desc: e.string().optional(),
945
- rewards: e.array(Ft)
944
+ rewards: e.array(Pt)
946
945
  })
947
- }), It = u.LotteryDraw, Gt = e.object({
948
- ...l.shape,
949
- feature_type: e.string().enum(It),
946
+ }), Ut = u.LotteryDraw, Ft = e.object({
947
+ ...m.shape,
948
+ feature_type: e.string().enum(Ut),
950
949
  config: e.object({
951
950
  draw_not_before: e.number(),
952
951
  draw_not_after: e.number()
953
952
  })
954
- }), At = u.Preregister, Nt = e.object({
955
- ...l.shape,
956
- feature_type: e.string().enum(At)
957
- }), Ot = u.Quest, Bt = e.object({
958
- ...l.shape,
959
- feature_type: e.string().enum(Ot),
953
+ }), Dt = u.Preregister, It = e.object({
954
+ ...m.shape,
955
+ feature_type: e.string().enum(Dt)
956
+ }), At = u.Quest, Gt = e.object({
957
+ ...m.shape,
958
+ feature_type: e.string().enum(At),
960
959
  config: e.object({
961
960
  objective: re,
962
961
  completion_value: e.number(),
@@ -970,38 +969,38 @@ const j = {
970
969
  required_matches: e.number().min(1).optional()
971
970
  }).optional()
972
971
  })
973
- }), Mt = u.Register, Qt = e.object({
974
- ...l.shape,
975
- feature_type: e.string().enum(Mt)
976
- }), Kt = u.Share, Ht = e.object({
977
- ...l.shape,
978
- feature_type: e.string().enum(Kt),
972
+ }), Nt = u.Register, Ot = e.object({
973
+ ...m.shape,
974
+ feature_type: e.string().enum(Nt)
975
+ }), Bt = u.Share, Mt = e.object({
976
+ ...m.shape,
977
+ feature_type: e.string().enum(Bt),
979
978
  config: e.object({
980
979
  share_platform: e.string(),
981
980
  jump_url: e.string().optional(),
982
981
  icon_url: e.string().optional()
983
982
  })
984
- }), zt = u.Subscribe, Jt = e.object({
985
- ...l.shape,
986
- feature_type: e.string().enum(zt),
983
+ }), Qt = u.Subscribe, Kt = e.object({
984
+ ...m.shape,
985
+ feature_type: e.string().enum(Qt),
987
986
  config: e.object({
988
987
  weixin_template_ids: e.array(e.string())
989
988
  })
990
- }), Xt = u.Survey, Yt = e.object({
991
- ...l.shape,
992
- feature_type: e.string().enum(Xt),
989
+ }), Ht = u.Survey, zt = e.object({
990
+ ...m.shape,
991
+ feature_type: e.string().enum(Ht),
993
992
  config: e.object({
994
993
  survey_id: e.string(),
995
994
  survey_url: e.string()
996
995
  })
997
- }), Zt = u.Team, Wt = e.object({
998
- ...l.shape,
999
- feature_type: e.string().enum(Zt),
996
+ }), Jt = u.Team, Xt = e.object({
997
+ ...m.shape,
998
+ feature_type: e.string().enum(Jt),
1000
999
  config: e.object({
1001
1000
  max_members: e.number().min(1),
1002
1001
  min_members: e.number().min(1)
1003
1002
  })
1004
- }), en = u.Vote, tn = e.object({
1003
+ }), Yt = u.Vote, Zt = e.object({
1005
1004
  sn: e.string(),
1006
1005
  name: e.string(),
1007
1006
  img_urls: e.array(e.string()).optional(),
@@ -1011,93 +1010,93 @@ const j = {
1011
1010
  amount: e.number(),
1012
1011
  finalists: e.bool(),
1013
1012
  last_vote_time: e.number()
1014
- }), nn = e.object({
1015
- ...l.shape,
1016
- feature_type: e.string().enum(en),
1013
+ }), Wt = e.object({
1014
+ ...m.shape,
1015
+ feature_type: e.string().enum(Yt),
1017
1016
  config: e.object({
1018
1017
  vote_feature_ids: e.array(e.number()),
1019
1018
  submission_feature_ids: e.array(e.number()),
1020
1019
  finalists_amount: e.number(),
1021
- source: at,
1022
- options: e.array(tn),
1023
- rewards: e.array(D)
1020
+ source: rt,
1021
+ options: e.array(Zt),
1022
+ rewards: e.array(F)
1024
1023
  })
1025
- }), rn = e.union(
1026
- bt,
1027
- ft,
1028
- vt,
1029
- Rt,
1024
+ }), en = e.union(
1025
+ gt,
1026
+ _t,
1027
+ ht,
1028
+ kt,
1029
+ Ct,
1030
1030
  jt,
1031
- xt,
1032
- Lt,
1033
- Pt,
1034
- Dt,
1031
+ qt,
1032
+ St,
1033
+ $t,
1034
+ Ft,
1035
+ It,
1035
1036
  Gt,
1036
- Nt,
1037
- Bt,
1038
- Qt,
1039
- Ht,
1040
- Jt,
1041
- Yt,
1037
+ Ot,
1038
+ Mt,
1039
+ Kt,
1040
+ zt,
1041
+ Xt,
1042
1042
  Wt,
1043
- nn,
1044
- wt
1045
- ).key("feature_type").satisfies(), on = e.object({
1043
+ yt
1044
+ ).key("feature_type").satisfies(), tn = e.object({
1046
1045
  event_name: e.string(),
1047
1046
  rules: e.string(),
1048
1047
  since: e.number(),
1049
1048
  until: e.number(),
1050
1049
  visit_count: e.number().optional(),
1051
- features: e.array(rn)
1052
- }).lock(), S = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), an = e.object({
1053
- order_total_amount: S,
1054
- cashback_total_amount: S,
1055
- game_item_count: S
1056
- }), sn = e.object({
1050
+ features: e.array(en)
1051
+ }).lock(), x = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), nn = e.object({
1052
+ order_total_amount: x,
1053
+ cashback_total_amount: x,
1054
+ game_item_count: x
1055
+ }), rn = e.object({
1057
1056
  activation_key: e.string().disallow("")
1058
- }), cn = e.object({
1057
+ }), an = e.object({
1059
1058
  gift_code: e.string()
1060
- }), un = e.object({
1059
+ }), on = e.object({
1061
1060
  user_id: e.string(),
1062
1061
  name: e.string().optional(),
1063
1062
  avatar_url: e.string().optional()
1064
- }), ln = e.object({
1063
+ }), sn = e.object({
1065
1064
  lottery_count: e.number()
1066
- }), oe = e.object({
1065
+ }), D = e.object({
1067
1066
  reward_id: e.number(),
1068
1067
  reward_item_id: e.number(),
1069
- reward_source: F,
1068
+ reward_source: U,
1070
1069
  reward_item_name: e.string(),
1071
1070
  reward_item_type: te,
1072
1071
  reward_item_icon_url: e.string(),
1073
1072
  reward_item_desc: e.string().optional(),
1074
1073
  reward_item_rating: e.number(),
1075
1074
  reward_amount: e.number(),
1076
- reward_status: U,
1075
+ reward_status: $,
1077
1076
  event_id: e.number(),
1078
1077
  event_name: e.string(),
1079
1078
  feature_id: e.number(),
1080
1079
  engagement_id: e.number(),
1081
- feature_type: rt,
1080
+ feature_type: et,
1082
1081
  receive_time: e.number(),
1083
1082
  // https://kdocs.cn/l/ckWFDcOsYEUA?linkname=merUzJsVYH
1084
1083
  // 后续会格式化为具体的类型,此处的校验需要对应增加
1085
1084
  extra_data: e.record(e.unknown()).optional()
1086
- }), mn = e.string().enum(v.Unknown, v.Pending), dn = e.union(
1085
+ }), cn = e.string().enum(k.Unknown, k.Pending), un = e.union(
1087
1086
  e.object({
1088
1087
  ticket: e.string(),
1089
- status: mn
1088
+ status: cn
1090
1089
  }),
1091
1090
  e.object({
1092
1091
  ticket: e.string(),
1093
- status: e.string().enum(V(v, "Unknown", "Pending")),
1094
- reward: oe
1092
+ status: e.string().enum(R(k, "Unknown", "Pending")),
1093
+ reward: D
1095
1094
  })
1096
- ).satisfies(), gn = e.object({
1097
- tickets: e.array(dn)
1098
- }), pn = e.object({
1095
+ ).satisfies(), ln = e.object({
1096
+ tickets: e.array(un)
1097
+ }), mn = e.object({
1099
1098
  platforms: e.array(e.string())
1100
- }), _n = e.object({
1099
+ }), dn = e.object({
1101
1100
  objective: re,
1102
1101
  progress: e.number(),
1103
1102
  completion_value: e.number().optional(),
@@ -1113,24 +1112,24 @@ const j = {
1113
1112
  })
1114
1113
  )
1115
1114
  }).optional()
1116
- }), bn = e.object({
1115
+ }), gn = e.object({
1117
1116
  platform: e.string()
1118
- }), yn = e.object({
1117
+ }), pn = e.object({
1119
1118
  weixin_openid: e.string()
1120
- }), fn = e.object({
1119
+ }), _n = e.object({
1121
1120
  serial_number: e.number()
1122
- }), hn = e.object({
1121
+ }), bn = e.object({
1123
1122
  team_code: e.string(),
1124
1123
  leader_name: e.string(),
1125
1124
  total_members: e.number()
1126
- }), Er = e.object({
1125
+ }), xr = e.object({
1127
1126
  is_leader: e.bool(),
1128
1127
  is_myself: e.bool().optional(),
1129
1128
  role_name: e.string(),
1130
1129
  server_name: e.string()
1131
- }), wn = e.object({
1130
+ }), yn = e.object({
1132
1131
  team_code: e.string(),
1133
- visibility: ut,
1132
+ visibility: ot,
1134
1133
  members: e.array(
1135
1134
  e.object({
1136
1135
  is_leader: e.bool(),
@@ -1138,9 +1137,9 @@ const j = {
1138
1137
  server_name: e.string()
1139
1138
  })
1140
1139
  )
1141
- }), kn = e.object({
1140
+ }), fn = e.object({
1142
1141
  option_sn: e.string()
1143
- }), vn = e.object({
1142
+ }), hn = e.object({
1144
1143
  user_id: e.string(),
1145
1144
  name: e.string(),
1146
1145
  avatar_url: e.string(),
@@ -1148,37 +1147,37 @@ const j = {
1148
1147
  video_note: e.number(),
1149
1148
  created_at: e.number()
1150
1149
  }), I = e.union(
1151
- pn,
1152
- ln,
1153
- fn,
1154
- un,
1155
- bn,
1156
- kn,
1157
- yn,
1158
- an,
1159
- cn,
1160
- wn,
1150
+ mn,
1151
+ sn,
1161
1152
  _n,
1153
+ on,
1162
1154
  gn,
1163
- sn,
1155
+ fn,
1156
+ pn,
1157
+ nn,
1158
+ an,
1159
+ yn,
1160
+ dn,
1161
+ ln,
1162
+ rn,
1164
1163
  e.custom(
1165
1164
  "EmptyObject",
1166
- (a) => R(a) && Object.keys(a).length === 0
1165
+ (o) => C(o) && Object.keys(o).length === 0
1167
1166
  )
1168
- ).satisfies().lock(), Cn = e.object({
1167
+ ).satisfies().lock(), wn = e.object({
1169
1168
  reward_id: e.number(),
1170
1169
  reward_item_id: e.number(),
1171
1170
  reward_item_type: ne,
1172
1171
  reward_count: e.number(),
1173
- reward_status: ie,
1174
- reward_source: F,
1172
+ reward_status: ae,
1173
+ reward_source: U,
1175
1174
  reward_item_name: e.string(),
1176
1175
  reward_item_icon_url: e.string(),
1177
1176
  reward_item_desc: e.string().optional(),
1178
1177
  reward_item_rating: e.number(),
1179
1178
  receive_time: e.number(),
1180
1179
  extra_data: e.union(...I.validators, e.record(e.unknown())).satisfies().optional()
1181
- }), Rn = e.object({
1180
+ }), kn = e.object({
1182
1181
  reward_id: e.number(),
1183
1182
  reward_item_id: e.number(),
1184
1183
  reward_item_name: e.string(),
@@ -1186,10 +1185,10 @@ const j = {
1186
1185
  reward_item_icon_url: e.string(),
1187
1186
  reward_item_desc: e.string().optional(),
1188
1187
  reward_amount: e.number(),
1189
- reward_status: ie,
1190
- reward_source: F,
1188
+ reward_status: ae,
1189
+ reward_source: U,
1191
1190
  extra_data: e.record(e.unknown()).optional()
1192
- }), Vn = e.object({
1191
+ }), vn = e.object({
1193
1192
  engagement_id: e.number(),
1194
1193
  user_id: e.string(),
1195
1194
  event_id: e.number(),
@@ -1199,15 +1198,15 @@ const j = {
1199
1198
  server_id: e.string().optional(),
1200
1199
  role_id: e.string().optional(),
1201
1200
  created_at: e.number(),
1202
- rewards: e.array(Cn).optional()
1203
- }).lock(), jn = e.object({
1201
+ rewards: e.array(wn).optional()
1202
+ }).lock(), Cn = e.object({
1204
1203
  allowed: e.bool(),
1205
1204
  registered: e.bool()
1206
- }), Tn = e.object({
1205
+ }), Rn = e.object({
1207
1206
  feature_id: e.number(),
1208
1207
  can_engage: e.bool(),
1209
1208
  has_unclaimed_rewards: e.bool()
1210
- }), qn = e.object({
1209
+ }), Vn = e.object({
1211
1210
  engagement_id: e.number(),
1212
1211
  engagement: e.object({
1213
1212
  engagement_id: e.number(),
@@ -1215,50 +1214,52 @@ const j = {
1215
1214
  feature_id: e.number(),
1216
1215
  data: I.clone().optional()
1217
1216
  }).optional(),
1218
- rewards: e.array(Rn).optional(),
1217
+ rewards: e.array(kn).optional(),
1219
1218
  scan: e.bool().optional()
1220
- }), xn = e.object({
1219
+ }), jn = e.object({
1221
1220
  reward_id: e.number(),
1222
- reward_status: U
1223
- }), Sn = e.guard(on), Ln = e.guard(jn), L = s({ count: e.number() }), En = s({ first_visit: e.bool() }), Pn = s({
1224
- engagements: e.union(e.array(vn), e.array(hn))
1225
- }), $n = s({
1226
- status: e.array(Tn)
1221
+ reward_status: $
1222
+ }), Tn = e.guard(tn), qn = e.guard(Cn), S = s({ count: e.number() }), xn = s({ first_visit: e.bool() }), Sn = s({
1223
+ engagements: e.union(e.array(hn), e.array(bn))
1224
+ }), Ln = s({
1225
+ status: e.array(Rn)
1226
+ }), En = s({
1227
+ engagements: e.array(vn),
1228
+ next_token: e.string().optional()
1229
+ }), Pn = e.guard(Vn), $n = s({
1230
+ claimed_items: e.array(jn)
1227
1231
  }), Un = s({
1228
- engagements: e.array(Vn),
1232
+ rewards: e.array(D)
1233
+ }), Fn = s({
1234
+ reward_status: $
1235
+ }), Dn = s({
1236
+ user_rewards: e.array(D),
1229
1237
  next_token: e.string().optional()
1230
- }), Fn = e.guard(qn), Dn = s({
1231
- claimed_items: e.array(xn)
1232
1238
  }), In = s({
1233
- reward_status: U
1234
- }), Gn = s({
1235
- user_rewards: e.array(oe),
1236
- next_token: e.string().optional()
1237
- }), An = s({
1238
1239
  scene: e.string()
1239
- }), Nn = s({
1240
+ }), An = s({
1240
1241
  params: e.string()
1241
- }), On = s({
1242
+ }), Gn = s({
1242
1243
  img: e.string()
1243
1244
  });
1244
- class Pr {
1245
- constructor(t, r) {
1246
- m(this, "token");
1247
- m(this, "event", 0);
1248
- m(this, "req");
1249
- this.token = t, this.event = +r, this.req = t.req;
1245
+ class Sr {
1246
+ token;
1247
+ event = 0;
1248
+ req;
1249
+ constructor(t, n) {
1250
+ this.token = t, this.event = +n, this.req = t.req;
1250
1251
  }
1251
1252
  /**
1252
1253
  * 根据手机号白名单,检查手机号是否允许登录某个游戏
1253
1254
  *
1254
1255
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
1255
1256
  */
1256
- async verifyMobileAllowed(t, r, n) {
1257
- const { data: i } = await this.req.get("verify-mobile-allowed", Ln, {
1258
- ...n,
1259
- params: { game_id: t, mobile: r }
1257
+ async verifyMobileAllowed(t, n, r) {
1258
+ const { data: a } = await this.req.get("verify-mobile-allowed", qn, {
1259
+ ...r,
1260
+ params: { game_id: t, mobile: n }
1260
1261
  });
1261
- return i;
1262
+ return a;
1262
1263
  }
1263
1264
  /**
1264
1265
  * 获取运营活动的基础配置信息
@@ -1266,32 +1267,32 @@ class Pr {
1266
1267
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
1267
1268
  */
1268
1269
  async getConfig(t) {
1269
- const { data: r } = await this.req.get(`event/${this.event}/event-config`, Sn, t);
1270
- return r;
1270
+ const { data: n } = await this.req.get(`event/${this.event}/event-config`, Tn, t);
1271
+ return n;
1271
1272
  }
1272
1273
  /**
1273
1274
  * 获取某个玩法参与用户数量
1274
1275
  *
1275
1276
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1276
1277
  */
1277
- async getEngagementsUserCount(t, r) {
1278
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, L, {
1279
- ...r,
1278
+ async getEngagementsUserCount(t, n) {
1279
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
1280
+ ...n,
1280
1281
  params: { feature_id: t, type: "user" }
1281
1282
  });
1282
- return (n == null ? void 0 : n.count) ?? null;
1283
+ return r?.count ?? null;
1283
1284
  }
1284
1285
  /**
1285
1286
  * 获取某个玩法参与次数
1286
1287
  *
1287
1288
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
1288
1289
  */
1289
- async getEngagementsCount(t, r) {
1290
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, L, {
1291
- ...r,
1290
+ async getEngagementsCount(t, n) {
1291
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
1292
+ ...n,
1292
1293
  params: { feature_id: t, type: "engagement" }
1293
1294
  });
1294
- return (n == null ? void 0 : n.count) ?? null;
1295
+ return r?.count ?? null;
1295
1296
  }
1296
1297
  /**
1297
1298
  * 获取某个玩法的参与记录(和特定用户无关)
@@ -1300,29 +1301,29 @@ class Pr {
1300
1301
  *
1301
1302
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
1302
1303
  */
1303
- async getEngagements(t, r) {
1304
- const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, Pn, {
1305
- ...r,
1304
+ async getEngagements(t, n) {
1305
+ const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, Sn, {
1306
+ ...n,
1306
1307
  params: { feature_id: t }
1307
1308
  });
1308
- return (n == null ? void 0 : n.engagements) || [];
1309
+ return r?.engagements || [];
1309
1310
  }
1310
1311
  /**
1311
1312
  * 用户访问某个活动或玩法
1312
1313
  *
1313
1314
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=DWtJrnrBCn
1314
1315
  */
1315
- async visit(t, r) {
1316
+ async visit(t, n) {
1316
1317
  await this.token.autoLogin();
1317
- const { data: n, code: i, message: o } = await this.req.post(
1318
+ const { data: r, code: a, message: i } = await this.req.post(
1318
1319
  `event/${this.event}/visit`,
1319
1320
  c(t || {}),
1320
- En,
1321
- r
1321
+ xn,
1322
+ n
1322
1323
  );
1323
- return n ?? {
1324
- message: o,
1325
- error: i
1324
+ return r ?? {
1325
+ message: i,
1326
+ error: a
1326
1327
  };
1327
1328
  }
1328
1329
  /**
@@ -1334,14 +1335,14 @@ class Pr {
1334
1335
  *
1335
1336
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
1336
1337
  */
1337
- async getUserFeatureStatus(t, r) {
1338
+ async getUserFeatureStatus(t, n) {
1338
1339
  if (!await this.token.autoLogin()) return [];
1339
- const { data: n } = await this.req.get("event/user-feature-status", $n, {
1340
- ...r,
1340
+ const { data: r } = await this.req.get("event/user-feature-status", Ln, {
1341
+ ...n,
1341
1342
  message: !1,
1342
1343
  params: c({ ...t, event_id: this.event })
1343
1344
  });
1344
- return (n == null ? void 0 : n.status) || [];
1345
+ return r?.status || [];
1345
1346
  }
1346
1347
  /**
1347
1348
  * 获取当前登录用户参与某个玩法的记录
@@ -1350,24 +1351,24 @@ class Pr {
1350
1351
  *
1351
1352
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=NFDdV1dwWb
1352
1353
  */
1353
- async getUserEngagements(t, r, n) {
1354
+ async getUserEngagements(t, n, r) {
1354
1355
  if (!await this.token.autoLogin())
1355
1356
  return {
1356
1357
  engagements: [],
1357
1358
  next_token: ""
1358
1359
  };
1359
- const { data: i } = await this.req.get("event/user-engagements", Un, {
1360
- ...n,
1360
+ const { data: a } = await this.req.get("event/user-engagements", En, {
1361
+ ...r,
1361
1362
  params: c({
1362
1363
  max_results: 20,
1363
- ...r,
1364
+ ...n,
1364
1365
  event_id: this.event,
1365
1366
  feature_id: t
1366
1367
  })
1367
1368
  });
1368
1369
  return {
1369
- engagements: (i == null ? void 0 : i.engagements) || [],
1370
- next_token: (i == null ? void 0 : i.next_token) || ""
1370
+ engagements: a?.engagements || [],
1371
+ next_token: a?.next_token || ""
1371
1372
  };
1372
1373
  }
1373
1374
  /**
@@ -1379,20 +1380,20 @@ class Pr {
1379
1380
  *
1380
1381
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vuOyrcry3S
1381
1382
  */
1382
- async engage(t, r, n, i) {
1383
+ async engage(t, n, r, a) {
1383
1384
  await this.token.autoLogin();
1384
- const { data: o, code: d, message: g } = await this.req.post(
1385
+ const { data: i, code: d, message: l } = await this.req.post(
1385
1386
  `event/${this.event}/engage`,
1386
1387
  c({
1387
1388
  feature_id: t,
1388
- engagement: r,
1389
- ...n
1389
+ engagement: n,
1390
+ ...r
1390
1391
  }),
1391
- Fn,
1392
- i
1392
+ Pn,
1393
+ a
1393
1394
  );
1394
- return o && o.rewards && (o.rewards = o.rewards.map((h) => (h.reward_status = h.reward_status === $.UnclaimedErr ? $.Unclaimed : h.reward_status, h))), o ?? {
1395
- message: g,
1395
+ return i && i.rewards && (i.rewards = i.rewards.map((f) => (f.reward_status = f.reward_status === P.UnclaimedErr ? P.Unclaimed : f.reward_status, f))), i ?? {
1396
+ message: l,
1396
1397
  error: d
1397
1398
  // 没有可领取的激活码
1398
1399
  };
@@ -1400,22 +1401,45 @@ class Pr {
1400
1401
  /**
1401
1402
  * 用户领取除红包和实物奖励以外的所有奖励
1402
1403
  *
1404
+ * @deprecated 请优先使用 `claimRewardsV2` 接口
1405
+ *
1403
1406
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=lCGuqgvUDP
1404
1407
  */
1405
- async claimRewards(t, r) {
1408
+ async claimRewards(t, n) {
1406
1409
  await this.token.autoLogin();
1407
- const { data: n, code: i, message: o } = await this.req.post(
1410
+ const { data: r, code: a, message: i } = await this.req.post(
1408
1411
  "event/claim-rewards",
1409
1412
  c({
1410
1413
  ...t,
1411
1414
  server_id: t.server_id ? +t.server_id : void 0
1412
1415
  }),
1413
- Dn,
1414
- r
1415
- ), d = n == null ? void 0 : n.claimed_items;
1416
- return d ? d.map((g) => (g.reward_status = g.reward_status === b.UnclaimedErr ? b.Unclaimed : g.reward_status, g)) : {
1417
- message: o,
1418
- error: i
1416
+ $n,
1417
+ n
1418
+ ), d = r?.claimed_items;
1419
+ return d ? d.map((l) => (l.reward_status = l.reward_status === _.UnclaimedErr ? _.Unclaimed : l.reward_status, l)) : {
1420
+ message: i,
1421
+ error: a
1422
+ };
1423
+ }
1424
+ /**
1425
+ * 用户领取除红包和实物奖励以外的所有奖励
1426
+ *
1427
+ * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vdc4SrqXjF
1428
+ */
1429
+ async claimRewardsV2(t, n) {
1430
+ await this.token.autoLogin();
1431
+ const { data: r, code: a, message: i } = await this.req.post(
1432
+ "event/claim-rewards-v2",
1433
+ c({
1434
+ ...t,
1435
+ server_id: t.server_id ? +t.server_id : void 0
1436
+ }),
1437
+ Un,
1438
+ n
1439
+ ), d = r?.rewards;
1440
+ return d ? d.map((l) => (l.reward_status = l.reward_status === _.UnclaimedErr ? _.Unclaimed : l.reward_status, l)) : {
1441
+ message: i,
1442
+ error: a
1419
1443
  };
1420
1444
  }
1421
1445
  /**
@@ -1423,17 +1447,17 @@ class Pr {
1423
1447
  *
1424
1448
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=aQLhlOAB4Q
1425
1449
  */
1426
- async claimWeixinHongbao(t, r) {
1450
+ async claimWeixinHongbao(t, n) {
1427
1451
  await this.token.autoLogin();
1428
- const { data: n, code: i, message: o } = await this.req.post(
1452
+ const { data: r, code: a, message: i } = await this.req.post(
1429
1453
  "event/claim-weixin-hongbao",
1430
1454
  { reward_id: t },
1431
- In,
1432
- r
1455
+ Fn,
1456
+ n
1433
1457
  );
1434
- return n ? (n.reward_status = n.reward_status === b.UnclaimedErr ? b.Unclaimed : n.reward_status, n) : {
1435
- message: o,
1436
- error: i
1458
+ return r ? (r.reward_status = r.reward_status === _.UnclaimedErr ? _.Unclaimed : r.reward_status, r) : {
1459
+ message: i,
1460
+ error: a
1437
1461
  };
1438
1462
  }
1439
1463
  /**
@@ -1441,18 +1465,18 @@ class Pr {
1441
1465
  *
1442
1466
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
1443
1467
  */
1444
- async verifyActivationKey(t, r) {
1468
+ async verifyActivationKey(t, n) {
1445
1469
  if (!this.token.isLoggedIn)
1446
1470
  return { error: "not_logged_in" };
1447
- const { ok: n, code: i, message: o } = await this.req.post(
1471
+ const { ok: r, code: a, message: i } = await this.req.post(
1448
1472
  "verify-activation-key",
1449
1473
  { activation_key: t },
1450
1474
  null,
1451
- { message: !1, ...r }
1475
+ { message: !1, ...n }
1452
1476
  );
1453
- return n || {
1454
- message: o,
1455
- error: i
1477
+ return r || {
1478
+ message: i,
1479
+ error: a
1456
1480
  };
1457
1481
  }
1458
1482
  /**
@@ -1460,21 +1484,21 @@ class Pr {
1460
1484
  *
1461
1485
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=qj12eIgYQG
1462
1486
  */
1463
- async getUserRewards(t, r) {
1487
+ async getUserRewards(t, n) {
1464
1488
  if (!await this.token.autoLogin())
1465
1489
  return {
1466
1490
  user_rewards: [],
1467
1491
  next_token: ""
1468
1492
  };
1469
- const { data: n } = await this.req.post(
1493
+ const { data: r } = await this.req.post(
1470
1494
  "event/user-rewards",
1471
1495
  c({ max_results: 20, ...t, event_id: this.event }),
1472
- Gn,
1473
- r
1496
+ Dn,
1497
+ n
1474
1498
  );
1475
1499
  return {
1476
- user_rewards: ((n == null ? void 0 : n.user_rewards) || []).map((i) => (i.reward_status = i.reward_status === b.UnclaimedErr ? b.Unclaimed : i.reward_status, i)),
1477
- next_token: (n == null ? void 0 : n.next_token) || ""
1500
+ user_rewards: (r?.user_rewards || []).map((a) => (a.reward_status = a.reward_status === _.UnclaimedErr ? _.Unclaimed : a.reward_status, a)),
1501
+ next_token: r?.next_token || ""
1478
1502
  };
1479
1503
  }
1480
1504
  /**
@@ -1482,23 +1506,23 @@ class Pr {
1482
1506
  *
1483
1507
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=mnGCTeTgMb
1484
1508
  */
1485
- async getUserItemCount(t, r) {
1509
+ async getUserItemCount(t, n) {
1486
1510
  if (!await this.token.autoLogin()) return null;
1487
- const { data: n } = await this.req.get(`event/${this.event}/user-item-count`, L, {
1488
- ...r,
1511
+ const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, S, {
1512
+ ...n,
1489
1513
  params: { item_id: t }
1490
1514
  });
1491
- return (n == null ? void 0 : n.count) ?? null;
1515
+ return r?.count ?? null;
1492
1516
  }
1493
1517
  /**
1494
1518
  * 填写实物奖励收货地址,返回 null 表示未登录
1495
1519
  *
1496
1520
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=QIwGhnaexb
1497
1521
  */
1498
- async submitUserRewardAddress(t, r) {
1522
+ async submitUserRewardAddress(t, n) {
1499
1523
  if (!await this.token.autoLogin()) return null;
1500
- const { ok: n } = await this.req.post(`event/${this.event}/user-reward-address`, t, null, r);
1501
- return n;
1524
+ const { ok: r } = await this.req.post(`event/${this.event}/user-reward-address`, t, null, n);
1525
+ return r;
1502
1526
  }
1503
1527
  /**
1504
1528
  * 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
@@ -1507,13 +1531,13 @@ class Pr {
1507
1531
  *
1508
1532
  * @param params - 前端扫描二维码打开小程序所需参数
1509
1533
  */
1510
- async getUnlimitQrcodeScene(t, r) {
1534
+ async getUnlimitQrcodeScene(t, n) {
1511
1535
  if (!await this.token.autoLogin()) return null;
1512
- const { data: n } = await this.req.get("event/unlimit-qrcode-scene", An, {
1513
- ...r,
1536
+ const { data: r } = await this.req.get("event/unlimit-qrcode-scene", In, {
1537
+ ...n,
1514
1538
  params: { params: t }
1515
1539
  });
1516
- return (n == null ? void 0 : n.scene) ?? null;
1540
+ return r?.scene ?? null;
1517
1541
  }
1518
1542
  /**
1519
1543
  * 根据小程序码携带 scene 值,获取对应的前端所需参数
@@ -1522,35 +1546,35 @@ class Pr {
1522
1546
  *
1523
1547
  * @param scene - 小程序码 scene 值
1524
1548
  */
1525
- async getParamsByQrcodeScene(t, r) {
1526
- const { data: n } = await this.req.get("event/params-by-qrcode-scene", Nn, {
1527
- ...r,
1549
+ async getParamsByQrcodeScene(t, n) {
1550
+ const { data: r } = await this.req.get("event/params-by-qrcode-scene", An, {
1551
+ ...n,
1528
1552
  params: { scene: t }
1529
1553
  });
1530
- return (n == null ? void 0 : n.params) ?? null;
1554
+ return r?.params ?? null;
1531
1555
  }
1532
1556
  /**
1533
1557
  * 生成不限制的带参数的小程序码(dataURI 格式的小程序码图片)
1534
1558
  *
1535
1559
  * https://kdocs.cn/l/ckWFDcOsYEUA?linkname=Rvmoq8iIy0
1536
1560
  */
1537
- async generateUnlimitQrcode(t, r) {
1561
+ async generateUnlimitQrcode(t, n) {
1538
1562
  if (!await this.token.autoLogin()) return null;
1539
- const { data: n } = await this.req.post(
1563
+ const { data: r } = await this.req.post(
1540
1564
  "event/unlimit-qrcode",
1541
1565
  c(t),
1542
- On,
1543
- r
1566
+ Gn,
1567
+ n
1544
1568
  );
1545
- return (n == null ? void 0 : n.img) ?? null;
1569
+ return r?.img ?? null;
1546
1570
  }
1547
1571
  }
1548
- const Bn = {
1572
+ const Nn = {
1549
1573
  /** 所有人均可以发帖 */
1550
1574
  All: "all",
1551
1575
  /** 指定用户可发帖 */
1552
1576
  Limit: "limit"
1553
- }, Mn = e.string().enum(Bn).lock(), Qn = {
1577
+ }, On = e.string().enum(Nn).lock(), Bn = {
1554
1578
  /** 待审核(仅自己可见) */
1555
1579
  Pending: "pending",
1556
1580
  /** 审核通过 */
@@ -1559,14 +1583,14 @@ const Bn = {
1559
1583
  Failed: "failed",
1560
1584
  /** 嫌疑(仅自己可见) */
1561
1585
  Suspect: "suspect"
1562
- }, ae = e.string().enum(Qn).lock(), Kn = {
1586
+ }, ie = e.string().enum(Bn).lock(), Mn = {
1563
1587
  /** 系统通知 */
1564
1588
  System: "system",
1565
1589
  /** 评论我的 */
1566
1590
  Comment: "comment",
1567
1591
  /** 点赞通知 */
1568
1592
  Like: "like"
1569
- }, $r = e.string().enum(Kn).lock(), p = {
1593
+ }, Lr = e.string().enum(Mn).lock(), g = {
1570
1594
  /** 系统通知 */
1571
1595
  System: "system",
1572
1596
  /** 帖子被置顶 */
@@ -1591,24 +1615,24 @@ const Bn = {
1591
1615
  ReplyLiked: "reply_liked",
1592
1616
  /** 回复被删除 */
1593
1617
  ReplyDeleted: "reply_deleted"
1594
- }, Hn = e.string().enum(p).lock(), se = e.object({
1618
+ }, Qn = e.string().enum(g).lock(), oe = e.object({
1595
1619
  forum_id: e.number(),
1596
1620
  icon_url: e.string(),
1597
1621
  name: e.string(),
1598
1622
  tags: e.array(e.string()),
1599
1623
  sort: e.number(),
1600
- mode: Mn,
1624
+ mode: On,
1601
1625
  member_ids: e.array(e.number())
1602
- }).lock(), G = e.object({
1626
+ }).lock(), A = e.object({
1603
1627
  topic_id: e.number(),
1604
1628
  cover_url: e.string(),
1605
1629
  name: e.string(),
1606
1630
  description: e.string(),
1607
1631
  tags: e.array(e.string()),
1608
1632
  post_num: e.number()
1609
- }).lock(), A = e.object({
1633
+ }).lock(), G = e.object({
1610
1634
  post_id: e.number(),
1611
- forum: se,
1635
+ forum: oe,
1612
1636
  posted_by: e.string(),
1613
1637
  nickname: e.string(),
1614
1638
  avatar_url: e.string(),
@@ -1620,21 +1644,21 @@ const Bn = {
1620
1644
  comments_num: e.number(),
1621
1645
  liked: e.bool(),
1622
1646
  image_urls: e.array(e.string()),
1623
- topics: e.array(G),
1647
+ topics: e.array(A),
1624
1648
  event_ids: e.array(e.number()),
1625
1649
  is_pinned: e.bool(),
1626
1650
  is_highlighted: e.bool(),
1627
- status: ae,
1651
+ status: ie,
1628
1652
  create_time: e.number()
1629
- }).lock(), ce = e.object({
1653
+ }).lock(), se = e.object({
1630
1654
  err_msg: e.string().optional()
1631
- }).lock(), zn = e.object({
1655
+ }).lock(), Kn = e.object({
1632
1656
  reply_id: e.number(),
1633
1657
  reply_content: e.string().optional(),
1634
1658
  replied_by: e.string(),
1635
1659
  nickname: e.string(),
1636
1660
  avatar_url: e.string()
1637
- }).lock(), T = e.object({
1661
+ }).lock(), j = e.object({
1638
1662
  reply_id: e.number(),
1639
1663
  comment_id: e.number(),
1640
1664
  comment_content: e.string().optional(),
@@ -1647,9 +1671,9 @@ const Bn = {
1647
1671
  content: e.string(),
1648
1672
  like_num: e.number(),
1649
1673
  liked: e.bool(),
1650
- reply_to: zn,
1674
+ reply_to: Kn,
1651
1675
  create_time: e.number()
1652
- }).lock(), C = e.object({
1676
+ }).lock(), v = e.object({
1653
1677
  comment_id: e.number(),
1654
1678
  post_id: e.number(),
1655
1679
  post_subject: e.string().optional(),
@@ -1667,21 +1691,21 @@ const Bn = {
1667
1691
  liked: e.bool(),
1668
1692
  image_url: e.string(),
1669
1693
  create_time: e.number(),
1670
- status: ae,
1671
- replies: e.array(T).optional()
1672
- }).lock(), Jn = e.object({
1694
+ status: ie,
1695
+ replies: e.array(j).optional()
1696
+ }).lock(), Hn = e.object({
1673
1697
  image_url: e.string(),
1674
1698
  upload_url: e.string(),
1675
1699
  existed: e.bool()
1676
- }).lock(), f = e.object({
1700
+ }).lock(), y = e.object({
1677
1701
  notification_id: e.string(),
1678
- notification_type: Hn,
1702
+ notification_type: Qn,
1679
1703
  is_read: e.bool(),
1680
1704
  create_time: e.number(),
1681
1705
  origin_user_id: e.string(),
1682
1706
  origin_user_name: e.string(),
1683
1707
  origin_user_avatar_url: e.string()
1684
- }).lock(), Xn = e.object({
1708
+ }).lock(), zn = e.object({
1685
1709
  system_message_subject: e.string(),
1686
1710
  system_message_content: e.string()
1687
1711
  }).lock(), N = e.object({
@@ -1689,87 +1713,87 @@ const Bn = {
1689
1713
  post_subject: e.string(),
1690
1714
  post_summary: e.string(),
1691
1715
  post_image_url: e.string()
1692
- }).lock(), q = e.object({
1716
+ }).lock(), T = e.object({
1693
1717
  comment_id: e.number(),
1694
1718
  comment_content: e.string()
1695
1719
  }).lock(), O = e.object({
1696
1720
  reply_id: e.number(),
1697
1721
  reply_content: e.string()
1698
- }).lock(), Yn = e.object({
1699
- ...f.shape,
1700
- ...Xn.shape,
1701
- notification_type: e.string().enum(p.System)
1702
- }), Zn = e.object({
1703
- ...f.shape,
1722
+ }).lock(), Jn = e.object({
1723
+ ...y.shape,
1724
+ ...zn.shape,
1725
+ notification_type: e.string().enum(g.System)
1726
+ }), Xn = e.object({
1727
+ ...y.shape,
1704
1728
  ...N.shape,
1705
1729
  notification_type: e.string().enum(
1706
- p.PostPinned,
1707
- p.PostHighlighted,
1708
- p.PostDeleted,
1709
- p.PostLiked
1730
+ g.PostPinned,
1731
+ g.PostHighlighted,
1732
+ g.PostDeleted,
1733
+ g.PostLiked
1710
1734
  )
1711
- }), Wn = e.object({
1712
- ...f.shape,
1735
+ }), Yn = e.object({
1736
+ ...y.shape,
1713
1737
  ...N.shape,
1714
- ...q.shape,
1715
- notification_type: e.string().enum(p.PostCommented)
1716
- }), er = e.object({
1717
- ...f.shape,
1718
- ...q.shape,
1738
+ ...T.shape,
1739
+ notification_type: e.string().enum(g.PostCommented)
1740
+ }), Zn = e.object({
1741
+ ...y.shape,
1742
+ ...T.shape,
1719
1743
  ...O.shape,
1720
- notification_type: e.string().enum(p.CommentReplied)
1721
- }), tr = e.object({
1722
- ...f.shape,
1723
- ...q.shape,
1744
+ notification_type: e.string().enum(g.CommentReplied)
1745
+ }), Wn = e.object({
1746
+ ...y.shape,
1747
+ ...T.shape,
1724
1748
  ...N.shape,
1725
- notification_type: e.string().enum(p.CommentLiked, p.CommentDeleted)
1726
- }), nr = e.object({
1727
- ...f.shape,
1749
+ notification_type: e.string().enum(g.CommentLiked, g.CommentDeleted)
1750
+ }), er = e.object({
1751
+ ...y.shape,
1728
1752
  ...O.shape,
1729
- notification_type: e.string().enum(p.ReplyReplied),
1753
+ notification_type: e.string().enum(g.ReplyReplied),
1730
1754
  comment_id: e.number(),
1731
1755
  reply_to_reply_id: e.number(),
1732
1756
  reply_to_reply_content: e.string()
1733
- }), rr = e.object({
1734
- ...f.shape,
1757
+ }), tr = e.object({
1758
+ ...y.shape,
1735
1759
  ...O.shape,
1736
- ...q.shape,
1737
- notification_type: e.string().enum(p.ReplyLiked, p.ReplyDeleted)
1738
- }), ir = e.union(
1760
+ ...T.shape,
1761
+ notification_type: e.string().enum(g.ReplyLiked, g.ReplyDeleted)
1762
+ }), nr = e.union(
1763
+ Jn,
1764
+ Xn,
1739
1765
  Yn,
1740
1766
  Zn,
1741
1767
  Wn,
1742
1768
  er,
1743
- tr,
1744
- nr,
1745
- rr
1746
- ).satisfies().lock(), or = s({ forums: e.array(se) }), ar = s({ topics: e.array(G) }), sr = s({ topic: G }), cr = s({ post: A }), z = s({
1747
- posts: e.array(A),
1769
+ tr
1770
+ ).satisfies().lock(), rr = s({ forums: e.array(oe) }), ar = s({ topics: e.array(A) }), ir = s({ topic: A }), or = s({ post: G }), z = s({
1771
+ posts: e.array(G),
1748
1772
  next_token: e.string().optional()
1749
- }), ur = s({ post: A, antispam: ce }), lr = s({
1750
- replies: e.array(T),
1773
+ }), sr = s({ post: G, antispam: se }), cr = s({
1774
+ replies: e.array(j),
1751
1775
  next_token: e.string().optional()
1752
- }), mr = s({ reply: T }), dr = s({
1753
- reply: T.clone().optional(),
1754
- antispam: ce.clone().optional()
1755
- }), gr = s({ comment: C }), pr = s({
1756
- comments: e.array(C),
1776
+ }), ur = s({ reply: j }), lr = s({
1777
+ reply: j.clone().optional(),
1778
+ antispam: se.clone().optional()
1779
+ }), mr = s({ comment: v }), dr = s({
1780
+ comments: e.array(v),
1757
1781
  next_token: e.string().optional()
1758
- }), _r = s({
1759
- comment: C.clone().optional(),
1760
- antispam: C.clone().optional()
1761
- }), br = e.guard(Jn), yr = s({
1762
- notifications: e.array(ir),
1782
+ }), gr = s({
1783
+ comment: v.clone().optional(),
1784
+ antispam: v.clone().optional()
1785
+ }), pr = e.guard(Hn), _r = s({
1786
+ notifications: e.array(nr),
1763
1787
  next_token: e.string().optional()
1764
- }), fr = s({
1788
+ }), br = s({
1765
1789
  system: e.number(),
1766
1790
  comment: e.number(),
1767
1791
  like: e.number()
1768
1792
  });
1769
- class Ur {
1793
+ class Er {
1794
+ token;
1795
+ req;
1770
1796
  constructor(t) {
1771
- m(this, "token");
1772
- m(this, "req");
1773
1797
  this.token = t, this.req = t.req;
1774
1798
  }
1775
1799
  /**
@@ -1778,8 +1802,8 @@ class Ur {
1778
1802
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
1779
1803
  */
1780
1804
  async getForums(t) {
1781
- const { data: r } = await this.req.get("community/forums", or, t);
1782
- return (r == null ? void 0 : r.forums) || [];
1805
+ const { data: n } = await this.req.get("community/forums", rr, t);
1806
+ return n?.forums || [];
1783
1807
  }
1784
1808
  /**
1785
1809
  * 获取社区话题列表,仅返回启用状态的话题
@@ -1787,34 +1811,34 @@ class Ur {
1787
1811
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
1788
1812
  */
1789
1813
  async getTopics(t) {
1790
- const { data: r } = await this.req.get("community/topics", ar, t);
1791
- return (r == null ? void 0 : r.topics) || [];
1814
+ const { data: n } = await this.req.get("community/topics", ar, t);
1815
+ return n?.topics || [];
1792
1816
  }
1793
1817
  /**
1794
1818
  * 根据话题 ID 获取社区话题信息
1795
1819
  *
1796
1820
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
1797
1821
  */
1798
- async getTopic(t, r) {
1799
- const { data: n, code: i } = await this.req.get("community/topic", sr, {
1800
- ...r,
1822
+ async getTopic(t, n) {
1823
+ const { data: r, code: a } = await this.req.get("community/topic", ir, {
1824
+ ...n,
1801
1825
  params: { topic_id: t }
1802
1826
  });
1803
- return (n == null ? void 0 : n.topic) ?? { error: i };
1827
+ return r?.topic ?? { error: a };
1804
1828
  }
1805
1829
  /**
1806
1830
  * 获取社区帖子列表
1807
1831
  *
1808
1832
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
1809
1833
  */
1810
- async getPosts(t, r) {
1811
- const { data: n, code: i, message: o } = await this.req.get("community/posts", z, {
1812
- ...r,
1834
+ async getPosts(t, n) {
1835
+ const { data: r, code: a, message: i } = await this.req.get("community/posts", z, {
1836
+ ...n,
1813
1837
  params: c(t)
1814
1838
  });
1815
- return n ?? {
1816
- message: o,
1817
- error: i
1839
+ return r ?? {
1840
+ message: i,
1841
+ error: a
1818
1842
  };
1819
1843
  }
1820
1844
  /**
@@ -1822,13 +1846,13 @@ class Ur {
1822
1846
  *
1823
1847
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
1824
1848
  */
1825
- async getPinnedPosts(t, r, n, i) {
1826
- const { data: o, code: d, message: g } = await this.req.get("community/pinned-posts", z, {
1827
- ...i,
1828
- params: c({ forum_id: t, max_results: r, next_token: n })
1849
+ async getPinnedPosts(t, n, r, a) {
1850
+ const { data: i, code: d, message: l } = await this.req.get("community/pinned-posts", z, {
1851
+ ...a,
1852
+ params: c({ forum_id: t, max_results: n, next_token: r })
1829
1853
  });
1830
- return o ?? {
1831
- message: g,
1854
+ return i ?? {
1855
+ message: l,
1832
1856
  error: d
1833
1857
  };
1834
1858
  }
@@ -1837,14 +1861,14 @@ class Ur {
1837
1861
  *
1838
1862
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
1839
1863
  */
1840
- async getPost(t, r) {
1841
- const { data: n, code: i, message: o } = await this.req.get("community/post", cr, {
1842
- ...r,
1864
+ async getPost(t, n) {
1865
+ const { data: r, code: a, message: i } = await this.req.get("community/post", or, {
1866
+ ...n,
1843
1867
  params: { post_id: t }
1844
1868
  });
1845
- return (n == null ? void 0 : n.post) ?? {
1846
- message: o,
1847
- error: i
1869
+ return r?.post ?? {
1870
+ message: i,
1871
+ error: a
1848
1872
  };
1849
1873
  }
1850
1874
  /**
@@ -1852,16 +1876,16 @@ class Ur {
1852
1876
  *
1853
1877
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
1854
1878
  */
1855
- async post(t, r) {
1856
- const { data: n, code: i, message: o } = await this.req.post(
1879
+ async post(t, n) {
1880
+ const { data: r, code: a, message: i } = await this.req.post(
1857
1881
  "community/post",
1858
1882
  c(t),
1859
- ur,
1860
- r
1883
+ sr,
1884
+ n
1861
1885
  );
1862
- return n ?? {
1863
- message: o,
1864
- error: i
1886
+ return r ?? {
1887
+ message: i,
1888
+ error: a
1865
1889
  };
1866
1890
  }
1867
1891
  /**
@@ -1869,14 +1893,14 @@ class Ur {
1869
1893
  *
1870
1894
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
1871
1895
  */
1872
- async getComments(t, r) {
1873
- const { data: n, code: i, message: o } = await this.req.get("community/comments", pr, {
1874
- ...r,
1896
+ async getComments(t, n) {
1897
+ const { data: r, code: a, message: i } = await this.req.get("community/comments", dr, {
1898
+ ...n,
1875
1899
  params: c(t)
1876
1900
  });
1877
- return n ?? {
1878
- message: o,
1879
- error: i
1901
+ return r ?? {
1902
+ message: i,
1903
+ error: a
1880
1904
  };
1881
1905
  }
1882
1906
  /**
@@ -1884,14 +1908,14 @@ class Ur {
1884
1908
  *
1885
1909
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
1886
1910
  */
1887
- async getComment(t, r) {
1888
- const { data: n, code: i, message: o } = await this.req.get("community/comment", gr, {
1889
- ...r,
1911
+ async getComment(t, n) {
1912
+ const { data: r, code: a, message: i } = await this.req.get("community/comment", mr, {
1913
+ ...n,
1890
1914
  params: { comment_id: t }
1891
1915
  });
1892
- return (n == null ? void 0 : n.comment) ?? {
1893
- message: o,
1894
- error: i
1916
+ return r?.comment ?? {
1917
+ message: i,
1918
+ error: a
1895
1919
  };
1896
1920
  }
1897
1921
  /**
@@ -1899,17 +1923,17 @@ class Ur {
1899
1923
  *
1900
1924
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=Nv7lk0nTmr
1901
1925
  */
1902
- async comment(t, r) {
1926
+ async comment(t, n) {
1903
1927
  await this.token.autoLogin();
1904
- const { data: n, code: i, message: o } = await this.req.post(
1928
+ const { data: r, code: a, message: i } = await this.req.post(
1905
1929
  "community/comment",
1906
1930
  c(t),
1907
- _r,
1908
- r
1931
+ gr,
1932
+ n
1909
1933
  );
1910
- return n ?? {
1911
- message: o,
1912
- error: i
1934
+ return r ?? {
1935
+ message: i,
1936
+ error: a
1913
1937
  };
1914
1938
  }
1915
1939
  /**
@@ -1917,14 +1941,14 @@ class Ur {
1917
1941
  *
1918
1942
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
1919
1943
  */
1920
- async getReplies(t, r) {
1921
- const { data: n } = await this.req.get("community/replies", lr, {
1922
- ...r,
1944
+ async getReplies(t, n) {
1945
+ const { data: r } = await this.req.get("community/replies", cr, {
1946
+ ...n,
1923
1947
  params: c({ max_results: 20, ...t })
1924
1948
  });
1925
1949
  return {
1926
- replies: (n == null ? void 0 : n.replies) || [],
1927
- next_token: (n == null ? void 0 : n.next_token) || ""
1950
+ replies: r?.replies || [],
1951
+ next_token: r?.next_token || ""
1928
1952
  };
1929
1953
  }
1930
1954
  /**
@@ -1932,14 +1956,14 @@ class Ur {
1932
1956
  *
1933
1957
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
1934
1958
  */
1935
- async getReply(t, r) {
1936
- const { data: n, code: i, message: o } = await this.req.get("community/reply", mr, {
1937
- ...r,
1959
+ async getReply(t, n) {
1960
+ const { data: r, code: a, message: i } = await this.req.get("community/reply", ur, {
1961
+ ...n,
1938
1962
  params: { reply_id: t }
1939
1963
  });
1940
- return (n == null ? void 0 : n.reply) ?? {
1941
- message: o,
1942
- error: i
1964
+ return r?.reply ?? {
1965
+ message: i,
1966
+ error: a
1943
1967
  };
1944
1968
  }
1945
1969
  /**
@@ -1947,17 +1971,17 @@ class Ur {
1947
1971
  *
1948
1972
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=KA8WpTX2pg
1949
1973
  */
1950
- async reply(t, r) {
1974
+ async reply(t, n) {
1951
1975
  await this.token.autoLogin();
1952
- const { data: n, code: i, message: o } = await this.req.post(
1976
+ const { data: r, code: a, message: i } = await this.req.post(
1953
1977
  "community/reply",
1954
1978
  c(t),
1955
- dr,
1956
- r
1979
+ lr,
1980
+ n
1957
1981
  );
1958
- return n ?? {
1959
- message: o,
1960
- error: i
1982
+ return r ?? {
1983
+ message: i,
1984
+ error: a
1961
1985
  };
1962
1986
  }
1963
1987
  /**
@@ -1965,17 +1989,17 @@ class Ur {
1965
1989
  *
1966
1990
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
1967
1991
  */
1968
- async like(t, r) {
1992
+ async like(t, n) {
1969
1993
  await this.token.autoLogin();
1970
- const { ok: n, code: i, message: o } = await this.req.post(
1994
+ const { ok: r, code: a, message: i } = await this.req.post(
1971
1995
  "community/like",
1972
1996
  { ...t, action: "like" },
1973
1997
  null,
1974
- r
1998
+ n
1975
1999
  );
1976
- return n || {
1977
- message: o,
1978
- error: i
2000
+ return r || {
2001
+ message: i,
2002
+ error: a
1979
2003
  };
1980
2004
  }
1981
2005
  /**
@@ -1983,17 +2007,17 @@ class Ur {
1983
2007
  *
1984
2008
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
1985
2009
  */
1986
- async unlike(t, r) {
2010
+ async unlike(t, n) {
1987
2011
  await this.token.autoLogin();
1988
- const { ok: n, code: i, message: o } = await this.req.post(
2012
+ const { ok: r, code: a, message: i } = await this.req.post(
1989
2013
  "community/like",
1990
2014
  { ...t, action: "unlike" },
1991
2015
  null,
1992
- r
2016
+ n
1993
2017
  );
1994
- return n || {
1995
- message: o,
1996
- error: i
2018
+ return r || {
2019
+ message: i,
2020
+ error: a
1997
2021
  };
1998
2022
  }
1999
2023
  /**
@@ -2001,13 +2025,13 @@ class Ur {
2001
2025
  *
2002
2026
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=dWWhpoShxZ
2003
2027
  */
2004
- async getMediaPresignedUrl(t, r) {
2028
+ async getMediaPresignedUrl(t, n) {
2005
2029
  await this.token.autoLogin();
2006
- const { data: n } = await this.req.get("community/media-presign-url", br, {
2007
- ...r,
2030
+ const { data: r } = await this.req.get("community/media-presign-url", pr, {
2031
+ ...n,
2008
2032
  params: t
2009
2033
  });
2010
- return n;
2034
+ return r;
2011
2035
  }
2012
2036
  /**
2013
2037
  * 获取用户社区通知
@@ -2016,15 +2040,15 @@ class Ur {
2016
2040
  *
2017
2041
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=W5lceDgbBG
2018
2042
  */
2019
- async getNotifications(t, r) {
2043
+ async getNotifications(t, n) {
2020
2044
  await this.token.autoLogin();
2021
- const { data: n } = await this.req.get("community/notifications", yr, {
2022
- ...r,
2045
+ const { data: r } = await this.req.get("community/notifications", _r, {
2046
+ ...n,
2023
2047
  params: c({ max_results: 20, ...t })
2024
2048
  });
2025
2049
  return {
2026
- notifications: (n == null ? void 0 : n.notifications) || [],
2027
- next_token: (n == null ? void 0 : n.next_token) || ""
2050
+ notifications: r?.notifications || [],
2051
+ next_token: r?.next_token || ""
2028
2052
  };
2029
2053
  }
2030
2054
  /**
@@ -2034,35 +2058,38 @@ class Ur {
2034
2058
  */
2035
2059
  async getUnreadNotificationsCount(t) {
2036
2060
  if (!await this.token.autoLogin()) return null;
2037
- const { data: r } = await this.req.get(
2061
+ const { data: n } = await this.req.get(
2038
2062
  "community/unread-notifications-count",
2039
- fr,
2063
+ br,
2040
2064
  t
2041
2065
  );
2042
- return r;
2066
+ return n;
2043
2067
  }
2044
2068
  /**
2045
2069
  * 社区用户将通知标为已读
2046
2070
  *
2047
2071
  * https://kdocs.cn/l/cbggfJodHLIz?linkname=TCJQxnOjJe
2048
2072
  */
2049
- async clearUnreadNotifications(t, r) {
2073
+ async clearUnreadNotifications(t, n) {
2050
2074
  if (!await this.token.autoLogin()) return !1;
2051
- const { ok: n } = await this.req.post("community/clear-unread-notifications", { category: t }, null, r);
2052
- return n;
2075
+ const { ok: r } = await this.req.post("community/clear-unread-notifications", { category: t }, null, n);
2076
+ return r;
2053
2077
  }
2054
2078
  }
2055
- const hr = s({
2079
+ const yr = s({
2056
2080
  nonce_str: e.string(),
2057
2081
  timestamp: e.number(),
2058
2082
  signature: e.string()
2059
2083
  });
2060
- var wr = /* @__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))(wr || {});
2061
- function E(a) {
2062
- return R(a, "open_id", "union_id", "weixin_token");
2084
+ var fr = /* @__PURE__ */ ((o) => (o.RedirectUriDisMatch = "10003", o.AppidError = "10016", o.AuthorizationError = "10015", o.NoRightForScope = "10005", o.Frequently = "10009", o.AppBanded = "10004", o.ShouldFollow = "10006", o.ScopeNull = "10010", o.RedirectUriNull = "10011", o.AppidNull = "10012", o.StateNull = "10013", o))(fr || {});
2085
+ function L(o) {
2086
+ return C(o, "open_id", "union_id", "weixin_token");
2063
2087
  }
2064
2088
  const J = "wx_login_cache";
2065
- class Fr {
2089
+ class Pr {
2090
+ token;
2091
+ $appid;
2092
+ req;
2066
2093
  /**
2067
2094
  * 创建微信相关功能接口
2068
2095
  *
@@ -2076,11 +2103,8 @@ class Fr {
2076
2103
  *
2077
2104
  * https://developers.weixin.qq.com/miniprogram/dev/api/open-api/account-info/wx.getAccountInfoSync.html
2078
2105
  */
2079
- constructor(t, r) {
2080
- m(this, "token");
2081
- m(this, "$appid");
2082
- m(this, "req");
2083
- this.token = t, this.req = t.req, this.$appid = r, this.getLoginCache();
2106
+ constructor(t, n) {
2107
+ this.token = t, this.req = t.req, this.$appid = n, this.getLoginCache();
2084
2108
  }
2085
2109
  get appid() {
2086
2110
  return this.$appid;
@@ -2096,8 +2120,8 @@ class Fr {
2096
2120
  const t = this.token.storage.get(J);
2097
2121
  if (!t)
2098
2122
  return null;
2099
- const r = ye(t);
2100
- return E(r) ? (this.token.weixinToken = r.weixin_token, await this.token.autoLogin(), r) : null;
2123
+ const n = pe(t);
2124
+ return L(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
2101
2125
  }
2102
2126
  /**
2103
2127
  * 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
@@ -2117,20 +2141,20 @@ class Fr {
2117
2141
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
2118
2142
  */
2119
2143
  async login(t) {
2120
- if (!y.wx)
2144
+ if (!b.wx)
2121
2145
  throw new Error("当前环境非微信小程序");
2122
- const r = await this.getLoginCache();
2123
- if (r)
2124
- return r;
2125
- const n = await we(), { data: i, code: o, message: d } = await this.req.post(
2146
+ const n = await this.getLoginCache();
2147
+ if (n)
2148
+ return n;
2149
+ const r = await ye(), { data: a, code: i, message: d } = await this.req.post(
2126
2150
  "weixin/login",
2127
- { code: n, appid: this.appid },
2128
- E,
2151
+ { code: r, appid: this.appid },
2152
+ L,
2129
2153
  { ...t, message: !1 }
2130
2154
  );
2131
- return i && (this.token.weixinToken = i.weixin_token, this.token.storage.set(J, JSON.stringify(i)), await this.token.autoLogin()), i ?? {
2155
+ return a && (this.token.weixinToken = a.weixin_token, this.token.storage.set(J, JSON.stringify(a)), await this.token.autoLogin()), a ?? {
2132
2156
  message: d,
2133
- error: o
2157
+ error: i
2134
2158
  };
2135
2159
  }
2136
2160
  /**
@@ -2149,30 +2173,30 @@ class Fr {
2149
2173
  * - snsapi_base 不弹出授权页面,用户无感知,只能获取用户 openid,如果需要获取 union_id 则需要 snsapi_userinfo
2150
2174
  * - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
2151
2175
  */
2152
- async webLogin(t = "snsapi_userinfo", r) {
2153
- const n = P("code"), i = Date.now(), o = +P("state");
2154
- if (!n || !o || o < i - 1e3 * 60 * 5 || o > i) {
2155
- const le = B(["code", "state"]);
2176
+ async webLogin(t = "snsapi_userinfo", n) {
2177
+ const r = E("code"), a = Date.now(), i = +E("state");
2178
+ if (!r || !i || i < a - 1e3 * 60 * 5 || i > a) {
2179
+ const ue = B(["code", "state"]);
2156
2180
  location.replace(
2157
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${i}#wechat_redirect`
2181
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ue)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
2158
2182
  );
2159
2183
  return;
2160
2184
  }
2161
- if (/^100\d{2}$/.test(n))
2185
+ if (/^100\d{2}$/.test(r))
2162
2186
  return {
2163
- message: "Error: " + n,
2164
- error: n
2187
+ message: "Error: " + r,
2188
+ error: r
2165
2189
  };
2166
2190
  const d = B(["code", "state"]);
2167
2191
  "replaceState" in history && history.replaceState({}, "", d);
2168
2192
  const {
2169
- data: g,
2170
- code: h,
2171
- message: ue
2172
- } = await this.req.post("weixin/login", { code: n, appid: this.appid }, E, r);
2173
- return g && (this.token.weixinToken = g.weixin_token, await this.token.autoLogin()), g ?? {
2174
- message: ue,
2175
- error: h
2193
+ data: l,
2194
+ code: f,
2195
+ message: ce
2196
+ } = await this.req.post("weixin/login", { code: r, appid: this.appid }, L, n);
2197
+ return l && (this.token.weixinToken = l.weixin_token, await this.token.autoLogin()), l ?? {
2198
+ message: ce,
2199
+ error: f
2176
2200
  };
2177
2201
  }
2178
2202
  /**
@@ -2187,14 +2211,14 @@ class Fr {
2187
2211
  * @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
2188
2212
  * @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
2189
2213
  */
2190
- async linkPlayer(t, r, n) {
2191
- if (!t || !r)
2214
+ async linkPlayer(t, n, r) {
2215
+ if (!t || !n)
2192
2216
  return !1;
2193
- const { ok: i } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: r }, null, {
2194
- ...n,
2217
+ const { ok: a } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: n }, null, {
2218
+ ...r,
2195
2219
  message: !1
2196
2220
  });
2197
- return i;
2221
+ return a;
2198
2222
  }
2199
2223
  /**
2200
2224
  * 获取集成 JSSDK 所需的签名信息
@@ -2202,162 +2226,162 @@ class Fr {
2202
2226
  * https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
2203
2227
  */
2204
2228
  async getJSSDKConfig(t) {
2205
- const { data: r } = await this.req.get("weixin/offiaccount/jssdk-sign", hr, {
2229
+ const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", yr, {
2206
2230
  ...t,
2207
2231
  params: {
2208
2232
  appid: this.appid,
2209
2233
  url: location.href.split("#")[0]
2210
2234
  }
2211
2235
  });
2212
- return r ? {
2236
+ return n ? {
2213
2237
  appid: this.appid,
2214
- nonceStr: r.nonce_str,
2215
- timestamp: r.timestamp,
2216
- signature: r.signature
2238
+ nonceStr: n.nonce_str,
2239
+ timestamp: n.timestamp,
2240
+ signature: n.signature
2217
2241
  } : null;
2218
2242
  }
2219
2243
  }
2220
2244
  export {
2221
- ce as AntispamValidator,
2222
- Rr as AuthToken,
2223
- an as CashbackEngagementDataValidator,
2224
- sn as ClaimActivationKeyEngagementDataValidator,
2225
- b as ClaimRewardStatus,
2226
- U as ClaimRewardStatusValidator,
2227
- xn as ClaimedItemValidator,
2245
+ se as AntispamValidator,
2246
+ kr as AuthToken,
2247
+ nn as CashbackEngagementDataValidator,
2248
+ rn as ClaimActivationKeyEngagementDataValidator,
2249
+ _ as ClaimRewardStatus,
2250
+ $ as ClaimRewardStatusValidator,
2251
+ jn as ClaimedItemValidator,
2228
2252
  Z as ClubAddressValidator,
2229
- jr as ClubApi,
2253
+ Cr as ClubApi,
2230
2254
  W as ClubBenefitSummaryValidator,
2231
- Ae as ClubBenefitValidator,
2232
- Te as ClubCreditChangeScene,
2233
- qe as ClubCreditChangeSceneValidator,
2234
- Ve as ClubCreditChangeType,
2235
- je as ClubCreditChangeTypeValidator,
2236
- Ge as ClubCreditLogValidator,
2237
- Ee as ClubGlobalConfigValidator,
2238
- xe as ClubItemType,
2255
+ De as ClubBenefitValidator,
2256
+ Re as ClubCreditChangeScene,
2257
+ Ve as ClubCreditChangeSceneValidator,
2258
+ ve as ClubCreditChangeType,
2259
+ Ce as ClubCreditChangeTypeValidator,
2260
+ Fe as ClubCreditLogValidator,
2261
+ xe as ClubGlobalConfigValidator,
2262
+ je as ClubItemType,
2239
2263
  X as ClubItemTypeValidator,
2240
- Pe as ClubPlayerValidator,
2264
+ Se as ClubPlayerValidator,
2241
2265
  ee as ClubProductValidator,
2242
- Se as ClubRedemptionStatus,
2243
- Le as ClubRedemptionStatusValidator,
2244
- Ie as ClubUserCreditValidator,
2245
- De as ClubUserProfileValidator,
2246
- vn as CommentEngagementValidator,
2247
- C as CommentValidator,
2248
- Ur as CommunityApi,
2249
- We as EngageAccountType,
2250
- et as EngageAccountTypeValidator,
2251
- qn as EngageResponseValidator,
2252
- Rn as EngageRewardValidator,
2253
- Pr as EventApi,
2254
- on as EventConfigValidator,
2255
- bt as EventFeatureConfigOfCashbackValidator,
2256
- ft as EventFeatureConfigOfCheckInValidator,
2257
- wt as EventFeatureConfigOfClaimActivationKeyValidator,
2258
- vt as EventFeatureConfigOfClaimRewardsValidator,
2259
- Rt as EventFeatureConfigOfCommentValidator,
2260
- jt as EventFeatureConfigOfFollowValidator,
2261
- xt as EventFeatureConfigOfGiftCodeValidator,
2262
- Lt as EventFeatureConfigOfInviteValidator,
2263
- Pt as EventFeatureConfigOfInvitedRegisterValidator,
2264
- Gt as EventFeatureConfigOfLotteryDrawValidator,
2265
- Dt as EventFeatureConfigOfLotteryValidator,
2266
- Nt as EventFeatureConfigOfPreregisterValidator,
2267
- Bt as EventFeatureConfigOfQuestValidator,
2268
- Qt as EventFeatureConfigOfRegisterValidator,
2269
- Ht as EventFeatureConfigOfShareValidator,
2270
- Jt as EventFeatureConfigOfSubscribeValidator,
2271
- Yt as EventFeatureConfigOfSurveyValidator,
2272
- Wt as EventFeatureConfigOfTeamValidator,
2273
- nn as EventFeatureConfigOfVoteValidator,
2274
- rn as EventFeatureConfigValidator,
2275
- tt as EventPeriodType,
2276
- nt as EventPeriodTypeValidator,
2277
- D as EventRewardItemConfigValidator,
2278
- Oe as ExtraGameRewardValidator,
2279
- Ne as ExtraPhysicalShipmentValidator,
2280
- pt as FeatureRewardValidator,
2266
+ Te as ClubRedemptionStatus,
2267
+ qe as ClubRedemptionStatusValidator,
2268
+ Ue as ClubUserCreditValidator,
2269
+ $e as ClubUserProfileValidator,
2270
+ hn as CommentEngagementValidator,
2271
+ v as CommentValidator,
2272
+ Er as CommunityApi,
2273
+ Xe as EngageAccountType,
2274
+ Ye as EngageAccountTypeValidator,
2275
+ Vn as EngageResponseValidator,
2276
+ kn as EngageRewardValidator,
2277
+ Sr as EventApi,
2278
+ tn as EventConfigValidator,
2279
+ gt as EventFeatureConfigOfCashbackValidator,
2280
+ _t as EventFeatureConfigOfCheckInValidator,
2281
+ yt as EventFeatureConfigOfClaimActivationKeyValidator,
2282
+ ht as EventFeatureConfigOfClaimRewardsValidator,
2283
+ kt as EventFeatureConfigOfCommentValidator,
2284
+ Ct as EventFeatureConfigOfFollowValidator,
2285
+ jt as EventFeatureConfigOfGiftCodeValidator,
2286
+ qt as EventFeatureConfigOfInviteValidator,
2287
+ St as EventFeatureConfigOfInvitedRegisterValidator,
2288
+ Ft as EventFeatureConfigOfLotteryDrawValidator,
2289
+ $t as EventFeatureConfigOfLotteryValidator,
2290
+ It as EventFeatureConfigOfPreregisterValidator,
2291
+ Gt as EventFeatureConfigOfQuestValidator,
2292
+ Ot as EventFeatureConfigOfRegisterValidator,
2293
+ Mt as EventFeatureConfigOfShareValidator,
2294
+ Kt as EventFeatureConfigOfSubscribeValidator,
2295
+ zt as EventFeatureConfigOfSurveyValidator,
2296
+ Xt as EventFeatureConfigOfTeamValidator,
2297
+ Wt as EventFeatureConfigOfVoteValidator,
2298
+ en as EventFeatureConfigValidator,
2299
+ Ze as EventPeriodType,
2300
+ We as EventPeriodTypeValidator,
2301
+ F as EventRewardItemConfigValidator,
2302
+ Ae as ExtraGameRewardValidator,
2303
+ Ie as ExtraPhysicalShipmentValidator,
2304
+ mt as FeatureRewardValidator,
2281
2305
  u as FeatureType,
2282
- rt as FeatureTypeValidator,
2283
- Bn as ForumMode,
2284
- Mn as ForumModeValidator,
2285
- se as ForumValidator,
2286
- j as GamerItemType,
2306
+ et as FeatureTypeValidator,
2307
+ Nn as ForumMode,
2308
+ On as ForumModeValidator,
2309
+ oe as ForumValidator,
2310
+ V as GamerItemType,
2287
2311
  te as GamerItemTypeValidator,
2288
- Ce as Gender,
2289
- Re as GenderValidator,
2290
- cn as GiftCodeEngagementDataValidator,
2291
- un as InviteEngagementDataValidator,
2292
- mt as LotteryDrawAction,
2293
- Lr as LotteryDrawActionValidator,
2294
- gn as LotteryDrawEngagementDataValidator,
2295
- ln as LotteryEngagementDataValidator,
2296
- v as LotteryTicketStatus,
2297
- xr as LotteryTicketStatusValidator,
2298
- f as NotificationBaseValidator,
2299
- Kn as NotificationCategory,
2300
- $r as NotificationCategoryValidator,
2301
- er as NotificationCommentReplyValidator,
2302
- tr as NotificationCommentValidator,
2303
- q as NotificationPayloadCommentValidator,
2312
+ we as Gender,
2313
+ ke as GenderValidator,
2314
+ an as GiftCodeEngagementDataValidator,
2315
+ on as InviteEngagementDataValidator,
2316
+ ct as LotteryDrawAction,
2317
+ qr as LotteryDrawActionValidator,
2318
+ ln as LotteryDrawEngagementDataValidator,
2319
+ sn as LotteryEngagementDataValidator,
2320
+ k as LotteryTicketStatus,
2321
+ jr as LotteryTicketStatusValidator,
2322
+ y as NotificationBaseValidator,
2323
+ Mn as NotificationCategory,
2324
+ Lr as NotificationCategoryValidator,
2325
+ Zn as NotificationCommentReplyValidator,
2326
+ Wn as NotificationCommentValidator,
2327
+ T as NotificationPayloadCommentValidator,
2304
2328
  N as NotificationPayloadPostValidator,
2305
2329
  O as NotificationPayloadReplyValidator,
2306
- Xn as NotificationPayloadSystemValidator,
2307
- Wn as NotificationPostCommentValidator,
2308
- Zn as NotificationPostValidator,
2309
- nr as NotificationReplyRepliedValidator,
2310
- rr as NotificationReplyValidator,
2311
- Yn as NotificationSystemValidator,
2312
- p as NotificationType,
2313
- Hn as NotificationTypeValidator,
2314
- ir as NotificationValidator,
2315
- Fe as PlayerRoleCardValidator,
2330
+ zn as NotificationPayloadSystemValidator,
2331
+ Yn as NotificationPostCommentValidator,
2332
+ Xn as NotificationPostValidator,
2333
+ er as NotificationReplyRepliedValidator,
2334
+ tr as NotificationReplyValidator,
2335
+ Jn as NotificationSystemValidator,
2336
+ g as NotificationType,
2337
+ Qn as NotificationTypeValidator,
2338
+ nr as NotificationValidator,
2339
+ Pe as PlayerRoleCardValidator,
2316
2340
  Y as PlayerRoleValidator,
2317
- Qn as PostStatus,
2318
- ae as PostStatusValidator,
2319
- A as PostValidator,
2320
- pn as PreregisterEngagementDataValidator,
2321
- Jn as PresignedUrlResponseValidator,
2322
- _n as QuestEngagementDataValidator,
2323
- it as QuestObjective,
2341
+ Bn as PostStatus,
2342
+ ie as PostStatusValidator,
2343
+ G as PostValidator,
2344
+ mn as PreregisterEngagementDataValidator,
2345
+ Hn as PresignedUrlResponseValidator,
2346
+ dn as QuestEngagementDataValidator,
2347
+ tt as QuestObjective,
2324
2348
  re as QuestObjectiveValidator,
2325
- Vr as RedeemParamsValidator,
2326
- Be as RedemptionValidator,
2327
- gt as RegularRewardValidator,
2328
- zn as ReplyToValidator,
2329
- T as ReplyValidator,
2330
- Tr as RewardItemType,
2349
+ vr as RedeemParamsValidator,
2350
+ Ge as RedemptionValidator,
2351
+ lt as RegularRewardValidator,
2352
+ Kn as ReplyToValidator,
2353
+ j as ReplyValidator,
2354
+ Rr as RewardItemType,
2331
2355
  ne as RewardItemTypeValidator,
2332
- st as RewardSource,
2333
- F as RewardSourceValidator,
2334
- _ as RewardStatus,
2335
- $ as RewardStatusSuffix,
2336
- ie as RewardStatusSuffixValidator,
2337
- qr as RewardStatusValidator,
2338
- Cn as RewardValidator,
2339
- Ue as RoleBaseInfoValidator,
2340
- $e as ServerBaseInfoValidator,
2341
- bn as ShareEngagementDataValidator,
2342
- fn as SurveyEngagementDataValidator,
2343
- lt as TeamAction,
2344
- Sr as TeamActionValidator,
2345
- wn as TeamEngagementDataValidator,
2346
- hn as TeamEngagementValidator,
2347
- Er as TeamMemberValidator,
2348
- ct as TeamVisibility,
2349
- ut as TeamVisibilityValidator,
2350
- G as TopicValidator,
2356
+ at as RewardSource,
2357
+ U as RewardSourceValidator,
2358
+ p as RewardStatus,
2359
+ P as RewardStatusSuffix,
2360
+ ae as RewardStatusSuffixValidator,
2361
+ Vr as RewardStatusValidator,
2362
+ wn as RewardValidator,
2363
+ Ee as RoleBaseInfoValidator,
2364
+ Le as ServerBaseInfoValidator,
2365
+ gn as ShareEngagementDataValidator,
2366
+ _n as SurveyEngagementDataValidator,
2367
+ st as TeamAction,
2368
+ Tr as TeamActionValidator,
2369
+ yn as TeamEngagementDataValidator,
2370
+ bn as TeamEngagementValidator,
2371
+ xr as TeamMemberValidator,
2372
+ it as TeamVisibility,
2373
+ ot as TeamVisibilityValidator,
2374
+ A as TopicValidator,
2351
2375
  I as UserEngagementDataValidator,
2352
- Vn as UserEngagementValidator,
2353
- Tn as UserFeatureStatusValidator,
2354
- oe as UserRewardValidator,
2355
- jn as VerifyMobileResultValidator,
2356
- kn as VoteEngagementDataValidator,
2357
- ot as VoteOptionSource,
2358
- at as VoteOptionSourceValidator,
2359
- Fr as WeixinApi,
2360
- yn as WeixinSubscribeEngagementDataValidator,
2361
- wr as WeixinWebLoginErrorCode,
2362
- hr as isWeixinSignResponse
2376
+ vn as UserEngagementValidator,
2377
+ Rn as UserFeatureStatusValidator,
2378
+ D as UserRewardValidator,
2379
+ Cn as VerifyMobileResultValidator,
2380
+ fn as VoteEngagementDataValidator,
2381
+ nt as VoteOptionSource,
2382
+ rt as VoteOptionSourceValidator,
2383
+ Pr as WeixinApi,
2384
+ pn as WeixinSubscribeEngagementDataValidator,
2385
+ fr as WeixinWebLoginErrorCode,
2386
+ yr as isWeixinSignResponse
2363
2387
  };