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,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gemini_multimodal_live_speech_config"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class GoogleRealtimeConfig
9
+ # @return [Float] This is the nucleus sampling parameter that controls the cumulative probability
10
+ # of tokens considered during text generation.
11
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
12
+ attr_reader :top_p
13
+ # @return [Float] This is the top-k sampling parameter that limits the number of highest
14
+ # probability tokens considered during text generation.
15
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
16
+ attr_reader :top_k
17
+ # @return [Float] This is the presence penalty parameter that influences the model's likelihood to
18
+ # repeat information by penalizing tokens based on their presence in the text.
19
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
20
+ attr_reader :presence_penalty
21
+ # @return [Float] This is the frequency penalty parameter that influences the model's likelihood
22
+ # to repeat tokens by penalizing them based on their frequency in the text.
23
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
24
+ attr_reader :frequency_penalty
25
+ # @return [Vapi::GeminiMultimodalLiveSpeechConfig] This is the speech configuration object that defines the voice settings to be
26
+ # used for the model's speech output.
27
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
28
+ attr_reader :speech_config
29
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
30
+ attr_reader :additional_properties
31
+ # @return [Object]
32
+ attr_reader :_field_set
33
+ protected :_field_set
34
+
35
+ OMIT = Object.new
36
+
37
+ # @param top_p [Float] This is the nucleus sampling parameter that controls the cumulative probability
38
+ # of tokens considered during text generation.
39
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
40
+ # @param top_k [Float] This is the top-k sampling parameter that limits the number of highest
41
+ # probability tokens considered during text generation.
42
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
43
+ # @param presence_penalty [Float] This is the presence penalty parameter that influences the model's likelihood to
44
+ # repeat information by penalizing tokens based on their presence in the text.
45
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
46
+ # @param frequency_penalty [Float] This is the frequency penalty parameter that influences the model's likelihood
47
+ # to repeat tokens by penalizing them based on their frequency in the text.
48
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
49
+ # @param speech_config [Vapi::GeminiMultimodalLiveSpeechConfig] This is the speech configuration object that defines the voice settings to be
50
+ # used for the model's speech output.
51
+ # Only applicable with the Gemini Flash 2.0 Multimodal Live API.
52
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
53
+ # @return [Vapi::GoogleRealtimeConfig]
54
+ def initialize(top_p: OMIT, top_k: OMIT, presence_penalty: OMIT, frequency_penalty: OMIT, speech_config: OMIT,
55
+ additional_properties: nil)
56
+ @top_p = top_p if top_p != OMIT
57
+ @top_k = top_k if top_k != OMIT
58
+ @presence_penalty = presence_penalty if presence_penalty != OMIT
59
+ @frequency_penalty = frequency_penalty if frequency_penalty != OMIT
60
+ @speech_config = speech_config if speech_config != OMIT
61
+ @additional_properties = additional_properties
62
+ @_field_set = {
63
+ "topP": top_p,
64
+ "topK": top_k,
65
+ "presencePenalty": presence_penalty,
66
+ "frequencyPenalty": frequency_penalty,
67
+ "speechConfig": speech_config
68
+ }.reject do |_k, v|
69
+ v == OMIT
70
+ end
71
+ end
72
+
73
+ # Deserialize a JSON object to an instance of GoogleRealtimeConfig
74
+ #
75
+ # @param json_object [String]
76
+ # @return [Vapi::GoogleRealtimeConfig]
77
+ def self.from_json(json_object:)
78
+ struct = JSON.parse(json_object, object_class: OpenStruct)
79
+ parsed_json = JSON.parse(json_object)
80
+ top_p = parsed_json["topP"]
81
+ top_k = parsed_json["topK"]
82
+ presence_penalty = parsed_json["presencePenalty"]
83
+ frequency_penalty = parsed_json["frequencyPenalty"]
84
+ if parsed_json["speechConfig"].nil?
85
+ speech_config = nil
86
+ else
87
+ speech_config = parsed_json["speechConfig"].to_json
88
+ speech_config = Vapi::GeminiMultimodalLiveSpeechConfig.from_json(json_object: speech_config)
89
+ end
90
+ new(
91
+ top_p: top_p,
92
+ top_k: top_k,
93
+ presence_penalty: presence_penalty,
94
+ frequency_penalty: frequency_penalty,
95
+ speech_config: speech_config,
96
+ additional_properties: struct
97
+ )
98
+ end
99
+
100
+ # Serialize an instance of GoogleRealtimeConfig to a JSON object
101
+ #
102
+ # @return [String]
103
+ def to_json(*_args)
104
+ @_field_set&.to_json
105
+ end
106
+
107
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
108
+ # hash and check each fields type against the current object's property
109
+ # definitions.
110
+ #
111
+ # @param obj [Object]
112
+ # @return [Void]
113
+ def self.validate_raw(obj:)
114
+ obj.top_p&.is_a?(Float) != false || raise("Passed value for field obj.top_p is not the expected type, validation failed.")
115
+ obj.top_k&.is_a?(Float) != false || raise("Passed value for field obj.top_k is not the expected type, validation failed.")
116
+ obj.presence_penalty&.is_a?(Float) != false || raise("Passed value for field obj.presence_penalty is not the expected type, validation failed.")
117
+ obj.frequency_penalty&.is_a?(Float) != false || raise("Passed value for field obj.frequency_penalty is not the expected type, validation failed.")
118
+ obj.speech_config.nil? || Vapi::GeminiMultimodalLiveSpeechConfig.validate_raw(obj: obj.speech_config)
119
+ end
120
+ end
121
+ end
@@ -3,15 +3,13 @@
3
3
  module Vapi
