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