vapi_server_sdk 0.1.0 → 0.3.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 (448) hide show
  1. checksums.yaml +4 -4
  2. data/lib/requests.rb +2 -2
  3. data/lib/types_export.rb +287 -62
  4. data/lib/vapi_server_sdk/analytics/client.rb +14 -43
  5. data/lib/vapi_server_sdk/assistants/client.rb +70 -60
  6. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_client_messages_item.rb +1 -0
  7. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_credentials_item.rb +512 -0
  8. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +52 -0
  9. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_server_messages_item.rb +1 -0
  10. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +40 -1
  11. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +39 -0
  12. data/lib/vapi_server_sdk/blocks/client.rb +7 -166
  13. data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
  14. data/lib/vapi_server_sdk/calls/client.rb +74 -32
  15. data/lib/vapi_server_sdk/knowledge_bases/client.rb +393 -0
  16. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_request.rb +96 -0
  17. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_response.rb +96 -0
  18. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_delete_response.rb +96 -0
  19. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_get_response.rb +96 -0
  20. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_list_response_item.rb +96 -0
  21. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
  22. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_response.rb +96 -0
  23. data/lib/vapi_server_sdk/logs/client.rb +94 -6
  24. data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -69
  25. data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
  26. data/lib/vapi_server_sdk/squads/client.rb +64 -32
  27. data/lib/vapi_server_sdk/tools/client.rb +7 -87
  28. data/lib/vapi_server_sdk/tools/types/tools_create_request.rb +39 -0
  29. data/lib/vapi_server_sdk/tools/types/tools_create_response.rb +39 -0
  30. data/lib/vapi_server_sdk/tools/types/tools_delete_response.rb +39 -0
  31. data/lib/vapi_server_sdk/tools/types/tools_get_response.rb +39 -0
  32. data/lib/vapi_server_sdk/tools/types/tools_list_response_item.rb +39 -0
  33. data/lib/vapi_server_sdk/tools/types/tools_update_request.rb +200 -0
  34. data/lib/vapi_server_sdk/tools/types/tools_update_response.rb +39 -0
  35. data/lib/vapi_server_sdk/types/analytics_query_dto.rb +59 -0
  36. data/lib/vapi_server_sdk/types/anthropic_credential.rb +13 -3
  37. data/lib/vapi_server_sdk/types/anthropic_model.rb +21 -13
  38. data/lib/vapi_server_sdk/types/anthropic_model_model.rb +2 -0
  39. data/lib/vapi_server_sdk/types/anyscale_credential.rb +13 -3
  40. data/lib/vapi_server_sdk/types/anyscale_model.rb +21 -13
  41. data/lib/vapi_server_sdk/types/assembly_ai_credential.rb +111 -0
  42. data/lib/vapi_server_sdk/types/assembly_ai_transcriber.rb +97 -0
  43. data/lib/vapi_server_sdk/types/assistant.rb +60 -64
  44. data/lib/vapi_server_sdk/types/assistant_client_messages_item.rb +1 -0
  45. data/lib/vapi_server_sdk/types/assistant_credentials_item.rb +510 -0
  46. data/lib/vapi_server_sdk/types/assistant_custom_endpointing_rule.rb +100 -0
  47. data/lib/vapi_server_sdk/types/assistant_model.rb +52 -0
  48. data/lib/vapi_server_sdk/types/assistant_overrides.rb +75 -65
  49. data/lib/vapi_server_sdk/types/assistant_overrides_client_messages_item.rb +1 -0
  50. data/lib/vapi_server_sdk/types/assistant_overrides_credentials_item.rb +510 -0
  51. data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +52 -0
  52. data/lib/vapi_server_sdk/types/assistant_overrides_server_messages_item.rb +1 -0
  53. data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +40 -1
  54. data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +39 -0
  55. data/lib/vapi_server_sdk/types/assistant_server_messages_item.rb +1 -0
  56. data/lib/vapi_server_sdk/types/assistant_transcriber.rb +40 -1
  57. data/lib/vapi_server_sdk/types/assistant_voice.rb +39 -0
  58. data/lib/vapi_server_sdk/types/auto_reload_plan.rb +65 -0
  59. data/lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb +88 -0
  60. data/lib/vapi_server_sdk/types/azure_credential.rb +146 -0
  61. data/lib/vapi_server_sdk/types/azure_credential_region.rb +23 -0
  62. data/lib/vapi_server_sdk/types/azure_credential_service.rb +9 -0
  63. data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +20 -2
  64. data/lib/vapi_server_sdk/types/azure_open_ai_credential_models_item.rb +1 -0
  65. data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +2 -1
  66. data/lib/vapi_server_sdk/types/azure_speech_transcriber.rb +62 -0
  67. data/lib/vapi_server_sdk/types/azure_speech_transcriber_language.rb +152 -0
  68. data/lib/vapi_server_sdk/types/azure_voice.rb +25 -21
  69. data/lib/vapi_server_sdk/types/bash_tool.rb +194 -0
  70. data/lib/vapi_server_sdk/types/bash_tool_messages_item.rb +120 -0
  71. data/lib/vapi_server_sdk/types/block_complete_message.rb +29 -4
  72. data/lib/vapi_server_sdk/types/block_start_message.rb +29 -4
  73. data/lib/vapi_server_sdk/types/both_custom_endpointing_rule.rb +126 -0
  74. data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +25 -29
  75. data/lib/vapi_server_sdk/types/byo_phone_number.rb +25 -29
  76. data/lib/vapi_server_sdk/types/byo_sip_trunk_credential.rb +29 -9
  77. data/lib/vapi_server_sdk/types/call.rb +15 -1
  78. data/lib/vapi_server_sdk/types/call_ended_reason.rb +83 -43
  79. data/lib/vapi_server_sdk/types/call_log_privileged.rb +88 -0
  80. data/lib/vapi_server_sdk/types/call_log_privileged_level.rb +12 -0
  81. data/lib/vapi_server_sdk/types/call_logs_paginated_response.rb +75 -0
  82. data/lib/vapi_server_sdk/types/cartesia_credential.rb +13 -3
  83. data/lib/vapi_server_sdk/types/cartesia_voice.rb +25 -21
  84. data/lib/vapi_server_sdk/types/cartesia_voice_language.rb +9 -1
  85. data/lib/vapi_server_sdk/types/cartesia_voice_model.rb +2 -0
  86. data/lib/vapi_server_sdk/types/cerebras_credential.rb +111 -0
  87. data/lib/vapi_server_sdk/types/chat_dto.rb +103 -0
  88. data/lib/vapi_server_sdk/types/chat_service_response.rb +47 -0
  89. data/lib/vapi_server_sdk/types/client_inbound_message_add_message.rb +25 -3
  90. data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
  91. data/lib/vapi_server_sdk/types/client_inbound_message_transfer.rb +63 -0
  92. data/lib/vapi_server_sdk/types/client_inbound_message_transfer_destination.rb +96 -0
  93. data/lib/vapi_server_sdk/types/{client_message_language_changed.rb → client_message_language_change_detected.rb} +5 -5
  94. data/lib/vapi_server_sdk/types/client_message_message.rb +22 -9
  95. data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
  96. data/lib/vapi_server_sdk/types/client_message_transfer_update.rb +116 -0
  97. data/lib/vapi_server_sdk/types/client_message_transfer_update_destination.rb +122 -0
  98. data/lib/vapi_server_sdk/types/cloudflare_credential.rb +142 -0
  99. data/lib/vapi_server_sdk/types/cloudflare_r_2_bucket_plan.rb +105 -0
  100. data/lib/vapi_server_sdk/types/computer_tool.rb +218 -0
  101. data/lib/vapi_server_sdk/types/computer_tool_messages_item.rb +120 -0
  102. data/lib/vapi_server_sdk/types/condition.rb +9 -9
  103. data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +11 -9
  104. data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +11 -9
  105. data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +67 -0
  106. data/lib/vapi_server_sdk/types/create_assistant_dto.rb +61 -65
  107. data/lib/vapi_server_sdk/types/create_assistant_dto_client_messages_item.rb +1 -0
  108. data/lib/vapi_server_sdk/types/create_assistant_dto_credentials_item.rb +510 -0
  109. data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +52 -0
  110. data/lib/vapi_server_sdk/types/create_assistant_dto_server_messages_item.rb +1 -0
  111. data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +40 -1
  112. data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +39 -0
  113. data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +104 -0
  114. data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +23 -0
  115. data/lib/vapi_server_sdk/types/create_azure_credential_dto_service.rb +9 -0
  116. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +22 -11
  117. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_models_item.rb +1 -0
  118. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +2 -1
  119. data/lib/vapi_server_sdk/types/create_bash_tool_dto.rb +161 -0
  120. data/lib/vapi_server_sdk/types/create_bash_tool_dto_messages_item.rb +120 -0
  121. data/lib/vapi_server_sdk/types/create_byo_phone_number_dto.rb +25 -29
  122. data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +31 -19
  123. data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +11 -9
  124. data/lib/vapi_server_sdk/types/{knowledge_base.rb → create_cerebras_credential_dto.rb} +21 -21
  125. data/lib/vapi_server_sdk/types/create_cloudflare_credential_dto.rb +101 -0
  126. data/lib/vapi_server_sdk/types/create_computer_tool_dto.rb +185 -0
  127. data/lib/vapi_server_sdk/types/create_computer_tool_dto_messages_item.rb +120 -0
  128. data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +137 -0
  129. data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +26 -9
  130. data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +11 -9
  131. data/lib/vapi_server_sdk/types/create_deep_seek_credential_dto.rb +67 -0
  132. data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +9 -9
  133. data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +11 -9
  134. data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +9 -21
  135. data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +11 -9
  136. data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +11 -9
  137. data/lib/vapi_server_sdk/types/create_google_credential_dto.rb +76 -0
  138. data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +11 -9
  139. data/lib/vapi_server_sdk/types/create_inflection_ai_credential_dto.rb +76 -0
  140. data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +83 -0
  141. data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +11 -9
  142. data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +11 -9
  143. data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +11 -9
  144. data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +11 -9
  145. data/lib/vapi_server_sdk/types/create_org_dto.rb +45 -26
  146. data/lib/vapi_server_sdk/types/create_org_dto_channel.rb +10 -0
  147. data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +11 -9
  148. data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +11 -9
  149. data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +11 -9
  150. data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +11 -9
  151. data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +13 -11
  152. data/lib/vapi_server_sdk/types/create_smallest_ai_credential_dto.rb +67 -0
  153. data/lib/vapi_server_sdk/types/create_tavus_credential_dto.rb +67 -0
  154. data/lib/vapi_server_sdk/types/create_text_editor_tool_dto.rb +161 -0
  155. data/lib/vapi_server_sdk/types/create_text_editor_tool_dto_messages_item.rb +120 -0
  156. data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +11 -9
  157. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +109 -0
  158. data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +11 -9
  159. data/lib/vapi_server_sdk/types/create_twilio_phone_number_dto.rb +25 -29
  160. data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +44 -30
  161. data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +11 -9
  162. data/lib/vapi_server_sdk/types/create_vonage_phone_number_dto.rb +25 -29
  163. data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +73 -0
  164. data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +67 -0
  165. data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +154 -0
  166. data/lib/vapi_server_sdk/types/custom_llm_credential.rb +46 -3
  167. data/lib/vapi_server_sdk/types/custom_llm_model.rb +23 -15
  168. data/lib/vapi_server_sdk/types/custom_message.rb +92 -0
  169. data/lib/vapi_server_sdk/types/custom_transcriber.rb +125 -0
  170. data/lib/vapi_server_sdk/types/custom_voice.rb +132 -0
  171. data/lib/vapi_server_sdk/types/customer_custom_endpointing_rule.rb +100 -0
  172. data/lib/vapi_server_sdk/types/deep_infra_credential.rb +13 -3
  173. data/lib/vapi_server_sdk/types/deep_infra_model.rb +21 -13
  174. data/lib/vapi_server_sdk/types/deep_seek_credential.rb +111 -0
  175. data/lib/vapi_server_sdk/types/deep_seek_model.rb +177 -0
  176. data/lib/vapi_server_sdk/types/deep_seek_model_tools_item.rb +159 -0
  177. data/lib/vapi_server_sdk/types/deepgram_credential.rb +9 -1
  178. data/lib/vapi_server_sdk/types/deepgram_transcriber.rb +69 -11
  179. data/lib/vapi_server_sdk/types/deepgram_voice.rb +17 -17
  180. data/lib/vapi_server_sdk/types/eleven_labs_credential.rb +13 -3
  181. data/lib/vapi_server_sdk/types/eleven_labs_voice.rb +28 -24
  182. data/lib/vapi_server_sdk/types/eleven_labs_voice_model.rb +2 -0
  183. data/lib/vapi_server_sdk/types/fallback_azure_voice.rb +100 -0
  184. data/lib/vapi_server_sdk/types/fallback_azure_voice_id.rb +53 -0
  185. data/lib/vapi_server_sdk/types/fallback_azure_voice_voice_id.rb +9 -0
  186. data/lib/vapi_server_sdk/types/fallback_cartesia_voice.rb +100 -0
  187. data/lib/vapi_server_sdk/types/fallback_cartesia_voice_language.rb +23 -0
  188. data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +12 -0
  189. data/lib/vapi_server_sdk/types/fallback_custom_voice.rb +117 -0
  190. data/lib/vapi_server_sdk/types/fallback_deepgram_voice.rb +81 -0
  191. data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id.rb +53 -0
  192. data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id_enum.rb +18 -0
  193. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice.rb +164 -0
  194. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id.rb +54 -0
  195. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id_enum.rb +21 -0
  196. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +14 -0
  197. data/lib/vapi_server_sdk/types/fallback_lmnt_voice.rb +88 -0
  198. data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id.rb +53 -0
  199. data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id_enum.rb +8 -0
  200. data/lib/vapi_server_sdk/types/fallback_neets_voice.rb +81 -0
  201. data/lib/vapi_server_sdk/types/fallback_neets_voice_id.rb +53 -0
  202. data/lib/vapi_server_sdk/types/fallback_neets_voice_id_enum.rb +7 -0
  203. data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +87 -0
  204. data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +20 -0
  205. data/lib/vapi_server_sdk/types/fallback_plan.rb +61 -0
  206. data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +224 -0
  207. data/lib/vapi_server_sdk/types/fallback_play_ht_voice.rb +172 -0
  208. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_emotion.rb +19 -0
  209. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id.rb +53 -0
  210. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id_enum.rb +16 -0
  211. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_language.rb +44 -0
  212. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_model.rb +10 -0
  213. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice.rb +96 -0
  214. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id.rb +53 -0
  215. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id_enum.rb +87 -0
  216. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_model.rb +9 -0
  217. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice.rb +95 -0
  218. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id.rb +53 -0
  219. data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id_enum.rb +31 -0
  220. data/lib/vapi_server_sdk/types/fallback_tavus_voice.rb +147 -0
  221. data/lib/vapi_server_sdk/types/fallback_tavus_voice_voice_id.rb +53 -0
  222. data/lib/vapi_server_sdk/types/format_plan.rb +0 -2
  223. data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +10 -1
  224. data/lib/vapi_server_sdk/types/gcp_credential.rb +2 -2
  225. data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config.rb +58 -0
  226. data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.rb +11 -0
  227. data/lib/vapi_server_sdk/types/gemini_multimodal_live_speech_config.rb +61 -0
  228. data/lib/vapi_server_sdk/types/gemini_multimodal_live_voice_config.rb +61 -0
  229. data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +9 -1
  230. data/lib/vapi_server_sdk/types/gladia_credential.rb +13 -3
  231. data/lib/vapi_server_sdk/types/go_high_level_credential.rb +13 -3
  232. data/lib/vapi_server_sdk/types/google_credential.rb +113 -0
  233. data/lib/vapi_server_sdk/types/google_model.rb +194 -0
  234. data/lib/vapi_server_sdk/types/google_model_model.rb +14 -0
  235. data/lib/vapi_server_sdk/types/google_model_tools_item.rb +159 -0
  236. data/lib/vapi_server_sdk/types/google_realtime_config.rb +121 -0
  237. data/lib/vapi_server_sdk/types/groq_credential.rb +13 -3
  238. data/lib/vapi_server_sdk/types/groq_model.rb +21 -13
  239. data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -3
  240. data/lib/vapi_server_sdk/types/import_twilio_phone_number_dto.rb +25 -29
  241. data/lib/vapi_server_sdk/types/import_vonage_phone_number_dto.rb +25 -29
  242. data/lib/vapi_server_sdk/types/inflection_ai_credential.rb +113 -0
  243. data/lib/vapi_server_sdk/types/inflection_ai_model.rb +177 -0
  244. data/lib/vapi_server_sdk/types/inflection_ai_model_tools_item.rb +159 -0
  245. data/lib/vapi_server_sdk/types/invite_user_dto.rb +9 -9
  246. data/lib/vapi_server_sdk/types/knowledge_base_response_document.rb +74 -0
  247. data/lib/vapi_server_sdk/types/langfuse_credential.rb +130 -0
  248. data/lib/vapi_server_sdk/types/lmnt_credential.rb +13 -3
  249. data/lib/vapi_server_sdk/types/lmnt_voice.rb +18 -14
  250. data/lib/vapi_server_sdk/types/log.rb +12 -4
  251. data/lib/vapi_server_sdk/types/log_resource.rb +8 -0
  252. data/lib/vapi_server_sdk/types/make_credential.rb +13 -3
  253. data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +9 -1
  254. data/lib/vapi_server_sdk/types/neets_voice.rb +17 -17
  255. data/lib/vapi_server_sdk/types/o_auth_2_authentication_plan.rb +79 -0
  256. data/lib/vapi_server_sdk/types/oauth_2_authentication_session.rb +68 -0
  257. data/lib/vapi_server_sdk/types/open_ai_credential.rb +13 -3
  258. data/lib/vapi_server_sdk/types/open_ai_function.rb +30 -4
  259. data/lib/vapi_server_sdk/types/open_ai_model.rb +23 -15
  260. data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +8 -0
  261. data/lib/vapi_server_sdk/types/open_ai_model_model.rb +8 -0
  262. data/lib/vapi_server_sdk/types/open_ai_voice.rb +22 -14
  263. data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +7 -0
  264. data/lib/vapi_server_sdk/types/open_router_credential.rb +13 -3
  265. data/lib/vapi_server_sdk/types/open_router_model.rb +21 -13
  266. data/lib/vapi_server_sdk/types/org.rb +59 -26
  267. data/lib/vapi_server_sdk/types/org_channel.rb +10 -0
  268. data/lib/vapi_server_sdk/types/org_with_org_user.rb +262 -0
  269. data/lib/vapi_server_sdk/types/org_with_org_user_channel.rb +10 -0
  270. data/lib/vapi_server_sdk/types/org_with_org_user_role.rb +9 -0
  271. data/lib/vapi_server_sdk/types/perplexity_ai_credential.rb +13 -3
  272. data/lib/vapi_server_sdk/types/perplexity_ai_model.rb +21 -13
  273. data/lib/vapi_server_sdk/types/phone_number_paginated_response.rb +75 -0
  274. data/lib/vapi_server_sdk/types/phone_number_paginated_response_results_item.rb +121 -0
  275. data/lib/vapi_server_sdk/types/play_ht_credential.rb +13 -2
  276. data/lib/vapi_server_sdk/types/play_ht_voice.rb +37 -15
  277. data/lib/vapi_server_sdk/types/play_ht_voice_language.rb +44 -0
  278. data/lib/vapi_server_sdk/types/play_ht_voice_model.rb +10 -0
  279. data/lib/vapi_server_sdk/types/regex_option.rb +2 -2
  280. data/lib/vapi_server_sdk/types/regex_option_type.rb +1 -1
  281. data/lib/vapi_server_sdk/types/regex_replacement.rb +14 -4
  282. data/lib/vapi_server_sdk/types/rime_ai_credential.rb +13 -3
  283. data/lib/vapi_server_sdk/types/rime_ai_voice.rb +18 -14
  284. data/lib/vapi_server_sdk/types/runpod_credential.rb +13 -3
  285. data/lib/vapi_server_sdk/types/s_3_credential.rb +13 -3
  286. data/lib/vapi_server_sdk/types/server.rb +16 -2
  287. data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +83 -43
  288. data/lib/vapi_server_sdk/types/server_message_knowledge_base_request.rb +195 -0
  289. data/lib/vapi_server_sdk/types/server_message_knowledge_base_request_messages_item.rb +97 -0
  290. data/lib/vapi_server_sdk/types/{server_message_language_changed_phone_number.rb → server_message_knowledge_base_request_phone_number.rb} +8 -8
  291. data/lib/vapi_server_sdk/types/{server_message_language_changed.rb → server_message_language_change_detected.rb} +10 -10
  292. data/lib/vapi_server_sdk/types/server_message_language_change_detected_phone_number.rb +125 -0
  293. data/lib/vapi_server_sdk/types/server_message_message.rb +22 -9
  294. data/lib/vapi_server_sdk/types/server_message_response_knowledge_base_request.rb +81 -0
  295. data/lib/vapi_server_sdk/types/server_message_response_message_response.rb +14 -0
  296. data/lib/vapi_server_sdk/types/server_message_status_update.rb +11 -1
  297. data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +83 -43
  298. data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
  299. data/lib/vapi_server_sdk/types/server_message_transfer_update.rb +18 -2
  300. data/lib/vapi_server_sdk/types/sip_authentication.rb +80 -0
  301. data/lib/vapi_server_sdk/types/smallest_ai_credential.rb +111 -0
  302. data/lib/vapi_server_sdk/types/smallest_ai_voice.rb +117 -0
  303. data/lib/vapi_server_sdk/types/smallest_ai_voice_id.rb +53 -0
  304. data/lib/vapi_server_sdk/types/smallest_ai_voice_id_enum.rb +31 -0
  305. data/lib/vapi_server_sdk/types/start_speaking_plan.rb +54 -10
  306. data/lib/vapi_server_sdk/types/start_speaking_plan_custom_endpointing_rules_item.rb +108 -0
  307. data/lib/vapi_server_sdk/types/structured_data_plan.rb +28 -10
  308. data/lib/vapi_server_sdk/types/subscription.rb +336 -0
  309. data/lib/vapi_server_sdk/types/subscription_status.rb +10 -0
  310. data/lib/vapi_server_sdk/types/subscription_type.rb +10 -0
  311. data/lib/vapi_server_sdk/types/success_evaluation_plan.rb +38 -16
  312. data/lib/vapi_server_sdk/types/summary_plan.rb +26 -8
  313. data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +2 -0
  314. data/lib/vapi_server_sdk/types/tavus_conversation_properties.rb +173 -0
  315. data/lib/vapi_server_sdk/types/tavus_credential.rb +111 -0
  316. data/lib/vapi_server_sdk/types/tavus_voice.rb +163 -0
  317. data/lib/vapi_server_sdk/types/tavus_voice_voice_id.rb +53 -0
  318. data/lib/vapi_server_sdk/types/text_content.rb +73 -0
  319. data/lib/vapi_server_sdk/types/text_content_language.rb +191 -0
  320. data/lib/vapi_server_sdk/types/text_editor_tool.rb +194 -0
  321. data/lib/vapi_server_sdk/types/text_editor_tool_messages_item.rb +120 -0
  322. data/lib/vapi_server_sdk/types/together_ai_credential.rb +13 -3
  323. data/lib/vapi_server_sdk/types/together_ai_model.rb +21 -13
  324. data/lib/vapi_server_sdk/types/tool_message_complete.rb +29 -3
  325. data/lib/vapi_server_sdk/types/tool_message_delayed.rb +30 -3
  326. data/lib/vapi_server_sdk/types/tool_message_failed.rb +30 -3
  327. data/lib/vapi_server_sdk/types/tool_message_start.rb +29 -4
  328. data/lib/vapi_server_sdk/types/transfer_destination_assistant.rb +79 -33
  329. data/lib/vapi_server_sdk/types/transfer_destination_assistant_message.rb +65 -0
  330. data/lib/vapi_server_sdk/types/transfer_destination_number.rb +56 -24
  331. data/lib/vapi_server_sdk/types/transfer_destination_number_message.rb +65 -0
  332. data/lib/vapi_server_sdk/types/transfer_destination_sip.rb +60 -15
  333. data/lib/vapi_server_sdk/types/transfer_destination_sip_message.rb +65 -0
  334. data/lib/vapi_server_sdk/types/transfer_destination_step.rb +28 -14
  335. data/lib/vapi_server_sdk/types/transfer_destination_step_message.rb +65 -0
  336. data/lib/vapi_server_sdk/types/transfer_plan.rb +161 -0
  337. data/lib/vapi_server_sdk/types/transfer_plan_message.rb +59 -0
  338. data/lib/vapi_server_sdk/types/transfer_plan_mode.rb +32 -0
  339. data/lib/vapi_server_sdk/types/transport.rb +70 -0
  340. data/lib/vapi_server_sdk/types/transport_cost.rb +12 -2
  341. data/lib/vapi_server_sdk/types/transport_cost_provider.rb +9 -0
  342. data/lib/vapi_server_sdk/types/transport_provider.rb +11 -0
  343. data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +125 -0
  344. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_create_plan.rb +109 -0
  345. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan.rb +95 -0
  346. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan_search_type.rb +12 -0
  347. data/lib/vapi_server_sdk/types/twilio_credential.rb +12 -2
  348. data/lib/vapi_server_sdk/types/twilio_phone_number.rb +25 -29
  349. data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +13 -11
  350. data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +13 -11
  351. data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +67 -0
  352. data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +105 -0
  353. data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +23 -0
  354. data/lib/vapi_server_sdk/types/update_azure_credential_dto_service.rb +9 -0
  355. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +29 -18
  356. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_models_item.rb +1 -0
  357. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +2 -1
  358. data/lib/vapi_server_sdk/types/update_bash_tool_dto.rb +161 -0
  359. data/lib/vapi_server_sdk/types/update_bash_tool_dto_messages_item.rb +120 -0
  360. data/lib/vapi_server_sdk/types/update_byo_phone_number_dto.rb +187 -0
  361. data/lib/vapi_server_sdk/types/update_byo_phone_number_dto_fallback_destination.rb +101 -0
  362. data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +30 -18
  363. data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +13 -11
  364. data/lib/vapi_server_sdk/types/update_cerebras_credential_dto.rb +67 -0
  365. data/lib/vapi_server_sdk/types/update_cloudflare_credential_dto.rb +101 -0
  366. data/lib/vapi_server_sdk/types/update_computer_tool_dto.rb +185 -0
  367. data/lib/vapi_server_sdk/types/update_computer_tool_dto_messages_item.rb +120 -0
  368. data/lib/vapi_server_sdk/types/update_conversation_block_dto.rb +206 -0
  369. data/lib/vapi_server_sdk/types/update_conversation_block_dto_messages_item.rb +95 -0
  370. data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +139 -0
  371. data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +28 -11
  372. data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +13 -11
  373. data/lib/vapi_server_sdk/types/update_deep_seek_credential_dto.rb +67 -0
  374. data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +11 -11
  375. data/lib/vapi_server_sdk/types/update_dtmf_tool_dto.rb +139 -0
  376. data/lib/vapi_server_sdk/types/update_dtmf_tool_dto_messages_item.rb +120 -0
  377. data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +20 -11
  378. data/lib/vapi_server_sdk/types/update_end_call_tool_dto.rb +139 -0
  379. data/lib/vapi_server_sdk/types/update_end_call_tool_dto_messages_item.rb +120 -0
  380. data/lib/vapi_server_sdk/types/update_function_tool_dto.rb +139 -0
  381. data/lib/vapi_server_sdk/types/update_function_tool_dto_messages_item.rb +120 -0
  382. data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +6 -18
  383. data/lib/vapi_server_sdk/types/update_ghl_tool_dto.rb +159 -0
  384. data/lib/vapi_server_sdk/types/update_ghl_tool_dto_messages_item.rb +120 -0
  385. data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +13 -11
  386. data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +13 -11
  387. data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +67 -0
  388. data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +13 -11
  389. data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +67 -0
  390. data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +83 -0
  391. data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +13 -11
  392. data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +17 -15
  393. data/lib/vapi_server_sdk/types/update_make_tool_dto.rb +159 -0
  394. data/lib/vapi_server_sdk/types/update_make_tool_dto_messages_item.rb +120 -0
  395. data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +13 -11
  396. data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +13 -11
  397. data/lib/vapi_server_sdk/types/update_org_dto.rb +45 -26
  398. data/lib/vapi_server_sdk/types/update_org_dto_channel.rb +10 -0
  399. data/lib/vapi_server_sdk/types/update_output_tool_dto.rb +139 -0
  400. data/lib/vapi_server_sdk/types/update_output_tool_dto_messages_item.rb +120 -0
  401. data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +13 -11
  402. data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +15 -13
  403. data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +13 -11
  404. data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +13 -11
  405. data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +24 -22
  406. data/lib/vapi_server_sdk/types/update_smallest_ai_credential_dto.rb +67 -0
  407. data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +67 -0
  408. data/lib/vapi_server_sdk/types/update_text_editor_tool_dto.rb +161 -0
  409. data/lib/vapi_server_sdk/types/update_text_editor_tool_dto_messages_item.rb +120 -0
  410. data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +13 -11
  411. data/lib/vapi_server_sdk/types/update_token_dto.rb +81 -0
  412. data/lib/vapi_server_sdk/types/update_token_dto_tag.rb +9 -0
  413. data/lib/vapi_server_sdk/types/update_tool_call_block_dto.rb +168 -0
  414. data/lib/vapi_server_sdk/types/update_tool_call_block_dto_messages_item.rb +94 -0
  415. data/lib/vapi_server_sdk/types/update_tool_call_block_dto_tool.rb +161 -0
  416. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto.rb +161 -0
  417. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_destinations_item.rb +121 -0
  418. data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_messages_item.rb +121 -0
  419. data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +109 -0
  420. data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +15 -13
  421. data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto.rb +163 -0
  422. data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto_fallback_destination.rb +101 -0
  423. data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto.rb +169 -0
  424. data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto_fallback_destination.rb +101 -0
  425. data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +15 -13
  426. data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto.rb +157 -0
  427. data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto_fallback_destination.rb +101 -0
  428. data/lib/vapi_server_sdk/types/update_workflow_block_dto.rb +154 -0
  429. data/lib/vapi_server_sdk/types/update_workflow_block_dto_messages_item.rb +94 -0
  430. data/lib/vapi_server_sdk/types/update_workflow_block_dto_steps_item.rb +94 -0
  431. data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +67 -0
  432. data/lib/vapi_server_sdk/types/vapi_cost.rb +10 -2
  433. data/lib/vapi_server_sdk/types/vapi_cost_sub_type.rb +9 -0
  434. data/lib/vapi_server_sdk/types/vapi_model.rb +24 -16
  435. data/lib/vapi_server_sdk/types/vapi_phone_number.rb +44 -30
  436. data/lib/vapi_server_sdk/types/vonage_credential.rb +12 -2
  437. data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
  438. data/lib/vapi_server_sdk/types/webhook_credential.rb +134 -0
  439. data/lib/vapi_server_sdk/types/x_ai_credential.rb +113 -0
  440. data/lib/vapi_server_sdk/types/xai_model.rb +177 -0
  441. data/lib/vapi_server_sdk/types/xai_model_tools_item.rb +159 -0
  442. data/lib/vapi_server_sdk.rb +7 -0
  443. metadata +240 -14
  444. data/lib/vapi_server_sdk/blocks/types/update_block_dto_messages_item.rb +0 -96
  445. data/lib/vapi_server_sdk/blocks/types/update_block_dto_steps_item.rb +0 -96
  446. data/lib/vapi_server_sdk/blocks/types/update_block_dto_tool.rb +0 -163
  447. data/lib/vapi_server_sdk/phone_numbers/types/update_phone_number_dto_fallback_destination.rb +0 -103
  448. data/lib/vapi_server_sdk/tools/types/update_tool_dto_messages_item.rb +0 -122
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "knowledge_base_response_document"
4
+ require_relative "custom_message"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Vapi
9
+ class ServerMessageResponseKnowledgeBaseRequest
10
+ # @return [Array<Vapi::KnowledgeBaseResponseDocument>] This is the list of documents that will be sent to the model alongside the
11
+ # `messages` to generate a response.
12
+ attr_reader :documents
13
+ # @return [Vapi::CustomMessage] This can be used to skip the model output generation and speak a custom message.
14
+ attr_reader :message
15
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
16
+ attr_reader :additional_properties
17
+ # @return [Object]
18
+ attr_reader :_field_set
19
+ protected :_field_set
20
+
21
+ OMIT = Object.new
22
+
23
+ # @param documents [Array<Vapi::KnowledgeBaseResponseDocument>] This is the list of documents that will be sent to the model alongside the
24
+ # `messages` to generate a response.
25
+ # @param message [Vapi::CustomMessage] This can be used to skip the model output generation and speak a custom message.
26
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
+ # @return [Vapi::ServerMessageResponseKnowledgeBaseRequest]
28
+ def initialize(documents: OMIT, message: OMIT, additional_properties: nil)
29
+ @documents = documents if documents != OMIT
30
+ @message = message if message != OMIT
31
+ @additional_properties = additional_properties
32
+ @_field_set = { "documents": documents, "message": message }.reject do |_k, v|
33
+ v == OMIT
34
+ end
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of
38
+ # ServerMessageResponseKnowledgeBaseRequest
39
+ #
40
+ # @param json_object [String]
41
+ # @return [Vapi::ServerMessageResponseKnowledgeBaseRequest]
42
+ def self.from_json(json_object:)
43
+ struct = JSON.parse(json_object, object_class: OpenStruct)
44
+ parsed_json = JSON.parse(json_object)
45
+ documents = parsed_json["documents"]&.map do |item|
46
+ item = item.to_json
47
+ Vapi::KnowledgeBaseResponseDocument.from_json(json_object: item)
48
+ end
49
+ if parsed_json["message"].nil?
50
+ message = nil
51
+ else
52
+ message = parsed_json["message"].to_json
53
+ message = Vapi::CustomMessage.from_json(json_object: message)
54
+ end
55
+ new(
56
+ documents: documents,
57
+ message: message,
58
+ additional_properties: struct
59
+ )
60
+ end
61
+
62
+ # Serialize an instance of ServerMessageResponseKnowledgeBaseRequest to a JSON
63
+ # object
64
+ #
65
+ # @return [String]
66
+ def to_json(*_args)
67
+ @_field_set&.to_json
68
+ end
69
+
70
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
71
+ # hash and check each fields type against the current object's property
72
+ # definitions.
73
+ #
74
+ # @param obj [Object]
75
+ # @return [Void]
76
+ def self.validate_raw(obj:)
77
+ obj.documents&.is_a?(Array) != false || raise("Passed value for field obj.documents is not the expected type, validation failed.")
78
+ obj.message.nil? || Vapi::CustomMessage.validate_raw(obj: obj.message)
79
+ end
80
+ end
81
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "json"
4
4
  require_relative "server_message_response_assistant_request"