4
4
  # This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
5
5
  class GroqModelModel
6
+ LLAMA_3370_B_VERSATILE = "llama-3.3-70b-versatile"
6
7
  LLAMA_31405_B_REASONING = "llama-3.1-405b-reasoning"
7
8
  LLAMA_3170_B_VERSATILE = "llama-3.1-70b-versatile"
8
9
  LLAMA_318_B_INSTANT = "llama-3.1-8b-instant"
9
10
  MIXTRAL_8_X_7_B_32768 = "mixtral-8x7b-32768"
10
11
  LLAMA_38_B_8192 = "llama3-8b-8192"
11
12
  LLAMA_370_B_8192 = "llama3-70b-8192"
12
- LLAMA_3_GROQ_8_B_8192_TOOL_USE_PREVIEW = "llama3-groq-8b-8192-tool-use-preview"
13
- LLAMA_3_GROQ_70_B_8192_TOOL_USE_PREVIEW = "llama3-groq-70b-8192-tool-use-preview"
14
- GEMMA_7_B_IT = "gemma-7b-it"
15
13
  GEMMA_29_B_IT = "gemma2-9b-it"
16
14
  end
17
15
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "import_twilio_phone_number_dto_fallback_destination"
4
+ require_relative "server"
4
5
  require "ostruct"
5
6
  require "json"
6
7
 
@@ -31,16 +32,13 @@ module Vapi
31
32
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
32
33
  # shape of the message and response that is expected.
33
34
  attr_reader :squad_id
34
- # @return [String] This is the server URL where messages will be sent for calls on this number.
35
- # This includes the `assistant-request` message.
36
- # You can see the shape of the messages sent in `ServerMessage`.
37
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
38
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
39
- attr_reader :server_url
40
- # @return [String] This is the secret Vapi will send with every message to your server. It's sent
41
- # as a header called x-vapi-secret.
42
- # Same precedence logic as serverUrl.
43
- attr_reader :server_url_secret
35
+ # @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
36
+ # with their shape in ServerMessage schema.
37
+ # The order of precedence is:
38
+ # 1. assistant.server
39
+ # 2. phoneNumber.server
40
+ # 3. org.server
41
+ attr_reader :server
44
42
  # @return [OpenStruct] Additional properties unmapped to the current class definition
45
43
  attr_reader :additional_properties
46
44
  # @return [Object]
@@ -67,18 +65,16 @@ module Vapi
67
65
  # If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
68
66
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
69
67
  # shape of the message and response that is expected.
