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.
Files changed (273) hide show
  1. checksums.yaml +4 -4
  2. data/lib/requests.rb +2 -2
  3. data/lib/types_export.rb +160 -68
  4. data/lib/vapi_server_sdk/analytics/client.rb +0 -14
  5. data/lib/vapi_server_sdk/assistants/client.rb +19 -72
  6. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_credentials_item.rb +512 -0
  7. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +13 -0
  8. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +13 -0
  9. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +13 -0
  10. data/lib/vapi_server_sdk/blocks/client.rb +7 -236
  11. data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
  12. data/lib/vapi_server_sdk/calls/client.rb +22 -74
  13. data/lib/vapi_server_sdk/files/client.rb +0 -70
  14. data/lib/vapi_server_sdk/knowledge_bases/client.rb +7 -78
  15. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
  16. data/lib/vapi_server_sdk/logs/client.rb +75 -22
  17. data/lib/vapi_server_sdk/logs/types/logging_controller_logs_delete_query_request_type.rb +12 -0
  18. data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -139
  19. data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
  20. data/lib/vapi_server_sdk/squads/client.rb +16 -70
  21. data/lib/vapi_server_sdk/tools/client.rb +7 -161
  22. data/lib/vapi_server_sdk/tools/types/tools_update_request.rb +200 -0
  23. data/lib/vapi_server_sdk/types/assistant.rb +19 -1
  24. data/lib/vapi_server_sdk/types/assistant_credentials_item.rb +510 -0
  25. data/lib/vapi_server_sdk/types/assistant_model.rb +13 -0
  26. data/lib/vapi_server_sdk/types/assistant_overrides.rb +19 -1
  27. data/lib/vapi_server_sdk/types/assistant_overrides_credentials_item.rb +510 -0
  28. data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +13 -0
  29. data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +13 -0
  30. data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +13 -0
  31. data/lib/vapi_server_sdk/types/assistant_transcriber.rb +13 -0
  32. data/lib/vapi_server_sdk/types/assistant_voice.rb +13 -0
  33. data/lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb +88 -0
  34. data/lib/vapi_server_sdk/types/azure_credential.rb +22 -5
  35. data/lib/vapi_server_sdk/types/azure_credential_region.rb +5 -3
  36. data/lib/vapi_server_sdk/types/azure_credential_service.rb +9 -0
  37. data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +9 -1
  38. data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +5 -3
  39. data/lib/vapi_server_sdk/types/azure_speech_transcriber.rb +62 -0
  40. data/lib/vapi_server_sdk/types/azure_speech_transcriber_language.rb +152 -0
  41. data/lib/vapi_server_sdk/types/bash_tool_with_tool_call.rb +175 -0
  42. data/lib/vapi_server_sdk/types/bash_tool_with_tool_call_messages_item.rb +120 -0
  43. data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +25 -29
  44. data/lib/vapi_server_sdk/types/byo_phone_number.rb +25 -29
  45. data/lib/vapi_server_sdk/types/call_ended_reason.rb +44 -29
  46. data/lib/vapi_server_sdk/types/cartesia_voice_model.rb +2 -0
  47. data/lib/vapi_server_sdk/types/cerebras_credential.rb +111 -0
  48. data/lib/vapi_server_sdk/types/chat_dto.rb +103 -0
  49. data/lib/vapi_server_sdk/types/{credits_buy_dto.rb → chat_service_response.rb} +9 -17
  50. data/lib/vapi_server_sdk/types/client_inbound_message_end_call.rb +47 -0
  51. data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
  52. data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
  53. data/lib/vapi_server_sdk/types/cloudflare_credential.rb +142 -0
  54. data/lib/vapi_server_sdk/types/cloudflare_r_2_bucket_plan.rb +105 -0
  55. data/lib/vapi_server_sdk/types/computer_tool_with_tool_call.rb +199 -0
  56. data/lib/vapi_server_sdk/types/computer_tool_with_tool_call_messages_item.rb +120 -0
  57. data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +2 -9
  58. data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +2 -9
  59. data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +2 -9
  60. data/lib/vapi_server_sdk/types/create_assistant_dto.rb +19 -1
  61. data/lib/vapi_server_sdk/types/create_assistant_dto_credentials_item.rb +510 -0
  62. data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +13 -0
  63. data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +13 -0
  64. data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +13 -0
  65. data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +21 -12
  66. data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +5 -3
  67. data/lib/vapi_server_sdk/types/create_azure_credential_dto_service.rb +9 -0
  68. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +10 -9
  69. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +5 -3
  70. data/lib/vapi_server_sdk/types/create_byo_phone_number_dto.rb +25 -29
  71. data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +1 -9
  72. data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +2 -9
  73. data/lib/vapi_server_sdk/types/create_cerebras_credential_dto.rb +74 -0
  74. data/lib/vapi_server_sdk/types/create_cloudflare_credential_dto.rb +101 -0
  75. data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +2 -4
  76. data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +2 -14
  77. data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +2 -9
  78. data/lib/vapi_server_sdk/types/create_deep_seek_credential_dto.rb +67 -0
  79. data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +2 -9
  80. data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +2 -9
  81. data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +2 -14
  82. data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +2 -9
  83. data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +2 -9
  84. data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +2 -9
  85. data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +2 -15
  86. data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +2 -9
  87. data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +2 -15
  88. data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +2 -9
  89. data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +2 -9
  90. data/lib/vapi_server_sdk/types/create_org_dto.rb +25 -25
  91. data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +2 -9
  92. data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +2 -9
  93. data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +2 -9
  94. data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +2 -9
  95. data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +2 -10
  96. data/lib/vapi_server_sdk/types/create_smallest_ai_credential_dto.rb +67 -0
  97. data/lib/vapi_server_sdk/types/create_tavus_credential_dto.rb +2 -9
  98. data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +2 -9
  99. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +34 -47
  100. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto_create_plan.rb +97 -0
  101. data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +2 -14
  102. data/lib/vapi_server_sdk/types/create_twilio_phone_number_dto.rb +25 -29
  103. data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +25 -29
  104. data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +2 -14
  105. data/lib/vapi_server_sdk/types/create_vonage_phone_number_dto.rb +25 -29
  106. data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +2 -13
  107. data/lib/vapi_server_sdk/types/create_workflow_dto.rb +87 -0
  108. data/lib/vapi_server_sdk/types/create_workflow_dto_nodes_item.rb +81 -0
  109. data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +2 -11
  110. data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +2 -4
  111. data/lib/vapi_server_sdk/types/deep_seek_credential.rb +111 -0
  112. data/lib/vapi_server_sdk/types/deep_seek_model.rb +177 -0
  113. data/lib/vapi_server_sdk/types/deep_seek_model_tools_item.rb +159 -0
  114. data/lib/vapi_server_sdk/types/edge.rb +80 -0
  115. data/lib/vapi_server_sdk/types/edge_condition.rb +94 -0
  116. data/lib/vapi_server_sdk/types/eleven_labs_voice_model.rb +2 -0
  117. data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +2 -0
  118. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +2 -0
  119. data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +4 -4
  120. data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +2 -2
  121. data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +13 -0
  122. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice.rb +95 -0
  123. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id.rb +53 -0
  124. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id_enum.rb +31 -0
  125. data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +1 -10
  126. data/lib/vapi_server_sdk/types/gather.rb +87 -0
  127. data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config.rb +58 -0
  128. data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.rb +11 -0
  129. data/lib/vapi_server_sdk/types/gemini_multimodal_live_speech_config.rb +61 -0
  130. data/lib/vapi_server_sdk/types/gemini_multimodal_live_voice_config.rb +61 -0
  131. data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +1 -9
  132. data/lib/vapi_server_sdk/types/google_model.rb +17 -1
  133. data/lib/vapi_server_sdk/types/google_model_model.rb +2 -0
  134. data/lib/vapi_server_sdk/types/google_realtime_config.rb +121 -0
  135. data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -3
  136. data/lib/vapi_server_sdk/types/import_twilio_phone_number_dto.rb +25 -29
  137. data/lib/vapi_server_sdk/types/import_vonage_phone_number_dto.rb +25 -29
  138. data/lib/vapi_server_sdk/types/json_schema.rb +13 -2
  139. data/lib/vapi_server_sdk/types/log.rb +18 -18
  140. data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +1 -9
  141. data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +6 -0
  142. data/lib/vapi_server_sdk/types/open_ai_model_model.rb +6 -0
  143. data/lib/vapi_server_sdk/types/open_ai_voice.rb +4 -4
  144. data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +2 -2
  145. data/lib/vapi_server_sdk/types/org.rb +25 -25
  146. data/lib/vapi_server_sdk/types/org_with_org_user.rb +25 -25
  147. data/lib/vapi_server_sdk/types/{subscription_concurrency_line_remove_dto.rb → programmatic_edge_condition.rb} +16 -14
  148. data/lib/vapi_server_sdk/types/say.rb +72 -0
  149. data/lib/vapi_server_sdk/types/{payment_retry_dto.rb → semantic_edge_condition.rb} +16 -14
  150. data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +44 -29
  151. data/lib/vapi_server_sdk/types/server_message_status_update.rb +11 -1
  152. data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +44 -29
  153. data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +116 -77
  154. data/lib/vapi_server_sdk/types/smallest_ai_credential.rb +111 -0
  155. data/lib/vapi_server_sdk/types/smallest_ai_voice.rb +117 -0
  156. data/lib/vapi_server_sdk/types/smallest_ai_voice_id.rb +53 -0
  157. data/lib/vapi_server_sdk/types/smallest_ai_voice_id_enum.rb +31 -0
  158. data/lib/vapi_server_sdk/types/subscription.rb +13 -11
  159. data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
  160. data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call.rb +175 -0
  161. data/lib/vapi_server_sdk/types/text_editor_tool_with_tool_call_messages_item.rb +121 -0
  162. data/lib/vapi_server_sdk/types/transfer_plan.rb +26 -6
  163. data/lib/vapi_server_sdk/types/transfer_plan_message.rb +2 -1
  164. data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +35 -44
  165. data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_create_plan.rb → trieve_knowledge_base_chunk_plan.rb} +17 -11
  166. data/lib/vapi_server_sdk/types/trieve_knowledge_base_create.rb +59 -0
  167. data/lib/vapi_server_sdk/types/trieve_knowledge_base_create_plan.rb +96 -0
  168. data/lib/vapi_server_sdk/types/{subscription_concurrency_line_buy_dto.rb → trieve_knowledge_base_import.rb} +14 -14
  169. data/lib/vapi_server_sdk/types/{trieve_knowledge_base_vector_store_search_plan.rb → trieve_knowledge_base_search_plan.rb} +9 -11
  170. 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
  171. data/lib/vapi_server_sdk/types/twilio_phone_number.rb +25 -29
  172. data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +4 -11
  173. data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +4 -11
  174. data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +4 -11
  175. data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +24 -14
  176. data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +5 -3
  177. data/lib/vapi_server_sdk/types/update_azure_credential_dto_service.rb +9 -0
  178. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +25 -24
  179. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +5 -3
  180. data/lib/vapi_server_sdk/types/update_bash_tool_dto.rb +161 -0
  181. data/lib/vapi_server_sdk/types/update_bash_tool_dto_messages_item.rb +120 -0
  182. data/lib/vapi_server_sdk/types/update_byo_phone_number_dto.rb +187 -0
  183. data/lib/vapi_server_sdk/types/update_byo_phone_number_dto_fallback_destination.rb +101 -0
  184. data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +13 -21
  185. data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +4 -11
  186. data/lib/vapi_server_sdk/types/update_cerebras_credential_dto.rb +67 -0
  187. data/lib/vapi_server_sdk/types/update_cloudflare_credential_dto.rb +101 -0
  188. data/lib/vapi_server_sdk/types/update_computer_tool_dto.rb +185 -0
  189. data/lib/vapi_server_sdk/types/update_computer_tool_dto_messages_item.rb +120 -0
  190. data/lib/vapi_server_sdk/types/update_conversation_block_dto.rb +206 -0
  191. data/lib/vapi_server_sdk/types/update_conversation_block_dto_messages_item.rb +95 -0
  192. data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +137 -0
  193. data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +4 -16
  194. data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +4 -11
  195. data/lib/vapi_server_sdk/types/update_deep_seek_credential_dto.rb +67 -0
  196. data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +11 -18
  197. data/lib/vapi_server_sdk/types/update_dtmf_tool_dto.rb +139 -0
  198. data/lib/vapi_server_sdk/types/update_dtmf_tool_dto_messages_item.rb +120 -0
  199. data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -11
  200. data/lib/vapi_server_sdk/types/update_end_call_tool_dto.rb +139 -0
  201. data/lib/vapi_server_sdk/types/update_end_call_tool_dto_messages_item.rb +120 -0
  202. data/lib/vapi_server_sdk/types/update_function_tool_dto.rb +139 -0
  203. data/lib/vapi_server_sdk/types/update_function_tool_dto_messages_item.rb +120 -0
  204. data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +11 -23
  205. data/lib/vapi_server_sdk/types/update_ghl_tool_dto.rb +159 -0
  206. data/lib/vapi_server_sdk/types/update_ghl_tool_dto_messages_item.rb +120 -0
  207. data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +4 -11
  208. data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +4 -11
  209. data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +4 -13
  210. data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +4 -11
  211. data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +4 -13
  212. data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +8 -21
  213. data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +4 -11
  214. data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +8 -21
  215. data/lib/vapi_server_sdk/types/update_make_tool_dto.rb +159 -0
  216. data/lib/vapi_server_sdk/types/update_make_tool_dto_messages_item.rb +120 -0
  217. data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +4 -11
  218. data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +4 -11
  219. data/lib/vapi_server_sdk/types/update_org_dto.rb +25 -25
  220. data/lib/vapi_server_sdk/types/update_output_tool_dto.rb +139 -0
  221. data/lib/vapi_server_sdk/types/update_output_tool_dto_messages_item.rb +120 -0
  222. data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +4 -11
  223. data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -18
  224. data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +4 -11
  225. data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +4 -11
  226. data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +12 -20
  227. data/lib/vapi_server_sdk/types/update_smallest_ai_credential_dto.rb +67 -0
  228. data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +4 -11
  229. data/lib/vapi_server_sdk/types/update_text_editor_tool_dto.rb +161 -0
  230. data/lib/vapi_server_sdk/types/update_text_editor_tool_dto_messages_item.rb +120 -0
  231. data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +4 -11
  232. data/lib/vapi_server_sdk/types/update_token_dto.rb +81 -0
  233. data/lib/vapi_server_sdk/types/update_token_dto_tag.rb +9 -0
  234. data/lib/vapi_server_sdk/types/update_tool_call_block_dto.rb +168 -0
  235. data/lib/vapi_server_sdk/types/update_tool_call_block_dto_messages_item.rb +94 -0
  236. data/lib/vapi_server_sdk/types/update_tool_call_block_dto_tool.rb +161 -0
  237. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto.rb +161 -0
  238. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_destinations_item.rb +121 -0
  239. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_messages_item.rb +121 -0
  240. data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +96 -0
  241. data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto_create_plan.rb +97 -0
  242. data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +11 -23
  243. data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto.rb +163 -0
  244. data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto_fallback_destination.rb +101 -0
  245. data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto.rb +169 -0
  246. data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto_fallback_destination.rb +101 -0
  247. data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +11 -23
  248. data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto.rb +157 -0
  249. data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto_fallback_destination.rb +101 -0
  250. data/lib/vapi_server_sdk/types/update_workflow_block_dto.rb +154 -0
  251. data/lib/vapi_server_sdk/types/update_workflow_block_dto_messages_item.rb +94 -0
  252. data/lib/vapi_server_sdk/types/update_workflow_block_dto_steps_item.rb +94 -0
  253. data/lib/vapi_server_sdk/types/update_workflow_dto.rb +82 -0
  254. data/lib/vapi_server_sdk/types/update_workflow_dto_nodes_item.rb +81 -0
  255. data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +4 -13
  256. data/lib/vapi_server_sdk/types/vapi_model.rb +27 -1
  257. data/lib/vapi_server_sdk/types/vapi_phone_number.rb +25 -29
  258. data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
  259. data/lib/vapi_server_sdk/types/workflow.rb +125 -0
  260. data/lib/vapi_server_sdk/types/workflow_nodes_item.rb +81 -0
  261. metadata +116 -24
  262. data/lib/vapi_server_sdk/blocks/types/update_block_dto_messages_item.rb +0 -96
  263. data/lib/vapi_server_sdk/blocks/types/update_block_dto_steps_item.rb +0 -96
  264. data/lib/vapi_server_sdk/blocks/types/update_block_dto_tool.rb +0 -163
  265. data/lib/vapi_server_sdk/phone_numbers/types/update_phone_number_dto_fallback_destination.rb +0 -103
  266. data/lib/vapi_server_sdk/tools/types/update_tool_dto_messages_item.rb +0 -122
  267. data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +0 -65
  268. data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +0 -65
  269. data/lib/vapi_server_sdk/types/payment.rb +0 -167
  270. data/lib/vapi_server_sdk/types/payment_status.rb +0 -11
  271. data/lib/vapi_server_sdk/types/payments_paginated_response.rb +0 -75
  272. data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +0 -67
  273. data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +0 -65
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "fallback_smallest_ai_voice_id"
4
+ require_relative "chunk_plan"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Vapi
9
+ class FallbackSmallestAiVoice
10
+ # @return [Vapi::FallbackSmallestAiVoiceId] This is the provider-specific ID that will be used.
11
+ attr_reader :voice_id
12
+ # @return [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
13
+ attr_reader :model
14
+ # @return [Float] This is the speed multiplier that will be used.
15
+ attr_reader :speed
16
+ # @return [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
17
+ # provider.
18
+ attr_reader :chunk_plan
19
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
20
+ attr_reader :additional_properties
21
+ # @return [Object]
22
+ attr_reader :_field_set
23
+ protected :_field_set
24
+
25
+ OMIT = Object.new
26
+
27
+ # @param voice_id [Vapi::FallbackSmallestAiVoiceId] This is the provider-specific ID that will be used.
28
+ # @param model [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
29
+ # @param speed [Float] This is the speed multiplier that will be used.
30
+ # @param chunk_plan [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
31
+ # provider.
32
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
33
+ # @return [Vapi::FallbackSmallestAiVoice]
34
+ def initialize(voice_id:, model: OMIT, speed: OMIT, chunk_plan: OMIT, additional_properties: nil)
35
+ @voice_id = voice_id
36
+ @model = model if model != OMIT
37
+ @speed = speed if speed != OMIT
38
+ @chunk_plan = chunk_plan if chunk_plan != OMIT
39
+ @additional_properties = additional_properties
40
+ @_field_set = { "voiceId": voice_id, "model": model, "speed": speed, "chunkPlan": chunk_plan }.reject do |_k, v|
41
+ v == OMIT
42
+ end
43
+ end
44
+
45
+ # Deserialize a JSON object to an instance of FallbackSmallestAiVoice
46
+ #
47
+ # @param json_object [String]
48
+ # @return [Vapi::FallbackSmallestAiVoice]
49
+ def self.from_json(json_object:)
50
+ struct = JSON.parse(json_object, object_class: OpenStruct)
51
+ parsed_json = JSON.parse(json_object)
52
+ if parsed_json["voiceId"].nil?
53
+ voice_id = nil
54
+ else
55
+ voice_id = parsed_json["voiceId"].to_json
56
+ voice_id = Vapi::FallbackSmallestAiVoiceId.from_json(json_object: voice_id)
57
+ end
58
+ model = parsed_json["model"]
59
+ speed = parsed_json["speed"]
60
+ if parsed_json["chunkPlan"].nil?
61
+ chunk_plan = nil
62
+ else
63
+ chunk_plan = parsed_json["chunkPlan"].to_json
64
+ chunk_plan = Vapi::ChunkPlan.from_json(json_object: chunk_plan)
65
+ end
66
+ new(
67
+ voice_id: voice_id,
68
+ model: model,
69
+ speed: speed,
70
+ chunk_plan: chunk_plan,
71
+ additional_properties: struct
72
+ )
73
+ end
74
+
75
+ # Serialize an instance of FallbackSmallestAiVoice to a JSON object
76
+ #
77
+ # @return [String]
78
+ def to_json(*_args)
79
+ @_field_set&.to_json
80
+ end
81
+
82
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
83
+ # hash and check each fields type against the current object's property
84
+ # definitions.
85
+ #
86
+ # @param obj [Object]
87
+ # @return [Void]
88
+ def self.validate_raw(obj:)
89
+ Vapi::FallbackSmallestAiVoiceId.validate_raw(obj: obj.voice_id)
90
+ obj.model&.is_a?(String) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
91
+ obj.speed&.is_a?(Float) != false || raise("Passed value for field obj.speed is not the expected type, validation failed.")
92
+ obj.chunk_plan.nil? || Vapi::ChunkPlan.validate_raw(obj: obj.chunk_plan)
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Vapi
6
+ # This is the provider-specific ID that will be used.
7
+ class FallbackSmallestAiVoiceId
8
+ # Deserialize a JSON object to an instance of FallbackSmallestAiVoiceId
9
+ #
10
+ # @param json_object [String]
11
+ # @return [Vapi::FallbackSmallestAiVoiceId]
12
+ def self.from_json(json_object:)
13
+ struct = JSON.parse(json_object, object_class: OpenStruct)
14
+ begin
15
+ struct.is_a?(Vapi::FallbackSmallestAiVoiceIdEnum) != false || raise("Passed value for field struct is not the expected type, validation failed.")
16
+ return struct unless struct.nil?
17
+
18
+ return nil
19
+ rescue StandardError
20
+ # noop
21
+ end
22
+ begin
23
+ struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
24
+ return struct unless struct.nil?
25
+
26
+ return nil
27
+ rescue StandardError
28
+ # noop
29
+ end
30
+ struct
31
+ end
32
+
33
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
34
+ # hash and check each fields type against the current object's property
35
+ # definitions.
36
+ #
37
+ # @param obj [Object]
38
+ # @return [Void]
39
+ def self.validate_raw(obj:)
40
+ begin
41
+ return obj.is_a?(Vapi::FallbackSmallestAiVoiceIdEnum) != false || raise("Passed value for field obj is not the expected type, validation failed.")
42
+ rescue StandardError
43
+ # noop
44
+ end
45
+ begin
46
+ return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
47
+ rescue StandardError
48
+ # noop
49
+ end
50
+ raise("Passed value matched no type within the union, validation failed.")
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ class FallbackSmallestAiVoiceIdEnum
5
+ EMILY = "emily"
6
+ JASMINE = "jasmine"
7
+ ARMAN = "arman"
8
+ JAMES = "james"
9
+ MITHALI = "mithali"
10
+ ARAVIND = "aravind"
11
+ RAJ = "raj"
12
+ DIYA = "diya"
13
+ RAMAN = "raman"
14
+ ANANYA = "ananya"
15
+ ISHA = "isha"
16
+ WILLIAM = "william"
17
+ AARAV = "aarav"
18
+ MONIKA = "monika"
19
+ NIHARIKA = "niharika"
20
+ DEEPIKA = "deepika"
21
+ RAGHAV = "raghav"
22
+ KAJAL = "kajal"
23
+ RADHIKA = "radhika"
24
+ MANSI = "mansi"
25
+ NISHA = "nisha"
26
+ SAURABH = "saurabh"
27
+ POOJA = "pooja"
28
+ SAINA = "saina"
29
+ SANYA = "sanya"
30
+ end
31
+ end
@@ -21,8 +21,6 @@ module Vapi
21
21
  # `tool.destinations`. For others like the function tool, these can be custom
