@honeybbq/teamspeak 0.0.1 → 1.0.0-beta.8

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 (393) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +726 -2
  3. package/dist/client/abort.d.ts +5 -0
  4. package/dist/client/abort.d.ts.map +1 -0
  5. package/dist/client/abort.js +23 -0
  6. package/dist/client/abort.js.map +1 -0
  7. package/dist/client/address.d.ts +17 -0
  8. package/dist/client/address.d.ts.map +1 -0
  9. package/dist/client/address.js +66 -0
  10. package/dist/client/address.js.map +1 -0
  11. package/dist/client/api/voice.d.ts +24 -0
  12. package/dist/client/api/voice.d.ts.map +1 -0
  13. package/dist/client/api/voice.js +33 -0
  14. package/dist/client/api/voice.js.map +1 -0
  15. package/dist/client/capabilities.d.ts +68 -0
  16. package/dist/client/capabilities.d.ts.map +1 -0
  17. package/dist/client/capabilities.js +59 -0
  18. package/dist/client/capabilities.js.map +1 -0
  19. package/dist/client/client.d.ts +196 -0
  20. package/dist/client/client.d.ts.map +1 -0
  21. package/dist/client/client.js +1523 -0
  22. package/dist/client/client.js.map +1 -0
  23. package/dist/client/commands.d.ts +66 -0
  24. package/dist/client/commands.d.ts.map +1 -0
  25. package/dist/client/commands.js +162 -0
  26. package/dist/client/commands.js.map +1 -0
  27. package/dist/client/crypto/crypt-ops.d.ts +7 -0
  28. package/dist/client/crypto/crypt-ops.d.ts.map +1 -0
  29. package/dist/client/crypto/crypt-ops.js +2 -0
  30. package/dist/client/crypto/crypt-ops.js.map +1 -0
  31. package/dist/client/crypto/crypt.d.ts +37 -0
  32. package/dist/client/crypto/crypt.d.ts.map +1 -0
  33. package/dist/client/crypto/crypt.js +203 -0
  34. package/dist/client/crypto/crypt.js.map +1 -0
  35. package/dist/client/crypto/eax.d.ts +12 -0
  36. package/dist/client/crypto/eax.d.ts.map +1 -0
  37. package/dist/client/crypto/eax.js +118 -0
  38. package/dist/client/crypto/eax.js.map +1 -0
  39. package/dist/client/crypto/identity.d.ts +97 -0
  40. package/dist/client/crypto/identity.d.ts.map +1 -0
  41. package/dist/client/crypto/identity.js +412 -0
  42. package/dist/client/crypto/identity.js.map +1 -0
  43. package/dist/client/crypto/index.d.ts +7 -0
  44. package/dist/client/crypto/index.d.ts.map +1 -0
  45. package/dist/client/crypto/index.js +5 -0
  46. package/dist/client/crypto/index.js.map +1 -0
  47. package/dist/client/crypto/primitives.d.ts +43 -0
  48. package/dist/client/crypto/primitives.d.ts.map +1 -0
  49. package/dist/client/crypto/primitives.js +116 -0
  50. package/dist/client/crypto/primitives.js.map +1 -0
  51. package/dist/client/diagnostics.d.ts +45 -0
  52. package/dist/client/diagnostics.d.ts.map +1 -0
  53. package/dist/client/diagnostics.js +30 -0
  54. package/dist/client/diagnostics.js.map +1 -0
  55. package/dist/client/discovery/index.d.ts +2 -0
  56. package/dist/client/discovery/index.d.ts.map +1 -0
  57. package/dist/client/discovery/index.js +2 -0
  58. package/dist/client/discovery/index.js.map +1 -0
  59. package/dist/client/discovery/resolver.d.ts +26 -0
  60. package/dist/client/discovery/resolver.d.ts.map +1 -0
  61. package/dist/client/discovery/resolver.js +275 -0
  62. package/dist/client/discovery/resolver.js.map +1 -0
  63. package/dist/client/errors.d.ts +82 -0
  64. package/dist/client/errors.d.ts.map +1 -0
  65. package/dist/client/errors.js +201 -0
  66. package/dist/client/errors.js.map +1 -0
  67. package/dist/client/events.d.ts +3 -0
  68. package/dist/client/events.d.ts.map +1 -0
  69. package/dist/client/events.js +8 -0
  70. package/dist/client/events.js.map +1 -0
  71. package/dist/client/handshake/crypt-handshake.d.ts +17 -0
  72. package/dist/client/handshake/crypt-handshake.d.ts.map +1 -0
  73. package/dist/client/handshake/crypt-handshake.js +128 -0
  74. package/dist/client/handshake/crypt-handshake.js.map +1 -0
  75. package/dist/client/handshake/crypt-init2.d.ts +7 -0
  76. package/dist/client/handshake/crypt-init2.d.ts.map +1 -0
  77. package/dist/client/handshake/crypt-init2.js +37 -0
  78. package/dist/client/handshake/crypt-init2.js.map +1 -0
  79. package/dist/client/handshake/index.d.ts +4 -0
  80. package/dist/client/handshake/index.d.ts.map +1 -0
  81. package/dist/client/handshake/index.js +4 -0
  82. package/dist/client/handshake/index.js.map +1 -0
  83. package/dist/client/handshake/license.d.ts +35 -0
  84. package/dist/client/handshake/license.d.ts.map +1 -0
  85. package/dist/client/handshake/license.js +169 -0
  86. package/dist/client/handshake/license.js.map +1 -0
  87. package/dist/client/handshake.d.ts +27 -0
  88. package/dist/client/handshake.d.ts.map +1 -0
  89. package/dist/client/handshake.js +126 -0
  90. package/dist/client/handshake.js.map +1 -0
  91. package/dist/client/helpers.d.ts +6 -0
  92. package/dist/client/helpers.d.ts.map +1 -0
  93. package/dist/client/helpers.js +13 -0
  94. package/dist/client/helpers.js.map +1 -0
  95. package/dist/client/hooks.d.ts +7 -0
  96. package/dist/client/hooks.d.ts.map +1 -0
  97. package/dist/client/hooks.js +28 -0
  98. package/dist/client/hooks.js.map +1 -0
  99. package/dist/client/index.d.ts +26 -0
  100. package/dist/client/index.d.ts.map +1 -0
  101. package/dist/client/index.js +28 -0
  102. package/dist/client/index.js.map +1 -0
  103. package/dist/client/reconnect.d.ts +12 -0
  104. package/dist/client/reconnect.d.ts.map +1 -0
  105. package/dist/client/reconnect.js +44 -0
  106. package/dist/client/reconnect.js.map +1 -0
  107. package/dist/client/throttle.d.ts +20 -0
  108. package/dist/client/throttle.d.ts.map +1 -0
  109. package/dist/client/throttle.js +83 -0
  110. package/dist/client/throttle.js.map +1 -0
  111. package/dist/client/trace.d.ts +223 -0
  112. package/dist/client/trace.d.ts.map +1 -0
  113. package/dist/client/trace.js +13 -0
  114. package/dist/client/trace.js.map +1 -0
  115. package/dist/client/transfer.d.ts +111 -0
  116. package/dist/client/transfer.d.ts.map +1 -0
  117. package/dist/client/transfer.js +243 -0
  118. package/dist/client/transfer.js.map +1 -0
  119. package/dist/client/transport/generation-window.d.ts +30 -0
  120. package/dist/client/transport/generation-window.d.ts.map +1 -0
  121. package/dist/client/transport/generation-window.js +97 -0
  122. package/dist/client/transport/generation-window.js.map +1 -0
  123. package/dist/client/transport/handler.d.ts +61 -0
  124. package/dist/client/transport/handler.d.ts.map +1 -0
  125. package/dist/client/transport/handler.js +793 -0
  126. package/dist/client/transport/handler.js.map +1 -0
  127. package/dist/client/transport/index.d.ts +6 -0
  128. package/dist/client/transport/index.d.ts.map +1 -0
  129. package/dist/client/transport/index.js +5 -0
  130. package/dist/client/transport/index.js.map +1 -0
  131. package/dist/client/transport/packet.d.ts +36 -0
  132. package/dist/client/transport/packet.d.ts.map +1 -0
  133. package/dist/client/transport/packet.js +55 -0
  134. package/dist/client/transport/packet.js.map +1 -0
  135. package/dist/client/transport/quicklz.d.ts +24 -0
  136. package/dist/client/transport/quicklz.d.ts.map +1 -0
  137. package/dist/client/transport/quicklz.js +179 -0
  138. package/dist/client/transport/quicklz.js.map +1 -0
  139. package/dist/client/types.d.ts +226 -0
  140. package/dist/client/types.d.ts.map +1 -0
  141. package/dist/client/types.js +39 -0
  142. package/dist/client/types.js.map +1 -0
  143. package/dist/core/api/channels.d.ts +182 -0
  144. package/dist/core/api/channels.d.ts.map +1 -0
  145. package/dist/core/api/channels.js +155 -0
  146. package/dist/core/api/channels.js.map +1 -0
  147. package/dist/core/api/clients.d.ts +304 -0
  148. package/dist/core/api/clients.d.ts.map +1 -0
  149. package/dist/core/api/clients.js +260 -0
  150. package/dist/core/api/clients.js.map +1 -0
  151. package/dist/core/api/command.d.ts +305 -0
  152. package/dist/core/api/command.d.ts.map +1 -0
  153. package/dist/core/api/command.js +363 -0
  154. package/dist/core/api/command.js.map +1 -0
  155. package/dist/core/api/files.d.ts +153 -0
  156. package/dist/core/api/files.d.ts.map +1 -0
  157. package/dist/core/api/files.js +181 -0
  158. package/dist/core/api/files.js.map +1 -0
  159. package/dist/core/api/groups.d.ts +248 -0
  160. package/dist/core/api/groups.d.ts.map +1 -0
  161. package/dist/core/api/groups.js +271 -0
  162. package/dist/core/api/groups.js.map +1 -0
  163. package/dist/core/api/moderation.d.ts +205 -0
  164. package/dist/core/api/moderation.d.ts.map +1 -0
  165. package/dist/core/api/moderation.js +209 -0
  166. package/dist/core/api/moderation.js.map +1 -0
  167. package/dist/core/api/parse.d.ts +16 -0
  168. package/dist/core/api/parse.d.ts.map +1 -0
  169. package/dist/core/api/parse.js +40 -0
  170. package/dist/core/api/parse.js.map +1 -0
  171. package/dist/core/api/server.d.ts +310 -0
  172. package/dist/core/api/server.d.ts.map +1 -0
  173. package/dist/core/api/server.js +290 -0
  174. package/dist/core/api/server.js.map +1 -0
  175. package/dist/core/command/command.d.ts +20 -0
  176. package/dist/core/command/command.d.ts.map +1 -0
  177. package/dist/core/command/command.js +112 -0
  178. package/dist/core/command/command.js.map +1 -0
  179. package/dist/core/command/ids.d.ts +125 -0
  180. package/dist/core/command/ids.d.ts.map +1 -0
  181. package/dist/core/command/ids.js +85 -0
  182. package/dist/core/command/ids.js.map +1 -0
  183. package/dist/core/command/parser.d.ts +17 -0
  184. package/dist/core/command/parser.d.ts.map +1 -0
  185. package/dist/core/command/parser.js +65 -0
  186. package/dist/core/command/parser.js.map +1 -0
  187. package/dist/core/command/request.d.ts +61 -0
  188. package/dist/core/command/request.d.ts.map +1 -0
  189. package/dist/core/command/request.js +64 -0
  190. package/dist/core/command/request.js.map +1 -0
  191. package/dist/core/command/responses.d.ts +59 -0
  192. package/dist/core/command/responses.d.ts.map +1 -0
  193. package/dist/core/command/responses.js +74 -0
  194. package/dist/core/command/responses.js.map +1 -0
  195. package/dist/core/command-name.d.ts +333 -0
  196. package/dist/core/command-name.d.ts.map +1 -0
  197. package/dist/core/command-name.js +331 -0
  198. package/dist/core/command-name.js.map +1 -0
  199. package/dist/core/enums.d.ts +146 -0
  200. package/dist/core/enums.d.ts.map +1 -0
  201. package/dist/core/enums.js +132 -0
  202. package/dist/core/enums.js.map +1 -0
  203. package/dist/core/errorcode.d.ts +413 -0
  204. package/dist/core/errorcode.d.ts.map +1 -0
  205. package/dist/core/errorcode.js +410 -0
  206. package/dist/core/errorcode.js.map +1 -0
  207. package/dist/core/errors.d.ts +111 -0
  208. package/dist/core/errors.d.ts.map +1 -0
  209. package/dist/core/errors.js +233 -0
  210. package/dist/core/errors.js.map +1 -0
  211. package/dist/core/events.d.ts +207 -0
  212. package/dist/core/events.d.ts.map +1 -0
  213. package/dist/core/events.js +6 -0
  214. package/dist/core/events.js.map +1 -0
  215. package/dist/core/helpers.d.ts +42 -0
  216. package/dist/core/helpers.d.ts.map +1 -0
  217. package/dist/core/helpers.js +156 -0
  218. package/dist/core/helpers.js.map +1 -0
  219. package/dist/core/index.d.ts +35 -0
  220. package/dist/core/index.d.ts.map +1 -0
  221. package/dist/core/index.js +34 -0
  222. package/dist/core/index.js.map +1 -0
  223. package/dist/core/internal.d.ts +23 -0
  224. package/dist/core/internal.d.ts.map +1 -0
  225. package/dist/core/internal.js +20 -0
  226. package/dist/core/internal.js.map +1 -0
  227. package/dist/core/middleware.d.ts +14 -0
  228. package/dist/core/middleware.d.ts.map +1 -0
  229. package/dist/core/middleware.js +18 -0
  230. package/dist/core/middleware.js.map +1 -0
  231. package/dist/core/notification-name.d.ts +154 -0
  232. package/dist/core/notification-name.d.ts.map +1 -0
  233. package/dist/core/notification-name.js +152 -0
  234. package/dist/core/notification-name.js.map +1 -0
  235. package/dist/core/notifications.d.ts +43 -0
  236. package/dist/core/notifications.d.ts.map +1 -0
  237. package/dist/core/notifications.js +116 -0
  238. package/dist/core/notifications.js.map +1 -0
  239. package/dist/core/permission-name.d.ts +533 -0
  240. package/dist/core/permission-name.d.ts.map +1 -0
  241. package/dist/core/permission-name.js +531 -0
  242. package/dist/core/permission-name.js.map +1 -0
  243. package/dist/core/permission.d.ts +31 -0
  244. package/dist/core/permission.d.ts.map +1 -0
  245. package/dist/core/permission.js +20 -0
  246. package/dist/core/permission.js.map +1 -0
  247. package/dist/core/property-name.d.ts +403 -0
  248. package/dist/core/property-name.d.ts.map +1 -0
  249. package/dist/core/property-name.js +405 -0
  250. package/dist/core/property-name.js.map +1 -0
  251. package/dist/core/reason.d.ts +39 -0
  252. package/dist/core/reason.d.ts.map +1 -0
  253. package/dist/core/reason.js +36 -0
  254. package/dist/core/reason.js.map +1 -0
  255. package/dist/core/reconnect.d.ts +59 -0
  256. package/dist/core/reconnect.d.ts.map +1 -0
  257. package/dist/core/reconnect.js +55 -0
  258. package/dist/core/reconnect.js.map +1 -0
  259. package/dist/core/types.d.ts +110 -0
  260. package/dist/core/types.d.ts.map +1 -0
  261. package/dist/core/types.js +27 -0
  262. package/dist/core/types.js.map +1 -0
  263. package/dist/query/client.d.ts +194 -0
  264. package/dist/query/client.d.ts.map +1 -0
  265. package/dist/query/client.js +969 -0
  266. package/dist/query/client.js.map +1 -0
  267. package/dist/query/errors.d.ts +61 -0
  268. package/dist/query/errors.d.ts.map +1 -0
  269. package/dist/query/errors.js +100 -0
  270. package/dist/query/errors.js.map +1 -0
  271. package/dist/query/index.d.ts +36 -0
  272. package/dist/query/index.d.ts.map +1 -0
  273. package/dist/query/index.js +34 -0
  274. package/dist/query/index.js.map +1 -0
  275. package/dist/query/knownhosts.d.ts +61 -0
  276. package/dist/query/knownhosts.d.ts.map +1 -0
  277. package/dist/query/knownhosts.js +223 -0
  278. package/dist/query/knownhosts.js.map +1 -0
  279. package/dist/query/lines.d.ts +14 -0
  280. package/dist/query/lines.d.ts.map +1 -0
  281. package/dist/query/lines.js +29 -0
  282. package/dist/query/lines.js.map +1 -0
  283. package/dist/query/options.d.ts +187 -0
  284. package/dist/query/options.d.ts.map +1 -0
  285. package/dist/query/options.js +213 -0
  286. package/dist/query/options.js.map +1 -0
  287. package/dist/query/reconnect.d.ts +29 -0
  288. package/dist/query/reconnect.d.ts.map +1 -0
  289. package/dist/query/reconnect.js +87 -0
  290. package/dist/query/reconnect.js.map +1 -0
  291. package/dist/query/ssh.d.ts +345 -0
  292. package/dist/query/ssh.d.ts.map +1 -0
  293. package/dist/query/ssh.js +241 -0
  294. package/dist/query/ssh.js.map +1 -0
  295. package/dist/query/stream.d.ts +38 -0
  296. package/dist/query/stream.d.ts.map +1 -0
  297. package/dist/query/stream.js +70 -0
  298. package/dist/query/stream.js.map +1 -0
  299. package/dist/query/tcp.d.ts +38 -0
  300. package/dist/query/tcp.d.ts.map +1 -0
  301. package/dist/query/tcp.js +53 -0
  302. package/dist/query/tcp.js.map +1 -0
  303. package/dist/query/transport.d.ts +36 -0
  304. package/dist/query/transport.d.ts.map +1 -0
  305. package/dist/query/transport.js +2 -0
  306. package/dist/query/transport.js.map +1 -0
  307. package/dist/query/web.d.ts +54 -0
  308. package/dist/query/web.d.ts.map +1 -0
  309. package/dist/query/web.js +146 -0
  310. package/dist/query/web.js.map +1 -0
  311. package/dist/versions/index.d.ts +3094 -0
  312. package/dist/versions/index.d.ts.map +1 -0
  313. package/dist/versions/index.js +9237 -0
  314. package/dist/versions/index.js.map +1 -0
  315. package/package.json +118 -4
  316. package/src/client/abort.ts +24 -0
  317. package/src/client/address.ts +74 -0
  318. package/src/client/api/voice.ts +61 -0
  319. package/src/client/capabilities.ts +106 -0
  320. package/src/client/client.ts +1809 -0
  321. package/src/client/commands.ts +193 -0
  322. package/src/client/crypto/crypt-ops.ts +6 -0
  323. package/src/client/crypto/crypt.ts +275 -0
  324. package/src/client/crypto/eax.ts +152 -0
  325. package/src/client/crypto/identity.ts +484 -0
  326. package/src/client/crypto/index.ts +21 -0
  327. package/src/client/crypto/primitives.ts +141 -0
  328. package/src/client/diagnostics.ts +58 -0
  329. package/src/client/discovery/index.ts +1 -0
  330. package/src/client/discovery/resolver.ts +325 -0
  331. package/src/client/errors.ts +217 -0
  332. package/src/client/events.ts +12 -0
  333. package/src/client/handshake/crypt-handshake.ts +157 -0
  334. package/src/client/handshake/crypt-init2.ts +48 -0
  335. package/src/client/handshake/index.ts +3 -0
  336. package/src/client/handshake/license.ts +208 -0
  337. package/src/client/handshake.ts +150 -0
  338. package/src/client/helpers.ts +10 -0
  339. package/src/client/hooks.ts +30 -0
  340. package/src/client/index.ts +93 -0
  341. package/src/client/reconnect.ts +43 -0
  342. package/src/client/throttle.ts +92 -0
  343. package/src/client/trace.ts +237 -0
  344. package/src/client/transfer.ts +436 -0
  345. package/src/client/transport/generation-window.ts +108 -0
  346. package/src/client/transport/handler.ts +926 -0
  347. package/src/client/transport/index.ts +14 -0
  348. package/src/client/transport/packet.ts +69 -0
  349. package/src/client/transport/quicklz.ts +209 -0
  350. package/src/client/types.ts +268 -0
  351. package/src/core/api/channels.ts +396 -0
  352. package/src/core/api/clients.ts +654 -0
  353. package/src/core/api/command.ts +563 -0
  354. package/src/core/api/files.ts +405 -0
  355. package/src/core/api/groups.ts +622 -0
  356. package/src/core/api/moderation.ts +525 -0
  357. package/src/core/api/parse.ts +52 -0
  358. package/src/core/api/server.ts +709 -0
  359. package/src/core/command/command.ts +125 -0
  360. package/src/core/command/ids.ts +149 -0
  361. package/src/core/command/parser.ts +68 -0
  362. package/src/core/command/request.ts +119 -0
  363. package/src/core/command/responses.ts +114 -0
  364. package/src/core/command-name.ts +334 -0
  365. package/src/core/enums.ts +167 -0
  366. package/src/core/errorcode.ts +412 -0
  367. package/src/core/errors.ts +258 -0
  368. package/src/core/events.ts +219 -0
  369. package/src/core/helpers.ts +161 -0
  370. package/src/core/index.ts +126 -0
  371. package/src/core/internal.ts +23 -0
  372. package/src/core/middleware.ts +24 -0
  373. package/src/core/notification-name.ts +155 -0
  374. package/src/core/notifications.ts +157 -0
  375. package/src/core/permission-name.ts +538 -0
  376. package/src/core/permission.ts +34 -0
  377. package/src/core/property-name.ts +411 -0
  378. package/src/core/reason.ts +38 -0
  379. package/src/core/reconnect.ts +98 -0
  380. package/src/core/types.ts +138 -0
  381. package/src/query/client.ts +1129 -0
  382. package/src/query/errors.ts +108 -0
  383. package/src/query/index.ts +65 -0
  384. package/src/query/knownhosts.ts +257 -0
  385. package/src/query/lines.ts +28 -0
  386. package/src/query/options.ts +388 -0
  387. package/src/query/reconnect.ts +84 -0
  388. package/src/query/ssh.ts +614 -0
  389. package/src/query/stream.ts +91 -0
  390. package/src/query/tcp.ts +85 -0
  391. package/src/query/transport.ts +35 -0
  392. package/src/query/web.ts +195 -0
  393. package/src/versions/index.ts +10774 -0
