vapi_server_sdk 0.1.0 → 0.2.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 (356) hide show
  1. checksums.yaml +4 -4
  2. data/lib/requests.rb +2 -2
  3. data/lib/types_export.rb +184 -26
  4. data/lib/vapi_server_sdk/analytics/client.rb +14 -43
  5. data/lib/vapi_server_sdk/assistants/client.rb +57 -60
  6. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_client_messages_item.rb +1 -0
  7. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +39 -0
  8. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_server_messages_item.rb +1 -0
  9. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +27 -1
  10. data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +26 -0
  11. data/lib/vapi_server_sdk/calls/client.rb +58 -28
  12. data/lib/vapi_server_sdk/knowledge_bases/client.rb +394 -0
  13. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_request.rb +96 -0
  14. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_create_response.rb +96 -0
  15. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_delete_response.rb +96 -0
  16. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_get_response.rb +96 -0
  17. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_list_response_item.rb +96 -0
  18. data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_response.rb +96 -0
  19. data/lib/vapi_server_sdk/logs/client.rb +10 -6
  20. data/lib/vapi_server_sdk/squads/client.rb +56 -32
  21. data/lib/vapi_server_sdk/tools/client.rb +4 -0
  22. data/lib/vapi_server_sdk/tools/types/tools_create_request.rb +39 -0
  23. data/lib/vapi_server_sdk/tools/types/tools_create_response.rb +39 -0
  24. data/lib/vapi_server_sdk/tools/types/tools_delete_response.rb +39 -0
  25. data/lib/vapi_server_sdk/tools/types/tools_get_response.rb +39 -0
  26. data/lib/vapi_server_sdk/tools/types/tools_list_response_item.rb +39 -0
  27. data/lib/vapi_server_sdk/tools/types/tools_update_response.rb +39 -0
  28. data/lib/vapi_server_sdk/types/analytics_query_dto.rb +59 -0
  29. data/lib/vapi_server_sdk/types/anthropic_credential.rb +13 -3
  30. data/lib/vapi_server_sdk/types/anthropic_model.rb +21 -13
  31. data/lib/vapi_server_sdk/types/anthropic_model_model.rb +2 -0
  32. data/lib/vapi_server_sdk/types/anyscale_credential.rb +13 -3
  33. data/lib/vapi_server_sdk/types/anyscale_model.rb +21 -13
  34. data/lib/vapi_server_sdk/types/assembly_ai_credential.rb +111 -0
  35. data/lib/vapi_server_sdk/types/assembly_ai_transcriber.rb +97 -0
  36. data/lib/vapi_server_sdk/types/assistant.rb +42 -64
  37. data/lib/vapi_server_sdk/types/assistant_client_messages_item.rb +1 -0
  38. data/lib/vapi_server_sdk/types/assistant_custom_endpointing_rule.rb +100 -0
  39. data/lib/vapi_server_sdk/types/assistant_model.rb +39 -0
  40. data/lib/vapi_server_sdk/types/assistant_overrides.rb +57 -65
  41. data/lib/vapi_server_sdk/types/assistant_overrides_client_messages_item.rb +1 -0
  42. data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +39 -0
  43. data/lib/vapi_server_sdk/types/assistant_overrides_server_messages_item.rb +1 -0
  44. data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +27 -1
  45. data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +26 -0
  46. data/lib/vapi_server_sdk/types/assistant_server_messages_item.rb +1 -0
  47. data/lib/vapi_server_sdk/types/assistant_transcriber.rb +27 -1
  48. data/lib/vapi_server_sdk/types/assistant_voice.rb +26 -0
  49. data/lib/vapi_server_sdk/types/auto_reload_plan.rb +65 -0
  50. data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +65 -0
  51. data/lib/vapi_server_sdk/types/azure_credential.rb +129 -0
  52. data/lib/vapi_server_sdk/types/azure_credential_region.rb +23 -0
  53. data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +12 -2
  54. data/lib/vapi_server_sdk/types/azure_open_ai_credential_models_item.rb +1 -0
  55. data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +1 -0
  56. data/lib/vapi_server_sdk/types/azure_voice.rb +25 -21
  57. data/lib/vapi_server_sdk/types/bash_tool.rb +194 -0
  58. data/lib/vapi_server_sdk/types/bash_tool_messages_item.rb +120 -0
  59. data/lib/vapi_server_sdk/types/block_complete_message.rb +29 -4
  60. data/lib/vapi_server_sdk/types/block_start_message.rb +29 -4
  61. data/lib/vapi_server_sdk/types/both_custom_endpointing_rule.rb +126 -0
  62. data/lib/vapi_server_sdk/types/byo_sip_trunk_credential.rb +29 -9
  63. data/lib/vapi_server_sdk/types/call.rb +15 -1
  64. data/lib/vapi_server_sdk/types/call_ended_reason.rb +49 -24
  65. data/lib/vapi_server_sdk/types/call_log_privileged.rb +88 -0
  66. data/lib/vapi_server_sdk/types/call_log_privileged_level.rb +12 -0
  67. data/lib/vapi_server_sdk/types/call_logs_paginated_response.rb +75 -0
  68. data/lib/vapi_server_sdk/types/cartesia_credential.rb +13 -3
  69. data/lib/vapi_server_sdk/types/cartesia_voice.rb +25 -21
  70. data/lib/vapi_server_sdk/types/cartesia_voice_language.rb +9 -1
  71. data/lib/vapi_server_sdk/types/client_inbound_message_add_message.rb +25 -3
  72. data/lib/vapi_server_sdk/types/client_inbound_message_message.rb +13 -0
  73. data/lib/vapi_server_sdk/types/client_inbound_message_transfer.rb +63 -0
  74. data/lib/vapi_server_sdk/types/client_inbound_message_transfer_destination.rb +96 -0
  75. data/lib/vapi_server_sdk/types/{client_message_language_changed.rb → client_message_language_change_detected.rb} +5 -5
  76. data/lib/vapi_server_sdk/types/client_message_message.rb +22 -9
  77. data/lib/vapi_server_sdk/types/client_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
  78. data/lib/vapi_server_sdk/types/client_message_transfer_update.rb +116 -0
  79. data/lib/vapi_server_sdk/types/client_message_transfer_update_destination.rb +122 -0
  80. data/lib/vapi_server_sdk/types/computer_tool.rb +218 -0
  81. data/lib/vapi_server_sdk/types/computer_tool_messages_item.rb +120 -0
  82. data/lib/vapi_server_sdk/types/condition.rb +9 -9
  83. data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +11 -2
  84. data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +11 -2
  85. data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +74 -0
  86. data/lib/vapi_server_sdk/types/create_assistant_dto.rb +43 -65
  87. data/lib/vapi_server_sdk/types/create_assistant_dto_client_messages_item.rb +1 -0
  88. data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +39 -0
  89. data/lib/vapi_server_sdk/types/create_assistant_dto_server_messages_item.rb +1 -0
  90. data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +27 -1
  91. data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +26 -0
  92. data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +95 -0
  93. data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +23 -0
  94. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +13 -3
  95. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_models_item.rb +1 -0
  96. data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +1 -0
  97. data/lib/vapi_server_sdk/types/create_bash_tool_dto.rb +161 -0
  98. data/lib/vapi_server_sdk/types/create_bash_tool_dto_messages_item.rb +120 -0
  99. data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +31 -11
  100. data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +11 -2
  101. data/lib/vapi_server_sdk/types/create_computer_tool_dto.rb +185 -0
  102. data/lib/vapi_server_sdk/types/create_computer_tool_dto_messages_item.rb +120 -0
  103. data/lib/vapi_server_sdk/types/create_custom_knowledge_base_dto.rb +137 -0
  104. data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +31 -2
  105. data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +11 -2
  106. data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +9 -2
  107. data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +11 -2
  108. data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +10 -10
  109. data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +11 -2
  110. data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +11 -2
  111. data/lib/vapi_server_sdk/types/create_google_credential_dto.rb +76 -0
  112. data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +11 -2
  113. data/lib/vapi_server_sdk/types/create_inflection_ai_credential_dto.rb +76 -0
  114. data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +96 -0
  115. data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +11 -2
  116. data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +17 -2
  117. data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +11 -2
  118. data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +11 -2
  119. data/lib/vapi_server_sdk/types/create_org_dto.rb +21 -2
  120. data/lib/vapi_server_sdk/types/create_org_dto_channel.rb +10 -0
  121. data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +11 -2
  122. data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +11 -2
  123. data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +11 -2
  124. data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +11 -2
  125. data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +13 -3
  126. data/lib/vapi_server_sdk/types/{knowledge_base.rb → create_tavus_credential_dto.rb} +21 -21
  127. data/lib/vapi_server_sdk/types/create_text_editor_tool_dto.rb +161 -0
  128. data/lib/vapi_server_sdk/types/create_text_editor_tool_dto_messages_item.rb +120 -0
  129. data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +11 -2
  130. data/lib/vapi_server_sdk/types/create_trieve_knowledge_base_dto.rb +109 -0
  131. data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +16 -2
  132. data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +20 -2
  133. data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +16 -2
  134. data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +84 -0
  135. data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +76 -0
  136. data/lib/vapi_server_sdk/types/credits_buy_dto.rb +55 -0
  137. data/lib/vapi_server_sdk/types/custom_knowledge_base.rb +154 -0
  138. data/lib/vapi_server_sdk/types/custom_llm_credential.rb +46 -3
  139. data/lib/vapi_server_sdk/types/custom_llm_model.rb +23 -15
  140. data/lib/vapi_server_sdk/types/custom_message.rb +92 -0
  141. data/lib/vapi_server_sdk/types/custom_transcriber.rb +125 -0
  142. data/lib/vapi_server_sdk/types/custom_voice.rb +132 -0
  143. data/lib/vapi_server_sdk/types/customer_custom_endpointing_rule.rb +100 -0
  144. data/lib/vapi_server_sdk/types/deep_infra_credential.rb +13 -3
  145. data/lib/vapi_server_sdk/types/deep_infra_model.rb +21 -13
  146. data/lib/vapi_server_sdk/types/deepgram_credential.rb +9 -1
  147. data/lib/vapi_server_sdk/types/deepgram_transcriber.rb +69 -11
  148. data/lib/vapi_server_sdk/types/deepgram_voice.rb +17 -17
  149. data/lib/vapi_server_sdk/types/eleven_labs_credential.rb +13 -3
  150. data/lib/vapi_server_sdk/types/eleven_labs_voice.rb +28 -24
  151. data/lib/vapi_server_sdk/types/fallback_azure_voice.rb +100 -0
  152. data/lib/vapi_server_sdk/types/fallback_azure_voice_id.rb +53 -0
  153. data/lib/vapi_server_sdk/types/fallback_azure_voice_voice_id.rb +9 -0
  154. data/lib/vapi_server_sdk/types/fallback_cartesia_voice.rb +100 -0
  155. data/lib/vapi_server_sdk/types/fallback_cartesia_voice_language.rb +23 -0
  156. data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +10 -0
  157. data/lib/vapi_server_sdk/types/fallback_custom_voice.rb +117 -0
  158. data/lib/vapi_server_sdk/types/fallback_deepgram_voice.rb +81 -0
  159. data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id.rb +53 -0
  160. data/lib/vapi_server_sdk/types/fallback_deepgram_voice_id_enum.rb +18 -0
  161. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice.rb +164 -0
  162. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id.rb +54 -0
  163. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_id_enum.rb +21 -0
  164. data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +12 -0
  165. data/lib/vapi_server_sdk/types/fallback_lmnt_voice.rb +88 -0
  166. data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id.rb +53 -0
  167. data/lib/vapi_server_sdk/types/fallback_lmnt_voice_id_enum.rb +8 -0
  168. data/lib/vapi_server_sdk/types/fallback_neets_voice.rb +81 -0
  169. data/lib/vapi_server_sdk/types/fallback_neets_voice_id.rb +53 -0
  170. data/lib/vapi_server_sdk/types/fallback_neets_voice_id_enum.rb +7 -0
  171. data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +87 -0
  172. data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +20 -0
  173. data/lib/vapi_server_sdk/types/fallback_plan.rb +61 -0
  174. data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +211 -0
  175. data/lib/vapi_server_sdk/types/fallback_play_ht_voice.rb +172 -0
  176. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_emotion.rb +19 -0
  177. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id.rb +53 -0
  178. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_id_enum.rb +16 -0
  179. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_language.rb +44 -0
  180. data/lib/vapi_server_sdk/types/fallback_play_ht_voice_model.rb +10 -0
  181. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice.rb +96 -0
  182. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id.rb +53 -0
  183. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_id_enum.rb +87 -0
  184. data/lib/vapi_server_sdk/types/fallback_rime_ai_voice_model.rb +9 -0
  185. data/lib/vapi_server_sdk/types/fallback_tavus_voice.rb +147 -0
  186. data/lib/vapi_server_sdk/types/fallback_tavus_voice_voice_id.rb +53 -0
  187. data/lib/vapi_server_sdk/types/format_plan.rb +0 -2
  188. data/lib/vapi_server_sdk/types/function_tool_with_tool_call.rb +10 -1
  189. data/lib/vapi_server_sdk/types/gcp_credential.rb +2 -2
  190. data/lib/vapi_server_sdk/types/ghl_tool_with_tool_call.rb +9 -1
  191. data/lib/vapi_server_sdk/types/gladia_credential.rb +13 -3
  192. data/lib/vapi_server_sdk/types/go_high_level_credential.rb +13 -3
  193. data/lib/vapi_server_sdk/types/google_credential.rb +113 -0
  194. data/lib/vapi_server_sdk/types/google_model.rb +178 -0
  195. data/lib/vapi_server_sdk/types/google_model_model.rb +12 -0
  196. data/lib/vapi_server_sdk/types/google_model_tools_item.rb +159 -0
  197. data/lib/vapi_server_sdk/types/groq_credential.rb +13 -3
  198. data/lib/vapi_server_sdk/types/groq_model.rb +21 -13
  199. data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +65 -0
  200. data/lib/vapi_server_sdk/types/inflection_ai_credential.rb +113 -0
  201. data/lib/vapi_server_sdk/types/inflection_ai_model.rb +177 -0
  202. data/lib/vapi_server_sdk/types/inflection_ai_model_tools_item.rb +159 -0
  203. data/lib/vapi_server_sdk/types/invite_user_dto.rb +9 -9
  204. data/lib/vapi_server_sdk/types/knowledge_base_response_document.rb +74 -0
  205. data/lib/vapi_server_sdk/types/langfuse_credential.rb +130 -0
  206. data/lib/vapi_server_sdk/types/lmnt_credential.rb +13 -3
  207. data/lib/vapi_server_sdk/types/lmnt_voice.rb +18 -14
  208. data/lib/vapi_server_sdk/types/log.rb +12 -4
  209. data/lib/vapi_server_sdk/types/log_resource.rb +8 -0
  210. data/lib/vapi_server_sdk/types/make_credential.rb +13 -3
  211. data/lib/vapi_server_sdk/types/make_tool_with_tool_call.rb +9 -1
  212. data/lib/vapi_server_sdk/types/neets_voice.rb +17 -17
  213. data/lib/vapi_server_sdk/types/o_auth_2_authentication_plan.rb +79 -0
  214. data/lib/vapi_server_sdk/types/oauth_2_authentication_session.rb +68 -0
  215. data/lib/vapi_server_sdk/types/open_ai_credential.rb +13 -3
  216. data/lib/vapi_server_sdk/types/open_ai_function.rb +30 -4
  217. data/lib/vapi_server_sdk/types/open_ai_model.rb +23 -15
  218. data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +2 -0
  219. data/lib/vapi_server_sdk/types/open_ai_model_model.rb +2 -0
  220. data/lib/vapi_server_sdk/types/open_ai_voice.rb +22 -14
  221. data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +7 -0
  222. data/lib/vapi_server_sdk/types/open_router_credential.rb +13 -3
  223. data/lib/vapi_server_sdk/types/open_router_model.rb +21 -13
  224. data/lib/vapi_server_sdk/types/org.rb +35 -2
  225. data/lib/vapi_server_sdk/types/org_channel.rb +10 -0
  226. data/lib/vapi_server_sdk/types/org_with_org_user.rb +262 -0
  227. data/lib/vapi_server_sdk/types/org_with_org_user_channel.rb +10 -0
  228. data/lib/vapi_server_sdk/types/org_with_org_user_role.rb +9 -0
  229. data/lib/vapi_server_sdk/types/payment.rb +167 -0
  230. data/lib/vapi_server_sdk/types/payment_retry_dto.rb +55 -0
  231. data/lib/vapi_server_sdk/types/payment_status.rb +11 -0
  232. data/lib/vapi_server_sdk/types/payments_paginated_response.rb +75 -0
  233. data/lib/vapi_server_sdk/types/perplexity_ai_credential.rb +13 -3
  234. data/lib/vapi_server_sdk/types/perplexity_ai_model.rb +21 -13
  235. data/lib/vapi_server_sdk/types/phone_number_paginated_response.rb +75 -0
  236. data/lib/vapi_server_sdk/types/phone_number_paginated_response_results_item.rb +121 -0
  237. data/lib/vapi_server_sdk/types/play_ht_credential.rb +13 -2
  238. data/lib/vapi_server_sdk/types/play_ht_voice.rb +37 -15
  239. data/lib/vapi_server_sdk/types/play_ht_voice_language.rb +44 -0
  240. data/lib/vapi_server_sdk/types/play_ht_voice_model.rb +10 -0
  241. data/lib/vapi_server_sdk/types/regex_option.rb +2 -2
  242. data/lib/vapi_server_sdk/types/regex_option_type.rb +1 -1
  243. data/lib/vapi_server_sdk/types/regex_replacement.rb +14 -4
  244. data/lib/vapi_server_sdk/types/rime_ai_credential.rb +13 -3
  245. data/lib/vapi_server_sdk/types/rime_ai_voice.rb +18 -14
  246. data/lib/vapi_server_sdk/types/runpod_credential.rb +13 -3
  247. data/lib/vapi_server_sdk/types/s_3_credential.rb +13 -3
  248. data/lib/vapi_server_sdk/types/server.rb +16 -2
  249. data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +49 -24
  250. data/lib/vapi_server_sdk/types/server_message_knowledge_base_request.rb +195 -0
  251. data/lib/vapi_server_sdk/types/server_message_knowledge_base_request_messages_item.rb +97 -0
  252. data/lib/vapi_server_sdk/types/{server_message_language_changed_phone_number.rb → server_message_knowledge_base_request_phone_number.rb} +8 -8
  253. data/lib/vapi_server_sdk/types/{server_message_language_changed.rb → server_message_language_change_detected.rb} +10 -10
  254. data/lib/vapi_server_sdk/types/server_message_language_change_detected_phone_number.rb +125 -0
  255. data/lib/vapi_server_sdk/types/server_message_message.rb +22 -9
  256. data/lib/vapi_server_sdk/types/server_message_response_knowledge_base_request.rb +81 -0
  257. data/lib/vapi_server_sdk/types/server_message_response_message_response.rb +14 -0
  258. data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +49 -24
  259. data/lib/vapi_server_sdk/types/server_message_tool_calls_tool_with_tool_call_list_item.rb +77 -77
  260. data/lib/vapi_server_sdk/types/server_message_transfer_update.rb +18 -2
  261. data/lib/vapi_server_sdk/types/sip_authentication.rb +80 -0
  262. data/lib/vapi_server_sdk/types/start_speaking_plan.rb +54 -10
  263. data/lib/vapi_server_sdk/types/start_speaking_plan_custom_endpointing_rules_item.rb +108 -0
  264. data/lib/vapi_server_sdk/types/structured_data_plan.rb +28 -10
  265. data/lib/vapi_server_sdk/types/subscription.rb +336 -0
  266. data/lib/vapi_server_sdk/types/subscription_concurrency_line_buy_dto.rb +55 -0
  267. data/lib/vapi_server_sdk/types/subscription_concurrency_line_remove_dto.rb +55 -0
  268. data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +67 -0
  269. data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +65 -0
  270. data/lib/vapi_server_sdk/types/subscription_status.rb +10 -0
  271. data/lib/vapi_server_sdk/types/subscription_type.rb +10 -0
  272. data/lib/vapi_server_sdk/types/success_evaluation_plan.rb +38 -16
  273. data/lib/vapi_server_sdk/types/summary_plan.rb +26 -8
  274. data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
  275. data/lib/vapi_server_sdk/types/tavus_conversation_properties.rb +173 -0
  276. data/lib/vapi_server_sdk/types/tavus_credential.rb +111 -0
  277. data/lib/vapi_server_sdk/types/tavus_voice.rb +163 -0
  278. data/lib/vapi_server_sdk/types/tavus_voice_voice_id.rb +53 -0
  279. data/lib/vapi_server_sdk/types/text_content.rb +73 -0
  280. data/lib/vapi_server_sdk/types/text_content_language.rb +191 -0
  281. data/lib/vapi_server_sdk/types/text_editor_tool.rb +194 -0
  282. data/lib/vapi_server_sdk/types/text_editor_tool_messages_item.rb +120 -0
  283. data/lib/vapi_server_sdk/types/together_ai_credential.rb +13 -3
  284. data/lib/vapi_server_sdk/types/together_ai_model.rb +21 -13
  285. data/lib/vapi_server_sdk/types/tool_message_complete.rb +29 -3
  286. data/lib/vapi_server_sdk/types/tool_message_delayed.rb +30 -3
  287. data/lib/vapi_server_sdk/types/tool_message_failed.rb +30 -3
  288. data/lib/vapi_server_sdk/types/tool_message_start.rb +29 -4
  289. data/lib/vapi_server_sdk/types/transfer_destination_assistant.rb +79 -33
  290. data/lib/vapi_server_sdk/types/transfer_destination_assistant_message.rb +65 -0
  291. data/lib/vapi_server_sdk/types/transfer_destination_number.rb +56 -24
  292. data/lib/vapi_server_sdk/types/transfer_destination_number_message.rb +65 -0
  293. data/lib/vapi_server_sdk/types/transfer_destination_sip.rb +60 -15
  294. data/lib/vapi_server_sdk/types/transfer_destination_sip_message.rb +65 -0
  295. data/lib/vapi_server_sdk/types/transfer_destination_step.rb +28 -14
  296. data/lib/vapi_server_sdk/types/transfer_destination_step_message.rb +65 -0
  297. data/lib/vapi_server_sdk/types/transfer_plan.rb +141 -0
  298. data/lib/vapi_server_sdk/types/transfer_plan_message.rb +58 -0
  299. data/lib/vapi_server_sdk/types/transfer_plan_mode.rb +32 -0
  300. data/lib/vapi_server_sdk/types/transport.rb +70 -0
  301. data/lib/vapi_server_sdk/types/transport_cost.rb +12 -2
  302. data/lib/vapi_server_sdk/types/transport_cost_provider.rb +9 -0
  303. data/lib/vapi_server_sdk/types/transport_provider.rb +11 -0
  304. data/lib/vapi_server_sdk/types/trieve_knowledge_base.rb +125 -0
  305. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_create_plan.rb +109 -0
  306. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan.rb +95 -0
  307. data/lib/vapi_server_sdk/types/trieve_knowledge_base_vector_store_search_plan_search_type.rb +12 -0
  308. data/lib/vapi_server_sdk/types/twilio_credential.rb +12 -2
  309. data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +11 -2
  310. data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +11 -2
  311. data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +74 -0
  312. data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +95 -0
  313. data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +23 -0
  314. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +13 -3
  315. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_models_item.rb +1 -0
  316. data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +1 -0
  317. data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +31 -11
  318. data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +11 -2
  319. data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +31 -2
  320. data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +11 -2
  321. data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +9 -2
  322. data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -2
  323. data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +10 -10
  324. data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +11 -2
  325. data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +11 -2
  326. data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +76 -0
  327. data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +11 -2
  328. data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +76 -0
  329. data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +96 -0
  330. data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +11 -2
  331. data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +17 -2
  332. data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +11 -2
  333. data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +11 -2
  334. data/lib/vapi_server_sdk/types/update_org_dto.rb +21 -2
  335. data/lib/vapi_server_sdk/types/update_org_dto_channel.rb +10 -0
  336. data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +11 -2
  337. data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -2
  338. data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +11 -2
  339. data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +11 -2
  340. data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +13 -3
  341. data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +74 -0
  342. data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +11 -2
  343. data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +16 -2
  344. data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +16 -2
  345. data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +76 -0
  346. data/lib/vapi_server_sdk/types/vapi_cost.rb +10 -2
  347. data/lib/vapi_server_sdk/types/vapi_cost_sub_type.rb +9 -0
  348. data/lib/vapi_server_sdk/types/vapi_model.rb +24 -16
  349. data/lib/vapi_server_sdk/types/vapi_phone_number.rb +20 -2
  350. data/lib/vapi_server_sdk/types/vonage_credential.rb +12 -2
  351. data/lib/vapi_server_sdk/types/webhook_credential.rb +134 -0
  352. data/lib/vapi_server_sdk/types/x_ai_credential.rb +113 -0
  353. data/lib/vapi_server_sdk/types/xai_model.rb +177 -0
  354. data/lib/vapi_server_sdk/types/xai_model_tools_item.rb +159 -0
  355. data/lib/vapi_server_sdk.rb +7 -0
  356. metadata +165 -6