5
+ require_relative "server_message_response_knowledge_base_request"
5
6
  require_relative "server_message_response_tool_calls"
6
7
  require_relative "server_message_response_transfer_destination_request"
7
8
  require_relative "server_message_response_voice_request"
@@ -25,6 +26,14 @@ module Vapi
25
26
  rescue StandardError
26
27
  # noop
27
28
  end
29
+ begin
30
+ Vapi::ServerMessageResponseKnowledgeBaseRequest.validate_raw(obj: struct)
31
+ return Vapi::ServerMessageResponseKnowledgeBaseRequest.from_json(json_object: struct) unless struct.nil?
32
+
33
+ return nil
34
+ rescue StandardError
35
+ # noop
36
+ end
28
37
  begin
29
38
  Vapi::ServerMessageResponseToolCalls.validate_raw(obj: struct)
30
39
  return Vapi::ServerMessageResponseToolCalls.from_json(json_object: struct) unless struct.nil?
@@ -64,6 +73,11 @@ module Vapi
64
73
  rescue StandardError
65
74
  # noop
66
75
  end
76
+ begin
77
+ return Vapi::ServerMessageResponseKnowledgeBaseRequest.validate_raw(obj: obj)
78
+ rescue StandardError
79
+ # noop
80
+ end
67
81
  begin
