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,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "bash_tool_with_tool_call_messages_item"
4
+ require_relative "tool_call"
5
+ require_relative "open_ai_function"
6
+ require_relative "server"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module Vapi
11
+ class BashToolWithToolCall
12
+ # @return [Boolean] This determines if the tool is async.
13
+ # If async, the assistant will move forward without waiting for your server to
14
+ # respond. This is useful if you just want to trigger something on your server.
15
+ # If sync, the assistant will wait for your server to respond. This is useful if
16
+ # want assistant to respond with the result from your server.
17
+ # Defaults to synchronous (`false`).
18
+ attr_reader :async
19
+ # @return [Array<Vapi::BashToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
20
+ # For some tools, this is auto-filled based on special fields like
21
+ # `tool.destinations`. For others like the function tool, these can be custom
22
+ # configured.
23
+ attr_reader :messages
24
+ # @return [String] The sub type of tool.
25
+ attr_reader :sub_type
26
+ # @return [Vapi::ToolCall]
27
+ attr_reader :tool_call
28
+ # @return [String] The name of the tool, fixed to 'bash'
29
+ attr_reader :name
30
+ # @return [Vapi::OpenAiFunction] This is the function definition of the tool.
31
+ # For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
32
+ # tool-specific fields like `tool.destinations`. But, even in those cases, you can
33
+ # provide a custom function definition for advanced use cases.
34
+ # An example of an advanced use case is if you want to customize the message
35
+ # that's spoken for `endCall` tool. You can specify a function where it returns an
36
+ # argument "reason". Then, in `messages` array, you can have many
37
+ # "request-complete" messages. One of these messages will be triggered if the
38
+ # `messages[].conditions` matches the "reason" argument.
39
+ attr_reader :function
40
+ # @return [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
41
+ # All requests will be sent with the call object among other things. You can find
42
+ # more details in the Server URL documentation.
43
+ # This overrides the serverUrl set on the org and the phoneNumber. Order of
44
+ # precedence: highest tool.server.url, then assistant.serverUrl, then
45
+ # phoneNumber.serverUrl, then org.serverUrl.
46
+ attr_reader :server
47
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
48
+ attr_reader :additional_properties
49
+ # @return [Object]
50
+ attr_reader :_field_set
51
+ protected :_field_set
52
+
53
+ OMIT = Object.new
54
+
55
+ # @param async [Boolean] This determines if the tool is async.
56
+ # If async, the assistant will move forward without waiting for your server to
57
+ # respond. This is useful if you just want to trigger something on your server.
58
+ # If sync, the assistant will wait for your server to respond. This is useful if
59
+ # want assistant to respond with the result from your server.
60
+ # Defaults to synchronous (`false`).
61
+ # @param messages [Array<Vapi::BashToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
62
+ # For some tools, this is auto-filled based on special fields like
63
+ # `tool.destinations`. For others like the function tool, these can be custom
64
+ # configured.
65
+ # @param sub_type [String] The sub type of tool.
66
+ # @param tool_call [Vapi::ToolCall]
67
+ # @param name [String] The name of the tool, fixed to 'bash'
68
+ # @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
69
+ # For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
70
+ # tool-specific fields like `tool.destinations`. But, even in those cases, you can
71
+ # provide a custom function definition for advanced use cases.
72
+ # An example of an advanced use case is if you want to customize the message
73
+ # that's spoken for `endCall` tool. You can specify a function where it returns an
74
+ # argument "reason". Then, in `messages` array, you can have many
75
+ # "request-complete" messages. One of these messages will be triggered if the
76
+ # `messages[].conditions` matches the "reason" argument.
77
+ # @param server [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
78
+ # All requests will be sent with the call object among other things. You can find
79
+ # more details in the Server URL documentation.
80
+ # This overrides the serverUrl set on the org and the phoneNumber. Order of
81
+ # precedence: highest tool.server.url, then assistant.serverUrl, then
82
+ # phoneNumber.serverUrl, then org.serverUrl.
83
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
84
+ # @return [Vapi::BashToolWithToolCall]
85
+ def initialize(sub_type:, tool_call:, name:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
86
+ additional_properties: nil)
87
+ @async = async if async != OMIT
88
+ @messages = messages if messages != OMIT
89
+ @sub_type = sub_type
90
+ @tool_call = tool_call
91
+ @name = name
92
+ @function = function if function != OMIT
93
+ @server = server if server != OMIT
94
+ @additional_properties = additional_properties
95
+ @_field_set = {
96
+ "async": async,
97
+ "messages": messages,
98
+ "subType": sub_type,
99
+ "toolCall": tool_call,
100
+ "name": name,
101
+ "function": function,
102
+ "server": server
103
+ }.reject do |_k, v|
104
+ v == OMIT
105
+ end
106
+ end
107
+
108
+ # Deserialize a JSON object to an instance of BashToolWithToolCall
109
+ #
110
+ # @param json_object [String]
111
+ # @return [Vapi::BashToolWithToolCall]
112
+ def self.from_json(json_object:)
113
+ struct = JSON.parse(json_object, object_class: OpenStruct)
114
+ parsed_json = JSON.parse(json_object)
115
+ async = parsed_json["async"]
116
+ messages = parsed_json["messages"]&.map do |item|
117
+ item = item.to_json
118
+ Vapi::BashToolWithToolCallMessagesItem.from_json(json_object: item)
119
+ end
120
+ sub_type = parsed_json["subType"]
121
+ if parsed_json["toolCall"].nil?
122
+ tool_call = nil
123
+ else
124
+ tool_call = parsed_json["toolCall"].to_json
125
+ tool_call = Vapi::ToolCall.from_json(json_object: tool_call)
126
+ end
127
+ name = parsed_json["name"]
128
+ if parsed_json["function"].nil?
129
+ function = nil
130
+ else
131
+ function = parsed_json["function"].to_json
132
+ function = Vapi::OpenAiFunction.from_json(json_object: function)
133
+ end
134
+ if parsed_json["server"].nil?
135
+ server = nil
136
+ else
137
+ server = parsed_json["server"].to_json
138
+ server = Vapi::Server.from_json(json_object: server)
139
+ end
140
+ new(
141
+ async: async,
142
+ messages: messages,
143
+ sub_type: sub_type,
144
+ tool_call: tool_call,
145
+ name: name,
146
+ function: function,
147
+ server: server,
148
+ additional_properties: struct
149
+ )
150
+ end
151
+
152
+ # Serialize an instance of BashToolWithToolCall to a JSON object
153
+ #
154
+ # @return [String]
155
+ def to_json(*_args)
156
+ @_field_set&.to_json
157
+ end
158
+
159
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
160
+ # hash and check each fields type against the current object's property
161
+ # definitions.
162
+ #
163
+ # @param obj [Object]
164
+ # @return [Void]
165
+ def self.validate_raw(obj:)
166
+ obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
167
+ obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
168
+ obj.sub_type.is_a?(String) != false || raise("Passed value for field obj.sub_type is not the expected type, validation failed.")
169
+ Vapi::ToolCall.validate_raw(obj: obj.tool_call)
170
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
171
+ obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
172
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,120 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "tool_message_start"
5
+ require_relative "tool_message_complete"
6
+ require_relative "tool_message_failed"
7
+ require_relative "tool_message_delayed"
8
+
9
+ module Vapi
10
+ class BashToolWithToolCallMessagesItem
11
+ # @return [Object]
12
+ attr_reader :member
13
+ # @return [String]
14
+ attr_reader :discriminant
15
+
16
+ private_class_method :new
17
+ alias kind_of? is_a?
18
+
19
+ # @param member [Object]
20
+ # @param discriminant [String]
21
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
22
+ def initialize(member:, discriminant:)
23
+ @member = member
24
+ @discriminant = discriminant
25
+ end
26
+
27
+ # Deserialize a JSON object to an instance of BashToolWithToolCallMessagesItem
28
+ #
29
+ # @param json_object [String]
30
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
31
+ def self.from_json(json_object:)
32
+ struct = JSON.parse(json_object, object_class: OpenStruct)
33
+ member = case struct.type
34
+ when "request-start"
35
+ Vapi::ToolMessageStart.from_json(json_object: json_object)
36
+ when "request-complete"
37
+ Vapi::ToolMessageComplete.from_json(json_object: json_object)
38
+ when "request-failed"
39
+ Vapi::ToolMessageFailed.from_json(json_object: json_object)
40
+ when "request-response-delayed"
41
+ Vapi::ToolMessageDelayed.from_json(json_object: json_object)
42
+ else
43
+ Vapi::ToolMessageStart.from_json(json_object: json_object)
44
+ end
45
+ new(member: member, discriminant: struct.type)
46
+ end
47
+
48
+ # For Union Types, to_json functionality is delegated to the wrapped member.
49
+ #
50
+ # @return [String]
51
+ def to_json(*_args)
52
+ case @discriminant
53
+ when "request-start"
54
+ { **@member.to_json, type: @discriminant }.to_json
55
+ when "request-complete"
56
+ { **@member.to_json, type: @discriminant }.to_json
57
+ when "request-failed"
58
+ { **@member.to_json, type: @discriminant }.to_json
59
+ when "request-response-delayed"
60
+ { **@member.to_json, type: @discriminant }.to_json
61
+ else
62
+ { "type": @discriminant, value: @member }.to_json
63
+ end
64
+ @member.to_json
65
+ end
66
+
67
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
68
+ # hash and check each fields type against the current object's property
69
+ # definitions.
70
+ #
71
+ # @param obj [Object]
72
+ # @return [Void]
73
+ def self.validate_raw(obj:)
74
+ case obj.type
75
+ when "request-start"
76
+ Vapi::ToolMessageStart.validate_raw(obj: obj)
77
+ when "request-complete"
78
+ Vapi::ToolMessageComplete.validate_raw(obj: obj)
79
+ when "request-failed"
80
+ Vapi::ToolMessageFailed.validate_raw(obj: obj)
81
+ when "request-response-delayed"
82
+ Vapi::ToolMessageDelayed.validate_raw(obj: obj)
83
+ else
84
+ raise("Passed value matched no type within the union, validation failed.")
85
+ end
86
+ end
87
+
88
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
89
+ #
90
+ # @param obj [Object]
91
+ # @return [Boolean]
92
+ def is_a?(obj)
93
+ @member.is_a?(obj)
94
+ end
95
+
96
+ # @param member [Vapi::ToolMessageStart]
97
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
98
+ def self.request_start(member:)
99
+ new(member: member, discriminant: "request-start")
100
+ end
101
+
102
+ # @param member [Vapi::ToolMessageComplete]
103
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
104
+ def self.request_complete(member:)
105
+ new(member: member, discriminant: "request-complete")
106
+ end
107
+
108
+ # @param member [Vapi::ToolMessageFailed]
109
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
110
+ def self.request_failed(member:)
111
+ new(member: member, discriminant: "request-failed")
112
+ end
113
+
114
+ # @param member [Vapi::ToolMessageDelayed]
115
+ # @return [Vapi::BashToolWithToolCallMessagesItem]
116
+ def self.request_response_delayed(member:)
117
+ new(member: member, discriminant: "request-response-delayed")
118
+ end
119
+ end
120
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "buy_phone_number_dto_fallback_destination"
4
+ require_relative "server"
4
5
  require "ostruct"
