@honeybbq/teamspeak 1.0.0-beta.18 → 1.0.0-beta.20
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/README.md +4 -2
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/dist/client/api/files.d.ts +29 -14
- package/dist/client/api/files.d.ts.map +1 -1
- package/dist/client/api/files.js +45 -6
- package/dist/client/api/files.js.map +1 -1
- package/dist/client/api/voice.d.ts +2 -1
- package/dist/client/api/voice.d.ts.map +1 -1
- package/dist/client/api/voice.js +6 -2
- package/dist/client/api/voice.js.map +1 -1
- package/dist/client/capabilities.d.ts +15 -11
- package/dist/client/capabilities.d.ts.map +1 -1
- package/dist/client/capabilities.js +16 -6
- package/dist/client/capabilities.js.map +1 -1
- package/dist/client/client.d.ts +13 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +181 -48
- package/dist/client/client.js.map +1 -1
- package/dist/client/crypto/crypt.d.ts +6 -0
- package/dist/client/crypto/crypt.d.ts.map +1 -1
- package/dist/client/crypto/crypt.js +13 -7
- package/dist/client/crypto/crypt.js.map +1 -1
- package/dist/client/crypto/eax.d.ts +4 -0
- package/dist/client/crypto/eax.d.ts.map +1 -1
- package/dist/client/crypto/eax.js +27 -21
- package/dist/client/crypto/eax.js.map +1 -1
- package/dist/client/errors.d.ts +13 -0
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js +23 -0
- package/dist/client/errors.js.map +1 -1
- package/dist/client/handshake/crypt-handshake.d.ts +2 -1
- package/dist/client/handshake/crypt-handshake.d.ts.map +1 -1
- package/dist/client/handshake/crypt-handshake.js +4 -2
- package/dist/client/handshake/crypt-handshake.js.map +1 -1
- package/dist/client/handshake.js +1 -1
- package/dist/client/handshake.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/throttle.d.ts +11 -0
- package/dist/client/throttle.d.ts.map +1 -1
- package/dist/client/throttle.js +38 -3
- package/dist/client/throttle.js.map +1 -1
- package/dist/client/transfer.d.ts +23 -4
- package/dist/client/transfer.d.ts.map +1 -1
- package/dist/client/transfer.js +114 -11
- package/dist/client/transfer.js.map +1 -1
- package/dist/client/transport/handler.d.ts.map +1 -1
- package/dist/client/transport/handler.js +47 -43
- package/dist/client/transport/handler.js.map +1 -1
- package/dist/client/view.d.ts +18 -1
- package/dist/client/view.d.ts.map +1 -1
- package/dist/client/view.js +10 -0
- package/dist/client/view.js.map +1 -1
- package/dist/core/api/clients.d.ts +21 -19
- package/dist/core/api/clients.d.ts.map +1 -1
- package/dist/core/api/clients.js +6 -8
- package/dist/core/api/clients.js.map +1 -1
- package/dist/core/api/command.d.ts +18 -13
- package/dist/core/api/command.d.ts.map +1 -1
- package/dist/core/api/command.js +13 -9
- package/dist/core/api/command.js.map +1 -1
- package/dist/core/api/files.d.ts +18 -5
- package/dist/core/api/files.d.ts.map +1 -1
- package/dist/core/api/files.js +7 -8
- package/dist/core/api/files.js.map +1 -1
- package/dist/core/api/groups.d.ts +17 -2
- package/dist/core/api/groups.d.ts.map +1 -1
- package/dist/core/api/groups.js +13 -11
- package/dist/core/api/groups.js.map +1 -1
- package/dist/core/api/parse.d.ts +7 -7
- package/dist/core/api/parse.d.ts.map +1 -1
- package/dist/core/api/parse.js +18 -17
- package/dist/core/api/parse.js.map +1 -1
- package/dist/core/channel-tree.js +38 -1
- package/dist/core/channel-tree.js.map +1 -1
- package/dist/core/command/ids.d.ts +7 -3
- package/dist/core/command/ids.d.ts.map +1 -1
- package/dist/core/command/ids.js +16 -7
- package/dist/core/command/ids.js.map +1 -1
- package/dist/core/command/request.d.ts +6 -0
- package/dist/core/command/request.d.ts.map +1 -1
- package/dist/core/command/request.js +12 -0
- package/dist/core/command/request.js.map +1 -1
- package/dist/core/errors.d.ts +23 -3
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +45 -20
- package/dist/core/errors.js.map +1 -1
- package/dist/core/events.d.ts +28 -10
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/internal.d.ts +1 -1
- package/dist/core/internal.d.ts.map +1 -1
- package/dist/core/internal.js +1 -1
- package/dist/core/internal.js.map +1 -1
- package/dist/core/notifications.d.ts +1 -1
- package/dist/core/notifications.js +9 -8
- package/dist/core/notifications.js.map +1 -1
- package/dist/core/reconnect.d.ts +16 -5
- package/dist/core/reconnect.d.ts.map +1 -1
- package/dist/core/reconnect.js +32 -4
- package/dist/core/reconnect.js.map +1 -1
- package/dist/core/types.d.ts +15 -16
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/query/client.d.ts.map +1 -1
- package/dist/query/client.js +63 -8
- package/dist/query/client.js.map +1 -1
- package/dist/query/errors.d.ts +20 -0
- package/dist/query/errors.d.ts.map +1 -1
- package/dist/query/errors.js +31 -0
- package/dist/query/errors.js.map +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.d.ts.map +1 -1
- package/dist/query/index.js +1 -1
- package/dist/query/index.js.map +1 -1
- package/dist/query/lines.d.ts +11 -0
- package/dist/query/lines.d.ts.map +1 -1
- package/dist/query/lines.js +36 -6
- package/dist/query/lines.js.map +1 -1
- package/dist/query/options.d.ts +26 -0
- package/dist/query/options.d.ts.map +1 -1
- package/dist/query/options.js +7 -0
- package/dist/query/options.js.map +1 -1
- package/dist/query/reconnect.d.ts +5 -0
- package/dist/query/reconnect.d.ts.map +1 -1
- package/dist/query/reconnect.js +26 -7
- package/dist/query/reconnect.js.map +1 -1
- package/dist/query/ssh.js +9 -4
- package/dist/query/ssh.js.map +1 -1
- package/dist/query/stream.d.ts +2 -0
- package/dist/query/stream.d.ts.map +1 -1
- package/dist/query/stream.js +19 -1
- package/dist/query/stream.js.map +1 -1
- package/dist/query/transport.d.ts +12 -2
- package/dist/query/transport.d.ts.map +1 -1
- package/dist/query/web.d.ts +3 -1
- package/dist/query/web.d.ts.map +1 -1
- package/dist/query/web.js +88 -19
- package/dist/query/web.js.map +1 -1
- package/dist/stream/errors.d.ts +24 -6
- package/dist/stream/errors.d.ts.map +1 -1
- package/dist/stream/errors.js +42 -7
- package/dist/stream/errors.js.map +1 -1
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +1 -1
- package/dist/stream/index.js.map +1 -1
- package/dist/stream/published.d.ts.map +1 -1
- package/dist/stream/published.js +61 -25
- package/dist/stream/published.js.map +1 -1
- package/dist/stream/streams.d.ts +9 -4
- package/dist/stream/streams.d.ts.map +1 -1
- package/dist/stream/streams.js +69 -19
- package/dist/stream/streams.js.map +1 -1
- package/dist/stream/types.d.ts +17 -1
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/stream/wire.d.ts +7 -2
- package/dist/stream/wire.d.ts.map +1 -1
- package/dist/stream/wire.js +39 -6
- package/dist/stream/wire.js.map +1 -1
- package/package.json +2 -1
- package/src/client/api/files.ts +64 -20
- package/src/client/api/voice.ts +5 -2
- package/src/client/capabilities.ts +25 -15
- package/src/client/client.ts +188 -42
- package/src/client/crypto/crypt.ts +15 -7
- package/src/client/crypto/eax.ts +27 -22
- package/src/client/errors.ts +25 -0
- package/src/client/handshake/crypt-handshake.ts +6 -3
- package/src/client/handshake.ts +1 -1
- package/src/client/index.ts +1 -0
- package/src/client/throttle.ts +41 -3
- package/src/client/transfer.ts +129 -21
- package/src/client/transport/handler.ts +54 -46
- package/src/client/view.ts +28 -0
- package/src/core/api/clients.ts +32 -31
- package/src/core/api/command.ts +22 -16
- package/src/core/api/files.ts +25 -15
- package/src/core/api/groups.ts +32 -13
- package/src/core/api/parse.ts +18 -17
- package/src/core/channel-tree.ts +39 -1
- package/src/core/command/ids.ts +16 -7
- package/src/core/command/request.ts +18 -0
- package/src/core/errors.ts +47 -20
- package/src/core/events.ts +28 -10
- package/src/core/internal.ts +1 -1
- package/src/core/notifications.ts +9 -8
- package/src/core/reconnect.ts +60 -8
- package/src/core/types.ts +15 -16
- package/src/query/client.ts +60 -6
- package/src/query/errors.ts +34 -0
- package/src/query/index.ts +1 -0
- package/src/query/lines.ts +38 -6
- package/src/query/options.ts +32 -0
- package/src/query/reconnect.ts +27 -7
- package/src/query/ssh.ts +11 -4
- package/src/query/stream.ts +17 -1
- package/src/query/testing/live.ts +4 -4
- package/src/query/transport.ts +10 -2
- package/src/query/web.ts +83 -22
- package/src/stream/errors.ts +46 -8
- package/src/stream/index.ts +2 -0
- package/src/stream/published.ts +70 -23
- package/src/stream/streams.ts +71 -21
- package/src/stream/types.ts +22 -2
- package/src/stream/wire.ts +46 -10
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
11
|
<strong>An independent TeamSpeak client protocol library written in pure TypeScript.</strong><br>
|
|
12
|
-
Works with TeamSpeak 3 and TeamSpeak 6 servers. No proprietary SDK
|
|
12
|
+
Works with TeamSpeak 3 and TeamSpeak 6 servers. No proprietary SDK or code.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -110,6 +110,8 @@ Details in [the compatibility page](https://honeybbq.github.io/teamspeak-js/docu
|
|
|
110
110
|
|
|
111
111
|
Protocol knowledge was primarily informed by the [TSLib](https://github.com/Splamy/TS3AudioBot) implementation in [TS3AudioBot](https://github.com/Splamy/TS3AudioBot) by Splamy. Huge thanks to the TS3AudioBot project and its contributors.
|
|
112
112
|
|
|
113
|
+
The error code names and descriptions, the permission names and descriptions, and the table of client versions with their signatures draw on [tsdeclarations](https://github.com/ReSpeak/tsdeclarations) by [ReSpeak](https://github.com/ReSpeak), used under the MIT licence; see [THIRD_PARTY_NOTICES.md](https://github.com/HoneyBBQ/teamspeak-js/blob/main/THIRD_PARTY_NOTICES.md). Thanks to ReSpeak for documenting the protocol in the open.
|
|
114
|
+
|
|
113
115
|
## Contributing
|
|
114
116
|
|
|
115
117
|
See [CONTRIBUTING.md](https://github.com/HoneyBBQ/teamspeak-js/blob/main/.github/CONTRIBUTING.md) for setup, checks and the integration suite.
|
|
@@ -122,6 +124,6 @@ See [CONTRIBUTING.md](https://github.com/HoneyBBQ/teamspeak-js/blob/main/.github
|
|
|
122
124
|
|
|
123
125
|
<sub>TeamSpeak is a registered trademark of [TeamSpeak Systems, Inc.](https://teamspeak.com/). This project is not affiliated with, endorsed by, or associated with TeamSpeak Systems, Inc. in any way.</sub>
|
|
124
126
|
|
|
125
|
-
<sub>This library is an **independent implementation** built from public documentation, observation of network traffic, and independent research. It contains no TeamSpeak proprietary code, headers, libraries, or binaries.</sub>
|
|
127
|
+
<sub>This library is an **independent implementation** built from public documentation, open-source implementations, observation of network traffic, and independent research. It contains no TeamSpeak proprietary code, headers, libraries, or binaries.</sub>
|
|
126
128
|
|
|
127
129
|
<sub>The project implements the client side only and does not implement a TeamSpeak server.</sub>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
@honeybbq/teamspeak contains material derived from
|
|
4
|
+
[tsdeclarations](https://github.com/ReSpeak/tsdeclarations) by ReSpeak, which is
|
|
5
|
+
available under the MIT licence or the Apache License 2.0. This project uses it
|
|
6
|
+
under the MIT licence, reproduced below.
|
|
7
|
+
|
|
8
|
+
## What is derived from it
|
|
9
|
+
|
|
10
|
+
- `src/core/errorcode.ts`: the error code names, values and descriptions (`Errors.csv`).
|
|
11
|
+
- `src/core/permission-name.ts`: the permission names and their descriptions (`Permissions.csv`).
|
|
12
|
+
- `src/versions/index.ts`: the client versions and their signatures (`Versions.csv`).
|
|
13
|
+
|
|
14
|
+
## tsdeclarations licence (MIT)
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
The MIT License (MIT)
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2015 Sebastian Neubauer
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
in the Software without restriction, including without limitation the rights
|
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
furnished to do so, subject to the following conditions:
|
|
27
|
+
|
|
28
|
+
The above copyright notice and this permission notice shall be included in all
|
|
29
|
+
copies or substantial portions of the Software.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
+
SOFTWARE.
|
|
38
|
+
```
|
|
@@ -14,11 +14,10 @@ import type { ChannelID, CommandExecutor, FileDownloadOptions, FileUploadOptions
|
|
|
14
14
|
import type { FileTransferOptions } from "../transfer.js";
|
|
15
15
|
/**
|
|
16
16
|
* How {@link uploadFile} negotiates and moves the file: the options of
|
|
17
|
-
* `initFileUpload
|
|
18
|
-
*
|
|
19
|
-
* signal to the transfer too.
|
|
17
|
+
* `initFileUpload` and those of `uploadFileData`. `signal` and `timeoutMs`
|
|
18
|
+
* apply to the negotiation, and the signal to the transfer too.
|
|
20
19
|
*/
|
|
21
|
-
export interface UploadFileOptions extends
|
|
20
|
+
export interface UploadFileOptions extends FileUploadOptions, FileTransferOptions {
|
|
22
21
|
/**
|
|
23
22
|
* The host of the file transfer port. A voice client sends to the host it
|
|
24
23
|
* connected to, so it needs none; any other connection must name it. A host
|
|
@@ -28,24 +27,29 @@ export interface UploadFileOptions extends Omit<FileUploadOptions, "resume">, Fi
|
|
|
28
27
|
/**
|
|
29
28
|
* The size in bytes of a stream passed as the data, which the server needs
|
|
30
29
|
* before it takes the file. Required for a `Readable`; for bytes it is their
|
|
31
|
-
* length, and a different value here is refused.
|
|
30
|
+
* length, and a different value here is refused. A stream that gives fewer
|
|
31
|
+
* or more bytes fails the upload.
|
|
32
32
|
*/
|
|
33
33
|
readonly size?: bigint | number | undefined;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* How {@link downloadFile} negotiates and moves the file. With a
|
|
37
|
+
* `seekPosition` the bytes are the file's from there to its end.
|
|
38
|
+
*/
|
|
39
|
+
export interface DownloadFileOptions extends FileDownloadOptions, FileTransferOptions {
|
|
37
40
|
/** The host of the file transfer port, as for {@link UploadFileOptions}. */
|
|
38
41
|
readonly host?: string | undefined;
|
|
39
42
|
/**
|
|
40
43
|
* Write the file into this stream instead of returning its bytes. The stream
|
|
41
|
-
* is
|
|
44
|
+
* is neither ended nor destroyed, as for `downloadFileData`, so it may take
|
|
45
|
+
* several downloads; a failed transfer still rejects the call.
|
|
42
46
|
*/
|
|
43
47
|
readonly dest?: Writable | undefined;
|
|
44
48
|
/**
|
|
45
|
-
* The
|
|
46
|
-
*
|
|
47
|
-
* {@link FileTransferError} before any byte is read
|
|
48
|
-
* negotiated is
|
|
49
|
+
* The most bytes to hold in memory when no `dest` is given; 268435456
|
|
50
|
+
* (256 MiB) by default. A larger download is refused with a
|
|
51
|
+
* {@link FileTransferError} before any byte is read, and the transfer the
|
|
52
|
+
* server negotiated is stopped.
|
|
49
53
|
*/
|
|
50
54
|
readonly maxSize?: number | undefined;
|
|
51
55
|
}
|
|
@@ -54,7 +58,14 @@ export interface DownloadFileOptions extends Omit<FileDownloadOptions, "seekPosi
|
|
|
54
58
|
* (`initFileUpload`) and send the bytes (`uploadFileData`), in one call.
|
|
55
59
|
*
|
|
56
60
|
* `data` is the bytes, or a `Readable` with `options.size` the number of bytes
|
|
57
|
-
* it will give.
|
|
61
|
+
* it will give. It resolves once the server has closed the transfer
|
|
62
|
+
* connection, which it does when it has the file; a stream that gives fewer or
|
|
63
|
+
* more bytes than `size` fails the call, and the connection is closed.
|
|
64
|
+
*
|
|
65
|
+
* With `resume`, `data` is still the whole file: the server says how much it
|
|
66
|
+
* already holds from an interrupted upload (a file that is not there is
|
|
67
|
+
* refused with 2054), and only the rest is sent; `overwrite` cannot go with it
|
|
68
|
+
* (2056). An existing file is not replaced unless `overwrite` is set, and
|
|
58
69
|
* the directory the file goes in must exist (a missing one is refused with
|
|
59
70
|
* 2054, invalid file path): make it with `createDirectory` first. A refusal of
|
|
60
71
|
* the negotiation is thrown as the ServerError it is, before anything is sent;
|
|
@@ -72,7 +83,11 @@ export declare function uploadFile(client: CommandExecutor, channelID: ChannelID
|
|
|
72
83
|
* call. With `options.dest` the bytes go into that stream instead and nothing
|
|
73
84
|
* is held, which is the way to fetch a large file.
|
|
74
85
|
*
|
|
75
|
-
*
|
|
86
|
+
* With `seekPosition` the bytes are the file's from there to its end, which is
|
|
87
|
+
* how to resume a partial download: append them to what was already fetched.
|
|
88
|
+
*
|
|
89
|
+
* More than `maxSize` bytes (256 MiB unless set) is refused when no `dest` is
|
|
90
|
+
* given, and the transfer the server negotiated is stopped.
|
|
76
91
|
* A file that is not there is the ServerError of the negotiation: 2051 on TS3
|
|
77
92
|
* 3.13.8 and TS6 beta13.1. A path that names a directory is not refused by the
|
|
78
93
|
* server: it announces a size and sends nothing, so the call rejects with a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/client/api/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/client/api/files.ts"],"names":[],"mappings":"AAAA;;;;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zD,OAAO,CAAC,IAAI,CAAC,CAAC;AACjB,wBAAgB,YAAY,CAC1B,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/client/api/files.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* file transfer port a voice client's does. WebQuery refuses every file command
|
|
10
10
|
* (error 5120), on both servers.
|
|
11
11
|
*/
|
|
12
|
-
import { Readable, Writable } from "node:stream";
|
|
13
|
-
import { initFileDownload, initFileUpload } from "@honeybbq/teamspeak";
|
|
12
|
+
import { Readable, Transform, Writable, pipeline } from "node:stream";
|
|
13
|
+
import { initFileDownload, initFileUpload, stopFileTransfer } from "@honeybbq/teamspeak";
|
|
14
14
|
import { FileTransferError } from "../errors.js";
|
|
15
15
|
import { downloadFileData, uploadFileData } from "../transfer.js";
|
|
16
16
|
function isTransferCapable(client) {
|
|
@@ -65,12 +65,35 @@ function sizeOf(data, declared) {
|
|
|
65
65
|
}
|
|
66
66
|
return size;
|
|
67
67
|
}
|
|
68
|
+
/** Drops the first `count` bytes of a stream. */
|
|
69
|
+
function skipBytes(count) {
|
|
70
|
+
let left = count;
|
|
71
|
+
return new Transform({
|
|
72
|
+
transform(chunk, _encoding, callback) {
|
|
73
|
+
if (left >= chunk.length) {
|
|
74
|
+
left -= chunk.length;
|
|
75
|
+
callback();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const rest = chunk.subarray(left);
|
|
79
|
+
left = 0;
|
|
80
|
+
callback(null, rest);
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
68
84
|
/**
|
|
69
85
|
* Upload a file into a channel's file area: negotiate the transfer
|
|
70
86
|
* (`initFileUpload`) and send the bytes (`uploadFileData`), in one call.
|
|
71
87
|
*
|
|
72
88
|
* `data` is the bytes, or a `Readable` with `options.size` the number of bytes
|
|
73
|
-
* it will give.
|
|
89
|
+
* it will give. It resolves once the server has closed the transfer
|
|
90
|
+
* connection, which it does when it has the file; a stream that gives fewer or
|
|
91
|
+
* more bytes than `size` fails the call, and the connection is closed.
|
|
92
|
+
*
|
|
93
|
+
* With `resume`, `data` is still the whole file: the server says how much it
|
|
94
|
+
* already holds from an interrupted upload (a file that is not there is
|
|
95
|
+
* refused with 2054), and only the rest is sent; `overwrite` cannot go with it
|
|
96
|
+
* (2056). An existing file is not replaced unless `overwrite` is set, and
|
|
74
97
|
* the directory the file goes in must exist (a missing one is refused with
|
|
75
98
|
* 2054, invalid file path): make it with `createDirectory` first. A refusal of
|
|
76
99
|
* the negotiation is thrown as the ServerError it is, before anything is sent;
|
|
@@ -87,10 +110,20 @@ export async function uploadFile(client, channelID, path, data, options = {}) {
|
|
|
87
110
|
const info = await initFileUpload(client, channelID, path, size, {
|
|
88
111
|
password: options.password,
|
|
89
112
|
overwrite: options.overwrite,
|
|
113
|
+
resume: options.resume,
|
|
90
114
|
signal: options.signal,
|
|
91
115
|
timeoutMs: options.timeoutMs,
|
|
92
116
|
});
|
|
93
|
-
|
|
117
|
+
// What the server holds is not sent again; a position past the end is for
|
|
118
|
+
// the transfer to refuse.
|
|
119
|
+
const skip = Number(info.seekPosition);
|
|
120
|
+
let source;
|
|
121
|
+
if (data instanceof Uint8Array)
|
|
122
|
+
source = Readable.from([data.subarray(skip)]);
|
|
123
|
+
else if (skip === 0)
|
|
124
|
+
source = data;
|
|
125
|
+
else
|
|
126
|
+
source = pipeline(data, skipBytes(skip), () => { });
|
|
94
127
|
await route.upload(info, source, transferOptions(options));
|
|
95
128
|
}
|
|
96
129
|
export async function downloadFile(client, channelID, path, options = {}) {
|
|
@@ -101,6 +134,7 @@ export async function downloadFile(client, channelID, path, options = {}) {
|
|
|
101
134
|
const route = routeFor(client, options);
|
|
102
135
|
const info = await initFileDownload(client, channelID, path, {
|
|
103
136
|
password: options.password,
|
|
137
|
+
seekPosition: options.seekPosition,
|
|
104
138
|
signal: options.signal,
|
|
105
139
|
timeoutMs: options.timeoutMs,
|
|
106
140
|
});
|
|
@@ -108,8 +142,13 @@ export async function downloadFile(client, channelID, path, options = {}) {
|
|
|
108
142
|
await route.download(info, options.dest, transferOptions(options));
|
|
109
143
|
return;
|
|
110
144
|
}
|
|
111
|
-
|
|
112
|
-
|
|
145
|
+
const wanted = info.size - info.seekPosition;
|
|
146
|
+
if (wanted > BigInt(maxSize)) {
|
|
147
|
+
// The server holds the negotiated transfer, and lists it among the active
|
|
148
|
+
// ones, until it is used or stopped. It is this connection's own, which is
|
|
149
|
+
// the only kind `ftstop` is safe to send.
|
|
150
|
+
await stopFileTransfer(client, info.serverFileTransferID).catch(() => { });
|
|
151
|
+
throw new FileTransferError(`the download is ${wanted} bytes, over the ${maxSize} bytes maxSize allows in memory`);
|
|
113
152
|
}
|
|
114
153
|
const chunks = [];
|
|
115
154
|
const sink = new Writable({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/client/api/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/client/api/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AASzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA+DlE,SAAS,iBAAiB,CAAC,MAAuB;IAChD,MAAM,SAAS,GAAG,MAAkC,CAAC;IACrD,OAAO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AC,EAAE,CAAC;QAC7B,0EAA0E;QAC1E,2EAA2E;QAC3E,0CAA0C;QAC1C,MAAM,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC1E,MAAM,IAAI,iBAAiB,CACzB,mBAAmB,MAAM,oBAAoB,OAAO,iCAAiC,CACtF,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC;QACxB,KAAK,CAAC,KAAa,EAAE,SAAS,EAAE,IAAI;YAClC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,IAAI,EAAE,CAAC;QACT,CAAC;KACF,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -11,7 +11,8 @@ import type { ChannelID, ClientID, CommandOptions } from "@honeybbq/teamspeak";
|
|
|
11
11
|
/**
|
|
12
12
|
* The channel's description, which `listChannels` omits for bandwidth. The
|
|
13
13
|
* server answers with a `notifychanneledited` that the client does not report as
|
|
14
|
-
* a `channelEdited` event, since it is no edit.
|
|
14
|
+
* a `channelEdited` event, since it is no edit. Rejects with a NoDataError if
|
|
15
|
+
* the server sends no such answer.
|
|
15
16
|
*/
|
|
16
17
|
export declare function getChannelDescription(client: Client, cid: ChannelID, options?: CommandOptions): Promise<string>;
|
|
17
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../src/client/api/voice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;A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vB,OAAO,CAAC,IAAI,CAAC,CAEf;AAaD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,OAAO,CAAC,CAalB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAaD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,QAAQ,EAAE,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,QAAQ,EAAE,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
package/dist/client/api/voice.js
CHANGED
|
@@ -10,7 +10,8 @@ import { ErrorCode, NoDataError, ServerError } from "@honeybbq/teamspeak";
|
|
|
10
10
|
/**
|
|
11
11
|
* The channel's description, which `listChannels` omits for bandwidth. The
|
|
12
12
|
* server answers with a `notifychanneledited` that the client does not report as
|
|
13
|
-
* a `channelEdited` event, since it is no edit.
|
|
13
|
+
* a `channelEdited` event, since it is no edit. Rejects with a NoDataError if
|
|
14
|
+
* the server sends no such answer.
|
|
14
15
|
*/
|
|
15
16
|
export async function getChannelDescription(client, cid, options) {
|
|
16
17
|
const rows = await client.send({ command: "channelgetdescription", params: [["cid", cid]] }, options);
|
|
@@ -18,7 +19,10 @@ export async function getChannelDescription(client, cid, options) {
|
|
|
18
19
|
// can arrive while the command waits, a real edit with other properties,
|
|
19
20
|
// and the first row is then not the answer.
|
|
20
21
|
const answer = rows.find((row) => row["cid"] === String(cid) && "channel_description" in row);
|
|
21
|
-
|
|
22
|
+
// A missing answer is not an empty description.
|
|
23
|
+
if (answer === undefined)
|
|
24
|
+
throw new NoDataError("channelgetdescription");
|
|
25
|
+
return answer["channel_description"] ?? "";
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* The virtual server's properties as the server sends them on request, which
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../src/client/api/voice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG1E
|
|
1
|
+
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../src/client/api/voice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG1E;;;;;GAKG;AACH,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,2EAA2E;IAC3E,yEAAyE;IACzE,4CAA4C;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAC;IAC9F,gDAAgD;IAChD,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,WAAW,CAAC,uBAAuB,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,qBAAqB,CAAC,IAAI,E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AA+E;AAC/E,KAAK,UAAU,QAAQ,CACrB,MAAc,EACd,OAAsC,EACtC,SAA8B,EAC9B,OAAwB;IAExB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACnC,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,SAA8B,EAC9B,OAAwB;IAExB,OAAO,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAc,EACd,SAA8B,EAC9B,OAAwB;IAExB,OAAO,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Everything below comes from the handshake — `initserver` carries
|
|
10
10
|
* `virtualserver_version`, the one place the server names itself, along with
|
|
11
|
-
*
|
|
12
|
-
* round trip.
|
|
11
|
+
* the protocol extensions it supports and the messages it greets a client
|
|
12
|
+
* with — so reading it costs no extra round trip. Only what holds for the
|
|
13
|
+
* whole connection is kept here. The server's name, icon and banner can be
|
|
14
|
+
* edited while a client is connected, so they are on the view, which follows
|
|
15
|
+
* the edits: `view.serverName`, `view.serverIconID` and
|
|
16
|
+
* `view.serverBannerImageURL`.
|
|
13
17
|
*/
|
|
14
|
-
import { HostMessageMode, type
|
|
18
|
+
import { HostMessageMode, type ServerFamily, type ServerID } from "@honeybbq/teamspeak";
|
|
15
19
|
import { type UIDAlgorithm } from "./crypto/identity.js";
|
|
16
20
|
/** What a server said about itself in the handshake. */
|
|
17
21
|
export interface ServerCapabilities {
|
|
@@ -28,16 +32,16 @@ export interface ServerCapabilities {
|
|
|
28
32
|
* this, and a client that picks differently never matches.
|
|
29
33
|
*/
|
|
30
34
|
readonly uidAlgorithm: UIDAlgorithm;
|
|
31
|
-
/** The virtual server's name (`virtualserver_name`). */
|
|
32
|
-
readonly name: string;
|
|
33
35
|
/**
|
|
34
|
-
* The
|
|
35
|
-
*
|
|
36
|
-
*
|
|
36
|
+
* The optional protocol features the server says it supports
|
|
37
|
+
* (`virtualserver_capability_extensions`), in the server's order and each
|
|
38
|
+
* once, such as `["FILETIME", "STREAM_P2P"]`; test one with `includes`.
|
|
39
|
+
* Empty when it names none, as a TeamSpeak 3 server does. Frozen.
|
|
40
|
+
*
|
|
41
|
+
* It is what the server claims, read as sent; the SDK does not refuse a
|
|
42
|
+
* command because a name is missing from it.
|
|
37
43
|
*/
|
|
38
|
-
readonly
|
|
39
|
-
/** The host banner image's URL (`virtualserver_hostbanner_gfx_url`), if one is set. */
|
|
40
|
-
readonly hostBannerImageURL: string | undefined;
|
|
44
|
+
readonly extensions: readonly string[];
|
|
41
45
|
/** The welcome message shown on connecting (`virtualserver_welcomemessage`). */
|
|
42
46
|
readonly welcomeMessage: string;
|
|
43
47
|
/** The virtual server's ID (`virtualserver_id`); 0 when the server did not send it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/client/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/client/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,eAAe,EAEf,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAE7B,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;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,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,eAAe,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACpD,kBAAkB,CAmBpB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D"}
|
|
@@ -8,11 +8,15 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Everything below comes from the handshake — `initserver` carries
|
|
10
10
|
* `virtualserver_version`, the one place the server names itself, along with
|
|
11
|
-
*
|
|
12
|
-
* round trip.
|
|
11
|
+
* the protocol extensions it supports and the messages it greets a client
|
|
12
|
+
* with — so reading it costs no extra round trip. Only what holds for the
|
|
13
|
+
* whole connection is kept here. The server's name, icon and banner can be
|
|
14
|
+
* edited while a client is connected, so they are on the view, which follows
|
|
15
|
+
* the edits: `view.serverName`, `view.serverIconID` and
|
|
16
|
+
* `view.serverBannerImageURL`.
|
|
13
17
|
*/
|
|
14
18
|
import { asServerID, HostMessageMode, serverFamilyForVersion, } from "@honeybbq/teamspeak";
|
|
15
|
-
import {
|
|
19
|
+
import { parseUint64 } from "../core/internal.js";
|
|
16
20
|
import { uidAlgorithmForVersion } from "./crypto/identity.js";
|
|
17
21
|
/**
|
|
18
22
|
* Read what a server says about itself in `initserver`, or a version string
|
|
@@ -28,9 +32,7 @@ export function parseServerCapabilities(initserver) {
|
|
|
28
32
|
major,
|
|
29
33
|
family: serverFamilyForVersion(version),
|
|
30
34
|
uidAlgorithm: uidAlgorithmForVersion(version),
|
|
31
|
-
|
|
32
|
-
iconID: parseIconID(params["virtualserver_icon_id"]),
|
|
33
|
-
hostBannerImageURL: params["virtualserver_hostbanner_gfx_url"]?.trim() || undefined,
|
|
35
|
+
extensions: extensions(params["virtualserver_capability_extensions"]),
|
|
34
36
|
welcomeMessage: params["virtualserver_welcomemessage"] ?? "",
|
|
35
37
|
serverID: asServerID(parseUint64(params["virtualserver_id"] ?? "")),
|
|
36
38
|
serverUID: params["virtualserver_unique_identifier"] ?? "",
|
|
@@ -47,6 +49,14 @@ export function parseServerCapabilities(initserver) {
|
|
|
47
49
|
export function unknownServerCapabilities() {
|
|
48
50
|
return parseServerCapabilities("");
|
|
49
51
|
}
|
|
52
|
+
/** The names of a comma-separated extension list, without blanks or repeats. */
|
|
53
|
+
function extensions(value) {
|
|
54
|
+
const names = (value ?? "")
|
|
55
|
+
.split(",")
|
|
56
|
+
.map((name) => name.trim())
|
|
57
|
+
.filter((name) => name !== "");
|
|
58
|
+
return Object.freeze([...new Set(names)]);
|
|
59
|
+
}
|
|
50
60
|
function hostMessageMode(value) {
|
|
51
61
|
const parsed = Number.parseInt(value ?? "", 10);
|
|
52
62
|
return (Number.isNaN(parsed) ? HostMessageMode.None : parsed);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/client/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3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AC;KAC3E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,uBAAuB,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,gFAAgF;AAChF,SAAS,UAAU,CAAC,KAAyB;IAC3C,MAAM,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACxB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,eAAe,CAAC,KAAyB;IAChD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAoB,CAAC;AACnF,CAAC"}
|
package/dist/client/client.d.ts
CHANGED
|
@@ -75,7 +75,10 @@ export declare class Client implements CommandExecutor, AsyncDisposable {
|
|
|
75
75
|
* Leave the server and close the connection.
|
|
76
76
|
*
|
|
77
77
|
* Says goodbye first, waiting for the server's acknowledgement for a second
|
|
78
|
-
* at most, or less if `signal` aborts sooner. The
|
|
78
|
+
* at most, or less if `signal` aborts sooner. The goodbye is sent at once,
|
|
79
|
+
* past the flood throttle, and also by a client still connecting whose
|
|
80
|
+
* clientinit is out; commands still waiting for their turn reject with a
|
|
81
|
+
* NotConnectedError and are never sent. The connection is closed
|
|
79
82
|
* either way. A `connect()` still waiting for its handshake rejects with a
|
|
80
83
|
* NotConnectedError, and so do the commands still waiting for an answer.
|
|
81
84
|
* Resolves once `disconnected` has been delivered to the listeners, so one
|
|
@@ -104,6 +107,11 @@ export declare class Client implements CommandExecutor, AsyncDisposable {
|
|
|
104
107
|
*
|
|
105
108
|
* Rejects with a NotConnectedError unless the client is connected: while it
|
|
106
109
|
* is still connecting, the session's keys may not exist yet.
|
|
110
|
+
*
|
|
111
|
+
* A command the server refuses as flooding (`ErrorCode.ClientIsFlooding`)
|
|
112
|
+
* with a time to wait is sent again after it, and every other command waits
|
|
113
|
+
* too, up to three times and while its timeout allows; the refusal that
|
|
114
|
+
* remains rejects as it is.
|
|
107
115
|
*/
|
|
108
116
|
exec(command: string, options?: CommandOptions): Promise<Record<string, string>[]>;
|
|
109
117
|
/**
|
|
@@ -217,8 +225,10 @@ export declare class Client implements CommandExecutor, AsyncDisposable {
|
|
|
217
225
|
*/
|
|
218
226
|
sendGroupWhisper(data: Uint8Array, target: GroupWhisperTarget, codec: Codec): void;
|
|
219
227
|
/**
|
|
220
|
-
* Send one encoded audio frame to the channel this client is in.
|
|
221
|
-
*
|
|
228
|
+
* Send one encoded audio frame to the channel this client is in. An empty
|
|
229
|
+
* frame marks the end of speech: the server relays it, and listeners get a
|
|
230
|
+
* `voiceData` event with empty `data`. Throws a NotConnectedError unless the
|
|
231
|
+
* client is connected.
|
|
222
232
|
*/
|
|
223
233
|
sendVoice(data: Uint8Array, codec: Codec, options?: VoiceOptions): void;
|
|
224
234
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAOnB,MAAM,YAAY,CAAC;AAIpB,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,QAAQ,EACb,KAAK,KAAK,EAGV,KAAK,cAAc,EACnB,KAAK,GAAG,EAGR,KAAK,QAA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