phonic 0.32.5 → 0.32.6

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phonic",
46
- "X-Fern-SDK-Version": "0.32.5",
47
- "User-Agent": "phonic/0.32.5",
46
+ "X-Fern-SDK-Version": "0.32.6",
47
+ "User-Agent": "phonic/0.32.6",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -37,6 +37,7 @@ export declare class ConversationsSocket {
37
37
  sendAudioChunk(message: Phonic.AudioChunkPayload): void;
38
38
  sendUpdateSystemPrompt(message: Phonic.UpdateSystemPromptPayload): void;
39
39
  sendAddSystemMessage(message: Phonic.AddSystemMessagePayload): void;
40
+ sendUpdateToolsSubset(message: Phonic.UpdateToolsSubsetPayload): void;
40
41
  sendSetExternalId(message: Phonic.SetExternalIdPayload): void;
41
42
  sendToolCallOutput(message: Phonic.ToolCallOutputPayload): void;
42
43
  sendUnmute(message: Phonic.UnmutePayload): void;
@@ -55,5 +56,5 @@ export declare class ConversationsSocket {
55
56
  /** Send a binary payload to the websocket. */
56
57
  protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
57
58
  /** Send a JSON payload to the websocket. */
58
- protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
59
+ protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.UpdateToolsSubsetPayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
59
60
  }
@@ -106,6 +106,10 @@ class ConversationsSocket {
106
106
  this.assertSocketIsOpen();
107
107
  this.sendJson(message);
108
108
  }
109
+ sendUpdateToolsSubset(message) {
110
+ this.assertSocketIsOpen();
111
+ this.sendJson(message);
112
+ }
109
113
  sendSetExternalId(message) {
110
114
  this.assertSocketIsOpen();
111
115
  this.sendJson(message);
@@ -20,6 +20,7 @@ export declare namespace StreamTtsRequest {
20
20
  /** The audio format to stream. */
21
21
  const OutputFormat: {
22
22
  readonly Pcm44100: "pcm_44100";
23
+ readonly Pcm24000: "pcm_24000";
23
24
  readonly Pcm16000: "pcm_16000";
24
25
  readonly Pcm8000: "pcm_8000";
25
26
  readonly Mulaw8000: "mulaw_8000";
@@ -7,6 +7,7 @@ var StreamTtsRequest;
7
7
  /** The audio format to stream. */
8
8
  StreamTtsRequest.OutputFormat = {
9
9
  Pcm44100: "pcm_44100",
10
+ Pcm24000: "pcm_24000",
10
11
  Pcm16000: "pcm_16000",
11
12
  Pcm8000: "pcm_8000",
12
13
  Mulaw8000: "mulaw_8000",
@@ -0,0 +1,6 @@
1
+ import type * as Phonic from "../index.js";
2
+ export interface UpdateToolsSubsetPayload {
3
+ type: "update_tools_subset";
4
+ /** Tools available to the assistant. Use a string to reference a pre-defined tool by name, or define an inline WebSocket tool for this conversation. Tool names must be unique. */
5
+ tools: Phonic.ToolDefinition[];
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -66,6 +66,7 @@ export * from "./ToolName.js";
66
66
  export * from "./ToolParameter.js";
67
67
  export * from "./UnmutePayload.js";
68
68
  export * from "./UpdateSystemPromptPayload.js";
69
+ export * from "./UpdateToolsSubsetPayload.js";
69
70
  export * from "./UserFinishedSpeakingPayload.js";
70
71
  export * from "./UserStartedSpeakingPayload.js";
71
72
  export * from "./ValidationError.js";
@@ -82,6 +82,7 @@ __exportStar(require("./ToolName.js"), exports);
82
82
  __exportStar(require("./ToolParameter.js"), exports);
83
83
  __exportStar(require("./UnmutePayload.js"), exports);
84
84
  __exportStar(require("./UpdateSystemPromptPayload.js"), exports);
85
+ __exportStar(require("./UpdateToolsSubsetPayload.js"), exports);
85
86
  __exportStar(require("./UserFinishedSpeakingPayload.js"), exports);
86
87
  __exportStar(require("./UserStartedSpeakingPayload.js"), exports);
87
88
  __exportStar(require("./ValidationError.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.5";
1
+ export declare const SDK_VERSION = "0.32.6";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.32.5";
4
+ exports.SDK_VERSION = "0.32.6";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "phonic",
9
- "X-Fern-SDK-Version": "0.32.5",
10
- "User-Agent": "phonic/0.32.5",
9
+ "X-Fern-SDK-Version": "0.32.6",
10
+ "User-Agent": "phonic/0.32.6",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -37,6 +37,7 @@ export declare class ConversationsSocket {
37
37
  sendAudioChunk(message: Phonic.AudioChunkPayload): void;
38
38
  sendUpdateSystemPrompt(message: Phonic.UpdateSystemPromptPayload): void;
39
39
  sendAddSystemMessage(message: Phonic.AddSystemMessagePayload): void;
40
+ sendUpdateToolsSubset(message: Phonic.UpdateToolsSubsetPayload): void;
40
41
  sendSetExternalId(message: Phonic.SetExternalIdPayload): void;
41
42
  sendToolCallOutput(message: Phonic.ToolCallOutputPayload): void;
42
43
  sendUnmute(message: Phonic.UnmutePayload): void;
@@ -55,5 +56,5 @@ export declare class ConversationsSocket {
55
56
  /** Send a binary payload to the websocket. */
56
57
  protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
57
58
  /** Send a JSON payload to the websocket. */
58
- protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
59
+ protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.UpdateToolsSubsetPayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
59
60
  }
@@ -70,6 +70,10 @@ export class ConversationsSocket {
70
70
  this.assertSocketIsOpen();
71
71
  this.sendJson(message);
72
72
  }
73
+ sendUpdateToolsSubset(message) {
74
+ this.assertSocketIsOpen();
75
+ this.sendJson(message);
76
+ }
73
77
  sendSetExternalId(message) {
74
78
  this.assertSocketIsOpen();
75
79
  this.sendJson(message);
@@ -20,6 +20,7 @@ export declare namespace StreamTtsRequest {
20
20
  /** The audio format to stream. */
21
21
  const OutputFormat: {
22
22
  readonly Pcm44100: "pcm_44100";
23
+ readonly Pcm24000: "pcm_24000";
23
24
  readonly Pcm16000: "pcm_16000";
24
25
  readonly Pcm8000: "pcm_8000";
25
26
  readonly Mulaw8000: "mulaw_8000";
@@ -4,6 +4,7 @@ export var StreamTtsRequest;
4
4
  /** The audio format to stream. */
5
5
  StreamTtsRequest.OutputFormat = {
6
6
  Pcm44100: "pcm_44100",
7
+ Pcm24000: "pcm_24000",
7
8
  Pcm16000: "pcm_16000",
8
9
  Pcm8000: "pcm_8000",
9
10
  Mulaw8000: "mulaw_8000",
@@ -0,0 +1,6 @@
1
+ import type * as Phonic from "../index.mjs";
2
+ export interface UpdateToolsSubsetPayload {
3
+ type: "update_tools_subset";
4
+ /** Tools available to the assistant. Use a string to reference a pre-defined tool by name, or define an inline WebSocket tool for this conversation. Tool names must be unique. */
5
+ tools: Phonic.ToolDefinition[];
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -66,6 +66,7 @@ export * from "./ToolName.mjs";
66
66
  export * from "./ToolParameter.mjs";
67
67
  export * from "./UnmutePayload.mjs";
68
68
  export * from "./UpdateSystemPromptPayload.mjs";
69
+ export * from "./UpdateToolsSubsetPayload.mjs";
69
70
  export * from "./UserFinishedSpeakingPayload.mjs";
70
71
  export * from "./UserStartedSpeakingPayload.mjs";
71
72
  export * from "./ValidationError.mjs";
@@ -66,6 +66,7 @@ export * from "./ToolName.mjs";
66
66
  export * from "./ToolParameter.mjs";
67
67
  export * from "./UnmutePayload.mjs";
68
68
  export * from "./UpdateSystemPromptPayload.mjs";
69
+ export * from "./UpdateToolsSubsetPayload.mjs";
69
70
  export * from "./UserFinishedSpeakingPayload.mjs";
70
71
  export * from "./UserStartedSpeakingPayload.mjs";
71
72
  export * from "./ValidationError.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.5";
1
+ export declare const SDK_VERSION = "0.32.6";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.32.5";
1
+ export const SDK_VERSION = "0.32.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.5",
3
+ "version": "0.32.6",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",