phonic 0.30.8 → 0.30.10
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/agents/client/Client.d.ts +13 -7
- package/dist/cjs/api/resources/agents/client/Client.js +15 -11
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +8 -6
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +11 -8
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +1 -0
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +4 -2
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/conversations/client/Client.js +4 -6
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -1
- package/dist/cjs/api/resources/extractionSchemas/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/extractionSchemas/client/Client.js +3 -5
- package/dist/cjs/api/resources/projects/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/projects/client/Client.js +3 -5
- package/dist/cjs/api/resources/projects/client/requests/UpdateProjectRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tools/client/Client.js +3 -5
- package/dist/cjs/api/resources/voices/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/voices/client/Client.js +3 -5
- package/dist/cjs/api/types/Agent.d.ts +8 -7
- package/dist/cjs/api/types/Agent.js +1 -0
- package/dist/cjs/api/types/ConfigPayload.d.ts +6 -4
- package/dist/cjs/api/types/ConfigPayload.js +2 -0
- package/dist/cjs/api/types/Conversation.d.ts +30 -9
- package/dist/cjs/api/types/Conversation.js +11 -0
- package/dist/cjs/api/types/ConversationExtraction.d.ts +1 -1
- package/dist/cjs/api/types/ConversationItem.d.ts +13 -13
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +7 -6
- package/dist/cjs/api/types/CreateAgentRequest.js +1 -0
- package/dist/cjs/api/types/ExtractionField.d.ts +1 -1
- package/dist/cjs/api/types/LanguageCode.d.ts +28 -0
- package/dist/cjs/api/types/LanguageCode.js +27 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +4 -3
- package/dist/cjs/api/types/Project.d.ts +1 -1
- package/dist/cjs/api/types/ToolCallOutputProcessedPayload.d.ts +8 -8
- package/dist/cjs/api/types/Voice.d.ts +1 -1
- 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/agents/client/Client.d.mts +13 -7
- package/dist/esm/api/resources/agents/client/Client.mjs +15 -11
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +8 -6
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +11 -8
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +1 -0
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +4 -2
- package/dist/esm/api/resources/conversations/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/conversations/client/Client.mjs +4 -6
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -1
- package/dist/esm/api/resources/extractionSchemas/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/extractionSchemas/client/Client.mjs +3 -5
- package/dist/esm/api/resources/projects/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +3 -5
- package/dist/esm/api/resources/projects/client/requests/UpdateProjectRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tools/client/Client.mjs +3 -5
- package/dist/esm/api/resources/voices/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/voices/client/Client.mjs +3 -5
- package/dist/esm/api/types/Agent.d.mts +8 -7
- package/dist/esm/api/types/Agent.mjs +1 -0
- package/dist/esm/api/types/ConfigPayload.d.mts +6 -4
- package/dist/esm/api/types/ConfigPayload.mjs +2 -0
- package/dist/esm/api/types/Conversation.d.mts +30 -9
- package/dist/esm/api/types/Conversation.mjs +10 -1
- package/dist/esm/api/types/ConversationExtraction.d.mts +1 -1
- package/dist/esm/api/types/ConversationItem.d.mts +13 -13
- package/dist/esm/api/types/CreateAgentRequest.d.mts +7 -6
- package/dist/esm/api/types/CreateAgentRequest.mjs +1 -0
- package/dist/esm/api/types/ExtractionField.d.mts +1 -1
- package/dist/esm/api/types/LanguageCode.d.mts +28 -0
- package/dist/esm/api/types/LanguageCode.mjs +24 -0
- package/dist/esm/api/types/OutboundCallConfig.d.mts +4 -3
- package/dist/esm/api/types/Project.d.mts +1 -1
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.d.mts +8 -8
- package/dist/esm/api/types/Voice.d.mts +1 -1
- 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 +2 -2
- package/reference.md +13 -7
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export const LanguageCode = {
|
|
5
|
+
Ar: "ar",
|
|
6
|
+
Zh: "zh",
|
|
7
|
+
Cs: "cs",
|
|
8
|
+
Da: "da",
|
|
9
|
+
Nl: "nl",
|
|
10
|
+
En: "en",
|
|
11
|
+
Fr: "fr",
|
|
12
|
+
De: "de",
|
|
13
|
+
Id: "id",
|
|
14
|
+
It: "it",
|
|
15
|
+
Ja: "ja",
|
|
16
|
+
Ko: "ko",
|
|
17
|
+
Pl: "pl",
|
|
18
|
+
Pt: "pt",
|
|
19
|
+
Ru: "ru",
|
|
20
|
+
Es: "es",
|
|
21
|
+
Sv: "sv",
|
|
22
|
+
Tr: "tr",
|
|
23
|
+
Vi: "vi",
|
|
24
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Phonic from "../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* When an `agent` is provided, these `config` options override the agent settings.
|
|
6
7
|
*/
|
|
@@ -10,7 +11,7 @@ export interface OutboundCallConfig {
|
|
|
10
11
|
/** The name of the project to use for the call. */
|
|
11
12
|
project?: string;
|
|
12
13
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
|
|
13
|
-
welcome_message?: string;
|
|
14
|
+
welcome_message?: string | null;
|
|
14
15
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
15
16
|
system_prompt?: string;
|
|
16
17
|
/** Variables that can be used in the welcome message and the system prompt. */
|
|
@@ -18,13 +19,13 @@ export interface OutboundCallConfig {
|
|
|
18
19
|
/** The voice ID to use for the agent. */
|
|
19
20
|
voice_id?: string;
|
|
20
21
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
21
|
-
no_input_poke_sec?: number;
|
|
22
|
+
no_input_poke_sec?: number | null;
|
|
22
23
|
/** The message to send after the specified silence. */
|
|
23
24
|
no_input_poke_text?: string;
|
|
24
25
|
/** Seconds of silence before ending the conversation. */
|
|
25
26
|
no_input_end_conversation_sec?: number;
|
|
26
27
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize */
|
|
27
|
-
|
|
28
|
+
languages?: Phonic.LanguageCode[];
|
|
28
29
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
29
30
|
boosted_keywords?: string[];
|
|
30
31
|
/** Array of built-in or custom tool names to use. */
|
|
@@ -7,23 +7,23 @@ export interface ToolCallOutputProcessedPayload {
|
|
|
7
7
|
tool_call_id: string;
|
|
8
8
|
tool: ToolCallOutputProcessedPayload.Tool;
|
|
9
9
|
/** Webhook endpoint URL (null for WebSocket tools) */
|
|
10
|
-
endpoint_url?: string;
|
|
10
|
+
endpoint_url?: string | null;
|
|
11
11
|
/** Webhook timeout in milliseconds (null for WebSocket tools) */
|
|
12
|
-
endpoint_timeout_ms?: number;
|
|
12
|
+
endpoint_timeout_ms?: number | null;
|
|
13
13
|
/** When webhook was called (null for WebSocket tools) */
|
|
14
|
-
endpoint_called_at?: string;
|
|
14
|
+
endpoint_called_at?: string | null;
|
|
15
15
|
/** Webhook request body (null for WebSocket tools) */
|
|
16
|
-
request_body?: Record<string, unknown
|
|
16
|
+
request_body?: Record<string, unknown> | null;
|
|
17
17
|
response_body?: unknown;
|
|
18
18
|
/** WebSocket tool parameters (null for webhook tools) */
|
|
19
|
-
parameters?: Record<string, unknown
|
|
19
|
+
parameters?: Record<string, unknown> | null;
|
|
20
20
|
output?: unknown;
|
|
21
21
|
/** Webhook HTTP status code (null for WebSocket tools) */
|
|
22
|
-
response_status_code?: number;
|
|
22
|
+
response_status_code?: number | null;
|
|
23
23
|
/** Whether the tool call timed out */
|
|
24
|
-
timed_out?: boolean;
|
|
24
|
+
timed_out?: boolean | null;
|
|
25
25
|
/** Error message if tool call failed */
|
|
26
|
-
error_message?: string;
|
|
26
|
+
error_message?: string | null;
|
|
27
27
|
}
|
|
28
28
|
export declare namespace ToolCallOutputProcessedPayload {
|
|
29
29
|
interface Tool {
|
|
@@ -2,6 +2,7 @@ export * from "./BadRequestErrorBody.mjs";
|
|
|
2
2
|
export * from "./Error_.mjs";
|
|
3
3
|
export * from "./BasicError.mjs";
|
|
4
4
|
export * from "./ValidationError.mjs";
|
|
5
|
+
export * from "./LanguageCode.mjs";
|
|
5
6
|
export * from "./Agent.mjs";
|
|
6
7
|
export * from "./CreateAgentRequest.mjs";
|
|
7
8
|
export * from "./Tool.mjs";
|
|
@@ -2,6 +2,7 @@ export * from "./BadRequestErrorBody.mjs";
|
|
|
2
2
|
export * from "./Error_.mjs";
|
|
3
3
|
export * from "./BasicError.mjs";
|
|
4
4
|
export * from "./ValidationError.mjs";
|
|
5
|
+
export * from "./LanguageCode.mjs";
|
|
5
6
|
export * from "./Agent.mjs";
|
|
6
7
|
export * from "./CreateAgentRequest.mjs";
|
|
7
8
|
export * from "./Tool.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.10";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonic",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "github:Phonic-Co/phonic-node",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@types/jest": "^29.5.14",
|
|
51
51
|
"ts-jest": "^29.3.4",
|
|
52
52
|
"jest-environment-jsdom": "^29.7.0",
|
|
53
|
-
"msw": "
|
|
53
|
+
"msw": "2.11.2",
|
|
54
54
|
"@types/node": "^18.19.70",
|
|
55
55
|
"prettier": "^3.4.2",
|
|
56
56
|
"typescript": "~5.7.2"
|
package/reference.md
CHANGED
|
@@ -104,7 +104,9 @@ await client.agents.create({
|
|
|
104
104
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
105
105
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
106
106
|
template_variables: {
|
|
107
|
-
customer_name: {
|
|
107
|
+
customer_name: {
|
|
108
|
+
default_value: null,
|
|
109
|
+
},
|
|
108
110
|
subject: {
|
|
109
111
|
default_value: "Chess",
|
|
110
112
|
},
|
|
@@ -112,7 +114,7 @@ await client.agents.create({
|
|
|
112
114
|
tools: ["keypad_input"],
|
|
113
115
|
no_input_poke_sec: 30,
|
|
114
116
|
no_input_poke_text: "Are you still there?",
|
|
115
|
-
|
|
117
|
+
languages: ["en", "es"],
|
|
116
118
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
117
119
|
configuration_endpoint: {
|
|
118
120
|
url: "https://api.example.com/config",
|
|
@@ -195,7 +197,9 @@ await client.agents.upsert({
|
|
|
195
197
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
196
198
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
197
199
|
template_variables: {
|
|
198
|
-
customer_name: {
|
|
200
|
+
customer_name: {
|
|
201
|
+
default_value: null,
|
|
202
|
+
},
|
|
199
203
|
subject: {
|
|
200
204
|
default_value: "Chess",
|
|
201
205
|
},
|
|
@@ -203,7 +207,7 @@ await client.agents.upsert({
|
|
|
203
207
|
tools: ["keypad_input"],
|
|
204
208
|
no_input_poke_sec: 30,
|
|
205
209
|
no_input_poke_text: "Are you still there?",
|
|
206
|
-
|
|
210
|
+
languages: ["en", "es"],
|
|
207
211
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
208
212
|
configuration_endpoint: {
|
|
209
213
|
url: "https://api.example.com/config",
|
|
@@ -432,7 +436,9 @@ await client.agents.update("nameOrId", {
|
|
|
432
436
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
433
437
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
434
438
|
template_variables: {
|
|
435
|
-
customer_name: {
|
|
439
|
+
customer_name: {
|
|
440
|
+
default_value: null,
|
|
441
|
+
},
|
|
436
442
|
subject: {
|
|
437
443
|
default_value: "Chess",
|
|
438
444
|
},
|
|
@@ -440,7 +446,7 @@ await client.agents.update("nameOrId", {
|
|
|
440
446
|
tools: ["keypad_input"],
|
|
441
447
|
no_input_poke_sec: 30,
|
|
442
448
|
no_input_poke_text: "Are you still there?",
|
|
443
|
-
|
|
449
|
+
languages: ["en", "es"],
|
|
444
450
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
445
451
|
configuration_endpoint: {
|
|
446
452
|
url: "https://api.example.com/config",
|
|
@@ -1955,7 +1961,7 @@ await client.conversations.outboundCall({
|
|
|
1955
1961
|
no_input_poke_sec: 30,
|
|
1956
1962
|
no_input_poke_text: "Are you still there?",
|
|
1957
1963
|
no_input_end_conversation_sec: 180,
|
|
1958
|
-
|
|
1964
|
+
languages: ["en", "es"],
|
|
1959
1965
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
1960
1966
|
tools: ["keypad_input"],
|
|
1961
1967
|
},
|