@seayoo-web/gamer-api 2.4.2 → 2.4.4

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