68
82
  return Vapi::ServerMessageResponseToolCalls.validate_raw(obj: obj)
69
83
  rescue StandardError
@@ -61,6 +61,9 @@ module Vapi
61
61
  # @return [String] This is the transcript of the call. This is only sent if the status is
62
62
  # "forwarding".
63
63
  attr_reader :transcript
64
+ # @return [String] This is the summary of the call. This is only sent if the status is
65
+ # "forwarding".
66
+ attr_reader :summary
64
67
  # @return [Hash{String => Object}] This is the inbound phone call debugging artifacts. This is only sent if the
65
68
  # status is "ended" and there was an error accepting the inbound phone call.
66
69
  # This will include any errors related to the "assistant-request" if one was made.
@@ -107,13 +110,15 @@ module Vapi
107
110
  # especially after the call is ended, use GET /call/:id.
108
111
  # @param transcript [String] This is the transcript of the call. This is only sent if the status is
109
112
  # "forwarding".
113
+ # @param summary [String] This is the summary of the call. This is only sent if the status is
114
+ # "forwarding".
110
115
  # @param inbound_phone_call_debugging_artifacts [Hash{String => Object}] This is the inbound phone call debugging artifacts. This is only sent if the
111
116
  # status is "ended" and there was an error accepting the inbound phone call.