5
6
  require "json"
6
7
 
@@ -27,16 +28,13 @@ module Vapi
27
28
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
28
29
  # shape of the message and response that is expected.
29
30
  attr_reader :squad_id
30
- # @return [String] This is the server URL where messages will be sent for calls on this number.
31
- # This includes the `assistant-request` message.
32
- # You can see the shape of the messages sent in `ServerMessage`.
33
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
34
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
35
- attr_reader :server_url
36
- # @return [String] This is the secret Vapi will send with every message to your server. It's sent
37
- # as a header called x-vapi-secret.
38
- # Same precedence logic as serverUrl.
39
- attr_reader :server_url_secret
31
+ # @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
32
+ # with their shape in ServerMessage schema.
33
+ # The order of precedence is:
34
+ # 1. assistant.server
35
+ # 2. phoneNumber.server
36
+ # 3. org.server
37
+ attr_reader :server
40
38
  # @return [OpenStruct] Additional properties unmapped to the current class definition
41
39
  attr_reader :additional_properties
42
40
  # @return [Object]
@@ -61,25 +59,22 @@ module Vapi
61
59
  # If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
62
60
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
63
61
  # shape of the message and response that is expected.
64
- # @param server_url [String] This is the server URL where messages will be sent for calls on this number.
65
- # This includes the `assistant-request` message.
66
- # You can see the shape of the messages sent in `ServerMessage`.
67
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
68
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
69
- # @param server_url_secret [String] This is the secret Vapi will send with every message to your server. It's sent
70
- # as a header called x-vapi-secret.
71
- # Same precedence logic as serverUrl.
62
+ # @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
63
+ # with their shape in ServerMessage schema.
64
+ # The order of precedence is:
65
+ # 1. assistant.server
66
+ # 2. phoneNumber.server
67
+ # 3. org.server
72
68
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
73
69
  # @return [Vapi::BuyPhoneNumberDto]
