phonic 0.32.21 → 0.32.23

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 (43) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -0
  3. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  4. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +3 -1
  5. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +3 -1
  6. package/dist/cjs/api/types/Agent.d.ts +2 -0
  7. package/dist/cjs/api/types/ConfigOptions.d.ts +2 -0
  8. package/dist/cjs/api/types/Conversation.d.ts +2 -0
  9. package/dist/cjs/api/types/CreateAgentRequest.d.ts +2 -0
  10. package/dist/cjs/api/types/GeneratedToolCall.d.ts +2 -2
  11. package/dist/cjs/api/types/GeneratedToolReference.d.ts +7 -0
  12. package/dist/cjs/api/types/GeneratedToolReference.js +3 -0
  13. package/dist/cjs/api/types/OutboundCallConfig.d.ts +2 -0
  14. package/dist/cjs/api/types/ResponsesToolCall.d.ts +2 -2
  15. package/dist/cjs/api/types/ResponsesToolReference.d.ts +9 -0
  16. package/dist/cjs/api/types/ResponsesToolReference.js +3 -0
  17. package/dist/cjs/api/types/Tool.d.ts +3 -1
  18. package/dist/cjs/api/types/index.d.ts +2 -0
  19. package/dist/cjs/api/types/index.js +2 -0
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/BaseClient.mjs +2 -2
  23. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +2 -0
  24. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -0
  25. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +3 -1
  26. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +3 -1
  27. package/dist/esm/api/types/Agent.d.mts +2 -0
  28. package/dist/esm/api/types/ConfigOptions.d.mts +2 -0
  29. package/dist/esm/api/types/Conversation.d.mts +2 -0
  30. package/dist/esm/api/types/CreateAgentRequest.d.mts +2 -0
  31. package/dist/esm/api/types/GeneratedToolCall.d.mts +2 -2
  32. package/dist/esm/api/types/GeneratedToolReference.d.mts +7 -0
  33. package/dist/esm/api/types/GeneratedToolReference.mjs +2 -0
  34. package/dist/esm/api/types/OutboundCallConfig.d.mts +2 -0
  35. package/dist/esm/api/types/ResponsesToolCall.d.mts +2 -2
  36. package/dist/esm/api/types/ResponsesToolReference.d.mts +9 -0
  37. package/dist/esm/api/types/ResponsesToolReference.mjs +2 -0
  38. package/dist/esm/api/types/Tool.d.mts +3 -1
  39. package/dist/esm/api/types/index.d.mts +2 -0
  40. package/dist/esm/api/types/index.mjs +2 -0
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. 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.21",
47
- "User-Agent": "phonic/0.32.21",
46
+ "X-Fern-SDK-Version": "0.32.23",
47
+ "User-Agent": "phonic/0.32.23",
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);
@@ -135,6 +135,8 @@ export interface AgentsCreateRequest {
135
135
  vad_threshold?: number;
136
136
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
137
137
  enable_redaction?: boolean;
138
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
139
+ enable_watermarking?: boolean;
138
140
  /** Array of MCP server IDs to make available to the agent. */
139
141
  mcp_server_ids?: string[];
140
142
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -141,6 +141,8 @@ export interface UpdateAgentRequest {
141
141
  vad_threshold?: number;
142
142
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
143
143
  enable_redaction?: boolean;
144
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
145
+ enable_watermarking?: boolean;
144
146
  /** Array of MCP server IDs to make available to the agent. */
145
147
  mcp_server_ids?: string[];
146
148
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -205,13 +205,15 @@ export interface CreateToolRequest {
205
205
  phone_number?: string | null;
206
206
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
207
207
  dtmf?: string | null;
208
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Must be null when keep_listening is false, since a SIP REFER transfer has no bridged call to speak it on. Only available for built_in_transfer_to_phone_number tools. */
209
+ post_transfer_message?: string | null;
208
210
  /** 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). */
209
211
  dynamic_dtmf?: boolean;
210
212
  /** 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. */
211
213
  use_agent_phone_number?: boolean;
212
214
  /** 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. */
213
215
  detect_voicemail?: boolean;
214
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires use_agent_phone_number and detect_voicemail to be false, dtmf to be null and dynamic_dtmf to be false. Only available for built_in_transfer_to_phone_number tools. Defaults to the value of use_agent_phone_number. */
216
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires use_agent_phone_number and detect_voicemail to be false, dtmf and post_transfer_message to be null and dynamic_dtmf to be false. Only available for built_in_transfer_to_phone_number tools. Defaults to the value of use_agent_phone_number. */
215
217
  keep_listening?: boolean;
216
218
  /** 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. */
217
219
  agents_to_transfer_to?: string[];
@@ -45,13 +45,15 @@ export interface UpdateToolRequest {
45
45
  phone_number?: string | null;
46
46
  /** 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. */
47
47
  dtmf?: string | null;
48
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Can be set to null to remove the announcement. Must be null when the resulting keep_listening is false. Only applicable to built_in_transfer_to_phone_number tools. */
49
+ post_transfer_message?: string | null;
48
50
  /** 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). */
49
51
  dynamic_dtmf?: boolean;
50
52
  /** 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. */
51
53
  use_agent_phone_number?: boolean;
52
54
  /** 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. */
53
55
  detect_voicemail?: boolean;
54
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires the resulting use_agent_phone_number and detect_voicemail to be false, dtmf to be null and dynamic_dtmf to be false. Only applicable to built_in_transfer_to_phone_number tools. */
56
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires the resulting use_agent_phone_number and detect_voicemail to be false, dtmf and post_transfer_message to be null and dynamic_dtmf to be false. Only applicable to built_in_transfer_to_phone_number tools. */
55
57
  keep_listening?: boolean;
56
58
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
57
59
  agents_to_transfer_to?: string[];
@@ -86,6 +86,8 @@ export interface Agent {
86
86
  vad_threshold?: number | undefined;
87
87
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
88
88
  enable_redaction?: boolean | undefined;
89
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
90
+ enable_watermarking?: boolean | undefined;
89
91
  /** The URL-friendly slug of the agent. */
90
92
  slug?: string | undefined;
91
93
  /** When `true`, the assistant emits backchannel cues (e.g. "mm-hmm") while the user is speaking. */
@@ -71,6 +71,8 @@ export interface ConfigOptions {
71
71
  template_variables?: Record<string, string> | undefined;
72
72
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
73
73
  enable_redaction?: boolean | undefined;
74
+ /** When `true`, an inaudible watermark is embedded in the audio the assistant generates. */
75
+ enable_watermarking?: boolean | undefined;
74
76
  /** Names of pre-configured MCP servers to make available to the assistant. Names must be unique. */
75
77
  mcp_servers?: string[] | undefined;
76
78
  /** Names of observability integrations to enable for the conversation. Each must be one of the supported providers. */
@@ -94,6 +94,8 @@ export interface Conversation {
94
94
  redacted_transcript?: (string | null) | undefined;
95
95
  /** Arbitrary metadata associated with the conversation. */
96
96
  metadata?: (Record<string, unknown> | null) | undefined;
97
+ /** Whether an inaudible watermark was embedded in the audio the agent generated during the conversation. */
98
+ enable_watermarking?: boolean | undefined;
97
99
  /** Controls how long transcripts and audio recordings are retained before deletion. */
98
100
  data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
99
101
  /** Information about when transcripts and audio recordings are or were scheduled to be deleted. */
@@ -88,6 +88,8 @@ export interface CreateAgentRequest {
88
88
  vad_threshold?: number | undefined;
89
89
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
90
90
  enable_redaction?: boolean | undefined;
91
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
92
+ enable_watermarking?: boolean | undefined;
91
93
  /** Array of MCP server IDs to make available to the agent. */
92
94
  mcp_server_ids?: string[] | undefined;
93
95
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -1,8 +1,8 @@
1
+ import type * as Phonic from "../index.js";
1
2
  export interface GeneratedToolCall {
2
3
  /** Identifier for this tool call. Send it back as the `tool_call_id` of the matching `tool_call_output` input item. */
3
4
  tool_call_id: string;
4
- /** Name of the tool to call. Always one of the `tool_definitions` from the request. */
5
- tool_name: string;
5
+ tool: Phonic.GeneratedToolReference;
6
6
  /** Arguments the assistant produced for the request body. */
7
7
  request_body?: Record<string, unknown> | undefined;
8
8
  /** Arguments the assistant produced as query parameters. */
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The tool the assistant wants to call.
3
+ */
4
+ export interface GeneratedToolReference {
5
+ /** Name of the tool to call. Always one of the `tool_definitions` from the request. */
6
+ name: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -49,6 +49,8 @@ export interface OutboundCallConfig {
49
49
  tools?: OutboundCallConfig.Tools.Item[] | undefined;
50
50
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
51
51
  enable_redaction?: boolean | undefined;
52
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
53
+ enable_watermarking?: boolean | undefined;
52
54
  /** The speech-to-speech model to use. */
53
55
  model?: "merritt" | undefined;
54
56
  /** The audio speed of the agent. */
@@ -1,11 +1,11 @@
1
+ import type * as Phonic from "../index.js";
1
2
  /**
2
3
  * A tool call the assistant made earlier in the conversation.
3
4
  */
4
5
  export interface ResponsesToolCall {
5
6
  /** Identifier for this tool call, unique within `input`. */
6
7
  tool_call_id: string;
7
- /** Name of the called tool. */
8
- tool_name: string;
8
+ tool: Phonic.ResponsesToolReference;
9
9
  /** Arguments the assistant passed in the request body. */
10
10
  request_body?: (Record<string, unknown> | null) | undefined;
11
11
  /** Arguments the assistant passed as query parameters. An argument cannot appear in both `request_body` and `query_params`. */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A pointer to the tool that was called by the assistant (see ResponsesToolCall).
3
+ */
4
+ export interface ResponsesToolReference {
5
+ /** Optional tool ID, accepted for compatibility with tool calls copied from conversation items. */
6
+ id?: string | undefined;
7
+ /** Name of the tool that was called. */
8
+ name: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -36,13 +36,15 @@ export interface Tool {
36
36
  phone_number?: (string | null) | undefined;
37
37
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
38
38
  dtmf?: (string | null) | undefined;
39
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Always null when keep_listening is false. Only returned for built_in_transfer_to_phone_number tools. */
40
+ post_transfer_message?: (string | null) | undefined;
39
41
  /** 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). */
40
42
  dynamic_dtmf?: boolean | undefined;
41
43
  /** 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. */
42
44
  use_agent_phone_number?: boolean | undefined;
43
45
  /** 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. */
44
46
  detect_voicemail?: boolean | undefined;
45
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, so use_agent_phone_number, detect_voicemail and dynamic_dtmf are false and dtmf is null. Only returned for built_in_transfer_to_phone_number tools. */
47
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, so use_agent_phone_number, detect_voicemail and dynamic_dtmf are false and dtmf and post_transfer_message are null. Only returned for built_in_transfer_to_phone_number tools. */
46
48
  keep_listening?: boolean | undefined;
47
49
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
48
50
  agents_to_transfer_to?: string[] | undefined;
@@ -40,6 +40,7 @@ export * from "./ExtractionField.js";
40
40
  export * from "./ExtractionSchema.js";
41
41
  export * from "./GeneratedResponse.js";
42
42
  export * from "./GeneratedToolCall.js";
43
+ export * from "./GeneratedToolReference.js";
43
44
  export * from "./GenerateReplyPayload.js";
44
45
  export * from "./GenerateResponsesResponse.js";
45
46
  export * from "./InlineWebSocketTool.js";
@@ -64,6 +65,7 @@ export * from "./ResponsesInputItem.js";
64
65
  export * from "./ResponsesToolCall.js";
65
66
  export * from "./ResponsesToolCallOutput.js";
66
67
  export * from "./ResponsesToolDefinition.js";
68
+ export * from "./ResponsesToolReference.js";
67
69
  export * from "./ResponsesUserMessage.js";
68
70
  export * from "./SayPayload.js";
69
71
  export * from "./SetExternalIdPayload.js";
@@ -56,6 +56,7 @@ __exportStar(require("./ExtractionField.js"), exports);
56
56
  __exportStar(require("./ExtractionSchema.js"), exports);
57
57
  __exportStar(require("./GeneratedResponse.js"), exports);
58
58
  __exportStar(require("./GeneratedToolCall.js"), exports);
59
+ __exportStar(require("./GeneratedToolReference.js"), exports);
59
60
  __exportStar(require("./GenerateReplyPayload.js"), exports);
60
61
  __exportStar(require("./GenerateResponsesResponse.js"), exports);
61
62
  __exportStar(require("./InlineWebSocketTool.js"), exports);
@@ -80,6 +81,7 @@ __exportStar(require("./ResponsesInputItem.js"), exports);
80
81
  __exportStar(require("./ResponsesToolCall.js"), exports);
81
82
  __exportStar(require("./ResponsesToolCallOutput.js"), exports);
82
83
  __exportStar(require("./ResponsesToolDefinition.js"), exports);
84
+ __exportStar(require("./ResponsesToolReference.js"), exports);
83
85
  __exportStar(require("./ResponsesUserMessage.js"), exports);
84
86
  __exportStar(require("./SayPayload.js"), exports);
85
87
  __exportStar(require("./SetExternalIdPayload.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.21";
1
+ export declare const SDK_VERSION = "0.32.23";
@@ -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.21";
4
+ exports.SDK_VERSION = "0.32.23";
@@ -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.21",
10
- "User-Agent": "phonic/0.32.21",
9
+ "X-Fern-SDK-Version": "0.32.23",
10
+ "User-Agent": "phonic/0.32.23",
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);
@@ -135,6 +135,8 @@ export interface AgentsCreateRequest {
135
135
  vad_threshold?: number;
136
136
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
137
137
  enable_redaction?: boolean;
138
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
139
+ enable_watermarking?: boolean;
138
140
  /** Array of MCP server IDs to make available to the agent. */
139
141
  mcp_server_ids?: string[];
140
142
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -141,6 +141,8 @@ export interface UpdateAgentRequest {
141
141
  vad_threshold?: number;
142
142
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
143
143
  enable_redaction?: boolean;
144
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
145
+ enable_watermarking?: boolean;
144
146
  /** Array of MCP server IDs to make available to the agent. */
145
147
  mcp_server_ids?: string[];
146
148
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -205,13 +205,15 @@ export interface CreateToolRequest {
205
205
  phone_number?: string | null;
206
206
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
207
207
  dtmf?: string | null;
208
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Must be null when keep_listening is false, since a SIP REFER transfer has no bridged call to speak it on. Only available for built_in_transfer_to_phone_number tools. */
209
+ post_transfer_message?: string | null;
208
210
  /** 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). */
209
211
  dynamic_dtmf?: boolean;
210
212
  /** 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. */
211
213
  use_agent_phone_number?: boolean;
212
214
  /** 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. */
213
215
  detect_voicemail?: boolean;
214
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires use_agent_phone_number and detect_voicemail to be false, dtmf to be null and dynamic_dtmf to be false. Only available for built_in_transfer_to_phone_number tools. Defaults to the value of use_agent_phone_number. */
216
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires use_agent_phone_number and detect_voicemail to be false, dtmf and post_transfer_message to be null and dynamic_dtmf to be false. Only available for built_in_transfer_to_phone_number tools. Defaults to the value of use_agent_phone_number. */
215
217
  keep_listening?: boolean;
216
218
  /** 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. */
217
219
  agents_to_transfer_to?: string[];
@@ -45,13 +45,15 @@ export interface UpdateToolRequest {
45
45
  phone_number?: string | null;
46
46
  /** 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. */
47
47
  dtmf?: string | null;
48
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Can be set to null to remove the announcement. Must be null when the resulting keep_listening is false. Only applicable to built_in_transfer_to_phone_number tools. */
49
+ post_transfer_message?: string | null;
48
50
  /** 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). */
49
51
  dynamic_dtmf?: boolean;
50
52
  /** 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. */
51
53
  use_agent_phone_number?: boolean;
52
54
  /** 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. */
53
55
  detect_voicemail?: boolean;
54
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires the resulting use_agent_phone_number and detect_voicemail to be false, dtmf to be null and dynamic_dtmf to be false. Only applicable to built_in_transfer_to_phone_number tools. */
56
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, which requires the resulting use_agent_phone_number and detect_voicemail to be false, dtmf and post_transfer_message to be null and dynamic_dtmf to be false. Only applicable to built_in_transfer_to_phone_number tools. */
55
57
  keep_listening?: boolean;
56
58
  /** Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool. */
57
59
  agents_to_transfer_to?: string[];
@@ -86,6 +86,8 @@ export interface Agent {
86
86
  vad_threshold?: number | undefined;
87
87
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
88
88
  enable_redaction?: boolean | undefined;
89
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
90
+ enable_watermarking?: boolean | undefined;
89
91
  /** The URL-friendly slug of the agent. */
90
92
  slug?: string | undefined;
91
93
  /** When `true`, the assistant emits backchannel cues (e.g. "mm-hmm") while the user is speaking. */
@@ -71,6 +71,8 @@ export interface ConfigOptions {
71
71
  template_variables?: Record<string, string> | undefined;
72
72
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
73
73
  enable_redaction?: boolean | undefined;
74
+ /** When `true`, an inaudible watermark is embedded in the audio the assistant generates. */
75
+ enable_watermarking?: boolean | undefined;
74
76
  /** Names of pre-configured MCP servers to make available to the assistant. Names must be unique. */
75
77
  mcp_servers?: string[] | undefined;
76
78
  /** Names of observability integrations to enable for the conversation. Each must be one of the supported providers. */
@@ -94,6 +94,8 @@ export interface Conversation {
94
94
  redacted_transcript?: (string | null) | undefined;
95
95
  /** Arbitrary metadata associated with the conversation. */
96
96
  metadata?: (Record<string, unknown> | null) | undefined;
97
+ /** Whether an inaudible watermark was embedded in the audio the agent generated during the conversation. */
98
+ enable_watermarking?: boolean | undefined;
97
99
  /** Controls how long transcripts and audio recordings are retained before deletion. */
98
100
  data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
99
101
  /** Information about when transcripts and audio recordings are or were scheduled to be deleted. */
@@ -88,6 +88,8 @@ export interface CreateAgentRequest {
88
88
  vad_threshold?: number | undefined;
89
89
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
90
90
  enable_redaction?: boolean | undefined;
91
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
92
+ enable_watermarking?: boolean | undefined;
91
93
  /** Array of MCP server IDs to make available to the agent. */
92
94
  mcp_server_ids?: string[] | undefined;
93
95
  /** Names of observability integrations to enable for the agent. Each must be one of the supported providers. */
@@ -1,8 +1,8 @@
1
+ import type * as Phonic from "../index.mjs";
1
2
  export interface GeneratedToolCall {
2
3
  /** Identifier for this tool call. Send it back as the `tool_call_id` of the matching `tool_call_output` input item. */
3
4
  tool_call_id: string;
4
- /** Name of the tool to call. Always one of the `tool_definitions` from the request. */
5
- tool_name: string;
5
+ tool: Phonic.GeneratedToolReference;
6
6
  /** Arguments the assistant produced for the request body. */
7
7
  request_body?: Record<string, unknown> | undefined;
8
8
  /** Arguments the assistant produced as query parameters. */
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The tool the assistant wants to call.
3
+ */
4
+ export interface GeneratedToolReference {
5
+ /** Name of the tool to call. Always one of the `tool_definitions` from the request. */
6
+ name: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -49,6 +49,8 @@ export interface OutboundCallConfig {
49
49
  tools?: OutboundCallConfig.Tools.Item[] | undefined;
50
50
  /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends. */
51
51
  enable_redaction?: boolean | undefined;
52
+ /** When `true`, an inaudible watermark is embedded in the audio the agent generates. */
53
+ enable_watermarking?: boolean | undefined;
52
54
  /** The speech-to-speech model to use. */
53
55
  model?: "merritt" | undefined;
54
56
  /** The audio speed of the agent. */
@@ -1,11 +1,11 @@
1
+ import type * as Phonic from "../index.mjs";
1
2
  /**
2
3
  * A tool call the assistant made earlier in the conversation.
3
4
  */
4
5
  export interface ResponsesToolCall {
5
6
  /** Identifier for this tool call, unique within `input`. */
6
7
  tool_call_id: string;
7
- /** Name of the called tool. */
8
- tool_name: string;
8
+ tool: Phonic.ResponsesToolReference;
9
9
  /** Arguments the assistant passed in the request body. */
10
10
  request_body?: (Record<string, unknown> | null) | undefined;
11
11
  /** Arguments the assistant passed as query parameters. An argument cannot appear in both `request_body` and `query_params`. */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A pointer to the tool that was called by the assistant (see ResponsesToolCall).
3
+ */
4
+ export interface ResponsesToolReference {
5
+ /** Optional tool ID, accepted for compatibility with tool calls copied from conversation items. */
6
+ id?: string | undefined;
7
+ /** Name of the tool that was called. */
8
+ name: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -36,13 +36,15 @@ export interface Tool {
36
36
  phone_number?: (string | null) | undefined;
37
37
  /** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
38
38
  dtmf?: (string | null) | undefined;
39
+ /** Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Always null when keep_listening is false. Only returned for built_in_transfer_to_phone_number tools. */
40
+ post_transfer_message?: (string | null) | undefined;
39
41
  /** 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). */
40
42
  dynamic_dtmf?: boolean | undefined;
41
43
  /** 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. */
42
44
  use_agent_phone_number?: boolean | undefined;
43
45
  /** 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. */
44
46
  detect_voicemail?: boolean | undefined;
45
- /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, so use_agent_phone_number, detect_voicemail and dynamic_dtmf are false and dtmf is null. Only returned for built_in_transfer_to_phone_number tools. */
47
+ /** When true, Phonic bridges the transfer and stays on the call. When false, the call is handed off with a SIP REFER and Phonic drops out, so use_agent_phone_number, detect_voicemail and dynamic_dtmf are false and dtmf and post_transfer_message are null. Only returned for built_in_transfer_to_phone_number tools. */
46
48
  keep_listening?: boolean | undefined;
47
49
  /** Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. */
48
50
  agents_to_transfer_to?: string[] | undefined;
@@ -40,6 +40,7 @@ export * from "./ExtractionField.mjs";
40
40
  export * from "./ExtractionSchema.mjs";
41
41
  export * from "./GeneratedResponse.mjs";
42
42
  export * from "./GeneratedToolCall.mjs";
43
+ export * from "./GeneratedToolReference.mjs";
43
44
  export * from "./GenerateReplyPayload.mjs";
44
45
  export * from "./GenerateResponsesResponse.mjs";
45
46
  export * from "./InlineWebSocketTool.mjs";
@@ -64,6 +65,7 @@ export * from "./ResponsesInputItem.mjs";
64
65
  export * from "./ResponsesToolCall.mjs";
65
66
  export * from "./ResponsesToolCallOutput.mjs";
66
67
  export * from "./ResponsesToolDefinition.mjs";
68
+ export * from "./ResponsesToolReference.mjs";
67
69
  export * from "./ResponsesUserMessage.mjs";
68
70
  export * from "./SayPayload.mjs";
69
71
  export * from "./SetExternalIdPayload.mjs";
@@ -40,6 +40,7 @@ export * from "./ExtractionField.mjs";
40
40
  export * from "./ExtractionSchema.mjs";
41
41
  export * from "./GeneratedResponse.mjs";
42
42
  export * from "./GeneratedToolCall.mjs";
43
+ export * from "./GeneratedToolReference.mjs";
43
44
  export * from "./GenerateReplyPayload.mjs";
44
45
  export * from "./GenerateResponsesResponse.mjs";
45
46
  export * from "./InlineWebSocketTool.mjs";
@@ -64,6 +65,7 @@ export * from "./ResponsesInputItem.mjs";
64
65
  export * from "./ResponsesToolCall.mjs";
65
66
  export * from "./ResponsesToolCallOutput.mjs";
66
67
  export * from "./ResponsesToolDefinition.mjs";
68
+ export * from "./ResponsesToolReference.mjs";
67
69
  export * from "./ResponsesUserMessage.mjs";
68
70
  export * from "./SayPayload.mjs";
69
71
  export * from "./SetExternalIdPayload.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.21";
1
+ export declare const SDK_VERSION = "0.32.23";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.32.21";
1
+ export const SDK_VERSION = "0.32.23";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.21",
3
+ "version": "0.32.23",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",