70
- # @param server_url [String] This is the server URL where messages will be sent for calls on this number.
71
- # This includes the `assistant-request` message.
72
- # You can see the shape of the messages sent in `ServerMessage`.
73
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
74
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
75
- # @param server_url_secret [String] This is the secret Vapi will send with every message to your server. It's sent
76
- # as a header called x-vapi-secret.
77
- # Same precedence logic as serverUrl.
68
+ # @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
69
+ # with their shape in ServerMessage schema.
70
+ # The order of precedence is:
71
+ # 1. assistant.server
72
+ # 2. phoneNumber.server
73
+ # 3. org.server
78
74
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
79
75
  # @return [Vapi::ImportTwilioPhoneNumberDto]
80
76
  def initialize(twilio_phone_number:, twilio_account_sid:, twilio_auth_token:, fallback_destination: OMIT,
81
- name: OMIT, assistant_id: OMIT, squad_id: OMIT, server_url: OMIT, server_url_secret: OMIT, additional_properties: nil)
77
+ name: OMIT, assistant_id: OMIT, squad_id: OMIT, server: OMIT, additional_properties: nil)
82
78
  @fallback_destination = fallback_destination if fallback_destination != OMIT
83
79
  @twilio_phone_number = twilio_phone_number
84
80
  @twilio_account_sid = twilio_account_sid
@@ -86,8 +82,7 @@ module Vapi
86
82
  @name = name if name != OMIT
87
83
  @assistant_id = assistant_id if assistant_id != OMIT
88
84
  @squad_id = squad_id if squad_id != OMIT
89
- @server_url = server_url if server_url != OMIT
90
- @server_url_secret = server_url_secret if server_url_secret != OMIT
85
+ @server = server if server != OMIT
91
86
  @additional_properties = additional_properties
92
87
  @_field_set = {
93
88
  "fallbackDestination": fallback_destination,
@@ -97,8 +92,7 @@ module Vapi
97
92
  "name": name,
98
93
  "assistantId": assistant_id,
99
94
  "squadId": squad_id,
100
- "serverUrl": server_url,
101
- "serverUrlSecret": server_url_secret
95
+ "server": server
102
96
  }.reject do |_k, v|
103
97
  v == OMIT
104
98
  end
@@ -123,8 +117,12 @@ module Vapi
123
117
  name = parsed_json["name"]
124
118
  assistant_id = parsed_json["assistantId"]
125
119
  squad_id = parsed_json["squadId"]
126
- server_url = parsed_json["serverUrl"]
127
- server_url_secret = parsed_json["serverUrlSecret"]
120
+ if parsed_json["server"].nil?
121
+ server = nil
122
+ else
123
+ server = parsed_json["server"].to_json
124
+ server = Vapi::Server.from_json(json_object: server)
125
+ end
128
126
  new(
129
127
  fallback_destination: fallback_destination,
130
128
  twilio_phone_number: twilio_phone_number,
@@ -133,8 +131,7 @@ module Vapi
133
131
  name: name,
134
132
  assistant_id: assistant_id,
135
133
  squad_id: squad_id,
136
- server_url: server_url,
137
- server_url_secret: server_url_secret,
134
+ server: server,
138
135
  additional_properties: struct
139
136
  )
140
137
  end
@@ -160,8 +157,7 @@ module Vapi
160
157
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
161
158
  obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
162
159
  obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
163
- obj.server_url&.is_a?(String) != false || raise("Passed value for field obj.server_url is not the expected type, validation failed.")
164
- obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
160
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
165
161
  end
166
162
  end
167
163
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "import_vonage_phone_number_dto_fallback_destination"
4
+ require_relative "server"
4
5
  require "ostruct"
5
6
  require "json"
6
7
 
@@ -32,16 +33,13 @@ module Vapi
32
33
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
33
34
  # shape of the message and response that is expected.
34
35
  attr_reader :squad_id
35
- # @return [String] This is the server URL where messages will be sent for calls on this number.
36
- # This includes the `assistant-request` message.
37
- # You can see the shape of the messages sent in `ServerMessage`.
38
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
39
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
40
- attr_reader :server_url
41
- # @return [String] This is the secret Vapi will send with every message to your server. It's sent
42
- # as a header called x-vapi-secret.
43
- # Same precedence logic as serverUrl.
44
- attr_reader :server_url_secret
36
+ # @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
37
+ # with their shape in ServerMessage schema.
38
+ # The order of precedence is:
39
+ # 1. assistant.server
40
+ # 2. phoneNumber.server
41
+ # 3. org.server
42
+ attr_reader :server
45
43
  # @return [OpenStruct] Additional properties unmapped to the current class definition
