phonic 0.30.22 → 0.30.24

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.
@@ -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.30.22",
55
- "User-Agent": "phonic/0.30.22",
54
+ "X-Fern-SDK-Version": "0.30.24",
55
+ "User-Agent": "phonic/0.30.24",
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) });
@@ -132,6 +132,7 @@ export declare class Tools {
132
132
  * execution_mode: "sync",
133
133
  * phone_number: "+15551234567",
134
134
  * dtmf: "1234",
135
+ * detect_voicemail: false,
135
136
  * require_speech_before_tool_call: false
136
137
  * })
137
138
  *
@@ -220,6 +220,7 @@ class Tools {
220
220
  * execution_mode: "sync",
221
221
  * phone_number: "+15551234567",
222
222
  * dtmf: "1234",
223
+ * detect_voicemail: false,
223
224
  * require_speech_before_tool_call: false
224
225
  * })
225
226
  *
@@ -80,6 +80,7 @@ import * as Phonic from "../../../../index.js";
80
80
  * execution_mode: "sync",
81
81
  * phone_number: "+15551234567",
82
82
  * dtmf: "1234",
83
+ * detect_voicemail: false,
83
84
  * require_speech_before_tool_call: false
84
85
  * }
85
86
  *
@@ -126,6 +127,8 @@ export interface CreateToolRequest {
126
127
  phone_number?: string;
127
128
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
128
129
  dtmf?: string | null;
130
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
131
+ detect_voicemail?: boolean;
129
132
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. All agents must exist in the same project as the tool. */
130
133
  agents_to_transfer_to?: string[];
131
134
  /** When true, forces the agent to speak before executing the tool. */
@@ -41,6 +41,8 @@ export interface UpdateToolRequest {
41
41
  phone_number?: string;
42
42
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
43
43
  dtmf?: string | null;
44
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
45
+ detect_voicemail?: boolean;
44
46
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
45
47
  agents_to_transfer_to?: string[];
46
48
  /** When true, forces the agent to speak before executing the tool. */
@@ -57,6 +57,8 @@ export interface Conversation {
57
57
  items: Phonic.ConversationItem[];
58
58
  /** Phone call metadata. `null` for non-phone call conversations. */
59
59
  call_info: Conversation.CallInfo | null;
60
+ /** Analysis of the conversation including latencies and interruptions. */
61
+ analysis: Phonic.ConversationAnalysis;
60
62
  }
61
63
  export declare namespace Conversation {
62
64
  /**
@@ -30,6 +30,8 @@ export interface Tool {
30
30
  phone_number?: string;
31
31
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
32
32
  dtmf?: string | null;
33
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
34
+ detect_voicemail?: boolean;
33
35
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
34
36
  agents_to_transfer_to?: string[];
35
37
  /** When true, forces the agent to speak before executing the tool. */
@@ -1,5 +1,5 @@
1
1
  import type { Conversation } from "./Conversation";
2
- type PhonicTool = "send_dtmf_tone" | "end_conversation" | (string & {});
2
+ type PhonicTool = "keypad_input" | "natural_conversation_ending" | (string & {});
3
3
  type ISODateTime = `${string}Z`;
4
4
  export type PhonicConfigurationEndpointRequestPayload = {
5
5
  project: {
@@ -12,8 +12,10 @@ export type PhonicConfigurationEndpointRequestPayload = {
12
12
  tools: Array<PhonicTool>;
13
13
  boosted_keywords: string[];
14
14
  };
15
+ conversation_id: string;
15
16
  from_phone_number?: string;
16
17
  to_phone_number?: string;
18
+ twilio_call_sid?: string;
17
19
  };
18
20
  export type PhonicConfigurationEndpointResponsePayload = {
19
21
  welcome_message?: string | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.22";
1
+ export declare const SDK_VERSION = "0.30.24";
@@ -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.30.22";
4
+ exports.SDK_VERSION = "0.30.24";
@@ -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.30.22",
19
- "User-Agent": "phonic/0.30.22",
18
+ "X-Fern-SDK-Version": "0.30.24",
19
+ "User-Agent": "phonic/0.30.24",
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) });
@@ -132,6 +132,7 @@ export declare class Tools {
132
132
  * execution_mode: "sync",
133
133
  * phone_number: "+15551234567",
134
134
  * dtmf: "1234",
135
+ * detect_voicemail: false,
135
136
  * require_speech_before_tool_call: false
136
137
  * })
137
138
  *
@@ -184,6 +184,7 @@ export class Tools {
184
184
  * execution_mode: "sync",
185
185
  * phone_number: "+15551234567",
186
186
  * dtmf: "1234",
187
+ * detect_voicemail: false,
187
188
  * require_speech_before_tool_call: false
188
189
  * })