@@ -0,0 +1,126 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "regex_option"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vapi
8
+ class BothCustomEndpointingRule
9
+ # @return [String] This is the regex pattern to match the assistant's message.
10
+ # Note:
11
+ # - This works by using the `RegExp.test` method in Node.JS. Eg.
12
+ # `/hello/.test("hello there")` will return `true`.
13
+ # Hot tip:
14
+ # - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"`
15
+ # will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
16
+ # - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will
17
+ # return `true`. To do full string matching, send "^cat$".
18
+ attr_reader :assistant_regex
19
+ # @return [Array<Vapi::RegexOption>] These are the options for the assistant's message regex match. Defaults to all
20
+ # disabled.
21
+ # @default []
22
+ attr_reader :assistant_regex_options
23
+ # @return [String]
24
+ attr_reader :customer_regex
25
+ # @return [Array<Vapi::RegexOption>] These are the options for the customer's message regex match. Defaults to all
26
+ # disabled.
27
+ # @default []
28
+ attr_reader :customer_regex_options
29
+ # @return [Float] This is the endpointing timeout in seconds, if the rule is matched.
30
+ attr_reader :timeout_seconds
31
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
32
+ attr_reader :additional_properties
33
+ # @return [Object]
34
+ attr_reader :_field_set
35
+ protected :_field_set
36
+
37
+ OMIT = Object.new
38
+
39
+ # @param assistant_regex [String] This is the regex pattern to match the assistant's message.
40
+ # Note:
41
+ # - This works by using the `RegExp.test` method in Node.JS. Eg.
42
+ # `/hello/.test("hello there")` will return `true`.
43
+ # Hot tip:
44
+ # - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"`
45
+ # will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
46
+ # - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will
47
+ # return `true`. To do full string matching, send "^cat$".
48
+ # @param assistant_regex_options [Array<Vapi::RegexOption>] These are the options for the assistant's message regex match. Defaults to all
49
+ # disabled.
50
+ # @default []
51
+ # @param customer_regex [String]
52
+ # @param customer_regex_options [Array<Vapi::RegexOption>] These are the options for the customer's message regex match. Defaults to all
53
+ # disabled.
54
+ # @default []
55
+ # @param timeout_seconds [Float] This is the endpointing timeout in seconds, if the rule is matched.
56
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
57
+ # @return [Vapi::BothCustomEndpointingRule]
58
+ def initialize(assistant_regex:, customer_regex:, timeout_seconds:, assistant_regex_options: OMIT,
59
+ customer_regex_options: OMIT, additional_properties: nil)
60
+ @assistant_regex = assistant_regex
61
+ @assistant_regex_options = assistant_regex_options if assistant_regex_options != OMIT
62
+ @customer_regex = customer_regex
63
+ @customer_regex_options = customer_regex_options if customer_regex_options != OMIT
64
+ @timeout_seconds = timeout_seconds
65
+ @additional_properties = additional_properties
66
+ @_field_set = {
67
+ "assistantRegex": assistant_regex,
68
+ "assistantRegexOptions": assistant_regex_options,
69
+ "customerRegex": customer_regex,
70
+ "customerRegexOptions": customer_regex_options,
71
+ "timeoutSeconds": timeout_seconds
72
+ }.reject do |_k, v|
73
+ v == OMIT
74
+ end
75
+ end
76
+
77
+ # Deserialize a JSON object to an instance of BothCustomEndpointingRule
78
+ #
79
+ # @param json_object [String]
80
+ # @return [Vapi::BothCustomEndpointingRule]
81
+ def self.from_json(json_object:)
82
+ struct = JSON.parse(json_object, object_class: OpenStruct)
83
+ parsed_json = JSON.parse(json_object)
84
+ assistant_regex = parsed_json["assistantRegex"]
85
+ assistant_regex_options = parsed_json["assistantRegexOptions"]&.map do |item|
86
+ item = item.to_json
87
+ Vapi::RegexOption.from_json(json_object: item)
88
+ end
89
+ customer_regex = parsed_json["customerRegex"]
90
+ customer_regex_options = parsed_json["customerRegexOptions"]&.map do |item|
91
+ item = item.to_json
92
+ Vapi::RegexOption.from_json(json_object: item)
93
+ end
94
+ timeout_seconds = parsed_json["timeoutSeconds"]
95
+ new(
96
+ assistant_regex: assistant_regex,
97
+ assistant_regex_options: assistant_regex_options,
98
+ customer_regex: customer_regex,
99
+ customer_regex_options: customer_regex_options,
100
+ timeout_seconds: timeout_seconds,
101
+ additional_properties: struct
102
+ )
103
+ end
104
+
105
+ # Serialize an instance of BothCustomEndpointingRule to a JSON object
106
+ #
107
+ # @return [String]
108
+ def to_json(*_args)
109
+ @_field_set&.to_json
110
+ end
111
+
112
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
113
+ # hash and check each fields type against the current object's property
114
+ # definitions.
115
+ #
116
+ # @param obj [Object]
117
+ # @return [Void]
118
+ def self.validate_raw(obj:)
119
+ obj.assistant_regex.is_a?(String) != false || raise("Passed value for field obj.assistant_regex is not the expected type, validation failed.")
120
+ obj.assistant_regex_options&.is_a?(Array) != false || raise("Passed value for field obj.assistant_regex_options is not the expected type, validation failed.")
121
+ obj.customer_regex.is_a?(String) != false || raise("Passed value for field obj.customer_regex is not the expected type, validation failed.")
122
+ obj.customer_regex_options&.is_a?(Array) != false || raise("Passed value for field obj.customer_regex_options is not the expected type, validation failed.")
123
+ obj.timeout_seconds.is_a?(Float) != false || raise("Passed value for field obj.timeout_seconds is not the expected type, validation failed.")
124
+ end
125
+ end
126
+ end
@@ -19,10 +19,10 @@ module Vapi
19
19
  attr_reader :created_at
