@seayoo-web/gamer-api 2.0.18 → 2.0.19
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 +30 -25
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -71,6 +71,11 @@ class hr {
|
|
|
71
71
|
this.$NetRequest = n, this.req = n({
|
|
72
72
|
baseURL: `${r}/v1`,
|
|
73
73
|
timeout: 1e4,
|
|
74
|
+
maxRetry: 2,
|
|
75
|
+
retryInterval: "2EB",
|
|
76
|
+
retryResolve({ method: s, status: d }) {
|
|
77
|
+
return s === "GET" && d < 0;
|
|
78
|
+
},
|
|
74
79
|
responseRule: {
|
|
75
80
|
ok: { resolve: "body" },
|
|
76
81
|
failed: {
|
|
@@ -307,12 +312,12 @@ const ve = {
|
|
|
307
312
|
district: e.string(),
|
|
308
313
|
address: e.string(),
|
|
309
314
|
is_default: e.bool()
|
|
310
|
-
}).lock(),
|
|
315
|
+
}).lock(), Ie = e.object({
|
|
311
316
|
increased_credit: e.number(),
|
|
312
317
|
decreased_credit: e.number(),
|
|
313
318
|
expired_credit: e.number(),
|
|
314
319
|
balance_credit: e.number()
|
|
315
|
-
}).lock(),
|
|
320
|
+
}).lock(), De = e.object({
|
|
316
321
|
id: e.number(),
|
|
317
322
|
change_type: Ve,
|
|
318
323
|
change_scene: Te,
|
|
@@ -392,8 +397,8 @@ const ve = {
|
|
|
392
397
|
status: Se,
|
|
393
398
|
created_at: e.number(),
|
|
394
399
|
extra_data: e.union(Ne.clone(), Ae.clone()).satisfies().optional()
|
|
395
|
-
}), Be = e.guard(Le), O = o({ player: Pe }), Qe = o({ roles: e.array(J) }), T = o({ role_card: Ue }), B = e.guard(Fe), Q = e.guard(K), Me = o({ addresses: e.array(K) }), He = e.guard(
|
|
396
|
-
credit_logs: e.array(
|
|
400
|
+
}), Be = e.guard(Le), O = o({ player: Pe }), Qe = o({ roles: e.array(J) }), T = o({ role_card: Ue }), B = e.guard(Fe), Q = e.guard(K), Me = o({ addresses: e.array(K) }), He = e.guard(Ie), ze = o({
|
|
401
|
+
credit_logs: e.array(De),
|
|
397
402
|
next_token: e.string().optional()
|
|
398
403
|
}), Je = o({ products: e.array(Y) }), Ke = o({ benefits: e.array(X) }), Xe = o({ benefit: Ge }), Ye = o({
|
|
399
404
|
redemptions: e.array(Oe),
|
|
@@ -903,9 +908,9 @@ const R = {
|
|
|
903
908
|
draw_not_before: e.number(),
|
|
904
909
|
draw_not_after: e.number()
|
|
905
910
|
})
|
|
906
|
-
}),
|
|
911
|
+
}), It = c.Preregister, Dt = e.object({
|
|
907
912
|
...u.shape,
|
|
908
|
-
feature_type: e.string().enum(
|
|
913
|
+
feature_type: e.string().enum(It)
|
|
909
914
|
}), Gt = c.Quest, Nt = e.object({
|
|
910
915
|
...u.shape,
|
|
911
916
|
feature_type: e.string().enum(Gt),
|
|
@@ -980,7 +985,7 @@ const R = {
|
|
|
980
985
|
St,
|
|
981
986
|
$t,
|
|
982
987
|
Ft,
|
|
983
|
-
|
|
988
|
+
Dt,
|
|
984
989
|
Nt,
|
|
985
990
|
Ot,
|
|
986
991
|
Qt,
|
|
@@ -1183,7 +1188,7 @@ const R = {
|
|
|
1183
1188
|
scene: e.string()
|
|
1184
1189
|
}), Fn = o({
|
|
1185
1190
|
params: e.string()
|
|
1186
|
-
}),
|
|
1191
|
+
}), In = o({
|
|
1187
1192
|
img: e.string()
|
|
1188
1193
|
});
|
|
1189
1194
|
class qr {
|
|
@@ -1428,16 +1433,16 @@ class qr {
|
|
|
1428
1433
|
*/
|
|
1429
1434
|
async generateUnlimitQrcode(t) {
|
|
1430
1435
|
if (!await this.token.autoLogin()) return null;
|
|
1431
|
-
const { data: n } = await this.req.post("event/unlimit-qrcode", a(t),
|
|
1436
|
+
const { data: n } = await this.req.post("event/unlimit-qrcode", a(t), In);
|
|
1432
1437
|
return (n == null ? void 0 : n.img) ?? null;
|
|
1433
1438
|
}
|
|
1434
1439
|
}
|
|
1435
|
-
const
|
|
1440
|
+
const Dn = {
|
|
1436
1441
|
/** 所有人均可以发帖 */
|
|
1437
1442
|
All: "all",
|
|
1438
1443
|
/** 指定用户可发帖 */
|
|
1439
1444
|
Limit: "limit"
|
|
1440
|
-
}, Gn = e.string().enum(
|
|
1445
|
+
}, Gn = e.string().enum(Dn).lock(), Nn = {
|
|
1441
1446
|
/** 待审核(仅自己可见) */
|
|
1442
1447
|
Pending: "pending",
|
|
1443
1448
|
/** 审核通过 */
|
|
@@ -1493,7 +1498,7 @@ const In = {
|
|
|
1493
1498
|
description: e.string(),
|
|
1494
1499
|
tags: e.array(e.string()),
|
|
1495
1500
|
post_num: e.number()
|
|
1496
|
-
}).lock(),
|
|
1501
|
+
}).lock(), I = e.object({
|
|
1497
1502
|
post_id: e.number(),
|
|
1498
1503
|
forum: ae,
|
|
1499
1504
|
posted_by: e.string(),
|
|
@@ -1571,7 +1576,7 @@ const In = {
|
|
|
1571
1576
|
}).lock(), Mn = e.object({
|
|
1572
1577
|
system_message_subject: e.string(),
|
|
1573
1578
|
system_message_content: e.string()
|
|
1574
|
-
}).lock(),
|
|
1579
|
+
}).lock(), D = e.object({
|
|
1575
1580
|
post_id: e.number(),
|
|
1576
1581
|
post_subject: e.string(),
|
|
1577
1582
|
post_summary: e.string(),
|
|
@@ -1588,7 +1593,7 @@ const In = {
|
|
|
1588
1593
|
notification_type: e.string().enum(m.System)
|
|
1589
1594
|
}), zn = e.object({
|
|
1590
1595
|
...y.shape,
|
|
1591
|
-
...
|
|
1596
|
+
...D.shape,
|
|
1592
1597
|
notification_type: e.string().enum(
|
|
1593
1598
|
m.PostPinned,
|
|
1594
1599
|
m.PostHighlighted,
|
|
@@ -1597,7 +1602,7 @@ const In = {
|
|
|
1597
1602
|
)
|
|
1598
1603
|
}), Jn = e.object({
|
|
1599
1604
|
...y.shape,
|
|
1600
|
-
...
|
|
1605
|
+
...D.shape,
|
|
1601
1606
|
...j.shape,
|
|
1602
1607
|
notification_type: e.string().enum(m.PostCommented)
|
|
1603
1608
|
}), Kn = e.object({
|
|
@@ -1608,7 +1613,7 @@ const In = {
|
|
|
1608
1613
|
}), Xn = e.object({
|
|
1609
1614
|
...y.shape,
|
|
1610
1615
|
...j.shape,
|
|
1611
|
-
...
|
|
1616
|
+
...D.shape,
|
|
1612
1617
|
notification_type: e.string().enum(m.CommentLiked, m.CommentDeleted)
|
|
1613
1618
|
}), Yn = e.object({
|
|
1614
1619
|
...y.shape,
|
|
@@ -1630,10 +1635,10 @@ const In = {
|
|
|
1630
1635
|
Xn,
|
|
1631
1636
|
Yn,
|
|
1632
1637
|
Zn
|
|
1633
|
-
).satisfies().lock(), er = o({ forums: e.array(ae) }), tr = o({ topics: e.array(F) }), nr = o({ topic: F }), rr = o({ post:
|
|
1634
|
-
posts: e.array(
|
|
1638
|
+
).satisfies().lock(), er = o({ forums: e.array(ae) }), tr = o({ topics: e.array(F) }), nr = o({ topic: F }), rr = o({ post: I }), M = o({
|
|
1639
|
+
posts: e.array(I),
|
|
1635
1640
|
next_token: e.string().optional()
|
|
1636
|
-
}), ir = o({ post:
|
|
1641
|
+
}), ir = o({ post: I, antispam: se }), or = o({
|
|
1637
1642
|
replies: e.array(V),
|
|
1638
1643
|
next_token: e.string().optional()
|
|
1639
1644
|
}), ar = o({ reply: V }), sr = o({
|
|
@@ -2040,7 +2045,7 @@ export {
|
|
|
2040
2045
|
Te as ClubCreditChangeSceneValidator,
|
|
2041
2046
|
Re as ClubCreditChangeType,
|
|
2042
2047
|
Ve as ClubCreditChangeTypeValidator,
|
|
2043
|
-
|
|
2048
|
+
De as ClubCreditLogValidator,
|
|
2044
2049
|
Le as ClubGlobalConfigValidator,
|
|
2045
2050
|
qe as ClubItemType,
|
|
2046
2051
|
z as ClubItemTypeValidator,
|
|
@@ -2048,7 +2053,7 @@ export {
|
|
|
2048
2053
|
Y as ClubProductValidator,
|
|
2049
2054
|
xe as ClubRedemptionStatus,
|
|
2050
2055
|
Se as ClubRedemptionStatusValidator,
|
|
2051
|
-
|
|
2056
|
+
Ie as ClubUserCreditValidator,
|
|
2052
2057
|
Fe as ClubUserProfileValidator,
|
|
2053
2058
|
fn as CommentEngagementValidator,
|
|
2054
2059
|
k as CommentValidator,
|
|
@@ -2069,7 +2074,7 @@ export {
|
|
|
2069
2074
|
St as EventFeatureConfigOfInvitedRegisterValidator,
|
|
2070
2075
|
Ft as EventFeatureConfigOfLotteryDrawValidator,
|
|
2071
2076
|
$t as EventFeatureConfigOfLotteryValidator,
|
|
2072
|
-
|
|
2077
|
+
Dt as EventFeatureConfigOfPreregisterValidator,
|
|
2073
2078
|
Nt as EventFeatureConfigOfQuestValidator,
|
|
2074
2079
|
Ot as EventFeatureConfigOfRegisterValidator,
|
|
2075
2080
|
Qt as EventFeatureConfigOfShareValidator,
|
|
@@ -2086,7 +2091,7 @@ export {
|
|
|
2086
2091
|
gt as FeatureRewardValidator,
|
|
2087
2092
|
c as FeatureType,
|
|
2088
2093
|
nt as FeatureTypeValidator,
|
|
2089
|
-
|
|
2094
|
+
Dn as ForumMode,
|
|
2090
2095
|
Gn as ForumModeValidator,
|
|
2091
2096
|
ae as ForumValidator,
|
|
2092
2097
|
R as GamerItemType,
|
|
@@ -2107,7 +2112,7 @@ export {
|
|
|
2107
2112
|
Kn as NotificationCommentReplyValidator,
|
|
2108
2113
|
Xn as NotificationCommentValidator,
|
|
2109
2114
|
j as NotificationPayloadCommentValidator,
|
|
2110
|
-
|
|
2115
|
+
D as NotificationPayloadPostValidator,
|
|
2111
2116
|
G as NotificationPayloadReplyValidator,
|
|
2112
2117
|
Mn as NotificationPayloadSystemValidator,
|
|
2113
2118
|
Jn as NotificationPostCommentValidator,
|
|
@@ -2122,7 +2127,7 @@ export {
|
|
|
2122
2127
|
J as PlayerRoleValidator,
|
|
2123
2128
|
Nn as PostStatus,
|
|
2124
2129
|
oe as PostStatusValidator,
|
|
2125
|
-
|
|
2130
|
+
I as PostValidator,
|
|
2126
2131
|
ln as PreregisterEngagementDataValidator,
|
|
2127
2132
|
Qn as PresignedUrlResponseValidator,
|
|
2128
2133
|
mn as QuestEngagementDataValidator,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/gamer-api",
|
|
3
3
|
"description": "agent for gamer api",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.13.1",
|
|
26
26
|
"@seayoo-web/combo-webview": "^2.5.4",
|
|
27
|
+
"@seayoo-web/request": "^3.1.1",
|
|
28
|
+
"@seayoo-web/tsconfig": "^1.0.3",
|
|
27
29
|
"@seayoo-web/utils": "^3.5.1",
|
|
28
|
-
"@seayoo-web/
|
|
29
|
-
"@seayoo-web/scripts": "^2.4.0",
|
|
30
|
-
"@seayoo-web/tsconfig": "^1.0.3"
|
|
30
|
+
"@seayoo-web/scripts": "^2.4.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@seayoo-web/combo-webview": "^2.5.4",
|
|
34
|
-
"@seayoo-web/request": "^3.
|
|
34
|
+
"@seayoo-web/request": "^3.1.1",
|
|
35
35
|
"@seayoo-web/utils": "^3.5.1"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|