189
190
  *
@@ -80,6 +80,7 @@ import * as Phonic from "../../../../index.mjs";
80
80
  * execution_mode: "sync",
81
81
  * phone_number: "+15551234567",
82
82
  * dtmf: "1234",
83
+ * detect_voicemail: false,
83
84
  * require_speech_before_tool_call: false
84
85
  * }
85
86
  *
@@ -126,6 +127,8 @@ export interface CreateToolRequest {
126
127
  phone_number?: string;
127
128
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
128
129
  dtmf?: string | null;
130
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
131
+ detect_voicemail?: boolean;
129
132
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. All agents must exist in the same project as the tool. */
130
133
  agents_to_transfer_to?: string[];
131
134
  /** When true, forces the agent to speak before executing the tool. */
@@ -41,6 +41,8 @@ export interface UpdateToolRequest {
41
41
  phone_number?: string;
42
42
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
43
43
  dtmf?: string | null;
44
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
45
+ detect_voicemail?: boolean;
44
46
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
45
47
  agents_to_transfer_to?: string[];
46
48
  /** When true, forces the agent to speak before executing the tool. */
@@ -57,6 +57,8 @@ export interface Conversation {
57
57
  items: Phonic.ConversationItem[];
58
58
  /** Phone call metadata. `null` for non-phone call conversations. */
59
59
  call_info: Conversation.CallInfo | null;
60
+ /** Analysis of the conversation including latencies and interruptions. */
61
+ analysis: Phonic.ConversationAnalysis;
60
62
  }
61
63
  export declare namespace Conversation {
62
64
  /**
@@ -30,6 +30,8 @@ export interface Tool {
30
30
  phone_number?: string;
31
31
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
32
32
  dtmf?: string | null;
33
+ /** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools. */
34
+ detect_voicemail?: boolean;
33
35
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
34
36
  agents_to_transfer_to?: string[];
35
37
  /** When true, forces the agent to speak before executing the tool. */
@@ -1,5 +1,5 @@
1
1
  import type { Conversation } from "./Conversation";
2
- type PhonicTool = "send_dtmf_tone" | "end_conversation" | (string & {});
2
+ type PhonicTool = "keypad_input" | "natural_conversation_ending" | (string & {});
3
3
  type ISODateTime = `${string}Z`;
4
4
  export type PhonicConfigurationEndpointRequestPayload = {
5
5
  project: {
@@ -12,8 +12,10 @@ export type PhonicConfigurationEndpointRequestPayload = {
12
12
  tools: Array<PhonicTool>;
13
13
  boosted_keywords: string[];
14
14
  };
15
+ conversation_id: string;
15
16
  from_phone_number?: string;
16
17
  to_phone_number?: string;
18
+ twilio_call_sid?: string;
17
19
  };
18
20
  export type PhonicConfigurationEndpointResponsePayload = {
19
21
  welcome_message?: string | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.22";
1
+ export declare const SDK_VERSION = "0.30.24";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.30.22";
1
+ export const SDK_VERSION = "0.30.24";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.30.22",
3
+ "version": "0.30.24",
4
4
  "private": false,
5
5
  "repository": "github:Phonic-Co/phonic-node",
6
6
  "type": "commonjs",