20
20
  # @return [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
21
21
  attr_reader :updated_at
22
+ # @return [String] This is the name of credential. This is just for your reference.
23
+ attr_reader :name
22
24
  # @return [Array<Vapi::SipTrunkGateway>] This is the list of SIP trunk's gateways.
23
25
  attr_reader :gateways
24
- # @return [String] This is the name of the SIP trunk. This is just for your reference.
25
- attr_reader :name
26
26
  # @return [Vapi::SipTrunkOutboundAuthenticationPlan] This can be used to configure the outbound authentication if required by the SIP
27
27
  # trunk.
28
28
  attr_reader :outbound_authentication_plan
@@ -32,6 +32,12 @@ module Vapi
32
32
  # - Vonage/Twilio requires leading plus for all outbound calls. Set this to true.
33
33
  # @default false
34
34
  attr_reader :outbound_leading_plus_enabled
35
+ # @return [String] This can be used to configure the tech prefix on outbound calls. This is an
36
+ # advanced property.
37
+ attr_reader :tech_prefix
38
+ # @return [String] This can be used to enable the SIP diversion header for authenticating the
39
+ # calling number if the SIP trunk supports it. This is an advanced property.
40
+ attr_reader :sip_diversion_header
35
41
  # @return [Vapi::SbcConfiguration] This is an advanced configuration for enterprise deployments. This uses the