74
70
  def initialize(area_code:, fallback_destination: OMIT, name: OMIT, assistant_id: OMIT, squad_id: OMIT,
75
- server_url: OMIT, server_url_secret: OMIT, additional_properties: nil)
71
+ server: OMIT, additional_properties: nil)
76
72
  @fallback_destination = fallback_destination if fallback_destination != OMIT
77
73
  @area_code = area_code
78
74
  @name = name if name != OMIT
79
75
  @assistant_id = assistant_id if assistant_id != OMIT
80
76
  @squad_id = squad_id if squad_id != OMIT
81
- @server_url = server_url if server_url != OMIT
82
- @server_url_secret = server_url_secret if server_url_secret != OMIT
77
+ @server = server if server != OMIT
83
78
  @additional_properties = additional_properties
84
79
  @_field_set = {
85
80
  "fallbackDestination": fallback_destination,
@@ -87,8 +82,7 @@ module Vapi
87
82
  "name": name,
88
83
  "assistantId": assistant_id,
89
84
  "squadId": squad_id,
90
- "serverUrl": server_url,
91
- "serverUrlSecret": server_url_secret
85
+ "server": server
92
86
  }.reject do |_k, v|
93
87
  v == OMIT
94
88
  end
@@ -111,16 +105,19 @@ module Vapi
111
105
  name = parsed_json["name"]