46
44
  attr_reader :additional_properties
47
45
  # @return [Object]
@@ -70,26 +68,23 @@ module Vapi
70
68
  # If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
71
69
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
72
70
  # shape of the message and response that is expected.
73
- # @param server_url [String] This is the server URL where messages will be sent for calls on this number.
74
- # This includes the `assistant-request` message.
75
- # You can see the shape of the messages sent in `ServerMessage`.
76
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
77
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
78
- # @param server_url_secret [String] This is the secret Vapi will send with every message to your server. It's sent
79
- # as a header called x-vapi-secret.
80
- # Same precedence logic as serverUrl.
71
+ # @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
72
+ # with their shape in ServerMessage schema.
73
+ # The order of precedence is:
74
+ # 1. assistant.server
75
+ # 2. phoneNumber.server
76
+ # 3. org.server
81
77
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
82
78
  # @return [Vapi::ImportVonagePhoneNumberDto]
83
79
  def initialize(vonage_phone_number:, credential_id:, fallback_destination: OMIT, name: OMIT, assistant_id: OMIT,
84
- squad_id: OMIT, server_url: OMIT, server_url_secret: OMIT, additional_properties: nil)
80
+ squad_id: OMIT, server: OMIT, additional_properties: nil)
85
81
  @fallback_destination = fallback_destination if fallback_destination != OMIT
86
82
  @vonage_phone_number = vonage_phone_number
87
83
  @credential_id = credential_id
88
84
  @name = name if name != OMIT
89
85
  @assistant_id = assistant_id if assistant_id != OMIT
90
86
  @squad_id = squad_id if squad_id != OMIT
91
- @server_url = server_url if server_url != OMIT
92
- @server_url_secret = server_url_secret if server_url_secret != OMIT
87
+ @server = server if server != OMIT
93
88
  @additional_properties = additional_properties
94
89
  @_field_set = {
95
90
  "fallbackDestination": fallback_destination,
@@ -98,8 +93,7 @@ module Vapi
98
93
  "name": name,
99
94
  "assistantId": assistant_id,
100
95
  "squadId": squad_id,
101
- "serverUrl": server_url,
102
- "serverUrlSecret": server_url_secret
96
+ "server": server
103
97
  }.reject do |_k, v|
104
98
  v == OMIT
105
99
  end
@@ -123,8 +117,12 @@ module Vapi
123
117
  name = parsed_json["name"]
124
118
  assistant_id = parsed_json["assistantId"]
125
119
  squad_id = parsed_json["squadId"]
126
- server_url = parsed_json["serverUrl"]
127
- server_url_secret = parsed_json["serverUrlSecret"]
120
+ if parsed_json["server"].nil?
121
+ server = nil
122
+ else
123
+ server = parsed_json["server"].to_json
124
+ server = Vapi::Server.from_json(json_object: server)
125
+ end
128
126
  new(
129
127
  fallback_destination: fallback_destination,
130
128
  vonage_phone_number: vonage_phone_number,
@@ -132,8 +130,7 @@ module Vapi
132
130
  name: name,
133
131
  assistant_id: assistant_id,
134
132
  squad_id: squad_id,
135
- server_url: server_url,
136
- server_url_secret: server_url_secret,
133
+ server: server,
137
134
  additional_properties: struct
138
135
  )
139
136
  end
@@ -158,8 +155,7 @@ module Vapi
158
155
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
159
156
  obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
160
157
  obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
161
- obj.server_url&.is_a?(String) != false || raise("Passed value for field obj.server_url is not the expected type, validation failed.")
162
- obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
158
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
163
159
  end
164
160
  end
165
161
  end
@@ -31,6 +31,9 @@ module Vapi
31
31
  # @return [Array<String>] This is a list of properties that are required.
32
32
  # This only makes sense if the type is "object".
33
33
  attr_reader :required
34
+ # @return [Array<String>] This array specifies the allowed values that can be used to restrict the output
35
+ # of the model.
36
+ attr_reader :enum
34
37
  # @return [OpenStruct] Additional properties unmapped to the current class definition
35
38
  attr_reader :additional_properties
