@seayoo-web/gamer-api 2.5.3 → 2.5.4

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