phonic 0.32.0 → 0.32.2

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 (45) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
  4. package/dist/cjs/api/resources/agents/client/Client.js +3 -0
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +6 -1
  6. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +8 -2
  7. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +2 -1
  8. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
  9. package/dist/cjs/api/types/Agent.d.ts +7 -2
  10. package/dist/cjs/api/types/Agent.js +2 -1
  11. package/dist/cjs/api/types/ConfigOptions.d.ts +7 -2
  12. package/dist/cjs/api/types/ConfigOptions.js +2 -1
  13. package/dist/cjs/api/types/Conversation.d.ts +11 -4
  14. package/dist/cjs/api/types/Conversation.js +6 -1
  15. package/dist/cjs/api/types/CreateAgentRequest.d.ts +7 -2
  16. package/dist/cjs/api/types/CreateAgentRequest.js +2 -1
  17. package/dist/cjs/api/types/LanguageCode.d.ts +37 -4
  18. package/dist/cjs/api/types/LanguageCode.js +37 -4
  19. package/dist/cjs/api/types/OutboundCallConfig.d.ts +10 -3
  20. package/dist/cjs/api/types/OutboundCallConfig.js +2 -1
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/BaseClient.mjs +2 -2
  24. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
  25. package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
  26. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +6 -1
  27. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +8 -2
  28. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +2 -1
  29. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
  30. package/dist/esm/api/types/Agent.d.mts +7 -2
  31. package/dist/esm/api/types/Agent.mjs +2 -1
  32. package/dist/esm/api/types/ConfigOptions.d.mts +7 -2
  33. package/dist/esm/api/types/ConfigOptions.mjs +2 -1
  34. package/dist/esm/api/types/Conversation.d.mts +11 -4
  35. package/dist/esm/api/types/Conversation.mjs +6 -1
  36. package/dist/esm/api/types/CreateAgentRequest.d.mts +7 -2
  37. package/dist/esm/api/types/CreateAgentRequest.mjs +2 -1
  38. package/dist/esm/api/types/LanguageCode.d.mts +37 -4
  39. package/dist/esm/api/types/LanguageCode.mjs +37 -4
  40. package/dist/esm/api/types/OutboundCallConfig.d.mts +10 -3
  41. package/dist/esm/api/types/OutboundCallConfig.mjs +2 -1
  42. package/dist/esm/version.d.mts +1 -1
  43. package/dist/esm/version.mjs +1 -1
  44. package/package.json +1 -1
  45. package/reference.md +3 -0