112
117
  # This will include any errors related to the "assistant-request" if one was made.
113
118
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
114
119
  # @return [Vapi::ServerMessageStatusUpdate]
115
120
  def initialize(status:, phone_number: OMIT, ended_reason: OMIT, messages: OMIT, messages_open_ai_formatted: OMIT,
116
- destination: OMIT, timestamp: OMIT, artifact: OMIT, assistant: OMIT, customer: OMIT, call: OMIT, transcript: OMIT, inbound_phone_call_debugging_artifacts: OMIT, additional_properties: nil)
121
+ destination: OMIT, timestamp: OMIT, artifact: OMIT, assistant: OMIT, customer: OMIT, call: OMIT, transcript: OMIT, summary: OMIT, inbound_phone_call_debugging_artifacts: OMIT, additional_properties: nil)
117
122
  @phone_number = phone_number if phone_number != OMIT
118
123
  @status = status
119
124
  @ended_reason = ended_reason if ended_reason != OMIT
@@ -126,6 +131,7 @@ module Vapi
126
131
  @customer = customer if customer != OMIT
127
132
  @call = call if call != OMIT
128
133
  @transcript = transcript if transcript != OMIT
134
+ @summary = summary if summary != OMIT
129
135
  if inbound_phone_call_debugging_artifacts != OMIT