36
42
  # onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC
37
43
  # provided by Vapi.
@@ -49,8 +55,8 @@ module Vapi
49
55
  # @param org_id [String] This is the unique identifier for the org that this credential belongs to.
50
56
  # @param created_at [DateTime] This is the ISO 8601 date-time string of when the credential was created.
51
57
  # @param updated_at [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
58
+ # @param name [String] This is the name of credential. This is just for your reference.
52
59
  # @param gateways [Array<Vapi::SipTrunkGateway>] This is the list of SIP trunk's gateways.
53
- # @param name [String] This is the name of the SIP trunk. This is just for your reference.
54
60
  # @param outbound_authentication_plan [Vapi::SipTrunkOutboundAuthenticationPlan] This can be used to configure the outbound authentication if required by the SIP
55
61
  # trunk.
56
62
  # @param outbound_leading_plus_enabled [Boolean] This ensures the outbound origination attempts have a leading plus. Defaults to
@@ -58,22 +64,28 @@ module Vapi
58
64
  # Usage:
59
65
  # - Vonage/Twilio requires leading plus for all outbound calls. Set this to true.
60
66
  # @default false
67
+ # @param tech_prefix [String] This can be used to configure the tech prefix on outbound calls. This is an
68
+ # advanced property.
69
+ # @param sip_diversion_header [String] This can be used to enable the SIP diversion header for authenticating the
70
+ # calling number if the SIP trunk supports it. This is an advanced property.
61
71
  # @param sbc_configuration [Vapi::SbcConfiguration] This is an advanced configuration for enterprise deployments. This uses the
62
72
  # onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC
