retell-sdk 2.3.2 → 2.3.4
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/example.d.ts +2 -0
- package/example.d.ts.map +1 -0
- package/example.js +81 -0
- package/example.js.map +1 -0
- package/lib/secureWebhooks.d.ts +30 -0
- package/lib/secureWebhooks.d.ts.map +1 -0
- package/lib/secureWebhooks.js +51 -0
- package/lib/secureWebhooks.js.map +1 -0
- package/models/components/agent.d.ts +31 -1
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +22 -2
- package/models/components/agent.js.map +1 -1
- package/models/components/calldetail.d.ts +6 -0
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +4 -0
- package/models/components/calldetail.js.map +1 -1
- package/models/operations/createagent.d.ts +31 -1
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +22 -2
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/registercall.d.ts +6 -0
- package/models/operations/registercall.d.ts.map +1 -1
- package/models/operations/registercall.js +4 -0
- package/models/operations/registercall.js.map +1 -1
- package/models/operations/updateagent.d.ts +30 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +23 -2
- package/models/operations/updateagent.js.map +1 -1
- package/package.json +2 -1
- package/sdk/sdk.d.ts +1 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +82 -0
- package/src/lib/secureWebhooks.ts +86 -0
- package/src/models/components/agent.ts +54 -3
- package/src/models/components/calldetail.ts +10 -0
- package/src/models/operations/createagent.ts +53 -3
- package/src/models/operations/registercall.ts +10 -0
- package/src/models/operations/updateagent.ts +53 -2
- package/src/sdk/sdk.ts +13 -0
- package/models/components/agentnodefaultnorequired.d.ts +0 -61
- package/models/components/agentnodefaultnorequired.d.ts.map +0 -1
- package/models/components/agentnodefaultnorequired.js +0 -66
- package/models/components/agentnodefaultnorequired.js.map +0 -1
|
@@ -72,6 +72,10 @@ export type CallDetail = {
|
|
|
72
72
|
* Transcription of the call. Available after call ends.
|
|
73
73
|
*/
|
|
74
74
|
transcript?: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* If users stay silent for a period, end the call. By default, it is set to 600,000 ms (10 min). The minimum value allowed is 10,000 ms (10 s).
|
|
77
|
+
*/
|
|
78
|
+
endCallAfterSilenceMs?: number | undefined;
|
|
75
79
|
};
|
|
76
80
|
|
|
77
81
|
/** @internal */
|
|
@@ -96,6 +100,7 @@ export namespace CallDetail$ {
|
|
|
96
100
|
recording_url?: string | undefined;
|
|
97
101
|
start_timestamp: number;
|
|
98
102
|
transcript?: string | undefined;
|
|
103
|
+
end_call_after_silence_ms?: number | undefined;
|
|
99
104
|
};
|
|
100
105
|
|
|
101
106
|
export const inboundSchema: z.ZodType<CallDetail, z.ZodTypeDef, Inbound> = z
|
|
@@ -110,6 +115,7 @@ export namespace CallDetail$ {
|
|
|
110
115
|
recording_url: z.string().optional(),
|
|
111
116
|
start_timestamp: z.number().int(),
|
|
112
117
|
transcript: z.string().optional(),
|
|
118
|
+
end_call_after_silence_ms: z.number().int().optional(),
|
|
113
119
|
})
|
|
114
120
|
.transform((v) => {
|
|
115
121
|
return {
|
|
@@ -127,6 +133,7 @@ export namespace CallDetail$ {
|
|
|
127
133
|
: { recordingUrl: v.recording_url }),
|
|
128
134
|
startTimestamp: v.start_timestamp,
|
|
129
135
|
...(v.transcript === undefined ? null : { transcript: v.transcript }),
|
|
136
|
+
...(v.end_call_after_silence_ms === undefined ? null : { endCallAfterSilenceMs: v.end_call_after_silence_ms }),
|
|
130
137
|
};
|
|
131
138
|
});
|
|
132
139
|
|
|
@@ -141,6 +148,7 @@ export namespace CallDetail$ {
|
|
|
141
148
|
recording_url?: string | undefined;
|
|
142
149
|
start_timestamp: number;
|
|
143
150
|
transcript?: string | undefined;
|
|
151
|
+
end_call_after_silence_ms?: number | undefined;
|
|
144
152
|
};
|
|
145
153
|
|
|
146
154
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CallDetail> = z
|
|
@@ -155,6 +163,7 @@ export namespace CallDetail$ {
|
|
|
155
163
|
recordingUrl: z.string().optional(),
|
|
156
164
|
startTimestamp: z.number().int(),
|
|
157
165
|
transcript: z.string().optional(),
|
|
166
|
+
endCallAfterSilenceMs: z.number().int().optional(),
|
|
158
167
|
})
|
|
159
168
|
.transform((v) => {
|
|
160
169
|
return {
|
|
@@ -172,6 +181,7 @@ export namespace CallDetail$ {
|
|
|
172
181
|
: { recording_url: v.recordingUrl }),
|
|
173
182
|
start_timestamp: v.startTimestamp,
|
|
174
183
|
...(v.transcript === undefined ? null : { transcript: v.transcript }),
|
|
184
|
+
...(v.endCallAfterSilenceMs === undefined ? null : { end_call_after_silence_ms: v.endCallAfterSilenceMs }),
|
|
175
185
|
};
|
|
176
186
|
});
|
|
177
187
|
}
|
|
@@ -23,9 +23,29 @@ export type CreateAgentRequestBody = {
|
|
|
23
23
|
*/
|
|
24
24
|
enableBackchannel?: boolean | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* Controls how stable the voice is.
|
|
26
|
+
* Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Currently this setting only applies to 11labs voices. If unset, default value 1 will apply.
|
|
27
27
|
*/
|
|
28
28
|
voiceTemperature?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.
|
|
31
|
+
*/
|
|
32
|
+
voiceSpeed?: number | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.
|
|
35
|
+
*/
|
|
36
|
+
responsiveness?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* If set, will add ambient environment sound to the call to make experience more realistic.
|
|
39
|
+
*/
|
|
40
|
+
ambientSound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The webhook for agent to listen to call events. See what events it would get at webhook doc. If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to string null to remove webhook url from this agent.
|
|
43
|
+
*/
|
|
44
|
+
webhookUrl?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Provide a customized list of keywords to expand our models' vocabulary, aimed at improving performance and understanding within your specific context.
|
|
47
|
+
*/
|
|
48
|
+
boostedKeywords?: string[] | undefined;
|
|
29
49
|
};
|
|
30
50
|
|
|
31
51
|
export type CreateAgentResponse = {
|
|
@@ -55,6 +75,11 @@ export namespace CreateAgentRequestBody$ {
|
|
|
55
75
|
voice_id: string;
|
|
56
76
|
enable_backchannel?: boolean | undefined;
|
|
57
77
|
voice_temperature?: number | undefined;
|
|
78
|
+
voice_speed?: number | undefined;
|
|
79
|
+
responsiveness?: number | undefined;
|
|
80
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
81
|
+
webhook_url?: string | undefined;
|
|
82
|
+
boosted_keywords?: string[] | undefined;
|
|
58
83
|
};
|
|
59
84
|
|
|
60
85
|
export const inboundSchema: z.ZodType<
|
|
@@ -67,7 +92,12 @@ export namespace CreateAgentRequestBody$ {
|
|
|
67
92
|
llm_websocket_url: z.string(),
|
|
68
93
|
voice_id: z.string(),
|
|
69
94
|
enable_backchannel: z.boolean().optional(),
|
|
70
|
-
voice_temperature: z.number().optional()
|
|
95
|
+
voice_temperature: z.number().optional(),
|
|
96
|
+
voice_speed: z.number().optional(),
|
|
97
|
+
responsiveness: z.number().optional(),
|
|
98
|
+
ambient_sound: z.enum(['coffee-shop', 'convention-hall', 'summer-outdoor', 'mountain-outdoor', 'null']).optional(),
|
|
99
|
+
webhook_url: z.string().optional(),
|
|
100
|
+
boosted_keywords: z.array(z.string()).optional(),
|
|
71
101
|
})
|
|
72
102
|
.transform((v) => {
|
|
73
103
|
return {
|
|
@@ -76,6 +106,11 @@ export namespace CreateAgentRequestBody$ {
|
|
|
76
106
|
voiceId: v.voice_id,
|
|
77
107
|
...(v.enable_backchannel === undefined ? null : { enableBackchannel: v.enable_backchannel }),
|
|
78
108
|
...(v.voice_temperature === undefined ? null : { voiceTemperature: v.voice_temperature }),
|
|
109
|
+
...(v.voice_speed === undefined ? null : { voiceSpeed: v.voice_speed }),
|
|
110
|
+
...(v.responsiveness === undefined ? null : { responsiveness: v.responsiveness }),
|
|
111
|
+
...(v.ambient_sound === undefined ? null : { ambientSound: v.ambient_sound }),
|
|
112
|
+
...(v.webhook_url === undefined ? null : { webhookUrl: v.webhook_url }),
|
|
113
|
+
...(v.boosted_keywords === undefined ? null : { boostedKeywords: v.boosted_keywords }),
|
|
79
114
|
};
|
|
80
115
|
});
|
|
81
116
|
|
|
@@ -85,6 +120,11 @@ export namespace CreateAgentRequestBody$ {
|
|
|
85
120
|
voice_id: string;
|
|
86
121
|
enable_backchannel?: boolean | undefined;
|
|
87
122
|
voice_temperature?: number | undefined;
|
|
123
|
+
voice_speed?: number | undefined;
|
|
124
|
+
responsiveness?: number | undefined;
|
|
125
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
126
|
+
webhook_url?: string | undefined;
|
|
127
|
+
boosted_keywords?: string[] | undefined;
|
|
88
128
|
};
|
|
89
129
|
|
|
90
130
|
export const outboundSchema: z.ZodType<
|
|
@@ -97,7 +137,12 @@ export namespace CreateAgentRequestBody$ {
|
|
|
97
137
|
llmWebsocketUrl: z.string(),
|
|
98
138
|
voiceId: z.string(),
|
|
99
139
|
enableBackchannel: z.boolean().optional(),
|
|
100
|
-
voiceTemperature: z.number().optional()
|
|
140
|
+
voiceTemperature: z.number().optional(),
|
|
141
|
+
voiceSpeed: z.number().optional(),
|
|
142
|
+
responsiveness: z.number().optional(),
|
|
143
|
+
ambientSound: z.enum(['coffee-shop', 'convention-hall', 'summer-outdoor', 'mountain-outdoor', 'null']).optional(),
|
|
144
|
+
webhookUrl: z.string().optional(),
|
|
145
|
+
boostedKeywords: z.array(z.string()).optional(),
|
|
101
146
|
})
|
|
102
147
|
.transform((v) => {
|
|
103
148
|
return {
|
|
@@ -106,6 +151,11 @@ export namespace CreateAgentRequestBody$ {
|
|
|
106
151
|
voice_id: v.voiceId,
|
|
107
152
|
...(v.enableBackchannel === undefined ? null : { enable_backchannel: v.enableBackchannel }),
|
|
108
153
|
...(v.voiceTemperature === undefined ? null : { voice_temperature: v.voiceTemperature }),
|
|
154
|
+
...(v.voiceSpeed === undefined ? null : { voice_speed: v.voiceSpeed }),
|
|
155
|
+
...(v.responsiveness === undefined ? null : { responsiveness: v.responsiveness }),
|
|
156
|
+
...(v.ambientSound === undefined ? null : { ambient_sound: v.ambientSound }),
|
|
157
|
+
...(v.webhookUrl === undefined ? null : { webhook_url: v.webhookUrl }),
|
|
158
|
+
...(v.boostedKeywords === undefined ? null : { boosted_keywords: v.boostedKeywords }), // Correctly transformed
|
|
109
159
|
};
|
|
110
160
|
});
|
|
111
161
|
}
|
|
@@ -28,6 +28,10 @@ export type RegisterCallRequestBody = {
|
|
|
28
28
|
* The protocol how audio websocket read and send audio bytes.
|
|
29
29
|
*/
|
|
30
30
|
audioWebsocketProtocol: AudioWebsocketProtocol;
|
|
31
|
+
/**
|
|
32
|
+
* If users stay silent for a period, end the call. By default, it is set to 600,000 ms (10 min). The minimum value allowed is 10,000 ms (10 s).
|
|
33
|
+
*/
|
|
34
|
+
endCallAfterSilenceMs?: number | undefined;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
export type RegisterCallResponse = {
|
|
@@ -56,6 +60,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
56
60
|
audio_encoding: AudioEncoding;
|
|
57
61
|
sample_rate: number;
|
|
58
62
|
audio_websocket_protocol: AudioWebsocketProtocol;
|
|
63
|
+
end_call_after_silence_ms?: number | undefined;
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
export const inboundSchema: z.ZodType<
|
|
@@ -69,6 +74,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
69
74
|
audio_encoding: AudioEncoding$,
|
|
70
75
|
sample_rate: z.number().int(),
|
|
71
76
|
audio_websocket_protocol: AudioWebsocketProtocol$,
|
|
77
|
+
end_call_after_silence_ms: z.number().int().optional(),
|
|
72
78
|
})
|
|
73
79
|
.transform((v) => {
|
|
74
80
|
return {
|
|
@@ -76,6 +82,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
76
82
|
audioEncoding: v.audio_encoding,
|
|
77
83
|
sampleRate: v.sample_rate,
|
|
78
84
|
audioWebsocketProtocol: v.audio_websocket_protocol,
|
|
85
|
+
...(v.end_call_after_silence_ms === undefined ? null : { endCallAfterSilenceMs: v.end_call_after_silence_ms }),
|
|
79
86
|
};
|
|
80
87
|
});
|
|
81
88
|
|
|
@@ -84,6 +91,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
84
91
|
audio_encoding: components.AudioEncoding;
|
|
85
92
|
sample_rate: number;
|
|
86
93
|
audio_websocket_protocol: components.AudioWebsocketProtocol;
|
|
94
|
+
end_call_after_silence_ms?: number | undefined;
|
|
87
95
|
};
|
|
88
96
|
|
|
89
97
|
export const outboundSchema: z.ZodType<
|
|
@@ -96,6 +104,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
96
104
|
audioEncoding: AudioEncoding$,
|
|
97
105
|
sampleRate: z.number().int(),
|
|
98
106
|
audioWebsocketProtocol: AudioWebsocketProtocol$,
|
|
107
|
+
endCallAfterSilenceMs: z.number().int().optional(),
|
|
99
108
|
})
|
|
100
109
|
.transform((v) => {
|
|
101
110
|
return {
|
|
@@ -103,6 +112,7 @@ export namespace RegisterCallRequestBody$ {
|
|
|
103
112
|
audio_encoding: v.audioEncoding,
|
|
104
113
|
sample_rate: v.sampleRate,
|
|
105
114
|
audio_websocket_protocol: v.audioWebsocketProtocol,
|
|
115
|
+
...(v.endCallAfterSilenceMs === undefined ? null : { end_call_after_silence_ms: v.endCallAfterSilenceMs }),
|
|
106
116
|
};
|
|
107
117
|
});
|
|
108
118
|
}
|
|
@@ -26,6 +26,26 @@ export type UpdateAgentRequestBody = {
|
|
|
26
26
|
* Controls how stable the voice is.
|
|
27
27
|
*/
|
|
28
28
|
voiceTemperature?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.
|
|
31
|
+
*/
|
|
32
|
+
voiceSpeed?: number | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.
|
|
35
|
+
*/
|
|
36
|
+
responsiveness?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* If set, will add ambient environment sound to the call to make experience more realistic.
|
|
39
|
+
*/
|
|
40
|
+
ambientSound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The webhook for agent to listen to call events. See what events it would get at webhook doc. If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to string null to remove webhook url from this agent.
|
|
43
|
+
*/
|
|
44
|
+
webhookUrl?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Provide a customized list of keywords to expand our models' vocabulary, aimed at improving performance and understanding within your specific context.
|
|
47
|
+
*/
|
|
48
|
+
boostedKeywords?: string[] | undefined;
|
|
29
49
|
};
|
|
30
50
|
|
|
31
51
|
/** @internal */
|
|
@@ -36,6 +56,11 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
36
56
|
voice_id?: string | undefined;
|
|
37
57
|
enable_backchannel?: boolean | undefined;
|
|
38
58
|
voice_temperature?: number | undefined;
|
|
59
|
+
voice_speed?: number | undefined;
|
|
60
|
+
responsiveness?: number | undefined;
|
|
61
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
62
|
+
webhook_url?: string | undefined;
|
|
63
|
+
boosted_keywords?: string[] | undefined;
|
|
39
64
|
};
|
|
40
65
|
|
|
41
66
|
export const inboundSchema: z.ZodType<
|
|
@@ -48,7 +73,12 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
48
73
|
llm_websocket_url: z.string(),
|
|
49
74
|
voice_id: z.string(),
|
|
50
75
|
enable_backchannel: z.boolean().optional(),
|
|
51
|
-
voice_temperature: z.number().optional()
|
|
76
|
+
voice_temperature: z.number().optional(),
|
|
77
|
+
voice_speed: z.number().optional(),
|
|
78
|
+
responsiveness: z.number().optional(),
|
|
79
|
+
ambient_sound: z.enum(['coffee-shop', 'convention-hall', 'summer-outdoor', 'mountain-outdoor', 'null']).optional(),
|
|
80
|
+
webhook_url: z.string().optional(),
|
|
81
|
+
boosted_keywords: z.array(z.string()).optional(),
|
|
52
82
|
})
|
|
53
83
|
.transform((v) => {
|
|
54
84
|
return {
|
|
@@ -59,6 +89,12 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
59
89
|
...(v.voice_id === undefined ? null : { voiceId: v.voice_id }),
|
|
60
90
|
...(v.enable_backchannel === undefined ? null : { enableBackchannel: v.enable_backchannel }),
|
|
61
91
|
...(v.voice_temperature === undefined ? null : { voiceTemperature: v.voice_temperature }),
|
|
92
|
+
...(v.voice_temperature === undefined ? null : { voiceTemperature: v.voice_temperature }),
|
|
93
|
+
...(v.voice_speed === undefined ? null : { voiceSpeed: v.voice_speed }),
|
|
94
|
+
...(v.responsiveness === undefined ? null : { responsiveness: v.responsiveness }),
|
|
95
|
+
...(v.ambient_sound === undefined ? null : { ambientSound: v.ambient_sound }),
|
|
96
|
+
...(v.webhook_url === undefined ? null : { webhookUrl: v.webhook_url }),
|
|
97
|
+
...(v.boosted_keywords === undefined ? null : { boostedKeywords: v.boosted_keywords }),
|
|
62
98
|
};
|
|
63
99
|
});
|
|
64
100
|
|
|
@@ -68,6 +104,11 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
68
104
|
voice_id?: string | undefined;
|
|
69
105
|
enable_backchannel?: boolean | undefined;
|
|
70
106
|
voice_temperature?: number | undefined;
|
|
107
|
+
voice_speed?: number | undefined;
|
|
108
|
+
responsiveness?: number | undefined;
|
|
109
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'null' | undefined;
|
|
110
|
+
webhook_url?: string | undefined;
|
|
111
|
+
boosted_keywords?: string[] | undefined;
|
|
71
112
|
};
|
|
72
113
|
|
|
73
114
|
export const outboundSchema: z.ZodType<
|
|
@@ -80,7 +121,12 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
80
121
|
llmWebsocketUrl: z.string().optional(),
|
|
81
122
|
voiceId: z.string().optional(),
|
|
82
123
|
enableBackchannel: z.boolean().optional(),
|
|
83
|
-
voiceTemperature: z.number().optional()
|
|
124
|
+
voiceTemperature: z.number().optional(),
|
|
125
|
+
voiceSpeed: z.number().optional(),
|
|
126
|
+
responsiveness: z.number().optional(),
|
|
127
|
+
ambientSound: z.enum(['coffee-shop', 'convention-hall', 'summer-outdoor', 'mountain-outdoor', 'null']).optional(),
|
|
128
|
+
webhookUrl: z.string().optional(),
|
|
129
|
+
boostedKeywords: z.array(z.string()).optional(),
|
|
84
130
|
})
|
|
85
131
|
.transform((v) => {
|
|
86
132
|
return {
|
|
@@ -91,6 +137,11 @@ export namespace UpdateAgentRequestBody$ {
|
|
|
91
137
|
...(v.voiceId === undefined ? null : { voice_id: v.voiceId }),
|
|
92
138
|
...(v.enableBackchannel === undefined ? null : { enable_backchannel: v.enableBackchannel }),
|
|
93
139
|
...(v.voiceTemperature === undefined ? null : { voice_temperature: v.voiceTemperature }),
|
|
140
|
+
...(v.voiceSpeed === undefined ? null : { voice_speed: v.voiceSpeed }),
|
|
141
|
+
...(v.responsiveness === undefined ? null : { responsiveness: v.responsiveness }),
|
|
142
|
+
...(v.ambientSound === undefined ? null : { ambient_sound: v.ambientSound }),
|
|
143
|
+
...(v.webhookUrl === undefined ? null : { webhook_url: v.webhookUrl }),
|
|
144
|
+
...(v.boostedKeywords === undefined ? null : { boosted_keywords: v.boostedKeywords }),
|
|
94
145
|
};
|
|
95
146
|
});
|
|
96
147
|
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
|
|
6
6
|
import * as enc$ from "../lib/encodings";
|
|
7
7
|
import { HTTPClient } from "../lib/http";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
|
9
|
+
import { symmetric } from "../lib/secureWebhooks";
|
|
9
10
|
import * as errors from "../models/errors";
|
|
10
11
|
import * as operations from "../models/operations";
|
|
11
12
|
|
|
@@ -22,6 +23,18 @@ export class RetellClient extends ClientSDK {
|
|
|
22
23
|
void this.options$;
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
verify(
|
|
27
|
+
body: string,
|
|
28
|
+
apiKey: string,
|
|
29
|
+
signature: string,
|
|
30
|
+
): boolean {
|
|
31
|
+
return symmetric.verify(
|
|
32
|
+
body,
|
|
33
|
+
apiKey,
|
|
34
|
+
signature
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
25
38
|
/**
|
|
26
39
|
* Create a new agent
|
|
27
40
|
*/
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export type AgentNoDefaultNoRequired = {
|
|
3
|
-
/**
|
|
4
|
-
* The name of the agent. Only used for your own reference.
|
|
5
|
-
*/
|
|
6
|
-
agentName?: string | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Pre-defined message for agent to say in the begining of call. Only used when `enable_begin_message` is true. When empty, agent would wait for user to talk first.
|
|
9
|
-
*/
|
|
10
|
-
beginMessage?: string | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the agent begins the call with a pre-defined message. When this is false, the agent will still start the call, but with a dynamic message. If you wish for user to be the first to talk, set this to true and set `begin_message` as empty string.
|
|
13
|
-
*/
|
|
14
|
-
enableBeginMessage?: boolean | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the agent can end a call. If false, the agent would never end a call.
|
|
17
|
-
*/
|
|
18
|
-
enableEndCall?: boolean | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the agent attempts to end the call with a pre-defined message. When this is false, the agent might still be the last one speaking in the call, but the massage can be dynamic.
|
|
21
|
-
*/
|
|
22
|
-
enableEndMessage?: boolean | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Pre-defined message for agent to say when agent ends the call. Only used when `enable_end_call` and `enable_end_message` is true. If you wish for agent to hang up without saying anything, set this to empty string.
|
|
25
|
-
*/
|
|
26
|
-
endMessage?: string | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* The prompt agent will follow. Check out [Prompt Best Practices](/features/prompt). Can use `${YOUR_PARAM_NAME}` to represent dynamic data that would get injected at each call. Learn more about [Agent Prompt Parameters](/features/prompt#prompt-parameters).
|
|
29
|
-
*/
|
|
30
|
-
prompt?: string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Unique voice id used for the agent. Find list of available voices and their characteristics in [Voices](/features/voices).
|
|
33
|
-
*/
|
|
34
|
-
voiceId?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
/** @internal */
|
|
37
|
-
export declare namespace AgentNoDefaultNoRequired$ {
|
|
38
|
-
type Inbound = {
|
|
39
|
-
agent_name?: string | undefined;
|
|
40
|
-
begin_message?: string | undefined;
|
|
41
|
-
enable_begin_message?: boolean | undefined;
|
|
42
|
-
enable_end_call?: boolean | undefined;
|
|
43
|
-
enable_end_message?: boolean | undefined;
|
|
44
|
-
end_message?: string | undefined;
|
|
45
|
-
prompt?: string | undefined;
|
|
46
|
-
voice_id?: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
const inboundSchema: z.ZodType<AgentNoDefaultNoRequired, z.ZodTypeDef, Inbound>;
|
|
49
|
-
type Outbound = {
|
|
50
|
-
agent_name?: string | undefined;
|
|
51
|
-
begin_message?: string | undefined;
|
|
52
|
-
enable_begin_message?: boolean | undefined;
|
|
53
|
-
enable_end_call?: boolean | undefined;
|
|
54
|
-
enable_end_message?: boolean | undefined;
|
|
55
|
-
end_message?: string | undefined;
|
|
56
|
-
prompt?: string | undefined;
|
|
57
|
-
voice_id?: string | undefined;
|
|
58
|
-
};
|
|
59
|
-
const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AgentNoDefaultNoRequired>;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=agentnodefaultnorequired.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agentnodefaultnorequired.d.ts","sourceRoot":"","sources":["../../src/models/components/agentnodefaultnorequired.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,wBAAwB,GAAG;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,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code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AgentNoDefaultNoRequired$ = void 0;
|
|
7
|
-
const zod_1 = require("zod");
|
|
8
|
-
/** @internal */
|
|
9
|
-
var AgentNoDefaultNoRequired$;
|
|
10
|
-
(function (AgentNoDefaultNoRequired$) {
|
|
11
|
-
AgentNoDefaultNoRequired$.inboundSchema = zod_1.z
|
|
12
|
-
.object({
|
|
13
|
-
agent_name: zod_1.z.string().optional(),
|
|
14
|
-
begin_message: zod_1.z.string().optional(),
|
|
15
|
-
enable_begin_message: zod_1.z.boolean().optional(),
|
|
16
|
-
enable_end_call: zod_1.z.boolean().optional(),
|
|
17
|
-
enable_end_message: zod_1.z.boolean().optional(),
|
|
18
|
-
end_message: zod_1.z.string().optional(),
|
|
19
|
-
prompt: zod_1.z.string().optional(),
|
|
20
|
-
voice_id: zod_1.z.string().optional(),
|
|
21
|
-
})
|
|
22
|
-
.transform((v) => {
|
|
23
|
-
return {
|
|
24
|
-
...(v.agent_name === undefined ? null : { agentName: v.agent_name }),
|
|
25
|
-
...(v.begin_message === undefined ? null : { beginMessage: v.begin_message }),
|
|
26
|
-
...(v.enable_begin_message === undefined
|
|
27
|
-
? null
|
|
28
|
-
: { enableBeginMessage: v.enable_begin_message }),
|
|
29
|
-
...(v.enable_end_call === undefined ? null : { enableEndCall: v.enable_end_call }),
|
|
30
|
-
...(v.enable_end_message === undefined
|
|
31
|
-
? null
|
|
32
|
-
: { enableEndMessage: v.enable_end_message }),
|
|
33
|
-
...(v.end_message === undefined ? null : { endMessage: v.end_message }),
|
|
34
|
-
...(v.prompt === undefined ? null : { prompt: v.prompt }),
|
|
35
|
-
...(v.voice_id === undefined ? null : { voiceId: v.voice_id }),
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
AgentNoDefaultNoRequired$.outboundSchema = zod_1.z
|
|
39
|
-
.object({
|
|
40
|
-
agentName: zod_1.z.string().optional(),
|
|
41
|
-
beginMessage: zod_1.z.string().optional(),
|
|
42
|
-
enableBeginMessage: zod_1.z.boolean().optional(),
|
|
43
|
-
enableEndCall: zod_1.z.boolean().optional(),
|
|
44
|
-
enableEndMessage: zod_1.z.boolean().optional(),
|
|
45
|
-
endMessage: zod_1.z.string().optional(),
|
|
46
|
-
prompt: zod_1.z.string().optional(),
|
|
47
|
-
voiceId: zod_1.z.string().optional(),
|
|
48
|
-
})
|
|
49
|
-
.transform((v) => {
|
|
50
|
-
return {
|
|
51
|
-
...(v.agentName === undefined ? null : { agent_name: v.agentName }),
|
|
52
|
-
...(v.beginMessage === undefined ? null : { begin_message: v.beginMessage }),
|
|
53
|
-
...(v.enableBeginMessage === undefined
|
|
54
|
-
? null
|
|
55
|
-
: { enable_begin_message: v.enableBeginMessage }),
|
|
56
|
-
...(v.enableEndCall === undefined ? null : { enable_end_call: v.enableEndCall }),
|
|
57
|
-
...(v.enableEndMessage === undefined
|
|
58
|
-
? null
|
|
59
|
-
: { enable_end_message: v.enableEndMessage }),
|
|
60
|
-
...(v.endMessage === undefined ? null : { end_message: v.endMessage }),
|
|
61
|
-
...(v.prompt === undefined ? null : { prompt: v.prompt }),
|
|
62
|
-
...(v.voiceId === undefined ? null : { voice_id: v.voiceId }),
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
})(AgentNoDefaultNoRequired$ || (exports.AgentNoDefaultNoRequired$ = AgentNoDefaultNoRequired$ = {}));
|
|
66
|
-
//# sourceMappingURL=agentnodefaultnorequired.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agentnodefaultnorequired.js","sourceRoot":"","sources":["../../src/models/components/agentnodefaultnorequired.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6BAAwB;AAqCxB,gBAAgB;AAChB,IAAiB,yBAAyB,CA8EzC;AA9ED,WAAiB,yBAAyB;IAYzB,uCAAa,GAA+D,OAAC;SACrF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