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
@@ -3,6 +3,30 @@
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_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"
@@ -4,9 +4,28 @@ require "json"
4
4
  require_relative "function_tool_with_tool_call"
5
5
  require_relative "ghl_tool_with_tool_call"
6
6
  require_relative "make_tool_with_tool_call"
7
+ require_relative "bash_tool_with_tool_call"
8
+ require_relative "computer_tool_with_tool_call"
9
+ require_relative "text_editor_tool_with_tool_call"
7
10
 
8
11
  module Vapi
9
12
  class ServerMessageToolCallsToolWithToolCallListItem
13
+ # @return [Object]
14
+ attr_reader :member
15
+ # @return [String]
16
+ attr_reader :discriminant
17
+
18
+ private_class_method :new
19
+ alias kind_of? is_a?
20
+
21
+ # @param member [Object]
22
+ # @param discriminant [String]
23
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
24
+ def initialize(member:, discriminant:)
25
+ @member = member
26
+ @discriminant = discriminant
27
+ end
28
+
10
29
  # Deserialize a JSON object to an instance of
11
30
  # ServerMessageToolCallsToolWithToolCallListItem
12
31
  #
@@ -14,55 +33,46 @@ module Vapi
14
33
  # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
15
34
  def self.from_json(json_object:)
16
35
  struct = JSON.parse(json_object, object_class: OpenStruct)
17
- begin
18
- Vapi::FunctionToolWithToolCall.validate_raw(obj: struct)
19
- return Vapi::FunctionToolWithToolCall.from_json(json_object: struct) unless struct.nil?
20
-
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
32
- end
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?
36
+ member = case struct.type
37
+ when "function"
38
+ Vapi::FunctionToolWithToolCall.from_json(json_object: json_object)
39
+ when "ghl"
40
+ Vapi::GhlToolWithToolCall.from_json(json_object: json_object)
41
+ when "make"
42
+ Vapi::MakeToolWithToolCall.from_json(json_object: json_object)
43
+ when "bash"
44
+ Vapi::BashToolWithToolCall.from_json(json_object: json_object)
45
+ when "computer"
46
+ Vapi::ComputerToolWithToolCall.from_json(json_object: json_object)
47
+ when "textEditor"
48
+ Vapi::TextEditorToolWithToolCall.from_json(json_object: json_object)
49
+ else
50
+ Vapi::FunctionToolWithToolCall.from_json(json_object: json_object)
51
+ end
52
+ new(member: member, discriminant: struct.type)
53
+ end
60
54
 
61
- return nil
62
- rescue StandardError
63
- # noop
55
+ # For Union Types, to_json functionality is delegated to the wrapped member.
56
+ #
57
+ # @return [String]
58
+ def to_json(*_args)
59
+ case @discriminant
60
+ when "function"
61
+ { **@member.to_json, type: @discriminant }.to_json
62
+ when "ghl"
63
+ { **@member.to_json, type: @discriminant }.to_json
64
+ when "make"
65
+ { **@member.to_json, type: @discriminant }.to_json
66
+ when "bash"
67
+ { **@member.to_json, type: @discriminant }.to_json
68
+ when "computer"
69
+ { **@member.to_json, type: @discriminant }.to_json
70
+ when "textEditor"
71
+ { **@member.to_json, type: @discriminant }.to_json
72
+ else
73
+ { "type": @discriminant, value: @member }.to_json
64
74
  end
65
- struct
75
+ @member.to_json
66
76
  end
67
77
 
68
78
  # Leveraged for Union-type generation, validate_raw attempts to parse the given
@@ -72,37 +82,66 @@ module Vapi
72
82
  # @param obj [Object]
73
83
  # @return [Void]
74
84
  def self.validate_raw(obj:)
75
- begin
76
- return Vapi::FunctionToolWithToolCall.validate_raw(obj: obj)
77
- rescue StandardError
78
- # noop
79
- end
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
85
+ case obj.type
86
+ when "function"
87
+ Vapi::FunctionToolWithToolCall.validate_raw(obj: obj)
88
+ when "ghl"
89
+ Vapi::GhlToolWithToolCall.validate_raw(obj: obj)
90
+ when "make"
91
+ Vapi::MakeToolWithToolCall.validate_raw(obj: obj)
92
+ when "bash"
93
+ Vapi::BashToolWithToolCall.validate_raw(obj: obj)
94
+ when "computer"
95
+ Vapi::ComputerToolWithToolCall.validate_raw(obj: obj)
96
+ when "textEditor"
97
+ Vapi::TextEditorToolWithToolCall.validate_raw(obj: obj)
98
+ else
99
+ raise("Passed value matched no type within the union, validation failed.")
104
100
  end
