@laplace.live/internal 1.1.101 → 1.1.103

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.
Files changed (2) hide show
  1. package/index.d.ts +51 -83
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -993,12 +993,7 @@ export declare namespace BilibiliInternal {
993
993
  refresh_rate: number
994
994
  max_delay: number
995
995
  token: string
996
- host_list: {
997
- host: string
998
- port: number
999
- wss_port: number
1000
- ws_port: number
1001
- }[]
996
+ host_list: DanmuWebSocketHost[]
1002
997
  /**
1003
998
  * 由 buvid 请求获取,目前已改名为 ack,用于混淆请求发,防止被滥用
1004
999
  */
@@ -1030,6 +1025,16 @@ export declare namespace BilibiliInternal {
1030
1025
  }
1031
1026
  }
1032
1027
 
1028
+ /**
1029
+ * Danmaku WebSocket host info
1030
+ */
1031
+ export interface DanmuWebSocketHost {
1032
+ host: string
1033
+ port: number
1034
+ wss_port: number
1035
+ ws_port: number
1036
+ }
1037
+
1033
1038
  /**
1034
1039
  * 从直播间 DOM 中提取的直播间聚合基本信息,存在于 DOM 中,目前通过正则提取,代替之前的 `GetInfoByRoom`
1035
1040
  *
@@ -1161,9 +1166,17 @@ export declare namespace BilibiliInternal {
1161
1166
  * 获取直播间基本信息,可用于获取直播间号对应的 UID
1162
1167
  *
1163
1168
  * @example https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=21622811&web_location=444.8&w_rid=da46145ca70fbf60e794a2ac3cdfa845&wts=1743236901
1169
+ *
1164
1170
  * @link https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=
1171
+ * @link https://live.bilibili.com/21696950 - aza 直播间还在用
1172
+ *
1165
1173
  * @since 2024-05-24
1174
+ *
1166
1175
  * @deprecated 目前b站 **可能** 不再使用该 API,有停用风险,只有个别活动直播间(特殊背景样式,例如德云色)还会继续用
1176
+ * 通过 /blanc/21696950 可暂时强制恢复该请求调用
1177
+ *
1178
+ * @link https://live.bilibili.com/blanc/21696950
1179
+ *
1167
1180
  */
