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
@@ -8,10 +8,7 @@ require_relative "types/blocks_create_request"
8
8
  require_relative "types/blocks_create_response"
9
9
  require_relative "types/blocks_get_response"
10
10
  require_relative "types/blocks_delete_response"
11
- require_relative "types/update_block_dto_messages_item"
12
- require_relative "../types/json_schema"
13
- require_relative "types/update_block_dto_tool"
14
- require_relative "types/update_block_dto_steps_item"
11
+ require_relative "types/blocks_update_request"
15
12
  require_relative "types/blocks_update_response"
16
13
  require "async"
17
14
 
@@ -41,13 +38,6 @@ module Vapi
41
38
  # specified value.
42
39
  # @param request_options [Vapi::RequestOptions]
43
40
  # @return [Array<Vapi::Blocks::BlocksListResponseItem>]
44
- # @example
45
- # api = Vapi::Client.new(
46
- # base_url: "https://api.example.com",
47
- # environment: Vapi::Environment::DEFAULT,
48
- # token: "YOUR_AUTH_TOKEN"
49
- # )
50
- # api.blocks.list
51
41
  def list(limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil,
52
42
  updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil)
53
43
  response = @request_client.conn.get do |req|
@@ -85,13 +75,6 @@ module Vapi
85
75
  # @param request [Vapi::Blocks::BlocksCreateRequest]
86
76
  # @param request_options [Vapi::RequestOptions]
87
77
  # @return [Vapi::Blocks::BlocksCreateResponse]
88
- # @example
89
- # api = Vapi::Client.new(
90
- # base_url: "https://api.example.com",
91
- # environment: Vapi::Environment::DEFAULT,
92
- # token: "YOUR_AUTH_TOKEN"
93
- # )
94
- # api.blocks.create
95
78
  def create(request:, request_options: nil)
96
79
  response = @request_client.conn.post do |req|
97
80
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -113,13 +96,6 @@ module Vapi
113
96
  # @param id [String]
114
97
  # @param request_options [Vapi::RequestOptions]
115
98
  # @return [Vapi::Blocks::BlocksGetResponse]
116
- # @example
117
- # api = Vapi::Client.new(
118
- # base_url: "https://api.example.com",
119
- # environment: Vapi::Environment::DEFAULT,
120
- # token: "YOUR_AUTH_TOKEN"
121
- # )
122
- # api.blocks.get(id: "id")
123
99
  def get(id:, request_options: nil)
124
100
  response = @request_client.conn.get do |req|
125
101
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -143,13 +119,6 @@ module Vapi
143
119
  # @param id [String]
144
120
  # @param request_options [Vapi::RequestOptions]
145
121
  # @return [Vapi::Blocks::BlocksDeleteResponse]
146
- # @example
147
- # api = Vapi::Client.new(
148
- # base_url: "https://api.example.com",
149
- # environment: Vapi::Environment::DEFAULT,
150
- # token: "YOUR_AUTH_TOKEN"
151
- # )
152
- # api.blocks.delete(id: "id")
153
122
  def delete(id:, request_options: nil)
154
123
  response = @request_client.conn.delete do |req|
155
124
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -171,85 +140,10 @@ module Vapi
171
140
  end
172
141
 
173
142
  # @param id [String]