36
39
  # @return [Object]
@@ -59,21 +62,26 @@ module Vapi
59
62
  # @param description [String] This is the description to help the model understand what it needs to output.
60
63
  # @param required [Array<String>] This is a list of properties that are required.
61
64
  # This only makes sense if the type is "object".
65
+ # @param enum [Array<String>] This array specifies the allowed values that can be used to restrict the output
66
+ # of the model.
62
67
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
63
68
  # @return [Vapi::JsonSchema]
64
- def initialize(type:, items: OMIT, properties: OMIT, description: OMIT, required: OMIT, additional_properties: nil)
69
+ def initialize(type:, items: OMIT, properties: OMIT, description: OMIT, required: OMIT, enum: OMIT,
70
+ additional_properties: nil)
65
71
  @type = type
66
72
  @items = items if items != OMIT
67
73
  @properties = properties if properties != OMIT
68
74
  @description = description if description != OMIT
69
75
  @required = required if required != OMIT
76
+ @enum = enum if enum != OMIT
70
77
  @additional_properties = additional_properties
71
78
  @_field_set = {
72
79
  "type": type,
73
80
  "items": items,
74
81
  "properties": properties,
75
82
  "description": description,
76
- "required": required
83
+ "required": required,
84
+ "enum": enum
77
85
  }.reject do |_k, v|
78
86
  v == OMIT
79
87
  end
@@ -91,12 +99,14 @@ module Vapi
91
99
  properties = parsed_json["properties"]
92
100
  description = parsed_json["description"]
93
101
  required = parsed_json["required"]
102
+ enum = parsed_json["enum"]
94
103
  new(
95
104
  type: type,
96
105
  items: items,
97
106
  properties: properties,
98
107
  description: description,
99
108
  required: required,
109
+ enum: enum,
100
110
  additional_properties: struct
101
111
  )
102
112
  end
@@ -120,6 +130,7 @@ module Vapi
120
130
  obj.properties&.is_a?(Hash) != false || raise("Passed value for field obj.properties is not the expected type, validation failed.")
121
131
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
122
132
  obj.required&.is_a?(Array) != false || raise("Passed value for field obj.required is not the expected type, validation failed.")
133
+ obj.enum&.is_a?(Array) != false || raise("Passed value for field obj.enum is not the expected type, validation failed.")
123
134
  end
124
135
  end
125
136
  end
@@ -91,22 +91,22 @@ module Vapi
91
91
  # @param call_id [String] This is the ID of the call.
92
92
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
93
93
  # @return [Vapi::Log]
94
- def initialize(time:, org_id:, type:, request_duration_seconds:, request_started_at:, request_finished_at:,
95
- request_body:, request_http_method:, request_url:, request_path:, response_http_code:, webhook_type: OMIT, resource: OMIT, request_query: OMIT, request_ip_address: OMIT, request_origin: OMIT, response_body: OMIT, request_headers: OMIT, error: OMIT, assistant_id: OMIT, phone_number_id: OMIT, customer_id: OMIT, squad_id: OMIT, call_id: OMIT, additional_properties: nil)
94
+ def initialize(time:, org_id:, type:, webhook_type: OMIT, resource: OMIT, request_duration_seconds: OMIT,
95
+ request_started_at: OMIT, request_finished_at: OMIT, request_body: OMIT, request_http_method: OMIT, request_url: OMIT, request_path: OMIT, request_query: OMIT, response_http_code: OMIT, request_ip_address: OMIT, request_origin: OMIT, response_body: OMIT, request_headers: OMIT, error: OMIT, assistant_id: OMIT, phone_number_id: OMIT, customer_id: OMIT, squad_id: OMIT, call_id: OMIT, additional_properties: nil)
96
96
  @time = time
97
97
  @org_id = org_id
98
98
  @type = type
99
99
  @webhook_type = webhook_type if webhook_type != OMIT
100
100
  @resource = resource if resource != OMIT