22
22
  # configured.
23
23
  attr_reader :messages
24
- # @return [String] The type of tool. "function" for Function tool.
25
- attr_reader :type
26
24
  # @return [Vapi::ToolCall]
27
25
  attr_reader :tool_call
28
26
  # @return [Vapi::OpenAiFunction] This is the function definition of the tool.
@@ -60,7 +58,6 @@ module Vapi
60
58
  # For some tools, this is auto-filled based on special fields like
61
59
  # `tool.destinations`. For others like the function tool, these can be custom
62
60
  # configured.
63
- # @param type [String] The type of tool. "function" for Function tool.
64
61
  # @param tool_call [Vapi::ToolCall]
65
62
  # @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
66
63
  # For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
@@ -79,11 +76,9 @@ module Vapi
79
76
  # phoneNumber.serverUrl, then org.serverUrl.
80
77
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
81
78
  # @return [Vapi::FunctionToolWithToolCall]
82
- def initialize(type:, tool_call:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
83
- additional_properties: nil)
79
+ def initialize(tool_call:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT, additional_properties: nil)
84
80
  @async = async if async != OMIT
85
81
  @messages = messages if messages != OMIT
86
- @type = type
87
82
  @tool_call = tool_call
88
83
  @function = function if function != OMIT
89
84
  @server = server if server != OMIT