112
106
  assistant_id = parsed_json["assistantId"]
113
107
  squad_id = parsed_json["squadId"]
114
- server_url = parsed_json["serverUrl"]
115
- server_url_secret = parsed_json["serverUrlSecret"]
108
+ if parsed_json["server"].nil?
109
+ server = nil
110
+ else
111
+ server = parsed_json["server"].to_json
112
+ server = Vapi::Server.from_json(json_object: server)
113
+ end
116
114
  new(
117
115
  fallback_destination: fallback_destination,
118
116
  area_code: area_code,
119
117
  name: name,
120
118
  assistant_id: assistant_id,
121
119
  squad_id: squad_id,
122
- server_url: server_url,
123
- server_url_secret: server_url_secret,
120
+ server: server,
124
121
  additional_properties: struct
125
122
  )
126
123
  end
@@ -144,8 +141,7 @@ module Vapi
144
141
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
145
142
  obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
146
143
  obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
147
- obj.server_url&.is_a?(String) != false || raise("Passed value for field obj.server_url is not the expected type, validation failed.")
148
- obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
144
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
149
145
  end
150
146
  end
151
147
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "byo_phone_number_fallback_destination"
4
4
  require "date"
5
+ require_relative "server"
5
6
  require "ostruct"
6
7
  require "json"
7
8
 
@@ -45,16 +46,13 @@ module Vapi
45
46
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
46
47
  # shape of the message and response that is expected.
