phonic 0.32.6 → 0.32.8

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.
Files changed (61) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +6 -0
  3. package/dist/cjs/api/errors/ServiceUnavailableError.js +54 -0
  4. package/dist/cjs/api/errors/index.d.ts +1 -0
  5. package/dist/cjs/api/errors/index.js +1 -0
  6. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +4 -2
  7. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +10 -1
  8. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +6 -0
  9. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +0 -2
  10. package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -0
  11. package/dist/cjs/api/resources/conversations/client/Client.js +3 -0
  12. package/dist/cjs/api/resources/tools/client/Client.d.ts +1 -0
  13. package/dist/cjs/api/resources/tools/client/Client.js +1 -0
  14. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +4 -1
  15. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +3 -1
  16. package/dist/cjs/api/types/Agent.d.ts +10 -1
  17. package/dist/cjs/api/types/Agent.js +6 -0
  18. package/dist/cjs/api/types/ConfigOptions.d.ts +9 -1
  19. package/dist/cjs/api/types/ConfigOptions.js +5 -0
  20. package/dist/cjs/api/types/Conversation.d.ts +7 -5
  21. package/dist/cjs/api/types/ConversationAnalysis.d.ts +2 -0
  22. package/dist/cjs/api/types/ConversationItem.d.ts +2 -0
  23. package/dist/cjs/api/types/CreateAgentRequest.d.ts +11 -2
  24. package/dist/cjs/api/types/CreateAgentRequest.js +6 -0
  25. package/dist/cjs/api/types/OutboundCallConfig.d.ts +9 -1
  26. package/dist/cjs/api/types/OutboundCallConfig.js +5 -0
  27. package/dist/cjs/api/types/Tool.d.ts +3 -1
  28. package/dist/cjs/api/types/overrides.d.ts +1 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/api/errors/ServiceUnavailableError.d.mts +6 -0
  33. package/dist/esm/api/errors/ServiceUnavailableError.mjs +17 -0
  34. package/dist/esm/api/errors/index.d.mts +1 -0
  35. package/dist/esm/api/errors/index.mjs +1 -0
  36. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +4 -2
  37. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +10 -1
  38. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +6 -0
  39. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +0 -2
  40. package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -0
  41. package/dist/esm/api/resources/conversations/client/Client.mjs +3 -0
  42. package/dist/esm/api/resources/tools/client/Client.d.mts +1 -0
  43. package/dist/esm/api/resources/tools/client/Client.mjs +1 -0
  44. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +4 -1
  45. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +3 -1
  46. package/dist/esm/api/types/Agent.d.mts +10 -1
  47. package/dist/esm/api/types/Agent.mjs +6 -0
  48. package/dist/esm/api/types/ConfigOptions.d.mts +9 -1
  49. package/dist/esm/api/types/ConfigOptions.mjs +5 -0
  50. package/dist/esm/api/types/Conversation.d.mts +7 -5
  51. package/dist/esm/api/types/ConversationAnalysis.d.mts +2 -0
  52. package/dist/esm/api/types/ConversationItem.d.mts +2 -0
  53. package/dist/esm/api/types/CreateAgentRequest.d.mts +11 -2
  54. package/dist/esm/api/types/CreateAgentRequest.mjs +6 -0
  55. package/dist/esm/api/types/OutboundCallConfig.d.mts +9 -1
  56. package/dist/esm/api/types/OutboundCallConfig.mjs +5 -0
  57. package/dist/esm/api/types/Tool.d.mts +3 -1
  58. package/dist/esm/api/types/overrides.d.mts +1 -0
  59. package/dist/esm/version.d.mts +1 -1
  60. package/dist/esm/version.mjs +1 -1
  61. package/package.json +1 -1