130
136
  @inbound_phone_call_debugging_artifacts = inbound_phone_call_debugging_artifacts
131
137
  end
@@ -143,6 +149,7 @@ module Vapi
143
149
  "customer": customer,
144
150
  "call": call,
145
151
  "transcript": transcript,
152
+ "summary": summary,
146
153
  "inboundPhoneCallDebuggingArtifacts": inbound_phone_call_debugging_artifacts
147
154
  }.reject do |_k, v|
148
155
  v == OMIT
@@ -204,6 +211,7 @@ module Vapi
204
211
  call = Vapi::Call.from_json(json_object: call)
205
212
  end
206
213
  transcript = parsed_json["transcript"]
214
+ summary = parsed_json["summary"]
207
215
  inbound_phone_call_debugging_artifacts = parsed_json["inboundPhoneCallDebuggingArtifacts"]
208
216
  new(
209
217
  phone_number: phone_number,
@@ -218,6 +226,7 @@ module Vapi
218
226
  customer: customer,
219
227
  call: call,
220
228
  transcript: transcript,
229
+ summary: summary,
221
230
  inbound_phone_call_debugging_artifacts: inbound_phone_call_debugging_artifacts,
222
231
  additional_properties: struct
223
232
  )
@@ -249,6 +258,7 @@ module Vapi
249
258
  obj.customer.nil? || Vapi::CreateCustomerDto.validate_raw(obj: obj.customer)
250
259
  obj.call.nil? || Vapi::Call.validate_raw(obj: obj.call)
251
260
  obj.transcript&.is_a?(String) != false || raise("Passed value for field obj.transcript is not the expected type, validation failed.")
261
+ obj.summary&.is_a?(String) != false || raise("Passed value for field obj.summary is not the expected type, validation failed.")
252
262
  obj.inbound_phone_call_debugging_artifacts&.is_a?(Hash) != false || raise("Passed value for field obj.inbound_phone_call_debugging_artifacts is not the expected type, validation failed.")
253
263
  end
254
264
  end
@@ -3,32 +3,51 @@
3
3
  module Vapi
4
4
  # This is the reason the call ended. This is only sent if the status is "ended".
5
5
  class ServerMessageStatusUpdateEndedReason
6
- ASSISTANT_ERROR = "assistant-error"
7
- ASSISTANT_NOT_FOUND = "assistant-not-found"
6
+ ASSISTANT_NOT_INVALID = "assistant-not-invalid"
7
+ ASSISTANT_NOT_PROVIDED = "assistant-not-provided"
8
+ CALL_START_ERROR_NEITHER_ASSISTANT_NOR_SERVER_SET = "call-start-error-neither-assistant-nor-server-set"
9
+ ASSISTANT_REQUEST_FAILED = "assistant-request-failed"
10
+ ASSISTANT_REQUEST_RETURNED_ERROR = "assistant-request-returned-error"
11
+ ASSISTANT_REQUEST_RETURNED_UNSPEAKABLE_ERROR = "assistant-request-returned-unspeakable-error"
12
+ ASSISTANT_REQUEST_RETURNED_INVALID_ASSISTANT = "assistant-request-returned-invalid-assistant"
13
+ ASSISTANT_REQUEST_RETURNED_NO_ASSISTANT = "assistant-request-returned-no-assistant"
14
+ ASSISTANT_REQUEST_RETURNED_FORWARDING_PHONE_NUMBER = "assistant-request-returned-forwarding-phone-number"
15
+ ASSISTANT_ENDED_CALL = "assistant-ended-call"
16
+ ASSISTANT_SAID_END_CALL_PHRASE = "assistant-said-end-call-phrase"
17
+ ASSISTANT_FORWARDED_CALL = "assistant-forwarded-call"
18
+ ASSISTANT_JOIN_TIMED_OUT = "assistant-join-timed-out"
19
+ CUSTOMER_BUSY = "customer-busy"
20
+ CUSTOMER_ENDED_CALL = "customer-ended-call"
21
+ CUSTOMER_DID_NOT_ANSWER = "customer-did-not-answer"
22
+ CUSTOMER_DID_NOT_GIVE_MICROPHONE_PERMISSION = "customer-did-not-give-microphone-permission"
23
+ ASSISTANT_SAID_MESSAGE_WITH_END_CALL_ENABLED = "assistant-said-message-with-end-call-enabled"
24
+ EXCEEDED_MAX_DURATION = "exceeded-max-duration"
25
+ MANUALLY_CANCELED = "manually-canceled"
26
+ PHONE_CALL_PROVIDER_CLOSED_WEBSOCKET = "phone-call-provider-closed-websocket"
8
27
  DB_ERROR = "db-error"
9
- NO_SERVER_AVAILABLE = "no-server-available"
28
+ ASSISTANT_NOT_FOUND = "assistant-not-found"
10
29
  LICENSE_CHECK_FAILED = "license-check-failed"
11
- PIPELINE_ERROR_OPENAI_LLM_FAILED = "pipeline-error-openai-llm-failed"
12
- PIPELINE_ERROR_AZURE_OPENAI_LLM_FAILED = "pipeline-error-azure-openai-llm-failed"
13
- PIPELINE_ERROR_GROQ_LLM_FAILED = "pipeline-error-groq-llm-failed"
14
- PIPELINE_ERROR_ANTHROPIC_LLM_FAILED = "pipeline-error-anthropic-llm-failed"
15
- PIPELINE_ERROR_VAPI_LLM_FAILED = "pipeline-error-vapi-llm-failed"
16
- PIPELINE_ERROR_VAPI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-vapi-400-bad-request-validation-failed"
17
- PIPELINE_ERROR_VAPI_401_UNAUTHORIZED = "pipeline-error-vapi-401-unauthorized"
18
- PIPELINE_ERROR_VAPI_403_MODEL_ACCESS_DENIED = "pipeline-error-vapi-403-model-access-denied"
19
- PIPELINE_ERROR_VAPI_429_EXCEEDED_QUOTA = "pipeline-error-vapi-429-exceeded-quota"
20
- PIPELINE_ERROR_VAPI_500_SERVER_ERROR = "pipeline-error-vapi-500-server-error"
21
30
  PIPELINE_ERROR_OPENAI_VOICE_FAILED = "pipeline-error-openai-voice-failed"
22
31
  PIPELINE_ERROR_CARTESIA_VOICE_FAILED = "pipeline-error-cartesia-voice-failed"
23
- PIPELINE_ERROR_DEEPGRAM_TRANSCRIBER_FAILED = "pipeline-error-deepgram-transcriber-failed"
24
32
  PIPELINE_ERROR_DEEPGRAM_VOICE_FAILED = "pipeline-error-deepgram-voice-failed"
25
- PIPELINE_ERROR_GLADIA_TRANSCRIBER_FAILED = "pipeline-error-gladia-transcriber-failed"
26
33
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_FAILED = "pipeline-error-eleven-labs-voice-failed"
27
34
  PIPELINE_ERROR_PLAYHT_VOICE_FAILED = "pipeline-error-playht-voice-failed"
28
35
  PIPELINE_ERROR_LMNT_VOICE_FAILED = "pipeline-error-lmnt-voice-failed"
29
36
  PIPELINE_ERROR_AZURE_VOICE_FAILED = "pipeline-error-azure-voice-failed"
30
37
  PIPELINE_ERROR_RIME_AI_VOICE_FAILED = "pipeline-error-rime-ai-voice-failed"
31
38
  PIPELINE_ERROR_NEETS_VOICE_FAILED = "pipeline-error-neets-voice-failed"
