@seayoo-web/gamer-api 2.14.4 → 2.15.0
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 +393 -338
- package/package.json +4 -4
- package/types/src/event.config/feature.d.ts +4 -2
- package/types/src/event.config/feature.redeem.d.ts +24 -0
- package/types/src/event.d.ts +9 -0
- package/types/src/event.engage/engage.d.ts +4 -2
- package/types/src/event.engage/engage.redeem.d.ts +25 -0
- package/types/src/event.engage/engage.ugc.d.ts +2 -0
- package/types/src/event.engage/index.d.ts +4 -4
- package/types/src/event.enums.d.ts +8 -2
- package/types/src/event.guards.d.ts +1 -0
- package/types/src/utils.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isComboWebView as de } from "@seayoo-web/combo-webview";
|
|
2
|
-
import { isPlainObject as h, supportWx as _, useConsole as ge, usePromise as pe, pruneURL as _e, supportWindow as be, queryString as S, pruneObject as c, omitFields as U, parseJSON as ye, removePara as
|
|
2
|
+
import { isPlainObject as h, supportWx as _, useConsole as ge, usePromise as pe, pruneURL as _e, supportWindow as be, queryString as S, pruneObject as c, omitFields as U, parseJSON as ye, removePara as G } from "@seayoo-web/utils";
|
|
3
3
|
import { v as e, objectGuard as s } from "@seayoo-web/validator";
|
|
4
4
|
function he(i) {
|
|
5
5
|
return h(i, "gamer_token") && typeof i.gamer_token == "string";
|
|
@@ -35,7 +35,7 @@ const ve = {
|
|
|
35
35
|
remove(i) {
|
|
36
36
|
localStorage.removeItem(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Re = {
|
|
39
39
|
get(i) {
|
|
40
40
|
try {
|
|
41
41
|
if (_()) return wx.getStorageSync(i) || "";
|
|
@@ -59,7 +59,7 @@ const ve = {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}, f = "gamer_token";
|
|
62
|
-
class
|
|
62
|
+
class ba {
|
|
63
63
|
$NetRequest;
|
|
64
64
|
$idToken = "";
|
|
65
65
|
$weixinToken = "";
|
|
@@ -67,7 +67,7 @@ class la {
|
|
|
67
67
|
req;
|
|
68
68
|
storage;
|
|
69
69
|
constructor(t, n) {
|
|
70
|
-
this.storage = _() ?
|
|
70
|
+
this.storage = _() ? Re : ve;
|
|
71
71
|
const r = we(t) ? t : `https://${_e(t)}`;
|
|
72
72
|
if (this.$NetRequest = n, this.req = n({
|
|
73
73
|
baseURL: `${r}/v1`,
|
|
@@ -240,14 +240,14 @@ class la {
|
|
|
240
240
|
return n;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const Ce = {
|
|
244
244
|
/** 未知 */
|
|
245
245
|
Unknown: "unknown",
|
|
246
246
|
/** 男 */
|
|
247
247
|
Male: "male",
|
|
248
248
|
/** 女 */
|
|
249
249
|
Female: "female"
|
|
250
|
-
},
|
|
250
|
+
}, Ve = e.string().enum(Ce).lock(), je = {
|
|
251
251
|
/** 积分增加 */
|
|
252
252
|
Increase: "increase",
|
|
253
253
|
/** 积分减少 */
|
|
@@ -333,7 +333,7 @@ const Ve = {
|
|
|
333
333
|
name: e.string(),
|
|
334
334
|
avatar_url: e.string(),
|
|
335
335
|
bio: e.string(),
|
|
336
|
-
gender:
|
|
336
|
+
gender: Ve,
|
|
337
337
|
birthday: e.object({ year: e.number(), month: e.number(), day: e.number() }),
|
|
338
338
|
social_medias: e.record(
|
|
339
339
|
e.object({
|
|
@@ -350,12 +350,12 @@ const Ve = {
|
|
|
350
350
|
district: e.string(),
|
|
351
351
|
address: e.string(),
|
|
352
352
|
is_default: e.bool()
|
|
353
|
-
}).lock(),
|
|
353
|
+
}).lock(), Ae = e.object({
|
|
354
354
|
increased_credit: e.number(),
|
|
355
355
|
decreased_credit: e.number(),
|
|
356
356
|
expired_credit: e.number(),
|
|
357
357
|
balance_credit: e.number()
|
|
358
|
-
}).lock(),
|
|
358
|
+
}).lock(), Ge = e.object({
|
|
359
359
|
id: e.number(),
|
|
360
360
|
change_type: Te,
|
|
361
361
|
change_scene: xe,
|
|
@@ -401,7 +401,7 @@ const Ve = {
|
|
|
401
401
|
}).lock(), Oe = e.object({
|
|
402
402
|
...U(X.shape, "tag"),
|
|
403
403
|
product: Y.clone().optional()
|
|
404
|
-
}).lock(),
|
|
404
|
+
}).lock(), ya = e.union(
|
|
405
405
|
e.object({
|
|
406
406
|
server_id: e.string(),
|
|
407
407
|
role_id: e.string()
|
|
@@ -436,8 +436,8 @@ const Ve = {
|
|
|
436
436
|
status: Ue,
|
|
437
437
|
created_at: e.number(),
|
|
438
438
|
extra_data: e.union(Ne.clone(), Qe.clone()).satisfies().optional()
|
|
439
|
-
}), Me = e.guard(Pe), N = s({ player: Ee }), Ke = s({ roles: e.array(J) }), T = s({ role_card: Ie }), Q = e.guard(De), B = e.guard(Z), He = s({ addresses: e.array(Z) }), ze = e.guard(
|
|
440
|
-
credit_logs: e.array(
|
|
439
|
+
}), Me = e.guard(Pe), N = s({ player: Ee }), Ke = s({ roles: e.array(J) }), T = s({ role_card: Ie }), Q = e.guard(De), B = e.guard(Z), He = s({ addresses: e.array(Z) }), ze = e.guard(Ae), Je = s({
|
|
440
|
+
credit_logs: e.array(Ge),
|
|
441
441
|
next_token: e.string().optional()
|
|
442
442
|
}), Ze = s({ products: e.array(Y) }), Xe = s({ benefits: e.array(X) }), Ye = s({ benefit: Oe }), We = s({
|
|
443
443
|
redemptions: e.array(Be),
|
|
@@ -447,7 +447,7 @@ const Ve = {
|
|
|
447
447
|
image_upload_url: e.string().optional(),
|
|
448
448
|
image_id: e.string()
|
|
449
449
|
});
|
|
450
|
-
class
|
|
450
|
+
class ha {
|
|
451
451
|
token;
|
|
452
452
|
req;
|
|
453
453
|
constructor(t) {
|
|
@@ -755,7 +755,7 @@ const v = {
|
|
|
755
755
|
ExternalCode: "external_gift_code",
|
|
756
756
|
/** 空奖励 */
|
|
757
757
|
VoidItem: "void_item"
|
|
758
|
-
}, W = e.string().enum(v).lock(),
|
|
758
|
+
}, W = e.string().enum(v).lock(), fa = v, ee = W, tt = {
|
|
759
759
|
/** 世游通行证 ID / Combo ID */
|
|
760
760
|
UserId: "user_id",
|
|
761
761
|
/** 游戏角色 ID */
|
|
@@ -811,7 +811,9 @@ const v = {
|
|
|
811
811
|
/** 投稿 */
|
|
812
812
|
Ugc: "ugc",
|
|
813
813
|
/** 投稿点赞 */
|
|
814
|
-
UgcLike: "ugc_like"
|
|
814
|
+
UgcLike: "ugc_like",
|
|
815
|
+
/** 兑换 */
|
|
816
|
+
Redeem: "redeem"
|
|
815
817
|
}, ot = e.string().enum(u).lock(), it = {
|
|
816
818
|
/** 累计游戏内活跃值 */
|
|
817
819
|
Active: "player_active_points",
|
|
@@ -833,8 +835,12 @@ const v = {
|
|
|
833
835
|
PlayerLevel: "player_level",
|
|
834
836
|
/** 活动道具累计获取 */
|
|
835
837
|
EventItems: "event_items",
|
|
836
|
-
|
|
837
|
-
GameTask: "game_task"
|
|
838
|
+
/** 游戏内任务 */
|
|
839
|
+
GameTask: "game_task",
|
|
840
|
+
/** 游戏内充值金额 */
|
|
841
|
+
OrderAmountInApp: "order_in_app_total_amount",
|
|
842
|
+
/** 支付中心充值金额 */
|
|
843
|
+
OrderAmountInPayCenter: "order_seayoo_web_total_amount"
|
|
838
844
|
}, te = e.string().enum(it).lock(), st = {
|
|
839
845
|
/** 官方上传 */
|
|
840
846
|
System: "system",
|
|
@@ -853,7 +859,7 @@ const v = {
|
|
|
853
859
|
Failed: "failed",
|
|
854
860
|
/** 奖励已发货 */
|
|
855
861
|
Delivered: "delivered"
|
|
856
|
-
},
|
|
862
|
+
}, wa = e.string().enum(d).lock(), ut = {
|
|
857
863
|
/** 奖励未领取 */
|
|
858
864
|
Unclaimed: d.Unclaimed,
|
|
859
865
|
/** 奖励已领取 */
|
|
@@ -894,7 +900,7 @@ const v = {
|
|
|
894
900
|
Claimed: "claimed",
|
|
895
901
|
/** 领奖失败 */
|
|
896
902
|
Fail: "fail"
|
|
897
|
-
},
|
|
903
|
+
}, ka = e.string().enum(w).lock(), pt = {
|
|
898
904
|
/** 发起组队 */
|
|
899
905
|
Assemble: "assemble",
|
|
900
906
|
/** 加入队伍 */
|
|
@@ -905,14 +911,14 @@ const v = {
|
|
|
905
911
|
ChangeVisibility: "change_visibility",
|
|
906
912
|
/** 查询组队信息 */
|
|
907
913
|
Query: "query"
|
|
908
|
-
},
|
|
914
|
+
}, va = e.string().enum(pt).lock(), _t = {
|
|
909
915
|
/** 查询抽奖券 */
|
|
910
916
|
Query: "query",
|
|
911
917
|
/** 开奖 */
|
|
912
918
|
Draw: "draw",
|
|
913
919
|
/** 领奖 */
|
|
914
920
|
Claim: "claim"
|
|
915
|
-
},
|
|
921
|
+
}, Ra = e.string().enum(_t).lock(), bt = {
|
|
916
922
|
/** 将所有队员的进度值求和,作为队伍进度值 */
|
|
917
923
|
Sum: "sum",
|
|
918
924
|
/** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
|
|
@@ -946,25 +952,25 @@ const v = {
|
|
|
946
952
|
Accepted: "accepted",
|
|
947
953
|
/** 已拒绝 */
|
|
948
954
|
Rejected: "rejected"
|
|
949
|
-
}, vt = e.string().enum(kt).lock(),
|
|
955
|
+
}, vt = e.string().enum(kt).lock(), Rt = e.string().enum(v), b = e.object({
|
|
950
956
|
reward_item_id: e.number(),
|
|
951
957
|
reward_amount: e.number(),
|
|
952
958
|
reward_item_name: e.string(),
|
|
953
959
|
reward_item_icon_url: e.string(),
|
|
954
960
|
reward_item_desc: e.string().optional(),
|
|
955
|
-
reward_item_type:
|
|
961
|
+
reward_item_type: Rt,
|
|
956
962
|
reward_item_rating: e.number()
|
|
957
|
-
}).lock(),
|
|
963
|
+
}).lock(), Ct = e.object({
|
|
958
964
|
engage_count: e.number(),
|
|
959
|
-
rewards: e.array(
|
|
960
|
-
}).lock(),
|
|
965
|
+
rewards: e.array(b)
|
|
966
|
+
}).lock(), Vt = e.union(
|
|
961
967
|
e.object({
|
|
962
968
|
feature_reward_type: e.string().enum("every"),
|
|
963
|
-
reward_details: e.array(
|
|
969
|
+
reward_details: e.array(b)
|
|
964
970
|
}),
|
|
965
971
|
e.object({
|
|
966
972
|
feature_reward_type: e.string().enum("regular"),
|
|
967
|
-
reward_details: e.array(
|
|
973
|
+
reward_details: e.array(Ct)
|
|
968
974
|
})
|
|
969
975
|
).satisfies().lock(), l = e.object({
|
|
970
976
|
feature_name: e.string(),
|
|
@@ -976,7 +982,7 @@ const v = {
|
|
|
976
982
|
since: e.number(),
|
|
977
983
|
until: e.number(),
|
|
978
984
|
engage_account: nt,
|
|
979
|
-
feature_rewards:
|
|
985
|
+
feature_rewards: Vt.clone().optional(),
|
|
980
986
|
sort: e.number().optional()
|
|
981
987
|
}), jt = u.Cashback, Tt = e.object({
|
|
982
988
|
...l.shape,
|
|
@@ -1013,15 +1019,15 @@ const v = {
|
|
|
1013
1019
|
qr_code_url: e.string().optional(),
|
|
1014
1020
|
platform_desc: e.string().optional()
|
|
1015
1021
|
})
|
|
1016
|
-
}), Dt = u.GiftCode,
|
|
1022
|
+
}), Dt = u.GiftCode, At = e.object({
|
|
1017
1023
|
name: e.string(),
|
|
1018
1024
|
icon_url: e.string(),
|
|
1019
1025
|
count: e.number()
|
|
1020
|
-
}),
|
|
1026
|
+
}), Gt = e.object({
|
|
1021
1027
|
...l.shape,
|
|
1022
1028
|
feature_type: e.string().enum(Dt),
|
|
1023
1029
|
config: e.object({
|
|
1024
|
-
gift_items: e.array(
|
|
1030
|
+
gift_items: e.array(At),
|
|
1025
1031
|
mp_url: e.string().optional(),
|
|
1026
1032
|
mp_qrcode_url: e.string().optional()
|
|
1027
1033
|
})
|
|
@@ -1083,51 +1089,62 @@ const v = {
|
|
|
1083
1089
|
event_item_id: e.number().optional()
|
|
1084
1090
|
}).optional()
|
|
1085
1091
|
})
|
|
1086
|
-
}), tn = u.
|
|
1092
|
+
}), tn = u.Redeem, nn = e.object({
|
|
1093
|
+
price: e.number(),
|
|
1094
|
+
per_user_limit: e.number(),
|
|
1095
|
+
item: b
|
|
1096
|
+
}), rn = e.object({
|
|
1097
|
+
...l.shape,
|
|
1098
|
+
feature_type: e.string().enum(tn),
|
|
1099
|
+
config: e.object({
|
|
1100
|
+
event_item_id: e.number(),
|
|
1101
|
+
redeem_catalog: e.array(nn)
|
|
1102
|
+
})
|
|
1103
|
+
}), an = u.Register, on = e.object({
|
|
1087
1104
|
...l.shape,
|
|
1088
|
-
feature_type: e.string().enum(
|
|
1089
|
-
}),
|
|
1105
|
+
feature_type: e.string().enum(an)
|
|
1106
|
+
}), sn = u.Share, cn = e.object({
|
|
1090
1107
|
...l.shape,
|
|
1091
|
-
feature_type: e.string().enum(
|
|
1108
|
+
feature_type: e.string().enum(sn),
|
|
1092
1109
|
config: e.object({
|
|
1093
1110
|
share_platform: e.string(),
|
|
1094
1111
|
jump_url: e.string().optional(),
|
|
1095
1112
|
icon_url: e.string().optional()
|
|
1096
1113
|
})
|
|
1097
|
-
}),
|
|
1114
|
+
}), un = u.Subscribe, ln = e.object({
|
|
1098
1115
|
...l.shape,
|
|
1099
|
-
feature_type: e.string().enum(
|
|
1116
|
+
feature_type: e.string().enum(un),
|
|
1100
1117
|
config: e.object({
|
|
1101
1118
|
weixin_template_ids: e.array(e.string())
|
|
1102
1119
|
})
|
|
1103
|
-
}),
|
|
1120
|
+
}), mn = u.Survey, dn = e.object({
|
|
1104
1121
|
...l.shape,
|
|
1105
|
-
feature_type: e.string().enum(
|
|
1122
|
+
feature_type: e.string().enum(mn),
|
|
1106
1123
|
config: e.object({
|
|
1107
1124
|
survey_id: e.string(),
|
|
1108
1125
|
survey_url: e.string()
|
|
1109
1126
|
})
|
|
1110
|
-
}),
|
|
1127
|
+
}), gn = u.Team, pn = e.object({
|
|
1111
1128
|
...l.shape,
|
|
1112
|
-
feature_type: e.string().enum(
|
|
1129
|
+
feature_type: e.string().enum(gn),
|
|
1113
1130
|
config: e.object({
|
|
1114
1131
|
max_members: e.number().min(1),
|
|
1115
1132
|
min_members: e.number().min(1)
|
|
1116
1133
|
})
|
|
1117
|
-
}),
|
|
1134
|
+
}), _n = u.Ugc, bn = e.object({
|
|
1118
1135
|
...l.shape,
|
|
1119
|
-
feature_type: e.string().enum(
|
|
1136
|
+
feature_type: e.string().enum(_n),
|
|
1120
1137
|
config: e.object({
|
|
1121
1138
|
allowed_social_medias: e.array(e.string()).optional(),
|
|
1122
|
-
acceptance_rewards: e.array(
|
|
1139
|
+
acceptance_rewards: e.array(b).optional()
|
|
1123
1140
|
})
|
|
1124
|
-
}),
|
|
1141
|
+
}), yn = u.UgcLike, hn = e.object({
|
|
1125
1142
|
...l.shape,
|
|
1126
|
-
feature_type: e.string().enum(
|
|
1143
|
+
feature_type: e.string().enum(yn),
|
|
1127
1144
|
config: e.object({
|
|
1128
1145
|
ugc_feature_id: e.number()
|
|
1129
1146
|
})
|
|
1130
|
-
}),
|
|
1147
|
+
}), fn = u.Vote, wn = e.object({
|
|
1131
1148
|
sn: e.string(),
|
|
1132
1149
|
name: e.string(),
|
|
1133
1150
|
img_urls: e.array(e.string()).optional(),
|
|
@@ -1137,86 +1154,87 @@ const v = {
|
|
|
1137
1154
|
amount: e.number(),
|
|
1138
1155
|
finalists: e.bool(),
|
|
1139
1156
|
last_vote_time: e.number()
|
|
1140
|
-
}),
|
|
1157
|
+
}), kn = e.object({
|
|
1141
1158
|
...l.shape,
|
|
1142
|
-
feature_type: e.string().enum(
|
|
1159
|
+
feature_type: e.string().enum(fn),
|
|
1143
1160
|
config: e.object({
|
|
1144
1161
|
vote_feature_ids: e.array(e.number()),
|
|
1145
1162
|
submission_feature_ids: e.array(e.number()),
|
|
1146
1163
|
finalists_amount: e.number(),
|
|
1147
1164
|
source: ct,
|
|
1148
|
-
options: e.array(
|
|
1149
|
-
rewards: e.array(
|
|
1165
|
+
options: e.array(wn),
|
|
1166
|
+
rewards: e.array(b)
|
|
1150
1167
|
})
|
|
1151
|
-
}),
|
|
1168
|
+
}), vn = u.Vote2, Rn = e.object({
|
|
1152
1169
|
candidate_id: e.string(),
|
|
1153
1170
|
display_name: e.string(),
|
|
1154
1171
|
images: e.array(e.string()).optional(),
|
|
1155
1172
|
videos: e.array(e.string()).optional(),
|
|
1156
1173
|
description: e.string().optional(),
|
|
1157
1174
|
jump_url: e.string()
|
|
1158
|
-
}),
|
|
1175
|
+
}), Cn = e.object({
|
|
1159
1176
|
...l.shape,
|
|
1160
|
-
feature_type: e.string().enum(
|
|
1177
|
+
feature_type: e.string().enum(vn),
|
|
1161
1178
|
config: e.object({
|
|
1162
1179
|
vote_item_id: e.number().optional(),
|
|
1163
|
-
candidates: e.array(
|
|
1180
|
+
candidates: e.array(Rn),
|
|
1164
1181
|
vote_since: e.number(),
|
|
1165
1182
|
vote_until: e.number(),
|
|
1166
1183
|
rewards_since: e.number(),
|
|
1167
1184
|
rewards_until: e.number(),
|
|
1168
|
-
winner_rewards: e.array(
|
|
1169
|
-
consolation_rewards: e.array(
|
|
1185
|
+
winner_rewards: e.array(b).optional(),
|
|
1186
|
+
consolation_rewards: e.array(b).optional()
|
|
1170
1187
|
})
|
|
1171
|
-
}),
|
|
1188
|
+
}), Vn = u.ZeroChatgpt, jn = e.object({
|
|
1172
1189
|
...l.shape,
|
|
1173
|
-
feature_type: e.string().enum(
|
|
1174
|
-
}),
|
|
1190
|
+
feature_type: e.string().enum(Vn)
|
|
1191
|
+
}), Tn = e.union(
|
|
1175
1192
|
Tt,
|
|
1176
1193
|
xt,
|
|
1177
1194
|
Pt,
|
|
1178
1195
|
$t,
|
|
1179
1196
|
It,
|
|
1180
|
-
|
|
1197
|
+
Gt,
|
|
1181
1198
|
Nt,
|
|
1182
1199
|
Bt,
|
|
1183
1200
|
zt,
|
|
1184
1201
|
Zt,
|
|
1185
1202
|
Yt,
|
|
1186
1203
|
en,
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
hn,
|
|
1204
|
+
on,
|
|
1205
|
+
cn,
|
|
1206
|
+
ln,
|
|
1207
|
+
dn,
|
|
1208
|
+
pn,
|
|
1193
1209
|
kn,
|
|
1194
|
-
St,
|
|
1195
1210
|
Cn,
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1211
|
+
St,
|
|
1212
|
+
jn,
|
|
1213
|
+
bn,
|
|
1214
|
+
hn,
|
|
1215
|
+
rn
|
|
1216
|
+
).key("feature_type").satisfies(), qn = e.object({
|
|
1199
1217
|
event_name: e.string(),
|
|
1200
1218
|
rules: e.string(),
|
|
1201
1219
|
since: e.number(),
|
|
1202
1220
|
until: e.number(),
|
|
1203
1221
|
visit_count: e.number().optional(),
|
|
1204
|
-
features: e.array(
|
|
1222
|
+
features: e.array(Tn)
|
|
1205
1223
|
}).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ae = e.object({
|
|
1206
1224
|
order_total_amount: q,
|
|
1207
1225
|
cashback_total_amount: q,
|
|
1208
1226
|
game_item_count: q
|
|
1209
|
-
}),
|
|
1227
|
+
}), xn = e.object({
|
|
1210
1228
|
activation_key: e.string().disallow("")
|
|
1211
|
-
}),
|
|
1229
|
+
}), Ln = e.object({
|
|
1212
1230
|
gift_code: e.string()
|
|
1213
|
-
}),
|
|
1231
|
+
}), Sn = e.object({
|
|
1214
1232
|
user_id: e.string(),
|
|
1215
1233
|
name: e.string().optional(),
|
|
1216
1234
|
avatar_url: e.string().optional()
|
|
1217
|
-
}),
|
|
1235
|
+
}), Un = e.object({
|
|
1218
1236
|
lottery_count: e.number()
|
|
1219
|
-
}),
|
|
1237
|
+
}), R = e.object({
|
|
1220
1238
|
reward_id: e.number(),
|
|
1221
1239
|
reward_item_id: e.number(),
|
|
1222
1240
|
reward_source: E,
|
|
@@ -1234,26 +1252,26 @@ const v = {
|
|
|
1234
1252
|
feature_type: ot,
|
|
1235
1253
|
receive_time: e.number(),
|
|
1236
1254
|
extra_data: e.record(e.unknown()).optional()
|
|
1237
|
-
}),
|
|
1255
|
+
}), Pn = e.string().enum(w.Unknown, w.Pending), En = e.union(
|
|
1238
1256
|
e.object({
|
|
1239
1257
|
ticket: e.string(),
|
|
1240
|
-
status:
|
|
1258
|
+
status: Pn
|
|
1241
1259
|
}),
|
|
1242
1260
|
e.object({
|
|
1243
1261
|
ticket: e.string(),
|
|
1244
1262
|
status: e.string().enum(U(w, "Unknown", "Pending")),
|
|
1245
|
-
reward:
|
|
1263
|
+
reward: R
|
|
1246
1264
|
})
|
|
1247
|
-
).satisfies(),
|
|
1248
|
-
tickets: e.array(
|
|
1249
|
-
}),
|
|
1265
|
+
).satisfies(), $n = e.object({
|
|
1266
|
+
tickets: e.array(En)
|
|
1267
|
+
}), Fn = e.object({
|
|
1250
1268
|
platforms: e.array(e.string())
|
|
1251
1269
|
}), oe = e.object({
|
|
1252
1270
|
role_name: e.string(),
|
|
1253
1271
|
is_leader: e.bool(),
|
|
1254
1272
|
is_myself: e.bool().optional(),
|
|
1255
1273
|
progress: e.number().optional()
|
|
1256
|
-
}).lock(),
|
|
1274
|
+
}).lock(), In = e.object({
|
|
1257
1275
|
objective: te,
|
|
1258
1276
|
progress: e.number(),
|
|
1259
1277
|
completion_value: e.number().optional(),
|
|
@@ -1262,28 +1280,40 @@ const v = {
|
|
|
1262
1280
|
completion_value: e.number().optional(),
|
|
1263
1281
|
players: e.array(oe)
|
|
1264
1282
|
}).optional()
|
|
1265
|
-
}),
|
|
1283
|
+
}), Dn = e.object({
|
|
1266
1284
|
progress: e.number(),
|
|
1267
1285
|
team: e.object({
|
|
1268
1286
|
progress: e.number(),
|
|
1269
1287
|
team_members: e.array(oe).optional()
|
|
1270
1288
|
}).optional()
|
|
1271
|
-
}),
|
|
1289
|
+
}), An = e.object({
|
|
1290
|
+
item_id: e.number(),
|
|
1291
|
+
item_count: e.number(),
|
|
1292
|
+
redeem_count: e.number()
|
|
1293
|
+
}), Gn = e.object({
|
|
1294
|
+
item_stocks: e.array(
|
|
1295
|
+
e.object({
|
|
1296
|
+
item_id: e.number(),
|
|
1297
|
+
item_stock: e.number(),
|
|
1298
|
+
user_limit: e.number()
|
|
1299
|
+
})
|
|
1300
|
+
)
|
|
1301
|
+
}), On = e.object({
|
|
1272
1302
|
platform: e.string()
|
|
1273
|
-
}),
|
|
1303
|
+
}), Nn = e.object({
|
|
1274
1304
|
weixin_openid: e.string()
|
|
1275
|
-
}),
|
|
1305
|
+
}), Qn = e.object({
|
|
1276
1306
|
serial_number: e.number()
|
|
1277
|
-
}),
|
|
1307
|
+
}), Bn = e.object({
|
|
1278
1308
|
team_code: e.string(),
|
|
1279
1309
|
leader_name: e.string(),
|
|
1280
1310
|
total_members: e.number()
|
|
1281
|
-
}),
|
|
1311
|
+
}), Ca = e.object({
|
|
1282
1312
|
is_leader: e.bool(),
|
|
1283
1313
|
is_myself: e.bool().optional(),
|
|
1284
1314
|
role_name: e.string(),
|
|
1285
1315
|
server_name: e.string()
|
|
1286
|
-
}),
|
|
1316
|
+
}), Mn = e.object({
|
|
1287
1317
|
team_code: e.string(),
|
|
1288
1318
|
visibility: gt,
|
|
1289
1319
|
members: e.array(
|
|
@@ -1293,14 +1323,14 @@ const v = {
|
|
|
1293
1323
|
server_name: e.string()
|
|
1294
1324
|
})
|
|
1295
1325
|
)
|
|
1296
|
-
}),
|
|
1326
|
+
}), Kn = e.object({
|
|
1297
1327
|
ugc_id: e.number(),
|
|
1298
1328
|
title: e.string(),
|
|
1299
1329
|
content: e.string().optional(),
|
|
1300
1330
|
image_urls: e.array(e.string()).optional(),
|
|
1301
1331
|
social_media: re.clone().optional(),
|
|
1302
1332
|
social_media_url: e.string().optional()
|
|
1303
|
-
}),
|
|
1333
|
+
}), Hn = e.object({
|
|
1304
1334
|
ugcs: e.array(
|
|
1305
1335
|
e.object({
|
|
1306
1336
|
ugc_id: e.number(),
|
|
@@ -1308,6 +1338,7 @@ const v = {
|
|
|
1308
1338
|
feature_id: e.number().optional(),
|
|
1309
1339
|
feature_name: e.string().optional(),
|
|
1310
1340
|
review_status: vt,
|
|
1341
|
+
reviewer_comment: e.string().optional(),
|
|
1311
1342
|
title: e.string(),
|
|
1312
1343
|
content: e.string().optional(),
|
|
1313
1344
|
image_urls: e.array(e.string()).optional(),
|
|
@@ -1322,13 +1353,13 @@ const v = {
|
|
|
1322
1353
|
})
|
|
1323
1354
|
).optional(),
|
|
1324
1355
|
next_token: e.string().optional()
|
|
1325
|
-
}),
|
|
1356
|
+
}), zn = e.object({
|
|
1326
1357
|
total_count: e.number()
|
|
1327
|
-
}),
|
|
1358
|
+
}), Jn = e.object({
|
|
1328
1359
|
existed: e.bool(),
|
|
1329
1360
|
upload_url: e.string().optional(),
|
|
1330
1361
|
image_url: e.string()
|
|
1331
|
-
}),
|
|
1362
|
+
}), Zn = e.object({
|
|
1332
1363
|
ugcs: e.array(
|
|
1333
1364
|
e.object({
|
|
1334
1365
|
ugc_id: e.number(),
|
|
@@ -1341,27 +1372,27 @@ const v = {
|
|
|
1341
1372
|
role_name: e.string().optional()
|
|
1342
1373
|
})
|
|
1343
1374
|
).optional()
|
|
1344
|
-
}),
|
|
1375
|
+
}), Xn = e.object({
|
|
1345
1376
|
option_sn: e.string()
|
|
1346
|
-
}),
|
|
1377
|
+
}), Yn = e.object({
|
|
1347
1378
|
candidate_id: e.string(),
|
|
1348
1379
|
total_votes: e.number().optional(),
|
|
1349
1380
|
my_votes: e.number().optional(),
|
|
1350
1381
|
votes: e.number().optional()
|
|
1351
|
-
}),
|
|
1382
|
+
}), Wn = e.object({
|
|
1352
1383
|
rewards_type: ft,
|
|
1353
|
-
rewards: e.array(
|
|
1354
|
-
}),
|
|
1384
|
+
rewards: e.array(R).optional()
|
|
1385
|
+
}), er = e.object({
|
|
1355
1386
|
candidate_id: e.string(),
|
|
1356
1387
|
is_winner: e.bool(),
|
|
1357
1388
|
total_votes: e.number(),
|
|
1358
1389
|
my_votes: e.number()
|
|
1359
|
-
}),
|
|
1390
|
+
}), tr = e.object({
|
|
1360
1391
|
role: e.string(),
|
|
1361
1392
|
content: e.string()
|
|
1362
|
-
}),
|
|
1363
|
-
conversations: e.array(
|
|
1364
|
-
}),
|
|
1393
|
+
}), nr = e.object({
|
|
1394
|
+
conversations: e.array(tr)
|
|
1395
|
+
}), rr = e.object({
|
|
1365
1396
|
user_id: e.string(),
|
|
1366
1397
|
name: e.string(),
|
|
1367
1398
|
avatar_url: e.string(),
|
|
@@ -1369,27 +1400,28 @@ const v = {
|
|
|
1369
1400
|
video_note: e.number(),
|
|
1370
1401
|
created_at: e.number()
|
|
1371
1402
|
}), $ = e.union(
|
|
1372
|
-
Pn,
|
|
1373
|
-
xn,
|
|
1374
|
-
Dn,
|
|
1375
|
-
qn,
|
|
1376
1403
|
Fn,
|
|
1377
|
-
Kn,
|
|
1378
|
-
Hn,
|
|
1379
|
-
In,
|
|
1380
|
-
ae,
|
|
1381
|
-
Tn,
|
|
1382
|
-
An,
|
|
1383
|
-
En,
|
|
1384
1404
|
Un,
|
|
1385
|
-
|
|
1386
|
-
|
|
1405
|
+
Qn,
|
|
1406
|
+
Sn,
|
|
1387
1407
|
On,
|
|
1408
|
+
Xn,
|
|
1409
|
+
Yn,
|
|
1410
|
+
Nn,
|
|
1411
|
+
ae,
|
|
1412
|
+
Ln,
|
|
1413
|
+
Mn,
|
|
1414
|
+
In,
|
|
1415
|
+
$n,
|
|
1416
|
+
xn,
|
|
1417
|
+
nr,
|
|
1418
|
+
Kn,
|
|
1419
|
+
An,
|
|
1388
1420
|
e.custom(
|
|
1389
1421
|
"EmptyObject",
|
|
1390
1422
|
(i) => h(i) && Object.keys(i).length === 0
|
|
1391
1423
|
)
|
|
1392
|
-
).satisfies().lock(),
|
|
1424
|
+
).satisfies().lock(), ar = e.object({
|
|
1393
1425
|
reward_id: e.number(),
|
|
1394
1426
|
reward_item_id: e.number(),
|
|
1395
1427
|
reward_item_type: ee,
|
|
@@ -1402,7 +1434,7 @@ const v = {
|
|
|
1402
1434
|
reward_item_rating: e.number(),
|
|
1403
1435
|
receive_time: e.number(),
|
|
1404
1436
|
extra_data: e.union(...$.validators, e.record(e.unknown())).satisfies().optional()
|
|
1405
|
-
}),
|
|
1437
|
+
}), or = e.object({
|
|
1406
1438
|
reward_id: e.number(),
|
|
1407
1439
|
reward_item_id: e.number(),
|
|
1408
1440
|
reward_item_name: e.string(),
|
|
@@ -1414,7 +1446,7 @@ const v = {
|
|
|
1414
1446
|
reward_status: ne,
|
|
1415
1447
|
reward_source: E,
|
|
1416
1448
|
extra_data: e.record(e.unknown()).optional()
|
|
1417
|
-
}),
|
|
1449
|
+
}), ir = e.object({
|
|
1418
1450
|
engagement_id: e.number(),
|
|
1419
1451
|
user_id: e.string(),
|
|
1420
1452
|
event_id: e.number(),
|
|
@@ -1424,18 +1456,18 @@ const v = {
|
|
|
1424
1456
|
server_id: e.string().optional(),
|
|
1425
1457
|
role_id: e.string().optional(),
|
|
1426
1458
|
created_at: e.number(),
|
|
1427
|
-
rewards: e.array(
|
|
1428
|
-
}).lock(),
|
|
1459
|
+
rewards: e.array(ar).optional()
|
|
1460
|
+
}).lock(), sr = e.object({
|
|
1429
1461
|
allowed: e.bool(),
|
|
1430
1462
|
registered: e.bool()
|
|
1431
|
-
}),
|
|
1463
|
+
}), cr = e.object({
|
|
1432
1464
|
feature_id: e.number(),
|
|
1433
1465
|
can_engage: e.bool(),
|
|
1434
1466
|
has_unclaimed_rewards: e.bool(),
|
|
1435
1467
|
final_available_count: e.number(),
|
|
1436
1468
|
total_remaining_engagements: e.number(),
|
|
1437
1469
|
cycle_remaining_engagements: e.number()
|
|
1438
|
-
}),
|
|
1470
|
+
}), ur = e.object({
|
|
1439
1471
|
engagement_id: e.number(),
|
|
1440
1472
|
engagement: e.object({
|
|
1441
1473
|
engagement_id: e.number(),
|
|
@@ -1443,43 +1475,43 @@ const v = {
|
|
|
1443
1475
|
feature_id: e.number(),
|
|
1444
1476
|
data: $.clone().optional()
|
|
1445
1477
|
}).optional(),
|
|
1446
|
-
rewards: e.array(
|
|
1478
|
+
rewards: e.array(or).optional(),
|
|
1447
1479
|
scan: e.bool().optional()
|
|
1448
|
-
}),
|
|
1480
|
+
}), lr = e.object({
|
|
1449
1481
|
reward_id: e.number(),
|
|
1450
1482
|
reward_status: P
|
|
1451
|
-
}),
|
|
1452
|
-
engagements: e.union(e.array(
|
|
1453
|
-
}), lr = s({
|
|
1454
|
-
status: e.array(rr)
|
|
1455
|
-
}), mr = s({
|
|
1456
|
-
engagements_counts: e.record(e.number())
|
|
1457
|
-
}), dr = s({
|
|
1458
|
-
engagements: e.array(tr),
|
|
1459
|
-
next_token: e.string().optional()
|
|
1460
|
-
}), gr = e.guard(ar), pr = s({
|
|
1461
|
-
claimed_items: e.array(or)
|
|
1483
|
+
}), mr = e.guard(qn), dr = e.guard(sr), x = s({ count: e.number() }), gr = s({ first_visit: e.bool() }), pr = s({
|
|
1484
|
+
engagements: e.union(e.array(rr), e.array(Bn))
|
|
1462
1485
|
}), _r = s({
|
|
1463
|
-
|
|
1486
|
+
status: e.array(cr)
|
|
1464
1487
|
}), br = s({
|
|
1465
|
-
|
|
1488
|
+
engagements_counts: e.record(e.number())
|
|
1466
1489
|
}), yr = s({
|
|
1467
|
-
|
|
1490
|
+
engagements: e.array(ir),
|
|
1468
1491
|
next_token: e.string().optional()
|
|
1469
|
-
}), hr = s({
|
|
1492
|
+
}), hr = e.guard(ur), fr = s({
|
|
1493
|
+
claimed_items: e.array(lr)
|
|
1494
|
+
}), wr = s({
|
|
1495
|
+
rewards: e.array(R)
|
|
1496
|
+
}), kr = s({
|
|
1497
|
+
reward_status: P
|
|
1498
|
+
}), vr = s({
|
|
1499
|
+
user_rewards: e.array(R),
|
|
1500
|
+
next_token: e.string().optional()
|
|
1501
|
+
}), Rr = s({
|
|
1470
1502
|
unclaimed: e.number()
|
|
1471
|
-
}),
|
|
1503
|
+
}), Cr = s({
|
|
1472
1504
|
scene: e.string()
|
|
1473
|
-
}),
|
|
1505
|
+
}), Vr = s({
|
|
1474
1506
|
params: e.string()
|
|
1475
|
-
}),
|
|
1507
|
+
}), jr = s({
|
|
1476
1508
|
img: e.string()
|
|
1477
|
-
}),
|
|
1509
|
+
}), Tr = e.guard(Dn), qr = e.guard(Wn), xr = e.guard(
|
|
1478
1510
|
e.object({
|
|
1479
|
-
candidate_votes: e.array(
|
|
1511
|
+
candidate_votes: e.array(er)
|
|
1480
1512
|
})
|
|
1481
|
-
),
|
|
1482
|
-
class
|
|
1513
|
+
), Lr = e.guard(ae), M = e.guard(Hn), Sr = e.guard(zn), Ur = e.guard(Jn), Pr = e.guard(Zn), Er = e.guard(Gn);
|
|
1514
|
+
class Va {
|
|
1483
1515
|
token;
|
|
1484
1516
|
event = 0;
|
|
1485
1517
|
req;
|
|
@@ -1492,7 +1524,7 @@ class fa {
|
|
|
1492
1524
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1493
1525
|
*/
|
|
1494
1526
|
async verifyMobileAllowed(t, n, r) {
|
|
1495
|
-
const { data: a } = await this.req.get("verify-mobile-allowed",
|
|
1527
|
+
const { data: a } = await this.req.get("verify-mobile-allowed", dr, {
|
|
1496
1528
|
...r,
|
|
1497
1529
|
params: { game_id: t, mobile: n }
|
|
1498
1530
|
});
|
|
@@ -1504,7 +1536,7 @@ class fa {
|
|
|
1504
1536
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1505
1537
|
*/
|
|
1506
1538
|
async getConfig(t) {
|
|
1507
|
-
const { data: n } = await this.req.get(`event/${this.event}/event-config`,
|
|
1539
|
+
const { data: n } = await this.req.get(`event/${this.event}/event-config`, mr, t);
|
|
1508
1540
|
return n;
|
|
1509
1541
|
}
|
|
1510
1542
|
/**
|
|
@@ -1539,7 +1571,7 @@ class fa {
|
|
|
1539
1571
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1540
1572
|
*/
|
|
1541
1573
|
async getEngagements(t, n) {
|
|
1542
|
-
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`,
|
|
1574
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, pr, {
|
|
1543
1575
|
...n,
|
|
1544
1576
|
params: { feature_id: t }
|
|
1545
1577
|
});
|
|
@@ -1555,7 +1587,7 @@ class fa {
|
|
|
1555
1587
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1556
1588
|
`event/${this.event}/visit`,
|
|
1557
1589
|
c(t || {}),
|
|
1558
|
-
|
|
1590
|
+
gr,
|
|
1559
1591
|
n
|
|
1560
1592
|
);
|
|
1561
1593
|
return r ?? {
|
|
@@ -1572,7 +1604,7 @@ class fa {
|
|
|
1572
1604
|
*/
|
|
1573
1605
|
async getUserFeatureStatus(t, n) {
|
|
1574
1606
|
if (!await this.token.autoLogin()) return [];
|
|
1575
|
-
const { data: r } = await this.req.get("event/user-feature-status",
|
|
1607
|
+
const { data: r } = await this.req.get("event/user-feature-status", _r, {
|
|
1576
1608
|
...n,
|
|
1577
1609
|
message: !1,
|
|
1578
1610
|
params: c({ ...t, event_id: this.event })
|
|
@@ -1586,7 +1618,7 @@ class fa {
|
|
|
1586
1618
|
*/
|
|
1587
1619
|
async getUserEngagementCount(t, n) {
|
|
1588
1620
|
if (!await this.token.autoLogin()) return {};
|
|
1589
|
-
const { data: r } = await this.req.get("event/user-engagements-count",
|
|
1621
|
+
const { data: r } = await this.req.get("event/user-engagements-count", br, {
|
|
1590
1622
|
message: !1,
|
|
1591
1623
|
params: c({ ...n, event_id: this.event, feature_id: t })
|
|
1592
1624
|
});
|
|
@@ -1605,7 +1637,7 @@ class fa {
|
|
|
1605
1637
|
engagements: [],
|
|
1606
1638
|
next_token: ""
|
|
1607
1639
|
};
|
|
1608
|
-
const { data: a } = await this.req.get("event/user-engagements",
|
|
1640
|
+
const { data: a } = await this.req.get("event/user-engagements", yr, {
|
|
1609
1641
|
...r,
|
|
1610
1642
|
params: c({
|
|
1611
1643
|
max_results: 20,
|
|
@@ -1637,7 +1669,7 @@ class fa {
|
|
|
1637
1669
|
engagement: n,
|
|
1638
1670
|
...r
|
|
1639
1671
|
}),
|
|
1640
|
-
|
|
1672
|
+
hr,
|
|
1641
1673
|
a
|
|
1642
1674
|
);
|
|
1643
1675
|
return o ?? {
|
|
@@ -1660,7 +1692,7 @@ class fa {
|
|
|
1660
1692
|
...t,
|
|
1661
1693
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1662
1694
|
}),
|
|
1663
|
-
|
|
1695
|
+
fr,
|
|
1664
1696
|
n
|
|
1665
1697
|
);
|
|
1666
1698
|
return r?.claimed_items || {
|
|
@@ -1681,7 +1713,7 @@ class fa {
|
|
|
1681
1713
|
...t,
|
|
1682
1714
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1683
1715
|
}),
|
|
1684
|
-
|
|
1716
|
+
wr,
|
|
1685
1717
|
n
|
|
1686
1718
|
);
|
|
1687
1719
|
return r?.rewards || {
|
|
@@ -1699,7 +1731,7 @@ class fa {
|
|
|
1699
1731
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1700
1732
|
"event/claim-weixin-hongbao",
|
|
1701
1733
|
{ reward_id: t },
|
|
1702
|
-
|
|
1734
|
+
kr,
|
|
1703
1735
|
n
|
|
1704
1736
|
);
|
|
1705
1737
|
return r || {
|
|
@@ -1740,7 +1772,7 @@ class fa {
|
|
|
1740
1772
|
const { data: r } = await this.req.post(
|
|
1741
1773
|
"event/user-rewards",
|
|
1742
1774
|
c({ max_results: 20, ...t, event_id: this.event }),
|
|
1743
|
-
|
|
1775
|
+
vr,
|
|
1744
1776
|
n
|
|
1745
1777
|
);
|
|
1746
1778
|
return {
|
|
@@ -1758,7 +1790,7 @@ class fa {
|
|
|
1758
1790
|
return {
|
|
1759
1791
|
unclaimed: 0
|
|
1760
1792
|
};
|
|
1761
|
-
const { data: r } = await this.req.get("event/user-rewards-count",
|
|
1793
|
+
const { data: r } = await this.req.get("event/user-rewards-count", Rr, {
|
|
1762
1794
|
...n,
|
|
1763
1795
|
params: c({ ...t })
|
|
1764
1796
|
});
|
|
@@ -1806,7 +1838,7 @@ class fa {
|
|
|
1806
1838
|
*/
|
|
1807
1839
|
async getUnlimitQrcodeScene(t, n) {
|
|
1808
1840
|
if (!await this.token.autoLogin()) return null;
|
|
1809
|
-
const { data: r } = await this.req.get("event/unlimit-qrcode-scene",
|
|
1841
|
+
const { data: r } = await this.req.get("event/unlimit-qrcode-scene", Cr, {
|
|
1810
1842
|
...n,
|
|
1811
1843
|
params: { params: t }
|
|
1812
1844
|
});
|
|
@@ -1820,7 +1852,7 @@ class fa {
|
|
|
1820
1852
|
* @param scene - 小程序码 scene 值
|
|
1821
1853
|
*/
|
|
1822
1854
|
async getParamsByQrcodeScene(t, n) {
|
|
1823
|
-
const { data: r } = await this.req.get("event/params-by-qrcode-scene",
|
|
1855
|
+
const { data: r } = await this.req.get("event/params-by-qrcode-scene", Vr, {
|
|
1824
1856
|
...n,
|
|
1825
1857
|
params: { scene: t }
|
|
1826
1858
|
});
|
|
@@ -1836,7 +1868,7 @@ class fa {
|
|
|
1836
1868
|
const { data: r } = await this.req.post(
|
|
1837
1869
|
"event/unlimit-qrcode",
|
|
1838
1870
|
c(t),
|
|
1839
|
-
|
|
1871
|
+
jr,
|
|
1840
1872
|
n
|
|
1841
1873
|
);
|
|
1842
1874
|
return r?.img ?? null;
|
|
@@ -1848,7 +1880,7 @@ class fa {
|
|
|
1848
1880
|
*/
|
|
1849
1881
|
async getQuestProgress(t, n) {
|
|
1850
1882
|
if (!await this.token.autoLogin()) return null;
|
|
1851
|
-
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`,
|
|
1883
|
+
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, Tr, {
|
|
1852
1884
|
message: !1,
|
|
1853
1885
|
...n,
|
|
1854
1886
|
params: { feature_id: t }
|
|
@@ -1870,7 +1902,7 @@ class fa {
|
|
|
1870
1902
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1871
1903
|
"event/vote2/rewards",
|
|
1872
1904
|
{ feature_id: t, event_id: this.event },
|
|
1873
|
-
|
|
1905
|
+
qr,
|
|
1874
1906
|
n
|
|
1875
1907
|
);
|
|
1876
1908
|
return r || {
|
|
@@ -1885,7 +1917,7 @@ class fa {
|
|
|
1885
1917
|
*/
|
|
1886
1918
|
async getVote2Leaderboard(t, n) {
|
|
1887
1919
|
if (!await this.token.autoLogin()) return [];
|
|
1888
|
-
const { data: r } = await this.req.get("event/vote2/leaderboard",
|
|
1920
|
+
const { data: r } = await this.req.get("event/vote2/leaderboard", xr, {
|
|
1889
1921
|
...n,
|
|
1890
1922
|
params: { feature_id: t, event_id: this.event }
|
|
1891
1923
|
});
|
|
@@ -1898,7 +1930,7 @@ class fa {
|
|
|
1898
1930
|
*/
|
|
1899
1931
|
async getCashbackQuery(t, n) {
|
|
1900
1932
|
if (!await this.token.autoLogin()) return null;
|
|
1901
|
-
const { data: r, code: a, message: o } = await this.req.get("event/cashback/query",
|
|
1933
|
+
const { data: r, code: a, message: o } = await this.req.get("event/cashback/query", Lr, {
|
|
1902
1934
|
...n,
|
|
1903
1935
|
params: { feature_id: t, event_id: this.event }
|
|
1904
1936
|
});
|
|
@@ -1933,7 +1965,7 @@ class fa {
|
|
|
1933
1965
|
*/
|
|
1934
1966
|
async getUgcMyCount(t, n) {
|
|
1935
1967
|
if (!await this.token.autoLogin()) return null;
|
|
1936
|
-
const { data: r, code: a, message: o } = await this.req.get("event/ugc/my-count",
|
|
1968
|
+
const { data: r, code: a, message: o } = await this.req.get("event/ugc/my-count", Sr, {
|
|
1937
1969
|
...n,
|
|
1938
1970
|
params: {
|
|
1939
1971
|
...t
|
|
@@ -1958,7 +1990,7 @@ class fa {
|
|
|
1958
1990
|
const { data: a, code: o, message: g } = await this.req.post(
|
|
1959
1991
|
"event/ugc/upload-image",
|
|
1960
1992
|
{ feature_id: t, ...n, event_id: this.event },
|
|
1961
|
-
|
|
1993
|
+
Ur,
|
|
1962
1994
|
r
|
|
1963
1995
|
);
|
|
1964
1996
|
return a || {
|
|
@@ -1997,7 +2029,7 @@ class fa {
|
|
|
1997
2029
|
*/
|
|
1998
2030
|
async getUgcLeaderboard(t, n) {
|
|
1999
2031
|
if (!await this.token.autoLogin()) return null;
|
|
2000
|
-
const { data: r, code: a, message: o } = await this.req.get("event/ugc/leaderboard",
|
|
2032
|
+
const { data: r, code: a, message: o } = await this.req.get("event/ugc/leaderboard", Pr, {
|
|
2001
2033
|
...n,
|
|
2002
2034
|
params: {
|
|
2003
2035
|
feature_id: t,
|
|
@@ -2009,13 +2041,32 @@ class fa {
|
|
|
2009
2041
|
error: a
|
|
2010
2042
|
};
|
|
2011
2043
|
}
|
|
2044
|
+
/**
|
|
2045
|
+
* 查询兑换玩法的物品剩余库存(含用户可兑换数量)
|
|
2046
|
+
*
|
|
2047
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=gOqT9svLF7
|
|
2048
|
+
*/
|
|
2049
|
+
async getRedeemItemStock(t, n) {
|
|
2050
|
+
if (!await this.token.autoLogin()) return null;
|
|
2051
|
+
const { data: r, code: a, message: o } = await this.req.get("event/redeem-item-stocks", Er, {
|
|
2052
|
+
...n,
|
|
2053
|
+
params: {
|
|
2054
|
+
event_id: this.event,
|
|
2055
|
+
feature_id: t
|
|
2056
|
+
}
|
|
2057
|
+
});
|
|
2058
|
+
return r || {
|
|
2059
|
+
message: o,
|
|
2060
|
+
error: a
|
|
2061
|
+
};
|
|
2062
|
+
}
|
|
2012
2063
|
}
|
|
2013
|
-
const
|
|
2064
|
+
const $r = {
|
|
2014
2065
|
/** 所有人均可以发帖 */
|
|
2015
2066
|
All: "all",
|
|
2016
2067
|
/** 指定用户可发帖 */
|
|
2017
2068
|
Limit: "limit"
|
|
2018
|
-
},
|
|
2069
|
+
}, Fr = e.string().enum($r).lock(), Ir = {
|
|
2019
2070
|
/** 待审核(仅自己可见) */
|
|
2020
2071
|
Pending: "pending",
|
|
2021
2072
|
/** 审核通过 */
|
|
@@ -2024,14 +2075,14 @@ const xr = {
|
|
|
2024
2075
|
Failed: "failed",
|
|
2025
2076
|
/** 嫌疑(仅自己可见) */
|
|
2026
2077
|
Suspect: "suspect"
|
|
2027
|
-
}, ie = e.string().enum(
|
|
2078
|
+
}, ie = e.string().enum(Ir).lock(), Dr = {
|
|
2028
2079
|
/** 系统通知 */
|
|
2029
2080
|
System: "system",
|
|
2030
2081
|
/** 评论我的 */
|
|
2031
2082
|
Comment: "comment",
|
|
2032
2083
|
/** 点赞通知 */
|
|
2033
2084
|
Like: "like"
|
|
2034
|
-
},
|
|
2085
|
+
}, ja = e.string().enum(Dr).lock(), m = {
|
|
2035
2086
|
/** 系统通知 */
|
|
2036
2087
|
System: "system",
|
|
2037
2088
|
/** 帖子被置顶 */
|
|
@@ -2056,13 +2107,13 @@ const xr = {
|
|
|
2056
2107
|
ReplyLiked: "reply_liked",
|
|
2057
2108
|
/** 回复被删除 */
|
|
2058
2109
|
ReplyDeleted: "reply_deleted"
|
|
2059
|
-
},
|
|
2110
|
+
}, Ar = e.string().enum(m).lock(), se = e.object({
|
|
2060
2111
|
forum_id: e.number(),
|
|
2061
2112
|
icon_url: e.string(),
|
|
2062
2113
|
name: e.string(),
|
|
2063
2114
|
tags: e.array(e.string()),
|
|
2064
2115
|
sort: e.number(),
|
|
2065
|
-
mode:
|
|
2116
|
+
mode: Fr,
|
|
2066
2117
|
member_ids: e.array(e.number())
|
|
2067
2118
|
}).lock(), F = e.object({
|
|
2068
2119
|
topic_id: e.number(),
|
|
@@ -2093,13 +2144,13 @@ const xr = {
|
|
|
2093
2144
|
create_time: e.number()
|
|
2094
2145
|
}).lock(), ce = e.object({
|
|
2095
2146
|
err_msg: e.string().optional()
|
|
2096
|
-
}).optional().lock(),
|
|
2147
|
+
}).optional().lock(), Gr = e.object({
|
|
2097
2148
|
reply_id: e.number(),
|
|
2098
2149
|
reply_content: e.string().optional(),
|
|
2099
2150
|
replied_by: e.string(),
|
|
2100
2151
|
nickname: e.string(),
|
|
2101
2152
|
avatar_url: e.string()
|
|
2102
|
-
}).lock(),
|
|
2153
|
+
}).lock(), C = e.object({
|
|
2103
2154
|
reply_id: e.number(),
|
|
2104
2155
|
comment_id: e.number(),
|
|
2105
2156
|
comment_content: e.string().optional(),
|
|
@@ -2112,7 +2163,7 @@ const xr = {
|
|
|
2112
2163
|
content: e.string(),
|
|
2113
2164
|
like_num: e.number(),
|
|
2114
2165
|
liked: e.bool(),
|
|
2115
|
-
reply_to:
|
|
2166
|
+
reply_to: Gr,
|
|
2116
2167
|
create_time: e.number()
|
|
2117
2168
|
}).lock(), k = e.object({
|
|
2118
2169
|
comment_id: e.number(),
|
|
@@ -2133,20 +2184,20 @@ const xr = {
|
|
|
2133
2184
|
image_url: e.string(),
|
|
2134
2185
|
create_time: e.number(),
|
|
2135
2186
|
status: ie,
|
|
2136
|
-
replies: e.array(
|
|
2137
|
-
}).lock(),
|
|
2187
|
+
replies: e.array(C).optional()
|
|
2188
|
+
}).lock(), Or = e.object({
|
|
2138
2189
|
image_url: e.string(),
|
|
2139
2190
|
upload_url: e.string(),
|
|
2140
2191
|
existed: e.bool()
|
|
2141
|
-
}).lock(),
|
|
2192
|
+
}).lock(), y = e.object({
|
|
2142
2193
|
notification_id: e.string(),
|
|
2143
|
-
notification_type:
|
|
2194
|
+
notification_type: Ar,
|
|
2144
2195
|
is_read: e.bool(),
|
|
2145
2196
|
create_time: e.number(),
|
|
2146
2197
|
origin_user_id: e.string(),
|
|
2147
2198
|
origin_user_name: e.string(),
|
|
2148
2199
|
origin_user_avatar_url: e.string()
|
|
2149
|
-
}).lock(),
|
|
2200
|
+
}).lock(), Nr = e.object({
|
|
2150
2201
|
system_message_subject: e.string(),
|
|
2151
2202
|
system_message_content: e.string()
|
|
2152
2203
|
}).lock(), D = e.object({
|
|
@@ -2154,18 +2205,18 @@ const xr = {
|
|
|
2154
2205
|
post_subject: e.string(),
|
|
2155
2206
|
post_summary: e.string(),
|
|
2156
2207
|
post_image_url: e.string()
|
|
2157
|
-
}).lock(),
|
|
2208
|
+
}).lock(), V = e.object({
|
|
2158
2209
|
comment_id: e.number(),
|
|
2159
2210
|
comment_content: e.string()
|
|
2160
|
-
}).lock(),
|
|
2211
|
+
}).lock(), A = e.object({
|
|
2161
2212
|
reply_id: e.number(),
|
|
2162
2213
|
reply_content: e.string()
|
|
2163
|
-
}).lock(),
|
|
2164
|
-
...
|
|
2165
|
-
...
|
|
2214
|
+
}).lock(), Qr = e.object({
|
|
2215
|
+
...y.shape,
|
|
2216
|
+
...Nr.shape,
|
|
2166
2217
|
notification_type: e.string().enum(m.System)
|
|
2167
|
-
}),
|
|
2168
|
-
...
|
|
2218
|
+
}), Br = e.object({
|
|
2219
|
+
...y.shape,
|
|
2169
2220
|
...D.shape,
|
|
2170
2221
|
notification_type: e.string().enum(
|
|
2171
2222
|
m.PostPinned,
|
|
@@ -2173,68 +2224,68 @@ const xr = {
|
|
|
2173
2224
|
m.PostDeleted,
|
|
2174
2225
|
m.PostLiked
|
|
2175
2226
|
)
|
|
2176
|
-
}),
|
|
2177
|
-
...
|
|
2227
|
+
}), Mr = e.object({
|
|
2228
|
+
...y.shape,
|
|
2178
2229
|
...D.shape,
|
|
2179
|
-
...
|
|
2230
|
+
...V.shape,
|
|
2180
2231
|
notification_type: e.string().enum(m.PostCommented)
|
|
2181
|
-
}),
|
|
2182
|
-
...
|
|
2183
|
-
...
|
|
2184
|
-
...
|
|
2232
|
+
}), Kr = e.object({
|
|
2233
|
+
...y.shape,
|
|
2234
|
+
...V.shape,
|
|
2235
|
+
...A.shape,
|
|
2185
2236
|
notification_type: e.string().enum(m.CommentReplied)
|
|
2186
|
-
}),
|
|
2187
|
-
...
|
|
2188
|
-
...
|
|
2237
|
+
}), Hr = e.object({
|
|
2238
|
+
...y.shape,
|
|
2239
|
+
...V.shape,
|
|
2189
2240
|
...D.shape,
|
|
2190
2241
|
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
2191
|
-
}),
|
|
2192
|
-
...
|
|
2193
|
-
...
|
|
2242
|
+
}), zr = e.object({
|
|
2243
|
+
...y.shape,
|
|
2244
|
+
...A.shape,
|
|
2194
2245
|
notification_type: e.string().enum(m.ReplyReplied),
|
|
2195
2246
|
comment_id: e.number(),
|
|
2196
2247
|
reply_to_reply_id: e.number(),
|
|
2197
2248
|
reply_to_reply_content: e.string()
|
|
2198
|
-
}),
|
|
2199
|
-
...
|
|
2200
|
-
...
|
|
2201
|
-
...
|
|
2249
|
+
}), Jr = e.object({
|
|
2250
|
+
...y.shape,
|
|
2251
|
+
...A.shape,
|
|
2252
|
+
...V.shape,
|
|
2202
2253
|
notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
|
|
2203
|
-
}),
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
).satisfies().lock(),
|
|
2254
|
+
}), Zr = e.union(
|
|
2255
|
+
Qr,
|
|
2256
|
+
Br,
|
|
2257
|
+
Mr,
|
|
2258
|
+
Kr,
|
|
2259
|
+
Hr,
|
|
2260
|
+
zr,
|
|
2261
|
+
Jr
|
|
2262
|
+
).satisfies().lock(), Xr = s({ forums: e.array(se) }), Yr = s({ topics: e.array(F) }), Wr = s({ topic: F }), ea = s({ post: I }), K = s({
|
|
2212
2263
|
posts: e.array(I),
|
|
2213
2264
|
next_token: e.string().optional()
|
|
2214
|
-
}),
|
|
2265
|
+
}), ta = s({
|
|
2215
2266
|
post: I.clone().optional(),
|
|
2216
2267
|
antispam: ce.clone().optional()
|
|
2217
|
-
}),
|
|
2218
|
-
replies: e.array(
|
|
2268
|
+
}), na = s({
|
|
2269
|
+
replies: e.array(C),
|
|
2219
2270
|
next_token: e.string().optional()
|
|
2220
|
-
}),
|
|
2221
|
-
reply:
|
|
2271
|
+
}), ra = s({ reply: C }), aa = s({
|
|
2272
|
+
reply: C.clone().optional(),
|
|
2222
2273
|
antispam: ce.clone().optional()
|
|
2223
|
-
}),
|
|
2274
|
+
}), oa = s({ comment: k }), ia = s({
|
|
2224
2275
|
comments: e.array(k),
|
|
2225
2276
|
next_token: e.string().optional()
|
|
2226
|
-
}),
|
|
2277
|
+
}), sa = s({
|
|
2227
2278
|
comment: k.clone().optional(),
|
|
2228
2279
|
antispam: k.clone().optional()
|
|
2229
|
-
}),
|
|
2230
|
-
notifications: e.array(
|
|
2280
|
+
}), ca = e.guard(Or), ua = s({
|
|
2281
|
+
notifications: e.array(Zr),
|
|
2231
2282
|
next_token: e.string().optional()
|
|
2232
|
-
}),
|
|
2283
|
+
}), la = s({
|
|
2233
2284
|
system: e.number(),
|
|
2234
2285
|
comment: e.number(),
|
|
2235
2286
|
like: e.number()
|
|
2236
2287
|
});
|
|
2237
|
-
class
|
|
2288
|
+
class Ta {
|
|
2238
2289
|
token;
|
|
2239
2290
|
req;
|
|
2240
2291
|
constructor(t) {
|
|
@@ -2246,7 +2297,7 @@ class ka {
|
|
|
2246
2297
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
2247
2298
|
*/
|
|
2248
2299
|
async getForums(t) {
|
|
2249
|
-
const { data: n } = await this.req.get("community/forums",
|
|
2300
|
+
const { data: n } = await this.req.get("community/forums", Xr, t);
|
|
2250
2301
|
return n?.forums || [];
|
|
2251
2302
|
}
|
|
2252
2303
|
/**
|
|
@@ -2255,7 +2306,7 @@ class ka {
|
|
|
2255
2306
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
2256
2307
|
*/
|
|
2257
2308
|
async getTopics(t) {
|
|
2258
|
-
const { data: n } = await this.req.get("community/topics",
|
|
2309
|
+
const { data: n } = await this.req.get("community/topics", Yr, t);
|
|
2259
2310
|
return n?.topics || [];
|
|
2260
2311
|
}
|
|
2261
2312
|
/**
|
|
@@ -2264,7 +2315,7 @@ class ka {
|
|
|
2264
2315
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
2265
2316
|
*/
|
|
2266
2317
|
async getTopic(t, n) {
|
|
2267
|
-
const { data: r, code: a } = await this.req.get("community/topic",
|
|
2318
|
+
const { data: r, code: a } = await this.req.get("community/topic", Wr, {
|
|
2268
2319
|
...n,
|
|
2269
2320
|
params: { topic_id: t }
|
|
2270
2321
|
});
|
|
@@ -2306,7 +2357,7 @@ class ka {
|
|
|
2306
2357
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
2307
2358
|
*/
|
|
2308
2359
|
async getPost(t, n) {
|
|
2309
|
-
const { data: r, code: a, message: o } = await this.req.get("community/post",
|
|
2360
|
+
const { data: r, code: a, message: o } = await this.req.get("community/post", ea, {
|
|
2310
2361
|
...n,
|
|
2311
2362
|
params: { post_id: t }
|
|
2312
2363
|
});
|
|
@@ -2324,7 +2375,7 @@ class ka {
|
|
|
2324
2375
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2325
2376
|
"community/post",
|
|
2326
2377
|
c(t),
|
|
2327
|
-
|
|
2378
|
+
ta,
|
|
2328
2379
|
n
|
|
2329
2380
|
);
|
|
2330
2381
|
return r ?? {
|
|
@@ -2338,7 +2389,7 @@ class ka {
|
|
|
2338
2389
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
2339
2390
|
*/
|
|
2340
2391
|
async getComments(t, n) {
|
|
2341
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comments",
|
|
2392
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comments", ia, {
|
|
2342
2393
|
...n,
|
|
2343
2394
|
params: c(t)
|
|
2344
2395
|
});
|
|
@@ -2353,7 +2404,7 @@ class ka {
|
|
|
2353
2404
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
2354
2405
|
*/
|
|
2355
2406
|
async getComment(t, n) {
|
|
2356
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comment",
|
|
2407
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comment", oa, {
|
|
2357
2408
|
...n,
|
|
2358
2409
|
params: { comment_id: t }
|
|
2359
2410
|
});
|
|
@@ -2372,7 +2423,7 @@ class ka {
|
|
|
2372
2423
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2373
2424
|
"community/comment",
|
|
2374
2425
|
c(t),
|
|
2375
|
-
|
|
2426
|
+
sa,
|
|
2376
2427
|
n
|
|
2377
2428
|
);
|
|
2378
2429
|
return r ?? {
|
|
@@ -2386,7 +2437,7 @@ class ka {
|
|
|
2386
2437
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
2387
2438
|
*/
|
|
2388
2439
|
async getReplies(t, n) {
|
|
2389
|
-
const { data: r } = await this.req.get("community/replies",
|
|
2440
|
+
const { data: r } = await this.req.get("community/replies", na, {
|
|
2390
2441
|
...n,
|
|
2391
2442
|
params: c({ max_results: 20, ...t })
|
|
2392
2443
|
});
|
|
@@ -2401,7 +2452,7 @@ class ka {
|
|
|
2401
2452
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
2402
2453
|
*/
|
|
2403
2454
|
async getReply(t, n) {
|
|
2404
|
-
const { data: r, code: a, message: o } = await this.req.get("community/reply",
|
|
2455
|
+
const { data: r, code: a, message: o } = await this.req.get("community/reply", ra, {
|
|
2405
2456
|
...n,
|
|
2406
2457
|
params: { reply_id: t }
|
|
2407
2458
|
});
|
|
@@ -2420,7 +2471,7 @@ class ka {
|
|
|
2420
2471
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2421
2472
|
"community/reply",
|
|
2422
2473
|
c(t),
|
|
2423
|
-
|
|
2474
|
+
aa,
|
|
2424
2475
|
n
|
|
2425
2476
|
);
|
|
2426
2477
|
return r ?? {
|
|
@@ -2471,7 +2522,7 @@ class ka {
|
|
|
2471
2522
|
*/
|
|
2472
2523
|
async getMediaPresignedUrl(t, n) {
|
|
2473
2524
|
await this.token.autoLogin();
|
|
2474
|
-
const { data: r } = await this.req.get("community/media-presign-url",
|
|
2525
|
+
const { data: r } = await this.req.get("community/media-presign-url", ca, {
|
|
2475
2526
|
...n,
|
|
2476
2527
|
params: t
|
|
2477
2528
|
});
|
|
@@ -2486,7 +2537,7 @@ class ka {
|
|
|
2486
2537
|
*/
|
|
2487
2538
|
async getNotifications(t, n) {
|
|
2488
2539
|
await this.token.autoLogin();
|
|
2489
|
-
const { data: r } = await this.req.get("community/notifications",
|
|
2540
|
+
const { data: r } = await this.req.get("community/notifications", ua, {
|
|
2490
2541
|
...n,
|
|
2491
2542
|
params: c({ max_results: 20, ...t })
|
|
2492
2543
|
});
|
|
@@ -2504,7 +2555,7 @@ class ka {
|
|
|
2504
2555
|
if (!await this.token.autoLogin()) return null;
|
|
2505
2556
|
const { data: n } = await this.req.get(
|
|
2506
2557
|
"community/unread-notifications-count",
|
|
2507
|
-
|
|
2558
|
+
la,
|
|
2508
2559
|
t
|
|
2509
2560
|
);
|
|
2510
2561
|
return n;
|
|
@@ -2520,17 +2571,17 @@ class ka {
|
|
|
2520
2571
|
return r;
|
|
2521
2572
|
}
|
|
2522
2573
|
}
|
|
2523
|
-
const
|
|
2574
|
+
const ma = s({
|
|
2524
2575
|
nonce_str: e.string(),
|
|
2525
2576
|
timestamp: e.number(),
|
|
2526
2577
|
signature: e.string()
|
|
2527
2578
|
});
|
|
2528
|
-
var
|
|
2579
|
+
var da = /* @__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))(da || {});
|
|
2529
2580
|
function L(i) {
|
|
2530
2581
|
return h(i, "open_id", "union_id", "weixin_token");
|
|
2531
2582
|
}
|
|
2532
2583
|
const H = "wx_login_cache";
|
|
2533
|
-
class
|
|
2584
|
+
class qa {
|
|
2534
2585
|
token;
|
|
2535
2586
|
$appid;
|
|
2536
2587
|
req;
|
|
@@ -2620,7 +2671,7 @@ class va {
|
|
|
2620
2671
|
async webLogin(t = "snsapi_userinfo", n) {
|
|
2621
2672
|
const r = S("code"), a = Date.now(), o = +S("state");
|
|
2622
2673
|
if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
|
|
2623
|
-
const me =
|
|
2674
|
+
const me = G(["code", "state"]);
|
|
2624
2675
|
location.replace(
|
|
2625
2676
|
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(me)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
|
|
2626
2677
|
);
|
|
@@ -2631,7 +2682,7 @@ class va {
|
|
|
2631
2682
|
message: "Error: " + r,
|
|
2632
2683
|
error: r
|
|
2633
2684
|
};
|
|
2634
|
-
const g =
|
|
2685
|
+
const g = G(["code", "state"]);
|
|
2635
2686
|
"replaceState" in history && history.replaceState({}, "", g);
|
|
2636
2687
|
const {
|
|
2637
2688
|
data: p,
|
|
@@ -2670,7 +2721,7 @@ class va {
|
|
|
2670
2721
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
|
|
2671
2722
|
*/
|
|
2672
2723
|
async getJSSDKConfig(t) {
|
|
2673
|
-
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign",
|
|
2724
|
+
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", ma, {
|
|
2674
2725
|
...t,
|
|
2675
2726
|
params: {
|
|
2676
2727
|
appid: this.appid,
|
|
@@ -2687,22 +2738,22 @@ class va {
|
|
|
2687
2738
|
}
|
|
2688
2739
|
export {
|
|
2689
2740
|
ce as AntispamValidator,
|
|
2690
|
-
|
|
2691
|
-
|
|
2741
|
+
ba as AuthToken,
|
|
2742
|
+
er as CandidateVoteValidator,
|
|
2692
2743
|
ae as CashbackEngagementDataValidator,
|
|
2693
|
-
|
|
2744
|
+
xn as ClaimActivationKeyEngagementDataValidator,
|
|
2694
2745
|
lt as ClaimRewardStatus,
|
|
2695
2746
|
P as ClaimRewardStatusValidator,
|
|
2696
|
-
|
|
2747
|
+
lr as ClaimedItemValidator,
|
|
2697
2748
|
Z as ClubAddressValidator,
|
|
2698
|
-
|
|
2749
|
+
ha as ClubApi,
|
|
2699
2750
|
X as ClubBenefitSummaryValidator,
|
|
2700
2751
|
Oe as ClubBenefitValidator,
|
|
2701
2752
|
qe as ClubCreditChangeScene,
|
|
2702
2753
|
xe as ClubCreditChangeSceneValidator,
|
|
2703
2754
|
je as ClubCreditChangeType,
|
|
2704
2755
|
Te as ClubCreditChangeTypeValidator,
|
|
2705
|
-
|
|
2756
|
+
Ge as ClubCreditLogValidator,
|
|
2706
2757
|
Pe as ClubGlobalConfigValidator,
|
|
2707
2758
|
Le as ClubItemType,
|
|
2708
2759
|
z as ClubItemTypeValidator,
|
|
@@ -2710,144 +2761,148 @@ export {
|
|
|
2710
2761
|
Y as ClubProductValidator,
|
|
2711
2762
|
Se as ClubRedemptionStatus,
|
|
2712
2763
|
Ue as ClubRedemptionStatusValidator,
|
|
2713
|
-
|
|
2764
|
+
Ae as ClubUserCreditValidator,
|
|
2714
2765
|
De as ClubUserProfileValidator,
|
|
2715
|
-
|
|
2766
|
+
rr as CommentEngagementValidator,
|
|
2716
2767
|
k as CommentValidator,
|
|
2717
|
-
|
|
2718
|
-
|
|
2768
|
+
Ta as CommunityApi,
|
|
2769
|
+
tr as ConversationValidator,
|
|
2719
2770
|
tt as EngageAccountType,
|
|
2720
2771
|
nt as EngageAccountTypeValidator,
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2772
|
+
ur as EngageResponseValidator,
|
|
2773
|
+
or as EngageRewardValidator,
|
|
2774
|
+
Va as EventApi,
|
|
2775
|
+
qn as EventConfigValidator,
|
|
2725
2776
|
Tt as EventFeatureConfigOfCashbackValidator,
|
|
2726
2777
|
xt as EventFeatureConfigOfCheckInValidator,
|
|
2727
2778
|
St as EventFeatureConfigOfClaimActivationKeyValidator,
|
|
2728
2779
|
Pt as EventFeatureConfigOfClaimRewardsValidator,
|
|
2729
2780
|
$t as EventFeatureConfigOfCommentValidator,
|
|
2730
2781
|
It as EventFeatureConfigOfFollowValidator,
|
|
2731
|
-
|
|
2782
|
+
Gt as EventFeatureConfigOfGiftCodeValidator,
|
|
2732
2783
|
Nt as EventFeatureConfigOfInviteValidator,
|
|
2733
2784
|
Bt as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2734
2785
|
Zt as EventFeatureConfigOfLotteryDrawValidator,
|
|
2735
2786
|
zt as EventFeatureConfigOfLotteryValidator,
|
|
2736
2787
|
Yt as EventFeatureConfigOfPreregisterValidator,
|
|
2737
2788
|
en as EventFeatureConfigOfQuestValidator,
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2789
|
+
rn as EventFeatureConfigOfRedeemValidator,
|
|
2790
|
+
on as EventFeatureConfigOfRegisterValidator,
|
|
2791
|
+
cn as EventFeatureConfigOfShareValidator,
|
|
2792
|
+
ln as EventFeatureConfigOfSubscribeValidator,
|
|
2793
|
+
dn as EventFeatureConfigOfSurveyValidator,
|
|
2794
|
+
pn as EventFeatureConfigOfTeamValidator,
|
|
2795
|
+
hn as EventFeatureConfigOfUgcLikeValidator,
|
|
2796
|
+
bn as EventFeatureConfigOfUgcValidator,
|
|
2797
|
+
Cn as EventFeatureConfigOfVote2Validator,
|
|
2798
|
+
kn as EventFeatureConfigOfVoteValidator,
|
|
2799
|
+
Tn as EventFeatureConfigValidator,
|
|
2748
2800
|
rt as EventPeriodType,
|
|
2749
2801
|
at as EventPeriodTypeValidator,
|
|
2750
|
-
|
|
2802
|
+
b as EventRewardItemConfigValidator,
|
|
2751
2803
|
Qe as ExtraGameRewardValidator,
|
|
2752
2804
|
Ne as ExtraPhysicalShipmentValidator,
|
|
2753
|
-
|
|
2805
|
+
nn as FeatureRedeemItemConfigValidator,
|
|
2806
|
+
Vt as FeatureRewardValidator,
|
|
2754
2807
|
u as FeatureType,
|
|
2755
2808
|
ot as FeatureTypeValidator,
|
|
2756
|
-
|
|
2757
|
-
|
|
2809
|
+
$r as ForumMode,
|
|
2810
|
+
Fr as ForumModeValidator,
|
|
2758
2811
|
se as ForumValidator,
|
|
2759
2812
|
v as GamerItemType,
|
|
2760
2813
|
W as GamerItemTypeValidator,
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2814
|
+
Ce as Gender,
|
|
2815
|
+
Ve as GenderValidator,
|
|
2816
|
+
Ln as GiftCodeEngagementDataValidator,
|
|
2817
|
+
Sn as InviteEngagementDataValidator,
|
|
2765
2818
|
_t as LotteryDrawAction,
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2819
|
+
Ra as LotteryDrawActionValidator,
|
|
2820
|
+
$n as LotteryDrawEngagementDataValidator,
|
|
2821
|
+
Un as LotteryEngagementDataValidator,
|
|
2769
2822
|
w as LotteryTicketStatus,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2823
|
+
ka as LotteryTicketStatusValidator,
|
|
2824
|
+
y as NotificationBaseValidator,
|
|
2825
|
+
Dr as NotificationCategory,
|
|
2826
|
+
ja as NotificationCategoryValidator,
|
|
2827
|
+
Kr as NotificationCommentReplyValidator,
|
|
2828
|
+
Hr as NotificationCommentValidator,
|
|
2829
|
+
V as NotificationPayloadCommentValidator,
|
|
2777
2830
|
D as NotificationPayloadPostValidator,
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2831
|
+
A as NotificationPayloadReplyValidator,
|
|
2832
|
+
Nr as NotificationPayloadSystemValidator,
|
|
2833
|
+
Mr as NotificationPostCommentValidator,
|
|
2834
|
+
Br as NotificationPostValidator,
|
|
2835
|
+
zr as NotificationReplyRepliedValidator,
|
|
2836
|
+
Jr as NotificationReplyValidator,
|
|
2837
|
+
Qr as NotificationSystemValidator,
|
|
2785
2838
|
m as NotificationType,
|
|
2786
|
-
|
|
2787
|
-
|
|
2839
|
+
Ar as NotificationTypeValidator,
|
|
2840
|
+
Zr as NotificationValidator,
|
|
2788
2841
|
Ie as PlayerRoleCardValidator,
|
|
2789
2842
|
J as PlayerRoleValidator,
|
|
2790
|
-
|
|
2843
|
+
Ir as PostStatus,
|
|
2791
2844
|
ie as PostStatusValidator,
|
|
2792
2845
|
I as PostValidator,
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2846
|
+
Fn as PreregisterEngagementDataValidator,
|
|
2847
|
+
Or as PresignedUrlResponseValidator,
|
|
2848
|
+
In as QuestEngagementDataValidator,
|
|
2796
2849
|
it as QuestObjective,
|
|
2797
2850
|
te as QuestObjectiveValidator,
|
|
2798
2851
|
bt as QuestProgressAlgorithm,
|
|
2799
2852
|
yt as QuestProgressAlgorithmValidator,
|
|
2800
|
-
|
|
2801
|
-
|
|
2853
|
+
Dn as QuestProgressValidator,
|
|
2854
|
+
An as RedeemEngagementDataValidator,
|
|
2855
|
+
ya as RedeemParamsValidator,
|
|
2856
|
+
Gn as RedeemStocksResponseValidator,
|
|
2802
2857
|
Be as RedemptionValidator,
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2858
|
+
Ct as RegularRewardValidator,
|
|
2859
|
+
Gr as ReplyToValidator,
|
|
2860
|
+
C as ReplyValidator,
|
|
2861
|
+
fa as RewardItemType,
|
|
2807
2862
|
ee as RewardItemTypeValidator,
|
|
2808
2863
|
mt as RewardSource,
|
|
2809
2864
|
E as RewardSourceValidator,
|
|
2810
2865
|
d as RewardStatus,
|
|
2811
2866
|
ut as RewardStatusSuffix,
|
|
2812
2867
|
ne as RewardStatusSuffixValidator,
|
|
2813
|
-
|
|
2814
|
-
|
|
2868
|
+
wa as RewardStatusValidator,
|
|
2869
|
+
ar as RewardValidator,
|
|
2815
2870
|
Fe as RoleBaseInfoValidator,
|
|
2816
2871
|
$e as ServerBaseInfoValidator,
|
|
2817
|
-
|
|
2818
|
-
|
|
2872
|
+
On as ShareEngagementDataValidator,
|
|
2873
|
+
Qn as SurveyEngagementDataValidator,
|
|
2819
2874
|
pt as TeamAction,
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2875
|
+
va as TeamActionValidator,
|
|
2876
|
+
Mn as TeamEngagementDataValidator,
|
|
2877
|
+
Bn as TeamEngagementValidator,
|
|
2878
|
+
Ca as TeamMemberValidator,
|
|
2824
2879
|
dt as TeamVisibility,
|
|
2825
2880
|
gt as TeamVisibilityValidator,
|
|
2826
2881
|
F as TopicValidator,
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2882
|
+
zn as UgcCountResponseValidator,
|
|
2883
|
+
Kn as UgcEngagementDataValidator,
|
|
2884
|
+
Zn as UgcLeaderboardResponseValidator,
|
|
2885
|
+
Hn as UgcRecordResponseValidator,
|
|
2831
2886
|
kt as UgcReviewStatus,
|
|
2832
2887
|
vt as UgcReviewStatusValidator,
|
|
2833
2888
|
wt as UgcSocialMedia,
|
|
2834
2889
|
re as UgcSocialMediaValidator,
|
|
2835
|
-
|
|
2890
|
+
Jn as UgcUploadImageValidator,
|
|
2836
2891
|
$ as UserEngagementDataValidator,
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2892
|
+
ir as UserEngagementValidator,
|
|
2893
|
+
cr as UserFeatureStatusValidator,
|
|
2894
|
+
R as UserRewardValidator,
|
|
2895
|
+
sr as VerifyMobileResultValidator,
|
|
2896
|
+
Wn as Vote2ClaimRewardsResponseValidator,
|
|
2897
|
+
Yn as Vote2EngagementDataValidator,
|
|
2843
2898
|
ht as Vote2RewardType,
|
|
2844
2899
|
ft as Vote2RewardTypeValidator,
|
|
2845
|
-
|
|
2900
|
+
Xn as VoteEngagementDataValidator,
|
|
2846
2901
|
st as VoteOptionSource,
|
|
2847
2902
|
ct as VoteOptionSourceValidator,
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2903
|
+
qa as WeixinApi,
|
|
2904
|
+
Nn as WeixinSubscribeEngagementDataValidator,
|
|
2905
|
+
da as WeixinWebLoginErrorCode,
|
|
2906
|
+
nr as ZeroChatGPTDataValidator,
|
|
2907
|
+
ma as isWeixinSignResponse
|
|
2853
2908
|
};
|