63
73
  # provided by Vapi.
64
74
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
65
75
  # @return [Vapi::ByoSipTrunkCredential]
66
76
  def initialize(id:, org_id:, created_at:, updated_at:, gateways:, provider: OMIT, name: OMIT,
67
- outbound_authentication_plan: OMIT, outbound_leading_plus_enabled: OMIT, sbc_configuration: OMIT, additional_properties: nil)
77
+ outbound_authentication_plan: OMIT, outbound_leading_plus_enabled: OMIT, tech_prefix: OMIT, sip_diversion_header: OMIT, sbc_configuration: OMIT, additional_properties: nil)
68
78
  @provider = provider if provider != OMIT
69
79
  @id = id
70
80
  @org_id = org_id
71
81
  @created_at = created_at
72
82
  @updated_at = updated_at
73
- @gateways = gateways
74
83
  @name = name if name != OMIT
84
+ @gateways = gateways
75
85
  @outbound_authentication_plan = outbound_authentication_plan if outbound_authentication_plan != OMIT
76
86
  @outbound_leading_plus_enabled = outbound_leading_plus_enabled if outbound_leading_plus_enabled != OMIT
87
+ @tech_prefix = tech_prefix if tech_prefix != OMIT
88
+ @sip_diversion_header = sip_diversion_header if sip_diversion_header != OMIT
77
89
  @sbc_configuration = sbc_configuration if sbc_configuration != OMIT
78
90
  @additional_properties = additional_properties
79
91
  @_field_set = {
@@ -82,10 +94,12 @@ module Vapi
82
94
  "orgId": org_id,
83
95
  "createdAt": created_at,
84
96
  "updatedAt": updated_at,
85
- "gateways": gateways,
86
97
  "name": name,
98
+ "gateways": gateways,
87
99
  "outboundAuthenticationPlan": outbound_authentication_plan,
88
100
  "outboundLeadingPlusEnabled": outbound_leading_plus_enabled,
101
+ "techPrefix": tech_prefix,
102
+ "sipDiversionHeader": sip_diversion_header,
89
103
  "sbcConfiguration": sbc_configuration
90
104
  }.reject do |_k, v|
91
105
  v == OMIT
@@ -104,11 +118,11 @@ module Vapi
104
118
  org_id = parsed_json["orgId"]
105
119
  created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?)
106
120
  updated_at = (DateTime.parse(parsed_json["updatedAt"]) unless parsed_json["updatedAt"].nil?)
121
+ name = parsed_json["name"]
107
122
  gateways = parsed_json["gateways"]&.map do |item|
108
123
  item = item.to_json
109
124
  Vapi::SipTrunkGateway.from_json(json_object: item)
110
125
  end
111
- name = parsed_json["name"]
112
126
  if parsed_json["outboundAuthenticationPlan"].nil?
113
127
  outbound_authentication_plan = nil
114
128
  else
@@ -116,6 +130,8 @@ module Vapi
116
130
  outbound_authentication_plan = Vapi::SipTrunkOutboundAuthenticationPlan.from_json(json_object: outbound_authentication_plan)
117
131
  end
118
132
  outbound_leading_plus_enabled = parsed_json["outboundLeadingPlusEnabled"]
133
+ tech_prefix = parsed_json["techPrefix"]
134
+ sip_diversion_header = parsed_json["sipDiversionHeader"]
119
135
  if parsed_json["sbcConfiguration"].nil?
120
136
  sbc_configuration = nil
121
137
  else
@@ -128,10 +144,12 @@ module Vapi
128
144
  org_id: org_id,
129
145
  created_at: created_at,
130
146
  updated_at: updated_at,
131
- gateways: gateways,
132
147
  name: name,
148
+ gateways: gateways,
133
149
  outbound_authentication_plan: outbound_authentication_plan,
134
150
  outbound_leading_plus_enabled: outbound_leading_plus_enabled,
151
+ tech_prefix: tech_prefix,
152
+ sip_diversion_header: sip_diversion_header,
135
153
  sbc_configuration: sbc_configuration,
136
154
  additional_properties: struct
137
155
  )
@@ -156,10 +174,12 @@ module Vapi
156
174
  obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
157
175
  obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
158
176
  obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
159
- obj.gateways.is_a?(Array) != false || raise("Passed value for field obj.gateways is not the expected type, validation failed.")
160
177
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
178
+ obj.gateways.is_a?(Array) != false || raise("Passed value for field obj.gateways is not the expected type, validation failed.")
161
179
  obj.outbound_authentication_plan.nil? || Vapi::SipTrunkOutboundAuthenticationPlan.validate_raw(obj: obj.outbound_authentication_plan)
162
180
  obj.outbound_leading_plus_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.outbound_leading_plus_enabled is not the expected type, validation failed.")
181
+ obj.tech_prefix&.is_a?(String) != false || raise("Passed value for field obj.tech_prefix is not the expected type, validation failed.")
182
+ obj.sip_diversion_header&.is_a?(String) != false || raise("Passed value for field obj.sip_diversion_header is not the expected type, validation failed.")
163
183
  obj.sbc_configuration.nil? || Vapi::SbcConfiguration.validate_raw(obj: obj.sbc_configuration)
164
184
  end
165
185
  end
@@ -14,6 +14,7 @@ require_relative "artifact_plan"
14
14
  require_relative "analysis"
15
15
  require_relative "monitor"
16
16
  require_relative "artifact"
17
+ require_relative "transport"
17
18
  require_relative "create_assistant_dto"
18
19
  require_relative "assistant_overrides"
19
20
  require_relative "create_squad_dto"
@@ -70,6 +71,8 @@ module Vapi
70
71
  # @return [Vapi::Artifact] These are the artifacts created from the call. Configure in
71
72
  # `assistant.artifactPlan`.
72
73
  attr_reader :artifact
74
+ # @return [Vapi::Transport] This is the transport used for the call.
75
+ attr_reader :transport
73
76
  # @return [String] The ID of the call as provided by the phone number service. callSid in Twilio.
74
77
  # conversationUuid in Vonage.
75
78
  # Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
@@ -141,6 +144,7 @@ module Vapi
141
144
  # @param monitor [Vapi::Monitor] This is to real-time monitor the call. Configure in `assistant.monitorPlan`.
142
145
  # @param artifact [Vapi::Artifact] These are the artifacts created from the call. Configure in
143
146
  # `assistant.artifactPlan`.
147
+ # @param transport [Vapi::Transport] This is the transport used for the call.
144
148
  # @param phone_call_provider_id [String] The ID of the call as provided by the phone number service. callSid in Twilio.
145
149
  # conversationUuid in Vonage.
146
150
  # Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
@@ -170,7 +174,7 @@ module Vapi
170
174
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
171
175
  # @return [Vapi::Call]
172
176
  def initialize(id:, org_id:, created_at:, updated_at:, type: OMIT, costs: OMIT, messages: OMIT, phone_call_provider: OMIT, phone_call_transport: OMIT,
173
- status: OMIT, ended_reason: OMIT, destination: OMIT, started_at: OMIT, ended_at: OMIT, cost: OMIT, cost_breakdown: OMIT, artifact_plan: OMIT, analysis: OMIT, monitor: OMIT, artifact: OMIT, phone_call_provider_id: OMIT, assistant_id: OMIT, assistant: OMIT, assistant_overrides: OMIT, squad_id: OMIT, squad: OMIT, phone_number_id: OMIT, phone_number: OMIT, customer_id: OMIT, customer: OMIT, name: OMIT, additional_properties: nil)
177
+ status: OMIT, ended_reason: OMIT, destination: OMIT, started_at: OMIT, ended_at: OMIT, cost: OMIT, cost_breakdown: OMIT, artifact_plan: OMIT, analysis: OMIT, monitor: OMIT, artifact: OMIT, transport: OMIT, phone_call_provider_id: OMIT, assistant_id: OMIT, assistant: OMIT, assistant_overrides: OMIT, squad_id: OMIT, squad: OMIT, phone_number_id: OMIT, phone_number: OMIT, customer_id: OMIT, customer: OMIT, name: OMIT, additional_properties: nil)
174
178
  @type = type if type != OMIT
175
179
  @costs = costs if costs != OMIT
176
180
  @messages = messages if messages != OMIT
@@ -191,6 +195,7 @@ module Vapi
191
195
  @analysis = analysis if analysis != OMIT
192
196
  @monitor = monitor if monitor != OMIT
193
197
  @artifact = artifact if artifact != OMIT
198
+ @transport = transport if transport != OMIT
194
199
  @phone_call_provider_id = phone_call_provider_id if phone_call_provider_id != OMIT
195
200
  @assistant_id = assistant_id if assistant_id != OMIT
