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
@@ -23,8 +23,9 @@ module Vapi
23
23
  # @return [String] This is the number of credits the subscription currently has.
24
24
  # Note: This is a string to avoid floating point precision issues.
25
25
  attr_reader :credits
26
- # @return [Float] This is the total concurrency limit for the subscription.
27
- attr_reader :concurrency_limit
26
+ # @return [Float] This is the total number of active calls (concurrency) across all orgs under
27
+ # this subscription.
28
+ attr_reader :concurrency_counter
28
29
  # @return [Float] This is the default concurrency limit for the subscription.
29
30
  attr_reader :concurrency_limit_included
30
31
  # @return [Float] This is the purchased add-on concurrency limit for the subscription.
@@ -54,7 +55,7 @@ module Vapi
54
55
  # @return [String] This is the Stripe fingerprint of the payment method (card). It allows us
55
56
  # to detect users who try to abuse our system through multiple sign-ups.
56
57
  attr_reader :stripe_payment_method_fingerprint
57
- # @return [String] This is the stripe customer's email.
58
+ # @return [String] This is the customer's email on Stripe.
58
59
  attr_reader :stripe_customer_email
59
60
  # @return [String] This is the email of the referrer for the subscription.
60
61
  attr_reader :referred_by_email
@@ -98,7 +99,8 @@ module Vapi
98
99
  # with past due payments.
99
100
  # @param credits [String] This is the number of credits the subscription currently has.
100
101
  # Note: This is a string to avoid floating point precision issues.
101
- # @param concurrency_limit [Float] This is the total concurrency limit for the subscription.
102
+ # @param concurrency_counter [Float] This is the total number of active calls (concurrency) across all orgs under
103
+ # this subscription.
102
104
  # @param concurrency_limit_included [Float] This is the default concurrency limit for the subscription.
103
105
  # @param concurrency_limit_purchased [Float] This is the purchased add-on concurrency limit for the subscription.
104
106
  # @param monthly_charge_schedule_id [Float] This is the ID of the monthly job that charges for subscription add ons and
@@ -117,7 +119,7 @@ module Vapi
117
119
  # @param hipaa_common_paper_agreement_id [String] This is the ID for the Common Paper agreement outlining the HIPAA contract.
118
120
  # @param stripe_payment_method_fingerprint [String] This is the Stripe fingerprint of the payment method (card). It allows us
119
121
  # to detect users who try to abuse our system through multiple sign-ups.
120
- # @param stripe_customer_email [String] This is the stripe customer's email.
122
+ # @param stripe_customer_email [String] This is the customer's email on Stripe.
121
123
  # @param referred_by_email [String] This is the email of the referrer for the subscription.
122
124
  # @param auto_reload_plan [Vapi::AutoReloadPlan] This is the auto reload plan configured for the subscription.
123
125
  # @param minutes_included [Float] The number of minutes included in the subscription. Enterprise only.
@@ -135,7 +137,7 @@ module Vapi
135
137
  # @param coupon_usage_left [String] This is the number of credits left obtained from a coupon.
136
138
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
137
139
  # @return [Vapi::Subscription]
138
- def initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_limit:,
140
+ def initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_counter:,
139
141
  concurrency_limit_included:, concurrency_limit_purchased:, monthly_charge_schedule_id: OMIT, monthly_credit_check_schedule_id: OMIT, stripe_customer_id: OMIT, stripe_payment_method_id: OMIT, slack_support_enabled: OMIT, slack_channel_id: OMIT, hipaa_enabled: OMIT, hipaa_common_paper_agreement_id: OMIT, stripe_payment_method_fingerprint: OMIT, stripe_customer_email: OMIT, referred_by_email: OMIT, auto_reload_plan: OMIT, minutes_included: OMIT, minutes_used: OMIT, minutes_overage_cost: OMIT, providers_included: OMIT, outbound_calls_daily_limit: OMIT, outbound_calls_counter: OMIT, outbound_calls_counter_next_reset_at: OMIT, coupon_ids: OMIT, coupon_usage_left: OMIT, additional_properties: nil)
