retell-sdk 4.11.0 → 4.13.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/CHANGELOG.md +43 -0
- package/LICENSE +1 -1
- package/core.d.ts +2 -3
- package/core.d.ts.map +1 -1
- package/core.js +23 -18
- package/core.js.map +1 -1
- package/core.mjs +23 -18
- package/core.mjs.map +1 -1
- package/error.d.ts +18 -24
- package/error.d.ts.map +1 -1
- package/error.js +1 -31
- package/error.js.map +1 -1
- package/error.mjs +1 -31
- package/error.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.ts +36 -33
- package/resources/agent.d.ts.map +1 -1
- package/resources/call.d.ts +114 -2
- package/resources/call.d.ts.map +1 -1
- package/resources/llm.d.ts +6 -6
- package/resources/llm.d.ts.map +1 -1
- package/src/core.ts +26 -22
- package/src/error.ts +24 -40
- package/src/resources/agent.ts +66 -36
- package/src/resources/call.ts +136 -0
- package/src/resources/llm.ts +6 -6
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/call.ts
CHANGED
|
@@ -104,6 +104,11 @@ export interface PhoneCallResponse {
|
|
|
104
104
|
*/
|
|
105
105
|
call_analysis?: PhoneCallResponse.CallAnalysis;
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Cost of the call, including all the products and their costs and discount.
|
|
109
|
+
*/
|
|
110
|
+
call_cost?: PhoneCallResponse.CallCost;
|
|
111
|
+
|
|
107
112
|
/**
|
|
108
113
|
* The reason for the disconnection of the call. Read details desciption about
|
|
109
114
|
* reasons listed here at
|
|
@@ -205,6 +210,7 @@ export interface PhoneCallResponse {
|
|
|
205
210
|
| PhoneCallResponse.Utterance
|
|
206
211
|
| PhoneCallResponse.ToolCallInvocationUtterance
|
|
207
212
|
| PhoneCallResponse.ToolCallResultUtterance
|
|
213
|
+
| PhoneCallResponse.DtmfUtterance
|
|
208
214
|
>;
|
|
209
215
|
}
|
|
210
216
|
|
|
@@ -243,6 +249,55 @@ export namespace PhoneCallResponse {
|
|
|
243
249
|
user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
|
|
244
250
|
}
|
|
245
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Cost of the call, including all the products and their costs and discount.
|
|
254
|
+
*/
|
|
255
|
+
export interface CallCost {
|
|
256
|
+
/**
|
|
257
|
+
* Combined cost of all individual costs in cents
|
|
258
|
+
*/
|
|
259
|
+
combined_cost: number;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* List of products with their unit prices and costs in cents
|
|
263
|
+
*/
|
|
264
|
+
product_costs: Array<CallCost.ProductCost>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Total duration of the call in seconds
|
|
268
|
+
*/
|
|
269
|
+
total_duration_seconds: number;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Total unit duration price of all products in cents per second
|
|
273
|
+
*/
|
|
274
|
+
total_duration_unit_price: number;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Total one time price of all products in cents per call
|
|
278
|
+
*/
|
|
279
|
+
total_one_time_price: number;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export namespace CallCost {
|
|
283
|
+
export interface ProductCost {
|
|
284
|
+
/**
|
|
285
|
+
* Cost for the product in cents for the duration of the call.
|
|
286
|
+
*/
|
|
287
|
+
cost: number;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Product name that has a cost associated with it.
|
|
291
|
+
*/
|
|
292
|
+
product: string;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Unit price of the product in cents per second.
|
|
296
|
+
*/
|
|
297
|
+
unitPrice: number;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
246
301
|
/**
|
|
247
302
|
* Latency tracking of the call, available after call ends. Not all fields here
|
|
248
303
|
* will be available, as it depends on the type of call and feature used.
|
|
@@ -691,6 +746,19 @@ export namespace PhoneCallResponse {
|
|
|
691
746
|
*/
|
|
692
747
|
tool_call_id: string;
|
|
693
748
|
}
|
|
749
|
+
|
|
750
|
+
export interface DtmfUtterance {
|
|
751
|
+
/**
|
|
752
|
+
* The digit pressed by the user. Will be a single digit string like "1", "2", "3",
|
|
753
|
+
* "\*", "#" etc.
|
|
754
|
+
*/
|
|
755
|
+
digit: string;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* This is user pressed digit from their phone keypad.
|
|
759
|
+
*/
|
|
760
|
+
role: 'dtmf';
|
|
761
|
+
}
|
|
694
762
|
}
|
|
695
763
|
|
|
696
764
|
export interface WebCallResponse {
|
|
@@ -737,6 +805,11 @@ export interface WebCallResponse {
|
|
|
737
805
|
*/
|
|
738
806
|
call_analysis?: WebCallResponse.CallAnalysis;
|
|
739
807
|
|
|
808
|
+
/**
|
|
809
|
+
* Cost of the call, including all the products and their costs and discount.
|
|
810
|
+
*/
|
|
811
|
+
call_cost?: WebCallResponse.CallCost;
|
|
812
|
+
|
|
740
813
|
/**
|
|
741
814
|
* The reason for the disconnection of the call. Read details desciption about
|
|
742
815
|
* reasons listed here at
|
|
@@ -838,6 +911,7 @@ export interface WebCallResponse {
|
|
|
838
911
|
| WebCallResponse.Utterance
|
|
839
912
|
| WebCallResponse.ToolCallInvocationUtterance
|
|
840
913
|
| WebCallResponse.ToolCallResultUtterance
|
|
914
|
+
| WebCallResponse.DtmfUtterance
|
|
841
915
|
>;
|
|
842
916
|
}
|
|
843
917
|
|
|
@@ -876,6 +950,55 @@ export namespace WebCallResponse {
|
|
|
876
950
|
user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
|
|
877
951
|
}
|
|
878
952
|
|
|
953
|
+
/**
|
|
954
|
+
* Cost of the call, including all the products and their costs and discount.
|
|
955
|
+
*/
|
|
956
|
+
export interface CallCost {
|
|
957
|
+
/**
|
|
958
|
+
* Combined cost of all individual costs in cents
|
|
959
|
+
*/
|
|
960
|
+
combined_cost: number;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* List of products with their unit prices and costs in cents
|
|
964
|
+
*/
|
|
965
|
+
product_costs: Array<CallCost.ProductCost>;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Total duration of the call in seconds
|
|
969
|
+
*/
|
|
970
|
+
total_duration_seconds: number;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Total unit duration price of all products in cents per second
|
|
974
|
+
*/
|
|
975
|
+
total_duration_unit_price: number;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Total one time price of all products in cents per call
|
|
979
|
+
*/
|
|
980
|
+
total_one_time_price: number;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export namespace CallCost {
|
|
984
|
+
export interface ProductCost {
|
|
985
|
+
/**
|
|
986
|
+
* Cost for the product in cents for the duration of the call.
|
|
987
|
+
*/
|
|
988
|
+
cost: number;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Product name that has a cost associated with it.
|
|
992
|
+
*/
|
|
993
|
+
product: string;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Unit price of the product in cents per second.
|
|
997
|
+
*/
|
|
998
|
+
unitPrice: number;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
879
1002
|
/**
|
|
880
1003
|
* Latency tracking of the call, available after call ends. Not all fields here
|
|
881
1004
|
* will be available, as it depends on the type of call and feature used.
|
|
@@ -1324,6 +1447,19 @@ export namespace WebCallResponse {
|
|
|
1324
1447
|
*/
|
|
1325
1448
|
tool_call_id: string;
|
|
1326
1449
|
}
|
|
1450
|
+
|
|
1451
|
+
export interface DtmfUtterance {
|
|
1452
|
+
/**
|
|
1453
|
+
* The digit pressed by the user. Will be a single digit string like "1", "2", "3",
|
|
1454
|
+
* "\*", "#" etc.
|
|
1455
|
+
*/
|
|
1456
|
+
digit: string;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* This is user pressed digit from their phone keypad.
|
|
1460
|
+
*/
|
|
1461
|
+
role: 'dtmf';
|
|
1462
|
+
}
|
|
1327
1463
|
}
|
|
1328
1464
|
|
|
1329
1465
|
export type CallListResponse = Array<CallResponse>;
|
package/src/resources/llm.ts
CHANGED
|
@@ -104,7 +104,7 @@ export interface LlmResponse {
|
|
|
104
104
|
/**
|
|
105
105
|
* Select the underlying text LLM. If not set, would default to gpt-4o.
|
|
106
106
|
*/
|
|
107
|
-
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
|
|
107
|
+
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* If set, will control the randomness of the response. Value ranging from [0,1].
|
|
@@ -118,7 +118,7 @@ export interface LlmResponse {
|
|
|
118
118
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
119
119
|
* both.
|
|
120
120
|
*/
|
|
121
|
-
s2s_model?: 'gpt-4o-realtime' | null;
|
|
121
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Name of the starting state. Required if states is not empty.
|
|
@@ -829,7 +829,7 @@ export interface LlmCreateParams {
|
|
|
829
829
|
/**
|
|
830
830
|
* Select the underlying text LLM. If not set, would default to gpt-4o.
|
|
831
831
|
*/
|
|
832
|
-
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
|
|
832
|
+
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
|
|
833
833
|
|
|
834
834
|
/**
|
|
835
835
|
* If set, will control the randomness of the response. Value ranging from [0,1].
|
|
@@ -843,7 +843,7 @@ export interface LlmCreateParams {
|
|
|
843
843
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
844
844
|
* both.
|
|
845
845
|
*/
|
|
846
|
-
s2s_model?: 'gpt-4o-realtime' | null;
|
|
846
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
|
|
847
847
|
|
|
848
848
|
/**
|
|
849
849
|
* Name of the starting state. Required if states is not empty.
|
|
@@ -1552,7 +1552,7 @@ export interface LlmUpdateParams {
|
|
|
1552
1552
|
/**
|
|
1553
1553
|
* Select the underlying text LLM. If not set, would default to gpt-4o.
|
|
1554
1554
|
*/
|
|
1555
|
-
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
|
|
1555
|
+
model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
|
|
1556
1556
|
|
|
1557
1557
|
/**
|
|
1558
1558
|
* If set, will control the randomness of the response. Value ranging from [0,1].
|
|
@@ -1566,7 +1566,7 @@ export interface LlmUpdateParams {
|
|
|
1566
1566
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
1567
1567
|
* both.
|
|
1568
1568
|
*/
|
|
1569
|
-
s2s_model?: 'gpt-4o-realtime' | null;
|
|
1569
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
|
|
1570
1570
|
|
|
1571
1571
|
/**
|
|
1572
1572
|
* Name of the starting state. Required if states is not empty.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.13.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.13.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.13.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|