174
- # @param messages [Array<Hash>] These are the pre-configured messages that will be spoken to the user while the
175
- # block is running.Request of type Array<Vapi::Blocks::UpdateBlockDtoMessagesItem>, as a Hash
176
- # @param input_schema [Hash] This is the input schema for the block. This is the input the block needs to
177
- # run. It's given to the block as `steps[0].input`
178
- # These are accessible as variables:
179
- # - ({{input.propertyName}}) in context of the block execution (step)
180
- # - ({{stepName.input.propertyName}}) in context of the workflowRequest of type Vapi::JsonSchema, as a Hash
181
- # * :type (Vapi::JsonSchemaType)
182
- # * :items (Hash{String => Object})
183
- # * :properties (Hash{String => Object})
184
- # * :description (String)
185
- # * :required (Array<String>)
186
- # @param output_schema [Hash] This is the output schema for the block. This is the output the block will
187
- # return to the workflow (`{{stepName.output}}`).
188
- # These are accessible as variables:
189
- # - ({{output.propertyName}}) in context of the block execution (step)
190
- # - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)
191
- # - ({{blockName.output.propertyName}}) in context of the workflow (read caveat
192
- # #2)
193
- # Caveats:
194
- # 1. a workflow can execute a step multiple times. example, if a loop is used in
195
- # the graph. {{stepName.output.propertyName}} will reference the latest usage of
196
- # the step.
197
- # 2. a workflow can execute a block multiple times. example, if a step is called
198
- # multiple times or if a block is used in multiple steps.
199
- # {{blockName.output.propertyName}} will reference the latest usage of the block.
200
- # this liquid variable is just provided for convenience when creating blocks
201
- # outside of a workflow with steps.Request of type Vapi::JsonSchema, as a Hash
202
- # * :type (Vapi::JsonSchemaType)
203
- # * :items (Hash{String => Object})
204
- # * :properties (Hash{String => Object})
205
- # * :description (String)
206
- # * :required (Array<String>)
207
- # @param tool [Vapi::Blocks::UpdateBlockDtoTool] This is the tool that the block will call. To use an existing tool, use
208
- # `toolId`.
209
- # @param steps [Array<Hash>] These are the steps in the workflow.Request of type Array<Vapi::Blocks::UpdateBlockDtoStepsItem>, as a Hash
210
- # @param name [String] This is the name of the block. This is just for your reference.
211
- # @param instruction [String] This is the instruction to the model.
212
- # You can reference any variable in the context of the current block execution
213
- # (step):
214
- # - "{{input.your-property-name}}" for the current step's input
215
- # - "{{your-step-name.output.your-property-name}}" for another step's output (in
216
- # the same workflow; read caveat #1)
217
- # - "{{your-step-name.input.your-property-name}}" for another step's input (in the
218
- # same workflow; read caveat #1)
219
- # - "{{your-block-name.output.your-property-name}}" for another block's output (in
220
- # the same workflow; read caveat #2)
221
- # - "{{your-block-name.input.your-property-name}}" for another block's input (in
222
- # the same workflow; read caveat #2)
223
- # - "{{workflow.input.your-property-name}}" for the current workflow's input
224
- # - "{{global.your-property-name}}" for the global context
225
- # This can be as simple or as complex as you want it to be.
226
- # - "say hello and ask the user about their day!"
227
- # - "collect the user's first and last name"
228
- # - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}.
229
- # ask them about their salary and if they might be interested in buying a house.
230
- # we offer {{input.offer}}"
231
- # Caveats:
232
- # 1. a workflow can execute a step multiple times. example, if a loop is used in
233
- # the graph. {{stepName.output/input.propertyName}} will reference the latest
234
- # usage of the step.
235
- # 2. a workflow can execute a block multiple times. example, if a step is called
236
- # multiple times or if a block is used in multiple steps.
237
- # {{blockName.output/input.propertyName}} will reference the latest usage of the
238
- # block. this liquid variable is just provided for convenience when creating
239
- # blocks outside of a workflow with steps.
240
- # @param tool_id [String] This is the id of the tool that the block will call. To use a transient tool,
241
- # use `tool`.
143
+ # @param request [Vapi::Blocks::BlocksUpdateRequest]
242
144
  # @param request_options [Vapi::RequestOptions]
243
145
  # @return [Vapi::Blocks::BlocksUpdateResponse]
244
- # @example
245
- # api = Vapi::Client.new(
246
- # base_url: "https://api.example.com",
247
- # environment: Vapi::Environment::DEFAULT,
248
- # token: "YOUR_AUTH_TOKEN"
249
- # )
250
- # api.blocks.update(id: "id")
251
- def update(id:, messages: nil, input_schema: nil, output_schema: nil, tool: nil, steps: nil, name: nil,
252
- instruction: nil, tool_id: nil, request_options: nil)
146
+ def update(id:, request:, request_options: nil)
253
147
  response = @request_client.conn.patch do |req|
254
148
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
255
149
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -261,17 +155,7 @@ module Vapi
261
155
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
262
156
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
263
157
  end
