phonic 0.30.33 → 0.30.35

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 (67) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/agents/client/Client.d.ts +47 -12
  3. package/dist/cjs/api/resources/agents/client/Client.js +119 -18
  4. package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.ts +23 -1
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +11 -3
  6. package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.d.ts +16 -0
  7. package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.js +5 -0
  8. package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.ts +38 -0
  9. package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.js +5 -0
  10. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +13 -5
  11. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +2 -2
  12. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +2 -1
  13. package/dist/cjs/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.d.ts +6 -0
  14. package/dist/cjs/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.js +5 -0
  15. package/dist/cjs/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.d.ts +6 -0
  16. package/dist/cjs/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.js +5 -0
  17. package/dist/cjs/api/resources/agents/types/index.d.ts +2 -1
  18. package/dist/cjs/api/resources/agents/types/index.js +2 -1
  19. package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
  20. package/dist/cjs/api/resources/conversations/client/Client.js +1 -1
  21. package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -1
  22. package/dist/cjs/api/types/Agent.d.ts +8 -0
  23. package/dist/cjs/api/types/AssistantFinishedSpeakingPayload.d.ts +6 -0
  24. package/dist/cjs/api/types/AssistantFinishedSpeakingPayload.js +5 -0
  25. package/dist/cjs/api/types/AssistantStartedSpeakingPayload.d.ts +6 -0
  26. package/dist/cjs/api/types/AssistantStartedSpeakingPayload.js +5 -0
  27. package/dist/cjs/api/types/CreateAgentRequest.d.ts +11 -3
  28. package/dist/cjs/api/types/index.d.ts +2 -0
  29. package/dist/cjs/api/types/index.js +2 -0
  30. package/dist/cjs/version.d.ts +1 -1
  31. package/dist/cjs/version.js +1 -1
  32. package/dist/esm/Client.mjs +2 -2
  33. package/dist/esm/api/resources/agents/client/Client.d.mts +47 -12
  34. package/dist/esm/api/resources/agents/client/Client.mjs +119 -18
  35. package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts +23 -1
  36. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +11 -3
  37. package/dist/esm/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.d.mts +16 -0
  38. package/dist/esm/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.mjs +4 -0
  39. package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.mts +38 -0
  40. package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.mjs +4 -0
  41. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +13 -5
  42. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +2 -2
  43. package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -1
  44. package/dist/esm/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.d.mts +6 -0
  45. package/dist/esm/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.mjs +4 -0
  46. package/dist/esm/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.d.mts +6 -0
  47. package/dist/esm/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.mjs +4 -0
  48. package/dist/esm/api/resources/agents/types/index.d.mts +2 -1
  49. package/dist/esm/api/resources/agents/types/index.mjs +2 -1
  50. package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
  51. package/dist/esm/api/resources/conversations/client/Client.mjs +1 -1
  52. package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -1
  53. package/dist/esm/api/types/Agent.d.mts +8 -0
  54. package/dist/esm/api/types/AssistantFinishedSpeakingPayload.d.mts +6 -0
  55. package/dist/esm/api/types/AssistantFinishedSpeakingPayload.mjs +4 -0
  56. package/dist/esm/api/types/AssistantStartedSpeakingPayload.d.mts +6 -0
  57. package/dist/esm/api/types/AssistantStartedSpeakingPayload.mjs +4 -0
  58. package/dist/esm/api/types/CreateAgentRequest.d.mts +11 -3
  59. package/dist/esm/api/types/index.d.mts +2 -0
  60. package/dist/esm/api/types/index.mjs +2 -0
  61. package/dist/esm/version.d.mts +1 -1
  62. package/dist/esm/version.mjs +1 -1
  63. package/dist/index.d.mts +686 -0
  64. package/dist/index.d.ts +686 -0
  65. package/dist/index.js +643 -0
  66. package/dist/index.mjs +606 -0
  67. package/package.json +1 -1
@@ -9,7 +9,7 @@ import * as Phonic from "../../../../index.mjs";
9
9
  * name: "updated-support-agent",
10
10
  * phone_number: "assign-automatically",
11
11
  * timezone: "America/Los_Angeles",
12
- * voice_id: "grant",
12
+ * voice_id: "sabrina",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
15
  * generate_welcome_message: false,
