@seayoo-web/gamer-api 2.10.2 → 2.10.4
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
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isComboWebView as
|
|
2
|
-
import { isPlainObject as w, supportWx as b, useConsole as de, usePromise as ge, pruneURL as pe, supportWindow as _e, queryString as L, pruneObject as c, omitFields as k, parseJSON as be, removePara as
|
|
1
|
+
import { isComboWebView as me } from "@seayoo-web/combo-webview";
|
|
2
|
+
import { isPlainObject as w, supportWx as b, useConsole as de, usePromise as ge, pruneURL as pe, supportWindow as _e, queryString as L, pruneObject as c, omitFields as k, parseJSON as be, removePara as O } from "@seayoo-web/utils";
|
|
3
3
|
import { v as e, objectGuard as s } from "@seayoo-web/validator";
|
|
4
4
|
function ye(i) {
|
|
5
5
|
return w(i, "gamer_token") && typeof i.gamer_token == "string";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function N(i) {
|
|
8
8
|
return w(i);
|
|
9
9
|
}
|
|
10
10
|
const j = de("GamerApiSDK");
|
|
@@ -56,7 +56,7 @@ const we = {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}, y = "gamer_token";
|
|
59
|
-
class
|
|
59
|
+
class Qr {
|
|
60
60
|
$NetRequest;
|
|
61
61
|
$idToken = "";
|
|
62
62
|
$weixinToken = "";
|
|
@@ -88,7 +88,7 @@ class Br {
|
|
|
88
88
|
}
|
|
89
89
|
}), _e()) {
|
|
90
90
|
const a = /^(?:localhost|[\d.]+):\d{4}$/.test(location.host), o = L("gamer_token");
|
|
91
|
-
(
|
|
91
|
+
(me() || a && o) && (this.$gamerToken = o);
|
|
92
92
|
}
|
|
93
93
|
this.$gamerToken || this.loadGamerTokenCache();
|
|
94
94
|
}
|
|
@@ -197,7 +197,7 @@ class Br {
|
|
|
197
197
|
*/
|
|
198
198
|
async getSession() {
|
|
199
199
|
if (!await this.autoLogin()) return null;
|
|
200
|
-
const { data: t } = await this.req.get("session",
|
|
200
|
+
const { data: t } = await this.req.get("session", N, {
|
|
201
201
|
message: !1
|
|
202
202
|
});
|
|
203
203
|
return t;
|
|
@@ -209,7 +209,7 @@ class Br {
|
|
|
209
209
|
*/
|
|
210
210
|
async authRealName(t) {
|
|
211
211
|
if (!await this.autoLogin()) return null;
|
|
212
|
-
const { data: n } = await this.req.post("auth-real-name", c(t),
|
|
212
|
+
const { data: n } = await this.req.post("auth-real-name", c(t), N);
|
|
213
213
|
return n;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
@@ -317,12 +317,12 @@ const ve = {
|
|
|
317
317
|
district: e.string(),
|
|
318
318
|
address: e.string(),
|
|
319
319
|
is_default: e.bool()
|
|
320
|
-
}).lock(),
|
|
320
|
+
}).lock(), De = e.object({
|
|
321
321
|
increased_credit: e.number(),
|
|
322
322
|
decreased_credit: e.number(),
|
|
323
323
|
expired_credit: e.number(),
|
|
324
324
|
balance_credit: e.number()
|
|
325
|
-
}).lock(),
|
|
325
|
+
}).lock(), Ie = e.object({
|
|
326
326
|
id: e.number(),
|
|
327
327
|
change_type: Re,
|
|
328
328
|
change_scene: Te,
|
|
@@ -367,7 +367,7 @@ const ve = {
|
|
|
367
367
|
}).lock(), Ae = e.object({
|
|
368
368
|
...k(X.shape, "tag"),
|
|
369
369
|
product: Y.clone().optional()
|
|
370
|
-
}).lock(),
|
|
370
|
+
}).lock(), Br = e.union(
|
|
371
371
|
e.object({
|
|
372
372
|
server_id: e.string(),
|
|
373
373
|
role_id: e.string()
|
|
@@ -402,14 +402,14 @@ const ve = {
|
|
|
402
402
|
status: Se,
|
|
403
403
|
created_at: e.number(),
|
|
404
404
|
extra_data: e.union(Ge.clone(), Oe.clone()).satisfies().optional()
|
|
405
|
-
}), Qe = e.guard(Le),
|
|
406
|
-
credit_logs: e.array(
|
|
405
|
+
}), Qe = e.guard(Le), Q = s({ player: Pe }), Be = s({ roles: e.array(J) }), T = s({ role_card: Fe }), B = e.guard(Ue), M = e.guard(Z), Me = s({ addresses: e.array(Z) }), Ke = e.guard(De), He = s({
|
|
406
|
+
credit_logs: e.array(Ie),
|
|
407
407
|
next_token: e.string().optional()
|
|
408
408
|
}), ze = s({ products: e.array(Y) }), Je = s({ benefits: e.array(X) }), Ze = s({ benefit: Ae }), Xe = s({
|
|
409
409
|
redemptions: e.array(Ne),
|
|
410
410
|
next_token: e.string().optional()
|
|
411
411
|
});
|
|
412
|
-
class
|
|
412
|
+
class Mr {
|
|
413
413
|
token;
|
|
414
414
|
req;
|
|
415
415
|
constructor(t) {
|
|
@@ -431,7 +431,7 @@ class Kr {
|
|
|
431
431
|
*/
|
|
432
432
|
async getCurrentPlayer(t) {
|
|
433
433
|
await this.token.autoLogin();
|
|
434
|
-
const { data: n, code: r, message: a } = await this.req.get("club/current-player",
|
|
434
|
+
const { data: n, code: r, message: a } = await this.req.get("club/current-player", Q, t);
|
|
435
435
|
return n?.player ?? {
|
|
436
436
|
message: a,
|
|
437
437
|
error: r
|
|
@@ -447,7 +447,7 @@ class Kr {
|
|
|
447
447
|
const { data: n, code: r, message: a } = await this.req.post(
|
|
448
448
|
"club/link-player",
|
|
449
449
|
{ id_token: this.token.idToken },
|
|
450
|
-
|
|
450
|
+
Q,
|
|
451
451
|
t
|
|
452
452
|
);
|
|
453
453
|
return n?.player ?? {
|
|
@@ -506,7 +506,7 @@ class Kr {
|
|
|
506
506
|
* https://kdocs.cn/l/cgp4gSBMbOf1?linkname=TMWBCFcOr2
|
|
507
507
|
*/
|
|
508
508
|
async getUserProfile(t, n) {
|
|
509
|
-
const { data: r } = await this.req.get("club/user-profile",
|
|
509
|
+
const { data: r } = await this.req.get("club/user-profile", B, {
|
|
510
510
|
...n,
|
|
511
511
|
params: { member_id: t }
|
|
512
512
|
});
|
|
@@ -521,7 +521,7 @@ class Kr {
|
|
|
521
521
|
if (Object.keys(t).length === 0)
|
|
522
522
|
return { error: "OptionIsEmpty", message: "请提供需要修改的信息" };
|
|
523
523
|
await this.token.autoLogin();
|
|
524
|
-
const { data: r, code: a, message: o } = await this.req.post("club/user-profile", t,
|
|
524
|
+
const { data: r, code: a, message: o } = await this.req.post("club/user-profile", t, B, n);
|
|
525
525
|
return r ?? {
|
|
526
526
|
message: o,
|
|
527
527
|
error: a
|
|
@@ -544,7 +544,7 @@ class Kr {
|
|
|
544
544
|
*/
|
|
545
545
|
async addAddress(t, n) {
|
|
546
546
|
if (!await this.token.autoLogin()) return null;
|
|
547
|
-
const { data: r } = await this.req.post("/club/add-address", c(t),
|
|
547
|
+
const { data: r } = await this.req.post("/club/add-address", c(t), M, n);
|
|
548
548
|
return r;
|
|
549
549
|
}
|
|
550
550
|
/**
|
|
@@ -557,7 +557,7 @@ class Kr {
|
|
|
557
557
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
558
558
|
"club/update-address",
|
|
559
559
|
c(t),
|
|
560
|
-
|
|
560
|
+
M,
|
|
561
561
|
n
|
|
562
562
|
);
|
|
563
563
|
return r ?? {
|
|
@@ -693,7 +693,7 @@ const v = {
|
|
|
693
693
|
ExternalCode: "external_gift_code",
|
|
694
694
|
/** 空奖励 */
|
|
695
695
|
VoidItem: "void_item"
|
|
696
|
-
}, W = e.string().enum(v).lock(),
|
|
696
|
+
}, W = e.string().enum(v).lock(), Kr = v, ee = W, Ye = {
|
|
697
697
|
/** 世游通行证 ID / Combo ID */
|
|
698
698
|
UserId: "user_id",
|
|
699
699
|
/** 游戏角色 ID */
|
|
@@ -783,7 +783,7 @@ const v = {
|
|
|
783
783
|
Failed: "failed",
|
|
784
784
|
/** 奖励已发货 */
|
|
785
785
|
Delivered: "delivered"
|
|
786
|
-
},
|
|
786
|
+
}, Hr = e.string().enum(d).lock(), it = {
|
|
787
787
|
/** 奖励未领取 */
|
|
788
788
|
Unclaimed: d.Unclaimed,
|
|
789
789
|
/** 奖励已领取 */
|
|
@@ -803,17 +803,17 @@ const v = {
|
|
|
803
803
|
Failed: d.Failed,
|
|
804
804
|
/** 奖励已发货 */
|
|
805
805
|
Delivered: d.Delivered
|
|
806
|
-
},
|
|
806
|
+
}, E = e.string().enum(st).lock(), ct = {
|
|
807
807
|
/** 玩法产出奖励 */
|
|
808
808
|
Output: "output",
|
|
809
809
|
/** 玩法参与奖励 */
|
|
810
810
|
Engage: "engage"
|
|
811
|
-
},
|
|
811
|
+
}, $ = e.string().enum(ct).lock(), lt = {
|
|
812
812
|
/** 私有队伍 */
|
|
813
813
|
Private: "private",
|
|
814
814
|
/** 公开队伍 */
|
|
815
815
|
Public: "public"
|
|
816
|
-
},
|
|
816
|
+
}, ut = e.string().enum(lt).lock(), f = {
|
|
817
817
|
/** 未知状态 */
|
|
818
818
|
Unknown: "unknown",
|
|
819
819
|
/** 等待开奖 */
|
|
@@ -824,7 +824,7 @@ const v = {
|
|
|
824
824
|
Claimed: "claimed",
|
|
825
825
|
/** 领奖失败 */
|
|
826
826
|
Fail: "fail"
|
|
827
|
-
},
|
|
827
|
+
}, zr = e.string().enum(f).lock(), mt = {
|
|
828
828
|
/** 发起组队 */
|
|
829
829
|
Assemble: "assemble",
|
|
830
830
|
/** 加入队伍 */
|
|
@@ -835,26 +835,26 @@ const v = {
|
|
|
835
835
|
ChangeVisibility: "change_visibility",
|
|
836
836
|
/** 查询组队信息 */
|
|
837
837
|
Query: "query"
|
|
838
|
-
},
|
|
838
|
+
}, Jr = e.string().enum(mt).lock(), dt = {
|
|
839
839
|
/** 查询抽奖券 */
|
|
840
840
|
Query: "query",
|
|
841
841
|
/** 开奖 */
|
|
842
842
|
Draw: "draw",
|
|
843
843
|
/** 领奖 */
|
|
844
844
|
Claim: "claim"
|
|
845
|
-
},
|
|
845
|
+
}, Zr = e.string().enum(dt).lock(), re = {
|
|
846
846
|
/** 将所有队员的进度值求和,作为队伍进度值 */
|
|
847
847
|
Sum: "sum",
|
|
848
848
|
/** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
|
|
849
849
|
TopN: "top_n"
|
|
850
|
-
},
|
|
850
|
+
}, Xr = e.string().enum(re).lock(), gt = e.string().enum(re).optional().lock(), pt = {
|
|
851
851
|
/** 尚未结算 */
|
|
852
852
|
None: "none",
|
|
853
853
|
/** 获胜奖励 */
|
|
854
854
|
Winner: "winner",
|
|
855
855
|
/** 安慰奖励 */
|
|
856
856
|
Consolation: "consolation"
|
|
857
|
-
}, _t = e.string().enum(pt).lock(), bt = e.string().enum(k(v, "GiftCode", "LotteryTicket")),
|
|
857
|
+
}, _t = e.string().enum(pt).lock(), bt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), F = e.object({
|
|
858
858
|
reward_item_id: e.number(),
|
|
859
859
|
reward_amount: e.number(),
|
|
860
860
|
reward_item_name: e.string(),
|
|
@@ -864,20 +864,17 @@ const v = {
|
|
|
864
864
|
reward_item_rating: e.number()
|
|
865
865
|
}).lock(), yt = e.object({
|
|
866
866
|
engage_count: e.number(),
|
|
867
|
-
rewards: e.array(
|
|
868
|
-
}).lock(),
|
|
867
|
+
rewards: e.array(F)
|
|
868
|
+
}).lock(), P = e.union(
|
|
869
869
|
e.object({
|
|
870
870
|
feature_reward_type: e.string().enum("every"),
|
|
871
|
-
reward_details: e.array(
|
|
871
|
+
reward_details: e.array(F)
|
|
872
872
|
}),
|
|
873
873
|
e.object({
|
|
874
874
|
feature_reward_type: e.string().enum("regular"),
|
|
875
875
|
reward_details: e.array(yt)
|
|
876
876
|
})
|
|
877
|
-
).satisfies().lock(),
|
|
878
|
-
item_id: e.number(),
|
|
879
|
-
item_amount: e.number()
|
|
880
|
-
}), m = e.object({
|
|
877
|
+
).satisfies().lock(), u = e.object({
|
|
881
878
|
feature_name: e.string(),
|
|
882
879
|
feature_id: e.number(),
|
|
883
880
|
description: e.string(),
|
|
@@ -887,36 +884,36 @@ const v = {
|
|
|
887
884
|
since: e.number(),
|
|
888
885
|
until: e.number(),
|
|
889
886
|
engage_account: We,
|
|
890
|
-
feature_rewards:
|
|
887
|
+
feature_rewards: P.clone().optional(),
|
|
891
888
|
sort: e.number().optional()
|
|
892
|
-
}),
|
|
893
|
-
...
|
|
894
|
-
feature_type: e.string().enum(
|
|
889
|
+
}), ft = l.Cashback, ht = e.object({
|
|
890
|
+
...u.shape,
|
|
891
|
+
feature_type: e.string().enum(ft),
|
|
895
892
|
config: e.object({
|
|
896
893
|
order_start_time: e.number(),
|
|
897
894
|
order_end_time: e.number(),
|
|
898
895
|
claim_rewards_start_time: e.number(),
|
|
899
896
|
claim_rewards_end_time: e.number()
|
|
900
897
|
})
|
|
901
|
-
}),
|
|
902
|
-
...
|
|
903
|
-
feature_type: e.string().enum(
|
|
904
|
-
}),
|
|
905
|
-
...
|
|
906
|
-
feature_type: e.string().enum(
|
|
907
|
-
}),
|
|
908
|
-
...
|
|
909
|
-
feature_type: e.string().enum(
|
|
910
|
-
}),
|
|
911
|
-
...
|
|
912
|
-
feature_type: e.string().enum(
|
|
898
|
+
}), wt = l.CheckIn, kt = e.object({
|
|
899
|
+
...u.shape,
|
|
900
|
+
feature_type: e.string().enum(wt)
|
|
901
|
+
}), vt = l.ClaimActivationKey, Vt = e.object({
|
|
902
|
+
...u.shape,
|
|
903
|
+
feature_type: e.string().enum(vt)
|
|
904
|
+
}), Ct = l.ClaimRewards, Rt = e.object({
|
|
905
|
+
...u.shape,
|
|
906
|
+
feature_type: e.string().enum(Ct)
|
|
907
|
+
}), jt = l.Comment, Tt = e.object({
|
|
908
|
+
...u.shape,
|
|
909
|
+
feature_type: e.string().enum(jt),
|
|
913
910
|
config: e.object({
|
|
914
911
|
comments: e.array(e.string()),
|
|
915
912
|
send_rate: e.number()
|
|
916
913
|
})
|
|
917
|
-
}),
|
|
918
|
-
...
|
|
919
|
-
feature_type: e.string().enum(
|
|
914
|
+
}), qt = l.Follow, xt = e.object({
|
|
915
|
+
...u.shape,
|
|
916
|
+
feature_type: e.string().enum(qt),
|
|
920
917
|
config: e.object({
|
|
921
918
|
platform: e.string(),
|
|
922
919
|
platform_icon: e.string().optional(),
|
|
@@ -924,28 +921,28 @@ const v = {
|
|
|
924
921
|
qr_code_url: e.string().optional(),
|
|
925
922
|
platform_desc: e.string().optional()
|
|
926
923
|
})
|
|
927
|
-
}),
|
|
924
|
+
}), St = l.GiftCode, Lt = e.object({
|
|
928
925
|
name: e.string(),
|
|
929
926
|
icon_url: e.string(),
|
|
930
927
|
count: e.number()
|
|
931
|
-
}),
|
|
932
|
-
...
|
|
933
|
-
feature_type: e.string().enum(
|
|
928
|
+
}), Pt = e.object({
|
|
929
|
+
...u.shape,
|
|
930
|
+
feature_type: e.string().enum(St),
|
|
934
931
|
config: e.object({
|
|
935
|
-
gift_items: e.array(
|
|
932
|
+
gift_items: e.array(Lt),
|
|
936
933
|
mp_url: e.string().optional(),
|
|
937
934
|
mp_qrcode_url: e.string().optional()
|
|
938
935
|
})
|
|
939
|
-
}),
|
|
940
|
-
...
|
|
941
|
-
feature_type: e.string().enum(
|
|
936
|
+
}), Et = l.Invite, $t = e.object({
|
|
937
|
+
...u.shape,
|
|
938
|
+
feature_type: e.string().enum(Et),
|
|
942
939
|
config: e.object({
|
|
943
940
|
share_url: e.string()
|
|
944
941
|
})
|
|
945
|
-
}),
|
|
946
|
-
...
|
|
947
|
-
feature_type: e.string().enum(
|
|
948
|
-
}), Dt = e.string().enum(k(v, "GiftCode", "LotteryTicket")),
|
|
942
|
+
}), Ft = l.InvitedRegister, Ut = e.object({
|
|
943
|
+
...u.shape,
|
|
944
|
+
feature_type: e.string().enum(Ft)
|
|
945
|
+
}), Dt = e.string().enum(k(v, "GiftCode", "LotteryTicket")), It = l.Lottery, At = e.object({
|
|
949
946
|
reward_item_id: e.number(),
|
|
950
947
|
reward_item_name: e.string(),
|
|
951
948
|
reward_item_type: Dt,
|
|
@@ -954,30 +951,30 @@ const v = {
|
|
|
954
951
|
reward_amount: e.number(),
|
|
955
952
|
reward_remaining_stock: e.number(),
|
|
956
953
|
reward_item_rating: e.number()
|
|
957
|
-
}),
|
|
958
|
-
...
|
|
959
|
-
feature_type: e.string().enum(
|
|
954
|
+
}), Gt = e.object({
|
|
955
|
+
...u.shape,
|
|
956
|
+
feature_type: e.string().enum(It),
|
|
960
957
|
config: e.object({
|
|
961
958
|
consume_item_id: e.number(),
|
|
962
959
|
consume_item_name: e.string(),
|
|
963
960
|
consume_item_icon_url: e.string(),
|
|
964
961
|
consume_item_count: e.array(e.number()),
|
|
965
962
|
consume_item_desc: e.string().optional(),
|
|
966
|
-
rewards: e.array(
|
|
963
|
+
rewards: e.array(At)
|
|
967
964
|
})
|
|
968
|
-
}),
|
|
969
|
-
...
|
|
970
|
-
feature_type: e.string().enum(
|
|
965
|
+
}), Ot = l.LotteryDraw, Nt = e.object({
|
|
966
|
+
...u.shape,
|
|
967
|
+
feature_type: e.string().enum(Ot),
|
|
971
968
|
config: e.object({
|
|
972
969
|
draw_not_before: e.number(),
|
|
973
970
|
draw_not_after: e.number()
|
|
974
971
|
})
|
|
975
|
-
}),
|
|
976
|
-
...
|
|
977
|
-
feature_type: e.string().enum(
|
|
978
|
-
}),
|
|
979
|
-
...
|
|
980
|
-
feature_type: e.string().enum(
|
|
972
|
+
}), Qt = l.Preregister, Bt = e.object({
|
|
973
|
+
...u.shape,
|
|
974
|
+
feature_type: e.string().enum(Qt)
|
|
975
|
+
}), Mt = l.Quest, Kt = e.object({
|
|
976
|
+
...u.shape,
|
|
977
|
+
feature_type: e.string().enum(Mt),
|
|
981
978
|
config: e.object({
|
|
982
979
|
objective: te,
|
|
983
980
|
completion_value: e.number(),
|
|
@@ -994,38 +991,38 @@ const v = {
|
|
|
994
991
|
event_item_id: e.number().optional()
|
|
995
992
|
}).optional()
|
|
996
993
|
})
|
|
997
|
-
}),
|
|
998
|
-
...
|
|
999
|
-
feature_type: e.string().enum(
|
|
1000
|
-
}),
|
|
1001
|
-
...
|
|
1002
|
-
feature_type: e.string().enum(
|
|
994
|
+
}), Ht = l.Register, zt = e.object({
|
|
995
|
+
...u.shape,
|
|
996
|
+
feature_type: e.string().enum(Ht)
|
|
997
|
+
}), Jt = l.Share, Zt = e.object({
|
|
998
|
+
...u.shape,
|
|
999
|
+
feature_type: e.string().enum(Jt),
|
|
1003
1000
|
config: e.object({
|
|
1004
1001
|
share_platform: e.string(),
|
|
1005
1002
|
jump_url: e.string().optional(),
|
|
1006
1003
|
icon_url: e.string().optional()
|
|
1007
1004
|
})
|
|
1008
|
-
}),
|
|
1009
|
-
...
|
|
1010
|
-
feature_type: e.string().enum(
|
|
1005
|
+
}), Xt = l.Subscribe, Yt = e.object({
|
|
1006
|
+
...u.shape,
|
|
1007
|
+
feature_type: e.string().enum(Xt),
|
|
1011
1008
|
config: e.object({
|
|
1012
1009
|
weixin_template_ids: e.array(e.string())
|
|
1013
1010
|
})
|
|
1014
|
-
}),
|
|
1015
|
-
...
|
|
1016
|
-
feature_type: e.string().enum(
|
|
1011
|
+
}), Wt = l.Survey, en = e.object({
|
|
1012
|
+
...u.shape,
|
|
1013
|
+
feature_type: e.string().enum(Wt),
|
|
1017
1014
|
config: e.object({
|
|
1018
1015
|
survey_id: e.string(),
|
|
1019
1016
|
survey_url: e.string()
|
|
1020
1017
|
})
|
|
1021
|
-
}),
|
|
1022
|
-
...
|
|
1023
|
-
feature_type: e.string().enum(
|
|
1018
|
+
}), tn = l.Team, nn = e.object({
|
|
1019
|
+
...u.shape,
|
|
1020
|
+
feature_type: e.string().enum(tn),
|
|
1024
1021
|
config: e.object({
|
|
1025
1022
|
max_members: e.number().min(1),
|
|
1026
1023
|
min_members: e.number().min(1)
|
|
1027
1024
|
})
|
|
1028
|
-
}),
|
|
1025
|
+
}), rn = l.Vote, an = e.object({
|
|
1029
1026
|
sn: e.string(),
|
|
1030
1027
|
name: e.string(),
|
|
1031
1028
|
img_urls: e.array(e.string()).optional(),
|
|
@@ -1035,96 +1032,94 @@ const v = {
|
|
|
1035
1032
|
amount: e.number(),
|
|
1036
1033
|
finalists: e.bool(),
|
|
1037
1034
|
last_vote_time: e.number()
|
|
1038
|
-
}),
|
|
1039
|
-
...
|
|
1040
|
-
feature_type: e.string().enum(
|
|
1035
|
+
}), on = e.object({
|
|
1036
|
+
...u.shape,
|
|
1037
|
+
feature_type: e.string().enum(rn),
|
|
1041
1038
|
config: e.object({
|
|
1042
1039
|
vote_feature_ids: e.array(e.number()),
|
|
1043
1040
|
submission_feature_ids: e.array(e.number()),
|
|
1044
1041
|
finalists_amount: e.number(),
|
|
1045
1042
|
source: ot,
|
|
1046
|
-
options: e.array(
|
|
1047
|
-
rewards: e.array(
|
|
1043
|
+
options: e.array(an),
|
|
1044
|
+
rewards: e.array(F)
|
|
1048
1045
|
})
|
|
1049
|
-
}),
|
|
1046
|
+
}), sn = l.Vote2, cn = e.object({
|
|
1050
1047
|
candidate_id: e.string(),
|
|
1051
1048
|
display_name: e.string(),
|
|
1052
1049
|
images: e.array(e.string()).optional(),
|
|
1053
1050
|
videos: e.array(e.string()).optional(),
|
|
1054
1051
|
description: e.string().optional(),
|
|
1055
1052
|
jump_url: e.string()
|
|
1056
|
-
}),
|
|
1057
|
-
...
|
|
1058
|
-
feature_type: e.string().enum(
|
|
1053
|
+
}), ln = e.object({
|
|
1054
|
+
...u.shape,
|
|
1055
|
+
feature_type: e.string().enum(sn),
|
|
1059
1056
|
config: e.object({
|
|
1060
1057
|
vote_item_id: e.number().optional(),
|
|
1061
|
-
candidates: e.array(
|
|
1058
|
+
candidates: e.array(cn),
|
|
1062
1059
|
vote_since: e.number(),
|
|
1063
1060
|
vote_until: e.number(),
|
|
1064
1061
|
rewards_since: e.number(),
|
|
1065
1062
|
rewards_until: e.number(),
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
winner_rewards: e.array(M).optional(),
|
|
1069
|
-
consolation_rewards: e.array(M).optional()
|
|
1063
|
+
winner_rewards: e.array(P).optional(),
|
|
1064
|
+
consolation_rewards: e.array(P).optional()
|
|
1070
1065
|
})
|
|
1071
|
-
}), un = l.ZeroChatgpt,
|
|
1072
|
-
...
|
|
1066
|
+
}), un = l.ZeroChatgpt, mn = e.object({
|
|
1067
|
+
...u.shape,
|
|
1073
1068
|
feature_type: e.string().enum(un)
|
|
1074
|
-
}),
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
).key("feature_type").satisfies(),
|
|
1069
|
+
}), dn = e.union(
|
|
1070
|
+
ht,
|
|
1071
|
+
kt,
|
|
1072
|
+
Rt,
|
|
1073
|
+
Tt,
|
|
1074
|
+
xt,
|
|
1075
|
+
Pt,
|
|
1076
|
+
$t,
|
|
1077
|
+
Ut,
|
|
1078
|
+
Gt,
|
|
1079
|
+
Nt,
|
|
1080
|
+
Bt,
|
|
1081
|
+
Kt,
|
|
1082
|
+
zt,
|
|
1083
|
+
Zt,
|
|
1084
|
+
Yt,
|
|
1085
|
+
en,
|
|
1086
|
+
nn,
|
|
1087
|
+
on,
|
|
1088
|
+
ln,
|
|
1089
|
+
Vt,
|
|
1090
|
+
mn
|
|
1091
|
+
).key("feature_type").satisfies(), gn = e.object({
|
|
1097
1092
|
event_name: e.string(),
|
|
1098
1093
|
rules: e.string(),
|
|
1099
1094
|
since: e.number(),
|
|
1100
1095
|
until: e.number(),
|
|
1101
1096
|
visit_count: e.number().optional(),
|
|
1102
|
-
features: e.array(
|
|
1103
|
-
}).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()),
|
|
1097
|
+
features: e.array(dn)
|
|
1098
|
+
}).lock(), q = e.union(e.string().pattern("NumberString", /^\d+$/), e.number()), pn = e.object({
|
|
1104
1099
|
order_total_amount: q,
|
|
1105
1100
|
cashback_total_amount: q,
|
|
1106
1101
|
game_item_count: q
|
|
1107
|
-
}),
|
|
1102
|
+
}), _n = e.object({
|
|
1108
1103
|
activation_key: e.string().disallow("")
|
|
1109
|
-
}),
|
|
1104
|
+
}), bn = e.object({
|
|
1110
1105
|
gift_code: e.string()
|
|
1111
|
-
}),
|
|
1106
|
+
}), yn = e.object({
|
|
1112
1107
|
user_id: e.string(),
|
|
1113
1108
|
name: e.string().optional(),
|
|
1114
1109
|
avatar_url: e.string().optional()
|
|
1115
|
-
}),
|
|
1110
|
+
}), fn = e.object({
|
|
1116
1111
|
lottery_count: e.number()
|
|
1117
1112
|
}), V = e.object({
|
|
1118
1113
|
reward_id: e.number(),
|
|
1119
1114
|
reward_item_id: e.number(),
|
|
1120
|
-
reward_source:
|
|
1115
|
+
reward_source: $,
|
|
1121
1116
|
reward_item_name: e.string(),
|
|
1122
1117
|
reward_item_type: W,
|
|
1123
1118
|
reward_item_icon_url: e.string(),
|
|
1124
1119
|
reward_item_desc: e.string().optional(),
|
|
1125
1120
|
reward_item_rating: e.number(),
|
|
1126
1121
|
reward_amount: e.number(),
|
|
1127
|
-
reward_status:
|
|
1122
|
+
reward_status: E,
|
|
1128
1123
|
event_id: e.number(),
|
|
1129
1124
|
event_name: e.string(),
|
|
1130
1125
|
feature_id: e.number(),
|
|
@@ -1132,26 +1127,26 @@ const v = {
|
|
|
1132
1127
|
feature_type: nt,
|
|
1133
1128
|
receive_time: e.number(),
|
|
1134
1129
|
extra_data: e.record(e.unknown()).optional()
|
|
1135
|
-
}),
|
|
1130
|
+
}), hn = e.string().enum(f.Unknown, f.Pending), wn = e.union(
|
|
1136
1131
|
e.object({
|
|
1137
1132
|
ticket: e.string(),
|
|
1138
|
-
status:
|
|
1133
|
+
status: hn
|
|
1139
1134
|
}),
|
|
1140
1135
|
e.object({
|
|
1141
1136
|
ticket: e.string(),
|
|
1142
1137
|
status: e.string().enum(k(f, "Unknown", "Pending")),
|
|
1143
1138
|
reward: V
|
|
1144
1139
|
})
|
|
1145
|
-
).satisfies(),
|
|
1146
|
-
tickets: e.array(
|
|
1147
|
-
}),
|
|
1140
|
+
).satisfies(), kn = e.object({
|
|
1141
|
+
tickets: e.array(wn)
|
|
1142
|
+
}), vn = e.object({
|
|
1148
1143
|
platforms: e.array(e.string())
|
|
1149
1144
|
}), ae = e.object({
|
|
1150
1145
|
role_name: e.string(),
|
|
1151
1146
|
is_leader: e.bool(),
|
|
1152
1147
|
is_myself: e.bool().optional(),
|
|
1153
1148
|
progress: e.number().optional()
|
|
1154
|
-
}).lock(),
|
|
1149
|
+
}).lock(), Vn = e.object({
|
|
1155
1150
|
objective: te,
|
|
1156
1151
|
progress: e.number(),
|
|
1157
1152
|
completion_value: e.number().optional(),
|
|
@@ -1160,30 +1155,30 @@ const v = {
|
|
|
1160
1155
|
completion_value: e.number().optional(),
|
|
1161
1156
|
players: e.array(ae)
|
|
1162
1157
|
}).optional()
|
|
1163
|
-
}),
|
|
1158
|
+
}), Cn = e.object({
|
|
1164
1159
|
progress: e.number(),
|
|
1165
1160
|
team: e.object({
|
|
1166
1161
|
progress: e.number(),
|
|
1167
1162
|
team_members: e.array(ae).optional()
|
|
1168
1163
|
}).optional()
|
|
1169
|
-
}),
|
|
1164
|
+
}), Rn = e.object({
|
|
1170
1165
|
platform: e.string()
|
|
1171
|
-
}),
|
|
1166
|
+
}), jn = e.object({
|
|
1172
1167
|
weixin_openid: e.string()
|
|
1173
|
-
}),
|
|
1168
|
+
}), Tn = e.object({
|
|
1174
1169
|
serial_number: e.number()
|
|
1175
|
-
}),
|
|
1170
|
+
}), qn = e.object({
|
|
1176
1171
|
team_code: e.string(),
|
|
1177
1172
|
leader_name: e.string(),
|
|
1178
1173
|
total_members: e.number()
|
|
1179
|
-
}),
|
|
1174
|
+
}), Yr = e.object({
|
|
1180
1175
|
is_leader: e.bool(),
|
|
1181
1176
|
is_myself: e.bool().optional(),
|
|
1182
1177
|
role_name: e.string(),
|
|
1183
1178
|
server_name: e.string()
|
|
1184
|
-
}),
|
|
1179
|
+
}), xn = e.object({
|
|
1185
1180
|
team_code: e.string(),
|
|
1186
|
-
visibility:
|
|
1181
|
+
visibility: ut,
|
|
1187
1182
|
members: e.array(
|
|
1188
1183
|
e.object({
|
|
1189
1184
|
is_leader: e.bool(),
|
|
@@ -1191,49 +1186,49 @@ const v = {
|
|
|
1191
1186
|
server_name: e.string()
|
|
1192
1187
|
})
|
|
1193
1188
|
)
|
|
1194
|
-
}),
|
|
1189
|
+
}), Sn = e.object({
|
|
1195
1190
|
option_sn: e.string()
|
|
1196
|
-
}),
|
|
1191
|
+
}), Ln = e.object({
|
|
1197
1192
|
candidate_id: e.string(),
|
|
1198
1193
|
total_votes: e.number().optional(),
|
|
1199
1194
|
my_votes: e.number().optional(),
|
|
1200
1195
|
votes: e.number().optional()
|
|
1201
|
-
}),
|
|
1196
|
+
}), Pn = e.object({
|
|
1202
1197
|
rewards_type: _t,
|
|
1203
1198
|
rewards: e.array(V).optional()
|
|
1204
|
-
}),
|
|
1199
|
+
}), En = e.object({
|
|
1205
1200
|
candidate_id: e.string(),
|
|
1206
1201
|
is_winner: e.bool(),
|
|
1207
1202
|
total_votes: e.number(),
|
|
1208
1203
|
my_votes: e.number()
|
|
1209
|
-
}),
|
|
1204
|
+
}), $n = e.object({
|
|
1210
1205
|
role: e.string(),
|
|
1211
1206
|
content: e.string()
|
|
1207
|
+
}), Fn = e.object({
|
|
1208
|
+
conversations: e.array($n)
|
|
1212
1209
|
}), Un = e.object({
|
|
1213
|
-
conversations: e.array(Fn)
|
|
1214
|
-
}), In = e.object({
|
|
1215
1210
|
user_id: e.string(),
|
|
1216
1211
|
name: e.string(),
|
|
1217
1212
|
avatar_url: e.string(),
|
|
1218
1213
|
comment: e.string(),
|
|
1219
1214
|
video_note: e.number(),
|
|
1220
1215
|
created_at: e.number()
|
|
1221
|
-
}),
|
|
1222
|
-
|
|
1223
|
-
hn,
|
|
1224
|
-
qn,
|
|
1216
|
+
}), U = e.union(
|
|
1217
|
+
vn,
|
|
1225
1218
|
fn,
|
|
1226
|
-
jn,
|
|
1227
|
-
Ln,
|
|
1228
|
-
Pn,
|
|
1229
1219
|
Tn,
|
|
1230
|
-
_n,
|
|
1231
1220
|
yn,
|
|
1221
|
+
Rn,
|
|
1232
1222
|
Sn,
|
|
1233
|
-
|
|
1234
|
-
|
|
1223
|
+
Ln,
|
|
1224
|
+
jn,
|
|
1225
|
+
pn,
|
|
1235
1226
|
bn,
|
|
1236
|
-
|
|
1227
|
+
xn,
|
|
1228
|
+
Vn,
|
|
1229
|
+
kn,
|
|
1230
|
+
_n,
|
|
1231
|
+
Fn,
|
|
1237
1232
|
e.custom(
|
|
1238
1233
|
"EmptyObject",
|
|
1239
1234
|
(i) => w(i) && Object.keys(i).length === 0
|
|
@@ -1244,14 +1239,14 @@ const v = {
|
|
|
1244
1239
|
reward_item_type: ee,
|
|
1245
1240
|
reward_count: e.number(),
|
|
1246
1241
|
reward_status: ne,
|
|
1247
|
-
reward_source:
|
|
1242
|
+
reward_source: $,
|
|
1248
1243
|
reward_item_name: e.string(),
|
|
1249
1244
|
reward_item_icon_url: e.string(),
|
|
1250
1245
|
reward_item_desc: e.string().optional(),
|
|
1251
1246
|
reward_item_rating: e.number(),
|
|
1252
1247
|
receive_time: e.number(),
|
|
1253
|
-
extra_data: e.union(...
|
|
1254
|
-
}),
|
|
1248
|
+
extra_data: e.union(...U.validators, e.record(e.unknown())).satisfies().optional()
|
|
1249
|
+
}), In = e.object({
|
|
1255
1250
|
reward_id: e.number(),
|
|
1256
1251
|
reward_item_id: e.number(),
|
|
1257
1252
|
reward_item_name: e.string(),
|
|
@@ -1261,69 +1256,69 @@ const v = {
|
|
|
1261
1256
|
reward_item_rating: e.number(),
|
|
1262
1257
|
reward_amount: e.number(),
|
|
1263
1258
|
reward_status: ne,
|
|
1264
|
-
reward_source:
|
|
1259
|
+
reward_source: $,
|
|
1265
1260
|
extra_data: e.record(e.unknown()).optional()
|
|
1266
|
-
}),
|
|
1261
|
+
}), An = e.object({
|
|
1267
1262
|
engagement_id: e.number(),
|
|
1268
1263
|
user_id: e.string(),
|
|
1269
1264
|
event_id: e.number(),
|
|
1270
1265
|
feature_id: e.number(),
|
|
1271
1266
|
sequence: e.number(),
|
|
1272
|
-
data:
|
|
1267
|
+
data: U.clone().optional(),
|
|
1273
1268
|
server_id: e.string().optional(),
|
|
1274
1269
|
role_id: e.string().optional(),
|
|
1275
1270
|
created_at: e.number(),
|
|
1276
1271
|
rewards: e.array(Dn).optional()
|
|
1277
|
-
}).lock(),
|
|
1272
|
+
}).lock(), Gn = e.object({
|
|
1278
1273
|
allowed: e.bool(),
|
|
1279
1274
|
registered: e.bool()
|
|
1280
|
-
}),
|
|
1275
|
+
}), On = e.object({
|
|
1281
1276
|
feature_id: e.number(),
|
|
1282
1277
|
can_engage: e.bool(),
|
|
1283
1278
|
has_unclaimed_rewards: e.bool()
|
|
1284
|
-
}),
|
|
1279
|
+
}), Nn = e.object({
|
|
1285
1280
|
engagement_id: e.number(),
|
|
1286
1281
|
engagement: e.object({
|
|
1287
1282
|
engagement_id: e.number(),
|
|
1288
1283
|
sequence: e.number(),
|
|
1289
1284
|
feature_id: e.number(),
|
|
1290
|
-
data:
|
|
1285
|
+
data: U.clone().optional()
|
|
1291
1286
|
}).optional(),
|
|
1292
|
-
rewards: e.array(
|
|
1287
|
+
rewards: e.array(In).optional(),
|
|
1293
1288
|
scan: e.bool().optional()
|
|
1294
|
-
}),
|
|
1289
|
+
}), Qn = e.object({
|
|
1295
1290
|
reward_id: e.number(),
|
|
1296
|
-
reward_status:
|
|
1297
|
-
}),
|
|
1298
|
-
engagements: e.union(e.array(
|
|
1291
|
+
reward_status: E
|
|
1292
|
+
}), Bn = e.guard(gn), Mn = e.guard(Gn), x = s({ count: e.number() }), Kn = s({ first_visit: e.bool() }), Hn = s({
|
|
1293
|
+
engagements: e.union(e.array(Un), e.array(qn))
|
|
1294
|
+
}), zn = s({
|
|
1295
|
+
status: e.array(On)
|
|
1299
1296
|
}), Jn = s({
|
|
1300
|
-
status: e.array(Nn)
|
|
1301
|
-
}), Zn = s({
|
|
1302
1297
|
engagements_counts: e.record(e.number())
|
|
1303
|
-
}),
|
|
1304
|
-
engagements: e.array(
|
|
1298
|
+
}), Zn = s({
|
|
1299
|
+
engagements: e.array(An),
|
|
1305
1300
|
next_token: e.string().optional()
|
|
1306
|
-
}),
|
|
1307
|
-
claimed_items: e.array(
|
|
1308
|
-
}),
|
|
1301
|
+
}), Xn = e.guard(Nn), Yn = s({
|
|
1302
|
+
claimed_items: e.array(Qn)
|
|
1303
|
+
}), Wn = s({
|
|
1309
1304
|
rewards: e.array(V)
|
|
1305
|
+
}), er = s({
|
|
1306
|
+
reward_status: E
|
|
1310
1307
|
}), tr = s({
|
|
1311
|
-
reward_status: P
|
|
1312
|
-
}), nr = s({
|
|
1313
1308
|
user_rewards: e.array(V),
|
|
1314
1309
|
next_token: e.string().optional()
|
|
1315
|
-
}),
|
|
1310
|
+
}), nr = s({
|
|
1316
1311
|
scene: e.string()
|
|
1317
|
-
}),
|
|
1312
|
+
}), rr = s({
|
|
1318
1313
|
params: e.string()
|
|
1319
|
-
}),
|
|
1314
|
+
}), ar = s({
|
|
1320
1315
|
img: e.string()
|
|
1321
|
-
}),
|
|
1316
|
+
}), or = e.guard(Cn), ir = e.guard(Pn), sr = e.guard(
|
|
1322
1317
|
e.object({
|
|
1323
|
-
candidate_votes: e.array(
|
|
1318
|
+
candidate_votes: e.array(En)
|
|
1324
1319
|
})
|
|
1325
1320
|
);
|
|
1326
|
-
class
|
|
1321
|
+
class Wr {
|
|
1327
1322
|
token;
|
|
1328
1323
|
event = 0;
|
|
1329
1324
|
req;
|
|
@@ -1336,7 +1331,7 @@ class ea {
|
|
|
1336
1331
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=OWGSPF3Ysl
|
|
1337
1332
|
*/
|
|
1338
1333
|
async verifyMobileAllowed(t, n, r) {
|
|
1339
|
-
const { data: a } = await this.req.get("verify-mobile-allowed",
|
|
1334
|
+
const { data: a } = await this.req.get("verify-mobile-allowed", Mn, {
|
|
1340
1335
|
...r,
|
|
1341
1336
|
params: { game_id: t, mobile: n }
|
|
1342
1337
|
});
|
|
@@ -1348,7 +1343,7 @@ class ea {
|
|
|
1348
1343
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=wFXxtdNKPm
|
|
1349
1344
|
*/
|
|
1350
1345
|
async getConfig(t) {
|
|
1351
|
-
const { data: n } = await this.req.get(`event/${this.event}/event-config`,
|
|
1346
|
+
const { data: n } = await this.req.get(`event/${this.event}/event-config`, Bn, t);
|
|
1352
1347
|
return n;
|
|
1353
1348
|
}
|
|
1354
1349
|
/**
|
|
@@ -1383,7 +1378,7 @@ class ea {
|
|
|
1383
1378
|
* https://kdocs.cn/l/ckWFDcOsYEUA?linkname=THtZ4ewIQW
|
|
1384
1379
|
*/
|
|
1385
1380
|
async getEngagements(t, n) {
|
|
1386
|
-
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`,
|
|
1381
|
+
const { data: r } = await this.req.get(`event/${this.event}/feature-engagements`, Hn, {
|
|
1387
1382
|
...n,
|
|
1388
1383
|
params: { feature_id: t }
|
|
1389
1384
|
});
|
|
@@ -1399,7 +1394,7 @@ class ea {
|
|
|
1399
1394
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1400
1395
|
`event/${this.event}/visit`,
|
|
1401
1396
|
c(t || {}),
|
|
1402
|
-
|
|
1397
|
+
Kn,
|
|
1403
1398
|
n
|
|
1404
1399
|
);
|
|
1405
1400
|
return r ?? {
|
|
@@ -1416,7 +1411,7 @@ class ea {
|
|
|
1416
1411
|
*/
|
|
1417
1412
|
async getUserFeatureStatus(t, n) {
|
|
1418
1413
|
if (!await this.token.autoLogin()) return [];
|
|
1419
|
-
const { data: r } = await this.req.get("event/user-feature-status",
|
|
1414
|
+
const { data: r } = await this.req.get("event/user-feature-status", zn, {
|
|
1420
1415
|
...n,
|
|
1421
1416
|
message: !1,
|
|
1422
1417
|
params: c({ ...t, event_id: this.event })
|
|
@@ -1430,7 +1425,7 @@ class ea {
|
|
|
1430
1425
|
*/
|
|
1431
1426
|
async getUserEngagementCount(t, n) {
|
|
1432
1427
|
if (!await this.token.autoLogin()) return {};
|
|
1433
|
-
const { data: r } = await this.req.get("event/user-engagements-count",
|
|
1428
|
+
const { data: r } = await this.req.get("event/user-engagements-count", Jn, {
|
|
1434
1429
|
message: !1,
|
|
1435
1430
|
params: c({ ...n, event_id: this.event, feature_id: t })
|
|
1436
1431
|
});
|
|
@@ -1449,7 +1444,7 @@ class ea {
|
|
|
1449
1444
|
engagements: [],
|
|
1450
1445
|
next_token: ""
|
|
1451
1446
|
};
|
|
1452
|
-
const { data: a } = await this.req.get("event/user-engagements",
|
|
1447
|
+
const { data: a } = await this.req.get("event/user-engagements", Zn, {
|
|
1453
1448
|
...r,
|
|
1454
1449
|
params: c({
|
|
1455
1450
|
max_results: 20,
|
|
@@ -1481,7 +1476,7 @@ class ea {
|
|
|
1481
1476
|
engagement: n,
|
|
1482
1477
|
...r
|
|
1483
1478
|
}),
|
|
1484
|
-
|
|
1479
|
+
Xn,
|
|
1485
1480
|
a
|
|
1486
1481
|
);
|
|
1487
1482
|
return o ?? {
|
|
@@ -1505,7 +1500,7 @@ class ea {
|
|
|
1505
1500
|
...t,
|
|
1506
1501
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1507
1502
|
}),
|
|
1508
|
-
|
|
1503
|
+
Yn,
|
|
1509
1504
|
n
|
|
1510
1505
|
);
|
|
1511
1506
|
return r?.claimed_items || {
|
|
@@ -1526,7 +1521,7 @@ class ea {
|
|
|
1526
1521
|
...t,
|
|
1527
1522
|
server_id: t.server_id ? +t.server_id : void 0
|
|
1528
1523
|
}),
|
|
1529
|
-
|
|
1524
|
+
Wn,
|
|
1530
1525
|
n
|
|
1531
1526
|
);
|
|
1532
1527
|
return r?.rewards || {
|
|
@@ -1544,7 +1539,7 @@ class ea {
|
|
|
1544
1539
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1545
1540
|
"event/claim-weixin-hongbao",
|
|
1546
1541
|
{ reward_id: t },
|
|
1547
|
-
|
|
1542
|
+
er,
|
|
1548
1543
|
n
|
|
1549
1544
|
);
|
|
1550
1545
|
return r || {
|
|
@@ -1585,7 +1580,7 @@ class ea {
|
|
|
1585
1580
|
const { data: r } = await this.req.post(
|
|
1586
1581
|
"event/user-rewards",
|
|
1587
1582
|
c({ max_results: 20, ...t, event_id: this.event }),
|
|
1588
|
-
|
|
1583
|
+
tr,
|
|
1589
1584
|
n
|
|
1590
1585
|
);
|
|
1591
1586
|
return {
|
|
@@ -1633,7 +1628,7 @@ class ea {
|
|
|
1633
1628
|
*/
|
|
1634
1629
|
async getUnlimitQrcodeScene(t, n) {
|
|
1635
1630
|
if (!await this.token.autoLogin()) return null;
|
|
1636
|
-
const { data: r } = await this.req.get("event/unlimit-qrcode-scene",
|
|
1631
|
+
const { data: r } = await this.req.get("event/unlimit-qrcode-scene", nr, {
|
|
1637
1632
|
...n,
|
|
1638
1633
|
params: { params: t }
|
|
1639
1634
|
});
|
|
@@ -1647,7 +1642,7 @@ class ea {
|
|
|
1647
1642
|
* @param scene - 小程序码 scene 值
|
|
1648
1643
|
*/
|
|
1649
1644
|
async getParamsByQrcodeScene(t, n) {
|
|
1650
|
-
const { data: r } = await this.req.get("event/params-by-qrcode-scene",
|
|
1645
|
+
const { data: r } = await this.req.get("event/params-by-qrcode-scene", rr, {
|
|
1651
1646
|
...n,
|
|
1652
1647
|
params: { scene: t }
|
|
1653
1648
|
});
|
|
@@ -1663,7 +1658,7 @@ class ea {
|
|
|
1663
1658
|
const { data: r } = await this.req.post(
|
|
1664
1659
|
"event/unlimit-qrcode",
|
|
1665
1660
|
c(t),
|
|
1666
|
-
|
|
1661
|
+
ar,
|
|
1667
1662
|
n
|
|
1668
1663
|
);
|
|
1669
1664
|
return r?.img ?? null;
|
|
@@ -1675,7 +1670,7 @@ class ea {
|
|
|
1675
1670
|
*/
|
|
1676
1671
|
async getQuestProgress(t, n) {
|
|
1677
1672
|
if (!await this.token.autoLogin()) return null;
|
|
1678
|
-
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`,
|
|
1673
|
+
const { data: r, code: a, message: o } = await this.req.get(`event/${this.event}/quest-progress`, or, {
|
|
1679
1674
|
message: !1,
|
|
1680
1675
|
...n,
|
|
1681
1676
|
params: { feature_id: t }
|
|
@@ -1695,7 +1690,7 @@ class ea {
|
|
|
1695
1690
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
1696
1691
|
"event/vote2/rewards",
|
|
1697
1692
|
{ feature_id: t },
|
|
1698
|
-
|
|
1693
|
+
ir,
|
|
1699
1694
|
n
|
|
1700
1695
|
);
|
|
1701
1696
|
return r || {
|
|
@@ -1710,19 +1705,19 @@ class ea {
|
|
|
1710
1705
|
*/
|
|
1711
1706
|
async getVote2Leaderboard(t, n) {
|
|
1712
1707
|
if (!await this.token.autoLogin()) return [];
|
|
1713
|
-
const { data: r } = await this.req.get("event/vote2/leaderboard",
|
|
1708
|
+
const { data: r } = await this.req.get("event/vote2/leaderboard", sr, {
|
|
1714
1709
|
...n,
|
|
1715
1710
|
params: { feature_id: t }
|
|
1716
1711
|
});
|
|
1717
1712
|
return r?.candidate_votes || [];
|
|
1718
1713
|
}
|
|
1719
1714
|
}
|
|
1720
|
-
const
|
|
1715
|
+
const cr = {
|
|
1721
1716
|
/** 所有人均可以发帖 */
|
|
1722
1717
|
All: "all",
|
|
1723
1718
|
/** 指定用户可发帖 */
|
|
1724
1719
|
Limit: "limit"
|
|
1725
|
-
},
|
|
1720
|
+
}, lr = e.string().enum(cr).lock(), ur = {
|
|
1726
1721
|
/** 待审核(仅自己可见) */
|
|
1727
1722
|
Pending: "pending",
|
|
1728
1723
|
/** 审核通过 */
|
|
@@ -1731,14 +1726,14 @@ const lr = {
|
|
|
1731
1726
|
Failed: "failed",
|
|
1732
1727
|
/** 嫌疑(仅自己可见) */
|
|
1733
1728
|
Suspect: "suspect"
|
|
1734
|
-
}, oe = e.string().enum(ur).lock(),
|
|
1729
|
+
}, oe = e.string().enum(ur).lock(), mr = {
|
|
1735
1730
|
/** 系统通知 */
|
|
1736
1731
|
System: "system",
|
|
1737
1732
|
/** 评论我的 */
|
|
1738
1733
|
Comment: "comment",
|
|
1739
1734
|
/** 点赞通知 */
|
|
1740
1735
|
Like: "like"
|
|
1741
|
-
},
|
|
1736
|
+
}, ea = e.string().enum(mr).lock(), m = {
|
|
1742
1737
|
/** 系统通知 */
|
|
1743
1738
|
System: "system",
|
|
1744
1739
|
/** 帖子被置顶 */
|
|
@@ -1763,15 +1758,15 @@ const lr = {
|
|
|
1763
1758
|
ReplyLiked: "reply_liked",
|
|
1764
1759
|
/** 回复被删除 */
|
|
1765
1760
|
ReplyDeleted: "reply_deleted"
|
|
1766
|
-
},
|
|
1761
|
+
}, dr = e.string().enum(m).lock(), ie = e.object({
|
|
1767
1762
|
forum_id: e.number(),
|
|
1768
1763
|
icon_url: e.string(),
|
|
1769
1764
|
name: e.string(),
|
|
1770
1765
|
tags: e.array(e.string()),
|
|
1771
1766
|
sort: e.number(),
|
|
1772
|
-
mode:
|
|
1767
|
+
mode: lr,
|
|
1773
1768
|
member_ids: e.array(e.number())
|
|
1774
|
-
}).lock(),
|
|
1769
|
+
}).lock(), D = e.object({
|
|
1775
1770
|
topic_id: e.number(),
|
|
1776
1771
|
cover_url: e.string(),
|
|
1777
1772
|
name: e.string(),
|
|
@@ -1792,7 +1787,7 @@ const lr = {
|
|
|
1792
1787
|
comments_num: e.number(),
|
|
1793
1788
|
liked: e.bool(),
|
|
1794
1789
|
image_urls: e.array(e.string()),
|
|
1795
|
-
topics: e.array(
|
|
1790
|
+
topics: e.array(D),
|
|
1796
1791
|
event_ids: e.array(e.number()),
|
|
1797
1792
|
is_pinned: e.bool(),
|
|
1798
1793
|
is_highlighted: e.bool(),
|
|
@@ -1800,7 +1795,7 @@ const lr = {
|
|
|
1800
1795
|
create_time: e.number()
|
|
1801
1796
|
}).lock(), se = e.object({
|
|
1802
1797
|
err_msg: e.string().optional()
|
|
1803
|
-
}).optional().lock(),
|
|
1798
|
+
}).optional().lock(), gr = e.object({
|
|
1804
1799
|
reply_id: e.number(),
|
|
1805
1800
|
reply_content: e.string().optional(),
|
|
1806
1801
|
replied_by: e.string(),
|
|
@@ -1819,7 +1814,7 @@ const lr = {
|
|
|
1819
1814
|
content: e.string(),
|
|
1820
1815
|
like_num: e.number(),
|
|
1821
1816
|
liked: e.bool(),
|
|
1822
|
-
reply_to:
|
|
1817
|
+
reply_to: gr,
|
|
1823
1818
|
create_time: e.number()
|
|
1824
1819
|
}).lock(), h = e.object({
|
|
1825
1820
|
comment_id: e.number(),
|
|
@@ -1841,22 +1836,22 @@ const lr = {
|
|
|
1841
1836
|
create_time: e.number(),
|
|
1842
1837
|
status: oe,
|
|
1843
1838
|
replies: e.array(C).optional()
|
|
1844
|
-
}).lock(),
|
|
1839
|
+
}).lock(), pr = e.object({
|
|
1845
1840
|
image_url: e.string(),
|
|
1846
1841
|
upload_url: e.string(),
|
|
1847
1842
|
existed: e.bool()
|
|
1848
1843
|
}).lock(), _ = e.object({
|
|
1849
1844
|
notification_id: e.string(),
|
|
1850
|
-
notification_type:
|
|
1845
|
+
notification_type: dr,
|
|
1851
1846
|
is_read: e.bool(),
|
|
1852
1847
|
create_time: e.number(),
|
|
1853
1848
|
origin_user_id: e.string(),
|
|
1854
1849
|
origin_user_name: e.string(),
|
|
1855
1850
|
origin_user_avatar_url: e.string()
|
|
1856
|
-
}).lock(),
|
|
1851
|
+
}).lock(), _r = e.object({
|
|
1857
1852
|
system_message_subject: e.string(),
|
|
1858
1853
|
system_message_content: e.string()
|
|
1859
|
-
}).lock(),
|
|
1854
|
+
}).lock(), A = e.object({
|
|
1860
1855
|
post_id: e.number(),
|
|
1861
1856
|
post_subject: e.string(),
|
|
1862
1857
|
post_summary: e.string(),
|
|
@@ -1864,84 +1859,84 @@ const lr = {
|
|
|
1864
1859
|
}).lock(), R = e.object({
|
|
1865
1860
|
comment_id: e.number(),
|
|
1866
1861
|
comment_content: e.string()
|
|
1867
|
-
}).lock(),
|
|
1862
|
+
}).lock(), G = e.object({
|
|
1868
1863
|
reply_id: e.number(),
|
|
1869
1864
|
reply_content: e.string()
|
|
1870
|
-
}).lock(),
|
|
1865
|
+
}).lock(), br = e.object({
|
|
1871
1866
|
..._.shape,
|
|
1872
|
-
...
|
|
1873
|
-
notification_type: e.string().enum(
|
|
1874
|
-
}),
|
|
1867
|
+
..._r.shape,
|
|
1868
|
+
notification_type: e.string().enum(m.System)
|
|
1869
|
+
}), yr = e.object({
|
|
1875
1870
|
..._.shape,
|
|
1876
|
-
...
|
|
1871
|
+
...A.shape,
|
|
1877
1872
|
notification_type: e.string().enum(
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1873
|
+
m.PostPinned,
|
|
1874
|
+
m.PostHighlighted,
|
|
1875
|
+
m.PostDeleted,
|
|
1876
|
+
m.PostLiked
|
|
1882
1877
|
)
|
|
1878
|
+
}), fr = e.object({
|
|
1879
|
+
..._.shape,
|
|
1880
|
+
...A.shape,
|
|
1881
|
+
...R.shape,
|
|
1882
|
+
notification_type: e.string().enum(m.PostCommented)
|
|
1883
1883
|
}), hr = e.object({
|
|
1884
1884
|
..._.shape,
|
|
1885
|
-
...D.shape,
|
|
1886
1885
|
...R.shape,
|
|
1887
|
-
|
|
1886
|
+
...G.shape,
|
|
1887
|
+
notification_type: e.string().enum(m.CommentReplied)
|
|
1888
1888
|
}), wr = e.object({
|
|
1889
1889
|
..._.shape,
|
|
1890
1890
|
...R.shape,
|
|
1891
1891
|
...A.shape,
|
|
1892
|
-
notification_type: e.string().enum(
|
|
1892
|
+
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
1893
1893
|
}), kr = e.object({
|
|
1894
1894
|
..._.shape,
|
|
1895
|
-
...
|
|
1896
|
-
|
|
1897
|
-
notification_type: e.string().enum(u.CommentLiked, u.CommentDeleted)
|
|
1898
|
-
}), vr = e.object({
|
|
1899
|
-
..._.shape,
|
|
1900
|
-
...A.shape,
|
|
1901
|
-
notification_type: e.string().enum(u.ReplyReplied),
|
|
1895
|
+
...G.shape,
|
|
1896
|
+
notification_type: e.string().enum(m.ReplyReplied),
|
|
1902
1897
|
comment_id: e.number(),
|
|
1903
1898
|
reply_to_reply_id: e.number(),
|
|
1904
1899
|
reply_to_reply_content: e.string()
|
|
1905
|
-
}),
|
|
1900
|
+
}), vr = e.object({
|
|
1906
1901
|
..._.shape,
|
|
1907
|
-
...
|
|
1902
|
+
...G.shape,
|
|
1908
1903
|
...R.shape,
|
|
1909
|
-
notification_type: e.string().enum(
|
|
1910
|
-
}),
|
|
1904
|
+
notification_type: e.string().enum(m.ReplyLiked, m.ReplyDeleted)
|
|
1905
|
+
}), Vr = e.union(
|
|
1906
|
+
br,
|
|
1911
1907
|
yr,
|
|
1912
1908
|
fr,
|
|
1913
1909
|
hr,
|
|
1914
1910
|
wr,
|
|
1915
1911
|
kr,
|
|
1916
|
-
vr
|
|
1917
|
-
|
|
1918
|
-
).satisfies().lock(), Rr = s({ forums: e.array(ie) }), jr = s({ topics: e.array(U) }), Tr = s({ topic: U }), qr = s({ post: I }), K = s({
|
|
1912
|
+
vr
|
|
1913
|
+
).satisfies().lock(), Cr = s({ forums: e.array(ie) }), Rr = s({ topics: e.array(D) }), jr = s({ topic: D }), Tr = s({ post: I }), K = s({
|
|
1919
1914
|
posts: e.array(I),
|
|
1920
1915
|
next_token: e.string().optional()
|
|
1921
|
-
}),
|
|
1916
|
+
}), qr = s({
|
|
1922
1917
|
post: I.clone().optional(),
|
|
1923
1918
|
antispam: se.clone().optional()
|
|
1924
|
-
}),
|
|
1919
|
+
}), xr = s({
|
|
1925
1920
|
replies: e.array(C),
|
|
1926
1921
|
next_token: e.string().optional()
|
|
1927
|
-
}),
|
|
1922
|
+
}), Sr = s({ reply: C }), Lr = s({
|
|
1928
1923
|
reply: C.clone().optional(),
|
|
1929
1924
|
antispam: se.clone().optional()
|
|
1930
|
-
}),
|
|
1925
|
+
}), Pr = s({ comment: h }), Er = s({
|
|
1931
1926
|
comments: e.array(h),
|
|
1932
1927
|
next_token: e.string().optional()
|
|
1933
|
-
}),
|
|
1928
|
+
}), $r = s({
|
|
1934
1929
|
comment: h.clone().optional(),
|
|
1935
1930
|
antispam: h.clone().optional()
|
|
1936
|
-
}),
|
|
1937
|
-
notifications: e.array(
|
|
1931
|
+
}), Fr = e.guard(pr), Ur = s({
|
|
1932
|
+
notifications: e.array(Vr),
|
|
1938
1933
|
next_token: e.string().optional()
|
|
1939
1934
|
}), Dr = s({
|
|
1940
1935
|
system: e.number(),
|
|
1941
1936
|
comment: e.number(),
|
|
1942
1937
|
like: e.number()
|
|
1943
1938
|
});
|
|
1944
|
-
class
|
|
1939
|
+
class ta {
|
|
1945
1940
|
token;
|
|
1946
1941
|
req;
|
|
1947
1942
|
constructor(t) {
|
|
@@ -1953,7 +1948,7 @@ class na {
|
|
|
1953
1948
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=QaqUa2K0z0
|
|
1954
1949
|
*/
|
|
1955
1950
|
async getForums(t) {
|
|
1956
|
-
const { data: n } = await this.req.get("community/forums",
|
|
1951
|
+
const { data: n } = await this.req.get("community/forums", Cr, t);
|
|
1957
1952
|
return n?.forums || [];
|
|
1958
1953
|
}
|
|
1959
1954
|
/**
|
|
@@ -1962,7 +1957,7 @@ class na {
|
|
|
1962
1957
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=mIwpymAQom
|
|
1963
1958
|
*/
|
|
1964
1959
|
async getTopics(t) {
|
|
1965
|
-
const { data: n } = await this.req.get("community/topics",
|
|
1960
|
+
const { data: n } = await this.req.get("community/topics", Rr, t);
|
|
1966
1961
|
return n?.topics || [];
|
|
1967
1962
|
}
|
|
1968
1963
|
/**
|
|
@@ -1971,7 +1966,7 @@ class na {
|
|
|
1971
1966
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=Jvw7xMK31K
|
|
1972
1967
|
*/
|
|
1973
1968
|
async getTopic(t, n) {
|
|
1974
|
-
const { data: r, code: a } = await this.req.get("community/topic",
|
|
1969
|
+
const { data: r, code: a } = await this.req.get("community/topic", jr, {
|
|
1975
1970
|
...n,
|
|
1976
1971
|
params: { topic_id: t }
|
|
1977
1972
|
});
|
|
@@ -2013,7 +2008,7 @@ class na {
|
|
|
2013
2008
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=hj1AZy5rcP
|
|
2014
2009
|
*/
|
|
2015
2010
|
async getPost(t, n) {
|
|
2016
|
-
const { data: r, code: a, message: o } = await this.req.get("community/post",
|
|
2011
|
+
const { data: r, code: a, message: o } = await this.req.get("community/post", Tr, {
|
|
2017
2012
|
...n,
|
|
2018
2013
|
params: { post_id: t }
|
|
2019
2014
|
});
|
|
@@ -2031,7 +2026,7 @@ class na {
|
|
|
2031
2026
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2032
2027
|
"community/post",
|
|
2033
2028
|
c(t),
|
|
2034
|
-
|
|
2029
|
+
qr,
|
|
2035
2030
|
n
|
|
2036
2031
|
);
|
|
2037
2032
|
return r ?? {
|
|
@@ -2045,7 +2040,7 @@ class na {
|
|
|
2045
2040
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=djKbX7lFdp
|
|
2046
2041
|
*/
|
|
2047
2042
|
async getComments(t, n) {
|
|
2048
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comments",
|
|
2043
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comments", Er, {
|
|
2049
2044
|
...n,
|
|
2050
2045
|
params: c(t)
|
|
2051
2046
|
});
|
|
@@ -2060,7 +2055,7 @@ class na {
|
|
|
2060
2055
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=RIc7oxVGae
|
|
2061
2056
|
*/
|
|
2062
2057
|
async getComment(t, n) {
|
|
2063
|
-
const { data: r, code: a, message: o } = await this.req.get("community/comment",
|
|
2058
|
+
const { data: r, code: a, message: o } = await this.req.get("community/comment", Pr, {
|
|
2064
2059
|
...n,
|
|
2065
2060
|
params: { comment_id: t }
|
|
2066
2061
|
});
|
|
@@ -2079,7 +2074,7 @@ class na {
|
|
|
2079
2074
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2080
2075
|
"community/comment",
|
|
2081
2076
|
c(t),
|
|
2082
|
-
|
|
2077
|
+
$r,
|
|
2083
2078
|
n
|
|
2084
2079
|
);
|
|
2085
2080
|
return r ?? {
|
|
@@ -2093,7 +2088,7 @@ class na {
|
|
|
2093
2088
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=sVKBbY83MY
|
|
2094
2089
|
*/
|
|
2095
2090
|
async getReplies(t, n) {
|
|
2096
|
-
const { data: r } = await this.req.get("community/replies",
|
|
2091
|
+
const { data: r } = await this.req.get("community/replies", xr, {
|
|
2097
2092
|
...n,
|
|
2098
2093
|
params: c({ max_results: 20, ...t })
|
|
2099
2094
|
});
|
|
@@ -2108,7 +2103,7 @@ class na {
|
|
|
2108
2103
|
* https://kdocs.cn/l/cbggfJodHLIz?linkname=kxhcSXD3MG
|
|
2109
2104
|
*/
|
|
2110
2105
|
async getReply(t, n) {
|
|
2111
|
-
const { data: r, code: a, message: o } = await this.req.get("community/reply",
|
|
2106
|
+
const { data: r, code: a, message: o } = await this.req.get("community/reply", Sr, {
|
|
2112
2107
|
...n,
|
|
2113
2108
|
params: { reply_id: t }
|
|
2114
2109
|
});
|
|
@@ -2127,7 +2122,7 @@ class na {
|
|
|
2127
2122
|
const { data: r, code: a, message: o } = await this.req.post(
|
|
2128
2123
|
"community/reply",
|
|
2129
2124
|
c(t),
|
|
2130
|
-
|
|
2125
|
+
Lr,
|
|
2131
2126
|
n
|
|
2132
2127
|
);
|
|
2133
2128
|
return r ?? {
|
|
@@ -2178,7 +2173,7 @@ class na {
|
|
|
2178
2173
|
*/
|
|
2179
2174
|
async getMediaPresignedUrl(t, n) {
|
|
2180
2175
|
await this.token.autoLogin();
|
|
2181
|
-
const { data: r } = await this.req.get("community/media-presign-url",
|
|
2176
|
+
const { data: r } = await this.req.get("community/media-presign-url", Fr, {
|
|
2182
2177
|
...n,
|
|
2183
2178
|
params: t
|
|
2184
2179
|
});
|
|
@@ -2193,7 +2188,7 @@ class na {
|
|
|
2193
2188
|
*/
|
|
2194
2189
|
async getNotifications(t, n) {
|
|
2195
2190
|
await this.token.autoLogin();
|
|
2196
|
-
const { data: r } = await this.req.get("community/notifications",
|
|
2191
|
+
const { data: r } = await this.req.get("community/notifications", Ur, {
|
|
2197
2192
|
...n,
|
|
2198
2193
|
params: c({ max_results: 20, ...t })
|
|
2199
2194
|
});
|
|
@@ -2227,17 +2222,17 @@ class na {
|
|
|
2227
2222
|
return r;
|
|
2228
2223
|
}
|
|
2229
2224
|
}
|
|
2230
|
-
const
|
|
2225
|
+
const Ir = s({
|
|
2231
2226
|
nonce_str: e.string(),
|
|
2232
2227
|
timestamp: e.number(),
|
|
2233
2228
|
signature: e.string()
|
|
2234
2229
|
});
|
|
2235
|
-
var
|
|
2230
|
+
var Ar = /* @__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))(Ar || {});
|
|
2236
2231
|
function S(i) {
|
|
2237
2232
|
return w(i, "open_id", "union_id", "weixin_token");
|
|
2238
2233
|
}
|
|
2239
2234
|
const H = "wx_login_cache";
|
|
2240
|
-
class
|
|
2235
|
+
class na {
|
|
2241
2236
|
token;
|
|
2242
2237
|
$appid;
|
|
2243
2238
|
req;
|
|
@@ -2327,9 +2322,9 @@ class ra {
|
|
|
2327
2322
|
async webLogin(t = "snsapi_userinfo", n) {
|
|
2328
2323
|
const r = L("code"), a = Date.now(), o = +L("state");
|
|
2329
2324
|
if (!r || !o || o < a - 1e3 * 60 * 5 || o > a) {
|
|
2330
|
-
const
|
|
2325
|
+
const ue = O(["code", "state"]);
|
|
2331
2326
|
location.replace(
|
|
2332
|
-
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(
|
|
2327
|
+
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${encodeURIComponent(ue)}&response_type=code&scope=${t}&state=${a}#wechat_redirect`
|
|
2333
2328
|
);
|
|
2334
2329
|
return;
|
|
2335
2330
|
}
|
|
@@ -2338,7 +2333,7 @@ class ra {
|
|
|
2338
2333
|
message: "Error: " + r,
|
|
2339
2334
|
error: r
|
|
2340
2335
|
};
|
|
2341
|
-
const g =
|
|
2336
|
+
const g = O(["code", "state"]);
|
|
2342
2337
|
"replaceState" in history && history.replaceState({}, "", g);
|
|
2343
2338
|
const {
|
|
2344
2339
|
data: p,
|
|
@@ -2377,7 +2372,7 @@ class ra {
|
|
|
2377
2372
|
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=CuWOqxr9Ue
|
|
2378
2373
|
*/
|
|
2379
2374
|
async getJSSDKConfig(t) {
|
|
2380
|
-
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign",
|
|
2375
|
+
const { data: n } = await this.req.get("weixin/offiaccount/jssdk-sign", Ir, {
|
|
2381
2376
|
...t,
|
|
2382
2377
|
params: {
|
|
2383
2378
|
appid: this.appid,
|
|
@@ -2394,22 +2389,22 @@ class ra {
|
|
|
2394
2389
|
}
|
|
2395
2390
|
export {
|
|
2396
2391
|
se as AntispamValidator,
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2392
|
+
Qr as AuthToken,
|
|
2393
|
+
En as CandidateVoteValidator,
|
|
2394
|
+
pn as CashbackEngagementDataValidator,
|
|
2395
|
+
_n as ClaimActivationKeyEngagementDataValidator,
|
|
2401
2396
|
st as ClaimRewardStatus,
|
|
2402
|
-
|
|
2403
|
-
|
|
2397
|
+
E as ClaimRewardStatusValidator,
|
|
2398
|
+
Qn as ClaimedItemValidator,
|
|
2404
2399
|
Z as ClubAddressValidator,
|
|
2405
|
-
|
|
2400
|
+
Mr as ClubApi,
|
|
2406
2401
|
X as ClubBenefitSummaryValidator,
|
|
2407
2402
|
Ae as ClubBenefitValidator,
|
|
2408
2403
|
je as ClubCreditChangeScene,
|
|
2409
2404
|
Te as ClubCreditChangeSceneValidator,
|
|
2410
2405
|
Ce as ClubCreditChangeType,
|
|
2411
2406
|
Re as ClubCreditChangeTypeValidator,
|
|
2412
|
-
|
|
2407
|
+
Ie as ClubCreditLogValidator,
|
|
2413
2408
|
Le as ClubGlobalConfigValidator,
|
|
2414
2409
|
qe as ClubItemType,
|
|
2415
2410
|
z as ClubItemTypeValidator,
|
|
@@ -2417,133 +2412,132 @@ export {
|
|
|
2417
2412
|
Y as ClubProductValidator,
|
|
2418
2413
|
xe as ClubRedemptionStatus,
|
|
2419
2414
|
Se as ClubRedemptionStatusValidator,
|
|
2420
|
-
|
|
2415
|
+
De as ClubUserCreditValidator,
|
|
2421
2416
|
Ue as ClubUserProfileValidator,
|
|
2422
|
-
|
|
2417
|
+
Un as CommentEngagementValidator,
|
|
2423
2418
|
h as CommentValidator,
|
|
2424
|
-
|
|
2425
|
-
na as CommunityApi,
|
|
2419
|
+
ta as CommunityApi,
|
|
2426
2420
|
Ye as EngageAccountType,
|
|
2427
2421
|
We as EngageAccountTypeValidator,
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2422
|
+
Nn as EngageResponseValidator,
|
|
2423
|
+
In as EngageRewardValidator,
|
|
2424
|
+
Wr as EventApi,
|
|
2425
|
+
gn as EventConfigValidator,
|
|
2426
|
+
ht as EventFeatureConfigOfCashbackValidator,
|
|
2427
|
+
kt as EventFeatureConfigOfCheckInValidator,
|
|
2428
|
+
Vt as EventFeatureConfigOfClaimActivationKeyValidator,
|
|
2429
|
+
Rt as EventFeatureConfigOfClaimRewardsValidator,
|
|
2430
|
+
Tt as EventFeatureConfigOfCommentValidator,
|
|
2431
|
+
xt as EventFeatureConfigOfFollowValidator,
|
|
2432
|
+
Pt as EventFeatureConfigOfGiftCodeValidator,
|
|
2433
|
+
$t as EventFeatureConfigOfInviteValidator,
|
|
2434
|
+
Ut as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2435
|
+
Nt as EventFeatureConfigOfLotteryDrawValidator,
|
|
2436
|
+
Gt as EventFeatureConfigOfLotteryValidator,
|
|
2437
|
+
Bt as EventFeatureConfigOfPreregisterValidator,
|
|
2438
|
+
Kt as EventFeatureConfigOfQuestValidator,
|
|
2439
|
+
zt as EventFeatureConfigOfRegisterValidator,
|
|
2440
|
+
Zt as EventFeatureConfigOfShareValidator,
|
|
2441
|
+
Yt as EventFeatureConfigOfSubscribeValidator,
|
|
2442
|
+
en as EventFeatureConfigOfSurveyValidator,
|
|
2443
|
+
nn as EventFeatureConfigOfTeamValidator,
|
|
2444
|
+
ln as EventFeatureConfigOfVote2Validator,
|
|
2445
|
+
on as EventFeatureConfigOfVoteValidator,
|
|
2446
|
+
dn as EventFeatureConfigValidator,
|
|
2453
2447
|
et as EventPeriodType,
|
|
2454
2448
|
tt as EventPeriodTypeValidator,
|
|
2455
|
-
|
|
2449
|
+
F as EventRewardItemConfigValidator,
|
|
2456
2450
|
Oe as ExtraGameRewardValidator,
|
|
2457
2451
|
Ge as ExtraPhysicalShipmentValidator,
|
|
2458
|
-
|
|
2452
|
+
P as FeatureRewardValidator,
|
|
2459
2453
|
l as FeatureType,
|
|
2460
2454
|
nt as FeatureTypeValidator,
|
|
2461
|
-
|
|
2462
|
-
|
|
2455
|
+
cr as ForumMode,
|
|
2456
|
+
lr as ForumModeValidator,
|
|
2463
2457
|
ie as ForumValidator,
|
|
2464
2458
|
v as GamerItemType,
|
|
2465
2459
|
W as GamerItemTypeValidator,
|
|
2466
2460
|
ve as Gender,
|
|
2467
2461
|
Ve as GenderValidator,
|
|
2468
|
-
|
|
2469
|
-
|
|
2462
|
+
bn as GiftCodeEngagementDataValidator,
|
|
2463
|
+
yn as InviteEngagementDataValidator,
|
|
2470
2464
|
dt as LotteryDrawAction,
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2465
|
+
Zr as LotteryDrawActionValidator,
|
|
2466
|
+
kn as LotteryDrawEngagementDataValidator,
|
|
2467
|
+
fn as LotteryEngagementDataValidator,
|
|
2474
2468
|
f as LotteryTicketStatus,
|
|
2475
|
-
|
|
2469
|
+
zr as LotteryTicketStatusValidator,
|
|
2476
2470
|
_ as NotificationBaseValidator,
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2471
|
+
mr as NotificationCategory,
|
|
2472
|
+
ea as NotificationCategoryValidator,
|
|
2473
|
+
hr as NotificationCommentReplyValidator,
|
|
2474
|
+
wr as NotificationCommentValidator,
|
|
2481
2475
|
R as NotificationPayloadCommentValidator,
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2476
|
+
A as NotificationPayloadPostValidator,
|
|
2477
|
+
G as NotificationPayloadReplyValidator,
|
|
2478
|
+
_r as NotificationPayloadSystemValidator,
|
|
2479
|
+
fr as NotificationPostCommentValidator,
|
|
2480
|
+
yr as NotificationPostValidator,
|
|
2481
|
+
kr as NotificationReplyRepliedValidator,
|
|
2482
|
+
vr as NotificationReplyValidator,
|
|
2483
|
+
br as NotificationSystemValidator,
|
|
2484
|
+
m as NotificationType,
|
|
2485
|
+
dr as NotificationTypeValidator,
|
|
2486
|
+
Vr as NotificationValidator,
|
|
2493
2487
|
Fe as PlayerRoleCardValidator,
|
|
2494
2488
|
J as PlayerRoleValidator,
|
|
2495
2489
|
ur as PostStatus,
|
|
2496
2490
|
oe as PostStatusValidator,
|
|
2497
2491
|
I as PostValidator,
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2492
|
+
vn as PreregisterEngagementDataValidator,
|
|
2493
|
+
pr as PresignedUrlResponseValidator,
|
|
2494
|
+
Vn as QuestEngagementDataValidator,
|
|
2501
2495
|
rt as QuestObjective,
|
|
2502
2496
|
te as QuestObjectiveValidator,
|
|
2503
2497
|
re as QuestProgressAlgorithm,
|
|
2504
2498
|
gt as QuestProgressAlgorithmOptionalValidator,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2499
|
+
Xr as QuestProgressAlgorithmValidator,
|
|
2500
|
+
Cn as QuestProgressValidator,
|
|
2501
|
+
Br as RedeemParamsValidator,
|
|
2508
2502
|
Ne as RedemptionValidator,
|
|
2509
2503
|
yt as RegularRewardValidator,
|
|
2510
|
-
|
|
2504
|
+
gr as ReplyToValidator,
|
|
2511
2505
|
C as ReplyValidator,
|
|
2512
|
-
|
|
2506
|
+
Kr as RewardItemType,
|
|
2513
2507
|
ee as RewardItemTypeValidator,
|
|
2514
2508
|
ct as RewardSource,
|
|
2515
|
-
|
|
2509
|
+
$ as RewardSourceValidator,
|
|
2516
2510
|
d as RewardStatus,
|
|
2517
2511
|
it as RewardStatusSuffix,
|
|
2518
2512
|
ne as RewardStatusSuffixValidator,
|
|
2519
|
-
|
|
2513
|
+
Hr as RewardStatusValidator,
|
|
2520
2514
|
Dn as RewardValidator,
|
|
2521
2515
|
$e as RoleBaseInfoValidator,
|
|
2522
2516
|
Ee as ServerBaseInfoValidator,
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2517
|
+
Rn as ShareEngagementDataValidator,
|
|
2518
|
+
Tn as SurveyEngagementDataValidator,
|
|
2519
|
+
mt as TeamAction,
|
|
2520
|
+
Jr as TeamActionValidator,
|
|
2521
|
+
xn as TeamEngagementDataValidator,
|
|
2522
|
+
qn as TeamEngagementValidator,
|
|
2523
|
+
Yr as TeamMemberValidator,
|
|
2530
2524
|
lt as TeamVisibility,
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2525
|
+
ut as TeamVisibilityValidator,
|
|
2526
|
+
D as TopicValidator,
|
|
2527
|
+
U as UserEngagementDataValidator,
|
|
2528
|
+
An as UserEngagementValidator,
|
|
2529
|
+
On as UserFeatureStatusValidator,
|
|
2536
2530
|
V as UserRewardValidator,
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2531
|
+
Gn as VerifyMobileResultValidator,
|
|
2532
|
+
Pn as Vote2ClaimRewardsResponseValidator,
|
|
2533
|
+
Ln as Vote2EngagementDataValidator,
|
|
2540
2534
|
pt as Vote2RewardType,
|
|
2541
2535
|
_t as Vote2RewardTypeValidator,
|
|
2542
|
-
|
|
2536
|
+
Sn as VoteEngagementDataValidator,
|
|
2543
2537
|
at as VoteOptionSource,
|
|
2544
2538
|
ot as VoteOptionSourceValidator,
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2539
|
+
na as WeixinApi,
|
|
2540
|
+
jn as WeixinSubscribeEngagementDataValidator,
|
|
2541
|
+
Ar as WeixinWebLoginErrorCode,
|
|
2542
|
+
Ir as isWeixinSignResponse
|
|
2549
2543
|
};
|