phonic 0.30.26 → 0.30.28

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.26",
55
- "User-Agent": "phonic/0.30.26",
54
+ "X-Fern-SDK-Version": "0.30.28",
55
+ "User-Agent": "phonic/0.30.28",
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) });
@@ -83,4 +83,8 @@ export interface AgentsCreateRequest {
83
83
  boosted_keywords?: string[];
84
84
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
85
85
  configuration_endpoint?: Phonic.CreateAgentRequest.ConfigurationEndpoint | null;
86
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
87
+ inbound_rollout?: number;
88
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
89
+ inbound_rollout_forward_phone_number?: string | null;
86
90
  }
@@ -83,6 +83,10 @@ export interface UpdateAgentRequest {
83
83
  boosted_keywords?: string[];
84
84
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
85
85
  configuration_endpoint?: UpdateAgentRequest.ConfigurationEndpoint | null;
86
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0. */
87
+ inbound_rollout?: number;
88
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
89
+ inbound_rollout_forward_phone_number?: string | null;
86
90
  }
87
91
  export declare namespace UpdateAgentRequest {
88
92
  type PhoneNumber = "assign-automatically" | "custom";
@@ -123,7 +123,8 @@ export declare class Tools {
123
123
  * require_speech_before_tool_call: false,
124
124
  * wait_for_speech_before_tool_call: false,
125
125
  * forbid_speech_after_tool_call: false,
126
- * allow_tool_chaining: true
126
+ * allow_tool_chaining: true,
127
+ * wait_for_response: false
127
128
  * })
128
129
  *
129
130
  * @example
@@ -135,6 +136,7 @@ export declare class Tools {
135
136
  * execution_mode: "sync",
136
137
  * phone_number: "+15551234567",
137
138
  * dtmf: "1234",
139
+ * use_agent_phone_number: true,
138
140
  * detect_voicemail: false,
139
141
  * require_speech_before_tool_call: false
140
142
  * })
@@ -211,7 +211,8 @@ class Tools {
211
211
  * require_speech_before_tool_call: false,
212
212
  * wait_for_speech_before_tool_call: false,
213
213
  * forbid_speech_after_tool_call: false,
214
- * allow_tool_chaining: true
214
+ * allow_tool_chaining: true,
215
+ * wait_for_response: false
215
216
  * })
216
217
  *
217
218
  * @example
@@ -223,6 +224,7 @@ class Tools {
223
224
  * execution_mode: "sync",
224
225
  * phone_number: "+15551234567",
225
226
  * dtmf: "1234",
227
+ * use_agent_phone_number: true,
226
228
  * detect_voicemail: false,
227
229
  * require_speech_before_tool_call: false
228
230
  * })
@@ -71,7 +71,8 @@ import * as Phonic from "../../../../index.js";
71
71
  * require_speech_before_tool_call: false,
72
72
  * wait_for_speech_before_tool_call: false,
73
73
  * forbid_speech_after_tool_call: false,
74
- * allow_tool_chaining: true
74
+ * allow_tool_chaining: true,
75
+ * wait_for_response: false
75
76
  * }
76
77
  *
77
78
  * @example
@@ -83,6 +84,7 @@ import * as Phonic from "../../../../index.js";
83
84
  * execution_mode: "sync",
84
85
  * phone_number: "+15551234567",
85
86
  * dtmf: "1234",
87
+ * use_agent_phone_number: true,
86
88
  * detect_voicemail: false,
87
89
  * require_speech_before_tool_call: false
88
90
  * }
