@happyrobot-ai/sdk 0.1.25 → 0.1.26
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/package.json +1 -1
- package/resources/voice.d.ts +3 -3
- package/resources/voice.js +3 -3
- package/types/voice.types.d.ts +5 -5
package/package.json
CHANGED
package/resources/voice.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ export declare class VoiceResource {
|
|
|
33
33
|
* Call this from your server, then pass the returned `url` and `token`
|
|
34
34
|
* to the browser where they can be used to initialize `HappyRobotVoiceClient`.
|
|
35
35
|
*
|
|
36
|
-
* Provide `workflow_id` to start a new call, or `session_id`
|
|
37
|
-
*
|
|
38
|
-
* the AI agent
|
|
36
|
+
* Provide `workflow_id` to start a new call, or `session_id` (with the
|
|
37
|
+
* required `should_takeover: true`) to take over an in-progress call, which
|
|
38
|
+
* drops the AI agent.
|
|
39
39
|
*/
|
|
40
40
|
createToken(body: CreateVoiceTokenBody): Promise<CreateVoiceTokenResponse>;
|
|
41
41
|
}
|
package/resources/voice.js
CHANGED
|
@@ -36,9 +36,9 @@ class VoiceResource {
|
|
|
36
36
|
* Call this from your server, then pass the returned `url` and `token`
|
|
37
37
|
* to the browser where they can be used to initialize `HappyRobotVoiceClient`.
|
|
38
38
|
*
|
|
39
|
-
* Provide `workflow_id` to start a new call, or `session_id`
|
|
40
|
-
*
|
|
41
|
-
* the AI agent
|
|
39
|
+
* Provide `workflow_id` to start a new call, or `session_id` (with the
|
|
40
|
+
* required `should_takeover: true`) to take over an in-progress call, which
|
|
41
|
+
* drops the AI agent.
|
|
42
42
|
*/
|
|
43
43
|
async createToken(body) {
|
|
44
44
|
return this.http.request({
|
package/types/voice.types.d.ts
CHANGED
|
@@ -24,17 +24,17 @@ export type CreateVoiceTokenBody = (CreateVoiceTokenBase & {
|
|
|
24
24
|
should_takeover?: never;
|
|
25
25
|
}) | (CreateVoiceTokenBase & {
|
|
26
26
|
/**
|
|
27
|
-
* ID of an in-progress session to
|
|
27
|
+
* ID of an in-progress session to take over. Generates a token for the
|
|
28
28
|
* session's existing LiveKit room.
|
|
29
29
|
*/
|
|
30
30
|
session_id: string;
|
|
31
31
|
workflow_id?: never;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* Must be `true`. Explicit opt-in confirming the joining participant
|
|
34
|
+
* takes over the call and the AI agent drops. Joining a live call
|
|
35
|
+
* without taking over is not supported.
|
|
36
36
|
*/
|
|
37
|
-
should_takeover
|
|
37
|
+
should_takeover: true;
|
|
38
38
|
});
|
|
39
39
|
/** POST /voice/tokens response. */
|
|
40
40
|
export interface CreateVoiceTokenResponse {
|