105
- raise("Passed value matched no type within the union, validation failed.")
101
+ end
102
+
103
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
104
+ #
105
+ # @param obj [Object]
106
+ # @return [Boolean]
107
+ def is_a?(obj)
108
+ @member.is_a?(obj)
109
+ end
110
+
111
+ # @param member [Vapi::FunctionToolWithToolCall]
112
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
113
+ def self.function(member:)
114
+ new(member: member, discriminant: "function")
115
+ end
116
+
117
+ # @param member [Vapi::GhlToolWithToolCall]
118
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
119
+ def self.ghl(member:)
120
+ new(member: member, discriminant: "ghl")
121
+ end
122
+
123
+ # @param member [Vapi::MakeToolWithToolCall]
124
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
125
+ def self.make(member:)
126
+ new(member: member, discriminant: "make")
127
+ end
128
+
129
+ # @param member [Vapi::BashToolWithToolCall]
130
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
131
+ def self.bash(member:)
132
+ new(member: member, discriminant: "bash")
133
+ end
134
+
135
+ # @param member [Vapi::ComputerToolWithToolCall]
136
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
137
+ def self.computer(member:)
138
+ new(member: member, discriminant: "computer")
139
+ end
140
+
141
+ # @param member [Vapi::TextEditorToolWithToolCall]
142
+ # @return [Vapi::ServerMessageToolCallsToolWithToolCallListItem]
143
+ def self.text_editor(member:)
144
+ new(member: member, discriminant: "textEditor")
106
145
  end
107
146
  end
108
147
  end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class SmallestAiCredential