101
- @request_duration_seconds = request_duration_seconds
102
- @request_started_at = request_started_at
103
- @request_finished_at = request_finished_at
104
- @request_body = request_body
105
- @request_http_method = request_http_method
106
- @request_url = request_url
107
- @request_path = request_path
101
+ @request_duration_seconds = request_duration_seconds if request_duration_seconds != OMIT
102
+ @request_started_at = request_started_at if request_started_at != OMIT
103
+ @request_finished_at = request_finished_at if request_finished_at != OMIT
104
+ @request_body = request_body if request_body != OMIT
105
+ @request_http_method = request_http_method if request_http_method != OMIT
106
+ @request_url = request_url if request_url != OMIT
107
+ @request_path = request_path if request_path != OMIT
108
108
  @request_query = request_query if request_query != OMIT
109
- @response_http_code = response_http_code
109
+ @response_http_code = response_http_code if response_http_code != OMIT
110
110
  @request_ip_address = request_ip_address if request_ip_address != OMIT
111
111
  @request_origin = request_origin if request_origin != OMIT
112
112
  @response_body = response_body if response_body != OMIT
@@ -232,15 +232,15 @@ module Vapi
232
232
  obj.type.is_a?(Vapi::LogType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
233
233
  obj.webhook_type&.is_a?(String) != false || raise("Passed value for field obj.webhook_type is not the expected type, validation failed.")
234
234
  obj.resource&.is_a?(Vapi::LogResource) != false || raise("Passed value for field obj.resource is not the expected type, validation failed.")
235
- obj.request_duration_seconds.is_a?(Float) != false || raise("Passed value for field obj.request_duration_seconds is not the expected type, validation failed.")
236
- obj.request_started_at.is_a?(String) != false || raise("Passed value for field obj.request_started_at is not the expected type, validation failed.")
237
- obj.request_finished_at.is_a?(String) != false || raise("Passed value for field obj.request_finished_at is not the expected type, validation failed.")
238
- obj.request_body.is_a?(Hash) != false || raise("Passed value for field obj.request_body is not the expected type, validation failed.")
239
- obj.request_http_method.is_a?(Vapi::LogRequestHttpMethod) != false || raise("Passed value for field obj.request_http_method is not the expected type, validation failed.")
240
- obj.request_url.is_a?(String) != false || raise("Passed value for field obj.request_url is not the expected type, validation failed.")
241
- obj.request_path.is_a?(String) != false || raise("Passed value for field obj.request_path is not the expected type, validation failed.")
235
+ obj.request_duration_seconds&.is_a?(Float) != false || raise("Passed value for field obj.request_duration_seconds is not the expected type, validation failed.")
236
+ obj.request_started_at&.is_a?(String) != false || raise("Passed value for field obj.request_started_at is not the expected type, validation failed.")
237
+ obj.request_finished_at&.is_a?(String) != false || raise("Passed value for field obj.request_finished_at is not the expected type, validation failed.")
238
+ obj.request_body&.is_a?(Hash) != false || raise("Passed value for field obj.request_body is not the expected type, validation failed.")
239
+ obj.request_http_method&.is_a?(Vapi::LogRequestHttpMethod) != false || raise("Passed value for field obj.request_http_method is not the expected type, validation failed.")
240
+ obj.request_url&.is_a?(String) != false || raise("Passed value for field obj.request_url is not the expected type, validation failed.")
241
+ obj.request_path&.is_a?(String) != false || raise("Passed value for field obj.request_path is not the expected type, validation failed.")
242
242
  obj.request_query&.is_a?(String) != false || raise("Passed value for field obj.request_query is not the expected type, validation failed.")
243
- obj.response_http_code.is_a?(Float) != false || raise("Passed value for field obj.response_http_code is not the expected type, validation failed.")
243
+ obj.response_http_code&.is_a?(Float) != false || raise("Passed value for field obj.response_http_code is not the expected type, validation failed.")
244
244
  obj.request_ip_address&.is_a?(String) != false || raise("Passed value for field obj.request_ip_address is not the expected type, validation failed.")
245
245
  obj.request_origin&.is_a?(String) != false || raise("Passed value for field obj.request_origin is not the expected type, validation failed.")
246
246
  obj.response_body&.is_a?(Hash) != false || raise("Passed value for field obj.response_body is not the expected type, validation failed.")
@@ -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. "make" for Make tool.
26
- attr_reader :type
27
25
  # @return [Vapi::ToolCall]
28
26
  attr_reader :tool_call
29
27
  # @return [Vapi::MakeToolMetadata]
@@ -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. "make" for Make tool.
67
64
  # @param tool_call [Vapi::ToolCall]
68
65
  # @param metadata [Vapi::MakeToolMetadata]
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::MakeToolWithToolCall]
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::MakeToolWithToolCallMessagesItem.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::MakeToolMetadata.validate_raw(obj: obj.metadata)
177
169
  obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
