vapi_server_sdk 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +160 -68
- data/lib/vapi_server_sdk/analytics/client.rb +0 -14
- data/lib/vapi_server_sdk/assistants/client.rb +19 -72
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_credentials_item.rb +512 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/blocks/client.rb +7 -236
- data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
- data/lib/vapi_server_sdk/calls/client.rb +22 -74
- data/lib/vapi_server_sdk/files/client.rb +0 -70
- data/lib/vapi_server_sdk/knowledge_bases/client.rb +7 -78
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
- data/lib/vapi_server_sdk/logs/client.rb +75 -22
- data/lib/vapi_server_sdk/logs/types/logging_controller_logs_delete_query_request_type.rb +12 -0
- data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -139
- data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
- data/lib/vapi_server_sdk/squads/client.rb +16 -70
- data/lib/vapi_server_sdk/tools/client.rb +7 -161
- data/lib/vapi_server_sdk/tools/types/tools_update_request.rb +200 -0
- data/lib/vapi_server_sdk/types/assistant.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_overrides_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb +88 -0
- data/lib/vapi_server_sdk/types/azure_credential.rb +22 -5
- data/lib/vapi_server_sdk/types/azure_credential_region.rb +5 -3
- data/lib/vapi_server_sdk/types/azure_credential_service.rb +9 -0
- data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +9 -1
- data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +5 -3
- data/lib/vapi_server_sdk/types/azure_speech_transcriber.rb +62 -0
- data/lib/vapi_server_sdk/types/azure_speech_transcriber_language.rb +152 -0
- data/lib/vapi_server_sdk/types/bash_tool_with_tool_call.rb +175 -0
- data/lib/vapi_server_sdk/types/bash_tool_with_tool_call_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/byo_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/call_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/cerebras_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/chat_dto.rb +103 -0
- data/lib/vapi_server_sdk/types/{credits_buy_dto.rb → chat_service_response.rb} +9 -17
- data/lib/vapi_server_sdk/types/client_inbound_message_end_call.rb +47 -0
- data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
- data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
- data/lib/vapi_server_sdk/types/cloudflare_credential.rb +142 -0
- data/lib/vapi_server_sdk/types/cloudflare_r_2_bucket_plan.rb +105 -0
- data/lib/vapi_server_sdk/types/computer_tool_with_tool_call.rb +199 -0
- data/lib/vapi_server_sdk/types/computer_tool_with_tool_call_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assistant_dto.rb +19 -1
- data/lib/vapi_server_sdk/types/create_assistant_dto_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +21 -12
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +5 -3
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +10 -9
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +5 -3
- data/lib/vapi_server_sdk/types/create_byo_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +1 -9
- data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_cerebras_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/create_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +2 -4
- data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +2 -10
- data/lib/vapi_server_sdk/types/create_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_tavus_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +34 -47
- data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto_create_plan.rb +97 -0
- data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +2 -13
- data/lib/vapi_server_sdk/types/create_workflow_dto.rb +87 -0
- data/lib/vapi_server_sdk/types/create_workflow_dto_nodes_item.rb +81 -0
- data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +2 -11
- data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +2 -4
- data/lib/vapi_server_sdk/types/deep_seek_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/deep_seek_model.rb +177 -0
- data/lib/vapi_server_sdk/types/deep_seek_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk/types/edge.rb +80 -0
- data/lib/vapi_server_sdk/types/edge_condition.rb +94 -0
- data/lib/vapi_server_sdk/types/eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +13 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice.rb +95 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +1 -10
- data/lib/vapi_server_sdk/types/gather.rb +87 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config.rb +58 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.rb +11 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_speech_config.rb +61 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_voice_config.rb +61 -0
- data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +1 -9
- data/lib/vapi_server_sdk/types/google_model.rb +17 -1
- data/lib/vapi_server_sdk/types/google_model_model.rb +2 -0
- data/lib/vapi_server_sdk/types/google_realtime_config.rb +121 -0
- data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -3
- data/lib/vapi_server_sdk/types/import_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/import_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/json_schema.rb +13 -2
- data/lib/vapi_server_sdk/types/log.rb +18 -18
- data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +1 -9
- data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_model_model.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/org.rb +25 -25
- data/lib/vapi_server_sdk/types/org_with_org_user.rb +25 -25
- data/lib/vapi_server_sdk/types/{subscription_concurrency_line_remove_dto.rb → programmatic_edge_condition.rb} +16 -14
- data/lib/vapi_server_sdk/types/say.rb +72 -0
- data/lib/vapi_server_sdk/types/{payment_retry_dto.rb → semantic_edge_condition.rb} +16 -14
- data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/server_message_status_update.rb +11 -1
- data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
- data/lib/vapi_server_sdk/types/smallest_ai_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice.rb +117 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/subscription.rb +13 -11
- data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
- data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call.rb +175 -0
- data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call_messages_item.rb +121 -0
- data/lib/vapi_server_sdk/types/transfer_plan.rb +26 -6
- data/lib/vapi_server_sdk/types/transfer_plan_message.rb +2 -1
- data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +35 -44
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_create_plan.rb → trieve_knowledge_base_chunk_plan.rb} +17 -11
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_create.rb +59 -0
- data/lib/vapi_server_sdk/types/trieve_knowledge_base_create_plan.rb +96 -0
- data/lib/vapi_server_sdk/types/{subscription_concurrency_line_buy_dto.rb → trieve_knowledge_base_import.rb} +14 -14
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan.rb → trieve_knowledge_base_search_plan.rb} +9 -11
- data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan_search_type.rb → trieve_knowledge_base_search_plan_search_type.rb} +1 -1
- data/lib/vapi_server_sdk/types/twilio_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +24 -14
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +5 -3
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +25 -24
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +5 -3
- data/lib/vapi_server_sdk/types/update_bash_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_bash_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto.rb +187 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +13 -21
- data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_cerebras_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto.rb +185 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto.rb +206 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto_messages_item.rb +95 -0
- data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +137 -0
- data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +4 -16
- data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -11
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_make_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_make_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/update_output_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_output_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +12 -20
- data/lib/vapi_server_sdk/types/update_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_token_dto.rb +81 -0
- data/lib/vapi_server_sdk/types/update_token_dto_tag.rb +9 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto.rb +168 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_tool.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_destinations_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_messages_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +96 -0
- data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto_create_plan.rb +97 -0
- data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto.rb +163 -0
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto.rb +169 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto.rb +157 -0
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto.rb +154 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_steps_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_workflow_dto.rb +82 -0
- data/lib/vapi_server_sdk/types/update_workflow_dto_nodes_item.rb +81 -0
- data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/vapi_model.rb +27 -1
- data/lib/vapi_server_sdk/types/vapi_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/workflow.rb +125 -0
- data/lib/vapi_server_sdk/types/workflow_nodes_item.rb +81 -0
- metadata +116 -24
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_messages_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_steps_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_tool.rb +0 -163
- data/lib/vapi_server_sdk/phone_numbers/types/update_phone_number_dto_fallback_destination.rb +0 -103
- data/lib/vapi_server_sdk/tools/types/update_tool_dto_messages_item.rb +0 -122
- data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/payment.rb +0 -167
- data/lib/vapi_server_sdk/types/payment_status.rb +0 -11
- data/lib/vapi_server_sdk/types/payments_paginated_response.rb +0 -75
- data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +0 -67
- data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +0 -65
@@ -23,8 +23,9 @@ module Vapi
|
|
23
23
|
# @return [String] This is the number of credits the subscription currently has.
|
24
24
|
# Note: This is a string to avoid floating point precision issues.
|
25
25
|
attr_reader :credits
|
26
|
-
# @return [Float] This is the total concurrency
|
27
|
-
|
26
|
+
# @return [Float] This is the total number of active calls (concurrency) across all orgs under
|
27
|
+
# this subscription.
|
28
|
+
attr_reader :concurrency_counter
|
28
29
|
# @return [Float] This is the default concurrency limit for the subscription.
|
29
30
|
attr_reader :concurrency_limit_included
|
30
31
|
# @return [Float] This is the purchased add-on concurrency limit for the subscription.
|
@@ -54,7 +55,7 @@ module Vapi
|
|
54
55
|
# @return [String] This is the Stripe fingerprint of the payment method (card). It allows us
|
55
56
|
# to detect users who try to abuse our system through multiple sign-ups.
|
56
57
|
attr_reader :stripe_payment_method_fingerprint
|
57
|
-
# @return [String] This is the
|
58
|
+
# @return [String] This is the customer's email on Stripe.
|
58
59
|
attr_reader :stripe_customer_email
|
59
60
|
# @return [String] This is the email of the referrer for the subscription.
|
60
61
|
attr_reader :referred_by_email
|
@@ -98,7 +99,8 @@ module Vapi
|
|
98
99
|
# with past due payments.
|
99
100
|
# @param credits [String] This is the number of credits the subscription currently has.
|
100
101
|
# Note: This is a string to avoid floating point precision issues.
|
101
|
-
# @param
|
102
|
+
# @param concurrency_counter [Float] This is the total number of active calls (concurrency) across all orgs under
|
103
|
+
# this subscription.
|
102
104
|
# @param concurrency_limit_included [Float] This is the default concurrency limit for the subscription.
|
103
105
|
# @param concurrency_limit_purchased [Float] This is the purchased add-on concurrency limit for the subscription.
|
104
106
|
# @param monthly_charge_schedule_id [Float] This is the ID of the monthly job that charges for subscription add ons and
|
@@ -117,7 +119,7 @@ module Vapi
|
|
117
119
|
# @param hipaa_common_paper_agreement_id [String] This is the ID for the Common Paper agreement outlining the HIPAA contract.
|
118
120
|
# @param stripe_payment_method_fingerprint [String] This is the Stripe fingerprint of the payment method (card). It allows us
|
119
121
|
# to detect users who try to abuse our system through multiple sign-ups.
|
120
|
-
# @param stripe_customer_email [String] This is the
|
122
|
+
# @param stripe_customer_email [String] This is the customer's email on Stripe.
|
121
123
|
# @param referred_by_email [String] This is the email of the referrer for the subscription.
|
122
124
|
# @param auto_reload_plan [Vapi::AutoReloadPlan] This is the auto reload plan configured for the subscription.
|
123
125
|
# @param minutes_included [Float] The number of minutes included in the subscription. Enterprise only.
|
@@ -135,7 +137,7 @@ module Vapi
|
|
135
137
|
# @param coupon_usage_left [String] This is the number of credits left obtained from a coupon.
|
136
138
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
137
139
|
# @return [Vapi::Subscription]
|
138
|
-
def initialize(id:, created_at:, updated_at:, type:, status:, credits:,
|
140
|
+
def initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_counter:,
|
139
141
|
concurrency_limit_included:, concurrency_limit_purchased:, monthly_charge_schedule_id: OMIT, monthly_credit_check_schedule_id: OMIT, stripe_customer_id: OMIT, stripe_payment_method_id: OMIT, slack_support_enabled: OMIT, slack_channel_id: OMIT, hipaa_enabled: OMIT, hipaa_common_paper_agreement_id: OMIT, stripe_payment_method_fingerprint: OMIT, stripe_customer_email: OMIT, referred_by_email: OMIT, auto_reload_plan: OMIT, minutes_included: OMIT, minutes_used: OMIT, minutes_overage_cost: OMIT, providers_included: OMIT, outbound_calls_daily_limit: OMIT, outbound_calls_counter: OMIT, outbound_calls_counter_next_reset_at: OMIT, coupon_ids: OMIT, coupon_usage_left: OMIT, additional_properties: nil)
|
140
142
|
@id = id
|
141
143
|
@created_at = created_at
|
@@ -143,7 +145,7 @@ module Vapi
|
|
143
145
|
@type = type
|
144
146
|
@status = status
|
145
147
|
@credits = credits
|
146
|
-
@
|
148
|
+
@concurrency_counter = concurrency_counter
|
147
149
|
@concurrency_limit_included = concurrency_limit_included
|
148
150
|
@concurrency_limit_purchased = concurrency_limit_purchased
|
149
151
|
@monthly_charge_schedule_id = monthly_charge_schedule_id if monthly_charge_schedule_id != OMIT
|
@@ -179,7 +181,7 @@ module Vapi
|
|
179
181
|
"type": type,
|
180
182
|
"status": status,
|
181
183
|
"credits": credits,
|
182
|
-
"
|
184
|
+
"concurrencyCounter": concurrency_counter,
|
183
185
|
"concurrencyLimitIncluded": concurrency_limit_included,
|
184
186
|
"concurrencyLimitPurchased": concurrency_limit_purchased,
|
185
187
|
"monthlyChargeScheduleId": monthly_charge_schedule_id,
|
@@ -221,7 +223,7 @@ module Vapi
|
|
221
223
|
type = parsed_json["type"]
|
222
224
|
status = parsed_json["status"]
|
223
225
|
credits = parsed_json["credits"]
|
224
|
-
|
226
|
+
concurrency_counter = parsed_json["concurrencyCounter"]
|
225
227
|
concurrency_limit_included = parsed_json["concurrencyLimitIncluded"]
|
226
228
|
concurrency_limit_purchased = parsed_json["concurrencyLimitPurchased"]
|
227
229
|
monthly_charge_schedule_id = parsed_json["monthlyChargeScheduleId"]
|
@@ -259,7 +261,7 @@ module Vapi
|
|
259
261
|
type: type,
|
260
262
|
status: status,
|
261
263
|
credits: credits,
|
262
|
-
|
264
|
+
concurrency_counter: concurrency_counter,
|
263
265
|
concurrency_limit_included: concurrency_limit_included,
|
264
266
|
concurrency_limit_purchased: concurrency_limit_purchased,
|
265
267
|
monthly_charge_schedule_id: monthly_charge_schedule_id,
|
@@ -307,7 +309,7 @@ module Vapi
|
|
307
309
|
obj.type.is_a?(Vapi::SubscriptionType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
308
310
|
obj.status.is_a?(Vapi::SubscriptionStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
309
311
|
obj.credits.is_a?(String) != false || raise("Passed value for field obj.credits is not the expected type, validation failed.")
|
310
|
-
obj.
|
312
|
+
obj.concurrency_counter.is_a?(Float) != false || raise("Passed value for field obj.concurrency_counter is not the expected type, validation failed.")
|
311
313
|
obj.concurrency_limit_included.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_included is not the expected type, validation failed.")
|
312
314
|
obj.concurrency_limit_purchased.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_purchased is not the expected type, validation failed.")
|
313
315
|
obj.monthly_charge_schedule_id&.is_a?(Float) != false || raise("Passed value for field obj.monthly_charge_schedule_id is not the expected type, validation failed.")
|
@@ -0,0 +1,175 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "text_editor_tool_with_tool_call_messages_item"
|
4
|
+
require_relative "tool_call"
|
5
|
+
require_relative "open_ai_function"
|
6
|
+
require_relative "server"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module Vapi
|
11
|
+
class TextEditorToolWithToolCall
|
12
|
+
# @return [Boolean] This determines if the tool is async.
|
13
|
+
# If async, the assistant will move forward without waiting for your server to
|
14
|
+
# respond. This is useful if you just want to trigger something on your server.
|
15
|
+
# If sync, the assistant will wait for your server to respond. This is useful if
|
16
|
+
# want assistant to respond with the result from your server.
|
17
|
+
# Defaults to synchronous (`false`).
|
18
|
+
attr_reader :async
|
19
|
+
# @return [Array<Vapi::TextEditorToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
|
20
|
+
# For some tools, this is auto-filled based on special fields like
|
21
|
+
# `tool.destinations`. For others like the function tool, these can be custom
|
22
|
+
# configured.
|
23
|
+
attr_reader :messages
|
24
|
+
# @return [String] The sub type of tool.
|
25
|
+
attr_reader :sub_type
|
26
|
+
# @return [Vapi::ToolCall]
|
27
|
+
attr_reader :tool_call
|
28
|
+
# @return [String] The name of the tool, fixed to 'str_replace_editor'
|
29
|
+
attr_reader :name
|
30
|
+
# @return [Vapi::OpenAiFunction] This is the function definition of the tool.
|
31
|
+
# For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
|
32
|
+
# tool-specific fields like `tool.destinations`. But, even in those cases, you can
|
33
|
+
# provide a custom function definition for advanced use cases.
|
34
|
+
# An example of an advanced use case is if you want to customize the message
|
35
|
+
# that's spoken for `endCall` tool. You can specify a function where it returns an
|
36
|
+
# argument "reason". Then, in `messages` array, you can have many
|
37
|
+
# "request-complete" messages. One of these messages will be triggered if the
|
38
|
+
# `messages[].conditions` matches the "reason" argument.
|
39
|
+
attr_reader :function
|
40
|
+
# @return [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
|
41
|
+
# All requests will be sent with the call object among other things. You can find
|
42
|
+
# more details in the Server URL documentation.
|
43
|
+
# This overrides the serverUrl set on the org and the phoneNumber. Order of
|
44
|
+
# precedence: highest tool.server.url, then assistant.serverUrl, then
|
45
|
+
# phoneNumber.serverUrl, then org.serverUrl.
|
46
|
+
attr_reader :server
|
47
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
48
|
+
attr_reader :additional_properties
|
49
|
+
# @return [Object]
|
50
|
+
attr_reader :_field_set
|
51
|
+
protected :_field_set
|
52
|
+
|
53
|
+
OMIT = Object.new
|
54
|
+
|
55
|
+
# @param async [Boolean] This determines if the tool is async.
|
56
|
+
# If async, the assistant will move forward without waiting for your server to
|
57
|
+
# respond. This is useful if you just want to trigger something on your server.
|
58
|
+
# If sync, the assistant will wait for your server to respond. This is useful if
|
59
|
+
# want assistant to respond with the result from your server.
|
60
|
+
# Defaults to synchronous (`false`).
|
61
|
+
# @param messages [Array<Vapi::TextEditorToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
|
62
|
+
# For some tools, this is auto-filled based on special fields like
|
63
|
+
# `tool.destinations`. For others like the function tool, these can be custom
|
64
|
+
# configured.
|
65
|
+
# @param sub_type [String] The sub type of tool.
|
66
|
+
# @param tool_call [Vapi::ToolCall]
|
67
|
+
# @param name [String] The name of the tool, fixed to 'str_replace_editor'
|
68
|
+
# @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
|
69
|
+
# For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
|
70
|
+
# tool-specific fields like `tool.destinations`. But, even in those cases, you can
|
71
|
+
# provide a custom function definition for advanced use cases.
|
72
|
+
# An example of an advanced use case is if you want to customize the message
|
73
|
+
# that's spoken for `endCall` tool. You can specify a function where it returns an
|
74
|
+
# argument "reason". Then, in `messages` array, you can have many
|
75
|
+
# "request-complete" messages. One of these messages will be triggered if the
|
76
|
+
# `messages[].conditions` matches the "reason" argument.
|
77
|
+
# @param server [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
|
78
|
+
# All requests will be sent with the call object among other things. You can find
|
79
|
+
# more details in the Server URL documentation.
|
80
|
+
# This overrides the serverUrl set on the org and the phoneNumber. Order of
|
81
|
+
# precedence: highest tool.server.url, then assistant.serverUrl, then
|
82
|
+
# phoneNumber.serverUrl, then org.serverUrl.
|
83
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
84
|
+
# @return [Vapi::TextEditorToolWithToolCall]
|
85
|
+
def initialize(sub_type:, tool_call:, name:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
|
86
|
+
additional_properties: nil)
|
87
|
+
@async = async if async != OMIT
|
88
|
+
@messages = messages if messages != OMIT
|
89
|
+
@sub_type = sub_type
|
90
|
+
@tool_call = tool_call
|
91
|
+
@name = name
|
92
|
+
@function = function if function != OMIT
|
93
|
+
@server = server if server != OMIT
|
94
|
+
@additional_properties = additional_properties
|
95
|
+
@_field_set = {
|
96
|
+
"async": async,
|
97
|
+
"messages": messages,
|
98
|
+
"subType": sub_type,
|
99
|
+
"toolCall": tool_call,
|
100
|
+
"name": name,
|
101
|
+
"function": function,
|
102
|
+
"server": server
|
103
|
+
}.reject do |_k, v|
|
104
|
+
v == OMIT
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserialize a JSON object to an instance of TextEditorToolWithToolCall
|
109
|
+
#
|
110
|
+
# @param json_object [String]
|
111
|
+
# @return [Vapi::TextEditorToolWithToolCall]
|
112
|
+
def self.from_json(json_object:)
|
113
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
114
|
+
parsed_json = JSON.parse(json_object)
|
115
|
+
async = parsed_json["async"]
|
116
|
+
messages = parsed_json["messages"]&.map do |item|
|
117
|
+
item = item.to_json
|
118
|
+
Vapi::TextEditorToolWithToolCallMessagesItem.from_json(json_object: item)
|
119
|
+
end
|
120
|
+
sub_type = parsed_json["subType"]
|
121
|
+
if parsed_json["toolCall"].nil?
|
122
|
+
tool_call = nil
|
123
|
+
else
|
124
|
+
tool_call = parsed_json["toolCall"].to_json
|
125
|
+
tool_call = Vapi::ToolCall.from_json(json_object: tool_call)
|
126
|
+
end
|
127
|
+
name = parsed_json["name"]
|
128
|
+
if parsed_json["function"].nil?
|
129
|
+
function = nil
|
130
|
+
else
|
131
|
+
function = parsed_json["function"].to_json
|
132
|
+
function = Vapi::OpenAiFunction.from_json(json_object: function)
|
133
|
+
end
|
134
|
+
if parsed_json["server"].nil?
|
135
|
+
server = nil
|
136
|
+
else
|
137
|
+
server = parsed_json["server"].to_json
|
138
|
+
server = Vapi::Server.from_json(json_object: server)
|
139
|
+
end
|
140
|
+
new(
|
141
|
+
async: async,
|
142
|
+
messages: messages,
|
143
|
+
sub_type: sub_type,
|
144
|
+
tool_call: tool_call,
|
145
|
+
name: name,
|
146
|
+
function: function,
|
147
|
+
server: server,
|
148
|
+
additional_properties: struct
|
149
|
+
)
|
150
|
+
end
|
151
|
+
|
152
|
+
# Serialize an instance of TextEditorToolWithToolCall to a JSON object
|
153
|
+
#
|
154
|
+
# @return [String]
|
155
|
+
def to_json(*_args)
|
156
|
+
@_field_set&.to_json
|
157
|
+
end
|
158
|
+
|
159
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
160
|
+
# hash and check each fields type against the current object's property
|
161
|
+
# definitions.
|
162
|
+
#
|
163
|
+
# @param obj [Object]
|
164
|
+
# @return [Void]
|
165
|
+
def self.validate_raw(obj:)
|
166
|
+
obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
|
167
|
+
obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
|
168
|
+
obj.sub_type.is_a?(String) != false || raise("Passed value for field obj.sub_type is not the expected type, validation failed.")
|
169
|
+
Vapi::ToolCall.validate_raw(obj: obj.tool_call)
|
170
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
171
|
+
obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
|
172
|
+
obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "tool_message_start"
|
5
|
+
require_relative "tool_message_complete"
|
6
|
+
require_relative "tool_message_failed"
|
7
|
+
require_relative "tool_message_delayed"
|
8
|
+
|
9
|
+
module Vapi
|
10
|
+
class TextEditorToolWithToolCallMessagesItem
|
11
|
+
# @return [Object]
|
12
|
+
attr_reader :member
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :discriminant
|
15
|
+
|
16
|
+
private_class_method :new
|
17
|
+
alias kind_of? is_a?
|
18
|
+
|
19
|
+
# @param member [Object]
|
20
|
+
# @param discriminant [String]
|
21
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
22
|
+
def initialize(member:, discriminant:)
|
23
|
+
@member = member
|
24
|
+
@discriminant = discriminant
|
25
|
+
end
|
26
|
+
|
27
|
+
# Deserialize a JSON object to an instance of
|
28
|
+
# TextEditorToolWithToolCallMessagesItem
|
29
|
+
#
|
30
|
+
# @param json_object [String]
|
31
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
32
|
+
def self.from_json(json_object:)
|
33
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
34
|
+
member = case struct.type
|
35
|
+
when "request-start"
|
36
|
+
Vapi::ToolMessageStart.from_json(json_object: json_object)
|
37
|
+
when "request-complete"
|
38
|
+
Vapi::ToolMessageComplete.from_json(json_object: json_object)
|
39
|
+
when "request-failed"
|
40
|
+
Vapi::ToolMessageFailed.from_json(json_object: json_object)
|
41
|
+
when "request-response-delayed"
|
42
|
+
Vapi::ToolMessageDelayed.from_json(json_object: json_object)
|
43
|
+
else
|
44
|
+
Vapi::ToolMessageStart.from_json(json_object: json_object)
|
45
|
+
end
|
46
|
+
new(member: member, discriminant: struct.type)
|
47
|
+
end
|
48
|
+
|
49
|
+
# For Union Types, to_json functionality is delegated to the wrapped member.
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
def to_json(*_args)
|
53
|
+
case @discriminant
|
54
|
+
when "request-start"
|
55
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
56
|
+
when "request-complete"
|
57
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
58
|
+
when "request-failed"
|
59
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
60
|
+
when "request-response-delayed"
|
61
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
62
|
+
else
|
63
|
+
{ "type": @discriminant, value: @member }.to_json
|
64
|
+
end
|
65
|
+
@member.to_json
|
66
|
+
end
|
67
|
+
|
68
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
69
|
+
# hash and check each fields type against the current object's property
|
70
|
+
# definitions.
|
71
|
+
#
|
72
|
+
# @param obj [Object]
|
73
|
+
# @return [Void]
|
74
|
+
def self.validate_raw(obj:)
|
75
|
+
case obj.type
|
76
|
+
when "request-start"
|
77
|
+
Vapi::ToolMessageStart.validate_raw(obj: obj)
|
78
|
+
when "request-complete"
|
79
|
+
Vapi::ToolMessageComplete.validate_raw(obj: obj)
|
80
|
+
when "request-failed"
|
81
|
+
Vapi::ToolMessageFailed.validate_raw(obj: obj)
|
82
|
+
when "request-response-delayed"
|
83
|
+
Vapi::ToolMessageDelayed.validate_raw(obj: obj)
|
84
|
+
else
|
85
|
+
raise("Passed value matched no type within the union, validation failed.")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
90
|
+
#
|
91
|
+
# @param obj [Object]
|
92
|
+
# @return [Boolean]
|
93
|
+
def is_a?(obj)
|
94
|
+
@member.is_a?(obj)
|
95
|
+
end
|
96
|
+
|
97
|
+
# @param member [Vapi::ToolMessageStart]
|
98
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
99
|
+
def self.request_start(member:)
|
100
|
+
new(member: member, discriminant: "request-start")
|
101
|
+
end
|
102
|
+
|
103
|
+
# @param member [Vapi::ToolMessageComplete]
|
104
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
105
|
+
def self.request_complete(member:)
|
106
|
+
new(member: member, discriminant: "request-complete")
|
107
|
+
end
|
108
|
+
|
109
|
+
# @param member [Vapi::ToolMessageFailed]
|
110
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
111
|
+
def self.request_failed(member:)
|
112
|
+
new(member: member, discriminant: "request-failed")
|
113
|
+
end
|
114
|
+
|
115
|
+
# @param member [Vapi::ToolMessageDelayed]
|
116
|
+
# @return [Vapi::TextEditorToolWithToolCallMessagesItem]
|
117
|
+
def self.request_response_delayed(member:)
|
118
|
+
new(member: member, discriminant: "request-response-delayed")
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -32,13 +32,19 @@ module Vapi
|
|
32
32
|
# @return [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
|
33
33
|
# connecting the customer.
|
34
34
|
# Usage:
|
35
|
-
# - Used only when `mode` is `
|
35
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
36
|
+
# `warm-transfer-say-message` or
|
36
37
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
37
38
|
attr_reader :message
|
39
|
+
# @return [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
|
40
|
+
# - 'refer': Uses SIP REFER to transfer the call (default)
|
41
|
+
# - 'bye': Ends current call with SIP BYE
|
42
|
+
attr_reader :sip_verb
|
38
43
|
# @return [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
|
39
44
|
# destination party.
|
40
45
|
# Usage:
|
41
|
-
# - Used only when `mode` is `
|
46
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
|
47
|
+
# `warm-transfer-say-summary` or
|
42
48
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
|
43
49
|
attr_reader :summary_plan
|
44
50
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -72,21 +78,32 @@ module Vapi
|
|
72
78
|
# @param message [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
|
73
79
|
# connecting the customer.
|
74
80
|
# Usage:
|
75
|
-
# - Used only when `mode` is `
|
81
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
82
|
+
# `warm-transfer-say-message` or
|
76
83
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
84
|
+
# @param sip_verb [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
|
85
|
+
# - 'refer': Uses SIP REFER to transfer the call (default)
|
86
|
+
# - 'bye': Ends current call with SIP BYE
|
77
87
|
# @param summary_plan [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
|
78
88
|
# destination party.
|
79
89
|
# Usage:
|
80
|
-
# - Used only when `mode` is `
|
90
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
|
91
|
+
# `warm-transfer-say-summary` or
|
81
92
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
|
82
93
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
83
94
|
# @return [Vapi::TransferPlan]
|
84
|
-
def initialize(mode:, message: OMIT, summary_plan: OMIT, additional_properties: nil)
|
95
|
+
def initialize(mode:, message: OMIT, sip_verb: OMIT, summary_plan: OMIT, additional_properties: nil)
|
85
96
|
@mode = mode
|
86
97
|
@message = message if message != OMIT
|
98
|
+
@sip_verb = sip_verb if sip_verb != OMIT
|
87
99
|
@summary_plan = summary_plan if summary_plan != OMIT
|
88
100
|
@additional_properties = additional_properties
|
89
|
-
@_field_set = {
|
101
|
+
@_field_set = {
|
102
|
+
"mode": mode,
|
103
|
+
"message": message,
|
104
|
+
"sipVerb": sip_verb,
|
105
|
+
"summaryPlan": summary_plan
|
106
|
+
}.reject do |_k, v|
|
90
107
|
v == OMIT
|
91
108
|
end
|
92
109
|
end
|
@@ -105,6 +122,7 @@ module Vapi
|
|
105
122
|
message = parsed_json["message"].to_json
|
106
123
|
message = Vapi::TransferPlanMessage.from_json(json_object: message)
|
107
124
|
end
|
125
|
+
sip_verb = parsed_json["sipVerb"]
|
108
126
|
if parsed_json["summaryPlan"].nil?
|
109
127
|
summary_plan = nil
|
110
128
|
else
|
@@ -114,6 +132,7 @@ module Vapi
|
|
114
132
|
new(
|
115
133
|
mode: mode,
|
116
134
|
message: message,
|
135
|
+
sip_verb: sip_verb,
|
117
136
|
summary_plan: summary_plan,
|
118
137
|
additional_properties: struct
|
119
138
|
)
|
@@ -135,6 +154,7 @@ module Vapi
|
|
135
154
|
def self.validate_raw(obj:)
|
136
155
|
obj.mode.is_a?(Vapi::TransferPlanMode) != false || raise("Passed value for field obj.mode is not the expected type, validation failed.")
|
137
156
|
obj.message.nil? || Vapi::TransferPlanMessage.validate_raw(obj: obj.message)
|
157
|
+
obj.sip_verb&.is_a?(Hash) != false || raise("Passed value for field obj.sip_verb is not the expected type, validation failed.")
|
138
158
|
obj.summary_plan.nil? || Vapi::SummaryPlan.validate_raw(obj: obj.summary_plan)
|
139
159
|
end
|
140
160
|
end
|
@@ -7,7 +7,8 @@ module Vapi
|
|
7
7
|
# This is the message the assistant will deliver to the destination party before
|
8
8
|
# connecting the customer.
|
9
9
|
# Usage:
|
10
|
-
# - Used only when `mode` is `
|
10
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
11
|
+
# `warm-transfer-say-message` or
|
11
12
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
12
13
|
class TransferPlanMessage
|
13
14
|
# Deserialize a JSON object to an instance of TransferPlanMessage
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
4
|
-
require_relative "
|
3
|
+
require_relative "trieve_knowledge_base_search_plan"
|
4
|
+
require_relative "trieve_knowledge_base_create_plan"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
7
7
|
|
@@ -9,17 +9,15 @@ module Vapi
|
|
9
9
|
class TrieveKnowledgeBase
|
10
10
|
# @return [String] This is the name of the knowledge base.
|
11
11
|
attr_reader :name
|
12
|
-
# @return [Vapi::
|
13
|
-
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
|
18
|
-
#
|
19
|
-
#
|
20
|
-
|
21
|
-
# - Create a dataset, and use the datasetId here.
|
22
|
-
attr_reader :vector_store_provider_id
|
12
|
+
# @return [Vapi::TrieveKnowledgeBaseSearchPlan] This is the searching plan used when searching for relevant chunks from the
|
13
|
+
# vector store.
|
14
|
+
# You should configure this if you're running into these issues:
|
15
|
+
# - Too much unnecessary context is being fed as knowledge base context.
|
16
|
+
# - Not enough relevant context is being fed as knowledge base context.
|
17
|
+
attr_reader :search_plan
|
18
|
+
# @return [Vapi::TrieveKnowledgeBaseCreatePlan] This is the plan if you want us to create/import a new vector store using
|
19
|
+
# Trieve.
|
20
|
+
attr_reader :create_plan
|
23
21
|
# @return [String] This is the id of the knowledge base.
|
24
22
|
attr_reader :id
|
25
23
|
# @return [String] This is the org id of the knowledge base.
|
@@ -33,32 +31,28 @@ module Vapi
|
|
33
31
|
OMIT = Object.new
|
34
32
|
|
35
33
|
# @param name [String] This is the name of the knowledge base.
|
36
|
-
# @param
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
# - Create a dataset, and use the datasetId here.
|
34
|
+
# @param search_plan [Vapi::TrieveKnowledgeBaseSearchPlan] This is the searching plan used when searching for relevant chunks from the
|
35
|
+
# vector store.
|
36
|
+
# You should configure this if you're running into these issues:
|
37
|
+
# - Too much unnecessary context is being fed as knowledge base context.
|
38
|
+
# - Not enough relevant context is being fed as knowledge base context.
|
39
|
+
# @param create_plan [Vapi::TrieveKnowledgeBaseCreatePlan] This is the plan if you want us to create/import a new vector store using
|
40
|
+
# Trieve.
|
44
41
|
# @param id [String] This is the id of the knowledge base.
|
45
42
|
# @param org_id [String] This is the org id of the knowledge base.
|
46
43
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
44
|
# @return [Vapi::TrieveKnowledgeBase]
|
48
|
-
def initialize(
|
49
|
-
vector_store_provider_id: OMIT, additional_properties: nil)
|
45
|
+
def initialize(id:, org_id:, name: OMIT, search_plan: OMIT, create_plan: OMIT, additional_properties: nil)
|
50
46
|
@name = name if name != OMIT
|
51
|
-
@
|
52
|
-
@
|
53
|
-
@vector_store_provider_id = vector_store_provider_id if vector_store_provider_id != OMIT
|
47
|
+
@search_plan = search_plan if search_plan != OMIT
|
48
|
+
@create_plan = create_plan if create_plan != OMIT
|
54
49
|
@id = id
|
55
50
|
@org_id = org_id
|
56
51
|
@additional_properties = additional_properties
|
57
52
|
@_field_set = {
|
58
53
|
"name": name,
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"vectorStoreProviderId": vector_store_provider_id,
|
54
|
+
"searchPlan": search_plan,
|
55
|
+
"createPlan": create_plan,
|
62
56
|
"id": id,
|
63
57
|
"orgId": org_id
|
64
58
|
}.reject do |_k, v|
|
@@ -74,26 +68,24 @@ module Vapi
|
|
74
68
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
75
69
|
parsed_json = JSON.parse(json_object)
|
76
70
|
name = parsed_json["name"]
|
77
|
-
if parsed_json["
|
78
|
-
|
71
|
+
if parsed_json["searchPlan"].nil?
|
72
|
+
search_plan = nil
|
79
73
|
else
|
80
|
-
|
81
|
-
|
74
|
+
search_plan = parsed_json["searchPlan"].to_json
|
75
|
+
search_plan = Vapi::TrieveKnowledgeBaseSearchPlan.from_json(json_object: search_plan)
|
82
76
|
end
|
83
|
-
if parsed_json["
|
84
|
-
|
77
|
+
if parsed_json["createPlan"].nil?
|
78
|
+
create_plan = nil
|
85
79
|
else
|
86
|
-
|
87
|
-
|
80
|
+
create_plan = parsed_json["createPlan"].to_json
|
81
|
+
create_plan = Vapi::TrieveKnowledgeBaseCreatePlan.from_json(json_object: create_plan)
|
88
82
|
end
|
89
|
-
vector_store_provider_id = parsed_json["vectorStoreProviderId"]
|
90
83
|
id = parsed_json["id"]
|
91
84
|
org_id = parsed_json["orgId"]
|
92
85
|
new(
|
93
86
|
name: name,
|
94
|
-
|
95
|
-
|
96
|
-
vector_store_provider_id: vector_store_provider_id,
|
87
|
+
search_plan: search_plan,
|
88
|
+
create_plan: create_plan,
|
97
89
|
id: id,
|
98
90
|
org_id: org_id,
|
99
91
|
additional_properties: struct
|
@@ -115,9 +107,8 @@ module Vapi
|
|
115
107
|
# @return [Void]
|
116
108
|
def self.validate_raw(obj:)
|
117
109
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
118
|
-
Vapi::
|
119
|
-
obj.
|
120
|
-
obj.vector_store_provider_id&.is_a?(String) != false || raise("Passed value for field obj.vector_store_provider_id is not the expected type, validation failed.")
|
110
|
+
obj.search_plan.nil? || Vapi::TrieveKnowledgeBaseSearchPlan.validate_raw(obj: obj.search_plan)
|
111
|
+
obj.create_plan.nil? || Vapi::TrieveKnowledgeBaseCreatePlan.validate_raw(obj: obj.create_plan)
|
121
112
|
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
122
113
|
obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
|
123
114
|
end
|