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