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