264
- req.body = {
265
- **(request_options&.additional_body_parameters || {}),
266
- messages: messages,
267
- inputSchema: input_schema,
268
- outputSchema: output_schema,
269
- tool: tool,
270
- steps: steps,
271
- name: name,
272
- instruction: instruction,
273
- toolId: tool_id
274
- }.compact
158
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
275
159
  req.url "#{@request_client.get_url(request_options: request_options)}/block/#{id}"
276
160
  end
277
161
  Vapi::Blocks::BlocksUpdateResponse.from_json(json_object: response.body)
@@ -303,13 +187,6 @@ module Vapi
303
187
  # specified value.
304
188
  # @param request_options [Vapi::RequestOptions]
305
189
  # @return [Array<Vapi::Blocks::BlocksListResponseItem>]
306
- # @example
307
- # api = Vapi::Client.new(
308
- # base_url: "https://api.example.com",
309
- # environment: Vapi::Environment::DEFAULT,
310
- # token: "YOUR_AUTH_TOKEN"
311
- # )
312
- # api.blocks.list
313
190
  def list(limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil,
314
191
  updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil)
315
192
  Async do
@@ -349,13 +226,6 @@ module Vapi
349
226
  # @param request [Vapi::Blocks::BlocksCreateRequest]
350
227
  # @param request_options [Vapi::RequestOptions]
351
228
  # @return [Vapi::Blocks::BlocksCreateResponse]
352
- # @example
353
- # api = Vapi::Client.new(
354
- # base_url: "https://api.example.com",
355
- # environment: Vapi::Environment::DEFAULT,
356
- # token: "YOUR_AUTH_TOKEN"
357
- # )
358
- # api.blocks.create
359
229
  def create(request:, request_options: nil)
360
230
  Async do
361
231
  response = @request_client.conn.post do |req|
@@ -379,13 +249,6 @@ module Vapi
379
249
  # @param id [String]
380
250
  # @param request_options [Vapi::RequestOptions]
381
251
  # @return [Vapi::Blocks::BlocksGetResponse]
382
- # @example
383
- # api = Vapi::Client.new(
384
- # base_url: "https://api.example.com",
385
- # environment: Vapi::Environment::DEFAULT,
386
- # token: "YOUR_AUTH_TOKEN"
387
- # )
388
- # api.blocks.get(id: "id")
389
252
  def get(id:, request_options: nil)
390
253
  Async do
391
254
  response = @request_client.conn.get do |req|
@@ -411,13 +274,6 @@ module Vapi
411
274
  # @param id [String]
412
275
  # @param request_options [Vapi::RequestOptions]
413
276
  # @return [Vapi::Blocks::BlocksDeleteResponse]
414
- # @example
415
- # api = Vapi::Client.new(
416
- # base_url: "https://api.example.com",
417
- # environment: Vapi::Environment::DEFAULT,
418
- # token: "YOUR_AUTH_TOKEN"
419
- # )
420
- # api.blocks.delete(id: "id")
421
277
  def delete(id:, request_options: nil)
422
278
  Async do
423
279
  response = @request_client.conn.delete do |req|
@@ -441,85 +297,10 @@ module Vapi
441
297
  end
442
298
 
443
299
  # @param id [String]
