@seayoo-web/gamer-api 2.16.0 → 2.16.1
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 +753 -786
- package/package.json +6 -6
- package/types/src/token.d.ts +1 -1
- package/types/src/utils.d.ts +0 -7
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { isComboWebView as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
import { v as e, objectGuard as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { isComboWebView as me } from "@seayoo-web/combo-webview";
|
|
2
|
+
import { isPlainObject as y, usePromise as de, useConsole as ge, weixinStorageHelper as pe, localStorageHelper as _e, supportWx as f, pruneURL as be, supportWindow as ye, queryString as L, pruneObject as c, omitFields as U, parseJSON as he, removePara as G } from "@seayoo-web/utils";
|
|
3
|
+
import { v as e, objectGuard as i } from "@seayoo-web/validator";
|
|
4
|
+
function fe(s) {
|
|
5
|
+
return y(s, "gamer_token") && typeof s.gamer_token == "string";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function we(s) {
|
|
8
|
+
return y(s, "gamer_token", "game_id") && typeof s.gamer_token == "string" && typeof s.game_id == "string";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
function O(s) {
|
|
11
|
+
return y(s);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
return /^\/[a-z\d-]+$/.test(
|
|
13
|
+
ge("GamerApiSDK");
|
|
14
|
+
function ke(s) {
|
|
15
|
+
return /^\/[a-z\d-]+$/.test(s);
|
|
16
16
|
}
|
|
17
|
-
async function
|
|
18
|
-
const { promise:
|
|
17
|
+
async function ve() {
|
|
18
|
+
const { promise: s, resolve: t } = de();
|
|
19
19
|
return wx.login({
|
|
20
20
|
success(n) {
|
|
21
21
|
t(n.code);
|
|
@@ -23,43 +23,10 @@ async function ke() {
|
|
|
23
23
|
fail() {
|
|
24
24
|
t("");
|
|
25
25
|
}
|
|
26
|
-
}), await
|
|
26
|
+
}), await s;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
return localStorage.getItem(i) || "";
|
|
31
|
-
},
|
|
32
|
-
set(i, t) {
|
|
33
|
-
localStorage.setItem(i, t);
|
|
34
|
-
},
|
|
35
|
-
remove(i) {
|
|
36
|
-
localStorage.removeItem(i);
|
|
37
|
-
}
|
|
38
|
-
}, Re = {
|
|
39
|
-
get(i) {
|
|
40
|
-
try {
|
|
41
|
-
if (p()) return wx.getStorageSync(i) || "";
|
|
42
|
-
} catch (t) {
|
|
43
|
-
j.error("getStorageSyncError", t);
|
|
44
|
-
}
|
|
45
|
-
return "";
|
|
46
|
-
},
|
|
47
|
-
set(i, t) {
|
|
48
|
-
try {
|
|
49
|
-
p() && wx.setStorageSync(i, t);
|
|
50
|
-
} catch (n) {
|
|
51
|
-
j.error("setStorageSyncError", n);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
remove(i) {
|
|
55
|
-
try {
|
|
56
|
-
p() && wx.removeStorageSync(i);
|
|
57
|
-
} catch (t) {
|
|
58
|
-
j.error("removeStorageSync", t);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, f = "gamer_token";
|
|
62
|
-
class ya {
|
|
28
|
+
const h = "gamer_token";
|
|
29
|
+
class br {
|
|
63
30
|
$NetRequest;
|
|
64
31
|
$idToken = "";
|
|
65
32
|
$weixinToken = "";
|
|
@@ -67,15 +34,15 @@ class ya {
|
|
|
67
34
|
req;
|
|
68
35
|
storage;
|
|
69
36
|
constructor(t, n) {
|
|
70
|
-
this.storage =
|
|
71
|
-
const
|
|
37
|
+
this.storage = f() ? pe : _e;
|
|
38
|
+
const a = ke(t) ? t : `https://${be(t)}`;
|
|
72
39
|
if (this.$NetRequest = n, this.req = n({
|
|
73
|
-
baseURL: `${
|
|
40
|
+
baseURL: `${a}/v1`,
|
|
74
41
|
timeout: 1e4,
|
|
75
42
|
maxRetry: 2,
|
|
76
43
|
retryInterval: "2EB",
|
|
77
|
-
retryResolve({ method:
|
|
78
|
-
return
|
|
44
|
+
retryResolve({ method: r, status: o }) {
|
|
45
|
+
return r === "GET" && o < 0;
|
|
79
46
|
},
|
|
80
47
|
responseRule: {
|
|
81
48
|
ok: { resolve: "body" },
|
|
@@ -86,12 +53,12 @@ class ya {
|
|
|
86
53
|
}
|
|
87
54
|
},
|
|
88
55
|
// 使用箭头函数绑定执行上下文
|
|
89
|
-
requestTransformer: (
|
|
90
|
-
this.$gamerToken && (
|
|
56
|
+
requestTransformer: (r) => {
|
|
57
|
+
this.$gamerToken && (r.headers.Authorization = `Bearer ${this.$gamerToken}`);
|
|
91
58
|
}
|
|
92
|
-
}),
|
|
93
|
-
const
|
|
94
|
-
(
|
|
59
|
+
}), ye()) {
|
|
60
|
+
const r = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = L("gamer_token");
|
|
61
|
+
(me() || r && o) && (this.$gamerToken = o);
|
|
95
62
|
}
|
|
96
63
|
this.$gamerToken || this.loadGamerTokenCache();
|
|
97
64
|
}
|
|
@@ -99,15 +66,15 @@ class ya {
|
|
|
99
66
|
return this.$NetRequest;
|
|
100
67
|
}
|
|
101
68
|
loadGamerTokenCache() {
|
|
102
|
-
const n = this.storage.get(
|
|
69
|
+
const n = this.storage.get(h).match(/^(\d{12,})#(.{8,})$/);
|
|
103
70
|
if (n) {
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
this.$gamerToken =
|
|
71
|
+
const a = parseInt(n[1]), r = n[2];
|
|
72
|
+
if (a > Date.now() - (24 * 3600 - 10) * 1e3) {
|
|
73
|
+
this.$gamerToken = r;
|
|
107
74
|
return;
|
|
108
75
|
}
|
|
109
76
|
}
|
|
110
|
-
this.storage.remove(
|
|
77
|
+
this.storage.remove(h);
|
|
111
78
|
}
|
|
112
79
|
/** 当前是否为登录状态,即是否拥有 gamerToken */
|
|
113
80
|
get isLoggedIn() {
|
|
@@ -141,7 +108,7 @@ class ya {
|
|
|
141
108
|
* 直接写入 Gamer Token,并更新缓存
|
|
142
109
|
*/
|
|
143
110
|
set gamerToken(t) {
|
|
144
|
-
this.$gamerToken = t, t ? this.storage.set(
|
|
111
|
+
this.$gamerToken = t, t ? this.storage.set(h, `${Date.now()}#${t}`) : this.storage.remove(h);
|
|
145
112
|
}
|
|
146
113
|
/**
|
|
147
114
|
* 退出登录,销毁相关 Token
|
|
@@ -168,13 +135,13 @@ class ya {
|
|
|
168
135
|
async autoLogin() {
|
|
169
136
|
if (this.gamerToken)
|
|
170
137
|
return !0;
|
|
171
|
-
const t =
|
|
138
|
+
const t = f();
|
|
172
139
|
if (!this.idToken || t && !this.weixinToken)
|
|
173
140
|
return !1;
|
|
174
|
-
const { code: n, data:
|
|
141
|
+
const { code: n, data: a } = await this.req.post(
|
|
175
142
|
"login-with-token",
|
|
176
143
|
c({ id_token: this.idToken, weixin_token: t ? this.weixinToken : null }),
|
|
177
|
-
|
|
144
|
+
fe,
|
|
178
145
|
{
|
|
179
146
|
message: !1,
|
|
180
147
|
cacheTTL: 300,
|
|
@@ -189,7 +156,7 @@ class ya {
|
|
|
189
156
|
this.weixinToken = "";
|
|
190
157
|
break;
|
|
191
158
|
}
|
|
192
|
-
return this.gamerToken =
|
|
159
|
+
return this.gamerToken = a?.gamer_token || "", !!this.gamerToken;
|
|
193
160
|
}
|
|
194
161
|
/**
|
|
195
162
|
* 用于在多租户小程序环境中切换当前 Session 的 game_id。
|
|
@@ -197,19 +164,19 @@ class ya {
|
|
|
197
164
|
* https://www.kdocs.cn/l/cf2mO2uRLqh9?linkname=ifQTBNrckh
|
|
198
165
|
*/
|
|
199
166
|
async switchGame(t) {
|
|
200
|
-
const n =
|
|
167
|
+
const n = f();
|
|
201
168
|
if (!this.idToken || n && !this.weixinToken)
|
|
202
169
|
return !1;
|
|
203
|
-
const { code:
|
|
170
|
+
const { code: a, data: r } = await this.req.post(
|
|
204
171
|
"session/switch-game",
|
|
205
172
|
c({ game_id: t }),
|
|
206
|
-
|
|
173
|
+
we,
|
|
207
174
|
{
|
|
208
175
|
message: !1,
|
|
209
176
|
maxRetry: 2
|
|
210
177
|
}
|
|
211
178
|
);
|
|
212
|
-
return
|
|
179
|
+
return a === "game_not_allowed" ? !1 : (this.gamerToken = r?.gamer_token || "", !!this.gamerToken);
|
|
213
180
|
}
|
|
214
181
|
/**
|
|
215
182
|
* 获取当前登录用户的 Session 的信息
|
|
@@ -220,7 +187,7 @@ class ya {
|
|
|
220
187
|
*/
|
|
221
188
|
async getSession() {
|
|
222
189
|
if (!await this.autoLogin()) return null;
|
|
223
|
-
const { data: t } = await this.req.get("session",
|
|
190
|
+
const { data: t } = await this.req.get("session", O, {
|
|
224
191
|
message: !1
|
|
225
192
|
});
|
|
226
193
|
return t;
|
|
@@ -232,25 +199,25 @@ class ya {
|
|
|
232
199
|
*/
|
|
233
200
|
async authRealName(t) {
|
|
234
201
|
if (!await this.autoLogin()) return null;
|
|
235
|
-
const { data: n } = await this.req.post("auth-real-name", c(t),
|
|
202
|
+
const { data: n } = await this.req.post("auth-real-name", c(t), O);
|
|
236
203
|
return n;
|
|
237
204
|
}
|
|
238
205
|
}
|
|
239
|
-
const
|
|
206
|
+
const Re = {
|
|
240
207
|
/** 未知 */
|
|
241
208
|
Unknown: "unknown",
|
|
242
209
|
/** 男 */
|
|
243
210
|
Male: "male",
|
|
244
211
|
/** 女 */
|
|
245
212
|
Female: "female"
|
|
246
|
-
},
|
|
213
|
+
}, Ce = e.string().enum(Re).lock(), Ve = {
|
|
247
214
|
/** 积分增加 */
|
|
248
215
|
Increase: "increase",
|
|
249
216
|
/** 积分减少 */
|
|
250
217
|
Decrease: "decrease",
|
|
251
218
|
/** 积分过期 */
|
|
252
219
|
Expired: "expired"
|
|
253
|
-
},
|
|
220
|
+
}, je = e.string().enum(Ve).lock(), Te = {
|
|
254
221
|
/** 游戏内购买 */
|
|
255
222
|
Order: "order",
|
|
256
223
|
/** 游戏内消耗 */
|
|
@@ -263,21 +230,21 @@ const Ce = {
|
|
|
263
230
|
Admin: "admin",
|
|
264
231
|
/** 运营活动 */
|
|
265
232
|
Event: "event"
|
|
266
|
-
},
|
|
233
|
+
}, qe = e.string().enum(Te).lock(), xe = {
|
|
267
234
|
/** 游戏内奖励 */
|
|
268
235
|
GameReward: "game_reward",
|
|
269
236
|
/** 实物商品 */
|
|
270
237
|
Physical: "physical",
|
|
271
238
|
/** 虚拟商品 */
|
|
272
239
|
Virtual: "virtual"
|
|
273
|
-
},
|
|
240
|
+
}, z = e.string().enum(xe).lock(), Le = {
|
|
274
241
|
/** 待发放 */
|
|
275
242
|
Pending: "pending",
|
|
276
243
|
/** 已发放 */
|
|
277
244
|
Issued: "issued",
|
|
278
245
|
/** 发放失败 */
|
|
279
246
|
Failed: "failed"
|
|
280
|
-
}, Ue = e.string().enum(
|
|
247
|
+
}, Ue = e.string().enum(Le).lock(), Pe = e.object({
|
|
281
248
|
default_avatar_url: e.string(),
|
|
282
249
|
official_avatar_urls: e.array(e.string()),
|
|
283
250
|
default_nickname: e.string(),
|
|
@@ -295,7 +262,7 @@ const Ce = {
|
|
|
295
262
|
exp_description: e.string(),
|
|
296
263
|
credit_description: e.string(),
|
|
297
264
|
send_role_mail_rate_limit: e.number()
|
|
298
|
-
}).lock(),
|
|
265
|
+
}).lock(), Se = e.object({
|
|
299
266
|
member_id: e.string(),
|
|
300
267
|
player_id: e.string(),
|
|
301
268
|
exp: e.number(),
|
|
@@ -304,19 +271,19 @@ const Ce = {
|
|
|
304
271
|
credit_expiring: e.number(),
|
|
305
272
|
level_change_time: e.number(),
|
|
306
273
|
level_expire_time: e.number()
|
|
307
|
-
}).lock(),
|
|
274
|
+
}).lock(), Ee = e.object({
|
|
308
275
|
server_id: e.string(),
|
|
309
276
|
server_name: e.string()
|
|
310
|
-
}).lock(),
|
|
277
|
+
}).lock(), $e = e.object({
|
|
311
278
|
role_id: e.string(),
|
|
312
279
|
role_name: e.string()
|
|
313
|
-
}).lock(),
|
|
314
|
-
...Fe.shape,
|
|
280
|
+
}).lock(), J = e.object({
|
|
315
281
|
...$e.shape,
|
|
282
|
+
...Ee.shape,
|
|
316
283
|
role_level: e.number(),
|
|
317
284
|
last_login_time: e.number()
|
|
318
|
-
}).lock(),
|
|
319
|
-
...
|
|
285
|
+
}).lock(), Fe = e.object({
|
|
286
|
+
...J.shape,
|
|
320
287
|
/** 角色战力 */
|
|
321
288
|
role_fighting: e.number(),
|
|
322
289
|
/** 宗门 ID */
|
|
@@ -325,11 +292,11 @@ const Ce = {
|
|
|
325
292
|
kin_name: e.string().optional(),
|
|
326
293
|
/** 宗门职位 */
|
|
327
294
|
kin_position: e.string().optional()
|
|
328
|
-
}).lock(),
|
|
295
|
+
}).lock(), Ie = e.object({
|
|
329
296
|
name: e.string(),
|
|
330
297
|
avatar_url: e.string(),
|
|
331
298
|
bio: e.string(),
|
|
332
|
-
gender:
|
|
299
|
+
gender: Ce,
|
|
333
300
|
birthday: e.object({ year: e.number(), month: e.number(), day: e.number() }),
|
|
334
301
|
social_medias: e.record(
|
|
335
302
|
e.object({
|
|
@@ -337,7 +304,7 @@ const Ce = {
|
|
|
337
304
|
homepage_image_url: e.string()
|
|
338
305
|
}).optional()
|
|
339
306
|
).optional()
|
|
340
|
-
}).lock(),
|
|
307
|
+
}).lock(), Z = e.object({
|
|
341
308
|
address_id: e.number(),
|
|
342
309
|
recipient: e.string(),
|
|
343
310
|
mobile: e.string(),
|
|
@@ -346,20 +313,20 @@ const Ce = {
|
|
|
346
313
|
district: e.string(),
|
|
347
314
|
address: e.string(),
|
|
348
315
|
is_default: e.bool()
|
|
349
|
-
}).lock(),
|
|
316
|
+
}).lock(), De = e.object({
|
|
350
317
|
increased_credit: e.number(),
|
|
351
318
|
decreased_credit: e.number(),
|
|
352
319
|
expired_credit: e.number(),
|
|
353
320
|
balance_credit: e.number()
|
|
354
|
-
}).lock(),
|
|
321
|
+
}).lock(), Ae = e.object({
|
|
355
322
|
id: e.number(),
|
|
356
|
-
change_type:
|
|
357
|
-
change_scene:
|
|
323
|
+
change_type: je,
|
|
324
|
+
change_scene: qe,
|
|
358
325
|
change_credit: e.number(),
|
|
359
326
|
balance: e.number(),
|
|
360
327
|
change_time: e.number(),
|
|
361
328
|
metadata: e.record(e.unknown()).optional()
|
|
362
|
-
}).lock(),
|
|
329
|
+
}).lock(), X = e.object({
|
|
363
330
|
benefit_id: e.number(),
|
|
364
331
|
name: e.string(),
|
|
365
332
|
img_url: e.string(),
|
|
@@ -368,11 +335,11 @@ const Ce = {
|
|
|
368
335
|
max_level: e.number(),
|
|
369
336
|
product_id: e.number(),
|
|
370
337
|
tag: e.string()
|
|
371
|
-
}).lock(),
|
|
338
|
+
}).lock(), Y = e.object({
|
|
372
339
|
product_id: e.number(),
|
|
373
340
|
catalog_id: e.number(),
|
|
374
341
|
catalog_name: e.string(),
|
|
375
|
-
item_type:
|
|
342
|
+
item_type: z,
|
|
376
343
|
name: e.string(),
|
|
377
344
|
img_url: e.string(),
|
|
378
345
|
description: e.string(),
|
|
@@ -394,10 +361,10 @@ const Ce = {
|
|
|
394
361
|
created_at: e.number(),
|
|
395
362
|
updated_at: e.number(),
|
|
396
363
|
redeemable_quantity: e.number().optional()
|
|
397
|
-
}).lock(),
|
|
398
|
-
...U(
|
|
399
|
-
product:
|
|
400
|
-
}).lock(),
|
|
364
|
+
}).lock(), Ge = e.object({
|
|
365
|
+
...U(X.shape, "tag"),
|
|
366
|
+
product: Y.clone().optional()
|
|
367
|
+
}).lock(), yr = e.union(
|
|
401
368
|
e.object({
|
|
402
369
|
server_id: e.string(),
|
|
403
370
|
role_id: e.string()
|
|
@@ -405,7 +372,7 @@ const Ce = {
|
|
|
405
372
|
e.object({
|
|
406
373
|
address_id: e.number()
|
|
407
374
|
})
|
|
408
|
-
).satisfies().lock(),
|
|
375
|
+
).satisfies().lock(), Oe = e.object({
|
|
409
376
|
recipient: e.string(),
|
|
410
377
|
mobile: e.string(),
|
|
411
378
|
province: e.string(),
|
|
@@ -414,36 +381,36 @@ const Ce = {
|
|
|
414
381
|
address: e.string(),
|
|
415
382
|
express_company: e.string(),
|
|
416
383
|
express_number: e.string()
|
|
417
|
-
}).lock(),
|
|
384
|
+
}).lock(), Ne = e.object({
|
|
418
385
|
server_id: e.string(),
|
|
419
386
|
role_id: e.string(),
|
|
420
387
|
role_name: e.string()
|
|
421
|
-
}).lock(),
|
|
388
|
+
}).lock(), Qe = e.object({
|
|
422
389
|
redemption_id: e.number(),
|
|
423
390
|
player_id: e.string(),
|
|
424
391
|
product_id: e.number(),
|
|
425
392
|
name: e.string(),
|
|
426
393
|
img_url: e.string(),
|
|
427
|
-
item_type:
|
|
394
|
+
item_type: z,
|
|
428
395
|
catalog_id: e.number(),
|
|
429
396
|
catalog_name: e.string(),
|
|
430
397
|
quantity: e.number(),
|
|
431
398
|
amount: e.number(),
|
|
432
399
|
status: Ue,
|
|
433
400
|
created_at: e.number(),
|
|
434
|
-
extra_data: e.union(
|
|
435
|
-
}),
|
|
436
|
-
credit_logs: e.array(
|
|
401
|
+
extra_data: e.union(Oe.clone(), Ne.clone()).satisfies().optional()
|
|
402
|
+
}), Be = e.guard(Pe), N = i({ player: Se }), Me = i({ roles: e.array(J) }), j = i({ role_card: Fe }), Q = e.guard(Ie), B = e.guard(Z), Ke = i({ addresses: e.array(Z) }), He = e.guard(De), ze = i({
|
|
403
|
+
credit_logs: e.array(Ae),
|
|
437
404
|
next_token: e.string().optional()
|
|
438
|
-
}),
|
|
439
|
-
redemptions: e.array(
|
|
405
|
+
}), Je = i({ products: e.array(Y) }), Ze = i({ benefits: e.array(X) }), Xe = i({ benefit: Ge }), Ye = i({
|
|
406
|
+
redemptions: e.array(Qe),
|
|
440
407
|
next_token: e.string().optional()
|
|
441
|
-
}),
|
|
408
|
+
}), We = i({
|
|
442
409
|
existed: e.bool(),
|
|
443
410
|
image_upload_url: e.string().optional(),
|
|
444
411
|
image_id: e.string()
|
|
445
412
|
});
|
|
446
|
-
class
|
|
413
|
+
class hr {
|
|
447
414
|
token;
|
|
448
415
|
req;
|
|
449
416
|
constructor(t) {
|
|
@@ -456,7 +423,7 @@ class fa {
|
|
|
456
423
|
*/
|
|
457
424
|
async getConfig(t) {
|
|
458
425
|
await this.token.autoLogin();
|
|
459
|
-
const { data: n } = await this.req.get("club/config",
|
|
426
|
+
const { data: n } = await this.req.get("club/config", Be, t);
|
|
460
427
|
return n;
|
|
461
428
|
}
|
|
462
429
|
/**
|
|
@@ -466,10 +433,10 @@ class fa {
|
|
|
466
433
|
*/
|
|
467
434
|
async getCurrentPlayer(t) {
|
|
468
435
|
await this.token.autoLogin();
|
|
469
|
-
const { data: n, code:
|
|
436
|
+
const { data: n, code: a, message: r } = await this.req.get("club/current-player", N, t);
|
|
470
437
|
return n?.player ?? {
|
|
471
|
-
message:
|
|
472
|
-
error:
|
|
438
|
+
message: r,
|
|
439
|
+
error: a
|
|
473
440
|
};
|
|
474
441
|
}
|
|
475
442
|
/**
|
|
@@ -479,15 +446,15 @@ class fa {
|
|
|
479
446
|
*/
|
|
480
447
|
async linkPlayer(t) {
|
|
481
448
|
await this.token.autoLogin();
|
|
482
|
-
const { data: n, code:
|
|
449
|
+
const { data: n, code: a, message: r } = await this.req.post(
|
|
483
450
|
"club/link-player",
|
|
484
451
|
{ id_token: this.token.idToken },
|
|
485
|
-
|
|
452
|
+
N,
|
|
486
453
|
t
|
|
487
454
|
);
|
|
488
455
|
return n?.player ?? {
|
|
489
|
-
message:
|
|
490
|
-
error:
|
|
456
|
+
message: r,
|
|
457
|
+
error: a
|
|
491
458
|
};
|
|
492
459
|
}
|
|
493
460
|
/**
|
|
@@ -495,13 +462,13 @@ class fa {
|
|
|
495
462
|
*
|
|
496
463
|
* https://kdocs.cn/l/cgp4gSBMbOf1?linkname=nwu4FiGM9V
|
|
497
464
|
*/
|
|
498
|
-
async getRoles(t, n,
|
|
465
|
+
async getRoles(t, n, a) {
|
|
499
466
|
if (!await this.token.autoLogin()) return [];
|
|
500
|
-
const { data:
|
|
501
|
-
...
|
|
467
|
+
const { data: r } = await this.req.get("club/roles", Me, {
|
|
468
|
+
...a,
|
|
502
469
|
params: c({ player_id: t, refresh: n })
|
|
503
470
|
});
|
|
504
|
-
return
|
|
471
|
+
return r?.roles || [];
|
|
505
472
|
}
|
|
506
473
|
/**
|
|
507
474
|
* 获取俱乐部会员的角色卡片数据
|
|
@@ -510,11 +477,11 @@ class fa {
|
|
|
510
477
|
*/
|
|
511
478
|
async getRoleCard(t, n) {
|
|
512
479
|
await this.token.autoLogin();
|
|
513
|
-
const { data:
|
|
480
|
+
const { data: a } = await this.req.get("club/role-card", j, {
|
|
514
481
|
...n,
|
|
515
482
|
params: { member_id: t }
|
|
516
483
|
});
|
|
517
|
-
return
|
|
484
|
+
return a?.role_card ?? null;
|
|
518
485
|
}
|
|
519
486
|
/**
|
|
520
487
|
* 设置自己的角色卡片
|
|
@@ -523,8 +490,8 @@ class fa {
|
|
|
523
490
|
*/
|
|
524
491
|
async setRoleCard(t, n) {
|
|
525
492
|
if (!await this.token.autoLogin()) return null;
|
|
526
|
-
const { data:
|
|
527
|
-
return
|
|
493
|
+
const { data: a } = await this.req.post("club/role-card", t, j, n);
|
|
494
|
+
return a?.role_card ?? null;
|
|
528
495
|
}
|
|
529
496
|
/**
|
|
530
497
|
* 强制刷新自己的角色卡片,从游戏内获取最新数据
|
|
@@ -533,7 +500,7 @@ class fa {
|
|
|
533
500
|
*/
|
|
534
501
|
async refreshRoleCard(t) {
|
|
535
502
|
if (!await this.token.autoLogin()) return null;
|
|
536
|
-
const { data: n } = await this.req.post("club/refresh-role-card", {},
|
|
503
|
+
const { data: n } = await this.req.post("club/refresh-role-card", {}, j, t);
|
|
537
504
|
return n?.role_card ?? null;
|
|
538
505
|
}
|
|
539
506
|
/**
|
|
@@ -543,11 +510,11 @@ class fa {
|
|
|
543
510
|
*/
|
|
544
511
|
async getUserProfile(t, n) {
|
|
545
512
|
await this.token.autoLogin();
|
|
546
|
-
const { data:
|
|
513
|
+
const { data: a } = await this.req.get("club/user-profile", Q, {
|
|
547
514
|
...n,
|
|
548
515
|
params: { member_id: t }
|
|
549
516
|
});
|
|
550
|
-
return
|
|
517
|
+
return a;
|
|
551
518
|
}
|
|
552
519
|
/**
|
|
553
520
|
* 修改自己的俱乐部用户信息
|
|
@@ -558,10 +525,10 @@ class fa {
|
|
|
558
525
|
if (Object.keys(t).length === 0)
|
|
559
526
|
return { error: "OptionIsEmpty", message: "请提供需要修改的信息" };
|
|
560
527
|
await this.token.autoLogin();
|
|
561
|
-
const { data:
|
|
562
|
-
return
|
|
528
|
+
const { data: a, code: r, message: o } = await this.req.post("club/user-profile", t, Q, n);
|
|
529
|
+
return a ?? {
|
|
563
530
|
message: o,
|
|
564
|
-
error:
|
|
531
|
+
error: r
|
|
565
532
|
};
|
|
566
533
|
}
|
|
567
534
|
/**
|
|
@@ -571,7 +538,7 @@ class fa {
|
|
|
571
538
|
*/
|
|
572
539
|
async getAddresses(t) {
|
|
573
540
|
if (!await this.token.autoLogin()) return [];
|
|
574
|
-
const { data: n } = await this.req.get("club/addresses",
|
|
541
|
+
const { data: n } = await this.req.get("club/addresses", Ke, t);
|
|
575
542
|
return n?.addresses ?? [];
|
|
576
543
|
}
|
|
577
544
|
/**
|
|
@@ -581,15 +548,15 @@ class fa {
|
|
|
581
548
|
*/
|
|
582
549
|
async addAddress(t, n) {
|
|
583
550
|
if (!await this.token.autoLogin()) return null;
|
|
584
|
-
const { data:
|
|
551
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
585
552
|
"/club/add-address",
|
|
586
553
|
c(t),
|
|
587
|
-
|
|
554
|
+
B,
|
|
588
555
|
n
|
|
589
556
|
);
|
|
590
|
-
return
|
|
557
|
+
return a ?? {
|
|
591
558
|
message: o,
|
|
592
|
-
error:
|
|
559
|
+
error: r
|
|
593
560
|
};
|
|
594
561
|
}
|
|
595
562
|
/**
|
|
@@ -599,15 +566,15 @@ class fa {
|
|
|
599
566
|
*/
|
|
600
567
|
async updateAddress(t, n) {
|
|
601
568
|
await this.token.autoLogin();
|
|
602
|
-
const { data:
|
|
569
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
603
570
|
"club/update-address",
|
|
604
571
|
c(t),
|
|
605
|
-
|
|
572
|
+
B,
|
|
606
573
|
n
|
|
607
574
|
);
|
|
608
|
-
return
|
|
575
|
+
return a ?? {
|
|
609
576
|
message: o,
|
|
610
|
-
error:
|
|
577
|
+
error: r
|
|
611
578
|
};
|
|
612
579
|
}
|
|
613
580
|
/**
|
|
@@ -617,8 +584,8 @@ class fa {
|
|
|
617
584
|
*/
|
|
618
585
|
async deleteAddress(t, n) {
|
|
619
586
|
if (!await this.token.autoLogin()) return null;
|
|
620
|
-
const { ok:
|
|
621
|
-
return
|
|
587
|
+
const { ok: a } = await this.req.post("club/delete-address", { address_id: t }, null, n);
|
|
588
|
+
return a;
|
|
622
589
|
}
|
|
623
590
|
/**
|
|
624
591
|
* 获取俱乐部积分统计信息
|
|
@@ -627,13 +594,13 @@ class fa {
|
|
|
627
594
|
*/
|
|
628
595
|
async getUserCredit(t, n) {
|
|
629
596
|
await this.token.autoLogin();
|
|
630
|
-
const { data:
|
|
597
|
+
const { data: a, code: r, message: o } = await this.req.get("club/user-credit", He, {
|
|
631
598
|
...n,
|
|
632
599
|
params: c(t)
|
|
633
600
|
});
|
|
634
|
-
return
|
|
601
|
+
return a ?? {
|
|
635
602
|
message: o,
|
|
636
|
-
error:
|
|
603
|
+
error: r
|
|
637
604
|
};
|
|
638
605
|
}
|
|
639
606
|
/**
|
|
@@ -643,13 +610,13 @@ class fa {
|
|
|
643
610
|
*/
|
|
644
611
|
async getCreditLogs(t, n) {
|
|
645
612
|
await this.token.autoLogin();
|
|
646
|
-
const { data:
|
|
613
|
+
const { data: a } = await this.req.get("club/credit-logs", ze, {
|
|
647
614
|
...n,
|
|
648
615
|
params: c({ max_results: 20, ...t })
|
|
649
616
|
});
|
|
650
617
|
return {
|
|
651
|
-
credit_logs:
|
|
652
|
-
next_token:
|
|
618
|
+
credit_logs: a?.credit_logs || [],
|
|
619
|
+
next_token: a?.next_token
|
|
653
620
|
};
|
|
654
621
|
}
|
|
655
622
|
/**
|
|
@@ -659,7 +626,7 @@ class fa {
|
|
|
659
626
|
*/
|
|
660
627
|
async getBenefits(t) {
|
|
661
628
|
if (!await this.token.autoLogin()) return [];
|
|
662
|
-
const { data: n } = await this.req.get("club/benefits",
|
|
629
|
+
const { data: n } = await this.req.get("club/benefits", Ze, t);
|
|
663
630
|
return n?.benefits || [];
|
|
664
631
|
}
|
|
665
632
|
/**
|
|
@@ -669,11 +636,11 @@ class fa {
|
|
|
669
636
|
*/
|
|
670
637
|
async getBenefit(t, n) {
|
|
671
638
|
if (!await this.token.autoLogin()) return null;
|
|
672
|
-
const { data:
|
|
639
|
+
const { data: a } = await this.req.get("club/benefit", Xe, {
|
|
673
640
|
...n,
|
|
674
641
|
params: { benefit_id: t }
|
|
675
642
|
});
|
|
676
|
-
return
|
|
643
|
+
return a?.benefit || null;
|
|
677
644
|
}
|
|
678
645
|
/**
|
|
679
646
|
* 获取商城商品列表
|
|
@@ -682,11 +649,11 @@ class fa {
|
|
|
682
649
|
*/
|
|
683
650
|
async getProducts(t, n) {
|
|
684
651
|
await this.token.autoLogin();
|
|
685
|
-
const { data:
|
|
652
|
+
const { data: a } = await this.req.get("club/products", Je, {
|
|
686
653
|
...n,
|
|
687
654
|
params: t
|
|
688
655
|
});
|
|
689
|
-
return
|
|
656
|
+
return a?.products || [];
|
|
690
657
|
}
|
|
691
658
|
/**
|
|
692
659
|
* 兑换商城商品
|
|
@@ -695,10 +662,10 @@ class fa {
|
|
|
695
662
|
*/
|
|
696
663
|
async redeemProduct(t, n) {
|
|
697
664
|
await this.token.autoLogin();
|
|
698
|
-
const { ok:
|
|
699
|
-
return
|
|
665
|
+
const { ok: a, code: r, message: o } = await this.req.post("club/redeem-product", c(t), null, n);
|
|
666
|
+
return a || {
|
|
700
667
|
message: o,
|
|
701
|
-
error:
|
|
668
|
+
error: r
|
|
702
669
|
};
|
|
703
670
|
}
|
|
704
671
|
/**
|
|
@@ -708,13 +675,13 @@ class fa {
|
|
|
708
675
|
*/
|
|
709
676
|
async getRedemptions(t, n) {
|
|
710
677
|
await this.token.autoLogin();
|
|
711
|
-
const { data:
|
|
678
|
+
const { data: a } = await this.req.get("club/redemptions", Ye, {
|
|
712
679
|
...n,
|
|
713
680
|
params: c({ max_results: 20, ...t })
|
|
714
681
|
});
|
|
715
682
|
return {
|
|
716
|
-
redemptions:
|
|
717
|
-
next_token:
|
|
683
|
+
redemptions: a?.redemptions || [],
|
|
684
|
+
next_token: a?.next_token
|
|
718
685
|
};
|
|
719
686
|
}
|
|
720
687
|
/**
|
|
@@ -724,15 +691,15 @@ class fa {
|
|
|
724
691
|
*/
|
|
725
692
|
async clubUploadImage(t, n) {
|
|
726
693
|
await this.token.autoLogin();
|
|
727
|
-
const { data:
|
|
694
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
728
695
|
"club/image-upload-url",
|
|
729
696
|
c(t),
|
|
730
|
-
|
|
697
|
+
We,
|
|
731
698
|
n
|
|
732
699
|
);
|
|
733
|
-
return
|
|
700
|
+
return a ?? {
|
|
734
701
|
message: o,
|
|
735
|
-
error:
|
|
702
|
+
error: r
|
|
736
703
|
};
|
|
737
704
|
}
|
|
738
705
|
}
|
|
@@ -759,17 +726,17 @@ const v = {
|
|
|
759
726
|
ExternalCode: "external_gift_code",
|
|
760
727
|
/** 空奖励 */
|
|
761
728
|
VoidItem: "void_item"
|
|
762
|
-
},
|
|
729
|
+
}, W = e.string().enum(v).lock(), fr = v, ee = W, et = {
|
|
763
730
|
/** 世游通行证 ID / Combo ID */
|
|
764
731
|
UserId: "user_id",
|
|
765
732
|
/** 游戏角色 ID */
|
|
766
733
|
RoleId: "role_id"
|
|
767
|
-
},
|
|
734
|
+
}, tt = e.string().enum(et).lock(), nt = {
|
|
768
735
|
None: "none",
|
|
769
736
|
Daily: "daily",
|
|
770
737
|
Weekly: "weekly",
|
|
771
738
|
Monthly: "monthly"
|
|
772
|
-
}, at = e.string().enum(
|
|
739
|
+
}, at = e.string().enum(nt).lock(), u = {
|
|
773
740
|
/** 预约 */
|
|
774
741
|
Preregister: "preregister",
|
|
775
742
|
/** 抽奖 */
|
|
@@ -818,7 +785,7 @@ const v = {
|
|
|
818
785
|
UgcLike: "ugc_like",
|
|
819
786
|
/** 兑换 */
|
|
820
787
|
Redeem: "redeem"
|
|
821
|
-
},
|
|
788
|
+
}, rt = e.string().enum(u).lock(), ot = {
|
|
822
789
|
/** 累计游戏内活跃值 */
|
|
823
790
|
Active: "player_active_points",
|
|
824
791
|
/** 累计登录,单位 人天 */
|
|
@@ -845,14 +812,14 @@ const v = {
|
|
|
845
812
|
OrderAmountInApp: "order_in_app_total_amount",
|
|
846
813
|
/** 支付中心充值金额 */
|
|
847
814
|
OrderAmountInPayCenter: "order_seayoo_web_total_amount"
|
|
848
|
-
},
|
|
815
|
+
}, te = e.string().enum(ot).lock(), it = {
|
|
849
816
|
/** 官方上传 */
|
|
850
817
|
System: "system",
|
|
851
818
|
/** 用户投稿 */
|
|
852
819
|
UserSubmission: "user_submission",
|
|
853
820
|
/** 投票入围 */
|
|
854
821
|
Shortlisted: "shortlisted"
|
|
855
|
-
},
|
|
822
|
+
}, st = e.string().enum(it).lock(), b = {
|
|
856
823
|
/** 未获得奖励 */
|
|
857
824
|
Ineligible: "ineligible",
|
|
858
825
|
/** 奖励未领取 */
|
|
@@ -863,28 +830,28 @@ const v = {
|
|
|
863
830
|
Failed: "failed",
|
|
864
831
|
/** 奖励已发货 */
|
|
865
832
|
Delivered: "delivered"
|
|
866
|
-
},
|
|
833
|
+
}, ne = e.string().enum(b).lock(), ct = {
|
|
867
834
|
/** 未获得奖励 */
|
|
868
|
-
Ineligible:
|
|
835
|
+
Ineligible: b.Ineligible,
|
|
869
836
|
/** 奖励未领取 */
|
|
870
|
-
Unclaimed:
|
|
837
|
+
Unclaimed: b.Unclaimed,
|
|
871
838
|
/** 奖励已领取 */
|
|
872
|
-
Received:
|
|
839
|
+
Received: b.Received,
|
|
873
840
|
/** 奖励发放失败 */
|
|
874
|
-
Failed:
|
|
841
|
+
Failed: b.Failed,
|
|
875
842
|
/** 奖励已发货 */
|
|
876
|
-
Delivered:
|
|
877
|
-
}, P = e.string().enum(
|
|
843
|
+
Delivered: b.Delivered
|
|
844
|
+
}, P = e.string().enum(ct).lock(), ut = {
|
|
878
845
|
/** 玩法产出奖励 */
|
|
879
846
|
Output: "output",
|
|
880
847
|
/** 玩法参与奖励 */
|
|
881
848
|
Engage: "engage"
|
|
882
|
-
},
|
|
849
|
+
}, S = e.string().enum(ut).lock(), lt = {
|
|
883
850
|
/** 私有队伍 */
|
|
884
851
|
Private: "private",
|
|
885
852
|
/** 公开队伍 */
|
|
886
853
|
Public: "public"
|
|
887
|
-
},
|
|
854
|
+
}, mt = e.string().enum(lt).lock(), w = {
|
|
888
855
|
/** 未知状态 */
|
|
889
856
|
Unknown: "unknown",
|
|
890
857
|
/** 等待开奖 */
|
|
@@ -895,7 +862,7 @@ const v = {
|
|
|
895
862
|
Claimed: "claimed",
|
|
896
863
|
/** 领奖失败 */
|
|
897
864
|
Fail: "fail"
|
|
898
|
-
},
|
|
865
|
+
}, wr = e.string().enum(w).lock(), dt = {
|
|
899
866
|
/** 发起组队 */
|
|
900
867
|
Assemble: "assemble",
|
|
901
868
|
/** 加入队伍 */
|
|
@@ -906,26 +873,26 @@ const v = {
|
|
|
906
873
|
ChangeVisibility: "change_visibility",
|
|
907
874
|
/** 查询组队信息 */
|
|
908
875
|
Query: "query"
|
|
909
|
-
},
|
|
876
|
+
}, kr = e.string().enum(dt).lock(), gt = {
|
|
910
877
|
/** 查询抽奖券 */
|
|
911
878
|
Query: "query",
|
|
912
879
|
/** 开奖 */
|
|
913
880
|
Draw: "draw",
|
|
914
881
|
/** 领奖 */
|
|
915
882
|
Claim: "claim"
|
|
916
|
-
},
|
|
883
|
+
}, vr = e.string().enum(gt).lock(), pt = {
|
|
917
884
|
/** 将所有队员的进度值求和,作为队伍进度值 */
|
|
918
885
|
Sum: "sum",
|
|
919
886
|
/** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
|
|
920
887
|
TopN: "top_n"
|
|
921
|
-
},
|
|
888
|
+
}, _t = e.string().enum(pt).lock(), bt = {
|
|
922
889
|
/** 尚未结算 */
|
|
923
890
|
None: "none",
|
|
924
891
|
/** 获胜奖励 */
|
|
925
892
|
Winner: "winner",
|
|
926
893
|
/** 安慰奖励 */
|
|
927
894
|
Consolation: "consolation"
|
|
928
|
-
},
|
|
895
|
+
}, yt = e.string().enum(bt).lock(), ht = {
|
|
929
896
|
/** 抖音 */
|
|
930
897
|
Douyin: "douyin",
|
|
931
898
|
/** 小红书 */
|
|
@@ -940,32 +907,32 @@ const v = {
|
|
|
940
907
|
Huya: "huya",
|
|
941
908
|
/** 斗鱼 */
|
|
942
909
|
Douyu: "douyu"
|
|
943
|
-
},
|
|
910
|
+
}, E = e.string().enum(ht).lock(), ft = {
|
|
944
911
|
/** 已提交 */
|
|
945
912
|
Submitted: "submitted",
|
|
946
913
|
/** 已接收 */
|
|
947
914
|
Accepted: "accepted",
|
|
948
915
|
/** 已拒绝 */
|
|
949
916
|
Rejected: "rejected"
|
|
950
|
-
},
|
|
917
|
+
}, wt = e.string().enum(ft).lock(), kt = e.string().enum(v), p = e.object({
|
|
951
918
|
reward_item_id: e.number(),
|
|
952
919
|
reward_amount: e.number(),
|
|
953
920
|
reward_item_name: e.string(),
|
|
954
921
|
reward_item_icon_url: e.string(),
|
|
955
922
|
reward_item_desc: e.string().optional(),
|
|
956
|
-
reward_item_type:
|
|
923
|
+
reward_item_type: kt,
|
|
957
924
|
reward_item_rating: e.number()
|
|
958
|
-
}).lock(),
|
|
925
|
+
}).lock(), vt = e.object({
|
|
959
926
|
engage_count: e.number(),
|
|
960
|
-
rewards: e.array(
|
|
961
|
-
}).lock(),
|
|
927
|
+
rewards: e.array(p)
|
|
928
|
+
}).lock(), Rt = e.union(
|
|
962
929
|
e.object({
|
|
963
930
|
feature_reward_type: e.string().enum("every"),
|
|
964
|
-
reward_details: e.array(
|
|
931
|
+
reward_details: e.array(p)
|
|
965
932
|
}),
|
|
966
933
|
e.object({
|
|
967
934
|
feature_reward_type: e.string().enum("regular"),
|
|
968
|
-
reward_details: e.array(
|
|
935
|
+
reward_details: e.array(vt)
|
|
969
936
|
})
|
|
970
937
|
).satisfies().lock(), l = e.object({
|
|
971
938
|
feature_name: e.string(),
|
|
@@ -976,37 +943,37 @@ const v = {
|
|
|
976
943
|
limit: e.number(),
|
|
977
944
|
since: e.number(),
|
|
978
945
|
until: e.number(),
|
|
979
|
-
engage_account:
|
|
980
|
-
feature_rewards:
|
|
946
|
+
engage_account: tt,
|
|
947
|
+
feature_rewards: Rt.clone().optional(),
|
|
981
948
|
sort: e.number().optional()
|
|
982
|
-
}),
|
|
949
|
+
}), Ct = u.Cashback, Vt = e.object({
|
|
983
950
|
...l.shape,
|
|
984
|
-
feature_type: e.string().enum(
|
|
951
|
+
feature_type: e.string().enum(Ct),
|
|
985
952
|
config: e.object({
|
|
986
953
|
order_start_time: e.number(),
|
|
987
954
|
order_end_time: e.number(),
|
|
988
955
|
claim_rewards_start_time: e.number(),
|
|
989
956
|
claim_rewards_end_time: e.number()
|
|
990
957
|
})
|
|
991
|
-
}),
|
|
958
|
+
}), jt = u.CheckIn, Tt = e.object({
|
|
992
959
|
...l.shape,
|
|
993
|
-
feature_type: e.string().enum(
|
|
994
|
-
}),
|
|
960
|
+
feature_type: e.string().enum(jt)
|
|
961
|
+
}), qt = u.ClaimActivationKey, xt = e.object({
|
|
995
962
|
...l.shape,
|
|
996
|
-
feature_type: e.string().enum(
|
|
997
|
-
}),
|
|
963
|
+
feature_type: e.string().enum(qt)
|
|
964
|
+
}), Lt = u.ClaimRewards, Ut = e.object({
|
|
998
965
|
...l.shape,
|
|
999
|
-
feature_type: e.string().enum(
|
|
1000
|
-
}), Pt = u.Comment,
|
|
966
|
+
feature_type: e.string().enum(Lt)
|
|
967
|
+
}), Pt = u.Comment, St = e.object({
|
|
1001
968
|
...l.shape,
|
|
1002
969
|
feature_type: e.string().enum(Pt),
|
|
1003
970
|
config: e.object({
|
|
1004
971
|
comments: e.array(e.string()),
|
|
1005
972
|
send_rate: e.number()
|
|
1006
973
|
})
|
|
1007
|
-
}),
|
|
974
|
+
}), Et = u.Follow, $t = e.object({
|
|
1008
975
|
...l.shape,
|
|
1009
|
-
feature_type: e.string().enum(
|
|
976
|
+
feature_type: e.string().enum(Et),
|
|
1010
977
|
config: e.object({
|
|
1011
978
|
platform: e.string(),
|
|
1012
979
|
platform_icon: e.string().optional(),
|
|
@@ -1014,67 +981,67 @@ const v = {
|
|
|
1014
981
|
qr_code_url: e.string().optional(),
|
|
1015
982
|
platform_desc: e.string().optional()
|
|
1016
983
|
})
|
|
1017
|
-
}),
|
|
984
|
+
}), Ft = u.GiftCode, It = e.object({
|
|
1018
985
|
name: e.string(),
|
|
1019
986
|
icon_url: e.string(),
|
|
1020
987
|
count: e.number()
|
|
1021
|
-
}),
|
|
988
|
+
}), Dt = e.object({
|
|
1022
989
|
...l.shape,
|
|
1023
|
-
feature_type: e.string().enum(
|
|
990
|
+
feature_type: e.string().enum(Ft),
|
|
1024
991
|
config: e.object({
|
|
1025
|
-
gift_items: e.array(
|
|
992
|
+
gift_items: e.array(It),
|
|
1026
993
|
mp_url: e.string().optional(),
|
|
1027
994
|
mp_qrcode_url: e.string().optional()
|
|
1028
995
|
})
|
|
1029
|
-
}),
|
|
996
|
+
}), At = u.Invite, Gt = e.object({
|
|
1030
997
|
...l.shape,
|
|
1031
|
-
feature_type: e.string().enum(
|
|
998
|
+
feature_type: e.string().enum(At),
|
|
1032
999
|
config: e.object({
|
|
1033
1000
|
share_url: e.string()
|
|
1034
1001
|
})
|
|
1035
|
-
}),
|
|
1002
|
+
}), Ot = u.InvitedRegister, Nt = e.object({
|
|
1036
1003
|
...l.shape,
|
|
1037
|
-
feature_type: e.string().enum(
|
|
1038
|
-
}),
|
|
1004
|
+
feature_type: e.string().enum(Ot)
|
|
1005
|
+
}), Qt = e.string().enum(U(v, "GiftCode", "LotteryTicket")), Bt = u.Lottery, Mt = e.object({
|
|
1039
1006
|
reward_item_id: e.number(),
|
|
1040
1007
|
reward_item_name: e.string(),
|
|
1041
|
-
reward_item_type:
|
|
1008
|
+
reward_item_type: Qt,
|
|
1042
1009
|
reward_item_icon_url: e.string(),
|
|
1043
1010
|
reward_item_desc: e.string().optional(),
|
|
1044
1011
|
reward_amount: e.number(),
|
|
1045
1012
|
reward_remaining_stock: e.number(),
|
|
1046
1013
|
reward_item_rating: e.number()
|
|
1047
|
-
}),
|
|
1014
|
+
}), Kt = e.object({
|
|
1048
1015
|
...l.shape,
|
|
1049
|
-
feature_type: e.string().enum(
|
|
1016
|
+
feature_type: e.string().enum(Bt),
|
|
1050
1017
|
config: e.object({
|
|
1051
1018
|
consume_item_id: e.number(),
|
|
1052
1019
|
consume_item_name: e.string(),
|
|
1053
1020
|
consume_item_icon_url: e.string(),
|
|
1054
1021
|
consume_item_count: e.array(e.number()),
|
|
1055
1022
|
consume_item_desc: e.string().optional(),
|
|
1056
|
-
rewards: e.array(
|
|
1023
|
+
rewards: e.array(Mt)
|
|
1057
1024
|
})
|
|
1058
|
-
}),
|
|
1025
|
+
}), Ht = u.LotteryDraw, zt = e.object({
|
|
1059
1026
|
...l.shape,
|
|
1060
|
-
feature_type: e.string().enum(
|
|
1027
|
+
feature_type: e.string().enum(Ht),
|
|
1061
1028
|
config: e.object({
|
|
1062
1029
|
draw_not_before: e.number(),
|
|
1063
1030
|
draw_not_after: e.number()
|
|
1064
1031
|
})
|
|
1065
|
-
}),
|
|
1032
|
+
}), Jt = u.Preregister, Zt = e.object({
|
|
1066
1033
|
...l.shape,
|
|
1067
|
-
feature_type: e.string().enum(
|
|
1068
|
-
}),
|
|
1034
|
+
feature_type: e.string().enum(Jt)
|
|
1035
|
+
}), Xt = u.Quest, Yt = e.object({
|
|
1069
1036
|
...l.shape,
|
|
1070
|
-
feature_type: e.string().enum(
|
|
1037
|
+
feature_type: e.string().enum(Xt),
|
|
1071
1038
|
config: e.object({
|
|
1072
|
-
objective:
|
|
1039
|
+
objective: te,
|
|
1073
1040
|
completion_value: e.number(),
|
|
1074
1041
|
team: e.object({
|
|
1075
1042
|
feature_id: e.number().optional(),
|
|
1076
1043
|
completion_value: e.number(),
|
|
1077
|
-
progress_algorithm:
|
|
1044
|
+
progress_algorithm: _t.clone().optional(),
|
|
1078
1045
|
top_n: e.number().optional()
|
|
1079
1046
|
}).optional(),
|
|
1080
1047
|
config: e.object({
|
|
@@ -1084,62 +1051,62 @@ const v = {
|
|
|
1084
1051
|
event_item_id: e.number().optional()
|
|
1085
1052
|
}).optional()
|
|
1086
1053
|
})
|
|
1087
|
-
}),
|
|
1054
|
+
}), Wt = u.Redeem, en = e.object({
|
|
1088
1055
|
price: e.number(),
|
|
1089
1056
|
per_user_limit: e.number(),
|
|
1090
|
-
item:
|
|
1091
|
-
}),
|
|
1057
|
+
item: p
|
|
1058
|
+
}), tn = e.object({
|
|
1092
1059
|
...l.shape,
|
|
1093
|
-
feature_type: e.string().enum(
|
|
1060
|
+
feature_type: e.string().enum(Wt),
|
|
1094
1061
|
config: e.object({
|
|
1095
1062
|
event_item_id: e.number(),
|
|
1096
|
-
redeem_catalog: e.array(
|
|
1063
|
+
redeem_catalog: e.array(en)
|
|
1097
1064
|
})
|
|
1098
|
-
}),
|
|
1065
|
+
}), nn = u.Register, an = e.object({
|
|
1099
1066
|
...l.shape,
|
|
1100
|
-
feature_type: e.string().enum(
|
|
1101
|
-
}),
|
|
1067
|
+
feature_type: e.string().enum(nn)
|
|
1068
|
+
}), rn = u.Share, on = e.object({
|
|
1102
1069
|
...l.shape,
|
|
1103
|
-
feature_type: e.string().enum(
|
|
1070
|
+
feature_type: e.string().enum(rn),
|
|
1104
1071
|
config: e.object({
|
|
1105
1072
|
share_platform: e.string(),
|
|
1106
1073
|
jump_url: e.string().optional(),
|
|
1107
1074
|
icon_url: e.string().optional()
|
|
1108
1075
|
})
|
|
1109
|
-
}),
|
|
1076
|
+
}), sn = u.Subscribe, cn = e.object({
|
|
1110
1077
|
...l.shape,
|
|
1111
|
-
feature_type: e.string().enum(
|
|
1078
|
+
feature_type: e.string().enum(sn),
|
|
1112
1079
|
config: e.object({
|
|
1113
1080
|
weixin_template_ids: e.array(e.string())
|
|
1114
1081
|
})
|
|
1115
|
-
}),
|
|
1082
|
+
}), un = u.Survey, ln = e.object({
|
|
1116
1083
|
...l.shape,
|
|
1117
|
-
feature_type: e.string().enum(
|
|
1084
|
+
feature_type: e.string().enum(un),
|
|
1118
1085
|
config: e.object({
|
|
1119
1086
|
survey_id: e.string(),
|
|
1120
1087
|
survey_url: e.string()
|
|
1121
1088
|
})
|
|
1122
|
-
}),
|
|
1089
|
+
}), mn = u.Team, dn = e.object({
|
|
1123
1090
|
...l.shape,
|
|
1124
|
-
feature_type: e.string().enum(
|
|
1091
|
+
feature_type: e.string().enum(mn),
|
|
1125
1092
|
config: e.object({
|
|
1126
1093
|
max_members: e.number().min(1),
|
|
1127
1094
|
min_members: e.number().min(1)
|
|
1128
1095
|
})
|
|
1129
|
-
}),
|
|
1096
|
+
}), gn = u.Ugc, pn = e.object({
|
|
1130
1097
|
...l.shape,
|
|
1131
|
-
feature_type: e.string().enum(
|
|
1098
|
+
feature_type: e.string().enum(gn),
|
|
1132
1099
|
config: e.object({
|
|
1133
1100
|
allowed_social_medias: e.array(e.string()).optional(),
|
|
1134
|
-
acceptance_rewards: e.array(
|
|
1101
|
+
acceptance_rewards: e.array(p).optional()
|
|
1135
1102
|
})
|
|
1136
|
-
}),
|
|
1103
|
+
}), _n = u.UgcLike, bn = e.object({
|
|
1137
1104
|
...l.shape,
|
|
1138
|
-
feature_type: e.string().enum(
|
|
1105
|
+
feature_type: e.string().enum(_n),
|
|
1139
1106
|
config: e.object({
|
|
1140
1107
|
ugc_feature_id: e.number()
|
|
1141
1108
|
})
|
|
1142
|
-
}),
|
|
1109
|
+
}), yn = u.Vote, hn = e.object({
|
|
1143
1110
|
sn: e.string(),
|
|
1144
1111
|
name: e.string(),
|
|
1145
1112
|
img_urls: e.array(e.string()).optional(),
|
|
@@ -1149,92 +1116,92 @@ const v = {
|
|
|
1149
1116
|
amount: e.number(),
|
|
1150
1117
|
finalists: e.bool(),
|
|
1151
1118
|
last_vote_time: e.number()
|
|
1152
|
-
}),
|
|
1119
|
+
}), fn = e.object({
|
|
1153
1120
|
...l.shape,
|
|
1154
|
-
feature_type: e.string().enum(
|
|
1121
|
+
feature_type: e.string().enum(yn),
|
|
1155
1122
|
config: e.object({
|
|
1156
1123
|
vote_feature_ids: e.array(e.number()),
|
|
1157
1124
|
submission_feature_ids: e.array(e.number()),
|
|
1158
1125
|
finalists_amount: e.number(),
|
|
1159
|
-
source:
|
|
1160
|
-
options: e.array(
|
|
1161
|
-
rewards: e.array(
|
|
1126
|
+
source: st,
|
|
1127
|
+
options: e.array(hn),
|
|
1128
|
+
rewards: e.array(p)
|
|
1162
1129
|
})
|
|
1163
|
-
}),
|
|
1130
|
+
}), wn = u.Vote2, kn = e.object({
|
|
1164
1131
|
candidate_id: e.string(),
|
|
1165
1132
|
display_name: e.string(),
|
|
1166
1133
|
images: e.array(e.string()).optional(),
|
|
1167
1134
|
videos: e.array(e.string()).optional(),
|
|
1168
1135
|
description: e.string().optional(),
|
|
1169
1136
|
jump_url: e.string()
|
|
1170
|
-
}),
|
|
1137
|
+
}), vn = e.object({
|
|
1171
1138
|
...l.shape,
|
|
1172
|
-
feature_type: e.string().enum(
|
|
1139
|
+
feature_type: e.string().enum(wn),
|
|
1173
1140
|
config: e.object({
|
|
1174
1141
|
vote_item_id: e.number().optional(),
|
|
1175
|
-
candidates: e.array(
|
|
1142
|
+
candidates: e.array(kn),
|
|
1176
1143
|
vote_since: e.number(),
|
|
1177
1144
|
vote_until: e.number(),
|
|
1178
1145
|
rewards_since: e.number(),
|
|
1179
1146
|
rewards_until: e.number(),
|
|
1180
|
-
winner_rewards: e.array(
|
|
1181
|
-
consolation_rewards: e.array(
|
|
1147
|
+
winner_rewards: e.array(p).optional(),
|
|
1148
|
+
consolation_rewards: e.array(p).optional()
|
|
1182
1149
|
})
|
|
1183
|
-
}),
|
|
1150
|
+
}), Rn = u.ZeroChatgpt, Cn = e.object({
|
|
1184
1151
|
...l.shape,
|
|
1185
|
-
feature_type: e.string().enum(
|
|
1186
|
-
}),
|
|
1187
|
-
|
|
1188
|
-
|
|
1152
|
+
feature_type: e.string().enum(Rn)
|
|
1153
|
+
}), Vn = e.union(
|
|
1154
|
+
Vt,
|
|
1155
|
+
Tt,
|
|
1189
1156
|
Ut,
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1157
|
+
St,
|
|
1158
|
+
$t,
|
|
1159
|
+
Dt,
|
|
1160
|
+
Gt,
|
|
1161
|
+
Nt,
|
|
1162
|
+
Kt,
|
|
1163
|
+
zt,
|
|
1164
|
+
Zt,
|
|
1165
|
+
Yt,
|
|
1199
1166
|
an,
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
).key("feature_type").satisfies(),
|
|
1167
|
+
on,
|
|
1168
|
+
cn,
|
|
1169
|
+
ln,
|
|
1170
|
+
dn,
|
|
1171
|
+
fn,
|
|
1172
|
+
vn,
|
|
1173
|
+
xt,
|
|
1174
|
+
Cn,
|
|
1175
|
+
pn,
|
|
1176
|
+
bn,
|
|
1177
|
+
tn
|
|
1178
|
+
).key("feature_type").satisfies(), jn = e.object({
|
|
1212
1179
|
event_name: e.string(),
|
|
1213
1180
|
rules: e.string(),
|
|
1214
1181
|
since: e.number(),
|
|
1215
1182
|
until: e.number(),
|
|
1216
1183
|
visit_count: e.number().optional(),
|
|
1217
|
-
features: e.array(
|
|
1218
|
-
}).lock(),
|
|
1219
|
-
order_total_amount:
|
|
1220
|
-
cashback_total_amount:
|
|
1221
|
-
game_item_count:
|
|
1222
|
-
}),
|
|
1184
|
+
features: e.array(Vn)
|
|
1185
|
+
}).lock(), T = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ae = e.object({
|
|
1186
|
+
order_total_amount: T,
|
|
1187
|
+
cashback_total_amount: T,
|
|
1188
|
+
game_item_count: T
|
|
1189
|
+
}), Tn = e.object({
|
|
1223
1190
|
activation_key: e.string().disallow("")
|
|
1224
|
-
}),
|
|
1191
|
+
}), qn = e.object({
|
|
1225
1192
|
gift_code: e.string()
|
|
1226
|
-
}),
|
|
1193
|
+
}), xn = e.object({
|
|
1227
1194
|
user_id: e.string(),
|
|
1228
1195
|
name: e.string().optional(),
|
|
1229
1196
|
avatar_url: e.string().optional()
|
|
1230
|
-
}),
|
|
1197
|
+
}), Ln = e.object({
|
|
1231
1198
|
lottery_count: e.number()
|
|
1232
1199
|
}), R = e.object({
|
|
1233
1200
|
reward_id: e.number(),
|
|
1234
1201
|
reward_item_id: e.number(),
|
|
1235
|
-
reward_source:
|
|
1202
|
+
reward_source: S,
|
|
1236
1203
|
reward_item_name: e.string(),
|
|
1237
|
-
reward_item_type:
|
|
1204
|
+
reward_item_type: W,
|
|
1238
1205
|
reward_item_icon_url: e.string(),
|
|
1239
1206
|
reward_item_desc: e.string().optional(),
|
|
1240
1207
|
reward_item_rating: e.number(),
|
|
@@ -1244,7 +1211,7 @@ const v = {
|
|
|
1244
1211
|
event_name: e.string(),
|
|
1245
1212
|
feature_id: e.number(),
|
|
1246
1213
|
engagement_id: e.number(),
|
|
1247
|
-
feature_type:
|
|
1214
|
+
feature_type: rt,
|
|
1248
1215
|
receive_time: e.number(),
|
|
1249
1216
|
extra_data: e.record(e.unknown()).optional()
|
|
1250
1217
|
}), Un = e.string().enum(w.Unknown, w.Pending), Pn = e.union(
|
|
@@ -1259,35 +1226,35 @@ const v = {
|
|
|
1259
1226
|
created_at: e.number(),
|
|
1260
1227
|
reward: R
|
|
1261
1228
|
})
|
|
1262
|
-
).satisfies(),
|
|
1229
|
+
).satisfies(), Sn = e.object({
|
|
1263
1230
|
tickets: e.array(Pn)
|
|
1264
|
-
}),
|
|
1231
|
+
}), En = e.object({
|
|
1265
1232
|
platforms: e.array(e.string())
|
|
1266
|
-
}),
|
|
1233
|
+
}), re = e.object({
|
|
1267
1234
|
role_name: e.string(),
|
|
1268
1235
|
is_leader: e.bool(),
|
|
1269
1236
|
is_myself: e.bool().optional(),
|
|
1270
1237
|
progress: e.number().optional()
|
|
1271
|
-
}).lock(),
|
|
1272
|
-
objective:
|
|
1238
|
+
}).lock(), $n = e.object({
|
|
1239
|
+
objective: te,
|
|
1273
1240
|
progress: e.number(),
|
|
1274
1241
|
completion_value: e.number().optional(),
|
|
1275
1242
|
team: e.object({
|
|
1276
1243
|
progress: e.number(),
|
|
1277
1244
|
completion_value: e.number().optional(),
|
|
1278
|
-
players: e.array(
|
|
1245
|
+
players: e.array(re)
|
|
1279
1246
|
}).optional()
|
|
1280
|
-
}),
|
|
1247
|
+
}), Fn = e.object({
|
|
1281
1248
|
progress: e.number(),
|
|
1282
1249
|
team: e.object({
|
|
1283
1250
|
progress: e.number(),
|
|
1284
|
-
team_members: e.array(
|
|
1251
|
+
team_members: e.array(re).optional()
|
|
1285
1252
|
}).optional()
|
|
1286
|
-
}),
|
|
1253
|
+
}), In = e.object({
|
|
1287
1254
|
item_id: e.number(),
|
|
1288
1255
|
item_count: e.number(),
|
|
1289
1256
|
redeem_count: e.number()
|
|
1290
|
-
}),
|
|
1257
|
+
}), Dn = e.object({
|
|
1291
1258
|
item_stocks: e.array(
|
|
1292
1259
|
e.object({
|
|
1293
1260
|
item_id: e.number(),
|
|
@@ -1295,24 +1262,24 @@ const v = {
|
|
|
1295
1262
|
user_limit: e.number()
|
|
1296
1263
|
})
|
|
1297
1264
|
)
|
|
1298
|
-
}),
|
|
1265
|
+
}), An = e.object({
|
|
1299
1266
|
platform: e.string()
|
|
1300
|
-
}),
|
|
1267
|
+
}), Gn = e.object({
|
|
1301
1268
|
weixin_openid: e.string()
|
|
1302
|
-
}),
|
|
1269
|
+
}), On = e.object({
|
|
1303
1270
|
serial_number: e.number()
|
|
1304
|
-
}),
|
|
1271
|
+
}), Nn = e.object({
|
|
1305
1272
|
team_code: e.string(),
|
|
1306
1273
|
leader_name: e.string(),
|
|
1307
1274
|
total_members: e.number()
|
|
1308
|
-
}),
|
|
1275
|
+
}), Rr = e.object({
|
|
1309
1276
|
is_leader: e.bool(),
|
|
1310
1277
|
is_myself: e.bool().optional(),
|
|
1311
1278
|
role_name: e.string(),
|
|
1312
1279
|
server_name: e.string()
|
|
1313
|
-
}),
|
|
1280
|
+
}), Qn = e.object({
|
|
1314
1281
|
team_code: e.string(),
|
|
1315
|
-
visibility:
|
|
1282
|
+
visibility: mt,
|
|
1316
1283
|
members: e.array(
|
|
1317
1284
|
e.object({
|
|
1318
1285
|
is_leader: e.bool(),
|
|
@@ -1320,14 +1287,14 @@ const v = {
|
|
|
1320
1287
|
server_name: e.string()
|
|
1321
1288
|
})
|
|
1322
1289
|
)
|
|
1323
|
-
}),
|
|
1290
|
+
}), Bn = e.object({
|
|
1324
1291
|
ugc_id: e.number(),
|
|
1325
1292
|
title: e.string(),
|
|
1326
1293
|
content: e.string().optional(),
|
|
1327
1294
|
image_urls: e.array(e.string()).optional(),
|
|
1328
|
-
social_media:
|
|
1295
|
+
social_media: E.clone().optional(),
|
|
1329
1296
|
social_media_url: e.string().optional()
|
|
1330
|
-
}),
|
|
1297
|
+
}), Mn = e.object({
|
|
1331
1298
|
ugcs: e.array(
|
|
1332
1299
|
e.object({
|
|
1333
1300
|
ugc_id: e.number(),
|
|
@@ -1336,7 +1303,7 @@ const v = {
|
|
|
1336
1303
|
title: e.string(),
|
|
1337
1304
|
content: e.string().optional(),
|
|
1338
1305
|
image_urls: e.array(e.string()).optional(),
|
|
1339
|
-
social_media:
|
|
1306
|
+
social_media: E.clone().optional(),
|
|
1340
1307
|
social_media_url: e.string().optional(),
|
|
1341
1308
|
server_id: e.number().optional(),
|
|
1342
1309
|
server_name: e.string().optional(),
|
|
@@ -1347,19 +1314,19 @@ const v = {
|
|
|
1347
1314
|
})
|
|
1348
1315
|
).optional(),
|
|
1349
1316
|
next_token: e.string().optional()
|
|
1350
|
-
}),
|
|
1317
|
+
}), Kn = e.object({
|
|
1351
1318
|
ugcs: e.array(
|
|
1352
1319
|
e.object({
|
|
1353
1320
|
ugc_id: e.number(),
|
|
1354
1321
|
event_id: e.number().optional(),
|
|
1355
1322
|
feature_id: e.number().optional(),
|
|
1356
1323
|
feature_name: e.string().optional(),
|
|
1357
|
-
review_status:
|
|
1324
|
+
review_status: wt,
|
|
1358
1325
|
reviewer_comment: e.string().optional(),
|
|
1359
1326
|
title: e.string(),
|
|
1360
1327
|
content: e.string().optional(),
|
|
1361
1328
|
image_urls: e.array(e.string()).optional(),
|
|
1362
|
-
social_media:
|
|
1329
|
+
social_media: E.clone().optional(),
|
|
1363
1330
|
social_media_url: e.string().optional(),
|
|
1364
1331
|
server_id: e.number().optional(),
|
|
1365
1332
|
server_name: e.string().optional(),
|
|
@@ -1370,13 +1337,13 @@ const v = {
|
|
|
1370
1337
|
})
|
|
1371
1338
|
).optional(),
|
|
1372
1339
|
next_token: e.string().optional()
|
|
1373
|
-
}),
|
|
1340
|
+
}), Hn = e.object({
|
|
1374
1341
|
total_count: e.number()
|
|
1375
|
-
}),
|
|
1342
|
+
}), zn = e.object({
|
|
1376
1343
|
existed: e.bool(),
|
|
1377
1344
|
upload_url: e.string().optional(),
|
|
1378
1345
|
image_url: e.string()
|
|
1379
|
-
}),
|
|
1346
|
+
}), Jn = e.object({
|
|
1380
1347
|
ugcs: e.array(
|
|
1381
1348
|
e.object({
|
|
1382
1349
|
ugc_id: e.number(),
|
|
@@ -1389,146 +1356,146 @@ const v = {
|
|
|
1389
1356
|
role_name: e.string().optional()
|
|
1390
1357
|
})
|
|
1391
1358
|
).optional()
|
|
1392
|
-
}),
|
|
1359
|
+
}), Zn = e.object({
|
|
1393
1360
|
option_sn: e.string()
|
|
1394
|
-
}),
|
|
1361
|
+
}), Xn = e.object({
|
|
1395
1362
|
candidate_id: e.string(),
|
|
1396
1363
|
total_votes: e.number().optional(),
|
|
1397
1364
|
my_votes: e.number().optional(),
|
|
1398
1365
|
votes: e.number().optional()
|
|
1399
|
-
}),
|
|
1400
|
-
rewards_type:
|
|
1366
|
+
}), Yn = e.object({
|
|
1367
|
+
rewards_type: yt,
|
|
1401
1368
|
rewards: e.array(R).optional()
|
|
1402
|
-
}),
|
|
1369
|
+
}), Wn = e.object({
|
|
1403
1370
|
candidate_id: e.string(),
|
|
1404
1371
|
is_winner: e.bool(),
|
|
1405
1372
|
total_votes: e.number(),
|
|
1406
1373
|
my_votes: e.number()
|
|
1407
|
-
}),
|
|
1374
|
+
}), ea = e.object({
|
|
1408
1375
|
role: e.string(),
|
|
1409
1376
|
content: e.string()
|
|
1410
|
-
}),
|
|
1411
|
-
conversations: e.array(
|
|
1412
|
-
}),
|
|
1377
|
+
}), ta = e.object({
|
|
1378
|
+
conversations: e.array(ea)
|
|
1379
|
+
}), na = e.object({
|
|
1413
1380
|
user_id: e.string(),
|
|
1414
1381
|
name: e.string(),
|
|
1415
1382
|
avatar_url: e.string(),
|
|
1416
1383
|
comment: e.string(),
|
|
1417
1384
|
video_note: e.number(),
|
|
1418
1385
|
created_at: e.number()
|
|
1419
|
-
}),
|
|
1420
|
-
|
|
1421
|
-
Sn,
|
|
1422
|
-
Nn,
|
|
1386
|
+
}), $ = e.union(
|
|
1387
|
+
En,
|
|
1423
1388
|
Ln,
|
|
1424
|
-
Gn,
|
|
1425
|
-
Xn,
|
|
1426
|
-
Yn,
|
|
1427
1389
|
On,
|
|
1428
|
-
ae,
|
|
1429
1390
|
xn,
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1391
|
+
An,
|
|
1392
|
+
Zn,
|
|
1393
|
+
Xn,
|
|
1394
|
+
Gn,
|
|
1395
|
+
ae,
|
|
1433
1396
|
qn,
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1397
|
+
Qn,
|
|
1398
|
+
$n,
|
|
1399
|
+
Sn,
|
|
1400
|
+
Tn,
|
|
1401
|
+
ta,
|
|
1402
|
+
Bn,
|
|
1403
|
+
In,
|
|
1437
1404
|
e.custom(
|
|
1438
1405
|
"EmptyObject",
|
|
1439
|
-
(
|
|
1406
|
+
(s) => y(s) && Object.keys(s).length === 0
|
|
1440
1407
|
)
|
|
1441
|
-
).satisfies().lock(),
|
|
1408
|
+
).satisfies().lock(), aa = e.object({
|
|
1442
1409
|
reward_id: e.number(),
|
|
1443
1410
|
reward_item_id: e.number(),
|
|
1444
|
-
reward_item_type:
|
|
1411
|
+
reward_item_type: ee,
|
|
1445
1412
|
reward_count: e.number(),
|
|
1446
|
-
reward_status:
|
|
1447
|
-
reward_source:
|
|
1413
|
+
reward_status: ne,
|
|
1414
|
+
reward_source: S,
|
|
1448
1415
|
reward_item_name: e.string(),
|
|
1449
1416
|
reward_item_icon_url: e.string(),
|
|
1450
1417
|
reward_item_desc: e.string().optional(),
|
|
1451
1418
|
reward_item_rating: e.number(),
|
|
1452
1419
|
receive_time: e.number(),
|
|
1453
|
-
extra_data: e.union(
|
|
1454
|
-
}),
|
|
1420
|
+
extra_data: e.union(...$.validators, e.record(e.unknown())).satisfies().optional()
|
|
1421
|
+
}), ra = e.object({
|
|
1455
1422
|
reward_id: e.number(),
|
|
1456
1423
|
reward_item_id: e.number(),
|
|
1457
1424
|
reward_item_name: e.string(),
|
|
1458
|
-
reward_item_type:
|
|
1425
|
+
reward_item_type: ee,
|
|
1459
1426
|
reward_item_icon_url: e.string(),
|
|
1460
1427
|
reward_item_desc: e.string().optional(),
|
|
1461
1428
|
reward_item_rating: e.number(),
|
|
1462
1429
|
reward_amount: e.number(),
|
|
1463
|
-
reward_status:
|
|
1464
|
-
reward_source:
|
|
1430
|
+
reward_status: ne,
|
|
1431
|
+
reward_source: S,
|
|
1465
1432
|
extra_data: e.record(e.unknown()).optional()
|
|
1466
|
-
}),
|
|
1433
|
+
}), oa = e.object({
|
|
1467
1434
|
engagement_id: e.number(),
|
|
1468
1435
|
user_id: e.string(),
|
|
1469
1436
|
event_id: e.number(),
|
|
1470
1437
|
feature_id: e.number(),
|
|
1471
1438
|
sequence: e.number(),
|
|
1472
|
-
data:
|
|
1439
|
+
data: $.clone().optional(),
|
|
1473
1440
|
server_id: e.string().optional(),
|
|
1474
1441
|
role_id: e.string().optional(),
|
|
1475
1442
|
created_at: e.number(),
|
|
1476
|
-
rewards: e.array(
|
|
1477
|
-
}).lock(),
|
|
1443
|
+
rewards: e.array(aa).optional()
|
|
1444
|
+
}).lock(), ia = e.object({
|
|
1478
1445
|
allowed: e.bool(),
|
|
1479
1446
|
registered: e.bool()
|
|
1480
|
-
}),
|
|
1447
|
+
}), sa = e.object({
|
|
1481
1448
|
feature_id: e.number(),
|
|
1482
1449
|
can_engage: e.bool(),
|
|
1483
1450
|
has_unclaimed_rewards: e.bool(),
|
|
1484
1451
|
final_available_count: e.number(),
|
|
1485
1452
|
total_remaining_engagements: e.number(),
|
|
1486
1453
|
cycle_remaining_engagements: e.number()
|
|
1487
|
-
}),
|
|
1454
|
+
}), ca = e.object({
|
|
1488
1455
|
engagement_id: e.number(),
|
|
1489
1456
|
engagement: e.object({
|
|
1490
1457
|
engagement_id: e.number(),
|
|
1491
1458
|
sequence: e.number(),
|
|
1492
1459
|
feature_id: e.number(),
|
|
1493
|
-
data:
|
|
1460
|
+
data: $.clone().optional()
|
|
1494
1461
|
}).optional(),
|
|
1495
|
-
rewards: e.array(
|
|
1462
|
+
rewards: e.array(ra).optional(),
|
|
1496
1463
|
scan: e.bool().optional()
|
|
1497
|
-
}),
|
|
1464
|
+
}), ua = e.object({
|
|
1498
1465
|
reward_id: e.number(),
|
|
1499
1466
|
reward_status: P
|
|
1500
|
-
}),
|
|
1501
|
-
engagements: e.union(e.array(
|
|
1502
|
-
}),
|
|
1503
|
-
status: e.array(
|
|
1504
|
-
}),
|
|
1467
|
+
}), la = e.guard(jn), ma = e.guard(ia), q = i({ count: e.number() }), da = i({ first_visit: e.bool() }), ga = i({
|
|
1468
|
+
engagements: e.union(e.array(na), e.array(Nn))
|
|
1469
|
+
}), pa = i({
|
|
1470
|
+
status: e.array(sa)
|
|
1471
|
+
}), _a = i({
|
|
1505
1472
|
engagements_counts: e.record(e.number())
|
|
1506
|
-
}),
|
|
1507
|
-
engagements: e.array(
|
|
1473
|
+
}), ba = i({
|
|
1474
|
+
engagements: e.array(oa),
|
|
1508
1475
|
next_token: e.string().optional()
|
|
1509
|
-
}),
|
|
1510
|
-
claimed_items: e.array(
|
|
1511
|
-
}),
|
|
1476
|
+
}), ya = e.guard(ca), ha = i({
|
|
1477
|
+
claimed_items: e.array(ua)
|
|
1478
|
+
}), fa = i({
|
|
1512
1479
|
rewards: e.array(R)
|
|
1513
|
-
}),
|
|
1480
|
+
}), wa = i({
|
|
1514
1481
|
reward_status: P
|
|
1515
|
-
}),
|
|
1482
|
+
}), ka = i({
|
|
1516
1483
|
user_rewards: e.array(R),
|
|
1517
1484
|
next_token: e.string().optional()
|
|
1518
|
-
}),
|
|
1485
|
+
}), va = i({
|
|
1519
1486
|
unclaimed: e.number()
|
|
1520
|
-
}),
|
|
1487
|
+
}), Ra = i({
|
|
1521
1488
|
scene: e.string()
|
|
1522
|
-
}),
|
|
1489
|
+
}), Ca = i({
|
|
1523
1490
|
params: e.string()
|
|
1524
|
-
}),
|
|
1491
|
+
}), Va = i({
|
|
1525
1492
|
img: e.string()
|
|
1526
|
-
}),
|
|
1493
|
+
}), ja = e.guard(Fn), Ta = e.guard(Yn), qa = e.guard(
|
|
1527
1494
|
e.object({
|
|
1528
|
-
candidate_votes: e.array(
|
|
1495
|
+
candidate_votes: e.array(Wn)
|
|
1529
1496
|
})
|
|
1530
|
-
),
|
|
1531
|
-
class
|
|
1497
|
+
), xa = e.guard(ae), M = e.guard(Kn), La = e.guard(Mn), Ua = e.guard(Hn), Pa = e.guard(zn), Sa = e.guard(Jn), Ea = e.guard(Dn);
|
|
1498
|
+
class Cr {
|
|
1532
1499
|
token;
|
|
1533
1500
|
event = 0;
|
|
1534
1501
|
req;
|
|
@@ -1540,12 +1507,12 @@ class Va {
|
|
|
1540
1507
|
*
|
|
1541
1508
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1542
1509
|
*/
|
|
1543
|
-
async verifyMobileAllowed(t, n,
|
|
1544
|
-
const { data:
|
|
1545
|
-
...
|
|
1510
|
+
async verifyMobileAllowed(t, n, a) {
|
|
1511
|
+
const { data: r } = await this.req.get("verify-mobile-allowed", ma, {
|
|
1512
|
+
...a,
|
|
1546
1513
|
params: { game_id: t, mobile: n }
|
|
1547
1514
|
});
|
|
1548
|
-
return
|
|
1515
|
+
return r;
|
|
1549
1516
|
}
|
|
1550
1517
|
/**
|
|
1551
1518
|
* 获取运营活动的基础配置信息
|
|
@@ -1553,7 +1520,7 @@ class Va {
|
|
|
1553
1520
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1554
1521
|
*/
|
|
1555
1522
|
async getConfig(t) {
|
|
1556
|
-
const { data: n } = await this.req.get(`event/${this.event}/event-config`,
|
|
1523
|
+
const { data: n } = await this.req.get(`event/${this.event}/event-config`, la, t);
|
|
1557
1524
|
return n;
|
|
1558
1525
|
}
|
|
1559
1526
|
/**
|
|
@@ -1562,11 +1529,11 @@ class Va {
|
|
|
1562
1529
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
|
|
1563
1530
|
*/
|
|
1564
1531
|
async getEngagementsUserCount(t, n) {
|
|
1565
|
-
const { data:
|
|
1532
|
+
const { data: a } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
|
|
1566
1533
|
...n,
|
|
1567
1534
|
params: { feature_id: t, type: "user" }
|
|
1568
1535
|
});
|
|
1569
|
-
return
|
|
1536
|
+
return a?.count ?? null;
|
|
1570
1537
|
}
|
|
1571
1538
|
/**
|
|
1572
1539
|
* 获取某个玩法参与次数
|
|
@@ -1574,11 +1541,11 @@ class Va {
|
|
|
1574
1541
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
|
|
1575
1542
|
*/
|
|
1576
1543
|
async getEngagementsCount(t, n) {
|
|
1577
|
-
const { data:
|
|
1544
|
+
const { data: a } = await this.req.get(`event/${this.event}/feature-engagement-count`, q, {
|
|
1578
1545
|
...n,
|
|
1579
1546
|
params: { feature_id: t, type: "engagement" }
|
|
1580
1547
|
});
|
|
1581
|
-
return
|
|
1548
|
+
return a?.count ?? null;
|
|
1582
1549
|
}
|
|
1583
1550
|
/**
|
|
1584
1551
|
* 获取某个玩法的参与记录(和特定用户无关)
|
|
@@ -1588,11 +1555,11 @@ class Va {
|
|
|
1588
1555
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1589
1556
|
*/
|
|
1590
1557
|
async getEngagements(t, n) {
|
|
1591
|
-
const { data:
|
|
1558
|
+
const { data: a } = await this.req.get(`event/${this.event}/feature-engagements`, ga, {
|
|
1592
1559
|
...n,
|
|
1593
1560
|
params: { feature_id: t }
|
|
1594
1561
|
});
|
|
1595
|
-
return
|
|
1562
|
+
return a?.engagements || [];
|
|
1596
1563
|
}
|
|
1597
1564
|
/**
|
|
1598
1565
|
* 用户访问某个活动或玩法
|
|
@@ -1601,15 +1568,15 @@ class Va {
|
|
|
1601
1568
|
*/
|
|
1602
1569
|
async visit(t, n) {
|
|
1603
1570
|
await this.token.autoLogin();
|
|
1604
|
-
const { data:
|
|
1571
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
1605
1572
|
`event/${this.event}/visit`,
|
|
1606
1573
|
c(t || {}),
|
|
1607
|
-
|
|
1574
|
+
da,
|
|
1608
1575
|
n
|
|
1609
1576
|
);
|
|
1610
|
-
return
|
|
1577
|
+
return a ?? {
|
|
1611
1578
|
message: o,
|
|
1612
|
-
error:
|
|
1579
|
+
error: r
|
|
1613
1580
|
};
|
|
1614
1581
|
}
|
|
1615
1582
|
/**
|
|
@@ -1621,12 +1588,12 @@ class Va {
|
|
|
1621
1588
|
*/
|
|
1622
1589
|
async getUserFeatureStatus(t, n) {
|
|
1623
1590
|
if (!await this.token.autoLogin()) return [];
|
|
1624
|
-
const { data:
|
|
1591
|
+
const { data: a } = await this.req.get("event/user-feature-status", pa, {
|
|
1625
1592
|
...n,
|
|
1626
1593
|
message: !1,
|
|
1627
1594
|
params: c({ ...t, event_id: this.event })
|
|
1628
1595
|
});
|
|
1629
|
-
return
|
|
1596
|
+
return a?.status || [];
|
|
1630
1597
|
}
|
|
1631
1598
|
/**
|
|
1632
1599
|
* 获取用户在目标活动下的某个玩法的参与次数
|
|
@@ -1635,11 +1602,11 @@ class Va {
|
|
|
1635
1602
|
*/
|
|
1636
1603
|
async getUserEngagementCount(t, n) {
|
|
1637
1604
|
if (!await this.token.autoLogin()) return {};
|
|
1638
|
-
const { data:
|
|
1605
|
+
const { data: a } = await this.req.get("event/user-engagements-count", _a, {
|
|
1639
1606
|
message: !1,
|
|
1640
1607
|
params: c({ ...n, event_id: this.event, feature_id: t })
|
|
1641
1608
|
});
|
|
1642
|
-
return
|
|
1609
|
+
return a?.engagements_counts || {};
|
|
1643
1610
|
}
|
|
1644
1611
|
/**
|
|
1645
1612
|
* 获取当前登录用户参与某个玩法的记录
|
|
@@ -1648,14 +1615,14 @@ class Va {
|
|
|
1648
1615
|
*
|
|
1649
1616
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=NFDdV1dwWb
|
|
1650
1617
|
*/
|
|
1651
|
-
async getUserEngagements(t, n,
|
|
1618
|
+
async getUserEngagements(t, n, a) {
|
|
1652
1619
|
if (!await this.token.autoLogin())
|
|
1653
1620
|
return {
|
|
1654
1621
|
engagements: [],
|
|
1655
1622
|
next_token: ""
|
|
1656
1623
|
};
|
|
1657
|
-
const { data:
|
|
1658
|
-
...
|
|
1624
|
+
const { data: r } = await this.req.get("event/user-engagements", ba, {
|
|
1625
|
+
...a,
|
|
1659
1626
|
params: c({
|
|
1660
1627
|
max_results: 20,
|
|
1661
1628
|
...n,
|
|
@@ -1664,8 +1631,8 @@ class Va {
|
|
|
1664
1631
|
})
|
|
1665
1632
|
});
|
|
1666
1633
|
return {
|
|
1667
|
-
engagements:
|
|
1668
|
-
next_token:
|
|
1634
|
+
engagements: r?.engagements || [],
|
|
1635
|
+
next_token: r?.next_token || ""
|
|
1669
1636
|
};
|
|
1670
1637
|
}
|
|
1671
1638
|
/**
|
|
@@ -1677,17 +1644,17 @@ class Va {
|
|
|
1677
1644
|
*
|
|
1678
1645
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vuOyrcry3S
|
|
1679
1646
|
*/
|
|
1680
|
-
async engage(t, n,
|
|
1647
|
+
async engage(t, n, a, r) {
|
|
1681
1648
|
await this.token.autoLogin();
|
|
1682
1649
|
const { data: o, code: d, message: g } = await this.req.post(
|
|
1683
1650
|
`event/${this.event}/engage`,
|
|
1684
1651
|
c({
|
|
1685
1652
|
feature_id: t,
|
|
1686
1653
|
engagement: n,
|
|
1687
|
-
...
|
|
1654
|
+
...a
|
|
1688
1655
|
}),
|
|
1689
|
-
|
|
1690
|
-
|
|
1656
|
+
ya,
|
|
1657
|
+
r
|
|
1691
1658
|
);
|
|
1692
1659
|
return o ?? {
|
|
1693
1660
|
message: g,
|
|
@@ -1703,18 +1670,18 @@ class Va {
|
|
|
1703
1670
|
*/
|
|
1704
1671
|
async claimRewards(t, n) {
|
|
1705
1672
|
await this.token.autoLogin();
|
|
1706
|
-
const { data:
|
|
1673
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
1707
1674
|
"event/claim-rewards",
|
|
1708
1675
|
c({
|
|
1709
1676
|
...t,
|
|
1710
1677
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1711
1678
|
}),
|
|
1712
|
-
|
|
1679
|
+
ha,
|
|
1713
1680
|
n
|
|
1714
1681
|
);
|
|
1715
|
-
return
|
|
1682
|
+
return a?.claimed_items || {
|
|
1716
1683
|
message: o,
|
|
1717
|
-
error:
|
|
1684
|
+
error: r
|
|
1718
1685
|
};
|
|
1719
1686
|
}
|
|
1720
1687
|
/**
|
|
@@ -1724,18 +1691,18 @@ class Va {
|
|
|
1724
1691
|
*/
|
|
1725
1692
|
async claimRewardsV2(t, n) {
|
|
1726
1693
|
await this.token.autoLogin();
|
|
1727
|
-
const { data:
|
|
1694
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
1728
1695
|
"event/claim-rewards-v2",
|
|
1729
1696
|
c({
|
|
1730
1697
|
...t,
|
|
1731
1698
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1732
1699
|
}),
|
|
1733
|
-
|
|
1700
|
+
fa,
|
|
1734
1701
|
n
|
|
1735
1702
|
);
|
|
1736
|
-
return
|
|
1703
|
+
return a?.rewards || {
|
|
1737
1704
|
message: o,
|
|
1738
|
-
error:
|
|
1705
|
+
error: r
|
|
1739
1706
|
};
|
|
1740
1707
|
}
|
|
1741
1708
|
/**
|
|
@@ -1745,15 +1712,15 @@ class Va {
|
|
|
1745
1712
|
*/
|
|
1746
1713
|
async claimWeixinHongbao(t, n) {
|
|
1747
1714
|
await this.token.autoLogin();
|
|
1748
|
-
const { data:
|
|
1715
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
1749
1716
|
"event/claim-weixin-hongbao",
|
|
1750
1717
|
{ reward_id: t },
|
|
1751
|
-
|
|
1718
|
+
wa,
|
|
1752
1719
|
n
|
|
1753
1720
|
);
|
|
1754
|
-
return
|
|
1721
|
+
return a || {
|
|
1755
1722
|
message: o,
|
|
1756
|
-
error:
|
|
1723
|
+
error: r
|
|
1757
1724
|
};
|
|
1758
1725
|
}
|
|
1759
1726
|
/**
|
|
@@ -1764,15 +1731,15 @@ class Va {
|
|
|
1764
1731
|
async verifyActivationKey(t, n) {
|
|
1765
1732
|
if (!this.token.isLoggedIn)
|
|
1766
1733
|
return { error: "not_logged_in" };
|
|
1767
|
-
const { ok:
|
|
1734
|
+
const { ok: a, code: r, message: o } = await this.req.post(
|
|
1768
1735
|
"verify-activation-key",
|
|
1769
1736
|
{ activation_key: t },
|
|
1770
1737
|
null,
|
|
1771
1738
|
{ message: !1, ...n }
|
|
1772
1739
|
);
|
|
1773
|
-
return
|
|
1740
|
+
return a || {
|
|
1774
1741
|
message: o,
|
|
1775
|
-
error:
|
|
1742
|
+
error: r
|
|
1776
1743
|
};
|
|
1777
1744
|
}
|
|
1778
1745
|
/**
|
|
@@ -1786,15 +1753,15 @@ class Va {
|
|
|
1786
1753
|
user_rewards: [],
|
|
1787
1754
|
next_token: ""
|
|
1788
1755
|
};
|
|
1789
|
-
const { data:
|
|
1756
|
+
const { data: a } = await this.req.post(
|
|
1790
1757
|
"event/user-rewards",
|
|
1791
1758
|
c({ max_results: 20, ...t, event_id: this.event }),
|
|
1792
|
-
|
|
1759
|
+
ka,
|
|
1793
1760
|
n
|
|
1794
1761
|
);
|
|
1795
1762
|
return {
|
|
1796
|
-
user_rewards:
|
|
1797
|
-
next_token:
|
|
1763
|
+
user_rewards: a?.user_rewards || [],
|
|
1764
|
+
next_token: a?.next_token || ""
|
|
1798
1765
|
};
|
|
1799
1766
|
}
|
|
1800
1767
|
/**
|
|
@@ -1807,12 +1774,12 @@ class Va {
|
|
|
1807
1774
|
return {
|
|
1808
1775
|
unclaimed: 0
|
|
1809
1776
|
};
|
|
1810
|
-
const { data:
|
|
1777
|
+
const { data: a } = await this.req.get("event/user-rewards-count", va, {
|
|
1811
1778
|
...n,
|
|
1812
1779
|
params: c({ ...t })
|
|
1813
1780
|
});
|
|
1814
1781
|
return {
|
|
1815
|
-
unclaimed:
|
|
1782
|
+
unclaimed: a?.unclaimed || 0
|
|
1816
1783
|
};
|
|
1817
1784
|
}
|
|
1818
1785
|
/**
|
|
@@ -1822,11 +1789,11 @@ class Va {
|
|
|
1822
1789
|
*/
|
|
1823
1790
|
async getUserItemCount(t, n) {
|
|
1824
1791
|
if (!await this.token.autoLogin()) return null;
|
|
1825
|
-
const { data:
|
|
1792
|
+
const { data: a } = await this.req.get(`event/${this.event}/user-item-count`, q, {
|
|
1826
1793
|
...n,
|
|
1827
1794
|
params: { item_id: t }
|
|
1828
1795
|
});
|
|
1829
|
-
return
|
|
1796
|
+
return a?.count ?? null;
|
|
1830
1797
|
}
|
|
1831
1798
|
/**
|
|
1832
1799
|
* 填写实物奖励收货地址,返回 null 表示未登录
|
|
@@ -1835,15 +1802,15 @@ class Va {
|
|
|
1835
1802
|
*/
|
|
1836
1803
|
async submitUserRewardAddress(t, n) {
|
|
1837
1804
|
if (!await this.token.autoLogin()) return null;
|
|
1838
|
-
const { ok:
|
|
1805
|
+
const { ok: a, code: r, message: o } = await this.req.post(
|
|
1839
1806
|
`event/${this.event}/user-reward-address`,
|
|
1840
1807
|
t,
|
|
1841
1808
|
null,
|
|
1842
1809
|
n
|
|
1843
1810
|
);
|
|
1844
|
-
return
|
|
1811
|
+
return a || {
|
|
1845
1812
|
message: o,
|
|
1846
|
-
error:
|
|
1813
|
+
error: r
|
|
1847
1814
|
};
|
|
1848
1815
|
}
|
|
1849
1816
|
/**
|
|
@@ -1855,11 +1822,11 @@ class Va {
|
|
|
1855
1822
|
*/
|
|
1856
1823
|
async getUnlimitQrcodeScene(t, n) {
|
|
1857
1824
|
if (!await this.token.autoLogin()) return null;
|
|
1858
|
-
const { data:
|
|
1825
|
+
const { data: a } = await this.req.get("event/unlimit-qrcode-scene", Ra, {
|
|
1859
1826
|
...n,
|
|
1860
1827
|
params: { params: t }
|
|
1861
1828
|
});
|
|
1862
|
-
return
|
|
1829
|
+
return a?.scene ?? null;
|
|
1863
1830
|
}
|
|
1864
1831
|
/**
|
|
1865
1832
|
* 根据小程序码携带 scene 值,获取对应的前端所需参数
|
|
@@ -1869,11 +1836,11 @@ class Va {
|
|
|
1869
1836
|
* @param scene - 小程序码 scene 值
|
|
1870
1837
|
*/
|
|
1871
1838
|
async getParamsByQrcodeScene(t, n) {
|
|
1872
|
-
const { data:
|
|
1839
|
+
const { data: a } = await this.req.get("event/params-by-qrcode-scene", Ca, {
|
|
1873
1840
|
...n,
|
|
1874
1841
|
params: { scene: t }
|
|
1875
1842
|
});
|
|
1876
|
-
return
|
|
1843
|
+
return a?.params ?? null;
|
|
1877
1844
|
}
|
|
1878
1845
|
/**
|
|
1879
1846
|
* 生成不限制的带参数的小程序码(dataURI 格式的小程序码图片)
|
|
@@ -1882,13 +1849,13 @@ class Va {
|
|
|
1882
1849
|
*/
|
|
1883
1850
|
async generateUnlimitQrcode(t, n) {
|
|
1884
1851
|
if (!await this.token.autoLogin()) return null;
|
|
1885
|
-
const { data:
|
|
1852
|
+
const { data: a } = await this.req.post(
|
|
1886
1853
|
"event/unlimit-qrcode",
|
|
1887
1854
|
c(t),
|
|
1888
|
-
|
|
1855
|
+
Va,
|
|
1889
1856
|
n
|
|
1890
1857
|
);
|
|
1891
|
-
return
|
|
1858
|
+
return a?.img ?? null;
|
|
1892
1859
|
}
|
|
1893
1860
|
/**
|
|
1894
1861
|
* 本接口用于获取任务玩法的实时进度数据,支持部分任务进度的查询:累计充值金额 / 累计游戏内活跃值 / 账号等级目标
|
|
@@ -1897,14 +1864,14 @@ class Va {
|
|
|
1897
1864
|
*/
|
|
1898
1865
|
async getQuestProgress(t, n) {
|
|
1899
1866
|
if (!await this.token.autoLogin()) return null;
|
|
1900
|
-
const { data:
|
|
1867
|
+
const { data: a, code: r, message: o } = await this.req.get(`event/${this.event}/quest-progress`, ja, {
|
|
1901
1868
|
message: !1,
|
|
1902
1869
|
...n,
|
|
1903
1870
|
params: { feature_id: t }
|
|
1904
1871
|
});
|
|
1905
|
-
return
|
|
1872
|
+
return a || {
|
|
1906
1873
|
message: o,
|
|
1907
|
-
error:
|
|
1874
|
+
error: r
|
|
1908
1875
|
};
|
|
1909
1876
|
}
|
|
1910
1877
|
/**
|
|
@@ -1916,15 +1883,15 @@ class Va {
|
|
|
1916
1883
|
*/
|
|
1917
1884
|
async vote2Rewards(t, n) {
|
|
1918
1885
|
if (!await this.token.autoLogin()) return null;
|
|
1919
|
-
const { data:
|
|
1886
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
1920
1887
|
"event/vote2/rewards",
|
|
1921
1888
|
{ feature_id: t, event_id: this.event },
|
|
1922
|
-
|
|
1889
|
+
Ta,
|
|
1923
1890
|
n
|
|
1924
1891
|
);
|
|
1925
|
-
return
|
|
1892
|
+
return a || {
|
|
1926
1893
|
message: o,
|
|
1927
|
-
code:
|
|
1894
|
+
code: r
|
|
1928
1895
|
};
|
|
1929
1896
|
}
|
|
1930
1897
|
/**
|
|
@@ -1934,11 +1901,11 @@ class Va {
|
|
|
1934
1901
|
*/
|
|
1935
1902
|
async getVote2Leaderboard(t, n) {
|
|
1936
1903
|
if (!await this.token.autoLogin()) return [];
|
|
1937
|
-
const { data:
|
|
1904
|
+
const { data: a } = await this.req.get("event/vote2/leaderboard", qa, {
|
|
1938
1905
|
...n,
|
|
1939
1906
|
params: { feature_id: t, event_id: this.event }
|
|
1940
1907
|
});
|
|
1941
|
-
return
|
|
1908
|
+
return a?.candidate_votes || [];
|
|
1942
1909
|
}
|
|
1943
1910
|
/**
|
|
1944
1911
|
* 充值返还玩法的查询接口,查询返还数据
|
|
@@ -1947,13 +1914,13 @@ class Va {
|
|
|
1947
1914
|
*/
|
|
1948
1915
|
async getCashbackQuery(t, n) {
|
|
1949
1916
|
if (!await this.token.autoLogin()) return null;
|
|
1950
|
-
const { data:
|
|
1917
|
+
const { data: a, code: r, message: o } = await this.req.get("event/cashback/query", xa, {
|
|
1951
1918
|
...n,
|
|
1952
1919
|
params: { feature_id: t, event_id: this.event }
|
|
1953
1920
|
});
|
|
1954
|
-
return
|
|
1921
|
+
return a || {
|
|
1955
1922
|
message: o,
|
|
1956
|
-
error:
|
|
1923
|
+
error: r
|
|
1957
1924
|
};
|
|
1958
1925
|
}
|
|
1959
1926
|
/**
|
|
@@ -1963,16 +1930,16 @@ class Va {
|
|
|
1963
1930
|
*/
|
|
1964
1931
|
async getUgcRecord(t, n) {
|
|
1965
1932
|
if (!await this.token.autoLogin()) return null;
|
|
1966
|
-
const { data:
|
|
1933
|
+
const { data: a, code: r, message: o } = await this.req.get("event/ugc/my", M, {
|
|
1967
1934
|
...n,
|
|
1968
1935
|
params: {
|
|
1969
1936
|
max_results: 20,
|
|
1970
1937
|
...t
|
|
1971
1938
|
}
|
|
1972
1939
|
});
|
|
1973
|
-
return
|
|
1940
|
+
return a || {
|
|
1974
1941
|
message: o,
|
|
1975
|
-
error:
|
|
1942
|
+
error: r
|
|
1976
1943
|
};
|
|
1977
1944
|
}
|
|
1978
1945
|
/**
|
|
@@ -1982,15 +1949,15 @@ class Va {
|
|
|
1982
1949
|
*/
|
|
1983
1950
|
async getUgcMyCount(t, n) {
|
|
1984
1951
|
if (!await this.token.autoLogin()) return null;
|
|
1985
|
-
const { data:
|
|
1952
|
+
const { data: a, code: r, message: o } = await this.req.get("event/ugc/my-count", Ua, {
|
|
1986
1953
|
...n,
|
|
1987
1954
|
params: {
|
|
1988
1955
|
...t
|
|
1989
1956
|
}
|
|
1990
1957
|
});
|
|
1991
|
-
return
|
|
1958
|
+
return a || {
|
|
1992
1959
|
message: o,
|
|
1993
|
-
error:
|
|
1960
|
+
error: r
|
|
1994
1961
|
};
|
|
1995
1962
|
}
|
|
1996
1963
|
/**
|
|
@@ -2002,15 +1969,15 @@ class Va {
|
|
|
2002
1969
|
*
|
|
2003
1970
|
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=xhGGpJEbol
|
|
2004
1971
|
*/
|
|
2005
|
-
async ugcUploadImage(t, n,
|
|
1972
|
+
async ugcUploadImage(t, n, a) {
|
|
2006
1973
|
if (!await this.token.autoLogin()) return null;
|
|
2007
|
-
const { data:
|
|
1974
|
+
const { data: r, code: o, message: d } = await this.req.post(
|
|
2008
1975
|
"event/ugc/upload-image",
|
|
2009
1976
|
{ feature_id: t, ...n, event_id: this.event },
|
|
2010
|
-
|
|
2011
|
-
|
|
1977
|
+
Pa,
|
|
1978
|
+
a
|
|
2012
1979
|
);
|
|
2013
|
-
return
|
|
1980
|
+
return r || {
|
|
2014
1981
|
message: d,
|
|
2015
1982
|
error: o
|
|
2016
1983
|
};
|
|
@@ -2021,16 +1988,16 @@ class Va {
|
|
|
2021
1988
|
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=WzvcAPjHAh
|
|
2022
1989
|
*/
|
|
2023
1990
|
async getUgcRecommendation(t, n) {
|
|
2024
|
-
const { data:
|
|
1991
|
+
const { data: a, code: r, message: o } = await this.req.get("event/ugc/recommendation", M, {
|
|
2025
1992
|
...n,
|
|
2026
1993
|
params: {
|
|
2027
1994
|
feature_id: t,
|
|
2028
1995
|
event_id: this.event
|
|
2029
1996
|
}
|
|
2030
1997
|
});
|
|
2031
|
-
return
|
|
1998
|
+
return a || {
|
|
2032
1999
|
message: o,
|
|
2033
|
-
error:
|
|
2000
|
+
error: r
|
|
2034
2001
|
};
|
|
2035
2002
|
}
|
|
2036
2003
|
/**
|
|
@@ -2038,9 +2005,9 @@ class Va {
|
|
|
2038
2005
|
*
|
|
2039
2006
|
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=VRYN6d3rbd
|
|
2040
2007
|
*/
|
|
2041
|
-
async getUgcs(t, n,
|
|
2042
|
-
const { data:
|
|
2043
|
-
...
|
|
2008
|
+
async getUgcs(t, n, a) {
|
|
2009
|
+
const { data: r, code: o, message: d } = await this.req.get("event/ugc/ugcs", La, {
|
|
2010
|
+
...a,
|
|
2044
2011
|
params: {
|
|
2045
2012
|
event_id: this.event,
|
|
2046
2013
|
feature_id: t,
|
|
@@ -2048,7 +2015,7 @@ class Va {
|
|
|
2048
2015
|
...n
|
|
2049
2016
|
}
|
|
2050
2017
|
});
|
|
2051
|
-
return
|
|
2018
|
+
return r || {
|
|
2052
2019
|
message: d,
|
|
2053
2020
|
error: o
|
|
2054
2021
|
};
|
|
@@ -2065,16 +2032,16 @@ class Va {
|
|
|
2065
2032
|
*/
|
|
2066
2033
|
async getUgcLeaderboard(t, n) {
|
|
2067
2034
|
if (!await this.token.autoLogin()) return null;
|
|
2068
|
-
const { data:
|
|
2035
|
+
const { data: a, code: r, message: o } = await this.req.get("event/ugc/leaderboard", Sa, {
|
|
2069
2036
|
...n,
|
|
2070
2037
|
params: {
|
|
2071
2038
|
feature_id: t,
|
|
2072
2039
|
event_id: this.event
|
|
2073
2040
|
}
|
|
2074
2041
|
});
|
|
2075
|
-
return
|
|
2042
|
+
return a || {
|
|
2076
2043
|
message: o,
|
|
2077
|
-
error:
|
|
2044
|
+
error: r
|
|
2078
2045
|
};
|
|
2079
2046
|
}
|
|
2080
2047
|
/**
|
|
@@ -2084,25 +2051,25 @@ class Va {
|
|
|
2084
2051
|
*/
|
|
2085
2052
|
async getRedeemItemStocks(t, n) {
|
|
2086
2053
|
if (!await this.token.autoLogin()) return null;
|
|
2087
|
-
const { data:
|
|
2054
|
+
const { data: a, code: r, message: o } = await this.req.get("event/redeem/item-stocks", Ea, {
|
|
2088
2055
|
...n,
|
|
2089
2056
|
params: {
|
|
2090
2057
|
event_id: this.event,
|
|
2091
2058
|
feature_id: t
|
|
2092
2059
|
}
|
|
2093
2060
|
});
|
|
2094
|
-
return
|
|
2061
|
+
return a || {
|
|
2095
2062
|
message: o,
|
|
2096
|
-
error:
|
|
2063
|
+
error: r
|
|
2097
2064
|
};
|
|
2098
2065
|
}
|
|
2099
2066
|
}
|
|
2100
|
-
const
|
|
2067
|
+
const $a = {
|
|
2101
2068
|
/** 所有人均可以发帖 */
|
|
2102
2069
|
All: "all",
|
|
2103
2070
|
/** 指定用户可发帖 */
|
|
2104
2071
|
Limit: "limit"
|
|
2105
|
-
},
|
|
2072
|
+
}, Fa = e.string().enum($a).lock(), Ia = {
|
|
2106
2073
|
/** 待审核(仅自己可见) */
|
|
2107
2074
|
Pending: "pending",
|
|
2108
2075
|
/** 审核通过 */
|
|
@@ -2111,14 +2078,14 @@ const Fr = {
|
|
|
2111
2078
|
Failed: "failed",
|
|
2112
2079
|
/** 嫌疑(仅自己可见) */
|
|
2113
2080
|
Suspect: "suspect"
|
|
2114
|
-
},
|
|
2081
|
+
}, oe = e.string().enum(Ia).lock(), Da = {
|
|
2115
2082
|
/** 系统通知 */
|
|
2116
2083
|
System: "system",
|
|
2117
2084
|
/** 评论我的 */
|
|
2118
2085
|
Comment: "comment",
|
|
2119
2086
|
/** 点赞通知 */
|
|
2120
2087
|
Like: "like"
|
|
2121
|
-
},
|
|
2088
|
+
}, Vr = e.string().enum(Da).lock(), m = {
|
|
2122
2089
|
/** 系统通知 */
|
|
2123
2090
|
System: "system",
|
|
2124
2091
|
/** 帖子被置顶 */
|
|
@@ -2143,24 +2110,24 @@ const Fr = {
|
|
|
2143
2110
|
ReplyLiked: "reply_liked",
|
|
2144
2111
|
/** 回复被删除 */
|
|
2145
2112
|
ReplyDeleted: "reply_deleted"
|
|
2146
|
-
},
|
|
2113
|
+
}, Aa = e.string().enum(m).lock(), ie = e.object({
|
|
2147
2114
|
forum_id: e.number(),
|
|
2148
2115
|
icon_url: e.string(),
|
|
2149
2116
|
name: e.string(),
|
|
2150
2117
|
tags: e.array(e.string()),
|
|
2151
2118
|
sort: e.number(),
|
|
2152
|
-
mode:
|
|
2119
|
+
mode: Fa,
|
|
2153
2120
|
member_ids: e.array(e.number())
|
|
2154
|
-
}).lock(),
|
|
2121
|
+
}).lock(), F = e.object({
|
|
2155
2122
|
topic_id: e.number(),
|
|
2156
2123
|
cover_url: e.string(),
|
|
2157
2124
|
name: e.string(),
|
|
2158
2125
|
description: e.string(),
|
|
2159
2126
|
tags: e.array(e.string()),
|
|
2160
2127
|
post_num: e.number()
|
|
2161
|
-
}).lock(),
|
|
2128
|
+
}).lock(), I = e.object({
|
|
2162
2129
|
post_id: e.number(),
|
|
2163
|
-
forum:
|
|
2130
|
+
forum: ie,
|
|
2164
2131
|
posted_by: e.string(),
|
|
2165
2132
|
nickname: e.string(),
|
|
2166
2133
|
avatar_url: e.string(),
|
|
@@ -2172,15 +2139,15 @@ const Fr = {
|
|
|
2172
2139
|
comments_num: e.number(),
|
|
2173
2140
|
liked: e.bool(),
|
|
2174
2141
|
image_urls: e.array(e.string()),
|
|
2175
|
-
topics: e.array(
|
|
2142
|
+
topics: e.array(F),
|
|
2176
2143
|
event_ids: e.array(e.number()),
|
|
2177
2144
|
is_pinned: e.bool(),
|
|
2178
2145
|
is_highlighted: e.bool(),
|
|
2179
|
-
status:
|
|
2146
|
+
status: oe,
|
|
2180
2147
|
create_time: e.number()
|
|
2181
|
-
}).lock(),
|
|
2148
|
+
}).lock(), se = e.object({
|
|
2182
2149
|
err_msg: e.string().optional()
|
|
2183
|
-
}).optional().lock(),
|
|
2150
|
+
}).optional().lock(), Ga = e.object({
|
|
2184
2151
|
reply_id: e.number(),
|
|
2185
2152
|
reply_content: e.string().optional(),
|
|
2186
2153
|
replied_by: e.string(),
|
|
@@ -2199,7 +2166,7 @@ const Fr = {
|
|
|
2199
2166
|
content: e.string(),
|
|
2200
2167
|
like_num: e.number(),
|
|
2201
2168
|
liked: e.bool(),
|
|
2202
|
-
reply_to:
|
|
2169
|
+
reply_to: Ga,
|
|
2203
2170
|
create_time: e.number()
|
|
2204
2171
|
}).lock(), k = e.object({
|
|
2205
2172
|
comment_id: e.number(),
|
|
@@ -2219,24 +2186,24 @@ const Fr = {
|
|
|
2219
2186
|
liked: e.bool(),
|
|
2220
2187
|
image_url: e.string(),
|
|
2221
2188
|
create_time: e.number(),
|
|
2222
|
-
status:
|
|
2189
|
+
status: oe,
|
|
2223
2190
|
replies: e.array(C).optional()
|
|
2224
|
-
}).lock(),
|
|
2191
|
+
}).lock(), Oa = e.object({
|
|
2225
2192
|
image_url: e.string(),
|
|
2226
2193
|
upload_url: e.string(),
|
|
2227
2194
|
existed: e.bool()
|
|
2228
|
-
}).lock(),
|
|
2195
|
+
}).lock(), _ = e.object({
|
|
2229
2196
|
notification_id: e.string(),
|
|
2230
|
-
notification_type:
|
|
2197
|
+
notification_type: Aa,
|
|
2231
2198
|
is_read: e.bool(),
|
|
2232
2199
|
create_time: e.number(),
|
|
2233
2200
|
origin_user_id: e.string(),
|
|
2234
2201
|
origin_user_name: e.string(),
|
|
2235
2202
|
origin_user_avatar_url: e.string()
|
|
2236
|
-
}).lock(),
|
|
2203
|
+
}).lock(), Na = e.object({
|
|
2237
2204
|
system_message_subject: e.string(),
|
|
2238
2205
|
system_message_content: e.string()
|
|
2239
|
-
}).lock(),
|
|
2206
|
+
}).lock(), D = e.object({
|
|
2240
2207
|
post_id: e.number(),
|
|
2241
2208
|
post_subject: e.string(),
|
|
2242
2209
|
post_summary: e.string(),
|
|
@@ -2244,84 +2211,84 @@ const Fr = {
|
|
|
2244
2211
|
}).lock(), V = e.object({
|
|
2245
2212
|
comment_id: e.number(),
|
|
2246
2213
|
comment_content: e.string()
|
|
2247
|
-
}).lock(),
|
|
2214
|
+
}).lock(), A = e.object({
|
|
2248
2215
|
reply_id: e.number(),
|
|
2249
2216
|
reply_content: e.string()
|
|
2250
|
-
}).lock(),
|
|
2251
|
-
...
|
|
2252
|
-
...
|
|
2217
|
+
}).lock(), Qa = e.object({
|
|
2218
|
+
..._.shape,
|
|
2219
|
+
...Na.shape,
|
|
2253
2220
|
notification_type: e.string().enum(m.System)
|
|
2254
|
-
}),
|
|
2255
|
-
...
|
|
2256
|
-
...
|
|
2221
|
+
}), Ba = e.object({
|
|
2222
|
+
..._.shape,
|
|
2223
|
+
...D.shape,
|
|
2257
2224
|
notification_type: e.string().enum(
|
|
2258
2225
|
m.PostPinned,
|
|
2259
2226
|
m.PostHighlighted,
|
|
2260
2227
|
m.PostDeleted,
|
|
2261
2228
|
m.PostLiked
|
|
2262
2229
|
)
|
|
2263
|
-
}),
|
|
2264
|
-
...
|
|
2265
|
-
...
|
|
2230
|
+
}), Ma = e.object({
|
|
2231
|
+
..._.shape,
|
|
2232
|
+
...D.shape,
|
|
2266
2233
|
...V.shape,
|
|
2267
2234
|
notification_type: e.string().enum(m.PostCommented)
|
|
2268
|
-
}),
|
|
2269
|
-
...
|
|
2235
|
+
}), Ka = e.object({
|
|
2236
|
+
..._.shape,
|
|
2270
2237
|
...V.shape,
|
|
2271
|
-
...
|
|
2238
|
+
...A.shape,
|
|
2272
2239
|
notification_type: e.string().enum(m.CommentReplied)
|
|
2273
|
-
}),
|
|
2274
|
-
...
|
|
2240
|
+
}), Ha = e.object({
|
|
2241
|
+
..._.shape,
|
|
2275
2242
|
...V.shape,
|
|
2276
|
-
...
|
|
2243
|
+
...D.shape,
|
|
2277
2244
|
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
2278
|
-
}),
|
|
2279
|
-
...
|
|
2280
|
-
...
|
|
2245
|
+
}), za = e.object({
|
|
2246
|
+
..._.shape,
|
|
2247
|
+
...A.shape,
|
|
2281
2248
|
notification_type: e.string().enum(m.ReplyReplied),
|
|
2282
2249
|
comment_id: e.number(),
|
|
2283
2250
|
reply_to_reply_id: e.number(),
|
|
2284
2251
|
reply_to_reply_content: e.string()
|
|
2285
|
-
}),
|
|
2286
|
-
...
|
|
2287
|
-
...
|
|
2252
|
+
}), Ja = e.object({
|
|
2253
|
+
..._.shape,
|
|
2254
|
+
...A.shape,
|
|
2288
2255
|
...V.shape,
|
|
2289
2256
|
notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
|
|
2290
|
-
}),
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
).satisfies().lock(),
|
|
2299
|
-
posts: e.array(
|
|
2257
|
+
}), Za = e.union(
|
|
2258
|
+
Qa,
|
|
2259
|
+
Ba,
|
|
2260
|
+
Ma,
|
|
2261
|
+
Ka,
|
|
2262
|
+
Ha,
|
|
2263
|
+
za,
|
|
2264
|
+
Ja
|
|
2265
|
+
).satisfies().lock(), Xa = i({ forums: e.array(ie) }), Ya = i({ topics: e.array(F) }), Wa = i({ topic: F }), er = i({ post: I }), K = i({
|
|
2266
|
+
posts: e.array(I),
|
|
2300
2267
|
next_token: e.string().optional()
|
|
2301
|
-
}),
|
|
2302
|
-
post:
|
|
2303
|
-
antispam:
|
|
2304
|
-
}),
|
|
2268
|
+
}), tr = i({
|
|
2269
|
+
post: I.clone().optional(),
|
|
2270
|
+
antispam: se.clone().optional()
|
|
2271
|
+
}), nr = i({
|
|
2305
2272
|
replies: e.array(C),
|
|
2306
2273
|
next_token: e.string().optional()
|
|
2307
|
-
}),
|
|
2274
|
+
}), ar = i({ reply: C }), rr = i({
|
|
2308
2275
|
reply: C.clone().optional(),
|
|
2309
|
-
antispam:
|
|
2310
|
-
}),
|
|
2276
|
+
antispam: se.clone().optional()
|
|
2277
|
+
}), or = i({ comment: k }), ir = i({
|
|
2311
2278
|
comments: e.array(k),
|
|
2312
2279
|
next_token: e.string().optional()
|
|
2313
|
-
}),
|
|
2280
|
+
}), sr = i({
|
|
2314
2281
|
comment: k.clone().optional(),
|
|
2315
2282
|
antispam: k.clone().optional()
|
|
2316
|
-
}),
|
|
2317
|
-
notifications: e.array(
|
|
2283
|
+
}), cr = e.guard(Oa), ur = i({
|
|
2284
|
+
notifications: e.array(Za),
|
|
2318
2285
|
next_token: e.string().optional()
|
|
2319
|
-
}),
|
|
2286
|
+
}), lr = i({
|
|
2320
2287
|
system: e.number(),
|
|
2321
2288
|
comment: e.number(),
|
|
2322
2289
|
like: e.number()
|
|
2323
2290
|
});
|
|
2324
|
-
class
|
|
2291
|
+
class jr {
|
|
2325
2292
|
token;
|
|
2326
2293
|
req;
|
|
2327
2294
|
constructor(t) {
|
|
@@ -2333,7 +2300,7 @@ class Ta {
|
|
|
2333
2300
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
2334
2301
|
*/
|
|
2335
2302
|
async getForums(t) {
|
|
2336
|
-
const { data: n } = await this.req.get("community/forums",
|
|
2303
|
+
const { data: n } = await this.req.get("community/forums", Xa, t);
|
|
2337
2304
|
return n?.forums || [];
|
|
2338
2305
|
}
|
|
2339
2306
|
/**
|
|
@@ -2342,7 +2309,7 @@ class Ta {
|
|
|
2342
2309
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
2343
2310
|
*/
|
|
2344
2311
|
async getTopics(t) {
|
|
2345
|
-
const { data: n } = await this.req.get("community/topics",
|
|
2312
|
+
const { data: n } = await this.req.get("community/topics", Ya, t);
|
|
2346
2313
|
return n?.topics || [];
|
|
2347
2314
|
}
|
|
2348
2315
|
/**
|
|
@@ -2351,11 +2318,11 @@ class Ta {
|
|
|
2351
2318
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
2352
2319
|
*/
|
|
2353
2320
|
async getTopic(t, n) {
|
|
2354
|
-
const { data:
|
|
2321
|
+
const { data: a, code: r } = await this.req.get("community/topic", Wa, {
|
|
2355
2322
|
...n,
|
|
2356
2323
|
params: { topic_id: t }
|
|
2357
2324
|
});
|
|
2358
|
-
return
|
|
2325
|
+
return a?.topic ?? { error: r };
|
|
2359
2326
|
}
|
|
2360
2327
|
/**
|
|
2361
2328
|
* 获取社区帖子列表
|
|
@@ -2363,13 +2330,13 @@ class Ta {
|
|
|
2363
2330
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
|
|
2364
2331
|
*/
|
|
2365
2332
|
async getPosts(t, n) {
|
|
2366
|
-
const { data:
|
|
2333
|
+
const { data: a, code: r, message: o } = await this.req.get("community/posts", K, {
|
|
2367
2334
|
...n,
|
|
2368
2335
|
params: c(t)
|
|
2369
2336
|
});
|
|
2370
|
-
return
|
|
2337
|
+
return a ?? {
|
|
2371
2338
|
message: o,
|
|
2372
|
-
error:
|
|
2339
|
+
error: r
|
|
2373
2340
|
};
|
|
2374
2341
|
}
|
|
2375
2342
|
/**
|
|
@@ -2377,10 +2344,10 @@ class Ta {
|
|
|
2377
2344
|
*
|
|
2378
2345
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
|
|
2379
2346
|
*/
|
|
2380
|
-
async getPinnedPosts(t, n,
|
|
2381
|
-
const { data: o, code: d, message: g } = await this.req.get("community/pinned-posts",
|
|
2382
|
-
...
|
|
2383
|
-
params: c({ forum_id: t, max_results: n, next_token:
|
|
2347
|
+
async getPinnedPosts(t, n, a, r) {
|
|
2348
|
+
const { data: o, code: d, message: g } = await this.req.get("community/pinned-posts", K, {
|
|
2349
|
+
...r,
|
|
2350
|
+
params: c({ forum_id: t, max_results: n, next_token: a })
|
|
2384
2351
|
});
|
|
2385
2352
|
return o ?? {
|
|
2386
2353
|
message: g,
|
|
@@ -2393,13 +2360,13 @@ class Ta {
|
|
|
2393
2360
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
2394
2361
|
*/
|
|
2395
2362
|
async getPost(t, n) {
|
|
2396
|
-
const { data:
|
|
2363
|
+
const { data: a, code: r, message: o } = await this.req.get("community/post", er, {
|
|
2397
2364
|
...n,
|
|
2398
2365
|
params: { post_id: t }
|
|
2399
2366
|
});
|
|
2400
|
-
return
|
|
2367
|
+
return a?.post ?? {
|
|
2401
2368
|
message: o,
|
|
2402
|
-
error:
|
|
2369
|
+
error: r
|
|
2403
2370
|
};
|
|
2404
2371
|
}
|
|
2405
2372
|
/**
|
|
@@ -2408,15 +2375,15 @@ class Ta {
|
|
|
2408
2375
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
|
|
2409
2376
|
*/
|
|
2410
2377
|
async post(t, n) {
|
|
2411
|
-
const { data:
|
|
2378
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
2412
2379
|
"community/post",
|
|
2413
2380
|
c(t),
|
|
2414
|
-
|
|
2381
|
+
tr,
|
|
2415
2382
|
n
|
|
2416
2383
|
);
|
|
2417
|
-
return
|
|
2384
|
+
return a ?? {
|
|
2418
2385
|
message: o,
|
|
2419
|
-
error:
|
|
2386
|
+
error: r
|
|
2420
2387
|
};
|
|
2421
2388
|
}
|
|
2422
2389
|
/**
|
|
@@ -2425,13 +2392,13 @@ class Ta {
|
|
|
2425
2392
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
2426
2393
|
*/
|
|
2427
2394
|
async getComments(t, n) {
|
|
2428
|
-
const { data:
|
|
2395
|
+
const { data: a, code: r, message: o } = await this.req.get("community/comments", ir, {
|
|
2429
2396
|
...n,
|
|
2430
2397
|
params: c(t)
|
|
2431
2398
|
});
|
|
2432
|
-
return
|
|
2399
|
+
return a ?? {
|
|
2433
2400
|
message: o,
|
|
2434
|
-
error:
|
|
2401
|
+
error: r
|
|
2435
2402
|
};
|
|
2436
2403
|
}
|
|
2437
2404
|
/**
|
|
@@ -2440,13 +2407,13 @@ class Ta {
|
|
|
2440
2407
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
2441
2408
|
*/
|
|
2442
2409
|
async getComment(t, n) {
|
|
2443
|
-
const { data:
|
|
2410
|
+
const { data: a, code: r, message: o } = await this.req.get("community/comment", or, {
|
|
2444
2411
|
...n,
|
|
2445
2412
|
params: { comment_id: t }
|
|
2446
2413
|
});
|
|
2447
|
-
return
|
|
2414
|
+
return a?.comment ?? {
|
|
2448
2415
|
message: o,
|
|
2449
|
-
error:
|
|
2416
|
+
error: r
|
|
2450
2417
|
};
|
|
2451
2418
|
}
|
|
2452
2419
|
/**
|
|
@@ -2456,15 +2423,15 @@ class Ta {
|
|
|
2456
2423
|
*/
|
|
2457
2424
|
async comment(t, n) {
|
|
2458
2425
|
await this.token.autoLogin();
|
|
2459
|
-
const { data:
|
|
2426
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
2460
2427
|
"community/comment",
|
|
2461
2428
|
c(t),
|
|
2462
|
-
|
|
2429
|
+
sr,
|
|
2463
2430
|
n
|
|
2464
2431
|
);
|
|
2465
|
-
return
|
|
2432
|
+
return a ?? {
|
|
2466
2433
|
message: o,
|
|
2467
|
-
error:
|
|
2434
|
+
error: r
|
|
2468
2435
|
};
|
|
2469
2436
|
}
|
|
2470
2437
|
/**
|
|
@@ -2473,13 +2440,13 @@ class Ta {
|
|
|
2473
2440
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
2474
2441
|
*/
|
|
2475
2442
|
async getReplies(t, n) {
|
|
2476
|
-
const { data:
|
|
2443
|
+
const { data: a } = await this.req.get("community/replies", nr, {
|
|
2477
2444
|
...n,
|
|
2478
2445
|
params: c({ max_results: 20, ...t })
|
|
2479
2446
|
});
|
|
2480
2447
|
return {
|
|
2481
|
-
replies:
|
|
2482
|
-
next_token:
|
|
2448
|
+
replies: a?.replies || [],
|
|
2449
|
+
next_token: a?.next_token || ""
|
|
2483
2450
|
};
|
|
2484
2451
|
}
|
|
2485
2452
|
/**
|
|
@@ -2488,13 +2455,13 @@ class Ta {
|
|
|
2488
2455
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
2489
2456
|
*/
|
|
2490
2457
|
async getReply(t, n) {
|
|
2491
|
-
const { data:
|
|
2458
|
+
const { data: a, code: r, message: o } = await this.req.get("community/reply", ar, {
|
|
2492
2459
|
...n,
|
|
2493
2460
|
params: { reply_id: t }
|
|
2494
2461
|
});
|
|
2495
|
-
return
|
|
2462
|
+
return a?.reply ?? {
|
|
2496
2463
|
message: o,
|
|
2497
|
-
error:
|
|
2464
|
+
error: r
|
|
2498
2465
|
};
|
|
2499
2466
|
}
|
|
2500
2467
|
/**
|
|
@@ -2504,15 +2471,15 @@ class Ta {
|
|
|
2504
2471
|
*/
|
|
2505
2472
|
async reply(t, n) {
|
|
2506
2473
|
await this.token.autoLogin();
|
|
2507
|
-
const { data:
|
|
2474
|
+
const { data: a, code: r, message: o } = await this.req.post(
|
|
2508
2475
|
"community/reply",
|
|
2509
2476
|
c(t),
|
|
2510
|
-
|
|
2477
|
+
rr,
|
|
2511
2478
|
n
|
|
2512
2479
|
);
|
|
2513
|
-
return
|
|
2480
|
+
return a ?? {
|
|
2514
2481
|
message: o,
|
|
2515
|
-
error:
|
|
2482
|
+
error: r
|
|
2516
2483
|
};
|
|
2517
2484
|
}
|
|
2518
2485
|
/**
|
|
@@ -2522,15 +2489,15 @@ class Ta {
|
|
|
2522
2489
|
*/
|
|
2523
2490
|
async like(t, n) {
|
|
2524
2491
|
await this.token.autoLogin();
|
|
2525
|
-
const { ok:
|
|
2492
|
+
const { ok: a, code: r, message: o } = await this.req.post(
|
|
2526
2493
|
"community/like",
|
|
2527
2494
|
{ ...t, action: "like" },
|
|
2528
2495
|
null,
|
|
2529
2496
|
n
|
|
2530
2497
|
);
|
|
2531
|
-
return
|
|
2498
|
+
return a || {
|
|
2532
2499
|
message: o,
|
|
2533
|
-
error:
|
|
2500
|
+
error: r
|
|
2534
2501
|
};
|
|
2535
2502
|
}
|
|
2536
2503
|
/**
|
|
@@ -2540,15 +2507,15 @@ class Ta {
|
|
|
2540
2507
|
*/
|
|
2541
2508
|
async unlike(t, n) {
|
|
2542
2509
|
await this.token.autoLogin();
|
|
2543
|
-
const { ok:
|
|
2510
|
+
const { ok: a, code: r, message: o } = await this.req.post(
|
|
2544
2511
|
"community/like",
|
|
2545
2512
|
{ ...t, action: "unlike" },
|
|
2546
2513
|
null,
|
|
2547
2514
|
n
|
|
2548
2515
|
);
|
|
2549
|
-
return
|
|
2516
|
+
return a || {
|
|
2550
2517
|
message: o,
|
|
2551
|
-
error:
|
|
2518
|
+
error: r
|
|
2552
2519
|
};
|
|
2553
2520
|
}
|
|
2554
2521
|
/**
|
|
@@ -2558,11 +2525,11 @@ class Ta {
|
|
|
2558
2525
|
*/
|
|
2559
2526
|
async getMediaPresignedUrl(t, n) {
|
|
2560
2527
|
await this.token.autoLogin();
|
|
2561
|
-
const { data:
|
|
2528
|
+
const { data: a } = await this.req.get("community/media-presign-url", cr, {
|
|
2562
2529
|
...n,
|
|
2563
2530
|
params: t
|
|
2564
2531
|
});
|
|
2565
|
-
return
|
|
2532
|
+
return a;
|
|
2566
2533
|
}
|
|
2567
2534
|
/**
|
|
2568
2535
|
* 获取用户社区通知
|
|
@@ -2573,13 +2540,13 @@ class Ta {
|
|
|
2573
2540
|
*/
|
|
2574
2541
|
async getNotifications(t, n) {
|
|
2575
2542
|
await this.token.autoLogin();
|
|
2576
|
-
const { data:
|
|
2543
|
+
const { data: a } = await this.req.get("community/notifications", ur, {
|
|
2577
2544
|
...n,
|
|
2578
2545
|
params: c({ max_results: 20, ...t })
|
|
2579
2546
|
});
|
|
2580
2547
|
return {
|
|
2581
|
-
notifications:
|
|
2582
|
-
next_token:
|
|
2548
|
+
notifications: a?.notifications || [],
|
|
2549
|
+
next_token: a?.next_token || ""
|
|
2583
2550
|
};
|
|
2584
2551
|
}
|
|
2585
2552
|
/**
|
|
@@ -2591,7 +2558,7 @@ class Ta {
|
|
|
2591
2558
|
if (!await this.token.autoLogin()) return null;
|
|
2592
2559
|
const { data: n } = await this.req.get(
|
|
2593
2560
|
"community/unread-notifications-count",
|
|
2594
|
-
|
|
2561
|
+
lr,
|
|
2595
2562
|
t
|
|
2596
2563
|
);
|
|
2597
2564
|
return n;
|
|
@@ -2603,21 +2570,21 @@ class Ta {
|
|
|
2603
2570
|
*/
|
|
2604
2571
|
async clearUnreadNotifications(t, n) {
|
|
2605
2572
|
if (!await this.token.autoLogin()) return !1;
|
|
2606
|
-
const { ok:
|
|
2607
|
-
return
|
|
2573
|
+
const { ok: a } = await this.req.post("community/clear-unread-notifications", { category: t }, null, n);
|
|
2574
|
+
return a;
|
|
2608
2575
|
}
|
|
2609
2576
|
}
|
|
2610
|
-
const
|
|
2577
|
+
const mr = i({
|
|
2611
2578
|
nonce_str: e.string(),
|
|
2612
2579
|
timestamp: e.number(),
|
|
2613
2580
|
signature: e.string()
|
|
2614
2581
|
});
|
|
2615
|
-
var
|
|
2616
|
-
function
|
|
2617
|
-
return
|
|
2582
|
+
var dr = /* @__PURE__ */ ((s) => (s.RedirectUriDisMatch = "10003", s.AppidError = "10016", s.AuthorizationError = "10015", s.NoRightForScope = "10005", s.Frequently = "10009", s.AppBanded = "10004", s.ShouldFollow = "10006", s.ScopeNull = "10010", s.RedirectUriNull = "10011", s.AppidNull = "10012", s.StateNull = "10013", s))(dr || {});
|
|
2583
|
+
function x(s) {
|
|
2584
|
+
return y(s, "open_id", "union_id", "weixin_token");
|
|
2618
2585
|
}
|
|
2619
|
-
const
|
|
2620
|
-
class
|
|
2586
|
+
const H = "wx_login_cache";
|
|
2587
|
+
class Tr {
|
|
2621
2588
|
token;
|
|
2622
2589
|
$appid;
|
|
2623
2590
|
req;
|
|
@@ -2648,11 +2615,11 @@ class qa {
|
|
|
2648
2615
|
* 也可以直接调用 login 方法,并传入 weixin code 的读取函数
|
|
2649
2616
|
*/
|
|
2650
2617
|
async getLoginCache() {
|
|
2651
|
-
const t = this.token.storage.get(
|
|
2618
|
+
const t = this.token.storage.get(H);
|
|
2652
2619
|
if (!t)
|
|
2653
2620
|
return null;
|
|
2654
|
-
const n =
|
|
2655
|
-
return
|
|
2621
|
+
const n = he(t);
|
|
2622
|
+
return x(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
|
|
2656
2623
|
}
|
|
2657
2624
|
/**
|
|
2658
2625
|
* 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
|
|
@@ -2672,18 +2639,18 @@ class qa {
|
|
|
2672
2639
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
|
|
2673
2640
|
*/
|
|
2674
2641
|
async login(t) {
|
|
2675
|
-
if (!
|
|
2642
|
+
if (!f())
|
|
2676
2643
|
throw new Error("当前环境非微信小程序");
|
|
2677
2644
|
const n = await this.getLoginCache();
|
|
2678
2645
|
if (n)
|
|
2679
2646
|
return n;
|
|
2680
|
-
const
|
|
2647
|
+
const a = await ve(), { data: r, code: o, message: d } = await this.req.post(
|
|
2681
2648
|
"weixin/login",
|
|
2682
|
-
{ code:
|
|
2683
|
-
|
|
2649
|
+
{ code: a, appid: this.appid },
|
|
2650
|
+
x,
|
|
2684
2651
|
{ ...t, message: !1 }
|
|
2685
2652
|
);
|
|
2686
|
-
return
|
|
2653
|
+
return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(H, JSON.stringify(r))), r ?? {
|
|
2687
2654
|
message: d,
|
|
2688
2655
|
error: o
|
|
2689
2656
|
};
|
|
@@ -2705,29 +2672,29 @@ class qa {
|
|
|
2705
2672
|
* - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
|
|
2706
2673
|
*/
|
|
2707
2674
|
async webLogin(t = "snsapi_userinfo", n) {
|
|
2708
|
-
const
|
|
2709
|
-
if (!
|
|
2710
|
-
const
|
|
2675
|
+
const a = L("code"), r = Date.now(), o = +L("state");
|
|
2676
|
+
if (!a || !o || o < r - 1e3 * 60 * 5 || o > r) {
|
|
2677
|
+
const le = G(["code", "state"]);
|
|
2711
2678
|
location.replace(
|
|
2712
|
-
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(
|
|
2679
|
+
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(le)}&response_type=code&scope=${t}&state=${r}#wechat_redirect`
|
|
2713
2680
|
);
|
|
2714
2681
|
return;
|
|
2715
2682
|
}
|
|
2716
|
-
if (/^100\d{2}$/.test(
|
|
2683
|
+
if (/^100\d{2}$/.test(a))
|
|
2717
2684
|
return {
|
|
2718
|
-
message: "Error: " +
|
|
2719
|
-
error:
|
|
2685
|
+
message: "Error: " + a,
|
|
2686
|
+
error: a
|
|
2720
2687
|
};
|
|
2721
|
-
const d =
|
|
2688
|
+
const d = G(["code", "state"]);
|
|
2722
2689
|
"replaceState" in history && history.replaceState({}, "", d);
|
|
2723
2690
|
const {
|
|
2724
2691
|
data: g,
|
|
2725
|
-
code:
|
|
2726
|
-
message:
|
|
2727
|
-
} = await this.req.post("weixin/login", { code:
|
|
2692
|
+
code: ce,
|
|
2693
|
+
message: ue
|
|
2694
|
+
} = await this.req.post("weixin/login", { code: a, appid: this.appid }, x, n);
|
|
2728
2695
|
return g && (this.token.weixinToken = g.weixin_token, await this.token.autoLogin()), g ?? {
|
|
2729
|
-
message:
|
|
2730
|
-
error:
|
|
2696
|
+
message: ue,
|
|
2697
|
+
error: ce
|
|
2731
2698
|
};
|
|
2732
2699
|
}
|
|
2733
2700
|
/**
|
|
@@ -2742,14 +2709,14 @@ class qa {
|
|
|
2742
2709
|
* @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
|
|
2743
2710
|
* @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
|
|
2744
2711
|
*/
|
|
2745
|
-
async linkPlayer(t, n,
|
|
2712
|
+
async linkPlayer(t, n, a) {
|
|
2746
2713
|
if (!t || !n)
|
|
2747
2714
|
return !1;
|
|
2748
|
-
const { ok:
|
|
2749
|
-
...
|
|
2715
|
+
const { ok: r } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: n }, null, {
|
|
2716
|
+
...a,
|
|
2750
2717
|
message: !1
|
|
2751
2718
|
});
|
|
2752
|
-
return
|
|
2719
|
+
return r;
|
|
2753
2720
|
}
|
|
2754
2721
|
/**
|
|
2755
2722
|
* 获取集成 JSSDK 所需的签名信息
|
|
@@ -2757,7 +2724,7 @@ class qa {
|
|
|
2757
2724
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
|
|
2758
2725
|
*/
|
|
2759
2726
|
async getJSSDKConfig(t) {
|
|
2760
|
-
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign",
|
|
2727
|
+
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", mr, {
|
|
2761
2728
|
...t,
|
|
2762
2729
|
params: {
|
|
2763
2730
|
appid: this.appid,
|
|
@@ -2773,171 +2740,171 @@ class qa {
|
|
|
2773
2740
|
}
|
|
2774
2741
|
}
|
|
2775
2742
|
export {
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2743
|
+
se as AntispamValidator,
|
|
2744
|
+
br as AuthToken,
|
|
2745
|
+
Wn as CandidateVoteValidator,
|
|
2779
2746
|
ae as CashbackEngagementDataValidator,
|
|
2780
|
-
|
|
2781
|
-
|
|
2747
|
+
Tn as ClaimActivationKeyEngagementDataValidator,
|
|
2748
|
+
ct as ClaimRewardStatus,
|
|
2782
2749
|
P as ClaimRewardStatusValidator,
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2750
|
+
ua as ClaimedItemValidator,
|
|
2751
|
+
Z as ClubAddressValidator,
|
|
2752
|
+
hr as ClubApi,
|
|
2753
|
+
X as ClubBenefitSummaryValidator,
|
|
2754
|
+
Ge as ClubBenefitValidator,
|
|
2755
|
+
Te as ClubCreditChangeScene,
|
|
2756
|
+
qe as ClubCreditChangeSceneValidator,
|
|
2757
|
+
Ve as ClubCreditChangeType,
|
|
2758
|
+
je as ClubCreditChangeTypeValidator,
|
|
2759
|
+
Ae as ClubCreditLogValidator,
|
|
2793
2760
|
Pe as ClubGlobalConfigValidator,
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2761
|
+
xe as ClubItemType,
|
|
2762
|
+
z as ClubItemTypeValidator,
|
|
2763
|
+
Se as ClubPlayerValidator,
|
|
2764
|
+
Y as ClubProductValidator,
|
|
2765
|
+
Le as ClubRedemptionStatus,
|
|
2799
2766
|
Ue as ClubRedemptionStatusValidator,
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2767
|
+
De as ClubUserCreditValidator,
|
|
2768
|
+
Ie as ClubUserProfileValidator,
|
|
2769
|
+
na as CommentEngagementValidator,
|
|
2803
2770
|
k as CommentValidator,
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2771
|
+
jr as CommunityApi,
|
|
2772
|
+
ea as ConversationValidator,
|
|
2773
|
+
et as EngageAccountType,
|
|
2774
|
+
tt as EngageAccountTypeValidator,
|
|
2775
|
+
ca as EngageResponseValidator,
|
|
2776
|
+
ra as EngageRewardValidator,
|
|
2777
|
+
Cr as EventApi,
|
|
2778
|
+
jn as EventConfigValidator,
|
|
2779
|
+
Vt as EventFeatureConfigOfCashbackValidator,
|
|
2780
|
+
Tt as EventFeatureConfigOfCheckInValidator,
|
|
2781
|
+
xt as EventFeatureConfigOfClaimActivationKeyValidator,
|
|
2815
2782
|
Ut as EventFeatureConfigOfClaimRewardsValidator,
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2783
|
+
St as EventFeatureConfigOfCommentValidator,
|
|
2784
|
+
$t as EventFeatureConfigOfFollowValidator,
|
|
2785
|
+
Dt as EventFeatureConfigOfGiftCodeValidator,
|
|
2786
|
+
Gt as EventFeatureConfigOfInviteValidator,
|
|
2787
|
+
Nt as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2788
|
+
zt as EventFeatureConfigOfLotteryDrawValidator,
|
|
2789
|
+
Kt as EventFeatureConfigOfLotteryValidator,
|
|
2790
|
+
Zt as EventFeatureConfigOfPreregisterValidator,
|
|
2791
|
+
Yt as EventFeatureConfigOfQuestValidator,
|
|
2792
|
+
tn as EventFeatureConfigOfRedeemValidator,
|
|
2826
2793
|
an as EventFeatureConfigOfRegisterValidator,
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2794
|
+
on as EventFeatureConfigOfShareValidator,
|
|
2795
|
+
cn as EventFeatureConfigOfSubscribeValidator,
|
|
2796
|
+
ln as EventFeatureConfigOfSurveyValidator,
|
|
2797
|
+
dn as EventFeatureConfigOfTeamValidator,
|
|
2798
|
+
bn as EventFeatureConfigOfUgcLikeValidator,
|
|
2799
|
+
pn as EventFeatureConfigOfUgcValidator,
|
|
2800
|
+
vn as EventFeatureConfigOfVote2Validator,
|
|
2801
|
+
fn as EventFeatureConfigOfVoteValidator,
|
|
2802
|
+
Vn as EventFeatureConfigValidator,
|
|
2803
|
+
nt as EventPeriodType,
|
|
2837
2804
|
at as EventPeriodTypeValidator,
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2805
|
+
p as EventRewardItemConfigValidator,
|
|
2806
|
+
Ne as ExtraGameRewardValidator,
|
|
2807
|
+
Oe as ExtraPhysicalShipmentValidator,
|
|
2808
|
+
en as FeatureRedeemItemConfigValidator,
|
|
2809
|
+
Rt as FeatureRewardValidator,
|
|
2843
2810
|
u as FeatureType,
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2811
|
+
rt as FeatureTypeValidator,
|
|
2812
|
+
$a as ForumMode,
|
|
2813
|
+
Fa as ForumModeValidator,
|
|
2814
|
+
ie as ForumValidator,
|
|
2848
2815
|
v as GamerItemType,
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2816
|
+
W as GamerItemTypeValidator,
|
|
2817
|
+
Re as Gender,
|
|
2818
|
+
Ce as GenderValidator,
|
|
2819
|
+
qn as GiftCodeEngagementDataValidator,
|
|
2820
|
+
xn as InviteEngagementDataValidator,
|
|
2821
|
+
gt as LotteryDrawAction,
|
|
2822
|
+
vr as LotteryDrawActionValidator,
|
|
2823
|
+
Sn as LotteryDrawEngagementDataValidator,
|
|
2824
|
+
Ln as LotteryEngagementDataValidator,
|
|
2858
2825
|
w as LotteryTicketStatus,
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2826
|
+
wr as LotteryTicketStatusValidator,
|
|
2827
|
+
_ as NotificationBaseValidator,
|
|
2828
|
+
Da as NotificationCategory,
|
|
2829
|
+
Vr as NotificationCategoryValidator,
|
|
2830
|
+
Ka as NotificationCommentReplyValidator,
|
|
2831
|
+
Ha as NotificationCommentValidator,
|
|
2865
2832
|
V as NotificationPayloadCommentValidator,
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2833
|
+
D as NotificationPayloadPostValidator,
|
|
2834
|
+
A as NotificationPayloadReplyValidator,
|
|
2835
|
+
Na as NotificationPayloadSystemValidator,
|
|
2836
|
+
Ma as NotificationPostCommentValidator,
|
|
2837
|
+
Ba as NotificationPostValidator,
|
|
2838
|
+
za as NotificationReplyRepliedValidator,
|
|
2839
|
+
Ja as NotificationReplyValidator,
|
|
2840
|
+
Qa as NotificationSystemValidator,
|
|
2874
2841
|
m as NotificationType,
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2842
|
+
Aa as NotificationTypeValidator,
|
|
2843
|
+
Za as NotificationValidator,
|
|
2844
|
+
Fe as PlayerRoleCardValidator,
|
|
2845
|
+
J as PlayerRoleValidator,
|
|
2846
|
+
Ia as PostStatus,
|
|
2847
|
+
oe as PostStatusValidator,
|
|
2848
|
+
I as PostValidator,
|
|
2849
|
+
En as PreregisterEngagementDataValidator,
|
|
2850
|
+
Oa as PresignedUrlResponseValidator,
|
|
2851
|
+
$n as QuestEngagementDataValidator,
|
|
2852
|
+
ot as QuestObjective,
|
|
2853
|
+
te as QuestObjectiveValidator,
|
|
2854
|
+
pt as QuestProgressAlgorithm,
|
|
2855
|
+
_t as QuestProgressAlgorithmValidator,
|
|
2856
|
+
Fn as QuestProgressValidator,
|
|
2857
|
+
In as RedeemEngagementDataValidator,
|
|
2858
|
+
yr as RedeemParamsValidator,
|
|
2859
|
+
Dn as RedeemStocksResponseValidator,
|
|
2860
|
+
Qe as RedemptionValidator,
|
|
2861
|
+
vt as RegularRewardValidator,
|
|
2862
|
+
Ga as ReplyToValidator,
|
|
2896
2863
|
C as ReplyValidator,
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2864
|
+
fr as RewardItemType,
|
|
2865
|
+
ee as RewardItemTypeValidator,
|
|
2866
|
+
ut as RewardSource,
|
|
2867
|
+
S as RewardSourceValidator,
|
|
2868
|
+
b as RewardStatus,
|
|
2869
|
+
ne as RewardStatusValidator,
|
|
2870
|
+
aa as RewardValidator,
|
|
2871
|
+
$e as RoleBaseInfoValidator,
|
|
2872
|
+
Ee as ServerBaseInfoValidator,
|
|
2873
|
+
An as ShareEngagementDataValidator,
|
|
2874
|
+
On as SurveyEngagementDataValidator,
|
|
2875
|
+
dt as TeamAction,
|
|
2876
|
+
kr as TeamActionValidator,
|
|
2877
|
+
Qn as TeamEngagementDataValidator,
|
|
2878
|
+
Nn as TeamEngagementValidator,
|
|
2879
|
+
Rr as TeamMemberValidator,
|
|
2880
|
+
lt as TeamVisibility,
|
|
2881
|
+
mt as TeamVisibilityValidator,
|
|
2882
|
+
F as TopicValidator,
|
|
2883
|
+
Hn as UgcCountResponseValidator,
|
|
2884
|
+
Bn as UgcEngagementDataValidator,
|
|
2885
|
+
Jn as UgcLeaderboardResponseValidator,
|
|
2886
|
+
Mn as UgcRecordBaseResponseValidator,
|
|
2887
|
+
Kn as UgcRecordResponseValidator,
|
|
2888
|
+
ft as UgcReviewStatus,
|
|
2889
|
+
wt as UgcReviewStatusValidator,
|
|
2890
|
+
ht as UgcSocialMedia,
|
|
2891
|
+
E as UgcSocialMediaValidator,
|
|
2892
|
+
zn as UgcUploadImageValidator,
|
|
2893
|
+
$ as UserEngagementDataValidator,
|
|
2894
|
+
oa as UserEngagementValidator,
|
|
2895
|
+
sa as UserFeatureStatusValidator,
|
|
2929
2896
|
R as UserRewardValidator,
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2897
|
+
ia as VerifyMobileResultValidator,
|
|
2898
|
+
Yn as Vote2ClaimRewardsResponseValidator,
|
|
2899
|
+
Xn as Vote2EngagementDataValidator,
|
|
2900
|
+
bt as Vote2RewardType,
|
|
2901
|
+
yt as Vote2RewardTypeValidator,
|
|
2902
|
+
Zn as VoteEngagementDataValidator,
|
|
2903
|
+
it as VoteOptionSource,
|
|
2904
|
+
st as VoteOptionSourceValidator,
|
|
2905
|
+
Tr as WeixinApi,
|
|
2906
|
+
Gn as WeixinSubscribeEngagementDataValidator,
|
|
2907
|
+
dr as WeixinWebLoginErrorCode,
|
|
2908
|
+
ta as ZeroChatGPTDataValidator,
|
|
2909
|
+
mr as isWeixinSignResponse
|
|
2943
2910
|
};
|