@@ -130,7 +132,9 @@ export interface CreateToolRequest {
130
132
  phone_number?: string;
131
133
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
132
134
  dtmf?: string | null;
133
- /** 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. */
135
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
136
+ use_agent_phone_number?: boolean;
137
+ /** 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 when use_agent_phone_number is true. */
134
138
  detect_voicemail?: boolean;
135
139
  /** 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. */
136
140
  agents_to_transfer_to?: string[];
@@ -142,6 +146,8 @@ export interface CreateToolRequest {
142
146
  forbid_speech_after_tool_call?: boolean;
143
147
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
144
148
  allow_tool_chaining?: boolean;
149
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
150
+ wait_for_response?: boolean;
145
151
  }
146
152
  export declare namespace CreateToolRequest {
147
153
  /**
@@ -41,7 +41,9 @@ 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. */
44
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
45
+ use_agent_phone_number?: boolean;
46
+ /** 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 when use_agent_phone_number is true. */
45
47
  detect_voicemail?: boolean;
46
48
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
47
49
  agents_to_transfer_to?: string[];
@@ -53,6 +55,8 @@ export interface UpdateToolRequest {
53
55
  forbid_speech_after_tool_call?: boolean;
54
56
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
55
57
  allow_tool_chaining?: boolean;
58
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
59
+ wait_for_response?: boolean;
56
60
  }
57
61
  export declare namespace UpdateToolRequest {
58
62
  /**
@@ -49,6 +49,10 @@ export interface Agent {
49
49
  boosted_keywords: string[];
50
50
  /** When not `null`, the agent will call this endpoint to get configuration options. */
51
51
  configuration_endpoint: Agent.ConfigurationEndpoint | null;
52
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0. */
53
+ inbound_rollout?: number;
54
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
55
+ inbound_rollout_forward_phone_number?: string | null;
52
56
  }
53
57
  export declare namespace Agent {
54
58
  /**
@@ -46,6 +46,10 @@ export interface CreateAgentRequest {
46
46
  boosted_keywords?: string[];
47
47
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
48
48
  configuration_endpoint?: CreateAgentRequest.ConfigurationEndpoint | null;
49
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
50
+ inbound_rollout?: number;
51
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
52
+ inbound_rollout_forward_phone_number?: string | null;
49
53
  }
50
54
  export declare namespace CreateAgentRequest {
51
55
  type PhoneNumber = "assign-automatically" | "custom";
@@ -30,7 +30,9 @@ 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. */
33
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
34
+ use_agent_phone_number?: boolean;
35
+ /** 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 when use_agent_phone_number is true. */
34
36
  detect_voicemail?: boolean;
35
37
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
36
38
  agents_to_transfer_to?: string[];
@@ -42,6 +44,8 @@ export interface Tool {
42
44
  forbid_speech_after_tool_call?: boolean;
43
45
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
44
46
  allow_tool_chaining?: boolean;
47
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
48
+ wait_for_response?: boolean;
45
49
  }
46
50
  export declare namespace Tool {
47
51
  interface Project {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.26";
1
+ export declare const SDK_VERSION = "0.30.28";
@@ -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.26";
4
+ exports.SDK_VERSION = "0.30.28";
@@ -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.26",
19
- "User-Agent": "phonic/0.30.26",
18
+ "X-Fern-SDK-Version": "0.30.28",
19
+ "User-Agent": "phonic/0.30.28",
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) });
@@ -83,4 +83,8 @@ export interface AgentsCreateRequest {
83
83
  boosted_keywords?: string[];
84
84
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
85
85
  configuration_endpoint?: Phonic.CreateAgentRequest.ConfigurationEndpoint | null;
86
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
87
+ inbound_rollout?: number;
88
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
89
+ inbound_rollout_forward_phone_number?: string | null;
86
90
  }
@@ -83,6 +83,10 @@ export interface UpdateAgentRequest {
83
83
  boosted_keywords?: string[];
84
84
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
85
85
  configuration_endpoint?: UpdateAgentRequest.ConfigurationEndpoint | null;
86
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0. */
87
+ inbound_rollout?: number;
88
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
89
+ inbound_rollout_forward_phone_number?: string | null;
86
90
  }
87
91
  export declare namespace UpdateAgentRequest {
88
92
  type PhoneNumber = "assign-automatically" | "custom";
@@ -123,7 +123,8 @@ export declare class Tools {
123
123
  * require_speech_before_tool_call: false,
124
124
  * wait_for_speech_before_tool_call: false,
125
125
  * forbid_speech_after_tool_call: false,
126
- * allow_tool_chaining: true
126
+ * allow_tool_chaining: true,
127
+ * wait_for_response: false
127
128
  * })
128
129
  *
129
130
  * @example
@@ -135,6 +136,7 @@ export declare class Tools {
135
136
  * execution_mode: "sync",
136
137
  * phone_number: "+15551234567",
137
138
  * dtmf: "1234",
139
+ * use_agent_phone_number: true,
138
140
  * detect_voicemail: false,
139
141
  * require_speech_before_tool_call: false
140
142
  * })
@@ -175,7 +175,8 @@ export class Tools {
175
175
  * require_speech_before_tool_call: false,
176
176
  * wait_for_speech_before_tool_call: false,
177
177
  * forbid_speech_after_tool_call: false,
178
- * allow_tool_chaining: true
178
+ * allow_tool_chaining: true,
179
+ * wait_for_response: false
179
180
  * })
180
181
  *
181
182
  * @example
