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