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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.serialization import FieldMetadata
|
|
8
|
+
from .voice_library_gender import VoiceLibraryGender
|
|
9
|
+
import datetime as dt
|
|
10
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class VoiceLibrary(UniversalBaseModel):
|
|
14
|
+
provider: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
This is the voice provider that will be used.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
provider_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="providerId")] = pydantic.Field(
|
|
20
|
+
default=None
|
|
21
|
+
)
|
|
22
|
+
"""
|
|
23
|
+
The ID of the voice provided by the provider.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
slug: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The unique slug of the voice.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
The name of the voice.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
language: typing.Optional[str] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
The language of the voice.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
language_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="languageCode")] = (
|
|
42
|
+
pydantic.Field(default=None)
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
The language code of the voice.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
model: typing.Optional[str] = pydantic.Field(default=None)
|
|
49
|
+
"""
|
|
50
|
+
The model of the voice.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
supported_models: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="supportedModels")] = (
|
|
54
|
+
pydantic.Field(default=None)
|
|
55
|
+
)
|
|
56
|
+
"""
|
|
57
|
+
The supported models of the voice.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
gender: typing.Optional[VoiceLibraryGender] = pydantic.Field(default=None)
|
|
61
|
+
"""
|
|
62
|
+
The gender of the voice.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
accent: typing.Optional[str] = pydantic.Field(default=None)
|
|
66
|
+
"""
|
|
67
|
+
The accent of the voice.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
preview_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="previewUrl")] = pydantic.Field(
|
|
71
|
+
default=None
|
|
72
|
+
)
|
|
73
|
+
"""
|
|
74
|
+
The preview URL of the voice.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
78
|
+
"""
|
|
79
|
+
The description of the voice.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
credential_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="credentialId")] = (
|
|
83
|
+
pydantic.Field(default=None)
|
|
84
|
+
)
|
|
85
|
+
"""
|
|
86
|
+
The credential ID of the voice.
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
id: str = pydantic.Field()
|
|
90
|
+
"""
|
|
91
|
+
The unique identifier for the voice library.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field()
|
|
95
|
+
"""
|
|
96
|
+
The unique identifier for the organization that this voice library belongs to.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
is_public: typing_extensions.Annotated[bool, FieldMetadata(alias="isPublic")] = pydantic.Field()
|
|
100
|
+
"""
|
|
101
|
+
The Public voice is shared accross all the organizations.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
is_deleted: typing_extensions.Annotated[bool, FieldMetadata(alias="isDeleted")] = pydantic.Field()
|
|
105
|
+
"""
|
|
106
|
+
The deletion status of the voice.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
|
|
110
|
+
"""
|
|
111
|
+
The ISO 8601 date-time string of when the voice library was created.
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
|
|
115
|
+
"""
|
|
116
|
+
The ISO 8601 date-time string of when the voice library was last updated.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
if IS_PYDANTIC_V2:
|
|
120
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
121
|
+
else:
|
|
122
|
+
|
|
123
|
+
class Config:
|
|
124
|
+
frozen = True
|
|
125
|
+
smart_union = True
|
|
126
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing_extensions
|
|
5
|
+
from ..core.serialization import FieldMetadata
|
|
6
|
+
import typing
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class VoiceLibraryVoiceResponse(UniversalBaseModel):
|
|
12
|
+
voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId")]
|
|
13
|
+
name: str
|
|
14
|
+
public_owner_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="publicOwnerId")] = None
|
|
15
|
+
description: typing.Optional[str] = None
|
|
16
|
+
gender: typing.Optional[str] = None
|
|
17
|
+
age: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
18
|
+
accent: typing.Optional[str] = None
|
|
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
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing_extensions
|
|
5
|
+
from ..core.serialization import FieldMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
import typing
|
|
8
|
+
import datetime as dt
|
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VonageCredential(UniversalBaseModel):
|
|
13
|
+
vonage_application_private_key: typing_extensions.Annotated[
|
|
14
|
+
str, FieldMetadata(alias="vonageApplicationPrivateKey")
|
|
15
|
+
] = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
This is not returned in the API.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
provider: typing.Literal["vonage"] = "vonage"
|
|
21
|
+
api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret")] = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
This is not returned in the API.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
id: str = pydantic.Field()
|
|
27
|
+
"""
|
|
28
|
+
This is the unique identifier for the credential.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field()
|
|
32
|
+
"""
|
|
33
|
+
This is the unique identifier for the org that this credential belongs to.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
|
|
37
|
+
"""
|
|
38
|
+
This is the ISO 8601 date-time string of when the credential was created.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
|
|
42
|
+
"""
|
|
43
|
+
This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
vonage_application_id: typing_extensions.Annotated[str, FieldMetadata(alias="vonageApplicationId")] = (
|
|
47
|
+
pydantic.Field()
|
|
48
|
+
)
|
|
49
|
+
"""
|
|
50
|
+
This is the Vonage Application ID for the credential.
|
|
51
|
+
|
|
52
|
+
Only relevant for Vonage credentials.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")]
|
|
56
|
+
|
|
57
|
+
if IS_PYDANTIC_V2:
|
|
58
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
59
|
+
else:
|
|
60
|
+
|
|
61
|
+
class Config:
|
|
62
|
+
frozen = True
|
|
63
|
+
smart_union = True
|
|
64
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing_extensions
|
|
5
|
+
import typing
|
|
6
|
+
from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination
|
|
7
|
+
from ..core.serialization import FieldMetadata
|
|
8
|
+
import pydantic
|
|
9
|
+
import datetime as dt
|
|
10
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class VonagePhoneNumber(UniversalBaseModel):
|
|
14
|
+
fallback_destination: typing_extensions.Annotated[
|
|
15
|
+
typing.Optional[VonagePhoneNumberFallbackDestination], FieldMetadata(alias="fallbackDestination")
|
|
16
|
+
] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
This is the fallback destination an inbound call will be transferred to if:
|
|
19
|
+
|
|
20
|
+
1. `assistantId` is not set
|
|
21
|
+
2. `squadId` is not set
|
|
22
|
+
3. and, `assistant-request` message to the `serverUrl` fails
|
|
23
|
+
|
|
24
|
+
If this is not set and above conditions are met, the inbound call is hung up with an error message.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
provider: typing.Literal["vonage"] = "vonage"
|
|
28
|
+
id: str = pydantic.Field()
|
|
29
|
+
"""
|
|
30
|
+
This is the unique identifier for the phone number.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field()
|
|
34
|
+
"""
|
|
35
|
+
This is the unique identifier for the org that this phone number belongs to.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
|
|
39
|
+
"""
|
|
40
|
+
This is the ISO 8601 date-time string of when the phone number was created.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
|
|
44
|
+
"""
|
|
45
|
+
This is the ISO 8601 date-time string of when the phone number was last updated.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
49
|
+
"""
|
|
50
|
+
This is the name of the phone number. This is just for your own reference.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = (
|
|
54
|
+
pydantic.Field(default=None)
|
|
55
|
+
)
|
|
56
|
+
"""
|
|
57
|
+
This is the assistant that will be used for incoming calls to this phone number.
|
|
58
|
+
|
|
59
|
+
If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field(
|
|
63
|
+
default=None
|
|
64
|
+
)
|
|
65
|
+
"""
|
|
66
|
+
This is the squad that will be used for incoming calls to this phone number.
|
|
67
|
+
|
|
68
|
+
If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field(
|
|
72
|
+
default=None
|
|
73
|
+
)
|
|
74
|
+
"""
|
|
75
|
+
This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message.
|
|
76
|
+
|
|
77
|
+
You can see the shape of the messages sent in `ServerMessage`.
|
|
78
|
+
|
|
79
|
+
This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = (
|
|
83
|
+
pydantic.Field(default=None)
|
|
84
|
+
)
|
|
85
|
+
"""
|
|
86
|
+
This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret.
|
|
87
|
+
|
|
88
|
+
Same precedence logic as serverUrl.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
number: str = pydantic.Field()
|
|
92
|
+
"""
|
|
93
|
+
These are the digits of the phone number you own on your Vonage.
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field()
|
|
97
|
+
"""
|
|
98
|
+
This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
if IS_PYDANTIC_V2:
|
|
102
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
103
|
+
else:
|
|
104
|
+
|
|
105
|
+
class Config:
|
|
106
|
+
frozen = True
|
|
107
|
+
smart_union = True
|
|
108
|
+
extra = pydantic.Extra.allow
|
|
@@ -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
|
+
VonagePhoneNumberFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip]
|
|
@@ -0,0 +1,99 @@
|
|
|
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 .workflow_block_messages_item import WorkflowBlockMessagesItem
|
|
10
|
+
import pydantic
|
|
11
|
+
import typing_extensions
|
|
12
|
+
from .json_schema import JsonSchema
|
|
13
|
+
from ..core.serialization import FieldMetadata
|
|
14
|
+
from .workflow_block_steps_item import WorkflowBlockStepsItem
|
|
15
|
+
import datetime as dt
|
|
16
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
17
|
+
from ..core.pydantic_utilities import update_forward_refs
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class WorkflowBlock(UniversalBaseModel):
|
|
21
|
+
messages: typing.Optional[typing.List[WorkflowBlockMessagesItem]] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
These are the pre-configured messages that will be spoken to the user while the block is running.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = (
|
|
27
|
+
pydantic.Field(default=None)
|
|
28
|
+
)
|
|
29
|
+
"""
|
|
30
|
+
This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`
|
|
31
|
+
|
|
32
|
+
These are accessible as variables:
|
|
33
|
+
|
|
34
|
+
- ({{input.propertyName}}) in context of the block execution (step)
|
|
35
|
+
- ({{stepName.input.propertyName}}) in context of the workflow
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = (
|
|
39
|
+
pydantic.Field(default=None)
|
|
40
|
+
)
|
|
41
|
+
"""
|
|
42
|
+
This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).
|
|
43
|
+
|
|
44
|
+
These are accessible as variables:
|
|
45
|
+
|
|
46
|
+
- ({{output.propertyName}}) in context of the block execution (step)
|
|
47
|
+
- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)
|
|
48
|
+
- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)
|
|
49
|
+
|
|
50
|
+
Caveats:
|
|
51
|
+
|
|
52
|
+
1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.
|
|
53
|
+
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.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 with steps.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
type: typing.Literal["workflow"] = "workflow"
|
|
57
|
+
steps: typing.Optional[typing.List[WorkflowBlockStepsItem]] = pydantic.Field(default=None)
|
|
58
|
+
"""
|
|
59
|
+
These are the steps in the workflow.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
id: str = pydantic.Field()
|
|
63
|
+
"""
|
|
64
|
+
This is the unique identifier for the block.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field()
|
|
68
|
+
"""
|
|
69
|
+
This is the unique identifier for the organization that this block belongs to.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
|
|
73
|
+
"""
|
|
74
|
+
This is the ISO 8601 date-time string of when the block was created.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
|
|
78
|
+
"""
|
|
79
|
+
This is the ISO 8601 date-time string of when the block was last updated.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
83
|
+
"""
|
|
84
|
+
This is the name of the block. This is just for your reference.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
if IS_PYDANTIC_V2:
|
|
88
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
89
|
+
else:
|
|
90
|
+
|
|
91
|
+
class Config:
|
|
92
|
+
frozen = True
|
|
93
|
+
smart_union = True
|
|
94
|
+
extra = pydantic.Extra.allow
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
update_forward_refs(CallbackStep, WorkflowBlock=WorkflowBlock)
|
|
98
|
+
update_forward_refs(CreateWorkflowBlockDto, WorkflowBlock=WorkflowBlock)
|
|
99
|
+
update_forward_refs(HandoffStep, WorkflowBlock=WorkflowBlock)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .block_start_message import BlockStartMessage
|
|
5
|
+
from .block_complete_message import BlockCompleteMessage
|
|
6
|
+
|
|
7
|
+
WorkflowBlockMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage]
|
vapi/version.py
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: vapi-server-sdk
|
|
3
|
+
Version: 0.0.0a7
|
|
4
|
+
Summary:
|
|
5
|
+
Requires-Python: >=3.8,<4.0
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Operating System :: MacOS
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Operating System :: POSIX
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Dist: httpx (>=0.21.2)
|
|
22
|
+
Requires-Dist: pydantic (>=1.9.2)
|
|
23
|
+
Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
|
|
24
|
+
Requires-Dist: typing_extensions (>=4.0.0)
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# Vapi Python Library
|
|
28
|
+
|
|
29
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FVapiAI%2Fserver-sdk-python)
|
|
30
|
+
[](https://pypi.python.org/pypi/vapi_server_sdk)
|
|
31
|
+
|
|
32
|
+
The Vapi Python library provides convenient access to the Vapi API from Python.
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pip install vapi_server_sdk
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Reference
|
|
41
|
+
|
|
42
|
+
A full reference for this library is available [here](./reference.md).
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Instantiate and use the client with the following:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from vapi import Vapi
|
|
50
|
+
|
|
51
|
+
client = Vapi(
|
|
52
|
+
token="YOUR_TOKEN",
|
|
53
|
+
)
|
|
54
|
+
client.calls.create()
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Async Client
|
|
58
|
+
|
|
59
|
+
The SDK also exports an `async` client so that you can make non-blocking calls to our API.
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
import asyncio
|
|
63
|
+
|
|
64
|
+
from vapi import AsyncVapi
|
|
65
|
+
|
|
66
|
+
client = AsyncVapi(
|
|
67
|
+
token="YOUR_TOKEN",
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
async def main() -> None:
|
|
72
|
+
await client.calls.create()
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
asyncio.run(main())
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Exception Handling
|
|
79
|
+
|
|
80
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
81
|
+
will be thrown.
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from vapi.core.api_error import ApiError
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
client.calls.create(...)
|
|
88
|
+
except ApiError as e:
|
|
89
|
+
print(e.status_code)
|
|
90
|
+
print(e.body)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Pagination
|
|
94
|
+
|
|
95
|
+
Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
from vapi import Vapi
|
|
99
|
+
|
|
100
|
+
client = Vapi(
|
|
101
|
+
token="YOUR_TOKEN",
|
|
102
|
+
)
|
|
103
|
+
response = client.logs.get()
|
|
104
|
+
for item in response:
|
|
105
|
+
yield item
|
|
106
|
+
# alternatively, you can paginate page-by-page
|
|
107
|
+
for page in response.iter_pages():
|
|
108
|
+
yield page
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Advanced
|
|
112
|
+
|
|
113
|
+
### Retries
|
|
114
|
+
|
|
115
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
116
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
117
|
+
retry limit (default: 2).
|
|
118
|
+
|
|
119
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
120
|
+
|
|
121
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
122
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
123
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
124
|
+
|
|
125
|
+
Use the `max_retries` request option to configure this behavior.
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
client.calls.create(..., request_options={
|
|
129
|
+
"max_retries": 1
|
|
130
|
+
})
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Timeouts
|
|
134
|
+
|
|
135
|
+
The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
|
|
139
|
+
from vapi import Vapi
|
|
140
|
+
|
|
141
|
+
client = Vapi(
|
|
142
|
+
...,
|
|
143
|
+
timeout=20.0,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# Override timeout for a specific method
|
|
148
|
+
client.calls.create(..., request_options={
|
|
149
|
+
"timeout_in_seconds": 1
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Custom Client
|
|
154
|
+
|
|
155
|
+
You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
|
|
156
|
+
and transports.
|
|
157
|
+
```python
|
|
158
|
+
import httpx
|
|
159
|
+
from vapi import Vapi
|
|
160
|
+
|
|
161
|
+
client = Vapi(
|
|
162
|
+
...,
|
|
163
|
+
httpx_client=httpx.Client(
|
|
164
|
+
proxies="http://my.test.proxy.example.com",
|
|
165
|
+
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
|
|
166
|
+
),
|
|
167
|
+
)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Contributing
|
|
171
|
+
|
|
172
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
173
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
|
174
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
175
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
176
|
+
an issue first to discuss with us!
|
|
177
|
+
|
|
178
|
+
On the other hand, contributions to the README are always very welcome!
|
|
179
|
+
|