phonic 0.30.9 → 0.30.10

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 (41) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -3
  4. package/dist/cjs/api/resources/agents/client/Client.js +3 -3
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -2
  6. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -2
  7. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -1
  8. package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
  9. package/dist/cjs/api/resources/conversations/client/Client.js +1 -1
  10. package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -1
  11. package/dist/cjs/api/types/Agent.d.ts +1 -1
  12. package/dist/cjs/api/types/Conversation.d.ts +12 -2
  13. package/dist/cjs/api/types/CreateAgentRequest.d.ts +1 -1
  14. package/dist/cjs/api/types/LanguageCode.d.ts +28 -0
  15. package/dist/cjs/api/types/LanguageCode.js +27 -0
  16. package/dist/cjs/api/types/OutboundCallConfig.d.ts +2 -1
  17. package/dist/cjs/api/types/index.d.ts +1 -0
  18. package/dist/cjs/api/types/index.js +1 -0
  19. package/dist/cjs/version.d.ts +1 -1
  20. package/dist/cjs/version.js +1 -1
  21. package/dist/esm/Client.mjs +2 -2
  22. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -3
  23. package/dist/esm/api/resources/agents/client/Client.mjs +3 -3
  24. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +2 -2
  25. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -2
  26. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -1
  27. package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
  28. package/dist/esm/api/resources/conversations/client/Client.mjs +1 -1
  29. package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -1
  30. package/dist/esm/api/types/Agent.d.mts +1 -1
  31. package/dist/esm/api/types/Conversation.d.mts +12 -2
  32. package/dist/esm/api/types/CreateAgentRequest.d.mts +1 -1
  33. package/dist/esm/api/types/LanguageCode.d.mts +28 -0
  34. package/dist/esm/api/types/LanguageCode.mjs +24 -0
  35. package/dist/esm/api/types/OutboundCallConfig.d.mts +2 -1
  36. package/dist/esm/api/types/index.d.mts +1 -0
  37. package/dist/esm/api/types/index.mjs +1 -0
  38. package/dist/esm/version.d.mts +1 -1
  39. package/dist/esm/version.mjs +1 -1
  40. package/package.json +1 -1
  41. package/reference.md +4 -4