39
+ PIPELINE_ERROR_SMALLEST_AI_VOICE_FAILED = "pipeline-error-smallest-ai-voice-failed"
40
+ PIPELINE_ERROR_DEEPGRAM_TRANSCRIBER_FAILED = "pipeline-error-deepgram-transcriber-failed"
41
+ PIPELINE_ERROR_GLADIA_TRANSCRIBER_FAILED = "pipeline-error-gladia-transcriber-failed"
42
+ PIPELINE_ERROR_ASSEMBLY_AI_TRANSCRIBER_FAILED = "pipeline-error-assembly-ai-transcriber-failed"
43
+ PIPELINE_ERROR_TALKSCRIBER_TRANSCRIBER_FAILED = "pipeline-error-talkscriber-transcriber-failed"
44
+ PIPELINE_ERROR_AZURE_SPEECH_TRANSCRIBER_FAILED = "pipeline-error-azure-speech-transcriber-failed"
45
+ PIPELINE_ERROR_VAPI_LLM_FAILED = "pipeline-error-vapi-llm-failed"
46
+ PIPELINE_ERROR_VAPI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-vapi-400-bad-request-validation-failed"
47
+ PIPELINE_ERROR_VAPI_401_UNAUTHORIZED = "pipeline-error-vapi-401-unauthorized"
48
+ PIPELINE_ERROR_VAPI_403_MODEL_ACCESS_DENIED = "pipeline-error-vapi-403-model-access-denied"
49
+ PIPELINE_ERROR_VAPI_429_EXCEEDED_QUOTA = "pipeline-error-vapi-429-exceeded-quota"
50
+ PIPELINE_ERROR_VAPI_500_SERVER_ERROR = "pipeline-error-vapi-500-server-error"
32
51
  PIPELINE_NO_AVAILABLE_MODEL = "pipeline-no-available-model"
33
52
  WORKER_SHUTDOWN = "worker-shutdown"
34
53
  UNKNOWN_ERROR = "unknown-error"
@@ -41,32 +60,40 @@ module Vapi
41
60
  VAPIFAULT_TRANSPORT_NEVER_CONNECTED = "vapifault-transport-never-connected"
42
61
  VAPIFAULT_WEB_CALL_WORKER_SETUP_FAILED = "vapifault-web-call-worker-setup-failed"
43
62
  VAPIFAULT_TRANSPORT_CONNECTED_BUT_CALL_NOT_ACTIVE = "vapifault-transport-connected-but-call-not-active"
44
- ASSISTANT_NOT_INVALID = "assistant-not-invalid"
45
- ASSISTANT_NOT_PROVIDED = "assistant-not-provided"
46
- CALL_START_ERROR_NEITHER_ASSISTANT_NOR_SERVER_SET = "call-start-error-neither-assistant-nor-server-set"
47
- ASSISTANT_REQUEST_FAILED = "assistant-request-failed"
48
- ASSISTANT_REQUEST_RETURNED_ERROR = "assistant-request-returned-error"
49
- ASSISTANT_REQUEST_RETURNED_UNSPEAKABLE_ERROR = "assistant-request-returned-unspeakable-error"
50
- ASSISTANT_REQUEST_RETURNED_INVALID_ASSISTANT = "assistant-request-returned-invalid-assistant"
51
- ASSISTANT_REQUEST_RETURNED_NO_ASSISTANT = "assistant-request-returned-no-assistant"
52
- ASSISTANT_REQUEST_RETURNED_FORWARDING_PHONE_NUMBER = "assistant-request-returned-forwarding-phone-number"
53
- ASSISTANT_ENDED_CALL = "assistant-ended-call"
54
- ASSISTANT_SAID_END_CALL_PHRASE = "assistant-said-end-call-phrase"
55
- ASSISTANT_FORWARDED_CALL = "assistant-forwarded-call"
56
- ASSISTANT_JOIN_TIMED_OUT = "assistant-join-timed-out"
57
- CUSTOMER_BUSY = "customer-busy"
58
- CUSTOMER_ENDED_CALL = "customer-ended-call"
59
- CUSTOMER_DID_NOT_ANSWER = "customer-did-not-answer"
60
- CUSTOMER_DID_NOT_GIVE_MICROPHONE_PERMISSION = "customer-did-not-give-microphone-permission"
61
- ASSISTANT_SAID_MESSAGE_WITH_END_CALL_ENABLED = "assistant-said-message-with-end-call-enabled"
62
- EXCEEDED_MAX_DURATION = "exceeded-max-duration"
63
- MANUALLY_CANCELED = "manually-canceled"
64
- PHONE_CALL_PROVIDER_CLOSED_WEBSOCKET = "phone-call-provider-closed-websocket"
63
+ VAPIFAULT_CALL_STARTED_BUT_CONNECTION_TO_TRANSPORT_MISSING = "vapifault-call-started-but-connection-to-transport-missing"
64
+ PIPELINE_ERROR_OPENAI_LLM_FAILED = "pipeline-error-openai-llm-failed"
65
+ PIPELINE_ERROR_AZURE_OPENAI_LLM_FAILED = "pipeline-error-azure-openai-llm-failed"
66
+ PIPELINE_ERROR_GROQ_LLM_FAILED = "pipeline-error-groq-llm-failed"
67
+ PIPELINE_ERROR_GOOGLE_LLM_FAILED = "pipeline-error-google-llm-failed"
68
+ PIPELINE_ERROR_XAI_LLM_FAILED = "pipeline-error-xai-llm-failed"
69
+ PIPELINE_ERROR_INFLECTION_AI_LLM_FAILED = "pipeline-error-inflection-ai-llm-failed"
70
+ PIPELINE_ERROR_CEREBRAS_LLM_FAILED = "pipeline-error-cerebras-llm-failed"
71
+ PIPELINE_ERROR_DEEP_SEEK_LLM_FAILED = "pipeline-error-deep-seek-llm-failed"
65
72
  PIPELINE_ERROR_OPENAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-openai-400-bad-request-validation-failed"
66
73
  PIPELINE_ERROR_OPENAI_401_UNAUTHORIZED = "pipeline-error-openai-401-unauthorized"
67
74
  PIPELINE_ERROR_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-openai-403-model-access-denied"
68
75
  PIPELINE_ERROR_OPENAI_429_EXCEEDED_QUOTA = "pipeline-error-openai-429-exceeded-quota"
69
76
  PIPELINE_ERROR_OPENAI_500_SERVER_ERROR = "pipeline-error-openai-500-server-error"
77
+ PIPELINE_ERROR_GOOGLE_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-google-400-bad-request-validation-failed"
78
+ PIPELINE_ERROR_GOOGLE_401_UNAUTHORIZED = "pipeline-error-google-401-unauthorized"
79
+ PIPELINE_ERROR_GOOGLE_403_MODEL_ACCESS_DENIED = "pipeline-error-google-403-model-access-denied"
80
+ PIPELINE_ERROR_GOOGLE_429_EXCEEDED_QUOTA = "pipeline-error-google-429-exceeded-quota"
81
+ PIPELINE_ERROR_GOOGLE_500_SERVER_ERROR = "pipeline-error-google-500-server-error"
82
+ PIPELINE_ERROR_XAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-xai-400-bad-request-validation-failed"
83
+ PIPELINE_ERROR_XAI_401_UNAUTHORIZED = "pipeline-error-xai-401-unauthorized"
84
+ PIPELINE_ERROR_XAI_403_MODEL_ACCESS_DENIED = "pipeline-error-xai-403-model-access-denied"
85
+ PIPELINE_ERROR_XAI_429_EXCEEDED_QUOTA = "pipeline-error-xai-429-exceeded-quota"
86
+ PIPELINE_ERROR_XAI_500_SERVER_ERROR = "pipeline-error-xai-500-server-error"
87
+ PIPELINE_ERROR_INFLECTION_AI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-inflection-ai-400-bad-request-validation-failed"
88
+ PIPELINE_ERROR_INFLECTION_AI_401_UNAUTHORIZED = "pipeline-error-inflection-ai-401-unauthorized"
89
+ PIPELINE_ERROR_INFLECTION_AI_403_MODEL_ACCESS_DENIED = "pipeline-error-inflection-ai-403-model-access-denied"
90
+ PIPELINE_ERROR_INFLECTION_AI_429_EXCEEDED_QUOTA = "pipeline-error-inflection-ai-429-exceeded-quota"
91
+ PIPELINE_ERROR_INFLECTION_AI_500_SERVER_ERROR = "pipeline-error-inflection-ai-500-server-error"
92
+ PIPELINE_ERROR_DEEP_SEEK_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-deep-seek-400-bad-request-validation-failed"
93
+ PIPELINE_ERROR_DEEP_SEEK_401_UNAUTHORIZED = "pipeline-error-deep-seek-401-unauthorized"
94
+ PIPELINE_ERROR_DEEP_SEEK_403_MODEL_ACCESS_DENIED = "pipeline-error-deep-seek-403-model-access-denied"
95
+ PIPELINE_ERROR_DEEP_SEEK_429_EXCEEDED_QUOTA = "pipeline-error-deep-seek-429-exceeded-quota"
96
+ PIPELINE_ERROR_DEEP_SEEK_500_SERVER_ERROR = "pipeline-error-deep-seek-500-server-error"
70
97
  PIPELINE_ERROR_AZURE_OPENAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-azure-openai-400-bad-request-validation-failed"
71
98
  PIPELINE_ERROR_AZURE_OPENAI_401_UNAUTHORIZED = "pipeline-error-azure-openai-401-unauthorized"
72
99
  PIPELINE_ERROR_AZURE_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-azure-openai-403-model-access-denied"
@@ -77,11 +104,17 @@ module Vapi
77
104
  PIPELINE_ERROR_GROQ_403_MODEL_ACCESS_DENIED = "pipeline-error-groq-403-model-access-denied"
78
105
  PIPELINE_ERROR_GROQ_429_EXCEEDED_QUOTA = "pipeline-error-groq-429-exceeded-quota"
79
106
  PIPELINE_ERROR_GROQ_500_SERVER_ERROR = "pipeline-error-groq-500-server-error"