196
201
  @assistant = assistant if assistant != OMIT
@@ -224,6 +229,7 @@ module Vapi
224
229
  "analysis": analysis,
225
230
  "monitor": monitor,
226
231
  "artifact": artifact,
232
+ "transport": transport,
227
233
  "phoneCallProviderId": phone_call_provider_id,
228
234
  "assistantId": assistant_id,
229
235
  "assistant": assistant,
@@ -303,6 +309,12 @@ module Vapi
303
309
  artifact = parsed_json["artifact"].to_json
304
310
  artifact = Vapi::Artifact.from_json(json_object: artifact)
305
311
  end
312
+ if parsed_json["transport"].nil?
313
+ transport = nil
314
+ else
315
+ transport = parsed_json["transport"].to_json
316
+ transport = Vapi::Transport.from_json(json_object: transport)
317
+ end
306
318
  phone_call_provider_id = parsed_json["phoneCallProviderId"]
307
319
  assistant_id = parsed_json["assistantId"]
308
320
  if parsed_json["assistant"].nil?
@@ -360,6 +372,7 @@ module Vapi
360
372
  analysis: analysis,
361
373
  monitor: monitor,
362
374
  artifact: artifact,
375
+ transport: transport,
363
376
  phone_call_provider_id: phone_call_provider_id,
364
377
  assistant_id: assistant_id,
365
378
  assistant: assistant,
@@ -409,6 +422,7 @@ module Vapi
409
422
  obj.analysis.nil? || Vapi::Analysis.validate_raw(obj: obj.analysis)
410
423
  obj.monitor.nil? || Vapi::Monitor.validate_raw(obj: obj.monitor)
411
424
  obj.artifact.nil? || Vapi::Artifact.validate_raw(obj: obj.artifact)
425
+ obj.transport.nil? || Vapi::Transport.validate_raw(obj: obj.transport)
412
426
  obj.phone_call_provider_id&.is_a?(String) != false || raise("Passed value for field obj.phone_call_provider_id is not the expected type, validation failed.")
413
427
  obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
414
428
  obj.assistant.nil? || Vapi::CreateAssistantDto.validate_raw(obj: obj.assistant)
@@ -3,32 +3,24 @@
3
3
  module Vapi
4
4
  # This is the explanation for how the call ended.
5
5
  class CallEndedReason
6
- ASSISTANT_ERROR = "assistant-error"
7
- ASSISTANT_NOT_FOUND = "assistant-not-found"
8
- DB_ERROR = "db-error"
9
- NO_SERVER_AVAILABLE = "no-server-available"
10
- LICENSE_CHECK_FAILED = "license-check-failed"
11
- PIPELINE_ERROR_OPENAI_LLM_FAILED = "pipeline-error-openai-llm-failed"
12
- PIPELINE_ERROR_AZURE_OPENAI_LLM_FAILED = "pipeline-error-azure-openai-llm-failed"
13
- PIPELINE_ERROR_GROQ_LLM_FAILED = "pipeline-error-groq-llm-failed"
14
- PIPELINE_ERROR_ANTHROPIC_LLM_FAILED = "pipeline-error-anthropic-llm-failed"
15
- PIPELINE_ERROR_VAPI_LLM_FAILED = "pipeline-error-vapi-llm-failed"
16
- PIPELINE_ERROR_VAPI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-vapi-400-bad-request-validation-failed"
17
- PIPELINE_ERROR_VAPI_401_UNAUTHORIZED = "pipeline-error-vapi-401-unauthorized"
18
- PIPELINE_ERROR_VAPI_403_MODEL_ACCESS_DENIED = "pipeline-error-vapi-403-model-access-denied"
19
- PIPELINE_ERROR_VAPI_429_EXCEEDED_QUOTA = "pipeline-error-vapi-429-exceeded-quota"
20
- PIPELINE_ERROR_VAPI_500_SERVER_ERROR = "pipeline-error-vapi-500-server-error"
21
6
  PIPELINE_ERROR_OPENAI_VOICE_FAILED = "pipeline-error-openai-voice-failed"
22
7
  PIPELINE_ERROR_CARTESIA_VOICE_FAILED = "pipeline-error-cartesia-voice-failed"
23
- PIPELINE_ERROR_DEEPGRAM_TRANSCRIBER_FAILED = "pipeline-error-deepgram-transcriber-failed"
24
8
  PIPELINE_ERROR_DEEPGRAM_VOICE_FAILED = "pipeline-error-deepgram-voice-failed"
25
- PIPELINE_ERROR_GLADIA_TRANSCRIBER_FAILED = "pipeline-error-gladia-transcriber-failed"
26
9
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_FAILED = "pipeline-error-eleven-labs-voice-failed"
27
10
  PIPELINE_ERROR_PLAYHT_VOICE_FAILED = "pipeline-error-playht-voice-failed"
28
11
  PIPELINE_ERROR_LMNT_VOICE_FAILED = "pipeline-error-lmnt-voice-failed"
29
12
  PIPELINE_ERROR_AZURE_VOICE_FAILED = "pipeline-error-azure-voice-failed"
30
13
  PIPELINE_ERROR_RIME_AI_VOICE_FAILED = "pipeline-error-rime-ai-voice-failed"
31
14
  PIPELINE_ERROR_NEETS_VOICE_FAILED = "pipeline-error-neets-voice-failed"
15
+ DB_ERROR = "db-error"
16
+ ASSISTANT_NOT_FOUND = "assistant-not-found"
17
+ LICENSE_CHECK_FAILED = "license-check-failed"
18
+ PIPELINE_ERROR_VAPI_LLM_FAILED = "pipeline-error-vapi-llm-failed"
19
+ PIPELINE_ERROR_VAPI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-vapi-400-bad-request-validation-failed"
20
+ PIPELINE_ERROR_VAPI_401_UNAUTHORIZED = "pipeline-error-vapi-401-unauthorized"
21
+ PIPELINE_ERROR_VAPI_403_MODEL_ACCESS_DENIED = "pipeline-error-vapi-403-model-access-denied"
22
+ PIPELINE_ERROR_VAPI_429_EXCEEDED_QUOTA = "pipeline-error-vapi-429-exceeded-quota"
23
+ PIPELINE_ERROR_VAPI_500_SERVER_ERROR = "pipeline-error-vapi-500-server-error"
32
24
  PIPELINE_NO_AVAILABLE_MODEL = "pipeline-no-available-model"
33
25
  WORKER_SHUTDOWN = "worker-shutdown"
34
26
  UNKNOWN_ERROR = "unknown-error"
@@ -41,6 +33,16 @@ module Vapi
41
33
  VAPIFAULT_TRANSPORT_NEVER_CONNECTED = "vapifault-transport-never-connected"
42
34
  VAPIFAULT_WEB_CALL_WORKER_SETUP_FAILED = "vapifault-web-call-worker-setup-failed"
43
35
  VAPIFAULT_TRANSPORT_CONNECTED_BUT_CALL_NOT_ACTIVE = "vapifault-transport-connected-but-call-not-active"
36
+ VAPIFAULT_CALL_STARTED_BUT_CONNECTION_TO_TRANSPORT_MISSING = "vapifault-call-started-but-connection-to-transport-missing"
37
+ PIPELINE_ERROR_DEEPGRAM_TRANSCRIBER_FAILED = "pipeline-error-deepgram-transcriber-failed"
38
+ PIPELINE_ERROR_GLADIA_TRANSCRIBER_FAILED = "pipeline-error-gladia-transcriber-failed"
39
+ PIPELINE_ERROR_ASSEMBLY_AI_TRANSCRIBER_FAILED = "pipeline-error-assembly-ai-transcriber-failed"
40
+ PIPELINE_ERROR_OPENAI_LLM_FAILED = "pipeline-error-openai-llm-failed"
41
+ PIPELINE_ERROR_AZURE_OPENAI_LLM_FAILED = "pipeline-error-azure-openai-llm-failed"
42
+ PIPELINE_ERROR_GROQ_LLM_FAILED = "pipeline-error-groq-llm-failed"
43
+ PIPELINE_ERROR_GOOGLE_LLM_FAILED = "pipeline-error-google-llm-failed"
44
+ PIPELINE_ERROR_XAI_LLM_FAILED = "pipeline-error-xai-llm-failed"
45
+ PIPELINE_ERROR_INFLECTION_AI_LLM_FAILED = "pipeline-error-inflection-ai-llm-failed"
44
46
  ASSISTANT_NOT_INVALID = "assistant-not-invalid"
45
47
  ASSISTANT_NOT_PROVIDED = "assistant-not-provided"