package/README.md CHANGED
@@ -44,7 +44,7 @@ await client.agents.create({
44
44
  tools: ["keypad_input"],
45
45
  no_input_poke_sec: 30,
46
46
  no_input_poke_text: "Are you still there?",
47
- recognized_languages: ["en", "es"],
47
+ languages: ["en", "es"],
48
48
  boosted_keywords: ["Load ID", "dispatch"],
49
49
  configuration_endpoint: {
50
50
  url: "https://api.example.com/config",
@@ -50,8 +50,8 @@ class PhonicClient {
50
50
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
51
51
  "X-Fern-Language": "JavaScript",
52
52
  "X-Fern-SDK-Name": "phonic",
53
- "X-Fern-SDK-Version": "0.30.9",
54
- "User-Agent": "phonic/0.30.9",
53
+ "X-Fern-SDK-Version": "0.30.10",
54
+ "User-Agent": "phonic/0.30.10",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -77,7 +77,7 @@ export declare class Agents {
77
77
  * tools: ["keypad_input"],
78
78
  * no_input_poke_sec: 30,
79
79
  * no_input_poke_text: "Are you still there?",
80
- * recognized_languages: ["en", "es"],
80
+ * languages: ["en", "es"],
81
81
  * boosted_keywords: ["Load ID", "dispatch"],
82
82
  * configuration_endpoint: {
83
83
  * url: "https://api.example.com/config",
@@ -121,7 +121,7 @@ export declare class Agents {
121
121
  * tools: ["keypad_input"],
122
122
  * no_input_poke_sec: 30,
123
123
  * no_input_poke_text: "Are you still there?",
124
- * recognized_languages: ["en", "es"],
124
+ * languages: ["en", "es"],
125
125
  * boosted_keywords: ["Load ID", "dispatch"],
126
126
  * configuration_endpoint: {
127
127
  * url: "https://api.example.com/config",
@@ -201,7 +201,7 @@ export declare class Agents {
201
201
  * tools: ["keypad_input"],
202
202
  * no_input_poke_sec: 30,
203
203
  * no_input_poke_text: "Are you still there?",
204
- * recognized_languages: ["en", "es"],
204
+ * languages: ["en", "es"],
205
205
  * boosted_keywords: ["Load ID", "dispatch"],
206
206
  * configuration_endpoint: {
207
207
  * url: "https://api.example.com/config",
@@ -167,7 +167,7 @@ class Agents {
167
167
  * tools: ["keypad_input"],
168
168
  * no_input_poke_sec: 30,
169
169
  * no_input_poke_text: "Are you still there?",
170
- * recognized_languages: ["en", "es"],
170
+ * languages: ["en", "es"],
171
171
  * boosted_keywords: ["Load ID", "dispatch"],
172
172
  * configuration_endpoint: {
173
173
  * url: "https://api.example.com/config",
@@ -272,7 +272,7 @@ class Agents {
272
272
  * tools: ["keypad_input"],
273
273
  * no_input_poke_sec: 30,
274
274
  * no_input_poke_text: "Are you still there?",
275
- * recognized_languages: ["en", "es"],
275
+ * languages: ["en", "es"],
276
276
  * boosted_keywords: ["Load ID", "dispatch"],
277
277
  * configuration_endpoint: {
278
278
  * url: "https://api.example.com/config",
@@ -517,7 +517,7 @@ class Agents {
517
517
  * tools: ["keypad_input"],
518
518
  * no_input_poke_sec: 30,
519
519
  * no_input_poke_text: "Are you still there?",
520
- * recognized_languages: ["en", "es"],
520
+ * languages: ["en", "es"],
521
521
  * boosted_keywords: ["Load ID", "dispatch"],
522
522
  * configuration_endpoint: {
523
523
  * url: "https://api.example.com/config",
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.js";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -69,7 +69,7 @@ export interface AgentsCreateRequest {
69
69
  /** Seconds of silence before ending the conversation. */
70
70
  no_input_end_conversation_sec?: number;
71
71
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
72
- recognized_languages?: string[];
72
+ languages?: Phonic.LanguageCode[];
73
73
  /** These words, or short phrases, will be more accurately recognized by the agent. */
74
74
  boosted_keywords?: string[];
75
75
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.js";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -69,7 +69,7 @@ export interface UpdateAgentRequest {
69
69
  /** Seconds of silence before ending the conversation. */
70
70
  no_input_end_conversation_sec?: number;
71
71
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
72
- recognized_languages?: string[];
72
+ languages?: Phonic.LanguageCode[];
73
73
  /** These words, or short phrases, will be more accurately recognized by the agent. */
74
74
  boosted_keywords?: string[];
75
75
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.js";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -205,7 +205,7 @@ export declare class Conversations {
205
205
  * no_input_poke_sec: 30,
206
206
  * no_input_poke_text: "Are you still there?",
207
207
  * no_input_end_conversation_sec: 180,
208
- * recognized_languages: ["en", "es"],
208
+ * languages: ["en", "es"],
209
209
  * boosted_keywords: ["Load ID", "dispatch"],
210
210
  * tools: ["keypad_input"]
211
211
  * }
@@ -713,7 +713,7 @@ class Conversations {
713
713
  * no_input_poke_sec: 30,
714
714
  * no_input_poke_text: "Are you still there?",
715
715
  * no_input_end_conversation_sec: 180,
716
- * recognized_languages: ["en", "es"],
716
+ * languages: ["en", "es"],
717
717
  * boosted_keywords: ["Load ID", "dispatch"],
718
718
  * tools: ["keypad_input"]
719
719
  * }
@@ -18,7 +18,7 @@ import * as Phonic from "../../../../index.js";
18
18
  * no_input_poke_sec: 30,
19
19
  * no_input_poke_text: "Are you still there?",
20
20
  * no_input_end_conversation_sec: 180,
21
- * recognized_languages: ["en", "es"],
21
+ * languages: ["en", "es"],
22
22
  * boosted_keywords: ["Load ID", "dispatch"],
23
23
  * tools: ["keypad_input"]
24
24
  * }
@@ -38,7 +38,7 @@ export interface Agent {
38
38
  /** Seconds of silence before ending the conversation. */
39
39
  no_input_end_conversation_sec: number;
40
40
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
41
- recognized_languages: string[];
41
+ languages: Phonic.LanguageCode[];
42
42
  /** These words, or short phrases, will be more accurately recognized by the agent. */
43
43
  boosted_keywords: string[];
44
44
  /** When not `null`, the agent will call this endpoint to get configuration options. */
@@ -39,10 +39,20 @@ export interface Conversation {
39
39
  ended_at: string | null;
40
40
  /** Who or what ended the conversation. */
41
41
  ended_by: Conversation.EndedBy | null;
42
- /** Array of conversation items (turns). */
43
- items: Phonic.ConversationItem[];
42
+ /** These words, or short phrases, are more accurately recognized by the model. */
43
+ boosted_keywords: string[] | null;
44
+ /** Array of ISO 639-1 language codes recognized by the model. */
45
+ languages: string[] | null;
46
+ /** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
47
+ no_input_poke_sec: number | null;
48
+ /** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. */
49
+ no_input_poke_text: string | null;
50
+ /** Seconds of silence before the conversation is ended. */
51
+ no_input_end_conversation_sec: number | null;
44
52
  /** Results from conversation evaluations and extractions. */
45
53
  task_results: Record<string, unknown>;
54
+ /** Array of conversation items (turns). */
55
+ items: Phonic.ConversationItem[];
46
56
  }
47
57
  export declare namespace Conversation {
48
58
  /**
@@ -33,7 +33,7 @@ export interface CreateAgentRequest {
33
33
  /** Seconds of silence before ending the conversation. */
34
34
  no_input_end_conversation_sec?: number;
35
35
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
36
- recognized_languages?: string[];
36
+ languages?: Phonic.LanguageCode[];
37
37
  /** These words, or short phrases, will be more accurately recognized by the agent. */
38
38
  boosted_keywords?: string[];
39
39
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ISO 639-1 language codes supported by the agent
6
+ */
7
+ export type LanguageCode = "ar" | "zh" | "cs" | "da" | "nl" | "en" | "fr" | "de" | "id" | "it" | "ja" | "ko" | "pl" | "pt" | "ru" | "es" | "sv" | "tr" | "vi";
8
+ export declare const LanguageCode: {
9
+ readonly Ar: "ar";
10
+ readonly Zh: "zh";
11
+ readonly Cs: "cs";
12
+ readonly Da: "da";
13
+ readonly Nl: "nl";
14
+ readonly En: "en";
15
+ readonly Fr: "fr";
16
+ readonly De: "de";
17
+ readonly Id: "id";
18
+ readonly It: "it";
19
+ readonly Ja: "ja";
20
+ readonly Ko: "ko";
21
+ readonly Pl: "pl";
22
+ readonly Pt: "pt";
23
+ readonly Ru: "ru";
24
+ readonly Es: "es";
25
+ readonly Sv: "sv";
26
+ readonly Tr: "tr";
27
+ readonly Vi: "vi";
28
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LanguageCode = void 0;
7
+ exports.LanguageCode = {
8
+ Ar: "ar",
9
+ Zh: "zh",
10
+ Cs: "cs",
11
+ Da: "da",
12
+ Nl: "nl",
13
+ En: "en",
14
+ Fr: "fr",
15
+ De: "de",
16
+ Id: "id",
17
+ It: "it",
18
+ Ja: "ja",
19
+ Ko: "ko",
20
+ Pl: "pl",
21
+ Pt: "pt",
22
+ Ru: "ru",
23
+ Es: "es",
24
+ Sv: "sv",
25
+ Tr: "tr",
26
+ Vi: "vi",
27
+ };
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Phonic from "../index.js";
4
5
  /**
5
6
  * When an `agent` is provided, these `config` options override the agent settings.
6
7
  */
@@ -24,7 +25,7 @@ export interface OutboundCallConfig {
24
25
  /** Seconds of silence before ending the conversation. */
25
26
  no_input_end_conversation_sec?: number;
26
27
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
27
- recognized_languages?: string[];
28
+ languages?: Phonic.LanguageCode[];
28
29
  /** These words, or short phrases, will be more accurately recognized by the agent. */
29
30
  boosted_keywords?: string[];
30
31
  /** Array of built-in or custom tool names to use. */
@@ -2,6 +2,7 @@ export * from "./BadRequestErrorBody.js";
2
2
  export * from "./Error_.js";
3
3
  export * from "./BasicError.js";
4
4
  export * from "./ValidationError.js";
5
+ export * from "./LanguageCode.js";
5
6
  export * from "./Agent.js";
6
7
  export * from "./CreateAgentRequest.js";
7
8
  export * from "./Tool.js";
@@ -18,6 +18,7 @@ __exportStar(require("./BadRequestErrorBody.js"), exports);
18
18
  __exportStar(require("./Error_.js"), exports);
19
19
  __exportStar(require("./BasicError.js"), exports);
20
20
  __exportStar(require("./ValidationError.js"), exports);
21
+ __exportStar(require("./LanguageCode.js"), exports);
21
22
  __exportStar(require("./Agent.js"), exports);
22
23
  __exportStar(require("./CreateAgentRequest.js"), exports);
23
24
  __exportStar(require("./Tool.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.9";
1
+ export declare const SDK_VERSION = "0.30.10";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.30.9";
4
+ exports.SDK_VERSION = "0.30.10";
@@ -14,8 +14,8 @@ export class PhonicClient {
14
14
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
15
15
  "X-Fern-Language": "JavaScript",
16
16
  "X-Fern-SDK-Name": "phonic",
17
- "X-Fern-SDK-Version": "0.30.9",
18
- "User-Agent": "phonic/0.30.9",
17
+ "X-Fern-SDK-Version": "0.30.10",
18
+ "User-Agent": "phonic/0.30.10",
19
19
  "X-Fern-Runtime": core.RUNTIME.type,
20
20
  "X-Fern-Runtime-Version": core.RUNTIME.version,
21
21
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -77,7 +77,7 @@ export declare class Agents {
77
77
  * tools: ["keypad_input"],
78
78
  * no_input_poke_sec: 30,
79
79
  * no_input_poke_text: "Are you still there?",
80
- * recognized_languages: ["en", "es"],
80
+ * languages: ["en", "es"],
81
81
  * boosted_keywords: ["Load ID", "dispatch"],
82
82
  * configuration_endpoint: {
83
83
  * url: "https://api.example.com/config",
@@ -121,7 +121,7 @@ export declare class Agents {
121
121
  * tools: ["keypad_input"],
122
122
  * no_input_poke_sec: 30,
123
123
  * no_input_poke_text: "Are you still there?",
124
- * recognized_languages: ["en", "es"],
124
+ * languages: ["en", "es"],
125
125
  * boosted_keywords: ["Load ID", "dispatch"],
126
126
  * configuration_endpoint: {
127
127
  * url: "https://api.example.com/config",
@@ -201,7 +201,7 @@ export declare class Agents {
201
201
  * tools: ["keypad_input"],
202
202
  * no_input_poke_sec: 30,
203
203
  * no_input_poke_text: "Are you still there?",
204
- * recognized_languages: ["en", "es"],
204
+ * languages: ["en", "es"],
205
205
  * boosted_keywords: ["Load ID", "dispatch"],
206
206
  * configuration_endpoint: {
207
207
  * url: "https://api.example.com/config",
@@ -131,7 +131,7 @@ export class Agents {
131
131
  * tools: ["keypad_input"],
132
132
  * no_input_poke_sec: 30,
133
133
  * no_input_poke_text: "Are you still there?",
134
- * recognized_languages: ["en", "es"],
134
+ * languages: ["en", "es"],
135
135
  * boosted_keywords: ["Load ID", "dispatch"],
136
136
  * configuration_endpoint: {
137
137
  * url: "https://api.example.com/config",
@@ -236,7 +236,7 @@ export class Agents {
236
236
  * tools: ["keypad_input"],
237
237
  * no_input_poke_sec: 30,
238
238
  * no_input_poke_text: "Are you still there?",
239
- * recognized_languages: ["en", "es"],
239
+ * languages: ["en", "es"],
240
240
  * boosted_keywords: ["Load ID", "dispatch"],
241
241
  * configuration_endpoint: {
242
242
  * url: "https://api.example.com/config",
@@ -481,7 +481,7 @@ export class Agents {
481
481
  * tools: ["keypad_input"],
482
482
  * no_input_poke_sec: 30,
483
483
  * no_input_poke_text: "Are you still there?",
484
- * recognized_languages: ["en", "es"],
484
+ * languages: ["en", "es"],
485
485
  * boosted_keywords: ["Load ID", "dispatch"],
486
486
  * configuration_endpoint: {
487
487
  * url: "https://api.example.com/config",
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.mjs";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -69,7 +69,7 @@ export interface AgentsCreateRequest {
69
69
  /** Seconds of silence before ending the conversation. */
70
70
  no_input_end_conversation_sec?: number;
71
71
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
72
- recognized_languages?: string[];
72
+ languages?: Phonic.LanguageCode[];
73
73
  /** These words, or short phrases, will be more accurately recognized by the agent. */
74
74
  boosted_keywords?: string[];
75
75
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.mjs";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -69,7 +69,7 @@ export interface UpdateAgentRequest {
69
69
  /** Seconds of silence before ending the conversation. */
70
70
  no_input_end_conversation_sec?: number;
71
71
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
72
- recognized_languages?: string[];
72
+ languages?: Phonic.LanguageCode[];
73
73
  /** These words, or short phrases, will be more accurately recognized by the agent. */
74
74
  boosted_keywords?: string[];
75
75
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -25,7 +25,7 @@ import * as Phonic from "../../../../index.mjs";
25
25
  * tools: ["keypad_input"],
26
26
  * no_input_poke_sec: 30,
27
27
  * no_input_poke_text: "Are you still there?",
28
- * recognized_languages: ["en", "es"],
28
+ * languages: ["en", "es"],
29
29
  * boosted_keywords: ["Load ID", "dispatch"],
30
30
  * configuration_endpoint: {
31
31
  * url: "https://api.example.com/config",
@@ -205,7 +205,7 @@ export declare class Conversations {
205
205
  * no_input_poke_sec: 30,
206
206
  * no_input_poke_text: "Are you still there?",
207
207
  * no_input_end_conversation_sec: 180,
208
- * recognized_languages: ["en", "es"],
208
+ * languages: ["en", "es"],
209
209
  * boosted_keywords: ["Load ID", "dispatch"],
210
210
  * tools: ["keypad_input"]
211
211
  * }
@@ -677,7 +677,7 @@ export class Conversations {
677
677
  * no_input_poke_sec: 30,
678
678
  * no_input_poke_text: "Are you still there?",
679
679
  * no_input_end_conversation_sec: 180,
680
- * recognized_languages: ["en", "es"],
680
+ * languages: ["en", "es"],
681
681
  * boosted_keywords: ["Load ID", "dispatch"],
682
682
  * tools: ["keypad_input"]
683
683
  * }
@@ -18,7 +18,7 @@ import * as Phonic from "../../../../index.mjs";
18
18
  * no_input_poke_sec: 30,
19
19
  * no_input_poke_text: "Are you still there?",
20
20
  * no_input_end_conversation_sec: 180,
21
- * recognized_languages: ["en", "es"],
21
+ * languages: ["en", "es"],
22
22
  * boosted_keywords: ["Load ID", "dispatch"],
23
23
  * tools: ["keypad_input"]
24
24
  * }
@@ -38,7 +38,7 @@ export interface Agent {
38
38
  /** Seconds of silence before ending the conversation. */
39
39
  no_input_end_conversation_sec: number;
40
40
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
41
- recognized_languages: string[];
41
+ languages: Phonic.LanguageCode[];
42
42
  /** These words, or short phrases, will be more accurately recognized by the agent. */
43
43
  boosted_keywords: string[];
44
44
  /** When not `null`, the agent will call this endpoint to get configuration options. */
@@ -39,10 +39,20 @@ export interface Conversation {
39
39
  ended_at: string | null;
40
40
  /** Who or what ended the conversation. */
41
41
  ended_by: Conversation.EndedBy | null;
42
- /** Array of conversation items (turns). */
43
- items: Phonic.ConversationItem[];
42
+ /** These words, or short phrases, are more accurately recognized by the model. */
43
+ boosted_keywords: string[] | null;
44
+ /** Array of ISO 639-1 language codes recognized by the model. */
45
+ languages: string[] | null;
46
+ /** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */
47
+ no_input_poke_sec: number | null;
48
+ /** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. */
49
+ no_input_poke_text: string | null;
50
+ /** Seconds of silence before the conversation is ended. */
51
+ no_input_end_conversation_sec: number | null;
44
52
  /** Results from conversation evaluations and extractions. */
45
53
  task_results: Record<string, unknown>;
54
+ /** Array of conversation items (turns). */
55
+ items: Phonic.ConversationItem[];
46
56
  }
47
57
  export declare namespace Conversation {
48
58
  /**
@@ -33,7 +33,7 @@ export interface CreateAgentRequest {
33
33
  /** Seconds of silence before ending the conversation. */
34
34
  no_input_end_conversation_sec?: number;
35
35
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
36
- recognized_languages?: string[];
36
+ languages?: Phonic.LanguageCode[];
37
37
  /** These words, or short phrases, will be more accurately recognized by the agent. */
38
38
  boosted_keywords?: string[];
39
39
  /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ISO 639-1 language codes supported by the agent
6
+ */
7
+ export type LanguageCode = "ar" | "zh" | "cs" | "da" | "nl" | "en" | "fr" | "de" | "id" | "it" | "ja" | "ko" | "pl" | "pt" | "ru" | "es" | "sv" | "tr" | "vi";
8
+ export declare const LanguageCode: {
9
+ readonly Ar: "ar";
10
+ readonly Zh: "zh";
11
+ readonly Cs: "cs";
12
+ readonly Da: "da";
13
+ readonly Nl: "nl";
14
+ readonly En: "en";
15
+ readonly Fr: "fr";
16
+ readonly De: "de";
17
+ readonly Id: "id";
18
+ readonly It: "it";
19
+ readonly Ja: "ja";
20
+ readonly Ko: "ko";
21
+ readonly Pl: "pl";
22
+ readonly Pt: "pt";
23
+ readonly Ru: "ru";
24
+ readonly Es: "es";
25
+ readonly Sv: "sv";
26
+ readonly Tr: "tr";
27
+ readonly Vi: "vi";
28
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const LanguageCode = {
5
+ Ar: "ar",
6
+ Zh: "zh",
7
+ Cs: "cs",
8
+ Da: "da",
9
+ Nl: "nl",
10
+ En: "en",
11
+ Fr: "fr",
12
+ De: "de",
13
+ Id: "id",
14
+ It: "it",
15
+ Ja: "ja",
16
+ Ko: "ko",
17
+ Pl: "pl",
18
+ Pt: "pt",
19
+ Ru: "ru",
20
+ Es: "es",
21
+ Sv: "sv",
22
+ Tr: "tr",
23
+ Vi: "vi",
24
+ };
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Phonic from "../index.mjs";
4
5
  /**
5
6
  * When an `agent` is provided, these `config` options override the agent settings.
6
7
  */
@@ -24,7 +25,7 @@ export interface OutboundCallConfig {
24
25
  /** Seconds of silence before ending the conversation. */
25
26
  no_input_end_conversation_sec?: number;
26
27
  /** Array of ISO 639-1 language codes that the agent should be able to recognize */
27
- recognized_languages?: string[];
28
+ languages?: Phonic.LanguageCode[];
28
29
  /** These words, or short phrases, will be more accurately recognized by the agent. */
29
30
  boosted_keywords?: string[];
30
31
  /** Array of built-in or custom tool names to use. */
@@ -2,6 +2,7 @@ export * from "./BadRequestErrorBody.mjs";
2
2
  export * from "./Error_.mjs";
3
3
  export * from "./BasicError.mjs";
4
4
  export * from "./ValidationError.mjs";
5
+ export * from "./LanguageCode.mjs";
5
6
  export * from "./Agent.mjs";
6
7
  export * from "./CreateAgentRequest.mjs";
7
8
  export * from "./Tool.mjs";
@@ -2,6 +2,7 @@ export * from "./BadRequestErrorBody.mjs";
2
2
  export * from "./Error_.mjs";
3
3
  export * from "./BasicError.mjs";
4
4
  export * from "./ValidationError.mjs";
5
+ export * from "./LanguageCode.mjs";
5
6
  export * from "./Agent.mjs";
6
7
  export * from "./CreateAgentRequest.mjs";
7
8
  export * from "./Tool.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.9";
1
+ export declare const SDK_VERSION = "0.30.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.30.9";
1
+ export const SDK_VERSION = "0.30.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.30.9",
3
+ "version": "0.30.10",
4
4
  "private": false,
5
5
  "repository": "github:Phonic-Co/phonic-node",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -114,7 +114,7 @@ await client.agents.create({
114
114
  tools: ["keypad_input"],
115
115
  no_input_poke_sec: 30,
116
116
  no_input_poke_text: "Are you still there?",
117
- recognized_languages: ["en", "es"],
117
+ languages: ["en", "es"],
118
118
  boosted_keywords: ["Load ID", "dispatch"],
119
119
  configuration_endpoint: {
120
120
  url: "https://api.example.com/config",
@@ -207,7 +207,7 @@ await client.agents.upsert({
207
207
  tools: ["keypad_input"],
208
208
  no_input_poke_sec: 30,
209
209
  no_input_poke_text: "Are you still there?",
210
- recognized_languages: ["en", "es"],
210
+ languages: ["en", "es"],
211
211
  boosted_keywords: ["Load ID", "dispatch"],
212
212
  configuration_endpoint: {
213
213
  url: "https://api.example.com/config",
@@ -446,7 +446,7 @@ await client.agents.update("nameOrId", {
446
446
  tools: ["keypad_input"],
447
447
  no_input_poke_sec: 30,
448
448
  no_input_poke_text: "Are you still there?",
449
- recognized_languages: ["en", "es"],
449
+ languages: ["en", "es"],
450
450
  boosted_keywords: ["Load ID", "dispatch"],
451
451
  configuration_endpoint: {
452
452
  url: "https://api.example.com/config",
@@ -1961,7 +1961,7 @@ await client.conversations.outboundCall({
1961
1961
  no_input_poke_sec: 30,
1962
1962
  no_input_poke_text: "Are you still there?",
1963
1963
  no_input_end_conversation_sec: 180,
1964
- recognized_languages: ["en", "es"],
1964
+ languages: ["en", "es"],
1965
1965
  boosted_keywords: ["Load ID", "dispatch"],
1966
1966
  tools: ["keypad_input"],
1967
1967
  },