107
+ PIPELINE_ERROR_CEREBRAS_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-cerebras-400-bad-request-validation-failed"
108
+ PIPELINE_ERROR_CEREBRAS_401_UNAUTHORIZED = "pipeline-error-cerebras-401-unauthorized"
109
+ PIPELINE_ERROR_CEREBRAS_403_MODEL_ACCESS_DENIED = "pipeline-error-cerebras-403-model-access-denied"
110
+ PIPELINE_ERROR_CEREBRAS_429_EXCEEDED_QUOTA = "pipeline-error-cerebras-429-exceeded-quota"
111
+ PIPELINE_ERROR_CEREBRAS_500_SERVER_ERROR = "pipeline-error-cerebras-500-server-error"
80
112
  PIPELINE_ERROR_ANTHROPIC_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-anthropic-400-bad-request-validation-failed"
81
113
  PIPELINE_ERROR_ANTHROPIC_401_UNAUTHORIZED = "pipeline-error-anthropic-401-unauthorized"
82
114
  PIPELINE_ERROR_ANTHROPIC_403_MODEL_ACCESS_DENIED = "pipeline-error-anthropic-403-model-access-denied"
83
115
  PIPELINE_ERROR_ANTHROPIC_429_EXCEEDED_QUOTA = "pipeline-error-anthropic-429-exceeded-quota"
84
116
  PIPELINE_ERROR_ANTHROPIC_500_SERVER_ERROR = "pipeline-error-anthropic-500-server-error"
117
+ PIPELINE_ERROR_ANTHROPIC_LLM_FAILED = "pipeline-error-anthropic-llm-failed"
85
118
  PIPELINE_ERROR_TOGETHER_AI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-together-ai-400-bad-request-validation-failed"
86
119
  PIPELINE_ERROR_TOGETHER_AI_401_UNAUTHORIZED = "pipeline-error-together-ai-401-unauthorized"
87
120
  PIPELINE_ERROR_TOGETHER_AI_403_MODEL_ACCESS_DENIED = "pipeline-error-together-ai-403-model-access-denied"
@@ -124,12 +157,12 @@ module Vapi
124
157
  PIPELINE_ERROR_CUSTOM_LLM_429_EXCEEDED_QUOTA = "pipeline-error-custom-llm-429-exceeded-quota"
125
158
  PIPELINE_ERROR_CUSTOM_LLM_500_SERVER_ERROR = "pipeline-error-custom-llm-500-server-error"
126
159
  PIPELINE_ERROR_CUSTOM_LLM_LLM_FAILED = "pipeline-error-custom-llm-llm-failed"
160
+ PIPELINE_ERROR_CUSTOM_VOICE_FAILED = "pipeline-error-custom-voice-failed"
127
161
  PIPELINE_ERROR_CARTESIA_SOCKET_HANG_UP = "pipeline-error-cartesia-socket-hang-up"
128
162
  PIPELINE_ERROR_CARTESIA_REQUESTED_PAYMENT = "pipeline-error-cartesia-requested-payment"
129
163
  PIPELINE_ERROR_CARTESIA_500_SERVER_ERROR = "pipeline-error-cartesia-500-server-error"
130
164
  PIPELINE_ERROR_CARTESIA_503_SERVER_ERROR = "pipeline-error-cartesia-503-server-error"
131
165
  PIPELINE_ERROR_CARTESIA_522_SERVER_ERROR = "pipeline-error-cartesia-522-server-error"
132
- PIPELINE_ERROR_CUSTOM_VOICE_FAILED = "pipeline-error-custom-voice-failed"
133
166
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_NOT_FOUND = "pipeline-error-eleven-labs-voice-not-found"
134
167
  PIPELINE_ERROR_ELEVEN_LABS_QUOTA_EXCEEDED = "pipeline-error-eleven-labs-quota-exceeded"
135
168
  PIPELINE_ERROR_ELEVEN_LABS_UNAUTHORIZED_ACCESS = "pipeline-error-eleven-labs-unauthorized-access"
@@ -150,10 +183,12 @@ module Vapi
150
183
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_NOT_ALLOWED_FOR_FREE_USERS = "pipeline-error-eleven-labs-voice-not-allowed-for-free-users"
151
184
  PIPELINE_ERROR_ELEVEN_LABS_500_SERVER_ERROR = "pipeline-error-eleven-labs-500-server-error"
152
185
  PIPELINE_ERROR_ELEVEN_LABS_MAX_CHARACTER_LIMIT_EXCEEDED = "pipeline-error-eleven-labs-max-character-limit-exceeded"
186
+ PIPELINE_ERROR_ELEVEN_LABS_BLOCKED_VOICE_POTENTIALLY_AGAINST_TERMS_OF_SERVICE_AND_AWAITING_VERIFICATION = "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification"
153
187
  PIPELINE_ERROR_PLAYHT_REQUEST_TIMED_OUT = "pipeline-error-playht-request-timed-out"
154
188
  PIPELINE_ERROR_PLAYHT_INVALID_VOICE = "pipeline-error-playht-invalid-voice"
155
189
  PIPELINE_ERROR_PLAYHT_UNEXPECTED_ERROR = "pipeline-error-playht-unexpected-error"
156
190
  PIPELINE_ERROR_PLAYHT_OUT_OF_CREDITS = "pipeline-error-playht-out-of-credits"
191
+ PIPELINE_ERROR_PLAYHT_INVALID_EMOTION = "pipeline-error-playht-invalid-emotion"
157
192
  PIPELINE_ERROR_PLAYHT_VOICE_MUST_BE_A_VALID_VOICE_MANIFEST_URI = "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri"
158
193
  PIPELINE_ERROR_PLAYHT_401_UNAUTHORIZED = "pipeline-error-playht-401-unauthorized"
159
194
  PIPELINE_ERROR_PLAYHT_403_FORBIDDEN_OUT_OF_CHARACTERS = "pipeline-error-playht-403-forbidden-out-of-characters"
@@ -161,15 +196,20 @@ module Vapi
161
196
  PIPELINE_ERROR_PLAYHT_429_EXCEEDED_QUOTA = "pipeline-error-playht-429-exceeded-quota"
162
197
  PIPELINE_ERROR_PLAYHT_502_GATEWAY_ERROR = "pipeline-error-playht-502-gateway-error"
163
198
  PIPELINE_ERROR_PLAYHT_504_GATEWAY_ERROR = "pipeline-error-playht-504-gateway-error"
164
- PIPELINE_ERROR_DEEPGRAM_403_MODEL_ACCESS_DENIED = "pipeline-error-deepgram-403-model-access-denied"
165
- PIPELINE_ERROR_DEEPGRAM_404_NOT_FOUND = "pipeline-error-deepgram-404-not-found"
166
- PIPELINE_ERROR_DEEPGRAM_400_NO_SUCH_MODEL_LANGUAGE_TIER_COMBINATION = "pipeline-error-deepgram-400-no-such-model-language-tier-combination"
167
- PIPELINE_ERROR_DEEPGRAM_500_RETURNING_INVALID_JSON = "pipeline-error-deepgram-500-returning-invalid-json"
168
- SIP_GATEWAY_FAILED_TO_CONNECT_CALL = "sip-gateway-failed-to-connect-call"
199
+ PIPELINE_ERROR_TAVUS_VIDEO_FAILED = "pipeline-error-tavus-video-failed"
200
+ PIPELINE_ERROR_CUSTOM_TRANSCRIBER_FAILED = "pipeline-error-custom-transcriber-failed"
201
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_403_MODEL_ACCESS_DENIED = "pipeline-error-deepgram-returning-403-model-access-denied"
202
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_401_INVALID_CREDENTIALS = "pipeline-error-deepgram-returning-401-invalid-credentials"
203
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_404_NOT_FOUND = "pipeline-error-deepgram-returning-404-not-found"
204
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_400_NO_SUCH_MODEL_LANGUAGE_TIER_COMBINATION = "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination"
205
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_500_INVALID_JSON = "pipeline-error-deepgram-returning-500-invalid-json"
206
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_502_NETWORK_ERROR = "pipeline-error-deepgram-returning-502-network-error"
207
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_502_BAD_GATEWAY_EHOSTUNREACH = "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach"
169
208
  SILENCE_TIMED_OUT = "silence-timed-out"
209
+ SIP_GATEWAY_FAILED_TO_CONNECT_CALL = "sip-gateway-failed-to-connect-call"
170
210
  TWILIO_FAILED_TO_CONNECT_CALL = "twilio-failed-to-connect-call"
171
211
  TWILIO_REPORTED_CUSTOMER_MISDIALED = "twilio-reported-customer-misdialed"
172
- VOICEMAIL = "voicemail"
173
212
  VONAGE_REJECTED = "vonage-rejected"
213
+ VOICEMAIL = "voicemail"
174
214
  end
175
215
  end
@@ -7,22 +7,6 @@ require_relative "make_tool_with_tool_call"
7
7
 
8
8
  module Vapi
9
9
  class ServerMessageToolCallsToolWithToolCallListItem
10
- # @return [Object]
11
- attr_reader :member
12
- # @return [String]
13
- attr_reader :discriminant
14
-
15
- private_class_method :new
16
- alias kind_of? is_a?
17
-
18
- # @param member [Object]
19
- # @param discriminant [String]
20
- # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
21
- def initialize(member:, discriminant:)
22
- @member = member
23
- @discriminant = discriminant
24
- end
25
-
26
10
  # Deserialize a JSON object to an instance of
27
11
  # ServerMessageToolCallsToolWithToolCallListItem
28
12
  #
@@ -30,34 +14,55 @@ module Vapi
30
14
  # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
31
15
  def self.from_json(json_object:)
32
16
  struct = JSON.parse(json_object, object_class: OpenStruct)