@@ -17,7 +17,7 @@ import * as Phonic from "../../../../index.mjs";
17
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
18
18
  * template_variables: {
19
19
  * "customer_name": {
20
- * default_value: null
20
+ * default_value: "David"
21
21
  * },
22
22
  * "subject": {
23
23
  * default_value: "Chess"
@@ -81,12 +81,20 @@ export interface UpdateAgentRequest {
81
81
  languages?: Phonic.LanguageCode[];
82
82
  /** These words, or short phrases, will be more accurately recognized by the agent. */
83
83
  boosted_keywords?: string[];
84
- /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
84
+ /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
85
85
  configuration_endpoint?: UpdateAgentRequest.ConfigurationEndpoint | null;
86
86
  /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0. */
87
87
  inbound_rollout?: number;
88
88
  /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
89
89
  inbound_rollout_forward_phone_number?: string | null;
90
+ /** Voice activity detection prebuffer duration in milliseconds. */
91
+ vad_prebuffer_duration_ms?: number;
92
+ /** Minimum speech duration for voice activity detection in milliseconds. */
93
+ vad_min_speech_duration_ms?: number;
94
+ /** Minimum silence duration for voice activity detection in milliseconds. */
95
+ vad_min_silence_duration_ms?: number;
96
+ /** Voice activity detection threshold. */
97
+ vad_threshold?: number;
90
98
  }
91
99
  export declare namespace UpdateAgentRequest {
92
100
  type PhoneNumber = "assign-automatically" | "custom";
@@ -115,7 +123,7 @@ export declare namespace UpdateAgentRequest {
115
123
  };
116
124
  namespace TemplateVariables {
117
125
  interface Value {
118
- default_value: string | null;
126
+ default_value: string;
119
127
  is_boosted_keyword?: boolean;
120
128
  }
121
129
  }
@@ -127,7 +135,7 @@ export declare namespace UpdateAgentRequest {
127
135
  | string;
128
136
  }
129
137
  /**
130
- * When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options.
138
+ * When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
131
139
  */
132
140
  interface ConfigurationEndpoint {
133
141
  /** URL to call */
@@ -9,7 +9,7 @@ import * as Phonic from "../../../../index.mjs";
9
9
  * name: "support-agent",
10
10
  * phone_number: "assign-automatically",
11
11
  * timezone: "America/Los_Angeles",
12
- * voice_id: "grant",
12
+ * voice_id: "sabrina",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
15
  * generate_welcome_message: false,
@@ -17,7 +17,7 @@ import * as Phonic from "../../../../index.mjs";
17
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
18
18
  * template_variables: {
19
19
  * "customer_name": {
20
- * default_value: null
20
+ * default_value: "David"
21
21
  * },
22
22
  * "subject": {
23
23
  * default_value: "Chess"
@@ -5,4 +5,5 @@ export { type AgentsGetRequest } from "./AgentsGetRequest.mjs";
5
5
  export { type AgentsDeleteRequest } from "./AgentsDeleteRequest.mjs";
6
6
  export { type UpdateAgentRequest } from "./UpdateAgentRequest.mjs";
7
7
  export { type AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.mjs";
8
- export { type AgentsRemoveCustomPhoneNumberRequest } from "./AgentsRemoveCustomPhoneNumberRequest.mjs";
8
+ export { type AgentsDeleteCustomPhoneNumberRequest } from "./AgentsDeleteCustomPhoneNumberRequest.mjs";
9
+ export { type AgentsUpdatePhoneNumberRequest } from "./AgentsUpdatePhoneNumberRequest.mjs";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsDeleteCustomPhoneNumberResponse {
5
+ success: boolean;
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsUpdatePhoneNumberResponse {
5
+ success: boolean;
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -5,4 +5,5 @@ export * from "./AgentsGetResponse.mjs";
5
5
  export * from "./AgentsDeleteResponse.mjs";
6
6
  export * from "./AgentsUpdateResponse.mjs";
7
7
  export * from "./AgentsAddCustomPhoneNumberResponse.mjs";
8
- export * from "./AgentsRemoveCustomPhoneNumberResponse.mjs";
8
+ export * from "./AgentsDeleteCustomPhoneNumberResponse.mjs";
9
+ export * from "./AgentsUpdatePhoneNumberResponse.mjs";
@@ -5,4 +5,5 @@ export * from "./AgentsGetResponse.mjs";
5
5
  export * from "./AgentsDeleteResponse.mjs";
6
6
  export * from "./AgentsUpdateResponse.mjs";
7
7
  export * from "./AgentsAddCustomPhoneNumberResponse.mjs";
8
- export * from "./AgentsRemoveCustomPhoneNumberResponse.mjs";
8
+ export * from "./AgentsDeleteCustomPhoneNumberResponse.mjs";
9
+ export * from "./AgentsUpdatePhoneNumberResponse.mjs";
@@ -201,7 +201,7 @@ export declare class Conversations {
201
201
  * "customer_name": "David",
202
202
  * "subject": "Chess"
203
203
  * },
204
- * voice_id: "grant",
204
+ * voice_id: "sabrina",
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,
@@ -673,7 +673,7 @@ export class Conversations {
673
673
  * "customer_name": "David",
674
674
  * "subject": "Chess"
675
675
  * },
676
- * voice_id: "grant",
676
+ * voice_id: "sabrina",
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,
@@ -14,7 +14,7 @@ import * as Phonic from "../../../../index.mjs";
14
14
  * "customer_name": "David",
15
15
  * "subject": "Chess"
16
16
  * },
17
- * voice_id: "grant",
17
+ * voice_id: "sabrina",
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,
@@ -53,6 +53,14 @@ export interface Agent {
53
53
  inbound_rollout?: number;
54
54
  /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. */
55
55
  inbound_rollout_forward_phone_number?: string | null;
56
+ /** Voice activity detection prebuffer duration in milliseconds. */
57
+ vad_prebuffer_duration_ms?: number;
58
+ /** Minimum speech duration for voice activity detection in milliseconds. */
59
+ vad_min_speech_duration_ms?: number;
60
+ /** Minimum silence duration for voice activity detection in milliseconds. */
61
+ vad_min_silence_duration_ms?: number;
62
+ /** Voice activity detection threshold. */
63
+ vad_threshold?: number;
56
64
  }
57
65
  export declare namespace Agent {
58
66
  /**
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AssistantFinishedSpeakingPayload {
5
+ type: "assistant_finished_speaking";
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AssistantStartedSpeakingPayload {
5
+ type: "assistant_started_speaking";
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -44,12 +44,20 @@ export interface CreateAgentRequest {
44
44
  languages?: Phonic.LanguageCode[];
45
45
  /** These words, or short phrases, will be more accurately recognized by the agent. */
46
46
  boosted_keywords?: string[];
47
- /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options. */
47
+ /** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
48
48
  configuration_endpoint?: CreateAgentRequest.ConfigurationEndpoint | null;
49
49
  /** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
50
50
  inbound_rollout?: number;
51
51
  /** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
52
52
  inbound_rollout_forward_phone_number?: string | null;
53
+ /** Voice activity detection prebuffer duration in milliseconds. */
54
+ vad_prebuffer_duration_ms?: number;
55
+ /** Minimum speech duration for voice activity detection in milliseconds. */
56
+ vad_min_speech_duration_ms?: number;
57
+ /** Minimum silence duration for voice activity detection in milliseconds. */
58
+ vad_min_silence_duration_ms?: number;
59
+ /** Voice activity detection threshold. */
60
+ vad_threshold?: number;
53
61
  }
54
62
  export declare namespace CreateAgentRequest {
55
63
  type PhoneNumber = "assign-automatically" | "custom";
@@ -78,7 +86,7 @@ export declare namespace CreateAgentRequest {
78
86
  };
79
87
  namespace TemplateVariables {
80
88
  interface Value {
81
- default_value: string | null;
89
+ default_value: string;
82
90
  is_boosted_keyword?: boolean;
83
91
  }
84
92
  }
@@ -90,7 +98,7 @@ export declare namespace CreateAgentRequest {
90
98
  | string;
91
99
  }
92
100
  /**
93
- * When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options.
101
+ * When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
94
102
  */
95
103
  interface ConfigurationEndpoint {
96
104
  /** URL to call */
@@ -35,6 +35,8 @@ export * from "./InputCancelledPayload.mjs";
35
35
  export * from "./AudioChunkResponsePayload.mjs";
36
36
  export * from "./UserStartedSpeakingPayload.mjs";
37
37
  export * from "./UserFinishedSpeakingPayload.mjs";
38
+ export * from "./AssistantStartedSpeakingPayload.mjs";
39
+ export * from "./AssistantFinishedSpeakingPayload.mjs";
38
40
  export * from "./IsUserSpeakingPayload.mjs";
39
41
  export * from "./DtmfPayload.mjs";
40
42
  export * from "./ToolCallPayload.mjs";
@@ -35,6 +35,8 @@ export * from "./InputCancelledPayload.mjs";
35
35
  export * from "./AudioChunkResponsePayload.mjs";
36
36
  export * from "./UserStartedSpeakingPayload.mjs";
37
37
  export * from "./UserFinishedSpeakingPayload.mjs";
38
+ export * from "./AssistantStartedSpeakingPayload.mjs";
39
+ export * from "./AssistantFinishedSpeakingPayload.mjs";
38
40
  export * from "./IsUserSpeakingPayload.mjs";
39
41
  export * from "./DtmfPayload.mjs";
40
42
  export * from "./ToolCallPayload.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.31";
1
+ export declare const SDK_VERSION = "0.30.35";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.30.31";
1
+ export const SDK_VERSION = "0.30.35";