vapi-server-sdk 0.0.0a7__py3-none-any.whl
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.
- vapi/__init__.py +1081 -0
- vapi/analytics/__init__.py +2 -0
- vapi/analytics/client.py +159 -0
- vapi/assistants/__init__.py +21 -0
- vapi/assistants/client.py +1593 -0
- vapi/assistants/types/__init__.py +19 -0
- vapi/assistants/types/update_assistant_dto_background_sound.py +5 -0
- vapi/assistants/types/update_assistant_dto_client_messages_item.py +23 -0
- vapi/assistants/types/update_assistant_dto_first_message_mode.py +10 -0
- vapi/assistants/types/update_assistant_dto_model.py +26 -0
- vapi/assistants/types/update_assistant_dto_server_messages_item.py +24 -0
- vapi/assistants/types/update_assistant_dto_transcriber.py +8 -0
- vapi/assistants/types/update_assistant_dto_voice.py +24 -0
- vapi/blocks/__init__.py +25 -0
- vapi/blocks/client.py +804 -0
- vapi/blocks/types/__init__.py +23 -0
- vapi/blocks/types/blocks_create_request.py +8 -0
- vapi/blocks/types/blocks_create_response.py +8 -0
- vapi/blocks/types/blocks_delete_response.py +8 -0
- vapi/blocks/types/blocks_get_response.py +8 -0
- vapi/blocks/types/blocks_list_response_item.py +8 -0
- vapi/blocks/types/blocks_update_response.py +8 -0
- vapi/blocks/types/update_block_dto_messages_item.py +7 -0
- vapi/blocks/types/update_block_dto_steps_item.py +7 -0
- vapi/blocks/types/update_block_dto_tool.py +20 -0
- vapi/calls/__init__.py +2 -0
- vapi/calls/client.py +776 -0
- vapi/client.py +172 -0
- vapi/core/__init__.py +50 -0
- vapi/core/api_error.py +15 -0
- vapi/core/client_wrapper.py +76 -0
- vapi/core/datetime_utils.py +28 -0
- vapi/core/file.py +62 -0
- vapi/core/http_client.py +487 -0
- vapi/core/jsonable_encoder.py +101 -0
- vapi/core/pagination.py +88 -0
- vapi/core/pydantic_utilities.py +296 -0
- vapi/core/query_encoder.py +58 -0
- vapi/core/remove_none_from_dict.py +11 -0
- vapi/core/request_options.py +32 -0
- vapi/core/serialization.py +272 -0
- vapi/environment.py +7 -0
- vapi/errors/__init__.py +5 -0
- vapi/errors/bad_request_error.py +9 -0
- vapi/files/__init__.py +2 -0
- vapi/files/client.py +544 -0
- vapi/logs/__init__.py +5 -0
- vapi/logs/client.py +367 -0
- vapi/logs/types/__init__.py +6 -0
- vapi/logs/types/logs_get_request_sort_order.py +5 -0
- vapi/logs/types/logs_get_request_type.py +5 -0
- vapi/phone_numbers/__init__.py +21 -0
- vapi/phone_numbers/client.py +735 -0
- vapi/phone_numbers/types/__init__.py +19 -0
- vapi/phone_numbers/types/phone_numbers_create_request.py +11 -0
- vapi/phone_numbers/types/phone_numbers_create_response.py +9 -0
- vapi/phone_numbers/types/phone_numbers_delete_response.py +9 -0
- vapi/phone_numbers/types/phone_numbers_get_response.py +9 -0
- vapi/phone_numbers/types/phone_numbers_list_response_item.py +9 -0
- vapi/phone_numbers/types/phone_numbers_update_response.py +9 -0
- vapi/phone_numbers/types/update_phone_number_dto_fallback_destination.py +7 -0
- vapi/py.typed +0 -0
- vapi/squads/__init__.py +2 -0
- vapi/squads/client.py +723 -0
- vapi/tools/__init__.py +21 -0
- vapi/tools/client.py +717 -0
- vapi/tools/types/__init__.py +19 -0
- vapi/tools/types/tools_create_request.py +20 -0
- vapi/tools/types/tools_create_response.py +12 -0
- vapi/tools/types/tools_delete_response.py +12 -0
- vapi/tools/types/tools_get_response.py +12 -0
- vapi/tools/types/tools_list_response_item.py +14 -0
- vapi/tools/types/tools_update_response.py +12 -0
- vapi/tools/types/update_tool_dto_messages_item.py +9 -0
- vapi/types/__init__.py +993 -0
- vapi/types/add_voice_to_provider_dto.py +34 -0
- vapi/types/analysis.py +38 -0
- vapi/types/analysis_cost.py +52 -0
- vapi/types/analysis_cost_analysis_type.py +5 -0
- vapi/types/analysis_cost_breakdown.py +80 -0
- vapi/types/analysis_plan.py +43 -0
- vapi/types/analytics_operation.py +34 -0
- vapi/types/analytics_operation_column.py +19 -0
- vapi/types/analytics_operation_operation.py +5 -0
- vapi/types/analytics_query.py +51 -0
- vapi/types/analytics_query_group_by_item.py +7 -0
- vapi/types/analytics_query_result.py +42 -0
- vapi/types/anthropic_credential.py +46 -0
- vapi/types/anthropic_model.py +91 -0
- vapi/types/anthropic_model_model.py +10 -0
- vapi/types/anthropic_model_tools_item.py +20 -0
- vapi/types/anyscale_credential.py +46 -0
- vapi/types/anyscale_model.py +90 -0
- vapi/types/anyscale_model_tools_item.py +20 -0
- vapi/types/artifact.py +66 -0
- vapi/types/artifact_messages_item.py +10 -0
- vapi/types/artifact_plan.py +70 -0
- vapi/types/assignment_mutation.py +85 -0
- vapi/types/assignment_mutation_conditions_item.py +7 -0
- vapi/types/assistant.py +330 -0
- vapi/types/assistant_background_sound.py +5 -0
- vapi/types/assistant_client_messages_item.py +23 -0
- vapi/types/assistant_first_message_mode.py +10 -0
- vapi/types/assistant_model.py +26 -0
- vapi/types/assistant_overrides.py +316 -0
- vapi/types/assistant_overrides_background_sound.py +5 -0
- vapi/types/assistant_overrides_client_messages_item.py +23 -0
- vapi/types/assistant_overrides_first_message_mode.py +10 -0
- vapi/types/assistant_overrides_model.py +26 -0
- vapi/types/assistant_overrides_server_messages_item.py +24 -0
- vapi/types/assistant_overrides_transcriber.py +8 -0
- vapi/types/assistant_overrides_voice.py +24 -0
- vapi/types/assistant_server_messages_item.py +24 -0
- vapi/types/assistant_transcriber.py +8 -0
- vapi/types/assistant_voice.py +24 -0
- vapi/types/azure_open_ai_credential.py +52 -0
- vapi/types/azure_open_ai_credential_models_item.py +17 -0
- vapi/types/azure_open_ai_credential_region.py +24 -0
- vapi/types/azure_voice.py +52 -0
- vapi/types/azure_voice_id.py +6 -0
- vapi/types/azure_voice_id_enum.py +5 -0
- vapi/types/block_complete_message.py +33 -0
- vapi/types/block_complete_message_conditions_item.py +7 -0
- vapi/types/block_start_message.py +33 -0
- vapi/types/block_start_message_conditions_item.py +7 -0
- vapi/types/bot_message.py +54 -0
- vapi/types/bucket_plan.py +72 -0
- vapi/types/buy_phone_number_dto.py +81 -0
- vapi/types/buy_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/byo_phone_number.py +126 -0
- vapi/types/byo_phone_number_fallback_destination.py +7 -0
- vapi/types/byo_sip_trunk_credential.py +85 -0
- vapi/types/call.py +241 -0
- vapi/types/call_costs_item.py +11 -0
- vapi/types/call_destination.py +7 -0
- vapi/types/call_ended_reason.py +177 -0
- vapi/types/call_messages_item.py +10 -0
- vapi/types/call_paginated_response.py +32 -0
- vapi/types/call_phone_call_provider.py +5 -0
- vapi/types/call_phone_call_transport.py +5 -0
- vapi/types/call_status.py +5 -0
- vapi/types/call_type.py +5 -0
- vapi/types/callback_step.py +116 -0
- vapi/types/callback_step_block.py +11 -0
- vapi/types/cartesia_credential.py +46 -0
- vapi/types/cartesia_voice.py +58 -0
- vapi/types/cartesia_voice_language.py +5 -0
- vapi/types/cartesia_voice_model.py +5 -0
- vapi/types/chunk_plan.py +70 -0
- vapi/types/client_inbound_message.py +23 -0
- vapi/types/client_inbound_message_add_message.py +28 -0
- vapi/types/client_inbound_message_control.py +32 -0
- vapi/types/client_inbound_message_control_control.py +7 -0
- vapi/types/client_inbound_message_message.py +10 -0
- vapi/types/client_inbound_message_say.py +36 -0
- vapi/types/client_message.py +23 -0
- vapi/types/client_message_conversation_update.py +38 -0
- vapi/types/client_message_conversation_update_messages_item.py +12 -0
- vapi/types/client_message_hang.py +27 -0
- vapi/types/client_message_language_changed.py +27 -0
- vapi/types/client_message_message.py +28 -0
- vapi/types/client_message_metadata.py +27 -0
- vapi/types/client_message_model_output.py +27 -0
- vapi/types/client_message_speech_update.py +34 -0
- vapi/types/client_message_speech_update_role.py +5 -0
- vapi/types/client_message_speech_update_status.py +5 -0
- vapi/types/client_message_tool_calls.py +40 -0
- vapi/types/client_message_tool_calls_result.py +31 -0
- vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py +10 -0
- vapi/types/client_message_transcript.py +43 -0
- vapi/types/client_message_transcript_role.py +5 -0
- vapi/types/client_message_transcript_transcript_type.py +5 -0
- vapi/types/client_message_user_interrupted.py +22 -0
- vapi/types/client_message_voice_input.py +27 -0
- vapi/types/clone_voice_dto.py +37 -0
- vapi/types/condition.py +33 -0
- vapi/types/condition_operator.py +5 -0
- vapi/types/conversation_block.py +109 -0
- vapi/types/conversation_block_messages_item.py +7 -0
- vapi/types/cost_breakdown.py +78 -0
- vapi/types/create_anthropic_credential_dto.py +25 -0
- vapi/types/create_anyscale_credential_dto.py +25 -0
- vapi/types/create_assistant_dto.py +309 -0
- vapi/types/create_assistant_dto_background_sound.py +5 -0
- vapi/types/create_assistant_dto_client_messages_item.py +23 -0
- vapi/types/create_assistant_dto_first_message_mode.py +10 -0
- vapi/types/create_assistant_dto_model.py +26 -0
- vapi/types/create_assistant_dto_server_messages_item.py +24 -0
- vapi/types/create_assistant_dto_transcriber.py +8 -0
- vapi/types/create_assistant_dto_voice.py +24 -0
- vapi/types/create_azure_open_ai_credential_dto.py +31 -0
- vapi/types/create_azure_open_ai_credential_dto_models_item.py +17 -0
- vapi/types/create_azure_open_ai_credential_dto_region.py +24 -0
- vapi/types/create_byo_phone_number_dto.py +105 -0
- vapi/types/create_byo_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/create_byo_sip_trunk_credential_dto.py +64 -0
- vapi/types/create_cartesia_credential_dto.py +25 -0
- vapi/types/create_conversation_block_dto.py +88 -0
- vapi/types/create_conversation_block_dto_messages_item.py +7 -0
- vapi/types/create_custom_llm_credential_dto.py +25 -0
- vapi/types/create_customer_dto.py +59 -0
- vapi/types/create_deep_infra_credential_dto.py +25 -0
- vapi/types/create_deepgram_credential_dto.py +32 -0
- vapi/types/create_dtmf_tool_dto.py +61 -0
- vapi/types/create_dtmf_tool_dto_messages_item.py +11 -0
- vapi/types/create_eleven_labs_credential_dto.py +25 -0
- vapi/types/create_end_call_tool_dto.py +61 -0
- vapi/types/create_end_call_tool_dto_messages_item.py +11 -0
- vapi/types/create_function_tool_dto.py +61 -0
- vapi/types/create_function_tool_dto_messages_item.py +11 -0
- vapi/types/create_gcp_credential_dto.py +41 -0
- vapi/types/create_ghl_tool_dto.py +63 -0
- vapi/types/create_ghl_tool_dto_messages_item.py +11 -0
- vapi/types/create_gladia_credential_dto.py +25 -0
- vapi/types/create_go_high_level_credential_dto.py +25 -0
- vapi/types/create_groq_credential_dto.py +25 -0
- vapi/types/create_lmnt_credential_dto.py +25 -0
- vapi/types/create_make_credential_dto.py +35 -0
- vapi/types/create_make_tool_dto.py +63 -0
- vapi/types/create_make_tool_dto_messages_item.py +11 -0
- vapi/types/create_open_ai_credential_dto.py +25 -0
- vapi/types/create_open_router_credential_dto.py +25 -0
- vapi/types/create_org_dto.py +63 -0
- vapi/types/create_outbound_call_dto.py +104 -0
- vapi/types/create_output_tool_dto.py +61 -0
- vapi/types/create_output_tool_dto_messages_item.py +11 -0
- vapi/types/create_perplexity_ai_credential_dto.py +25 -0
- vapi/types/create_play_ht_credential_dto.py +27 -0
- vapi/types/create_rime_ai_credential_dto.py +25 -0
- vapi/types/create_runpod_credential_dto.py +25 -0
- vapi/types/create_s_3_credential_dto.py +51 -0
- vapi/types/create_squad_dto.py +52 -0
- vapi/types/create_together_ai_credential_dto.py +25 -0
- vapi/types/create_token_dto.py +34 -0
- vapi/types/create_token_dto_tag.py +5 -0
- vapi/types/create_tool_call_block_dto.py +75 -0
- vapi/types/create_tool_call_block_dto_messages_item.py +7 -0
- vapi/types/create_tool_call_block_dto_tool.py +20 -0
- vapi/types/create_tool_template_dto.py +38 -0
- vapi/types/create_tool_template_dto_details.py +20 -0
- vapi/types/create_tool_template_dto_provider.py +5 -0
- vapi/types/create_tool_template_dto_provider_details.py +10 -0
- vapi/types/create_tool_template_dto_visibility.py +5 -0
- vapi/types/create_transfer_call_tool_dto.py +67 -0
- vapi/types/create_transfer_call_tool_dto_destinations_item.py +11 -0
- vapi/types/create_transfer_call_tool_dto_messages_item.py +11 -0
- vapi/types/create_twilio_credential_dto.py +27 -0
- vapi/types/create_twilio_phone_number_dto.py +92 -0
- vapi/types/create_twilio_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/create_vapi_phone_number_dto.py +84 -0
- vapi/types/create_vapi_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/create_voicemail_tool_dto.py +65 -0
- vapi/types/create_voicemail_tool_dto_messages_item.py +11 -0
- vapi/types/create_vonage_credential_dto.py +27 -0
- vapi/types/create_vonage_phone_number_dto.py +87 -0
- vapi/types/create_vonage_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/create_web_call_dto.py +63 -0
- vapi/types/create_workflow_block_dto.py +78 -0
- vapi/types/create_workflow_block_dto_messages_item.py +7 -0
- vapi/types/create_workflow_block_dto_steps_item.py +10 -0
- vapi/types/custom_llm_credential.py +46 -0
- vapi/types/custom_llm_model.py +115 -0
- vapi/types/custom_llm_model_metadata_send_mode.py +5 -0
- vapi/types/custom_llm_model_tools_item.py +20 -0
- vapi/types/deep_infra_credential.py +46 -0
- vapi/types/deep_infra_model.py +90 -0
- vapi/types/deep_infra_model_tools_item.py +20 -0
- vapi/types/deepgram_credential.py +53 -0
- vapi/types/deepgram_transcriber.py +68 -0
- vapi/types/deepgram_transcriber_language.py +65 -0
- vapi/types/deepgram_transcriber_model.py +37 -0
- vapi/types/deepgram_voice.py +47 -0
- vapi/types/deepgram_voice_id.py +6 -0
- vapi/types/deepgram_voice_id_enum.py +10 -0
- vapi/types/dtmf_tool.py +82 -0
- vapi/types/dtmf_tool_messages_item.py +9 -0
- vapi/types/eleven_labs_credential.py +46 -0
- vapi/types/eleven_labs_voice.py +98 -0
- vapi/types/eleven_labs_voice_id.py +6 -0
- vapi/types/eleven_labs_voice_id_enum.py +24 -0
- vapi/types/eleven_labs_voice_model.py +8 -0
- vapi/types/end_call_tool.py +82 -0
- vapi/types/end_call_tool_messages_item.py +9 -0
- vapi/types/error.py +19 -0
- vapi/types/exact_replacement.py +40 -0
- vapi/types/file.py +57 -0
- vapi/types/file_status.py +5 -0
- vapi/types/format_plan.py +64 -0
- vapi/types/format_plan_replacements_item.py +7 -0
- vapi/types/function_tool.py +82 -0
- vapi/types/function_tool_messages_item.py +9 -0
- vapi/types/function_tool_provider_details.py +35 -0
- vapi/types/function_tool_with_tool_call.py +67 -0
- vapi/types/function_tool_with_tool_call_messages_item.py +11 -0
- vapi/types/gcp_credential.py +62 -0
- vapi/types/gcp_key.py +78 -0
- vapi/types/ghl_tool.py +85 -0
- vapi/types/ghl_tool_messages_item.py +9 -0
- vapi/types/ghl_tool_metadata.py +22 -0
- vapi/types/ghl_tool_provider_details.py +41 -0
- vapi/types/ghl_tool_with_tool_call.py +69 -0
- vapi/types/ghl_tool_with_tool_call_messages_item.py +11 -0
- vapi/types/gladia_credential.py +46 -0
- vapi/types/gladia_transcriber.py +56 -0
- vapi/types/gladia_transcriber_language.py +109 -0
- vapi/types/gladia_transcriber_language_behaviour.py +7 -0
- vapi/types/gladia_transcriber_model.py +5 -0
- vapi/types/go_high_level_credential.py +46 -0
- vapi/types/groq_credential.py +46 -0
- vapi/types/groq_model.py +91 -0
- vapi/types/groq_model_model.py +19 -0
- vapi/types/groq_model_tools_item.py +20 -0
- vapi/types/handoff_step.py +116 -0
- vapi/types/handoff_step_block.py +11 -0
- vapi/types/import_twilio_phone_number_dto.py +91 -0
- vapi/types/import_twilio_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/import_vonage_phone_number_dto.py +88 -0
- vapi/types/import_vonage_phone_number_dto_fallback_destination.py +7 -0
- vapi/types/invite_user_dto.py +21 -0
- vapi/types/invite_user_dto_role.py +5 -0
- vapi/types/json_schema.py +57 -0
- vapi/types/json_schema_type.py +5 -0
- vapi/types/knowledge_base.py +23 -0
- vapi/types/lmnt_credential.py +46 -0
- vapi/types/lmnt_voice.py +52 -0
- vapi/types/lmnt_voice_id.py +6 -0
- vapi/types/lmnt_voice_id_enum.py +5 -0
- vapi/types/log.py +164 -0
- vapi/types/log_request_http_method.py +5 -0
- vapi/types/log_resource.py +7 -0
- vapi/types/log_type.py +5 -0
- vapi/types/logs_paginated_response.py +22 -0
- vapi/types/make_credential.py +56 -0
- vapi/types/make_tool.py +85 -0
- vapi/types/make_tool_messages_item.py +9 -0
- vapi/types/make_tool_metadata.py +22 -0
- vapi/types/make_tool_provider_details.py +40 -0
- vapi/types/make_tool_with_tool_call.py +69 -0
- vapi/types/make_tool_with_tool_call_messages_item.py +11 -0
- vapi/types/message_plan.py +51 -0
- vapi/types/metrics.py +44 -0
- vapi/types/model_based_condition.py +54 -0
- vapi/types/model_cost.py +53 -0
- vapi/types/monitor.py +33 -0
- vapi/types/monitor_plan.py +43 -0
- vapi/types/neets_voice.py +47 -0
- vapi/types/neets_voice_id.py +6 -0
- vapi/types/neets_voice_id_enum.py +5 -0
- vapi/types/open_ai_credential.py +46 -0
- vapi/types/open_ai_function.py +35 -0
- vapi/types/open_ai_function_parameters.py +35 -0
- vapi/types/open_ai_message.py +21 -0
- vapi/types/open_ai_message_role.py +5 -0
- vapi/types/open_ai_model.py +106 -0
- vapi/types/open_ai_model_fallback_models_item.py +26 -0
- vapi/types/open_ai_model_model.py +26 -0
- vapi/types/open_ai_model_tools_item.py +20 -0
- vapi/types/open_ai_voice.py +52 -0
- vapi/types/open_ai_voice_id.py +5 -0
- vapi/types/open_router_credential.py +46 -0
- vapi/types/open_router_model.py +90 -0
- vapi/types/open_router_model_tools_item.py +20 -0
- vapi/types/org.py +120 -0
- vapi/types/org_plan.py +28 -0
- vapi/types/output_tool.py +82 -0
- vapi/types/output_tool_messages_item.py +9 -0
- vapi/types/pagination_meta.py +23 -0
- vapi/types/perplexity_ai_credential.py +46 -0
- vapi/types/perplexity_ai_model.py +90 -0
- vapi/types/perplexity_ai_model_tools_item.py +20 -0
- vapi/types/play_ht_credential.py +48 -0
- vapi/types/play_ht_voice.py +84 -0
- vapi/types/play_ht_voice_emotion.py +21 -0
- vapi/types/play_ht_voice_id.py +6 -0
- vapi/types/play_ht_voice_id_enum.py +8 -0
- vapi/types/punctuation_boundary.py +7 -0
- vapi/types/regex_option.py +34 -0
- vapi/types/regex_option_type.py +5 -0
- vapi/types/regex_replacement.py +48 -0
- vapi/types/rime_ai_credential.py +46 -0
- vapi/types/rime_ai_voice.py +58 -0
- vapi/types/rime_ai_voice_id.py +6 -0
- vapi/types/rime_ai_voice_id_enum.py +90 -0
- vapi/types/rime_ai_voice_model.py +5 -0
- vapi/types/rule_based_condition.py +96 -0
- vapi/types/rule_based_condition_operator.py +5 -0
- vapi/types/runpod_credential.py +46 -0
- vapi/types/s_3_credential.py +72 -0
- vapi/types/sbc_configuration.py +17 -0
- vapi/types/server.py +40 -0
- vapi/types/server_message.py +40 -0
- vapi/types/server_message_assistant_request.py +96 -0
- vapi/types/server_message_assistant_request_phone_number.py +11 -0
- vapi/types/server_message_conversation_update.py +110 -0
- vapi/types/server_message_conversation_update_messages_item.py +12 -0
- vapi/types/server_message_conversation_update_phone_number.py +11 -0
- vapi/types/server_message_end_of_call_report.py +134 -0
- vapi/types/server_message_end_of_call_report_costs_item.py +13 -0
- vapi/types/server_message_end_of_call_report_ended_reason.py +177 -0
- vapi/types/server_message_end_of_call_report_phone_number.py +11 -0
- vapi/types/server_message_hang.py +101 -0
- vapi/types/server_message_hang_phone_number.py +11 -0
- vapi/types/server_message_language_changed.py +101 -0
- vapi/types/server_message_language_changed_phone_number.py +11 -0
- vapi/types/server_message_message.py +38 -0
- vapi/types/server_message_model_output.py +101 -0
- vapi/types/server_message_model_output_phone_number.py +11 -0
- vapi/types/server_message_phone_call_control.py +110 -0
- vapi/types/server_message_phone_call_control_destination.py +7 -0
- vapi/types/server_message_phone_call_control_phone_number.py +11 -0
- vapi/types/server_message_phone_call_control_request.py +5 -0
- vapi/types/server_message_response.py +39 -0
- vapi/types/server_message_response_assistant_request.py +80 -0
- vapi/types/server_message_response_assistant_request_destination.py +7 -0
- vapi/types/server_message_response_message_response.py +14 -0
- vapi/types/server_message_response_tool_calls.py +28 -0
- vapi/types/server_message_response_transfer_destination_request.py +32 -0
- vapi/types/server_message_response_transfer_destination_request_destination.py +11 -0
- vapi/types/server_message_response_voice_request.py +44 -0
- vapi/types/server_message_speech_update.py +108 -0
- vapi/types/server_message_speech_update_phone_number.py +11 -0
- vapi/types/server_message_speech_update_role.py +5 -0
- vapi/types/server_message_speech_update_status.py +5 -0
- vapi/types/server_message_status_update.py +145 -0
- vapi/types/server_message_status_update_destination.py +7 -0
- vapi/types/server_message_status_update_ended_reason.py +177 -0
- vapi/types/server_message_status_update_messages_item.py +12 -0
- vapi/types/server_message_status_update_phone_number.py +11 -0
- vapi/types/server_message_status_update_status.py +7 -0
- vapi/types/server_message_tool_calls.py +112 -0
- vapi/types/server_message_tool_calls_phone_number.py +11 -0
- vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py +10 -0
- vapi/types/server_message_transcript.py +115 -0
- vapi/types/server_message_transcript_phone_number.py +11 -0
- vapi/types/server_message_transcript_role.py +5 -0
- vapi/types/server_message_transcript_transcript_type.py +5 -0
- vapi/types/server_message_transfer_destination_request.py +98 -0
- vapi/types/server_message_transfer_destination_request_phone_number.py +11 -0
- vapi/types/server_message_transfer_update.py +116 -0
- vapi/types/server_message_transfer_update_destination.py +11 -0
- vapi/types/server_message_transfer_update_phone_number.py +11 -0
- vapi/types/server_message_user_interrupted.py +96 -0
- vapi/types/server_message_user_interrupted_phone_number.py +11 -0
- vapi/types/server_message_voice_input.py +101 -0
- vapi/types/server_message_voice_input_phone_number.py +11 -0
- vapi/types/server_message_voice_request.py +128 -0
- vapi/types/server_message_voice_request_phone_number.py +11 -0
- vapi/types/sip_trunk_gateway.py +79 -0
- vapi/types/sip_trunk_gateway_outbound_protocol.py +5 -0
- vapi/types/sip_trunk_outbound_authentication_plan.py +35 -0
- vapi/types/sip_trunk_outbound_sip_register_plan.py +21 -0
- vapi/types/squad.py +73 -0
- vapi/types/squad_member_dto.py +60 -0
- vapi/types/start_speaking_plan.py +62 -0
- vapi/types/step_destination.py +28 -0
- vapi/types/step_destination_conditions_item.py +7 -0
- vapi/types/stop_speaking_plan.py +65 -0
- vapi/types/structured_data_plan.py +66 -0
- vapi/types/success_evaluation_plan.py +75 -0
- vapi/types/success_evaluation_plan_rubric.py +17 -0
- vapi/types/summary_plan.py +56 -0
- vapi/types/sync_voice_library_dto.py +23 -0
- vapi/types/sync_voice_library_dto_providers_item.py +10 -0
- vapi/types/system_message.py +39 -0
- vapi/types/talkscriber_transcriber.py +33 -0
- vapi/types/talkscriber_transcriber_language.py +109 -0
- vapi/types/template.py +58 -0
- vapi/types/template_details.py +20 -0
- vapi/types/template_provider.py +5 -0
- vapi/types/template_provider_details.py +8 -0
- vapi/types/template_visibility.py +5 -0
- vapi/types/time_range.py +47 -0
- vapi/types/time_range_step.py +8 -0
- vapi/types/together_ai_credential.py +46 -0
- vapi/types/together_ai_model.py +90 -0
- vapi/types/together_ai_model_tools_item.py +20 -0
- vapi/types/token.py +62 -0
- vapi/types/token_restrictions.py +53 -0
- vapi/types/token_tag.py +5 -0
- vapi/types/tool_call.py +33 -0
- vapi/types/tool_call_block.py +96 -0
- vapi/types/tool_call_block_messages_item.py +7 -0
- vapi/types/tool_call_block_tool.py +20 -0
- vapi/types/tool_call_function.py +27 -0
- vapi/types/tool_call_message.py +46 -0
- vapi/types/tool_call_result.py +62 -0
- vapi/types/tool_call_result_message.py +49 -0
- vapi/types/tool_call_result_message_item.py +7 -0
- vapi/types/tool_message_complete.py +74 -0
- vapi/types/tool_message_complete_role.py +5 -0
- vapi/types/tool_message_delayed.py +49 -0
- vapi/types/tool_message_failed.py +50 -0
- vapi/types/tool_message_start.py +37 -0
- vapi/types/tool_template_metadata.py +23 -0
- vapi/types/tool_template_setup.py +24 -0
- vapi/types/transcriber_cost.py +46 -0
- vapi/types/transcript_plan.py +66 -0
- vapi/types/transcription_endpointing_plan.py +52 -0
- vapi/types/transfer_call_tool.py +88 -0
- vapi/types/transfer_call_tool_destinations_item.py +11 -0
- vapi/types/transfer_call_tool_messages_item.py +11 -0
- vapi/types/transfer_destination_assistant.py +90 -0
- vapi/types/transfer_destination_number.py +77 -0
- vapi/types/transfer_destination_sip.py +39 -0
- vapi/types/transfer_destination_step.py +39 -0
- vapi/types/transfer_mode.py +5 -0
- vapi/types/transport_configuration_twilio.py +55 -0
- vapi/types/transport_configuration_twilio_recording_channels.py +5 -0
- vapi/types/transport_cost.py +32 -0
- vapi/types/twilio_credential.py +48 -0
- vapi/types/twilio_phone_number.py +113 -0
- vapi/types/twilio_phone_number_fallback_destination.py +7 -0
- vapi/types/twilio_voicemail_detection.py +107 -0
- vapi/types/twilio_voicemail_detection_voicemail_detection_types_item.py +10 -0
- vapi/types/update_anthropic_credential_dto.py +25 -0
- vapi/types/update_anyscale_credential_dto.py +25 -0
- vapi/types/update_azure_open_ai_credential_dto.py +31 -0
- vapi/types/update_azure_open_ai_credential_dto_models_item.py +17 -0
- vapi/types/update_azure_open_ai_credential_dto_region.py +24 -0
- vapi/types/update_byo_sip_trunk_credential_dto.py +64 -0
- vapi/types/update_cartesia_credential_dto.py +25 -0
- vapi/types/update_custom_llm_credential_dto.py +25 -0
- vapi/types/update_deep_infra_credential_dto.py +25 -0
- vapi/types/update_deepgram_credential_dto.py +32 -0
- vapi/types/update_eleven_labs_credential_dto.py +25 -0
- vapi/types/update_gcp_credential_dto.py +41 -0
- vapi/types/update_gladia_credential_dto.py +25 -0
- vapi/types/update_go_high_level_credential_dto.py +25 -0
- vapi/types/update_groq_credential_dto.py +25 -0
- vapi/types/update_lmnt_credential_dto.py +25 -0
- vapi/types/update_make_credential_dto.py +35 -0
- vapi/types/update_open_ai_credential_dto.py +25 -0
- vapi/types/update_open_router_credential_dto.py +25 -0
- vapi/types/update_org_dto.py +63 -0
- vapi/types/update_perplexity_ai_credential_dto.py +25 -0
- vapi/types/update_play_ht_credential_dto.py +27 -0
- vapi/types/update_rime_ai_credential_dto.py +25 -0
- vapi/types/update_runpod_credential_dto.py +25 -0
- vapi/types/update_s_3_credential_dto.py +51 -0
- vapi/types/update_together_ai_credential_dto.py +25 -0
- vapi/types/update_tool_template_dto.py +38 -0
- vapi/types/update_tool_template_dto_details.py +20 -0
- vapi/types/update_tool_template_dto_provider.py +5 -0
- vapi/types/update_tool_template_dto_provider_details.py +10 -0
- vapi/types/update_tool_template_dto_visibility.py +5 -0
- vapi/types/update_twilio_credential_dto.py +27 -0
- vapi/types/update_user_role_dto.py +23 -0
- vapi/types/update_user_role_dto_role.py +5 -0
- vapi/types/update_vonage_credential_dto.py +27 -0
- vapi/types/user.py +47 -0
- vapi/types/user_message.py +49 -0
- vapi/types/vapi_cost.py +32 -0
- vapi/types/vapi_model.py +102 -0
- vapi/types/vapi_model_steps_item.py +7 -0
- vapi/types/vapi_model_tools_item.py +20 -0
- vapi/types/vapi_phone_number.py +105 -0
- vapi/types/vapi_phone_number_fallback_destination.py +7 -0
- vapi/types/voice_cost.py +46 -0
- vapi/types/voice_library.py +126 -0
- vapi/types/voice_library_gender.py +5 -0
- vapi/types/voice_library_voice_response.py +27 -0
- vapi/types/vonage_credential.py +64 -0
- vapi/types/vonage_phone_number.py +108 -0
- vapi/types/vonage_phone_number_fallback_destination.py +7 -0
- vapi/types/workflow_block.py +99 -0
- vapi/types/workflow_block_messages_item.py +7 -0
- vapi/types/workflow_block_steps_item.py +7 -0
- vapi/version.py +3 -0
- vapi_server_sdk-0.0.0a7.dist-info/METADATA +179 -0
- vapi_server_sdk-0.0.0a7.dist-info/RECORD +571 -0
- vapi_server_sdk-0.0.0a7.dist-info/WHEEL +4 -0
vapi/types/call.py
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
+
from .callback_step import CallbackStep
|
|
6
|
+
from .create_workflow_block_dto import CreateWorkflowBlockDto
|
|
7
|
+
from .handoff_step import HandoffStep
|
|
8
|
+
import typing
|
|
9
|
+
from .call_type import CallType
|
|
10
|
+
import pydantic
|
|
11
|
+
from .call_costs_item import CallCostsItem
|
|
12
|
+
from .call_messages_item import CallMessagesItem
|
|
13
|
+
import typing_extensions
|
|
14
|
+
from .call_phone_call_provider import CallPhoneCallProvider
|
|
15
|
+
from ..core.serialization import FieldMetadata
|
|
16
|
+
from .call_phone_call_transport import CallPhoneCallTransport
|
|
17
|
+
from .call_status import CallStatus
|
|
18
|
+
from .call_ended_reason import CallEndedReason
|
|
19
|
+
from .call_destination import CallDestination
|
|
20
|
+
import datetime as dt
|
|
21
|
+
from .cost_breakdown import CostBreakdown
|
|
22
|
+
from .artifact_plan import ArtifactPlan
|
|
23
|
+
from .analysis import Analysis
|
|
24
|
+
from .monitor import Monitor
|
|
25
|
+
from .artifact import Artifact
|
|
26
|
+
from .create_assistant_dto import CreateAssistantDto
|
|
27
|
+
from .assistant_overrides import AssistantOverrides
|
|
28
|
+
from .create_squad_dto import CreateSquadDto
|
|
29
|
+
from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto
|
|
30
|
+
from .create_customer_dto import CreateCustomerDto
|
|
31
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
32
|
+
from ..core.pydantic_utilities import update_forward_refs
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class Call(UniversalBaseModel):
|
|
36
|
+
type: typing.Optional[CallType] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
This is the type of call.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
costs: typing.Optional[typing.List[CallCostsItem]] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
These are the costs of individual components of the call in USD.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
messages: typing.Optional[typing.List[CallMessagesItem]] = None
|
|
47
|
+
phone_call_provider: typing_extensions.Annotated[
|
|
48
|
+
typing.Optional[CallPhoneCallProvider], FieldMetadata(alias="phoneCallProvider")
|
|
49
|
+
] = pydantic.Field(default=None)
|
|
50
|
+
"""
|
|
51
|
+
This is the provider of the call.
|
|
52
|
+
|
|
53
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
phone_call_transport: typing_extensions.Annotated[
|
|
57
|
+
typing.Optional[CallPhoneCallTransport], FieldMetadata(alias="phoneCallTransport")
|
|
58
|
+
] = pydantic.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
This is the transport of the phone call.
|
|
61
|
+
|
|
62
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
status: typing.Optional[CallStatus] = pydantic.Field(default=None)
|
|
66
|
+
"""
|
|
67
|
+
This is the status of the call.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
ended_reason: typing_extensions.Annotated[typing.Optional[CallEndedReason], FieldMetadata(alias="endedReason")] = (
|
|
71
|
+
pydantic.Field(default=None)
|
|
72
|
+
)
|
|
73
|
+
"""
|
|
74
|
+
This is the explanation for how the call ended.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
destination: typing.Optional[CallDestination] = pydantic.Field(default=None)
|
|
78
|
+
"""
|
|
79
|
+
This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
id: str = pydantic.Field()
|
|
83
|
+
"""
|
|
84
|
+
This is the unique identifier for the call.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field()
|
|
88
|
+
"""
|
|
89
|
+
This is the unique identifier for the org that this call belongs to.
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
|
|
93
|
+
"""
|
|
94
|
+
This is the ISO 8601 date-time string of when the call was created.
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
|
|
98
|
+
"""
|
|
99
|
+
This is the ISO 8601 date-time string of when the call was last updated.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
started_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startedAt")] = (
|
|
103
|
+
pydantic.Field(default=None)
|
|
104
|
+
)
|
|
105
|
+
"""
|
|
106
|
+
This is the ISO 8601 date-time string of when the call was started.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
ended_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endedAt")] = (
|
|
110
|
+
pydantic.Field(default=None)
|
|
111
|
+
)
|
|
112
|
+
"""
|
|
113
|
+
This is the ISO 8601 date-time string of when the call was ended.
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
cost: typing.Optional[float] = pydantic.Field(default=None)
|
|
117
|
+
"""
|
|
118
|
+
This is the cost of the call in USD.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
cost_breakdown: typing_extensions.Annotated[
|
|
122
|
+
typing.Optional[CostBreakdown], FieldMetadata(alias="costBreakdown")
|
|
123
|
+
] = pydantic.Field(default=None)
|
|
124
|
+
"""
|
|
125
|
+
This is the cost of the call in USD.
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
artifact_plan: typing_extensions.Annotated[typing.Optional[ArtifactPlan], FieldMetadata(alias="artifactPlan")] = (
|
|
129
|
+
pydantic.Field(default=None)
|
|
130
|
+
)
|
|
131
|
+
"""
|
|
132
|
+
This is a copy of assistant artifact plan. This isn't actually stored on the call but rather just returned in POST /call/web to enable artifact creation client side.
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
analysis: typing.Optional[Analysis] = pydantic.Field(default=None)
|
|
136
|
+
"""
|
|
137
|
+
This is the analysis of the call. Configure in `assistant.analysisPlan`.
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
monitor: typing.Optional[Monitor] = pydantic.Field(default=None)
|
|
141
|
+
"""
|
|
142
|
+
This is to real-time monitor the call. Configure in `assistant.monitorPlan`.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
artifact: typing.Optional[Artifact] = pydantic.Field(default=None)
|
|
146
|
+
"""
|
|
147
|
+
These are the artifacts created from the call. Configure in `assistant.artifactPlan`.
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
phone_call_provider_id: typing_extensions.Annotated[
|
|
151
|
+
typing.Optional[str], FieldMetadata(alias="phoneCallProviderId")
|
|
152
|
+
] = pydantic.Field(default=None)
|
|
153
|
+
"""
|
|
154
|
+
The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage.
|
|
155
|
+
|
|
156
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = (
|
|
160
|
+
pydantic.Field(default=None)
|
|
161
|
+
)
|
|
162
|
+
"""
|
|
163
|
+
This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
|
|
167
|
+
"""
|
|
168
|
+
This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
assistant_overrides: typing_extensions.Annotated[
|
|
172
|
+
typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides")
|
|
173
|
+
] = pydantic.Field(default=None)
|
|
174
|
+
"""
|
|
175
|
+
These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field(
|
|
179
|
+
default=None
|
|
180
|
+
)
|
|
181
|
+
"""
|
|
182
|
+
This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None)
|
|
186
|
+
"""
|
|
187
|
+
This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
phone_number_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phoneNumberId")] = (
|
|
191
|
+
pydantic.Field(default=None)
|
|
192
|
+
)
|
|
193
|
+
"""
|
|
194
|
+
This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
195
|
+
|
|
196
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
phone_number: typing_extensions.Annotated[
|
|
200
|
+
typing.Optional[ImportTwilioPhoneNumberDto], FieldMetadata(alias="phoneNumber")
|
|
201
|
+
] = pydantic.Field(default=None)
|
|
202
|
+
"""
|
|
203
|
+
This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
204
|
+
|
|
205
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
206
|
+
"""
|
|
207
|
+
|
|
208
|
+
customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = pydantic.Field(
|
|
209
|
+
default=None
|
|
210
|
+
)
|
|
211
|
+
"""
|
|
212
|
+
This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
213
|
+
|
|
214
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
215
|
+
"""
|
|
216
|
+
|
|
217
|
+
customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None)
|
|
218
|
+
"""
|
|
219
|
+
This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
220
|
+
|
|
221
|
+
Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
225
|
+
"""
|
|
226
|
+
This is the name of the call. This is just for your own reference.
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
if IS_PYDANTIC_V2:
|
|
230
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
231
|
+
else:
|
|
232
|
+
|
|
233
|
+
class Config:
|
|
234
|
+
frozen = True
|
|
235
|
+
smart_union = True
|
|
236
|
+
extra = pydantic.Extra.allow
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
update_forward_refs(CallbackStep, Call=Call)
|
|
240
|
+
update_forward_refs(CreateWorkflowBlockDto, Call=Call)
|
|
241
|
+
update_forward_refs(HandoffStep, Call=Call)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .transport_cost import TransportCost
|
|
5
|
+
from .transcriber_cost import TranscriberCost
|
|
6
|
+
from .model_cost import ModelCost
|
|
7
|
+
from .voice_cost import VoiceCost
|
|
8
|
+
from .vapi_cost import VapiCost
|
|
9
|
+
from .analysis_cost import AnalysisCost
|
|
10
|
+
|
|
11
|
+
CallCostsItem = typing.Union[TransportCost, TranscriberCost, ModelCost, VoiceCost, VapiCost, AnalysisCost]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .transfer_destination_number import TransferDestinationNumber
|
|
5
|
+
from .transfer_destination_sip import TransferDestinationSip
|
|
6
|
+
|
|
7
|
+
CallDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip]
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
CallEndedReason = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"assistant-error",
|
|
8
|
+
"assistant-not-found",
|
|
9
|
+
"db-error",
|
|
10
|
+
"no-server-available",
|
|
11
|
+
"license-check-failed",
|
|
12
|
+
"pipeline-error-openai-llm-failed",
|
|
13
|
+
"pipeline-error-azure-openai-llm-failed",
|
|
14
|
+
"pipeline-error-groq-llm-failed",
|
|
15
|
+
"pipeline-error-anthropic-llm-failed",
|
|
16
|
+
"pipeline-error-vapi-llm-failed",
|
|
17
|
+
"pipeline-error-vapi-400-bad-request-validation-failed",
|
|
18
|
+
"pipeline-error-vapi-401-unauthorized",
|
|
19
|
+
"pipeline-error-vapi-403-model-access-denied",
|
|
20
|
+
"pipeline-error-vapi-429-exceeded-quota",
|
|
21
|
+
"pipeline-error-vapi-500-server-error",
|
|
22
|
+
"pipeline-error-openai-voice-failed",
|
|
23
|
+
"pipeline-error-cartesia-voice-failed",
|
|
24
|
+
"pipeline-error-deepgram-transcriber-failed",
|
|
25
|
+
"pipeline-error-deepgram-voice-failed",
|
|
26
|
+
"pipeline-error-gladia-transcriber-failed",
|
|
27
|
+
"pipeline-error-eleven-labs-voice-failed",
|
|
28
|
+
"pipeline-error-playht-voice-failed",
|
|
29
|
+
"pipeline-error-lmnt-voice-failed",
|
|
30
|
+
"pipeline-error-azure-voice-failed",
|
|
31
|
+
"pipeline-error-rime-ai-voice-failed",
|
|
32
|
+
"pipeline-error-neets-voice-failed",
|
|
33
|
+
"pipeline-no-available-model",
|
|
34
|
+
"worker-shutdown",
|
|
35
|
+
"unknown-error",
|
|
36
|
+
"vonage-disconnected",
|
|
37
|
+
"vonage-failed-to-connect-call",
|
|
38
|
+
"phone-call-provider-bypass-enabled-but-no-call-received",
|
|
39
|
+
"vapifault-phone-call-worker-setup-socket-error",
|
|
40
|
+
"vapifault-phone-call-worker-worker-setup-socket-timeout",
|
|
41
|
+
"vapifault-phone-call-worker-could-not-find-call",
|
|
42
|
+
"vapifault-transport-never-connected",
|
|
43
|
+
"vapifault-web-call-worker-setup-failed",
|
|
44
|
+
"vapifault-transport-connected-but-call-not-active",
|
|
45
|
+
"assistant-not-invalid",
|
|
46
|
+
"assistant-not-provided",
|
|
47
|
+
"call-start-error-neither-assistant-nor-server-set",
|
|
48
|
+
"assistant-request-failed",
|
|
49
|
+
"assistant-request-returned-error",
|
|
50
|
+
"assistant-request-returned-unspeakable-error",
|
|
51
|
+
"assistant-request-returned-invalid-assistant",
|
|
52
|
+
"assistant-request-returned-no-assistant",
|
|
53
|
+
"assistant-request-returned-forwarding-phone-number",
|
|
54
|
+
"assistant-ended-call",
|
|
55
|
+
"assistant-said-end-call-phrase",
|
|
56
|
+
"assistant-forwarded-call",
|
|
57
|
+
"assistant-join-timed-out",
|
|
58
|
+
"customer-busy",
|
|
59
|
+
"customer-ended-call",
|
|
60
|
+
"customer-did-not-answer",
|
|
61
|
+
"customer-did-not-give-microphone-permission",
|
|
62
|
+
"assistant-said-message-with-end-call-enabled",
|
|
63
|
+
"exceeded-max-duration",
|
|
64
|
+
"manually-canceled",
|
|
65
|
+
"phone-call-provider-closed-websocket",
|
|
66
|
+
"pipeline-error-openai-400-bad-request-validation-failed",
|
|
67
|
+
"pipeline-error-openai-401-unauthorized",
|
|
68
|
+
"pipeline-error-openai-403-model-access-denied",
|
|
69
|
+
"pipeline-error-openai-429-exceeded-quota",
|
|
70
|
+
"pipeline-error-openai-500-server-error",
|
|
71
|
+
"pipeline-error-azure-openai-400-bad-request-validation-failed",
|
|
72
|
+
"pipeline-error-azure-openai-401-unauthorized",
|
|
73
|
+
"pipeline-error-azure-openai-403-model-access-denied",
|
|
74
|
+
"pipeline-error-azure-openai-429-exceeded-quota",
|
|
75
|
+
"pipeline-error-azure-openai-500-server-error",
|
|
76
|
+
"pipeline-error-groq-400-bad-request-validation-failed",
|
|
77
|
+
"pipeline-error-groq-401-unauthorized",
|
|
78
|
+
"pipeline-error-groq-403-model-access-denied",
|
|
79
|
+
"pipeline-error-groq-429-exceeded-quota",
|
|
80
|
+
"pipeline-error-groq-500-server-error",
|
|
81
|
+
"pipeline-error-anthropic-400-bad-request-validation-failed",
|
|
82
|
+
"pipeline-error-anthropic-401-unauthorized",
|
|
83
|
+
"pipeline-error-anthropic-403-model-access-denied",
|
|
84
|
+
"pipeline-error-anthropic-429-exceeded-quota",
|
|
85
|
+
"pipeline-error-anthropic-500-server-error",
|
|
86
|
+
"pipeline-error-together-ai-400-bad-request-validation-failed",
|
|
87
|
+
"pipeline-error-together-ai-401-unauthorized",
|
|
88
|
+
"pipeline-error-together-ai-403-model-access-denied",
|
|
89
|
+
"pipeline-error-together-ai-429-exceeded-quota",
|
|
90
|
+
"pipeline-error-together-ai-500-server-error",
|
|
91
|
+
"pipeline-error-together-ai-llm-failed",
|
|
92
|
+
"pipeline-error-anyscale-400-bad-request-validation-failed",
|
|
93
|
+
"pipeline-error-anyscale-401-unauthorized",
|
|
94
|
+
"pipeline-error-anyscale-403-model-access-denied",
|
|
95
|
+
"pipeline-error-anyscale-429-exceeded-quota",
|
|
96
|
+
"pipeline-error-anyscale-500-server-error",
|
|
97
|
+
"pipeline-error-anyscale-llm-failed",
|
|
98
|
+
"pipeline-error-openrouter-400-bad-request-validation-failed",
|
|
99
|
+
"pipeline-error-openrouter-401-unauthorized",
|
|
100
|
+
"pipeline-error-openrouter-403-model-access-denied",
|
|
101
|
+
"pipeline-error-openrouter-429-exceeded-quota",
|
|
102
|
+
"pipeline-error-openrouter-500-server-error",
|
|
103
|
+
"pipeline-error-openrouter-llm-failed",
|
|
104
|
+
"pipeline-error-perplexity-ai-400-bad-request-validation-failed",
|
|
105
|
+
"pipeline-error-perplexity-ai-401-unauthorized",
|
|
106
|
+
"pipeline-error-perplexity-ai-403-model-access-denied",
|
|
107
|
+
"pipeline-error-perplexity-ai-429-exceeded-quota",
|
|
108
|
+
"pipeline-error-perplexity-ai-500-server-error",
|
|
109
|
+
"pipeline-error-perplexity-ai-llm-failed",
|
|
110
|
+
"pipeline-error-deepinfra-400-bad-request-validation-failed",
|
|
111
|
+
"pipeline-error-deepinfra-401-unauthorized",
|
|
112
|
+
"pipeline-error-deepinfra-403-model-access-denied",
|
|
113
|
+
"pipeline-error-deepinfra-429-exceeded-quota",
|
|
114
|
+
"pipeline-error-deepinfra-500-server-error",
|
|
115
|
+
"pipeline-error-deepinfra-llm-failed",
|
|
116
|
+
"pipeline-error-runpod-400-bad-request-validation-failed",
|
|
117
|
+
"pipeline-error-runpod-401-unauthorized",
|
|
118
|
+
"pipeline-error-runpod-403-model-access-denied",
|
|
119
|
+
"pipeline-error-runpod-429-exceeded-quota",
|
|
120
|
+
"pipeline-error-runpod-500-server-error",
|
|
121
|
+
"pipeline-error-runpod-llm-failed",
|
|
122
|
+
"pipeline-error-custom-llm-400-bad-request-validation-failed",
|
|
123
|
+
"pipeline-error-custom-llm-401-unauthorized",
|
|
124
|
+
"pipeline-error-custom-llm-403-model-access-denied",
|
|
125
|
+
"pipeline-error-custom-llm-429-exceeded-quota",
|
|
126
|
+
"pipeline-error-custom-llm-500-server-error",
|
|
127
|
+
"pipeline-error-custom-llm-llm-failed",
|
|
128
|
+
"pipeline-error-cartesia-socket-hang-up",
|
|
129
|
+
"pipeline-error-cartesia-requested-payment",
|
|
130
|
+
"pipeline-error-cartesia-500-server-error",
|
|
131
|
+
"pipeline-error-cartesia-503-server-error",
|
|
132
|
+
"pipeline-error-cartesia-522-server-error",
|
|
133
|
+
"pipeline-error-custom-voice-failed",
|
|
134
|
+
"pipeline-error-eleven-labs-voice-not-found",
|
|
135
|
+
"pipeline-error-eleven-labs-quota-exceeded",
|
|
136
|
+
"pipeline-error-eleven-labs-unauthorized-access",
|
|
137
|
+
"pipeline-error-eleven-labs-unauthorized-to-access-model",
|
|
138
|
+
"pipeline-error-eleven-labs-professional-voices-only-for-creator-plus",
|
|
139
|
+
"pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade",
|
|
140
|
+
"pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade",
|
|
141
|
+
"pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade",
|
|
142
|
+
"pipeline-error-eleven-labs-system-busy-and-requested-upgrade",
|
|
143
|
+
"pipeline-error-eleven-labs-voice-not-fine-tuned",
|
|
144
|
+
"pipeline-error-eleven-labs-invalid-api-key",
|
|
145
|
+
"pipeline-error-eleven-labs-invalid-voice-samples",
|
|
146
|
+
"pipeline-error-eleven-labs-voice-disabled-by-owner",
|
|
147
|
+
"pipeline-error-eleven-labs-blocked-account-in-probation",
|
|
148
|
+
"pipeline-error-eleven-labs-blocked-content-against-their-policy",
|
|
149
|
+
"pipeline-error-eleven-labs-missing-samples-for-voice-clone",
|
|
150
|
+
"pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used",
|
|
151
|
+
"pipeline-error-eleven-labs-voice-not-allowed-for-free-users",
|
|
152
|
+
"pipeline-error-eleven-labs-500-server-error",
|
|
153
|
+
"pipeline-error-eleven-labs-max-character-limit-exceeded",
|
|
154
|
+
"pipeline-error-playht-request-timed-out",
|
|
155
|
+
"pipeline-error-playht-invalid-voice",
|
|
156
|
+
"pipeline-error-playht-unexpected-error",
|
|
157
|
+
"pipeline-error-playht-out-of-credits",
|
|
158
|
+
"pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri",
|
|
159
|
+
"pipeline-error-playht-401-unauthorized",
|
|
160
|
+
"pipeline-error-playht-403-forbidden-out-of-characters",
|
|
161
|
+
"pipeline-error-playht-403-forbidden-api-access-not-available",
|
|
162
|
+
"pipeline-error-playht-429-exceeded-quota",
|
|
163
|
+
"pipeline-error-playht-502-gateway-error",
|
|
164
|
+
"pipeline-error-playht-504-gateway-error",
|
|
165
|
+
"pipeline-error-deepgram-403-model-access-denied",
|
|
166
|
+
"pipeline-error-deepgram-404-not-found",
|
|
167
|
+
"pipeline-error-deepgram-400-no-such-model-language-tier-combination",
|
|
168
|
+
"pipeline-error-deepgram-500-returning-invalid-json",
|
|
169
|
+
"sip-gateway-failed-to-connect-call",
|
|
170
|
+
"silence-timed-out",
|
|
171
|
+
"twilio-failed-to-connect-call",
|
|
172
|
+
"twilio-reported-customer-misdialed",
|
|
173
|
+
"voicemail",
|
|
174
|
+
"vonage-rejected",
|
|
175
|
+
],
|
|
176
|
+
typing.Any,
|
|
177
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .user_message import UserMessage
|
|
5
|
+
from .system_message import SystemMessage
|
|
6
|
+
from .bot_message import BotMessage
|
|
7
|
+
from .tool_call_message import ToolCallMessage
|
|
8
|
+
from .tool_call_result_message import ToolCallResultMessage
|
|
9
|
+
|
|
10
|
+
CallMessagesItem = typing.Union[UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
+
from .callback_step import CallbackStep
|
|
6
|
+
from .create_workflow_block_dto import CreateWorkflowBlockDto
|
|
7
|
+
from .handoff_step import HandoffStep
|
|
8
|
+
import typing
|
|
9
|
+
from .call import Call
|
|
10
|
+
from .pagination_meta import PaginationMeta
|
|
11
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
12
|
+
import pydantic
|
|
13
|
+
from ..core.pydantic_utilities import update_forward_refs
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CallPaginatedResponse(UniversalBaseModel):
|
|
17
|
+
results: typing.List[Call]
|
|
18
|
+
metadata: PaginationMeta
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
update_forward_refs(CallbackStep, CallPaginatedResponse=CallPaginatedResponse)
|
|
31
|
+
update_forward_refs(CreateWorkflowBlockDto, CallPaginatedResponse=CallPaginatedResponse)
|
|
32
|
+
update_forward_refs(HandoffStep, CallPaginatedResponse=CallPaginatedResponse)
|
vapi/types/call_type.py
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
+
import typing
|
|
6
|
+
import pydantic
|
|
7
|
+
from .assignment_mutation import AssignmentMutation
|
|
8
|
+
import typing_extensions
|
|
9
|
+
from ..core.serialization import FieldMetadata
|
|
10
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
+
from ..core.pydantic_utilities import update_forward_refs
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class CallbackStep(UniversalBaseModel):
|
|
15
|
+
block: typing.Optional["CallbackStepBlock"] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
This is the block to use. To use an existing block, use `blockId`.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
type: typing.Literal["callback"] = pydantic.Field(default="callback")
|
|
21
|
+
"""
|
|
22
|
+
This is a step that calls back to the previous step after it's done. This effectively means we're spawning a new conversation thread. The previous conversation thread will resume where it left off once this step is done.
|
|
23
|
+
|
|
24
|
+
Use case:
|
|
25
|
+
|
|
26
|
+
- You are collecting a customer's order and while they were on one item, they start a new item or try to modify a previous one. You would make a OrderUpdate block which calls the same block repeatedly when a new update starts.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
mutations: typing.Optional[typing.List[AssignmentMutation]] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
This is the mutations to apply to the context after the step is done.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
name: str = pydantic.Field()
|
|
35
|
+
"""
|
|
36
|
+
This is the name of the step.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
block_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="blockId")] = pydantic.Field(
|
|
40
|
+
default=None
|
|
41
|
+
)
|
|
42
|
+
"""
|
|
43
|
+
This is the id of the block to use. To use a transient block, use `block`.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
This is the input to the block. You can use any key-value map as input to the block.
|
|
49
|
+
|
|
50
|
+
Example:
|
|
51
|
+
{
|
|
52
|
+
"name": "John Doe",
|
|
53
|
+
"age": 20
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
You can reference any variable in the context of the current block:
|
|
57
|
+
|
|
58
|
+
- "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1)
|
|
59
|
+
- "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1)
|
|
60
|
+
- "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2)
|
|
61
|
+
- "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2)
|
|
62
|
+
- "{{workflow.input.your-property-name}}" for the current workflow's input
|
|
63
|
+
- "{{global.your-property-name}}" for the global context
|
|
64
|
+
|
|
65
|
+
Example:
|
|
66
|
+
{
|
|
67
|
+
"name": "{{my-tool-call-step.output.name}}",
|
|
68
|
+
"age": "{{my-tool-call-step.input.age}}",
|
|
69
|
+
"date": "{{workflow.input.date}}"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
You can dynamically change the key name.
|
|
73
|
+
|
|
74
|
+
Example:
|
|
75
|
+
{
|
|
76
|
+
"{{my-tool-call-step.output.key-name-for-name}}": "{{name}}",
|
|
77
|
+
"{{my-tool-call-step.input.key-name-for-age}}": "{{age}}",
|
|
78
|
+
"{{workflow.input.key-name-for-date}}": "{{date}}"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
You can represent the value as a string, number, boolean, array, or object.
|
|
82
|
+
|
|
83
|
+
Example:
|
|
84
|
+
{
|
|
85
|
+
"name": "john",
|
|
86
|
+
"age": 20,
|
|
87
|
+
"date": "2021-01-01",
|
|
88
|
+
"metadata": {
|
|
89
|
+
"unique-key": "{{my-tool-call-step.output.unique-key}}"
|
|
90
|
+
},
|
|
91
|
+
"array": ["A", "B", "C"],
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
Caveats:
|
|
95
|
+
|
|
96
|
+
1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.
|
|
97
|
+
2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow.
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
if IS_PYDANTIC_V2:
|
|
101
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
102
|
+
else:
|
|
103
|
+
|
|
104
|
+
class Config:
|
|
105
|
+
frozen = True
|
|
106
|
+
smart_union = True
|
|
107
|
+
extra = pydantic.Extra.allow
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
from .create_workflow_block_dto import CreateWorkflowBlockDto # noqa: E402
|
|
111
|
+
from .handoff_step import HandoffStep # noqa: E402
|
|
112
|
+
from .callback_step_block import CallbackStepBlock # noqa: E402
|
|
113
|
+
|
|
114
|
+
update_forward_refs(CreateWorkflowBlockDto, CallbackStep=CallbackStep)
|
|
115
|
+
update_forward_refs(HandoffStep, CallbackStep=CallbackStep)
|
|
116
|
+
update_forward_refs(CallbackStep)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
import typing
|
|
5
|
+
from .create_conversation_block_dto import CreateConversationBlockDto
|
|
6
|
+
from .create_tool_call_block_dto import CreateToolCallBlockDto
|
|
7
|
+
import typing
|
|
8
|
+
|
|
9
|
+
if typing.TYPE_CHECKING:
|
|
10
|
+
from .create_workflow_block_dto import CreateWorkflowBlockDto
|
|
11
|
+
CallbackStepBlock = typing.Union[CreateConversationBlockDto, CreateToolCallBlockDto, "CreateWorkflowBlockDto"]
|