@@ -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.6",
47
- "User-Agent": "phonic/0.32.6",
46
+ "X-Fern-SDK-Version": "0.32.8",
47
+ "User-Agent": "phonic/0.32.8",
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);
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as Phonic from "../index.js";
4
+ export declare class ServiceUnavailableError extends errors.PhonicError {
5
+ constructor(body: Phonic.BasicError, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ServiceUnavailableError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class ServiceUnavailableError extends errors.PhonicError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ServiceUnavailableError",
43
+ statusCode: 503,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.ServiceUnavailableError = ServiceUnavailableError;
@@ -4,6 +4,7 @@ export * from "./ForbiddenError.js";
4
4
  export * from "./GatewayTimeoutError.js";
5
5
  export * from "./InternalServerError.js";
6
6
  export * from "./NotFoundError.js";
7
+ export * from "./ServiceUnavailableError.js";
7
8
  export * from "./TooManyRequestsError.js";
8
9
  export * from "./UnauthorizedError.js";
9
10
  export * from "./UnprocessableEntityError.js";
@@ -20,6 +20,7 @@ __exportStar(require("./ForbiddenError.js"), exports);
20
20
  __exportStar(require("./GatewayTimeoutError.js"), exports);
21
21
  __exportStar(require("./InternalServerError.js"), exports);
22
22
  __exportStar(require("./NotFoundError.js"), exports);
23
+ __exportStar(require("./ServiceUnavailableError.js"), exports);
23
24
  __exportStar(require("./TooManyRequestsError.js"), exports);
24
25
  __exportStar(require("./UnauthorizedError.js"), exports);
25
26
  __exportStar(require("./UnprocessableEntityError.js"), exports);
@@ -76,7 +76,7 @@ export interface AgentsCreateRequest {
76
76
  /** Number of seconds of inactivity before the conversation WebSocket is closed. */
77
77
  websocket_timeout_sec?: number;
78
78
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
79
- welcome_message?: string;
79
+ welcome_message?: string | null;
80
80
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
81
81
  system_prompt?: string;
82
82
  /** Variables that can be used in the welcome message and the system prompt. */
@@ -101,7 +101,7 @@ export interface AgentsCreateRequest {
101
101
  data_retention_policy?: Phonic.DataRetentionPolicy;
102
102
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
103
103
  default_language?: Phonic.LanguageCode;
104
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
104
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
105
105
  additional_languages?: Phonic.LanguageCode[];
106
106
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
107
107
  languages?: Phonic.LanguageCode[];
@@ -109,6 +109,8 @@ export interface AgentsCreateRequest {
109
109
  multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
110
110
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
111
111
  push_to_talk?: boolean;
112
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
113
+ intelligence_level?: Phonic.CreateAgentRequest.IntelligenceLevel;
112
114
  /** These words, or short phrases, will be more accurately recognized by the agent. */
113
115
  boosted_keywords?: string[];
114
116
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -107,7 +107,7 @@ export interface UpdateAgentRequest {
107
107
  integrations?: Phonic.AgentIntegration[];
108
108
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
109
109
  default_language?: Phonic.LanguageCode;
110
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
110
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
111
111
  additional_languages?: Phonic.LanguageCode[];
112
112
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
113
113
  languages?: Phonic.LanguageCode[];
@@ -115,6 +115,8 @@ export interface UpdateAgentRequest {
115
115
  multilingual_mode?: UpdateAgentRequest.MultilingualMode;
116
116
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
117
117
  push_to_talk?: boolean;
118
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
119
+ intelligence_level?: UpdateAgentRequest.IntelligenceLevel;
118
120
  /** These words, or short phrases, will be more accurately recognized by the agent. */
119
121
  boosted_keywords?: string[];
120
122
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -151,6 +153,7 @@ export declare namespace UpdateAgentRequest {
151
153
  /** The audio format of the agent. */
152
154
  const AudioFormat: {
153
155
  readonly Pcm44100: "pcm_44100";
156
+ readonly Pcm24000: "pcm_24000";
154
157
  readonly Pcm16000: "pcm_16000";
155
158
  readonly Pcm8000: "pcm_8000";
156
159
  readonly Mulaw8000: "mulaw_8000";
@@ -183,6 +186,12 @@ export declare namespace UpdateAgentRequest {
183
186
  readonly Initial: "initial";
184
187
  };
185
188
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
189
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
190
+ const IntelligenceLevel: {
191
+ readonly Standard: "standard";
192
+ readonly High: "high";
193
+ };
194
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
186
195
  type PronunciationDictionary = PronunciationDictionary.Item[];
187
196
  namespace PronunciationDictionary {
188
197
  interface Item {
@@ -11,6 +11,7 @@ var UpdateAgentRequest;
11
11
  /** The audio format of the agent. */
12
12
  UpdateAgentRequest.AudioFormat = {
13
13
  Pcm44100: "pcm_44100",
14
+ Pcm24000: "pcm_24000",
14
15
  Pcm16000: "pcm_16000",
15
16
  Pcm8000: "pcm_8000",
16
17
  Mulaw8000: "mulaw_8000",
@@ -27,4 +28,9 @@ var UpdateAgentRequest;
27
28
  Request: "request",
28
29
  Initial: "initial",
29
30
  };
31
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
32
+ UpdateAgentRequest.IntelligenceLevel = {
33
+ Standard: "standard",
34
+ High: "high",
35
+ };
30
36
  })(UpdateAgentRequest || (exports.UpdateAgentRequest = UpdateAgentRequest = {}));
@@ -51,6 +51,4 @@ export interface UpsertAgentRequest extends Phonic.CreateAgentRequest {
51
51
  outbound_number_pool?: Phonic.OutboundNumberPool | null;
52
52
  /** Array of procedure IDs associated with the agent. */
53
53
  procedure_ids?: string[];
54
- /** Array of third-party integrations enabled for the agent. */
55
- integrations?: Phonic.AgentIntegration[];
56
54
  }
@@ -209,6 +209,7 @@ export declare class ConversationsClient {
209
209
  * @throws {@link Phonic.UnprocessableEntityError}
210
210
  * @throws {@link Phonic.TooManyRequestsError}
211
211
  * @throws {@link Phonic.InternalServerError}
212
+ * @throws {@link Phonic.ServiceUnavailableError}
212
213
  *
213
214
  * @example
214
215
  * await client.conversations.replay("id", {
@@ -667,6 +667,7 @@ class ConversationsClient {
667
667
  * @throws {@link Phonic.UnprocessableEntityError}
668
668
  * @throws {@link Phonic.TooManyRequestsError}
669
669
  * @throws {@link Phonic.InternalServerError}
670
+ * @throws {@link Phonic.ServiceUnavailableError}
670
671
  *
671
672
  * @example
672
673
  * await client.conversations.replay("id", {
@@ -717,6 +718,8 @@ class ConversationsClient {
717
718
  throw new Phonic.TooManyRequestsError(_response.error.body, _response.rawResponse);
718
719
  case 500:
719
720
  throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
721
+ case 503:
722
+ throw new Phonic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
720
723
  default:
721
724
  throw new errors.PhonicError({
722
725
  statusCode: _response.error.statusCode,
@@ -117,6 +117,7 @@ export declare class ToolsClient {
117
117
  * execution_mode: "sync",
118
118
  * phone_number: "+15551234567",
119
119
  * dtmf: "1234",
120
+ * dynamic_dtmf: false,
120
121
  * use_agent_phone_number: true,
121
122
  * detect_voicemail: false,
122
123
  * require_speech_before_tool_call: false
@@ -213,6 +213,7 @@ class ToolsClient {
213
213
  * execution_mode: "sync",
214
214
  * phone_number: "+15551234567",
215
215
  * dtmf: "1234",
216
+ * dynamic_dtmf: false,
216
217
  * use_agent_phone_number: true,
217
218
  * detect_voicemail: false,
218
219
  * require_speech_before_tool_call: false
@@ -82,6 +82,7 @@ import type * as Phonic from "../../../../index.js";
82
82
  * execution_mode: "sync",
83
83
  * phone_number: "+15551234567",
84
84
  * dtmf: "1234",
85
+ * dynamic_dtmf: false,
85
86
  * use_agent_phone_number: true,
86
87
  * detect_voicemail: false,
87
88
  * require_speech_before_tool_call: false
@@ -128,8 +129,10 @@ export interface CreateToolRequest {
128
129
  tool_call_output_timeout_ms?: number;
129
130
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
130
131
  phone_number?: string | null;
131
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
132
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
132
133
  dtmf?: string | null;
134
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
135
+ dynamic_dtmf?: boolean;
133
136
  /** 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. */
134
137
  use_agent_phone_number?: boolean;
135
138
  /** 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. */
@@ -37,8 +37,10 @@ export interface UpdateToolRequest {
37
37
  tool_call_output_timeout_ms?: number;
38
38
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
39
39
  phone_number?: string | null;
40
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
40
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. Ignored when dynamic_dtmf is true. */
41
41
  dtmf?: string | null;
42
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
43
+ dynamic_dtmf?: boolean;
42
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. */
43
45
  use_agent_phone_number?: boolean;
44
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. */
@@ -48,7 +48,7 @@ export interface Agent {
48
48
  no_input_end_conversation_sec: number;
49
49
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
50
50
  default_language: Phonic.LanguageCode;
51
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
51
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
52
52
  additional_languages: Phonic.LanguageCode[];
53
53
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
54
54
  languages?: Phonic.LanguageCode[] | undefined;
@@ -56,6 +56,8 @@ export interface Agent {
56
56
  multilingual_mode: Agent.MultilingualMode;
57
57
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
58
58
  push_to_talk: boolean;
59
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
60
+ intelligence_level: Agent.IntelligenceLevel;
59
61
  /** These words, or short phrases, will be more accurately recognized by the agent. */
60
62
  boosted_keywords: string[];
61
63
  /** Names of observability integrations enabled for the agent. Each must be one of the supported providers. */
@@ -101,6 +103,7 @@ export declare namespace Agent {
101
103
  /** The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`. */
102
104
  const AudioFormat: {
103
105
  readonly Pcm44100: "pcm_44100";
106
+ readonly Pcm24000: "pcm_24000";
104
107
  readonly Pcm16000: "pcm_16000";
105
108
  readonly Pcm8000: "pcm_8000";
106
109
  readonly Mulaw8000: "mulaw_8000";
@@ -132,6 +135,12 @@ export declare namespace Agent {
132
135
  readonly Initial: "initial";
133
136
  };
134
137
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
138
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
139
+ const IntelligenceLevel: {
140
+ readonly Standard: "standard";
141
+ readonly High: "high";
142
+ };
143
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
135
144
  type PronunciationDictionary = PronunciationDictionary.Item[];
136
145
  namespace PronunciationDictionary {
137
146
  interface Item {
@@ -7,6 +7,7 @@ var Agent;
7
7
  /** The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`. */
8
8
  Agent.AudioFormat = {
9
9
  Pcm44100: "pcm_44100",
10
+ Pcm24000: "pcm_24000",
10
11
  Pcm16000: "pcm_16000",
11
12
  Pcm8000: "pcm_8000",
12
13
  Mulaw8000: "mulaw_8000",
@@ -23,4 +24,9 @@ var Agent;
23
24
  Request: "request",
24
25
  Initial: "initial",
25
26
  };
27
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
28
+ Agent.IntelligenceLevel = {
29
+ Standard: "standard",
30
+ High: "high",
31
+ };
26
32
  })(Agent || (exports.Agent = Agent = {}));
@@ -51,7 +51,7 @@ export interface ConfigOptions {
51
51
  no_input_end_conversation_sec?: number | undefined;
52
52
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
53
53
  default_language?: string | undefined;
54
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
54
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
55
55
  additional_languages?: string[] | undefined;
56
56
  /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
57
57
  multilingual_mode?: ConfigOptions.MultilingualMode | undefined;
@@ -59,6 +59,8 @@ export interface ConfigOptions {
59
59
  push_to_talk?: boolean | undefined;
60
60
  /** When `true`, assistant audio is streamed to the client as fast as it is generated, rather than paced to real time. Defaults to false. */
61
61
  stream_ahead_of_real_time?: boolean | undefined;
62
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
63
+ intelligence_level?: ConfigOptions.IntelligenceLevel | undefined;
62
64
  /** Keywords to boost in speech recognition */
63
65
  boosted_keywords?: string[] | undefined;
64
66
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -122,6 +124,12 @@ export declare namespace ConfigOptions {
122
124
  readonly Initial: "initial";
123
125
  };
124
126
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
127
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
128
+ const IntelligenceLevel: {
129
+ readonly Standard: "standard";
130
+ readonly High: "high";
131
+ };
132
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
125
133
  type PronunciationDictionary = PronunciationDictionary.Item[];
126
134
  namespace PronunciationDictionary {
127
135
  interface Item {
@@ -32,4 +32,9 @@ var ConfigOptions;
32
32
  Request: "request",
33
33
  Initial: "initial",
34
34
  };
35
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
36
+ ConfigOptions.IntelligenceLevel = {
37
+ Standard: "standard",
38
+ High: "high",
39
+ };
35
40
  })(ConfigOptions || (exports.ConfigOptions = ConfigOptions = {}));
@@ -23,7 +23,7 @@ export interface Conversation {
23
23
  /** Template variables used in the conversation. */
24
24
  template_variables: Record<string, string>;
25
25
  /** System prompt used in the conversation. */
26
- system_prompt?: string | undefined;
26
+ system_prompt?: (string | null) | undefined;
27
27
  /** Audio input format. */
28
28
  input_format: string;
29
29
  /** Audio output format. */
@@ -33,7 +33,7 @@ export interface Conversation {
33
33
  /** The background noise type used in the conversation. */
34
34
  background_noise: Conversation.BackgroundNoise | null;
35
35
  /** Live transcript of the conversation. */
36
- live_transcript: string;
36
+ live_transcript: string | null;
37
37
  /** Post-call processed transcript. */
38
38
  post_call_transcript: string | null;
39
39
  /** Duration of the conversation in milliseconds. */
@@ -54,14 +54,14 @@ export interface Conversation {
54
54
  min_words_to_interrupt: number;
55
55
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
56
56
  default_language: Phonic.LanguageCode;
57
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
57
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
58
58
  additional_languages: Phonic.LanguageCode[] | null;
59
59
  /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
60
60
  multilingual_mode: Conversation.MultilingualMode;
61
61
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
62
62
  push_to_talk: boolean;
63
63
  /** Array of ISO 639-1 language codes recognized by the model. This field is deprecated. Use `default_language` and `additional_languages` instead. */
64
- languages?: (string[] | null) | undefined;
64
+ languages?: string[] | undefined;
65
65
  /** Whether the no-input poke text was generated by AI. */
66
66
  generate_no_input_poke_text?: (boolean | null) | undefined;
67
67
  /** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
@@ -70,6 +70,8 @@ export interface Conversation {
70
70
  no_input_poke_text: string | null;
71
71
  /** Seconds of silence before the conversation is ended. */
72
72
  no_input_end_conversation_sec: number | null;
73
+ /** The WebSocket idle timeout in seconds. */
74
+ websocket_timeout_sec?: number | undefined;
73
75
  /** Voice activity detection prebuffer duration in milliseconds. `null` when not applicable or unknown (e.g. push-to-talk, or legacy stored conversations). */
74
76
  vad_prebuffer_duration_ms?: (number | null) | undefined;
75
77
  /** Minimum speech duration for voice activity detection in milliseconds. `null` when not applicable or unknown. */
@@ -99,7 +101,7 @@ export interface Conversation {
99
101
  /** Whether the assistant produced backchannel responses during the conversation. */
100
102
  enable_assistant_backchannel?: boolean | undefined;
101
103
  /** How aggressively the assistant produced backchannel responses during the conversation. */
102
- assistant_backchannel_aggressiveness?: number | undefined;
104
+ assistant_backchannel_aggressiveness?: (number | null) | undefined;
103
105
  }
104
106
  export declare namespace Conversation {
105
107
  /**
@@ -1,4 +1,6 @@
1
1
  export interface ConversationAnalysis {
2
+ /** The ID of the conversation analysis. */
3
+ id: string;
2
4
  /** Latencies between turns in milliseconds. */
3
5
  latencies_ms: number[];
4
6
  /** Number of interruptions in the conversation. */
@@ -37,6 +37,8 @@ export declare namespace ConversationItem {
37
37
  /** The tool call ID. */
38
38
  id: string;
39
39
  tool: Item.Tool;
40
+ /** The integration associated with the tool, if any. */
41
+ integration?: (string | null) | undefined;
40
42
  /** HTTP method for webhook tool calls. */
41
43
  endpoint_method?: (string | null) | undefined;
42
44
  /** URL for webhook tool calls. */
@@ -29,7 +29,7 @@ export interface CreateAgentRequest {
29
29
  /** Number of seconds of inactivity before the conversation WebSocket is closed. */
30
30
  websocket_timeout_sec?: number | undefined;
31
31
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
32
- welcome_message?: string | undefined;
32
+ welcome_message?: (string | null) | undefined;
33
33
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
34
34
  system_prompt?: string | undefined;
35
35
  /** Variables that can be used in the welcome message and the system prompt. */
@@ -54,7 +54,7 @@ export interface CreateAgentRequest {
54
54
  data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
55
55
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
56
56
  default_language?: Phonic.LanguageCode | undefined;
57
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
57
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
58
58
  additional_languages?: Phonic.LanguageCode[] | undefined;
59
59
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
60
60
  languages?: Phonic.LanguageCode[] | undefined;
@@ -62,6 +62,8 @@ export interface CreateAgentRequest {
62
62
  multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
63
63
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
64
64
  push_to_talk?: boolean | undefined;
65
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
66
+ intelligence_level?: CreateAgentRequest.IntelligenceLevel | undefined;
65
67
  /** These words, or short phrases, will be more accurately recognized by the agent. */
66
68
  boosted_keywords?: string[] | undefined;
67
69
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -98,6 +100,7 @@ export declare namespace CreateAgentRequest {
98
100
  /** The audio format of the agent. */
99
101
  const AudioFormat: {
100
102
  readonly Pcm44100: "pcm_44100";
103
+ readonly Pcm24000: "pcm_24000";
101
104
  readonly Pcm16000: "pcm_16000";
102
105
  readonly Pcm8000: "pcm_8000";
103
106
  readonly Mulaw8000: "mulaw_8000";
@@ -130,6 +133,12 @@ export declare namespace CreateAgentRequest {
130
133
  readonly Initial: "initial";
131
134
  };
132
135
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
136
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
137
+ const IntelligenceLevel: {
138
+ readonly Standard: "standard";
139
+ readonly High: "high";
140
+ };
141
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
133
142
  type PronunciationDictionary = PronunciationDictionary.Item[];
134
143
  namespace PronunciationDictionary {
135
144
  interface Item {
@@ -11,6 +11,7 @@ var CreateAgentRequest;
11
11
  /** The audio format of the agent. */
12
12
  CreateAgentRequest.AudioFormat = {
13
13
  Pcm44100: "pcm_44100",
14
+ Pcm24000: "pcm_24000",
14
15
  Pcm16000: "pcm_16000",
15
16
  Pcm8000: "pcm_8000",
16
17
  Mulaw8000: "mulaw_8000",
@@ -27,4 +28,9 @@ var CreateAgentRequest;
27
28
  Request: "request",
28
29
  Initial: "initial",
29
30
  };
31
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
32
+ CreateAgentRequest.IntelligenceLevel = {
33
+ Standard: "standard",
34
+ High: "high",
35
+ };
30
36
  })(CreateAgentRequest || (exports.CreateAgentRequest = CreateAgentRequest = {}));
@@ -29,7 +29,7 @@ export interface OutboundCallConfig {
29
29
  no_input_end_conversation_sec?: number | undefined;
30
30
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
31
31
  default_language?: Phonic.LanguageCode | undefined;
32
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
32
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
33
33
  additional_languages?: Phonic.LanguageCode[] | undefined;
34
34
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
35
35
  languages?: Phonic.LanguageCode[] | undefined;
@@ -37,6 +37,8 @@ export interface OutboundCallConfig {
37
37
  multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
38
38
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
39
39
  push_to_talk?: boolean | undefined;
40
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
41
+ intelligence_level?: OutboundCallConfig.IntelligenceLevel | undefined;
40
42
  /** These words, or short phrases, will be more accurately recognized by the agent. */
41
43
  boosted_keywords?: string[] | undefined;
42
44
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -78,6 +80,12 @@ export declare namespace OutboundCallConfig {
78
80
  readonly Initial: "initial";
79
81
  };
80
82
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
83
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
84
+ const IntelligenceLevel: {
85
+ readonly Standard: "standard";
86
+ readonly High: "high";
87
+ };
88
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
81
89
  type PronunciationDictionary = PronunciationDictionary.Item[];
82
90
  namespace PronunciationDictionary {
83
91
  interface Item {
@@ -10,6 +10,11 @@ var OutboundCallConfig;
10
10
  Request: "request",
11
11
  Initial: "initial",
12
12
  };
13
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
14
+ OutboundCallConfig.IntelligenceLevel = {
15
+ Standard: "standard",
16
+ High: "high",
17
+ };
13
18
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
14
19
  OutboundCallConfig.BackgroundNoise = {
15
20
  Office: "office",
@@ -25,8 +25,10 @@ export interface Tool {
25
25
  tool_call_output_timeout_ms?: number | undefined;
26
26
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
27
27
  phone_number?: (string | null) | undefined;
28
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
28
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
29
29
  dtmf?: (string | null) | undefined;
30
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
31
+ dynamic_dtmf?: boolean | undefined;
30
32
  /** 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. */
31
33
  use_agent_phone_number?: boolean | undefined;
32
34
  /** 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,6 +45,7 @@ export type ConversationAnalysisWebhookPayload = {
45
45
  created_at: ISODateTime;
46
46
  data: {
47
47
  conversation: {
48
+ id: string;
48
49
  latencies_ms: number[];
49
50
  interruptions_count: number;
50
51
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.6";
1
+ export declare const SDK_VERSION = "0.32.8";
@@ -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.6";
4
+ exports.SDK_VERSION = "0.32.8";
@@ -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.6",
10
- "User-Agent": "phonic/0.32.6",
9
+ "X-Fern-SDK-Version": "0.32.8",
10
+ "User-Agent": "phonic/0.32.8",
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);
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Phonic from "../index.mjs";
4
+ export declare class ServiceUnavailableError extends errors.PhonicError {
5
+ constructor(body: Phonic.BasicError, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class ServiceUnavailableError extends errors.PhonicError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ServiceUnavailableError",
7
+ statusCode: 503,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -4,6 +4,7 @@ export * from "./ForbiddenError.mjs";
4
4
  export * from "./GatewayTimeoutError.mjs";
5
5
  export * from "./InternalServerError.mjs";
6
6
  export * from "./NotFoundError.mjs";
7
+ export * from "./ServiceUnavailableError.mjs";
7
8
  export * from "./TooManyRequestsError.mjs";
8
9
  export * from "./UnauthorizedError.mjs";
9
10
  export * from "./UnprocessableEntityError.mjs";
@@ -4,6 +4,7 @@ export * from "./ForbiddenError.mjs";
4
4
  export * from "./GatewayTimeoutError.mjs";
5
5
  export * from "./InternalServerError.mjs";
6
6
  export * from "./NotFoundError.mjs";
7
+ export * from "./ServiceUnavailableError.mjs";
7
8
  export * from "./TooManyRequestsError.mjs";
8
9
  export * from "./UnauthorizedError.mjs";
9
10
  export * from "./UnprocessableEntityError.mjs";
@@ -76,7 +76,7 @@ export interface AgentsCreateRequest {
76
76
  /** Number of seconds of inactivity before the conversation WebSocket is closed. */
77
77
  websocket_timeout_sec?: number;
78
78
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
79
- welcome_message?: string;
79
+ welcome_message?: string | null;
80
80
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
81
81
  system_prompt?: string;
82
82
  /** Variables that can be used in the welcome message and the system prompt. */
@@ -101,7 +101,7 @@ export interface AgentsCreateRequest {
101
101
  data_retention_policy?: Phonic.DataRetentionPolicy;
102
102
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
103
103
  default_language?: Phonic.LanguageCode;
104
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
104
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
105
105
  additional_languages?: Phonic.LanguageCode[];
106
106
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
107
107
  languages?: Phonic.LanguageCode[];
@@ -109,6 +109,8 @@ export interface AgentsCreateRequest {
109
109
  multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
110
110
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
111
111
  push_to_talk?: boolean;
112
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
113
+ intelligence_level?: Phonic.CreateAgentRequest.IntelligenceLevel;
112
114
  /** These words, or short phrases, will be more accurately recognized by the agent. */
113
115
  boosted_keywords?: string[];
114
116
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -107,7 +107,7 @@ export interface UpdateAgentRequest {
107
107
  integrations?: Phonic.AgentIntegration[];
108
108
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
109
109
  default_language?: Phonic.LanguageCode;
110
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
110
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
111
111
  additional_languages?: Phonic.LanguageCode[];
112
112
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
113
113
  languages?: Phonic.LanguageCode[];
@@ -115,6 +115,8 @@ export interface UpdateAgentRequest {
115
115
  multilingual_mode?: UpdateAgentRequest.MultilingualMode;
116
116
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
117
117
  push_to_talk?: boolean;
118
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
119
+ intelligence_level?: UpdateAgentRequest.IntelligenceLevel;
118
120
  /** These words, or short phrases, will be more accurately recognized by the agent. */
119
121
  boosted_keywords?: string[];
120
122
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -151,6 +153,7 @@ export declare namespace UpdateAgentRequest {
151
153
  /** The audio format of the agent. */
152
154
  const AudioFormat: {
153
155
  readonly Pcm44100: "pcm_44100";
156
+ readonly Pcm24000: "pcm_24000";
154
157
  readonly Pcm16000: "pcm_16000";
155
158
  readonly Pcm8000: "pcm_8000";
156
159
  readonly Mulaw8000: "mulaw_8000";
@@ -183,6 +186,12 @@ export declare namespace UpdateAgentRequest {
183
186
  readonly Initial: "initial";
184
187
  };
185
188
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
189
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
190
+ const IntelligenceLevel: {
191
+ readonly Standard: "standard";
192
+ readonly High: "high";
193
+ };
194
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
186
195
  type PronunciationDictionary = PronunciationDictionary.Item[];
187
196
  namespace PronunciationDictionary {
188
197
  interface Item {
@@ -8,6 +8,7 @@ export var UpdateAgentRequest;
8
8
  /** The audio format of the agent. */
9
9
  UpdateAgentRequest.AudioFormat = {
10
10
  Pcm44100: "pcm_44100",
11
+ Pcm24000: "pcm_24000",
11
12
  Pcm16000: "pcm_16000",
12
13
  Pcm8000: "pcm_8000",
13
14
  Mulaw8000: "mulaw_8000",
@@ -24,4 +25,9 @@ export var UpdateAgentRequest;
24
25
  Request: "request",
25
26
  Initial: "initial",
26
27
  };
28
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
29
+ UpdateAgentRequest.IntelligenceLevel = {
30
+ Standard: "standard",
31
+ High: "high",
32
+ };
27
33
  })(UpdateAgentRequest || (UpdateAgentRequest = {}));
@@ -51,6 +51,4 @@ export interface UpsertAgentRequest extends Phonic.CreateAgentRequest {
51
51
  outbound_number_pool?: Phonic.OutboundNumberPool | null;
52
52
  /** Array of procedure IDs associated with the agent. */
53
53
  procedure_ids?: string[];
54
- /** Array of third-party integrations enabled for the agent. */
55
- integrations?: Phonic.AgentIntegration[];
56
54
  }
@@ -209,6 +209,7 @@ export declare class ConversationsClient {
209
209
  * @throws {@link Phonic.UnprocessableEntityError}
210
210
  * @throws {@link Phonic.TooManyRequestsError}
211
211
  * @throws {@link Phonic.InternalServerError}
212
+ * @throws {@link Phonic.ServiceUnavailableError}
212
213
  *
213
214
  * @example
214
215
  * await client.conversations.replay("id", {
@@ -631,6 +631,7 @@ export class ConversationsClient {
631
631
  * @throws {@link Phonic.UnprocessableEntityError}
632
632
  * @throws {@link Phonic.TooManyRequestsError}
633
633
  * @throws {@link Phonic.InternalServerError}
634
+ * @throws {@link Phonic.ServiceUnavailableError}
634
635
  *
635
636
  * @example
636
637
  * await client.conversations.replay("id", {
@@ -681,6 +682,8 @@ export class ConversationsClient {
681
682
  throw new Phonic.TooManyRequestsError(_response.error.body, _response.rawResponse);
682
683
  case 500:
683
684
  throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
685
+ case 503:
686
+ throw new Phonic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
684
687
  default:
685
688
  throw new errors.PhonicError({
686
689
  statusCode: _response.error.statusCode,
@@ -117,6 +117,7 @@ export declare class ToolsClient {
117
117
  * execution_mode: "sync",
118
118
  * phone_number: "+15551234567",
119
119
  * dtmf: "1234",
120
+ * dynamic_dtmf: false,
120
121
  * use_agent_phone_number: true,
121
122
  * detect_voicemail: false,
122
123
  * require_speech_before_tool_call: false
@@ -177,6 +177,7 @@ export class ToolsClient {
177
177
  * execution_mode: "sync",
178
178
  * phone_number: "+15551234567",
179
179
  * dtmf: "1234",
180
+ * dynamic_dtmf: false,
180
181
  * use_agent_phone_number: true,
181
182
  * detect_voicemail: false,
182
183
  * require_speech_before_tool_call: false
@@ -82,6 +82,7 @@ import type * as Phonic from "../../../../index.mjs";
82
82
  * execution_mode: "sync",
83
83
  * phone_number: "+15551234567",
84
84
  * dtmf: "1234",
85
+ * dynamic_dtmf: false,
85
86
  * use_agent_phone_number: true,
86
87
  * detect_voicemail: false,
87
88
  * require_speech_before_tool_call: false
@@ -128,8 +129,10 @@ export interface CreateToolRequest {
128
129
  tool_call_output_timeout_ms?: number;
129
130
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
130
131
  phone_number?: string | null;
131
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
132
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
132
133
  dtmf?: string | null;
134
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
135
+ dynamic_dtmf?: boolean;
133
136
  /** 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. */
134
137
  use_agent_phone_number?: boolean;
135
138
  /** 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. */
@@ -37,8 +37,10 @@ export interface UpdateToolRequest {
37
37
  tool_call_output_timeout_ms?: number;
38
38
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
39
39
  phone_number?: string | null;
40
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
40
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. Ignored when dynamic_dtmf is true. */
41
41
  dtmf?: string | null;
42
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
43
+ dynamic_dtmf?: boolean;
42
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. */
43
45
  use_agent_phone_number?: boolean;
44
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. */
@@ -48,7 +48,7 @@ export interface Agent {
48
48
  no_input_end_conversation_sec: number;
49
49
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
50
50
  default_language: Phonic.LanguageCode;
51
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
51
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
52
52
  additional_languages: Phonic.LanguageCode[];
53
53
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
54
54
  languages?: Phonic.LanguageCode[] | undefined;
@@ -56,6 +56,8 @@ export interface Agent {
56
56
  multilingual_mode: Agent.MultilingualMode;
57
57
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
58
58
  push_to_talk: boolean;
59
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
60
+ intelligence_level: Agent.IntelligenceLevel;
59
61
  /** These words, or short phrases, will be more accurately recognized by the agent. */
60
62
  boosted_keywords: string[];
61
63
  /** Names of observability integrations enabled for the agent. Each must be one of the supported providers. */
@@ -101,6 +103,7 @@ export declare namespace Agent {
101
103
  /** The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`. */
102
104
  const AudioFormat: {
103
105
  readonly Pcm44100: "pcm_44100";
106
+ readonly Pcm24000: "pcm_24000";
104
107
  readonly Pcm16000: "pcm_16000";
105
108
  readonly Pcm8000: "pcm_8000";
106
109
  readonly Mulaw8000: "mulaw_8000";
@@ -132,6 +135,12 @@ export declare namespace Agent {
132
135
  readonly Initial: "initial";
133
136
  };
134
137
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
138
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
139
+ const IntelligenceLevel: {
140
+ readonly Standard: "standard";
141
+ readonly High: "high";
142
+ };
143
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
135
144
  type PronunciationDictionary = PronunciationDictionary.Item[];
136
145
  namespace PronunciationDictionary {
137
146
  interface Item {
@@ -4,6 +4,7 @@ export var Agent;
4
4
  /** The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`. */
5
5
  Agent.AudioFormat = {
6
6
  Pcm44100: "pcm_44100",
7
+ Pcm24000: "pcm_24000",
7
8
  Pcm16000: "pcm_16000",
8
9
  Pcm8000: "pcm_8000",
9
10
  Mulaw8000: "mulaw_8000",
@@ -20,4 +21,9 @@ export var Agent;
20
21
  Request: "request",
21
22
  Initial: "initial",
22
23
  };
24
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
25
+ Agent.IntelligenceLevel = {
26
+ Standard: "standard",
27
+ High: "high",
28
+ };
23
29
  })(Agent || (Agent = {}));
@@ -51,7 +51,7 @@ export interface ConfigOptions {
51
51
  no_input_end_conversation_sec?: number | undefined;
52
52
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
53
53
  default_language?: string | undefined;
54
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
54
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
55
55
  additional_languages?: string[] | undefined;
56
56
  /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
57
57
  multilingual_mode?: ConfigOptions.MultilingualMode | undefined;
@@ -59,6 +59,8 @@ export interface ConfigOptions {
59
59
  push_to_talk?: boolean | undefined;
60
60
  /** When `true`, assistant audio is streamed to the client as fast as it is generated, rather than paced to real time. Defaults to false. */
61
61
  stream_ahead_of_real_time?: boolean | undefined;
62
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
63
+ intelligence_level?: ConfigOptions.IntelligenceLevel | undefined;
62
64
  /** Keywords to boost in speech recognition */
63
65
  boosted_keywords?: string[] | undefined;
64
66
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -122,6 +124,12 @@ export declare namespace ConfigOptions {
122
124
  readonly Initial: "initial";
123
125
  };
124
126
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
127
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
128
+ const IntelligenceLevel: {
129
+ readonly Standard: "standard";
130
+ readonly High: "high";
131
+ };
132
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
125
133
  type PronunciationDictionary = PronunciationDictionary.Item[];
126
134
  namespace PronunciationDictionary {
127
135
  interface Item {
@@ -29,4 +29,9 @@ export var ConfigOptions;
29
29
  Request: "request",
30
30
  Initial: "initial",
31
31
  };
32
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
33
+ ConfigOptions.IntelligenceLevel = {
34
+ Standard: "standard",
35
+ High: "high",
36
+ };
32
37
  })(ConfigOptions || (ConfigOptions = {}));
@@ -23,7 +23,7 @@ export interface Conversation {
23
23
  /** Template variables used in the conversation. */
24
24
  template_variables: Record<string, string>;
25
25
  /** System prompt used in the conversation. */
26
- system_prompt?: string | undefined;
26
+ system_prompt?: (string | null) | undefined;
27
27
  /** Audio input format. */
28
28
  input_format: string;
29
29
  /** Audio output format. */
@@ -33,7 +33,7 @@ export interface Conversation {
33
33
  /** The background noise type used in the conversation. */
34
34
  background_noise: Conversation.BackgroundNoise | null;
35
35
  /** Live transcript of the conversation. */
36
- live_transcript: string;
36
+ live_transcript: string | null;
37
37
  /** Post-call processed transcript. */
38
38
  post_call_transcript: string | null;
39
39
  /** Duration of the conversation in milliseconds. */
@@ -54,14 +54,14 @@ export interface Conversation {
54
54
  min_words_to_interrupt: number;
55
55
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
56
56
  default_language: Phonic.LanguageCode;
57
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
57
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
58
58
  additional_languages: Phonic.LanguageCode[] | null;
59
59
  /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
60
60
  multilingual_mode: Conversation.MultilingualMode;
61
61
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
62
62
  push_to_talk: boolean;
63
63
  /** Array of ISO 639-1 language codes recognized by the model. This field is deprecated. Use `default_language` and `additional_languages` instead. */
64
- languages?: (string[] | null) | undefined;
64
+ languages?: string[] | undefined;
65
65
  /** Whether the no-input poke text was generated by AI. */
66
66
  generate_no_input_poke_text?: (boolean | null) | undefined;
67
67
  /** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
@@ -70,6 +70,8 @@ export interface Conversation {
70
70
  no_input_poke_text: string | null;
71
71
  /** Seconds of silence before the conversation is ended. */
72
72
  no_input_end_conversation_sec: number | null;
73
+ /** The WebSocket idle timeout in seconds. */
74
+ websocket_timeout_sec?: number | undefined;
73
75
  /** Voice activity detection prebuffer duration in milliseconds. `null` when not applicable or unknown (e.g. push-to-talk, or legacy stored conversations). */
74
76
  vad_prebuffer_duration_ms?: (number | null) | undefined;
75
77
  /** Minimum speech duration for voice activity detection in milliseconds. `null` when not applicable or unknown. */
@@ -99,7 +101,7 @@ export interface Conversation {
99
101
  /** Whether the assistant produced backchannel responses during the conversation. */
100
102
  enable_assistant_backchannel?: boolean | undefined;
101
103
  /** How aggressively the assistant produced backchannel responses during the conversation. */
102
- assistant_backchannel_aggressiveness?: number | undefined;
104
+ assistant_backchannel_aggressiveness?: (number | null) | undefined;
103
105
  }
104
106
  export declare namespace Conversation {
105
107
  /**
@@ -1,4 +1,6 @@
1
1
  export interface ConversationAnalysis {
2
+ /** The ID of the conversation analysis. */
3
+ id: string;
2
4
  /** Latencies between turns in milliseconds. */
3
5
  latencies_ms: number[];
4
6
  /** Number of interruptions in the conversation. */
@@ -37,6 +37,8 @@ export declare namespace ConversationItem {
37
37
  /** The tool call ID. */
38
38
  id: string;
39
39
  tool: Item.Tool;
40
+ /** The integration associated with the tool, if any. */
41
+ integration?: (string | null) | undefined;
40
42
  /** HTTP method for webhook tool calls. */
41
43
  endpoint_method?: (string | null) | undefined;
42
44
  /** URL for webhook tool calls. */
@@ -29,7 +29,7 @@ export interface CreateAgentRequest {
29
29
  /** Number of seconds of inactivity before the conversation WebSocket is closed. */
30
30
  websocket_timeout_sec?: number | undefined;
31
31
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
32
- welcome_message?: string | undefined;
32
+ welcome_message?: (string | null) | undefined;
33
33
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
34
34
  system_prompt?: string | undefined;
35
35
  /** Variables that can be used in the welcome message and the system prompt. */
@@ -54,7 +54,7 @@ export interface CreateAgentRequest {
54
54
  data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
55
55
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
56
56
  default_language?: Phonic.LanguageCode | undefined;
57
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
57
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
58
58
  additional_languages?: Phonic.LanguageCode[] | undefined;
59
59
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
60
60
  languages?: Phonic.LanguageCode[] | undefined;
@@ -62,6 +62,8 @@ export interface CreateAgentRequest {
62
62
  multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
63
63
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
64
64
  push_to_talk?: boolean | undefined;
65
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
66
+ intelligence_level?: CreateAgentRequest.IntelligenceLevel | undefined;
65
67
  /** These words, or short phrases, will be more accurately recognized by the agent. */
66
68
  boosted_keywords?: string[] | undefined;
67
69
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -98,6 +100,7 @@ export declare namespace CreateAgentRequest {
98
100
  /** The audio format of the agent. */
99
101
  const AudioFormat: {
100
102
  readonly Pcm44100: "pcm_44100";
103
+ readonly Pcm24000: "pcm_24000";
101
104
  readonly Pcm16000: "pcm_16000";
102
105
  readonly Pcm8000: "pcm_8000";
103
106
  readonly Mulaw8000: "mulaw_8000";
@@ -130,6 +133,12 @@ export declare namespace CreateAgentRequest {
130
133
  readonly Initial: "initial";
131
134
  };
132
135
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
136
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
137
+ const IntelligenceLevel: {
138
+ readonly Standard: "standard";
139
+ readonly High: "high";
140
+ };
141
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
133
142
  type PronunciationDictionary = PronunciationDictionary.Item[];
134
143
  namespace PronunciationDictionary {
135
144
  interface Item {
@@ -8,6 +8,7 @@ export var CreateAgentRequest;
8
8
  /** The audio format of the agent. */
9
9
  CreateAgentRequest.AudioFormat = {
10
10
  Pcm44100: "pcm_44100",
11
+ Pcm24000: "pcm_24000",
11
12
  Pcm16000: "pcm_16000",
12
13
  Pcm8000: "pcm_8000",
13
14
  Mulaw8000: "mulaw_8000",
@@ -24,4 +25,9 @@ export var CreateAgentRequest;
24
25
  Request: "request",
25
26
  Initial: "initial",
26
27
  };
28
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
29
+ CreateAgentRequest.IntelligenceLevel = {
30
+ Standard: "standard",
31
+ High: "high",
32
+ };
27
33
  })(CreateAgentRequest || (CreateAgentRequest = {}));
@@ -29,7 +29,7 @@ export interface OutboundCallConfig {
29
29
  no_input_end_conversation_sec?: number | undefined;
30
30
  /** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
31
31
  default_language?: Phonic.LanguageCode | undefined;
32
- /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
32
+ /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `"auto"`, a maximum of 2 additional languages is allowed. */
33
33
  additional_languages?: Phonic.LanguageCode[] | undefined;
34
34
  /** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
35
35
  languages?: Phonic.LanguageCode[] | undefined;
@@ -37,6 +37,8 @@ export interface OutboundCallConfig {
37
37
  multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
38
38
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
39
39
  push_to_talk?: boolean | undefined;
40
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
41
+ intelligence_level?: OutboundCallConfig.IntelligenceLevel | undefined;
40
42
  /** These words, or short phrases, will be more accurately recognized by the agent. */
41
43
  boosted_keywords?: string[] | undefined;
42
44
  /** Array of `{ word, pronunciation }` entries. Words must be unique. */
@@ -78,6 +80,12 @@ export declare namespace OutboundCallConfig {
78
80
  readonly Initial: "initial";
79
81
  };
80
82
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
83
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
84
+ const IntelligenceLevel: {
85
+ readonly Standard: "standard";
86
+ readonly High: "high";
87
+ };
88
+ type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
81
89
  type PronunciationDictionary = PronunciationDictionary.Item[];
82
90
  namespace PronunciationDictionary {
83
91
  interface Item {
@@ -7,6 +7,11 @@ export var OutboundCallConfig;
7
7
  Request: "request",
8
8
  Initial: "initial",
9
9
  };
10
+ /** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
11
+ OutboundCallConfig.IntelligenceLevel = {
12
+ Standard: "standard",
13
+ High: "high",
14
+ };
10
15
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
11
16
  OutboundCallConfig.BackgroundNoise = {
12
17
  Office: "office",
@@ -25,8 +25,10 @@ export interface Tool {
25
25
  tool_call_output_timeout_ms?: number | undefined;
26
26
  /** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
27
27
  phone_number?: (string | null) | undefined;
28
- /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
28
+ /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
29
29
  dtmf?: (string | null) | undefined;
30
+ /** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
31
+ dynamic_dtmf?: boolean | undefined;
30
32
  /** 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. */
31
33
  use_agent_phone_number?: boolean | undefined;
32
34
  /** 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,6 +45,7 @@ export type ConversationAnalysisWebhookPayload = {
45
45
  created_at: ISODateTime;
46
46
  data: {
47
47
  conversation: {
48
+ id: string;
48
49
  latencies_ms: number[];
49
50
  interruptions_count: number;
50
51
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.6";
1
+ export declare const SDK_VERSION = "0.32.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.32.6";
1
+ export const SDK_VERSION = "0.32.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.6",
3
+ "version": "0.32.8",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",