444
- # @param messages [Array<Hash>] These are the pre-configured messages that will be spoken to the user while the
445
- # block is running.Request of type Array<Vapi::Blocks::UpdateBlockDtoMessagesItem>, as a Hash
446
- # @param input_schema [Hash] This is the input schema for the block. This is the input the block needs to
447
- # run. It's given to the block as `steps[0].input`
448
- # These are accessible as variables:
449
- # - ({{input.propertyName}}) in context of the block execution (step)
450
- # - ({{stepName.input.propertyName}}) in context of the workflowRequest of type Vapi::JsonSchema, as a Hash
451
- # * :type (Vapi::JsonSchemaType)
452
- # * :items (Hash{String => Object})
453
- # * :properties (Hash{String => Object})
454
- # * :description (String)
455
- # * :required (Array<String>)
456
- # @param output_schema [Hash] This is the output schema for the block. This is the output the block will
457
- # return to the workflow (`{{stepName.output}}`).
458
- # These are accessible as variables:
459
- # - ({{output.propertyName}}) in context of the block execution (step)
460
- # - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)
461
- # - ({{blockName.output.propertyName}}) in context of the workflow (read caveat
462
- # #2)
463
- # Caveats:
464
- # 1. a workflow can execute a step multiple times. example, if a loop is used in
465
- # the graph. {{stepName.output.propertyName}} will reference the latest usage of
466
- # the step.
467
- # 2. a workflow can execute a block multiple times. example, if a step is called
468
- # multiple times or if a block is used in multiple steps.
469
- # {{blockName.output.propertyName}} will reference the latest usage of the block.
470
- # this liquid variable is just provided for convenience when creating blocks
471
- # outside of a workflow with steps.Request of type Vapi::JsonSchema, as a Hash
472
- # * :type (Vapi::JsonSchemaType)
473
- # * :items (Hash{String => Object})
474
- # * :properties (Hash{String => Object})
475
- # * :description (String)
476
- # * :required (Array<String>)
477
- # @param tool [Vapi::Blocks::UpdateBlockDtoTool] This is the tool that the block will call. To use an existing tool, use
478
- # `toolId`.
479
- # @param steps [Array<Hash>] These are the steps in the workflow.Request of type Array<Vapi::Blocks::UpdateBlockDtoStepsItem>, as a Hash
480
- # @param name [String] This is the name of the block. This is just for your reference.
481
- # @param instruction [String] This is the instruction to the model.
482
- # You can reference any variable in the context of the current block execution
483
- # (step):
484
- # - "{{input.your-property-name}}" for the current step's input
485
- # - "{{your-step-name.output.your-property-name}}" for another step's output (in
486
- # the same workflow; read caveat #1)
487
- # - "{{your-step-name.input.your-property-name}}" for another step's input (in the
488
- # same workflow; read caveat #1)
489
- # - "{{your-block-name.output.your-property-name}}" for another block's output (in
490
- # the same workflow; read caveat #2)
491
- # - "{{your-block-name.input.your-property-name}}" for another block's input (in
492
- # the same workflow; read caveat #2)
493
- # - "{{workflow.input.your-property-name}}" for the current workflow's input
494
- # - "{{global.your-property-name}}" for the global context
495
- # This can be as simple or as complex as you want it to be.
496
- # - "say hello and ask the user about their day!"
497
- # - "collect the user's first and last name"
498
- # - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}.
499
- # ask them about their salary and if they might be interested in buying a house.
500
- # we offer {{input.offer}}"
501
- # Caveats:
502
- # 1. a workflow can execute a step multiple times. example, if a loop is used in
503
- # the graph. {{stepName.output/input.propertyName}} will reference the latest
504
- # usage of the step.
505
- # 2. a workflow can execute a block multiple times. example, if a step is called
506
- # multiple times or if a block is used in multiple steps.
507
- # {{blockName.output/input.propertyName}} will reference the latest usage of the
508
- # block. this liquid variable is just provided for convenience when creating
509
- # blocks outside of a workflow with steps.
510
- # @param tool_id [String] This is the id of the tool that the block will call. To use a transient tool,
511
- # use `tool`.
300
+ # @param request [Vapi::Blocks::BlocksUpdateRequest]
512
301
  # @param request_options [Vapi::RequestOptions]
513
302
  # @return [Vapi::Blocks::BlocksUpdateResponse]
514
- # @example
515
- # api = Vapi::Client.new(
516
- # base_url: "https://api.example.com",
517
- # environment: Vapi::Environment::DEFAULT,
518
- # token: "YOUR_AUTH_TOKEN"
519
- # )
520
- # api.blocks.update(id: "id")
521
- def update(id:, messages: nil, input_schema: nil, output_schema: nil, tool: nil, steps: nil, name: nil,
522
- instruction: nil, tool_id: nil, request_options: nil)
303
+ def update(id:, request:, request_options: nil)
523
304
  Async do
524
305
  response = @request_client.conn.patch do |req|
525
306
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -532,17 +313,7 @@ module Vapi
532
313
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
533
314
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
534
315
  end