9
+ # @return [String]
10
+ attr_reader :provider
11
+ # @return [String] This is not returned in the API.
12
+ attr_reader :api_key
13
+ # @return [String] This is the unique identifier for the credential.
14
+ attr_reader :id
15
+ # @return [String] This is the unique identifier for the org that this credential belongs to.
16
+ attr_reader :org_id
17
+ # @return [DateTime] This is the ISO 8601 date-time string of when the credential was created.
18
+ attr_reader :created_at
19
+ # @return [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
20
+ attr_reader :updated_at
21
+ # @return [String] This is the name of credential. This is just for your reference.
22
+ attr_reader :name
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param provider [String]
32
+ # @param api_key [String] This is not returned in the API.
33
+ # @param id [String] This is the unique identifier for the credential.
34
+ # @param org_id [String] This is the unique identifier for the org that this credential belongs to.
35
+ # @param created_at [DateTime] This is the ISO 8601 date-time string of when the credential was created.
36
+ # @param updated_at [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
37
+ # @param name [String] This is the name of credential. This is just for your reference.
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [Vapi::SmallestAiCredential]
40
+ def initialize(provider:, api_key:, id:, org_id:, created_at:, updated_at:, name: OMIT, additional_properties: nil)
41
+ @provider = provider
42
+ @api_key = api_key
43
+ @id = id
44
+ @org_id = org_id
45
+ @created_at = created_at
46
+ @updated_at = updated_at
47
+ @name = name if name != OMIT
48
+ @additional_properties = additional_properties
49
+ @_field_set = {
50
+ "provider": provider,
51
+ "apiKey": api_key,
52
+ "id": id,
53
+ "orgId": org_id,
54
+ "createdAt": created_at,
55
+ "updatedAt": updated_at,
56
+ "name": name
57
+ }.reject do |_k, v|
58
+ v == OMIT
59
+ end
60
+ end
61
+
62
+ # Deserialize a JSON object to an instance of SmallestAiCredential
63
+ #
64
+ # @param json_object [String]
65
+ # @return [Vapi::SmallestAiCredential]
66
+ def self.from_json(json_object:)
67
+ struct = JSON.parse(json_object, object_class: OpenStruct)
68
+ parsed_json = JSON.parse(json_object)
69
+ provider = parsed_json["provider"]
70
+ api_key = parsed_json["apiKey"]
71
+ id = parsed_json["id"]
72
+ org_id = parsed_json["orgId"]
73
+ created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?)
74
+ updated_at = (DateTime.parse(parsed_json["updatedAt"]) unless parsed_json["updatedAt"].nil?)
75
+ name = parsed_json["name"]
76
+ new(
77
+ provider: provider,
78
+ api_key: api_key,
79
+ id: id,
80
+ org_id: org_id,
81
+ created_at: created_at,
82
+ updated_at: updated_at,
83
+ name: name,
84
+ additional_properties: struct
85
+ )
86
+ end
87
+
88
+ # Serialize an instance of SmallestAiCredential to a JSON object
89
+ #
90
+ # @return [String]
91
+ def to_json(*_args)
92
+ @_field_set&.to_json
93
+ end
94
+
95
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
96
+ # hash and check each fields type against the current object's property
97
+ # definitions.
98
+ #
99
+ # @param obj [Object]
100
+ # @return [Void]
101
+ def self.validate_raw(obj:)
102
+ obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.")
103
+ obj.api_key.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
104
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
105
+ obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
106
+ obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
107
+ obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
108
+ obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,117 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "smallest_ai_voice_id"
4
+ require_relative "chunk_plan"
5
+ require_relative "fallback_plan"
6
+ require "ostruct"
7
+ require "json"
8
+
9
+ module Vapi
10
+ class SmallestAiVoice
11
+ # @return [Vapi::SmallestAiVoiceId] This is the provider-specific ID that will be used.
12
+ attr_reader :voice_id
13
+ # @return [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
14
+ attr_reader :model
15
+ # @return [Float] This is the speed multiplier that will be used.
16
+ attr_reader :speed
17
+ # @return [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
18
+ # provider.
19
+ attr_reader :chunk_plan
20
+ # @return [Vapi::FallbackPlan] This is the plan for voice provider fallbacks in the event that the primary
21
+ # voice provider fails.
22
+ attr_reader :fallback_plan
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param voice_id [Vapi::SmallestAiVoiceId] This is the provider-specific ID that will be used.
32
+ # @param model [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
33
+ # @param speed [Float] This is the speed multiplier that will be used.
34
+ # @param chunk_plan [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
35
+ # provider.
36
+ # @param fallback_plan [Vapi::FallbackPlan] This is the plan for voice provider fallbacks in the event that the primary
37
+ # voice provider fails.
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [Vapi::SmallestAiVoice]
40
+ def initialize(voice_id:, model: OMIT, speed: OMIT, chunk_plan: OMIT, fallback_plan: OMIT,
41
+ additional_properties: nil)
42
+ @voice_id = voice_id
43
+ @model = model if model != OMIT
44
+ @speed = speed if speed != OMIT
45
+ @chunk_plan = chunk_plan if chunk_plan != OMIT
46
+ @fallback_plan = fallback_plan if fallback_plan != OMIT
47
+ @additional_properties = additional_properties
48
+ @_field_set = {
49
+ "voiceId": voice_id,
50
+ "model": model,
51
+ "speed": speed,
52
+ "chunkPlan": chunk_plan,
53
+ "fallbackPlan": fallback_plan
54
+ }.reject do |_k, v|
55
+ v == OMIT
56
+ end
57
+ end
58
+
59
+ # Deserialize a JSON object to an instance of SmallestAiVoice
60
+ #
61
+ # @param json_object [String]
62
+ # @return [Vapi::SmallestAiVoice]
63
+ def self.from_json(json_object:)
64
+ struct = JSON.parse(json_object, object_class: OpenStruct)
65
+ parsed_json = JSON.parse(json_object)
66
+ if parsed_json["voiceId"].nil?
67
+ voice_id = nil
68
+ else
69
+ voice_id = parsed_json["voiceId"].to_json
70
+ voice_id = Vapi::SmallestAiVoiceId.from_json(json_object: voice_id)
71
+ end
72
+ model = parsed_json["model"]
73
+ speed = parsed_json["speed"]
74
+ if parsed_json["chunkPlan"].nil?
75
+ chunk_plan = nil
76
+ else
77
+ chunk_plan = parsed_json["chunkPlan"].to_json
78
+ chunk_plan = Vapi::ChunkPlan.from_json(json_object: chunk_plan)
79
+ end
80
+ if parsed_json["fallbackPlan"].nil?
81
+ fallback_plan = nil
82
+ else
83
+ fallback_plan = parsed_json["fallbackPlan"].to_json
84
+ fallback_plan = Vapi::FallbackPlan.from_json(json_object: fallback_plan)
85
+ end
86
+ new(
87
+ voice_id: voice_id,
88
+ model: model,
89
+ speed: speed,
90
+ chunk_plan: chunk_plan,
91
+ fallback_plan: fallback_plan,
92
+ additional_properties: struct
93
+ )
94
+ end
95
+
96
+ # Serialize an instance of SmallestAiVoice to a JSON object
97
+ #
98
+ # @return [String]
99
+ def to_json(*_args)
100
+ @_field_set&.to_json
101
+ end
102
+
103
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
104
+ # hash and check each fields type against the current object's property
105
+ # definitions.
106
+ #
107
+ # @param obj [Object]
108
+ # @return [Void]
109
+ def self.validate_raw(obj:)
110
+ Vapi::SmallestAiVoiceId.validate_raw(obj: obj.voice_id)
111
+ obj.model&.is_a?(String) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
112
+ obj.speed&.is_a?(Float) != false || raise("Passed value for field obj.speed is not the expected type, validation failed.")
113
+ obj.chunk_plan.nil? || Vapi::ChunkPlan.validate_raw(obj: obj.chunk_plan)
114
+ obj.fallback_plan.nil? || Vapi::FallbackPlan.validate_raw(obj: obj.fallback_plan)
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Vapi
6
+ # This is the provider-specific ID that will be used.
7
+ class SmallestAiVoiceId
8
+ # Deserialize a JSON object to an instance of SmallestAiVoiceId
9
+ #
10
+ # @param json_object [String]
11
+ # @return [Vapi::SmallestAiVoiceId]
12
+ def self.from_json(json_object:)
13
+ struct = JSON.parse(json_object, object_class: OpenStruct)
14
+ begin
15
+ struct.is_a?(Vapi::SmallestAiVoiceIdEnum) != false || raise("Passed value for field struct is not the expected type, validation failed.")
16
+ return struct unless struct.nil?
17
+
18
+ return nil
19
+ rescue StandardError
20
+ # noop
21
+ end
22
+ begin
23
+ struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
24
+ return struct unless struct.nil?
25
+
26
+ return nil
27
+ rescue StandardError
28
+ # noop
29
+ end
30
+ struct
31
+ end
32
+
33
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
34
+ # hash and check each fields type against the current object's property
35
+ # definitions.
36
+ #
37
+ # @param obj [Object]
38
+ # @return [Void]
39
+ def self.validate_raw(obj:)
40
+ begin
41
+ return obj.is_a?(Vapi::SmallestAiVoiceIdEnum) != false || raise("Passed value for field obj is not the expected type, validation failed.")
42
+ rescue StandardError
43
+ # noop
44
+ end
45
+ begin
46
+ return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
47
+ rescue StandardError
48
+ # noop
49
+ end
50
+ raise("Passed value matched no type within the union, validation failed.")
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ class SmallestAiVoiceIdEnum
5
+ EMILY = "emily"
6
+ JASMINE = "jasmine"
7
+ ARMAN = "arman"
8
+ JAMES = "james"
9
+ MITHALI = "mithali"
10
+ ARAVIND = "aravind"
11
+ RAJ = "raj"
12
+ DIYA = "diya"
13
+ RAMAN = "raman"
14
+ ANANYA = "ananya"
15
+ ISHA = "isha"
16
+ WILLIAM = "william"
17
+ AARAV = "aarav"
18
+ MONIKA = "monika"
19
+ NIHARIKA = "niharika"
20
+ DEEPIKA = "deepika"
21
+ RAGHAV = "raghav"
22
+ KAJAL = "kajal"
23
+ RADHIKA = "radhika"
24
+ MANSI = "mansi"
25
+ NISHA = "nisha"
26
+ SAURABH = "saurabh"
27
+ POOJA = "pooja"
28
+ SAINA = "saina"
29
+ SANYA = "sanya"
30
+ end
31
+ end