47
48
  attr_reader :squad_id
48
- # @return [String] This is the server URL where messages will be sent for calls on this number.
49
- # This includes the `assistant-request` message.
50
- # You can see the shape of the messages sent in `ServerMessage`.
51
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
52
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
53
- attr_reader :server_url
54
- # @return [String] This is the secret Vapi will send with every message to your server. It's sent
55
- # as a header called x-vapi-secret.
56
- # Same precedence logic as serverUrl.
57
- attr_reader :server_url_secret
49
+ # @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
50
+ # with their shape in ServerMessage schema.
51
+ # The order of precedence is:
52
+ # 1. assistant.server
53
+ # 2. phoneNumber.server
54
+ # 3. org.server
55
+ attr_reader :server
58
56
  # @return [String] This is the number of the customer.
59
57
  attr_reader :number
60
58
  # @return [String] This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`)
@@ -99,14 +97,12 @@ module Vapi
99
97
  # If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
100
98
  # to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
101
99
  # shape of the message and response that is expected.
102
- # @param server_url [String] This is the server URL where messages will be sent for calls on this number.
103
- # This includes the `assistant-request` message.
104
- # You can see the shape of the messages sent in `ServerMessage`.
105
- # This overrides the `org.serverUrl`. Order of precedence: tool.server.url >
106
- # assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
107
- # @param server_url_secret [String] This is the secret Vapi will send with every message to your server. It's sent
108
- # as a header called x-vapi-secret.
109
- # Same precedence logic as serverUrl.
100
+ # @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
101
+ # with their shape in ServerMessage schema.
102
+ # The order of precedence is:
103
+ # 1. assistant.server
104
+ # 2. phoneNumber.server
105
+ # 3. org.server
110
106
  # @param number [String] This is the number of the customer.
111
107
  # @param credential_id [String] This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`)
112
108
  # which can be used to make calls to this phone number.
@@ -115,7 +111,7 @@ module Vapi
115
111
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
116
112
  # @return [Vapi::ByoPhoneNumber]
117
113
  def initialize(id:, org_id:, created_at:, updated_at:, credential_id:, fallback_destination: OMIT,
118
- number_e_164_check_enabled: OMIT, name: OMIT, assistant_id: OMIT, squad_id: OMIT, server_url: OMIT, server_url_secret: OMIT, number: OMIT, additional_properties: nil)
114
+ number_e_164_check_enabled: OMIT, name: OMIT, assistant_id: OMIT, squad_id: OMIT, server: OMIT, number: OMIT, additional_properties: nil)
119
115
  @fallback_destination = fallback_destination if fallback_destination != OMIT
120
116
  @number_e_164_check_enabled = number_e_164_check_enabled if number_e_164_check_enabled != OMIT
121
117
  @id = id
@@ -125,8 +121,7 @@ module Vapi
125
121
  @name = name if name != OMIT
126
122
  @assistant_id = assistant_id if assistant_id != OMIT
127
123
  @squad_id = squad_id if squad_id != OMIT
128
- @server_url = server_url if server_url != OMIT
129
- @server_url_secret = server_url_secret if server_url_secret != OMIT
124
+ @server = server if server != OMIT
130
125
  @number = number if number != OMIT
131
126
  @credential_id = credential_id
132
127
  @additional_properties = additional_properties
@@ -140,8 +135,7 @@ module Vapi
140
135
  "name": name,
141
136
  "assistantId": assistant_id,
142
137
  "squadId": squad_id,
143
- "serverUrl": server_url,
144
- "serverUrlSecret": server_url_secret,
138
+ "server": server,
145
139
  "number": number,
146
140
  "credentialId": credential_id
147
141
  }.reject do |_k, v|
@@ -170,8 +164,12 @@ module Vapi
170
164
  name = parsed_json["name"]
171
165
  assistant_id = parsed_json["assistantId"]
172
166
  squad_id = parsed_json["squadId"]