535
- req.body = {
536
- **(request_options&.additional_body_parameters || {}),
537
- messages: messages,
538
- inputSchema: input_schema,
539
- outputSchema: output_schema,
540
- tool: tool,
541
- steps: steps,
542
- name: name,
543
- instruction: instruction,
544
- toolId: tool_id
545
- }.compact
316
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
546
317
  req.url "#{@request_client.get_url(request_options: request_options)}/block/#{id}"
547
318
  end
548
319
  Vapi::Blocks::BlocksUpdateResponse.from_json(json_object: response.body)
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "../../types/update_conversation_block_dto"
5
+ require_relative "../../types/update_tool_call_block_dto"
6
+ require_relative "../../types/update_workflow_block_dto"
7
+
8
+ module Vapi
9
+ class Blocks
10
+ class BlocksUpdateRequest
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::Blocks::BlocksUpdateRequest]
22
+ def initialize(member:, discriminant:)
23
+ @member = member
24
+ @discriminant = discriminant
25
+ end
26
+
27
+ # Deserialize a JSON object to an instance of BlocksUpdateRequest
28
+ #
29
+ # @param json_object [String]
30
+ # @return [Vapi::Blocks::BlocksUpdateRequest]
31
+ def self.from_json(json_object:)
32
+ struct = JSON.parse(json_object, object_class: OpenStruct)
33
+ member = case struct.type
34
+ when "conversation"
35
+ Vapi::UpdateConversationBlockDto.from_json(json_object: json_object)
36
+ when "tool-call"
37
+ Vapi::UpdateToolCallBlockDto.from_json(json_object: json_object)
38
+ when "workflow"
39
+ Vapi::UpdateWorkflowBlockDto.from_json(json_object: json_object)
40
+ else
41
+ Vapi::UpdateConversationBlockDto.from_json(json_object: json_object)
42
+ end
43
+ new(member: member, discriminant: struct.type)
44
+ end
45
+
46
+ # For Union Types, to_json functionality is delegated to the wrapped member.
47
+ #
48
+ # @return [String]
49
+ def to_json(*_args)
50
+ case @discriminant
51
+ when "conversation"
52
+ { **@member.to_json, type: @discriminant }.to_json
53
+ when "tool-call"
54
+ { **@member.to_json, type: @discriminant }.to_json
55
+ when "workflow"
56
+ { **@member.to_json, type: @discriminant }.to_json
57
+ else
58
+ { "type": @discriminant, value: @member }.to_json
59
+ end
60
+ @member.to_json
61
+ end
62
+
63
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
64
+ # hash and check each fields type against the current object's property
65
+ # definitions.
66
+ #
67
+ # @param obj [Object]
68
+ # @return [Void]
69
+ def self.validate_raw(obj:)
70
+ case obj.type
71
+ when "conversation"
72
+ Vapi::UpdateConversationBlockDto.validate_raw(obj: obj)
73
+ when "tool-call"
74
+ Vapi::UpdateToolCallBlockDto.validate_raw(obj: obj)
75
+ when "workflow"
76
+ Vapi::UpdateWorkflowBlockDto.validate_raw(obj: obj)
77
+ else
78
+ raise("Passed value matched no type within the union, validation failed.")
79
+ end
80
+ end
81
+
82
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
83
+ #
84
+ # @param obj [Object]
85
+ # @return [Boolean]
86
+ def is_a?(obj)
87
+ @member.is_a?(obj)
88
+ end
89
+
90
+ # @param member [Vapi::UpdateConversationBlockDto]
91
+ # @return [Vapi::Blocks::BlocksUpdateRequest]
92
+ def self.conversation(member:)
93
+ new(member: member, discriminant: "conversation")
94
+ end
95
+
96
+ # @param member [Vapi::UpdateToolCallBlockDto]
97
+ # @return [Vapi::Blocks::BlocksUpdateRequest]
98
+ def self.tool_call(member:)
99
+ new(member: member, discriminant: "tool-call")
100
+ end
101
+
102
+ # @param member [Vapi::UpdateWorkflowBlockDto]
103
+ # @return [Vapi::Blocks::BlocksUpdateRequest]
104
+ def self.workflow(member:)
105
+ new(member: member, discriminant: "workflow")
106
+ end
107
+ end
108
+ end
109
+ end