@@ -2,7 +2,13 @@
2
2
 
3
3
  module Vapi
4
4
  class OpenAiModelFallbackModelsItem
5
+ O_1_PREVIEW = "o1-preview"
6
+ O_1_PREVIEW_20240912 = "o1-preview-2024-09-12"
7
+ O_1_MINI = "o1-mini"
8
+ O_1_MINI_20240912 = "o1-mini-2024-09-12"
5
9
  GPT_4_O_REALTIME_PREVIEW_20241001 = "gpt-4o-realtime-preview-2024-10-01"
10
+ GPT_4_O_REALTIME_PREVIEW_20241217 = "gpt-4o-realtime-preview-2024-12-17"
11
+ GPT_4_O_MINI_REALTIME_PREVIEW_20241217 = "gpt-4o-mini-realtime-preview-2024-12-17"
6
12
  GPT_4_O_MINI = "gpt-4o-mini"
7
13
  GPT_4_O_MINI_20240718 = "gpt-4o-mini-2024-07-18"
8
14
  GPT_4_O = "gpt-4o"
@@ -3,7 +3,13 @@
3
3
  module Vapi
4
4
  # This is the OpenAI model that will be used.
5
5
  class OpenAiModelModel
6
+ O_1_PREVIEW = "o1-preview"
7
+ O_1_PREVIEW_20240912 = "o1-preview-2024-09-12"
8
+ O_1_MINI = "o1-mini"
9
+ O_1_MINI_20240912 = "o1-mini-2024-09-12"
6
10
  GPT_4_O_REALTIME_PREVIEW_20241001 = "gpt-4o-realtime-preview-2024-10-01"
11
+ GPT_4_O_REALTIME_PREVIEW_20241217 = "gpt-4o-realtime-preview-2024-12-17"
12
+ GPT_4_O_MINI_REALTIME_PREVIEW_20241217 = "gpt-4o-mini-realtime-preview-2024-12-17"
7
13
  GPT_4_O_MINI = "gpt-4o-mini"
8
14
  GPT_4_O_MINI_20240718 = "gpt-4o-mini-2024-07-18"
9
15
  GPT_4_O = "gpt-4o"
@@ -9,8 +9,8 @@ require "json"
9
9
  module Vapi
10
10
  class OpenAiVoice
11
11
  # @return [Vapi::OpenAiVoiceId] This is the provider-specific ID that will be used.
12
- # Please note that ash, ballad, coral, sage, and verse may only be used with the
13
- # `gpt-4o-realtime-preview-2024-10-01` model.
12
+ # Please note that ash, ballad, coral, sage, and verse may only be used with
13
+ # realtime models.
14
14
  attr_reader :voice_id
15
15
  # @return [Float] This is the speed multiplier that will be used.
16
16
  attr_reader :speed
@@ -29,8 +29,8 @@ module Vapi
29
29
  OMIT = Object.new
30
30
 
31
31
  # @param voice_id [Vapi::OpenAiVoiceId] This is the provider-specific ID that will be used.
32
- # Please note that ash, ballad, coral, sage, and verse may only be used with the
33
- # `gpt-4o-realtime-preview-2024-10-01` model.
32
+ # Please note that ash, ballad, coral, sage, and verse may only be used with
33
+ # realtime models.
34
34
  # @param speed [Float] This is the speed multiplier that will be used.
35
35
  # @param chunk_plan [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
36
36
  # provider.
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Vapi
4
4
  # This is the provider-specific ID that will be used.
5
- # Please note that ash, ballad, coral, sage, and verse may only be used with the
6
- # `gpt-4o-realtime-preview-2024-10-01` model.
5
+ # Please note that ash, ballad, coral, sage, and verse may only be used with
6
+ # realtime models.
7
7
  class OpenAiVoiceId
8
8
  ALLOY = "alloy"
9
9
  ECHO = "echo"