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