46
48
  CALL_START_ERROR_NEITHER_ASSISTANT_NOR_SERVER_SET = "call-start-error-neither-assistant-nor-server-set"
@@ -67,6 +69,21 @@ module Vapi
67
69
  PIPELINE_ERROR_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-openai-403-model-access-denied"
68
70
  PIPELINE_ERROR_OPENAI_429_EXCEEDED_QUOTA = "pipeline-error-openai-429-exceeded-quota"
69
71
  PIPELINE_ERROR_OPENAI_500_SERVER_ERROR = "pipeline-error-openai-500-server-error"
72
+ PIPELINE_ERROR_GOOGLE_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-google-400-bad-request-validation-failed"
73
+ PIPELINE_ERROR_GOOGLE_401_UNAUTHORIZED = "pipeline-error-google-401-unauthorized"
74
+ PIPELINE_ERROR_GOOGLE_403_MODEL_ACCESS_DENIED = "pipeline-error-google-403-model-access-denied"
75
+ PIPELINE_ERROR_GOOGLE_429_EXCEEDED_QUOTA = "pipeline-error-google-429-exceeded-quota"
76
+ PIPELINE_ERROR_GOOGLE_500_SERVER_ERROR = "pipeline-error-google-500-server-error"
77
+ PIPELINE_ERROR_XAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-xai-400-bad-request-validation-failed"
78
+ PIPELINE_ERROR_XAI_401_UNAUTHORIZED = "pipeline-error-xai-401-unauthorized"
79
+ PIPELINE_ERROR_XAI_403_MODEL_ACCESS_DENIED = "pipeline-error-xai-403-model-access-denied"
80
+ PIPELINE_ERROR_XAI_429_EXCEEDED_QUOTA = "pipeline-error-xai-429-exceeded-quota"
81
+ PIPELINE_ERROR_XAI_500_SERVER_ERROR = "pipeline-error-xai-500-server-error"
82
+ PIPELINE_ERROR_INFLECTION_AI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-inflection-ai-400-bad-request-validation-failed"
83
+ PIPELINE_ERROR_INFLECTION_AI_401_UNAUTHORIZED = "pipeline-error-inflection-ai-401-unauthorized"
84
+ PIPELINE_ERROR_INFLECTION_AI_403_MODEL_ACCESS_DENIED = "pipeline-error-inflection-ai-403-model-access-denied"
85
+ PIPELINE_ERROR_INFLECTION_AI_429_EXCEEDED_QUOTA = "pipeline-error-inflection-ai-429-exceeded-quota"
86
+ PIPELINE_ERROR_INFLECTION_AI_500_SERVER_ERROR = "pipeline-error-inflection-ai-500-server-error"
70
87
  PIPELINE_ERROR_AZURE_OPENAI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-azure-openai-400-bad-request-validation-failed"
71
88
  PIPELINE_ERROR_AZURE_OPENAI_401_UNAUTHORIZED = "pipeline-error-azure-openai-401-unauthorized"
72
89
  PIPELINE_ERROR_AZURE_OPENAI_403_MODEL_ACCESS_DENIED = "pipeline-error-azure-openai-403-model-access-denied"
@@ -82,6 +99,7 @@ module Vapi
82
99
  PIPELINE_ERROR_ANTHROPIC_403_MODEL_ACCESS_DENIED = "pipeline-error-anthropic-403-model-access-denied"
83
100
  PIPELINE_ERROR_ANTHROPIC_429_EXCEEDED_QUOTA = "pipeline-error-anthropic-429-exceeded-quota"
84
101
  PIPELINE_ERROR_ANTHROPIC_500_SERVER_ERROR = "pipeline-error-anthropic-500-server-error"
102
+ PIPELINE_ERROR_ANTHROPIC_LLM_FAILED = "pipeline-error-anthropic-llm-failed"
85
103
  PIPELINE_ERROR_TOGETHER_AI_400_BAD_REQUEST_VALIDATION_FAILED = "pipeline-error-together-ai-400-bad-request-validation-failed"
86
104
  PIPELINE_ERROR_TOGETHER_AI_401_UNAUTHORIZED = "pipeline-error-together-ai-401-unauthorized"
87
105
  PIPELINE_ERROR_TOGETHER_AI_403_MODEL_ACCESS_DENIED = "pipeline-error-together-ai-403-model-access-denied"
@@ -124,12 +142,12 @@ module Vapi
124
142
  PIPELINE_ERROR_CUSTOM_LLM_429_EXCEEDED_QUOTA = "pipeline-error-custom-llm-429-exceeded-quota"
125
143
  PIPELINE_ERROR_CUSTOM_LLM_500_SERVER_ERROR = "pipeline-error-custom-llm-500-server-error"
126
144
  PIPELINE_ERROR_CUSTOM_LLM_LLM_FAILED = "pipeline-error-custom-llm-llm-failed"
145
+ PIPELINE_ERROR_CUSTOM_VOICE_FAILED = "pipeline-error-custom-voice-failed"
127
146
  PIPELINE_ERROR_CARTESIA_SOCKET_HANG_UP = "pipeline-error-cartesia-socket-hang-up"
128
147
  PIPELINE_ERROR_CARTESIA_REQUESTED_PAYMENT = "pipeline-error-cartesia-requested-payment"
129
148
  PIPELINE_ERROR_CARTESIA_500_SERVER_ERROR = "pipeline-error-cartesia-500-server-error"
130
149
  PIPELINE_ERROR_CARTESIA_503_SERVER_ERROR = "pipeline-error-cartesia-503-server-error"
131
150
  PIPELINE_ERROR_CARTESIA_522_SERVER_ERROR = "pipeline-error-cartesia-522-server-error"
132
- PIPELINE_ERROR_CUSTOM_VOICE_FAILED = "pipeline-error-custom-voice-failed"
133
151
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_NOT_FOUND = "pipeline-error-eleven-labs-voice-not-found"
134
152
  PIPELINE_ERROR_ELEVEN_LABS_QUOTA_EXCEEDED = "pipeline-error-eleven-labs-quota-exceeded"
135
153
  PIPELINE_ERROR_ELEVEN_LABS_UNAUTHORIZED_ACCESS = "pipeline-error-eleven-labs-unauthorized-access"
@@ -150,10 +168,12 @@ module Vapi
150
168
  PIPELINE_ERROR_ELEVEN_LABS_VOICE_NOT_ALLOWED_FOR_FREE_USERS = "pipeline-error-eleven-labs-voice-not-allowed-for-free-users"
151
169
  PIPELINE_ERROR_ELEVEN_LABS_500_SERVER_ERROR = "pipeline-error-eleven-labs-500-server-error"
152
170
  PIPELINE_ERROR_ELEVEN_LABS_MAX_CHARACTER_LIMIT_EXCEEDED = "pipeline-error-eleven-labs-max-character-limit-exceeded"
171
+ PIPELINE_ERROR_ELEVEN_LABS_BLOCKED_VOICE_POTENTIALLY_AGAINST_TERMS_OF_SERVICE_AND_AWAITING_VERIFICATION = "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification"
153
172
  PIPELINE_ERROR_PLAYHT_REQUEST_TIMED_OUT = "pipeline-error-playht-request-timed-out"
154
173
  PIPELINE_ERROR_PLAYHT_INVALID_VOICE = "pipeline-error-playht-invalid-voice"
155
174
  PIPELINE_ERROR_PLAYHT_UNEXPECTED_ERROR = "pipeline-error-playht-unexpected-error"
156
175
  PIPELINE_ERROR_PLAYHT_OUT_OF_CREDITS = "pipeline-error-playht-out-of-credits"
176
+ PIPELINE_ERROR_PLAYHT_INVALID_EMOTION = "pipeline-error-playht-invalid-emotion"
157
177
  PIPELINE_ERROR_PLAYHT_VOICE_MUST_BE_A_VALID_VOICE_MANIFEST_URI = "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri"
158
178
  PIPELINE_ERROR_PLAYHT_401_UNAUTHORIZED = "pipeline-error-playht-401-unauthorized"
159
179
  PIPELINE_ERROR_PLAYHT_403_FORBIDDEN_OUT_OF_CHARACTERS = "pipeline-error-playht-403-forbidden-out-of-characters"
@@ -161,15 +181,20 @@ module Vapi
161
181
  PIPELINE_ERROR_PLAYHT_429_EXCEEDED_QUOTA = "pipeline-error-playht-429-exceeded-quota"
162
182
  PIPELINE_ERROR_PLAYHT_502_GATEWAY_ERROR = "pipeline-error-playht-502-gateway-error"
163
183
  PIPELINE_ERROR_PLAYHT_504_GATEWAY_ERROR = "pipeline-error-playht-504-gateway-error"
