@sonara/client 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.d.ts +4 -1
- package/dist/cjs/client.js +4 -1
- package/dist/cjs/types.d.ts +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +4 -1
- package/dist/esm/client.js +4 -1
- package/dist/esm/types.d.ts +3 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
package/dist/cjs/client.d.ts
CHANGED
|
@@ -43,7 +43,10 @@ export declare class SonaraClient {
|
|
|
43
43
|
request(type: string, fields?: Record<string, unknown>): Promise<Reply>;
|
|
44
44
|
/** Add `text` as one item; resolves with its item id. */
|
|
45
45
|
speak(text: string, opts?: SpeakOptions): Promise<number>;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Playback control: play, pause, toggle, stop, skip, previous, next, restart, mute, unmute,
|
|
48
|
+
* and in a code block next_line, previous_line (protocol 1.7).
|
|
49
|
+
*/
|
|
47
50
|
control(action: ControlAction): Promise<void>;
|
|
48
51
|
/** Change a setting; resolves with the value now in force. */
|
|
49
52
|
set(key: SettingKey, value: unknown): Promise<unknown>;
|
package/dist/cjs/client.js
CHANGED
|
@@ -56,7 +56,10 @@ class SonaraClient {
|
|
|
56
56
|
const r = await this.request("speak", fields);
|
|
57
57
|
return r.item_id;
|
|
58
58
|
}
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Playback control: play, pause, toggle, stop, skip, previous, next, restart, mute, unmute,
|
|
61
|
+
* and in a code block next_line, previous_line (protocol 1.7).
|
|
62
|
+
*/
|
|
60
63
|
async control(action) {
|
|
61
64
|
await this.request("control", { action });
|
|
62
65
|
}
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** Queue mode of `speak`: after everything queued, or drop the unread items first. */
|
|
2
2
|
export type SpeakMode = "append" | "replace";
|
|
3
3
|
/** Core playback controls (protocol v1, `control`). */
|
|
4
|
-
export type ControlAction = "play" | "pause" | "toggle" | "stop" | "skip" | "previous" | "next" | "restart" | "mute" | "unmute"
|
|
4
|
+
export type ControlAction = "play" | "pause" | "toggle" | "stop" | "skip" | "previous" | "next" | "restart" | "mute" | "unmute"
|
|
5
|
+
/** In a code block (protocol 1.7): the next or previous code line. */
|
|
6
|
+
| "next_line" | "previous_line";
|
|
5
7
|
/** Core setting keys (protocol v1, `set` / `get`). */
|
|
6
8
|
export type SettingKey = "volume" | "rate" | "voice" | "engine";
|
|
7
9
|
export interface SpeakOptions {
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PROTOCOL = exports.VERSION = void 0;
|
|
4
4
|
/** Version of this package, sent as `client.version` in `hello`. */
|
|
5
|
-
exports.VERSION = "0.
|
|
5
|
+
exports.VERSION = "0.25.0";
|
|
6
6
|
/** Protocol this client speaks. */
|
|
7
7
|
exports.PROTOCOL = { major: 1, minor: 0 };
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -43,7 +43,10 @@ export declare class SonaraClient {
|
|
|
43
43
|
request(type: string, fields?: Record<string, unknown>): Promise<Reply>;
|
|
44
44
|
/** Add `text` as one item; resolves with its item id. */
|
|
45
45
|
speak(text: string, opts?: SpeakOptions): Promise<number>;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Playback control: play, pause, toggle, stop, skip, previous, next, restart, mute, unmute,
|
|
48
|
+
* and in a code block next_line, previous_line (protocol 1.7).
|
|
49
|
+
*/
|
|
47
50
|
control(action: ControlAction): Promise<void>;
|
|
48
51
|
/** Change a setting; resolves with the value now in force. */
|
|
49
52
|
set(key: SettingKey, value: unknown): Promise<unknown>;
|
package/dist/esm/client.js
CHANGED
|
@@ -53,7 +53,10 @@ export class SonaraClient {
|
|
|
53
53
|
const r = await this.request("speak", fields);
|
|
54
54
|
return r.item_id;
|
|
55
55
|
}
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Playback control: play, pause, toggle, stop, skip, previous, next, restart, mute, unmute,
|
|
58
|
+
* and in a code block next_line, previous_line (protocol 1.7).
|
|
59
|
+
*/
|
|
57
60
|
async control(action) {
|
|
58
61
|
await this.request("control", { action });
|
|
59
62
|
}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** Queue mode of `speak`: after everything queued, or drop the unread items first. */
|
|
2
2
|
export type SpeakMode = "append" | "replace";
|
|
3
3
|
/** Core playback controls (protocol v1, `control`). */
|
|
4
|
-
export type ControlAction = "play" | "pause" | "toggle" | "stop" | "skip" | "previous" | "next" | "restart" | "mute" | "unmute"
|
|
4
|
+
export type ControlAction = "play" | "pause" | "toggle" | "stop" | "skip" | "previous" | "next" | "restart" | "mute" | "unmute"
|
|
5
|
+
/** In a code block (protocol 1.7): the next or previous code line. */
|
|
6
|
+
| "next_line" | "previous_line";
|
|
5
7
|
/** Core setting keys (protocol v1, `set` / `get`). */
|
|
6
8
|
export type SettingKey = "volume" | "rate" | "voice" | "engine";
|
|
7
9
|
export interface SpeakOptions {
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
package/package.json
CHANGED