@seayoo-web/gamer-api 4.6.4 → 4.6.6

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,23 +1,23 @@
1
1
  import { isComboWebView as e } from "@seayoo-web/combo-webview";
2
- import { isPlainObject as t, localStorageHelper as n, omitFields as r, parseJSON as i, pruneObject as a, pruneURL as o, queryString as s, removePara as c, supportWindow as l, supportWx as u, usePromise as ee, weixinStorageHelper as te } from "@seayoo-web/utils";
3
- import { objectGuard as d, v as f } from "@seayoo-web/validator";
2
+ import { isPlainObject as t, localStorageHelper as n, omitFields as r, parseJSON as i, pruneObject as a, pruneURL as o, queryString as s, supportWindow as ee, supportWx as c, usePromise as te, weixinStorageHelper as ne } from "@seayoo-web/utils";
3
+ import { objectGuard as l, v as u } from "@seayoo-web/validator";
4
4
  //#region src/token.guards.ts
5
- function ne(e) {
5
+ function re(e) {
6
6
  return t(e, "gamer_token") && typeof e.gamer_token == "string";
7
7
  }
8
- function re(e) {
8
+ function ie(e) {
9
9
  return t(e, "gamer_token", "game_id") && typeof e.gamer_token == "string" && typeof e.game_id == "string";
10
10
  }
11
- function ie(e) {
11
+ function ae(e) {
12
12
  return t(e);
13
13
  }
14
14
  //#endregion
15
15
  //#region src/utils.ts
16
- function ae(e) {
16
+ function d(e) {
17
17
  return /^\/[a-z\d-]+$/.test(e);
18
18
  }
19
19
  async function oe() {
20
- let { promise: e, resolve: t } = ee();
20
+ let { promise: e, resolve: t } = te();
21
21
  return wx.login({
22
22
  success(e) {
23
23
  t(e.code);
@@ -29,7 +29,7 @@ async function oe() {
29
29
  }
30
30
  //#endregion
31
31
  //#region src/token.ts
32
- var p = "gamer_token", se = class {
32
+ var f = "gamer_token", se = class {
33
33
  _NetRequest;
34
34
  _idToken = "";
35
35
  _weixinToken = "";
@@ -37,8 +37,8 @@ var p = "gamer_token", se = class {
37
37
  req;
38
38
  storage;
39
39
  constructor(t, r) {
40
- this.storage = u() ? te : n;
41
- let i = ae(t) ? t : `https://${o(t)}`;
40
+ this.storage = c() ? ne : n;
41
+ let i = d(t) ? t : `https://${o(t)}`;
42
42
  if (this._NetRequest = r, this.req = r({
43
43
  baseURL: `${i}/v1`,
44
44
  timeout: 1e4,
@@ -55,7 +55,7 @@ var p = "gamer_token", se = class {
55
55
  requestTransformer: (e) => {
56
56
  this._gamerToken && (e.headers.Authorization = `Bearer ${this._gamerToken}`);
57
57
  }
58
- }), l()) {
58
+ }), ee()) {
59
59
  let t = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), n = s("gamer_token");
60
60
  (e() || t && n) && (this._gamerToken = n);
61
61
  }
@@ -65,7 +65,7 @@ var p = "gamer_token", se = class {
65
65
  return this._NetRequest;
66
66
  }
67
67
  loadGamerTokenCache() {
68
- let e = this.storage.get(p).match(/^(\d{12,})#(.{8,})$/);
68
+ let e = this.storage.get(f).match(/^(\d{12,})#(.{8,})$/);
69
69
  if (e) {
70
70
  let t = parseInt(e[1]), n = e[2];
71
71
  if (t > Date.now() - (24 * 3600 - 10) * 1e3) {
@@ -73,7 +73,7 @@ var p = "gamer_token", se = class {
73
73
  return;
74
74
  }
75
75
  }
76
- this.storage.remove(p);
76
+ this.storage.remove(f);
77
77
  }
78
78
  get isLoggedIn() {
79
79
  return this._gamerToken !== "";
@@ -94,19 +94,19 @@ var p = "gamer_token", se = class {
94
94
  return this._gamerToken;
95
95
  }
96
96
  set gamerToken(e) {
97
- this._gamerToken = e, e ? this.storage.set(p, `${Date.now()}#${e}`) : this.storage.remove(p);
97
+ this._gamerToken = e, e ? this.storage.set(f, `${Date.now()}#${e}`) : this.storage.remove(f);
98
98
  }
99
99
  logout() {
100
100
  this._idToken = "", this._weixinToken = "", this.gamerToken = "";
101
101
  }
102
102
  async autoLogin() {
103
103
  if (this.gamerToken) return !0;
104
- let e = u();
104
+ let e = c();
105
105
  if (!this.idToken || e && !this.weixinToken) return !1;
106
106
  let { code: t, data: n } = await this.req.post("login-with-token", a({
107
107
  id_token: this.idToken,
108
108
  weixin_token: e ? this.weixinToken : null
109
- }), ne, {
109
+ }), re, {
110
110
  message: !1,
111
111
  cacheTTL: 300,
112
112
  cacheResolve: () => `${this.idToken}_${e ? this.weixinToken : "null"}`
@@ -122,9 +122,9 @@ var p = "gamer_token", se = class {
122
122
  return this.gamerToken = n?.gamer_token || "", !!this.gamerToken;
123
123
  }
124
124
  async switchGame(e) {
125
- let t = u();
125
+ let t = c();
126
126
  if (!this.idToken || t && !this.weixinToken) return !1;
127
- let { code: n, data: r } = await this.req.post("session/switch-game", a({ game_id: e }), re, {
127
+ let { code: n, data: r } = await this.req.post("session/switch-game", a({ game_id: e }), ie, {
128
128
  message: !1,
129
129
  maxRetry: 2
130
130
  });
@@ -135,193 +135,193 @@ var p = "gamer_token", se = class {
135
135
  }
136
136
  async getSession() {
137
137
  if (!await this.autoLogin()) return null;
138
- let { data: e } = await this.req.get("session", null, ie, { message: !1 });
138
+ let { data: e } = await this.req.get("session", null, ae, { message: !1 });
139
139
  return e;
140
140
  }
141
141
  async authRealName(e) {
142
142
  if (!await this.autoLogin()) return null;
143
- let { data: t } = await this.req.post("auth-real-name", a(e), ie);
143
+ let { data: t } = await this.req.post("auth-real-name", a(e), ae);
144
144
  return t;
145
145
  }
146
- }, m = {
146
+ }, ce = {
147
147
  Unknown: "unknown",
148
148
  Male: "male",
149
149
  Female: "female"
150
- }, ce = f.string().enum(m).lock(), le = {
150
+ }, le = u.string().enum(ce).lock(), ue = {
151
151
  Increase: "increase",
152
152
  Decrease: "decrease",
153
153
  Expired: "expired"
154
- }, ue = f.string().enum(le).lock(), de = {
154
+ }, de = u.string().enum(ue).lock(), fe = {
155
155
  Order: "order",
156
156
  Consumption: "consumption",
157
157
  Redeem: "redeem",
158
158
  Expire: "expire",
159
159
  Admin: "admin",
160
160
  Event: "event"
161
- }, fe = f.string().enum(de).lock(), pe = {
161
+ }, pe = u.string().enum(fe).lock(), me = {
162
162
  GameReward: "game_reward",
163
163
  Physical: "physical",
164
164
  Virtual: "virtual"
165
- }, h = f.string().enum(pe).lock(), me = {
165
+ }, p = u.string().enum(me).lock(), he = {
166
166
  Pending: "pending",
167
167
  Issued: "issued",
168
168
  Failed: "failed"
169
- }, he = f.string().enum(me).lock(), ge = f.object({
170
- default_avatar_url: f.string(),
171
- official_avatar_urls: f.array(f.string()),
172
- default_nickname: f.string(),
173
- default_bio: f.string(),
174
- default_role_avatar_url: f.string(),
175
- level_configs: f.array(f.object({
176
- level: f.number(),
177
- exp: f.number(),
178
- title: f.string()
169
+ }, ge = u.string().enum(he).lock(), _e = u.object({
170
+ default_avatar_url: u.string(),
171
+ official_avatar_urls: u.array(u.string()),
172
+ default_nickname: u.string(),
173
+ default_bio: u.string(),
174
+ default_role_avatar_url: u.string(),
175
+ level_configs: u.array(u.object({
176
+ level: u.number(),
177
+ exp: u.number(),
178
+ title: u.string()
179
179
  })),
180
- level_valid_days: f.number(),
181
- benefit_description: f.string(),
182
- exp_description: f.string(),
183
- credit_description: f.string(),
184
- send_role_mail_rate_limit: f.number()
185
- }).lock(), _e = f.object({
186
- member_id: f.string(),
187
- player_id: f.string(),
188
- exp: f.number(),
189
- level: f.number(),
190
- credit: f.number(),
191
- credit_expiring: f.number(),
192
- level_change_time: f.number(),
193
- level_expire_time: f.number()
194
- }).lock(), ve = f.object({
195
- server_id: f.string(),
196
- server_name: f.string()
197
- }).lock(), ye = f.object({
198
- role_id: f.string(),
199
- role_name: f.string()
200
- }).lock(), g = f.object({
180
+ level_valid_days: u.number(),
181
+ benefit_description: u.string(),
182
+ exp_description: u.string(),
183
+ credit_description: u.string(),
184
+ send_role_mail_rate_limit: u.number()
185
+ }).lock(), ve = u.object({
186
+ member_id: u.string(),
187
+ player_id: u.string(),
188
+ exp: u.number(),
189
+ level: u.number(),
190
+ credit: u.number(),
191
+ credit_expiring: u.number(),
192
+ level_change_time: u.number(),
193
+ level_expire_time: u.number()
194
+ }).lock(), ye = u.object({
195
+ server_id: u.string(),
196
+ server_name: u.string()
197
+ }).lock(), be = u.object({
198
+ role_id: u.string(),
199
+ role_name: u.string()
200
+ }).lock(), m = u.object({
201
+ ...be.shape,
201
202
  ...ye.shape,
202
- ...ve.shape,
203
- role_level: f.number(),
204
- last_login_time: f.number()
205
- }).lock(), be = f.object({
206
- ...g.shape,
207
- role_fighting: f.number(),
208
- kin_id: f.string().optional(),
209
- kin_name: f.string().optional(),
210
- kin_position: f.string().optional()
211
- }).lock(), xe = f.object({
212
- name: f.string(),
213
- avatar_url: f.string(),
214
- bio: f.string(),
215
- gender: ce,
216
- birthday: f.object({
217
- year: f.number(),
218
- month: f.number(),
219
- day: f.number()
203
+ role_level: u.number(),
204
+ last_login_time: u.number()
205
+ }).lock(), xe = u.object({
206
+ ...m.shape,
207
+ role_fighting: u.number(),
208
+ kin_id: u.string().optional(),
209
+ kin_name: u.string().optional(),
210
+ kin_position: u.string().optional()
211
+ }).lock(), Se = u.object({
212
+ name: u.string(),
213
+ avatar_url: u.string(),
214
+ bio: u.string(),
215
+ gender: le,
216
+ birthday: u.object({
217
+ year: u.number(),
218
+ month: u.number(),
219
+ day: u.number()
220
220
  }),
221
- social_medias: f.record(f.object({
222
- homepage_url: f.string(),
223
- homepage_image_url: f.string()
221
+ social_medias: u.record(u.object({
222
+ homepage_url: u.string(),
223
+ homepage_image_url: u.string()
224
224
  }).optional()).optional()
225
- }).lock(), _ = f.object({
226
- address_id: f.number(),
227
- recipient: f.string(),
228
- mobile: f.string(),
229
- province: f.string(),
230
- city: f.string(),
231
- district: f.string(),
232
- address: f.string(),
233
- is_default: f.bool()
234
- }).lock(), Se = f.object({
235
- increased_credit: f.number(),
236
- decreased_credit: f.number(),
237
- expired_credit: f.number(),
238
- balance_credit: f.number()
239
- }).lock(), Ce = f.object({
240
- id: f.number(),
241
- change_type: ue,
242
- change_scene: fe,
243
- change_credit: f.number(),
244
- balance: f.number(),
245
- change_time: f.number(),
246
- metadata: f.record(f.unknown()).optional()
247
- }).lock(), v = f.object({
248
- benefit_id: f.number(),
249
- name: f.string(),
250
- img_url: f.string(),
251
- description: f.string(),
252
- min_level: f.number(),
253
- max_level: f.number(),
254
- product_id: f.number(),
255
- tag: f.string()
256
- }).lock(), y = f.object({
257
- product_id: f.number(),
258
- catalog_id: f.number(),
259
- catalog_name: f.string(),
260
- item_type: h,
261
- name: f.string(),
262
- img_url: f.string(),
263
- description: f.string(),
264
- tag: f.string(),
265
- price: f.number(),
266
- stock: f.number(),
267
- redeem_quantity: f.number(),
268
- not_visible_before: f.number(),
269
- not_visible_after: f.number(),
270
- not_before: f.number(),
271
- not_after: f.number(),
272
- min_level: f.number(),
273
- max_level: f.number(),
274
- limit_daily: f.number(),
275
- limit_monthly: f.number(),
276
- limit_yearly: f.number(),
277
- limit_total: f.number(),
278
- weight: f.number(),
279
- created_at: f.number(),
280
- updated_at: f.number(),
281
- redeemable_quantity: f.number().optional()
282
- }).lock(), we = f.object({
283
- ...r(v.shape, "tag"),
284
- product: y.clone().optional()
285
- }).lock(), Te = f.union(f.object({
286
- server_id: f.string(),
287
- role_id: f.string()
288
- }), f.object({ address_id: f.number() })).satisfies().lock(), Ee = f.object({
289
- recipient: f.string(),
290
- mobile: f.string(),
291
- province: f.string(),
292
- city: f.string(),
293
- district: f.string(),
294
- address: f.string(),
295
- express_company: f.string(),
296
- express_number: f.string()
297
- }).lock(), De = f.object({
298
- server_id: f.string(),
299
- role_id: f.string(),
300
- role_name: f.string()
301
- }).lock(), Oe = f.object({
302
- redemption_id: f.number(),
303
- player_id: f.string(),
304
- product_id: f.number(),
305
- name: f.string(),
306
- img_url: f.string(),
307
- item_type: h,
308
- catalog_id: f.number(),
309
- catalog_name: f.string(),
310
- quantity: f.number(),
311
- amount: f.number(),
312
- status: he,
313
- created_at: f.number(),
314
- extra_data: f.union(Ee.clone(), De.clone()).satisfies().optional()
315
- }), ke = f.guard(ge), Ae = d({ player: _e }), je = d({ roles: f.array(g) }), b = d({ role_card: be }), Me = f.guard(xe), x = f.guard(_), Ne = d({ addresses: f.array(_) }), Pe = f.guard(Se), Fe = d({
316
- credit_logs: f.array(Ce),
317
- next_token: f.string().optional()
318
- }), Ie = d({ products: f.array(y) }), Le = d({ benefits: f.array(v) }), Re = d({ benefit: we }), ze = d({
319
- redemptions: f.array(Oe),
320
- next_token: f.string().optional()
321
- }), Be = d({
322
- existed: f.bool(),
323
- image_upload_url: f.string().optional(),
324
- image_id: f.string()
225
+ }).lock(), h = u.object({
226
+ address_id: u.number(),
227
+ recipient: u.string(),
228
+ mobile: u.string(),
229
+ province: u.string(),
230
+ city: u.string(),
231
+ district: u.string(),
232
+ address: u.string(),
233
+ is_default: u.bool()
234
+ }).lock(), Ce = u.object({
235
+ increased_credit: u.number(),
236
+ decreased_credit: u.number(),
237
+ expired_credit: u.number(),
238
+ balance_credit: u.number()
239
+ }).lock(), we = u.object({
240
+ id: u.number(),
241
+ change_type: de,
242
+ change_scene: pe,
243
+ change_credit: u.number(),
244
+ balance: u.number(),
245
+ change_time: u.number(),
246
+ metadata: u.record(u.unknown()).optional()
247
+ }).lock(), g = u.object({
248
+ benefit_id: u.number(),
249
+ name: u.string(),
250
+ img_url: u.string(),
251
+ description: u.string(),
252
+ min_level: u.number(),
253
+ max_level: u.number(),
254
+ product_id: u.number(),
255
+ tag: u.string()
256
+ }).lock(), _ = u.object({
257
+ product_id: u.number(),
258
+ catalog_id: u.number(),
259
+ catalog_name: u.string(),
260
+ item_type: p,
261
+ name: u.string(),
262
+ img_url: u.string(),
263
+ description: u.string(),
264
+ tag: u.string(),
265
+ price: u.number(),
266
+ stock: u.number(),
267
+ redeem_quantity: u.number(),
268
+ not_visible_before: u.number(),
269
+ not_visible_after: u.number(),
270
+ not_before: u.number(),
271
+ not_after: u.number(),
272
+ min_level: u.number(),
273
+ max_level: u.number(),
274
+ limit_daily: u.number(),
275
+ limit_monthly: u.number(),
276
+ limit_yearly: u.number(),
277
+ limit_total: u.number(),
278
+ weight: u.number(),
279
+ created_at: u.number(),
280
+ updated_at: u.number(),
281
+ redeemable_quantity: u.number().optional()
282
+ }).lock(), Te = u.object({
283
+ ...r(g.shape, "tag"),
284
+ product: _.clone().optional()
285
+ }).lock(), Ee = u.union(u.object({
286
+ server_id: u.string(),
287
+ role_id: u.string()
288
+ }), u.object({ address_id: u.number() })).satisfies().lock(), De = u.object({
289
+ recipient: u.string(),
290
+ mobile: u.string(),
291
+ province: u.string(),
292
+ city: u.string(),
293
+ district: u.string(),
294
+ address: u.string(),
295
+ express_company: u.string(),
296
+ express_number: u.string()
297
+ }).lock(), Oe = u.object({
298
+ server_id: u.string(),
299
+ role_id: u.string(),
300
+ role_name: u.string()
301
+ }).lock(), ke = u.object({
302
+ redemption_id: u.number(),
303
+ player_id: u.string(),
304
+ product_id: u.number(),
305
+ name: u.string(),
306
+ img_url: u.string(),
307
+ item_type: p,
308
+ catalog_id: u.number(),
309
+ catalog_name: u.string(),
310
+ quantity: u.number(),
311
+ amount: u.number(),
312
+ status: ge,
313
+ created_at: u.number(),
314
+ extra_data: u.union(De.clone(), Oe.clone()).satisfies().optional()
315
+ }), Ae = u.guard(_e), je = l({ player: ve }), Me = l({ roles: u.array(m) }), v = l({ role_card: xe }), y = u.guard(Se), b = u.guard(h), Ne = l({ addresses: u.array(h) }), Pe = u.guard(Ce), Fe = l({
316
+ credit_logs: u.array(we),
317
+ next_token: u.string().optional()
318
+ }), Ie = l({ products: u.array(_) }), Le = l({ benefits: u.array(g) }), Re = l({ benefit: Te }), ze = l({
319
+ redemptions: u.array(ke),
320
+ next_token: u.string().optional()
321
+ }), Be = l({
322
+ existed: u.bool(),
323
+ image_upload_url: u.string().optional(),
324
+ image_id: u.string()
325
325
  }), Ve = class {
326
326
  token;
327
327
  req;
@@ -330,12 +330,12 @@ var p = "gamer_token", se = class {
330
330
  }
331
331
  async getConfig(e) {
332
332
  await this.token.autoLogin();
333
- let { data: t } = await this.req.get("club/config", null, ke, e);
333
+ let { data: t } = await this.req.get("club/config", null, Ae, e);
334
334
  return t;
335
335
  }
336
336
  async getCurrentPlayer(e) {
337
337
  await this.token.autoLogin();
338
- let { data: t, code: n, message: r } = await this.req.get("club/current-player", null, Ae, e);
338
+ let { data: t, code: n, message: r } = await this.req.get("club/current-player", null, je, e);
339
339
  return t?.player ?? {
340
340
  message: r,
341
341
  error: n
@@ -343,7 +343,7 @@ var p = "gamer_token", se = class {
343
343
  }
344
344
  async linkPlayer(e) {
345
345
  await this.token.autoLogin();
346
- let { data: t, code: n, message: r } = await this.req.post("club/link-player", { id_token: this.token.idToken }, Ae, e);
346
+ let { data: t, code: n, message: r } = await this.req.post("club/link-player", { id_token: this.token.idToken }, je, e);
347
347
  return t?.player ?? {
348
348
  message: r,
349
349
  error: n
@@ -354,27 +354,27 @@ var p = "gamer_token", se = class {
354
354
  let { data: r } = await this.req.get("club/roles", {
355
355
  player_id: e,
356
356
  refresh: t
357
- }, je, n);
357
+ }, Me, n);
358
358
  return r?.roles || [];
359
359
  }
360
360
  async getRoleCard(e, t) {
361
361
  await this.token.autoLogin();
362
- let { data: n } = await this.req.get("club/role-card", { member_id: e }, b, t);
362
+ let { data: n } = await this.req.get("club/role-card", { member_id: e }, v, t);
363
363
  return n?.role_card ?? null;
364
364
  }
365
365
  async setRoleCard(e, t) {
366
366
  if (!await this.token.autoLogin()) return null;
367
- let { data: n } = await this.req.post("club/role-card", e, b, t);
367
+ let { data: n } = await this.req.post("club/role-card", e, v, t);
368
368
  return n?.role_card ?? null;
369
369
  }
370
370
  async refreshRoleCard(e) {
371
371
  if (!await this.token.autoLogin()) return null;
372
- let { data: t } = await this.req.post("club/refresh-role-card", {}, b, e);
372
+ let { data: t } = await this.req.post("club/refresh-role-card", {}, v, e);
373
373
  return t?.role_card ?? null;
374
374
  }
375
375
  async getUserProfile(e, t) {
376
376
  await this.token.autoLogin();
377
- let { data: n } = await this.req.get("club/user-profile", { member_id: e }, Me, t);
377
+ let { data: n } = await this.req.get("club/user-profile", { member_id: e }, y, t);
378
378
  return n;
379
379
  }
380
380
  async updateUserProfile(e, t) {
@@ -383,7 +383,7 @@ var p = "gamer_token", se = class {
383
383
  message: "请提供需要修改的信息"
384
384
  };
385
385
  await this.token.autoLogin();
386
- let { data: n, code: r, message: i } = await this.req.post("club/user-profile", e, Me, t);
386
+ let { data: n, code: r, message: i } = await this.req.post("club/user-profile", e, y, t);
387
387
  return n ?? {
388
388
  message: i,
389
389
  error: r
@@ -396,7 +396,7 @@ var p = "gamer_token", se = class {
396
396
  }
397
397
  async addAddress(e, t) {
398
398
  if (!await this.token.autoLogin()) return null;
399
- let { data: n, code: r, message: i } = await this.req.post("/club/add-address", a(e), x, t);
399
+ let { data: n, code: r, message: i } = await this.req.post("/club/add-address", a(e), b, t);
400
400
  return n ?? {
401
401
  message: i,
402
402
  error: r
@@ -404,7 +404,7 @@ var p = "gamer_token", se = class {
404
404
  }
405
405
  async updateAddress(e, t) {
406
406
  await this.token.autoLogin();
407
- let { data: n, code: r, message: i } = await this.req.post("club/update-address", a(e), x, t);
407
+ let { data: n, code: r, message: i } = await this.req.post("club/update-address", a(e), b, t);
408
408
  return n ?? {
409
409
  message: i,
410
410
  error: r
@@ -491,7 +491,7 @@ var p = "gamer_token", se = class {
491
491
  for (let [n, r] of Object.entries(e)) r && (t[n] = r.bind(this));
492
492
  return t;
493
493
  }
494
- }, S = {
494
+ }, x = {
495
495
  EventItem: "event_item",
496
496
  GameItem: "game_item",
497
497
  PhysicalItem: "physical_item",
@@ -503,15 +503,15 @@ var p = "gamer_token", se = class {
503
503
  ClubExp: "club_exp",
504
504
  ExternalCode: "external_gift_code",
505
505
  VoidItem: "void_item"
506
- }, C = f.string().enum(S).lock(), Ue = S, w = C, We = {
506
+ }, S = u.string().enum(x).lock(), Ue = x, C = S, w = {
507
507
  UserId: "user_id",
508
508
  RoleId: "role_id"
509
- }, Ge = f.string().enum(We).lock(), Ke = {
509
+ }, We = u.string().enum(w).lock(), Ge = {
510
510
  None: "none",
511
511
  Daily: "daily",
512
512
  Weekly: "weekly",
513
513
  Monthly: "monthly"
514
- }, qe = f.string().enum(Ke).lock(), T = {
514
+ }, Ke = u.string().enum(Ge).lock(), T = {
515
515
  Preregister: "preregister",
516
516
  Lottery: "lottery",
517
517
  Survey: "survey",
@@ -537,7 +537,7 @@ var p = "gamer_token", se = class {
537
537
  UgcLike: "ugc_like",
538
538
  Redeem: "redeem",
539
539
  Referral: "referral"
540
- }, Je = f.string().enum(T).lock(), Ye = {
540
+ }, qe = u.string().enum(T).lock(), Je = {
541
541
  Active: "player_active_points",
542
542
  Login: "player_login_days",
543
543
  OrderAmount: "order_total_amount",
@@ -555,56 +555,56 @@ var p = "gamer_token", se = class {
555
555
  UserGroup: "user_group",
556
556
  engagementCount: "engagement_count",
557
557
  GameTaskGM: "game_task_gm"
558
- }, E = f.string().enum(Ye).lock(), Xe = {
558
+ }, E = u.string().enum(Je).lock(), Ye = {
559
559
  System: "system",
560
560
  UserSubmission: "user_submission",
561
561
  Shortlisted: "shortlisted"
562
- }, Ze = f.string().enum(Xe).lock(), D = {
562
+ }, Xe = u.string().enum(Ye).lock(), D = {
563
563
  Ineligible: "ineligible",
564
564
  Unclaimed: "unclaimed",
565
565
  Received: "received",
566
566
  Failed: "failed",
567
567
  Delivered: "delivered"
568
- }, O = f.string().enum(D).lock(), Qe = {
568
+ }, O = u.string().enum(D).lock(), Ze = {
569
569
  Ineligible: D.Ineligible,
570
570
  Unclaimed: D.Unclaimed,
571
571
  Received: D.Received,
572
572
  Failed: D.Failed,
573
573
  Delivered: D.Delivered
574
- }, k = f.string().enum(Qe).lock(), $e = {
574
+ }, k = u.string().enum(Ze).lock(), Qe = {
575
575
  Output: "output",
576
576
  Engage: "engage"
577
- }, A = f.string().enum($e).lock(), et = {
577
+ }, A = u.string().enum(Qe).lock(), $e = {
578
578
  Private: "private",
579
579
  Public: "public"
580
- }, tt = f.string().enum(et).lock(), j = {
580
+ }, et = u.string().enum($e).lock(), j = {
581
581
  Unknown: "unknown",
582
582
  Pending: "pending",
583
583
  Drawn: "drawn",
584
584
  Claimed: "claimed",
585
585
  Fail: "fail"
586
- }, nt = f.string().enum(j).lock(), rt = {
586
+ }, tt = u.string().enum(j).lock(), nt = {
587
587
  Assemble: "assemble",
588
588
  Join: "join",
589
589
  Disband: "disband",
590
590
  ChangeVisibility: "change_visibility",
591
591
  Query: "query"
592
- }, it = f.string().enum(rt).lock(), at = {
592
+ }, rt = u.string().enum(nt).lock(), it = {
593
593
  ReferralCode: "referral_code",
594
594
  Join: "join",
595
595
  Query: "query"
596
- }, ot = f.string().enum(at).lock(), st = {
596
+ }, at = u.string().enum(it).lock(), ot = {
597
597
  Query: "query",
598
598
  Draw: "draw",
599
599
  Claim: "claim"
600
- }, ct = f.string().enum(st).lock(), lt = {
600
+ }, st = u.string().enum(ot).lock(), ct = {
601
601
  Sum: "sum",
602
602
  TopN: "top_n"
603
- }, ut = f.string().enum(lt).lock(), dt = {
603
+ }, lt = u.string().enum(ct).lock(), ut = {
604
604
  None: "none",
605
605
  Winner: "winner",
606
606
  Consolation: "consolation"
607
- }, ft = f.string().enum(dt).lock(), pt = {
607
+ }, dt = u.string().enum(ut).lock(), ft = {
608
608
  Douyin: "douyin",
609
609
  Xiaohongshu: "xiaohongshu",
610
610
  Taptap: "taptap",
@@ -613,508 +613,508 @@ var p = "gamer_token", se = class {
613
613
  Huya: "huya",
614
614
  Douyu: "douyu",
615
615
  Kuaishou: "kuaishou"
616
- }, M = f.string().enum(pt).lock(), mt = {
616
+ }, M = u.string().enum(ft).lock(), pt = {
617
617
  Submitted: "submitted",
618
618
  Accepted: "accepted",
619
619
  Rejected: "rejected"
620
- }, ht = f.string().enum(mt).lock(), gt = f.string().enum(S), N = f.object({
621
- reward_item_id: f.number(),
622
- reward_amount: f.number(),
623
- reward_item_name: f.string(),
624
- reward_item_icon_url: f.string(),
625
- reward_item_desc: f.string().optional(),
626
- reward_item_type: gt,
627
- reward_item_rating: f.number()
628
- }).lock(), _t = f.object({
629
- engage_count: f.number(),
630
- rewards: f.array(N)
631
- }).lock(), vt = f.union(f.object({
632
- feature_reward_type: f.string().enum("every"),
633
- reward_details: f.array(N)
634
- }), f.object({
635
- feature_reward_type: f.string().enum("regular"),
636
- reward_details: f.array(_t)
637
- })).satisfies().lock(), P = f.object({
638
- feature_name: f.string(),
639
- feature_id: f.number(),
640
- description: f.string(),
641
- cycle: qe,
642
- cycle_limit: f.number(),
643
- limit: f.number(),
644
- since: f.number(),
645
- until: f.number(),
646
- engage_account: Ge,
647
- feature_rewards: vt.clone().optional(),
648
- sort: f.number().optional()
649
- }), yt = T.Cashback, bt = f.object({
620
+ }, mt = u.string().enum(pt).lock(), ht = u.string().enum(x), N = u.object({
621
+ reward_item_id: u.number(),
622
+ reward_amount: u.number(),
623
+ reward_item_name: u.string(),
624
+ reward_item_icon_url: u.string(),
625
+ reward_item_desc: u.string().optional(),
626
+ reward_item_type: ht,
627
+ reward_item_rating: u.number()
628
+ }).lock(), gt = u.object({
629
+ engage_count: u.number(),
630
+ rewards: u.array(N)
631
+ }).lock(), _t = u.union(u.object({
632
+ feature_reward_type: u.string().enum("every"),
633
+ reward_details: u.array(N)
634
+ }), u.object({
635
+ feature_reward_type: u.string().enum("regular"),
636
+ reward_details: u.array(gt)
637
+ })).satisfies().lock(), P = u.object({
638
+ feature_name: u.string(),
639
+ feature_id: u.number(),
640
+ description: u.string(),
641
+ cycle: Ke,
642
+ cycle_limit: u.number(),
643
+ limit: u.number(),
644
+ since: u.number(),
645
+ until: u.number(),
646
+ engage_account: We,
647
+ feature_rewards: _t.clone().optional(),
648
+ sort: u.number().optional()
649
+ }), vt = T.Cashback, yt = u.object({
650
650
  ...P.shape,
651
- feature_type: f.string().enum(yt),
652
- config: f.object({
653
- order_start_time: f.number(),
654
- order_end_time: f.number(),
655
- claim_rewards_start_time: f.number(),
656
- claim_rewards_end_time: f.number()
651
+ feature_type: u.string().enum(vt),
652
+ config: u.object({
653
+ order_start_time: u.number(),
654
+ order_end_time: u.number(),
655
+ claim_rewards_start_time: u.number(),
656
+ claim_rewards_end_time: u.number()
657
657
  })
658
- }), xt = T.CheckIn, St = f.object({
658
+ }), bt = T.CheckIn, xt = u.object({
659
659
  ...P.shape,
660
- feature_type: f.string().enum(xt)
661
- }), Ct = T.ClaimActivationKey, wt = f.object({
660
+ feature_type: u.string().enum(bt)
661
+ }), St = T.ClaimActivationKey, Ct = u.object({
662
662
  ...P.shape,
663
- feature_type: f.string().enum(Ct)
664
- }), Tt = T.ClaimRewards, Et = f.object({
663
+ feature_type: u.string().enum(St)
664
+ }), wt = T.ClaimRewards, Tt = u.object({
665
665
  ...P.shape,
666
- feature_type: f.string().enum(Tt)
667
- }), Dt = T.Comment, Ot = f.object({
666
+ feature_type: u.string().enum(wt)
667
+ }), Et = T.Comment, Dt = u.object({
668
668
  ...P.shape,
669
- feature_type: f.string().enum(Dt),
670
- config: f.object({
671
- comments: f.array(f.string()),
672
- send_rate: f.number()
669
+ feature_type: u.string().enum(Et),
670
+ config: u.object({
671
+ comments: u.array(u.string()),
672
+ send_rate: u.number()
673
673
  })
674
- }), kt = T.Follow, At = f.object({
674
+ }), Ot = T.Follow, kt = u.object({
675
675
  ...P.shape,
676
- feature_type: f.string().enum(kt),
677
- config: f.object({
678
- platform: f.string(),
679
- platform_icon: f.string().optional(),
680
- link: f.string().optional(),
681
- qr_code_url: f.string().optional(),
682
- platform_desc: f.string().optional()
676
+ feature_type: u.string().enum(Ot),
677
+ config: u.object({
678
+ platform: u.string(),
679
+ platform_icon: u.string().optional(),
680
+ link: u.string().optional(),
681
+ qr_code_url: u.string().optional(),
682
+ platform_desc: u.string().optional()
683
683
  })
684
- }), jt = T.GiftCode, Mt = f.object({
685
- name: f.string(),
686
- icon_url: f.string(),
687
- count: f.number()
688
- }), Nt = f.object({
684
+ }), At = T.GiftCode, jt = u.object({
685
+ name: u.string(),
686
+ icon_url: u.string(),
687
+ count: u.number()
688
+ }), Mt = u.object({
689
689
  ...P.shape,
690
- feature_type: f.string().enum(jt),
691
- config: f.object({
692
- gift_items: f.array(Mt),
693
- mp_url: f.string().optional(),
694
- mp_qrcode_url: f.string().optional()
690
+ feature_type: u.string().enum(At),
691
+ config: u.object({
692
+ gift_items: u.array(jt),
693
+ mp_url: u.string().optional(),
694
+ mp_qrcode_url: u.string().optional()
695
695
  })
696
- }), Pt = T.Invite, Ft = f.object({
696
+ }), Nt = T.Invite, Pt = u.object({
697
697
  ...P.shape,
698
- feature_type: f.string().enum(Pt),
699
- config: f.object({ share_url: f.string() })
700
- }), It = T.InvitedRegister, Lt = f.object({
698
+ feature_type: u.string().enum(Nt),
699
+ config: u.object({ share_url: u.string() })
700
+ }), Ft = T.InvitedRegister, It = u.object({
701
701
  ...P.shape,
702
- feature_type: f.string().enum(It)
703
- }), Rt = f.string().enum(r(S, "GiftCode", "LotteryTicket")), zt = T.Lottery, Bt = f.object({
704
- reward_item_id: f.number(),
705
- reward_item_name: f.string(),
706
- reward_item_type: Rt,
707
- reward_item_icon_url: f.string(),
708
- reward_item_desc: f.string().optional(),
709
- reward_amount: f.number(),
710
- reward_remaining_stock: f.number(),
711
- reward_item_rating: f.number()
712
- }), Vt = f.object({
702
+ feature_type: u.string().enum(Ft)
703
+ }), Lt = u.string().enum(r(x, "GiftCode", "LotteryTicket")), Rt = T.Lottery, zt = u.object({
704
+ reward_item_id: u.number(),
705
+ reward_item_name: u.string(),
706
+ reward_item_type: Lt,
707
+ reward_item_icon_url: u.string(),
708
+ reward_item_desc: u.string().optional(),
709
+ reward_amount: u.number(),
710
+ reward_remaining_stock: u.number(),
711
+ reward_item_rating: u.number()
712
+ }), Bt = u.object({
713
713
  ...P.shape,
714
- feature_type: f.string().enum(zt),
715
- config: f.object({
716
- consume_item_id: f.number(),
717
- consume_item_name: f.string(),
718
- consume_item_icon_url: f.string(),
719
- consume_item_count: f.array(f.number()),
720
- consume_item_desc: f.string().optional(),
721
- rewards: f.array(Bt)
714
+ feature_type: u.string().enum(Rt),
715
+ config: u.object({
716
+ consume_item_id: u.number(),
717
+ consume_item_name: u.string(),
718
+ consume_item_icon_url: u.string(),
719
+ consume_item_count: u.array(u.number()),
720
+ consume_item_desc: u.string().optional(),
721
+ rewards: u.array(zt)
722
722
  })
723
- }), Ht = T.LotteryDraw, Ut = f.object({
723
+ }), Vt = T.LotteryDraw, Ht = u.object({
724
724
  ...P.shape,
725
- feature_type: f.string().enum(Ht),
726
- config: f.object({
727
- draw_not_before: f.number(),
728
- draw_not_after: f.number()
725
+ feature_type: u.string().enum(Vt),
726
+ config: u.object({
727
+ draw_not_before: u.number(),
728
+ draw_not_after: u.number()
729
729
  })
730
- }), Wt = T.Preregister, Gt = f.object({
730
+ }), Ut = T.Preregister, Wt = u.object({
731
731
  ...P.shape,
732
- feature_type: f.string().enum(Wt)
733
- }), Kt = T.Quest, qt = f.object({
732
+ feature_type: u.string().enum(Ut)
733
+ }), Gt = T.Quest, Kt = u.object({
734
734
  ...P.shape,
735
- feature_type: f.string().enum(Kt),
736
- config: f.object({
735
+ feature_type: u.string().enum(Gt),
736
+ config: u.object({
737
737
  objective: E,
738
- completion_value: f.number(),
739
- team: f.object({
740
- feature_id: f.number().optional(),
741
- completion_value: f.number(),
742
- progress_algorithm: ut.clone().optional(),
743
- top_n: f.number().optional()
738
+ completion_value: u.number(),
739
+ team: u.object({
740
+ feature_id: u.number().optional(),
741
+ completion_value: u.number(),
742
+ progress_algorithm: lt.clone().optional(),
743
+ top_n: u.number().optional()
744
744
  }).optional(),
745
- config: f.object({
746
- topic_id: f.number().optional(),
747
- required_players: f.number().min(1).optional(),
748
- required_matches: f.number().min(1).optional(),
749
- event_item_id: f.number().optional()
745
+ config: u.object({
746
+ topic_id: u.number().optional(),
747
+ required_players: u.number().min(1).optional(),
748
+ required_matches: u.number().min(1).optional(),
749
+ event_item_id: u.number().optional()
750
750
  }).optional()
751
751
  })
752
- }), Jt = T.Redeem, Yt = f.object({
753
- price: f.number(),
754
- per_user_limit: f.number(),
752
+ }), qt = T.Redeem, Jt = u.object({
753
+ price: u.number(),
754
+ per_user_limit: u.number(),
755
755
  item: N
756
- }), Xt = f.object({
756
+ }), Yt = u.object({
757
757
  ...P.shape,
758
- feature_type: f.string().enum(Jt),
759
- config: f.object({
760
- event_item_id: f.number(),
761
- redeem_catalog: f.array(Yt)
758
+ feature_type: u.string().enum(qt),
759
+ config: u.object({
760
+ event_item_id: u.number(),
761
+ redeem_catalog: u.array(Jt)
762
762
  })
763
- }), Zt = T.Referral, Qt = f.object({
764
- required_invitees: f.number(),
765
- rewards: f.array(N)
766
- }), $t = f.object({
763
+ }), Xt = T.Referral, Zt = u.object({
764
+ required_invitees: u.number(),
765
+ rewards: u.array(N)
766
+ }), Qt = u.object({
767
767
  ...P.shape,
768
- feature_type: f.string().enum(Zt),
769
- config: f.object({
770
- max_recent_invitees: f.number(),
771
- referral_tiers: f.array(Qt).optional()
768
+ feature_type: u.string().enum(Xt),
769
+ config: u.object({
770
+ max_recent_invitees: u.number(),
771
+ referral_tiers: u.array(Zt).optional()
772
772
  })
773
- }), en = T.Register, tn = f.object({
773
+ }), $t = T.Register, en = u.object({
774
774
  ...P.shape,
775
- feature_type: f.string().enum(en)
776
- }), nn = T.Share, rn = f.object({
775
+ feature_type: u.string().enum($t)
776
+ }), tn = T.Share, nn = u.object({
777
777
  ...P.shape,
778
- feature_type: f.string().enum(nn),
779
- config: f.object({
780
- share_platform: f.string(),
781
- jump_url: f.string().optional(),
782
- icon_url: f.string().optional()
778
+ feature_type: u.string().enum(tn),
779
+ config: u.object({
780
+ share_platform: u.string(),
781
+ jump_url: u.string().optional(),
782
+ icon_url: u.string().optional()
783
783
  })
784
- }), an = T.Subscribe, on = f.object({
784
+ }), rn = T.Subscribe, an = u.object({
785
785
  ...P.shape,
786
- feature_type: f.string().enum(an),
787
- config: f.object({ weixin_template_ids: f.array(f.string()) })
788
- }), sn = T.Survey, cn = f.object({
786
+ feature_type: u.string().enum(rn),
787
+ config: u.object({ weixin_template_ids: u.array(u.string()) })
788
+ }), on = T.Survey, sn = u.object({
789
789
  ...P.shape,
790
- feature_type: f.string().enum(sn),
791
- config: f.object({
792
- survey_id: f.string(),
793
- survey_url: f.string()
790
+ feature_type: u.string().enum(on),
791
+ config: u.object({
792
+ survey_id: u.string(),
793
+ survey_url: u.string()
794
794
  })
795
- }), ln = T.Team, un = f.object({
795
+ }), cn = T.Team, ln = u.object({
796
796
  ...P.shape,
797
- feature_type: f.string().enum(ln),
798
- config: f.object({
799
- max_members: f.number().min(1),
800
- min_members: f.number().min(1)
797
+ feature_type: u.string().enum(cn),
798
+ config: u.object({
799
+ max_members: u.number().min(1),
800
+ min_members: u.number().min(1)
801
801
  })
802
- }), dn = T.Ugc, fn = f.object({
802
+ }), un = T.Ugc, dn = u.object({
803
803
  ...P.shape,
804
- feature_type: f.string().enum(dn),
805
- config: f.object({
806
- allowed_social_medias: f.array(f.string()).optional(),
807
- acceptance_rewards: f.array(N).optional()
804
+ feature_type: u.string().enum(un),
805
+ config: u.object({
806
+ allowed_social_medias: u.array(u.string()).optional(),
807
+ acceptance_rewards: u.array(N).optional()
808
808
  })
809
- }), pn = T.UgcLike, mn = f.object({
809
+ }), fn = T.UgcLike, pn = u.object({
810
810
  ...P.shape,
811
- feature_type: f.string().enum(pn),
812
- config: f.object({ ugc_feature_id: f.number() })
813
- }), hn = T.Vote, gn = f.object({
814
- sn: f.string(),
815
- name: f.string(),
816
- img_urls: f.array(f.string()).optional(),
817
- video_urls: f.array(f.string()).optional(),
818
- descriptions: f.array(f.string()).optional(),
819
- jump_url: f.string(),
820
- amount: f.number(),
821
- finalists: f.bool(),
822
- last_vote_time: f.number()
823
- }), _n = f.object({
811
+ feature_type: u.string().enum(fn),
812
+ config: u.object({ ugc_feature_id: u.number() })
813
+ }), mn = T.Vote, hn = u.object({
814
+ sn: u.string(),
815
+ name: u.string(),
816
+ img_urls: u.array(u.string()).optional(),
817
+ video_urls: u.array(u.string()).optional(),
818
+ descriptions: u.array(u.string()).optional(),
819
+ jump_url: u.string(),
820
+ amount: u.number(),
821
+ finalists: u.bool(),
822
+ last_vote_time: u.number()
823
+ }), gn = u.object({
824
824
  ...P.shape,
825
- feature_type: f.string().enum(hn),
826
- config: f.object({
827
- vote_feature_ids: f.array(f.number()),
828
- submission_feature_ids: f.array(f.number()),
829
- finalists_amount: f.number(),
830
- source: Ze,
831
- options: f.array(gn),
832
- rewards: f.array(N)
825
+ feature_type: u.string().enum(mn),
826
+ config: u.object({
827
+ vote_feature_ids: u.array(u.number()),
828
+ submission_feature_ids: u.array(u.number()),
829
+ finalists_amount: u.number(),
830
+ source: Xe,
831
+ options: u.array(hn),
832
+ rewards: u.array(N)
833
833
  })
834
- }), F = f.union(f.string().pattern("NumberString", /^\d+$/), f.number()), I = f.object({
834
+ }), F = u.union(u.string().pattern("NumberString", /^\d+$/), u.number()), I = u.object({
835
835
  order_total_amount: F,
836
836
  cashback_total_amount: F,
837
837
  game_item_count: F
838
- }), vn = f.object({ activation_key: f.string().disallow("") }), yn = f.object({ gift_code: f.string() }), L = f.object({
839
- user_id: f.string(),
840
- name: f.string().optional(),
841
- avatar_url: f.string().optional()
842
- }), bn = f.object({ lottery_count: f.number() }), R = f.object({
843
- reward_id: f.number(),
844
- reward_item_id: f.number(),
838
+ }), _n = u.object({ activation_key: u.string().disallow("") }), vn = u.object({ gift_code: u.string() }), yn = u.object({
839
+ user_id: u.string(),
840
+ name: u.string().optional(),
841
+ avatar_url: u.string().optional()
842
+ }), bn = u.object({ lottery_count: u.number() }), L = u.object({
843
+ reward_id: u.number(),
844
+ reward_item_id: u.number(),
845
845
  reward_source: A,
846
- reward_item_name: f.string(),
847
- reward_item_type: C,
848
- reward_item_icon_url: f.string(),
849
- reward_item_desc: f.string().optional(),
850
- reward_item_rating: f.number(),
851
- reward_amount: f.number(),
846
+ reward_item_name: u.string(),
847
+ reward_item_type: S,
848
+ reward_item_icon_url: u.string(),
849
+ reward_item_desc: u.string().optional(),
850
+ reward_item_rating: u.number(),
851
+ reward_amount: u.number(),
852
852
  reward_status: k,
853
- event_id: f.number(),
854
- event_name: f.string(),
855
- feature_id: f.number(),
856
- engagement_id: f.number(),
857
- feature_type: Je,
858
- receive_time: f.number(),
859
- extra_data: f.record(f.unknown()).optional()
860
- }), xn = f.string().enum(j.Unknown, j.Pending), Sn = f.union(f.object({
861
- ticket: f.string(),
853
+ event_id: u.number(),
854
+ event_name: u.string(),
855
+ feature_id: u.number(),
856
+ engagement_id: u.number(),
857
+ feature_type: qe,
858
+ receive_time: u.number(),
859
+ extra_data: u.record(u.unknown()).optional()
860
+ }), xn = u.string().enum(j.Unknown, j.Pending), Sn = u.union(u.object({
861
+ ticket: u.string(),
862
862
  status: xn,
863
- created_at: f.number()
864
- }), f.object({
865
- ticket: f.string(),
866
- status: f.string().enum(r(j, "Unknown", "Pending")),
867
- created_at: f.number(),
868
- reward: R
869
- })).satisfies(), Cn = f.object({ tickets: f.array(Sn) }), wn = f.object({ platforms: f.array(f.string()) }), Tn = f.object({
870
- role_name: f.string(),
871
- is_leader: f.bool(),
872
- is_myself: f.bool().optional(),
873
- progress: f.number().optional(),
874
- avatar_url: f.string().optional()
875
- }).lock(), En = f.object({
863
+ created_at: u.number()
864
+ }), u.object({
865
+ ticket: u.string(),
866
+ status: u.string().enum(r(j, "Unknown", "Pending")),
867
+ created_at: u.number(),
868
+ reward: L
869
+ })).satisfies(), Cn = u.object({ tickets: u.array(Sn) }), wn = u.object({ platforms: u.array(u.string()) }), Tn = u.object({
870
+ role_name: u.string(),
871
+ is_leader: u.bool(),
872
+ is_myself: u.bool().optional(),
873
+ progress: u.number().optional(),
874
+ avatar_url: u.string().optional()
875
+ }).lock(), En = u.object({
876
876
  objective: E,
877
- progress: f.number(),
878
- completion_value: f.number().optional(),
879
- team: f.object({
880
- progress: f.number(),
881
- completion_value: f.number().optional(),
882
- players: f.array(Tn)
877
+ progress: u.number(),
878
+ completion_value: u.number().optional(),
879
+ team: u.object({
880
+ progress: u.number(),
881
+ completion_value: u.number().optional(),
882
+ players: u.array(Tn)
883
883
  }).optional()
884
- }), Dn = f.object({
885
- progress: f.number(),
886
- team: f.object({
887
- progress: f.number(),
888
- team_members: f.array(Tn).optional()
884
+ }), Dn = u.object({
885
+ progress: u.number(),
886
+ team: u.object({
887
+ progress: u.number(),
888
+ team_members: u.array(Tn).optional()
889
889
  }).optional()
890
- }), On = f.object({
891
- item_id: f.number(),
892
- item_count: f.number(),
893
- redeem_count: f.number()
894
- }), kn = f.object({ item_stocks: f.array(f.object({
895
- item_id: f.number(),
896
- item_stock: f.number(),
897
- user_limit: f.number()
898
- })) }), An = f.object({
899
- avatar_url: f.string().optional(),
900
- role_name: f.string(),
901
- server_name: f.string(),
902
- user_id: f.string()
903
- }), jn = f.object({
904
- referral_code: f.string().optional(),
905
- invitee_count: f.number().optional(),
906
- invitees: f.array(An).optional()
907
- }), Mn = f.object({
908
- required_invitees: f.number(),
909
- reward_generated: f.bool()
910
- }), Nn = f.object({
911
- invitee_count: f.number().optional(),
912
- generated_rewards: f.array(R).optional(),
913
- tier_statuses: f.array(Mn).optional()
914
- }), Pn = f.object({ platform: f.string().optional() }), Fn = f.object({ weixin_openid: f.string() }), In = f.object({ serial_number: f.number() }), Ln = f.object({
915
- team_code: f.string(),
916
- leader_name: f.string(),
917
- total_members: f.number()
918
- }), Rn = f.object({
919
- is_leader: f.bool(),
920
- is_myself: f.bool().optional(),
921
- role_name: f.string(),
922
- server_name: f.string(),
923
- avatar_url: f.string().optional()
924
- }), zn = f.object({
925
- team_code: f.string(),
926
- visibility: tt,
927
- members: f.array(f.object({
928
- is_leader: f.bool(),
929
- role_name: f.string(),
930
- server_name: f.string()
890
+ }), On = u.object({
891
+ item_id: u.number(),
892
+ item_count: u.number(),
893
+ redeem_count: u.number()
894
+ }), kn = u.object({ item_stocks: u.array(u.object({
895
+ item_id: u.number(),
896
+ item_stock: u.number(),
897
+ user_limit: u.number()
898
+ })) }), An = u.object({
899
+ avatar_url: u.string().optional(),
900
+ role_name: u.string(),
901
+ server_name: u.string(),
902
+ user_id: u.string()
903
+ }), jn = u.object({
904
+ referral_code: u.string().optional(),
905
+ invitee_count: u.number().optional(),
906
+ invitees: u.array(An).optional()
907
+ }), Mn = u.object({
908
+ required_invitees: u.number(),
909
+ reward_generated: u.bool()
910
+ }), Nn = u.object({
911
+ invitee_count: u.number().optional(),
912
+ generated_rewards: u.array(L).optional(),
913
+ tier_statuses: u.array(Mn).optional()
914
+ }), Pn = u.object({ platform: u.string().optional() }), Fn = u.object({ weixin_openid: u.string() }), In = u.object({ serial_number: u.number() }), Ln = u.object({
915
+ team_code: u.string(),
916
+ leader_name: u.string(),
917
+ total_members: u.number()
918
+ }), Rn = u.object({
919
+ is_leader: u.bool(),
920
+ is_myself: u.bool().optional(),
921
+ role_name: u.string(),
922
+ server_name: u.string(),
923
+ avatar_url: u.string().optional()
924
+ }), zn = u.object({
925
+ team_code: u.string(),
926
+ visibility: et,
927
+ members: u.array(u.object({
928
+ is_leader: u.bool(),
929
+ role_name: u.string(),
930
+ server_name: u.string()
931
931
  }))
932
- }), Bn = f.object({
933
- ugc_id: f.number(),
934
- title: f.string(),
935
- content: f.string().optional(),
936
- image_urls: f.array(f.string()).optional(),
932
+ }), Bn = u.object({
933
+ ugc_id: u.number(),
934
+ title: u.string(),
935
+ content: u.string().optional(),
936
+ image_urls: u.array(u.string()).optional(),
937
937
  social_media: M.clone().optional(),
938
- social_media_url: f.string().optional()
939
- }), Vn = f.object({
940
- ugcs: f.array(f.object({
941
- ugc_id: f.number(),
942
- event_id: f.number().optional(),
943
- feature_id: f.number().optional(),
944
- title: f.string(),
945
- content: f.string().optional(),
946
- image_urls: f.array(f.string()).optional(),
938
+ social_media_url: u.string().optional()
939
+ }), Vn = u.object({
940
+ ugcs: u.array(u.object({
941
+ ugc_id: u.number(),
942
+ event_id: u.number().optional(),
943
+ feature_id: u.number().optional(),
944
+ title: u.string(),
945
+ content: u.string().optional(),
946
+ image_urls: u.array(u.string()).optional(),
947
947
  social_media: M.clone().optional(),
948
- social_media_url: f.string().optional(),
949
- server_id: f.number().optional(),
950
- server_name: f.string().optional(),
951
- role_id: f.string().optional(),
952
- role_name: f.string().optional(),
953
- total_likes: f.number().optional(),
954
- created_at: f.number()
948
+ social_media_url: u.string().optional(),
949
+ server_id: u.number().optional(),
950
+ server_name: u.string().optional(),
951
+ role_id: u.string().optional(),
952
+ role_name: u.string().optional(),
953
+ total_likes: u.number().optional(),
954
+ created_at: u.number()
955
955
  })).optional(),
956
- next_token: f.string().optional()
957
- }), Hn = f.object({
958
- ugcs: f.array(f.object({
959
- ugc_id: f.number(),
960
- event_id: f.number().optional(),
961
- feature_id: f.number().optional(),
962
- feature_name: f.string().optional(),
963
- review_status: ht,
964
- reviewer_comment: f.string().optional(),
965
- title: f.string(),
966
- content: f.string().optional(),
967
- image_urls: f.array(f.string()).optional(),
956
+ next_token: u.string().optional()
957
+ }), Hn = u.object({
958
+ ugcs: u.array(u.object({
959
+ ugc_id: u.number(),
960
+ event_id: u.number().optional(),
961
+ feature_id: u.number().optional(),
962
+ feature_name: u.string().optional(),
963
+ review_status: mt,
964
+ reviewer_comment: u.string().optional(),
965
+ title: u.string(),
966
+ content: u.string().optional(),
967
+ image_urls: u.array(u.string()).optional(),
968
968
  social_media: M.clone().optional(),
969
- social_media_url: f.string().optional(),
970
- server_id: f.number().optional(),
971
- server_name: f.string().optional(),
972
- role_id: f.string().optional(),
973
- role_name: f.string().optional(),
974
- total_likes: f.number().optional(),
975
- created_at: f.number()
969
+ social_media_url: u.string().optional(),
970
+ server_id: u.number().optional(),
971
+ server_name: u.string().optional(),
972
+ role_id: u.string().optional(),
973
+ role_name: u.string().optional(),
974
+ total_likes: u.number().optional(),
975
+ created_at: u.number()
976
976
  })).optional(),
977
- next_token: f.string().optional()
978
- }), Un = f.object({ total_count: f.number() }), Wn = f.object({
979
- existed: f.bool(),
980
- upload_url: f.string().optional(),
981
- image_url: f.string()
982
- }), Gn = f.object({ ugcs: f.array(f.object({
983
- ugc_id: f.number(),
984
- rank: f.number(),
985
- total_likes: f.number(),
986
- image_urls: f.array(f.string()).optional(),
987
- server_id: f.number().optional(),
988
- server_name: f.string().optional(),
989
- role_id: f.string().optional(),
990
- role_name: f.string().optional()
991
- })).optional() }), Kn = f.object({ option_sn: f.string() }), qn = f.object({
992
- candidate_id: f.string(),
993
- total_votes: f.number().optional(),
994
- my_votes: f.number().optional(),
995
- cycle_votes: f.number().optional(),
996
- votes: f.number().optional()
997
- }), Jn = f.object({
998
- rewards_type: ft,
999
- rewards: f.array(R).optional()
1000
- }), Yn = f.object({
1001
- candidate_id: f.string(),
1002
- is_winner: f.bool(),
1003
- total_votes: f.number(),
1004
- my_votes: f.number(),
1005
- cycle_votes: f.number().optional()
1006
- }), Xn = f.object({
1007
- role: f.string(),
1008
- content: f.string()
1009
- }), Zn = f.object({ conversations: f.array(Xn) }), Qn = f.object({
1010
- user_id: f.string(),
1011
- name: f.string(),
1012
- avatar_url: f.string(),
1013
- comment: f.string(),
1014
- video_note: f.number(),
1015
- created_at: f.number()
1016
- }), z = f.union(wn, bn, In, L, Pn, Kn, qn, Fn, I, yn, zn, En, Cn, vn, Zn, Bn, On, jn, f.custom("EmptyObject", (e) => t(e) && Object.keys(e).length === 0)).satisfies().lock(), $n = f.object({
1017
- reward_id: f.number(),
1018
- reward_item_id: f.number(),
1019
- reward_item_type: w,
1020
- reward_count: f.number(),
977
+ next_token: u.string().optional()
978
+ }), Un = u.object({ total_count: u.number() }), Wn = u.object({
979
+ existed: u.bool(),
980
+ upload_url: u.string().optional(),
981
+ image_url: u.string()
982
+ }), Gn = u.object({ ugcs: u.array(u.object({
983
+ ugc_id: u.number(),
984
+ rank: u.number(),
985
+ total_likes: u.number(),
986
+ image_urls: u.array(u.string()).optional(),
987
+ server_id: u.number().optional(),
988
+ server_name: u.string().optional(),
989
+ role_id: u.string().optional(),
990
+ role_name: u.string().optional()
991
+ })).optional() }), Kn = u.object({ option_sn: u.string() }), qn = u.object({
992
+ candidate_id: u.string(),
993
+ total_votes: u.number().optional(),
994
+ my_votes: u.number().optional(),
995
+ cycle_votes: u.number().optional(),
996
+ votes: u.number().optional()
997
+ }), Jn = u.object({
998
+ rewards_type: dt,
999
+ rewards: u.array(L).optional()
1000
+ }), Yn = u.object({
1001
+ candidate_id: u.string(),
1002
+ is_winner: u.bool(),
1003
+ total_votes: u.number(),
1004
+ my_votes: u.number(),
1005
+ cycle_votes: u.number().optional()
1006
+ }), Xn = u.object({
1007
+ role: u.string(),
1008
+ content: u.string()
1009
+ }), Zn = u.object({ conversations: u.array(Xn) }), Qn = u.object({
1010
+ user_id: u.string(),
1011
+ name: u.string(),
1012
+ avatar_url: u.string(),
1013
+ comment: u.string(),
1014
+ video_note: u.number(),
1015
+ created_at: u.number()
1016
+ }), R = u.union(wn, bn, In, yn, Pn, Kn, qn, Fn, I, vn, zn, En, Cn, _n, Zn, Bn, On, jn, u.custom("EmptyObject", (e) => t(e) && Object.keys(e).length === 0)).satisfies().lock(), $n = u.object({
1017
+ reward_id: u.number(),
1018
+ reward_item_id: u.number(),
1019
+ reward_item_type: C,
1020
+ reward_count: u.number(),
1021
1021
  reward_status: O,
1022
1022
  reward_source: A,
1023
- reward_item_name: f.string(),
1024
- reward_item_icon_url: f.string(),
1025
- reward_item_desc: f.string().optional(),
1026
- reward_item_rating: f.number(),
1027
- receive_time: f.number(),
1028
- extra_data: f.union(...z.validators, f.record(f.unknown())).satisfies().optional()
1029
- }), er = f.object({
1030
- reward_id: f.number(),
1031
- reward_item_id: f.number(),
1032
- reward_item_name: f.string(),
1033
- reward_item_type: w,
1034
- reward_item_icon_url: f.string(),
1035
- reward_item_desc: f.string().optional(),
1036
- reward_item_rating: f.number(),
1037
- reward_amount: f.number(),
1023
+ reward_item_name: u.string(),
1024
+ reward_item_icon_url: u.string(),
1025
+ reward_item_desc: u.string().optional(),
1026
+ reward_item_rating: u.number(),
1027
+ receive_time: u.number(),
1028
+ extra_data: u.union(...R.validators, u.record(u.unknown())).satisfies().optional()
1029
+ }), er = u.object({
1030
+ reward_id: u.number(),
1031
+ reward_item_id: u.number(),
1032
+ reward_item_name: u.string(),
1033
+ reward_item_type: C,
1034
+ reward_item_icon_url: u.string(),
1035
+ reward_item_desc: u.string().optional(),
1036
+ reward_item_rating: u.number(),
1037
+ reward_amount: u.number(),
1038
1038
  reward_status: O,
1039
1039
  reward_source: A,
1040
- extra_data: f.record(f.unknown()).optional()
1041
- }), tr = f.object({
1042
- engagement_id: f.number(),
1043
- user_id: f.string(),
1044
- event_id: f.number(),
1045
- feature_id: f.number(),
1046
- sequence: f.number(),
1047
- data: z.clone().optional(),
1048
- server_id: f.string().optional(),
1049
- role_id: f.string().optional(),
1050
- created_at: f.number(),
1051
- rewards: f.array($n).optional()
1052
- }).lock(), nr = f.object({
1053
- allowed: f.bool(),
1054
- registered: f.bool()
1055
- }), rr = f.object({
1056
- feature_id: f.number(),
1057
- can_engage: f.bool(),
1058
- has_unclaimed_rewards: f.bool(),
1059
- final_available_count: f.number(),
1060
- total_remaining_engagements: f.number(),
1061
- cycle_remaining_engagements: f.number(),
1062
- eligible: f.bool().optional(),
1063
- actions: f.array(f.object({
1064
- action_type: f.string(),
1065
- allowed: f.bool()
1040
+ extra_data: u.record(u.unknown()).optional()
1041
+ }), tr = u.object({
1042
+ engagement_id: u.number(),
1043
+ user_id: u.string(),
1044
+ event_id: u.number(),
1045
+ feature_id: u.number(),
1046
+ sequence: u.number(),
1047
+ data: R.clone().optional(),
1048
+ server_id: u.string().optional(),
1049
+ role_id: u.string().optional(),
1050
+ created_at: u.number(),
1051
+ rewards: u.array($n).optional()
1052
+ }).lock(), nr = u.object({
1053
+ allowed: u.bool(),
1054
+ registered: u.bool()
1055
+ }), rr = u.object({
1056
+ feature_id: u.number(),
1057
+ can_engage: u.bool(),
1058
+ has_unclaimed_rewards: u.bool(),
1059
+ final_available_count: u.number(),
1060
+ total_remaining_engagements: u.number(),
1061
+ cycle_remaining_engagements: u.number(),
1062
+ eligible: u.bool().optional(),
1063
+ actions: u.array(u.object({
1064
+ action_type: u.string(),
1065
+ allowed: u.bool()
1066
1066
  })).optional()
1067
- }), ir = f.object({
1068
- engagement_id: f.number(),
1069
- engagement: f.object({
1070
- engagement_id: f.number(),
1071
- sequence: f.number(),
1072
- feature_id: f.number(),
1073
- data: z.clone().optional()
1067
+ }), ir = u.object({
1068
+ engagement_id: u.number(),
1069
+ engagement: u.object({
1070
+ engagement_id: u.number(),
1071
+ sequence: u.number(),
1072
+ feature_id: u.number(),
1073
+ data: R.clone().optional()
1074
1074
  }).optional(),
1075
- rewards: f.array(er).optional(),
1076
- scan: f.bool().optional()
1077
- }), ar = f.object({
1078
- reward_id: f.number(),
1075
+ rewards: u.array(er).optional(),
1076
+ scan: u.bool().optional()
1077
+ }), ar = u.object({
1078
+ reward_id: u.number(),
1079
1079
  reward_status: k
1080
- }), or = T.Vote2, sr = f.object({
1081
- candidate_id: f.string(),
1082
- display_name: f.string(),
1083
- images: f.array(f.string()).optional(),
1084
- videos: f.array(f.string()).optional(),
1085
- description: f.string().optional(),
1086
- jump_url: f.string()
1087
- }), cr = f.object({
1080
+ }), or = T.Vote2, sr = u.object({
1081
+ candidate_id: u.string(),
1082
+ display_name: u.string(),
1083
+ images: u.array(u.string()).optional(),
1084
+ videos: u.array(u.string()).optional(),
1085
+ description: u.string().optional(),
1086
+ jump_url: u.string()
1087
+ }), cr = u.object({
1088
1088
  ...P.shape,
1089
- feature_type: f.string().enum(or),
1090
- config: f.object({
1091
- vote_item_id: f.number().optional(),
1092
- candidates: f.array(sr),
1093
- vote_since: f.number(),
1094
- vote_until: f.number(),
1095
- rewards_since: f.number(),
1096
- rewards_until: f.number(),
1097
- winner_rewards: f.array(N).optional(),
1098
- consolation_rewards: f.array(N).optional(),
1099
- max_votes_per_user_per_candidate_per_cycle: f.number().optional()
1089
+ feature_type: u.string().enum(or),
1090
+ config: u.object({
1091
+ vote_item_id: u.number().optional(),
1092
+ candidates: u.array(sr),
1093
+ vote_since: u.number(),
1094
+ vote_until: u.number(),
1095
+ rewards_since: u.number(),
1096
+ rewards_until: u.number(),
1097
+ winner_rewards: u.array(N).optional(),
1098
+ consolation_rewards: u.array(N).optional(),
1099
+ max_votes_per_user_per_candidate_per_cycle: u.number().optional()
1100
1100
  })
1101
- }), lr = T.ZeroChatgpt, ur = f.object({
1101
+ }), lr = T.ZeroChatgpt, ur = u.object({
1102
1102
  ...P.shape,
1103
- feature_type: f.string().enum(lr)
1104
- }), dr = f.union(bt, St, Et, Ot, At, Nt, Ft, Lt, Vt, Ut, Gt, qt, tn, rn, on, cn, un, _n, cr, wt, ur, fn, mn, Xt, $t).key("feature_type").satisfies(), fr = f.object({
1105
- event_name: f.string(),
1106
- rules: f.string(),
1107
- since: f.number(),
1108
- until: f.number(),
1109
- visit_count: f.number().optional(),
1110
- features: f.array(dr)
1111
- }).lock(), pr = f.guard(fr), mr = f.guard(nr), B = d({ count: f.number() }), hr = d({ first_visit: f.bool() }), gr = d({ engagements: f.union(f.array(Qn), f.array(Ln)) }), _r = d({ status: f.array(rr) }), vr = d({ engagements_counts: f.record(f.number()) }), yr = d({
1112
- engagements: f.array(tr),
1113
- next_token: f.string().optional()
1114
- }), br = f.guard(ir), xr = d({ claimed_items: f.array(ar) }), Sr = d({ rewards: f.array(R) }), Cr = d({ reward_status: k }), wr = d({
1115
- user_rewards: f.array(R),
1116
- next_token: f.string().optional()
1117
- }), Tr = d({ unclaimed: f.number() }), Er = d({ scene: f.string() }), Dr = d({ params: f.string() }), Or = d({ img: f.string() }), kr = f.guard(Dn), Ar = f.guard(Jn), jr = f.guard(f.object({ candidate_votes: f.array(Yn) })), Mr = f.guard(I), Nr = f.guard(Hn), Pr = f.guard(Vn), Fr = f.guard(Un), Ir = f.guard(Wn), Lr = f.guard(Gn), Rr = f.guard(kn), zr = f.guard(Nn);
1103
+ feature_type: u.string().enum(lr)
1104
+ }), dr = u.union(yt, xt, Tt, Dt, kt, Mt, Pt, It, Bt, Ht, Wt, Kt, en, nn, an, sn, ln, gn, cr, Ct, ur, dn, pn, Yt, Qt).key("feature_type").satisfies(), fr = u.object({
1105
+ event_name: u.string(),
1106
+ rules: u.string(),
1107
+ since: u.number(),
1108
+ until: u.number(),
1109
+ visit_count: u.number().optional(),
1110
+ features: u.array(dr)
1111
+ }).lock(), pr = u.guard(fr), mr = u.guard(nr), z = l({ count: u.number() }), hr = l({ first_visit: u.bool() }), gr = l({ engagements: u.union(u.array(Qn), u.array(Ln)) }), _r = l({ status: u.array(rr) }), vr = l({ engagements_counts: u.record(u.number()) }), yr = l({
1112
+ engagements: u.array(tr),
1113
+ next_token: u.string().optional()
1114
+ }), br = u.guard(ir), xr = l({ claimed_items: u.array(ar) }), Sr = l({ rewards: u.array(L) }), Cr = l({ reward_status: k }), wr = l({
1115
+ user_rewards: u.array(L),
1116
+ next_token: u.string().optional()
1117
+ }), Tr = l({ unclaimed: u.number() }), Er = l({ scene: u.string() }), Dr = l({ params: u.string() }), Or = l({ img: u.string() }), kr = u.guard(Dn), Ar = u.guard(Jn), jr = u.guard(u.object({ candidate_votes: u.array(Yn) })), Mr = u.guard(I), Nr = u.guard(Hn), Pr = u.guard(Vn), Fr = u.guard(Un), Ir = u.guard(Wn), Lr = u.guard(Gn), Rr = u.guard(kn), zr = u.guard(Nn);
1118
1118
  //#endregion
1119
1119
  //#region src/event.methods.ts
1120
1120
  async function Br(e, t, n) {
@@ -1132,14 +1132,14 @@ async function Hr(e, t) {
1132
1132
  let { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, {
1133
1133
  feature_id: e,
1134
1134
  type: "user"
1135
- }, B, t);
1135
+ }, z, t);
1136
1136
  return n?.count ?? null;
1137
1137
  }
1138
1138
  async function Ur(e, t) {
1139
1139
  let { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, {
1140
1140
  feature_id: e,
1141
1141
  type: "engagement"
1142
- }, B, t);
1142
+ }, z, t);
1143
1143
  return n?.count ?? null;
1144
1144
  }
1145
1145
  async function Wr(e, t) {
@@ -1350,7 +1350,7 @@ async function di(e, t) {
1350
1350
  }
1351
1351
  async function fi(e, t) {
1352
1352
  if (!await this.token.autoLogin()) return null;
1353
- let { data: n } = await this.req.get(`event/${this.event}/user-item-count`, { item_id: e }, B, t);
1353
+ let { data: n } = await this.req.get(`event/${this.event}/user-item-count`, { item_id: e }, z, t);
1354
1354
  return n?.count ?? null;
1355
1355
  }
1356
1356
  async function pi(e, t, n) {
@@ -1426,23 +1426,23 @@ async function vi(e, t, n) {
1426
1426
  var yi = {
1427
1427
  Waiting: 1,
1428
1428
  Playing: 2
1429
- }, bi = f.number().enum(yi).lock(), xi = {
1429
+ }, bi = u.number().enum(yi).lock(), xi = {
1430
1430
  Unknown: 0,
1431
1431
  Goose: 1,
1432
1432
  Duck: 2,
1433
1433
  Bird: 3
1434
- }, Si = f.number().enum(xi).lock(), Ci = {
1434
+ }, Si = u.number().enum(xi).lock(), Ci = {
1435
1435
  Unknown: 0,
1436
1436
  Win: 1,
1437
1437
  Lose: 2,
1438
1438
  Mvp: 3,
1439
1439
  Flee: 4,
1440
1440
  KickOut: 5
1441
- }, wi = f.number().enum(Ci).lock(), Ti = class {
1441
+ }, wi = u.number().enum(Ci).lock(), Ti = class {
1442
1442
  req = null;
1443
1443
  constructor(e, t) {
1444
1444
  if (typeof e == "string" && t) {
1445
- let n = ae(e) ? e : `https://${o(e)}`;
1445
+ let n = d(e) ? e : `https://${o(e)}`;
1446
1446
  this.req = t({
1447
1447
  baseURL: `${n}/v1`,
1448
1448
  timeout: 1e4,
@@ -1475,39 +1475,39 @@ var yi = {
1475
1475
  error: "invitation_code_expired",
1476
1476
  message: "邀请链接已过期"
1477
1477
  };
1478
- let { data: o, ok: c, code: l, message: u } = await this.req.get("ggd/describe-room", {
1478
+ let { data: o, ok: ee, code: c, message: te } = await this.req.get("ggd/describe-room", {
1479
1479
  invitation_code: i,
1480
1480
  server_id: a
1481
- }, d({
1482
- room_id: f.string(),
1483
- inviter_role_id: f.number(),
1481
+ }, l({
1482
+ room_id: u.string(),
1483
+ inviter_role_id: u.number(),
1484
1484
  room_status: bi,
1485
- room_mode: f.string().optional(),
1486
- room_tags: f.array(f.string()).optional(),
1487
- max_members: f.number().optional(),
1488
- members: f.array(f.object({
1489
- role_id: f.number(),
1490
- role_name: f.string(),
1491
- avatar_url: f.string()
1485
+ room_mode: u.string().optional(),
1486
+ room_tags: u.array(u.string()).optional(),
1487
+ max_members: u.number().optional(),
1488
+ members: u.array(u.object({
1489
+ role_id: u.number(),
1490
+ role_name: u.string(),
1491
+ avatar_url: u.string()
1492
1492
  })).optional()
1493
1493
  }), { message: !1 });
1494
- return c && o ? o : {
1495
- error: l,
1496
- message: u
1494
+ return ee && o ? o : {
1495
+ error: c,
1496
+ message: te
1497
1497
  };
1498
1498
  }
1499
1499
  async describeRole() {
1500
1500
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1501
- let { data: e, code: t, message: n } = await this.req.get("ggd/describe-role", null, d({
1502
- combo_id: f.string(),
1503
- showid: f.number().optional(),
1504
- role_id: f.union(f.number(), f.string()),
1505
- role_name: f.string(),
1506
- role_level: f.number().optional(),
1507
- avatar_url: f.string().optional(),
1508
- behavior_score: f.number().optional(),
1509
- lead_goose_level: f.number().optional(),
1510
- create_time: f.number()
1501
+ let { data: e, code: t, message: n } = await this.req.get("ggd/describe-role", null, l({
1502
+ combo_id: u.string(),
1503
+ showid: u.number().optional(),
1504
+ role_id: u.union(u.number(), u.string()),
1505
+ role_name: u.string(),
1506
+ role_level: u.number().optional(),
1507
+ avatar_url: u.string().optional(),
1508
+ behavior_score: u.number().optional(),
1509
+ lead_goose_level: u.number().optional(),
1510
+ create_time: u.number()
1511
1511
  }));
1512
1512
  return e || {
1513
1513
  error: t,
@@ -1516,24 +1516,24 @@ var yi = {
1516
1516
  }
1517
1517
  async describeRoleMatchStats(e) {
1518
1518
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1519
- let { data: t, code: n, message: r } = await this.req.get("ggd/describe-role-match-stats", { role_id: e }, d({
1520
- inference_level: f.string().optional(),
1521
- recent_classic_survival_round: f.number().optional(),
1522
- recent_goose_vote_correct_rate: f.string().optional(),
1523
- recent_duck_vote_correct_rate: f.string().optional(),
1524
- recent_total_killed_count: f.number().optional(),
1525
- season_top_count: f.number().optional(),
1526
- goose_win_rate: f.string().optional(),
1527
- duck_win_rate: f.string().optional(),
1528
- neutral_win_rate: f.string().optional(),
1529
- goose_win_count: f.number().optional(),
1530
- duck_win_count: f.number().optional(),
1531
- neutral_win_count: f.number().optional(),
1532
- total_win_rate: f.string().optional(),
1533
- total_count: f.number().optional(),
1534
- goose_vote_correct_rate: f.string().optional(),
1535
- duck_vote_correct_rate: f.string().optional(),
1536
- total_killed_count: f.number().optional()
1519
+ let { data: t, code: n, message: r } = await this.req.get("ggd/describe-role-match-stats", { role_id: e }, l({
1520
+ inference_level: u.string().optional(),
1521
+ recent_classic_survival_round: u.number().optional(),
1522
+ recent_goose_vote_correct_rate: u.string().optional(),
1523
+ recent_duck_vote_correct_rate: u.string().optional(),
1524
+ recent_total_killed_count: u.number().optional(),
1525
+ season_top_count: u.number().optional(),
1526
+ goose_win_rate: u.string().optional(),
1527
+ duck_win_rate: u.string().optional(),
1528
+ neutral_win_rate: u.string().optional(),
1529
+ goose_win_count: u.number().optional(),
1530
+ duck_win_count: u.number().optional(),
1531
+ neutral_win_count: u.number().optional(),
1532
+ total_win_rate: u.string().optional(),
1533
+ total_count: u.number().optional(),
1534
+ goose_vote_correct_rate: u.string().optional(),
1535
+ duck_vote_correct_rate: u.string().optional(),
1536
+ total_killed_count: u.number().optional()
1537
1537
  }));
1538
1538
  return t || {
1539
1539
  error: n,
@@ -1542,14 +1542,14 @@ var yi = {
1542
1542
  }
1543
1543
  async listRoleMatches(e) {
1544
1544
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1545
- let { data: t, code: n, message: r } = await this.req.get("ggd/list-role-matches", { role_id: e }, d({ matches: f.array(f.object({
1546
- players_num: f.number(),
1547
- end_time: f.number(),
1548
- map_name: f.string(),
1545
+ let { data: t, code: n, message: r } = await this.req.get("ggd/list-role-matches", { role_id: e }, l({ matches: u.array(u.object({
1546
+ players_num: u.number(),
1547
+ end_time: u.number(),
1548
+ map_name: u.string(),
1549
1549
  career_camp: Si,
1550
1550
  player_status: wi,
1551
- career_name: f.string(),
1552
- mode_name: f.string()
1551
+ career_name: u.string(),
1552
+ mode_name: u.string()
1553
1553
  })).optional() }));
1554
1554
  return t ? t.matches : {
1555
1555
  error: n,
@@ -1559,16 +1559,16 @@ var yi = {
1559
1559
  }, Ei = {
1560
1560
  All: "all",
1561
1561
  Limit: "limit"
1562
- }, Di = f.string().enum(Ei).lock(), Oi = {
1562
+ }, Di = u.string().enum(Ei).lock(), Oi = {
1563
1563
  Pending: "pending",
1564
1564
  Approved: "approved",
1565
1565
  Failed: "failed",
1566
1566
  Suspect: "suspect"
1567
- }, V = f.string().enum(Oi).lock(), ki = {
1567
+ }, B = u.string().enum(Oi).lock(), ki = {
1568
1568
  System: "system",
1569
1569
  Comment: "comment",
1570
1570
  Like: "like"
1571
- }, Ai = f.string().enum(ki).lock(), H = {
1571
+ }, Ai = u.string().enum(ki).lock(), V = {
1572
1572
  System: "system",
1573
1573
  PostPinned: "post_pinned",
1574
1574
  PostHighlighted: "post_highlighted",
@@ -1581,188 +1581,188 @@ var yi = {
1581
1581
  ReplyReplied: "reply_replied",
1582
1582
  ReplyLiked: "reply_liked",
1583
1583
  ReplyDeleted: "reply_deleted"
1584
- }, ji = f.string().enum(H).lock(), U = f.object({
1585
- forum_id: f.number(),
1586
- icon_url: f.string(),
1587
- name: f.string(),
1588
- tags: f.array(f.string()),
1589
- sort: f.number(),
1584
+ }, ji = u.string().enum(V).lock(), H = u.object({
1585
+ forum_id: u.number(),
1586
+ icon_url: u.string(),
1587
+ name: u.string(),
1588
+ tags: u.array(u.string()),
1589
+ sort: u.number(),
1590
1590
  mode: Di,
1591
- member_ids: f.array(f.number())
1592
- }).lock(), W = f.object({
1593
- topic_id: f.number(),
1594
- cover_url: f.string(),
1595
- name: f.string(),
1596
- description: f.string(),
1597
- tags: f.array(f.string()),
1598
- post_num: f.number()
1599
- }).lock(), G = f.object({
1600
- post_id: f.number(),
1601
- forum: U,
1602
- posted_by: f.string(),
1603
- nickname: f.string(),
1604
- avatar_url: f.string(),
1605
- title: f.string().optional(),
1606
- content: f.string(),
1607
- content_text_count: f.number(),
1608
- summary: f.string(),
1609
- like_num: f.number(),
1610
- comments_num: f.number(),
1611
- liked: f.bool(),
1612
- image_urls: f.array(f.string()),
1613
- topics: f.array(W),
1614
- event_ids: f.array(f.number()),
1615
- is_pinned: f.bool(),
1616
- is_highlighted: f.bool(),
1617
- status: V,
1618
- create_time: f.number()
1619
- }).lock(), K = f.object({ err_msg: f.string().optional() }).optional().lock(), Mi = f.object({
1620
- reply_id: f.number(),
1621
- reply_content: f.string().optional(),
1622
- replied_by: f.string(),
1623
- nickname: f.string(),
1624
- avatar_url: f.string()
1625
- }).lock(), q = f.object({
1626
- reply_id: f.number(),
1627
- comment_id: f.number(),
1628
- comment_content: f.string().optional(),
1629
- commented_by: f.string().optional(),
1630
- commented_by_nickname: f.string().optional(),
1631
- commented_by_avatar_url: f.string().optional(),
1632
- replied_by: f.string(),
1633
- nickname: f.string(),
1634
- avatar_url: f.string(),
1635
- content: f.string(),
1636
- like_num: f.number(),
1637
- liked: f.bool(),
1591
+ member_ids: u.array(u.number())
1592
+ }).lock(), U = u.object({
1593
+ topic_id: u.number(),
1594
+ cover_url: u.string(),
1595
+ name: u.string(),
1596
+ description: u.string(),
1597
+ tags: u.array(u.string()),
1598
+ post_num: u.number()
1599
+ }).lock(), W = u.object({
1600
+ post_id: u.number(),
1601
+ forum: H,
1602
+ posted_by: u.string(),
1603
+ nickname: u.string(),
1604
+ avatar_url: u.string(),
1605
+ title: u.string().optional(),
1606
+ content: u.string(),
1607
+ content_text_count: u.number(),
1608
+ summary: u.string(),
1609
+ like_num: u.number(),
1610
+ comments_num: u.number(),
1611
+ liked: u.bool(),
1612
+ image_urls: u.array(u.string()),
1613
+ topics: u.array(U),
1614
+ event_ids: u.array(u.number()),
1615
+ is_pinned: u.bool(),
1616
+ is_highlighted: u.bool(),
1617
+ status: B,
1618
+ create_time: u.number()
1619
+ }).lock(), G = u.object({ err_msg: u.string().optional() }).optional().lock(), Mi = u.object({
1620
+ reply_id: u.number(),
1621
+ reply_content: u.string().optional(),
1622
+ replied_by: u.string(),
1623
+ nickname: u.string(),
1624
+ avatar_url: u.string()
1625
+ }).lock(), K = u.object({
1626
+ reply_id: u.number(),
1627
+ comment_id: u.number(),
1628
+ comment_content: u.string().optional(),
1629
+ commented_by: u.string().optional(),
1630
+ commented_by_nickname: u.string().optional(),
1631
+ commented_by_avatar_url: u.string().optional(),
1632
+ replied_by: u.string(),
1633
+ nickname: u.string(),
1634
+ avatar_url: u.string(),
1635
+ content: u.string(),
1636
+ like_num: u.number(),
1637
+ liked: u.bool(),
1638
1638
  reply_to: Mi,
1639
- create_time: f.number()
1640
- }).lock(), J = f.object({
1641
- comment_id: f.number(),
1642
- post_id: f.number(),
1643
- post_subject: f.string().optional(),
1644
- post_summary: f.string().optional(),
1645
- post_image_url: f.string().optional(),
1646
- posted_by: f.string().optional(),
1647
- posted_by_nickname: f.string().optional(),
1648
- posted_by_avatar_url: f.string().optional(),
1649
- commented_by: f.string(),
1650
- nickname: f.string(),
1651
- avatar_url: f.string(),
1652
- content: f.string(),
1653
- like_num: f.number(),
1654
- reply_num: f.number(),
1655
- liked: f.bool(),
1656
- image_url: f.string(),
1657
- create_time: f.number(),
1658
- status: V,
1659
- replies: f.array(q).optional()
1660
- }).lock(), Ni = f.object({
1661
- image_url: f.string(),
1662
- upload_url: f.string(),
1663
- existed: f.bool()
1664
- }).lock(), Y = f.object({
1665
- notification_id: f.string(),
1639
+ create_time: u.number()
1640
+ }).lock(), q = u.object({
1641
+ comment_id: u.number(),
1642
+ post_id: u.number(),
1643
+ post_subject: u.string().optional(),
1644
+ post_summary: u.string().optional(),
1645
+ post_image_url: u.string().optional(),
1646
+ posted_by: u.string().optional(),
1647
+ posted_by_nickname: u.string().optional(),
1648
+ posted_by_avatar_url: u.string().optional(),
1649
+ commented_by: u.string(),
1650
+ nickname: u.string(),
1651
+ avatar_url: u.string(),
1652
+ content: u.string(),
1653
+ like_num: u.number(),
1654
+ reply_num: u.number(),
1655
+ liked: u.bool(),
1656
+ image_url: u.string(),
1657
+ create_time: u.number(),
1658
+ status: B,
1659
+ replies: u.array(K).optional()
1660
+ }).lock(), Ni = u.object({
1661
+ image_url: u.string(),
1662
+ upload_url: u.string(),
1663
+ existed: u.bool()
1664
+ }).lock(), J = u.object({
1665
+ notification_id: u.string(),
1666
1666
  notification_type: ji,
1667
- is_read: f.bool(),
1668
- create_time: f.number(),
1669
- origin_user_id: f.string(),
1670
- origin_user_name: f.string(),
1671
- origin_user_avatar_url: f.string()
1672
- }).lock(), Pi = f.object({
1673
- system_message_subject: f.string(),
1674
- system_message_content: f.string()
1675
- }).lock(), X = f.object({
1676
- post_id: f.number(),
1677
- post_subject: f.string(),
1678
- post_summary: f.string(),
1679
- post_image_url: f.string()
1680
- }).lock(), Z = f.object({
1681
- comment_id: f.number(),
1682
- comment_content: f.string()
1683
- }).lock(), Q = f.object({
1684
- reply_id: f.number(),
1685
- reply_content: f.string()
1686
- }).lock(), Fi = f.object({
1687
- ...Y.shape,
1667
+ is_read: u.bool(),
1668
+ create_time: u.number(),
1669
+ origin_user_id: u.string(),
1670
+ origin_user_name: u.string(),
1671
+ origin_user_avatar_url: u.string()
1672
+ }).lock(), Pi = u.object({
1673
+ system_message_subject: u.string(),
1674
+ system_message_content: u.string()
1675
+ }).lock(), Y = u.object({
1676
+ post_id: u.number(),
1677
+ post_subject: u.string(),
1678
+ post_summary: u.string(),
1679
+ post_image_url: u.string()
1680
+ }).lock(), X = u.object({
1681
+ comment_id: u.number(),
1682
+ comment_content: u.string()
1683
+ }).lock(), Z = u.object({
1684
+ reply_id: u.number(),
1685
+ reply_content: u.string()
1686
+ }).lock(), Fi = u.object({
1687
+ ...J.shape,
1688
1688
  ...Pi.shape,
1689
- notification_type: f.string().enum(H.System)
1690
- }), Ii = f.object({
1689
+ notification_type: u.string().enum(V.System)
1690
+ }), Ii = u.object({
1691
+ ...J.shape,
1691
1692
  ...Y.shape,
1692
- ...X.shape,
1693
- notification_type: f.string().enum(H.PostPinned, H.PostHighlighted, H.PostDeleted, H.PostLiked)
1694
- }), Li = f.object({
1693
+ notification_type: u.string().enum(V.PostPinned, V.PostHighlighted, V.PostDeleted, V.PostLiked)
1694
+ }), Li = u.object({
1695
+ ...J.shape,
1695
1696
  ...Y.shape,
1696
1697
  ...X.shape,
1698
+ notification_type: u.string().enum(V.PostCommented)
1699
+ }), Ri = u.object({
1700
+ ...J.shape,
1701
+ ...X.shape,
1697
1702
  ...Z.shape,
1698
- notification_type: f.string().enum(H.PostCommented)
1699
- }), Ri = f.object({
1703
+ notification_type: u.string().enum(V.CommentReplied)
1704
+ }), zi = u.object({
1705
+ ...J.shape,
1706
+ ...X.shape,
1700
1707
  ...Y.shape,
1708
+ notification_type: u.string().enum(V.CommentLiked, V.CommentDeleted)
1709
+ }), Q = u.object({
1710
+ ...J.shape,
1701
1711
  ...Z.shape,
1702
- ...Q.shape,
1703
- notification_type: f.string().enum(H.CommentReplied)
1704
- }), zi = f.object({
1705
- ...Y.shape,
1712
+ notification_type: u.string().enum(V.ReplyReplied),
1713
+ comment_id: u.number(),
1714
+ reply_to_reply_id: u.number(),
1715
+ reply_to_reply_content: u.string()
1716
+ }), Bi = u.object({
1717
+ ...J.shape,
1706
1718
  ...Z.shape,
1707
1719
  ...X.shape,
1708
- notification_type: f.string().enum(H.CommentLiked, H.CommentDeleted)
1709
- }), Bi = f.object({
1710
- ...Y.shape,
1711
- ...Q.shape,
1712
- notification_type: f.string().enum(H.ReplyReplied),
1713
- comment_id: f.number(),
1714
- reply_to_reply_id: f.number(),
1715
- reply_to_reply_content: f.string()
1716
- }), Vi = f.object({
1717
- ...Y.shape,
1718
- ...Q.shape,
1719
- ...Z.shape,
1720
- notification_type: f.string().enum(H.ReplyLiked, H.ReplyDeleted)
1721
- }), Hi = f.union(Fi, Ii, Li, Ri, zi, Bi, Vi).satisfies().lock(), Ui = d({ forums: f.array(U) }), Wi = d({ topics: f.array(W) }), Gi = d({ topic: W }), Ki = d({ post: G }), qi = d({
1722
- posts: f.array(G),
1723
- next_token: f.string().optional()
1724
- }), Ji = d({
1725
- post: G.clone().optional(),
1726
- antispam: K.clone().optional()
1727
- }), Yi = d({
1728
- replies: f.array(q),
1729
- next_token: f.string().optional()
1730
- }), Xi = d({ reply: q }), Zi = d({
1731
- reply: q.clone().optional(),
1732
- antispam: K.clone().optional()
1733
- }), Qi = d({ comment: J }), $i = d({
1734
- comments: f.array(J),
1735
- next_token: f.string().optional()
1736
- }), ea = d({
1737
- comment: J.clone().optional(),
1738
- antispam: J.clone().optional()
1739
- }), ta = f.guard(Ni), na = d({
1740
- notifications: f.array(Hi),
1741
- next_token: f.string().optional()
1742
- }), ra = d({
1743
- system: f.number(),
1744
- comment: f.number(),
1745
- like: f.number()
1746
- }), ia = class {
1720
+ notification_type: u.string().enum(V.ReplyLiked, V.ReplyDeleted)
1721
+ }), Vi = u.union(Fi, Ii, Li, Ri, zi, Q, Bi).satisfies().lock(), Hi = l({ forums: u.array(H) }), Ui = l({ topics: u.array(U) }), Wi = l({ topic: U }), Gi = l({ post: W }), Ki = l({
1722
+ posts: u.array(W),
1723
+ next_token: u.string().optional()
1724
+ }), qi = l({
1725
+ post: W.clone().optional(),
1726
+ antispam: G.clone().optional()
1727
+ }), Ji = l({
1728
+ replies: u.array(K),
1729
+ next_token: u.string().optional()
1730
+ }), Yi = l({ reply: K }), Xi = l({
1731
+ reply: K.clone().optional(),
1732
+ antispam: G.clone().optional()
1733
+ }), Zi = l({ comment: q }), Qi = l({
1734
+ comments: u.array(q),
1735
+ next_token: u.string().optional()
1736
+ }), $i = l({
1737
+ comment: q.clone().optional(),
1738
+ antispam: q.clone().optional()
1739
+ }), ea = u.guard(Ni), ta = l({
1740
+ notifications: u.array(Vi),
1741
+ next_token: u.string().optional()
1742
+ }), na = l({
1743
+ system: u.number(),
1744
+ comment: u.number(),
1745
+ like: u.number()
1746
+ }), ra = class {
1747
1747
  token;
1748
1748
  req;
1749
1749
  constructor(e) {
1750
1750
  this.token = e, this.req = e.req;
1751
1751
  }
1752
1752
  async getForums(e) {
1753
- let { data: t } = await this.req.get("community/forums", null, Ui, e);
1753
+ let { data: t } = await this.req.get("community/forums", null, Hi, e);
1754
1754
  return t?.forums || [];
1755
1755
  }
1756
1756
  async getTopics(e) {
1757
- let { data: t } = await this.req.get("community/topics", null, Wi, e);
1757
+ let { data: t } = await this.req.get("community/topics", null, Ui, e);
1758
1758
  return t?.topics || [];
1759
1759
  }
1760
1760
  async getTopic(e, t) {
1761
- let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e }, Gi, t);
1761
+ let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e }, Wi, t);
1762
1762
  return n?.topic ?? { error: r };
1763
1763
  }
1764
1764
  async getPosts(e, t) {
1765
- let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null, qi, t);
1765
+ let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null, Ki, t);
1766
1766
  return n ?? {
1767
1767
  message: i,
1768
1768
  error: r
@@ -1773,35 +1773,35 @@ var yi = {
1773
1773
  forum_id: e,
1774
1774
  max_results: t,
1775
1775
  next_token: n
1776
- }, qi, r);
1776
+ }, Ki, r);
1777
1777
  return i ?? {
1778
1778
  message: o,
1779
1779
  error: a
1780
1780
  };
1781
1781
  }
1782
1782
  async getPost(e, t) {
1783
- let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e }, Ki, t);
1783
+ let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e }, Gi, t);
1784
1784
  return n?.post ?? {
1785
1785
  message: i,
1786
1786
  error: r
1787
1787
  };
1788
1788
  }
1789
1789
  async post(e, t) {
1790
- let { data: n, code: r, message: i } = await this.req.post("community/post", a(e), Ji, t);
1790
+ let { data: n, code: r, message: i } = await this.req.post("community/post", a(e), qi, t);
1791
1791
  return n ?? {
1792
1792
  message: i,
1793
1793
  error: r
1794
1794
  };
1795
1795
  }
1796
1796
  async getComments(e, t) {
1797
- let { data: n, code: r, message: i } = await this.req.get("community/comments", e, $i, t);
1797
+ let { data: n, code: r, message: i } = await this.req.get("community/comments", e, Qi, t);
1798
1798
  return n ?? {
1799
1799
  message: i,
1800
1800
  error: r
1801
1801
  };
1802
1802
  }
1803
1803
  async getComment(e, t) {
1804
- let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e }, Qi, t);
1804
+ let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e }, Zi, t);
1805
1805
  return n?.comment ?? {
1806
1806
  message: i,
1807
1807
  error: r
@@ -1809,7 +1809,7 @@ var yi = {
1809
1809
  }
1810
1810
  async comment(e, t) {
1811
1811
  await this.token.autoLogin();
1812
- let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e), ea, t);
1812
+ let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e), $i, t);
1813
1813
  return n ?? {
1814
1814
  message: i,
1815
1815
  error: r
@@ -1819,14 +1819,14 @@ var yi = {
1819
1819
  let { data: n } = await this.req.get("community/replies", {
1820
1820
  max_results: 20,
1821
1821
  ...e
1822
- }, Yi, t);
1822
+ }, Ji, t);
1823
1823
  return {
1824
1824
  replies: n?.replies || [],
1825
1825
  next_token: n?.next_token || ""
1826
1826
  };
1827
1827
  }
1828
1828
  async getReply(e, t) {
1829
- let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e }, Xi, t);
1829
+ let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e }, Yi, t);
1830
1830
  return n?.reply ?? {
1831
1831
  message: i,
1832
1832
  error: r
@@ -1834,7 +1834,7 @@ var yi = {
1834
1834
  }
1835
1835
  async reply(e, t) {
1836
1836
  await this.token.autoLogin();
1837
- let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e), Zi, t);
1837
+ let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e), Xi, t);
1838
1838
  return n ?? {
1839
1839
  message: i,
1840
1840
  error: r
@@ -1864,7 +1864,7 @@ var yi = {
1864
1864
  }
1865
1865
  async getMediaPresignedUrl(e, t) {
1866
1866
  await this.token.autoLogin();
1867
- let { data: n } = await this.req.get("community/media-presign-url", e, ta, t);
1867
+ let { data: n } = await this.req.get("community/media-presign-url", e, ea, t);
1868
1868
  return n;
1869
1869
  }
1870
1870
  async getNotifications(e, t) {
@@ -1872,7 +1872,7 @@ var yi = {
1872
1872
  let { data: n } = await this.req.get("community/notifications", {
1873
1873
  max_results: 20,
1874
1874
  ...e
1875
- }, na, t);
1875
+ }, ta, t);
1876
1876
  return {
1877
1877
  notifications: n?.notifications || [],
1878
1878
  next_token: n?.next_token || ""
@@ -1880,7 +1880,7 @@ var yi = {
1880
1880
  }
1881
1881
  async getUnreadNotificationsCount(e) {
1882
1882
  if (!await this.token.autoLogin()) return null;
1883
- let { data: t } = await this.req.get("community/unread-notifications-count", null, ra, e);
1883
+ let { data: t } = await this.req.get("community/unread-notifications-count", null, na, e);
1884
1884
  return t;
1885
1885
  }
1886
1886
  async clearUnreadNotifications(e, t) {
@@ -1888,21 +1888,21 @@ var yi = {
1888
1888
  let { ok: n } = await this.req.post("community/clear-unread-notifications", { category: e }, null, t);
1889
1889
  return n;
1890
1890
  }
1891
- }, aa = d({
1892
- nonce_str: f.string(),
1893
- timestamp: f.number(),
1894
- signature: f.string()
1895
- }), oa = /* @__PURE__ */ function(e) {
1891
+ }, ia = l({
1892
+ nonce_str: u.string(),
1893
+ timestamp: u.number(),
1894
+ signature: u.string()
1895
+ }), aa = /* @__PURE__ */ function(e) {
1896
1896
  return e.RedirectUriDisMatch = "10003", e.AppidError = "10016", e.AuthorizationError = "10015", e.NoRightForScope = "10005", e.Frequently = "10009", e.AppBanded = "10004", e.ShouldFollow = "10006", e.ScopeNull = "10010", e.RedirectUriNull = "10011", e.AppidNull = "10012", e.StateNull = "10013", e;
1897
1897
  }({});
1898
1898
  //#endregion
1899
1899
  //#region src/weixin.guards.ts
1900
- function $(e) {
1900
+ function oa(e) {
1901
1901
  return t(e, "open_id", "union_id", "weixin_token");
1902
1902
  }
1903
1903
  //#endregion
1904
1904
  //#region src/weixin.ts
1905
- var sa = "wx_login_cache", ca = class {
1905
+ var $ = "wx_login_cache", sa = class {
1906
1906
  token;
1907
1907
  _appid;
1908
1908
  req;
@@ -1913,49 +1913,27 @@ var sa = "wx_login_cache", ca = class {
1913
1913
  return this._appid;
1914
1914
  }
1915
1915
  async getLoginCache() {
1916
- let e = this.token.storage.get(sa);
1916
+ let e = this.token.storage.get($);
1917
1917
  if (!e) return null;
1918
1918
  let t = i(e);
1919
- return $(t) ? (this.token.weixinToken = t.weixin_token, await this.token.autoLogin(), t) : null;
1919
+ return oa(t) ? (this.token.weixinToken = t.weixin_token, await this.token.autoLogin(), t) : null;
1920
1920
  }
1921
1921
  async login(e) {
1922
- if (!u()) throw Error("当前环境非微信小程序");
1922
+ if (!c()) throw Error("当前环境非微信小程序");
1923
1923
  let t = await this.getLoginCache();
1924
1924
  if (t) return t;
1925
1925
  let n = await oe(), { data: r, code: i, message: a } = await this.req.post("weixin/login", {
1926
1926
  code: n,
1927
1927
  appid: this.appid
1928
- }, $, {
1928
+ }, oa, {
1929
1929
  ...e,
1930
1930
  message: !1
1931
1931
  });
1932
- return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(sa, JSON.stringify(r))), r ?? {
1932
+ return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set($, JSON.stringify(r))), r ?? {
1933
1933
  message: a,
1934
1934
  error: i
1935
1935
  };
1936
1936
  }
1937
- async webLogin(e = "snsapi_userinfo", t) {
1938
- let n = s("code"), r = Date.now(), i = +s("state");
1939
- if (!n || !i || i < r - 1e3 * 60 * 5 || i > r) {
1940
- let t = c(["code", "state"]);
1941
- location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${r}#wechat_redirect`);
1942
- return;
1943
- }
1944
- if (/^100\d{2}$/.test(n)) return {
1945
- message: "Error: " + n,
1946
- error: n
1947
- };
1948
- let a = c(["code", "state"]);
1949
- "replaceState" in history && history.replaceState({}, "", a);
1950
- let { data: o, code: l, message: u } = await this.req.post("weixin/login", {
1951
- code: n,
1952
- appid: this.appid
1953
- }, $, t);
1954
- return o && (this.token.weixinToken = o.weixin_token, await this.token.autoLogin()), o ?? {
1955
- message: u,
1956
- error: l
1957
- };
1958
- }
1959
1937
  async linkPlayer(e, t, n) {
1960
1938
  if (!e || !t) return !1;
1961
1939
  let { ok: r } = await this.req.post("weixin/link-player", {
@@ -1971,7 +1949,7 @@ var sa = "wx_login_cache", ca = class {
1971
1949
  let { data: t } = await this.req.get("weixin/offiaccount/jssdk-sign", {
1972
1950
  appid: this.appid,
1973
1951
  url: location.href.split("#")[0]
1974
- }, aa, e);
1952
+ }, ia, e);
1975
1953
  return t ? {
1976
1954
  appid: this.appid,
1977
1955
  nonceStr: t.nonce_str,
@@ -1981,4 +1959,4 @@ var sa = "wx_login_cache", ca = class {
1981
1959
  }
1982
1960
  };
1983
1961
  //#endregion
1984
- export { K as AntispamValidator, se as AuthToken, Yn as CandidateVoteValidator, I as CashbackEngagementDataValidator, vn as ClaimActivationKeyEngagementDataValidator, Qe as ClaimRewardStatus, k as ClaimRewardStatusValidator, ar as ClaimedItemValidator, _ as ClubAddressValidator, Ve as ClubApi, v as ClubBenefitSummaryValidator, we as ClubBenefitValidator, de as ClubCreditChangeScene, fe as ClubCreditChangeSceneValidator, le as ClubCreditChangeType, ue as ClubCreditChangeTypeValidator, Ce as ClubCreditLogValidator, ge as ClubGlobalConfigValidator, pe as ClubItemType, h as ClubItemTypeValidator, _e as ClubPlayerValidator, y as ClubProductValidator, me as ClubRedemptionStatus, he as ClubRedemptionStatusValidator, Se as ClubUserCreditValidator, xe as ClubUserProfileValidator, Qn as CommentEngagementValidator, J as CommentValidator, ia as CommunityApi, Xn as ConversationValidator, We as EngageAccountType, Ge as EngageAccountTypeValidator, ir as EngageResponseValidator, er as EngageRewardValidator, He as EventApi, fr as EventConfigValidator, bt as EventFeatureConfigOfCashbackValidator, St as EventFeatureConfigOfCheckInValidator, wt as EventFeatureConfigOfClaimActivationKeyValidator, Et as EventFeatureConfigOfClaimRewardsValidator, Ot as EventFeatureConfigOfCommentValidator, At as EventFeatureConfigOfFollowValidator, Nt as EventFeatureConfigOfGiftCodeValidator, Ft as EventFeatureConfigOfInviteValidator, Lt as EventFeatureConfigOfInvitedRegisterValidator, Ut as EventFeatureConfigOfLotteryDrawValidator, Vt as EventFeatureConfigOfLotteryValidator, Gt as EventFeatureConfigOfPreregisterValidator, qt as EventFeatureConfigOfQuestValidator, Xt as EventFeatureConfigOfRedeemValidator, $t as EventFeatureConfigOfReferralValidator, tn as EventFeatureConfigOfRegisterValidator, rn as EventFeatureConfigOfShareValidator, on as EventFeatureConfigOfSubscribeValidator, cn as EventFeatureConfigOfSurveyValidator, un as EventFeatureConfigOfTeamValidator, mn as EventFeatureConfigOfUgcLikeValidator, fn as EventFeatureConfigOfUgcValidator, cr as EventFeatureConfigOfVote2Validator, _n as EventFeatureConfigOfVoteValidator, dr as EventFeatureConfigValidator, Ke as EventPeriodType, qe as EventPeriodTypeValidator, N as EventRewardItemConfigValidator, De as ExtraGameRewardValidator, Ee as ExtraPhysicalShipmentValidator, Yt as FeatureRedeemItemConfigValidator, Qt as FeatureReferralTierItemValidator, vt as FeatureRewardValidator, T as FeatureType, Je as FeatureTypeValidator, Ei as ForumMode, Di as ForumModeValidator, U as ForumValidator, xi as GGDCareerCampType, Si as GGDCareerCampTypeValidator, Ci as GGDPlayerStatus, wi as GGDPlayerStatusValidator, Ti as GGDPublicApi, yi as GGDRoomStatus, bi as GGDRoomStatusValidator, S as GamerItemType, C as GamerItemTypeValidator, m as Gender, ce as GenderValidator, Nn as GenerateReferralRewardsResponseValidator, yn as GiftCodeEngagementDataValidator, L as InviteEngagementDataValidator, st as LotteryDrawAction, ct as LotteryDrawActionValidator, Cn as LotteryDrawEngagementDataValidator, bn as LotteryEngagementDataValidator, j as LotteryTicketStatus, nt as LotteryTicketStatusValidator, Y as NotificationBaseValidator, ki as NotificationCategory, Ai as NotificationCategoryValidator, Ri as NotificationCommentReplyValidator, zi as NotificationCommentValidator, Z as NotificationPayloadCommentValidator, X as NotificationPayloadPostValidator, Q as NotificationPayloadReplyValidator, Pi as NotificationPayloadSystemValidator, Li as NotificationPostCommentValidator, Ii as NotificationPostValidator, Bi as NotificationReplyRepliedValidator, Vi as NotificationReplyValidator, Fi as NotificationSystemValidator, H as NotificationType, ji as NotificationTypeValidator, Hi as NotificationValidator, be as PlayerRoleCardValidator, g as PlayerRoleValidator, Oi as PostStatus, V as PostStatusValidator, G as PostValidator, wn as PreregisterEngagementDataValidator, Ni as PresignedUrlResponseValidator, En as QuestEngagementDataValidator, Ye as QuestObjective, E as QuestObjectiveValidator, lt as QuestProgressAlgorithm, ut as QuestProgressAlgorithmValidator, Dn as QuestProgressValidator, On as RedeemEngagementDataValidator, Te as RedeemParamsValidator, kn as RedeemStocksResponseValidator, Oe as RedemptionValidator, at as ReferralAction, ot as ReferralActionValidator, jn as ReferralEngagementDataValidator, An as ReferralInviteValidator, _t as RegularRewardValidator, Mi as ReplyToValidator, q as ReplyValidator, Ue as RewardItemType, w as RewardItemTypeValidator, $e as RewardSource, A as RewardSourceValidator, D as RewardStatus, O as RewardStatusValidator, $n as RewardValidator, ye as RoleBaseInfoValidator, ve as ServerBaseInfoValidator, Pn as ShareEngagementDataValidator, In as SurveyEngagementDataValidator, rt as TeamAction, it as TeamActionValidator, zn as TeamEngagementDataValidator, Ln as TeamEngagementValidator, Rn as TeamMemberValidator, et as TeamVisibility, tt as TeamVisibilityValidator, Mn as TierStatusValidator, W as TopicValidator, Un as UgcCountResponseValidator, Bn as UgcEngagementDataValidator, Gn as UgcLeaderboardResponseValidator, Vn as UgcRecordBaseResponseValidator, Hn as UgcRecordResponseValidator, mt as UgcReviewStatus, ht as UgcReviewStatusValidator, pt as UgcSocialMedia, M as UgcSocialMediaValidator, Wn as UgcUploadImageValidator, z as UserEngagementDataValidator, tr as UserEngagementValidator, rr as UserFeatureStatusValidator, R as UserRewardValidator, nr as VerifyMobileResultValidator, Jn as Vote2ClaimRewardsResponseValidator, qn as Vote2EngagementDataValidator, dt as Vote2RewardType, ft as Vote2RewardTypeValidator, Kn as VoteEngagementDataValidator, Xe as VoteOptionSource, Ze as VoteOptionSourceValidator, ca as WeixinApi, Fn as WeixinSubscribeEngagementDataValidator, oa as WeixinWebLoginErrorCode, Zn as ZeroChatGPTDataValidator, Xr as claimRewards, si as claimRewardsV2, ci as claimWeixinHongbao, Yr as engage, vi as generateReferralRewards, ei as generateUnlimitQrcode, ii as getCashbackQuery, Vr as getConfig, Wr as getEngagements, Ur as getEngagementsCount, Hr as getEngagementsUserCount, $r as getParamsByQrcodeScene, ti as getQuestProgress, _i as getRedeemItemStocks, gi as getUgcLeaderboard, oi as getUgcMyCount, mi as getUgcRecommendation, ai as getUgcRecord, hi as getUgcs, Qr as getUnlimitQrcodeScene, qr as getUserEngagementCount, Jr as getUserEngagements, Kr as getUserFeatureStatus, fi as getUserItemCount, ui as getUserRewards, di as getUserRewardsCount, ri as getVote2Leaderboard, aa as isWeixinSignResponse, Zr as submitUserRewardAddress, pi as ugcUploadImage, li as verifyActivationKey, Br as verifyMobileAllowed, Gr as visit, ni as vote2Rewards };
1962
+ export { G as AntispamValidator, se as AuthToken, Yn as CandidateVoteValidator, I as CashbackEngagementDataValidator, _n as ClaimActivationKeyEngagementDataValidator, Ze as ClaimRewardStatus, k as ClaimRewardStatusValidator, ar as ClaimedItemValidator, h as ClubAddressValidator, Ve as ClubApi, g as ClubBenefitSummaryValidator, Te as ClubBenefitValidator, fe as ClubCreditChangeScene, pe as ClubCreditChangeSceneValidator, ue as ClubCreditChangeType, de as ClubCreditChangeTypeValidator, we as ClubCreditLogValidator, _e as ClubGlobalConfigValidator, me as ClubItemType, p as ClubItemTypeValidator, ve as ClubPlayerValidator, _ as ClubProductValidator, he as ClubRedemptionStatus, ge as ClubRedemptionStatusValidator, Ce as ClubUserCreditValidator, Se as ClubUserProfileValidator, Qn as CommentEngagementValidator, q as CommentValidator, ra as CommunityApi, Xn as ConversationValidator, w as EngageAccountType, We as EngageAccountTypeValidator, ir as EngageResponseValidator, er as EngageRewardValidator, He as EventApi, fr as EventConfigValidator, yt as EventFeatureConfigOfCashbackValidator, xt as EventFeatureConfigOfCheckInValidator, Ct as EventFeatureConfigOfClaimActivationKeyValidator, Tt as EventFeatureConfigOfClaimRewardsValidator, Dt as EventFeatureConfigOfCommentValidator, kt as EventFeatureConfigOfFollowValidator, Mt as EventFeatureConfigOfGiftCodeValidator, Pt as EventFeatureConfigOfInviteValidator, It as EventFeatureConfigOfInvitedRegisterValidator, Ht as EventFeatureConfigOfLotteryDrawValidator, Bt as EventFeatureConfigOfLotteryValidator, Wt as EventFeatureConfigOfPreregisterValidator, Kt as EventFeatureConfigOfQuestValidator, Yt as EventFeatureConfigOfRedeemValidator, Qt as EventFeatureConfigOfReferralValidator, en as EventFeatureConfigOfRegisterValidator, nn as EventFeatureConfigOfShareValidator, an as EventFeatureConfigOfSubscribeValidator, sn as EventFeatureConfigOfSurveyValidator, ln as EventFeatureConfigOfTeamValidator, pn as EventFeatureConfigOfUgcLikeValidator, dn as EventFeatureConfigOfUgcValidator, cr as EventFeatureConfigOfVote2Validator, gn as EventFeatureConfigOfVoteValidator, dr as EventFeatureConfigValidator, Ge as EventPeriodType, Ke as EventPeriodTypeValidator, N as EventRewardItemConfigValidator, Oe as ExtraGameRewardValidator, De as ExtraPhysicalShipmentValidator, Jt as FeatureRedeemItemConfigValidator, Zt as FeatureReferralTierItemValidator, _t as FeatureRewardValidator, T as FeatureType, qe as FeatureTypeValidator, Ei as ForumMode, Di as ForumModeValidator, H as ForumValidator, xi as GGDCareerCampType, Si as GGDCareerCampTypeValidator, Ci as GGDPlayerStatus, wi as GGDPlayerStatusValidator, Ti as GGDPublicApi, yi as GGDRoomStatus, bi as GGDRoomStatusValidator, x as GamerItemType, S as GamerItemTypeValidator, ce as Gender, le as GenderValidator, Nn as GenerateReferralRewardsResponseValidator, vn as GiftCodeEngagementDataValidator, yn as InviteEngagementDataValidator, ot as LotteryDrawAction, st as LotteryDrawActionValidator, Cn as LotteryDrawEngagementDataValidator, bn as LotteryEngagementDataValidator, j as LotteryTicketStatus, tt as LotteryTicketStatusValidator, J as NotificationBaseValidator, ki as NotificationCategory, Ai as NotificationCategoryValidator, Ri as NotificationCommentReplyValidator, zi as NotificationCommentValidator, X as NotificationPayloadCommentValidator, Y as NotificationPayloadPostValidator, Z as NotificationPayloadReplyValidator, Pi as NotificationPayloadSystemValidator, Li as NotificationPostCommentValidator, Ii as NotificationPostValidator, Q as NotificationReplyRepliedValidator, Bi as NotificationReplyValidator, Fi as NotificationSystemValidator, V as NotificationType, ji as NotificationTypeValidator, Vi as NotificationValidator, xe as PlayerRoleCardValidator, m as PlayerRoleValidator, Oi as PostStatus, B as PostStatusValidator, W as PostValidator, wn as PreregisterEngagementDataValidator, Ni as PresignedUrlResponseValidator, En as QuestEngagementDataValidator, Je as QuestObjective, E as QuestObjectiveValidator, ct as QuestProgressAlgorithm, lt as QuestProgressAlgorithmValidator, Dn as QuestProgressValidator, On as RedeemEngagementDataValidator, Ee as RedeemParamsValidator, kn as RedeemStocksResponseValidator, ke as RedemptionValidator, it as ReferralAction, at as ReferralActionValidator, jn as ReferralEngagementDataValidator, An as ReferralInviteValidator, gt as RegularRewardValidator, Mi as ReplyToValidator, K as ReplyValidator, Ue as RewardItemType, C as RewardItemTypeValidator, Qe as RewardSource, A as RewardSourceValidator, D as RewardStatus, O as RewardStatusValidator, $n as RewardValidator, be as RoleBaseInfoValidator, ye as ServerBaseInfoValidator, Pn as ShareEngagementDataValidator, In as SurveyEngagementDataValidator, nt as TeamAction, rt as TeamActionValidator, zn as TeamEngagementDataValidator, Ln as TeamEngagementValidator, Rn as TeamMemberValidator, $e as TeamVisibility, et as TeamVisibilityValidator, Mn as TierStatusValidator, U as TopicValidator, Un as UgcCountResponseValidator, Bn as UgcEngagementDataValidator, Gn as UgcLeaderboardResponseValidator, Vn as UgcRecordBaseResponseValidator, Hn as UgcRecordResponseValidator, pt as UgcReviewStatus, mt as UgcReviewStatusValidator, ft as UgcSocialMedia, M as UgcSocialMediaValidator, Wn as UgcUploadImageValidator, R as UserEngagementDataValidator, tr as UserEngagementValidator, rr as UserFeatureStatusValidator, L as UserRewardValidator, nr as VerifyMobileResultValidator, Jn as Vote2ClaimRewardsResponseValidator, qn as Vote2EngagementDataValidator, ut as Vote2RewardType, dt as Vote2RewardTypeValidator, Kn as VoteEngagementDataValidator, Ye as VoteOptionSource, Xe as VoteOptionSourceValidator, sa as WeixinApi, Fn as WeixinSubscribeEngagementDataValidator, aa as WeixinWebLoginErrorCode, Zn as ZeroChatGPTDataValidator, Xr as claimRewards, si as claimRewardsV2, ci as claimWeixinHongbao, Yr as engage, vi as generateReferralRewards, ei as generateUnlimitQrcode, ii as getCashbackQuery, Vr as getConfig, Wr as getEngagements, Ur as getEngagementsCount, Hr as getEngagementsUserCount, $r as getParamsByQrcodeScene, ti as getQuestProgress, _i as getRedeemItemStocks, gi as getUgcLeaderboard, oi as getUgcMyCount, mi as getUgcRecommendation, ai as getUgcRecord, hi as getUgcs, Qr as getUnlimitQrcodeScene, qr as getUserEngagementCount, Jr as getUserEngagements, Kr as getUserFeatureStatus, fi as getUserItemCount, ui as getUserRewards, di as getUserRewardsCount, ri as getVote2Leaderboard, ia as isWeixinSignResponse, Zr as submitUserRewardAddress, pi as ugcUploadImage, li as verifyActivationKey, Br as verifyMobileAllowed, Gr as visit, ni as vote2Rewards };