@@ -0,0 +1,5 @@
1
+ /** The reason an aborted signal gives, as an error. */
2
+ export declare function abortReason(signal: AbortSignal): unknown;
3
+ /** Settle with `promise`, or reject as soon as `signal` aborts, whichever is first. */
4
+ export declare function abortable<T>(promise: Promise<T>, signal: AbortSignal | undefined): Promise<T>;
5
+ //# sourceMappingURL=abort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../src/client/abort.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAExD;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAiB7F"}
@@ -0,0 +1,23 @@
1
+ /** The reason an aborted signal gives, as an error. */
2
+ export function abortReason(signal) {
3
+ return signal.reason ?? new DOMException("This operation was aborted", "AbortError");
4
+ }
5
+ /** Settle with `promise`, or reject as soon as `signal` aborts, whichever is first. */
6
+ export function abortable(promise, signal) {
7
+ if (!signal)
8
+ return promise;
9
+ if (signal.aborted)
10
+ return Promise.reject(abortReason(signal));
11
+ return new Promise((resolve, reject) => {
12
+ const onAbort = () => reject(abortReason(signal));
13
+ signal.addEventListener("abort", onAbort, { once: true });
14
+ promise.then((value) => {
15
+ signal.removeEventListener("abort", onAbort);
16
+ resolve(value);
17
+ }, (error) => {
18
+ signal.removeEventListener("abort", onAbort);
19
+ reject(error);
20
+ });
21
+ });
22
+ }
23
+ //# sourceMappingURL=abort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.js","sourceRoot":"","sources":["../../src/client/abort.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,OAAO,MAAM,CAAC,MAAM,IAAI,IAAI,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC;AACvF,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,SAAS,CAAI,OAAmB,EAAE,MAA+B;IAC/E,IAAI,CAAC,MAAM;QAAE,OAAO,OAAO,CAAC;IAC5B,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/D,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CACV,CAAC,KAAK,EAAE,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EACD,CAAC,KAAc,EAAE,EAAE;YACjB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface HostPort {
2
+ host: string;
3
+ port: string;
4
+ }
5
+ /** Parse a TeamSpeak address without confusing an IPv6 colon for a port separator. */
6
+ export declare function splitHostPort(address: string, defaultPort?: string): HostPort;
7
+ /**
8
+ * Parse an address to connect to, and check it can be one: a host, which
9
+ * contains nothing a host name or IP address cannot, and a port from 1 to
10
+ * 65535. Throws an InvalidAddressError otherwise.
11
+ */
12
+ export declare function parseConnectAddress(address: string): HostPort & {
13
+ portNumber: number;
14
+ };
15
+ export declare function joinHostPort(host: string, port: string): string;
16
+ export declare function isIpAddress(host: string): boolean;
17
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/client/address.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,SAAS,GAAG,QAAQ,CA0B7E;AAKD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAatF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK/D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD"}
@@ -0,0 +1,66 @@
1
+ import { isIP } from "node:net";
2
+ import { InvalidAddressError } from "./errors.js";
3
+ /** Parse a TeamSpeak address without confusing an IPv6 colon for a port separator. */
4
+ export function splitHostPort(address, defaultPort = "9987") {
5
+ const input = address.trim();
6
+ if (input.startsWith("[")) {
7
+ const closingBracket = input.indexOf("]");
8
+ if (closingBracket > 0) {
9
+ const host = input.slice(1, closingBracket);
10
+ const suffix = input.slice(closingBracket + 1);
11
+ if (suffix.startsWith(":") && /^\d+$/.test(suffix.slice(1))) {
12
+ return { host, port: suffix.slice(1) };
13
+ }
14
+ if (!suffix)
15
+ return { host, port: defaultPort };
16
+ }
17
+ }
18
+ // A raw IPv6 literal has no unambiguous port separator. Internal callers
19
+ // normally use bracket notation, but accepting the literal with the default
20
+ // port prevents a final IPv6 segment from being mistaken for a port.
21
+ if (isIP(input) === 6)
22
+ return { host: input, port: defaultPort };
23
+ const lastColon = input.lastIndexOf(":");
24
+ if (lastColon < 0)
25
+ return { host: input, port: defaultPort };
26
+ const candidatePort = input.slice(lastColon + 1);
27
+ if (/^\d+$/.test(candidatePort) && input.indexOf(":") === lastColon) {
28
+ return { host: input.slice(0, lastColon), port: candidatePort };
29
+ }
30
+ return { host: input, port: defaultPort };
31
+ }
32
+ /** Characters no host name or IP address contains, whitespace among them. */
33
+ const NOT_IN_A_HOST = /[\s\p{Cc}/?#@[\]\\]/u;
34
+ /**
35
+ * Parse an address to connect to, and check it can be one: a host, which
36
+ * contains nothing a host name or IP address cannot, and a port from 1 to
37
+ * 65535. Throws an InvalidAddressError otherwise.
38
+ */
39
+ export function parseConnectAddress(address) {
40
+ const { host, port } = splitHostPort(address);
41
+ if (host === "")
42
+ throw new InvalidAddressError(address, "no host");
43
+ // A colon is left only in an IPv6 literal; anywhere else it is a port that
44
+ // is not a number, which splitHostPort keeps as part of the host.
45
+ if (NOT_IN_A_HOST.test(host) || (host.includes(":") && isIP(host) !== 6)) {
46
+ throw new InvalidAddressError(address, "not a host name, IP address or host:port");
47
+ }
48
+ const portNumber = Number(port);
49
+ if (!Number.isInteger(portNumber) || portNumber < 1 || portNumber > 65535) {
50
+ throw new InvalidAddressError(address, `port ${port} is not from 1 to 65535`);
51
+ }
52
+ return { host, port, portNumber };
53
+ }
54
+ export function joinHostPort(host, port) {
55
+ const normalizedHost = stripBrackets(host);
56
+ return isIP(normalizedHost) === 6 || normalizedHost.includes(":")
57
+ ? `[${normalizedHost}]:${port}`
58
+ : `${normalizedHost}:${port}`;
59
+ }
60
+ export function isIpAddress(host) {
61
+ return isIP(stripBrackets(host)) !== 0;
62
+ }
63
+ function stripBrackets(host) {
64
+ return host.startsWith("[") && host.endsWith("]") ? host.slice(1, -1) : host;
65
+ }
66
+ //# sourceMappingURL=address.js.map
@@ -0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AO,EAAE,QAAQ,IAAI,yBAAyB,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY;IACrD,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC/D,CAAC,CAAC,IAAI,cAAc,KAAK,IAAI,EAAE;QAC/B,CAAC,CAAC,GAAG,cAAc,IAAI,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Commands only the voice protocol has.
3
+ *
4
+ * ServerQuery has no subscriptions — a query client hears every channel's
5
+ * events once it registers for them — and no `channelgetdescription`, since its
6
+ * `channelinfo` already carries the description. These run on the voice
7
+ * client alone, which is why they take one rather than any CommandExecutor.
8
+ */
9
+ import type { Client } from "../client.js";
10
+ import type { ChannelID, CommandOptions } from "@honeybbq/teamspeak";
11
+ /** The channel's description, which `listChannels` omits for bandwidth. */
12
+ export declare function getChannelDescription(client: Client, cid: ChannelID, options?: CommandOptions): Promise<string>;
13
+ /**
14
+ * Subscribe to a channel: receive its clients' events and voice without
15
+ * joining it.
16
+ */
17
+ export declare function subscribeChannel(client: Client, cid: ChannelID, options?: CommandOptions): Promise<void>;
18
+ /** Stop receiving a subscribed channel's events and voice. */
19
+ export declare function unsubscribeChannel(client: Client, cid: ChannelID, options?: CommandOptions): Promise<void>;
20
+ /** Subscribe to every channel on the server. */
21
+ export declare function subscribeAllChannels(client: Client, options?: CommandOptions): Promise<void>;
22
+ /** Unsubscribe from every channel on the server. */
23
+ export declare function unsubscribeAllChannels(client: Client, options?: CommandOptions): Promise<void>;
24
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../src/client/api/voice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErE,2EAA2E;AAC3E,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,8DAA8D;AAC9D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,gDAAgD;AAChD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,oDAAoD;AACpD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Commands only the voice protocol has.
3
+ *
4
+ * ServerQuery has no subscriptions — a query client hears every channel's
5
+ * events once it registers for them — and no `channelgetdescription`, since its
6
+ * `channelinfo` already carries the description. These run on the voice
7
+ * client alone, which is why they take one rather than any CommandExecutor.
8
+ */
9
+ /** The channel's description, which `listChannels` omits for bandwidth. */
10
+ export async function getChannelDescription(client, cid, options) {
11
+ const rows = await client.send({ command: "channelgetdescription", params: [["cid", cid]] }, options);
12
+ return rows[0]?.["channel_description"] ?? "";
13
+ }
14
+ /**
15
+ * Subscribe to a channel: receive its clients' events and voice without
16
+ * joining it.
17
+ */
18
+ export async function subscribeChannel(client, cid, options) {
19
+ await client.send({ command: "channelsubscribe", params: [["cid", cid]] }, options);
20
+ }
21
+ /** Stop receiving a subscribed channel's events and voice. */
22
+ export async function unsubscribeChannel(client, cid, options) {
23
+ await client.send({ command: "channelunsubscribe", params: [["cid", cid]] }, options);
24
+ }
25
+ /** Subscribe to every channel on the server. */
26
+ export async function subscribeAllChannels(client, options) {
27
+ await client.send({ command: "channelsubscribeall" }, options);
28
+ }
29
+ /** Unsubscribe from every channel on the server. */
30
+ export async function unsubscribeAllChannels(client, options) {
31
+ await client.send({ command: "channelunsubscribeall" }, options);
32
+ }
33
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../src/client/api/voice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAc,EACd,GAAc,EACd,OAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAC5B,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,EAC5D,OAAO,CACR,CAAC;IACF,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAAc,EACd,GAAc,EACd,OAAwB;IAExB,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACtF,CAAC;AAED,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAc,EACd,GAAc,EACd,OAAwB;IAExB,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACxF,CAAC;AAED,gDAAgD;AAChD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,OAAwB;IAExB,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC;AAED,oDAAoD;AACpD,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAc,EACd,OAAwB;IAExB,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * What the connected server is, and what that means for the caller.
3
+ *
4
+ * TS3 and TS6 differ in ways that stay invisible until something breaks. The
5
+ * clearest: the server hashes a client's public key with SHA-1 on TS3 and
6
+ * SHA-256 on TS6, so a client that assumes either one computes a
7
+ * `client_unique_identifier` the other server never sends.
8
+ *
9
+ * Everything below comes from the handshake — `initserver` carries
10
+ * `virtualserver_version`, the one place the server names itself, along with
11
+ * its name, icon, banner and welcome message — so reading it costs no extra
12
+ * round trip.
13
+ */
14
+ import { type IconID, type ServerFamily, type ServerID } from "@honeybbq/teamspeak";
15
+ import { type UIDAlgorithm } from "./crypto/identity.js";
16
+ /** What a server said about itself in the handshake. */
17
+ export interface ServerCapabilities {
18
+ /** The `virtualserver_version` string, exactly as the server sent it. */
19
+ readonly version: string;
20
+ /** Major version number, or 0 when it could not be parsed. */
21
+ readonly major: number;
22
+ /** Which server generation this is. */
23
+ readonly family: ServerFamily;
24
+ /**
25
+ * The hash the server uses for `client_unique_identifier`.
26
+ *
27
+ * Read from the family rather than offered as a setting: the server decides
28
+ * this, and a client that picks differently never matches.
29
+ */
30
+ readonly uidAlgorithm: UIDAlgorithm;
31
+ /** The virtual server's name (`virtualserver_name`). */
32
+ readonly name: string;
33
+ /**
34
+ * The server's icon (`virtualserver_icon_id`), or `undefined` for none. The
35
+ * server sends the icon's CRC32, sometimes as a negative 32-bit number; this
36
+ * is the unsigned value, which names the icon file.
37
+ */
38
+ readonly iconID: IconID | undefined;
39
+ /** The host banner image's URL (`virtualserver_hostbanner_gfx_url`), if one is set. */
40
+ readonly hostBannerImageURL: string | undefined;
41
+ /** The welcome message shown on connecting (`virtualserver_welcomemessage`). */
42
+ readonly welcomeMessage: string;
43
+ /** The virtual server's ID (`virtualserver_id`); 0 when the server did not send it. */
44
+ readonly serverID: ServerID;
45
+ /** The virtual server's unique identifier (`virtualserver_unique_identifier`); empty when not sent. */
46
+ readonly serverUID: string;
47
+ /** The host message (`virtualserver_hostmessage`) the server wants shown on connecting. */
48
+ readonly hostMessage: string;
49
+ /**
50
+ * How the host message is to be shown (`virtualserver_hostmessage_mode`).
51
+ * Compare it with `HostMessageMode`; a server may send a value the table
52
+ * does not name.
53
+ */
54
+ readonly hostMessageMode: number;
55
+ }
56
+ /**
57
+ * Read what a server says about itself in `initserver`, or a version string
58
+ * alone, such as "6.0.0-beta13.1 [Build: 1]".
59
+ */
60
+ export declare function parseServerCapabilities(initserver: string | Readonly<Record<string, string>>): ServerCapabilities;
61
+ /**
62
+ * Capabilities of a server that has not been connected to yet.
63
+ *
64
+ * The family is `unknown` — nothing has said which server this is — and
65
+ * `uidAlgorithm` is SHA-1, the TS3 hash.
66
+ */
67
+ export declare function unknownServerCapabilities(): ServerCapabilities;
68
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/client/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAc,KAAK,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEhG,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEjF,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,uFAAuF;IACvF,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,gFAAgF;IAChF,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,uGAAuG;IACvG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACpD,kBAAkB,CAyBpB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * What the connected server is, and what that means for the caller.
3
+ *
4
+ * TS3 and TS6 differ in ways that stay invisible until something breaks. The
5
+ * clearest: the server hashes a client's public key with SHA-1 on TS3 and
6
+ * SHA-256 on TS6, so a client that assumes either one computes a
7
+ * `client_unique_identifier` the other server never sends.
8
+ *
9
+ * Everything below comes from the handshake — `initserver` carries
10
+ * `virtualserver_version`, the one place the server names itself, along with
11
+ * its name, icon, banner and welcome message — so reading it costs no extra
12
+ * round trip.
13
+ */
14
+ import { asServerID } from "@honeybbq/teamspeak";
15
+ import { parseIconID, parseUint64 } from "../core/internal.js";
16
+ import { uidAlgorithmForVersion } from "./crypto/identity.js";
17
+ /**
18
+ * Read what a server says about itself in `initserver`, or a version string
19
+ * alone, such as "6.0.0-beta13.1 [Build: 1]".
20
+ */
21
+ export function parseServerCapabilities(initserver) {
22
+ const params = typeof initserver === "string" ? { virtualserver_version: initserver } : initserver;
23
+ const version = params["virtualserver_version"] ?? "";
24
+ const parsed = Number.parseInt(version, 10);
25
+ const major = Number.isNaN(parsed) ? 0 : parsed;
26
+ let family = "unknown";
27
+ if (major === 3)
28
+ family = "ts3";
29
+ else if (major >= 6)
30
+ family = "ts6";
31
+ return {
32
+ version,
33
+ major,
34
+ family,
35
+ uidAlgorithm: uidAlgorithmForVersion(version),
36
+ name: params["virtualserver_name"] ?? "",
37
+ iconID: parseIconID(params["virtualserver_icon_id"]),
38
+ hostBannerImageURL: params["virtualserver_hostbanner_gfx_url"]?.trim() || undefined,
39
+ welcomeMessage: params["virtualserver_welcomemessage"] ?? "",
40
+ serverID: asServerID(parseUint64(params["virtualserver_id"] ?? "")),
41
+ serverUID: params["virtualserver_unique_identifier"] ?? "",
42
+ hostMessage: params["virtualserver_hostmessage"] ?? "",
43
+ hostMessageMode: hostMessageMode(params["virtualserver_hostmessage_mode"]),
44
+ };
45
+ }
46
+ /**
47
+ * Capabilities of a server that has not been connected to yet.
48
+ *
49
+ * The family is `unknown` — nothing has said which server this is — and
50
+ * `uidAlgorithm` is SHA-1, the TS3 hash.
51
+ */
52
+ export function unknownServerCapabilities() {
53
+ return parseServerCapabilities("");
54
+ }
55
+ function hostMessageMode(value) {
56
+ const parsed = Number.parseInt(value ?? "", 10);
57
+ return Number.isNaN(parsed) ? 0 : parsed;
58
+ }
59
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/client/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAiD,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAqB,MAAM,sBAAsB,CAAC;AA2CjF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAqD;IAErD,MAAM,MAAM,GACV,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;IACtF,MAAM,OAAO,GAAG,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEhD,IAAI,MAAM,GAAiB,SAAS,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC;QAAE,MAAM,GAAG,KAAK,CAAC;SAC3B,IAAI,KAAK,IAAI,CAAC;QAAE,MAAM,GAAG,KAAK,CAAC;IAEpC,OAAO;QACL,OAAO;QACP,KAAK;QACL,MAAM;QACN,YAAY,EAAE,sBAAsB,CAAC,OAAO,CAAC;QAC7C,IAAI,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE;QACxC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;QACpD,kBAAkB,EAAE,MAAM,CAAC,kCAAkC,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS;QACnF,cAAc,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAI,EAAE;QAC5D,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,SAAS,EAAE,MAAM,CAAC,iCAAiC,CAAC,IAAI,EAAE;QAC1D,WAAW,EAAE,MAAM,CAAC,2BAA2B,CAAC,IAAI,EAAE;QACtD,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,gCAAgC,CAAC,CAAC;KAC3E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,uBAAuB,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,eAAe,CAAC,KAAyB;IAChD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,196 @@
1
+ import { type EventMap, type VoiceOptions, type WhisperTargets, type ClientOptions } from "./types.js";
2
+ import { type ChannelID, type ClientID, type Codec, type CommandOptions, type UID, type Listener, type Unsubscribe, ClientStatus } from "@honeybbq/teamspeak";
3
+ import type { Identity } from "./crypto/index.js";
4
+ import { type FileTransferOptions } from "./transfer.js";
5
+ import type { ClientVersion, CommandExecutor, CommandRequest } from "@honeybbq/teamspeak";
6
+ import type { FileUploadInfo, FileDownloadInfo } from "@honeybbq/teamspeak";
7
+ import type { Readable, Writable } from "node:stream";
8
+ import { type ServerCapabilities } from "./capabilities.js";
9
+ /**
10
+ * What clientinit sends about the connection, with the passwords already in
11
+ * their wire form, `base64(sha1(password))`: hashed once, when the client is
12
+ * made, so the plain text is never held.
13
+ */
14
+ export interface ClientInitOptions {
15
+ readonly serverPasswordHash: string;
16
+ readonly defaultChannel: string;
17
+ readonly defaultChannelPasswordHash: string;
18
+ /** The platform, version and signature, copied so later changes to the option have no effect. */
19
+ readonly version: ClientVersion;
20
+ }
21
+ /**
22
+ * A TeamSpeak client over the voice protocol.
23
+ *
24
+ * Listeners run one at a time, in the order their events arrived, after the
25
+ * packet that carried them has been handled, so a listener may call the client
26
+ * and await an answer.
27
+ */
28
+ export declare class Client implements CommandExecutor, AsyncDisposable {
29
+ #private;
30
+ constructor(identity: Identity, addr: string, nickname: string, options?: ClientOptions);
31
+ /** Where the client is in its connection's life. */
32
+ get status(): ClientStatus;
33
+ /**
34
+ * Connect to the server. Resolves once the handshake completes.
35
+ *
36
+ * An address that cannot be one — no host, a port outside 1–65535 — rejects
37
+ * with an InvalidAddressError at once, before anything starts. A host name
38
+ * that does not resolve fails the attempt with a TeamspeakError whose
39
+ * `cause` is the lookup's error.
40
+ *
41
+ * A failed attempt rejects with its cause, such as the server's error for a
42
+ * rejected password. Aborting `signal` abandons the attempt and rejects with
43
+ * the signal's reason. The signal bounds only the connecting: once this
44
+ * resolves, the connection lasts until `disconnect()` or a drop.
45
+ * `connect()` does not retry; the `reconnect` option only retries a
46
+ * connection that drops after it was established.
47
+ *
48
+ * Called while a `disconnect()` is still saying goodbye, or while an earlier
49
+ * session's `disconnected` is still waiting to be delivered, this waits for
50
+ * that first, so the old session is closed, and its `disconnected`
51
+ * delivered, before the new one starts: no listener or `events()` iterator
52
+ * of the new session hears the old one end. A `disconnect()` called during
53
+ * that wait wins: this then rejects with a NotConnectedError.
54
+ *
55
+ * `connected` is delivered after this resolves, so a listener added right
56
+ * after `await client.connect()` still hears it.
57
+ */
58
+ connect(options?: {
59
+ readonly signal?: AbortSignal | undefined;
60
+ }): Promise<void>;
61
+ /**
62
+ * Leave the server and close the connection.
63
+ *
64
+ * Says goodbye first, waiting for the server's acknowledgement for a second
65
+ * at most, or less if `signal` aborts sooner. The connection is closed
66
+ * either way. A `connect()` still waiting for its handshake rejects with a
67
+ * NotConnectedError, and so do the commands still waiting for an answer.
68
+ * Resolves once `disconnected` has been delivered to the listeners, so one
69
+ * added after `await client.disconnect()` does not hear it. Does nothing on
70
+ * a client that is not connected; called again while an earlier call is
71
+ * still saying goodbye, it waits for that one.
72
+ */
73
+ disconnect(options?: {
74
+ readonly signal?: AbortSignal | undefined;
75
+ }): Promise<void>;
76
+ /** `await using client = …` disconnects when the scope ends. */
77
+ [Symbol.asyncDispose](): Promise<void>;
78
+ /**
79
+ * Send a raw command line and return the rows that answer it: the escape
80
+ * hatch for a command the typed functions do not cover. The line is sent as
81
+ * given, so its values must already be escaped and any channel password
82
+ * already hashed. `CommandName` lists the command names.
83
+ *
84
+ * Rejects with a NotConnectedError unless the client is connected: while it
85
+ * is still connecting, the session's keys may not exist yet.
86
+ */
87
+ exec(command: string, options?: CommandOptions): Promise<Record<string, string>[]>;
88
+ /**
89
+ * Send a raw command line without waiting for an answer, for the few
90
+ * commands the server answers with nothing at all. `CommandName` lists
91
+ * the command names.
92
+ *
93
+ * Commands are paced by a flood throttle; aborting `signal` while this waits
94
+ * for its turn rejects with the signal's reason and sends nothing. Rejects
95
+ * with a NotConnectedError unless the client is connected.
96
+ */
97
+ execNoWait(command: string, options?: {
98
+ readonly signal?: AbortSignal | undefined;
99
+ }): Promise<void>;
100
+ /**
101
+ * Send a typed command; this is the CommandExecutor the typed commands run on.
102
+ *
103
+ * The request passes through the `commandMiddleware` first. Channel
104
+ * passwords are then hashed, because that is this protocol's rule: the voice
105
+ * protocol expects `base64(sha1(password))`, where ServerQuery takes the
106
+ * password itself.
107
+ */
108
+ send(request: CommandRequest, options?: CommandOptions): Promise<Record<string, string>[]>;
109
+ /**
110
+ * Listen for an event. Returns a function that removes the listener.
111
+ *
112
+ * The event is named by an {@link EventName} constant or by its string, and
113
+ * the listener's payload type follows from it:
114
+ *
115
+ * ```ts
116
+ * client.on(EventName.TextMessage, (message) => console.log(message.message));
117
+ * ```
118
+ *
119
+ * A listener that throws does not stop the others: the rest of the event's
120
+ * listeners, and the events after it, are still delivered, and the exception
121
+ * is rethrown on its own, from a microtask, so it surfaces as an
122
+ * `uncaughtException` just as an EventEmitter listener's would. An async
123
+ * listener's rejection is not caught, and surfaces as an unhandled
124
+ * rejection.
125
+ */
126
+ on<K extends keyof EventMap>(event: K, listener: Listener<EventMap, K>): Unsubscribe;
127
+ /** Listen for the next occurrence of an event only. */
128
+ once<K extends keyof EventMap>(event: K, listener: Listener<EventMap, K>): Unsubscribe;
129
+ /**
130
+ * An event as an async iterator, for `for await`:
131
+ *
132
+ * ```ts
133
+ * for await (const message of client.events("textMessage", { signal })) { … }
134
+ * ```
135
+ *
136
+ * Events that arrive while the loop body runs are buffered, so none is
137
+ * missed. The buffer is unbounded: an iterator that is not consumed as fast
138
+ * as events arrive holds every one of them in memory until it is read, so
139
+ * stop iterating (or abort `signal`) when you stop reading. Voice is the
140
+ * exception: at most 256 `voiceData` frames are buffered, and the rest are
141
+ * dropped, as for a listener that falls behind.
142
+ *
143
+ * Iteration ends when the loop exits early (`break`, `return`, a throw), and
144
+ * — for every event but `disconnected` — when the client disconnects. When
145
+ * `signal` aborts, listening stops at once, whatever is buffered is
146
+ * discarded, and the pending and every later `next()` reject with the
147
+ * signal's reason, as `events.on` in Node does.
148
+ *
149
+ * `next()` may be called again before an earlier call has settled; the calls
150
+ * are answered in order.
151
+ */
152
+ events<K extends keyof EventMap>(event: K, options?: {
153
+ readonly signal?: AbortSignal | undefined;
154
+ }): AsyncIterableIterator<EventMap[K]>;
155
+ /** This client's id on the server, assigned in the handshake; 0 before it. */
156
+ get clientID(): ClientID;
157
+ /**
158
+ * What the connected server is: version, generation, and the uid hash it
159
+ * uses. Read from `initserver`; before connecting the family is `unknown`
160
+ * and the uid hash SHA-1.
161
+ */
162
+ get serverCapabilities(): ServerCapabilities;
163
+ /**
164
+ * Our own `client_unique_identifier`, hashed with the algorithm the connected
165
+ * server uses.
166
+ *
167
+ * TS3 uses SHA-1 and TS6 SHA-256, so this reads the algorithm learned during
168
+ * initserver rather than assuming one. Comparing a hard-coded SHA-1 UID to a
169
+ * TS6 server silently never matches.
170
+ */
171
+ get uid(): UID;
172
+ /** The channel this client is in, as it last learned; 0 before connecting. */
173
+ get channelID(): ChannelID;
174
+ /**
175
+ * Send Opus voice directly to specific clients, bypassing channel routing.
176
+ * Throws a NotConnectedError unless the client is connected, and a
177
+ * RangeError for no target, more than 32, or an id that is not a client id.
178
+ */
179
+ sendWhisper(data: Uint8Array, targets: WhisperTargets, codec: Codec): void;
180
+ /**
181
+ * Send one encoded audio frame to the channel this client is in. Throws a
182
+ * NotConnectedError unless the client is connected.
183
+ */
184
+ sendVoice(data: Uint8Array, codec: Codec, options?: VoiceOptions): void;
185
+ /**
186
+ * Upload `data` over a negotiated transfer, through the client's
187
+ * `fileTransferSocketFactory` if it has one.
188
+ */
189
+ uploadFileData(host: string, info: FileUploadInfo, data: Readable, options?: Pick<FileTransferOptions, "signal" | "trace">): Promise<void>;
190
+ /**
191
+ * Download a negotiated transfer into `dest`, through the client's
192
+ * `fileTransferSocketFactory` if it has one.
193
+ */
194
+ downloadFileData(host: string, info: FileDownloadInfo, dest: Writable, options?: Pick<FileTransferOptions, "signal" | "trace">): Promise<void>;
195
+ }
196
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","source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