@@ -187,6 +188,7 @@ export class Tools {
187
188
  * execution_mode: "sync",
188
189
  * phone_number: "+15551234567",
189
190
  * dtmf: "1234",
191
+ * use_agent_phone_number: true,
190
192
  * detect_voicemail: false,
191
193
  * require_speech_before_tool_call: false
192
194
  * })
@@ -71,7 +71,8 @@ import * as Phonic from "../../../../index.mjs";
71
71
  * require_speech_before_tool_call: false,
72
72
  * wait_for_speech_before_tool_call: false,
73
73
  * forbid_speech_after_tool_call: false,
74
- * allow_tool_chaining: true
74
+ * allow_tool_chaining: true,
75
+ * wait_for_response: false
75
76
  * }
76
77
  *
77
78
  * @example
@@ -83,6 +84,7 @@ import * as Phonic from "../../../../index.mjs";
83
84
  * execution_mode: "sync",
84
85
  * phone_number: "+15551234567",
85
86
  * dtmf: "1234",
87
+ * use_agent_phone_number: true,
86
88
  * detect_voicemail: false,
87
89
  * require_speech_before_tool_call: false
88
90
  * }
@@ -130,7 +132,9 @@ export interface CreateToolRequest {
130
132
  phone_number?: string;
131
133
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
132
134
  dtmf?: string | null;
133
- /** 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. */
135
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
136
+ use_agent_phone_number?: boolean;
137
+ /** 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 when use_agent_phone_number is true. */
134
138
  detect_voicemail?: boolean;
135
139
  /** 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. */
136
140
  agents_to_transfer_to?: string[];
@@ -142,6 +146,8 @@ export interface CreateToolRequest {
142
146
  forbid_speech_after_tool_call?: boolean;
143
147
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
144
148
  allow_tool_chaining?: boolean;
149
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
150
+ wait_for_response?: boolean;
145
151
  }
146
152
  export declare namespace CreateToolRequest {
147
153
  /**
@@ -41,7 +41,9 @@ 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. */
44
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
45
+ use_agent_phone_number?: boolean;
46
+ /** 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 when use_agent_phone_number is true. */
45
47
  detect_voicemail?: boolean;
46
48
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
47
49
  agents_to_transfer_to?: string[];
@@ -53,6 +55,8 @@ export interface UpdateToolRequest {
53
55
  forbid_speech_after_tool_call?: boolean;
54
56
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
55
57
  allow_tool_chaining?: boolean;
58
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
59
+ wait_for_response?: boolean;
56
60
  }
57
61
  export declare namespace UpdateToolRequest {
58
62
  /**
@@ -49,6 +49,10 @@ export interface Agent {
49
49
  boosted_keywords: string[];
50
50
  /** When not `null`, the agent will call this endpoint to get configuration options. */
51
51
  configuration_endpoint: Agent.ConfigurationEndpoint | null;
52
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0. */
53
+ inbound_rollout?: number;
54
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
55
+ inbound_rollout_forward_phone_number?: string | null;
52
56
  }
53
57
  export declare namespace Agent {
54
58
  /**
@@ -46,6 +46,10 @@ export interface CreateAgentRequest {
46
46
  boosted_keywords?: string[];
47
47
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
48
48
  configuration_endpoint?: CreateAgentRequest.ConfigurationEndpoint | null;
49
+ /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
50
+ inbound_rollout?: number;
51
+ /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
52
+ inbound_rollout_forward_phone_number?: string | null;
49
53
  }
50
54
  export declare namespace CreateAgentRequest {
51
55
  type PhoneNumber = "assign-automatically" | "custom";
@@ -30,7 +30,9 @@ 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. */
33
+ /** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
34
+ use_agent_phone_number?: boolean;
35
+ /** 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 when use_agent_phone_number is true. */
34
36
  detect_voicemail?: boolean;
35
37
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
36
38
  agents_to_transfer_to?: string[];
@@ -42,6 +44,8 @@ export interface Tool {
42
44
  forbid_speech_after_tool_call?: boolean;
43
45
  /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
44
46
  allow_tool_chaining?: boolean;
47
+ /** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
48
+ wait_for_response?: boolean;
45
49
  }
46
50
  export declare namespace Tool {
47
51
  interface Project {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.26";
1
+ export declare const SDK_VERSION = "0.30.28";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.30.26";
1
+ export const SDK_VERSION = "0.30.28";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.30.26",
3
+ "version": "0.30.28",
4
4
  "private": false,
5
5
  "repository": "github:Phonic-Co/phonic-node",
6
6
  "type": "commonjs",