@seayoo-web/gamer-api 2.5.3 → 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 +854 -857
- package/package.json +3 -3
- package/types/src/event.config.d.ts +0 -228
package/dist/index.js
CHANGED
|
@@ -1,80 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { isPlainObject as V, useConsole as pe, Support as y, usePromise as _e, pruneURL as be, queryString as P, pruneObject as c, v as e, omitFields as R, typedObjectGuard as s, parseJSON as ye, removePara as M } from "@seayoo-web/utils";
|
|
6
|
-
function fe(a) {
|
|
7
|
-
return V(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 Sr {
|
|
|
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 Sr {
|
|
|
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 Sr {
|
|
|
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 Sr {
|
|
|
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 Sr {
|
|
|
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 Sr {
|
|
|
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 Sr {
|
|
|
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
|
-
...
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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 Er {
|
|
|
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,96 +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
|
-
}),
|
|
1028
|
+
}), en = u.ZeroChatgpt, tn = e.object({
|
|
1032
1029
|
...l.shape,
|
|
1033
|
-
feature_type: e.string().enum(
|
|
1034
|
-
}),
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1030
|
+
feature_type: e.string().enum(en)
|
|
1031
|
+
}), nn = e.union(
|
|
1032
|
+
gt,
|
|
1033
|
+
_t,
|
|
1034
|
+
ht,
|
|
1035
|
+
kt,
|
|
1036
|
+
Ct,
|
|
1039
1037
|
jt,
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1038
|
+
qt,
|
|
1039
|
+
St,
|
|
1040
|
+
$t,
|
|
1041
|
+
Ft,
|
|
1042
|
+
It,
|
|
1043
|
+
At,
|
|
1044
|
+
Ot,
|
|
1045
|
+
Mt,
|
|
1046
|
+
Kt,
|
|
1047
|
+
zt,
|
|
1048
|
+
Zt,
|
|
1051
1049
|
Wt,
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
).key("feature_type").satisfies(), sn = e.object({
|
|
1050
|
+
yt,
|
|
1051
|
+
tn
|
|
1052
|
+
).key("feature_type").satisfies(), rn = e.object({
|
|
1056
1053
|
event_name: e.string(),
|
|
1057
1054
|
rules: e.string(),
|
|
1058
1055
|
since: e.number(),
|
|
1059
1056
|
until: e.number(),
|
|
1060
1057
|
visit_count: e.number().optional(),
|
|
1061
|
-
features: e.array(
|
|
1062
|
-
}).lock(),
|
|
1063
|
-
order_total_amount:
|
|
1064
|
-
cashback_total_amount:
|
|
1065
|
-
game_item_count:
|
|
1066
|
-
}),
|
|
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({
|
|
1067
1064
|
activation_key: e.string().disallow("")
|
|
1068
|
-
}),
|
|
1065
|
+
}), sn = e.object({
|
|
1069
1066
|
gift_code: e.string()
|
|
1070
|
-
}),
|
|
1067
|
+
}), cn = e.object({
|
|
1071
1068
|
user_id: e.string(),
|
|
1072
1069
|
name: e.string().optional(),
|
|
1073
1070
|
avatar_url: e.string().optional()
|
|
1074
|
-
}),
|
|
1071
|
+
}), un = e.object({
|
|
1075
1072
|
lottery_count: e.number()
|
|
1076
|
-
}),
|
|
1073
|
+
}), D = e.object({
|
|
1077
1074
|
reward_id: e.number(),
|
|
1078
1075
|
reward_item_id: e.number(),
|
|
1079
|
-
reward_source:
|
|
1076
|
+
reward_source: U,
|
|
1080
1077
|
reward_item_name: e.string(),
|
|
1081
|
-
reward_item_type:
|
|
1078
|
+
reward_item_type: te,
|
|
1082
1079
|
reward_item_icon_url: e.string(),
|
|
1083
1080
|
reward_item_desc: e.string().optional(),
|
|
1084
1081
|
reward_item_rating: e.number(),
|
|
1085
1082
|
reward_amount: e.number(),
|
|
1086
|
-
reward_status:
|
|
1083
|
+
reward_status: $,
|
|
1087
1084
|
event_id: e.number(),
|
|
1088
1085
|
event_name: e.string(),
|
|
1089
1086
|
feature_id: e.number(),
|
|
1090
1087
|
engagement_id: e.number(),
|
|
1091
|
-
feature_type:
|
|
1088
|
+
feature_type: et,
|
|
1092
1089
|
receive_time: e.number(),
|
|
1093
1090
|
extra_data: e.record(e.unknown()).optional()
|
|
1094
|
-
}),
|
|
1091
|
+
}), ln = e.string().enum(k.Unknown, k.Pending), mn = e.union(
|
|
1095
1092
|
e.object({
|
|
1096
1093
|
ticket: e.string(),
|
|
1097
|
-
status:
|
|
1094
|
+
status: ln
|
|
1098
1095
|
}),
|
|
1099
1096
|
e.object({
|
|
1100
1097
|
ticket: e.string(),
|
|
1101
|
-
status: e.string().enum(
|
|
1102
|
-
reward:
|
|
1098
|
+
status: e.string().enum(V(k, "Unknown", "Pending")),
|
|
1099
|
+
reward: D
|
|
1103
1100
|
})
|
|
1104
|
-
).satisfies(),
|
|
1105
|
-
tickets: e.array(
|
|
1106
|
-
}),
|
|
1101
|
+
).satisfies(), dn = e.object({
|
|
1102
|
+
tickets: e.array(mn)
|
|
1103
|
+
}), gn = e.object({
|
|
1107
1104
|
platforms: e.array(e.string())
|
|
1108
|
-
}),
|
|
1109
|
-
objective:
|
|
1105
|
+
}), pn = e.object({
|
|
1106
|
+
objective: re,
|
|
1110
1107
|
progress: e.number(),
|
|
1111
1108
|
completion_value: e.number().optional(),
|
|
1112
1109
|
team: e.object({
|
|
@@ -1121,24 +1118,24 @@ const j = {
|
|
|
1121
1118
|
})
|
|
1122
1119
|
)
|
|
1123
1120
|
}).optional()
|
|
1124
|
-
}),
|
|
1121
|
+
}), _n = e.object({
|
|
1125
1122
|
platform: e.string()
|
|
1126
|
-
}),
|
|
1123
|
+
}), bn = e.object({
|
|
1127
1124
|
weixin_openid: e.string()
|
|
1128
|
-
}),
|
|
1125
|
+
}), yn = e.object({
|
|
1129
1126
|
serial_number: e.number()
|
|
1130
|
-
}),
|
|
1127
|
+
}), fn = e.object({
|
|
1131
1128
|
team_code: e.string(),
|
|
1132
1129
|
leader_name: e.string(),
|
|
1133
1130
|
total_members: e.number()
|
|
1134
|
-
}),
|
|
1131
|
+
}), $r = e.object({
|
|
1135
1132
|
is_leader: e.bool(),
|
|
1136
1133
|
is_myself: e.bool().optional(),
|
|
1137
1134
|
role_name: e.string(),
|
|
1138
1135
|
server_name: e.string()
|
|
1139
|
-
}),
|
|
1136
|
+
}), hn = e.object({
|
|
1140
1137
|
team_code: e.string(),
|
|
1141
|
-
visibility:
|
|
1138
|
+
visibility: ot,
|
|
1142
1139
|
members: e.array(
|
|
1143
1140
|
e.object({
|
|
1144
1141
|
is_leader: e.bool(),
|
|
@@ -1146,137 +1143,137 @@ const j = {
|
|
|
1146
1143
|
server_name: e.string()
|
|
1147
1144
|
})
|
|
1148
1145
|
)
|
|
1149
|
-
}),
|
|
1146
|
+
}), wn = e.object({
|
|
1150
1147
|
option_sn: e.string()
|
|
1151
|
-
}),
|
|
1148
|
+
}), kn = e.object({
|
|
1152
1149
|
role: e.string(),
|
|
1153
1150
|
content: e.string()
|
|
1154
|
-
}),
|
|
1155
|
-
conversations: e.array(
|
|
1156
|
-
}),
|
|
1151
|
+
}), vn = e.object({
|
|
1152
|
+
conversations: e.array(kn)
|
|
1153
|
+
}), Cn = e.object({
|
|
1157
1154
|
user_id: e.string(),
|
|
1158
1155
|
name: e.string(),
|
|
1159
1156
|
avatar_url: e.string(),
|
|
1160
1157
|
comment: e.string(),
|
|
1161
1158
|
video_note: e.number(),
|
|
1162
1159
|
created_at: e.number()
|
|
1163
|
-
}),
|
|
1164
|
-
|
|
1165
|
-
|
|
1160
|
+
}), I = e.union(
|
|
1161
|
+
gn,
|
|
1162
|
+
un,
|
|
1163
|
+
yn,
|
|
1164
|
+
cn,
|
|
1165
|
+
_n,
|
|
1166
1166
|
wn,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1167
|
+
bn,
|
|
1168
|
+
an,
|
|
1169
|
+
sn,
|
|
1170
1170
|
hn,
|
|
1171
|
-
|
|
1172
|
-
|
|
1171
|
+
pn,
|
|
1172
|
+
dn,
|
|
1173
|
+
on,
|
|
1173
1174
|
vn,
|
|
1174
|
-
yn,
|
|
1175
|
-
_n,
|
|
1176
|
-
un,
|
|
1177
|
-
Rn,
|
|
1178
1175
|
e.custom(
|
|
1179
1176
|
"EmptyObject",
|
|
1180
|
-
(
|
|
1177
|
+
(o) => C(o) && Object.keys(o).length === 0
|
|
1181
1178
|
)
|
|
1182
|
-
).satisfies().lock(),
|
|
1179
|
+
).satisfies().lock(), Vn = e.object({
|
|
1183
1180
|
reward_id: e.number(),
|
|
1184
1181
|
reward_item_id: e.number(),
|
|
1185
|
-
reward_item_type:
|
|
1182
|
+
reward_item_type: ne,
|
|
1186
1183
|
reward_count: e.number(),
|
|
1187
|
-
reward_status:
|
|
1188
|
-
reward_source:
|
|
1184
|
+
reward_status: ae,
|
|
1185
|
+
reward_source: U,
|
|
1189
1186
|
reward_item_name: e.string(),
|
|
1190
1187
|
reward_item_icon_url: e.string(),
|
|
1191
1188
|
reward_item_desc: e.string().optional(),
|
|
1192
1189
|
reward_item_rating: e.number(),
|
|
1193
1190
|
receive_time: e.number(),
|
|
1194
|
-
extra_data: e.union(...
|
|
1195
|
-
}),
|
|
1191
|
+
extra_data: e.union(...I.validators, e.record(e.unknown())).satisfies().optional()
|
|
1192
|
+
}), Rn = e.object({
|
|
1196
1193
|
reward_id: e.number(),
|
|
1197
1194
|
reward_item_id: e.number(),
|
|
1198
1195
|
reward_item_name: e.string(),
|
|
1199
|
-
reward_item_type:
|
|
1196
|
+
reward_item_type: ne,
|
|
1200
1197
|
reward_item_icon_url: e.string(),
|
|
1201
1198
|
reward_item_desc: e.string().optional(),
|
|
1202
1199
|
reward_amount: e.number(),
|
|
1203
|
-
reward_status:
|
|
1204
|
-
reward_source:
|
|
1200
|
+
reward_status: ae,
|
|
1201
|
+
reward_source: U,
|
|
1205
1202
|
extra_data: e.record(e.unknown()).optional()
|
|
1206
|
-
}),
|
|
1203
|
+
}), jn = e.object({
|
|
1207
1204
|
engagement_id: e.number(),
|
|
1208
1205
|
user_id: e.string(),
|
|
1209
1206
|
event_id: e.number(),
|
|
1210
1207
|
feature_id: e.number(),
|
|
1211
1208
|
sequence: e.number(),
|
|
1212
|
-
data:
|
|
1209
|
+
data: I.clone().optional(),
|
|
1213
1210
|
server_id: e.string().optional(),
|
|
1214
1211
|
role_id: e.string().optional(),
|
|
1215
1212
|
created_at: e.number(),
|
|
1216
|
-
rewards: e.array(
|
|
1217
|
-
}).lock(),
|
|
1213
|
+
rewards: e.array(Vn).optional()
|
|
1214
|
+
}).lock(), Tn = e.object({
|
|
1218
1215
|
allowed: e.bool(),
|
|
1219
1216
|
registered: e.bool()
|
|
1220
|
-
}),
|
|
1217
|
+
}), qn = e.object({
|
|
1221
1218
|
feature_id: e.number(),
|
|
1222
1219
|
can_engage: e.bool(),
|
|
1223
1220
|
has_unclaimed_rewards: e.bool()
|
|
1224
|
-
}),
|
|
1221
|
+
}), xn = e.object({
|
|
1225
1222
|
engagement_id: e.number(),
|
|
1226
1223
|
engagement: e.object({
|
|
1227
1224
|
engagement_id: e.number(),
|
|
1228
1225
|
sequence: e.number(),
|
|
1229
1226
|
feature_id: e.number(),
|
|
1230
|
-
data:
|
|
1227
|
+
data: I.clone().optional()
|
|
1231
1228
|
}).optional(),
|
|
1232
|
-
rewards: e.array(
|
|
1229
|
+
rewards: e.array(Rn).optional(),
|
|
1233
1230
|
scan: e.bool().optional()
|
|
1234
|
-
}),
|
|
1231
|
+
}), Sn = e.object({
|
|
1235
1232
|
reward_id: e.number(),
|
|
1236
|
-
reward_status:
|
|
1237
|
-
}),
|
|
1238
|
-
engagements: e.union(e.array(
|
|
1239
|
-
}),
|
|
1240
|
-
status: e.array(
|
|
1241
|
-
}),
|
|
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)
|
|
1238
|
+
}), Fn = s({
|
|
1242
1239
|
engagements_counts: e.record(e.number())
|
|
1240
|
+
}), Dn = s({
|
|
1241
|
+
engagements: e.array(jn),
|
|
1242
|
+
next_token: e.string().optional()
|
|
1243
|
+
}), In = e.guard(xn), Gn = s({
|
|
1244
|
+
claimed_items: e.array(Sn)
|
|
1243
1245
|
}), An = s({
|
|
1244
|
-
|
|
1246
|
+
rewards: e.array(D)
|
|
1247
|
+
}), Nn = s({
|
|
1248
|
+
reward_status: $
|
|
1249
|
+
}), On = s({
|
|
1250
|
+
user_rewards: e.array(D),
|
|
1245
1251
|
next_token: e.string().optional()
|
|
1246
|
-
}), Nn = e.guard(En), On = s({
|
|
1247
|
-
claimed_items: e.array(Pn)
|
|
1248
1252
|
}), Bn = s({
|
|
1249
|
-
rewards: e.array(I)
|
|
1250
|
-
}), Mn = s({
|
|
1251
|
-
reward_status: U
|
|
1252
|
-
}), Qn = s({
|
|
1253
|
-
user_rewards: e.array(I),
|
|
1254
|
-
next_token: e.string().optional()
|
|
1255
|
-
}), Kn = s({
|
|
1256
1253
|
scene: e.string()
|
|
1257
|
-
}),
|
|
1254
|
+
}), Mn = s({
|
|
1258
1255
|
params: e.string()
|
|
1259
|
-
}),
|
|
1256
|
+
}), Qn = s({
|
|
1260
1257
|
img: e.string()
|
|
1261
1258
|
});
|
|
1262
|
-
class
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
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;
|
|
1268
1265
|
}
|
|
1269
1266
|
/**
|
|
1270
1267
|
* 根据手机号白名单,检查手机号是否允许登录某个游戏
|
|
1271
1268
|
*
|
|
1272
1269
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1273
1270
|
*/
|
|
1274
|
-
async verifyMobileAllowed(t,
|
|
1275
|
-
const { data:
|
|
1276
|
-
...
|
|
1277
|
-
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 }
|
|
1278
1275
|
});
|
|
1279
|
-
return
|
|
1276
|
+
return a;
|
|
1280
1277
|
}
|
|
1281
1278
|
/**
|
|
1282
1279
|
* 获取运营活动的基础配置信息
|
|
@@ -1284,32 +1281,32 @@ class Gr {
|
|
|
1284
1281
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1285
1282
|
*/
|
|
1286
1283
|
async getConfig(t) {
|
|
1287
|
-
const { data:
|
|
1288
|
-
return
|
|
1284
|
+
const { data: n } = await this.req.get(`event/${this.event}/event-config`, Ln, t);
|
|
1285
|
+
return n;
|
|
1289
1286
|
}
|
|
1290
1287
|
/**
|
|
1291
1288
|
* 获取某个玩法参与用户数量
|
|
1292
1289
|
*
|
|
1293
1290
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
|
|
1294
1291
|
*/
|
|
1295
|
-
async getEngagementsUserCount(t,
|
|
1296
|
-
const { data:
|
|
1297
|
-
...
|
|
1292
|
+
async getEngagementsUserCount(t, n) {
|
|
1293
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
|
|
1294
|
+
...n,
|
|
1298
1295
|
params: { feature_id: t, type: "user" }
|
|
1299
1296
|
});
|
|
1300
|
-
return
|
|
1297
|
+
return r?.count ?? null;
|
|
1301
1298
|
}
|
|
1302
1299
|
/**
|
|
1303
1300
|
* 获取某个玩法参与次数
|
|
1304
1301
|
*
|
|
1305
1302
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=ejPOcWMvT1
|
|
1306
1303
|
*/
|
|
1307
|
-
async getEngagementsCount(t,
|
|
1308
|
-
const { data:
|
|
1309
|
-
...
|
|
1304
|
+
async getEngagementsCount(t, n) {
|
|
1305
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagement-count`, S, {
|
|
1306
|
+
...n,
|
|
1310
1307
|
params: { feature_id: t, type: "engagement" }
|
|
1311
1308
|
});
|
|
1312
|
-
return
|
|
1309
|
+
return r?.count ?? null;
|
|
1313
1310
|
}
|
|
1314
1311
|
/**
|
|
1315
1312
|
* 获取某个玩法的参与记录(和特定用户无关)
|
|
@@ -1318,29 +1315,29 @@ class Gr {
|
|
|
1318
1315
|
*
|
|
1319
1316
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1320
1317
|
*/
|
|
1321
|
-
async getEngagements(t,
|
|
1322
|
-
const { data:
|
|
1323
|
-
...
|
|
1318
|
+
async getEngagements(t, n) {
|
|
1319
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, $n, {
|
|
1320
|
+
...n,
|
|
1324
1321
|
params: { feature_id: t }
|
|
1325
1322
|
});
|
|
1326
|
-
return
|
|
1323
|
+
return r?.engagements || [];
|
|
1327
1324
|
}
|
|
1328
1325
|
/**
|
|
1329
1326
|
* 用户访问某个活动或玩法
|
|
1330
1327
|
*
|
|
1331
1328
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=DWtJrnrBCn
|
|
1332
1329
|
*/
|
|
1333
|
-
async visit(t,
|
|
1330
|
+
async visit(t, n) {
|
|
1334
1331
|
await this.token.autoLogin();
|
|
1335
|
-
const { data:
|
|
1332
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1336
1333
|
`event/${this.event}/visit`,
|
|
1337
1334
|
c(t || {}),
|
|
1338
|
-
|
|
1339
|
-
|
|
1335
|
+
Pn,
|
|
1336
|
+
n
|
|
1340
1337
|
);
|
|
1341
|
-
return
|
|
1342
|
-
message:
|
|
1343
|
-
error:
|
|
1338
|
+
return r ?? {
|
|
1339
|
+
message: i,
|
|
1340
|
+
error: a
|
|
1344
1341
|
};
|
|
1345
1342
|
}
|
|
1346
1343
|
/**
|
|
@@ -1352,27 +1349,27 @@ class Gr {
|
|
|
1352
1349
|
*
|
|
1353
1350
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=WzX5BrMNpL
|
|
1354
1351
|
*/
|
|
1355
|
-
async getUserFeatureStatus(t,
|
|
1352
|
+
async getUserFeatureStatus(t, n) {
|
|
1356
1353
|
if (!await this.token.autoLogin()) return [];
|
|
1357
|
-
const { data:
|
|
1358
|
-
...
|
|
1354
|
+
const { data: r } = await this.req.get("event/user-feature-status", Un, {
|
|
1355
|
+
...n,
|
|
1359
1356
|
message: !1,
|
|
1360
1357
|
params: c({ ...t, event_id: this.event })
|
|
1361
1358
|
});
|
|
1362
|
-
return
|
|
1359
|
+
return r?.status || [];
|
|
1363
1360
|
}
|
|
1364
1361
|
/**
|
|
1365
1362
|
* 获取用户在目标活动下的某个玩法的参与次数
|
|
1366
1363
|
*
|
|
1367
1364
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=uYCsjWyL36
|
|
1368
1365
|
*/
|
|
1369
|
-
async getUserEngagementCount(t,
|
|
1366
|
+
async getUserEngagementCount(t, n) {
|
|
1370
1367
|
if (!await this.token.autoLogin()) return {};
|
|
1371
|
-
const { data:
|
|
1368
|
+
const { data: r } = await this.req.get("event/user-engagements-count", Fn, {
|
|
1372
1369
|
message: !1,
|
|
1373
|
-
params: c({ ...
|
|
1370
|
+
params: c({ ...n, event_id: this.event, feature_id: t })
|
|
1374
1371
|
});
|
|
1375
|
-
return
|
|
1372
|
+
return r?.engagements_counts || {};
|
|
1376
1373
|
}
|
|
1377
1374
|
/**
|
|
1378
1375
|
* 获取当前登录用户参与某个玩法的记录
|
|
@@ -1381,24 +1378,24 @@ class Gr {
|
|
|
1381
1378
|
*
|
|
1382
1379
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=NFDdV1dwWb
|
|
1383
1380
|
*/
|
|
1384
|
-
async getUserEngagements(t,
|
|
1381
|
+
async getUserEngagements(t, n, r) {
|
|
1385
1382
|
if (!await this.token.autoLogin())
|
|
1386
1383
|
return {
|
|
1387
1384
|
engagements: [],
|
|
1388
1385
|
next_token: ""
|
|
1389
1386
|
};
|
|
1390
|
-
const { data:
|
|
1391
|
-
...
|
|
1387
|
+
const { data: a } = await this.req.get("event/user-engagements", Dn, {
|
|
1388
|
+
...r,
|
|
1392
1389
|
params: c({
|
|
1393
1390
|
max_results: 20,
|
|
1394
|
-
...
|
|
1391
|
+
...n,
|
|
1395
1392
|
event_id: this.event,
|
|
1396
1393
|
feature_id: t
|
|
1397
1394
|
})
|
|
1398
1395
|
});
|
|
1399
1396
|
return {
|
|
1400
|
-
engagements:
|
|
1401
|
-
next_token:
|
|
1397
|
+
engagements: a?.engagements || [],
|
|
1398
|
+
next_token: a?.next_token || ""
|
|
1402
1399
|
};
|
|
1403
1400
|
}
|
|
1404
1401
|
/**
|
|
@@ -1410,21 +1407,21 @@ class Gr {
|
|
|
1410
1407
|
*
|
|
1411
1408
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vuOyrcry3S
|
|
1412
1409
|
*/
|
|
1413
|
-
async engage(t,
|
|
1410
|
+
async engage(t, n, r, a) {
|
|
1414
1411
|
await this.token.autoLogin();
|
|
1415
|
-
const { data:
|
|
1412
|
+
const { data: i, code: d, message: m } = await this.req.post(
|
|
1416
1413
|
`event/${this.event}/engage`,
|
|
1417
1414
|
c({
|
|
1418
1415
|
feature_id: t,
|
|
1419
|
-
engagement:
|
|
1420
|
-
...
|
|
1416
|
+
engagement: n,
|
|
1417
|
+
...r
|
|
1421
1418
|
}),
|
|
1422
|
-
|
|
1423
|
-
|
|
1419
|
+
In,
|
|
1420
|
+
a
|
|
1424
1421
|
);
|
|
1425
|
-
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 ?? {
|
|
1426
1423
|
message: m,
|
|
1427
|
-
error:
|
|
1424
|
+
error: d
|
|
1428
1425
|
// 激活码已领完
|
|
1429
1426
|
};
|
|
1430
1427
|
}
|
|
@@ -1435,20 +1432,20 @@ class Gr {
|
|
|
1435
1432
|
*
|
|
1436
1433
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=lCGuqgvUDP
|
|
1437
1434
|
*/
|
|
1438
|
-
async claimRewards(t,
|
|
1435
|
+
async claimRewards(t, n) {
|
|
1439
1436
|
await this.token.autoLogin();
|
|
1440
|
-
const { data:
|
|
1437
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1441
1438
|
"event/claim-rewards",
|
|
1442
1439
|
c({
|
|
1443
1440
|
...t,
|
|
1444
1441
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1445
1442
|
}),
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
),
|
|
1449
|
-
return
|
|
1450
|
-
message:
|
|
1451
|
-
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
|
|
1452
1449
|
};
|
|
1453
1450
|
}
|
|
1454
1451
|
/**
|
|
@@ -1456,20 +1453,20 @@ class Gr {
|
|
|
1456
1453
|
*
|
|
1457
1454
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=vdc4SrqXjF
|
|
1458
1455
|
*/
|
|
1459
|
-
async claimRewardsV2(t,
|
|
1456
|
+
async claimRewardsV2(t, n) {
|
|
1460
1457
|
await this.token.autoLogin();
|
|
1461
|
-
const { data:
|
|
1458
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1462
1459
|
"event/claim-rewards-v2",
|
|
1463
1460
|
c({
|
|
1464
1461
|
...t,
|
|
1465
1462
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1466
1463
|
}),
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
),
|
|
1470
|
-
return
|
|
1471
|
-
message:
|
|
1472
|
-
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
|
|
1473
1470
|
};
|
|
1474
1471
|
}
|
|
1475
1472
|
/**
|
|
@@ -1477,17 +1474,17 @@ class Gr {
|
|
|
1477
1474
|
*
|
|
1478
1475
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=aQLhlOAB4Q
|
|
1479
1476
|
*/
|
|
1480
|
-
async claimWeixinHongbao(t,
|
|
1477
|
+
async claimWeixinHongbao(t, n) {
|
|
1481
1478
|
await this.token.autoLogin();
|
|
1482
|
-
const { data:
|
|
1479
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1483
1480
|
"event/claim-weixin-hongbao",
|
|
1484
1481
|
{ reward_id: t },
|
|
1485
|
-
|
|
1486
|
-
|
|
1482
|
+
Nn,
|
|
1483
|
+
n
|
|
1487
1484
|
);
|
|
1488
|
-
return
|
|
1489
|
-
message:
|
|
1490
|
-
error:
|
|
1485
|
+
return r ? (r.reward_status = r.reward_status === _.UnclaimedErr ? _.Unclaimed : r.reward_status, r) : {
|
|
1486
|
+
message: i,
|
|
1487
|
+
error: a
|
|
1491
1488
|
};
|
|
1492
1489
|
}
|
|
1493
1490
|
/**
|
|
@@ -1495,18 +1492,18 @@ class Gr {
|
|
|
1495
1492
|
*
|
|
1496
1493
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
|
|
1497
1494
|
*/
|
|
1498
|
-
async verifyActivationKey(t,
|
|
1495
|
+
async verifyActivationKey(t, n) {
|
|
1499
1496
|
if (!this.token.isLoggedIn)
|
|
1500
1497
|
return { error: "not_logged_in" };
|
|
1501
|
-
const { ok:
|
|
1498
|
+
const { ok: r, code: a, message: i } = await this.req.post(
|
|
1502
1499
|
"verify-activation-key",
|
|
1503
1500
|
{ activation_key: t },
|
|
1504
1501
|
null,
|
|
1505
|
-
{ message: !1, ...
|
|
1502
|
+
{ message: !1, ...n }
|
|
1506
1503
|
);
|
|
1507
|
-
return
|
|
1508
|
-
message:
|
|
1509
|
-
error:
|
|
1504
|
+
return r || {
|
|
1505
|
+
message: i,
|
|
1506
|
+
error: a
|
|
1510
1507
|
};
|
|
1511
1508
|
}
|
|
1512
1509
|
/**
|
|
@@ -1514,21 +1511,21 @@ class Gr {
|
|
|
1514
1511
|
*
|
|
1515
1512
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=qj12eIgYQG
|
|
1516
1513
|
*/
|
|
1517
|
-
async getUserRewards(t,
|
|
1514
|
+
async getUserRewards(t, n) {
|
|
1518
1515
|
if (!await this.token.autoLogin())
|
|
1519
1516
|
return {
|
|
1520
1517
|
user_rewards: [],
|
|
1521
1518
|
next_token: ""
|
|
1522
1519
|
};
|
|
1523
|
-
const { data:
|
|
1520
|
+
const { data: r } = await this.req.post(
|
|
1524
1521
|
"event/user-rewards",
|
|
1525
1522
|
c({ max_results: 20, ...t, event_id: this.event }),
|
|
1526
|
-
|
|
1527
|
-
|
|
1523
|
+
On,
|
|
1524
|
+
n
|
|
1528
1525
|
);
|
|
1529
1526
|
return {
|
|
1530
|
-
user_rewards: (
|
|
1531
|
-
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 || ""
|
|
1532
1529
|
};
|
|
1533
1530
|
}
|
|
1534
1531
|
/**
|
|
@@ -1536,23 +1533,23 @@ class Gr {
|
|
|
1536
1533
|
*
|
|
1537
1534
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=mnGCTeTgMb
|
|
1538
1535
|
*/
|
|
1539
|
-
async getUserItemCount(t,
|
|
1536
|
+
async getUserItemCount(t, n) {
|
|
1540
1537
|
if (!await this.token.autoLogin()) return null;
|
|
1541
|
-
const { data:
|
|
1542
|
-
...
|
|
1538
|
+
const { data: r } = await this.req.get(`event/${this.event}/user-item-count`, S, {
|
|
1539
|
+
...n,
|
|
1543
1540
|
params: { item_id: t }
|
|
1544
1541
|
});
|
|
1545
|
-
return
|
|
1542
|
+
return r?.count ?? null;
|
|
1546
1543
|
}
|
|
1547
1544
|
/**
|
|
1548
1545
|
* 填写实物奖励收货地址,返回 null 表示未登录
|
|
1549
1546
|
*
|
|
1550
1547
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=QIwGhnaexb
|
|
1551
1548
|
*/
|
|
1552
|
-
async submitUserRewardAddress(t,
|
|
1549
|
+
async submitUserRewardAddress(t, n) {
|
|
1553
1550
|
if (!await this.token.autoLogin()) return null;
|
|
1554
|
-
const { ok:
|
|
1555
|
-
return
|
|
1551
|
+
const { ok: r } = await this.req.post(`event/${this.event}/user-reward-address`, t, null, n);
|
|
1552
|
+
return r;
|
|
1556
1553
|
}
|
|
1557
1554
|
/**
|
|
1558
1555
|
* 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
|
|
@@ -1561,13 +1558,13 @@ class Gr {
|
|
|
1561
1558
|
*
|
|
1562
1559
|
* @param params - 前端扫描二维码打开小程序所需参数
|
|
1563
1560
|
*/
|
|
1564
|
-
async getUnlimitQrcodeScene(t,
|
|
1561
|
+
async getUnlimitQrcodeScene(t, n) {
|
|
1565
1562
|
if (!await this.token.autoLogin()) return null;
|
|
1566
|
-
const { data:
|
|
1567
|
-
...
|
|
1563
|
+
const { data: r } = await this.req.get("event/unlimit-qrcode-scene", Bn, {
|
|
1564
|
+
...n,
|
|
1568
1565
|
params: { params: t }
|
|
1569
1566
|
});
|
|
1570
|
-
return
|
|
1567
|
+
return r?.scene ?? null;
|
|
1571
1568
|
}
|
|
1572
1569
|
/**
|
|
1573
1570
|
* 根据小程序码携带 scene 值,获取对应的前端所需参数
|
|
@@ -1576,35 +1573,35 @@ class Gr {
|
|
|
1576
1573
|
*
|
|
1577
1574
|
* @param scene - 小程序码 scene 值
|
|
1578
1575
|
*/
|
|
1579
|
-
async getParamsByQrcodeScene(t,
|
|
1580
|
-
const { data:
|
|
1581
|
-
...
|
|
1576
|
+
async getParamsByQrcodeScene(t, n) {
|
|
1577
|
+
const { data: r } = await this.req.get("event/params-by-qrcode-scene", Mn, {
|
|
1578
|
+
...n,
|
|
1582
1579
|
params: { scene: t }
|
|
1583
1580
|
});
|
|
1584
|
-
return
|
|
1581
|
+
return r?.params ?? null;
|
|
1585
1582
|
}
|
|
1586
1583
|
/**
|
|
1587
1584
|
* 生成不限制的带参数的小程序码(dataURI 格式的小程序码图片)
|
|
1588
1585
|
*
|
|
1589
1586
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=Rvmoq8iIy0
|
|
1590
1587
|
*/
|
|
1591
|
-
async generateUnlimitQrcode(t,
|
|
1588
|
+
async generateUnlimitQrcode(t, n) {
|
|
1592
1589
|
if (!await this.token.autoLogin()) return null;
|
|
1593
|
-
const { data:
|
|
1590
|
+
const { data: r } = await this.req.post(
|
|
1594
1591
|
"event/unlimit-qrcode",
|
|
1595
1592
|
c(t),
|
|
1596
|
-
|
|
1597
|
-
|
|
1593
|
+
Qn,
|
|
1594
|
+
n
|
|
1598
1595
|
);
|
|
1599
|
-
return
|
|
1596
|
+
return r?.img ?? null;
|
|
1600
1597
|
}
|
|
1601
1598
|
}
|
|
1602
|
-
const
|
|
1599
|
+
const Kn = {
|
|
1603
1600
|
/** 所有人均可以发帖 */
|
|
1604
1601
|
All: "all",
|
|
1605
1602
|
/** 指定用户可发帖 */
|
|
1606
1603
|
Limit: "limit"
|
|
1607
|
-
},
|
|
1604
|
+
}, Hn = e.string().enum(Kn).lock(), zn = {
|
|
1608
1605
|
/** 待审核(仅自己可见) */
|
|
1609
1606
|
Pending: "pending",
|
|
1610
1607
|
/** 审核通过 */
|
|
@@ -1613,14 +1610,14 @@ const Jn = {
|
|
|
1613
1610
|
Failed: "failed",
|
|
1614
1611
|
/** 嫌疑(仅自己可见) */
|
|
1615
1612
|
Suspect: "suspect"
|
|
1616
|
-
},
|
|
1613
|
+
}, ie = e.string().enum(zn).lock(), Jn = {
|
|
1617
1614
|
/** 系统通知 */
|
|
1618
1615
|
System: "system",
|
|
1619
1616
|
/** 评论我的 */
|
|
1620
1617
|
Comment: "comment",
|
|
1621
1618
|
/** 点赞通知 */
|
|
1622
1619
|
Like: "like"
|
|
1623
|
-
},
|
|
1620
|
+
}, Fr = e.string().enum(Jn).lock(), g = {
|
|
1624
1621
|
/** 系统通知 */
|
|
1625
1622
|
System: "system",
|
|
1626
1623
|
/** 帖子被置顶 */
|
|
@@ -1645,24 +1642,24 @@ const Jn = {
|
|
|
1645
1642
|
ReplyLiked: "reply_liked",
|
|
1646
1643
|
/** 回复被删除 */
|
|
1647
1644
|
ReplyDeleted: "reply_deleted"
|
|
1648
|
-
},
|
|
1645
|
+
}, Zn = e.string().enum(g).lock(), oe = e.object({
|
|
1649
1646
|
forum_id: e.number(),
|
|
1650
1647
|
icon_url: e.string(),
|
|
1651
1648
|
name: e.string(),
|
|
1652
1649
|
tags: e.array(e.string()),
|
|
1653
1650
|
sort: e.number(),
|
|
1654
|
-
mode:
|
|
1651
|
+
mode: Hn,
|
|
1655
1652
|
member_ids: e.array(e.number())
|
|
1656
|
-
}).lock(),
|
|
1653
|
+
}).lock(), G = e.object({
|
|
1657
1654
|
topic_id: e.number(),
|
|
1658
1655
|
cover_url: e.string(),
|
|
1659
1656
|
name: e.string(),
|
|
1660
1657
|
description: e.string(),
|
|
1661
1658
|
tags: e.array(e.string()),
|
|
1662
1659
|
post_num: e.number()
|
|
1663
|
-
}).lock(),
|
|
1660
|
+
}).lock(), A = e.object({
|
|
1664
1661
|
post_id: e.number(),
|
|
1665
|
-
forum:
|
|
1662
|
+
forum: oe,
|
|
1666
1663
|
posted_by: e.string(),
|
|
1667
1664
|
nickname: e.string(),
|
|
1668
1665
|
avatar_url: e.string(),
|
|
@@ -1674,21 +1671,21 @@ const Jn = {
|
|
|
1674
1671
|
comments_num: e.number(),
|
|
1675
1672
|
liked: e.bool(),
|
|
1676
1673
|
image_urls: e.array(e.string()),
|
|
1677
|
-
topics: e.array(
|
|
1674
|
+
topics: e.array(G),
|
|
1678
1675
|
event_ids: e.array(e.number()),
|
|
1679
1676
|
is_pinned: e.bool(),
|
|
1680
1677
|
is_highlighted: e.bool(),
|
|
1681
|
-
status:
|
|
1678
|
+
status: ie,
|
|
1682
1679
|
create_time: e.number()
|
|
1683
|
-
}).lock(),
|
|
1680
|
+
}).lock(), se = e.object({
|
|
1684
1681
|
err_msg: e.string().optional()
|
|
1685
|
-
}).lock(),
|
|
1682
|
+
}).lock(), Xn = e.object({
|
|
1686
1683
|
reply_id: e.number(),
|
|
1687
1684
|
reply_content: e.string().optional(),
|
|
1688
1685
|
replied_by: e.string(),
|
|
1689
1686
|
nickname: e.string(),
|
|
1690
1687
|
avatar_url: e.string()
|
|
1691
|
-
}).lock(),
|
|
1688
|
+
}).lock(), j = e.object({
|
|
1692
1689
|
reply_id: e.number(),
|
|
1693
1690
|
comment_id: e.number(),
|
|
1694
1691
|
comment_content: e.string().optional(),
|
|
@@ -1701,9 +1698,9 @@ const Jn = {
|
|
|
1701
1698
|
content: e.string(),
|
|
1702
1699
|
like_num: e.number(),
|
|
1703
1700
|
liked: e.bool(),
|
|
1704
|
-
reply_to:
|
|
1701
|
+
reply_to: Xn,
|
|
1705
1702
|
create_time: e.number()
|
|
1706
|
-
}).lock(),
|
|
1703
|
+
}).lock(), v = e.object({
|
|
1707
1704
|
comment_id: e.number(),
|
|
1708
1705
|
post_id: e.number(),
|
|
1709
1706
|
post_subject: e.string().optional(),
|
|
@@ -1721,109 +1718,109 @@ const Jn = {
|
|
|
1721
1718
|
liked: e.bool(),
|
|
1722
1719
|
image_url: e.string(),
|
|
1723
1720
|
create_time: e.number(),
|
|
1724
|
-
status:
|
|
1725
|
-
replies: e.array(
|
|
1726
|
-
}).lock(),
|
|
1721
|
+
status: ie,
|
|
1722
|
+
replies: e.array(j).optional()
|
|
1723
|
+
}).lock(), Yn = e.object({
|
|
1727
1724
|
image_url: e.string(),
|
|
1728
1725
|
upload_url: e.string(),
|
|
1729
1726
|
existed: e.bool()
|
|
1730
|
-
}).lock(),
|
|
1727
|
+
}).lock(), y = e.object({
|
|
1731
1728
|
notification_id: e.string(),
|
|
1732
|
-
notification_type:
|
|
1729
|
+
notification_type: Zn,
|
|
1733
1730
|
is_read: e.bool(),
|
|
1734
1731
|
create_time: e.number(),
|
|
1735
1732
|
origin_user_id: e.string(),
|
|
1736
1733
|
origin_user_name: e.string(),
|
|
1737
1734
|
origin_user_avatar_url: e.string()
|
|
1738
|
-
}).lock(),
|
|
1735
|
+
}).lock(), Wn = e.object({
|
|
1739
1736
|
system_message_subject: e.string(),
|
|
1740
1737
|
system_message_content: e.string()
|
|
1741
|
-
}).lock(),
|
|
1738
|
+
}).lock(), N = e.object({
|
|
1742
1739
|
post_id: e.number(),
|
|
1743
1740
|
post_subject: e.string(),
|
|
1744
1741
|
post_summary: e.string(),
|
|
1745
1742
|
post_image_url: e.string()
|
|
1746
|
-
}).lock(),
|
|
1743
|
+
}).lock(), T = e.object({
|
|
1747
1744
|
comment_id: e.number(),
|
|
1748
1745
|
comment_content: e.string()
|
|
1749
|
-
}).lock(),
|
|
1746
|
+
}).lock(), O = e.object({
|
|
1750
1747
|
reply_id: e.number(),
|
|
1751
1748
|
reply_content: e.string()
|
|
1752
|
-
}).lock(),
|
|
1753
|
-
...
|
|
1754
|
-
...
|
|
1755
|
-
notification_type: e.string().enum(
|
|
1756
|
-
}),
|
|
1757
|
-
...
|
|
1758
|
-
...
|
|
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,
|
|
1759
1756
|
notification_type: e.string().enum(
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1757
|
+
g.PostPinned,
|
|
1758
|
+
g.PostHighlighted,
|
|
1759
|
+
g.PostDeleted,
|
|
1760
|
+
g.PostLiked
|
|
1764
1761
|
)
|
|
1765
|
-
}),
|
|
1766
|
-
...
|
|
1762
|
+
}), nr = e.object({
|
|
1763
|
+
...y.shape,
|
|
1764
|
+
...N.shape,
|
|
1765
|
+
...T.shape,
|
|
1766
|
+
notification_type: e.string().enum(g.PostCommented)
|
|
1767
|
+
}), rr = e.object({
|
|
1768
|
+
...y.shape,
|
|
1769
|
+
...T.shape,
|
|
1767
1770
|
...O.shape,
|
|
1768
|
-
|
|
1769
|
-
notification_type: e.string().enum(p.PostCommented)
|
|
1771
|
+
notification_type: e.string().enum(g.CommentReplied)
|
|
1770
1772
|
}), ar = e.object({
|
|
1771
|
-
...
|
|
1772
|
-
...
|
|
1773
|
-
...
|
|
1774
|
-
notification_type: e.string().enum(
|
|
1775
|
-
}),
|
|
1776
|
-
...
|
|
1777
|
-
...q.shape,
|
|
1773
|
+
...y.shape,
|
|
1774
|
+
...T.shape,
|
|
1775
|
+
...N.shape,
|
|
1776
|
+
notification_type: e.string().enum(g.CommentLiked, g.CommentDeleted)
|
|
1777
|
+
}), ir = e.object({
|
|
1778
|
+
...y.shape,
|
|
1778
1779
|
...O.shape,
|
|
1779
|
-
notification_type: e.string().enum(
|
|
1780
|
-
}), cr = e.object({
|
|
1781
|
-
...f.shape,
|
|
1782
|
-
...B.shape,
|
|
1783
|
-
notification_type: e.string().enum(p.ReplyReplied),
|
|
1780
|
+
notification_type: e.string().enum(g.ReplyReplied),
|
|
1784
1781
|
comment_id: e.number(),
|
|
1785
1782
|
reply_to_reply_id: e.number(),
|
|
1786
1783
|
reply_to_reply_content: e.string()
|
|
1787
|
-
}),
|
|
1788
|
-
...
|
|
1789
|
-
...
|
|
1790
|
-
...
|
|
1791
|
-
notification_type: e.string().enum(
|
|
1792
|
-
}),
|
|
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,
|
|
1791
|
+
tr,
|
|
1792
|
+
nr,
|
|
1793
1793
|
rr,
|
|
1794
|
-
ir,
|
|
1795
|
-
or,
|
|
1796
1794
|
ar,
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
posts: e.array(N),
|
|
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),
|
|
1802
1799
|
next_token: e.string().optional()
|
|
1803
|
-
}),
|
|
1804
|
-
replies: e.array(
|
|
1800
|
+
}), dr = s({ post: A, antispam: se }), gr = s({
|
|
1801
|
+
replies: e.array(j),
|
|
1805
1802
|
next_token: e.string().optional()
|
|
1806
|
-
}),
|
|
1807
|
-
reply:
|
|
1808
|
-
antispam:
|
|
1809
|
-
}),
|
|
1810
|
-
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),
|
|
1811
1808
|
next_token: e.string().optional()
|
|
1812
|
-
}),
|
|
1813
|
-
comment:
|
|
1814
|
-
antispam:
|
|
1815
|
-
}),
|
|
1816
|
-
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),
|
|
1817
1814
|
next_token: e.string().optional()
|
|
1818
|
-
}),
|
|
1815
|
+
}), kr = s({
|
|
1819
1816
|
system: e.number(),
|
|
1820
1817
|
comment: e.number(),
|
|
1821
1818
|
like: e.number()
|
|
1822
1819
|
});
|
|
1823
|
-
class
|
|
1820
|
+
class Dr {
|
|
1821
|
+
token;
|
|
1822
|
+
req;
|
|
1824
1823
|
constructor(t) {
|
|
1825
|
-
d(this, "token");
|
|
1826
|
-
d(this, "req");
|
|
1827
1824
|
this.token = t, this.req = t.req;
|
|
1828
1825
|
}
|
|
1829
1826
|
/**
|
|
@@ -1832,8 +1829,8 @@ class Nr {
|
|
|
1832
1829
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
1833
1830
|
*/
|
|
1834
1831
|
async getForums(t) {
|
|
1835
|
-
const { data:
|
|
1836
|
-
return
|
|
1832
|
+
const { data: n } = await this.req.get("community/forums", cr, t);
|
|
1833
|
+
return n?.forums || [];
|
|
1837
1834
|
}
|
|
1838
1835
|
/**
|
|
1839
1836
|
* 获取社区话题列表,仅返回启用状态的话题
|
|
@@ -1841,34 +1838,34 @@ class Nr {
|
|
|
1841
1838
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
1842
1839
|
*/
|
|
1843
1840
|
async getTopics(t) {
|
|
1844
|
-
const { data:
|
|
1845
|
-
return
|
|
1841
|
+
const { data: n } = await this.req.get("community/topics", ur, t);
|
|
1842
|
+
return n?.topics || [];
|
|
1846
1843
|
}
|
|
1847
1844
|
/**
|
|
1848
1845
|
* 根据话题 ID 获取社区话题信息
|
|
1849
1846
|
*
|
|
1850
1847
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
1851
1848
|
*/
|
|
1852
|
-
async getTopic(t,
|
|
1853
|
-
const { data:
|
|
1854
|
-
...
|
|
1849
|
+
async getTopic(t, n) {
|
|
1850
|
+
const { data: r, code: a } = await this.req.get("community/topic", lr, {
|
|
1851
|
+
...n,
|
|
1855
1852
|
params: { topic_id: t }
|
|
1856
1853
|
});
|
|
1857
|
-
return
|
|
1854
|
+
return r?.topic ?? { error: a };
|
|
1858
1855
|
}
|
|
1859
1856
|
/**
|
|
1860
1857
|
* 获取社区帖子列表
|
|
1861
1858
|
*
|
|
1862
1859
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=XKI9lDVrPq
|
|
1863
1860
|
*/
|
|
1864
|
-
async getPosts(t,
|
|
1865
|
-
const { data:
|
|
1866
|
-
...
|
|
1861
|
+
async getPosts(t, n) {
|
|
1862
|
+
const { data: r, code: a, message: i } = await this.req.get("community/posts", z, {
|
|
1863
|
+
...n,
|
|
1867
1864
|
params: c(t)
|
|
1868
1865
|
});
|
|
1869
|
-
return
|
|
1870
|
-
message:
|
|
1871
|
-
error:
|
|
1866
|
+
return r ?? {
|
|
1867
|
+
message: i,
|
|
1868
|
+
error: a
|
|
1872
1869
|
};
|
|
1873
1870
|
}
|
|
1874
1871
|
/**
|
|
@@ -1876,14 +1873,14 @@ class Nr {
|
|
|
1876
1873
|
*
|
|
1877
1874
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=yXubbZuDlC
|
|
1878
1875
|
*/
|
|
1879
|
-
async getPinnedPosts(t,
|
|
1880
|
-
const { data:
|
|
1881
|
-
...
|
|
1882
|
-
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 })
|
|
1883
1880
|
});
|
|
1884
|
-
return
|
|
1881
|
+
return i ?? {
|
|
1885
1882
|
message: m,
|
|
1886
|
-
error:
|
|
1883
|
+
error: d
|
|
1887
1884
|
};
|
|
1888
1885
|
}
|
|
1889
1886
|
/**
|
|
@@ -1891,14 +1888,14 @@ class Nr {
|
|
|
1891
1888
|
*
|
|
1892
1889
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
1893
1890
|
*/
|
|
1894
|
-
async getPost(t,
|
|
1895
|
-
const { data:
|
|
1896
|
-
...
|
|
1891
|
+
async getPost(t, n) {
|
|
1892
|
+
const { data: r, code: a, message: i } = await this.req.get("community/post", mr, {
|
|
1893
|
+
...n,
|
|
1897
1894
|
params: { post_id: t }
|
|
1898
1895
|
});
|
|
1899
|
-
return
|
|
1900
|
-
message:
|
|
1901
|
-
error:
|
|
1896
|
+
return r?.post ?? {
|
|
1897
|
+
message: i,
|
|
1898
|
+
error: a
|
|
1902
1899
|
};
|
|
1903
1900
|
}
|
|
1904
1901
|
/**
|
|
@@ -1906,16 +1903,16 @@ class Nr {
|
|
|
1906
1903
|
*
|
|
1907
1904
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
|
|
1908
1905
|
*/
|
|
1909
|
-
async post(t,
|
|
1910
|
-
const { data:
|
|
1906
|
+
async post(t, n) {
|
|
1907
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1911
1908
|
"community/post",
|
|
1912
1909
|
c(t),
|
|
1913
|
-
|
|
1914
|
-
|
|
1910
|
+
dr,
|
|
1911
|
+
n
|
|
1915
1912
|
);
|
|
1916
|
-
return
|
|
1917
|
-
message:
|
|
1918
|
-
error:
|
|
1913
|
+
return r ?? {
|
|
1914
|
+
message: i,
|
|
1915
|
+
error: a
|
|
1919
1916
|
};
|
|
1920
1917
|
}
|
|
1921
1918
|
/**
|
|
@@ -1923,14 +1920,14 @@ class Nr {
|
|
|
1923
1920
|
*
|
|
1924
1921
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
1925
1922
|
*/
|
|
1926
|
-
async getComments(t,
|
|
1927
|
-
const { data:
|
|
1928
|
-
...
|
|
1923
|
+
async getComments(t, n) {
|
|
1924
|
+
const { data: r, code: a, message: i } = await this.req.get("community/comments", yr, {
|
|
1925
|
+
...n,
|
|
1929
1926
|
params: c(t)
|
|
1930
1927
|
});
|
|
1931
|
-
return
|
|
1932
|
-
message:
|
|
1933
|
-
error:
|
|
1928
|
+
return r ?? {
|
|
1929
|
+
message: i,
|
|
1930
|
+
error: a
|
|
1934
1931
|
};
|
|
1935
1932
|
}
|
|
1936
1933
|
/**
|
|
@@ -1938,14 +1935,14 @@ class Nr {
|
|
|
1938
1935
|
*
|
|
1939
1936
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
1940
1937
|
*/
|
|
1941
|
-
async getComment(t,
|
|
1942
|
-
const { data:
|
|
1943
|
-
...
|
|
1938
|
+
async getComment(t, n) {
|
|
1939
|
+
const { data: r, code: a, message: i } = await this.req.get("community/comment", br, {
|
|
1940
|
+
...n,
|
|
1944
1941
|
params: { comment_id: t }
|
|
1945
1942
|
});
|
|
1946
|
-
return
|
|
1947
|
-
message:
|
|
1948
|
-
error:
|
|
1943
|
+
return r?.comment ?? {
|
|
1944
|
+
message: i,
|
|
1945
|
+
error: a
|
|
1949
1946
|
};
|
|
1950
1947
|
}
|
|
1951
1948
|
/**
|
|
@@ -1953,17 +1950,17 @@ class Nr {
|
|
|
1953
1950
|
*
|
|
1954
1951
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Nv7lk0nTmr
|
|
1955
1952
|
*/
|
|
1956
|
-
async comment(t,
|
|
1953
|
+
async comment(t, n) {
|
|
1957
1954
|
await this.token.autoLogin();
|
|
1958
|
-
const { data:
|
|
1955
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
1959
1956
|
"community/comment",
|
|
1960
1957
|
c(t),
|
|
1961
|
-
|
|
1962
|
-
|
|
1958
|
+
fr,
|
|
1959
|
+
n
|
|
1963
1960
|
);
|
|
1964
|
-
return
|
|
1965
|
-
message:
|
|
1966
|
-
error:
|
|
1961
|
+
return r ?? {
|
|
1962
|
+
message: i,
|
|
1963
|
+
error: a
|
|
1967
1964
|
};
|
|
1968
1965
|
}
|
|
1969
1966
|
/**
|
|
@@ -1971,14 +1968,14 @@ class Nr {
|
|
|
1971
1968
|
*
|
|
1972
1969
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
1973
1970
|
*/
|
|
1974
|
-
async getReplies(t,
|
|
1975
|
-
const { data:
|
|
1976
|
-
...
|
|
1971
|
+
async getReplies(t, n) {
|
|
1972
|
+
const { data: r } = await this.req.get("community/replies", gr, {
|
|
1973
|
+
...n,
|
|
1977
1974
|
params: c({ max_results: 20, ...t })
|
|
1978
1975
|
});
|
|
1979
1976
|
return {
|
|
1980
|
-
replies:
|
|
1981
|
-
next_token:
|
|
1977
|
+
replies: r?.replies || [],
|
|
1978
|
+
next_token: r?.next_token || ""
|
|
1982
1979
|
};
|
|
1983
1980
|
}
|
|
1984
1981
|
/**
|
|
@@ -1986,14 +1983,14 @@ class Nr {
|
|
|
1986
1983
|
*
|
|
1987
1984
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
1988
1985
|
*/
|
|
1989
|
-
async getReply(t,
|
|
1990
|
-
const { data:
|
|
1991
|
-
...
|
|
1986
|
+
async getReply(t, n) {
|
|
1987
|
+
const { data: r, code: a, message: i } = await this.req.get("community/reply", pr, {
|
|
1988
|
+
...n,
|
|
1992
1989
|
params: { reply_id: t }
|
|
1993
1990
|
});
|
|
1994
|
-
return
|
|
1995
|
-
message:
|
|
1996
|
-
error:
|
|
1991
|
+
return r?.reply ?? {
|
|
1992
|
+
message: i,
|
|
1993
|
+
error: a
|
|
1997
1994
|
};
|
|
1998
1995
|
}
|
|
1999
1996
|
/**
|
|
@@ -2001,17 +1998,17 @@ class Nr {
|
|
|
2001
1998
|
*
|
|
2002
1999
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=KA8WpTX2pg
|
|
2003
2000
|
*/
|
|
2004
|
-
async reply(t,
|
|
2001
|
+
async reply(t, n) {
|
|
2005
2002
|
await this.token.autoLogin();
|
|
2006
|
-
const { data:
|
|
2003
|
+
const { data: r, code: a, message: i } = await this.req.post(
|
|
2007
2004
|
"community/reply",
|
|
2008
2005
|
c(t),
|
|
2009
|
-
|
|
2010
|
-
|
|
2006
|
+
_r,
|
|
2007
|
+
n
|
|
2011
2008
|
);
|
|
2012
|
-
return
|
|
2013
|
-
message:
|
|
2014
|
-
error:
|
|
2009
|
+
return r ?? {
|
|
2010
|
+
message: i,
|
|
2011
|
+
error: a
|
|
2015
2012
|
};
|
|
2016
2013
|
}
|
|
2017
2014
|
/**
|
|
@@ -2019,17 +2016,17 @@ class Nr {
|
|
|
2019
2016
|
*
|
|
2020
2017
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
|
|
2021
2018
|
*/
|
|
2022
|
-
async like(t,
|
|
2019
|
+
async like(t, n) {
|
|
2023
2020
|
await this.token.autoLogin();
|
|
2024
|
-
const { ok:
|
|
2021
|
+
const { ok: r, code: a, message: i } = await this.req.post(
|
|
2025
2022
|
"community/like",
|
|
2026
2023
|
{ ...t, action: "like" },
|
|
2027
2024
|
null,
|
|
2028
|
-
|
|
2025
|
+
n
|
|
2029
2026
|
);
|
|
2030
|
-
return
|
|
2031
|
-
message:
|
|
2032
|
-
error:
|
|
2027
|
+
return r || {
|
|
2028
|
+
message: i,
|
|
2029
|
+
error: a
|
|
2033
2030
|
};
|
|
2034
2031
|
}
|
|
2035
2032
|
/**
|
|
@@ -2037,17 +2034,17 @@ class Nr {
|
|
|
2037
2034
|
*
|
|
2038
2035
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=CR3m6PyXfZ
|
|
2039
2036
|
*/
|
|
2040
|
-
async unlike(t,
|
|
2037
|
+
async unlike(t, n) {
|
|
2041
2038
|
await this.token.autoLogin();
|
|
2042
|
-
const { ok:
|
|
2039
|
+
const { ok: r, code: a, message: i } = await this.req.post(
|
|
2043
2040
|
"community/like",
|
|
2044
2041
|
{ ...t, action: "unlike" },
|
|
2045
2042
|
null,
|
|
2046
|
-
|
|
2043
|
+
n
|
|
2047
2044
|
);
|
|
2048
|
-
return
|
|
2049
|
-
message:
|
|
2050
|
-
error:
|
|
2045
|
+
return r || {
|
|
2046
|
+
message: i,
|
|
2047
|
+
error: a
|
|
2051
2048
|
};
|
|
2052
2049
|
}
|
|
2053
2050
|
/**
|
|
@@ -2055,13 +2052,13 @@ class Nr {
|
|
|
2055
2052
|
*
|
|
2056
2053
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=dWWhpoShxZ
|
|
2057
2054
|
*/
|
|
2058
|
-
async getMediaPresignedUrl(t,
|
|
2055
|
+
async getMediaPresignedUrl(t, n) {
|
|
2059
2056
|
await this.token.autoLogin();
|
|
2060
|
-
const { data:
|
|
2061
|
-
...
|
|
2057
|
+
const { data: r } = await this.req.get("community/media-presign-url", hr, {
|
|
2058
|
+
...n,
|
|
2062
2059
|
params: t
|
|
2063
2060
|
});
|
|
2064
|
-
return
|
|
2061
|
+
return r;
|
|
2065
2062
|
}
|
|
2066
2063
|
/**
|
|
2067
2064
|
* 获取用户社区通知
|
|
@@ -2070,15 +2067,15 @@ class Nr {
|
|
|
2070
2067
|
*
|
|
2071
2068
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=W5lceDgbBG
|
|
2072
2069
|
*/
|
|
2073
|
-
async getNotifications(t,
|
|
2070
|
+
async getNotifications(t, n) {
|
|
2074
2071
|
await this.token.autoLogin();
|
|
2075
|
-
const { data:
|
|
2076
|
-
...
|
|
2072
|
+
const { data: r } = await this.req.get("community/notifications", wr, {
|
|
2073
|
+
...n,
|
|
2077
2074
|
params: c({ max_results: 20, ...t })
|
|
2078
2075
|
});
|
|
2079
2076
|
return {
|
|
2080
|
-
notifications:
|
|
2081
|
-
next_token:
|
|
2077
|
+
notifications: r?.notifications || [],
|
|
2078
|
+
next_token: r?.next_token || ""
|
|
2082
2079
|
};
|
|
2083
2080
|
}
|
|
2084
2081
|
/**
|
|
@@ -2088,35 +2085,38 @@ class Nr {
|
|
|
2088
2085
|
*/
|
|
2089
2086
|
async getUnreadNotificationsCount(t) {
|
|
2090
2087
|
if (!await this.token.autoLogin()) return null;
|
|
2091
|
-
const { data:
|
|
2088
|
+
const { data: n } = await this.req.get(
|
|
2092
2089
|
"community/unread-notifications-count",
|
|
2093
|
-
|
|
2090
|
+
kr,
|
|
2094
2091
|
t
|
|
2095
2092
|
);
|
|
2096
|
-
return
|
|
2093
|
+
return n;
|
|
2097
2094
|
}
|
|
2098
2095
|
/**
|
|
2099
2096
|
* 社区用户将通知标为已读
|
|
2100
2097
|
*
|
|
2101
2098
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=TCJQxnOjJe
|
|
2102
2099
|
*/
|
|
2103
|
-
async clearUnreadNotifications(t,
|
|
2100
|
+
async clearUnreadNotifications(t, n) {
|
|
2104
2101
|
if (!await this.token.autoLogin()) return !1;
|
|
2105
|
-
const { ok:
|
|
2106
|
-
return
|
|
2102
|
+
const { ok: r } = await this.req.post("community/clear-unread-notifications", { category: t }, null, n);
|
|
2103
|
+
return r;
|
|
2107
2104
|
}
|
|
2108
2105
|
}
|
|
2109
|
-
const
|
|
2106
|
+
const vr = s({
|
|
2110
2107
|
nonce_str: e.string(),
|
|
2111
2108
|
timestamp: e.number(),
|
|
2112
2109
|
signature: e.string()
|
|
2113
2110
|
});
|
|
2114
|
-
var
|
|
2115
|
-
function
|
|
2116
|
-
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");
|
|
2117
2114
|
}
|
|
2118
|
-
const
|
|
2119
|
-
class
|
|
2115
|
+
const J = "wx_login_cache";
|
|
2116
|
+
class Ir {
|
|
2117
|
+
token;
|
|
2118
|
+
$appid;
|
|
2119
|
+
req;
|
|
2120
2120
|
/**
|
|
2121
2121
|
* 创建微信相关功能接口
|
|
2122
2122
|
*
|
|
@@ -2130,11 +2130,8 @@ class Or {
|
|
|
2130
2130
|
*
|
|
2131
2131
|
* https://developers.weixin.qq.com/miniprogram/dev/api/open-api/account-info/wx.getAccountInfoSync.html
|
|
2132
2132
|
*/
|
|
2133
|
-
constructor(t,
|
|
2134
|
-
|
|
2135
|
-
d(this, "$appid");
|
|
2136
|
-
d(this, "req");
|
|
2137
|
-
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();
|
|
2138
2135
|
}
|
|
2139
2136
|
get appid() {
|
|
2140
2137
|
return this.$appid;
|
|
@@ -2147,11 +2144,11 @@ class Or {
|
|
|
2147
2144
|
* 也可以直接调用 login 方法,并传入 weixin code 的读取函数
|
|
2148
2145
|
*/
|
|
2149
2146
|
async getLoginCache() {
|
|
2150
|
-
const t = this.token.storage.get(
|
|
2147
|
+
const t = this.token.storage.get(J);
|
|
2151
2148
|
if (!t)
|
|
2152
2149
|
return null;
|
|
2153
|
-
const
|
|
2154
|
-
return
|
|
2150
|
+
const n = pe(t);
|
|
2151
|
+
return L(n) ? (this.token.weixinToken = n.weixin_token, await this.token.autoLogin(), n) : null;
|
|
2155
2152
|
}
|
|
2156
2153
|
/**
|
|
2157
2154
|
* 小程序页面微信静默登录,获取 weixinToken / open_id / union_id。
|
|
@@ -2171,20 +2168,20 @@ class Or {
|
|
|
2171
2168
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=GwIZ0givCb
|
|
2172
2169
|
*/
|
|
2173
2170
|
async login(t) {
|
|
2174
|
-
if (!
|
|
2171
|
+
if (!b.wx)
|
|
2175
2172
|
throw new Error("当前环境非微信小程序");
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
return
|
|
2179
|
-
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(
|
|
2180
2177
|
"weixin/login",
|
|
2181
|
-
{ code:
|
|
2182
|
-
|
|
2178
|
+
{ code: r, appid: this.appid },
|
|
2179
|
+
L,
|
|
2183
2180
|
{ ...t, message: !1 }
|
|
2184
2181
|
);
|
|
2185
|
-
return
|
|
2186
|
-
message:
|
|
2187
|
-
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
|
|
2188
2185
|
};
|
|
2189
2186
|
}
|
|
2190
2187
|
/**
|
|
@@ -2203,30 +2200,30 @@ class Or {
|
|
|
2203
2200
|
* - snsapi_base 不弹出授权页面,用户无感知,只能获取用户 openid,如果需要获取 union_id 则需要 snsapi_userinfo
|
|
2204
2201
|
* - snsapi_userinfo 【默认】弹出授权页面,可拿到 openid、union_id、昵称、头像等信息,但用户也可能会拒绝授权
|
|
2205
2202
|
*/
|
|
2206
|
-
async webLogin(t = "snsapi_userinfo",
|
|
2207
|
-
const
|
|
2208
|
-
if (!
|
|
2209
|
-
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"]);
|
|
2210
2207
|
location.replace(
|
|
2211
|
-
`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`
|
|
2212
2209
|
);
|
|
2213
2210
|
return;
|
|
2214
2211
|
}
|
|
2215
|
-
if (/^100\d{2}$/.test(
|
|
2212
|
+
if (/^100\d{2}$/.test(r))
|
|
2216
2213
|
return {
|
|
2217
|
-
message: "Error: " +
|
|
2218
|
-
error:
|
|
2214
|
+
message: "Error: " + r,
|
|
2215
|
+
error: r
|
|
2219
2216
|
};
|
|
2220
|
-
const
|
|
2221
|
-
"replaceState" in history && history.replaceState({}, "",
|
|
2217
|
+
const d = B(["code", "state"]);
|
|
2218
|
+
"replaceState" in history && history.replaceState({}, "", d);
|
|
2222
2219
|
const {
|
|
2223
2220
|
data: m,
|
|
2224
|
-
code:
|
|
2225
|
-
message:
|
|
2226
|
-
} = 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);
|
|
2227
2224
|
return m && (this.token.weixinToken = m.weixin_token, await this.token.autoLogin()), m ?? {
|
|
2228
|
-
message:
|
|
2229
|
-
error:
|
|
2225
|
+
message: ce,
|
|
2226
|
+
error: f
|
|
2230
2227
|
};
|
|
2231
2228
|
}
|
|
2232
2229
|
/**
|
|
@@ -2241,14 +2238,14 @@ class Or {
|
|
|
2241
2238
|
* @param weixinToken 调用 login 后,得到的 weixinToken,如果 weixinToken 为空则跳过不处理
|
|
2242
2239
|
* @param gameCode 从游戏内跳转至小程序时,通过请求参数 query 携带的 game_code,如果值为空则跳过不处理
|
|
2243
2240
|
*/
|
|
2244
|
-
async linkPlayer(t,
|
|
2245
|
-
if (!t || !
|
|
2241
|
+
async linkPlayer(t, n, r) {
|
|
2242
|
+
if (!t || !n)
|
|
2246
2243
|
return !1;
|
|
2247
|
-
const { ok:
|
|
2248
|
-
...
|
|
2244
|
+
const { ok: a } = await this.req.post("weixin/link-player", { weixin_token: t, game_code: n }, null, {
|
|
2245
|
+
...r,
|
|
2249
2246
|
message: !1
|
|
2250
2247
|
});
|
|
2251
|
-
return
|
|
2248
|
+
return a;
|
|
2252
2249
|
}
|
|
2253
2250
|
/**
|
|
2254
2251
|
* 获取集成 JSSDK 所需的签名信息
|
|
@@ -2256,162 +2253,162 @@ class Or {
|
|
|
2256
2253
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
|
|
2257
2254
|
*/
|
|
2258
2255
|
async getJSSDKConfig(t) {
|
|
2259
|
-
const { data:
|
|
2256
|
+
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", vr, {
|
|
2260
2257
|
...t,
|
|
2261
2258
|
params: {
|
|
2262
2259
|
appid: this.appid,
|
|
2263
2260
|
url: location.href.split("#")[0]
|
|
2264
2261
|
}
|
|
2265
2262
|
});
|
|
2266
|
-
return
|
|
2263
|
+
return n ? {
|
|
2267
2264
|
appid: this.appid,
|
|
2268
|
-
nonceStr:
|
|
2269
|
-
timestamp:
|
|
2270
|
-
signature:
|
|
2265
|
+
nonceStr: n.nonce_str,
|
|
2266
|
+
timestamp: n.timestamp,
|
|
2267
|
+
signature: n.signature
|
|
2271
2268
|
} : null;
|
|
2272
2269
|
}
|
|
2273
2270
|
}
|
|
2274
2271
|
export {
|
|
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
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2272
|
+
se as AntispamValidator,
|
|
2273
|
+
jr as AuthToken,
|
|
2274
|
+
an as CashbackEngagementDataValidator,
|
|
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,
|
|
2335
2332
|
u as FeatureType,
|
|
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
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
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,
|
|
2389
|
+
Vn as RewardValidator,
|
|
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
|
|
2417
2414
|
};
|