140
142
  @id = id
141
143
  @created_at = created_at
@@ -143,7 +145,7 @@ module Vapi
143
145
  @type = type
144
146
  @status = status
145
147
  @credits = credits
146
- @concurrency_limit = concurrency_limit
148
+ @concurrency_counter = concurrency_counter
147
149
  @concurrency_limit_included = concurrency_limit_included
148
150
  @concurrency_limit_purchased = concurrency_limit_purchased
149
151
  @monthly_charge_schedule_id = monthly_charge_schedule_id if monthly_charge_schedule_id != OMIT
@@ -179,7 +181,7 @@ module Vapi
179
181
  "type": type,
180
182
  "status": status,
181
183
  "credits": credits,
182
- "concurrencyLimit": concurrency_limit,
184
+ "concurrencyCounter": concurrency_counter,
183
185
  "concurrencyLimitIncluded": concurrency_limit_included,
184
186
  "concurrencyLimitPurchased": concurrency_limit_purchased,
185
187
  "monthlyChargeScheduleId": monthly_charge_schedule_id,
@@ -221,7 +223,7 @@ module Vapi
221
223
  type = parsed_json["type"]
222
224
  status = parsed_json["status"]
223
225
  credits = parsed_json["credits"]
224
- concurrency_limit = parsed_json["concurrencyLimit"]
226
+ concurrency_counter = parsed_json["concurrencyCounter"]
225
227
  concurrency_limit_included = parsed_json["concurrencyLimitIncluded"]
226
228
  concurrency_limit_purchased = parsed_json["concurrencyLimitPurchased"]
227
229
  monthly_charge_schedule_id = parsed_json["monthlyChargeScheduleId"]
@@ -259,7 +261,7 @@ module Vapi
259
261
  type: type,
260
262
  status: status,
261
263
  credits: credits,
262
- concurrency_limit: concurrency_limit,
264
+ concurrency_counter: concurrency_counter,
263
265
  concurrency_limit_included: concurrency_limit_included,
264
266
  concurrency_limit_purchased: concurrency_limit_purchased,
265
267
  monthly_charge_schedule_id: monthly_charge_schedule_id,
