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