164
- PIPELINE_ERROR_DEEPGRAM_403_MODEL_ACCESS_DENIED = "pipeline-error-deepgram-403-model-access-denied"
165
- PIPELINE_ERROR_DEEPGRAM_404_NOT_FOUND = "pipeline-error-deepgram-404-not-found"
166
- PIPELINE_ERROR_DEEPGRAM_400_NO_SUCH_MODEL_LANGUAGE_TIER_COMBINATION = "pipeline-error-deepgram-400-no-such-model-language-tier-combination"
167
- PIPELINE_ERROR_DEEPGRAM_500_RETURNING_INVALID_JSON = "pipeline-error-deepgram-500-returning-invalid-json"
168
- SIP_GATEWAY_FAILED_TO_CONNECT_CALL = "sip-gateway-failed-to-connect-call"
184
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_403_MODEL_ACCESS_DENIED = "pipeline-error-deepgram-returning-403-model-access-denied"
185
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_401_INVALID_CREDENTIALS = "pipeline-error-deepgram-returning-401-invalid-credentials"
186
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_404_NOT_FOUND = "pipeline-error-deepgram-returning-404-not-found"
187
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_400_NO_SUCH_MODEL_LANGUAGE_TIER_COMBINATION = "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination"
188
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_500_INVALID_JSON = "pipeline-error-deepgram-returning-500-invalid-json"
189
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_502_NETWORK_ERROR = "pipeline-error-deepgram-returning-502-network-error"
190
+ PIPELINE_ERROR_DEEPGRAM_RETURNING_502_BAD_GATEWAY_EHOSTUNREACH = "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach"
191
+ PIPELINE_ERROR_TAVUS_VIDEO_FAILED = "pipeline-error-tavus-video-failed"
192
+ PIPELINE_ERROR_CUSTOM_TRANSCRIBER_FAILED = "pipeline-error-custom-transcriber-failed"
169
193
  SILENCE_TIMED_OUT = "silence-timed-out"
194
+ SIP_GATEWAY_FAILED_TO_CONNECT_CALL = "sip-gateway-failed-to-connect-call"
170
195
  TWILIO_FAILED_TO_CONNECT_CALL = "twilio-failed-to-connect-call"
171
196
  TWILIO_REPORTED_CUSTOMER_MISDIALED = "twilio-reported-customer-misdialed"
172
- VOICEMAIL = "voicemail"
173
197
  VONAGE_REJECTED = "vonage-rejected"
198
+ VOICEMAIL = "voicemail"
174
199
  end
175
200
  end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "call_log_privileged_level"
4
+ require "date"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Vapi
9
+ class CallLogPrivileged
10
+ # @return [String] This is the unique identifier for the call.
11
+ attr_reader :call_id
12
+ # @return [String] This is the unique identifier for the org that this call log belongs to.
13
+ attr_reader :org_id
14
+ # @return [String] This is the log message associated with the call.
15
+ attr_reader :log
16
+ # @return [Vapi::CallLogPrivilegedLevel] This is the level of the log message.
17
+ attr_reader :level
18
+ # @return [DateTime] This is the ISO 8601 date-time string of when the log was created.
19
+ attr_reader :time
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param call_id [String] This is the unique identifier for the call.
29
+ # @param org_id [String] This is the unique identifier for the org that this call log belongs to.
30
+ # @param log [String] This is the log message associated with the call.
31
+ # @param level [Vapi::CallLogPrivilegedLevel] This is the level of the log message.
32
+ # @param time [DateTime] This is the ISO 8601 date-time string of when the log was created.
33
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
+ # @return [Vapi::CallLogPrivileged]
35
+ def initialize(call_id:, org_id:, log:, level:, time:, additional_properties: nil)
36
+ @call_id = call_id
37
+ @org_id = org_id
38
+ @log = log
39
+ @level = level
40
+ @time = time
41
+ @additional_properties = additional_properties
42
+ @_field_set = { "callId": call_id, "orgId": org_id, "log": log, "level": level, "time": time }
43
+ end
44
+
45
+ # Deserialize a JSON object to an instance of CallLogPrivileged
46
+ #
47
+ # @param json_object [String]
48
+ # @return [Vapi::CallLogPrivileged]
49
+ def self.from_json(json_object:)
50
+ struct = JSON.parse(json_object, object_class: OpenStruct)
51
+ parsed_json = JSON.parse(json_object)
52
+ call_id = parsed_json["callId"]
53
+ org_id = parsed_json["orgId"]
54
+ log = parsed_json["log"]
55
+ level = parsed_json["level"]
56
+ time = (DateTime.parse(parsed_json["time"]) unless parsed_json["time"].nil?)
57
+ new(
58
+ call_id: call_id,
59
+ org_id: org_id,
60
+ log: log,
61
+ level: level,
62
+ time: time,
63
+ additional_properties: struct
64
+ )
65
+ end
66
+
67
+ # Serialize an instance of CallLogPrivileged to a JSON object
68
+ #
69
+ # @return [String]
70
+ def to_json(*_args)
71
+ @_field_set&.to_json
72
+ end
73
+
74
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
75
+ # hash and check each fields type against the current object's property
76
+ # definitions.
77
+ #
78
+ # @param obj [Object]
79
+ # @return [Void]
80
+ def self.validate_raw(obj:)
81
+ obj.call_id.is_a?(String) != false || raise("Passed value for field obj.call_id is not the expected type, validation failed.")
82
+ obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
83
+ obj.log.is_a?(String) != false || raise("Passed value for field obj.log is not the expected type, validation failed.")
84
+ obj.level.is_a?(Vapi::CallLogPrivilegedLevel) != false || raise("Passed value for field obj.level is not the expected type, validation failed.")
85
+ obj.time.is_a?(DateTime) != false || raise("Passed value for field obj.time is not the expected type, validation failed.")
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vapi
4
+ # This is the level of the log message.
5
+ class CallLogPrivilegedLevel
6
+ INFO = "INFO"
7
+ LOG = "LOG"
8
+ WARN = "WARN"
9
+ ERROR = "ERROR"
10
+ CHECKPOINT = "CHECKPOINT"
11
+ end
12
+ end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "call_log_privileged"
4
+ require_relative "pagination_meta"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Vapi
9
+ class CallLogsPaginatedResponse
10
+ # @return [Array<Vapi::CallLogPrivileged>]
11
+ attr_reader :results
12
+ # @return [Vapi::PaginationMeta]
13
+ attr_reader :metadata
14
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
15
+ attr_reader :additional_properties
16
+ # @return [Object]
17
+ attr_reader :_field_set
18
+ protected :_field_set
19
+
20
+ OMIT = Object.new
21
+
22
+ # @param results [Array<Vapi::CallLogPrivileged>]
23
+ # @param metadata [Vapi::PaginationMeta]
24
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
+ # @return [Vapi::CallLogsPaginatedResponse]
26
+ def initialize(results:, metadata:, additional_properties: nil)
27
+ @results = results
28
+ @metadata = metadata
29
+ @additional_properties = additional_properties
30
+ @_field_set = { "results": results, "metadata": metadata }
31
+ end
32
+
33
+ # Deserialize a JSON object to an instance of CallLogsPaginatedResponse
34
+ #
35
+ # @param json_object [String]
36
+ # @return [Vapi::CallLogsPaginatedResponse]
37
+ def self.from_json(json_object:)
38
+ struct = JSON.parse(json_object, object_class: OpenStruct)
39
+ parsed_json = JSON.parse(json_object)
40
+ results = parsed_json["results"]&.map do |item|
41
+ item = item.to_json
42
+ Vapi::CallLogPrivileged.from_json(json_object: item)
43
+ end
44
+ if parsed_json["metadata"].nil?
45
+ metadata = nil
46
+ else
47
+ metadata = parsed_json["metadata"].to_json
48
+ metadata = Vapi::PaginationMeta.from_json(json_object: metadata)
49
+ end
50
+ new(
51
+ results: results,
52
+ metadata: metadata,
53
+ additional_properties: struct
54
+ )
55
+ end
56
+
57
+ # Serialize an instance of CallLogsPaginatedResponse to a JSON object
58
+ #
59
+ # @return [String]
60
+ def to_json(*_args)
61
+ @_field_set&.to_json
62
+ end
63
+
64
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
65
+ # hash and check each fields type against the current object's property
66
+ # definitions.
67
+ #
68
+ # @param obj [Object]
69
+ # @return [Void]
70
+ def self.validate_raw(obj:)
71
+ obj.results.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
72
+ Vapi::PaginationMeta.validate_raw(obj: obj.metadata)
73
+ end
74
+ end
75
+ end