vapi_client/models/
server_message_message.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17/// ServerMessageMessage : These are all the messages that can be sent to your server before, after and during the call. Configure the messages you'd like to receive in `assistant.serverMessages`.  The server where the message is sent is determined by the following precedence order:  1. `tool.server.url` (if configured, and only for \"tool-calls\" message) 2. `assistant.serverUrl` (if configure) 3. `phoneNumber.serverUrl` (if configured) 4. `org.serverUrl` (if configured)
18/// These are all the messages that can be sent to your server before, after and during the call. Configure the messages you'd like to receive in `assistant.serverMessages`.  The server where the message is sent is determined by the following precedence order:  1. `tool.server.url` (if configured, and only for \"tool-calls\" message) 2. `assistant.serverUrl` (if configure) 3. `phoneNumber.serverUrl` (if configured) 4. `org.serverUrl` (if configured)
19#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
20#[serde(untagged)]
21pub enum ServerMessageMessage {
22    ServerMessageAssistantRequest(models::ServerMessageAssistantRequest),
23    ServerMessageConversationUpdate(models::ServerMessageConversationUpdate),
24    ServerMessageEndOfCallReport(models::ServerMessageEndOfCallReport),
25    ServerMessageHang(models::ServerMessageHang),
26    ServerMessageKnowledgeBaseRequest(models::ServerMessageKnowledgeBaseRequest),
27    ServerMessageModelOutput(models::ServerMessageModelOutput),
28    ServerMessagePhoneCallControl(models::ServerMessagePhoneCallControl),
29    ServerMessageSpeechUpdate(models::ServerMessageSpeechUpdate),
30    ServerMessageStatusUpdate(models::ServerMessageStatusUpdate),
31    ServerMessageToolCalls(models::ServerMessageToolCalls),
32    ServerMessageTransferDestinationRequest(models::ServerMessageTransferDestinationRequest),
33    ServerMessageTransferUpdate(models::ServerMessageTransferUpdate),
34    ServerMessageTranscript(models::ServerMessageTranscript),
35    ServerMessageUserInterrupted(models::ServerMessageUserInterrupted),
36    ServerMessageLanguageChangeDetected(models::ServerMessageLanguageChangeDetected),
37    ServerMessageVoiceInput(models::ServerMessageVoiceInput),
38    ServerMessageVoiceRequest(models::ServerMessageVoiceRequest),
39}
40
41impl Default for ServerMessageMessage {
42    fn default() -> Self {
43        Self::ServerMessageAssistantRequest(Default::default())
44    }
45}
46/// This is the type of the message. \"assistant-request\" is sent to fetch assistant configuration for an incoming call.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
48pub enum Type {
49    #[serde(rename = "assistant-request")]
50    AssistantRequest,
51    #[serde(rename = "conversation-update")]
52    ConversationUpdate,
53    #[serde(rename = "end-of-call-report")]
54    EndOfCallReport,
55    #[serde(rename = "hang")]
56    Hang,
57    #[serde(rename = "knowledge-base-request")]
58    KnowledgeBaseRequest,
59    #[serde(rename = "model-output")]
60    ModelOutput,
61    #[serde(rename = "phone-call-control")]
62    PhoneCallControl,
63    #[serde(rename = "speech-update")]
64    SpeechUpdate,
65    #[serde(rename = "status-update")]
66    StatusUpdate,
67    #[serde(rename = "tool-calls")]
68    ToolCalls,
69    #[serde(rename = "transfer-destination-request")]
70    TransferDestinationRequest,
71    #[serde(rename = "transfer-update")]
72    TransferUpdate,
73    #[serde(rename = "transcript")]
74    Transcript,
75    #[serde(rename = "transcript[transcriptType=\"final\"]")]
76    TranscriptLeftSquareBracketTranscriptTypeEqualDoubleQuoteFinalDoubleQuoteRightSquareBracket,
77    #[serde(rename = "user-interrupted")]
78    UserInterrupted,
79    #[serde(rename = "language-change-detected")]
80    LanguageChangeDetected,
81    #[serde(rename = "voice-input")]
82    VoiceInput,
83    #[serde(rename = "voice-request")]
84    VoiceRequest,
85}
86
87impl Default for Type {
88    fn default() -> Type {
89        Self::AssistantRequest
90    }
91}
92/// This is the reason the call ended. This is only sent if the status is \"ended\".
93#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
94pub enum EndedReason {
95    #[serde(rename = "assistant-not-valid")]
96    AssistantNotValid,
97    #[serde(rename = "assistant-not-provided")]
98    AssistantNotProvided,
99    #[serde(rename = "call-start-error-neither-assistant-nor-server-set")]
100    CallStartErrorNeitherAssistantNorServerSet,
101    #[serde(rename = "assistant-request-failed")]
102    AssistantRequestFailed,
103    #[serde(rename = "assistant-request-returned-error")]
104    AssistantRequestReturnedError,
105    #[serde(rename = "assistant-request-returned-unspeakable-error")]
106    AssistantRequestReturnedUnspeakableError,
107    #[serde(rename = "assistant-request-returned-invalid-assistant")]
108    AssistantRequestReturnedInvalidAssistant,
109    #[serde(rename = "assistant-request-returned-no-assistant")]
110    AssistantRequestReturnedNoAssistant,
111    #[serde(rename = "assistant-request-returned-forwarding-phone-number")]
112    AssistantRequestReturnedForwardingPhoneNumber,
113    #[serde(rename = "assistant-ended-call")]
114    AssistantEndedCall,
115    #[serde(rename = "assistant-said-end-call-phrase")]
116    AssistantSaidEndCallPhrase,
117    #[serde(rename = "assistant-ended-call-with-hangup-task")]
118    AssistantEndedCallWithHangupTask,
119    #[serde(rename = "assistant-forwarded-call")]
120    AssistantForwardedCall,
121    #[serde(rename = "assistant-join-timed-out")]
122    AssistantJoinTimedOut,
123    #[serde(rename = "customer-busy")]
124    CustomerBusy,
125    #[serde(rename = "customer-ended-call")]
126    CustomerEndedCall,
127    #[serde(rename = "customer-did-not-answer")]
128    CustomerDidNotAnswer,
129    #[serde(rename = "customer-did-not-give-microphone-permission")]
130    CustomerDidNotGiveMicrophonePermission,
131    #[serde(rename = "assistant-said-message-with-end-call-enabled")]
132    AssistantSaidMessageWithEndCallEnabled,
133    #[serde(rename = "exceeded-max-duration")]
134    ExceededMaxDuration,
135    #[serde(rename = "manually-canceled")]
136    ManuallyCanceled,
137    #[serde(rename = "phone-call-provider-closed-websocket")]
138    PhoneCallProviderClosedWebsocket,
139    #[serde(rename = "db-error")]
140    DbError,
141    #[serde(rename = "assistant-not-found")]
142    AssistantNotFound,
143    #[serde(rename = "license-check-failed")]
144    LicenseCheckFailed,
145    #[serde(rename = "pipeline-error-openai-voice-failed")]
146    PipelineErrorOpenaiVoiceFailed,
147    #[serde(rename = "pipeline-error-cartesia-voice-failed")]
148    PipelineErrorCartesiaVoiceFailed,
149    #[serde(rename = "pipeline-error-deepgram-voice-failed")]
150    PipelineErrorDeepgramVoiceFailed,
151    #[serde(rename = "pipeline-error-eleven-labs-voice-failed")]
152    PipelineErrorElevenLabsVoiceFailed,
153    #[serde(rename = "pipeline-error-playht-voice-failed")]
154    PipelineErrorPlayhtVoiceFailed,
155    #[serde(rename = "pipeline-error-lmnt-voice-failed")]
156    PipelineErrorLmntVoiceFailed,
157    #[serde(rename = "pipeline-error-azure-voice-failed")]
158    PipelineErrorAzureVoiceFailed,
159    #[serde(rename = "pipeline-error-rime-ai-voice-failed")]
160    PipelineErrorRimeAiVoiceFailed,
161    #[serde(rename = "pipeline-error-neets-voice-failed")]
162    PipelineErrorNeetsVoiceFailed,
163    #[serde(rename = "pipeline-error-smallest-ai-voice-failed")]
164    PipelineErrorSmallestAiVoiceFailed,
165    #[serde(rename = "pipeline-error-neuphonic-voice-failed")]
166    PipelineErrorNeuphonicVoiceFailed,
167    #[serde(rename = "pipeline-error-hume-voice-failed")]
168    PipelineErrorHumeVoiceFailed,
169    #[serde(rename = "pipeline-error-deepgram-transcriber-failed")]
170    PipelineErrorDeepgramTranscriberFailed,
171    #[serde(rename = "pipeline-error-gladia-transcriber-failed")]
172    PipelineErrorGladiaTranscriberFailed,
173    #[serde(rename = "pipeline-error-speechmatics-transcriber-failed")]
174    PipelineErrorSpeechmaticsTranscriberFailed,
175    #[serde(rename = "pipeline-error-assembly-ai-transcriber-failed")]
176    PipelineErrorAssemblyAiTranscriberFailed,
177    #[serde(rename = "pipeline-error-talkscriber-transcriber-failed")]
178    PipelineErrorTalkscriberTranscriberFailed,
179    #[serde(rename = "pipeline-error-azure-speech-transcriber-failed")]
180    PipelineErrorAzureSpeechTranscriberFailed,
181    #[serde(rename = "pipeline-error-vapi-llm-failed")]
182    PipelineErrorVapiLlmFailed,
183    #[serde(rename = "pipeline-error-vapi-400-bad-request-validation-failed")]
184    PipelineErrorVapi400BadRequestValidationFailed,
185    #[serde(rename = "pipeline-error-vapi-401-unauthorized")]
186    PipelineErrorVapi401Unauthorized,
187    #[serde(rename = "pipeline-error-vapi-403-model-access-denied")]
188    PipelineErrorVapi403ModelAccessDenied,
189    #[serde(rename = "pipeline-error-vapi-429-exceeded-quota")]
190    PipelineErrorVapi429ExceededQuota,
191    #[serde(rename = "pipeline-error-vapi-500-server-error")]
192    PipelineErrorVapi500ServerError,
193    #[serde(rename = "pipeline-no-available-model")]
194    PipelineNoAvailableModel,
195    #[serde(rename = "worker-shutdown")]
196    WorkerShutdown,
197    #[serde(rename = "unknown-error")]
198    UnknownError,
199    #[serde(rename = "vonage-disconnected")]
200    VonageDisconnected,
201    #[serde(rename = "vonage-failed-to-connect-call")]
202    VonageFailedToConnectCall,
203    #[serde(rename = "phone-call-provider-bypass-enabled-but-no-call-received")]
204    PhoneCallProviderBypassEnabledButNoCallReceived,
205    #[serde(rename = "vapifault-phone-call-worker-setup-socket-error")]
206    VapifaultPhoneCallWorkerSetupSocketError,
207    #[serde(rename = "vapifault-phone-call-worker-worker-setup-socket-timeout")]
208    VapifaultPhoneCallWorkerWorkerSetupSocketTimeout,
209    #[serde(rename = "vapifault-phone-call-worker-could-not-find-call")]
210    VapifaultPhoneCallWorkerCouldNotFindCall,
211    #[serde(rename = "vapifault-transport-never-connected")]
212    VapifaultTransportNeverConnected,
213    #[serde(rename = "vapifault-web-call-worker-setup-failed")]
214    VapifaultWebCallWorkerSetupFailed,
215    #[serde(rename = "vapifault-transport-connected-but-call-not-active")]
216    VapifaultTransportConnectedButCallNotActive,
217    #[serde(rename = "vapifault-call-started-but-connection-to-transport-missing")]
218    VapifaultCallStartedButConnectionToTransportMissing,
219    #[serde(rename = "pipeline-error-openai-llm-failed")]
220    PipelineErrorOpenaiLlmFailed,
221    #[serde(rename = "pipeline-error-azure-openai-llm-failed")]
222    PipelineErrorAzureOpenaiLlmFailed,
223    #[serde(rename = "pipeline-error-groq-llm-failed")]
224    PipelineErrorGroqLlmFailed,
225    #[serde(rename = "pipeline-error-google-llm-failed")]
226    PipelineErrorGoogleLlmFailed,
227    #[serde(rename = "pipeline-error-xai-llm-failed")]
228    PipelineErrorXaiLlmFailed,
229    #[serde(rename = "pipeline-error-mistral-llm-failed")]
230    PipelineErrorMistralLlmFailed,
231    #[serde(rename = "pipeline-error-inflection-ai-llm-failed")]
232    PipelineErrorInflectionAiLlmFailed,
233    #[serde(rename = "pipeline-error-cerebras-llm-failed")]
234    PipelineErrorCerebrasLlmFailed,
235    #[serde(rename = "pipeline-error-deep-seek-llm-failed")]
236    PipelineErrorDeepSeekLlmFailed,
237    #[serde(rename = "pipeline-error-openai-400-bad-request-validation-failed")]
238    PipelineErrorOpenai400BadRequestValidationFailed,
239    #[serde(rename = "pipeline-error-openai-401-unauthorized")]
240    PipelineErrorOpenai401Unauthorized,
241    #[serde(rename = "pipeline-error-openai-403-model-access-denied")]
242    PipelineErrorOpenai403ModelAccessDenied,
243    #[serde(rename = "pipeline-error-openai-429-exceeded-quota")]
244    PipelineErrorOpenai429ExceededQuota,
245    #[serde(rename = "pipeline-error-openai-500-server-error")]
246    PipelineErrorOpenai500ServerError,
247    #[serde(rename = "pipeline-error-google-400-bad-request-validation-failed")]
248    PipelineErrorGoogle400BadRequestValidationFailed,
249    #[serde(rename = "pipeline-error-google-401-unauthorized")]
250    PipelineErrorGoogle401Unauthorized,
251    #[serde(rename = "pipeline-error-google-403-model-access-denied")]
252    PipelineErrorGoogle403ModelAccessDenied,
253    #[serde(rename = "pipeline-error-google-429-exceeded-quota")]
254    PipelineErrorGoogle429ExceededQuota,
255    #[serde(rename = "pipeline-error-google-500-server-error")]
256    PipelineErrorGoogle500ServerError,
257    #[serde(rename = "pipeline-error-xai-400-bad-request-validation-failed")]
258    PipelineErrorXai400BadRequestValidationFailed,
259    #[serde(rename = "pipeline-error-xai-401-unauthorized")]
260    PipelineErrorXai401Unauthorized,
261    #[serde(rename = "pipeline-error-xai-403-model-access-denied")]
262    PipelineErrorXai403ModelAccessDenied,
263    #[serde(rename = "pipeline-error-xai-429-exceeded-quota")]
264    PipelineErrorXai429ExceededQuota,
265    #[serde(rename = "pipeline-error-xai-500-server-error")]
266    PipelineErrorXai500ServerError,
267    #[serde(rename = "pipeline-error-mistral-400-bad-request-validation-failed")]
268    PipelineErrorMistral400BadRequestValidationFailed,
269    #[serde(rename = "pipeline-error-mistral-401-unauthorized")]
270    PipelineErrorMistral401Unauthorized,
271    #[serde(rename = "pipeline-error-mistral-403-model-access-denied")]
272    PipelineErrorMistral403ModelAccessDenied,
273    #[serde(rename = "pipeline-error-mistral-429-exceeded-quota")]
274    PipelineErrorMistral429ExceededQuota,
275    #[serde(rename = "pipeline-error-mistral-500-server-error")]
276    PipelineErrorMistral500ServerError,
277    #[serde(rename = "pipeline-error-inflection-ai-400-bad-request-validation-failed")]
278    PipelineErrorInflectionAi400BadRequestValidationFailed,
279    #[serde(rename = "pipeline-error-inflection-ai-401-unauthorized")]
280    PipelineErrorInflectionAi401Unauthorized,
281    #[serde(rename = "pipeline-error-inflection-ai-403-model-access-denied")]
282    PipelineErrorInflectionAi403ModelAccessDenied,
283    #[serde(rename = "pipeline-error-inflection-ai-429-exceeded-quota")]
284    PipelineErrorInflectionAi429ExceededQuota,
285    #[serde(rename = "pipeline-error-inflection-ai-500-server-error")]
286    PipelineErrorInflectionAi500ServerError,
287    #[serde(rename = "pipeline-error-deep-seek-400-bad-request-validation-failed")]
288    PipelineErrorDeepSeek400BadRequestValidationFailed,
289    #[serde(rename = "pipeline-error-deep-seek-401-unauthorized")]
290    PipelineErrorDeepSeek401Unauthorized,
291    #[serde(rename = "pipeline-error-deep-seek-403-model-access-denied")]
292    PipelineErrorDeepSeek403ModelAccessDenied,
293    #[serde(rename = "pipeline-error-deep-seek-429-exceeded-quota")]
294    PipelineErrorDeepSeek429ExceededQuota,
295    #[serde(rename = "pipeline-error-deep-seek-500-server-error")]
296    PipelineErrorDeepSeek500ServerError,
297    #[serde(rename = "pipeline-error-azure-openai-400-bad-request-validation-failed")]
298    PipelineErrorAzureOpenai400BadRequestValidationFailed,
299    #[serde(rename = "pipeline-error-azure-openai-401-unauthorized")]
300    PipelineErrorAzureOpenai401Unauthorized,
301    #[serde(rename = "pipeline-error-azure-openai-403-model-access-denied")]
302    PipelineErrorAzureOpenai403ModelAccessDenied,
303    #[serde(rename = "pipeline-error-azure-openai-429-exceeded-quota")]
304    PipelineErrorAzureOpenai429ExceededQuota,
305    #[serde(rename = "pipeline-error-azure-openai-500-server-error")]
306    PipelineErrorAzureOpenai500ServerError,
307    #[serde(rename = "pipeline-error-groq-400-bad-request-validation-failed")]
308    PipelineErrorGroq400BadRequestValidationFailed,
309    #[serde(rename = "pipeline-error-groq-401-unauthorized")]
310    PipelineErrorGroq401Unauthorized,
311    #[serde(rename = "pipeline-error-groq-403-model-access-denied")]
312    PipelineErrorGroq403ModelAccessDenied,
313    #[serde(rename = "pipeline-error-groq-429-exceeded-quota")]
314    PipelineErrorGroq429ExceededQuota,
315    #[serde(rename = "pipeline-error-groq-500-server-error")]
316    PipelineErrorGroq500ServerError,
317    #[serde(rename = "pipeline-error-cerebras-400-bad-request-validation-failed")]
318    PipelineErrorCerebras400BadRequestValidationFailed,
319    #[serde(rename = "pipeline-error-cerebras-401-unauthorized")]
320    PipelineErrorCerebras401Unauthorized,
321    #[serde(rename = "pipeline-error-cerebras-403-model-access-denied")]
322    PipelineErrorCerebras403ModelAccessDenied,
323    #[serde(rename = "pipeline-error-cerebras-429-exceeded-quota")]
324    PipelineErrorCerebras429ExceededQuota,
325    #[serde(rename = "pipeline-error-cerebras-500-server-error")]
326    PipelineErrorCerebras500ServerError,
327    #[serde(rename = "pipeline-error-anthropic-400-bad-request-validation-failed")]
328    PipelineErrorAnthropic400BadRequestValidationFailed,
329    #[serde(rename = "pipeline-error-anthropic-401-unauthorized")]
330    PipelineErrorAnthropic401Unauthorized,
331    #[serde(rename = "pipeline-error-anthropic-403-model-access-denied")]
332    PipelineErrorAnthropic403ModelAccessDenied,
333    #[serde(rename = "pipeline-error-anthropic-429-exceeded-quota")]
334    PipelineErrorAnthropic429ExceededQuota,
335    #[serde(rename = "pipeline-error-anthropic-500-server-error")]
336    PipelineErrorAnthropic500ServerError,
337    #[serde(rename = "pipeline-error-anthropic-llm-failed")]
338    PipelineErrorAnthropicLlmFailed,
339    #[serde(rename = "pipeline-error-together-ai-400-bad-request-validation-failed")]
340    PipelineErrorTogetherAi400BadRequestValidationFailed,
341    #[serde(rename = "pipeline-error-together-ai-401-unauthorized")]
342    PipelineErrorTogetherAi401Unauthorized,
343    #[serde(rename = "pipeline-error-together-ai-403-model-access-denied")]
344    PipelineErrorTogetherAi403ModelAccessDenied,
345    #[serde(rename = "pipeline-error-together-ai-429-exceeded-quota")]
346    PipelineErrorTogetherAi429ExceededQuota,
347    #[serde(rename = "pipeline-error-together-ai-500-server-error")]
348    PipelineErrorTogetherAi500ServerError,
349    #[serde(rename = "pipeline-error-together-ai-llm-failed")]
350    PipelineErrorTogetherAiLlmFailed,
351    #[serde(rename = "pipeline-error-anyscale-400-bad-request-validation-failed")]
352    PipelineErrorAnyscale400BadRequestValidationFailed,
353    #[serde(rename = "pipeline-error-anyscale-401-unauthorized")]
354    PipelineErrorAnyscale401Unauthorized,
355    #[serde(rename = "pipeline-error-anyscale-403-model-access-denied")]
356    PipelineErrorAnyscale403ModelAccessDenied,
357    #[serde(rename = "pipeline-error-anyscale-429-exceeded-quota")]
358    PipelineErrorAnyscale429ExceededQuota,
359    #[serde(rename = "pipeline-error-anyscale-500-server-error")]
360    PipelineErrorAnyscale500ServerError,
361    #[serde(rename = "pipeline-error-anyscale-llm-failed")]
362    PipelineErrorAnyscaleLlmFailed,
363    #[serde(rename = "pipeline-error-openrouter-400-bad-request-validation-failed")]
364    PipelineErrorOpenrouter400BadRequestValidationFailed,
365    #[serde(rename = "pipeline-error-openrouter-401-unauthorized")]
366    PipelineErrorOpenrouter401Unauthorized,
367    #[serde(rename = "pipeline-error-openrouter-403-model-access-denied")]
368    PipelineErrorOpenrouter403ModelAccessDenied,
369    #[serde(rename = "pipeline-error-openrouter-429-exceeded-quota")]
370    PipelineErrorOpenrouter429ExceededQuota,
371    #[serde(rename = "pipeline-error-openrouter-500-server-error")]
372    PipelineErrorOpenrouter500ServerError,
373    #[serde(rename = "pipeline-error-openrouter-llm-failed")]
374    PipelineErrorOpenrouterLlmFailed,
375    #[serde(rename = "pipeline-error-perplexity-ai-400-bad-request-validation-failed")]
376    PipelineErrorPerplexityAi400BadRequestValidationFailed,
377    #[serde(rename = "pipeline-error-perplexity-ai-401-unauthorized")]
378    PipelineErrorPerplexityAi401Unauthorized,
379    #[serde(rename = "pipeline-error-perplexity-ai-403-model-access-denied")]
380    PipelineErrorPerplexityAi403ModelAccessDenied,
381    #[serde(rename = "pipeline-error-perplexity-ai-429-exceeded-quota")]
382    PipelineErrorPerplexityAi429ExceededQuota,
383    #[serde(rename = "pipeline-error-perplexity-ai-500-server-error")]
384    PipelineErrorPerplexityAi500ServerError,
385    #[serde(rename = "pipeline-error-perplexity-ai-llm-failed")]
386    PipelineErrorPerplexityAiLlmFailed,
387    #[serde(rename = "pipeline-error-deepinfra-400-bad-request-validation-failed")]
388    PipelineErrorDeepinfra400BadRequestValidationFailed,
389    #[serde(rename = "pipeline-error-deepinfra-401-unauthorized")]
390    PipelineErrorDeepinfra401Unauthorized,
391    #[serde(rename = "pipeline-error-deepinfra-403-model-access-denied")]
392    PipelineErrorDeepinfra403ModelAccessDenied,
393    #[serde(rename = "pipeline-error-deepinfra-429-exceeded-quota")]
394    PipelineErrorDeepinfra429ExceededQuota,
395    #[serde(rename = "pipeline-error-deepinfra-500-server-error")]
396    PipelineErrorDeepinfra500ServerError,
397    #[serde(rename = "pipeline-error-deepinfra-llm-failed")]
398    PipelineErrorDeepinfraLlmFailed,
399    #[serde(rename = "pipeline-error-runpod-400-bad-request-validation-failed")]
400    PipelineErrorRunpod400BadRequestValidationFailed,
401    #[serde(rename = "pipeline-error-runpod-401-unauthorized")]
402    PipelineErrorRunpod401Unauthorized,
403    #[serde(rename = "pipeline-error-runpod-403-model-access-denied")]
404    PipelineErrorRunpod403ModelAccessDenied,
405    #[serde(rename = "pipeline-error-runpod-429-exceeded-quota")]
406    PipelineErrorRunpod429ExceededQuota,
407    #[serde(rename = "pipeline-error-runpod-500-server-error")]
408    PipelineErrorRunpod500ServerError,
409    #[serde(rename = "pipeline-error-runpod-llm-failed")]
410    PipelineErrorRunpodLlmFailed,
411    #[serde(rename = "pipeline-error-custom-llm-400-bad-request-validation-failed")]
412    PipelineErrorCustomLlm400BadRequestValidationFailed,
413    #[serde(rename = "pipeline-error-custom-llm-401-unauthorized")]
414    PipelineErrorCustomLlm401Unauthorized,
415    #[serde(rename = "pipeline-error-custom-llm-403-model-access-denied")]
416    PipelineErrorCustomLlm403ModelAccessDenied,
417    #[serde(rename = "pipeline-error-custom-llm-429-exceeded-quota")]
418    PipelineErrorCustomLlm429ExceededQuota,
419    #[serde(rename = "pipeline-error-custom-llm-500-server-error")]
420    PipelineErrorCustomLlm500ServerError,
421    #[serde(rename = "pipeline-error-custom-llm-llm-failed")]
422    PipelineErrorCustomLlmLlmFailed,
423    #[serde(rename = "pipeline-error-custom-voice-failed")]
424    PipelineErrorCustomVoiceFailed,
425    #[serde(rename = "pipeline-error-cartesia-socket-hang-up")]
426    PipelineErrorCartesiaSocketHangUp,
427    #[serde(rename = "pipeline-error-cartesia-requested-payment")]
428    PipelineErrorCartesiaRequestedPayment,
429    #[serde(rename = "pipeline-error-cartesia-500-server-error")]
430    PipelineErrorCartesia500ServerError,
431    #[serde(rename = "pipeline-error-cartesia-503-server-error")]
432    PipelineErrorCartesia503ServerError,
433    #[serde(rename = "pipeline-error-cartesia-522-server-error")]
434    PipelineErrorCartesia522ServerError,
435    #[serde(rename = "pipeline-error-eleven-labs-voice-not-found")]
436    PipelineErrorElevenLabsVoiceNotFound,
437    #[serde(rename = "pipeline-error-eleven-labs-quota-exceeded")]
438    PipelineErrorElevenLabsQuotaExceeded,
439    #[serde(rename = "pipeline-error-eleven-labs-unauthorized-access")]
440    PipelineErrorElevenLabsUnauthorizedAccess,
441    #[serde(rename = "pipeline-error-eleven-labs-unauthorized-to-access-model")]
442    PipelineErrorElevenLabsUnauthorizedToAccessModel,
443    #[serde(rename = "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus")]
444    PipelineErrorElevenLabsProfessionalVoicesOnlyForCreatorPlus,
445    #[serde(rename = "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade")]
446    PipelineErrorElevenLabsBlockedFreePlanAndRequestedUpgrade,
447    #[serde(
448        rename = "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade"
449    )]
450    PipelineErrorElevenLabsBlockedConcurrentRequestsAndRequestedUpgrade,
451    #[serde(
452        rename = "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade"
453    )]
454    PipelineErrorElevenLabsBlockedUsingInstantVoiceCloneAndRequestedUpgrade,
455    #[serde(rename = "pipeline-error-eleven-labs-system-busy-and-requested-upgrade")]
456    PipelineErrorElevenLabsSystemBusyAndRequestedUpgrade,
457    #[serde(rename = "pipeline-error-eleven-labs-voice-not-fine-tuned")]
458    PipelineErrorElevenLabsVoiceNotFineTuned,
459    #[serde(rename = "pipeline-error-eleven-labs-invalid-api-key")]
460    PipelineErrorElevenLabsInvalidApiKey,
461    #[serde(rename = "pipeline-error-eleven-labs-invalid-voice-samples")]
462    PipelineErrorElevenLabsInvalidVoiceSamples,
463    #[serde(rename = "pipeline-error-eleven-labs-voice-disabled-by-owner")]
464    PipelineErrorElevenLabsVoiceDisabledByOwner,
465    #[serde(rename = "pipeline-error-eleven-labs-blocked-account-in-probation")]
466    PipelineErrorElevenLabsBlockedAccountInProbation,
467    #[serde(rename = "pipeline-error-eleven-labs-blocked-content-against-their-policy")]
468    PipelineErrorElevenLabsBlockedContentAgainstTheirPolicy,
469    #[serde(rename = "pipeline-error-eleven-labs-missing-samples-for-voice-clone")]
470    PipelineErrorElevenLabsMissingSamplesForVoiceClone,
471    #[serde(rename = "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used")]
472    PipelineErrorElevenLabsVoiceNotFineTunedAndCannotBeUsed,
473    #[serde(rename = "pipeline-error-eleven-labs-voice-not-allowed-for-free-users")]
474    PipelineErrorElevenLabsVoiceNotAllowedForFreeUsers,
475    #[serde(rename = "pipeline-error-eleven-labs-500-server-error")]
476    PipelineErrorElevenLabs500ServerError,
477    #[serde(rename = "pipeline-error-eleven-labs-max-character-limit-exceeded")]
478    PipelineErrorElevenLabsMaxCharacterLimitExceeded,
479    #[serde(
480        rename = "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification"
481    )]
482    PipelineErrorElevenLabsBlockedVoicePotentiallyAgainstTermsOfServiceAndAwaitingVerification,
483    #[serde(rename = "pipeline-error-playht-request-timed-out")]
484    PipelineErrorPlayhtRequestTimedOut,
485    #[serde(rename = "pipeline-error-playht-invalid-voice")]
486    PipelineErrorPlayhtInvalidVoice,
487    #[serde(rename = "pipeline-error-playht-unexpected-error")]
488    PipelineErrorPlayhtUnexpectedError,
489    #[serde(rename = "pipeline-error-playht-out-of-credits")]
490    PipelineErrorPlayhtOutOfCredits,
491    #[serde(rename = "pipeline-error-playht-invalid-emotion")]
492    PipelineErrorPlayhtInvalidEmotion,
493    #[serde(rename = "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri")]
494    PipelineErrorPlayhtVoiceMustBeAValidVoiceManifestUri,
495    #[serde(rename = "pipeline-error-playht-401-unauthorized")]
496    PipelineErrorPlayht401Unauthorized,
497    #[serde(rename = "pipeline-error-playht-403-forbidden-out-of-characters")]
498    PipelineErrorPlayht403ForbiddenOutOfCharacters,
499    #[serde(rename = "pipeline-error-playht-403-forbidden-api-access-not-available")]
500    PipelineErrorPlayht403ForbiddenApiAccessNotAvailable,
501    #[serde(rename = "pipeline-error-playht-429-exceeded-quota")]
502    PipelineErrorPlayht429ExceededQuota,
503    #[serde(rename = "pipeline-error-playht-502-gateway-error")]
504    PipelineErrorPlayht502GatewayError,
505    #[serde(rename = "pipeline-error-playht-504-gateway-error")]
506    PipelineErrorPlayht504GatewayError,
507    #[serde(rename = "pipeline-error-tavus-video-failed")]
508    PipelineErrorTavusVideoFailed,
509    #[serde(rename = "pipeline-error-custom-transcriber-failed")]
510    PipelineErrorCustomTranscriberFailed,
511    #[serde(rename = "pipeline-error-11labs-transcriber-failed")]
512    PipelineError11labsTranscriberFailed,
513    #[serde(rename = "pipeline-error-deepgram-returning-403-model-access-denied")]
514    PipelineErrorDeepgramReturning403ModelAccessDenied,
515    #[serde(rename = "pipeline-error-deepgram-returning-401-invalid-credentials")]
516    PipelineErrorDeepgramReturning401InvalidCredentials,
517    #[serde(rename = "pipeline-error-deepgram-returning-404-not-found")]
518    PipelineErrorDeepgramReturning404NotFound,
519    #[serde(
520        rename = "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination"
521    )]
522    PipelineErrorDeepgramReturning400NoSuchModelLanguageTierCombination,
523    #[serde(rename = "pipeline-error-deepgram-returning-500-invalid-json")]
524    PipelineErrorDeepgramReturning500InvalidJson,
525    #[serde(rename = "pipeline-error-deepgram-returning-502-network-error")]
526    PipelineErrorDeepgramReturning502NetworkError,
527    #[serde(rename = "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach")]
528    PipelineErrorDeepgramReturning502BadGatewayEhostunreach,
529    #[serde(rename = "silence-timed-out")]
530    SilenceTimedOut,
531    #[serde(rename = "sip-gateway-failed-to-connect-call")]
532    SipGatewayFailedToConnectCall,
533    #[serde(rename = "twilio-failed-to-connect-call")]
534    TwilioFailedToConnectCall,
535    #[serde(rename = "twilio-reported-customer-misdialed")]
536    TwilioReportedCustomerMisdialed,
537    #[serde(rename = "vonage-rejected")]
538    VonageRejected,
539    #[serde(rename = "voicemail")]
540    Voicemail,
541}
542
543impl Default for EndedReason {
544    fn default() -> EndedReason {
545        Self::AssistantNotValid
546    }
547}
548/// This is the request to control the phone call.
549#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
550pub enum Request {
551    #[serde(rename = "forward")]
552    Forward,
553    #[serde(rename = "hang-up")]
554    HangUp,
555}
556
557impl Default for Request {
558    fn default() -> Request {
559        Self::Forward
560    }
561}
562/// This is the status of the call.
563#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
564pub enum Status {
565    #[serde(rename = "queued")]
566    Queued,
567    #[serde(rename = "ringing")]
568    Ringing,
569    #[serde(rename = "in-progress")]
570    InProgress,
571    #[serde(rename = "forwarding")]
572    Forwarding,
573    #[serde(rename = "ended")]
574    Ended,
575}
576
577impl Default for Status {
578    fn default() -> Status {
579        Self::Queued
580    }
581}
582/// This is the role for which the transcript is for.
583#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
584pub enum Role {
585    #[serde(rename = "assistant")]
586    Assistant,
587    #[serde(rename = "user")]
588    User,
589}
590
591impl Default for Role {
592    fn default() -> Role {
593        Self::Assistant
594    }
595}
596/// This is the type of the transcript.
597#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
598pub enum TranscriptType {
599    #[serde(rename = "partial")]
600    Partial,
601    #[serde(rename = "final")]
602    Final,
603}
604
605impl Default for TranscriptType {
606    fn default() -> TranscriptType {
607        Self::Partial
608    }
609}