@@ -91,7 +86,6 @@ module Vapi
91
86
  @_field_set = {
92
87
  "async": async,
93
88
  "messages": messages,
94
- "type": type,
95
89
  "toolCall": tool_call,
96
90
  "function": function,
97
91
  "server": server
@@ -112,7 +106,6 @@ module Vapi
112
106
  item = item.to_json
113
107
  Vapi::FunctionToolWithToolCallMessagesItem.from_json(json_object: item)
114
108
  end
115
- type = parsed_json["type"]
116
109
  if parsed_json["toolCall"].nil?
117
110
  tool_call = nil
118
111
  else
@@ -134,7 +127,6 @@ module Vapi
134
127
  new(
135
128
  async: async,
136
129
  messages: messages,
137
- type: type,
138
130
  tool_call: tool_call,
139
131
  function: function,
140
132
  server: server,
@@ -158,7 +150,6 @@ module Vapi
158
150
  def self.validate_raw(obj:)
159
151
  obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
160
152
  obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
161
- obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
162
153
  Vapi::ToolCall.validate_raw(obj: obj.tool_call)
163
154
  obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
164
155
  obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "json_schema"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class Gather
9
+ # @return [String]
10
+ attr_reader :type
11
+ # @return [Vapi::JsonSchema]
12
+ attr_reader :schema
13
+ # @return [String]
14
+ attr_reader :instruction
15
+ # @return [String]
16
+ attr_reader :name
17
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
18
+ attr_reader :additional_properties
19
+ # @return [Object]
20
+ attr_reader :_field_set
21
+ protected :_field_set
22
+
23
+ OMIT = Object.new
24
+
25
+ # @param type [String]
26
+ # @param schema [Vapi::JsonSchema]
27
+ # @param instruction [String]
28
+ # @param name [String]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [Vapi::Gather]
31
+ def initialize(type:, instruction:, name:, schema: OMIT, additional_properties: nil)
32
+ @type = type
33
+ @schema = schema if schema != OMIT
34
+ @instruction = instruction
35
+ @name = name
36
+ @additional_properties = additional_properties
37
+ @_field_set = { "type": type, "schema": schema, "instruction": instruction, "name": name }.reject do |_k, v|
38
+ v == OMIT
39
+ end
40
+ end
41
+
42
+ # Deserialize a JSON object to an instance of Gather
43
+ #
44
+ # @param json_object [String]
45
+ # @return [Vapi::Gather]
46
+ def self.from_json(json_object:)
47
+ struct = JSON.parse(json_object, object_class: OpenStruct)
48
+ parsed_json = JSON.parse(json_object)
49
+ type = parsed_json["type"]
50
+ if parsed_json["schema"].nil?
51
+ schema = nil
52
+ else
53
+ schema = parsed_json["schema"].to_json
54
+ schema = Vapi::JsonSchema.from_json(json_object: schema)
55
+ end
56
+ instruction = parsed_json["instruction"]
57
+ name = parsed_json["name"]
58
+ new(
59
+ type: type,
60
+ schema: schema,
61
+ instruction: instruction,
62
+ name: name,
63
+ additional_properties: struct
64
+ )
65
+ end
66
+
67
+ # Serialize an instance of Gather to a JSON object
68
+ #
69
+ # @return [String]
70
+ def to_json(*_args)
71
+ @_field_set&.to_json
72
+ end
73
+
74
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
75
+ # hash and check each fields type against the current object's property
76
+ # definitions.
77
+ #
78
+ # @param obj [Object]
79
+ # @return [Void]
80
+ def self.validate_raw(obj:)
81
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
82
+ obj.schema.nil? || Vapi::JsonSchema.validate_raw(obj: obj.schema)
83
+ obj.instruction.is_a?(String) != false || raise("Passed value for field obj.instruction is not the expected type, validation failed.")
84
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gemini_multimodal_live_prebuilt_voice_config_voice_name"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class GeminiMultimodalLivePrebuiltVoiceConfig
9
+ # @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName]
10
+ attr_reader :voice_name
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param voice_name [Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName]
20
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
+ # @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
22
+ def initialize(voice_name:, additional_properties: nil)
23
+ @voice_name = voice_name
24
+ @additional_properties = additional_properties
25
+ @_field_set = { "voiceName": voice_name }
26
+ end
27
+
28
+ # Deserialize a JSON object to an instance of
29
+ # GeminiMultimodalLivePrebuiltVoiceConfig
30
+ #
31
+ # @param json_object [String]
32
+ # @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
33
+ def self.from_json(json_object:)
34
+ struct = JSON.parse(json_object, object_class: OpenStruct)
35
+ parsed_json = JSON.parse(json_object)
36
+ voice_name = parsed_json["voiceName"]
37
+ new(voice_name: voice_name, additional_properties: struct)
38
+ end
39
+
40
+ # Serialize an instance of GeminiMultimodalLivePrebuiltVoiceConfig to a JSON
41
+ # object
42
+ #
43
+ # @return [String]
44
+ def to_json(*_args)
45
+ @_field_set&.to_json
46
+ end
47
+
48
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
49
+ # hash and check each fields type against the current object's property
50
+ # definitions.
51
+ #
52
+ # @param obj [Object]
53
+ # @return [Void]
54
+ def self.validate_raw(obj:)
55
+ obj.voice_name.is_a?(Vapi::GeminiMultimodalLivePrebuiltVoiceConfigVoiceName) != false || raise("Passed value for field obj.voice_name is not the expected type, validation failed.")
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ class GeminiMultimodalLivePrebuiltVoiceConfigVoiceName
5
+ PUCK = "Puck"
6
+ CHARON = "Charon"
7
+ KORE = "Kore"
8
+ FENRIR = "Fenrir"
9
+ AOEDE = "Aoede"
10
+ end
11
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gemini_multimodal_live_voice_config"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class GeminiMultimodalLiveSpeechConfig
9
+ # @return [Vapi::GeminiMultimodalLiveVoiceConfig]
10
+ attr_reader :voice_config
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param voice_config [Vapi::GeminiMultimodalLiveVoiceConfig]
20
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
+ # @return [Vapi::GeminiMultimodalLiveSpeechConfig]
22
+ def initialize(voice_config:, additional_properties: nil)
23
+ @voice_config = voice_config
24
+ @additional_properties = additional_properties
25
+ @_field_set = { "voiceConfig": voice_config }
26
+ end
27
+
28
+ # Deserialize a JSON object to an instance of GeminiMultimodalLiveSpeechConfig
29
+ #
30
+ # @param json_object [String]
31
+ # @return [Vapi::GeminiMultimodalLiveSpeechConfig]
32
+ def self.from_json(json_object:)
33
+ struct = JSON.parse(json_object, object_class: OpenStruct)
34
+ parsed_json = JSON.parse(json_object)
35
+ if parsed_json["voiceConfig"].nil?
36
+ voice_config = nil
37
+ else
38
+ voice_config = parsed_json["voiceConfig"].to_json
39
+ voice_config = Vapi::GeminiMultimodalLiveVoiceConfig.from_json(json_object: voice_config)
40
+ end
41
+ new(voice_config: voice_config, additional_properties: struct)
42
+ end
43
+
44
+ # Serialize an instance of GeminiMultimodalLiveSpeechConfig to a JSON object
45
+ #
46
+ # @return [String]
47
+ def to_json(*_args)
48
+ @_field_set&.to_json
49
+ end
50
+
51
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
52
+ # hash and check each fields type against the current object's property
53
+ # definitions.
54
+ #
55
+ # @param obj [Object]
56
+ # @return [Void]
57
+ def self.validate_raw(obj:)
58
+ Vapi::GeminiMultimodalLiveVoiceConfig.validate_raw(obj: obj.voice_config)
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gemini_multimodal_live_prebuilt_voice_config"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class GeminiMultimodalLiveVoiceConfig
9
+ # @return [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
10
+ attr_reader :prebuilt_voice_config
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param prebuilt_voice_config [Vapi::GeminiMultimodalLivePrebuiltVoiceConfig]
20
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
+ # @return [Vapi::GeminiMultimodalLiveVoiceConfig]
22
+ def initialize(prebuilt_voice_config:, additional_properties: nil)
23
+ @prebuilt_voice_config = prebuilt_voice_config
24
+ @additional_properties = additional_properties
25
+ @_field_set = { "prebuiltVoiceConfig": prebuilt_voice_config }
26
+ end
27
+
28
+ # Deserialize a JSON object to an instance of GeminiMultimodalLiveVoiceConfig
29
+ #
30
+ # @param json_object [String]
31
+ # @return [Vapi::GeminiMultimodalLiveVoiceConfig]
32
+ def self.from_json(json_object:)
33
+ struct = JSON.parse(json_object, object_class: OpenStruct)
34
+ parsed_json = JSON.parse(json_object)
35
+ if parsed_json["prebuiltVoiceConfig"].nil?
36
+ prebuilt_voice_config = nil
37
+ else
38
+ prebuilt_voice_config = parsed_json["prebuiltVoiceConfig"].to_json
39
+ prebuilt_voice_config = Vapi::GeminiMultimodalLivePrebuiltVoiceConfig.from_json(json_object: prebuilt_voice_config)
40
+ end
41
+ new(prebuilt_voice_config: prebuilt_voice_config, additional_properties: struct)
42
+ end
43
+
44
+ # Serialize an instance of GeminiMultimodalLiveVoiceConfig to a JSON object
45
+ #
46
+ # @return [String]
47
+ def to_json(*_args)
48
+ @_field_set&.to_json
49
+ end
50
+
51
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
52
+ # hash and check each fields type against the current object's property
53
+ # definitions.
54
+ #
55
+ # @param obj [Object]
56
+ # @return [Void]
57
+ def self.validate_raw(obj:)
58
+ Vapi::GeminiMultimodalLivePrebuiltVoiceConfig.validate_raw(obj: obj.prebuilt_voice_config)
59
+ end
60
+ end
61
+ end
@@ -22,8 +22,6 @@ module Vapi
22
22
  # `tool.destinations`. For others like the function tool, these can be custom
23
23
  # configured.
24
24
  attr_reader :messages
25
- # @return [String] The type of tool. "ghl" for GHL tool.
26
- attr_reader :type
27
25
  # @return [Vapi::ToolCall]
28
26
  attr_reader :tool_call
29
27
  # @return [Vapi::GhlToolMetadata]
@@ -63,7 +61,6 @@ module Vapi
63
61
  # For some tools, this is auto-filled based on special fields like
64
62
  # `tool.destinations`. For others like the function tool, these can be custom
65
63
  # configured.
66
- # @param type [String] The type of tool. "ghl" for GHL tool.
67
64
  # @param tool_call [Vapi::ToolCall]
68
65
  # @param metadata [Vapi::GhlToolMetadata]
69
66
  # @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
@@ -83,11 +80,10 @@ module Vapi
83
80
  # phoneNumber.serverUrl, then org.serverUrl.
84
81
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
85
82
  # @return [Vapi::GhlToolWithToolCall]
86
- def initialize(type:, tool_call:, metadata:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
83
+ def initialize(tool_call:, metadata:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
87
84
  additional_properties: nil)
88
85
  @async = async if async != OMIT
89
86
  @messages = messages if messages != OMIT
90
- @type = type
91
87
  @tool_call = tool_call
92
88
  @metadata = metadata
93
89
  @function = function if function != OMIT
@@ -96,7 +92,6 @@ module Vapi
96
92
  @_field_set = {
97
93
  "async": async,
98
94
  "messages": messages,
99
- "type": type,
100
95
  "toolCall": tool_call,
101
96
  "metadata": metadata,
102
97
  "function": function,
@@ -118,7 +113,6 @@ module Vapi
118
113
  item = item.to_json
119
114
  Vapi::GhlToolWithToolCallMessagesItem.from_json(json_object: item)
120
115
  end
121
- type = parsed_json["type"]
122
116
  if parsed_json["toolCall"].nil?
123
117
  tool_call = nil
124
118
  else
@@ -146,7 +140,6 @@ module Vapi
146
140
  new(
147
141
  async: async,
148
142
  messages: messages,
149
- type: type,
150
143
  tool_call: tool_call,
151
144
  metadata: metadata,
152
145
  function: function,
@@ -171,7 +164,6 @@ module Vapi
171
164
  def self.validate_raw(obj:)
172
165
  obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
173
166
  obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
174
- obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
175
167
  Vapi::ToolCall.validate_raw(obj: obj.tool_call)
176
168
  Vapi::GhlToolMetadata.validate_raw(obj: obj.metadata)
177
169
  obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
@@ -4,6 +4,7 @@ require_relative "open_ai_message"
4
4
  require_relative "google_model_tools_item"
5
5
  require_relative "create_custom_knowledge_base_dto"
6
6
  require_relative "google_model_model"
7
+ require_relative "google_realtime_config"
7
8
  require "ostruct"
8
9
  require "json"
9
10
 
@@ -25,6 +26,9 @@ module Vapi
25
26
  attr_reader :knowledge_base_id
26
27
  # @return [Vapi::GoogleModelModel] This is the Google model that will be used.
27
28
  attr_reader :model
29
+ # @return [Vapi::GoogleRealtimeConfig] This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.
30
+ # Only applicable if the model `gemini-2.0-flash-realtime-exp` is selected.
31
+ attr_reader :realtime_config
28
32
  # @return [Float] This is the temperature that will be used for calls. Default is 0 to leverage
29
33
  # caching for lower latency.
30
34
  attr_reader :temperature
@@ -61,6 +65,8 @@ module Vapi
61
65
  # @param knowledge_base [Vapi::CreateCustomKnowledgeBaseDto] These are the options for the knowledge base.
62
66
  # @param knowledge_base_id [String] This is the ID of the knowledge base the model will use.
63
67
  # @param model [Vapi::GoogleModelModel] This is the Google model that will be used.
68
+ # @param realtime_config [Vapi::GoogleRealtimeConfig] This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.
69
+ # Only applicable if the model `gemini-2.0-flash-realtime-exp` is selected.
64
70
  # @param temperature [Float] This is the temperature that will be used for calls. Default is 0 to leverage
65
71
  # caching for lower latency.
66
72
  # @param max_tokens [Float] This is the max number of tokens that the assistant will be allowed to generate
@@ -78,13 +84,14 @@ module Vapi
78
84
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
79
85
  # @return [Vapi::GoogleModel]
80
86
  def initialize(model:, messages: OMIT, tools: OMIT, tool_ids: OMIT, knowledge_base: OMIT, knowledge_base_id: OMIT,
81
- temperature: OMIT, max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
87
+ realtime_config: OMIT, temperature: OMIT, max_tokens: OMIT, emotion_recognition_enabled: OMIT, num_fast_turns: OMIT, additional_properties: nil)
82
88
  @messages = messages if messages != OMIT
83
89
  @tools = tools if tools != OMIT
84
90
  @tool_ids = tool_ids if tool_ids != OMIT
85
91
  @knowledge_base = knowledge_base if knowledge_base != OMIT
86
92
  @knowledge_base_id = knowledge_base_id if knowledge_base_id != OMIT
87
93
  @model = model
94
+ @realtime_config = realtime_config if realtime_config != OMIT
88
95
  @temperature = temperature if temperature != OMIT
89
96
  @max_tokens = max_tokens if max_tokens != OMIT
90
97
  @emotion_recognition_enabled = emotion_recognition_enabled if emotion_recognition_enabled != OMIT
@@ -97,6 +104,7 @@ module Vapi
97
104
  "knowledgeBase": knowledge_base,
98
105
  "knowledgeBaseId": knowledge_base_id,
99
106
  "model": model,
107
+ "realtimeConfig": realtime_config,
100
108
  "temperature": temperature,
101
109
  "maxTokens": max_tokens,
102
110
  "emotionRecognitionEnabled": emotion_recognition_enabled,
@@ -130,6 +138,12 @@ module Vapi
130
138
  end
131
139
  knowledge_base_id = parsed_json["knowledgeBaseId"]
132
140
  model = parsed_json["model"]
141
+ if parsed_json["realtimeConfig"].nil?
142
+ realtime_config = nil
143
+ else
144
+ realtime_config = parsed_json["realtimeConfig"].to_json
145
+ realtime_config = Vapi::GoogleRealtimeConfig.from_json(json_object: realtime_config)
146
+ end
133
147
  temperature = parsed_json["temperature"]
134
148
  max_tokens = parsed_json["maxTokens"]
135
149
  emotion_recognition_enabled = parsed_json["emotionRecognitionEnabled"]
@@ -141,6 +155,7 @@ module Vapi
141
155
  knowledge_base: knowledge_base,
142
156
  knowledge_base_id: knowledge_base_id,
143
157
  model: model,
158
+ realtime_config: realtime_config,
144
159
  temperature: temperature,
145
160
  max_tokens: max_tokens,
146
161
  emotion_recognition_enabled: emotion_recognition_enabled,
@@ -169,6 +184,7 @@ module Vapi
169
184
  obj.knowledge_base.nil? || Vapi::CreateCustomKnowledgeBaseDto.validate_raw(obj: obj.knowledge_base)
170
185
  obj.knowledge_base_id&.is_a?(String) != false || raise("Passed value for field obj.knowledge_base_id is not the expected type, validation failed.")
171
186
  obj.model.is_a?(Vapi::GoogleModelModel) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
187
+ obj.realtime_config.nil? || Vapi::GoogleRealtimeConfig.validate_raw(obj: obj.realtime_config)
172
188
  obj.temperature&.is_a?(Float) != false || raise("Passed value for field obj.temperature is not the expected type, validation failed.")
173
189
  obj.max_tokens&.is_a?(Float) != false || raise("Passed value for field obj.max_tokens is not the expected type, validation failed.")
174
190
  obj.emotion_recognition_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.emotion_recognition_enabled is not the expected type, validation failed.")
@@ -3,6 +3,8 @@
3
3
  module Vapi
4
4
  # This is the Google model that will be used.
5
5
  class GoogleModelModel
6
+ GEMINI_20_FLASH_EXP = "gemini-2.0-flash-exp"
7
+ GEMINI_20_FLASH_REALTIME_EXP = "gemini-2.0-flash-realtime-exp"
6
8
  GEMINI_15_FLASH = "gemini-1.5-flash"
7
9
  GEMINI_15_FLASH_002 = "gemini-1.5-flash-002"
8
10
  GEMINI_15_PRO = "gemini-1.5-pro"