@@ -107,6 +107,7 @@ export class AgentsClient {
107
107
  * audio_speed: 1,
108
108
  * background_noise_level: 0,
109
109
  * generate_welcome_message: false,
110
+ * is_welcome_message_interruptible: true,
110
111
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
111
112
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
112
113
  * template_variables: {
@@ -210,6 +211,7 @@ export class AgentsClient {
210
211
  * audio_speed: 1,
211
212
  * background_noise_level: 0,
212
213
  * generate_welcome_message: false,
214
+ * is_welcome_message_interruptible: true,
213
215
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
214
216
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
215
217
  * template_variables: {
@@ -429,6 +431,7 @@ export class AgentsClient {
429
431
  * audio_speed: 1,
430
432
  * background_noise_level: 0,
431
433
  * generate_welcome_message: false,
434
+ * is_welcome_message_interruptible: true,
432
435
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
433
436
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
434
437
  * template_variables: {
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
10
10
  * audio_speed: 1,
11
11
  * background_noise_level: 0,
12
12
  * generate_welcome_message: false,
13
+ * is_welcome_message_interruptible: true,
13
14
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
14
15
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
15
16
  * template_variables: {
@@ -68,6 +69,8 @@ export interface AgentsCreateRequest {
68
69
  background_noise?: Phonic.CreateAgentRequest.BackgroundNoise | null;
69
70
  /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
70
71
  generate_welcome_message?: boolean;
72
+ /** When `false`, the welcome message will not be interruptible by the user. */
73
+ is_welcome_message_interruptible?: boolean;
71
74
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
72
75
  welcome_message?: string;
73
76
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
@@ -92,7 +95,7 @@ export interface AgentsCreateRequest {
92
95
  additional_languages?: Phonic.LanguageCode[];
93
96
  /** 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. */
94
97
  languages?: Phonic.LanguageCode[];
95
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
98
+ /** 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. */
96
99
  multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
97
100
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
98
101
  push_to_talk?: boolean;
@@ -116,4 +119,6 @@ export interface AgentsCreateRequest {
116
119
  vad_min_silence_duration_ms?: number;
117
120
  /** Voice activity detection threshold. */
118
121
  vad_threshold?: number;
122
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
123
+ enable_redaction?: boolean;
119
124
  }
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
10
10
  * audio_speed: 1,
11
11
  * background_noise_level: 0,
12
12
  * generate_welcome_message: false,
13
+ * is_welcome_message_interruptible: true,
13
14
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
14
15
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
15
16
  * template_variables: {
@@ -68,6 +69,8 @@ export interface UpdateAgentRequest {
68
69
  background_noise?: UpdateAgentRequest.BackgroundNoise | null;
69
70
  /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
70
71
  generate_welcome_message?: boolean;
72
+ /** When `false`, the welcome message will not be interruptible by the user. */
73
+ is_welcome_message_interruptible?: boolean;
71
74
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
72
75
  welcome_message?: string;
73
76
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
@@ -92,7 +95,7 @@ export interface UpdateAgentRequest {
92
95
  additional_languages?: Phonic.LanguageCode[];
93
96
  /** 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. */
94
97
  languages?: Phonic.LanguageCode[];
95
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
98
+ /** 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. */
96
99
  multilingual_mode?: UpdateAgentRequest.MultilingualMode;
97
100
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
98
101
  push_to_talk?: boolean;
@@ -116,6 +119,8 @@ export interface UpdateAgentRequest {
116
119
  vad_min_silence_duration_ms?: number;
117
120
  /** Voice activity detection threshold. */
118
121
  vad_threshold?: number;
122
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
123
+ enable_redaction?: boolean;
119
124
  }
120
125
  export declare namespace UpdateAgentRequest {
121
126
  const PhoneNumber: {
@@ -151,10 +156,11 @@ export declare namespace UpdateAgentRequest {
151
156
  * Custom tool */
152
157
  | string;
153
158
  }
154
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
159
+ /** 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. */
155
160
  const MultilingualMode: {
156
161
  readonly Auto: "auto";
157
162
  readonly Request: "request";
163
+ readonly Initial: "initial";
158
164
  };
159
165
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
160
166
  type PronunciationDictionary = PronunciationDictionary.Item[];
@@ -18,9 +18,10 @@ export var UpdateAgentRequest;
18
18
  CallCenter: "call-center",
19
19
  CoffeeShop: "coffee-shop",
20
20
  };
21
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
21
+ /** 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. */
22
22
  UpdateAgentRequest.MultilingualMode = {
23
23
  Auto: "auto",
24
24
  Request: "request",
25
+ Initial: "initial",
25
26
  };
26
27
  })(UpdateAgentRequest || (UpdateAgentRequest = {}));
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
10
10
  * audio_speed: 1,
11
11
  * background_noise_level: 0,
12
12
  * generate_welcome_message: false,
13
+ * is_welcome_message_interruptible: true,
13
14
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
14
15
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
15
16
  * template_variables: {
@@ -24,6 +24,8 @@ export interface Agent {
24
24
  background_noise: Agent.BackgroundNoise | null;
25
25
  /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
26
26
  generate_welcome_message: boolean;
27
+ /** When `false`, the welcome message will not be interruptible by the user. */
28
+ is_welcome_message_interruptible: boolean;
27
29
  /** Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`. */
28
30
  welcome_message: string | null;
29
31
  /** Instructions for the conversation. */
@@ -48,7 +50,7 @@ export interface Agent {
48
50
  additional_languages: Phonic.LanguageCode[];
49
51
  /** 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. */
50
52
  languages?: Phonic.LanguageCode[] | undefined;
51
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
53
+ /** 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. */
52
54
  multilingual_mode: Agent.MultilingualMode;
53
55
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
54
56
  push_to_talk: boolean;
@@ -72,6 +74,8 @@ export interface Agent {
72
74
  vad_min_silence_duration_ms?: number | undefined;
73
75
  /** Voice activity detection threshold. */
74
76
  vad_threshold?: number | undefined;
77
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
78
+ enable_redaction?: boolean | undefined;
75
79
  }
76
80
  export declare namespace Agent {
77
81
  /**
@@ -108,10 +112,11 @@ export declare namespace Agent {
108
112
  * Custom tool */
109
113
  | string;
110
114
  }
111
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
115
+ /** 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. */
112
116
  const MultilingualMode: {
113
117
  readonly Auto: "auto";
114
118
  readonly Request: "request";
119
+ readonly Initial: "initial";
115
120
  };
116
121
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
117
122
  type PronunciationDictionary = PronunciationDictionary.Item[];
@@ -14,9 +14,10 @@ export var Agent;
14
14
  CallCenter: "call-center",
15
15
  CoffeeShop: "coffee-shop",
16
16
  };
17
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
17
+ /** 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. */
18
18
  Agent.MultilingualMode = {
19
19
  Auto: "auto",
20
20
  Request: "request",
21
+ Initial: "initial",
21
22
  };
22
23
  })(Agent || (Agent = {}));
@@ -19,6 +19,8 @@ export interface ConfigOptions {
19
19
  background_noise?: (ConfigOptions.BackgroundNoise | null) | undefined;
20
20
  /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
21
21
  generate_welcome_message?: boolean | undefined;
22
+ /** When `false`, the welcome message will not be interruptible by the user. */
23
+ is_welcome_message_interruptible?: boolean | undefined;
22
24
  /** Message to play when conversation starts. Ignored when `generate_welcome_message` is `true`. */
23
25
  welcome_message?: (string | null) | undefined;
24
26
  /** Voice ID to use for speech synthesis */
@@ -49,7 +51,7 @@ export interface ConfigOptions {
49
51
  default_language?: string | undefined;
50
52
  /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
51
53
  additional_languages?: string[] | undefined;
52
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
54
+ /** 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. */
53
55
  multilingual_mode?: ConfigOptions.MultilingualMode | undefined;
54
56
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
55
57
  push_to_talk?: boolean | undefined;
@@ -61,6 +63,8 @@ export interface ConfigOptions {
61
63
  tools?: Phonic.ToolDefinition[] | undefined;
62
64
  /** Template variables for system prompt and welcome message */
63
65
  template_variables?: Record<string, string> | undefined;
66
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
67
+ enable_redaction?: boolean | undefined;
64
68
  }
65
69
  export declare namespace ConfigOptions {
66
70
  /** Background noise type for the conversation */
@@ -86,10 +90,11 @@ export declare namespace ConfigOptions {
86
90
  readonly Mulaw8000: "mulaw_8000";
87
91
  };
88
92
  type OutputFormat = (typeof OutputFormat)[keyof typeof OutputFormat];
89
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
93
+ /** 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. */
90
94
  const MultilingualMode: {
91
95
  readonly Auto: "auto";
92
96
  readonly Request: "request";
97
+ readonly Initial: "initial";
93
98
  };
94
99
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
95
100
  type PronunciationDictionary = PronunciationDictionary.Item[];
@@ -21,9 +21,10 @@ export var ConfigOptions;
21
21
  Pcm8000: "pcm_8000",
22
22
  Mulaw8000: "mulaw_8000",
23
23
  };
24
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
24
+ /** 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. */
25
25
  ConfigOptions.MultilingualMode = {
26
26
  Auto: "auto",
27
27
  Request: "request",
28
+ Initial: "initial",
28
29
  };
29
30
  })(ConfigOptions || (ConfigOptions = {}));
@@ -16,6 +16,8 @@ export interface Conversation {
16
16
  model: string;
17
17
  /** Will be `true` if welcome message was automatically generated. */
18
18
  generate_welcome_message: boolean;
19
+ /** When `false`, the welcome message will not be interruptible by the user. */
20
+ is_welcome_message_interruptible: boolean;
19
21
  /** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */
20
22
  welcome_message: string | null;
21
23
  /** Template variables used in the conversation. */
@@ -51,10 +53,10 @@ export interface Conversation {
51
53
  /** Minimum number of words required to interrupt the assistant. */
52
54
  min_words_to_interrupt: number;
53
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. */
54
- default_language: string;
56
+ default_language: Phonic.LanguageCode;
55
57
  /** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
56
- additional_languages: string[] | null;
57
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
58
+ additional_languages: Phonic.LanguageCode[] | null;
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. */
58
60
  multilingual_mode: Conversation.MultilingualMode;
59
61
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
60
62
  push_to_talk: boolean;
@@ -128,6 +130,10 @@ export declare namespace Conversation {
128
130
  readonly UserCanceled: "user_canceled";
129
131
  readonly UserValidationFailed: "user_validation_failed";
130
132
  readonly Assistant: "assistant";
133
+ readonly AssistantSilenceLimitReached: "assistant_silence_limit_reached";
134
+ readonly ConfigurationEndpointTimedOut: "configuration_endpoint_timed_out";
135
+ readonly ConfigurationEndpointError: "configuration_endpoint_error";
136
+ readonly ConfigurationEndpointInvalidResponse: "configuration_endpoint_invalid_response";
131
137
  readonly Error: "error";
132
138
  };
133
139
  type EndedBy = (typeof EndedBy)[keyof typeof EndedBy];
@@ -138,10 +144,11 @@ export declare namespace Conversation {
138
144
  pronunciation: string;
139
145
  }
140
146
  }
141
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
147
+ /** 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. */
142
148
  const MultilingualMode: {
143
149
  readonly Auto: "auto";
144
150
  readonly Request: "request";
151
+ readonly Initial: "initial";
145
152
  };
146
153
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
147
154
  /**
@@ -21,11 +21,16 @@ export var Conversation;
21
21
  UserCanceled: "user_canceled",
22
22
  UserValidationFailed: "user_validation_failed",
23
23
  Assistant: "assistant",
24
+ AssistantSilenceLimitReached: "assistant_silence_limit_reached",
25
+ ConfigurationEndpointTimedOut: "configuration_endpoint_timed_out",
26
+ ConfigurationEndpointError: "configuration_endpoint_error",
27
+ ConfigurationEndpointInvalidResponse: "configuration_endpoint_invalid_response",
24
28
  Error: "error",
25
29
  };
26
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
30
+ /** 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. */
27
31
  Conversation.MultilingualMode = {
28
32
  Auto: "auto",
29
33
  Request: "request",
34
+ Initial: "initial",
30
35
  };
31
36
  })(Conversation || (Conversation = {}));
@@ -22,6 +22,8 @@ export interface CreateAgentRequest {
22
22
  background_noise?: (CreateAgentRequest.BackgroundNoise | null) | undefined;
23
23
  /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
24
24
  generate_welcome_message?: boolean | undefined;
25
+ /** When `false`, the welcome message will not be interruptible by the user. */
26
+ is_welcome_message_interruptible?: boolean | undefined;
25
27
  /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
26
28
  welcome_message?: string | undefined;
27
29
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
@@ -46,7 +48,7 @@ export interface CreateAgentRequest {
46
48
  additional_languages?: Phonic.LanguageCode[] | undefined;
47
49
  /** 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. */
48
50
  languages?: Phonic.LanguageCode[] | undefined;
49
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
51
+ /** 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. */
50
52
  multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
51
53
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
52
54
  push_to_talk?: boolean | undefined;
@@ -70,6 +72,8 @@ export interface CreateAgentRequest {
70
72
  vad_min_silence_duration_ms?: number | undefined;
71
73
  /** Voice activity detection threshold. */
72
74
  vad_threshold?: number | undefined;
75
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
76
+ enable_redaction?: boolean | undefined;
73
77
  }
74
78
  export declare namespace CreateAgentRequest {
75
79
  const PhoneNumber: {
@@ -105,10 +109,11 @@ export declare namespace CreateAgentRequest {
105
109
  * Custom tool */
106
110
  | string;
107
111
  }
108
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
112
+ /** 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. */
109
113
  const MultilingualMode: {
110
114
  readonly Auto: "auto";
111
115
  readonly Request: "request";
116
+ readonly Initial: "initial";
112
117
  };
113
118
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
114
119
  type PronunciationDictionary = PronunciationDictionary.Item[];
@@ -18,9 +18,10 @@ export var CreateAgentRequest;
18
18
  CallCenter: "call-center",
19
19
  CoffeeShop: "coffee-shop",
20
20
  };
21
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
21
+ /** 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. */
22
22
  CreateAgentRequest.MultilingualMode = {
23
23
  Auto: "auto",
24
24
  Request: "request",
25
+ Initial: "initial",
25
26
  };
26
27
  })(CreateAgentRequest || (CreateAgentRequest = {}));
@@ -1,23 +1,56 @@
1
1
  /** ISO 639-1 language codes supported by the agent */
2
2
  export declare const LanguageCode: {
3
3
  readonly Ar: "ar";
4
- readonly Zh: "zh";
4
+ readonly Az: "az";
5
+ readonly Bg: "bg";
6
+ readonly Bn: "bn";
5
7
  readonly Cs: "cs";
6
8
  readonly Da: "da";
7
- readonly Nl: "nl";
9
+ readonly De: "de";
10
+ readonly El: "el";
8
11
  readonly En: "en";
12
+ readonly Es: "es";
13
+ readonly Fa: "fa";
14
+ readonly Fi: "fi";
15
+ readonly Fil: "fil";
9
16
  readonly Fr: "fr";
10
- readonly De: "de";
17
+ readonly Gu: "gu";
18
+ readonly He: "he";
19
+ readonly Hi: "hi";
20
+ readonly Hu: "hu";
11
21
  readonly Id: "id";
12
22
  readonly It: "it";
13
23
  readonly Ja: "ja";
24
+ readonly Ka: "ka";
25
+ readonly Km: "km";
26
+ readonly Kn: "kn";
14
27
  readonly Ko: "ko";
28
+ readonly Lt: "lt";
29
+ readonly Lv: "lv";
30
+ readonly Ml: "ml";
31
+ readonly Mr: "mr";
32
+ readonly Ms: "ms";
33
+ readonly Ne: "ne";
34
+ readonly Nl: "nl";
35
+ readonly No: "no";
36
+ readonly Pa: "pa";
15
37
  readonly Pl: "pl";
16
38
  readonly Pt: "pt";
39
+ readonly Ro: "ro";
17
40
  readonly Ru: "ru";
18
- readonly Es: "es";
41
+ readonly Si: "si";
42
+ readonly Sk: "sk";
43
+ readonly Sq: "sq";
19
44
  readonly Sv: "sv";
45
+ readonly Sw: "sw";
46
+ readonly Ta: "ta";
47
+ readonly Te: "te";
48
+ readonly Th: "th";
20
49
  readonly Tr: "tr";
50
+ readonly Uk: "uk";
51
+ readonly Ur: "ur";
21
52
  readonly Vi: "vi";
53
+ readonly Yue: "yue";
54
+ readonly Zh: "zh";
22
55
  };
23
56
  export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
@@ -2,22 +2,55 @@
2
2
  /** ISO 639-1 language codes supported by the agent */
3
3
  export const LanguageCode = {
4
4
  Ar: "ar",
5
- Zh: "zh",
5
+ Az: "az",
6
+ Bg: "bg",
7
+ Bn: "bn",
6
8
  Cs: "cs",
7
9
  Da: "da",
8
- Nl: "nl",
10
+ De: "de",
11
+ El: "el",
9
12
  En: "en",
13
+ Es: "es",
14
+ Fa: "fa",
15
+ Fi: "fi",
16
+ Fil: "fil",
10
17
  Fr: "fr",
11
- De: "de",
18
+ Gu: "gu",
19
+ He: "he",
20
+ Hi: "hi",
21
+ Hu: "hu",
12
22
  Id: "id",
13
23
  It: "it",
14
24
  Ja: "ja",
25
+ Ka: "ka",
26
+ Km: "km",
27
+ Kn: "kn",
15
28
  Ko: "ko",
29
+ Lt: "lt",
30
+ Lv: "lv",
31
+ Ml: "ml",
32
+ Mr: "mr",
33
+ Ms: "ms",
34
+ Ne: "ne",
35
+ Nl: "nl",
36
+ No: "no",
37
+ Pa: "pa",
16
38
  Pl: "pl",
17
39
  Pt: "pt",
40
+ Ro: "ro",
18
41
  Ru: "ru",
19
- Es: "es",
42
+ Si: "si",
43
+ Sk: "sk",
44
+ Sq: "sq",
20
45
  Sv: "sv",
46
+ Sw: "sw",
47
+ Ta: "ta",
48
+ Te: "te",
49
+ Th: "th",
21
50
  Tr: "tr",
51
+ Uk: "uk",
52
+ Ur: "ur",
22
53
  Vi: "vi",
54
+ Yue: "yue",
55
+ Zh: "zh",
23
56
  };
@@ -7,7 +7,11 @@ export interface OutboundCallConfig {
7
7
  agent?: string | undefined;
8
8
  /** The name of the project to use for the call. */
9
9
  project?: string | undefined;
10
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
10
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
11
+ generate_welcome_message?: boolean | undefined;
12
+ /** When `false`, the welcome message will not be interruptible by the user. */
13
+ is_welcome_message_interruptible?: boolean | undefined;
14
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
11
15
  welcome_message?: (string | null) | undefined;
12
16
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
13
17
  system_prompt?: string | undefined;
@@ -29,7 +33,7 @@ export interface OutboundCallConfig {
29
33
  additional_languages?: Phonic.LanguageCode[] | undefined;
30
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. */
31
35
  languages?: Phonic.LanguageCode[] | undefined;
32
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
36
+ /** 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. */
33
37
  multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
34
38
  /** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
35
39
  push_to_talk?: boolean | undefined;
@@ -41,12 +45,15 @@ export interface OutboundCallConfig {
41
45
  min_words_to_interrupt?: number | undefined;
42
46
  /** Array of built-in or custom tool names to use. */
43
47
  tools?: OutboundCallConfig.Tools.Item[] | undefined;
48
+ /** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
49
+ enable_redaction?: boolean | undefined;
44
50
  }
45
51
  export declare namespace OutboundCallConfig {
46
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
52
+ /** 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. */
47
53
  const MultilingualMode: {
48
54
  readonly Auto: "auto";
49
55
  readonly Request: "request";
56
+ readonly Initial: "initial";
50
57
  };
51
58
  type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
52
59
  type PronunciationDictionary = PronunciationDictionary.Item[];
@@ -1,9 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export var OutboundCallConfig;
3
3
  (function (OutboundCallConfig) {
4
- /** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
4
+ /** 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. */
5
5
  OutboundCallConfig.MultilingualMode = {
6
6
  Auto: "auto",
7
7
  Request: "request",
8
+ Initial: "initial",
8
9
  };
9
10
  })(OutboundCallConfig || (OutboundCallConfig = {}));
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.31.17";
1
+ export declare const SDK_VERSION = "0.32.2";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.31.17";
1
+ export const SDK_VERSION = "0.32.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.0",
3
+ "version": "0.32.2",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -99,6 +99,7 @@ await client.agents.create({
99
99
  audio_speed: 1,
100
100
  background_noise_level: 0,
101
101
  generate_welcome_message: false,
102
+ is_welcome_message_interruptible: true,
102
103
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
103
104
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
104
105
  template_variables: {
@@ -202,6 +203,7 @@ await client.agents.upsert({
202
203
  audio_speed: 1,
203
204
  background_noise_level: 0,
204
205
  generate_welcome_message: false,
206
+ is_welcome_message_interruptible: true,
205
207
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
206
208
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
207
209
  template_variables: {
@@ -451,6 +453,7 @@ await client.agents.update("nameOrId", {
451
453
  audio_speed: 1,
452
454
  background_noise_level: 0,
453
455
  generate_welcome_message: false,
456
+ is_welcome_message_interruptible: true,
454
457
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
455
458
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
456
459
  template_variables: {