@seayoo-web/gamer-api 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +160 -156
- package/package.json +4 -4
- package/types/src/event.d.ts +1 -1
- package/types/src/event.define.d.ts +1 -2
- package/types/src/event.engage/engage.d.ts +60 -0
- package/types/src/event.engage/index.d.ts +3 -47
- package/types/src/event.engage/reward.d.ts +1 -1
- package/types/src/event.guards.d.ts +1 -1
- package/types/src/token.define.d.ts +7 -1
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ const he = {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}, f = "gamer_token";
|
|
62
|
-
class
|
|
62
|
+
class wr {
|
|
63
63
|
constructor(t, n) {
|
|
64
64
|
l(this, "$idToken", "");
|
|
65
65
|
l(this, "$weixinToken", "");
|
|
@@ -279,7 +279,7 @@ const ke = {
|
|
|
279
279
|
...Pe.shape,
|
|
280
280
|
role_level: e.number(),
|
|
281
281
|
last_login_time: e.number()
|
|
282
|
-
}).lock(),
|
|
282
|
+
}).lock(), Ue = e.object({
|
|
283
283
|
...z.shape,
|
|
284
284
|
/** 角色战力 */
|
|
285
285
|
role_fighting: e.number(),
|
|
@@ -289,7 +289,7 @@ const ke = {
|
|
|
289
289
|
kin_name: e.string().optional(),
|
|
290
290
|
/** 宗门职位 */
|
|
291
291
|
kin_position: e.string().optional()
|
|
292
|
-
}).lock(),
|
|
292
|
+
}).lock(), $e = e.object({
|
|
293
293
|
name: e.string(),
|
|
294
294
|
avatar_url: e.string(),
|
|
295
295
|
bio: e.string(),
|
|
@@ -309,7 +309,7 @@ const ke = {
|
|
|
309
309
|
decreased_credit: e.number(),
|
|
310
310
|
expired_credit: e.number(),
|
|
311
311
|
balance_credit: e.number()
|
|
312
|
-
}).lock(),
|
|
312
|
+
}).lock(), De = e.object({
|
|
313
313
|
id: e.number(),
|
|
314
314
|
change_type: Ve,
|
|
315
315
|
change_scene: je,
|
|
@@ -351,10 +351,10 @@ const ke = {
|
|
|
351
351
|
created_at: e.number(),
|
|
352
352
|
updated_at: e.number(),
|
|
353
353
|
redeemable_quantity: e.number().optional()
|
|
354
|
-
}).lock(),
|
|
354
|
+
}).lock(), Ie = e.object({
|
|
355
355
|
...k(K.shape, "tag"),
|
|
356
356
|
product: X.clone().optional()
|
|
357
|
-
}).lock(),
|
|
357
|
+
}).lock(), kr = e.union(
|
|
358
358
|
e.object({
|
|
359
359
|
server_id: e.string(),
|
|
360
360
|
role_id: e.string()
|
|
@@ -389,14 +389,14 @@ const ke = {
|
|
|
389
389
|
status: xe,
|
|
390
390
|
created_at: e.number(),
|
|
391
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:
|
|
393
|
-
credit_logs: e.array(
|
|
392
|
+
}), Oe = e.guard(Se), N = o({ player: Le }), Be = o({ roles: e.array(z) }), j = o({ role_card: Ue }), O = e.guard($e), B = e.guard(J), Qe = o({ addresses: e.array(J) }), Me = e.guard(Fe), He = o({
|
|
393
|
+
credit_logs: e.array(De),
|
|
394
394
|
next_token: e.string().optional()
|
|
395
|
-
}), ze = o({ products: e.array(X) }), Je = o({ benefits: e.array(K) }), Ke = o({ benefit:
|
|
395
|
+
}), ze = o({ products: e.array(X) }), Je = o({ benefits: e.array(K) }), Ke = o({ benefit: Ie }), Xe = o({
|
|
396
396
|
redemptions: e.array(Ne),
|
|
397
397
|
next_token: e.string().optional()
|
|
398
398
|
});
|
|
399
|
-
class
|
|
399
|
+
class vr {
|
|
400
400
|
constructor(t) {
|
|
401
401
|
l(this, "token");
|
|
402
402
|
l(this, "req");
|
|
@@ -642,7 +642,7 @@ const v = {
|
|
|
642
642
|
Credit: "credit",
|
|
643
643
|
/** 空奖励 */
|
|
644
644
|
VoidItem: "void_item"
|
|
645
|
-
}, Y = e.string().enum(v).lock(),
|
|
645
|
+
}, Y = e.string().enum(v).lock(), Cr = v, Z = Y, Ye = {
|
|
646
646
|
/** 世游通行证 ID / Combo ID */
|
|
647
647
|
UserId: "user_id",
|
|
648
648
|
/** 游戏角色 ID */
|
|
@@ -718,7 +718,7 @@ const v = {
|
|
|
718
718
|
Failed: "failed",
|
|
719
719
|
/** 奖励已发货 */
|
|
720
720
|
Delivered: "delivered"
|
|
721
|
-
},
|
|
721
|
+
}, Vr = e.string().enum(g).lock(), ot = {
|
|
722
722
|
/** 奖励未领取 */
|
|
723
723
|
Unclaimed: g.Unclaimed,
|
|
724
724
|
/** 奖励已领取 */
|
|
@@ -765,7 +765,7 @@ const v = {
|
|
|
765
765
|
Claimed: "claimed",
|
|
766
766
|
/** 领奖失败 */
|
|
767
767
|
Fail: "fail"
|
|
768
|
-
},
|
|
768
|
+
}, Rr = e.string().enum(h).lock(), ut = {
|
|
769
769
|
/** 发起组队 */
|
|
770
770
|
Assemble: "assemble",
|
|
771
771
|
/** 加入队伍 */
|
|
@@ -776,14 +776,14 @@ const v = {
|
|
|
776
776
|
ChangeVisibility: "change_visibility",
|
|
777
777
|
/** 查询组队信息 */
|
|
778
778
|
Query: "query"
|
|
779
|
-
},
|
|
779
|
+
}, jr = e.string().enum(ut).lock(), lt = {
|
|
780
780
|
/** 查询抽奖券 */
|
|
781
781
|
Query: "query",
|
|
782
782
|
/** 开奖 */
|
|
783
783
|
Draw: "draw",
|
|
784
784
|
/** 领奖 */
|
|
785
785
|
Claim: "claim"
|
|
786
|
-
},
|
|
786
|
+
}, Tr = e.string().enum(lt).lock(), mt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), U = e.object({
|
|
787
787
|
reward_item_id: e.number(),
|
|
788
788
|
reward_amount: e.number(),
|
|
789
789
|
reward_item_name: e.string(),
|
|
@@ -793,11 +793,11 @@ const v = {
|
|
|
793
793
|
reward_item_rating: e.number()
|
|
794
794
|
}).lock(), dt = e.object({
|
|
795
795
|
engage_count: e.number(),
|
|
796
|
-
rewards: e.array(
|
|
796
|
+
rewards: e.array(U)
|
|
797
797
|
}).lock(), gt = e.union(
|
|
798
798
|
e.object({
|
|
799
799
|
feature_reward_type: e.string().enum("every"),
|
|
800
|
-
reward_details: e.array(
|
|
800
|
+
reward_details: e.array(U)
|
|
801
801
|
}),
|
|
802
802
|
e.object({
|
|
803
803
|
feature_reward_type: e.string().enum("regular"),
|
|
@@ -874,7 +874,7 @@ const v = {
|
|
|
874
874
|
reward_item_desc: e.string().optional(),
|
|
875
875
|
reward_amount: e.number(),
|
|
876
876
|
reward_remaining_stock: e.number()
|
|
877
|
-
}),
|
|
877
|
+
}), Ut = e.object({
|
|
878
878
|
...c.shape,
|
|
879
879
|
feature_type: e.string().enum(Pt),
|
|
880
880
|
config: e.object({
|
|
@@ -885,16 +885,16 @@ const v = {
|
|
|
885
885
|
consume_item_desc: e.string().optional(),
|
|
886
886
|
rewards: e.array(Et)
|
|
887
887
|
})
|
|
888
|
-
}),
|
|
888
|
+
}), $t = s.LotteryDraw, Ft = e.object({
|
|
889
889
|
...c.shape,
|
|
890
|
-
feature_type: e.string().enum(
|
|
890
|
+
feature_type: e.string().enum($t),
|
|
891
891
|
config: e.object({
|
|
892
892
|
draw_not_before: e.number(),
|
|
893
893
|
draw_not_after: e.number()
|
|
894
894
|
})
|
|
895
|
-
}),
|
|
895
|
+
}), Dt = s.Preregister, It = e.object({
|
|
896
896
|
...c.shape,
|
|
897
|
-
feature_type: e.string().enum(
|
|
897
|
+
feature_type: e.string().enum(Dt)
|
|
898
898
|
}), Gt = s.Quest, At = e.object({
|
|
899
899
|
...c.shape,
|
|
900
900
|
feature_type: e.string().enum(Gt),
|
|
@@ -956,7 +956,7 @@ const v = {
|
|
|
956
956
|
finalists_amount: e.number(),
|
|
957
957
|
source: it,
|
|
958
958
|
options: e.array(Zt),
|
|
959
|
-
rewards: e.array(
|
|
959
|
+
rewards: e.array(U)
|
|
960
960
|
})
|
|
961
961
|
}), en = e.union(
|
|
962
962
|
_t,
|
|
@@ -967,9 +967,9 @@ const v = {
|
|
|
967
967
|
jt,
|
|
968
968
|
qt,
|
|
969
969
|
St,
|
|
970
|
-
|
|
970
|
+
Ut,
|
|
971
971
|
Ft,
|
|
972
|
-
|
|
972
|
+
It,
|
|
973
973
|
At,
|
|
974
974
|
Ot,
|
|
975
975
|
Qt,
|
|
@@ -1008,7 +1008,7 @@ const v = {
|
|
|
1008
1008
|
reward_item_desc: e.string().optional(),
|
|
1009
1009
|
reward_item_rating: e.number(),
|
|
1010
1010
|
receive_time: e.number(),
|
|
1011
|
-
extra_data: e.union(...ne
|
|
1011
|
+
extra_data: e.union(...ne, e.record(e.unknown())).satisfies().optional()
|
|
1012
1012
|
}), te = e.object({
|
|
1013
1013
|
reward_id: e.number(),
|
|
1014
1014
|
reward_item_id: e.number(),
|
|
@@ -1078,7 +1078,7 @@ const v = {
|
|
|
1078
1078
|
team_code: e.string(),
|
|
1079
1079
|
leader_name: e.string(),
|
|
1080
1080
|
total_members: e.number()
|
|
1081
|
-
}),
|
|
1081
|
+
}), qr = e.object({
|
|
1082
1082
|
is_leader: e.bool(),
|
|
1083
1083
|
is_myself: e.bool().optional(),
|
|
1084
1084
|
role_name: e.string(),
|
|
@@ -1102,7 +1102,7 @@ const v = {
|
|
|
1102
1102
|
comment: e.string(),
|
|
1103
1103
|
video_note: e.number(),
|
|
1104
1104
|
created_at: e.number()
|
|
1105
|
-
}), ne =
|
|
1105
|
+
}), ne = [
|
|
1106
1106
|
dn,
|
|
1107
1107
|
an,
|
|
1108
1108
|
bn,
|
|
@@ -1115,25 +1115,25 @@ const v = {
|
|
|
1115
1115
|
fn,
|
|
1116
1116
|
gn,
|
|
1117
1117
|
mn
|
|
1118
|
-
).satisfies().lock(), re = e.object({
|
|
1118
|
+
], kn = e.union(...ne).satisfies().lock(), re = e.object({
|
|
1119
1119
|
engagement_id: e.number(),
|
|
1120
1120
|
user_id: e.string(),
|
|
1121
1121
|
event_id: e.number(),
|
|
1122
1122
|
feature_id: e.number(),
|
|
1123
1123
|
sequence: e.number(),
|
|
1124
|
-
data:
|
|
1124
|
+
data: kn.clone().optional(),
|
|
1125
1125
|
server_id: e.string().optional(),
|
|
1126
1126
|
role_id: e.string().optional(),
|
|
1127
1127
|
created_at: e.number(),
|
|
1128
1128
|
rewards: e.array(sn).optional()
|
|
1129
|
-
}).lock(),
|
|
1129
|
+
}).lock(), vn = e.object({
|
|
1130
1130
|
allowed: e.bool(),
|
|
1131
1131
|
registered: e.bool()
|
|
1132
|
-
}),
|
|
1132
|
+
}), Cn = e.object({
|
|
1133
1133
|
feature_id: e.number(),
|
|
1134
1134
|
can_engage: e.bool(),
|
|
1135
1135
|
has_unclaimed_rewards: e.bool()
|
|
1136
|
-
}),
|
|
1136
|
+
}), Vn = e.object({
|
|
1137
1137
|
engagement_id: e.number(),
|
|
1138
1138
|
engagement: e.object({
|
|
1139
1139
|
user_id: e.string(),
|
|
@@ -1145,31 +1145,31 @@ const v = {
|
|
|
1145
1145
|
}).optional(),
|
|
1146
1146
|
rewards: e.array(cn).optional(),
|
|
1147
1147
|
scan: e.bool().optional()
|
|
1148
|
-
}),
|
|
1148
|
+
}), Rn = e.object({
|
|
1149
1149
|
reward_id: e.number(),
|
|
1150
1150
|
reward_status: P
|
|
1151
|
-
}),
|
|
1151
|
+
}), jn = e.guard(tn), Tn = e.guard(vn), q = o({ count: e.number() }), qn = o({ first_visit: e.bool() }), xn = o({
|
|
1152
1152
|
engagements: e.union(e.array(wn), e.array(yn))
|
|
1153
|
-
}), xn = o({
|
|
1154
|
-
status: e.array(vn)
|
|
1155
1153
|
}), Sn = o({
|
|
1154
|
+
status: e.array(Cn)
|
|
1155
|
+
}), Ln = o({
|
|
1156
1156
|
engagements: e.array(re),
|
|
1157
1157
|
next_token: e.string().optional()
|
|
1158
|
-
}),
|
|
1159
|
-
claimed_items: e.array(
|
|
1160
|
-
}),
|
|
1158
|
+
}), Pn = e.guard(Vn), En = o({
|
|
1159
|
+
claimed_items: e.array(Rn)
|
|
1160
|
+
}), Un = o({
|
|
1161
1161
|
reward_status: P
|
|
1162
1162
|
}), $n = o({
|
|
1163
1163
|
user_rewards: e.array(te),
|
|
1164
1164
|
next_token: e.string().optional()
|
|
1165
|
-
}), Un = o({
|
|
1166
|
-
scene: e.string()
|
|
1167
1165
|
}), Fn = o({
|
|
1166
|
+
scene: e.string()
|
|
1167
|
+
}), Dn = o({
|
|
1168
1168
|
params: e.string()
|
|
1169
1169
|
}), In = o({
|
|
1170
1170
|
img: e.string()
|
|
1171
1171
|
});
|
|
1172
|
-
class
|
|
1172
|
+
class xr {
|
|
1173
1173
|
constructor(t, n) {
|
|
1174
1174
|
l(this, "token");
|
|
1175
1175
|
l(this, "event", 0);
|
|
@@ -1182,7 +1182,7 @@ class qr {
|
|
|
1182
1182
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1183
1183
|
*/
|
|
1184
1184
|
async verifyMobileAllowed(t, n) {
|
|
1185
|
-
const { data: r } = await this.req.get("verify-mobile-allowed",
|
|
1185
|
+
const { data: r } = await this.req.get("verify-mobile-allowed", Tn, {
|
|
1186
1186
|
params: { game_id: t, mobile: n }
|
|
1187
1187
|
});
|
|
1188
1188
|
return r;
|
|
@@ -1193,7 +1193,7 @@ class qr {
|
|
|
1193
1193
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1194
1194
|
*/
|
|
1195
1195
|
async getConfig() {
|
|
1196
|
-
const { data: t } = await this.req.get(`event/${this.event}/event-config`,
|
|
1196
|
+
const { data: t } = await this.req.get(`event/${this.event}/event-config`, jn);
|
|
1197
1197
|
return t;
|
|
1198
1198
|
}
|
|
1199
1199
|
/**
|
|
@@ -1226,7 +1226,7 @@ class qr {
|
|
|
1226
1226
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1227
1227
|
*/
|
|
1228
1228
|
async getEngagements(t) {
|
|
1229
|
-
const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`,
|
|
1229
|
+
const { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, xn, {
|
|
1230
1230
|
params: { feature_id: t }
|
|
1231
1231
|
});
|
|
1232
1232
|
return (n == null ? void 0 : n.engagements) || [];
|
|
@@ -1241,7 +1241,7 @@ class qr {
|
|
|
1241
1241
|
const { data: n, code: r } = await this.req.post(
|
|
1242
1242
|
`event/${this.event}/visit`,
|
|
1243
1243
|
a(t || {}),
|
|
1244
|
-
|
|
1244
|
+
qn
|
|
1245
1245
|
);
|
|
1246
1246
|
return n ?? {
|
|
1247
1247
|
error: r
|
|
@@ -1258,7 +1258,7 @@ class qr {
|
|
|
1258
1258
|
*/
|
|
1259
1259
|
async getUserFeatureStatus(t) {
|
|
1260
1260
|
if (!await this.token.autoLogin()) return [];
|
|
1261
|
-
const { data: n } = await this.req.get("event/user-feature-status",
|
|
1261
|
+
const { data: n } = await this.req.get("event/user-feature-status", Sn, {
|
|
1262
1262
|
params: a({ ...t, event_id: this.event }),
|
|
1263
1263
|
message: !1
|
|
1264
1264
|
});
|
|
@@ -1273,7 +1273,7 @@ class qr {
|
|
|
1273
1273
|
*/
|
|
1274
1274
|
async getUserEngagements(t, n) {
|
|
1275
1275
|
if (!await this.token.autoLogin()) return [];
|
|
1276
|
-
const { data: r } = await this.req.get("event/user-engagements",
|
|
1276
|
+
const { data: r } = await this.req.get("event/user-engagements", Ln, {
|
|
1277
1277
|
params: a({
|
|
1278
1278
|
max_results: 20,
|
|
1279
1279
|
...n,
|
|
@@ -1304,7 +1304,7 @@ class qr {
|
|
|
1304
1304
|
engagement: n,
|
|
1305
1305
|
...r
|
|
1306
1306
|
}),
|
|
1307
|
-
|
|
1307
|
+
Pn
|
|
1308
1308
|
);
|
|
1309
1309
|
return u ?? {
|
|
1310
1310
|
error: d
|
|
@@ -1317,7 +1317,7 @@ class qr {
|
|
|
1317
1317
|
*/
|
|
1318
1318
|
async claimRewards(t) {
|
|
1319
1319
|
await this.token.autoLogin();
|
|
1320
|
-
const { data: n, code: r } = await this.req.post("event/claim-rewards", a(t),
|
|
1320
|
+
const { data: n, code: r } = await this.req.post("event/claim-rewards", a(t), En), u = n == null ? void 0 : n.claimed_items;
|
|
1321
1321
|
return u ? u.map((d) => (d.reward_status = d.reward_status === p.UnclaimedErr ? p.Unclaimed : d.reward_status, d)) : {
|
|
1322
1322
|
error: r
|
|
1323
1323
|
};
|
|
@@ -1332,7 +1332,7 @@ class qr {
|
|
|
1332
1332
|
const { data: n, code: r } = await this.req.post(
|
|
1333
1333
|
"event/claim-weixin-hongbao",
|
|
1334
1334
|
{ reward_id: t },
|
|
1335
|
-
|
|
1335
|
+
Un
|
|
1336
1336
|
);
|
|
1337
1337
|
return n ? (n.reward_status = n.reward_status === p.UnclaimedErr ? p.Unclaimed : n.reward_status, n) : {
|
|
1338
1338
|
error: r
|
|
@@ -1386,7 +1386,7 @@ class qr {
|
|
|
1386
1386
|
*/
|
|
1387
1387
|
async getUnlimitQrcodeScene(t) {
|
|
1388
1388
|
if (!await this.token.autoLogin()) return null;
|
|
1389
|
-
const { data: n } = await this.req.get("event/unlimit-qrcode-scene",
|
|
1389
|
+
const { data: n } = await this.req.get("event/unlimit-qrcode-scene", Fn, {
|
|
1390
1390
|
params: { params: t }
|
|
1391
1391
|
});
|
|
1392
1392
|
return (n == null ? void 0 : n.scene) ?? null;
|
|
@@ -1399,7 +1399,7 @@ class qr {
|
|
|
1399
1399
|
* @param scene - 小程序码 scene 值
|
|
1400
1400
|
*/
|
|
1401
1401
|
async getParamsByQrcodeScene(t) {
|
|
1402
|
-
const { data: n } = await this.req.get("event/params-by-qrcode-scene",
|
|
1402
|
+
const { data: n } = await this.req.get("event/params-by-qrcode-scene", Dn, {
|
|
1403
1403
|
params: { scene: t }
|
|
1404
1404
|
});
|
|
1405
1405
|
return (n == null ? void 0 : n.params) ?? null;
|
|
@@ -1415,12 +1415,12 @@ class qr {
|
|
|
1415
1415
|
return (n == null ? void 0 : n.img) ?? null;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1418
|
+
const Gn = {
|
|
1419
1419
|
/** 所有人均可以发帖 */
|
|
1420
1420
|
All: "all",
|
|
1421
1421
|
/** 指定用户可发帖 */
|
|
1422
1422
|
Limit: "limit"
|
|
1423
|
-
},
|
|
1423
|
+
}, An = e.string().enum(Gn).lock(), Nn = {
|
|
1424
1424
|
/** 待审核(仅自己可见) */
|
|
1425
1425
|
Pending: "pending",
|
|
1426
1426
|
/** 审核通过 */
|
|
@@ -1429,14 +1429,14 @@ const Dn = {
|
|
|
1429
1429
|
Failed: "failed",
|
|
1430
1430
|
/** 嫌疑(仅自己可见) */
|
|
1431
1431
|
Suspect: "suspect"
|
|
1432
|
-
}, ie = e.string().enum(
|
|
1432
|
+
}, ie = e.string().enum(Nn).lock(), On = {
|
|
1433
1433
|
/** 系统通知 */
|
|
1434
1434
|
System: "system",
|
|
1435
1435
|
/** 评论我的 */
|
|
1436
1436
|
Comment: "comment",
|
|
1437
1437
|
/** 点赞通知 */
|
|
1438
1438
|
Like: "like"
|
|
1439
|
-
},
|
|
1439
|
+
}, Sr = e.string().enum(On).lock(), m = {
|
|
1440
1440
|
/** 系统通知 */
|
|
1441
1441
|
System: "system",
|
|
1442
1442
|
/** 帖子被置顶 */
|
|
@@ -1461,15 +1461,15 @@ const Dn = {
|
|
|
1461
1461
|
ReplyLiked: "reply_liked",
|
|
1462
1462
|
/** 回复被删除 */
|
|
1463
1463
|
ReplyDeleted: "reply_deleted"
|
|
1464
|
-
},
|
|
1464
|
+
}, Bn = e.string().enum(m).lock(), oe = e.object({
|
|
1465
1465
|
forum_id: e.number(),
|
|
1466
1466
|
icon_url: e.string(),
|
|
1467
1467
|
name: e.string(),
|
|
1468
1468
|
tags: e.array(e.string()),
|
|
1469
1469
|
sort: e.number(),
|
|
1470
|
-
mode:
|
|
1470
|
+
mode: An,
|
|
1471
1471
|
member_ids: e.array(e.number())
|
|
1472
|
-
}).lock(),
|
|
1472
|
+
}).lock(), $ = e.object({
|
|
1473
1473
|
topic_id: e.number(),
|
|
1474
1474
|
cover_url: e.string(),
|
|
1475
1475
|
name: e.string(),
|
|
@@ -1489,7 +1489,7 @@ const Dn = {
|
|
|
1489
1489
|
comments_num: e.number(),
|
|
1490
1490
|
liked: e.bool(),
|
|
1491
1491
|
image_urls: e.array(e.string()),
|
|
1492
|
-
topics: e.array(
|
|
1492
|
+
topics: e.array($),
|
|
1493
1493
|
event_ids: e.array(e.number()),
|
|
1494
1494
|
is_pinned: e.bool(),
|
|
1495
1495
|
is_highlighted: e.bool(),
|
|
@@ -1497,7 +1497,7 @@ const Dn = {
|
|
|
1497
1497
|
create_time: e.number()
|
|
1498
1498
|
}).lock(), ae = e.object({
|
|
1499
1499
|
err_msg: e.string().optional()
|
|
1500
|
-
}).lock(),
|
|
1500
|
+
}).lock(), Qn = e.object({
|
|
1501
1501
|
reply_id: e.number(),
|
|
1502
1502
|
reply_content: e.string().optional(),
|
|
1503
1503
|
replied_by: e.string(),
|
|
@@ -1516,7 +1516,7 @@ const Dn = {
|
|
|
1516
1516
|
content: e.string(),
|
|
1517
1517
|
like_num: e.number(),
|
|
1518
1518
|
liked: e.bool(),
|
|
1519
|
-
reply_to:
|
|
1519
|
+
reply_to: Qn,
|
|
1520
1520
|
create_time: e.number()
|
|
1521
1521
|
}).lock(), w = e.object({
|
|
1522
1522
|
comment_id: e.number(),
|
|
@@ -1538,22 +1538,22 @@ const Dn = {
|
|
|
1538
1538
|
create_time: e.number(),
|
|
1539
1539
|
status: ie,
|
|
1540
1540
|
replies: e.array(C).optional()
|
|
1541
|
-
}).lock(),
|
|
1541
|
+
}).lock(), Mn = e.object({
|
|
1542
1542
|
image_url: e.string(),
|
|
1543
1543
|
upload_url: e.string(),
|
|
1544
1544
|
existed: e.bool()
|
|
1545
1545
|
}).lock(), b = e.object({
|
|
1546
1546
|
notification_id: e.string(),
|
|
1547
|
-
notification_type:
|
|
1547
|
+
notification_type: Bn,
|
|
1548
1548
|
is_read: e.bool(),
|
|
1549
1549
|
create_time: e.number(),
|
|
1550
1550
|
origin_user_id: e.string(),
|
|
1551
1551
|
origin_user_name: e.string(),
|
|
1552
1552
|
origin_user_avatar_url: e.string()
|
|
1553
|
-
}).lock(),
|
|
1553
|
+
}).lock(), Hn = e.object({
|
|
1554
1554
|
system_message_subject: e.string(),
|
|
1555
1555
|
system_message_content: e.string()
|
|
1556
|
-
}).lock(),
|
|
1556
|
+
}).lock(), D = e.object({
|
|
1557
1557
|
post_id: e.number(),
|
|
1558
1558
|
post_subject: e.string(),
|
|
1559
1559
|
post_summary: e.string(),
|
|
@@ -1561,81 +1561,81 @@ const Dn = {
|
|
|
1561
1561
|
}).lock(), V = e.object({
|
|
1562
1562
|
comment_id: e.number(),
|
|
1563
1563
|
comment_content: e.string()
|
|
1564
|
-
}).lock(),
|
|
1564
|
+
}).lock(), I = e.object({
|
|
1565
1565
|
reply_id: e.number(),
|
|
1566
1566
|
reply_content: e.string()
|
|
1567
|
-
}).lock(),
|
|
1567
|
+
}).lock(), zn = e.object({
|
|
1568
1568
|
...b.shape,
|
|
1569
|
-
...
|
|
1569
|
+
...Hn.shape,
|
|
1570
1570
|
notification_type: e.string().enum(m.System)
|
|
1571
|
-
}),
|
|
1571
|
+
}), Jn = e.object({
|
|
1572
1572
|
...b.shape,
|
|
1573
|
-
...
|
|
1573
|
+
...D.shape,
|
|
1574
1574
|
notification_type: e.string().enum(
|
|
1575
1575
|
m.PostPinned,
|
|
1576
1576
|
m.PostHighlighted,
|
|
1577
1577
|
m.PostDeleted,
|
|
1578
1578
|
m.PostLiked
|
|
1579
1579
|
)
|
|
1580
|
-
}), Jn = e.object({
|
|
1581
|
-
...b.shape,
|
|
1582
|
-
...I.shape,
|
|
1583
|
-
...V.shape,
|
|
1584
|
-
notification_type: e.string().enum(m.PostCommented)
|
|
1585
1580
|
}), Kn = e.object({
|
|
1586
1581
|
...b.shape,
|
|
1587
|
-
...V.shape,
|
|
1588
1582
|
...D.shape,
|
|
1589
|
-
|
|
1583
|
+
...V.shape,
|
|
1584
|
+
notification_type: e.string().enum(m.PostCommented)
|
|
1590
1585
|
}), Xn = e.object({
|
|
1591
1586
|
...b.shape,
|
|
1592
1587
|
...V.shape,
|
|
1593
1588
|
...I.shape,
|
|
1594
|
-
notification_type: e.string().enum(m.
|
|
1589
|
+
notification_type: e.string().enum(m.CommentReplied)
|
|
1595
1590
|
}), Yn = e.object({
|
|
1596
1591
|
...b.shape,
|
|
1592
|
+
...V.shape,
|
|
1597
1593
|
...D.shape,
|
|
1594
|
+
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
1595
|
+
}), Zn = e.object({
|
|
1596
|
+
...b.shape,
|
|
1597
|
+
...I.shape,
|
|
1598
1598
|
notification_type: e.string().enum(m.ReplyReplied),
|
|
1599
1599
|
comment_id: e.number(),
|
|
1600
1600
|
reply_to_reply_id: e.number(),
|
|
1601
1601
|
reply_to_reply_content: e.string()
|
|
1602
|
-
}),
|
|
1602
|
+
}), Wn = e.object({
|
|
1603
1603
|
...b.shape,
|
|
1604
|
-
...
|
|
1604
|
+
...I.shape,
|
|
1605
1605
|
...V.shape,
|
|
1606
1606
|
notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
|
|
1607
|
-
}),
|
|
1608
|
-
Hn,
|
|
1607
|
+
}), er = e.union(
|
|
1609
1608
|
zn,
|
|
1610
1609
|
Jn,
|
|
1611
1610
|
Kn,
|
|
1612
1611
|
Xn,
|
|
1613
1612
|
Yn,
|
|
1614
|
-
Zn
|
|
1615
|
-
|
|
1613
|
+
Zn,
|
|
1614
|
+
Wn
|
|
1615
|
+
).satisfies().lock(), tr = o({ forums: e.array(oe) }), nr = o({ topics: e.array($) }), rr = o({ topic: $ }), ir = o({ post: F }), Q = o({
|
|
1616
1616
|
posts: e.array(F),
|
|
1617
1617
|
next_token: e.string().optional()
|
|
1618
|
-
}),
|
|
1618
|
+
}), or = o({ post: F, antispam: ae }), ar = o({
|
|
1619
1619
|
replies: e.array(C),
|
|
1620
1620
|
next_token: e.string().optional()
|
|
1621
|
-
}),
|
|
1621
|
+
}), sr = o({ reply: C }), cr = o({
|
|
1622
1622
|
reply: C.clone().optional(),
|
|
1623
1623
|
antispam: ae.clone().optional()
|
|
1624
|
-
}),
|
|
1624
|
+
}), ur = o({ comment: w }), lr = o({
|
|
1625
1625
|
comments: e.array(w),
|
|
1626
1626
|
next_token: e.string().optional()
|
|
1627
|
-
}),
|
|
1627
|
+
}), mr = o({
|
|
1628
1628
|
comment: w.clone().optional(),
|
|
1629
1629
|
antispam: w.clone().optional()
|
|
1630
|
-
}),
|
|
1631
|
-
notifications: e.array(
|
|
1630
|
+
}), dr = e.guard(Mn), gr = o({
|
|
1631
|
+
notifications: e.array(er),
|
|
1632
1632
|
next_token: e.string().optional()
|
|
1633
|
-
}),
|
|
1633
|
+
}), pr = o({
|
|
1634
1634
|
system: e.number(),
|
|
1635
1635
|
comment: e.number(),
|
|
1636
1636
|
like: e.number()
|
|
1637
1637
|
});
|
|
1638
|
-
class
|
|
1638
|
+
class Lr {
|
|
1639
1639
|
constructor(t) {
|
|
1640
1640
|
l(this, "token");
|
|
1641
1641
|
l(this, "req");
|
|
@@ -1647,7 +1647,7 @@ class Sr {
|
|
|
1647
1647
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
1648
1648
|
*/
|
|
1649
1649
|
async getForums() {
|
|
1650
|
-
const { data: t } = await this.req.get("community/forums",
|
|
1650
|
+
const { data: t } = await this.req.get("community/forums", tr);
|
|
1651
1651
|
return (t == null ? void 0 : t.forums) || [];
|
|
1652
1652
|
}
|
|
1653
1653
|
/**
|
|
@@ -1656,7 +1656,7 @@ class Sr {
|
|
|
1656
1656
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
1657
1657
|
*/
|
|
1658
1658
|
async getTopics() {
|
|
1659
|
-
const { data: t } = await this.req.get("community/topics",
|
|
1659
|
+
const { data: t } = await this.req.get("community/topics", nr);
|
|
1660
1660
|
return (t == null ? void 0 : t.topics) || [];
|
|
1661
1661
|
}
|
|
1662
1662
|
/**
|
|
@@ -1665,7 +1665,7 @@ class Sr {
|
|
|
1665
1665
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
1666
1666
|
*/
|
|
1667
1667
|
async getTopic(t) {
|
|
1668
|
-
const { data: n, code: r } = await this.req.get("community/topic",
|
|
1668
|
+
const { data: n, code: r } = await this.req.get("community/topic", rr, {
|
|
1669
1669
|
params: { topic_id: t }
|
|
1670
1670
|
});
|
|
1671
1671
|
return (n == null ? void 0 : n.topic) ?? { error: r };
|
|
@@ -1698,7 +1698,7 @@ class Sr {
|
|
|
1698
1698
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
1699
1699
|
*/
|
|
1700
1700
|
async getPost(t) {
|
|
1701
|
-
const { data: n, code: r } = await this.req.get("community/post",
|
|
1701
|
+
const { data: n, code: r } = await this.req.get("community/post", ir, {
|
|
1702
1702
|
params: { post_id: t }
|
|
1703
1703
|
});
|
|
1704
1704
|
return (n == null ? void 0 : n.post) ?? { error: r };
|
|
@@ -1709,7 +1709,7 @@ class Sr {
|
|
|
1709
1709
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=M5okHBuaVk
|
|
1710
1710
|
*/
|
|
1711
1711
|
async post(t) {
|
|
1712
|
-
const { data: n, code: r } = await this.req.post("community/post", a(t),
|
|
1712
|
+
const { data: n, code: r } = await this.req.post("community/post", a(t), or);
|
|
1713
1713
|
return n ?? {
|
|
1714
1714
|
error: r
|
|
1715
1715
|
};
|
|
@@ -1720,7 +1720,7 @@ class Sr {
|
|
|
1720
1720
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
1721
1721
|
*/
|
|
1722
1722
|
async getComments(t) {
|
|
1723
|
-
const { data: n, code: r } = await this.req.get("community/comments",
|
|
1723
|
+
const { data: n, code: r } = await this.req.get("community/comments", lr, {
|
|
1724
1724
|
params: a(t)
|
|
1725
1725
|
});
|
|
1726
1726
|
return n ?? { error: r };
|
|
@@ -1731,7 +1731,7 @@ class Sr {
|
|
|
1731
1731
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
1732
1732
|
*/
|
|
1733
1733
|
async getComment(t) {
|
|
1734
|
-
const { data: n, code: r } = await this.req.get("community/comment",
|
|
1734
|
+
const { data: n, code: r } = await this.req.get("community/comment", ur, {
|
|
1735
1735
|
params: { comment_id: t }
|
|
1736
1736
|
});
|
|
1737
1737
|
return (n == null ? void 0 : n.comment) ?? { error: r };
|
|
@@ -1743,7 +1743,7 @@ class Sr {
|
|
|
1743
1743
|
*/
|
|
1744
1744
|
async comment(t) {
|
|
1745
1745
|
await this.token.autoLogin();
|
|
1746
|
-
const { data: n, code: r } = await this.req.post("community/comment", a(t),
|
|
1746
|
+
const { data: n, code: r } = await this.req.post("community/comment", a(t), mr);
|
|
1747
1747
|
return n ?? {
|
|
1748
1748
|
error: r
|
|
1749
1749
|
};
|
|
@@ -1754,7 +1754,7 @@ class Sr {
|
|
|
1754
1754
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
1755
1755
|
*/
|
|
1756
1756
|
async getReplies(t) {
|
|
1757
|
-
const { data: n } = await this.req.get("community/replies",
|
|
1757
|
+
const { data: n } = await this.req.get("community/replies", ar, {
|
|
1758
1758
|
params: a({ max_results: 20, ...t })
|
|
1759
1759
|
});
|
|
1760
1760
|
return n ?? { replies: [] };
|
|
@@ -1765,7 +1765,7 @@ class Sr {
|
|
|
1765
1765
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
1766
1766
|
*/
|
|
1767
1767
|
async getReply(t) {
|
|
1768
|
-
const { data: n, code: r } = await this.req.get("community/reply",
|
|
1768
|
+
const { data: n, code: r } = await this.req.get("community/reply", sr, {
|
|
1769
1769
|
params: { reply_id: t }
|
|
1770
1770
|
});
|
|
1771
1771
|
return (n == null ? void 0 : n.reply) ?? { error: r };
|
|
@@ -1777,7 +1777,7 @@ class Sr {
|
|
|
1777
1777
|
*/
|
|
1778
1778
|
async reply(t) {
|
|
1779
1779
|
await this.token.autoLogin();
|
|
1780
|
-
const { data: n, code: r } = await this.req.post("community/reply", a(t),
|
|
1780
|
+
const { data: n, code: r } = await this.req.post("community/reply", a(t), cr);
|
|
1781
1781
|
return n ?? {
|
|
1782
1782
|
error: r
|
|
1783
1783
|
};
|
|
@@ -1813,7 +1813,7 @@ class Sr {
|
|
|
1813
1813
|
*/
|
|
1814
1814
|
async getMediaPresignedUrl(t) {
|
|
1815
1815
|
await this.token.autoLogin();
|
|
1816
|
-
const { data: n } = await this.req.get("community/media-presign-url",
|
|
1816
|
+
const { data: n } = await this.req.get("community/media-presign-url", dr, {
|
|
1817
1817
|
params: t
|
|
1818
1818
|
});
|
|
1819
1819
|
return n;
|
|
@@ -1827,7 +1827,7 @@ class Sr {
|
|
|
1827
1827
|
*/
|
|
1828
1828
|
async getNotifications(t) {
|
|
1829
1829
|
await this.token.autoLogin();
|
|
1830
|
-
const { data: n } = await this.req.get("community/notifications",
|
|
1830
|
+
const { data: n } = await this.req.get("community/notifications", gr, {
|
|
1831
1831
|
params: a({ max_results: 20, ...t })
|
|
1832
1832
|
});
|
|
1833
1833
|
return n || { notifications: [] };
|
|
@@ -1839,7 +1839,7 @@ class Sr {
|
|
|
1839
1839
|
*/
|
|
1840
1840
|
async getUnreadNotificationsCount() {
|
|
1841
1841
|
if (!await this.token.autoLogin()) return null;
|
|
1842
|
-
const { data: t } = await this.req.get("community/unread-notifications-count",
|
|
1842
|
+
const { data: t } = await this.req.get("community/unread-notifications-count", pr);
|
|
1843
1843
|
return t;
|
|
1844
1844
|
}
|
|
1845
1845
|
/**
|
|
@@ -1856,9 +1856,9 @@ class Sr {
|
|
|
1856
1856
|
function x(i) {
|
|
1857
1857
|
return L(i, "openid", "unionid", "weixin_token");
|
|
1858
1858
|
}
|
|
1859
|
-
var
|
|
1859
|
+
var _r = /* @__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))(_r || {});
|
|
1860
1860
|
const M = "wx_login_cache";
|
|
1861
|
-
class
|
|
1861
|
+
class Pr {
|
|
1862
1862
|
/**
|
|
1863
1863
|
* 创建微信相关功能接口
|
|
1864
1864
|
*
|
|
@@ -1982,20 +1982,20 @@ class Lr {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
export {
|
|
1984
1984
|
ae as AntispamValidator,
|
|
1985
|
-
|
|
1985
|
+
wr as AuthToken,
|
|
1986
1986
|
nn as CashbackEngagementDataValidator,
|
|
1987
1987
|
p as ClaimRewardStatus,
|
|
1988
1988
|
P as ClaimRewardStatusValidator,
|
|
1989
|
-
|
|
1989
|
+
Rn as ClaimedItemValidator,
|
|
1990
1990
|
J as ClubAddressValidator,
|
|
1991
|
-
|
|
1991
|
+
vr as ClubApi,
|
|
1992
1992
|
K as ClubBenefitSummaryValidator,
|
|
1993
|
-
|
|
1993
|
+
Ie as ClubBenefitValidator,
|
|
1994
1994
|
Re as ClubCreditChangeScene,
|
|
1995
1995
|
je as ClubCreditChangeSceneValidator,
|
|
1996
1996
|
Ce as ClubCreditChangeType,
|
|
1997
1997
|
Ve as ClubCreditChangeTypeValidator,
|
|
1998
|
-
|
|
1998
|
+
De as ClubCreditLogValidator,
|
|
1999
1999
|
Se as ClubGlobalConfigValidator,
|
|
2000
2000
|
Te as ClubItemType,
|
|
2001
2001
|
H as ClubItemTypeValidator,
|
|
@@ -2004,14 +2004,15 @@ export {
|
|
|
2004
2004
|
qe as ClubRedemptionStatus,
|
|
2005
2005
|
xe as ClubRedemptionStatusValidator,
|
|
2006
2006
|
Fe as ClubUserCreditValidator,
|
|
2007
|
-
|
|
2007
|
+
$e as ClubUserProfileValidator,
|
|
2008
2008
|
wn as CommentEngagementValidator,
|
|
2009
2009
|
w as CommentValidator,
|
|
2010
|
-
|
|
2010
|
+
Lr as CommunityApi,
|
|
2011
2011
|
Ye as EngageAccountType,
|
|
2012
2012
|
Ze as EngageAccountTypeValidator,
|
|
2013
|
-
|
|
2014
|
-
|
|
2013
|
+
Vn as EngageResponseValidator,
|
|
2014
|
+
cn as EngageRewardValidator,
|
|
2015
|
+
xr as EventApi,
|
|
2015
2016
|
tn as EventConfigValidator,
|
|
2016
2017
|
_t as EventFeatureConfigOfCashbackValidator,
|
|
2017
2018
|
yt as EventFeatureConfigOfCheckInValidator,
|
|
@@ -2022,8 +2023,8 @@ export {
|
|
|
2022
2023
|
qt as EventFeatureConfigOfInviteValidator,
|
|
2023
2024
|
St as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2024
2025
|
Ft as EventFeatureConfigOfLotteryDrawValidator,
|
|
2025
|
-
|
|
2026
|
-
|
|
2026
|
+
Ut as EventFeatureConfigOfLotteryValidator,
|
|
2027
|
+
It as EventFeatureConfigOfPreregisterValidator,
|
|
2027
2028
|
At as EventFeatureConfigOfQuestValidator,
|
|
2028
2029
|
Ot as EventFeatureConfigOfRegisterValidator,
|
|
2029
2030
|
Qt as EventFeatureConfigOfShareValidator,
|
|
@@ -2034,14 +2035,14 @@ export {
|
|
|
2034
2035
|
en as EventFeatureConfigValidator,
|
|
2035
2036
|
We as EventPeriodType,
|
|
2036
2037
|
et as EventPeriodTypeValidator,
|
|
2037
|
-
|
|
2038
|
+
U as EventRewardItemConfigValidator,
|
|
2038
2039
|
Ae as ExtraGameRewardValidator,
|
|
2039
2040
|
Ge as ExtraPhysicalShipmentValidator,
|
|
2040
2041
|
gt as FeatureRewardValidator,
|
|
2041
2042
|
s as FeatureType,
|
|
2042
2043
|
tt as FeatureTypeValidator,
|
|
2043
|
-
|
|
2044
|
-
|
|
2044
|
+
Gn as ForumMode,
|
|
2045
|
+
An as ForumModeValidator,
|
|
2045
2046
|
oe as ForumValidator,
|
|
2046
2047
|
v as GamerItemType,
|
|
2047
2048
|
Y as GamerItemTypeValidator,
|
|
@@ -2050,71 +2051,74 @@ export {
|
|
|
2050
2051
|
rn as GiftCodeEngagementDataValidator,
|
|
2051
2052
|
on as InviteEngagementDataValidator,
|
|
2052
2053
|
lt as LotteryDrawAction,
|
|
2053
|
-
|
|
2054
|
+
Tr as LotteryDrawActionValidator,
|
|
2054
2055
|
mn as LotteryDrawEngagementDataValidator,
|
|
2055
2056
|
an as LotteryEngagementDataValidator,
|
|
2056
2057
|
h as LotteryTicketStatus,
|
|
2057
|
-
|
|
2058
|
+
Rr as LotteryTicketStatusValidator,
|
|
2058
2059
|
b as NotificationBaseValidator,
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2060
|
+
On as NotificationCategory,
|
|
2061
|
+
Sr as NotificationCategoryValidator,
|
|
2062
|
+
Xn as NotificationCommentReplyValidator,
|
|
2063
|
+
Yn as NotificationCommentValidator,
|
|
2063
2064
|
V as NotificationPayloadCommentValidator,
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2065
|
+
D as NotificationPayloadPostValidator,
|
|
2066
|
+
I as NotificationPayloadReplyValidator,
|
|
2067
|
+
Hn as NotificationPayloadSystemValidator,
|
|
2068
|
+
Kn as NotificationPostCommentValidator,
|
|
2069
|
+
Jn as NotificationPostValidator,
|
|
2070
|
+
Zn as NotificationReplyRepliedValidator,
|
|
2071
|
+
Wn as NotificationReplyValidator,
|
|
2072
|
+
zn as NotificationSystemValidator,
|
|
2072
2073
|
m as NotificationType,
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2074
|
+
Bn as NotificationTypeValidator,
|
|
2075
|
+
er as NotificationValidator,
|
|
2076
|
+
Ue as PlayerRoleCardValidator,
|
|
2076
2077
|
z as PlayerRoleValidator,
|
|
2077
|
-
|
|
2078
|
+
Nn as PostStatus,
|
|
2078
2079
|
ie as PostStatusValidator,
|
|
2079
2080
|
F as PostValidator,
|
|
2080
2081
|
dn as PreregisterEngagementDataValidator,
|
|
2081
|
-
|
|
2082
|
+
Mn as PresignedUrlResponseValidator,
|
|
2082
2083
|
gn as QuestEngagementDataValidator,
|
|
2083
2084
|
nt as QuestObjective,
|
|
2084
2085
|
W as QuestObjectiveValidator,
|
|
2085
|
-
|
|
2086
|
+
kr as RedeemParamsValidator,
|
|
2086
2087
|
Ne as RedemptionValidator,
|
|
2087
2088
|
dt as RegularRewardValidator,
|
|
2088
|
-
|
|
2089
|
+
Qn as ReplyToValidator,
|
|
2089
2090
|
C as ReplyValidator,
|
|
2090
|
-
|
|
2091
|
+
Cr as RewardItemType,
|
|
2091
2092
|
Z as RewardItemTypeValidator,
|
|
2092
2093
|
at as RewardSource,
|
|
2093
2094
|
E as RewardSourceValidator,
|
|
2094
2095
|
g as RewardStatus,
|
|
2095
2096
|
ot as RewardStatusSuffix,
|
|
2096
2097
|
ee as RewardStatusSuffixValidator,
|
|
2097
|
-
|
|
2098
|
+
Vr as RewardStatusValidator,
|
|
2099
|
+
sn as RewardValidator,
|
|
2098
2100
|
Ee as RoleBaseInfoValidator,
|
|
2099
2101
|
Pe as ServerBaseInfoValidator,
|
|
2100
2102
|
pn as ShareEngagementDataValidator,
|
|
2101
2103
|
bn as SurveyEngagementDataValidator,
|
|
2102
2104
|
ut as TeamAction,
|
|
2103
|
-
|
|
2105
|
+
jr as TeamActionValidator,
|
|
2104
2106
|
fn as TeamEngagementDataValidator,
|
|
2105
2107
|
yn as TeamEngagementValidator,
|
|
2106
|
-
|
|
2108
|
+
qr as TeamMemberValidator,
|
|
2107
2109
|
st as TeamVisibility,
|
|
2108
2110
|
ct as TeamVisibilityValidator,
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
+
$ as TopicValidator,
|
|
2112
|
+
kn as UserEngagementDataValidator,
|
|
2113
|
+
ne as UserEngagementDataValidators,
|
|
2111
2114
|
re as UserEngagementValidator,
|
|
2112
|
-
|
|
2113
|
-
|
|
2115
|
+
Cn as UserFeatureStatusValidator,
|
|
2116
|
+
te as UserRewardValidator,
|
|
2117
|
+
vn as VerifyMobileResultValidator,
|
|
2114
2118
|
hn as VoteEngagementDataValidator,
|
|
2115
2119
|
rt as VoteOptionSource,
|
|
2116
2120
|
it as VoteOptionSourceValidator,
|
|
2117
|
-
|
|
2121
|
+
Pr as WeixinApi,
|
|
2118
2122
|
_n as WeixinSubscribeEngagementDataValidator,
|
|
2119
|
-
|
|
2123
|
+
_r as WeixinWebLoginErrorCode
|
|
2120
2124
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/gamer-api",
|
|
3
3
|
"description": "agent for gamer api",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^22.13.1",
|
|
25
|
-
"@seayoo-web/request": "^3.0.0",
|
|
26
|
-
"@seayoo-web/scripts": "^2.0.0",
|
|
27
25
|
"@seayoo-web/combo-webview": "^2.5.0",
|
|
28
26
|
"@seayoo-web/utils": "^3.4.3",
|
|
29
|
-
"@seayoo-web/tsconfig": "^1.0.3"
|
|
27
|
+
"@seayoo-web/tsconfig": "^1.0.3",
|
|
28
|
+
"@seayoo-web/request": "^3.0.0",
|
|
29
|
+
"@seayoo-web/scripts": "^2.0.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@seayoo-web/combo-webview": "^2.5.0",
|
package/types/src/event.d.ts
CHANGED
|
@@ -165,7 +165,7 @@ export declare class EventApi {
|
|
|
165
165
|
max_results?: number;
|
|
166
166
|
next_token?: string;
|
|
167
167
|
}): Promise<never[] | {
|
|
168
|
-
user_rewards: import("./event.engage
|
|
168
|
+
user_rewards: import("./event.engage").UserReward[];
|
|
169
169
|
next_token: string;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type UserEngagementData } from "./event.engage";
|
|
2
|
-
import { type EngageReward } from "./event.engage/reward";
|
|
1
|
+
import { type UserEngagementData, type EngageReward } from "./event.engage";
|
|
3
2
|
import { type ClaimRewardStatus } from "./event.enums";
|
|
4
3
|
export * from "./event.config";
|
|
5
4
|
export * from "./event.engage";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type CashbackEngagementData } from "./engage.cashback";
|
|
2
|
+
import { type GiftCodeEngagementData } from "./engage.giftcode";
|
|
3
|
+
import { type InviteEngagementData } from "./engage.invite";
|
|
4
|
+
import { type LotteryEngagementData } from "./engage.lottery";
|
|
5
|
+
import { type LotteryDrawEngagementData } from "./engage.lotteryDraw";
|
|
6
|
+
import { type PreregisterEngagementData } from "./engage.preregister";
|
|
7
|
+
import { type QuestEngagementData } from "./engage.quest";
|
|
8
|
+
import { type ShareEngagementData } from "./engage.share";
|
|
9
|
+
import { type WeixinSubscribeEngagementData } from "./engage.subscribe";
|
|
10
|
+
import { type SurveyEngagementData } from "./engage.survey";
|
|
11
|
+
import { type TeamEngagementData } from "./engage.team";
|
|
12
|
+
import { type VoteEngagementData } from "./engage.vote";
|
|
13
|
+
export * from "./engage.cashback";
|
|
14
|
+
export * from "./engage.comment";
|
|
15
|
+
export * from "./engage.giftcode";
|
|
16
|
+
export * from "./engage.invite";
|
|
17
|
+
export * from "./engage.lottery";
|
|
18
|
+
export * from "./engage.lotteryDraw";
|
|
19
|
+
export * from "./engage.preregister";
|
|
20
|
+
export * from "./engage.quest";
|
|
21
|
+
export * from "./engage.share";
|
|
22
|
+
export * from "./engage.subscribe";
|
|
23
|
+
export * from "./engage.survey";
|
|
24
|
+
export * from "./engage.team";
|
|
25
|
+
export * from "./engage.vote";
|
|
26
|
+
export type UserEngagementData = PreregisterEngagementData | LotteryEngagementData | SurveyEngagementData | InviteEngagementData | ShareEngagementData | VoteEngagementData | WeixinSubscribeEngagementData | CashbackEngagementData | GiftCodeEngagementData | TeamEngagementData | QuestEngagementData | LotteryDrawEngagementData;
|
|
27
|
+
export declare const UserEngagementDataValidators: readonly [import("@seayoo-web/utils").ObjectValidator<{
|
|
28
|
+
platforms: string[];
|
|
29
|
+
}, false, false>, import("@seayoo-web/utils").ObjectValidator<LotteryEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
30
|
+
serial_number: number;
|
|
31
|
+
}, false, false>, import("@seayoo-web/utils").ObjectValidator<InviteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<ShareEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<VoteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<WeixinSubscribeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<CashbackEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<GiftCodeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<TeamEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<QuestEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
32
|
+
tickets: ({
|
|
33
|
+
ticket: /*elided*/ any;
|
|
34
|
+
status: /*elided*/ any;
|
|
35
|
+
} | {
|
|
36
|
+
ticket: /*elided*/ any;
|
|
37
|
+
status: /*elided*/ any;
|
|
38
|
+
reward: /*elided*/ any;
|
|
39
|
+
})[];
|
|
40
|
+
}, false, false>];
|
|
41
|
+
export declare const UserEngagementDataValidator: import("@seayoo-web/utils").UnionValidator<[import("@seayoo-web/utils").ObjectValidator<{
|
|
42
|
+
platforms: string[];
|
|
43
|
+
}, false, false>, import("@seayoo-web/utils").ObjectValidator<LotteryEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
44
|
+
serial_number: number;
|
|
45
|
+
}, false, false>, import("@seayoo-web/utils").ObjectValidator<InviteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<ShareEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<VoteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<WeixinSubscribeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<CashbackEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<GiftCodeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<TeamEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<QuestEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
46
|
+
tickets: ({
|
|
47
|
+
ticket: /*elided*/ any;
|
|
48
|
+
status: /*elided*/ any;
|
|
49
|
+
} | {
|
|
50
|
+
ticket: /*elided*/ any;
|
|
51
|
+
status: /*elided*/ any;
|
|
52
|
+
reward: /*elided*/ any;
|
|
53
|
+
})[];
|
|
54
|
+
}, false, false>], false, false> & {
|
|
55
|
+
optional: never;
|
|
56
|
+
maybeNull: never;
|
|
57
|
+
key: never;
|
|
58
|
+
satisfies: never;
|
|
59
|
+
lock: never;
|
|
60
|
+
};
|
|
@@ -1,52 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type GiftCodeEngagementData } from "./engage.giftcode";
|
|
3
|
-
import { type InviteEngagementData } from "./engage.invite";
|
|
4
|
-
import { type LotteryEngagementData, type LotteryEngagementParam } from "./engage.lottery";
|
|
5
|
-
import { type LotteryDrawEngagementData, type LotteryDrawEngagementParam } from "./engage.lotteryDraw";
|
|
6
|
-
import { type QuestEngagementData } from "./engage.quest";
|
|
7
|
-
import { type ShareEngagementData, type ShareEngagementParam } from "./engage.share";
|
|
8
|
-
import { type SubscribeEngagementParam, type WeixinSubscribeEngagementData } from "./engage.subscribe";
|
|
9
|
-
import { type SurveyEngagementData } from "./engage.survey";
|
|
10
|
-
import { type TeamEngagementData, type TeamEngagementParam } from "./engage.team";
|
|
11
|
-
import { type VoteEngagementData, type VoteEngagementParam } from "./engage.vote";
|
|
1
|
+
import { type UserEngagementData, type CommentEngagementParam, type PreregisterEngagementParam, type LotteryEngagementParam, type LotteryDrawEngagementParam, type ShareEngagementParam, type SubscribeEngagementParam, type TeamEngagementParam, type VoteEngagementParam } from "./engage";
|
|
12
2
|
import { type Reward } from "./reward";
|
|
13
|
-
import type { CommentEngagementParam } from "./engage.comment";
|
|
14
|
-
import type { PreregisterEngagementData, PreregisterEngagementParam } from "./engage.preregister";
|
|
15
3
|
import type { FeatureType } from "../event.enums";
|
|
16
|
-
export * from "./engage
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./engage.giftcode";
|
|
19
|
-
export * from "./engage.invite";
|
|
20
|
-
export * from "./engage.lottery";
|
|
21
|
-
export * from "./engage.lotteryDraw";
|
|
22
|
-
export * from "./engage.preregister";
|
|
23
|
-
export * from "./engage.quest";
|
|
24
|
-
export * from "./engage.share";
|
|
25
|
-
export * from "./engage.subscribe";
|
|
26
|
-
export * from "./engage.survey";
|
|
27
|
-
export * from "./engage.team";
|
|
28
|
-
export * from "./engage.vote";
|
|
29
|
-
export type UserEngagementData = PreregisterEngagementData | LotteryEngagementData | SurveyEngagementData | InviteEngagementData | ShareEngagementData | VoteEngagementData | WeixinSubscribeEngagementData | CashbackEngagementData | GiftCodeEngagementData | TeamEngagementData | QuestEngagementData | LotteryDrawEngagementData;
|
|
30
|
-
export declare const UserEngagementDataValidator: import("@seayoo-web/utils").UnionValidator<[import("@seayoo-web/utils").ObjectValidator<{
|
|
31
|
-
platforms: string[];
|
|
32
|
-
}, false, false>, import("@seayoo-web/utils").ObjectValidator<LotteryEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
33
|
-
serial_number: number;
|
|
34
|
-
}, false, false>, import("@seayoo-web/utils").ObjectValidator<InviteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<ShareEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<VoteEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<WeixinSubscribeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<CashbackEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<GiftCodeEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<TeamEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<QuestEngagementData, false, false>, import("@seayoo-web/utils").ObjectValidator<{
|
|
35
|
-
tickets: ({
|
|
36
|
-
ticket: /*elided*/ any;
|
|
37
|
-
status: /*elided*/ any;
|
|
38
|
-
} | {
|
|
39
|
-
ticket: /*elided*/ any;
|
|
40
|
-
status: /*elided*/ any;
|
|
41
|
-
reward: /*elided*/ any;
|
|
42
|
-
})[];
|
|
43
|
-
}, false, false>], false, false> & {
|
|
44
|
-
optional: never;
|
|
45
|
-
maybeNull: never;
|
|
46
|
-
key: never;
|
|
47
|
-
satisfies: never;
|
|
48
|
-
lock: never;
|
|
49
|
-
};
|
|
4
|
+
export * from "./engage";
|
|
5
|
+
export * from "./reward";
|
|
50
6
|
export type UserEngagement = {
|
|
51
7
|
/** 参与记录 ID */
|
|
52
8
|
engagement_id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClaimRewardStatus, GamerItemType, RewardItemType, type FeatureType, type RewardSource, type RewardStatusSuffix } from "../event.enums";
|
|
2
|
-
import { type UserEngagementData } from "
|
|
2
|
+
import { type UserEngagementData } from "./engage";
|
|
3
3
|
export interface Reward {
|
|
4
4
|
/** 用户奖励记录 id */
|
|
5
5
|
reward_id: number;
|
|
@@ -24,7 +24,7 @@ export declare const isClaimWeixinHongbaoResponse: (data: unknown) => data is {
|
|
|
24
24
|
reward_status: import("./event.enums").ClaimRewardStatus;
|
|
25
25
|
};
|
|
26
26
|
export declare const isGetUserRewardsResponse: (data: unknown) => data is {
|
|
27
|
-
user_rewards: import("./event.engage
|
|
27
|
+
user_rewards: import("./event.engage").UserReward[];
|
|
28
28
|
next_token: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
export declare const isGetUnlimitQrcodeSceneResponse: (data: unknown) => data is {
|
|
@@ -12,8 +12,14 @@ export interface GamerSession {
|
|
|
12
12
|
seayoo_user_id?: string;
|
|
13
13
|
/** 手机号码(掩码形式) */
|
|
14
14
|
seayoo_mobile?: string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 世游通行证用户实名信息(掩码形式);即将去除此字段,使用 has_real_name 代替
|
|
17
|
+
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OdGVCdQxEu
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
16
20
|
seayoo_real_name?: string;
|
|
21
|
+
/** 是否已经具有世游通行证用户实名信息 */
|
|
22
|
+
has_real_name?: boolean;
|
|
17
23
|
/** Combo ID */
|
|
18
24
|
combo_id?: string;
|
|
19
25
|
/**
|