33
- member = case struct.type
34
- when "function"
35
- Vapi::FunctionToolWithToolCall.from_json(json_object: json_object)
36
- when "ghl"
37
- Vapi::GhlToolWithToolCall.from_json(json_object: json_object)
38
- when "make"
39
- Vapi::MakeToolWithToolCall.from_json(json_object: json_object)
40
- else
41
- Vapi::FunctionToolWithToolCall.from_json(json_object: json_object)
42
- end
43
- new(member: member, discriminant: struct.type)
44
- end
17
+ begin
18
+ Vapi::FunctionToolWithToolCall.validate_raw(obj: struct)
19
+ return Vapi::FunctionToolWithToolCall.from_json(json_object: struct) unless struct.nil?
45
20
 
46
- # For Union Types, to_json functionality is delegated to the wrapped member.
47
- #
48
- # @return [String]
49
- def to_json(*_args)
50
- case @discriminant
51
- when "function"
52
- { **@member.to_json, type: @discriminant }.to_json
53
- when "ghl"
54
- { **@member.to_json, type: @discriminant }.to_json
55
- when "make"
56
- { **@member.to_json, type: @discriminant }.to_json
57
- else
58
- { "type": @discriminant, value: @member }.to_json
21
+ return nil
22
+ rescue StandardError
23
+ # noop
24
+ end
25
+ begin
26
+ Vapi::GhlToolWithToolCall.validate_raw(obj: struct)
27
+ return Vapi::GhlToolWithToolCall.from_json(json_object: struct) unless struct.nil?
28
+
29
+ return nil
30
+ rescue StandardError
31
+ # noop
59
32
  end
60
- @member.to_json
33
+ begin
34
+ Vapi::MakeToolWithToolCall.validate_raw(obj: struct)
35
+ return Vapi::MakeToolWithToolCall.from_json(json_object: struct) unless struct.nil?
36
+
37
+ return nil
38
+ rescue StandardError
39
+ # noop
40
+ end
41
+ begin
42
+ struct.is_a?(Object) != false || raise("Passed value for field struct is not the expected type, validation failed.")
43
+ return struct unless struct.nil?
44
+
45
+ return nil
46
+ rescue StandardError
47
+ # noop
48
+ end
49
+ begin
50
+ struct.is_a?(Object) != false || raise("Passed value for field struct is not the expected type, validation failed.")
51
+ return struct unless struct.nil?
52
+
53
+ return nil
54
+ rescue StandardError
55
+ # noop
56
+ end
57
+ begin
58
+ struct.is_a?(Object) != false || raise("Passed value for field struct is not the expected type, validation failed.")
59
+ return struct unless struct.nil?
60
+
61
+ return nil
62
+ rescue StandardError
63
+ # noop
64
+ end
65
+ struct
61
66
  end
62
67
 
63
68
  # Leveraged for Union-type generation, validate_raw attempts to parse the given
@@ -67,42 +72,37 @@ module Vapi
67
72
  # @param obj [Object]
68
73
  # @return [Void]
69
74
  def self.validate_raw(obj:)
70
- case obj.type
71
- when "function"
72
- Vapi::FunctionToolWithToolCall.validate_raw(obj: obj)
73
- when "ghl"
74
- Vapi::GhlToolWithToolCall.validate_raw(obj: obj)
75
- when "make"
76
- Vapi::MakeToolWithToolCall.validate_raw(obj: obj)
77
- else
78
- raise("Passed value matched no type within the union, validation failed.")
75
+ begin
76
+ return Vapi::FunctionToolWithToolCall.validate_raw(obj: obj)
77
+ rescue StandardError
78
+ # noop
79
79
  end
80
- end
81
-
82
- # For Union Types, is_a? functionality is delegated to the wrapped member.
83
- #
84
- # @param obj [Object]
85
- # @return [Boolean]
86
- def is_a?(obj)
87
- @member.is_a?(obj)
88
- end
89
-
90
- # @param member [Vapi::FunctionToolWithToolCall]
91
- # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
92
- def self.function(member:)
93
- new(member: member, discriminant: "function")
94
- end
95
-
96
- # @param member [Vapi::GhlToolWithToolCall]
97
- # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
98
- def self.ghl(member:)
99
- new(member: member, discriminant: "ghl")
100
- end
101
-
102
- # @param member [Vapi::MakeToolWithToolCall]
103
- # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
104
- def self.make(member:)
105
- new(member: member, discriminant: "make")
80
+ begin
81
+ return Vapi::GhlToolWithToolCall.validate_raw(obj: obj)
82
+ rescue StandardError
83
+ # noop
84
+ end
85
+ begin
86
+ return Vapi::MakeToolWithToolCall.validate_raw(obj: obj)
87
+ rescue StandardError
88
+ # noop
89
+ end
90
+ begin
91
+ return obj.is_a?(Object) != false || raise("Passed value for field obj is not the expected type, validation failed.")
92
+ rescue StandardError
93
+ # noop
94
+ end
95
+ begin
96
+ return obj.is_a?(Object) != false || raise("Passed value for field obj is not the expected type, validation failed.")
97
+ rescue StandardError
98
+ # noop
99
+ end
100
+ begin
101
+ return obj.is_a?(Object) != false || raise("Passed value for field obj is not the expected type, validation failed.")
102
+ rescue StandardError
103
+ # noop
104
+ end
105
+ raise("Passed value matched no type within the union, validation failed.")
106
106
  end
107
107
  end
108
108
  end
@@ -49,6 +49,10 @@ module Vapi
49
49
  # @return [Vapi::CreateAssistantDto] This is the assistant that the call is being transferred from. This is only sent
50
50
  # if `destination.type` is "assistant".
51
51
  attr_reader :from_assistant
52
+ # @return [Hash{String => Object}] This is the step that the conversation moved to.
53
+ attr_reader :to_step_record
54
+ # @return [Hash{String => Object}] This is the step that the conversation moved from. =
55
+ attr_reader :from_step_record
52
56
  # @return [OpenStruct] Additional properties unmapped to the current class definition
53
57
  attr_reader :additional_properties
54
58
  # @return [Object]
@@ -86,10 +90,12 @@ module Vapi
86
90
  # if `destination.type` is "assistant".
87
91
  # @param from_assistant [Vapi::CreateAssistantDto] This is the assistant that the call is being transferred from. This is only sent
88
92
  # if `destination.type` is "assistant".
93
+ # @param to_step_record [Hash{String => Object}] This is the step that the conversation moved to.
94
+ # @param from_step_record [Hash{String => Object}] This is the step that the conversation moved from. =
89
95
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
90
96
  # @return [Vapi::ServerMessageTransferUpdate]
91
97
  def initialize(phone_number: OMIT, destination: OMIT, timestamp: OMIT, artifact: OMIT, assistant: OMIT,
92
- customer: OMIT, call: OMIT, to_assistant: OMIT, from_assistant: OMIT, additional_properties: nil)
98
+ customer: OMIT, call: OMIT, to_assistant: OMIT, from_assistant: OMIT, to_step_record: OMIT, from_step_record: OMIT, additional_properties: nil)
93
99
  @phone_number = phone_number if phone_number != OMIT
94
100
  @destination = destination if destination != OMIT
95
101
  @timestamp = timestamp if timestamp != OMIT
@@ -99,6 +105,8 @@ module Vapi
99
105
  @call = call if call != OMIT
100
106
  @to_assistant = to_assistant if to_assistant != OMIT
101
107
  @from_assistant = from_assistant if from_assistant != OMIT
108
+ @to_step_record = to_step_record if to_step_record != OMIT
109
+ @from_step_record = from_step_record if from_step_record != OMIT
102
110
  @additional_properties = additional_properties
103
111
  @_field_set = {
104
112
  "phoneNumber": phone_number,
@@ -109,7 +117,9 @@ module Vapi
109
117
  "customer": customer,
110
118
  "call": call,
111
119
  "toAssistant": to_assistant,
112
- "fromAssistant": from_assistant
120
+ "fromAssistant": from_assistant,
121
+ "toStepRecord": to_step_record,
122
+ "fromStepRecord": from_step_record
113
123
  }.reject do |_k, v|
114
124
  v == OMIT
115
125
  end
@@ -171,6 +181,8 @@ module Vapi
171
181
  from_assistant = parsed_json["fromAssistant"].to_json
172
182
  from_assistant = Vapi::CreateAssistantDto.from_json(json_object: from_assistant)
173
183
  end
184
+ to_step_record = parsed_json["toStepRecord"]
185
+ from_step_record = parsed_json["fromStepRecord"]
174
186
  new(
175
187
  phone_number: phone_number,
176
188
  destination: destination,
@@ -181,6 +193,8 @@ module Vapi
181
193
  call: call,
182
194
  to_assistant: to_assistant,
183
195
  from_assistant: from_assistant,
196
+ to_step_record: to_step_record,
197
+ from_step_record: from_step_record,
184
198
  additional_properties: struct
185
199
  )
186
200
  end
@@ -208,6 +222,8 @@ module Vapi
208
222
  obj.call.nil? || Vapi::Call.validate_raw(obj: obj.call)
209
223
  obj.to_assistant.nil? || Vapi::CreateAssistantDto.validate_raw(obj: obj.to_assistant)
210
224
  obj.from_assistant.nil? || Vapi::CreateAssistantDto.validate_raw(obj: obj.from_assistant)
225
+ obj.to_step_record&.is_a?(Hash) != false || raise("Passed value for field obj.to_step_record is not the expected type, validation failed.")
226
+ obj.from_step_record&.is_a?(Hash) != false || raise("Passed value for field obj.from_step_record is not the expected type, validation failed.")
211
227
  end
212
228
  end
213
229
  end