retell-sdk 4.43.0 → 4.45.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 +41 -0
- package/package.json +1 -1
- package/resources/agent.d.ts +102 -22
- package/resources/agent.d.ts.map +1 -1
- package/resources/call.d.ts +222 -18
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +1 -1
- package/resources/call.mjs +1 -1
- package/resources/conversation-flow.d.ts +241 -127
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +1 -1
- package/resources/conversation-flow.mjs +1 -1
- package/resources/llm.d.ts +241 -33
- package/resources/llm.d.ts.map +1 -1
- package/src/resources/agent.ts +201 -22
- package/src/resources/call.ts +274 -21
- package/src/resources/conversation-flow.ts +706 -127
- package/src/resources/llm.ts +274 -18
- 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
|
@@ -26,11 +26,11 @@ export class Call extends APIResource {
|
|
|
26
26
|
* const callResponse = await client.call.update(
|
|
27
27
|
* 'call_a4441234567890777c4a4a123e6',
|
|
28
28
|
* {
|
|
29
|
+
* data_storage_setting: 'everything_except_pii',
|
|
29
30
|
* metadata: {
|
|
30
31
|
* customer_id: 'cust_123',
|
|
31
32
|
* notes: 'Follow-up required',
|
|
32
33
|
* },
|
|
33
|
-
* opt_out_sensitive_data_storage: true,
|
|
34
34
|
* },
|
|
35
35
|
* );
|
|
36
36
|
* ```
|
|
@@ -203,6 +203,13 @@ export interface PhoneCallResponse {
|
|
|
203
203
|
*/
|
|
204
204
|
custom_sip_headers?: { [key: string]: string };
|
|
205
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Data storage setting for this call's agent. "everything" stores all data,
|
|
208
|
+
* "everything_except_pii" excludes PII when possible, "basic_attributes_only"
|
|
209
|
+
* stores only metadata.
|
|
210
|
+
*/
|
|
211
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only' | null;
|
|
212
|
+
|
|
206
213
|
/**
|
|
207
214
|
* The reason for the disconnection of the call. Read details desciption about
|
|
208
215
|
* reasons listed here at
|
|
@@ -283,12 +290,6 @@ export interface PhoneCallResponse {
|
|
|
283
290
|
*/
|
|
284
291
|
opt_in_signed_url?: boolean;
|
|
285
292
|
|
|
286
|
-
/**
|
|
287
|
-
* Whether this call opts out of sensitive data storage like transcript, recording,
|
|
288
|
-
* logging.
|
|
289
|
-
*/
|
|
290
|
-
opt_out_sensitive_data_storage?: boolean;
|
|
291
|
-
|
|
292
293
|
/**
|
|
293
294
|
* Public log of the call, containing details about all the requests and responses
|
|
294
295
|
* received in LLM WebSocket, latency tracking for each turntaking, helpful for
|
|
@@ -296,6 +297,12 @@ export interface PhoneCallResponse {
|
|
|
296
297
|
*/
|
|
297
298
|
public_log_url?: string;
|
|
298
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Recording of the call, with each party’s audio stored in a separate channel.
|
|
302
|
+
* Available after the call ends.
|
|
303
|
+
*/
|
|
304
|
+
recording_multi_channel_url?: string;
|
|
305
|
+
|
|
299
306
|
/**
|
|
300
307
|
* Recording of the call. Available after call ends.
|
|
301
308
|
*/
|
|
@@ -308,6 +315,29 @@ export interface PhoneCallResponse {
|
|
|
308
315
|
*/
|
|
309
316
|
retell_llm_dynamic_variables?: { [key: string]: unknown };
|
|
310
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Recording of the call without PII, with each party’s audio stored in a separate
|
|
320
|
+
* channel. Available after the call ends.
|
|
321
|
+
*/
|
|
322
|
+
scrubbed_recording_multi_channel_url?: string;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Recording of the call without PII. Available after call ends.
|
|
326
|
+
*/
|
|
327
|
+
scrubbed_recording_url?: string;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Transcript of the call weaved with tool call invocation and results, without
|
|
331
|
+
* PII. It precisely captures when (at what utterance, which word) the tool was
|
|
332
|
+
* invoked and what was the result. Available after call ends.
|
|
333
|
+
*/
|
|
334
|
+
scrubbed_transcript_with_tool_calls?: Array<
|
|
335
|
+
| PhoneCallResponse.Utterance
|
|
336
|
+
| PhoneCallResponse.ToolCallInvocationUtterance
|
|
337
|
+
| PhoneCallResponse.ToolCallResultUtterance
|
|
338
|
+
| PhoneCallResponse.DtmfUtterance
|
|
339
|
+
>;
|
|
340
|
+
|
|
311
341
|
/**
|
|
312
342
|
* Begin timestamp (milliseconds since epoch) of the call. Available after call
|
|
313
343
|
* starts.
|
|
@@ -774,6 +804,98 @@ export namespace PhoneCallResponse {
|
|
|
774
804
|
values: Array<number>;
|
|
775
805
|
}
|
|
776
806
|
|
|
807
|
+
export interface Utterance {
|
|
808
|
+
/**
|
|
809
|
+
* Transcript of the utterances.
|
|
810
|
+
*/
|
|
811
|
+
content: string;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Documents whether this utterance is spoken by agent or user.
|
|
815
|
+
*/
|
|
816
|
+
role: 'agent' | 'user' | 'transfer_target';
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Array of words in the utterance with the word timestamp. Useful for
|
|
820
|
+
* understanding what word was spoken at what time. Note that the word timestamp is
|
|
821
|
+
* not guaranteed to be accurate, it's more like an approximation.
|
|
822
|
+
*/
|
|
823
|
+
words: Array<Utterance.Word>;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export namespace Utterance {
|
|
827
|
+
export interface Word {
|
|
828
|
+
/**
|
|
829
|
+
* End time of the word in the call in second. This is relative audio time, not
|
|
830
|
+
* wall time.
|
|
831
|
+
*/
|
|
832
|
+
end?: number;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Start time of the word in the call in second. This is relative audio time, not
|
|
836
|
+
* wall time.
|
|
837
|
+
*/
|
|
838
|
+
start?: number;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Word transcript (with punctuation if applicable).
|
|
842
|
+
*/
|
|
843
|
+
word?: string;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
export interface ToolCallInvocationUtterance {
|
|
848
|
+
/**
|
|
849
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
850
|
+
*/
|
|
851
|
+
arguments: string;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Name of the function in this tool call.
|
|
855
|
+
*/
|
|
856
|
+
name: string;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* This is a tool call invocation.
|
|
860
|
+
*/
|
|
861
|
+
role: 'tool_call_invocation';
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Tool call id, globally unique.
|
|
865
|
+
*/
|
|
866
|
+
tool_call_id: string;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface ToolCallResultUtterance {
|
|
870
|
+
/**
|
|
871
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
872
|
+
*/
|
|
873
|
+
content: string;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* This is result of a tool call.
|
|
877
|
+
*/
|
|
878
|
+
role: 'tool_call_result';
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Tool call id, globally unique.
|
|
882
|
+
*/
|
|
883
|
+
tool_call_id: string;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export interface DtmfUtterance {
|
|
887
|
+
/**
|
|
888
|
+
* The digit pressed by the user. Will be a single digit string like "1", "2", "3",
|
|
889
|
+
* "\*", "#" etc.
|
|
890
|
+
*/
|
|
891
|
+
digit: string;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* This is user pressed digit from their phone keypad.
|
|
895
|
+
*/
|
|
896
|
+
role: 'dtmf';
|
|
897
|
+
}
|
|
898
|
+
|
|
777
899
|
/**
|
|
778
900
|
* Telephony identifier of the call, populated when available. Tracking purposes
|
|
779
901
|
* only.
|
|
@@ -982,6 +1104,13 @@ export interface WebCallResponse {
|
|
|
982
1104
|
*/
|
|
983
1105
|
custom_sip_headers?: { [key: string]: string };
|
|
984
1106
|
|
|
1107
|
+
/**
|
|
1108
|
+
* Data storage setting for this call's agent. "everything" stores all data,
|
|
1109
|
+
* "everything_except_pii" excludes PII when possible, "basic_attributes_only"
|
|
1110
|
+
* stores only metadata.
|
|
1111
|
+
*/
|
|
1112
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only' | null;
|
|
1113
|
+
|
|
985
1114
|
/**
|
|
986
1115
|
* The reason for the disconnection of the call. Read details desciption about
|
|
987
1116
|
* reasons listed here at
|
|
@@ -1062,12 +1191,6 @@ export interface WebCallResponse {
|
|
|
1062
1191
|
*/
|
|
1063
1192
|
opt_in_signed_url?: boolean;
|
|
1064
1193
|
|
|
1065
|
-
/**
|
|
1066
|
-
* Whether this call opts out of sensitive data storage like transcript, recording,
|
|
1067
|
-
* logging.
|
|
1068
|
-
*/
|
|
1069
|
-
opt_out_sensitive_data_storage?: boolean;
|
|
1070
|
-
|
|
1071
1194
|
/**
|
|
1072
1195
|
* Public log of the call, containing details about all the requests and responses
|
|
1073
1196
|
* received in LLM WebSocket, latency tracking for each turntaking, helpful for
|
|
@@ -1075,6 +1198,12 @@ export interface WebCallResponse {
|
|
|
1075
1198
|
*/
|
|
1076
1199
|
public_log_url?: string;
|
|
1077
1200
|
|
|
1201
|
+
/**
|
|
1202
|
+
* Recording of the call, with each party’s audio stored in a separate channel.
|
|
1203
|
+
* Available after the call ends.
|
|
1204
|
+
*/
|
|
1205
|
+
recording_multi_channel_url?: string;
|
|
1206
|
+
|
|
1078
1207
|
/**
|
|
1079
1208
|
* Recording of the call. Available after call ends.
|
|
1080
1209
|
*/
|
|
@@ -1087,6 +1216,29 @@ export interface WebCallResponse {
|
|
|
1087
1216
|
*/
|
|
1088
1217
|
retell_llm_dynamic_variables?: { [key: string]: unknown };
|
|
1089
1218
|
|
|
1219
|
+
/**
|
|
1220
|
+
* Recording of the call without PII, with each party’s audio stored in a separate
|
|
1221
|
+
* channel. Available after the call ends.
|
|
1222
|
+
*/
|
|
1223
|
+
scrubbed_recording_multi_channel_url?: string;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Recording of the call without PII. Available after call ends.
|
|
1227
|
+
*/
|
|
1228
|
+
scrubbed_recording_url?: string;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Transcript of the call weaved with tool call invocation and results, without
|
|
1232
|
+
* PII. It precisely captures when (at what utterance, which word) the tool was
|
|
1233
|
+
* invoked and what was the result. Available after call ends.
|
|
1234
|
+
*/
|
|
1235
|
+
scrubbed_transcript_with_tool_calls?: Array<
|
|
1236
|
+
| WebCallResponse.Utterance
|
|
1237
|
+
| WebCallResponse.ToolCallInvocationUtterance
|
|
1238
|
+
| WebCallResponse.ToolCallResultUtterance
|
|
1239
|
+
| WebCallResponse.DtmfUtterance
|
|
1240
|
+
>;
|
|
1241
|
+
|
|
1090
1242
|
/**
|
|
1091
1243
|
* Begin timestamp (milliseconds since epoch) of the call. Available after call
|
|
1092
1244
|
* starts.
|
|
@@ -1547,6 +1699,98 @@ export namespace WebCallResponse {
|
|
|
1547
1699
|
values: Array<number>;
|
|
1548
1700
|
}
|
|
1549
1701
|
|
|
1702
|
+
export interface Utterance {
|
|
1703
|
+
/**
|
|
1704
|
+
* Transcript of the utterances.
|
|
1705
|
+
*/
|
|
1706
|
+
content: string;
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* Documents whether this utterance is spoken by agent or user.
|
|
1710
|
+
*/
|
|
1711
|
+
role: 'agent' | 'user' | 'transfer_target';
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* Array of words in the utterance with the word timestamp. Useful for
|
|
1715
|
+
* understanding what word was spoken at what time. Note that the word timestamp is
|
|
1716
|
+
* not guaranteed to be accurate, it's more like an approximation.
|
|
1717
|
+
*/
|
|
1718
|
+
words: Array<Utterance.Word>;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export namespace Utterance {
|
|
1722
|
+
export interface Word {
|
|
1723
|
+
/**
|
|
1724
|
+
* End time of the word in the call in second. This is relative audio time, not
|
|
1725
|
+
* wall time.
|
|
1726
|
+
*/
|
|
1727
|
+
end?: number;
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* Start time of the word in the call in second. This is relative audio time, not
|
|
1731
|
+
* wall time.
|
|
1732
|
+
*/
|
|
1733
|
+
start?: number;
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Word transcript (with punctuation if applicable).
|
|
1737
|
+
*/
|
|
1738
|
+
word?: string;
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
export interface ToolCallInvocationUtterance {
|
|
1743
|
+
/**
|
|
1744
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
1745
|
+
*/
|
|
1746
|
+
arguments: string;
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Name of the function in this tool call.
|
|
1750
|
+
*/
|
|
1751
|
+
name: string;
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* This is a tool call invocation.
|
|
1755
|
+
*/
|
|
1756
|
+
role: 'tool_call_invocation';
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Tool call id, globally unique.
|
|
1760
|
+
*/
|
|
1761
|
+
tool_call_id: string;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
export interface ToolCallResultUtterance {
|
|
1765
|
+
/**
|
|
1766
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
1767
|
+
*/
|
|
1768
|
+
content: string;
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* This is result of a tool call.
|
|
1772
|
+
*/
|
|
1773
|
+
role: 'tool_call_result';
|
|
1774
|
+
|
|
1775
|
+
/**
|
|
1776
|
+
* Tool call id, globally unique.
|
|
1777
|
+
*/
|
|
1778
|
+
tool_call_id: string;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
export interface DtmfUtterance {
|
|
1782
|
+
/**
|
|
1783
|
+
* The digit pressed by the user. Will be a single digit string like "1", "2", "3",
|
|
1784
|
+
* "\*", "#" etc.
|
|
1785
|
+
*/
|
|
1786
|
+
digit: string;
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* This is user pressed digit from their phone keypad.
|
|
1790
|
+
*/
|
|
1791
|
+
role: 'dtmf';
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1550
1794
|
export interface TranscriptObject {
|
|
1551
1795
|
/**
|
|
1552
1796
|
* Transcript of the utterances.
|
|
@@ -1683,6 +1927,14 @@ export namespace WebCallResponse {
|
|
|
1683
1927
|
export type CallListResponse = Array<CallResponse>;
|
|
1684
1928
|
|
|
1685
1929
|
export interface CallUpdateParams {
|
|
1930
|
+
/**
|
|
1931
|
+
* Data storage setting for this call. Overrides the agent's default setting.
|
|
1932
|
+
* "everything" stores all data, "everything_except_pii" excludes PII when
|
|
1933
|
+
* possible, "basic_attributes_only" stores only metadata. Cannot be downgraded
|
|
1934
|
+
* from more restrictive to less restrictive settings.
|
|
1935
|
+
*/
|
|
1936
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
|
|
1937
|
+
|
|
1686
1938
|
/**
|
|
1687
1939
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
1688
1940
|
* your internal customer id associated with the call. Not used for processing. You
|
|
@@ -1691,14 +1943,10 @@ export interface CallUpdateParams {
|
|
|
1691
1943
|
metadata?: unknown;
|
|
1692
1944
|
|
|
1693
1945
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
/**
|
|
1700
|
-
* Override dynamic varaibles represented as key-value pairs of strings. These are
|
|
1701
|
-
* provided during call-updates and have the highest priorty.
|
|
1946
|
+
* Override dynamic varaibles represented as key-value pairs of strings. Setting
|
|
1947
|
+
* this will override or add the dynamic variables set in the agent during the
|
|
1948
|
+
* call. Only need to set the delta where you want to override, no need to set the
|
|
1949
|
+
* entire dynamic variables object.
|
|
1702
1950
|
*/
|
|
1703
1951
|
override_dynamic_variables?: { [key: string]: string } | null;
|
|
1704
1952
|
}
|
|
@@ -1740,6 +1988,11 @@ export namespace CallListParams {
|
|
|
1740
1988
|
*/
|
|
1741
1989
|
agent_id?: Array<string>;
|
|
1742
1990
|
|
|
1991
|
+
/**
|
|
1992
|
+
* Only retrieve calls with specific batch call id(s).
|
|
1993
|
+
*/
|
|
1994
|
+
batch_call_id?: Array<string>;
|
|
1995
|
+
|
|
1743
1996
|
/**
|
|
1744
1997
|
* Only retrieve calls with specific call status(es).
|
|
1745
1998
|
*/
|