@seayoo-web/gamer-api 2.5.6 → 2.5.7

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