@seayoo-web/gamer-api 2.5.0 → 2.5.2

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