vapi-server-sdk 0.0.0a7__py3-none-any.whl

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 (571) hide show
  1. vapi/__init__.py +1081 -0
  2. vapi/analytics/__init__.py +2 -0
  3. vapi/analytics/client.py +159 -0
  4. vapi/assistants/__init__.py +21 -0
  5. vapi/assistants/client.py +1593 -0
  6. vapi/assistants/types/__init__.py +19 -0
  7. vapi/assistants/types/update_assistant_dto_background_sound.py +5 -0
  8. vapi/assistants/types/update_assistant_dto_client_messages_item.py +23 -0
  9. vapi/assistants/types/update_assistant_dto_first_message_mode.py +10 -0
  10. vapi/assistants/types/update_assistant_dto_model.py +26 -0
  11. vapi/assistants/types/update_assistant_dto_server_messages_item.py +24 -0
  12. vapi/assistants/types/update_assistant_dto_transcriber.py +8 -0
  13. vapi/assistants/types/update_assistant_dto_voice.py +24 -0
  14. vapi/blocks/__init__.py +25 -0
  15. vapi/blocks/client.py +804 -0
  16. vapi/blocks/types/__init__.py +23 -0
  17. vapi/blocks/types/blocks_create_request.py +8 -0
  18. vapi/blocks/types/blocks_create_response.py +8 -0
  19. vapi/blocks/types/blocks_delete_response.py +8 -0
  20. vapi/blocks/types/blocks_get_response.py +8 -0
  21. vapi/blocks/types/blocks_list_response_item.py +8 -0
  22. vapi/blocks/types/blocks_update_response.py +8 -0
  23. vapi/blocks/types/update_block_dto_messages_item.py +7 -0
  24. vapi/blocks/types/update_block_dto_steps_item.py +7 -0
  25. vapi/blocks/types/update_block_dto_tool.py +20 -0
  26. vapi/calls/__init__.py +2 -0
  27. vapi/calls/client.py +776 -0
  28. vapi/client.py +172 -0
  29. vapi/core/__init__.py +50 -0
  30. vapi/core/api_error.py +15 -0
  31. vapi/core/client_wrapper.py +76 -0
  32. vapi/core/datetime_utils.py +28 -0
  33. vapi/core/file.py +62 -0
  34. vapi/core/http_client.py +487 -0
  35. vapi/core/jsonable_encoder.py +101 -0
  36. vapi/core/pagination.py +88 -0
  37. vapi/core/pydantic_utilities.py +296 -0
  38. vapi/core/query_encoder.py +58 -0
  39. vapi/core/remove_none_from_dict.py +11 -0
  40. vapi/core/request_options.py +32 -0
  41. vapi/core/serialization.py +272 -0
  42. vapi/environment.py +7 -0
  43. vapi/errors/__init__.py +5 -0
  44. vapi/errors/bad_request_error.py +9 -0
  45. vapi/files/__init__.py +2 -0
  46. vapi/files/client.py +544 -0
  47. vapi/logs/__init__.py +5 -0
  48. vapi/logs/client.py +367 -0
  49. vapi/logs/types/__init__.py +6 -0
  50. vapi/logs/types/logs_get_request_sort_order.py +5 -0
  51. vapi/logs/types/logs_get_request_type.py +5 -0
  52. vapi/phone_numbers/__init__.py +21 -0
  53. vapi/phone_numbers/client.py +735 -0
  54. vapi/phone_numbers/types/__init__.py +19 -0
  55. vapi/phone_numbers/types/phone_numbers_create_request.py +11 -0
  56. vapi/phone_numbers/types/phone_numbers_create_response.py +9 -0
  57. vapi/phone_numbers/types/phone_numbers_delete_response.py +9 -0
  58. vapi/phone_numbers/types/phone_numbers_get_response.py +9 -0
  59. vapi/phone_numbers/types/phone_numbers_list_response_item.py +9 -0
  60. vapi/phone_numbers/types/phone_numbers_update_response.py +9 -0
  61. vapi/phone_numbers/types/update_phone_number_dto_fallback_destination.py +7 -0
  62. vapi/py.typed +0 -0
  63. vapi/squads/__init__.py +2 -0
  64. vapi/squads/client.py +723 -0
  65. vapi/tools/__init__.py +21 -0
  66. vapi/tools/client.py +717 -0
  67. vapi/tools/types/__init__.py +19 -0
  68. vapi/tools/types/tools_create_request.py +20 -0
  69. vapi/tools/types/tools_create_response.py +12 -0
  70. vapi/tools/types/tools_delete_response.py +12 -0
  71. vapi/tools/types/tools_get_response.py +12 -0
  72. vapi/tools/types/tools_list_response_item.py +14 -0
  73. vapi/tools/types/tools_update_response.py +12 -0
  74. vapi/tools/types/update_tool_dto_messages_item.py +9 -0
  75. vapi/types/__init__.py +993 -0
  76. vapi/types/add_voice_to_provider_dto.py +34 -0
  77. vapi/types/analysis.py +38 -0
  78. vapi/types/analysis_cost.py +52 -0
  79. vapi/types/analysis_cost_analysis_type.py +5 -0
  80. vapi/types/analysis_cost_breakdown.py +80 -0
  81. vapi/types/analysis_plan.py +43 -0
  82. vapi/types/analytics_operation.py +34 -0
  83. vapi/types/analytics_operation_column.py +19 -0
  84. vapi/types/analytics_operation_operation.py +5 -0
  85. vapi/types/analytics_query.py +51 -0
  86. vapi/types/analytics_query_group_by_item.py +7 -0
  87. vapi/types/analytics_query_result.py +42 -0
  88. vapi/types/anthropic_credential.py +46 -0
  89. vapi/types/anthropic_model.py +91 -0
  90. vapi/types/anthropic_model_model.py +10 -0
  91. vapi/types/anthropic_model_tools_item.py +20 -0
  92. vapi/types/anyscale_credential.py +46 -0
  93. vapi/types/anyscale_model.py +90 -0
  94. vapi/types/anyscale_model_tools_item.py +20 -0
  95. vapi/types/artifact.py +66 -0
  96. vapi/types/artifact_messages_item.py +10 -0
  97. vapi/types/artifact_plan.py +70 -0
  98. vapi/types/assignment_mutation.py +85 -0
  99. vapi/types/assignment_mutation_conditions_item.py +7 -0
  100. vapi/types/assistant.py +330 -0
  101. vapi/types/assistant_background_sound.py +5 -0
  102. vapi/types/assistant_client_messages_item.py +23 -0
  103. vapi/types/assistant_first_message_mode.py +10 -0
  104. vapi/types/assistant_model.py +26 -0
  105. vapi/types/assistant_overrides.py +316 -0
  106. vapi/types/assistant_overrides_background_sound.py +5 -0
  107. vapi/types/assistant_overrides_client_messages_item.py +23 -0
  108. vapi/types/assistant_overrides_first_message_mode.py +10 -0
  109. vapi/types/assistant_overrides_model.py +26 -0
  110. vapi/types/assistant_overrides_server_messages_item.py +24 -0
  111. vapi/types/assistant_overrides_transcriber.py +8 -0
  112. vapi/types/assistant_overrides_voice.py +24 -0
  113. vapi/types/assistant_server_messages_item.py +24 -0
  114. vapi/types/assistant_transcriber.py +8 -0
  115. vapi/types/assistant_voice.py +24 -0
  116. vapi/types/azure_open_ai_credential.py +52 -0
  117. vapi/types/azure_open_ai_credential_models_item.py +17 -0
  118. vapi/types/azure_open_ai_credential_region.py +24 -0
  119. vapi/types/azure_voice.py +52 -0
  120. vapi/types/azure_voice_id.py +6 -0
  121. vapi/types/azure_voice_id_enum.py +5 -0
  122. vapi/types/block_complete_message.py +33 -0
  123. vapi/types/block_complete_message_conditions_item.py +7 -0
  124. vapi/types/block_start_message.py +33 -0
  125. vapi/types/block_start_message_conditions_item.py +7 -0
  126. vapi/types/bot_message.py +54 -0
  127. vapi/types/bucket_plan.py +72 -0
  128. vapi/types/buy_phone_number_dto.py +81 -0
  129. vapi/types/buy_phone_number_dto_fallback_destination.py +7 -0
  130. vapi/types/byo_phone_number.py +126 -0
  131. vapi/types/byo_phone_number_fallback_destination.py +7 -0
  132. vapi/types/byo_sip_trunk_credential.py +85 -0
  133. vapi/types/call.py +241 -0
  134. vapi/types/call_costs_item.py +11 -0
  135. vapi/types/call_destination.py +7 -0
  136. vapi/types/call_ended_reason.py +177 -0
  137. vapi/types/call_messages_item.py +10 -0
  138. vapi/types/call_paginated_response.py +32 -0
  139. vapi/types/call_phone_call_provider.py +5 -0
  140. vapi/types/call_phone_call_transport.py +5 -0
  141. vapi/types/call_status.py +5 -0
  142. vapi/types/call_type.py +5 -0
  143. vapi/types/callback_step.py +116 -0
  144. vapi/types/callback_step_block.py +11 -0
  145. vapi/types/cartesia_credential.py +46 -0
  146. vapi/types/cartesia_voice.py +58 -0
  147. vapi/types/cartesia_voice_language.py +5 -0
  148. vapi/types/cartesia_voice_model.py +5 -0
  149. vapi/types/chunk_plan.py +70 -0
  150. vapi/types/client_inbound_message.py +23 -0
  151. vapi/types/client_inbound_message_add_message.py +28 -0
  152. vapi/types/client_inbound_message_control.py +32 -0
  153. vapi/types/client_inbound_message_control_control.py +7 -0
  154. vapi/types/client_inbound_message_message.py +10 -0
  155. vapi/types/client_inbound_message_say.py +36 -0
  156. vapi/types/client_message.py +23 -0
  157. vapi/types/client_message_conversation_update.py +38 -0
  158. vapi/types/client_message_conversation_update_messages_item.py +12 -0
  159. vapi/types/client_message_hang.py +27 -0
  160. vapi/types/client_message_language_changed.py +27 -0
  161. vapi/types/client_message_message.py +28 -0
  162. vapi/types/client_message_metadata.py +27 -0
  163. vapi/types/client_message_model_output.py +27 -0
  164. vapi/types/client_message_speech_update.py +34 -0
  165. vapi/types/client_message_speech_update_role.py +5 -0
  166. vapi/types/client_message_speech_update_status.py +5 -0
  167. vapi/types/client_message_tool_calls.py +40 -0
  168. vapi/types/client_message_tool_calls_result.py +31 -0
  169. vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py +10 -0
  170. vapi/types/client_message_transcript.py +43 -0
  171. vapi/types/client_message_transcript_role.py +5 -0
  172. vapi/types/client_message_transcript_transcript_type.py +5 -0
  173. vapi/types/client_message_user_interrupted.py +22 -0
  174. vapi/types/client_message_voice_input.py +27 -0
  175. vapi/types/clone_voice_dto.py +37 -0
  176. vapi/types/condition.py +33 -0
  177. vapi/types/condition_operator.py +5 -0
  178. vapi/types/conversation_block.py +109 -0
  179. vapi/types/conversation_block_messages_item.py +7 -0
  180. vapi/types/cost_breakdown.py +78 -0
  181. vapi/types/create_anthropic_credential_dto.py +25 -0
  182. vapi/types/create_anyscale_credential_dto.py +25 -0
  183. vapi/types/create_assistant_dto.py +309 -0
  184. vapi/types/create_assistant_dto_background_sound.py +5 -0
  185. vapi/types/create_assistant_dto_client_messages_item.py +23 -0
  186. vapi/types/create_assistant_dto_first_message_mode.py +10 -0
  187. vapi/types/create_assistant_dto_model.py +26 -0
  188. vapi/types/create_assistant_dto_server_messages_item.py +24 -0
  189. vapi/types/create_assistant_dto_transcriber.py +8 -0
  190. vapi/types/create_assistant_dto_voice.py +24 -0
  191. vapi/types/create_azure_open_ai_credential_dto.py +31 -0
  192. vapi/types/create_azure_open_ai_credential_dto_models_item.py +17 -0
  193. vapi/types/create_azure_open_ai_credential_dto_region.py +24 -0
  194. vapi/types/create_byo_phone_number_dto.py +105 -0
  195. vapi/types/create_byo_phone_number_dto_fallback_destination.py +7 -0
  196. vapi/types/create_byo_sip_trunk_credential_dto.py +64 -0
  197. vapi/types/create_cartesia_credential_dto.py +25 -0
  198. vapi/types/create_conversation_block_dto.py +88 -0
  199. vapi/types/create_conversation_block_dto_messages_item.py +7 -0
  200. vapi/types/create_custom_llm_credential_dto.py +25 -0
  201. vapi/types/create_customer_dto.py +59 -0
  202. vapi/types/create_deep_infra_credential_dto.py +25 -0
  203. vapi/types/create_deepgram_credential_dto.py +32 -0
  204. vapi/types/create_dtmf_tool_dto.py +61 -0
  205. vapi/types/create_dtmf_tool_dto_messages_item.py +11 -0
  206. vapi/types/create_eleven_labs_credential_dto.py +25 -0
  207. vapi/types/create_end_call_tool_dto.py +61 -0
  208. vapi/types/create_end_call_tool_dto_messages_item.py +11 -0
  209. vapi/types/create_function_tool_dto.py +61 -0
  210. vapi/types/create_function_tool_dto_messages_item.py +11 -0
  211. vapi/types/create_gcp_credential_dto.py +41 -0
  212. vapi/types/create_ghl_tool_dto.py +63 -0
  213. vapi/types/create_ghl_tool_dto_messages_item.py +11 -0
  214. vapi/types/create_gladia_credential_dto.py +25 -0
  215. vapi/types/create_go_high_level_credential_dto.py +25 -0
  216. vapi/types/create_groq_credential_dto.py +25 -0
  217. vapi/types/create_lmnt_credential_dto.py +25 -0
  218. vapi/types/create_make_credential_dto.py +35 -0
  219. vapi/types/create_make_tool_dto.py +63 -0
  220. vapi/types/create_make_tool_dto_messages_item.py +11 -0
  221. vapi/types/create_open_ai_credential_dto.py +25 -0
  222. vapi/types/create_open_router_credential_dto.py +25 -0
  223. vapi/types/create_org_dto.py +63 -0
  224. vapi/types/create_outbound_call_dto.py +104 -0
  225. vapi/types/create_output_tool_dto.py +61 -0
  226. vapi/types/create_output_tool_dto_messages_item.py +11 -0
  227. vapi/types/create_perplexity_ai_credential_dto.py +25 -0
  228. vapi/types/create_play_ht_credential_dto.py +27 -0
  229. vapi/types/create_rime_ai_credential_dto.py +25 -0
  230. vapi/types/create_runpod_credential_dto.py +25 -0
  231. vapi/types/create_s_3_credential_dto.py +51 -0
  232. vapi/types/create_squad_dto.py +52 -0
  233. vapi/types/create_together_ai_credential_dto.py +25 -0
  234. vapi/types/create_token_dto.py +34 -0
  235. vapi/types/create_token_dto_tag.py +5 -0
  236. vapi/types/create_tool_call_block_dto.py +75 -0
  237. vapi/types/create_tool_call_block_dto_messages_item.py +7 -0
  238. vapi/types/create_tool_call_block_dto_tool.py +20 -0
  239. vapi/types/create_tool_template_dto.py +38 -0
  240. vapi/types/create_tool_template_dto_details.py +20 -0
  241. vapi/types/create_tool_template_dto_provider.py +5 -0
  242. vapi/types/create_tool_template_dto_provider_details.py +10 -0
  243. vapi/types/create_tool_template_dto_visibility.py +5 -0
  244. vapi/types/create_transfer_call_tool_dto.py +67 -0
  245. vapi/types/create_transfer_call_tool_dto_destinations_item.py +11 -0
  246. vapi/types/create_transfer_call_tool_dto_messages_item.py +11 -0
  247. vapi/types/create_twilio_credential_dto.py +27 -0
  248. vapi/types/create_twilio_phone_number_dto.py +92 -0
  249. vapi/types/create_twilio_phone_number_dto_fallback_destination.py +7 -0
  250. vapi/types/create_vapi_phone_number_dto.py +84 -0
  251. vapi/types/create_vapi_phone_number_dto_fallback_destination.py +7 -0
  252. vapi/types/create_voicemail_tool_dto.py +65 -0
  253. vapi/types/create_voicemail_tool_dto_messages_item.py +11 -0
  254. vapi/types/create_vonage_credential_dto.py +27 -0
  255. vapi/types/create_vonage_phone_number_dto.py +87 -0
  256. vapi/types/create_vonage_phone_number_dto_fallback_destination.py +7 -0
  257. vapi/types/create_web_call_dto.py +63 -0
  258. vapi/types/create_workflow_block_dto.py +78 -0
  259. vapi/types/create_workflow_block_dto_messages_item.py +7 -0
  260. vapi/types/create_workflow_block_dto_steps_item.py +10 -0
  261. vapi/types/custom_llm_credential.py +46 -0
  262. vapi/types/custom_llm_model.py +115 -0
  263. vapi/types/custom_llm_model_metadata_send_mode.py +5 -0
  264. vapi/types/custom_llm_model_tools_item.py +20 -0
  265. vapi/types/deep_infra_credential.py +46 -0
  266. vapi/types/deep_infra_model.py +90 -0
  267. vapi/types/deep_infra_model_tools_item.py +20 -0
  268. vapi/types/deepgram_credential.py +53 -0
  269. vapi/types/deepgram_transcriber.py +68 -0
  270. vapi/types/deepgram_transcriber_language.py +65 -0
  271. vapi/types/deepgram_transcriber_model.py +37 -0
  272. vapi/types/deepgram_voice.py +47 -0
  273. vapi/types/deepgram_voice_id.py +6 -0
  274. vapi/types/deepgram_voice_id_enum.py +10 -0
  275. vapi/types/dtmf_tool.py +82 -0
  276. vapi/types/dtmf_tool_messages_item.py +9 -0
  277. vapi/types/eleven_labs_credential.py +46 -0
  278. vapi/types/eleven_labs_voice.py +98 -0
  279. vapi/types/eleven_labs_voice_id.py +6 -0
  280. vapi/types/eleven_labs_voice_id_enum.py +24 -0
  281. vapi/types/eleven_labs_voice_model.py +8 -0
  282. vapi/types/end_call_tool.py +82 -0
  283. vapi/types/end_call_tool_messages_item.py +9 -0
  284. vapi/types/error.py +19 -0
  285. vapi/types/exact_replacement.py +40 -0
  286. vapi/types/file.py +57 -0
  287. vapi/types/file_status.py +5 -0
  288. vapi/types/format_plan.py +64 -0
  289. vapi/types/format_plan_replacements_item.py +7 -0
  290. vapi/types/function_tool.py +82 -0
  291. vapi/types/function_tool_messages_item.py +9 -0
  292. vapi/types/function_tool_provider_details.py +35 -0
  293. vapi/types/function_tool_with_tool_call.py +67 -0
  294. vapi/types/function_tool_with_tool_call_messages_item.py +11 -0
  295. vapi/types/gcp_credential.py +62 -0
  296. vapi/types/gcp_key.py +78 -0
  297. vapi/types/ghl_tool.py +85 -0
  298. vapi/types/ghl_tool_messages_item.py +9 -0
  299. vapi/types/ghl_tool_metadata.py +22 -0
  300. vapi/types/ghl_tool_provider_details.py +41 -0
  301. vapi/types/ghl_tool_with_tool_call.py +69 -0
  302. vapi/types/ghl_tool_with_tool_call_messages_item.py +11 -0
  303. vapi/types/gladia_credential.py +46 -0
  304. vapi/types/gladia_transcriber.py +56 -0
  305. vapi/types/gladia_transcriber_language.py +109 -0
  306. vapi/types/gladia_transcriber_language_behaviour.py +7 -0
  307. vapi/types/gladia_transcriber_model.py +5 -0
  308. vapi/types/go_high_level_credential.py +46 -0
  309. vapi/types/groq_credential.py +46 -0
  310. vapi/types/groq_model.py +91 -0
  311. vapi/types/groq_model_model.py +19 -0
  312. vapi/types/groq_model_tools_item.py +20 -0
  313. vapi/types/handoff_step.py +116 -0
  314. vapi/types/handoff_step_block.py +11 -0
  315. vapi/types/import_twilio_phone_number_dto.py +91 -0
  316. vapi/types/import_twilio_phone_number_dto_fallback_destination.py +7 -0
  317. vapi/types/import_vonage_phone_number_dto.py +88 -0
  318. vapi/types/import_vonage_phone_number_dto_fallback_destination.py +7 -0
  319. vapi/types/invite_user_dto.py +21 -0
  320. vapi/types/invite_user_dto_role.py +5 -0
  321. vapi/types/json_schema.py +57 -0
  322. vapi/types/json_schema_type.py +5 -0
  323. vapi/types/knowledge_base.py +23 -0
  324. vapi/types/lmnt_credential.py +46 -0
  325. vapi/types/lmnt_voice.py +52 -0
  326. vapi/types/lmnt_voice_id.py +6 -0
  327. vapi/types/lmnt_voice_id_enum.py +5 -0
  328. vapi/types/log.py +164 -0
  329. vapi/types/log_request_http_method.py +5 -0
  330. vapi/types/log_resource.py +7 -0
  331. vapi/types/log_type.py +5 -0
  332. vapi/types/logs_paginated_response.py +22 -0
  333. vapi/types/make_credential.py +56 -0
  334. vapi/types/make_tool.py +85 -0
  335. vapi/types/make_tool_messages_item.py +9 -0
  336. vapi/types/make_tool_metadata.py +22 -0
  337. vapi/types/make_tool_provider_details.py +40 -0
  338. vapi/types/make_tool_with_tool_call.py +69 -0
  339. vapi/types/make_tool_with_tool_call_messages_item.py +11 -0
  340. vapi/types/message_plan.py +51 -0
  341. vapi/types/metrics.py +44 -0
  342. vapi/types/model_based_condition.py +54 -0
  343. vapi/types/model_cost.py +53 -0
  344. vapi/types/monitor.py +33 -0
  345. vapi/types/monitor_plan.py +43 -0
  346. vapi/types/neets_voice.py +47 -0
  347. vapi/types/neets_voice_id.py +6 -0
  348. vapi/types/neets_voice_id_enum.py +5 -0
  349. vapi/types/open_ai_credential.py +46 -0
  350. vapi/types/open_ai_function.py +35 -0
  351. vapi/types/open_ai_function_parameters.py +35 -0
  352. vapi/types/open_ai_message.py +21 -0
  353. vapi/types/open_ai_message_role.py +5 -0
  354. vapi/types/open_ai_model.py +106 -0
  355. vapi/types/open_ai_model_fallback_models_item.py +26 -0
  356. vapi/types/open_ai_model_model.py +26 -0
  357. vapi/types/open_ai_model_tools_item.py +20 -0
  358. vapi/types/open_ai_voice.py +52 -0
  359. vapi/types/open_ai_voice_id.py +5 -0
  360. vapi/types/open_router_credential.py +46 -0
  361. vapi/types/open_router_model.py +90 -0
  362. vapi/types/open_router_model_tools_item.py +20 -0
  363. vapi/types/org.py +120 -0
  364. vapi/types/org_plan.py +28 -0
  365. vapi/types/output_tool.py +82 -0
  366. vapi/types/output_tool_messages_item.py +9 -0
  367. vapi/types/pagination_meta.py +23 -0
  368. vapi/types/perplexity_ai_credential.py +46 -0
  369. vapi/types/perplexity_ai_model.py +90 -0
  370. vapi/types/perplexity_ai_model_tools_item.py +20 -0
  371. vapi/types/play_ht_credential.py +48 -0
  372. vapi/types/play_ht_voice.py +84 -0
  373. vapi/types/play_ht_voice_emotion.py +21 -0
  374. vapi/types/play_ht_voice_id.py +6 -0
  375. vapi/types/play_ht_voice_id_enum.py +8 -0
  376. vapi/types/punctuation_boundary.py +7 -0
  377. vapi/types/regex_option.py +34 -0
  378. vapi/types/regex_option_type.py +5 -0
  379. vapi/types/regex_replacement.py +48 -0
  380. vapi/types/rime_ai_credential.py +46 -0
  381. vapi/types/rime_ai_voice.py +58 -0
  382. vapi/types/rime_ai_voice_id.py +6 -0
  383. vapi/types/rime_ai_voice_id_enum.py +90 -0
  384. vapi/types/rime_ai_voice_model.py +5 -0
  385. vapi/types/rule_based_condition.py +96 -0
  386. vapi/types/rule_based_condition_operator.py +5 -0
  387. vapi/types/runpod_credential.py +46 -0
  388. vapi/types/s_3_credential.py +72 -0
  389. vapi/types/sbc_configuration.py +17 -0
  390. vapi/types/server.py +40 -0
  391. vapi/types/server_message.py +40 -0
  392. vapi/types/server_message_assistant_request.py +96 -0
  393. vapi/types/server_message_assistant_request_phone_number.py +11 -0
  394. vapi/types/server_message_conversation_update.py +110 -0
  395. vapi/types/server_message_conversation_update_messages_item.py +12 -0
  396. vapi/types/server_message_conversation_update_phone_number.py +11 -0
  397. vapi/types/server_message_end_of_call_report.py +134 -0
  398. vapi/types/server_message_end_of_call_report_costs_item.py +13 -0
  399. vapi/types/server_message_end_of_call_report_ended_reason.py +177 -0
  400. vapi/types/server_message_end_of_call_report_phone_number.py +11 -0
  401. vapi/types/server_message_hang.py +101 -0
  402. vapi/types/server_message_hang_phone_number.py +11 -0
  403. vapi/types/server_message_language_changed.py +101 -0
  404. vapi/types/server_message_language_changed_phone_number.py +11 -0
  405. vapi/types/server_message_message.py +38 -0
  406. vapi/types/server_message_model_output.py +101 -0
  407. vapi/types/server_message_model_output_phone_number.py +11 -0
  408. vapi/types/server_message_phone_call_control.py +110 -0
  409. vapi/types/server_message_phone_call_control_destination.py +7 -0
  410. vapi/types/server_message_phone_call_control_phone_number.py +11 -0
  411. vapi/types/server_message_phone_call_control_request.py +5 -0
  412. vapi/types/server_message_response.py +39 -0
  413. vapi/types/server_message_response_assistant_request.py +80 -0
  414. vapi/types/server_message_response_assistant_request_destination.py +7 -0
  415. vapi/types/server_message_response_message_response.py +14 -0
  416. vapi/types/server_message_response_tool_calls.py +28 -0
  417. vapi/types/server_message_response_transfer_destination_request.py +32 -0
  418. vapi/types/server_message_response_transfer_destination_request_destination.py +11 -0
  419. vapi/types/server_message_response_voice_request.py +44 -0
  420. vapi/types/server_message_speech_update.py +108 -0
  421. vapi/types/server_message_speech_update_phone_number.py +11 -0
  422. vapi/types/server_message_speech_update_role.py +5 -0
  423. vapi/types/server_message_speech_update_status.py +5 -0
  424. vapi/types/server_message_status_update.py +145 -0
  425. vapi/types/server_message_status_update_destination.py +7 -0
  426. vapi/types/server_message_status_update_ended_reason.py +177 -0
  427. vapi/types/server_message_status_update_messages_item.py +12 -0
  428. vapi/types/server_message_status_update_phone_number.py +11 -0
  429. vapi/types/server_message_status_update_status.py +7 -0
  430. vapi/types/server_message_tool_calls.py +112 -0
  431. vapi/types/server_message_tool_calls_phone_number.py +11 -0
  432. vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py +10 -0
  433. vapi/types/server_message_transcript.py +115 -0
  434. vapi/types/server_message_transcript_phone_number.py +11 -0
  435. vapi/types/server_message_transcript_role.py +5 -0
  436. vapi/types/server_message_transcript_transcript_type.py +5 -0
  437. vapi/types/server_message_transfer_destination_request.py +98 -0
  438. vapi/types/server_message_transfer_destination_request_phone_number.py +11 -0
  439. vapi/types/server_message_transfer_update.py +116 -0
  440. vapi/types/server_message_transfer_update_destination.py +11 -0
  441. vapi/types/server_message_transfer_update_phone_number.py +11 -0
  442. vapi/types/server_message_user_interrupted.py +96 -0
  443. vapi/types/server_message_user_interrupted_phone_number.py +11 -0
  444. vapi/types/server_message_voice_input.py +101 -0
  445. vapi/types/server_message_voice_input_phone_number.py +11 -0
  446. vapi/types/server_message_voice_request.py +128 -0
  447. vapi/types/server_message_voice_request_phone_number.py +11 -0
  448. vapi/types/sip_trunk_gateway.py +79 -0
  449. vapi/types/sip_trunk_gateway_outbound_protocol.py +5 -0
  450. vapi/types/sip_trunk_outbound_authentication_plan.py +35 -0
  451. vapi/types/sip_trunk_outbound_sip_register_plan.py +21 -0
  452. vapi/types/squad.py +73 -0
  453. vapi/types/squad_member_dto.py +60 -0
  454. vapi/types/start_speaking_plan.py +62 -0
  455. vapi/types/step_destination.py +28 -0
  456. vapi/types/step_destination_conditions_item.py +7 -0
  457. vapi/types/stop_speaking_plan.py +65 -0
  458. vapi/types/structured_data_plan.py +66 -0
  459. vapi/types/success_evaluation_plan.py +75 -0
  460. vapi/types/success_evaluation_plan_rubric.py +17 -0
  461. vapi/types/summary_plan.py +56 -0
  462. vapi/types/sync_voice_library_dto.py +23 -0
  463. vapi/types/sync_voice_library_dto_providers_item.py +10 -0
  464. vapi/types/system_message.py +39 -0
  465. vapi/types/talkscriber_transcriber.py +33 -0
  466. vapi/types/talkscriber_transcriber_language.py +109 -0
  467. vapi/types/template.py +58 -0
  468. vapi/types/template_details.py +20 -0
  469. vapi/types/template_provider.py +5 -0
  470. vapi/types/template_provider_details.py +8 -0
  471. vapi/types/template_visibility.py +5 -0
  472. vapi/types/time_range.py +47 -0
  473. vapi/types/time_range_step.py +8 -0
  474. vapi/types/together_ai_credential.py +46 -0
  475. vapi/types/together_ai_model.py +90 -0
  476. vapi/types/together_ai_model_tools_item.py +20 -0
  477. vapi/types/token.py +62 -0
  478. vapi/types/token_restrictions.py +53 -0
  479. vapi/types/token_tag.py +5 -0
  480. vapi/types/tool_call.py +33 -0
  481. vapi/types/tool_call_block.py +96 -0
  482. vapi/types/tool_call_block_messages_item.py +7 -0
  483. vapi/types/tool_call_block_tool.py +20 -0
  484. vapi/types/tool_call_function.py +27 -0
  485. vapi/types/tool_call_message.py +46 -0
  486. vapi/types/tool_call_result.py +62 -0
  487. vapi/types/tool_call_result_message.py +49 -0
  488. vapi/types/tool_call_result_message_item.py +7 -0
  489. vapi/types/tool_message_complete.py +74 -0
  490. vapi/types/tool_message_complete_role.py +5 -0
  491. vapi/types/tool_message_delayed.py +49 -0
  492. vapi/types/tool_message_failed.py +50 -0
  493. vapi/types/tool_message_start.py +37 -0
  494. vapi/types/tool_template_metadata.py +23 -0
  495. vapi/types/tool_template_setup.py +24 -0
  496. vapi/types/transcriber_cost.py +46 -0
  497. vapi/types/transcript_plan.py +66 -0
  498. vapi/types/transcription_endpointing_plan.py +52 -0
  499. vapi/types/transfer_call_tool.py +88 -0
  500. vapi/types/transfer_call_tool_destinations_item.py +11 -0
  501. vapi/types/transfer_call_tool_messages_item.py +11 -0
  502. vapi/types/transfer_destination_assistant.py +90 -0
  503. vapi/types/transfer_destination_number.py +77 -0
  504. vapi/types/transfer_destination_sip.py +39 -0
  505. vapi/types/transfer_destination_step.py +39 -0
  506. vapi/types/transfer_mode.py +5 -0
  507. vapi/types/transport_configuration_twilio.py +55 -0
  508. vapi/types/transport_configuration_twilio_recording_channels.py +5 -0
  509. vapi/types/transport_cost.py +32 -0
  510. vapi/types/twilio_credential.py +48 -0
  511. vapi/types/twilio_phone_number.py +113 -0
  512. vapi/types/twilio_phone_number_fallback_destination.py +7 -0
  513. vapi/types/twilio_voicemail_detection.py +107 -0
  514. vapi/types/twilio_voicemail_detection_voicemail_detection_types_item.py +10 -0
  515. vapi/types/update_anthropic_credential_dto.py +25 -0
  516. vapi/types/update_anyscale_credential_dto.py +25 -0
  517. vapi/types/update_azure_open_ai_credential_dto.py +31 -0
  518. vapi/types/update_azure_open_ai_credential_dto_models_item.py +17 -0
  519. vapi/types/update_azure_open_ai_credential_dto_region.py +24 -0
  520. vapi/types/update_byo_sip_trunk_credential_dto.py +64 -0
  521. vapi/types/update_cartesia_credential_dto.py +25 -0
  522. vapi/types/update_custom_llm_credential_dto.py +25 -0
  523. vapi/types/update_deep_infra_credential_dto.py +25 -0
  524. vapi/types/update_deepgram_credential_dto.py +32 -0
  525. vapi/types/update_eleven_labs_credential_dto.py +25 -0
  526. vapi/types/update_gcp_credential_dto.py +41 -0
  527. vapi/types/update_gladia_credential_dto.py +25 -0
  528. vapi/types/update_go_high_level_credential_dto.py +25 -0
  529. vapi/types/update_groq_credential_dto.py +25 -0
  530. vapi/types/update_lmnt_credential_dto.py +25 -0
  531. vapi/types/update_make_credential_dto.py +35 -0
  532. vapi/types/update_open_ai_credential_dto.py +25 -0
  533. vapi/types/update_open_router_credential_dto.py +25 -0
  534. vapi/types/update_org_dto.py +63 -0
  535. vapi/types/update_perplexity_ai_credential_dto.py +25 -0
  536. vapi/types/update_play_ht_credential_dto.py +27 -0
  537. vapi/types/update_rime_ai_credential_dto.py +25 -0
  538. vapi/types/update_runpod_credential_dto.py +25 -0
  539. vapi/types/update_s_3_credential_dto.py +51 -0
  540. vapi/types/update_together_ai_credential_dto.py +25 -0
  541. vapi/types/update_tool_template_dto.py +38 -0
  542. vapi/types/update_tool_template_dto_details.py +20 -0
  543. vapi/types/update_tool_template_dto_provider.py +5 -0
  544. vapi/types/update_tool_template_dto_provider_details.py +10 -0
  545. vapi/types/update_tool_template_dto_visibility.py +5 -0
  546. vapi/types/update_twilio_credential_dto.py +27 -0
  547. vapi/types/update_user_role_dto.py +23 -0
  548. vapi/types/update_user_role_dto_role.py +5 -0
  549. vapi/types/update_vonage_credential_dto.py +27 -0
  550. vapi/types/user.py +47 -0
  551. vapi/types/user_message.py +49 -0
  552. vapi/types/vapi_cost.py +32 -0
  553. vapi/types/vapi_model.py +102 -0
  554. vapi/types/vapi_model_steps_item.py +7 -0
  555. vapi/types/vapi_model_tools_item.py +20 -0
  556. vapi/types/vapi_phone_number.py +105 -0
  557. vapi/types/vapi_phone_number_fallback_destination.py +7 -0
  558. vapi/types/voice_cost.py +46 -0
  559. vapi/types/voice_library.py +126 -0
  560. vapi/types/voice_library_gender.py +5 -0
  561. vapi/types/voice_library_voice_response.py +27 -0
  562. vapi/types/vonage_credential.py +64 -0
  563. vapi/types/vonage_phone_number.py +108 -0
  564. vapi/types/vonage_phone_number_fallback_destination.py +7 -0
  565. vapi/types/workflow_block.py +99 -0
  566. vapi/types/workflow_block_messages_item.py +7 -0
  567. vapi/types/workflow_block_steps_item.py +7 -0
  568. vapi/version.py +3 -0
  569. vapi_server_sdk-0.0.0a7.dist-info/METADATA +179 -0
  570. vapi_server_sdk-0.0.0a7.dist-info/RECORD +571 -0
  571. vapi_server_sdk-0.0.0a7.dist-info/WHEEL +4 -0