173
- server_url = parsed_json["serverUrl"]
174
- server_url_secret = parsed_json["serverUrlSecret"]
167
+ if parsed_json["server"].nil?
168
+ server = nil
169
+ else
170
+ server = parsed_json["server"].to_json
171
+ server = Vapi::Server.from_json(json_object: server)
172
+ end
175
173
  number = parsed_json["number"]
176
174
  credential_id = parsed_json["credentialId"]
177
175
  new(
@@ -184,8 +182,7 @@ module Vapi
184
182
  name: name,
185
183
  assistant_id: assistant_id,
186
184
  squad_id: squad_id,
187
- server_url: server_url,
188
- server_url_secret: server_url_secret,
185
+ server: server,
189
186
  number: number,
190
187
  credential_id: credential_id,
191
188
  additional_properties: struct
@@ -215,8 +212,7 @@ module Vapi
215
212
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
216
213
  obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
217
214
  obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
218
- obj.server_url&.is_a?(String) != false || raise("Passed value for field obj.server_url is not the expected type, validation failed.")
219
- obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
215
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
220
216
  obj.number&.is_a?(String) != false || raise("Passed value for field obj.number is not the expected type, validation failed.")
221
217
  obj.credential_id.is_a?(String) != false || raise("Passed value for field obj.credential_id is not the expected type, validation failed.")
222
218
  end
@@ -3,6 +3,30 @@
3
3
  module Vapi
4
4
  # This is the explanation for how the call ended.
5
5
  class CallEndedReason
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"
27
+ DB_ERROR = "db-error"
28
+ ASSISTANT_NOT_FOUND = "assistant-not-found"
29
+ LICENSE_CHECK_FAILED = "license-check-failed"
6
30
  PIPELINE_ERROR_OPENAI_VOICE_FAILED = "pipeline-error-openai-voice-failed"
7
31
  PIPELINE_ERROR_CARTESIA_VOICE_FAILED = "pipeline-error-cartesia-voice-failed"
8
32
  PIPELINE_ERROR_DEEPGRAM_VOICE_FAILED = "pipeline-error-deepgram-voice-failed"
@@ -12,9 +36,12 @@ module Vapi
12
36
  PIPELINE_ERROR_AZURE_VOICE_FAILED = "pipeline-error-azure-voice-failed"
13
37
  PIPELINE_ERROR_RIME_AI_VOICE_FAILED = "pipeline-error-rime-ai-voice-failed"
14
38
  PIPELINE_ERROR_NEETS_VOICE_FAILED = "pipeline-error-neets-voice-failed"
15
- DB_ERROR = "db-error"
16
- ASSISTANT_NOT_FOUND = "assistant-not-found"
17
- LICENSE_CHECK_FAILED = "license-check-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"
18
45
  PIPELINE_ERROR_VAPI_LLM_FAILED = "pipeline-error-vapi-llm-failed"
19
46
  PIPELINE_ERROR_VAPI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-vapi-400-bad-request-validation-failed"
20
47
  PIPELINE_ERROR_VAPI_401_UNAUTHORIZED = "pipeline-error-vapi-401-unauthorized"
@@ -34,36 +61,14 @@ module Vapi
34
61
  VAPIFAULT_WEB_CALL_WORKER_SETUP_FAILED = "vapifault-web-call-worker-setup-failed"
35
62
  VAPIFAULT_TRANSPORT_CONNECTED_BUT_CALL_NOT_ACTIVE = "vapifault-transport-connected-but-call-not-active"
36
63
  VAPIFAULT_CALL_STARTED_BUT_CONNECTION_TO_TRANSPORT_MISSING = "vapifault-call-started-but-connection-to-transport-missing"
37
- PIPELINE_ERROR_DEEPGRAM_TRANSCRIBER_FAILED = "pipeline-error-deepgram-transcriber-failed"
38
- PIPELINE_ERROR_GLADIA_TRANSCRIBER_FAILED = "pipeline-error-gladia-transcriber-failed"
39
- PIPELINE_ERROR_ASSEMBLY_AI_TRANSCRIBER_FAILED = "pipeline-error-assembly-ai-transcriber-failed"
40
64
  PIPELINE_ERROR_OPENAI_LLM_FAILED = "pipeline-error-openai-llm-failed"
41
65
  PIPELINE_ERROR_AZURE_OPENAI_LLM_FAILED = "pipeline-error-azure-openai-llm-failed"
42
66
  PIPELINE_ERROR_GROQ_LLM_FAILED = "pipeline-error-groq-llm-failed"
43
67
  PIPELINE_ERROR_GOOGLE_LLM_FAILED = "pipeline-error-google-llm-failed"
44
68
  PIPELINE_ERROR_XAI_LLM_FAILED = "pipeline-error-xai-llm-failed"
45
69
  PIPELINE_ERROR_INFLECTION_AI_LLM_FAILED = "pipeline-error-inflection-ai-llm-failed"
46
- ASSISTANT_NOT_INVALID = "assistant-not-invalid"
47
- ASSISTANT_NOT_PROVIDED = "assistant-not-provided"
48
- CALL_START_ERROR_NEITHER_ASSISTANT_NOR_SERVER_SET = "call-start-error-neither-assistant-nor-server-set"
49
- ASSISTANT_REQUEST_FAILED = "assistant-request-failed"
50
- ASSISTANT_REQUEST_RETURNED_ERROR = "assistant-request-returned-error"
51
- ASSISTANT_REQUEST_RETURNED_UNSPEAKABLE_ERROR = "assistant-request-returned-unspeakable-error"
52
- ASSISTANT_REQUEST_RETURNED_INVALID_ASSISTANT = "assistant-request-returned-invalid-assistant"
53
- ASSISTANT_REQUEST_RETURNED_NO_ASSISTANT = "assistant-request-returned-no-assistant"
54
- ASSISTANT_REQUEST_RETURNED_FORWARDING_PHONE_NUMBER = "assistant-request-returned-forwarding-phone-number"
55
- ASSISTANT_ENDED_CALL = "assistant-ended-call"
56
- ASSISTANT_SAID_END_CALL_PHRASE = "assistant-said-end-call-phrase"
57
- ASSISTANT_FORWARDED_CALL = "assistant-forwarded-call"
58
- ASSISTANT_JOIN_TIMED_OUT = "assistant-join-timed-out"
59
- CUSTOMER_BUSY = "customer-busy"
60
- CUSTOMER_ENDED_CALL = "customer-ended-call"
61
- CUSTOMER_DID_NOT_ANSWER = "customer-did-not-answer"
62
- CUSTOMER_DID_NOT_GIVE_MICROPHONE_PERMISSION = "customer-did-not-give-microphone-permission"
63
- ASSISTANT_SAID_MESSAGE_WITH_END_CALL_ENABLED = "assistant-said-message-with-end-call-enabled"
64
- EXCEEDED_MAX_DURATION = "exceeded-max-duration"
65
- MANUALLY_CANCELED = "manually-canceled"
66
- PHONE_CALL_PROVIDER_CLOSED_WEBSOCKET = "phone-call-provider-closed-websocket"
70
+ PIPELINE_ERROR_CEREBRAS_LLM_FAILED = "pipeline-error-cerebras-llm-failed"
71
+ PIPELINE_ERROR_DEEP_SEEK_LLM_FAILED = "pipeline-error-deep-seek-llm-failed"
67
72
  PIPELINE_ERROR_OPENAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-openai-400-bad-request-validation-failed"
68
73
  PIPELINE_ERROR_OPENAI_401_UNAUTHORIZED = "pipeline-error-openai-401-unauthorized"
69
74
  PIPELINE_ERROR_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-openai-403-model-access-denied"
@@ -84,6 +89,11 @@ module Vapi
84
89
  PIPELINE_ERROR_INFLECTION_AI_403_MODEL_ACCESS_DENIED = "pipeline-error-inflection-ai-403-model-access-denied"
85
90
  PIPELINE_ERROR_INFLECTION_AI_429_EXCEEDED_QUOTA = "pipeline-error-inflection-ai-429-exceeded-quota"
86
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"
87
97
  PIPELINE_ERROR_AZURE_OPENAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-azure-openai-400-bad-request-validation-failed"
88
98
  PIPELINE_ERROR_AZURE_OPENAI_401_UNAUTHORIZED = "pipeline-error-azure-openai-401-unauthorized"
89
99
  PIPELINE_ERROR_AZURE_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-azure-openai-403-model-access-denied"
@@ -94,6 +104,11 @@ module Vapi
94
104
  PIPELINE_ERROR_GROQ_403_MODEL_ACCESS_DENIED = "pipeline-error-groq-403-model-access-denied"
95
105
  PIPELINE_ERROR_GROQ_429_EXCEEDED_QUOTA = "pipeline-error-groq-429-exceeded-quota"
96
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"
97
112
  PIPELINE_ERROR_ANTHROPIC_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-anthropic-400-bad-request-validation-failed"
98
113
  PIPELINE_ERROR_ANTHROPIC_401_UNAUTHORIZED = "pipeline-error-anthropic-401-unauthorized"
99
114
  PIPELINE_ERROR_ANTHROPIC_403_MODEL_ACCESS_DENIED = "pipeline-error-anthropic-403-model-access-denied"
@@ -181,6 +196,8 @@ module Vapi
181
196
  PIPELINE_ERROR_PLAYHT_429_EXCEEDED_QUOTA = "pipeline-error-playht-429-exceeded-quota"
182
197
  PIPELINE_ERROR_PLAYHT_502_GATEWAY_ERROR = "pipeline-error-playht-502-gateway-error"
183
198
  PIPELINE_ERROR_PLAYHT_504_GATEWAY_ERROR = "pipeline-error-playht-504-gateway-error"
199
+ PIPELINE_ERROR_TAVUS_VIDEO_FAILED = "pipeline-error-tavus-video-failed"
200
+ PIPELINE_ERROR_CUSTOM_TRANSCRIBER_FAILED = "pipeline-error-custom-transcriber-failed"
184
201
  PIPELINE_ERROR_DEEPGRAM_RETURNING_403_MODEL_ACCESS_DENIED = "pipeline-error-deepgram-returning-403-model-access-denied"
185
202
  PIPELINE_ERROR_DEEPGRAM_RETURNING_401_INVALID_CREDENTIALS = "pipeline-error-deepgram-returning-401-invalid-credentials"
186
203
  PIPELINE_ERROR_DEEPGRAM_RETURNING_404_NOT_FOUND = "pipeline-error-deepgram-returning-404-not-found"
@@ -188,8 +205,6 @@ module Vapi
188
205
  PIPELINE_ERROR_DEEPGRAM_RETURNING_500_INVALID_JSON = "pipeline-error-deepgram-returning-500-invalid-json"
189
206
  PIPELINE_ERROR_DEEPGRAM_RETURNING_502_NETWORK_ERROR = "pipeline-error-deepgram-returning-502-network-error"
190
207
  PIPELINE_ERROR_DEEPGRAM_RETURNING_502_BAD_GATEWAY_EHOSTUNREACH = "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach"
191
- PIPELINE_ERROR_TAVUS_VIDEO_FAILED = "pipeline-error-tavus-video-failed"
192
- PIPELINE_ERROR_CUSTOM_TRANSCRIBER_FAILED = "pipeline-error-custom-transcriber-failed"
193
208
  SILENCE_TIMED_OUT = "silence-timed-out"
194
209
  SIP_GATEWAY_FAILED_TO_CONNECT_CALL = "sip-gateway-failed-to-connect-call"
195
210
  TWILIO_FAILED_TO_CONNECT_CALL = "twilio-failed-to-connect-call"
@@ -6,5 +6,7 @@ module Vapi
6
6
  class CartesiaVoiceModel
7
7
  SONIC_ENGLISH = "sonic-english"
8
8
  SONIC_MULTILINGUAL = "sonic-multilingual"
9
+ SONIC_PREVIEW = "sonic-preview"
10
+ SONIC = "sonic"
9
11
  end
10
12
  end