phonic 0.19.0 → 0.20.0

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.
package/dist/index.d.mts CHANGED
@@ -80,9 +80,8 @@ declare class Conversations {
80
80
  }): DataOrError<ConversationsSuccessResponse>;
81
81
  }
82
82
 
83
- type PhonicSTSTool = "send_dtmf_tone" | "end_conversation";
84
- type PhonicSTSConfig = {
85
- project: string;
83
+ type PhonicSTSTool = "keypad_input" | "natural_conversation_ending" | (string & {});
84
+ interface PhonicSTSConfigBase {
86
85
  input_format: "pcm_44100" | "mulaw_8000";
87
86
  system_prompt?: string;
88
87
  welcome_message?: string;
@@ -95,7 +94,14 @@ type PhonicSTSConfig = {
95
94
  vad_min_speech_duration_ms?: number;
96
95
  vad_min_silence_duration_ms?: number;
97
96
  vad_threshold?: number;
98
- };
97
+ }
98
+ interface PhonicSTSConfigWithAgent extends PhonicSTSConfigBase {
99
+ agent: string;
100
+ }
101
+ interface PhonicSTSConfigWithProject extends PhonicSTSConfigBase {
102
+ project: string;
103
+ }
104
+ type PhonicSTSConfig = PhonicSTSConfigWithAgent | PhonicSTSConfigWithProject;
99
105
  type PhonicSTSWebSocketResponseMessage = {
100
106
  type: "ready_to_start_conversation";
101
107
  } | {
@@ -146,6 +152,8 @@ type PhonicConfigurationEndpointRequestPayload = {
146
152
  tools: Array<PhonicTool>;
147
153
  boosted_keywords: string[];
148
154
  };
155
+ from_phone_number?: string;
156
+ to_phone_number?: string;
149
157
  };
150
158
  type PhonicConfigurationEndpointResponsePayload = {
151
159
  welcome_message?: string | null;
package/dist/index.d.ts CHANGED
@@ -80,9 +80,8 @@ declare class Conversations {
80
80
  }): DataOrError<ConversationsSuccessResponse>;
81
81
  }
82
82
 
83
- type PhonicSTSTool = "send_dtmf_tone" | "end_conversation";
84
- type PhonicSTSConfig = {
85
- project: string;
83
+ type PhonicSTSTool = "keypad_input" | "natural_conversation_ending" | (string & {});
84
+ interface PhonicSTSConfigBase {
86
85
  input_format: "pcm_44100" | "mulaw_8000";
87
86
  system_prompt?: string;
88
87
  welcome_message?: string;
@@ -95,7 +94,14 @@ type PhonicSTSConfig = {
95
94
  vad_min_speech_duration_ms?: number;
96
95
  vad_min_silence_duration_ms?: number;
97
96
  vad_threshold?: number;
98
- };
97
+ }
98
+ interface PhonicSTSConfigWithAgent extends PhonicSTSConfigBase {
99
+ agent: string;
100
+ }
101
+ interface PhonicSTSConfigWithProject extends PhonicSTSConfigBase {
102
+ project: string;
103
+ }
104
+ type PhonicSTSConfig = PhonicSTSConfigWithAgent | PhonicSTSConfigWithProject;
99
105
  type PhonicSTSWebSocketResponseMessage = {
100
106
  type: "ready_to_start_conversation";
101
107
  } | {
@@ -146,6 +152,8 @@ type PhonicConfigurationEndpointRequestPayload = {
146
152
  tools: Array<PhonicTool>;
147
153
  boosted_keywords: string[];
148
154
  };
155
+ from_phone_number?: string;
156
+ to_phone_number?: string;
149
157
  };
150
158
  type PhonicConfigurationEndpointResponsePayload = {
151
159
  welcome_message?: string | null;
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // package.json
38
- var version = "0.19.0";
38
+ var version = "0.20.0";
39
39
 
40
40
  // src/conversations/index.ts
41
41
  var Conversations = class {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.19.0";
2
+ var version = "0.20.0";
3
3
 
4
4
  // src/conversations/index.ts
5
5
  var Conversations = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Phonic Node.js SDK",
5
5
  "scripts": {
6
6
  "build": "tsup",