@seayoo-web/gamer-api 4.2.0 → 4.2.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 +57 -55
- package/package.json +5 -5
- package/types/index.d.ts +1 -0
- package/types/src/ggd.d.ts +1 -1
- package/types/src/ggd.enums.d.ts +22 -0
package/dist/index.js
CHANGED
|
@@ -1373,10 +1373,12 @@ async function ci(e, t) {
|
|
|
1373
1373
|
error: r
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
//#endregion
|
|
1377
|
+
//#region src/ggd.enums.ts
|
|
1378
|
+
var li = {
|
|
1377
1379
|
Waiting: 1,
|
|
1378
1380
|
Playing: 2
|
|
1379
|
-
}).lock(),
|
|
1381
|
+
}, ui = u.number().enum(li).lock(), di = class {
|
|
1380
1382
|
req;
|
|
1381
1383
|
constructor(e, t) {
|
|
1382
1384
|
let n = d(e) ? e : `https://${o(e)}`;
|
|
@@ -1399,7 +1401,7 @@ var li = u.number().enum({
|
|
|
1399
1401
|
let { data: t, ok: n, code: r, message: i } = await this.req.get("describe-room", { invitation_code: e || s("invitation_code") }, l({
|
|
1400
1402
|
room_id: u.string(),
|
|
1401
1403
|
inviter_role_id: u.number(),
|
|
1402
|
-
room_status:
|
|
1404
|
+
room_status: ui,
|
|
1403
1405
|
room_mode: u.string(),
|
|
1404
1406
|
room_tags: u.array(u.string()),
|
|
1405
1407
|
max_members: u.number(),
|
|
@@ -1414,19 +1416,19 @@ var li = u.number().enum({
|
|
|
1414
1416
|
message: i
|
|
1415
1417
|
};
|
|
1416
1418
|
}
|
|
1417
|
-
},
|
|
1419
|
+
}, fi = {
|
|
1418
1420
|
All: "all",
|
|
1419
1421
|
Limit: "limit"
|
|
1420
|
-
},
|
|
1422
|
+
}, pi = u.string().enum(fi).lock(), mi = {
|
|
1421
1423
|
Pending: "pending",
|
|
1422
1424
|
Approved: "approved",
|
|
1423
1425
|
Failed: "failed",
|
|
1424
1426
|
Suspect: "suspect"
|
|
1425
|
-
}, V = u.string().enum(
|
|
1427
|
+
}, V = u.string().enum(mi).lock(), hi = {
|
|
1426
1428
|
System: "system",
|
|
1427
1429
|
Comment: "comment",
|
|
1428
1430
|
Like: "like"
|
|
1429
|
-
},
|
|
1431
|
+
}, gi = u.string().enum(hi).lock(), H = {
|
|
1430
1432
|
System: "system",
|
|
1431
1433
|
PostPinned: "post_pinned",
|
|
1432
1434
|
PostHighlighted: "post_highlighted",
|
|
@@ -1439,13 +1441,13 @@ var li = u.number().enum({
|
|
|
1439
1441
|
ReplyReplied: "reply_replied",
|
|
1440
1442
|
ReplyLiked: "reply_liked",
|
|
1441
1443
|
ReplyDeleted: "reply_deleted"
|
|
1442
|
-
},
|
|
1444
|
+
}, _i = u.string().enum(H).lock(), U = u.object({
|
|
1443
1445
|
forum_id: u.number(),
|
|
1444
1446
|
icon_url: u.string(),
|
|
1445
1447
|
name: u.string(),
|
|
1446
1448
|
tags: u.array(u.string()),
|
|
1447
1449
|
sort: u.number(),
|
|
1448
|
-
mode:
|
|
1450
|
+
mode: pi,
|
|
1449
1451
|
member_ids: u.array(u.number())
|
|
1450
1452
|
}).lock(), W = u.object({
|
|
1451
1453
|
topic_id: u.number(),
|
|
@@ -1474,7 +1476,7 @@ var li = u.number().enum({
|
|
|
1474
1476
|
is_highlighted: u.bool(),
|
|
1475
1477
|
status: V,
|
|
1476
1478
|
create_time: u.number()
|
|
1477
|
-
}).lock(), K = u.object({ err_msg: u.string().optional() }).optional().lock(),
|
|
1479
|
+
}).lock(), K = u.object({ err_msg: u.string().optional() }).optional().lock(), vi = u.object({
|
|
1478
1480
|
reply_id: u.number(),
|
|
1479
1481
|
reply_content: u.string().optional(),
|
|
1480
1482
|
replied_by: u.string(),
|
|
@@ -1493,7 +1495,7 @@ var li = u.number().enum({
|
|
|
1493
1495
|
content: u.string(),
|
|
1494
1496
|
like_num: u.number(),
|
|
1495
1497
|
liked: u.bool(),
|
|
1496
|
-
reply_to:
|
|
1498
|
+
reply_to: vi,
|
|
1497
1499
|
create_time: u.number()
|
|
1498
1500
|
}).lock(), J = u.object({
|
|
1499
1501
|
comment_id: u.number(),
|
|
@@ -1515,19 +1517,19 @@ var li = u.number().enum({
|
|
|
1515
1517
|
create_time: u.number(),
|
|
1516
1518
|
status: V,
|
|
1517
1519
|
replies: u.array(q).optional()
|
|
1518
|
-
}).lock(),
|
|
1520
|
+
}).lock(), yi = u.object({
|
|
1519
1521
|
image_url: u.string(),
|
|
1520
1522
|
upload_url: u.string(),
|
|
1521
1523
|
existed: u.bool()
|
|
1522
1524
|
}).lock(), Y = u.object({
|
|
1523
1525
|
notification_id: u.string(),
|
|
1524
|
-
notification_type:
|
|
1526
|
+
notification_type: _i,
|
|
1525
1527
|
is_read: u.bool(),
|
|
1526
1528
|
create_time: u.number(),
|
|
1527
1529
|
origin_user_id: u.string(),
|
|
1528
1530
|
origin_user_name: u.string(),
|
|
1529
1531
|
origin_user_avatar_url: u.string()
|
|
1530
|
-
}).lock(),
|
|
1532
|
+
}).lock(), bi = u.object({
|
|
1531
1533
|
system_message_subject: u.string(),
|
|
1532
1534
|
system_message_content: u.string()
|
|
1533
1535
|
}).lock(), X = u.object({
|
|
@@ -1541,86 +1543,86 @@ var li = u.number().enum({
|
|
|
1541
1543
|
}).lock(), Q = u.object({
|
|
1542
1544
|
reply_id: u.number(),
|
|
1543
1545
|
reply_content: u.string()
|
|
1544
|
-
}).lock(),
|
|
1546
|
+
}).lock(), xi = u.object({
|
|
1545
1547
|
...Y.shape,
|
|
1546
|
-
...
|
|
1548
|
+
...bi.shape,
|
|
1547
1549
|
notification_type: u.string().enum(H.System)
|
|
1548
|
-
}),
|
|
1550
|
+
}), Si = u.object({
|
|
1549
1551
|
...Y.shape,
|
|
1550
1552
|
...X.shape,
|
|
1551
1553
|
notification_type: u.string().enum(H.PostPinned, H.PostHighlighted, H.PostDeleted, H.PostLiked)
|
|
1552
|
-
}),
|
|
1554
|
+
}), Ci = u.object({
|
|
1553
1555
|
...Y.shape,
|
|
1554
1556
|
...X.shape,
|
|
1555
1557
|
...Z.shape,
|
|
1556
1558
|
notification_type: u.string().enum(H.PostCommented)
|
|
1557
|
-
}),
|
|
1559
|
+
}), wi = u.object({
|
|
1558
1560
|
...Y.shape,
|
|
1559
1561
|
...Z.shape,
|
|
1560
1562
|
...Q.shape,
|
|
1561
1563
|
notification_type: u.string().enum(H.CommentReplied)
|
|
1562
|
-
}),
|
|
1564
|
+
}), Ti = u.object({
|
|
1563
1565
|
...Y.shape,
|
|
1564
1566
|
...Z.shape,
|
|
1565
1567
|
...X.shape,
|
|
1566
1568
|
notification_type: u.string().enum(H.CommentLiked, H.CommentDeleted)
|
|
1567
|
-
}),
|
|
1569
|
+
}), Ei = u.object({
|
|
1568
1570
|
...Y.shape,
|
|
1569
1571
|
...Q.shape,
|
|
1570
1572
|
notification_type: u.string().enum(H.ReplyReplied),
|
|
1571
1573
|
comment_id: u.number(),
|
|
1572
1574
|
reply_to_reply_id: u.number(),
|
|
1573
1575
|
reply_to_reply_content: u.string()
|
|
1574
|
-
}),
|
|
1576
|
+
}), Di = u.object({
|
|
1575
1577
|
...Y.shape,
|
|
1576
1578
|
...Q.shape,
|
|
1577
1579
|
...Z.shape,
|
|
1578
1580
|
notification_type: u.string().enum(H.ReplyLiked, H.ReplyDeleted)
|
|
1579
|
-
}),
|
|
1581
|
+
}), Oi = u.union(xi, Si, Ci, wi, Ti, Ei, Di).satisfies().lock(), ki = l({ forums: u.array(U) }), Ai = l({ topics: u.array(W) }), ji = l({ topic: W }), Mi = l({ post: G }), Ni = l({
|
|
1580
1582
|
posts: u.array(G),
|
|
1581
1583
|
next_token: u.string().optional()
|
|
1582
|
-
}),
|
|
1584
|
+
}), Pi = l({
|
|
1583
1585
|
post: G.clone().optional(),
|
|
1584
1586
|
antispam: K.clone().optional()
|
|
1585
|
-
}),
|
|
1587
|
+
}), Fi = l({
|
|
1586
1588
|
replies: u.array(q),
|
|
1587
1589
|
next_token: u.string().optional()
|
|
1588
|
-
}),
|
|
1590
|
+
}), Ii = l({ reply: q }), Li = l({
|
|
1589
1591
|
reply: q.clone().optional(),
|
|
1590
1592
|
antispam: K.clone().optional()
|
|
1591
|
-
}),
|
|
1593
|
+
}), Ri = l({ comment: J }), zi = l({
|
|
1592
1594
|
comments: u.array(J),
|
|
1593
1595
|
next_token: u.string().optional()
|
|
1594
|
-
}),
|
|
1596
|
+
}), Bi = l({
|
|
1595
1597
|
comment: J.clone().optional(),
|
|
1596
1598
|
antispam: J.clone().optional()
|
|
1597
|
-
}),
|
|
1598
|
-
notifications: u.array(
|
|
1599
|
+
}), Vi = u.guard(yi), Hi = l({
|
|
1600
|
+
notifications: u.array(Oi),
|
|
1599
1601
|
next_token: u.string().optional()
|
|
1600
|
-
}),
|
|
1602
|
+
}), Ui = l({
|
|
1601
1603
|
system: u.number(),
|
|
1602
1604
|
comment: u.number(),
|
|
1603
1605
|
like: u.number()
|
|
1604
|
-
}),
|
|
1606
|
+
}), Wi = class {
|
|
1605
1607
|
token;
|
|
1606
1608
|
req;
|
|
1607
1609
|
constructor(e) {
|
|
1608
1610
|
this.token = e, this.req = e.req;
|
|
1609
1611
|
}
|
|
1610
1612
|
async getForums(e) {
|
|
1611
|
-
let { data: t } = await this.req.get("community/forums", null,
|
|
1613
|
+
let { data: t } = await this.req.get("community/forums", null, ki, e);
|
|
1612
1614
|
return t?.forums || [];
|
|
1613
1615
|
}
|
|
1614
1616
|
async getTopics(e) {
|
|
1615
|
-
let { data: t } = await this.req.get("community/topics", null,
|
|
1617
|
+
let { data: t } = await this.req.get("community/topics", null, Ai, e);
|
|
1616
1618
|
return t?.topics || [];
|
|
1617
1619
|
}
|
|
1618
1620
|
async getTopic(e, t) {
|
|
1619
|
-
let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e },
|
|
1621
|
+
let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e }, ji, t);
|
|
1620
1622
|
return n?.topic ?? { error: r };
|
|
1621
1623
|
}
|
|
1622
1624
|
async getPosts(e, t) {
|
|
1623
|
-
let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null,
|
|
1625
|
+
let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null, Ni, t);
|
|
1624
1626
|
return n ?? {
|
|
1625
1627
|
message: i,
|
|
1626
1628
|
error: r
|
|
@@ -1631,35 +1633,35 @@ var li = u.number().enum({
|
|
|
1631
1633
|
forum_id: e,
|
|
1632
1634
|
max_results: t,
|
|
1633
1635
|
next_token: n
|
|
1634
|
-
},
|
|
1636
|
+
}, Ni, r);
|
|
1635
1637
|
return i ?? {
|
|
1636
1638
|
message: o,
|
|
1637
1639
|
error: a
|
|
1638
1640
|
};
|
|
1639
1641
|
}
|
|
1640
1642
|
async getPost(e, t) {
|
|
1641
|
-
let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e },
|
|
1643
|
+
let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e }, Mi, t);
|
|
1642
1644
|
return n?.post ?? {
|
|
1643
1645
|
message: i,
|
|
1644
1646
|
error: r
|
|
1645
1647
|
};
|
|
1646
1648
|
}
|
|
1647
1649
|
async post(e, t) {
|
|
1648
|
-
let { data: n, code: r, message: i } = await this.req.post("community/post", a(e),
|
|
1650
|
+
let { data: n, code: r, message: i } = await this.req.post("community/post", a(e), Pi, t);
|
|
1649
1651
|
return n ?? {
|
|
1650
1652
|
message: i,
|
|
1651
1653
|
error: r
|
|
1652
1654
|
};
|
|
1653
1655
|
}
|
|
1654
1656
|
async getComments(e, t) {
|
|
1655
|
-
let { data: n, code: r, message: i } = await this.req.get("community/comments", e,
|
|
1657
|
+
let { data: n, code: r, message: i } = await this.req.get("community/comments", e, zi, t);
|
|
1656
1658
|
return n ?? {
|
|
1657
1659
|
message: i,
|
|
1658
1660
|
error: r
|
|
1659
1661
|
};
|
|
1660
1662
|
}
|
|
1661
1663
|
async getComment(e, t) {
|
|
1662
|
-
let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e },
|
|
1664
|
+
let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e }, Ri, t);
|
|
1663
1665
|
return n?.comment ?? {
|
|
1664
1666
|
message: i,
|
|
1665
1667
|
error: r
|
|
@@ -1667,7 +1669,7 @@ var li = u.number().enum({
|
|
|
1667
1669
|
}
|
|
1668
1670
|
async comment(e, t) {
|
|
1669
1671
|
await this.token.autoLogin();
|
|
1670
|
-
let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e),
|
|
1672
|
+
let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e), Bi, t);
|
|
1671
1673
|
return n ?? {
|
|
1672
1674
|
message: i,
|
|
1673
1675
|
error: r
|
|
@@ -1677,14 +1679,14 @@ var li = u.number().enum({
|
|
|
1677
1679
|
let { data: n } = await this.req.get("community/replies", {
|
|
1678
1680
|
max_results: 20,
|
|
1679
1681
|
...e
|
|
1680
|
-
},
|
|
1682
|
+
}, Fi, t);
|
|
1681
1683
|
return {
|
|
1682
1684
|
replies: n?.replies || [],
|
|
1683
1685
|
next_token: n?.next_token || ""
|
|
1684
1686
|
};
|
|
1685
1687
|
}
|
|
1686
1688
|
async getReply(e, t) {
|
|
1687
|
-
let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e },
|
|
1689
|
+
let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e }, Ii, t);
|
|
1688
1690
|
return n?.reply ?? {
|
|
1689
1691
|
message: i,
|
|
1690
1692
|
error: r
|
|
@@ -1692,7 +1694,7 @@ var li = u.number().enum({
|
|
|
1692
1694
|
}
|
|
1693
1695
|
async reply(e, t) {
|
|
1694
1696
|
await this.token.autoLogin();
|
|
1695
|
-
let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e),
|
|
1697
|
+
let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e), Li, t);
|
|
1696
1698
|
return n ?? {
|
|
1697
1699
|
message: i,
|
|
1698
1700
|
error: r
|
|
@@ -1722,7 +1724,7 @@ var li = u.number().enum({
|
|
|
1722
1724
|
}
|
|
1723
1725
|
async getMediaPresignedUrl(e, t) {
|
|
1724
1726
|
await this.token.autoLogin();
|
|
1725
|
-
let { data: n } = await this.req.get("community/media-presign-url", e,
|
|
1727
|
+
let { data: n } = await this.req.get("community/media-presign-url", e, Vi, t);
|
|
1726
1728
|
return n;
|
|
1727
1729
|
}
|
|
1728
1730
|
async getNotifications(e, t) {
|
|
@@ -1730,7 +1732,7 @@ var li = u.number().enum({
|
|
|
1730
1732
|
let { data: n } = await this.req.get("community/notifications", {
|
|
1731
1733
|
max_results: 20,
|
|
1732
1734
|
...e
|
|
1733
|
-
},
|
|
1735
|
+
}, Hi, t);
|
|
1734
1736
|
return {
|
|
1735
1737
|
notifications: n?.notifications || [],
|
|
1736
1738
|
next_token: n?.next_token || ""
|
|
@@ -1738,7 +1740,7 @@ var li = u.number().enum({
|
|
|
1738
1740
|
}
|
|
1739
1741
|
async getUnreadNotificationsCount(e) {
|
|
1740
1742
|
if (!await this.token.autoLogin()) return null;
|
|
1741
|
-
let { data: t } = await this.req.get("community/unread-notifications-count", null,
|
|
1743
|
+
let { data: t } = await this.req.get("community/unread-notifications-count", null, Ui, e);
|
|
1742
1744
|
return t;
|
|
1743
1745
|
}
|
|
1744
1746
|
async clearUnreadNotifications(e, t) {
|
|
@@ -1746,11 +1748,11 @@ var li = u.number().enum({
|
|
|
1746
1748
|
let { ok: n } = await this.req.post("community/clear-unread-notifications", { category: e }, null, t);
|
|
1747
1749
|
return n;
|
|
1748
1750
|
}
|
|
1749
|
-
},
|
|
1751
|
+
}, Gi = l({
|
|
1750
1752
|
nonce_str: u.string(),
|
|
1751
1753
|
timestamp: u.number(),
|
|
1752
1754
|
signature: u.string()
|
|
1753
|
-
}),
|
|
1755
|
+
}), Ki = /* @__PURE__ */ function(e) {
|
|
1754
1756
|
return e.RedirectUriDisMatch = "10003", e.AppidError = "10016", e.AuthorizationError = "10015", e.NoRightForScope = "10005", e.Frequently = "10009", e.AppBanded = "10004", e.ShouldFollow = "10006", e.ScopeNull = "10010", e.RedirectUriNull = "10011", e.AppidNull = "10012", e.StateNull = "10013", e;
|
|
1755
1757
|
}({});
|
|
1756
1758
|
//#endregion
|
|
@@ -1760,7 +1762,7 @@ function $(e) {
|
|
|
1760
1762
|
}
|
|
1761
1763
|
//#endregion
|
|
1762
1764
|
//#region src/weixin.ts
|
|
1763
|
-
var
|
|
1765
|
+
var qi = "wx_login_cache", Ji = class {
|
|
1764
1766
|
token;
|
|
1765
1767
|
_appid;
|
|
1766
1768
|
req;
|
|
@@ -1771,7 +1773,7 @@ var Ki = "wx_login_cache", qi = class {
|
|
|
1771
1773
|
return this._appid;
|
|
1772
1774
|
}
|
|
1773
1775
|
async getLoginCache() {
|
|
1774
|
-
let e = this.token.storage.get(
|
|
1776
|
+
let e = this.token.storage.get(qi);
|
|
1775
1777
|
if (!e) return null;
|
|
1776
1778
|
let t = i(e);
|
|
1777
1779
|
return $(t) ? (this.token.weixinToken = t.weixin_token, await this.token.autoLogin(), t) : null;
|
|
@@ -1787,7 +1789,7 @@ var Ki = "wx_login_cache", qi = class {
|
|
|
1787
1789
|
...e,
|
|
1788
1790
|
message: !1
|
|
1789
1791
|
});
|
|
1790
|
-
return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(
|
|
1792
|
+
return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(qi, JSON.stringify(r))), r ?? {
|
|
1791
1793
|
message: a,
|
|
1792
1794
|
error: i
|
|
1793
1795
|
};
|
|
@@ -1829,7 +1831,7 @@ var Ki = "wx_login_cache", qi = class {
|
|
|
1829
1831
|
let { data: t } = await this.req.get("weixin/offiaccount/jssdk-sign", {
|
|
1830
1832
|
appid: this.appid,
|
|
1831
1833
|
url: location.href.split("#")[0]
|
|
1832
|
-
},
|
|
1834
|
+
}, Gi, e);
|
|
1833
1835
|
return t ? {
|
|
1834
1836
|
appid: this.appid,
|
|
1835
1837
|
nonceStr: t.nonce_str,
|
|
@@ -1839,4 +1841,4 @@ var Ki = "wx_login_cache", qi = class {
|
|
|
1839
1841
|
}
|
|
1840
1842
|
};
|
|
1841
1843
|
//#endregion
|
|
1842
|
-
export { K as AntispamValidator, le as AuthToken, Vn as CandidateVoteValidator, I as CashbackEngagementDataValidator, mn as ClaimActivationKeyEngagementDataValidator, $e as ClaimRewardStatus, k as ClaimRewardStatusValidator, Zn as ClaimedItemValidator, h as ClubAddressValidator, He as ClubApi, g as ClubBenefitSummaryValidator, De as ClubBenefitValidator, me as ClubCreditChangeScene, he as ClubCreditChangeSceneValidator, fe as ClubCreditChangeType, pe as ClubCreditChangeTypeValidator, Ee as ClubCreditLogValidator, ye as ClubGlobalConfigValidator, ge as ClubItemType, p as ClubItemTypeValidator, be as ClubPlayerValidator, _ as ClubProductValidator, _e as ClubRedemptionStatus, ve as ClubRedemptionStatusValidator, Te as ClubUserCreditValidator, we as ClubUserProfileValidator, Wn as CommentEngagementValidator, J as CommentValidator,
|
|
1844
|
+
export { K as AntispamValidator, le as AuthToken, Vn as CandidateVoteValidator, I as CashbackEngagementDataValidator, mn as ClaimActivationKeyEngagementDataValidator, $e as ClaimRewardStatus, k as ClaimRewardStatusValidator, Zn as ClaimedItemValidator, h as ClubAddressValidator, He as ClubApi, g as ClubBenefitSummaryValidator, De as ClubBenefitValidator, me as ClubCreditChangeScene, he as ClubCreditChangeSceneValidator, fe as ClubCreditChangeType, pe as ClubCreditChangeTypeValidator, Ee as ClubCreditLogValidator, ye as ClubGlobalConfigValidator, ge as ClubItemType, p as ClubItemTypeValidator, be as ClubPlayerValidator, _ as ClubProductValidator, _e as ClubRedemptionStatus, ve as ClubRedemptionStatusValidator, Te as ClubUserCreditValidator, we as ClubUserProfileValidator, Wn as CommentEngagementValidator, J as CommentValidator, Wi as CommunityApi, Hn as ConversationValidator, Ge as EngageAccountType, Ke as EngageAccountTypeValidator, Xn as EngageResponseValidator, Kn as EngageRewardValidator, Ue as EventApi, ir as EventConfigValidator, yt as EventFeatureConfigOfCashbackValidator, xt as EventFeatureConfigOfCheckInValidator, Ct as EventFeatureConfigOfClaimActivationKeyValidator, Tt as EventFeatureConfigOfClaimRewardsValidator, Dt as EventFeatureConfigOfCommentValidator, kt as EventFeatureConfigOfFollowValidator, Mt as EventFeatureConfigOfGiftCodeValidator, Pt as EventFeatureConfigOfInviteValidator, It as EventFeatureConfigOfInvitedRegisterValidator, Ht as EventFeatureConfigOfLotteryDrawValidator, Bt as EventFeatureConfigOfLotteryValidator, Wt as EventFeatureConfigOfPreregisterValidator, Kt as EventFeatureConfigOfQuestValidator, Yt as EventFeatureConfigOfRedeemValidator, Zt as EventFeatureConfigOfRegisterValidator, $t as EventFeatureConfigOfShareValidator, tn as EventFeatureConfigOfSubscribeValidator, rn as EventFeatureConfigOfSurveyValidator, on as EventFeatureConfigOfTeamValidator, un as EventFeatureConfigOfUgcLikeValidator, cn as EventFeatureConfigOfUgcValidator, er as EventFeatureConfigOfVote2Validator, pn as EventFeatureConfigOfVoteValidator, rr as EventFeatureConfigValidator, qe as EventPeriodType, Je as EventPeriodTypeValidator, N as EventRewardItemConfigValidator, Ae as ExtraGameRewardValidator, ke as ExtraPhysicalShipmentValidator, Jt as FeatureRedeemItemConfigValidator, _t as FeatureRewardValidator, T as FeatureType, Ye as FeatureTypeValidator, fi as ForumMode, pi as ForumModeValidator, U as ForumValidator, di as GGDPublicApi, li as GGDRoomStatus, ui as GGDRoomStatusValidator, S as GamerItemType, C as GamerItemTypeValidator, ue as Gender, de as GenderValidator, hn as GiftCodeEngagementDataValidator, gn as InviteEngagementDataValidator, ot as LotteryDrawAction, st as LotteryDrawActionValidator, bn as LotteryDrawEngagementDataValidator, _n as LotteryEngagementDataValidator, j as LotteryTicketStatus, rt as LotteryTicketStatusValidator, Y as NotificationBaseValidator, hi as NotificationCategory, gi as NotificationCategoryValidator, wi as NotificationCommentReplyValidator, Ti as NotificationCommentValidator, Z as NotificationPayloadCommentValidator, X as NotificationPayloadPostValidator, Q as NotificationPayloadReplyValidator, bi as NotificationPayloadSystemValidator, Ci as NotificationPostCommentValidator, Si as NotificationPostValidator, Ei as NotificationReplyRepliedValidator, Di as NotificationReplyValidator, xi as NotificationSystemValidator, H as NotificationType, _i as NotificationTypeValidator, Oi as NotificationValidator, Ce as PlayerRoleCardValidator, m as PlayerRoleValidator, mi as PostStatus, V as PostStatusValidator, G as PostValidator, xn as PreregisterEngagementDataValidator, yi as PresignedUrlResponseValidator, Cn as QuestEngagementDataValidator, Xe as QuestObjective, E as QuestObjectiveValidator, ct as QuestProgressAlgorithm, lt as QuestProgressAlgorithmValidator, wn as QuestProgressValidator, Tn as RedeemEngagementDataValidator, Oe as RedeemParamsValidator, En as RedeemStocksResponseValidator, je as RedemptionValidator, gt as RegularRewardValidator, vi as ReplyToValidator, q as ReplyValidator, We as RewardItemType, w as RewardItemTypeValidator, et as RewardSource, A as RewardSourceValidator, D as RewardStatus, O as RewardStatusValidator, Gn as RewardValidator, Se as RoleBaseInfoValidator, xe as ServerBaseInfoValidator, Dn as ShareEngagementDataValidator, kn as SurveyEngagementDataValidator, it as TeamAction, at as TeamActionValidator, Mn as TeamEngagementDataValidator, An as TeamEngagementValidator, jn as TeamMemberValidator, tt as TeamVisibility, nt as TeamVisibilityValidator, W as TopicValidator, In as UgcCountResponseValidator, Nn as UgcEngagementDataValidator, Rn as UgcLeaderboardResponseValidator, Pn as UgcRecordBaseResponseValidator, Fn as UgcRecordResponseValidator, pt as UgcReviewStatus, mt as UgcReviewStatusValidator, ft as UgcSocialMedia, M as UgcSocialMediaValidator, Ln as UgcUploadImageValidator, z as UserEngagementDataValidator, qn as UserEngagementValidator, Yn as UserFeatureStatusValidator, L as UserRewardValidator, Jn as VerifyMobileResultValidator, Bn as Vote2ClaimRewardsResponseValidator, zn as Vote2EngagementDataValidator, ut as Vote2RewardType, dt as Vote2RewardTypeValidator, R as VoteEngagementDataValidator, Ze as VoteOptionSource, Qe as VoteOptionSourceValidator, Ji as WeixinApi, On as WeixinSubscribeEngagementDataValidator, Ki as WeixinWebLoginErrorCode, Un as ZeroChatGPTDataValidator, Vr as claimRewards, Qr as claimRewardsV2, $r as claimWeixinHongbao, Br as engage, Gr as generateUnlimitQrcode, Yr as getCashbackQuery, Mr as getConfig, Fr as getEngagements, Pr as getEngagementsCount, Nr as getEngagementsUserCount, Wr as getParamsByQrcodeScene, Kr as getQuestProgress, ci as getRedeemItemStocks, si as getUgcLeaderboard, Zr as getUgcMyCount, ai as getUgcRecommendation, Xr as getUgcRecord, oi as getUgcs, Ur as getUnlimitQrcodeScene, Rr as getUserEngagementCount, zr as getUserEngagements, Lr as getUserFeatureStatus, ri as getUserItemCount, ti as getUserRewards, ni as getUserRewardsCount, Jr as getVote2Leaderboard, Gi as isWeixinSignResponse, Hr as submitUserRewardAddress, ii as ugcUploadImage, ei as verifyActivationKey, jr as verifyMobileAllowed, Ir as visit, qr as vote2Rewards };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/gamer-api",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "agent for gamer api",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "web@seayoo.com",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.13.1",
|
|
30
|
-
"@seayoo-web/validator": "2.3.0",
|
|
31
30
|
"@seayoo-web/tsconfig": "1.0.6",
|
|
31
|
+
"@seayoo-web/scripts": "4.3.6",
|
|
32
32
|
"@seayoo-web/combo-webview": "2.9.7",
|
|
33
|
+
"@seayoo-web/validator": "2.3.0",
|
|
33
34
|
"@seayoo-web/utils": "4.4.1",
|
|
34
|
-
"@seayoo-web/request": "4.1.0"
|
|
35
|
-
"@seayoo-web/scripts": "4.3.6"
|
|
35
|
+
"@seayoo-web/request": "4.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@seayoo-web/utils": "^4.4.1",
|
|
39
38
|
"@seayoo-web/combo-webview": "^2.9.7",
|
|
39
|
+
"@seayoo-web/utils": "^4.4.1",
|
|
40
40
|
"@seayoo-web/validator": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
package/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./src/event.methods";
|
|
|
8
8
|
export * from "./src/event.define";
|
|
9
9
|
export * from "./src/event.enums";
|
|
10
10
|
export * from "./src/ggd";
|
|
11
|
+
export * from "./src/ggd.enums";
|
|
11
12
|
export * from "./src/community";
|
|
12
13
|
export * from "./src/community.define";
|
|
13
14
|
export * from "./src/community.enums";
|
package/types/src/ggd.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class GGDPublicApi {
|
|
|
15
15
|
describeRoomByCode(invitationCode?: string): Promise<{
|
|
16
16
|
room_id: string;
|
|
17
17
|
inviter_role_id: number;
|
|
18
|
-
room_status: import("./ggd.
|
|
18
|
+
room_status: import("./ggd.enums").GGDRoomStatus;
|
|
19
19
|
room_mode: string;
|
|
20
20
|
room_tags: string[];
|
|
21
21
|
max_members: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ValueOf } from "@seayoo-web/utils";
|
|
2
|
+
/** 房间状态 */
|
|
3
|
+
export declare const GGDRoomStatus: {
|
|
4
|
+
/** 等待中 */
|
|
5
|
+
readonly Waiting: 1;
|
|
6
|
+
/** 游戏中 */
|
|
7
|
+
readonly Playing: 2;
|
|
8
|
+
};
|
|
9
|
+
export type GGDRoomStatus = ValueOf<typeof GGDRoomStatus>;
|
|
10
|
+
export declare const GGDRoomStatusValidator: import("@seayoo-web/validator").NumberValidator<GGDRoomStatus, false, false> & {
|
|
11
|
+
int: never;
|
|
12
|
+
min: never;
|
|
13
|
+
max: never;
|
|
14
|
+
allowNaN: never;
|
|
15
|
+
allowInfinity: never;
|
|
16
|
+
unsafe: never;
|
|
17
|
+
enum: never;
|
|
18
|
+
disallow: never;
|
|
19
|
+
optional: never;
|
|
20
|
+
maybeNull: never;
|
|
21
|
+
lock: never;
|
|
22
|
+
};
|