1168
1181
  export interface GetInfoByRoom {
1169
1182
  /**
@@ -1181,8 +1194,10 @@ export declare namespace BilibiliInternal {
1181
1194
  export interface RoomInfoData {
1182
1195
  /**
1183
1196
  * 由 laplace-workers room-info APi 额外传入的字段,主要给 laplace-chat 控制台使用
1197
+ *
1198
+ * @deprecated Jun 1, 2025 不再魔改官方返回,直接从官方的不知道什么时候加的 room_rank_info 拿
1184
1199
  */
1185
- perf_info: {
1200
+ perf_info?: {
1186
1201
  /** 高能榜 */
1187
1202
  online: number
1188
1203
  users: BilibiliInternal.HTTPS.Prod.ContributionRankUser[]
@@ -1603,29 +1618,11 @@ export declare namespace BilibiliInternal {
1603
1618
  anchor_rank_entry: null
1604
1619
  user_rank_entry: {
1605
1620
  user_contribution_rank_entry: {
1606
- item: {
1607
- uid: number
1608
- name: string
1609
- face: string
1610
- rank: number
1611
- score: number
1612
- medal_info: {
1613
- guard_level: number
1614
- medal_color_start: number
1615
- medal_color_end: number
1616
- medal_color_border: number
1617
- medal_name: string
1618
- level: number
1619
- target_id: number
1620
- is_light: number
1621
- } | null
1622
- guard_level: number
1623
- wealth_level: number
1624
- is_mystery: boolean
1625
- uinfo: Uinfo
1626
- }[]
1621
+ item: ContributionRankUser[]
1627
1622
  count: number
1628
1623
  show_max: number
1624
+ count_text: string
1625
+ non_expandable: boolean
1629
1626
  }
1630
1627
  }
1631
1628
  user_rank_tab_list: {
@@ -1778,8 +1775,18 @@ export declare namespace BilibiliInternal {
1778
1775
  old_title_css_id: string
1779
1776
  title_css_id: string
1780
1777
  } | null
1781
- guard: null
1782
- uhead_frame: null
1778
+ /**
1779
+ * - 在 room-info 的 room_rank_info 中会返回 null
1780
+ * - queryContributionRank 中会返回实际值
1781
+ */
1782
+ guard: {
1783
+ level: number
1784
+ expired_str: string
1785
+ } | null
1786
+ uhead_frame: {
1787
+ id: number
1788
+ frame_img: string
1789
+ } | null
1783
1790
  guard_leader: null
1784
1791
  }
1785
1792
 
@@ -1852,62 +1859,16 @@ export declare namespace BilibiliInternal {
1852
1859
  rank: number
1853
1860
  score: number
1854
1861
  medal_info: QueryContributionRankMedalInfo
1862
+ /**
1863
+ * 在 room-info 的 room_rank_info 中永远返回 0 😅
1864
+ *
1865
+ * 但是在 medal_info 中此时会无视观众当前佩戴的粉丝牌,只展示当前直播间所对应的粉丝牌
1866
+ * 因此可以从 medal_info 中判断大航海等级
1867
+ */
1855
1868
  guard_level: number
1856
1869
  wealth_level: number
1857
1870
  is_mystery: boolean
1858
- uinfo: {
1859
- uid: number
1860
- base: {
1861
- name: string
1862
- face: string
1863
- name_color: number
1864
- is_mystery: boolean
1865
- risk_ctrl_info: {
1866
- name: string
1867
- face: string
1868
- }
1869
- origin_info: {
1870
- name: string
1871
- face: string
1872
- }
1873
- official_info: {
1874
- role: number
1875
- title: string
1876
- desc: string
1877
- type: number
1878
- }
1879
- }
1880
- medal: {
1881
- name: string
1882
- level: number
1883
- color_start: number
1884
- color_end: number
1885
- color_border: number
1886
- color: number
1887
- id: number
1888
- typ: number
1889
- is_light: number
1890
- ruid: number
1891
- guard_level: number
1892
- score: number
1893
- guard_icon: string
1894
- honor_icon: string
1895
- }
1896
- wealth: {
1897
- level: number
1898
- dm_icon_key: string
1899
- }
1900
- title: {
1901
- old_title_css_id: string
1902
- title_css_id: string
1903
- }
1904
- guard: {
1905
- level: number
1906
- expired_str: Date
1907
- }
1908
- uhead_frame: null
1909
- guard_leader: null
1910
- }
1871
+ uinfo: Uinfo
1911
1872
  }
1912
1873
 
1913
1874
  /** 高能中的粉丝牌 */
@@ -3098,7 +3059,14 @@ export declare namespace BilibiliInternal {
3098
3059
  /**
3099
3060
  * GetRoomPlayInfo
3100
3061
  * 获取直播视频流信息,也可用于根据直播间房间号获取 UID
3062
+ *
3063
+ * May 30, 2025, 1:24:24 AM PDT 发现该接口也需要 web_location 封控
3064
+ *
3065
+ * @deprecated May 30, 2025, 1:31:07 AM PDT 该请求与 getInfoByRoom 一样,在普通直播间也已经不再使用,会直接嵌入 DOM
3066
+ * 通过 /blanc/21696950 可暂时强制恢复该请求调用
3067
+ *
3101
3068
  * @link https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id=1182221&protocol=0&format=0,1,2&codec=0&qn=10000&platform=web&ptype=8&dolby=5&panorama=1
3069
+ * @link https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id=31361500&protocol=0%2C1&format=0%2C1%2C2&codec=0%2C1%2C2&qn=10000&platform=web&ptype=8&dolby=5&panorama=1&hdr_type=0%2C1&req_reason=1&web_location=444.8&w_rid=55da3f4eb943b742d067dcc3d3616567&wts=1748589841
3102
3070
  */
3103
3071
  export interface GetRoomPlayInfo {
3104
3072
  code: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laplace.live/internal",
3
- "version": "1.1.101",
3
+ "version": "1.1.103",
4
4
  "module": "index.d.ts",
5
5
  "devDependencies": {
6
6
  "@types/bun": "latest"