@@ -0,0 +1,101 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing_extensions
9
+ import typing
10
+ from .server_message_hang_phone_number import ServerMessageHangPhoneNumber
11
+ from ..core.serialization import FieldMetadata
12
+ import pydantic
13
+ from .artifact import Artifact
14
+ from .create_assistant_dto import CreateAssistantDto
15
+ from .create_customer_dto import CreateCustomerDto
16
+ from .call import Call
17
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
18
+ from ..core.pydantic_utilities import update_forward_refs
19
+
20
+
21
+ class ServerMessageHang(UniversalBaseModel):
22
+ phone_number: typing_extensions.Annotated[
23
+ typing.Optional[ServerMessageHangPhoneNumber], FieldMetadata(alias="phoneNumber")
24
+ ] = pydantic.Field(default=None)
25
+ """
26
+ This is the phone number associated with the call.
27
+
28
+ This matches one of the following:
29
+
30
+ - `call.phoneNumber`,
31
+ - `call.phoneNumberId`.
32
+ """
33
+
34
+ type: typing.Literal["hang"] = pydantic.Field(default="hang")
35
+ """
36
+ This is the type of the message. "hang" is sent when the assistant is hanging due to a delay. The delay can be caused by many factors, such as:
37
+
38
+ - the model is too slow to respond
39
+ - the voice is too slow to respond
40
+ - the tool call is still waiting for a response from your server
41
+ - etc.
42
+ """
43
+
44
+ timestamp: typing.Optional[str] = pydantic.Field(default=None)
45
+ """
46
+ This is the ISO-8601 formatted timestamp of when the message was sent.
47
+ """
48
+
49
+ artifact: typing.Optional[Artifact] = pydantic.Field(default=None)
50
+ """
51
+ This is a live version of the `call.artifact`.
52
+
53
+ This matches what is stored on `call.artifact` after the call.
54
+ """
55
+
56
+ assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
57
+ """
58
+ This is the assistant that is currently active. This is provided for convenience.
59
+
60
+ This matches one of the following:
61
+
62
+ - `call.assistant`,
63
+ - `call.assistantId`,
64
+ - `call.squad[n].assistant`,
65
+ - `call.squad[n].assistantId`,
66
+ - `call.squadId->[n].assistant`,
67
+ - `call.squadId->[n].assistantId`.
68
+ """
69
+
70
+ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None)
71
+ """
72
+ This is the customer associated with the call.
73
+
74
+ This matches one of the following:
75
+
76
+ - `call.customer`,
77
+ - `call.customerId`.
78
+ """
79
+
80
+ call: typing.Optional[Call] = pydantic.Field(default=None)
81
+ """
82
+ This is the call object.
83
+
84
+ This matches what was returned in POST /call.
85
+
86
+ Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id.
87
+ """
88
+
89
+ if IS_PYDANTIC_V2:
90
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
91
+ else:
92
+
93
+ class Config:
94
+ frozen = True
95
+ smart_union = True
96
+ extra = pydantic.Extra.allow
97
+
98
+
99
+ update_forward_refs(CallbackStep, ServerMessageHang=ServerMessageHang)
100
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessageHang=ServerMessageHang)
101
+ update_forward_refs(HandoffStep, ServerMessageHang=ServerMessageHang)
@@ -0,0 +1,11 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .create_byo_phone_number_dto import CreateByoPhoneNumberDto
5
+ from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto
6
+ from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto
7
+ from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto
8
+
9
+ ServerMessageHangPhoneNumber = typing.Union[
10
+ CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto
11
+ ]
@@ -0,0 +1,101 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing_extensions
9
+ import typing
10
+ from .server_message_language_changed_phone_number import ServerMessageLanguageChangedPhoneNumber
11
+ from ..core.serialization import FieldMetadata
12
+ import pydantic
13
+ from .artifact import Artifact
14
+ from .create_assistant_dto import CreateAssistantDto
15
+ from .create_customer_dto import CreateCustomerDto
16
+ from .call import Call
17
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
18
+ from ..core.pydantic_utilities import update_forward_refs
19
+
20
+
21
+ class ServerMessageLanguageChanged(UniversalBaseModel):
22
+ phone_number: typing_extensions.Annotated[
23
+ typing.Optional[ServerMessageLanguageChangedPhoneNumber], FieldMetadata(alias="phoneNumber")
24
+ ] = pydantic.Field(default=None)
25
+ """
26
+ This is the phone number associated with the call.
27
+
28
+ This matches one of the following:
29
+
30
+ - `call.phoneNumber`,
31
+ - `call.phoneNumberId`.
32
+ """
33
+
34
+ type: typing.Literal["language-changed"] = pydantic.Field(default="language-changed")
35
+ """
36
+ This is the type of the message. "language-switched" is sent when the transcriber is automatically switched based on the detected language.
37
+ """
38
+
39
+ timestamp: typing.Optional[str] = pydantic.Field(default=None)
40
+ """
41
+ This is the ISO-8601 formatted timestamp of when the message was sent.
42
+ """
43
+
44
+ artifact: typing.Optional[Artifact] = pydantic.Field(default=None)
45
+ """
46
+ This is a live version of the `call.artifact`.
47
+
48
+ This matches what is stored on `call.artifact` after the call.
49
+ """
50
+
51
+ assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
52
+ """
53
+ This is the assistant that is currently active. This is provided for convenience.
54
+
55
+ This matches one of the following:
56
+
57
+ - `call.assistant`,
58
+ - `call.assistantId`,
59
+ - `call.squad[n].assistant`,
60
+ - `call.squad[n].assistantId`,
61
+ - `call.squadId->[n].assistant`,
62
+ - `call.squadId->[n].assistantId`.
63
+ """
64
+
65
+ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None)
66
+ """
67
+ This is the customer associated with the call.
68
+
69
+ This matches one of the following:
70
+
71
+ - `call.customer`,
72
+ - `call.customerId`.
73
+ """
74
+
75
+ call: typing.Optional[Call] = pydantic.Field(default=None)
76
+ """
77
+ This is the call object.
78
+
79
+ This matches what was returned in POST /call.
80
+
81
+ Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id.
82
+ """
83
+
84
+ language: str = pydantic.Field()
85
+ """
86
+ This is the language the transcriber is switched to.
87
+ """
88
+
89
+ if IS_PYDANTIC_V2:
90
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
91
+ else:
92
+
93
+ class Config:
94
+ frozen = True
95
+ smart_union = True
96
+ extra = pydantic.Extra.allow
97
+
98
+
99
+ update_forward_refs(CallbackStep, ServerMessageLanguageChanged=ServerMessageLanguageChanged)
100
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessageLanguageChanged=ServerMessageLanguageChanged)
101
+ update_forward_refs(HandoffStep, ServerMessageLanguageChanged=ServerMessageLanguageChanged)
@@ -0,0 +1,11 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .create_byo_phone_number_dto import CreateByoPhoneNumberDto
5
+ from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto
6
+ from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto
7
+ from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto
8
+
9
+ ServerMessageLanguageChangedPhoneNumber = typing.Union[
10
+ CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto
11
+ ]
@@ -0,0 +1,38 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .server_message_assistant_request import ServerMessageAssistantRequest
5
+ from .server_message_conversation_update import ServerMessageConversationUpdate
6
+ from .server_message_end_of_call_report import ServerMessageEndOfCallReport
7
+ from .server_message_hang import ServerMessageHang
8
+ from .server_message_model_output import ServerMessageModelOutput
9
+ from .server_message_phone_call_control import ServerMessagePhoneCallControl
10
+ from .server_message_speech_update import ServerMessageSpeechUpdate
11
+ from .server_message_status_update import ServerMessageStatusUpdate
12
+ from .server_message_tool_calls import ServerMessageToolCalls
13
+ from .server_message_transfer_destination_request import ServerMessageTransferDestinationRequest
14
+ from .server_message_transfer_update import ServerMessageTransferUpdate
15
+ from .server_message_transcript import ServerMessageTranscript
16
+ from .server_message_user_interrupted import ServerMessageUserInterrupted
17
+ from .server_message_language_changed import ServerMessageLanguageChanged
18
+ from .server_message_voice_input import ServerMessageVoiceInput
19
+ from .server_message_voice_request import ServerMessageVoiceRequest
20
+
21
+ ServerMessageMessage = typing.Union[
22
+ ServerMessageAssistantRequest,
23
+ ServerMessageConversationUpdate,
24
+ ServerMessageEndOfCallReport,
25
+ ServerMessageHang,
26
+ ServerMessageModelOutput,
27
+ ServerMessagePhoneCallControl,
28
+ ServerMessageSpeechUpdate,
29
+ ServerMessageStatusUpdate,
30
+ ServerMessageToolCalls,
31
+ ServerMessageTransferDestinationRequest,
32
+ ServerMessageTransferUpdate,
33
+ ServerMessageTranscript,
34
+ ServerMessageUserInterrupted,
35
+ ServerMessageLanguageChanged,
36
+ ServerMessageVoiceInput,
37
+ ServerMessageVoiceRequest,
38
+ ]
@@ -0,0 +1,101 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing_extensions
9
+ import typing
10
+ from .server_message_model_output_phone_number import ServerMessageModelOutputPhoneNumber
11
+ from ..core.serialization import FieldMetadata
12
+ import pydantic
13
+ from .artifact import Artifact
14
+ from .create_assistant_dto import CreateAssistantDto
15
+ from .create_customer_dto import CreateCustomerDto
16
+ from .call import Call
17
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
18
+ from ..core.pydantic_utilities import update_forward_refs
19
+
20
+
21
+ class ServerMessageModelOutput(UniversalBaseModel):
22
+ phone_number: typing_extensions.Annotated[
23
+ typing.Optional[ServerMessageModelOutputPhoneNumber], FieldMetadata(alias="phoneNumber")
24
+ ] = pydantic.Field(default=None)
25
+ """
26
+ This is the phone number associated with the call.
27
+
28
+ This matches one of the following:
29
+
30
+ - `call.phoneNumber`,
31
+ - `call.phoneNumberId`.
32
+ """
33
+
34
+ type: typing.Literal["model-output"] = pydantic.Field(default="model-output")
35
+ """
36
+ This is the type of the message. "model-output" is sent as the model outputs tokens.
37
+ """
38
+
39
+ timestamp: typing.Optional[str] = pydantic.Field(default=None)
40
+ """
41
+ This is the ISO-8601 formatted timestamp of when the message was sent.
42
+ """
43
+
44
+ artifact: typing.Optional[Artifact] = pydantic.Field(default=None)
45
+ """
46
+ This is a live version of the `call.artifact`.
47
+
48
+ This matches what is stored on `call.artifact` after the call.
49
+ """
50
+
51
+ assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
52
+ """
53
+ This is the assistant that is currently active. This is provided for convenience.
54
+
55
+ This matches one of the following:
56
+
57
+ - `call.assistant`,
58
+ - `call.assistantId`,
59
+ - `call.squad[n].assistant`,
60
+ - `call.squad[n].assistantId`,
61
+ - `call.squadId->[n].assistant`,
62
+ - `call.squadId->[n].assistantId`.
63
+ """
64
+
65
+ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None)
66
+ """
67
+ This is the customer associated with the call.
68
+
69
+ This matches one of the following:
70
+
71
+ - `call.customer`,
72
+ - `call.customerId`.
73
+ """
74
+
75
+ call: typing.Optional[Call] = pydantic.Field(default=None)
76
+ """
77
+ This is the call object.
78
+
79
+ This matches what was returned in POST /call.
80
+
81
+ Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id.
82
+ """
83
+
84
+ output: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
85
+ """
86
+ This is the output of the model. It can be a token or tool call.
87
+ """
88
+
89
+ if IS_PYDANTIC_V2:
90
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
91
+ else:
92
+
93
+ class Config:
94
+ frozen = True
95
+ smart_union = True
96
+ extra = pydantic.Extra.allow
97
+
98
+
99
+ update_forward_refs(CallbackStep, ServerMessageModelOutput=ServerMessageModelOutput)
100
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessageModelOutput=ServerMessageModelOutput)
101
+ update_forward_refs(HandoffStep, ServerMessageModelOutput=ServerMessageModelOutput)
@@ -0,0 +1,11 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .create_byo_phone_number_dto import CreateByoPhoneNumberDto
5
+ from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto
6
+ from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto
7
+ from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto
8
+
9
+ ServerMessageModelOutputPhoneNumber = typing.Union[
10
+ CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto
11
+ ]
@@ -0,0 +1,110 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing_extensions
9
+ import typing
10
+ from .server_message_phone_call_control_phone_number import ServerMessagePhoneCallControlPhoneNumber
11
+ from ..core.serialization import FieldMetadata
12
+ import pydantic
13
+ from .server_message_phone_call_control_request import ServerMessagePhoneCallControlRequest
14
+ from .server_message_phone_call_control_destination import ServerMessagePhoneCallControlDestination
15
+ from .artifact import Artifact
16
+ from .create_assistant_dto import CreateAssistantDto
17
+ from .create_customer_dto import CreateCustomerDto
18
+ from .call import Call
19
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
20
+ from ..core.pydantic_utilities import update_forward_refs
21
+
22
+
23
+ class ServerMessagePhoneCallControl(UniversalBaseModel):
24
+ phone_number: typing_extensions.Annotated[
25
+ typing.Optional[ServerMessagePhoneCallControlPhoneNumber], FieldMetadata(alias="phoneNumber")
26
+ ] = pydantic.Field(default=None)
27
+ """
28
+ This is the phone number associated with the call.
29
+
30
+ This matches one of the following:
31
+
32
+ - `call.phoneNumber`,
33
+ - `call.phoneNumberId`.
34
+ """
35
+
36
+ type: typing.Literal["phone-call-control"] = pydantic.Field(default="phone-call-control")
37
+ """
38
+ This is the type of the message. "phone-call-control" is an advanced type of message.
39
+
40
+ When it is requested in `assistant.serverMessages`, the hangup and forwarding responsibilities are delegated to your server. Vapi will no longer do the actual transfer and hangup.
41
+ """
42
+
43
+ request: ServerMessagePhoneCallControlRequest = pydantic.Field()
44
+ """
45
+ This is the request to control the phone call.
46
+ """
47
+
48
+ destination: typing.Optional[ServerMessagePhoneCallControlDestination] = pydantic.Field(default=None)
49
+ """
50
+ This is the destination to forward the call to if the request is "forward".
51
+ """
52
+
53
+ timestamp: typing.Optional[str] = pydantic.Field(default=None)
54
+ """
55
+ This is the ISO-8601 formatted timestamp of when the message was sent.
56
+ """
57
+
58
+ artifact: typing.Optional[Artifact] = pydantic.Field(default=None)
59
+ """
60
+ This is a live version of the `call.artifact`.
61
+
62
+ This matches what is stored on `call.artifact` after the call.
63
+ """
64
+
65
+ assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
66
+ """
67
+ This is the assistant that is currently active. This is provided for convenience.
68
+
69
+ This matches one of the following:
70
+
71
+ - `call.assistant`,
72
+ - `call.assistantId`,
73
+ - `call.squad[n].assistant`,
74
+ - `call.squad[n].assistantId`,
75
+ - `call.squadId->[n].assistant`,
76
+ - `call.squadId->[n].assistantId`.
77
+ """
78
+
79
+ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None)
80
+ """
81
+ This is the customer associated with the call.
82
+
83
+ This matches one of the following:
84
+
85
+ - `call.customer`,
86
+ - `call.customerId`.
87
+ """
88
+
89
+ call: typing.Optional[Call] = pydantic.Field(default=None)
90
+ """
91
+ This is the call object.
92
+
93
+ This matches what was returned in POST /call.
94
+
95
+ Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id.
96
+ """
97
+
98
+ if IS_PYDANTIC_V2:
99
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
100
+ else:
101
+
102
+ class Config:
103
+ frozen = True
104
+ smart_union = True
105
+ extra = pydantic.Extra.allow
106
+
107
+
108
+ update_forward_refs(CallbackStep, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl)
109
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl)
110
+ update_forward_refs(HandoffStep, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl)
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .transfer_destination_number import TransferDestinationNumber
5
+ from .transfer_destination_sip import TransferDestinationSip
6
+
7
+ ServerMessagePhoneCallControlDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip]
@@ -0,0 +1,11 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .create_byo_phone_number_dto import CreateByoPhoneNumberDto
5
+ from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto
6
+ from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto
7
+ from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto
8
+
9
+ ServerMessagePhoneCallControlPhoneNumber = typing.Union[
10
+ CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto
11
+ ]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ServerMessagePhoneCallControlRequest = typing.Union[typing.Literal["forward", "hang-up"], typing.Any]
@@ -0,0 +1,39 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing_extensions
9
+ from .server_message_response_message_response import ServerMessageResponseMessageResponse
10
+ from ..core.serialization import FieldMetadata
11
+ import pydantic
12
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
13
+ import typing
14
+ from ..core.pydantic_utilities import update_forward_refs
15
+
16
+
17
+ class ServerMessageResponse(UniversalBaseModel):
18
+ message_response: typing_extensions.Annotated[
19
+ ServerMessageResponseMessageResponse, FieldMetadata(alias="messageResponse")
20
+ ] = pydantic.Field()
21
+ """
22
+ This is the response that is expected from the server to the message.
23
+
24
+ Note: Most messages don't expect a response. Only "assistant-request", "tool-calls" and "transfer-destination-request" do.
25
+ """
26
+
27
+ if IS_PYDANTIC_V2:
28
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
+ else:
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ extra = pydantic.Extra.allow
35
+
36
+
37
+ update_forward_refs(CallbackStep, ServerMessageResponse=ServerMessageResponse)
38
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessageResponse=ServerMessageResponse)
39
+ update_forward_refs(HandoffStep, ServerMessageResponse=ServerMessageResponse)
@@ -0,0 +1,80 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ from ..core.pydantic_utilities import UniversalBaseModel
5
+ from .callback_step import CallbackStep
6
+ from .create_workflow_block_dto import CreateWorkflowBlockDto
7
+ from .handoff_step import HandoffStep
8
+ import typing
9
+ from .server_message_response_assistant_request_destination import ServerMessageResponseAssistantRequestDestination
10
+ import pydantic
11
+ import typing_extensions
12
+ from ..core.serialization import FieldMetadata
13
+ from .create_assistant_dto import CreateAssistantDto
14
+ from .assistant_overrides import AssistantOverrides
15
+ from .create_squad_dto import CreateSquadDto
16
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
17
+ from ..core.pydantic_utilities import update_forward_refs
18
+
19
+
20
+ class ServerMessageResponseAssistantRequest(UniversalBaseModel):
21
+ destination: typing.Optional[ServerMessageResponseAssistantRequestDestination] = pydantic.Field(default=None)
22
+ """
23
+ This is the destination to transfer the inbound call to. This will immediately transfer without using any assistants.
24
+
25
+ If this is sent, `assistantId`, `assistant`, `squadId`, and `squad` are ignored.
26
+ """
27
+
28
+ assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = (
29
+ pydantic.Field(default=None)
30
+ )
31
+ """
32
+ This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
33
+ """
34
+
35
+ assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None)
36
+ """
37
+ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
38
+
39
+ If you're unsure why you're getting an invalid assistant, try logging your response and send the JSON blob to POST /assistant which will return the validation errors.
40
+ """
41
+
42
+ assistant_overrides: typing_extensions.Annotated[
43
+ typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides")
44
+ ] = pydantic.Field(default=None)
45
+ """
46
+ These are the overrides for the `assistant` or `assistantId`'s settings and template variables.
47
+ """
48
+
49
+ squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field(
50
+ default=None
51
+ )
52
+ """
53
+ This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
54
+ """
55
+
56
+ squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None)
57
+ """
58
+ This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
59
+ """
60
+
61
+ error: typing.Optional[str] = pydantic.Field(default=None)
62
+ """
63
+ This is the error if the call shouldn't be accepted. This is spoken to the customer.
64
+
65
+ If this is sent, `assistantId`, `assistant`, `squadId`, `squad`, and `destination` are ignored.
66
+ """
67
+
68
+ if IS_PYDANTIC_V2:
69
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
70
+ else:
71
+
72
+ class Config:
73
+ frozen = True
74
+ smart_union = True
75
+ extra = pydantic.Extra.allow
76
+
77
+
78
+ update_forward_refs(CallbackStep, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest)
79
+ update_forward_refs(CreateWorkflowBlockDto, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest)
80
+ update_forward_refs(HandoffStep, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest)
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .transfer_destination_number import TransferDestinationNumber
5
+ from .transfer_destination_sip import TransferDestinationSip
6
+
7
+ ServerMessageResponseAssistantRequestDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip]
@@ -0,0 +1,14 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .server_message_response_assistant_request import ServerMessageResponseAssistantRequest
5
+ from .server_message_response_tool_calls import ServerMessageResponseToolCalls
6
+ from .server_message_response_transfer_destination_request import ServerMessageResponseTransferDestinationRequest
7
+ from .server_message_response_voice_request import ServerMessageResponseVoiceRequest
8
+
9
+ ServerMessageResponseMessageResponse = typing.Union[
10
+ ServerMessageResponseAssistantRequest,
11
+ ServerMessageResponseToolCalls,
12
+ ServerMessageResponseTransferDestinationRequest,
13
+ ServerMessageResponseVoiceRequest,
14
+ ]