@@ -307,7 +309,7 @@ module Vapi
307
309
  obj.type.is_a?(Vapi::SubscriptionType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
308
310
  obj.status.is_a?(Vapi::SubscriptionStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
309
311
  obj.credits.is_a?(String) != false || raise("Passed value for field obj.credits is not the expected type, validation failed.")
310
- obj.concurrency_limit.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit is not the expected type, validation failed.")
312
+ obj.concurrency_counter.is_a?(Float) != false || raise("Passed value for field obj.concurrency_counter is not the expected type, validation failed.")
311
313
  obj.concurrency_limit_included.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_included is not the expected type, validation failed.")
312
314
  obj.concurrency_limit_purchased.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_purchased is not the expected type, validation failed.")
313
315
  obj.monthly_charge_schedule_id&.is_a?(Float) != false || raise("Passed value for field obj.monthly_charge_schedule_id is not the expected type, validation failed.")
@@ -12,6 +12,7 @@ module Vapi
12
12
  OPENAI = "openai"
13
13
  PLAYHT = "playht"
14
14
  RIME_AI = "rime-ai"
15
+ SMALLEST_AI = "smallest-ai"
15
16
  TAVUS = "tavus"
16
17
  end
17
18
  end
@@ -0,0 +1,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "text_editor_tool_with_tool_call_messages_item"
4
+ require_relative "tool_call"
5
+ require_relative "open_ai_function"
6
+ require_relative "server"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module Vapi
11
+ class TextEditorToolWithToolCall
12
+ # @return [Boolean] This determines if the tool is async.
13
+ # If async, the assistant will move forward without waiting for your server to
14
+ # respond. This is useful if you just want to trigger something on your server.
15
+ # If sync, the assistant will wait for your server to respond. This is useful if
16
+ # want assistant to respond with the result from your server.
17
+ # Defaults to synchronous (`false`).
18
+ attr_reader :async
19
+ # @return [Array<Vapi::TextEditorToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
20
+ # For some tools, this is auto-filled based on special fields like
21
+ # `tool.destinations`. For others like the function tool, these can be custom
22
+ # configured.
23
+ attr_reader :messages
24
+ # @return [String] The sub type of tool.
25
+ attr_reader :sub_type
26
+ # @return [Vapi::ToolCall]
27
+ attr_reader :tool_call
28
+ # @return [String] The name of the tool, fixed to 'str_replace_editor'
29
+ attr_reader :name
30
+ # @return [Vapi::OpenAiFunction] This is the function definition of the tool.
31
+ # For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
32
+ # tool-specific fields like `tool.destinations`. But, even in those cases, you can
33
+ # provide a custom function definition for advanced use cases.
34
+ # An example of an advanced use case is if you want to customize the message
35
+ # that's spoken for `endCall` tool. You can specify a function where it returns an
36
+ # argument "reason". Then, in `messages` array, you can have many
37
+ # "request-complete" messages. One of these messages will be triggered if the
38
+ # `messages[].conditions` matches the "reason" argument.
39
+ attr_reader :function
40
+ # @return [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
41
+ # All requests will be sent with the call object among other things. You can find
42
+ # more details in the Server URL documentation.
43
+ # This overrides the serverUrl set on the org and the phoneNumber. Order of
44
+ # precedence: highest tool.server.url, then assistant.serverUrl, then
45
+ # phoneNumber.serverUrl, then org.serverUrl.
46
+ attr_reader :server
47
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
48
+ attr_reader :additional_properties
49
+ # @return [Object]
50
+ attr_reader :_field_set
51
+ protected :_field_set
52
+
53
+ OMIT = Object.new
54
+
55
+ # @param async [Boolean] This determines if the tool is async.
56
+ # If async, the assistant will move forward without waiting for your server to
57
+ # respond. This is useful if you just want to trigger something on your server.
58
+ # If sync, the assistant will wait for your server to respond. This is useful if
59
+ # want assistant to respond with the result from your server.
60
+ # Defaults to synchronous (`false`).
61
+ # @param messages [Array<Vapi::TextEditorToolWithToolCallMessagesItem>] These are the messages that will be spoken to the user as the tool is running.
62
+ # For some tools, this is auto-filled based on special fields like
63
+ # `tool.destinations`. For others like the function tool, these can be custom
64
+ # configured.
65
+ # @param sub_type [String] The sub type of tool.
66
+ # @param tool_call [Vapi::ToolCall]
67
+ # @param name [String] The name of the tool, fixed to 'str_replace_editor'
68
+ # @param function [Vapi::OpenAiFunction] This is the function definition of the tool.
69
+ # For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on
70
+ # tool-specific fields like `tool.destinations`. But, even in those cases, you can
71
+ # provide a custom function definition for advanced use cases.
72
+ # An example of an advanced use case is if you want to customize the message
73
+ # that's spoken for `endCall` tool. You can specify a function where it returns an
74
+ # argument "reason". Then, in `messages` array, you can have many
75
+ # "request-complete" messages. One of these messages will be triggered if the
76
+ # `messages[].conditions` matches the "reason" argument.
77
+ # @param server [Vapi::Server] This is the server that will be hit when this tool is requested by the model.
78
+ # All requests will be sent with the call object among other things. You can find
79
+ # more details in the Server URL documentation.
80
+ # This overrides the serverUrl set on the org and the phoneNumber. Order of
81
+ # precedence: highest tool.server.url, then assistant.serverUrl, then
82
+ # phoneNumber.serverUrl, then org.serverUrl.
83
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
84
+ # @return [Vapi::TextEditorToolWithToolCall]
85
+ def initialize(sub_type:, tool_call:, name:, async: OMIT, messages: OMIT, function: OMIT, server: OMIT,
86
+ additional_properties: nil)
87
+ @async = async if async != OMIT
88
+ @messages = messages if messages != OMIT
89
+ @sub_type = sub_type
90
+ @tool_call = tool_call
91
+ @name = name
92
+ @function = function if function != OMIT
93
+ @server = server if server != OMIT
94
+ @additional_properties = additional_properties
95
+ @_field_set = {
96
+ "async": async,
97
+ "messages": messages,
98
+ "subType": sub_type,
99
+ "toolCall": tool_call,
100
+ "name": name,
101
+ "function": function,
102
+ "server": server
103
+ }.reject do |_k, v|
104
+ v == OMIT
105
+ end
106
+ end
107
+
108
+ # Deserialize a JSON object to an instance of TextEditorToolWithToolCall
109
+ #
110
+ # @param json_object [String]
111
+ # @return [Vapi::TextEditorToolWithToolCall]
112
+ def self.from_json(json_object:)
113
+ struct = JSON.parse(json_object, object_class: OpenStruct)
114
+ parsed_json = JSON.parse(json_object)
115
+ async = parsed_json["async"]
116
+ messages = parsed_json["messages"]&.map do |item|
117
+ item = item.to_json
118
+ Vapi::TextEditorToolWithToolCallMessagesItem.from_json(json_object: item)
119
+ end
120
+ sub_type = parsed_json["subType"]
121
+ if parsed_json["toolCall"].nil?
122
+ tool_call = nil
123
+ else
124
+ tool_call = parsed_json["toolCall"].to_json
125
+ tool_call = Vapi::ToolCall.from_json(json_object: tool_call)
126
+ end
127
+ name = parsed_json["name"]
128
+ if parsed_json["function"].nil?
129
+ function = nil
130
+ else
131
+ function = parsed_json["function"].to_json
132
+ function = Vapi::OpenAiFunction.from_json(json_object: function)
133
+ end
134
+ if parsed_json["server"].nil?
135
+ server = nil
136
+ else
137
+ server = parsed_json["server"].to_json
138
+ server = Vapi::Server.from_json(json_object: server)
139
+ end
140
+ new(
141
+ async: async,
142
+ messages: messages,
143
+ sub_type: sub_type,
144
+ tool_call: tool_call,
145
+ name: name,
146
+ function: function,
147
+ server: server,
148
+ additional_properties: struct
149
+ )
150
+ end
151
+
152
+ # Serialize an instance of TextEditorToolWithToolCall to a JSON object
153
+ #
154
+ # @return [String]
155
+ def to_json(*_args)
156
+ @_field_set&.to_json
157
+ end
158
+
159
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
160
+ # hash and check each fields type against the current object's property
161
+ # definitions.
162
+ #
163
+ # @param obj [Object]
164
+ # @return [Void]
165
+ def self.validate_raw(obj:)
166
+ obj.async&.is_a?(Boolean) != false || raise("Passed value for field obj.async is not the expected type, validation failed.")
167
+ obj.messages&.is_a?(Array) != false || raise("Passed value for field obj.messages is not the expected type, validation failed.")
168
+ obj.sub_type.is_a?(String) != false || raise("Passed value for field obj.sub_type is not the expected type, validation failed.")
169
+ Vapi::ToolCall.validate_raw(obj: obj.tool_call)
170
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
171
+ obj.function.nil? || Vapi::OpenAiFunction.validate_raw(obj: obj.function)
172
+ obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "tool_message_start"
5
+ require_relative "tool_message_complete"
6
+ require_relative "tool_message_failed"
7
+ require_relative "tool_message_delayed"
8
+
9
+ module Vapi
10
+ class TextEditorToolWithToolCallMessagesItem
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::TextEditorToolWithToolCallMessagesItem]
22
+ def initialize(member:, discriminant:)
23
+ @member = member
24
+ @discriminant = discriminant
25
+ end
26
+
27
+ # Deserialize a JSON object to an instance of
28
+ # TextEditorToolWithToolCallMessagesItem
29
+ #
30
+ # @param json_object [String]
31
+ # @return [Vapi::TextEditorToolWithToolCallMessagesItem]
32
+ def self.from_json(json_object:)
33
+ struct = JSON.parse(json_object, object_class: OpenStruct)
34
+ member = case struct.type
35
+ when "request-start"
36
+ Vapi::ToolMessageStart.from_json(json_object: json_object)
37
+ when "request-complete"
38
+ Vapi::ToolMessageComplete.from_json(json_object: json_object)
39
+ when "request-failed"
40
+ Vapi::ToolMessageFailed.from_json(json_object: json_object)
41
+ when "request-response-delayed"
42
+ Vapi::ToolMessageDelayed.from_json(json_object: json_object)
43
+ else
44
+ Vapi::ToolMessageStart.from_json(json_object: json_object)
45
+ end
46
+ new(member: member, discriminant: struct.type)
47
+ end
48
+
49
+ # For Union Types, to_json functionality is delegated to the wrapped member.
50
+ #
51
+ # @return [String]
52
+ def to_json(*_args)
53
+ case @discriminant
54
+ when "request-start"
55
+ { **@member.to_json, type: @discriminant }.to_json
56
+ when "request-complete"
57
+ { **@member.to_json, type: @discriminant }.to_json
58
+ when "request-failed"
59
+ { **@member.to_json, type: @discriminant }.to_json
60
+ when "request-response-delayed"
61
+ { **@member.to_json, type: @discriminant }.to_json
62
+ else
63
+ { "type": @discriminant, value: @member }.to_json
64
+ end
65
+ @member.to_json
66
+ end
67
+
68
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
69
+ # hash and check each fields type against the current object's property
70
+ # definitions.
71
+ #
72
+ # @param obj [Object]
73
+ # @return [Void]
74
+ def self.validate_raw(obj:)
75
+ case obj.type
76
+ when "request-start"
77
+ Vapi::ToolMessageStart.validate_raw(obj: obj)
78
+ when "request-complete"
79
+ Vapi::ToolMessageComplete.validate_raw(obj: obj)
80
+ when "request-failed"
81
+ Vapi::ToolMessageFailed.validate_raw(obj: obj)
82
+ when "request-response-delayed"
83
+ Vapi::ToolMessageDelayed.validate_raw(obj: obj)
84
+ else
85
+ raise("Passed value matched no type within the union, validation failed.")
86
+ end
87
+ end
88
+
89
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
90
+ #
91
+ # @param obj [Object]
92
+ # @return [Boolean]
93
+ def is_a?(obj)
94
+ @member.is_a?(obj)
95
+ end
96
+
97
+ # @param member [Vapi::ToolMessageStart]
98
+ # @return [Vapi::TextEditorToolWithToolCallMessagesItem]
99
+ def self.request_start(member:)
100
+ new(member: member, discriminant: "request-start")
101
+ end
102
+
103
+ # @param member [Vapi::ToolMessageComplete]
104
+ # @return [Vapi::TextEditorToolWithToolCallMessagesItem]
105
+ def self.request_complete(member:)
106
+ new(member: member, discriminant: "request-complete")
107
+ end
108
+
109
+ # @param member [Vapi::ToolMessageFailed]
110
+ # @return [Vapi::TextEditorToolWithToolCallMessagesItem]
111
+ def self.request_failed(member:)
112
+ new(member: member, discriminant: "request-failed")
113
+ end
114
+
115
+ # @param member [Vapi::ToolMessageDelayed]
116
+ # @return [Vapi::TextEditorToolWithToolCallMessagesItem]
117
+ def self.request_response_delayed(member:)
118
+ new(member: member, discriminant: "request-response-delayed")
119
+ end
120
+ end
121
+ end
@@ -32,13 +32,19 @@ module Vapi
32
32
  # @return [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
33
33
  # connecting the customer.
34
34
  # Usage:
35
- # - Used only when `mode` is `warm-transfer-say-message` or
35
+ # - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
36
+ # `warm-transfer-say-message` or
36
37
  # `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
37
38
  attr_reader :message
39
+ # @return [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
40
+ # - 'refer': Uses SIP REFER to transfer the call (default)
41
+ # - 'bye': Ends current call with SIP BYE
42
+ attr_reader :sip_verb
38
43
  # @return [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
39
44
  # destination party.
40
45
  # Usage:
41
- # - Used only when `mode` is `warm-transfer-say-summary` or
46
+ # - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
47
+ # `warm-transfer-say-summary` or
42
48
  # `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
43
49
  attr_reader :summary_plan
44
50
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -72,21 +78,32 @@ module Vapi
72
78
  # @param message [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
73
79
  # connecting the customer.
74
80
  # Usage:
75
- # - Used only when `mode` is `warm-transfer-say-message` or
81
+ # - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
82
+ # `warm-transfer-say-message` or
76
83
  # `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
84
+ # @param sip_verb [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
85
+ # - 'refer': Uses SIP REFER to transfer the call (default)
86
+ # - 'bye': Ends current call with SIP BYE
77
87
  # @param summary_plan [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
78
88
  # destination party.
79
89
  # Usage:
80
- # - Used only when `mode` is `warm-transfer-say-summary` or
90
+ # - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
91
+ # `warm-transfer-say-summary` or
81
92
  # `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
82
93
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
83
94
  # @return [Vapi::TransferPlan]
84
- def initialize(mode:, message: OMIT, summary_plan: OMIT, additional_properties: nil)
95
+ def initialize(mode:, message: OMIT, sip_verb: OMIT, summary_plan: OMIT, additional_properties: nil)
85
96
  @mode = mode
86
97
  @message = message if message != OMIT
98
+ @sip_verb = sip_verb if sip_verb != OMIT
87
99
  @summary_plan = summary_plan if summary_plan != OMIT
88
100
  @additional_properties = additional_properties
89
- @_field_set = { "mode": mode, "message": message, "summaryPlan": summary_plan }.reject do |_k, v|
101
+ @_field_set = {
102
+ "mode": mode,
103
+ "message": message,
104
+ "sipVerb": sip_verb,
105
+ "summaryPlan": summary_plan
106
+ }.reject do |_k, v|
90
107
  v == OMIT
91
108
  end
92
109
  end
@@ -105,6 +122,7 @@ module Vapi
105
122
  message = parsed_json["message"].to_json
106
123
  message = Vapi::TransferPlanMessage.from_json(json_object: message)
107
124
  end
125
+ sip_verb = parsed_json["sipVerb"]
108
126
  if parsed_json["summaryPlan"].nil?
109
127
  summary_plan = nil
110
128
  else
@@ -114,6 +132,7 @@ module Vapi
114
132
  new(
115
133
  mode: mode,
116
134
  message: message,
135
+ sip_verb: sip_verb,
117
136
  summary_plan: summary_plan,
118
137
  additional_properties: struct
119
138
  )
@@ -135,6 +154,7 @@ module Vapi
135
154
  def self.validate_raw(obj:)
136
155
  obj.mode.is_a?(Vapi::TransferPlanMode) != false || raise("Passed value for field obj.mode is not the expected type, validation failed.")
137
156
  obj.message.nil? || Vapi::TransferPlanMessage.validate_raw(obj: obj.message)
157
+ obj.sip_verb&.is_a?(Hash) != false || raise("Passed value for field obj.sip_verb is not the expected type, validation failed.")
138
158
  obj.summary_plan.nil? || Vapi::SummaryPlan.validate_raw(obj: obj.summary_plan)
139
159
  end
140
160
  end
@@ -7,7 +7,8 @@ module Vapi
7
7
  # This is the message the assistant will deliver to the destination party before
8
8
  # connecting the customer.
9
9
  # Usage:
10
- # - Used only when `mode` is `warm-transfer-say-message` or
10
+ # - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
11
+ # `warm-transfer-say-message` or
11
12
  # `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
12
13
  class TransferPlanMessage
13
14
  # Deserialize a JSON object to an instance of TransferPlanMessage
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "trieve_knowledge_base_vector_store_search_plan"
4
- require_relative "trieve_knowledge_base_vector_store_create_plan"
3
+ require_relative "trieve_knowledge_base_search_plan"
4
+ require_relative "trieve_knowledge_base_create_plan"
5
5
  require "ostruct"
6
6
  require "json"
7
7
 
@@ -9,17 +9,15 @@ module Vapi
9
9
  class TrieveKnowledgeBase
10
10
  # @return [String] This is the name of the knowledge base.
11
11
  attr_reader :name
12
- # @return [Vapi::TrieveKnowledgeBaseVectorStoreSearchPlan] This is the plan on how to search the vector store while a call is going on.
13
- attr_reader :vector_store_search_plan
14
- # @return [Vapi::TrieveKnowledgeBaseVectorStoreCreatePlan] This is the plan if you want us to create a new vector store on your behalf. To
15
- # use an existing vector store from your account, use `vectoreStoreProviderId`
16
- attr_reader :vector_store_create_plan
17
- # @return [String] This is an vector store that you already have on your account with the provider.
18
- # To create a new vector store, use vectorStoreCreatePlan.
19
- # Usage:
20
- # - To bring your own vector store from Trieve, go to https://trieve.ai
21
- # - Create a dataset, and use the datasetId here.
22
- attr_reader :vector_store_provider_id
12
+ # @return [Vapi::TrieveKnowledgeBaseSearchPlan] This is the searching plan used when searching for relevant chunks from the
13
+ # vector store.
14
+ # You should configure this if you're running into these issues:
15
+ # - Too much unnecessary context is being fed as knowledge base context.
16
+ # - Not enough relevant context is being fed as knowledge base context.
17
+ attr_reader :search_plan
18
+ # @return [Vapi::TrieveKnowledgeBaseCreatePlan] This is the plan if you want us to create/import a new vector store using
19
+ # Trieve.
20
+ attr_reader :create_plan
23
21
  # @return [String] This is the id of the knowledge base.
24
22
  attr_reader :id
25
23
  # @return [String] This is the org id of the knowledge base.
@@ -33,32 +31,28 @@ module Vapi
33
31
  OMIT = Object.new
34
32
 
35
33
  # @param name [String] This is the name of the knowledge base.
36
- # @param vector_store_search_plan [Vapi::TrieveKnowledgeBaseVectorStoreSearchPlan] This is the plan on how to search the vector store while a call is going on.
37
- # @param vector_store_create_plan [Vapi::TrieveKnowledgeBaseVectorStoreCreatePlan] This is the plan if you want us to create a new vector store on your behalf. To
38
- # use an existing vector store from your account, use `vectoreStoreProviderId`
39
- # @param vector_store_provider_id [String] This is an vector store that you already have on your account with the provider.
40
- # To create a new vector store, use vectorStoreCreatePlan.
41
- # Usage:
42
- # - To bring your own vector store from Trieve, go to https://trieve.ai
43
- # - Create a dataset, and use the datasetId here.
34
+ # @param search_plan [Vapi::TrieveKnowledgeBaseSearchPlan] This is the searching plan used when searching for relevant chunks from the
35
+ # vector store.
36
+ # You should configure this if you're running into these issues:
37
+ # - Too much unnecessary context is being fed as knowledge base context.
38
+ # - Not enough relevant context is being fed as knowledge base context.
39
+ # @param create_plan [Vapi::TrieveKnowledgeBaseCreatePlan] This is the plan if you want us to create/import a new vector store using
40
+ # Trieve.
44
41
  # @param id [String] This is the id of the knowledge base.
45
42
  # @param org_id [String] This is the org id of the knowledge base.
46
43
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
47
44
  # @return [Vapi::TrieveKnowledgeBase]
48
- def initialize(vector_store_search_plan:, id:, org_id:, name: OMIT, vector_store_create_plan: OMIT,
49
- vector_store_provider_id: OMIT, additional_properties: nil)
45
+ def initialize(id:, org_id:, name: OMIT, search_plan: OMIT, create_plan: OMIT, additional_properties: nil)
50
46
  @name = name if name != OMIT
51
- @vector_store_search_plan = vector_store_search_plan
52
- @vector_store_create_plan = vector_store_create_plan if vector_store_create_plan != OMIT
53
- @vector_store_provider_id = vector_store_provider_id if vector_store_provider_id != OMIT
47
+ @search_plan = search_plan if search_plan != OMIT
48
+ @create_plan = create_plan if create_plan != OMIT
54
49
  @id = id
55
50
  @org_id = org_id
56
51
  @additional_properties = additional_properties
57
52
  @_field_set = {
58
53
  "name": name,
59
- "vectorStoreSearchPlan": vector_store_search_plan,
60
- "vectorStoreCreatePlan": vector_store_create_plan,
61
- "vectorStoreProviderId": vector_store_provider_id,
54
+ "searchPlan": search_plan,
55
+ "createPlan": create_plan,
62
56
  "id": id,
63
57
  "orgId": org_id
64
58
  }.reject do |_k, v|
@@ -74,26 +68,24 @@ module Vapi
74
68
  struct = JSON.parse(json_object, object_class: OpenStruct)
75
69
  parsed_json = JSON.parse(json_object)
76
70
  name = parsed_json["name"]
77
- if parsed_json["vectorStoreSearchPlan"].nil?
78
- vector_store_search_plan = nil
71
+ if parsed_json["searchPlan"].nil?
72
+ search_plan = nil
79
73
  else
80
- vector_store_search_plan = parsed_json["vectorStoreSearchPlan"].to_json
81
- vector_store_search_plan = Vapi::TrieveKnowledgeBaseVectorStoreSearchPlan.from_json(json_object: vector_store_search_plan)
74
+ search_plan = parsed_json["searchPlan"].to_json
75
+ search_plan = Vapi::TrieveKnowledgeBaseSearchPlan.from_json(json_object: search_plan)
82
76
  end
83
- if parsed_json["vectorStoreCreatePlan"].nil?
84
- vector_store_create_plan = nil
77
+ if parsed_json["createPlan"].nil?
78
+ create_plan = nil
85
79
  else
86
- vector_store_create_plan = parsed_json["vectorStoreCreatePlan"].to_json
87
- vector_store_create_plan = Vapi::TrieveKnowledgeBaseVectorStoreCreatePlan.from_json(json_object: vector_store_create_plan)
80
+ create_plan = parsed_json["createPlan"].to_json
81
+ create_plan = Vapi::TrieveKnowledgeBaseCreatePlan.from_json(json_object: create_plan)
88
82
  end
89
- vector_store_provider_id = parsed_json["vectorStoreProviderId"]
90
83
  id = parsed_json["id"]
91
84
  org_id = parsed_json["orgId"]
92
85
  new(
93
86
  name: name,
94
- vector_store_search_plan: vector_store_search_plan,
95
- vector_store_create_plan: vector_store_create_plan,
96
- vector_store_provider_id: vector_store_provider_id,
87
+ search_plan: search_plan,
88
+ create_plan: create_plan,
97
89
  id: id,
98
90
  org_id: org_id,
99
91
  additional_properties: struct
@@ -115,9 +107,8 @@ module Vapi
115
107
  # @return [Void]
116
108
  def self.validate_raw(obj:)
117
109
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
118
- Vapi::TrieveKnowledgeBaseVectorStoreSearchPlan.validate_raw(obj: obj.vector_store_search_plan)
119
- obj.vector_store_create_plan.nil? || Vapi::TrieveKnowledgeBaseVectorStoreCreatePlan.validate_raw(obj: obj.vector_store_create_plan)
120
- obj.vector_store_provider_id&.is_a?(String) != false || raise("Passed value for field obj.vector_store_provider_id is not the expected type, validation failed.")
110
+ obj.search_plan.nil? || Vapi::TrieveKnowledgeBaseSearchPlan.validate_raw(obj: obj.search_plan)
111
+ obj.create_plan.nil? || Vapi::TrieveKnowledgeBaseCreatePlan.validate_raw(obj: obj.create_plan)
121
112
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
122
113
  obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
123
114
  end