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