phonic 0.31.0 → 0.31.1
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.js +2 -2
- package/dist/cjs/api/resources/conversations/client/Socket.d.ts +1 -1
- package/dist/cjs/api/types/ToolCallOutputProcessedPayload.d.ts +8 -0
- package/dist/cjs/api/types/WarningPayload.d.ts +15 -0
- package/dist/cjs/api/types/WarningPayload.js +5 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/conversations/client/Socket.d.mts +1 -1
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.d.mts +8 -0
- package/dist/esm/api/types/WarningPayload.d.mts +15 -0
- package/dist/esm/api/types/WarningPayload.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/Client.js
CHANGED
|
@@ -51,8 +51,8 @@ class PhonicClient {
|
|
|
51
51
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "phonic",
|
|
54
|
-
"X-Fern-SDK-Version": "0.31.
|
|
55
|
-
"User-Agent": "phonic/0.31.
|
|
54
|
+
"X-Fern-SDK-Version": "0.31.1",
|
|
55
|
+
"User-Agent": "phonic/0.31.1",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -7,7 +7,7 @@ export declare namespace ConversationsSocket {
|
|
|
7
7
|
interface Args {
|
|
8
8
|
socket: core.ReconnectingWebSocket;
|
|
9
9
|
}
|
|
10
|
-
type Response = Phonic.ReadyToStartConversationPayload | Phonic.ConversationCreatedPayload | Phonic.InputTextPayload | Phonic.InputCancelledPayload | Phonic.AudioChunkResponsePayload | Phonic.UserStartedSpeakingPayload | Phonic.UserFinishedSpeakingPayload | Phonic.DtmfPayload | Phonic.ToolCallPayload | Phonic.ToolCallOutputProcessedPayload | Phonic.ToolCallInterruptedPayload | Phonic.AssistantChoseNotToRespondPayload | Phonic.AssistantEndedConversationPayload | Phonic.AssistantStartedSpeakingPayload | Phonic.AssistantFinishedSpeakingPayload | Phonic.ErrorPayload;
|
|
10
|
+
type Response = Phonic.ReadyToStartConversationPayload | Phonic.ConversationCreatedPayload | Phonic.InputTextPayload | Phonic.InputCancelledPayload | Phonic.AudioChunkResponsePayload | Phonic.UserStartedSpeakingPayload | Phonic.UserFinishedSpeakingPayload | Phonic.DtmfPayload | Phonic.ToolCallPayload | Phonic.ToolCallOutputProcessedPayload | Phonic.ToolCallInterruptedPayload | Phonic.AssistantChoseNotToRespondPayload | Phonic.AssistantEndedConversationPayload | Phonic.AssistantStartedSpeakingPayload | Phonic.AssistantFinishedSpeakingPayload | Phonic.ErrorPayload | Phonic.WarningPayload;
|
|
11
11
|
type EventHandlers = {
|
|
12
12
|
open?: () => void;
|
|
13
13
|
message?: (message: Response) => void;
|
|
@@ -6,12 +6,18 @@ export interface ToolCallOutputProcessedPayload {
|
|
|
6
6
|
/** ID of the completed tool call */
|
|
7
7
|
tool_call_id: string;
|
|
8
8
|
tool: ToolCallOutputProcessedPayload.Tool;
|
|
9
|
+
/** Configuration of the tool that was called */
|
|
10
|
+
tool_config?: Record<string, unknown> | null;
|
|
11
|
+
/** HTTP method used for webhook endpoint (null for WebSocket tools) */
|
|
12
|
+
endpoint_method?: string | null;
|
|
9
13
|
/** Webhook endpoint URL (null for WebSocket tools) */
|
|
10
14
|
endpoint_url?: string | null;
|
|
11
15
|
/** Webhook timeout in milliseconds (null for WebSocket tools) */
|
|
12
16
|
endpoint_timeout_ms?: number | null;
|
|
13
17
|
/** When webhook was called (null for WebSocket tools) */
|
|
14
18
|
endpoint_called_at?: string | null;
|
|
19
|
+
/** Query string parameters sent to webhook endpoint (null for WebSocket tools) */
|
|
20
|
+
query_params?: Record<string, string | null> | null;
|
|
15
21
|
/** Webhook request body (null for WebSocket tools) */
|
|
16
22
|
request_body?: Record<string, unknown> | null;
|
|
17
23
|
/** Webhook response body (null for WebSocket tools) */
|
|
@@ -22,6 +28,8 @@ export interface ToolCallOutputProcessedPayload {
|
|
|
22
28
|
output?: unknown | null;
|
|
23
29
|
/** Webhook HTTP status code (null for WebSocket tools) */
|
|
24
30
|
response_status_code?: number | null;
|
|
31
|
+
/** Duration of the tool call in milliseconds */
|
|
32
|
+
duration_ms?: number | null;
|
|
25
33
|
/** Whether the tool call timed out */
|
|
26
34
|
timed_out?: boolean | null;
|
|
27
35
|
/** Error message if tool call failed */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WarningPayload {
|
|
5
|
+
type: "warning";
|
|
6
|
+
warning: WarningPayload.Warning;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace WarningPayload {
|
|
9
|
+
interface Warning {
|
|
10
|
+
/** Warning message */
|
|
11
|
+
message: string;
|
|
12
|
+
/** Warning code */
|
|
13
|
+
code?: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -59,3 +59,4 @@ __exportStar(require("./ToolCallInterruptedPayload.js"), exports);
|
|
|
59
59
|
__exportStar(require("./AssistantChoseNotToRespondPayload.js"), exports);
|
|
60
60
|
__exportStar(require("./AssistantEndedConversationPayload.js"), exports);
|
|
61
61
|
__exportStar(require("./ErrorPayload.js"), exports);
|
|
62
|
+
__exportStar(require("./WarningPayload.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.31.
|
|
1
|
+
export declare const SDK_VERSION = "0.31.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,8 +15,8 @@ export class PhonicClient {
|
|
|
15
15
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
16
16
|
"X-Fern-Language": "JavaScript",
|
|
17
17
|
"X-Fern-SDK-Name": "phonic",
|
|
18
|
-
"X-Fern-SDK-Version": "0.31.
|
|
19
|
-
"User-Agent": "phonic/0.31.
|
|
18
|
+
"X-Fern-SDK-Version": "0.31.1",
|
|
19
|
+
"User-Agent": "phonic/0.31.1",
|
|
20
20
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
21
21
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
22
22
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -7,7 +7,7 @@ export declare namespace ConversationsSocket {
|
|
|
7
7
|
interface Args {
|
|
8
8
|
socket: core.ReconnectingWebSocket;
|
|
9
9
|
}
|
|
10
|
-
type Response = Phonic.ReadyToStartConversationPayload | Phonic.ConversationCreatedPayload | Phonic.InputTextPayload | Phonic.InputCancelledPayload | Phonic.AudioChunkResponsePayload | Phonic.UserStartedSpeakingPayload | Phonic.UserFinishedSpeakingPayload | Phonic.DtmfPayload | Phonic.ToolCallPayload | Phonic.ToolCallOutputProcessedPayload | Phonic.ToolCallInterruptedPayload | Phonic.AssistantChoseNotToRespondPayload | Phonic.AssistantEndedConversationPayload | Phonic.AssistantStartedSpeakingPayload | Phonic.AssistantFinishedSpeakingPayload | Phonic.ErrorPayload;
|
|
10
|
+
type Response = Phonic.ReadyToStartConversationPayload | Phonic.ConversationCreatedPayload | Phonic.InputTextPayload | Phonic.InputCancelledPayload | Phonic.AudioChunkResponsePayload | Phonic.UserStartedSpeakingPayload | Phonic.UserFinishedSpeakingPayload | Phonic.DtmfPayload | Phonic.ToolCallPayload | Phonic.ToolCallOutputProcessedPayload | Phonic.ToolCallInterruptedPayload | Phonic.AssistantChoseNotToRespondPayload | Phonic.AssistantEndedConversationPayload | Phonic.AssistantStartedSpeakingPayload | Phonic.AssistantFinishedSpeakingPayload | Phonic.ErrorPayload | Phonic.WarningPayload;
|
|
11
11
|
type EventHandlers = {
|
|
12
12
|
open?: () => void;
|
|
13
13
|
message?: (message: Response) => void;
|
|
@@ -6,12 +6,18 @@ export interface ToolCallOutputProcessedPayload {
|
|
|
6
6
|
/** ID of the completed tool call */
|
|
7
7
|
tool_call_id: string;
|
|
8
8
|
tool: ToolCallOutputProcessedPayload.Tool;
|
|
9
|
+
/** Configuration of the tool that was called */
|
|
10
|
+
tool_config?: Record<string, unknown> | null;
|
|
11
|
+
/** HTTP method used for webhook endpoint (null for WebSocket tools) */
|
|
12
|
+
endpoint_method?: string | null;
|
|
9
13
|
/** Webhook endpoint URL (null for WebSocket tools) */
|
|
10
14
|
endpoint_url?: string | null;
|
|
11
15
|
/** Webhook timeout in milliseconds (null for WebSocket tools) */
|
|
12
16
|
endpoint_timeout_ms?: number | null;
|
|
13
17
|
/** When webhook was called (null for WebSocket tools) */
|
|
14
18
|
endpoint_called_at?: string | null;
|
|
19
|
+
/** Query string parameters sent to webhook endpoint (null for WebSocket tools) */
|
|
20
|
+
query_params?: Record<string, string | null> | null;
|
|
15
21
|
/** Webhook request body (null for WebSocket tools) */
|
|
16
22
|
request_body?: Record<string, unknown> | null;
|
|
17
23
|
/** Webhook response body (null for WebSocket tools) */
|
|
@@ -22,6 +28,8 @@ export interface ToolCallOutputProcessedPayload {
|
|
|
22
28
|
output?: unknown | null;
|
|
23
29
|
/** Webhook HTTP status code (null for WebSocket tools) */
|
|
24
30
|
response_status_code?: number | null;
|
|
31
|
+
/** Duration of the tool call in milliseconds */
|
|
32
|
+
duration_ms?: number | null;
|
|
25
33
|
/** Whether the tool call timed out */
|
|
26
34
|
timed_out?: boolean | null;
|
|
27
35
|
/** Error message if tool call failed */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WarningPayload {
|
|
5
|
+
type: "warning";
|
|
6
|
+
warning: WarningPayload.Warning;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace WarningPayload {
|
|
9
|
+
interface Warning {
|
|
10
|
+
/** Warning message */
|
|
11
|
+
message: string;
|
|
12
|
+
/** Warning code */
|
|
13
|
+
code?: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.31.
|
|
1
|
+
export declare const SDK_VERSION = "0.31.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.31.
|
|
1
|
+
export const SDK_VERSION = "0.31.1";
|