@seayoo-web/gamer-api 2.13.21 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +332 -291
- package/package.json +3 -3
- package/types/src/event.d.ts +25 -0
- package/types/src/event.engage/engage.ugc.d.ts +3 -0
- package/types/src/event.guards.d.ts +6 -0
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
|
|
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 A } 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
|
+
}, Ce = {
|
|
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 la {
|
|
63
63
|
$NetRequest;
|
|
64
64
|
$idToken = "";
|
|
65
65
|
$weixinToken = "";
|
|
@@ -67,7 +67,7 @@ class sa {
|
|
|
67
67
|
req;
|
|
68
68
|
storage;
|
|
69
69
|
constructor(t, n) {
|
|
70
|
-
this.storage = _() ?
|
|
70
|
+
this.storage = _() ? Ce : 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 sa {
|
|
|
240
240
|
return n;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const Ve = {
|
|
244
244
|
/** 未知 */
|
|
245
245
|
Unknown: "unknown",
|
|
246
246
|
/** 男 */
|
|
247
247
|
Male: "male",
|
|
248
248
|
/** 女 */
|
|
249
249
|
Female: "female"
|
|
250
|
-
}, Re = e.string().enum(
|
|
250
|
+
}, Re = e.string().enum(Ve).lock(), je = {
|
|
251
251
|
/** 积分增加 */
|
|
252
252
|
Increase: "increase",
|
|
253
253
|
/** 积分减少 */
|
|
@@ -281,7 +281,7 @@ const Ce = {
|
|
|
281
281
|
Issued: "issued",
|
|
282
282
|
/** 发放失败 */
|
|
283
283
|
Failed: "failed"
|
|
284
|
-
},
|
|
284
|
+
}, Ue = e.string().enum(Se).lock(), Pe = e.object({
|
|
285
285
|
default_avatar_url: e.string(),
|
|
286
286
|
official_avatar_urls: e.array(e.string()),
|
|
287
287
|
default_nickname: e.string(),
|
|
@@ -353,12 +353,12 @@ const Ce = {
|
|
|
353
353
|
district: e.string(),
|
|
354
354
|
address: e.string(),
|
|
355
355
|
is_default: e.bool()
|
|
356
|
-
}).lock(),
|
|
356
|
+
}).lock(), Ge = e.object({
|
|
357
357
|
increased_credit: e.number(),
|
|
358
358
|
decreased_credit: e.number(),
|
|
359
359
|
expired_credit: e.number(),
|
|
360
360
|
balance_credit: e.number()
|
|
361
|
-
}).lock(),
|
|
361
|
+
}).lock(), Ae = e.object({
|
|
362
362
|
id: e.number(),
|
|
363
363
|
change_type: Te,
|
|
364
364
|
change_scene: xe,
|
|
@@ -401,9 +401,9 @@ const Ce = {
|
|
|
401
401
|
updated_at: e.number(),
|
|
402
402
|
redeemable_quantity: e.number().optional()
|
|
403
403
|
}).lock(), Oe = e.object({
|
|
404
|
-
...
|
|
404
|
+
...U(X.shape, "tag"),
|
|
405
405
|
product: Y.clone().optional()
|
|
406
|
-
}).lock(),
|
|
406
|
+
}).lock(), ma = e.union(
|
|
407
407
|
e.object({
|
|
408
408
|
server_id: e.string(),
|
|
409
409
|
role_id: e.string()
|
|
@@ -435,11 +435,11 @@ const Ce = {
|
|
|
435
435
|
catalog_name: e.string(),
|
|
436
436
|
quantity: e.number(),
|
|
437
437
|
amount: e.number(),
|
|
438
|
-
status:
|
|
438
|
+
status: Ue,
|
|
439
439
|
created_at: e.number(),
|
|
440
440
|
extra_data: e.union(Ne.clone(), Qe.clone()).satisfies().optional()
|
|
441
|
-
}), Me = e.guard(
|
|
442
|
-
credit_logs: e.array(
|
|
441
|
+
}), 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(Ge), Je = s({
|
|
442
|
+
credit_logs: e.array(Ae),
|
|
443
443
|
next_token: e.string().optional()
|
|
444
444
|
}), Ze = s({ products: e.array(Y) }), Xe = s({ benefits: e.array(X) }), Ye = s({ benefit: Oe }), We = s({
|
|
445
445
|
redemptions: e.array(Be),
|
|
@@ -449,7 +449,7 @@ const Ce = {
|
|
|
449
449
|
image_upload_url: e.string().optional(),
|
|
450
450
|
image_id: e.string()
|
|
451
451
|
});
|
|
452
|
-
class
|
|
452
|
+
class da {
|
|
453
453
|
token;
|
|
454
454
|
req;
|
|
455
455
|
constructor(t) {
|
|
@@ -757,7 +757,7 @@ const v = {
|
|
|
757
757
|
ExternalCode: "external_gift_code",
|
|
758
758
|
/** 空奖励 */
|
|
759
759
|
VoidItem: "void_item"
|
|
760
|
-
}, W = e.string().enum(v).lock(),
|
|
760
|
+
}, W = e.string().enum(v).lock(), ga = v, ee = W, tt = {
|
|
761
761
|
/** 世游通行证 ID / Combo ID */
|
|
762
762
|
UserId: "user_id",
|
|
763
763
|
/** 游戏角色 ID */
|
|
@@ -767,7 +767,7 @@ const v = {
|
|
|
767
767
|
Daily: "daily",
|
|
768
768
|
Weekly: "weekly",
|
|
769
769
|
Monthly: "monthly"
|
|
770
|
-
}, at = e.string().enum(rt).lock(),
|
|
770
|
+
}, at = e.string().enum(rt).lock(), u = {
|
|
771
771
|
/** 预约 */
|
|
772
772
|
Preregister: "preregister",
|
|
773
773
|
/** 抽奖 */
|
|
@@ -814,7 +814,7 @@ const v = {
|
|
|
814
814
|
Ugc: "ugc",
|
|
815
815
|
/** 投稿点赞 */
|
|
816
816
|
UgcLike: "ugc_like"
|
|
817
|
-
}, ot = e.string().enum(
|
|
817
|
+
}, ot = e.string().enum(u).lock(), it = {
|
|
818
818
|
/** 累计游戏内活跃值 */
|
|
819
819
|
Active: "player_active_points",
|
|
820
820
|
/** 累计登录,单位 人天 */
|
|
@@ -855,7 +855,7 @@ const v = {
|
|
|
855
855
|
Failed: "failed",
|
|
856
856
|
/** 奖励已发货 */
|
|
857
857
|
Delivered: "delivered"
|
|
858
|
-
},
|
|
858
|
+
}, pa = e.string().enum(d).lock(), ut = {
|
|
859
859
|
/** 奖励未领取 */
|
|
860
860
|
Unclaimed: d.Unclaimed,
|
|
861
861
|
/** 奖励已领取 */
|
|
@@ -864,7 +864,7 @@ const v = {
|
|
|
864
864
|
Failed: d.Failed,
|
|
865
865
|
/** 奖励已发货 */
|
|
866
866
|
Delivered: d.Delivered
|
|
867
|
-
}, ne = e.string().enum(
|
|
867
|
+
}, ne = e.string().enum(ut).lock(), lt = {
|
|
868
868
|
/** 未获得奖励 */
|
|
869
869
|
Ineligible: d.Ineligible,
|
|
870
870
|
/** 奖励未领取 */
|
|
@@ -875,7 +875,7 @@ const v = {
|
|
|
875
875
|
Failed: d.Failed,
|
|
876
876
|
/** 奖励已发货 */
|
|
877
877
|
Delivered: d.Delivered
|
|
878
|
-
},
|
|
878
|
+
}, P = e.string().enum(lt).lock(), mt = {
|
|
879
879
|
/** 玩法产出奖励 */
|
|
880
880
|
Output: "output",
|
|
881
881
|
/** 玩法参与奖励 */
|
|
@@ -896,7 +896,7 @@ const v = {
|
|
|
896
896
|
Claimed: "claimed",
|
|
897
897
|
/** 领奖失败 */
|
|
898
898
|
Fail: "fail"
|
|
899
|
-
},
|
|
899
|
+
}, _a = e.string().enum(w).lock(), pt = {
|
|
900
900
|
/** 发起组队 */
|
|
901
901
|
Assemble: "assemble",
|
|
902
902
|
/** 加入队伍 */
|
|
@@ -907,14 +907,14 @@ const v = {
|
|
|
907
907
|
ChangeVisibility: "change_visibility",
|
|
908
908
|
/** 查询组队信息 */
|
|
909
909
|
Query: "query"
|
|
910
|
-
},
|
|
910
|
+
}, ba = e.string().enum(pt).lock(), _t = {
|
|
911
911
|
/** 查询抽奖券 */
|
|
912
912
|
Query: "query",
|
|
913
913
|
/** 开奖 */
|
|
914
914
|
Draw: "draw",
|
|
915
915
|
/** 领奖 */
|
|
916
916
|
Claim: "claim"
|
|
917
|
-
},
|
|
917
|
+
}, ya = e.string().enum(_t).lock(), bt = {
|
|
918
918
|
/** 将所有队员的进度值求和,作为队伍进度值 */
|
|
919
919
|
Sum: "sum",
|
|
920
920
|
/** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
|
|
@@ -948,15 +948,15 @@ const v = {
|
|
|
948
948
|
Accepted: "accepted",
|
|
949
949
|
/** 已拒绝 */
|
|
950
950
|
Rejected: "rejected"
|
|
951
|
-
}, vt = e.string().enum(kt).lock(),
|
|
951
|
+
}, vt = e.string().enum(kt).lock(), Ct = e.string().enum(v), y = e.object({
|
|
952
952
|
reward_item_id: e.number(),
|
|
953
953
|
reward_amount: e.number(),
|
|
954
954
|
reward_item_name: e.string(),
|
|
955
955
|
reward_item_icon_url: e.string(),
|
|
956
956
|
reward_item_desc: e.string().optional(),
|
|
957
|
-
reward_item_type:
|
|
957
|
+
reward_item_type: Ct,
|
|
958
958
|
reward_item_rating: e.number()
|
|
959
|
-
}).lock(),
|
|
959
|
+
}).lock(), Vt = e.object({
|
|
960
960
|
engage_count: e.number(),
|
|
961
961
|
rewards: e.array(y)
|
|
962
962
|
}).lock(), Rt = e.union(
|
|
@@ -966,9 +966,9 @@ const v = {
|
|
|
966
966
|
}),
|
|
967
967
|
e.object({
|
|
968
968
|
feature_reward_type: e.string().enum("regular"),
|
|
969
|
-
reward_details: e.array(
|
|
969
|
+
reward_details: e.array(Vt)
|
|
970
970
|
})
|
|
971
|
-
).satisfies().lock(),
|
|
971
|
+
).satisfies().lock(), l = e.object({
|
|
972
972
|
feature_name: e.string(),
|
|
973
973
|
feature_id: e.number(),
|
|
974
974
|
description: e.string(),
|
|
@@ -980,8 +980,8 @@ const v = {
|
|
|
980
980
|
engage_account: nt,
|
|
981
981
|
feature_rewards: Rt.clone().optional(),
|
|
982
982
|
sort: e.number().optional()
|
|
983
|
-
}), jt =
|
|
984
|
-
...
|
|
983
|
+
}), jt = u.Cashback, Tt = e.object({
|
|
984
|
+
...l.shape,
|
|
985
985
|
feature_type: e.string().enum(jt),
|
|
986
986
|
config: e.object({
|
|
987
987
|
order_start_time: e.number(),
|
|
@@ -989,24 +989,24 @@ const v = {
|
|
|
989
989
|
claim_rewards_start_time: e.number(),
|
|
990
990
|
claim_rewards_end_time: e.number()
|
|
991
991
|
})
|
|
992
|
-
}), qt =
|
|
993
|
-
...
|
|
992
|
+
}), qt = u.CheckIn, xt = e.object({
|
|
993
|
+
...l.shape,
|
|
994
994
|
feature_type: e.string().enum(qt)
|
|
995
|
-
}), Lt =
|
|
996
|
-
...
|
|
995
|
+
}), Lt = u.ClaimActivationKey, St = e.object({
|
|
996
|
+
...l.shape,
|
|
997
997
|
feature_type: e.string().enum(Lt)
|
|
998
|
-
}),
|
|
999
|
-
...
|
|
1000
|
-
feature_type: e.string().enum(
|
|
1001
|
-
}), Et =
|
|
1002
|
-
...
|
|
998
|
+
}), Ut = u.ClaimRewards, Pt = e.object({
|
|
999
|
+
...l.shape,
|
|
1000
|
+
feature_type: e.string().enum(Ut)
|
|
1001
|
+
}), Et = u.Comment, $t = e.object({
|
|
1002
|
+
...l.shape,
|
|
1003
1003
|
feature_type: e.string().enum(Et),
|
|
1004
1004
|
config: e.object({
|
|
1005
1005
|
comments: e.array(e.string()),
|
|
1006
1006
|
send_rate: e.number()
|
|
1007
1007
|
})
|
|
1008
|
-
}), Ft =
|
|
1009
|
-
...
|
|
1008
|
+
}), Ft = u.Follow, It = e.object({
|
|
1009
|
+
...l.shape,
|
|
1010
1010
|
feature_type: e.string().enum(Ft),
|
|
1011
1011
|
config: e.object({
|
|
1012
1012
|
platform: e.string(),
|
|
@@ -1015,28 +1015,28 @@ const v = {
|
|
|
1015
1015
|
qr_code_url: e.string().optional(),
|
|
1016
1016
|
platform_desc: e.string().optional()
|
|
1017
1017
|
})
|
|
1018
|
-
}), Dt =
|
|
1018
|
+
}), Dt = u.GiftCode, Gt = e.object({
|
|
1019
1019
|
name: e.string(),
|
|
1020
1020
|
icon_url: e.string(),
|
|
1021
1021
|
count: e.number()
|
|
1022
|
-
}),
|
|
1023
|
-
...
|
|
1022
|
+
}), At = e.object({
|
|
1023
|
+
...l.shape,
|
|
1024
1024
|
feature_type: e.string().enum(Dt),
|
|
1025
1025
|
config: e.object({
|
|
1026
|
-
gift_items: e.array(
|
|
1026
|
+
gift_items: e.array(Gt),
|
|
1027
1027
|
mp_url: e.string().optional(),
|
|
1028
1028
|
mp_qrcode_url: e.string().optional()
|
|
1029
1029
|
})
|
|
1030
|
-
}), Ot =
|
|
1031
|
-
...
|
|
1030
|
+
}), Ot = u.Invite, Nt = e.object({
|
|
1031
|
+
...l.shape,
|
|
1032
1032
|
feature_type: e.string().enum(Ot),
|
|
1033
1033
|
config: e.object({
|
|
1034
1034
|
share_url: e.string()
|
|
1035
1035
|
})
|
|
1036
|
-
}), Qt =
|
|
1037
|
-
...
|
|
1036
|
+
}), Qt = u.InvitedRegister, Bt = e.object({
|
|
1037
|
+
...l.shape,
|
|
1038
1038
|
feature_type: e.string().enum(Qt)
|
|
1039
|
-
}), Mt = e.string().enum(
|
|
1039
|
+
}), Mt = e.string().enum(U(v, "GiftCode", "LotteryTicket")), Kt = u.Lottery, Ht = e.object({
|
|
1040
1040
|
reward_item_id: e.number(),
|
|
1041
1041
|
reward_item_name: e.string(),
|
|
1042
1042
|
reward_item_type: Mt,
|
|
@@ -1046,7 +1046,7 @@ const v = {
|
|
|
1046
1046
|
reward_remaining_stock: e.number(),
|
|
1047
1047
|
reward_item_rating: e.number()
|
|
1048
1048
|
}), zt = e.object({
|
|
1049
|
-
...
|
|
1049
|
+
...l.shape,
|
|
1050
1050
|
feature_type: e.string().enum(Kt),
|
|
1051
1051
|
config: e.object({
|
|
1052
1052
|
consume_item_id: e.number(),
|
|
@@ -1056,18 +1056,18 @@ const v = {
|
|
|
1056
1056
|
consume_item_desc: e.string().optional(),
|
|
1057
1057
|
rewards: e.array(Ht)
|
|
1058
1058
|
})
|
|
1059
|
-
}), Jt =
|
|
1060
|
-
...
|
|
1059
|
+
}), Jt = u.LotteryDraw, Zt = e.object({
|
|
1060
|
+
...l.shape,
|
|
1061
1061
|
feature_type: e.string().enum(Jt),
|
|
1062
1062
|
config: e.object({
|
|
1063
1063
|
draw_not_before: e.number(),
|
|
1064
1064
|
draw_not_after: e.number()
|
|
1065
1065
|
})
|
|
1066
|
-
}), Xt =
|
|
1067
|
-
...
|
|
1066
|
+
}), Xt = u.Preregister, Yt = e.object({
|
|
1067
|
+
...l.shape,
|
|
1068
1068
|
feature_type: e.string().enum(Xt)
|
|
1069
|
-
}), Wt =
|
|
1070
|
-
...
|
|
1069
|
+
}), Wt = u.Quest, en = e.object({
|
|
1070
|
+
...l.shape,
|
|
1071
1071
|
feature_type: e.string().enum(Wt),
|
|
1072
1072
|
config: e.object({
|
|
1073
1073
|
objective: te,
|
|
@@ -1085,51 +1085,51 @@ const v = {
|
|
|
1085
1085
|
event_item_id: e.number().optional()
|
|
1086
1086
|
}).optional()
|
|
1087
1087
|
})
|
|
1088
|
-
}), tn =
|
|
1089
|
-
...
|
|
1088
|
+
}), tn = u.Register, nn = e.object({
|
|
1089
|
+
...l.shape,
|
|
1090
1090
|
feature_type: e.string().enum(tn)
|
|
1091
|
-
}), rn =
|
|
1092
|
-
...
|
|
1091
|
+
}), rn = u.Share, an = e.object({
|
|
1092
|
+
...l.shape,
|
|
1093
1093
|
feature_type: e.string().enum(rn),
|
|
1094
1094
|
config: e.object({
|
|
1095
1095
|
share_platform: e.string(),
|
|
1096
1096
|
jump_url: e.string().optional(),
|
|
1097
1097
|
icon_url: e.string().optional()
|
|
1098
1098
|
})
|
|
1099
|
-
}), on =
|
|
1100
|
-
...
|
|
1099
|
+
}), on = u.Subscribe, sn = e.object({
|
|
1100
|
+
...l.shape,
|
|
1101
1101
|
feature_type: e.string().enum(on),
|
|
1102
1102
|
config: e.object({
|
|
1103
1103
|
weixin_template_ids: e.array(e.string())
|
|
1104
1104
|
})
|
|
1105
|
-
}), cn =
|
|
1106
|
-
...
|
|
1105
|
+
}), cn = u.Survey, un = e.object({
|
|
1106
|
+
...l.shape,
|
|
1107
1107
|
feature_type: e.string().enum(cn),
|
|
1108
1108
|
config: e.object({
|
|
1109
1109
|
survey_id: e.string(),
|
|
1110
1110
|
survey_url: e.string()
|
|
1111
1111
|
})
|
|
1112
|
-
}),
|
|
1113
|
-
...
|
|
1114
|
-
feature_type: e.string().enum(
|
|
1112
|
+
}), ln = u.Team, mn = e.object({
|
|
1113
|
+
...l.shape,
|
|
1114
|
+
feature_type: e.string().enum(ln),
|
|
1115
1115
|
config: e.object({
|
|
1116
1116
|
max_members: e.number().min(1),
|
|
1117
1117
|
min_members: e.number().min(1)
|
|
1118
1118
|
})
|
|
1119
|
-
}), dn =
|
|
1120
|
-
...
|
|
1119
|
+
}), dn = u.Ugc, gn = e.object({
|
|
1120
|
+
...l.shape,
|
|
1121
1121
|
feature_type: e.string().enum(dn),
|
|
1122
1122
|
config: e.object({
|
|
1123
1123
|
allowed_social_medias: e.array(e.string()).optional(),
|
|
1124
1124
|
acceptance_rewards: e.array(y).optional()
|
|
1125
1125
|
})
|
|
1126
|
-
}), pn =
|
|
1127
|
-
...
|
|
1126
|
+
}), pn = u.UgcLike, _n = e.object({
|
|
1127
|
+
...l.shape,
|
|
1128
1128
|
feature_type: e.string().enum(pn),
|
|
1129
1129
|
config: e.object({
|
|
1130
1130
|
ugc_feature_id: e.number()
|
|
1131
1131
|
})
|
|
1132
|
-
}), bn =
|
|
1132
|
+
}), bn = u.Vote, yn = e.object({
|
|
1133
1133
|
sn: e.string(),
|
|
1134
1134
|
name: e.string(),
|
|
1135
1135
|
img_urls: e.array(e.string()).optional(),
|
|
@@ -1140,7 +1140,7 @@ const v = {
|
|
|
1140
1140
|
finalists: e.bool(),
|
|
1141
1141
|
last_vote_time: e.number()
|
|
1142
1142
|
}), hn = e.object({
|
|
1143
|
-
...
|
|
1143
|
+
...l.shape,
|
|
1144
1144
|
feature_type: e.string().enum(bn),
|
|
1145
1145
|
config: e.object({
|
|
1146
1146
|
vote_feature_ids: e.array(e.number()),
|
|
@@ -1150,7 +1150,7 @@ const v = {
|
|
|
1150
1150
|
options: e.array(yn),
|
|
1151
1151
|
rewards: e.array(y)
|
|
1152
1152
|
})
|
|
1153
|
-
}), fn =
|
|
1153
|
+
}), fn = u.Vote2, wn = e.object({
|
|
1154
1154
|
candidate_id: e.string(),
|
|
1155
1155
|
display_name: e.string(),
|
|
1156
1156
|
images: e.array(e.string()).optional(),
|
|
@@ -1158,7 +1158,7 @@ const v = {
|
|
|
1158
1158
|
description: e.string().optional(),
|
|
1159
1159
|
jump_url: e.string()
|
|
1160
1160
|
}), kn = e.object({
|
|
1161
|
-
...
|
|
1161
|
+
...l.shape,
|
|
1162
1162
|
feature_type: e.string().enum(fn),
|
|
1163
1163
|
config: e.object({
|
|
1164
1164
|
vote_item_id: e.number().optional(),
|
|
@@ -1170,16 +1170,16 @@ const v = {
|
|
|
1170
1170
|
winner_rewards: e.array(y).optional(),
|
|
1171
1171
|
consolation_rewards: e.array(y).optional()
|
|
1172
1172
|
})
|
|
1173
|
-
}), vn =
|
|
1174
|
-
...
|
|
1173
|
+
}), vn = u.ZeroChatgpt, Cn = e.object({
|
|
1174
|
+
...l.shape,
|
|
1175
1175
|
feature_type: e.string().enum(vn)
|
|
1176
|
-
}),
|
|
1176
|
+
}), Vn = e.union(
|
|
1177
1177
|
Tt,
|
|
1178
1178
|
xt,
|
|
1179
|
-
|
|
1179
|
+
Pt,
|
|
1180
1180
|
$t,
|
|
1181
1181
|
It,
|
|
1182
|
-
|
|
1182
|
+
At,
|
|
1183
1183
|
Nt,
|
|
1184
1184
|
Bt,
|
|
1185
1185
|
zt,
|
|
@@ -1189,12 +1189,12 @@ const v = {
|
|
|
1189
1189
|
nn,
|
|
1190
1190
|
an,
|
|
1191
1191
|
sn,
|
|
1192
|
-
|
|
1192
|
+
un,
|
|
1193
1193
|
mn,
|
|
1194
1194
|
hn,
|
|
1195
1195
|
kn,
|
|
1196
1196
|
St,
|
|
1197
|
-
|
|
1197
|
+
Cn,
|
|
1198
1198
|
gn,
|
|
1199
1199
|
_n
|
|
1200
1200
|
).key("feature_type").satisfies(), Rn = e.object({
|
|
@@ -1203,7 +1203,7 @@ const v = {
|
|
|
1203
1203
|
since: e.number(),
|
|
1204
1204
|
until: e.number(),
|
|
1205
1205
|
visit_count: e.number().optional(),
|
|
1206
|
-
features: e.array(
|
|
1206
|
+
features: e.array(Vn)
|
|
1207
1207
|
}).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), ae = e.object({
|
|
1208
1208
|
order_total_amount: q,
|
|
1209
1209
|
cashback_total_amount: q,
|
|
@@ -1218,7 +1218,7 @@ const v = {
|
|
|
1218
1218
|
avatar_url: e.string().optional()
|
|
1219
1219
|
}), xn = e.object({
|
|
1220
1220
|
lottery_count: e.number()
|
|
1221
|
-
}),
|
|
1221
|
+
}), C = e.object({
|
|
1222
1222
|
reward_id: e.number(),
|
|
1223
1223
|
reward_item_id: e.number(),
|
|
1224
1224
|
reward_source: E,
|
|
@@ -1228,7 +1228,7 @@ const v = {
|
|
|
1228
1228
|
reward_item_desc: e.string().optional(),
|
|
1229
1229
|
reward_item_rating: e.number(),
|
|
1230
1230
|
reward_amount: e.number(),
|
|
1231
|
-
reward_status:
|
|
1231
|
+
reward_status: P,
|
|
1232
1232
|
event_id: e.number(),
|
|
1233
1233
|
event_name: e.string(),
|
|
1234
1234
|
feature_id: e.number(),
|
|
@@ -1243,12 +1243,12 @@ const v = {
|
|
|
1243
1243
|
}),
|
|
1244
1244
|
e.object({
|
|
1245
1245
|
ticket: e.string(),
|
|
1246
|
-
status: e.string().enum(
|
|
1247
|
-
reward:
|
|
1246
|
+
status: e.string().enum(U(w, "Unknown", "Pending")),
|
|
1247
|
+
reward: C
|
|
1248
1248
|
})
|
|
1249
|
-
).satisfies(),
|
|
1249
|
+
).satisfies(), Un = e.object({
|
|
1250
1250
|
tickets: e.array(Sn)
|
|
1251
|
-
}),
|
|
1251
|
+
}), Pn = e.object({
|
|
1252
1252
|
platforms: e.array(e.string())
|
|
1253
1253
|
}), oe = e.object({
|
|
1254
1254
|
role_name: e.string(),
|
|
@@ -1276,16 +1276,16 @@ const v = {
|
|
|
1276
1276
|
weixin_openid: e.string()
|
|
1277
1277
|
}), Dn = e.object({
|
|
1278
1278
|
serial_number: e.number()
|
|
1279
|
-
}),
|
|
1279
|
+
}), Gn = e.object({
|
|
1280
1280
|
team_code: e.string(),
|
|
1281
1281
|
leader_name: e.string(),
|
|
1282
1282
|
total_members: e.number()
|
|
1283
|
-
}),
|
|
1283
|
+
}), ha = e.object({
|
|
1284
1284
|
is_leader: e.bool(),
|
|
1285
1285
|
is_myself: e.bool().optional(),
|
|
1286
1286
|
role_name: e.string(),
|
|
1287
1287
|
server_name: e.string()
|
|
1288
|
-
}),
|
|
1288
|
+
}), An = e.object({
|
|
1289
1289
|
team_code: e.string(),
|
|
1290
1290
|
visibility: gt,
|
|
1291
1291
|
members: e.array(
|
|
@@ -1325,10 +1325,12 @@ const v = {
|
|
|
1325
1325
|
).optional(),
|
|
1326
1326
|
next_token: e.string().optional()
|
|
1327
1327
|
}), Qn = e.object({
|
|
1328
|
+
total_count: e.number()
|
|
1329
|
+
}), Bn = e.object({
|
|
1328
1330
|
existed: e.bool(),
|
|
1329
1331
|
upload_url: e.string().optional(),
|
|
1330
1332
|
image_url: e.string()
|
|
1331
|
-
}),
|
|
1333
|
+
}), Mn = e.object({
|
|
1332
1334
|
ugcs: e.array(
|
|
1333
1335
|
e.object({
|
|
1334
1336
|
ugc_id: e.number(),
|
|
@@ -1341,27 +1343,27 @@ const v = {
|
|
|
1341
1343
|
role_name: e.string().optional()
|
|
1342
1344
|
})
|
|
1343
1345
|
).optional()
|
|
1344
|
-
}), Mn = e.object({
|
|
1345
|
-
option_sn: e.string()
|
|
1346
1346
|
}), Kn = e.object({
|
|
1347
|
+
option_sn: e.string()
|
|
1348
|
+
}), Hn = e.object({
|
|
1347
1349
|
candidate_id: e.string(),
|
|
1348
1350
|
total_votes: e.number().optional(),
|
|
1349
1351
|
my_votes: e.number().optional(),
|
|
1350
1352
|
votes: e.number().optional()
|
|
1351
|
-
}), Hn = e.object({
|
|
1352
|
-
rewards_type: ft,
|
|
1353
|
-
rewards: e.array(V).optional()
|
|
1354
1353
|
}), zn = e.object({
|
|
1354
|
+
rewards_type: ft,
|
|
1355
|
+
rewards: e.array(C).optional()
|
|
1356
|
+
}), Jn = e.object({
|
|
1355
1357
|
candidate_id: e.string(),
|
|
1356
1358
|
is_winner: e.bool(),
|
|
1357
1359
|
total_votes: e.number(),
|
|
1358
1360
|
my_votes: e.number()
|
|
1359
|
-
}),
|
|
1361
|
+
}), Zn = e.object({
|
|
1360
1362
|
role: e.string(),
|
|
1361
1363
|
content: e.string()
|
|
1362
|
-
}), Zn = e.object({
|
|
1363
|
-
conversations: e.array(Jn)
|
|
1364
1364
|
}), Xn = e.object({
|
|
1365
|
+
conversations: e.array(Zn)
|
|
1366
|
+
}), Yn = e.object({
|
|
1365
1367
|
user_id: e.string(),
|
|
1366
1368
|
name: e.string(),
|
|
1367
1369
|
avatar_url: e.string(),
|
|
@@ -1369,27 +1371,27 @@ const v = {
|
|
|
1369
1371
|
video_note: e.number(),
|
|
1370
1372
|
created_at: e.number()
|
|
1371
1373
|
}), $ = e.union(
|
|
1372
|
-
|
|
1374
|
+
Pn,
|
|
1373
1375
|
xn,
|
|
1374
1376
|
Dn,
|
|
1375
1377
|
qn,
|
|
1376
1378
|
Fn,
|
|
1377
|
-
Mn,
|
|
1378
1379
|
Kn,
|
|
1380
|
+
Hn,
|
|
1379
1381
|
In,
|
|
1380
1382
|
ae,
|
|
1381
1383
|
Tn,
|
|
1382
|
-
|
|
1384
|
+
An,
|
|
1383
1385
|
En,
|
|
1384
|
-
|
|
1386
|
+
Un,
|
|
1385
1387
|
jn,
|
|
1386
|
-
|
|
1388
|
+
Xn,
|
|
1387
1389
|
On,
|
|
1388
1390
|
e.custom(
|
|
1389
1391
|
"EmptyObject",
|
|
1390
1392
|
(i) => h(i) && Object.keys(i).length === 0
|
|
1391
1393
|
)
|
|
1392
|
-
).satisfies().lock(),
|
|
1394
|
+
).satisfies().lock(), Wn = e.object({
|
|
1393
1395
|
reward_id: e.number(),
|
|
1394
1396
|
reward_item_id: e.number(),
|
|
1395
1397
|
reward_item_type: ee,
|
|
@@ -1402,7 +1404,7 @@ const v = {
|
|
|
1402
1404
|
reward_item_rating: e.number(),
|
|
1403
1405
|
receive_time: e.number(),
|
|
1404
1406
|
extra_data: e.union(...$.validators, e.record(e.unknown())).satisfies().optional()
|
|
1405
|
-
}),
|
|
1407
|
+
}), er = e.object({
|
|
1406
1408
|
reward_id: e.number(),
|
|
1407
1409
|
reward_item_id: e.number(),
|
|
1408
1410
|
reward_item_name: e.string(),
|
|
@@ -1414,7 +1416,7 @@ const v = {
|
|
|
1414
1416
|
reward_status: ne,
|
|
1415
1417
|
reward_source: E,
|
|
1416
1418
|
extra_data: e.record(e.unknown()).optional()
|
|
1417
|
-
}),
|
|
1419
|
+
}), tr = e.object({
|
|
1418
1420
|
engagement_id: e.number(),
|
|
1419
1421
|
user_id: e.string(),
|
|
1420
1422
|
event_id: e.number(),
|
|
@@ -1424,18 +1426,18 @@ const v = {
|
|
|
1424
1426
|
server_id: e.string().optional(),
|
|
1425
1427
|
role_id: e.string().optional(),
|
|
1426
1428
|
created_at: e.number(),
|
|
1427
|
-
rewards: e.array(
|
|
1428
|
-
}).lock(),
|
|
1429
|
+
rewards: e.array(Wn).optional()
|
|
1430
|
+
}).lock(), nr = e.object({
|
|
1429
1431
|
allowed: e.bool(),
|
|
1430
1432
|
registered: e.bool()
|
|
1431
|
-
}),
|
|
1433
|
+
}), rr = e.object({
|
|
1432
1434
|
feature_id: e.number(),
|
|
1433
1435
|
can_engage: e.bool(),
|
|
1434
1436
|
has_unclaimed_rewards: e.bool(),
|
|
1435
1437
|
final_available_count: e.number(),
|
|
1436
1438
|
total_remaining_engagements: e.number(),
|
|
1437
1439
|
cycle_remaining_engagements: e.number()
|
|
1438
|
-
}),
|
|
1440
|
+
}), ar = e.object({
|
|
1439
1441
|
engagement_id: e.number(),
|
|
1440
1442
|
engagement: e.object({
|
|
1441
1443
|
engagement_id: e.number(),
|
|
@@ -1443,41 +1445,43 @@ const v = {
|
|
|
1443
1445
|
feature_id: e.number(),
|
|
1444
1446
|
data: $.clone().optional()
|
|
1445
1447
|
}).optional(),
|
|
1446
|
-
rewards: e.array(
|
|
1448
|
+
rewards: e.array(er).optional(),
|
|
1447
1449
|
scan: e.bool().optional()
|
|
1448
|
-
}),
|
|
1450
|
+
}), or = e.object({
|
|
1449
1451
|
reward_id: e.number(),
|
|
1450
|
-
reward_status:
|
|
1451
|
-
}),
|
|
1452
|
-
engagements: e.union(e.array(
|
|
1452
|
+
reward_status: P
|
|
1453
|
+
}), ir = e.guard(Rn), sr = e.guard(nr), x = s({ count: e.number() }), cr = s({ first_visit: e.bool() }), ur = s({
|
|
1454
|
+
engagements: e.union(e.array(Yn), e.array(Gn))
|
|
1453
1455
|
}), lr = s({
|
|
1454
|
-
status: e.array(
|
|
1455
|
-
}), ur = s({
|
|
1456
|
-
engagements_counts: e.record(e.number())
|
|
1456
|
+
status: e.array(rr)
|
|
1457
1457
|
}), mr = s({
|
|
1458
|
-
|
|
1458
|
+
engagements_counts: e.record(e.number())
|
|
1459
|
+
}), dr = s({
|
|
1460
|
+
engagements: e.array(tr),
|
|
1459
1461
|
next_token: e.string().optional()
|
|
1460
|
-
}),
|
|
1461
|
-
claimed_items: e.array(
|
|
1462
|
-
}), pr = s({
|
|
1463
|
-
rewards: e.array(V)
|
|
1462
|
+
}), gr = e.guard(ar), pr = s({
|
|
1463
|
+
claimed_items: e.array(or)
|
|
1464
1464
|
}), _r = s({
|
|
1465
|
-
|
|
1465
|
+
rewards: e.array(C)
|
|
1466
1466
|
}), br = s({
|
|
1467
|
-
|
|
1468
|
-
next_token: e.string().optional()
|
|
1467
|
+
reward_status: P
|
|
1469
1468
|
}), yr = s({
|
|
1470
|
-
|
|
1469
|
+
user_rewards: e.array(C),
|
|
1470
|
+
next_token: e.string().optional()
|
|
1471
1471
|
}), hr = s({
|
|
1472
|
-
|
|
1472
|
+
unclaimed: e.number()
|
|
1473
1473
|
}), fr = s({
|
|
1474
|
+
scene: e.string()
|
|
1475
|
+
}), wr = s({
|
|
1476
|
+
params: e.string()
|
|
1477
|
+
}), kr = s({
|
|
1474
1478
|
img: e.string()
|
|
1475
|
-
}),
|
|
1479
|
+
}), vr = e.guard($n), Cr = e.guard(zn), Vr = e.guard(
|
|
1476
1480
|
e.object({
|
|
1477
|
-
candidate_votes: e.array(
|
|
1481
|
+
candidate_votes: e.array(Jn)
|
|
1478
1482
|
})
|
|
1479
|
-
),
|
|
1480
|
-
class
|
|
1483
|
+
), Rr = e.guard(ae), M = e.guard(Nn), jr = e.guard(Qn), Tr = e.guard(Bn), qr = e.guard(Mn);
|
|
1484
|
+
class fa {
|
|
1481
1485
|
token;
|
|
1482
1486
|
event = 0;
|
|
1483
1487
|
req;
|
|
@@ -1490,7 +1494,7 @@ class ba {
|
|
|
1490
1494
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1491
1495
|
*/
|
|
1492
1496
|
async verifyMobileAllowed(t, n, r) {
|
|
1493
|
-
const { data: a } = await this.req.get("verify-mobile-allowed",
|
|
1497
|
+
const { data: a } = await this.req.get("verify-mobile-allowed", sr, {
|
|
1494
1498
|
...r,
|
|
1495
1499
|
params: { game_id: t, mobile: n }
|
|
1496
1500
|
});
|
|
@@ -1502,7 +1506,7 @@ class ba {
|
|
|
1502
1506
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1503
1507
|
*/
|
|
1504
1508
|
async getConfig(t) {
|
|
1505
|
-
const { data: n } = await this.req.get(`event/${this.event}/event-config`,
|
|
1509
|
+
const { data: n } = await this.req.get(`event/${this.event}/event-config`, ir, t);
|
|
1506
1510
|
return n;
|
|
1507
1511
|
}
|
|
1508
1512
|
/**
|
|
@@ -1537,7 +1541,7 @@ class ba {
|
|
|
1537
1541
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1538
1542
|
*/
|
|
1539
1543
|
async getEngagements(t, n) {
|
|
1540
|
-
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`,
|
|
1544
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, ur, {
|
|
1541
1545
|
...n,
|
|
1542
1546
|
params: { feature_id: t }
|
|
1543
1547
|
});
|
|
@@ -1553,7 +1557,7 @@ class ba {
|
|
|
1553
1557
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1554
1558
|
`event/${this.event}/visit`,
|
|
1555
1559
|
c(t || {}),
|
|
1556
|
-
|
|
1560
|
+
cr,
|
|
1557
1561
|
n
|
|
1558
1562
|
);
|
|
1559
1563
|
return r ?? {
|
|
@@ -1584,7 +1588,7 @@ class ba {
|
|
|
1584
1588
|
*/
|
|
1585
1589
|
async getUserEngagementCount(t, n) {
|
|
1586
1590
|
if (!await this.token.autoLogin()) return {};
|
|
1587
|
-
const { data: r } = await this.req.get("event/user-engagements-count",
|
|
1591
|
+
const { data: r } = await this.req.get("event/user-engagements-count", mr, {
|
|
1588
1592
|
message: !1,
|
|
1589
1593
|
params: c({ ...n, event_id: this.event, feature_id: t })
|
|
1590
1594
|
});
|
|
@@ -1603,7 +1607,7 @@ class ba {
|
|
|
1603
1607
|
engagements: [],
|
|
1604
1608
|
next_token: ""
|
|
1605
1609
|
};
|
|
1606
|
-
const { data: a } = await this.req.get("event/user-engagements",
|
|
1610
|
+
const { data: a } = await this.req.get("event/user-engagements", dr, {
|
|
1607
1611
|
...r,
|
|
1608
1612
|
params: c({
|
|
1609
1613
|
max_results: 20,
|
|
@@ -1635,7 +1639,7 @@ class ba {
|
|
|
1635
1639
|
engagement: n,
|
|
1636
1640
|
...r
|
|
1637
1641
|
}),
|
|
1638
|
-
|
|
1642
|
+
gr,
|
|
1639
1643
|
a
|
|
1640
1644
|
);
|
|
1641
1645
|
return o ?? {
|
|
@@ -1658,7 +1662,7 @@ class ba {
|
|
|
1658
1662
|
...t,
|
|
1659
1663
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1660
1664
|
}),
|
|
1661
|
-
|
|
1665
|
+
pr,
|
|
1662
1666
|
n
|
|
1663
1667
|
);
|
|
1664
1668
|
return r?.claimed_items || {
|
|
@@ -1679,7 +1683,7 @@ class ba {
|
|
|
1679
1683
|
...t,
|
|
1680
1684
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1681
1685
|
}),
|
|
1682
|
-
|
|
1686
|
+
_r,
|
|
1683
1687
|
n
|
|
1684
1688
|
);
|
|
1685
1689
|
return r?.rewards || {
|
|
@@ -1697,7 +1701,7 @@ class ba {
|
|
|
1697
1701
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1698
1702
|
"event/claim-weixin-hongbao",
|
|
1699
1703
|
{ reward_id: t },
|
|
1700
|
-
|
|
1704
|
+
br,
|
|
1701
1705
|
n
|
|
1702
1706
|
);
|
|
1703
1707
|
return r || {
|
|
@@ -1738,7 +1742,7 @@ class ba {
|
|
|
1738
1742
|
const { data: r } = await this.req.post(
|
|
1739
1743
|
"event/user-rewards",
|
|
1740
1744
|
c({ max_results: 20, ...t, event_id: this.event }),
|
|
1741
|
-
|
|
1745
|
+
yr,
|
|
1742
1746
|
n
|
|
1743
1747
|
);
|
|
1744
1748
|
return {
|
|
@@ -1746,6 +1750,24 @@ class ba {
|
|
|
1746
1750
|
next_token: r?.next_token || ""
|
|
1747
1751
|
};
|
|
1748
1752
|
}
|
|
1753
|
+
/**
|
|
1754
|
+
* 查询用户奖励数量,目前仅返回未领取的奖励数量
|
|
1755
|
+
*
|
|
1756
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=jrFbyZ3UWN
|
|
1757
|
+
*/
|
|
1758
|
+
async getUserRewardsCount(t, n) {
|
|
1759
|
+
if (!await this.token.autoLogin())
|
|
1760
|
+
return {
|
|
1761
|
+
unclaimed: 0
|
|
1762
|
+
};
|
|
1763
|
+
const { data: r } = await this.req.get("event/user-rewards-count", hr, {
|
|
1764
|
+
...n,
|
|
1765
|
+
params: c({ ...t })
|
|
1766
|
+
});
|
|
1767
|
+
return {
|
|
1768
|
+
unclaimed: r?.unclaimed || 0
|
|
1769
|
+
};
|
|
1770
|
+
}
|
|
1749
1771
|
/**
|
|
1750
1772
|
* 查询用户活动道具数量。💡 注意,这里只能是活动道具
|
|
1751
1773
|
*
|
|
@@ -1786,7 +1808,7 @@ class ba {
|
|
|
1786
1808
|
*/
|
|
1787
1809
|
async getUnlimitQrcodeScene(t, n) {
|
|
1788
1810
|
if (!await this.token.autoLogin()) return null;
|
|
1789
|
-
const { data: r } = await this.req.get("event/unlimit-qrcode-scene",
|
|
1811
|
+
const { data: r } = await this.req.get("event/unlimit-qrcode-scene", fr, {
|
|
1790
1812
|
...n,
|
|
1791
1813
|
params: { params: t }
|
|
1792
1814
|
});
|
|
@@ -1800,7 +1822,7 @@ class ba {
|
|
|
1800
1822
|
* @param scene - 小程序码 scene 值
|
|
1801
1823
|
*/
|
|
1802
1824
|
async getParamsByQrcodeScene(t, n) {
|
|
1803
|
-
const { data: r } = await this.req.get("event/params-by-qrcode-scene",
|
|
1825
|
+
const { data: r } = await this.req.get("event/params-by-qrcode-scene", wr, {
|
|
1804
1826
|
...n,
|
|
1805
1827
|
params: { scene: t }
|
|
1806
1828
|
});
|
|
@@ -1816,7 +1838,7 @@ class ba {
|
|
|
1816
1838
|
const { data: r } = await this.req.post(
|
|
1817
1839
|
"event/unlimit-qrcode",
|
|
1818
1840
|
c(t),
|
|
1819
|
-
|
|
1841
|
+
kr,
|
|
1820
1842
|
n
|
|
1821
1843
|
);
|
|
1822
1844
|
return r?.img ?? null;
|
|
@@ -1828,7 +1850,7 @@ class ba {
|
|
|
1828
1850
|
*/
|
|
1829
1851
|
async getQuestProgress(t, n) {
|
|
1830
1852
|
if (!await this.token.autoLogin()) return null;
|
|
1831
|
-
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`,
|
|
1853
|
+
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, vr, {
|
|
1832
1854
|
message: !1,
|
|
1833
1855
|
...n,
|
|
1834
1856
|
params: { feature_id: t }
|
|
@@ -1850,7 +1872,7 @@ class ba {
|
|
|
1850
1872
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1851
1873
|
"event/vote2/rewards",
|
|
1852
1874
|
{ feature_id: t, event_id: this.event },
|
|
1853
|
-
|
|
1875
|
+
Cr,
|
|
1854
1876
|
n
|
|
1855
1877
|
);
|
|
1856
1878
|
return r || {
|
|
@@ -1865,7 +1887,7 @@ class ba {
|
|
|
1865
1887
|
*/
|
|
1866
1888
|
async getVote2Leaderboard(t, n) {
|
|
1867
1889
|
if (!await this.token.autoLogin()) return [];
|
|
1868
|
-
const { data: r } = await this.req.get("event/vote2/leaderboard",
|
|
1890
|
+
const { data: r } = await this.req.get("event/vote2/leaderboard", Vr, {
|
|
1869
1891
|
...n,
|
|
1870
1892
|
params: { feature_id: t, event_id: this.event }
|
|
1871
1893
|
});
|
|
@@ -1878,7 +1900,7 @@ class ba {
|
|
|
1878
1900
|
*/
|
|
1879
1901
|
async getCashbackQuery(t, n) {
|
|
1880
1902
|
if (!await this.token.autoLogin()) return null;
|
|
1881
|
-
const { data: r, code: a, message: o } = await this.req.get("event/cashback/query",
|
|
1903
|
+
const { data: r, code: a, message: o } = await this.req.get("event/cashback/query", Rr, {
|
|
1882
1904
|
...n,
|
|
1883
1905
|
params: { feature_id: t, event_id: this.event }
|
|
1884
1906
|
});
|
|
@@ -1906,6 +1928,24 @@ class ba {
|
|
|
1906
1928
|
error: a
|
|
1907
1929
|
};
|
|
1908
1930
|
}
|
|
1931
|
+
/**
|
|
1932
|
+
* 查询用户投稿数量
|
|
1933
|
+
*
|
|
1934
|
+
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=U0sYIGPzDk
|
|
1935
|
+
*/
|
|
1936
|
+
async getUgcMyCount(t, n) {
|
|
1937
|
+
if (!await this.token.autoLogin()) return null;
|
|
1938
|
+
const { data: r, code: a, message: o } = await this.req.get("event/ugc/my-count", jr, {
|
|
1939
|
+
...n,
|
|
1940
|
+
params: {
|
|
1941
|
+
...t
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
return r || {
|
|
1945
|
+
message: o,
|
|
1946
|
+
error: a
|
|
1947
|
+
};
|
|
1948
|
+
}
|
|
1909
1949
|
/**
|
|
1910
1950
|
* 媒体资源预上传地址获取,为投稿玩法(UGC)提供 S3 预签名上传 URL,供用户客户端上传图片资源
|
|
1911
1951
|
*
|
|
@@ -1920,7 +1960,7 @@ class ba {
|
|
|
1920
1960
|
const { data: a, code: o, message: g } = await this.req.post(
|
|
1921
1961
|
"event/ugc/upload-image",
|
|
1922
1962
|
{ feature_id: t, ...n, event_id: this.event },
|
|
1923
|
-
|
|
1963
|
+
Tr,
|
|
1924
1964
|
r
|
|
1925
1965
|
);
|
|
1926
1966
|
return a || {
|
|
@@ -1959,7 +1999,7 @@ class ba {
|
|
|
1959
1999
|
*/
|
|
1960
2000
|
async getUgcLeaderboard(t, n) {
|
|
1961
2001
|
if (!await this.token.autoLogin()) return null;
|
|
1962
|
-
const { data: r, code: a, message: o } = await this.req.get("event/ugc/leaderboard",
|
|
2002
|
+
const { data: r, code: a, message: o } = await this.req.get("event/ugc/leaderboard", qr, {
|
|
1963
2003
|
...n,
|
|
1964
2004
|
params: {
|
|
1965
2005
|
feature_id: t,
|
|
@@ -1972,12 +2012,12 @@ class ba {
|
|
|
1972
2012
|
};
|
|
1973
2013
|
}
|
|
1974
2014
|
}
|
|
1975
|
-
const
|
|
2015
|
+
const xr = {
|
|
1976
2016
|
/** 所有人均可以发帖 */
|
|
1977
2017
|
All: "all",
|
|
1978
2018
|
/** 指定用户可发帖 */
|
|
1979
2019
|
Limit: "limit"
|
|
1980
|
-
},
|
|
2020
|
+
}, Lr = e.string().enum(xr).lock(), Sr = {
|
|
1981
2021
|
/** 待审核(仅自己可见) */
|
|
1982
2022
|
Pending: "pending",
|
|
1983
2023
|
/** 审核通过 */
|
|
@@ -1986,14 +2026,14 @@ const jr = {
|
|
|
1986
2026
|
Failed: "failed",
|
|
1987
2027
|
/** 嫌疑(仅自己可见) */
|
|
1988
2028
|
Suspect: "suspect"
|
|
1989
|
-
}, ie = e.string().enum(
|
|
2029
|
+
}, ie = e.string().enum(Sr).lock(), Ur = {
|
|
1990
2030
|
/** 系统通知 */
|
|
1991
2031
|
System: "system",
|
|
1992
2032
|
/** 评论我的 */
|
|
1993
2033
|
Comment: "comment",
|
|
1994
2034
|
/** 点赞通知 */
|
|
1995
2035
|
Like: "like"
|
|
1996
|
-
},
|
|
2036
|
+
}, wa = e.string().enum(Ur).lock(), m = {
|
|
1997
2037
|
/** 系统通知 */
|
|
1998
2038
|
System: "system",
|
|
1999
2039
|
/** 帖子被置顶 */
|
|
@@ -2018,13 +2058,13 @@ const jr = {
|
|
|
2018
2058
|
ReplyLiked: "reply_liked",
|
|
2019
2059
|
/** 回复被删除 */
|
|
2020
2060
|
ReplyDeleted: "reply_deleted"
|
|
2021
|
-
},
|
|
2061
|
+
}, Pr = e.string().enum(m).lock(), se = e.object({
|
|
2022
2062
|
forum_id: e.number(),
|
|
2023
2063
|
icon_url: e.string(),
|
|
2024
2064
|
name: e.string(),
|
|
2025
2065
|
tags: e.array(e.string()),
|
|
2026
2066
|
sort: e.number(),
|
|
2027
|
-
mode:
|
|
2067
|
+
mode: Lr,
|
|
2028
2068
|
member_ids: e.array(e.number())
|
|
2029
2069
|
}).lock(), F = e.object({
|
|
2030
2070
|
topic_id: e.number(),
|
|
@@ -2055,13 +2095,13 @@ const jr = {
|
|
|
2055
2095
|
create_time: e.number()
|
|
2056
2096
|
}).lock(), ce = e.object({
|
|
2057
2097
|
err_msg: e.string().optional()
|
|
2058
|
-
}).optional().lock(),
|
|
2098
|
+
}).optional().lock(), Er = e.object({
|
|
2059
2099
|
reply_id: e.number(),
|
|
2060
2100
|
reply_content: e.string().optional(),
|
|
2061
2101
|
replied_by: e.string(),
|
|
2062
2102
|
nickname: e.string(),
|
|
2063
2103
|
avatar_url: e.string()
|
|
2064
|
-
}).lock(),
|
|
2104
|
+
}).lock(), V = e.object({
|
|
2065
2105
|
reply_id: e.number(),
|
|
2066
2106
|
comment_id: e.number(),
|
|
2067
2107
|
comment_content: e.string().optional(),
|
|
@@ -2074,7 +2114,7 @@ const jr = {
|
|
|
2074
2114
|
content: e.string(),
|
|
2075
2115
|
like_num: e.number(),
|
|
2076
2116
|
liked: e.bool(),
|
|
2077
|
-
reply_to:
|
|
2117
|
+
reply_to: Er,
|
|
2078
2118
|
create_time: e.number()
|
|
2079
2119
|
}).lock(), k = e.object({
|
|
2080
2120
|
comment_id: e.number(),
|
|
@@ -2095,20 +2135,20 @@ const jr = {
|
|
|
2095
2135
|
image_url: e.string(),
|
|
2096
2136
|
create_time: e.number(),
|
|
2097
2137
|
status: ie,
|
|
2098
|
-
replies: e.array(
|
|
2099
|
-
}).lock(),
|
|
2138
|
+
replies: e.array(V).optional()
|
|
2139
|
+
}).lock(), $r = e.object({
|
|
2100
2140
|
image_url: e.string(),
|
|
2101
2141
|
upload_url: e.string(),
|
|
2102
2142
|
existed: e.bool()
|
|
2103
2143
|
}).lock(), b = e.object({
|
|
2104
2144
|
notification_id: e.string(),
|
|
2105
|
-
notification_type:
|
|
2145
|
+
notification_type: Pr,
|
|
2106
2146
|
is_read: e.bool(),
|
|
2107
2147
|
create_time: e.number(),
|
|
2108
2148
|
origin_user_id: e.string(),
|
|
2109
2149
|
origin_user_name: e.string(),
|
|
2110
2150
|
origin_user_avatar_url: e.string()
|
|
2111
|
-
}).lock(),
|
|
2151
|
+
}).lock(), Fr = e.object({
|
|
2112
2152
|
system_message_subject: e.string(),
|
|
2113
2153
|
system_message_content: e.string()
|
|
2114
2154
|
}).lock(), D = e.object({
|
|
@@ -2119,14 +2159,14 @@ const jr = {
|
|
|
2119
2159
|
}).lock(), R = e.object({
|
|
2120
2160
|
comment_id: e.number(),
|
|
2121
2161
|
comment_content: e.string()
|
|
2122
|
-
}).lock(),
|
|
2162
|
+
}).lock(), G = e.object({
|
|
2123
2163
|
reply_id: e.number(),
|
|
2124
2164
|
reply_content: e.string()
|
|
2125
|
-
}).lock(),
|
|
2165
|
+
}).lock(), Ir = e.object({
|
|
2126
2166
|
...b.shape,
|
|
2127
|
-
...
|
|
2167
|
+
...Fr.shape,
|
|
2128
2168
|
notification_type: e.string().enum(m.System)
|
|
2129
|
-
}),
|
|
2169
|
+
}), Dr = e.object({
|
|
2130
2170
|
...b.shape,
|
|
2131
2171
|
...D.shape,
|
|
2132
2172
|
notification_type: e.string().enum(
|
|
@@ -2135,68 +2175,68 @@ const jr = {
|
|
|
2135
2175
|
m.PostDeleted,
|
|
2136
2176
|
m.PostLiked
|
|
2137
2177
|
)
|
|
2138
|
-
}),
|
|
2178
|
+
}), Gr = e.object({
|
|
2139
2179
|
...b.shape,
|
|
2140
2180
|
...D.shape,
|
|
2141
2181
|
...R.shape,
|
|
2142
2182
|
notification_type: e.string().enum(m.PostCommented)
|
|
2143
|
-
}),
|
|
2183
|
+
}), Ar = e.object({
|
|
2144
2184
|
...b.shape,
|
|
2145
2185
|
...R.shape,
|
|
2146
|
-
...
|
|
2186
|
+
...G.shape,
|
|
2147
2187
|
notification_type: e.string().enum(m.CommentReplied)
|
|
2148
|
-
}),
|
|
2188
|
+
}), Or = e.object({
|
|
2149
2189
|
...b.shape,
|
|
2150
2190
|
...R.shape,
|
|
2151
2191
|
...D.shape,
|
|
2152
2192
|
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
2153
|
-
}),
|
|
2193
|
+
}), Nr = e.object({
|
|
2154
2194
|
...b.shape,
|
|
2155
|
-
...
|
|
2195
|
+
...G.shape,
|
|
2156
2196
|
notification_type: e.string().enum(m.ReplyReplied),
|
|
2157
2197
|
comment_id: e.number(),
|
|
2158
2198
|
reply_to_reply_id: e.number(),
|
|
2159
2199
|
reply_to_reply_content: e.string()
|
|
2160
|
-
}),
|
|
2200
|
+
}), Qr = e.object({
|
|
2161
2201
|
...b.shape,
|
|
2162
|
-
...
|
|
2202
|
+
...G.shape,
|
|
2163
2203
|
...R.shape,
|
|
2164
2204
|
notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
|
|
2165
|
-
}),
|
|
2166
|
-
Er,
|
|
2167
|
-
$r,
|
|
2168
|
-
Fr,
|
|
2205
|
+
}), Br = e.union(
|
|
2169
2206
|
Ir,
|
|
2170
2207
|
Dr,
|
|
2208
|
+
Gr,
|
|
2171
2209
|
Ar,
|
|
2172
|
-
|
|
2173
|
-
|
|
2210
|
+
Or,
|
|
2211
|
+
Nr,
|
|
2212
|
+
Qr
|
|
2213
|
+
).satisfies().lock(), Mr = s({ forums: e.array(se) }), Kr = s({ topics: e.array(F) }), Hr = s({ topic: F }), zr = s({ post: I }), K = s({
|
|
2174
2214
|
posts: e.array(I),
|
|
2175
2215
|
next_token: e.string().optional()
|
|
2176
|
-
}),
|
|
2216
|
+
}), Jr = s({
|
|
2177
2217
|
post: I.clone().optional(),
|
|
2178
2218
|
antispam: ce.clone().optional()
|
|
2179
|
-
}),
|
|
2180
|
-
replies: e.array(
|
|
2219
|
+
}), Zr = s({
|
|
2220
|
+
replies: e.array(V),
|
|
2181
2221
|
next_token: e.string().optional()
|
|
2182
|
-
}),
|
|
2183
|
-
reply:
|
|
2222
|
+
}), Xr = s({ reply: V }), Yr = s({
|
|
2223
|
+
reply: V.clone().optional(),
|
|
2184
2224
|
antispam: ce.clone().optional()
|
|
2185
|
-
}),
|
|
2225
|
+
}), Wr = s({ comment: k }), ea = s({
|
|
2186
2226
|
comments: e.array(k),
|
|
2187
2227
|
next_token: e.string().optional()
|
|
2188
|
-
}),
|
|
2228
|
+
}), ta = s({
|
|
2189
2229
|
comment: k.clone().optional(),
|
|
2190
2230
|
antispam: k.clone().optional()
|
|
2191
|
-
}),
|
|
2192
|
-
notifications: e.array(
|
|
2231
|
+
}), na = e.guard($r), ra = s({
|
|
2232
|
+
notifications: e.array(Br),
|
|
2193
2233
|
next_token: e.string().optional()
|
|
2194
|
-
}),
|
|
2234
|
+
}), aa = s({
|
|
2195
2235
|
system: e.number(),
|
|
2196
2236
|
comment: e.number(),
|
|
2197
2237
|
like: e.number()
|
|
2198
2238
|
});
|
|
2199
|
-
class
|
|
2239
|
+
class ka {
|
|
2200
2240
|
token;
|
|
2201
2241
|
req;
|
|
2202
2242
|
constructor(t) {
|
|
@@ -2208,7 +2248,7 @@ class ha {
|
|
|
2208
2248
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
2209
2249
|
*/
|
|
2210
2250
|
async getForums(t) {
|
|
2211
|
-
const { data: n } = await this.req.get("community/forums",
|
|
2251
|
+
const { data: n } = await this.req.get("community/forums", Mr, t);
|
|
2212
2252
|
return n?.forums || [];
|
|
2213
2253
|
}
|
|
2214
2254
|
/**
|
|
@@ -2217,7 +2257,7 @@ class ha {
|
|
|
2217
2257
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
2218
2258
|
*/
|
|
2219
2259
|
async getTopics(t) {
|
|
2220
|
-
const { data: n } = await this.req.get("community/topics",
|
|
2260
|
+
const { data: n } = await this.req.get("community/topics", Kr, t);
|
|
2221
2261
|
return n?.topics || [];
|
|
2222
2262
|
}
|
|
2223
2263
|
/**
|
|
@@ -2226,7 +2266,7 @@ class ha {
|
|
|
2226
2266
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
2227
2267
|
*/
|
|
2228
2268
|
async getTopic(t, n) {
|
|
2229
|
-
const { data: r, code: a } = await this.req.get("community/topic",
|
|
2269
|
+
const { data: r, code: a } = await this.req.get("community/topic", Hr, {
|
|
2230
2270
|
...n,
|
|
2231
2271
|
params: { topic_id: t }
|
|
2232
2272
|
});
|
|
@@ -2268,7 +2308,7 @@ class ha {
|
|
|
2268
2308
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
2269
2309
|
*/
|
|
2270
2310
|
async getPost(t, n) {
|
|
2271
|
-
const { data: r, code: a, message: o } = await this.req.get("community/post",
|
|
2311
|
+
const { data: r, code: a, message: o } = await this.req.get("community/post", zr, {
|
|
2272
2312
|
...n,
|
|
2273
2313
|
params: { post_id: t }
|
|
2274
2314
|
});
|
|
@@ -2286,7 +2326,7 @@ class ha {
|
|
|
2286
2326
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2287
2327
|
"community/post",
|
|
2288
2328
|
c(t),
|
|
2289
|
-
|
|
2329
|
+
Jr,
|
|
2290
2330
|
n
|
|
2291
2331
|
);
|
|
2292
2332
|
return r ?? {
|
|
@@ -2300,7 +2340,7 @@ class ha {
|
|
|
2300
2340
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
2301
2341
|
*/
|
|
2302
2342
|
async getComments(t, n) {
|
|
2303
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comments",
|
|
2343
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comments", ea, {
|
|
2304
2344
|
...n,
|
|
2305
2345
|
params: c(t)
|
|
2306
2346
|
});
|
|
@@ -2315,7 +2355,7 @@ class ha {
|
|
|
2315
2355
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
2316
2356
|
*/
|
|
2317
2357
|
async getComment(t, n) {
|
|
2318
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comment",
|
|
2358
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comment", Wr, {
|
|
2319
2359
|
...n,
|
|
2320
2360
|
params: { comment_id: t }
|
|
2321
2361
|
});
|
|
@@ -2334,7 +2374,7 @@ class ha {
|
|
|
2334
2374
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2335
2375
|
"community/comment",
|
|
2336
2376
|
c(t),
|
|
2337
|
-
|
|
2377
|
+
ta,
|
|
2338
2378
|
n
|
|
2339
2379
|
);
|
|
2340
2380
|
return r ?? {
|
|
@@ -2348,7 +2388,7 @@ class ha {
|
|
|
2348
2388
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
2349
2389
|
*/
|
|
2350
2390
|
async getReplies(t, n) {
|
|
2351
|
-
const { data: r } = await this.req.get("community/replies",
|
|
2391
|
+
const { data: r } = await this.req.get("community/replies", Zr, {
|
|
2352
2392
|
...n,
|
|
2353
2393
|
params: c({ max_results: 20, ...t })
|
|
2354
2394
|
});
|
|
@@ -2363,7 +2403,7 @@ class ha {
|
|
|
2363
2403
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
2364
2404
|
*/
|
|
2365
2405
|
async getReply(t, n) {
|
|
2366
|
-
const { data: r, code: a, message: o } = await this.req.get("community/reply",
|
|
2406
|
+
const { data: r, code: a, message: o } = await this.req.get("community/reply", Xr, {
|
|
2367
2407
|
...n,
|
|
2368
2408
|
params: { reply_id: t }
|
|
2369
2409
|
});
|
|
@@ -2382,7 +2422,7 @@ class ha {
|
|
|
2382
2422
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2383
2423
|
"community/reply",
|
|
2384
2424
|
c(t),
|
|
2385
|
-
|
|
2425
|
+
Yr,
|
|
2386
2426
|
n
|
|
2387
2427
|
);
|
|
2388
2428
|
return r ?? {
|
|
@@ -2433,7 +2473,7 @@ class ha {
|
|
|
2433
2473
|
*/
|
|
2434
2474
|
async getMediaPresignedUrl(t, n) {
|
|
2435
2475
|
await this.token.autoLogin();
|
|
2436
|
-
const { data: r } = await this.req.get("community/media-presign-url",
|
|
2476
|
+
const { data: r } = await this.req.get("community/media-presign-url", na, {
|
|
2437
2477
|
...n,
|
|
2438
2478
|
params: t
|
|
2439
2479
|
});
|
|
@@ -2448,7 +2488,7 @@ class ha {
|
|
|
2448
2488
|
*/
|
|
2449
2489
|
async getNotifications(t, n) {
|
|
2450
2490
|
await this.token.autoLogin();
|
|
2451
|
-
const { data: r } = await this.req.get("community/notifications",
|
|
2491
|
+
const { data: r } = await this.req.get("community/notifications", ra, {
|
|
2452
2492
|
...n,
|
|
2453
2493
|
params: c({ max_results: 20, ...t })
|
|
2454
2494
|
});
|
|
@@ -2466,7 +2506,7 @@ class ha {
|
|
|
2466
2506
|
if (!await this.token.autoLogin()) return null;
|
|
2467
2507
|
const { data: n } = await this.req.get(
|
|
2468
2508
|
"community/unread-notifications-count",
|
|
2469
|
-
|
|
2509
|
+
aa,
|
|
2470
2510
|
t
|
|
2471
2511
|
);
|
|
2472
2512
|
return n;
|
|
@@ -2482,17 +2522,17 @@ class ha {
|
|
|
2482
2522
|
return r;
|
|
2483
2523
|
}
|
|
2484
2524
|
}
|
|
2485
|
-
const
|
|
2525
|
+
const oa = s({
|
|
2486
2526
|
nonce_str: e.string(),
|
|
2487
2527
|
timestamp: e.number(),
|
|
2488
2528
|
signature: e.string()
|
|
2489
2529
|
});
|
|
2490
|
-
var
|
|
2530
|
+
var ia = /* @__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))(ia || {});
|
|
2491
2531
|
function L(i) {
|
|
2492
2532
|
return h(i, "open_id", "union_id", "weixin_token");
|
|
2493
2533
|
}
|
|
2494
2534
|
const H = "wx_login_cache";
|
|
2495
|
-
class
|
|
2535
|
+
class va {
|
|
2496
2536
|
token;
|
|
2497
2537
|
$appid;
|
|
2498
2538
|
req;
|
|
@@ -2582,7 +2622,7 @@ class fa {
|
|
|
2582
2622
|
async webLogin(t = "snsapi_userinfo", n) {
|
|
2583
2623
|
const r = S("code"), a = Date.now(), o = +S("state");
|
|
2584
2624
|
if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
|
|
2585
|
-
const me =
|
|
2625
|
+
const me = A(["code", "state"]);
|
|
2586
2626
|
location.replace(
|
|
2587
2627
|
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(me)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
|
|
2588
2628
|
);
|
|
@@ -2593,16 +2633,16 @@ class fa {
|
|
|
2593
2633
|
message: "Error: " + r,
|
|
2594
2634
|
error: r
|
|
2595
2635
|
};
|
|
2596
|
-
const g =
|
|
2636
|
+
const g = A(["code", "state"]);
|
|
2597
2637
|
"replaceState" in history && history.replaceState({}, "", g);
|
|
2598
2638
|
const {
|
|
2599
2639
|
data: p,
|
|
2600
|
-
code:
|
|
2601
|
-
message:
|
|
2640
|
+
code: ue,
|
|
2641
|
+
message: le
|
|
2602
2642
|
} = await this.req.post("weixin/login", { code: r, appid: this.appid }, L, n);
|
|
2603
2643
|
return p && (this.token.weixinToken = p.weixin_token, await this.token.autoLogin()), p ?? {
|
|
2604
|
-
message:
|
|
2605
|
-
error:
|
|
2644
|
+
message: le,
|
|
2645
|
+
error: ue
|
|
2606
2646
|
};
|
|
2607
2647
|
}
|
|
2608
2648
|
/**
|
|
@@ -2632,7 +2672,7 @@ class fa {
|
|
|
2632
2672
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
|
|
2633
2673
|
*/
|
|
2634
2674
|
async getJSSDKConfig(t) {
|
|
2635
|
-
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign",
|
|
2675
|
+
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", oa, {
|
|
2636
2676
|
...t,
|
|
2637
2677
|
params: {
|
|
2638
2678
|
appid: this.appid,
|
|
@@ -2649,48 +2689,48 @@ class fa {
|
|
|
2649
2689
|
}
|
|
2650
2690
|
export {
|
|
2651
2691
|
ce as AntispamValidator,
|
|
2652
|
-
|
|
2653
|
-
|
|
2692
|
+
la as AuthToken,
|
|
2693
|
+
Jn as CandidateVoteValidator,
|
|
2654
2694
|
ae as CashbackEngagementDataValidator,
|
|
2655
2695
|
jn as ClaimActivationKeyEngagementDataValidator,
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2696
|
+
lt as ClaimRewardStatus,
|
|
2697
|
+
P as ClaimRewardStatusValidator,
|
|
2698
|
+
or as ClaimedItemValidator,
|
|
2659
2699
|
Z as ClubAddressValidator,
|
|
2660
|
-
|
|
2700
|
+
da as ClubApi,
|
|
2661
2701
|
X as ClubBenefitSummaryValidator,
|
|
2662
2702
|
Oe as ClubBenefitValidator,
|
|
2663
2703
|
qe as ClubCreditChangeScene,
|
|
2664
2704
|
xe as ClubCreditChangeSceneValidator,
|
|
2665
2705
|
je as ClubCreditChangeType,
|
|
2666
2706
|
Te as ClubCreditChangeTypeValidator,
|
|
2667
|
-
|
|
2668
|
-
|
|
2707
|
+
Ae as ClubCreditLogValidator,
|
|
2708
|
+
Pe as ClubGlobalConfigValidator,
|
|
2669
2709
|
Le as ClubItemType,
|
|
2670
2710
|
z as ClubItemTypeValidator,
|
|
2671
2711
|
Ee as ClubPlayerValidator,
|
|
2672
2712
|
Y as ClubProductValidator,
|
|
2673
2713
|
Se as ClubRedemptionStatus,
|
|
2674
|
-
|
|
2675
|
-
|
|
2714
|
+
Ue as ClubRedemptionStatusValidator,
|
|
2715
|
+
Ge as ClubUserCreditValidator,
|
|
2676
2716
|
De as ClubUserProfileValidator,
|
|
2677
|
-
|
|
2717
|
+
Yn as CommentEngagementValidator,
|
|
2678
2718
|
k as CommentValidator,
|
|
2679
|
-
|
|
2680
|
-
|
|
2719
|
+
ka as CommunityApi,
|
|
2720
|
+
Zn as ConversationValidator,
|
|
2681
2721
|
tt as EngageAccountType,
|
|
2682
2722
|
nt as EngageAccountTypeValidator,
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2723
|
+
ar as EngageResponseValidator,
|
|
2724
|
+
er as EngageRewardValidator,
|
|
2725
|
+
fa as EventApi,
|
|
2686
2726
|
Rn as EventConfigValidator,
|
|
2687
2727
|
Tt as EventFeatureConfigOfCashbackValidator,
|
|
2688
2728
|
xt as EventFeatureConfigOfCheckInValidator,
|
|
2689
2729
|
St as EventFeatureConfigOfClaimActivationKeyValidator,
|
|
2690
|
-
|
|
2730
|
+
Pt as EventFeatureConfigOfClaimRewardsValidator,
|
|
2691
2731
|
$t as EventFeatureConfigOfCommentValidator,
|
|
2692
2732
|
It as EventFeatureConfigOfFollowValidator,
|
|
2693
|
-
|
|
2733
|
+
At as EventFeatureConfigOfGiftCodeValidator,
|
|
2694
2734
|
Nt as EventFeatureConfigOfInviteValidator,
|
|
2695
2735
|
Bt as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2696
2736
|
Zt as EventFeatureConfigOfLotteryDrawValidator,
|
|
@@ -2700,115 +2740,116 @@ export {
|
|
|
2700
2740
|
nn as EventFeatureConfigOfRegisterValidator,
|
|
2701
2741
|
an as EventFeatureConfigOfShareValidator,
|
|
2702
2742
|
sn as EventFeatureConfigOfSubscribeValidator,
|
|
2703
|
-
|
|
2743
|
+
un as EventFeatureConfigOfSurveyValidator,
|
|
2704
2744
|
mn as EventFeatureConfigOfTeamValidator,
|
|
2705
2745
|
_n as EventFeatureConfigOfUgcLikeValidator,
|
|
2706
2746
|
gn as EventFeatureConfigOfUgcValidator,
|
|
2707
2747
|
kn as EventFeatureConfigOfVote2Validator,
|
|
2708
2748
|
hn as EventFeatureConfigOfVoteValidator,
|
|
2709
|
-
|
|
2749
|
+
Vn as EventFeatureConfigValidator,
|
|
2710
2750
|
rt as EventPeriodType,
|
|
2711
2751
|
at as EventPeriodTypeValidator,
|
|
2712
2752
|
y as EventRewardItemConfigValidator,
|
|
2713
2753
|
Qe as ExtraGameRewardValidator,
|
|
2714
2754
|
Ne as ExtraPhysicalShipmentValidator,
|
|
2715
2755
|
Rt as FeatureRewardValidator,
|
|
2716
|
-
|
|
2756
|
+
u as FeatureType,
|
|
2717
2757
|
ot as FeatureTypeValidator,
|
|
2718
|
-
|
|
2719
|
-
|
|
2758
|
+
xr as ForumMode,
|
|
2759
|
+
Lr as ForumModeValidator,
|
|
2720
2760
|
se as ForumValidator,
|
|
2721
2761
|
v as GamerItemType,
|
|
2722
2762
|
W as GamerItemTypeValidator,
|
|
2723
|
-
|
|
2763
|
+
Ve as Gender,
|
|
2724
2764
|
Re as GenderValidator,
|
|
2725
2765
|
Tn as GiftCodeEngagementDataValidator,
|
|
2726
2766
|
qn as InviteEngagementDataValidator,
|
|
2727
2767
|
_t as LotteryDrawAction,
|
|
2728
|
-
|
|
2729
|
-
|
|
2768
|
+
ya as LotteryDrawActionValidator,
|
|
2769
|
+
Un as LotteryDrawEngagementDataValidator,
|
|
2730
2770
|
xn as LotteryEngagementDataValidator,
|
|
2731
2771
|
w as LotteryTicketStatus,
|
|
2732
|
-
|
|
2772
|
+
_a as LotteryTicketStatusValidator,
|
|
2733
2773
|
b as NotificationBaseValidator,
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2774
|
+
Ur as NotificationCategory,
|
|
2775
|
+
wa as NotificationCategoryValidator,
|
|
2776
|
+
Ar as NotificationCommentReplyValidator,
|
|
2777
|
+
Or as NotificationCommentValidator,
|
|
2738
2778
|
R as NotificationPayloadCommentValidator,
|
|
2739
2779
|
D as NotificationPayloadPostValidator,
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2780
|
+
G as NotificationPayloadReplyValidator,
|
|
2781
|
+
Fr as NotificationPayloadSystemValidator,
|
|
2782
|
+
Gr as NotificationPostCommentValidator,
|
|
2783
|
+
Dr as NotificationPostValidator,
|
|
2784
|
+
Nr as NotificationReplyRepliedValidator,
|
|
2785
|
+
Qr as NotificationReplyValidator,
|
|
2786
|
+
Ir as NotificationSystemValidator,
|
|
2747
2787
|
m as NotificationType,
|
|
2748
|
-
|
|
2749
|
-
|
|
2788
|
+
Pr as NotificationTypeValidator,
|
|
2789
|
+
Br as NotificationValidator,
|
|
2750
2790
|
Ie as PlayerRoleCardValidator,
|
|
2751
2791
|
J as PlayerRoleValidator,
|
|
2752
|
-
|
|
2792
|
+
Sr as PostStatus,
|
|
2753
2793
|
ie as PostStatusValidator,
|
|
2754
2794
|
I as PostValidator,
|
|
2755
|
-
|
|
2756
|
-
|
|
2795
|
+
Pn as PreregisterEngagementDataValidator,
|
|
2796
|
+
$r as PresignedUrlResponseValidator,
|
|
2757
2797
|
En as QuestEngagementDataValidator,
|
|
2758
2798
|
it as QuestObjective,
|
|
2759
2799
|
te as QuestObjectiveValidator,
|
|
2760
2800
|
bt as QuestProgressAlgorithm,
|
|
2761
2801
|
yt as QuestProgressAlgorithmValidator,
|
|
2762
2802
|
$n as QuestProgressValidator,
|
|
2763
|
-
|
|
2803
|
+
ma as RedeemParamsValidator,
|
|
2764
2804
|
Be as RedemptionValidator,
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2805
|
+
Vt as RegularRewardValidator,
|
|
2806
|
+
Er as ReplyToValidator,
|
|
2807
|
+
V as ReplyValidator,
|
|
2808
|
+
ga as RewardItemType,
|
|
2769
2809
|
ee as RewardItemTypeValidator,
|
|
2770
2810
|
mt as RewardSource,
|
|
2771
2811
|
E as RewardSourceValidator,
|
|
2772
2812
|
d as RewardStatus,
|
|
2773
|
-
|
|
2813
|
+
ut as RewardStatusSuffix,
|
|
2774
2814
|
ne as RewardStatusSuffixValidator,
|
|
2775
|
-
|
|
2776
|
-
|
|
2815
|
+
pa as RewardStatusValidator,
|
|
2816
|
+
Wn as RewardValidator,
|
|
2777
2817
|
Fe as RoleBaseInfoValidator,
|
|
2778
2818
|
$e as ServerBaseInfoValidator,
|
|
2779
2819
|
Fn as ShareEngagementDataValidator,
|
|
2780
2820
|
Dn as SurveyEngagementDataValidator,
|
|
2781
2821
|
pt as TeamAction,
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2822
|
+
ba as TeamActionValidator,
|
|
2823
|
+
An as TeamEngagementDataValidator,
|
|
2824
|
+
Gn as TeamEngagementValidator,
|
|
2825
|
+
ha as TeamMemberValidator,
|
|
2786
2826
|
dt as TeamVisibility,
|
|
2787
2827
|
gt as TeamVisibilityValidator,
|
|
2788
2828
|
F as TopicValidator,
|
|
2829
|
+
Qn as UgcCountResponseValidator,
|
|
2789
2830
|
On as UgcEngagementDataValidator,
|
|
2790
|
-
|
|
2831
|
+
Mn as UgcLeaderboardResponseValidator,
|
|
2791
2832
|
Nn as UgcRecordResponseValidator,
|
|
2792
2833
|
kt as UgcReviewStatus,
|
|
2793
2834
|
vt as UgcReviewStatusValidator,
|
|
2794
2835
|
wt as UgcSocialMedia,
|
|
2795
2836
|
re as UgcSocialMediaValidator,
|
|
2796
|
-
|
|
2837
|
+
Bn as UgcUploadImageValidator,
|
|
2797
2838
|
$ as UserEngagementDataValidator,
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2839
|
+
tr as UserEngagementValidator,
|
|
2840
|
+
rr as UserFeatureStatusValidator,
|
|
2841
|
+
C as UserRewardValidator,
|
|
2842
|
+
nr as VerifyMobileResultValidator,
|
|
2843
|
+
zn as Vote2ClaimRewardsResponseValidator,
|
|
2844
|
+
Hn as Vote2EngagementDataValidator,
|
|
2804
2845
|
ht as Vote2RewardType,
|
|
2805
2846
|
ft as Vote2RewardTypeValidator,
|
|
2806
|
-
|
|
2847
|
+
Kn as VoteEngagementDataValidator,
|
|
2807
2848
|
st as VoteOptionSource,
|
|
2808
2849
|
ct as VoteOptionSourceValidator,
|
|
2809
|
-
|
|
2850
|
+
va as WeixinApi,
|
|
2810
2851
|
In as WeixinSubscribeEngagementDataValidator,
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2852
|
+
ia as WeixinWebLoginErrorCode,
|
|
2853
|
+
Xn as ZeroChatGPTDataValidator,
|
|
2854
|
+
oa as isWeixinSignResponse
|
|
2814
2855
|
};
|